diff options
author | Michele Calgaro <[email protected]> | 2020-04-20 22:52:39 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-04-29 21:37:03 +0900 |
commit | 82346276f8ea6c56540c01524858ae1fd0edfe83 (patch) | |
tree | 1845cc7c412eead0559aa5c6455577da3223af99 /src/kpowersave.cpp | |
parent | 9ce909211097aeb83f763d097d509de8fbc9c044 (diff) | |
download | kpowersave-82346276f8ea6c56540c01524858ae1fd0edfe83.tar.gz kpowersave-82346276f8ea6c56540c01524858ae1fd0edfe83.zip |
Replaced custom help menu with standard TDE help menu. This relates to bug 3087.
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit a0e45e83a656cffa30da7ca8ee8559664996f240)
Diffstat (limited to 'src/kpowersave.cpp')
-rw-r--r-- | src/kpowersave.cpp | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/src/kpowersave.cpp b/src/kpowersave.cpp index 6e48666..beebaf0 100644 --- a/src/kpowersave.cpp +++ b/src/kpowersave.cpp @@ -30,6 +30,7 @@ #include <knotifydialog.h> #include <kpassivepopup.h> #include <tdepopupmenu.h> +#include <khelpmenu.h> // other TQt headers: #include <tqcursor.h> @@ -219,17 +220,11 @@ void kpowersave::initMenu() { HELP_SEPARATOR_MENU_ID = contextMenu()->insertSeparator(); - help_menu = new TQPopupMenu(this, i18n("&Help").utf8()); - - help_menu->insertItem( SmallIcon("help", TQIconSet::Automatic), i18n("&KPowersave Handbook"), - this, TQT_SLOT(slotHelp())); - help_menu->insertSeparator(); - help_menu->insertItem( i18n("&Report a bug ..."), this, TQT_SLOT(slotReportBug())); - help_menu->insertItem( SmallIcon("kpowersave", TQIconSet::Automatic), - i18n("&About KPowersave"), 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())); @@ -557,34 +552,6 @@ void kpowersave::slotAbout() } /*! - * \b TQT_SLOT to open the website to report bugs - */ -void kpowersave::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 @@ -599,6 +566,7 @@ void kpowersave::do_setIconBG(){ kdDebugFuncOut(trace); } + /*! * \b TQT_SLOT to enable/disable the autosuspend. */ |