summaryrefslogtreecommitdiff
path: root/core/opie-login
Side-by-side diff
Diffstat (limited to 'core/opie-login') (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/main.cpp30
-rw-r--r--core/opie-login/opie-login.conffiles1
2 files changed, 24 insertions, 7 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index d95a59b..7dcb5f6 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -55,4 +55,5 @@
#include <qtimer.h>
#include <qfile.h>
+#include <qtextstream.h>
#include "loginapplication.h"
@@ -75,4 +76,5 @@ static struct option long_options [] = {
int main ( int argc, char **argv )
{
+ int userExited = 0;
pid_t ppid = ::getpid ( );
@@ -138,9 +140,15 @@ int main ( int argc, char **argv )
}
int killedbysig = 0;
+ userExited=0;
+ if (WIFEXITED(status)!=0 ) {
+ if (WEXITSTATUS(status)==137) {
+ userExited=1;
+ }
+ }
if ( WIFSIGNALED( status )) {
switch ( WTERMSIG( status )) {
- case SIGINT :
case SIGTERM:
+ case SIGINT :
case SIGKILL:
break;
@@ -163,5 +171,5 @@ int main ( int argc, char **argv )
const char *sig = ::strsignal ( killedbysig );
QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool );
- l-> setText ( LoginWindowImpl::tr( "OPIE was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig ));
+ l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig ));
l-> setAlignment ( Qt::AlignCenter );
l-> move ( 0, 0 );
@@ -176,5 +184,6 @@ int main ( int argc, char **argv )
else {
if ( !autolog ) {
- Config cfg ( "opie-login" );
+ QString confFile=QPEApplication::qpeDir() + "/etc/opie-login.conf";
+ Config cfg ( confFile, Config::File );
cfg. setGroup ( "General" );
QString user = cfg. readEntry ( "AutoLogin" );
@@ -184,6 +193,12 @@ int main ( int argc, char **argv )
}
- if ( autolog ) {
- LoginApplication::setLoginAs ( autolog );
+ if ( autolog && !userExited ) {
+
+ QWSServer::setDesktopBackground( QImage() );
+ ODevice::inst ( )-> setDisplayStatus ( true );
+ ODevice::inst ( )-> setSoftSuspend ( false );
+ LoginApplication *app = new LoginApplication ( argc, argv, ppid );
+ LoginApplication::setLoginAs ( autolog );
+
if ( LoginApplication::changeIdentity ( ))
@@ -192,6 +207,7 @@ int main ( int argc, char **argv )
::exit ( 0 );
}
- else
+ else {
::exit ( login_main ( argc, argv, ppid ));
+ }
}
}
@@ -356,5 +372,5 @@ int login_main ( int argc, char **argv, pid_t ppid )
// if login succeeds, it never comes back
- QMessageBox::critical ( 0, LoginWindowImpl::tr( "Failure" ), LoginWindowImpl::tr( "Could not start OPIE." ));
+ QMessageBox::critical ( 0, LoginWindowImpl::tr( "Failure" ), LoginWindowImpl::tr( "Could not start Opie." ));
rc = 1;
}
diff --git a/core/opie-login/opie-login.conffiles b/core/opie-login/opie-login.conffiles
new file mode 100644
index 0000000..90645ee
--- a/dev/null
+++ b/core/opie-login/opie-login.conffiles
@@ -0,0 +1 @@
+/opt/QtPalmtop/etc/opie-login.conf