author | sandman <sandman> | 2002-10-17 00:39:31 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-17 00:39:31 (UTC) |
commit | 259d10f40405fd77ba0a8947782f716be94da3a5 (patch) (side-by-side diff) | |
tree | 636cb3a899d27a8fe41f377fabc5bd170a74c6dc /library | |
parent | 5d28c61d84da1814d356540b557bbfe026da98aa (diff) | |
download | opie-259d10f40405fd77ba0a8947782f716be94da3a5.zip opie-259d10f40405fd77ba0a8947782f716be94da3a5.tar.gz opie-259d10f40405fd77ba0a8947782f716be94da3a5.tar.bz2 |
- fix for bug #292 (Improper behaviour of frontlight disabling)
- fix for bug #199 (Desktop visible on resume before password dialog
appears)
-rw-r--r-- | library/password.cpp | 24 | ||||
-rw-r--r-- | library/password.h | 1 |
2 files changed, 23 insertions, 2 deletions
diff --git a/library/password.cpp b/library/password.cpp index 4b22b65..6d126c4 100644 --- a/library/password.cpp +++ b/library/password.cpp @@ -29,3 +29,3 @@ #include <qfile.h> -#include <qwindowsystem_qws.h> +//#include <qwindowsystem_qws.h> @@ -287,2 +287,21 @@ QString Password::getPassword( const QString& prompt ) /*! + Return if a prompt for the user's passcode is needed. + + If \a at_poweron is TRUE, the dialog is only used if the user's + preference request it at poweron + + Opie extension to speed up suspend/resume. +*/ + +bool Password::needToAuthenticate(bool at_poweron) +{ + Config cfg("Security"); + cfg.setGroup("Passcode"); + QString passcode = cfg.readEntry("passcode"); + + return ( !passcode.isEmpty() + && (!at_poweron || cfg.readNumEntry("passcode_poweron",0)) ); +} + +/*! Prompt, fullscreen, for the user's passcode until they get it right. @@ -326,3 +345,4 @@ void Password::authenticate(bool at_poweron) // refresh screen #### should probably be in caller - // Not needed (we took away the screen blacking) + // Not needed (we took away the screen blacking) TT + // Not needed (we have intelligent screen blacking) sandman //if ( qwsServer ) diff --git a/library/password.h b/library/password.h index a3a3e45..a2f2c3c 100644 --- a/library/password.h +++ b/library/password.h @@ -27,2 +27,3 @@ class Password public: + static bool needToAuthenticate(bool atpoweron=FALSE); // Opie extension to speed up suspend/resume (sandman) static void authenticate(bool atpoweron=FALSE); |