summaryrefslogtreecommitdiffstats
path: root/kcontrol/kicker/menutab_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/kicker/menutab_impl.cpp')
-rw-r--r--kcontrol/kicker/menutab_impl.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/kcontrol/kicker/menutab_impl.cpp b/kcontrol/kicker/menutab_impl.cpp
index 35ebdd6af..63adf48d5 100644
--- a/kcontrol/kicker/menutab_impl.cpp
+++ b/kcontrol/kicker/menutab_impl.cpp
@@ -36,6 +36,7 @@
#include <kmessagebox.h>
#include <knuminput.h>
#include <kstandarddirs.h>
+#include <kfontrequester.h>
#include <kicondialog.h>
#include <kiconloader.h>
@@ -198,6 +199,8 @@ void MenuTab::menuStyleChanged()
void MenuTab::save()
{
+ bool forceRestart = false;
+
KSharedConfig::Ptr c = KSharedConfig::openConfig(KickerConfig::the()->configName());
c->setGroup("menus");
@@ -226,19 +229,37 @@ void MenuTab::save()
bool kmenusetting = m_comboMenuStyle->currentItem()==1;
bool oldkmenusetting = c->readBoolEntry("LegacyKMenu", true);
+ c->setGroup("KMenu");
+ bool oldmenutextenabledsetting = c->readBoolEntry("ShowText", true);
+ TQString oldmenutextsetting = c->readEntry("Text", "");
+
+ c->setGroup("buttons");
+ TQFont oldmenufontsetting = c->readFontEntry("Font");
+
c->writeEntry("LegacyKMenu", kmenusetting);
c->writeEntry("OpenOnHover", m_openOnHover->isChecked());
c->sync();
- if (kmenusetting != oldkmenusetting)
- DCOPRef ("kicker", "default").call("restart()");
+ if (kmenusetting != oldkmenusetting) {
+ forceRestart = true;
+ }
+ if (kcfg_ShowKMenuText->isChecked() != oldmenutextenabledsetting) {
+ forceRestart = true;
+ }
+ if (kcfg_KMenuText->text() != oldmenutextsetting) {
+ forceRestart = true;
+ }
+ if (kcfg_ButtonFont->font() != oldmenufontsetting) {
+ forceRestart = true;
+ }
c->setGroup("KMenu");
bool sidepixmapsetting = kcfg_UseSidePixmap->isChecked();
bool oldsidepixmapsetting = c->readBoolEntry("UseSidePixmap", true);
- if (sidepixmapsetting != oldsidepixmapsetting)
- DCOPRef ("kicker", "default").call("restart()");
+ if (sidepixmapsetting != oldsidepixmapsetting) {
+ forceRestart = true;
+ }
// Save KMenu settings
c->setGroup("KMenu");
@@ -253,6 +274,10 @@ void MenuTab::save()
config->sync();
if (m_kmenu_button_changed == true) {
+ forceRestart = true;
+ }
+
+ if (forceRestart) {
DCOPRef ("kicker", "default").call("restart()");
}
}