forked from qt-creator/qt-creator
Added theme icon to the help contents action
Also put it at the top, since it looks better there with the icon.
This commit is contained in:
@@ -190,17 +190,17 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
|||||||
cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_M));
|
cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_M));
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(addBookmark()));
|
connect(action, SIGNAL(triggered()), this, SLOT(addBookmark()));
|
||||||
|
|
||||||
// Add Index, Contents, and Context menu items and a separator to the Help menu
|
// Add Contents, Index, and Context menu items and a separator to the Help menu
|
||||||
|
action = new QAction(QIcon::fromTheme(QLatin1String("help-contents")), tr("Contents"), this);
|
||||||
|
cmd = am->registerAction(action, QLatin1String("Help.Contents"), globalcontext);
|
||||||
|
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||||
|
connect(action, SIGNAL(triggered()), this, SLOT(activateContents()));
|
||||||
|
|
||||||
action = new QAction(tr("Index"), this);
|
action = new QAction(tr("Index"), this);
|
||||||
cmd = am->registerAction(action, QLatin1String("Help.Index"), globalcontext);
|
cmd = am->registerAction(action, QLatin1String("Help.Index"), globalcontext);
|
||||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(activateIndex()));
|
connect(action, SIGNAL(triggered()), this, SLOT(activateIndex()));
|
||||||
|
|
||||||
action = new QAction(tr("Contents"), this);
|
|
||||||
cmd = am->registerAction(action, QLatin1String("Help.Contents"), globalcontext);
|
|
||||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(activateContents()));
|
|
||||||
|
|
||||||
action = new QAction(tr("Context Help"), this);
|
action = new QAction(tr("Context Help"), this);
|
||||||
cmd = am->registerAction(action, QLatin1String("Help.Context"), globalcontext);
|
cmd = am->registerAction(action, QLatin1String("Help.Context"), globalcontext);
|
||||||
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||||
|
Reference in New Issue
Block a user