diff --git a/doomsday/tools/shell/shell-gui/src/guishellapp.cpp b/doomsday/tools/shell/shell-gui/src/guishellapp.cpp index 2da364cbf3..dfb256add9 100644 --- a/doomsday/tools/shell/shell-gui/src/guishellapp.cpp +++ b/doomsday/tools/shell/shell-gui/src/guishellapp.cpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include Q_DECLARE_METATYPE(de::Address) @@ -98,11 +100,15 @@ GuiShellApp::GuiShellApp(int &argc, char **argv) // These will appear in the application menu: menu->addAction(tr("Preferences..."), this, SLOT(showPreferences()), QKeySequence(tr("Ctrl+,"))); menu->addAction(tr("About"), this, SLOT(aboutShell())); + + d->menuBar->addMenu(makeHelpMenu()); #endif newOrReusedConnectionWindow(); } + + LinkWindow *GuiShellApp::newOrReusedConnectionWindow() { LinkWindow *found = 0; @@ -151,6 +157,13 @@ QMenu *GuiShellApp::localServersMenu() return d->localMenu; } +QMenu *GuiShellApp::makeHelpMenu() +{ + QMenu *helpMenu = new QMenu(tr("&Help")); + helpMenu->addAction(tr("Shell Help"), this, SLOT(showHelp())); + return helpMenu; +} + ServerFinder &GuiShellApp::serverFinder() { return d->finder; @@ -259,6 +272,11 @@ void GuiShellApp::aboutShell() AboutDialog().exec(); } +void GuiShellApp::showHelp() +{ + QDesktopServices::openUrl(QUrl(tr("http://dengine.net/dew/index.php?title=Shell_Help"))); +} + void GuiShellApp::showPreferences() { if(!d->prefs) diff --git a/doomsday/tools/shell/shell-gui/src/guishellapp.h b/doomsday/tools/shell/shell-gui/src/guishellapp.h index a10e34cc87..e68990b043 100644 --- a/doomsday/tools/shell/shell-gui/src/guishellapp.h +++ b/doomsday/tools/shell/shell-gui/src/guishellapp.h @@ -37,6 +37,7 @@ class GuiShellApp : public QtGuiApp static GuiShellApp &app(); QMenu *localServersMenu(); + QMenu *makeHelpMenu(); public slots: void connectToServer(); @@ -47,6 +48,7 @@ public slots: void stopServer(); void updateLocalServerMenu(); void aboutShell(); + void showHelp(); void showPreferences(); void preferencesDone(); void updateMenu(); diff --git a/doomsday/tools/shell/shell-gui/src/linkwindow.cpp b/doomsday/tools/shell/shell-gui/src/linkwindow.cpp index 74b975617c..c21f48a665 100644 --- a/doomsday/tools/shell/shell-gui/src/linkwindow.cpp +++ b/doomsday/tools/shell/shell-gui/src/linkwindow.cpp @@ -190,7 +190,9 @@ LinkWindow::LinkWindow(QWidget *parent) connect(svMenu, SIGNAL(aboutToShow()), app, SLOT(updateLocalServerMenu())); - QMenu *helpMenu = menuBar()->addMenu(tr("&Help")); + QMenu *helpMenu = app->makeHelpMenu(); + menuBar()->addMenu(helpMenu); + helpMenu->addSeparator(); helpMenu->addAction(tr("About Doomsday Shell"), app, SLOT(aboutShell())); #endif