diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-15 19:17:28 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-15 19:17:28 +0000 |
commit | ff7322912780843dfb3bce1d720452aeed89592e (patch) | |
tree | 2b72956a83fb45a46c7d5cb985a758b3724ac35e /kdesktop/lock/main.cc | |
parent | b82e4034156bf3c1d268aecc65a50e6569ecf2ee (diff) | |
download | tdebase-ff7322912780843dfb3bce1d720452aeed89592e.tar.gz tdebase-ff7322912780843dfb3bce1d720452aeed89592e.zip |
Add secure desktop area dialog to kdebase
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253853 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/lock/main.cc')
-rw-r--r-- | kdesktop/lock/main.cc | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc index 587ad49db..1d459a0d3 100644 --- a/kdesktop/lock/main.cc +++ b/kdesktop/lock/main.cc @@ -29,6 +29,8 @@ #include <kglobalsettings.h> #include <dcopref.h> +#include <kdmtsak.h> + #include <stdlib.h> #include <X11/Xlib.h> @@ -60,6 +62,7 @@ static KCmdLineOptions options[] = { { "forcelock", I18N_NOOP("Force session locking"), 0 }, { "dontlock", I18N_NOOP("Only start screensaver"), 0 }, + { "securedialog", I18N_NOOP("Launch the secure dialog"), 0 }, { "blank", I18N_NOOP("Only use the blank screensaver"), 0 }, KCmdLineLastOption }; @@ -169,12 +172,24 @@ int main( int argc, char **argv ) rt = process.lock(); sig = true; } - else if( child || args->isSet( "dontlock" )) + else if( child || args->isSet( "dontlock" )) { rt = process.dontLock(); - else + } + else if( child || args->isSet( "securedialog" )) { + int retcode = tde_sak_verify_calling_process(); + if (retcode == 0) { + rt = process.runSecureDialog(); + } + else { + return 1; + } + } + else { rt = process.defaultSave(); - if (!rt) + } + if (!rt) { return 1; + } if( sig ) { |