diff options
author | Francois Andriot <francois.andriot@free.fr> | 2013-05-19 16:09:35 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-19 16:58:18 +0200 |
commit | 4844466a7d3358a673a6a5afaf0a087342cc4ae6 (patch) | |
tree | 57073d51ecac7144a76154b5dd1580ed9f72313f /kcontrol | |
parent | d531f6f8413e13d29991463f853b3615ac3bcea9 (diff) | |
download | tdebase-4844466a7d3358a673a6a5afaf0a087342cc4ae6.tar.gz tdebase-4844466a7d3358a673a6a5afaf0a087342cc4ae6.zip |
Add tooltip support in KMenu
(cherry picked from commit 718f6ae321b507dbb5bca737a1d1d486b2b41dc5)
Diffstat (limited to 'kcontrol')
-rw-r--r-- | kcontrol/kicker/menutab.ui | 14 | ||||
-rw-r--r-- | kcontrol/kicker/menutab_impl.cpp | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/kcontrol/kicker/menutab.ui b/kcontrol/kicker/menutab.ui index 2dcb62818..6b7af897b 100644 --- a/kcontrol/kicker/menutab.ui +++ b/kcontrol/kicker/menutab.ui @@ -173,6 +173,20 @@ </widget> <widget class="TQCheckBox"> <property name="name"> + <cstring>kcfg_UseTooltip</cstring> + </property> + <property name="text"> + <string>Show T&ooltip</string> + </property> + <property name="checked"> + <bool>false</bool> + </property> + <property name="whatsThis" stdset="0"> + <string><qt>When this option is selected a tooltip will appear on the KMenu items.</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> <cstring>kcfg_UseSidePixmap</cstring> </property> <property name="text"> diff --git a/kcontrol/kicker/menutab_impl.cpp b/kcontrol/kicker/menutab_impl.cpp index 3b5edc11f..b7356ea13 100644 --- a/kcontrol/kicker/menutab_impl.cpp +++ b/kcontrol/kicker/menutab_impl.cpp @@ -170,10 +170,12 @@ void MenuTab::load( bool useDefaults ) void MenuTab::menuStyleChanged() { + // Classic K Menu if (m_comboMenuStyle->currentItem()==1) { m_openOnHover->setEnabled(false); m_subMenus->setEnabled(true); kcfg_UseSidePixmap->setEnabled(true); + kcfg_UseTooltip->setEnabled(true); kcfg_MenuEntryFormat->setEnabled(true); kcfg_RecentVsOften->setEnabled(true); m_showFrequent->setEnabled(true); @@ -182,10 +184,13 @@ void MenuTab::menuStyleChanged() maxrecentdocs->setEnabled(true); kcfg_NumVisibleEntries->setEnabled(true); } + + // Kickoff Menu else { m_openOnHover->setEnabled(true); m_subMenus->setEnabled(false); kcfg_UseSidePixmap->setEnabled(false); + kcfg_UseTooltip->setEnabled(false); kcfg_MenuEntryFormat->setEnabled(false); kcfg_RecentVsOften->setEnabled(false); m_showFrequent->setEnabled(false); @@ -244,6 +249,13 @@ void MenuTab::save() forceRestart = true; } + bool tooltipsetting = kcfg_UseTooltip->isChecked(); + bool oldtooltipsetting = c->readBoolEntry("UseTooltip", false); + + if (tooltipsetting != oldtooltipsetting) { + forceRestart = true; + } + // Save KMenu settings c->setGroup("KMenu"); c->writeEntry("CustomIcon", m_kmenu_icon); |