From 22a4e52f7c6ea1b7afda034496b9b05524ef3635 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 19 Mar 2014 19:22:04 +0900 Subject: [PATCH] Added Help submenu to Katapult systray icon. This resolves bug 1842. --- katapult/katapult/katapult.cpp | 8 +++++--- 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 #include #include +#include #include #include #include @@ -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;