Commit fd75b088 authored by Kai Koehne's avatar Kai Koehne
Browse files

Put "Technical Support", "Report Bug..." in a separate menu group



This allows other plugins to add actions here.

Change-Id: Id5b751bf719533842ba426ecdb4f98c43a73755b
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 7f4c9a19
......@@ -175,6 +175,7 @@ const char G_WINDOW_OTHER[] = "QtCreator.Group.Window.Other";
// Help groups (global)
const char G_HELP_HELP[] = "QtCreator.Group.Help.Help";
const char G_HELP_SUPPORT[] = "QtCreator.Group.Help.Supprt";
const char G_HELP_ABOUT[] = "QtCreator.Group.Help.About";
const char ICON_MINUS[] = ":/core/images/minus.png";
......
......@@ -511,6 +511,7 @@ void MainWindow::registerDefaultContainers()
menubar->addMenu(ac, Constants::G_HELP);
ac->menu()->setTitle(tr("&Help"));
ac->appendGroup(Constants::G_HELP_HELP);
ac->appendGroup(Constants::G_HELP_SUPPORT);
ac->appendGroup(Constants::G_HELP_ABOUT);
}
......@@ -746,6 +747,11 @@ void MainWindow::registerDefaultActions()
mwindow->addMenu(mviews, Constants::G_WINDOW_VIEWS);
mviews->menu()->setTitle(tr("&Views"));
// "Help" separators
mhelp->addSeparator(globalContext, Constants::G_HELP_SUPPORT);
if (!Utils::HostOsInfo::isMacHost())
mhelp->addSeparator(globalContext, Constants::G_HELP_ABOUT);
// About IDE Action
icon = QIcon::fromTheme(QLatin1String("help-about"));
if (Utils::HostOsInfo::isMacHost())
......
......@@ -229,7 +229,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
connect(action, SIGNAL(triggered()), this, SLOT(addBookmark()));
// Add Contents, Index, and Context menu items and a separator to the Help menu
// Add Contents, Index, and Context menu items
action = new QAction(QIcon::fromTheme(QLatin1String("help-contents")),
tr(SB_CONTENTS), this);
cmd = ActionManager::registerAction(action, "Help.Contents", globalcontext);
......@@ -247,30 +247,16 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
cmd->setDefaultKeySequence(QKeySequence(Qt::Key_F1));
connect(action, SIGNAL(triggered()), this, SLOT(activateContext()));
if (!Utils::HostOsInfo::isMacHost()) {
action = new QAction(this);
action->setSeparator(true);
cmd = ActionManager::registerAction(action, "Help.Separator", globalcontext);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
}
action = new QAction(tr("Technical Support"), this);
cmd = ActionManager::registerAction(action, "Help.TechSupport", globalcontext);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
connect(action, SIGNAL(triggered()), this, SLOT(slotOpenSupportPage()));
action = new QAction(tr("Report Bug..."), this);
cmd = ActionManager::registerAction(action, "Help.ReportBug", globalcontext);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
connect(action, SIGNAL(triggered()), this, SLOT(slotReportBug()));
if (!Utils::HostOsInfo::isMacHost()) {
action = new QAction(this);
action->setSeparator(true);
cmd = ActionManager::registerAction(action, "Help.Separator2", globalcontext);
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
}
action = new QAction(this);
ActionManager::registerAction(action, Core::Constants::PRINT, modecontext);
connect(action, SIGNAL(triggered()), m_centralWidget, SLOT(print()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment