diff options
author | Michele Calgaro <[email protected]> | 2014-03-19 19:22:04 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2014-03-19 19:22:04 +0900 |
commit | 22a4e52f7c6ea1b7afda034496b9b05524ef3635 (patch) | |
tree | de5bcee895c77066525555f753032d5b557cfaad | |
parent | 52a32a97a3e99d6026f6ad990f7bd90e293e440a (diff) | |
download | katapult-22a4e52f7c6ea1b7afda034496b9b05524ef3635.tar.gz katapult-22a4e52f7c6ea1b7afda034496b9b05524ef3635.zip |
Added Help submenu to Katapult systray icon. This resolves bug 1842.
-rw-r--r-- | katapult/katapult/katapult.cpp | 8 | ||||
-rw-r--r-- | katapult/katapult/katapult.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/katapult/katapult/katapult.cpp b/katapult/katapult/katapult.cpp index 6a14011..7e79597 100644 --- a/katapult/katapult/katapult.cpp +++ b/katapult/katapult/katapult.cpp @@ -27,6 +27,7 @@ #include <tdeparts/componentfactory.h> #include <kpassivepopup.h> #include <tdepopupmenu.h> +#include <khelpmenu.h> #include <tdelocale.h> #include <tdeaboutapplication.h> #include <dcopclient.h> @@ -60,6 +61,8 @@ Katapult::Katapult() _query = ""; settings = new KatapultSettings(); + helpmenu = new KHelpMenu(this,TQString(),false); + connect(helpmenu, TQT_SIGNAL(showAboutApplication()),this, TQT_SLOT(showAboutDialog())); hideTimer = new TQTimer(this); connect(hideTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(hideLauncher())); @@ -139,9 +142,8 @@ void Katapult::initAccel(TQWidget *parent) KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(showShortcutsDialog()), actions)->plug((TQWidget *) contextMenu()); KStdAction::preferences(settings, TQT_SLOT(configure()), actions)->plug((TQWidget *) contextMenu()); - contextMenu()->insertSeparator(); - KStdAction::aboutApp(TQT_TQOBJECT(this), TQT_SLOT(showAboutDialog()), actions)->plug((TQWidget *) contextMenu()); - contextMenu()->insertSeparator(); + contextMenu()->insertItem(SmallIconSet("help"), KStdGuiItem::help().text(), helpmenu->menu()); + contextMenu()->insertSeparator(); KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actions)->plug((TQWidget *) contextMenu()); diff --git a/katapult/katapult/katapult.h b/katapult/katapult/katapult.h index c1f8b61..94ae078 100644 --- a/katapult/katapult/katapult.h +++ b/katapult/katapult/katapult.h @@ -43,6 +43,7 @@ #include "katapultaction.h" #include "katapultiface.h" +class KHelpMenu; class KatapultSettings; class Katapult : public KSystemTray, virtual public KatapultIface @@ -84,6 +85,7 @@ private: TDEGlobalAccel *globalAccel; TDEActionCollection *actions; KatapultSettings *settings; + KHelpMenu *helpmenu; Match bestMatch; const KatapultAction *action; TQString _query; |