From a0d0b876b6447c5be26a50a0b295e91cd95a8ceb Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 17 Jan 2013 14:34:51 -0600 Subject: Fix taskbar configuration issues Fix Kicker menu button layout in Deep Buttons mode --- kcontrol/taskbar/kcmtaskbar.cpp | 29 ++++++++++++++++++++++++++++- kcontrol/taskbar/kcmtaskbar.h | 3 +++ kcontrol/taskbar/kcmtaskbarui.ui | 32 +++++++++++++++++++++++++------- 3 files changed, 56 insertions(+), 8 deletions(-) (limited to 'kcontrol/taskbar') diff --git a/kcontrol/taskbar/kcmtaskbar.cpp b/kcontrol/taskbar/kcmtaskbar.cpp index 3a2436b24..00e0cd1f3 100644 --- a/kcontrol/taskbar/kcmtaskbar.cpp +++ b/kcontrol/taskbar/kcmtaskbar.cpp @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include @@ -31,7 +33,7 @@ #include #include #include -#include +#include #define protected public #include "kcmtaskbarui.h" @@ -161,7 +163,24 @@ TaskbarConfig::TaskbarConfig(TQWidget *parent, const char* name, const TQStringL { m_configFileName = args[0]; m_widget->globalConfigWarning->hide(); + m_widget->globalConfigReload->show(); + } + else + { + m_widget->globalConfigReload->hide(); + m_widget->globalConfigWarning->show(); + } + connect(m_widget->globalConfigReload, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReloadConfigurationFromGlobals())); + + TQFile configFile(locateLocal("config", m_configFileName)); + if (!configFile.exists()) + { + KConfig globalConfig(GLOBAL_TASKBAR_CONFIG_FILE_NAME, TRUE, TRUE); + KConfig localConfig(m_configFileName); + globalConfig.copyTo(m_configFileName, &localConfig); + localConfig.sync(); } + m_settingsObject = new TaskBarSettings(KSharedConfig::openConfig(m_configFileName)); m_settingsObject->readConfig(); @@ -240,6 +259,14 @@ TaskbarConfig::~TaskbarConfig() } } +void TaskbarConfig::slotReloadConfigurationFromGlobals() +{ + KConfig globalConfig(GLOBAL_TASKBAR_CONFIG_FILE_NAME, TRUE, TRUE); + globalConfig.copyTo(m_configFileName); + m_settingsObject->readConfig(); + load(); +} + void TaskbarConfig::slotUpdateCustomColors() { m_widget->kcfg_ActiveTaskTextColor->setEnabled(m_widget->kcfg_UseCustomColors->isChecked()); diff --git a/kcontrol/taskbar/kcmtaskbar.h b/kcontrol/taskbar/kcmtaskbar.h index 5e7d9d905..9aaec9664 100644 --- a/kcontrol/taskbar/kcmtaskbar.h +++ b/kcontrol/taskbar/kcmtaskbar.h @@ -70,6 +70,9 @@ protected slots: void notChanged(); void slotUpdateCustomColors(); +private slots: + void slotReloadConfigurationFromGlobals(); + private: TaskbarAppearance::List m_appearances; void updateAppearanceCombo(); diff --git a/kcontrol/taskbar/kcmtaskbarui.ui b/kcontrol/taskbar/kcmtaskbarui.ui index ce0ddb6fe..a522ef683 100644 --- a/kcontrol/taskbar/kcmtaskbarui.ui +++ b/kcontrol/taskbar/kcmtaskbarui.ui @@ -462,16 +462,34 @@ By default, this option is selected and all windows are shown. - + - globalConfigWarning + GroupBox2 - - NOTE: This module is currently editing the global floating taskbar configuration.<br>To change the configuration of a specific Kicker taskbar applet, please use the Configure Taskbar menu option. - - - kcfg_ShowTaskStates + + Settings + + + unnamed + + + + globalConfigWarning + + + NOTE: This module is currently editing the global floating taskbar configuration.<br>To change the configuration of a specific Kicker taskbar applet, please use the Configure Taskbar menu option. + + + + + globalConfigReload + + + Use current global floating taskbar configuration + + + -- cgit v1.2.1