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:
Thorbjørn Lindeijer
2010-04-15 14:50:17 +02:00
parent 2cebfd001f
commit 407fa3c3d5

View File

@@ -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);