diff options
author | Michele Calgaro <[email protected]> | 2024-03-21 18:33:33 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-03-21 18:34:47 +0900 |
commit | a7dc4c51d5edb098aab42d57d177f9968545926e (patch) | |
tree | 68d332296118e477d84bfecc068aface772ddf45 | |
parent | f548d391bb5b60cc3edf9248b9f793401d771196 (diff) | |
download | tdebase-a7dc4c51d5edb098aab42d57d177f9968545926e.tar.gz tdebase-a7dc4c51d5edb098aab42d57d177f9968545926e.zip |
Fix update of fade away checkboxes in TCC session manager module
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r-- | kcontrol/smserver/smserverconfigdlg.ui | 28 | ||||
-rw-r--r-- | kcontrol/smserver/smserverconfigimpl.cpp | 18 | ||||
-rw-r--r-- | kcontrol/smserver/smserverconfigimpl.h | 1 |
3 files changed, 19 insertions, 28 deletions
diff --git a/kcontrol/smserver/smserverconfigdlg.ui b/kcontrol/smserver/smserverconfigdlg.ui index 7d68e3ddf..574422bc3 100644 --- a/kcontrol/smserver/smserverconfigdlg.ui +++ b/kcontrol/smserver/smserverconfigdlg.ui @@ -243,40 +243,22 @@ </widget> <connections> <connection> - <sender>confirmLogoutCheck</sender> - <signal>toggled(bool)</signal> - <receiver>SMServerConfigDlg</receiver> - <slot>configChanged()</slot> - </connection> - <connection> - <sender>confirmLogoutCheck</sender> - <signal>toggled(bool)</signal> - <receiver>showFadeAway</receiver> - <slot>setEnabled(bool)</slot> - </connection> - <connection> <sender>confirmLogoutCheck</sender> <signal>toggled(bool)</signal> - <receiver>showFancyFadeAway</receiver> - <slot>setEnabled(bool)</slot> - </connection> - <connection> - <sender>showFadeAway</sender> - <signal>toggled(bool)</signal> - <receiver>showFancyFadeAway</receiver> - <slot>setEnabled(bool)</slot> + <receiver>SMServerConfigDlg</receiver> + <slot>fadeAwayConfigChanged()</slot> </connection> <connection> <sender>showFadeAway</sender> <signal>toggled(bool)</signal> <receiver>SMServerConfigDlg</receiver> - <slot>configChanged()</slot> + <slot>fadeAwayConfigChanged()</slot> </connection> <connection> <sender>showFancyFadeAway</sender> <signal>toggled(bool)</signal> <receiver>SMServerConfigDlg</receiver> - <slot>configChanged()</slot> + <slot>fadeAwayConfigChanged()</slot> </connection> <connection> <sender>showLogoutStatusDialog</sender> @@ -316,11 +298,13 @@ </connection> </connections> <includes> + <include location="global" impldecl="in declaration">tqcheckbox.h</include> <include location="global" impldecl="in implementation">kdialog.h</include> <include location="global" impldecl="in implementation">klineedit.h</include> </includes> <slots> <slot>configChanged()</slot> + <slot>fadeAwayConfigChanged()</slot> </slots> <layoutdefaults spacing="3" margin="6"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> diff --git a/kcontrol/smserver/smserverconfigimpl.cpp b/kcontrol/smserver/smserverconfigimpl.cpp index d9507a9d8..af04d774a 100644 --- a/kcontrol/smserver/smserverconfigimpl.cpp +++ b/kcontrol/smserver/smserverconfigimpl.cpp @@ -18,14 +18,20 @@ #include "smserverconfigimpl.h" #include "smserverconfigimpl.moc" -SMServerConfigImpl::SMServerConfigImpl(TQWidget *parent, const char *name ) : SMServerConfigDlg(parent,name) { +SMServerConfigImpl::SMServerConfigImpl(TQWidget *parent, const char *name ) : SMServerConfigDlg(parent,name) {} +SMServerConfigImpl::~SMServerConfigImpl() {} + +void SMServerConfigImpl::configChanged() +{ + emit changed(); } -SMServerConfigImpl::~SMServerConfigImpl(){ -} -/** No descriptions */ -void SMServerConfigImpl::configChanged(){ - emit changed(); +void SMServerConfigImpl::fadeAwayConfigChanged() +{ + // Update showFadeAway and showFancyFadeAway status correctly + showFadeAway->setEnabled(confirmLogoutCheck->isChecked()); + showFancyFadeAway->setEnabled(confirmLogoutCheck->isChecked() && showFadeAway->isChecked()); + configChanged(); } diff --git a/kcontrol/smserver/smserverconfigimpl.h b/kcontrol/smserver/smserverconfigimpl.h index 592609e9e..2e1186936 100644 --- a/kcontrol/smserver/smserverconfigimpl.h +++ b/kcontrol/smserver/smserverconfigimpl.h @@ -33,6 +33,7 @@ public: public slots: // Public slots /** No descriptions */ void configChanged(); + void fadeAwayConfigChanged(); signals: // Signals /** No descriptions */ void changed(); |