author | sandman <sandman> | 2002-10-14 23:33:00 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-14 23:33:00 (UTC) |
commit | b3ad9188f40cf6e3c170cc48be3ed180d509036f (patch) (unidiff) | |
tree | 04978e0fb1bd258244a6578a27ab09e3c6843d75 | |
parent | c7aed90e02d06502dff04043103c5db0883cc011 (diff) | |
download | opie-b3ad9188f40cf6e3c170cc48be3ed180d509036f.zip opie-b3ad9188f40cf6e3c170cc48be3ed180d509036f.tar.gz opie-b3ad9188f40cf6e3c170cc48be3ed180d509036f.tar.bz2 |
autologin feature can now (also) be configured by:
~/Settings/opie-login.conf:
[General]
AutoLogin=<user>
command line options override config file settings !
-rw-r--r-- | core/opie-login/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 8f795e3..579a93a 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <qpe/qcopenvelope_qws.h> | 44 | #include <qpe/qcopenvelope_qws.h> |
45 | #include <qpe/qpestyle.h> | 45 | #include <qpe/qpestyle.h> |
46 | #include <qpe/power.h> | 46 | #include <qpe/power.h> |
47 | #include <qpe/config.h> | ||
47 | 48 | ||
48 | #include <opie/odevice.h> | 49 | #include <opie/odevice.h> |
49 | 50 | ||
@@ -164,6 +165,15 @@ int main ( int argc, char **argv ) | |||
164 | } | 165 | } |
165 | } | 166 | } |
166 | else { | 167 | else { |
168 | if ( !autolog ) { | ||
169 | Config cfg ( "opie-login" ); | ||
170 | cfg. setGroup ( "General" ); | ||
171 | QString user = cfg. readEntry ( "AutoLogin" ); | ||
172 | |||
173 | if ( !user. isEmpty ( )) | ||
174 | autolog = ::strdup ( user. latin1 ( )); | ||
175 | } | ||
176 | |||
167 | if ( autolog ) { | 177 | if ( autolog ) { |
168 | LoginApplication::setLoginAs ( autolog ); | 178 | LoginApplication::setLoginAs ( autolog ); |
169 | 179 | ||