Replaced custom help menu with standard TDE help menu. This relates to bug 3087.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/3/head
Michele Calgaro 5 years ago
parent 1fe2e9a118
commit a0e45e83a6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -30,6 +30,7 @@
#include <knotifydialog.h> #include <knotifydialog.h>
#include <kpassivepopup.h> #include <kpassivepopup.h>
#include <tdepopupmenu.h> #include <tdepopupmenu.h>
#include <khelpmenu.h>
// other TQt headers: // other TQt headers:
#include <tqcursor.h> #include <tqcursor.h>
@ -219,17 +220,11 @@ void kpowersave::initMenu() {
HELP_SEPARATOR_MENU_ID = contextMenu()->insertSeparator(); HELP_SEPARATOR_MENU_ID = contextMenu()->insertSeparator();
help_menu = new TQPopupMenu(this, i18n("&Help").utf8()); // Create help submenu
KHelpMenu *m_help = new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false, actionCollection());
help_menu->insertItem( SmallIcon("help", TQIconSet::Automatic), i18n("&KPowersave Handbook"), TDEPopupMenu *help = m_help->menu();
this, TQT_SLOT(slotHelp())); help->connectItem(KHelpMenu::menuHelpContents, this, TQT_SLOT(slotHelpContents()));
help_menu->insertSeparator(); this->contextMenu()->insertItem(SmallIcon("help"), KStdGuiItem::help().text(), help);
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);
connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit())); connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit()));
@ -556,34 +551,6 @@ void kpowersave::slotAbout()
a.exec(); a.exec();
} }
/*!
* \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 * \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 * this function we set \ref icon_state_changed to true and call \ref redrawPixmap() to redraw the
@ -599,6 +566,7 @@ void kpowersave::do_setIconBG(){
kdDebugFuncOut(trace); kdDebugFuncOut(trace);
} }
/*! /*!
* \b TQT_SLOT to enable/disable the autosuspend. * \b TQT_SLOT to enable/disable the autosuspend.
*/ */

@ -214,9 +214,6 @@ private:
//! a menu seperator ID //! a menu seperator ID
/*! contains the ID of the separator between autosuspend and Help*/ /*! contains the ID of the separator between autosuspend and Help*/
int HELP_SEPARATOR_MENU_ID; 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 //! number of white pixel in the kickerapplet icon
/*! /*!
@ -264,9 +261,6 @@ private:
//! a sub-menu of the kickerapplet //! a sub-menu of the kickerapplet
/*! TQPopupMenu for the scheme-entries. */ /*! TQPopupMenu for the scheme-entries. */
TQPopupMenu *scheme_menu; TQPopupMenu *scheme_menu;
//! a sub-menu of the kickerapplet
/*! TQPopupMenu for the help-entries. */
TQPopupMenu *help_menu;
//! icon-pixmap //! icon-pixmap
@ -351,8 +345,6 @@ private slots:
void slotHelp(); void slotHelp();
//! called to open the kpowersave About dialog //! called to open the kpowersave About dialog
void slotAbout(); void slotAbout();
//! called to open website to report bugs
void slotReportBug();
//! called if the configure dialog is destroyed //! called if the configure dialog is destroyed
void observeConfigDlg(); void observeConfigDlg();
//! called if user exit from kpowersave //! called if user exit from kpowersave

Loading…
Cancel
Save