From b3ad9188f40cf6e3c170cc48be3ed180d509036f Mon Sep 17 00:00:00 2001 From: sandman Date: Mon, 14 Oct 2002 23:33:00 +0000 Subject: autologin feature can now (also) be configured by: ~/Settings/opie-login.conf: [General] AutoLogin= command line options override config file settings ! --- (limited to 'core') 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 @@ #include #include #include +#include #include @@ -164,6 +165,15 @@ int main ( int argc, char **argv ) } } else { + if ( !autolog ) { + Config cfg ( "opie-login" ); + cfg. setGroup ( "General" ); + QString user = cfg. readEntry ( "AutoLogin" ); + + if ( !user. isEmpty ( )) + autolog = ::strdup ( user. latin1 ( )); + } + if ( autolog ) { LoginApplication::setLoginAs ( autolog ); @@ -172,7 +182,7 @@ int main ( int argc, char **argv ) else ::exit ( 0 ); } - else + else ::exit ( login_main ( argc, argv )); } } -- cgit v0.9.0.2