summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-03-24 01:24:56 (UTC)
committer kergoth <kergoth>2003-03-24 01:24:56 (UTC)
commit1b4836ba28ca57947d37699fc67cddd74fb29fbe (patch) (side-by-side diff)
treece940472f7ca14c5c7f0c88eebcf95ca953cfef9
parentc8205a610f350b8bde7c5aa0522944f0418f1fc9 (diff)
downloadopie-1b4836ba28ca57947d37699fc67cddd74fb29fbe.zip
opie-1b4836ba28ca57947d37699fc67cddd74fb29fbe.tar.gz
opie-1b4836ba28ca57947d37699fc67cddd74fb29fbe.tar.bz2
Remove ifdefs based on device as the means by which we decide to run calibrate, and instead check if the mouse handler inherits from QCalibratedMouseHandler.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/main.cpp14
-rw-r--r--core/opie-login/main.cpp14
2 files changed, 14 insertions, 14 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 8eaea17..64fb968 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -81,56 +81,56 @@ int initApplication( int argc, char ** argv )
QWSServer::setDesktopBackground( QImage() );
DesktopApplication a( argc, argv, QApplication::GuiServer );
ODevice::inst ( )-> setSoftSuspend ( true );
{ // init backlight
QCopEnvelope e("QPE/System", "setBacklight(int)" );
e << -3; // Forced on
}
AlarmServer::initialize();
Desktop *d = new Desktop();
QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) );
QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) );
QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) );
QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) );
QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) );
QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) );
(void)new SysFileMonitor(d);
Network::createServer(d);
-#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;
+ if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
+ if ( !QFile::exists( "/etc/pointercal" ) ) {
+ // Make sure calibration widget starts on top.
+ Calibrate *cal = new Calibrate;
+ cal->exec();
+ delete cal;
+ }
}
-#endif
d->show();
if ( QDate::currentDate ( ). year ( ) < 2000 ) {
if ( QMessageBox::information ( 0, DesktopApplication::tr( "Information" ), DesktopApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" );
e << QString ( );
}
}
int rv = a.exec();
delete d;
ODevice::inst ( )-> setSoftSuspend ( false );
return rv;
}
static const char *pidfile_path = "/var/run/opie.pid";
void create_pidfile ( )
{
FILE *f;
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 1800be0..9c40fc4 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -302,56 +302,56 @@ public:
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_SL5XXX)
- if ( !QFile::exists ( "/etc/pointercal" )) {
- // Make sure calibration widget starts on top.
- Calibrate *cal = new Calibrate;
- cal-> exec ( );
- delete cal;
+ if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
+ 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." ));