summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-05-23 18:20:09 -0500
committerTimothy Pearson <[email protected]>2012-05-23 18:20:09 -0500
commitde4e7b41598b4c8db0948e4c2c216d73e952f7bb (patch)
treeb8772c60b0b57c16d2e0055697ca95bff623d2eb /kdesktop/lock
parentc281f8a59d6d1cc7d72d6fed23a11ee785988e1c (diff)
downloadtdebase-de4e7b41598b4c8db0948e4c2c216d73e952f7bb.tar.gz
tdebase-de4e7b41598b4c8db0948e4c2c216d73e952f7bb.zip
Add support to Kate for saving/restoring manual document placement
Make absolutely sure that kdesktop_lock reads recently changed configuration files when starting up
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/main.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index 7adbd5745..8bc7808ea 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -38,6 +38,15 @@
#include <X11/Xlib.h>
#include <fixx11h.h>
+#define OPEN_TDMCONFIG_AND_SET_GROUP \
+if( stat( KDE_CONFDIR "/tdm/tdmdistrc" , &st ) == 0) { \
+ tdmconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmdistrc" )); \
+} \
+else { \
+ tdmconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmrc" )); \
+} \
+tdmconfig->setGroup("X-*-Greeter");
+
// [FIXME] Add GUI configuration checkboxes for these three settings (see kdesktoprc [ScreenSaver] UseUnmanagedLockWindows, DelaySaverStart, and UseTDESAK)
bool trinity_desktop_lock_use_system_modal_dialogs = FALSE;
bool trinity_desktop_lock_delay_screensaver_start = FALSE;
@@ -203,13 +212,7 @@ int main( int argc, char **argv )
struct stat st;
KSimpleConfig* tdmconfig;
- if( stat( KDE_CONFDIR "/tdm/tdmdistrc" , &st ) == 0) {
- tdmconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmdistrc" ));
- }
- else {
- tdmconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/tdm/tdmrc" ));
- }
- tdmconfig->setGroup("X-*-Greeter");
+ OPEN_TDMCONFIG_AND_SET_GROUP
trinity_desktop_lock_use_sak = tdmconfig->readBoolEntry("UseSAK", true);
LockProcess process;
@@ -270,7 +273,8 @@ int main( int argc, char **argv )
// Reload settings to make sure they reflect reality
KDesktopSettings::self()->config()->reparseConfiguration();
- tdmconfig->reparseConfiguration();
+ delete tdmconfig;
+ OPEN_TDMCONFIG_AND_SET_GROUP
trinity_desktop_lock_use_system_modal_dialogs = !KDesktopSettings::useUnmanagedLockWindows();
trinity_desktop_lock_delay_screensaver_start = KDesktopSettings::delaySaverStart();
if (trinity_desktop_lock_use_system_modal_dialogs) {