summaryrefslogtreecommitdiff
path: root/core/opie-login
authorkergoth <kergoth>2003-08-09 17:42:14 (UTC)
committer kergoth <kergoth>2003-08-09 17:42:14 (UTC)
commit1ab4ca95e4d2cf24d32b38c9031cb6076351e730 (patch) (side-by-side diff)
tree644d196b01c7f280981bd17da23c7592a18e5643 /core/opie-login
parentec14206f63dd93e9fb84c76cbc76fc1968637590 (diff)
downloadopie-1ab4ca95e4d2cf24d32b38c9031cb6076351e730.zip
opie-1ab4ca95e4d2cf24d32b38c9031cb6076351e730.tar.gz
opie-1ab4ca95e4d2cf24d32b38c9031cb6076351e730.tar.bz2
Merge from BRANCH_1_0
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
@@ -56,2 +56,3 @@
#include <qfile.h>
+#include <qtextstream.h>
@@ -76,2 +77,3 @@ int main ( int argc, char **argv )
{
+ int userExited = 0;
pid_t ppid = ::getpid ( );
@@ -139,2 +141,8 @@ int main ( int argc, char **argv )
int killedbysig = 0;
+ userExited=0;
+ if (WIFEXITED(status)!=0 ) {
+ if (WEXITSTATUS(status)==137) {
+ userExited=1;
+ }
+ }
@@ -142,4 +150,4 @@ int main ( int argc, char **argv )
switch ( WTERMSIG( status )) {
- case SIGINT :
case SIGTERM:
+ case SIGINT :
case SIGKILL:
@@ -164,3 +172,3 @@ int main ( int argc, char **argv )
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 );
@@ -177,3 +185,4 @@ int main ( int argc, char **argv )
if ( !autolog ) {
- Config cfg ( "opie-login" );
+ QString confFile=QPEApplication::qpeDir() + "/etc/opie-login.conf";
+ Config cfg ( confFile, Config::File );
cfg. setGroup ( "General" );
@@ -185,4 +194,10 @@ 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 );
+
@@ -193,4 +208,5 @@ int main ( int argc, char **argv )
}
- else
+ else {
::exit ( login_main ( argc, argv, ppid ));
+ }
}
@@ -357,3 +373,3 @@ int login_main ( int argc, char **argv, pid_t ppid )
- 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