summaryrefslogtreecommitdiff
path: root/core/opie-login/main.cpp
Side-by-side diff
Diffstat (limited to 'core/opie-login/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 81f4d1e..1800be0 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -278,91 +278,91 @@ public:
}
void setBacklight ( int bright )
{
if ( bright == -3 ) {
// Forced on
m_backlight_forcedoff = false;
bright = -1;
}
if ( m_backlight_forcedoff && bright != -2 )
return ;
if ( bright == -2 ) {
// Toggle between off and on
bright = m_backlight_bright ? 0 : -1;
m_backlight_forcedoff = !bright;
}
m_backlight_bright = bright;
bright = backlight ( );
ODevice::inst ( ) -> setDisplayBrightness ( bright );
m_backlight_bright = bright;
}
private:
bool m_lcd_status;
int m_backlight_bright;
bool m_backlight_forcedoff;
};
namespace Opie { extern int force_appearance; } // HACK to get around the force-style setting
int login_main ( int argc, char **argv, pid_t ppid )
{
QWSServer::setDesktopBackground( QImage() );
LoginApplication *app = new LoginApplication ( argc, argv, ppid );
Opie::force_appearance = 0;
app-> setFont ( QFont ( "Helvetica", 10 ));
app-> setStyle ( new QPEStyle ( ));
ODevice::inst ( )-> setSoftSuspend ( true );
-#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
+#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
if ( !QFile::exists ( "/etc/pointercal" )) {
// Make sure calibration widget starts on top.
Calibrate *cal = new Calibrate;
cal-> exec ( );
delete cal;
}
#endif
LoginScreenSaver *saver = new LoginScreenSaver;
saver-> setIntervals ( );
QWSServer::setScreenSaver ( saver );
saver-> restore ( );
LoginWindowImpl *lw = new LoginWindowImpl ( );
app-> setMainWidget ( lw );
lw-> setGeometry ( 0, 0, app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( ));
lw-> show ( );
int rc = app-> exec ( );
ODevice::inst ( )-> setSoftSuspend ( false );
if ( app-> loginAs ( )) {
if ( app-> changeIdentity ( )) {
app-> login ( );
// if login succeeds, it never comes back
QMessageBox::critical ( 0, LoginWindowImpl::tr( "Failure" ), LoginWindowImpl::tr( "Could not start OPIE." ));
rc = 1;
}
else {
QMessageBox::critical ( 0, LoginWindowImpl::tr( "Failure" ), LoginWindowImpl::tr( "Could not switch to new user identity" ));
rc = 2;
}
}
return rc;
}