diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-04-20 19:48:26 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-04-20 19:48:26 +0900 |
commit | 60091c788a66a7ff26fa4e78b8c0caac6d8c580a (patch) | |
tree | 505124fbd6d07a07b91ce4e5db6fca7e9c663383 | |
parent | 41ca44956bd99543f0323a68886116b757331983 (diff) | |
download | tdepowersave-60091c788a66a7ff26fa4e78b8c0caac6d8c580a.tar.gz tdepowersave-60091c788a66a7ff26fa4e78b8c0caac6d8c580a.zip |
Replaced custom help menu with standard TDE help menu. This resolves bug 3087.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | src/tdepowersave.cpp | 46 | ||||
-rw-r--r-- | src/tdepowersave.h | 8 |
2 files changed, 7 insertions, 47 deletions
diff --git a/src/tdepowersave.cpp b/src/tdepowersave.cpp index 9f92adf..12f2060 100644 --- a/src/tdepowersave.cpp +++ b/src/tdepowersave.cpp @@ -31,6 +31,7 @@ #include <kpassivepopup.h> #include <tdepopupmenu.h> #include <kglobalaccel.h> +#include <khelpmenu.h> // other TQt headers: #include <tqcursor.h> @@ -225,17 +226,11 @@ void tdepowersave::initMenu() { HELP_SEPARATOR_MENU_ID = contextMenu()->insertSeparator(); - help_menu = new TQPopupMenu(this, i18n("&Help").utf8()); - - help_menu->insertItem( SmallIcon("help", TQIconSet::Automatic), i18n("&TDEPowersave Handbook"), - this, TQT_SLOT(slotHelp())); - help_menu->insertSeparator(); - help_menu->insertItem( i18n("&Report a bug ..."), this, TQT_SLOT(slotReportBug())); - help_menu->insertItem( SmallIcon("tdepowersave", TQIconSet::Automatic), - i18n("&About TDEPowersave"), this, TQT_SLOT(slotAbout())); - - HELP_MENU = contextMenu()->insertItem(SmallIcon("help", TQIconSet::Automatic), - i18n("&Help"), help_menu); + // Create help submenu + KHelpMenu *m_help = new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false, actionCollection()); + TDEPopupMenu *help = m_help->menu(); + help->connectItem(KHelpMenu::menuHelpContents, this, TQT_SLOT(slotHelpContents())); + this->contextMenu()->insertItem(SmallIcon("help"), KStdGuiItem::help().text(), help); connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit())); @@ -563,34 +558,6 @@ void tdepowersave::slotAbout() } /*! - * \b TQT_SLOT to open the website to report bugs - */ -void tdepowersave::slotReportBug() -{ -#ifdef DISTRO_IS_SUSE - #ifdef DISTRO_IS_SLES_SLED - kapp->invokeBrowser("https://bugzilla.novell.com/"); - #else - kapp->invokeBrowser("http://en.opensuse.org/Submitting_Bug_Reports"); - #endif -#else - #ifdef DISTRO_IS_ALTLINUX - kapp->invokeBrowser("http://bugzilla.altlinux.org/"); - #else - #ifdef DISTRO_IS_UBUNTU - kapp->invokeBrowser("https://launchpad.net/distros/ubuntu/+bugs"); - #else - #ifdef DISTRO_IS_PARDUS - kapp->invokeBrowser("http://bugs.pardus.org.tr/"); - #else - kapp->invokeBrowser("http://sourceforge.net/tracker/?group_id=124576&atid=700009"); - #endif - #endif - #endif -#endif -} - -/*! * \b TQT_SLOT to set the icon background on/off if battery is in critical, low or warning-state. Within * this function we set \ref icon_state_changed to true and call \ref redrawPixmap() to redraw the * kickerapplet icon and create a icon with blinking background. \n \n @@ -605,6 +572,7 @@ void tdepowersave::do_setIconBG(){ kdDebugFuncOut(trace); } + /*! * \b TQT_SLOT to enable/disable the autosuspend. */ diff --git a/src/tdepowersave.h b/src/tdepowersave.h index cb0bd0b..df5214a 100644 --- a/src/tdepowersave.h +++ b/src/tdepowersave.h @@ -215,9 +215,6 @@ private: //! a menu seperator ID /*! contains the ID of the separator between autosuspend and Help*/ int HELP_SEPARATOR_MENU_ID; - //! a menu ID - /*! contains the ID of the help menu*/ - int HELP_MENU; //! number of white pixel in the kickerapplet icon /*! @@ -258,9 +255,6 @@ private: //! a sub-menu of the kickerapplet /*! TQPopupMenu for the scheme-entries. */ TQPopupMenu *scheme_menu; - //! a sub-menu of the kickerapplet - /*! TQPopupMenu for the help-entries. */ - TQPopupMenu *help_menu; //! icon-pixmap @@ -343,8 +337,6 @@ private slots: void slotHelp(); //! called to open the tdepowersave About dialog void slotAbout(); - //! called to open website to report bugs - void slotReportBug(); //! called if the configure dialog is destroyed void observeConfigDlg(); //! called if user exit from tdepowersave |