diff --git a/ground/src/plugins/coreplugin/core.qrc b/ground/src/plugins/coreplugin/core.qrc index 648e2d541..bafb22e05 100644 --- a/ground/src/plugins/coreplugin/core.qrc +++ b/ground/src/plugins/coreplugin/core.qrc @@ -48,5 +48,6 @@ images/exiticon.png images/optionsicon.png images/helpicon.png + images/openpiloticon.png diff --git a/ground/src/plugins/coreplugin/coreconstants.h b/ground/src/plugins/coreplugin/coreconstants.h index 1ee0d19d4..665b79dbf 100644 --- a/ground/src/plugins/coreplugin/coreconstants.h +++ b/ground/src/plugins/coreplugin/coreconstants.h @@ -216,6 +216,8 @@ const char * const ICON_INFO = ":/core/images/infoicon.png"; const char * const ICON_EXIT = ":/core/images/exiticon.png"; const char * const ICON_OPTIONS = ":/core/images/optionsicon.png"; const char * const ICON_HELP = ":/core/images/helpicon.png"; +const char * const ICON_OPENPILOT = ":/core/images/openpiloticon.png"; + // wizard kind const char * const WIZARD_TYPE_FILE = "GCS::WizardType::File"; diff --git a/ground/src/plugins/coreplugin/images/openpiloticon.png b/ground/src/plugins/coreplugin/images/openpiloticon.png new file mode 100644 index 000000000..44e57839a Binary files /dev/null and b/ground/src/plugins/coreplugin/images/openpiloticon.png differ diff --git a/ground/src/plugins/coreplugin/mainwindow.cpp b/ground/src/plugins/coreplugin/mainwindow.cpp index 337e3ab6c..18b66dea6 100644 --- a/ground/src/plugins/coreplugin/mainwindow.cpp +++ b/ground/src/plugins/coreplugin/mainwindow.cpp @@ -472,6 +472,9 @@ void MainWindow::registerDefaultActions() cmd = createSeparator(am, this, QLatin1String("QtCreator.Tools.Sep.Options"), m_globalContext); mtools->addAction(cmd, Constants::G_DEFAULT_THREE); + // Help menu separators + + // Return to editor shortcut: Note this requires Qt to fix up // handling of shortcut overrides in menus, item views, combos.... m_focusToEditor = new QShortcut(this); @@ -623,24 +626,10 @@ void MainWindow::registerDefaultActions() connect(m_toggleFullScreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool))); #endif - // About GCS Action -#ifdef Q_WS_MAC - tmpaction = new QAction(QIcon(Constants::ICON_INFO), tr("About &OpenPilot GCS"), this); // it's convention not to add dots to the about menu -#else - tmpaction = new QAction(QIcon(Constants::ICON_INFO), tr("About &OpenPilot GCS..."), this); -#endif - cmd = am->registerAction(tmpaction, Constants::ABOUT_OPENPILOTGCS, m_globalContext); - mhelp->addAction(cmd, Constants::G_HELP_ABOUT); - tmpaction->setEnabled(true); -#ifdef Q_WS_MAC - cmd->action()->setMenuRole(QAction::ApplicationSpecificRole); -#endif - connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutOpenPilogGCS())); - - //About Plugins Action - tmpaction = new QAction(QIcon(Constants::ICON_INFO), tr("About &Plugins..."), this); - cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext); - mhelp->addAction(cmd, Constants::G_HELP_ABOUT); + //Help Action + tmpaction = new QAction(QIcon(Constants::ICON_HELP), tr("&Help..."), this); + cmd = am->registerAction(tmpaction, Constants::G_HELP_HELP, m_globalContext); + mhelp->addAction(cmd, Constants::G_HELP_HELP); tmpaction->setEnabled(true); #ifdef Q_WS_MAC cmd->action()->setMenuRole(QAction::ApplicationSpecificRole); @@ -654,6 +643,32 @@ void MainWindow::registerDefaultActions() cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Help.Sep.About"), m_globalContext); mhelp->addAction(cmd, Constants::G_HELP_ABOUT); #endif + + //About Plugins Action + tmpaction = new QAction(QIcon(Constants::ICON_INFO), tr("About &Plugins..."), this); + cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext); + mhelp->addAction(cmd, Constants::G_HELP_ABOUT); + tmpaction->setEnabled(true); +#ifdef Q_WS_MAC + cmd->action()->setMenuRole(QAction::ApplicationSpecificRole); +#endif + connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins())); + + // About GCS Action +#ifdef Q_WS_MAC + tmpaction = new QAction(QIcon(Constants::ICON_OPENPILOT), tr("About &OpenPilot GCS"), this); // it's convention not to add dots to the about menu +#else + tmpaction = new QAction(QIcon(Constants::ICON_OPENPILOT), tr("About &OpenPilot GCS..."), this); +#endif + cmd = am->registerAction(tmpaction, Constants::ABOUT_OPENPILOTGCS, m_globalContext); + mhelp->addAction(cmd, Constants::G_HELP_ABOUT); + tmpaction->setEnabled(true); +#ifdef Q_WS_MAC + cmd->action()->setMenuRole(QAction::ApplicationSpecificRole); +#endif + connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutOpenPilogGCS())); + + } void MainWindow::newFile()