summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-11-06 10:28:39 (UTC)
committer mickeyl <mickeyl>2003-11-06 10:28:39 (UTC)
commit0b55f9efe488141e13bcaf84f5a05dfc69b550ba (patch) (side-by-side diff)
treeaf5a146f922e2e075d7a57ab32c1e22018f338a7
parent8c283be8e455571a03f11035b23f649e49de726c (diff)
downloadopie-0b55f9efe488141e13bcaf84f5a05dfc69b550ba.zip
opie-0b55f9efe488141e13bcaf84f5a05dfc69b550ba.tar.gz
opie-0b55f9efe488141e13bcaf84f5a05dfc69b550ba.tar.bz2
merge core/opie-login
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 5ecde1e..7d2ed63 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -146,104 +146,105 @@ int main ( int argc, char **argv )
}
}
if ( WIFSIGNALED( status )) {
switch ( WTERMSIG( status )) {
case SIGTERM:
case SIGINT :
case SIGKILL:
break;
default :
killedbysig = WTERMSIG( status );
break;
}
}
if ( killedbysig ) { // qpe was killed by an uncaught signal
qApp = 0;
::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig );
QWSServer::setDesktopBackground ( QImage ( ));
QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer );
app-> setFont ( QFont ( "Helvetica", 10 ));
app-> setStyle ( new QPEStyle ( ));
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-> setAlignment ( Qt::AlignCenter );
l-> move ( 0, 0 );
l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( ));
l-> show ( );
QTimer::singleShot ( 3000, app, SLOT( quit ( )));
app-> exec ( );
delete app;
qApp = 0;
}
}
else {
if ( !autolog ) {
QString confFile=QPEApplication::qpeDir() + "/etc/opie-login.conf";
Config cfg ( confFile, Config::File );
cfg. setGroup ( "General" );
QString user = cfg. readEntry ( "AutoLogin" );
if ( !user. isEmpty ( ))
autolog = ::strdup ( user. latin1 ( ));
}
-
+
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 ( ))
::exit ( LoginApplication::login ( ));
else
::exit ( 0 );
}
else {
::exit ( login_main ( argc, argv, ppid ));
}
}
}
return 0;
}
void sigterm ( int /*sig*/ )
{
::exit ( 0 );
}
void exit_closelog ( )
{
::closelog ( );
}
class LoginScreenSaver : public QWSScreenSaver
{
public:
LoginScreenSaver ( )
{
m_lcd_status = true;
m_backlight_bright = -1;
m_backlight_forcedoff = false;
// Make sure the LCD is in fact on, (if opie was killed while the LCD is off it would still be off)
ODevice::inst ( )-> setDisplayStatus ( true );
}
void restore()
{
if ( !m_lcd_status ) // We must have turned it off
ODevice::inst ( ) -> setDisplayStatus ( true );
setBacklight ( -3 );
}
bool save( int level )
{