diff options
-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(); |