-rw-r--r-- | core/launcher/main.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index b3c331b..a19da14 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp | |||
@@ -24,52 +24,48 @@ | |||
24 | 24 | ||
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/network.h> | 26 | #include <qpe/network.h> |
27 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
28 | #if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) | 28 | #if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) |
29 | #include <qpe/custom.h> | 29 | #include <qpe/custom.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #include <opie/odevice.h> | 32 | #include <opie/odevice.h> |
33 | 33 | ||
34 | #include <qfile.h> | 34 | #include <qfile.h> |
35 | #include <qwindowsystem_qws.h> | 35 | #include <qwindowsystem_qws.h> |
36 | #include <qpe/qcopenvelope_qws.h> | 36 | #include <qpe/qcopenvelope_qws.h> |
37 | #include <qpe/alarmserver.h> | 37 | #include <qpe/alarmserver.h> |
38 | 38 | ||
39 | #include <stdlib.h> | 39 | #include <stdlib.h> |
40 | #include <stdio.h> | 40 | #include <stdio.h> |
41 | #include <signal.h> | 41 | #include <signal.h> |
42 | #include <unistd.h> | 42 | #include <unistd.h> |
43 | 43 | ||
44 | #if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 44 | #if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) |
45 | #include "../calibrate/calibrate.h" | 45 | #include "../calibrate/calibrate.h" |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #ifdef QT_QWS_LOGIN | ||
49 | #include "../login/qdmdialogimpl.h" | ||
50 | #endif | ||
51 | |||
52 | #ifdef QT_QWS_CASSIOPEIA | 48 | #ifdef QT_QWS_CASSIOPEIA |
53 | static void ignoreMessage( QtMsgType, const char * ) | 49 | static void ignoreMessage( QtMsgType, const char * ) |
54 | { | 50 | { |
55 | } | 51 | } |
56 | #include <sys/mount.h> | 52 | #include <sys/mount.h> |
57 | #include <sys/types.h> | 53 | #include <sys/types.h> |
58 | #include <sys/stat.h> | 54 | #include <sys/stat.h> |
59 | #include <sys/time.h> | 55 | #include <sys/time.h> |
60 | #include <fcntl.h> | 56 | #include <fcntl.h> |
61 | #include <qdatetime.h> | 57 | #include <qdatetime.h> |
62 | 58 | ||
63 | void initCassiopeia() | 59 | void initCassiopeia() |
64 | { | 60 | { |
65 | // MIPSEL-specific init - make sure /proc exists for shm | 61 | // MIPSEL-specific init - make sure /proc exists for shm |
66 | /* | 62 | /* |
67 | if ( mount("/dev/ram0", "/", "ext2", MS_REMOUNT | MS_MGC_VAL, 0 ) ) { | 63 | if ( mount("/dev/ram0", "/", "ext2", MS_REMOUNT | MS_MGC_VAL, 0 ) ) { |
68 | perror("Remounting - / read/write"); | 64 | perror("Remounting - / read/write"); |
69 | } | 65 | } |
70 | */ | 66 | */ |
71 | if ( mount("none", "/tmp", "ramfs", 0, 0 ) ) { | 67 | if ( mount("none", "/tmp", "ramfs", 0, 0 ) ) { |
72 | perror("mounting ramfs /tmp"); | 68 | perror("mounting ramfs /tmp"); |
73 | } else { | 69 | } else { |
74 | fprintf( stderr, "mounted /tmp\n" ); | 70 | fprintf( stderr, "mounted /tmp\n" ); |
75 | } | 71 | } |
@@ -282,56 +278,48 @@ int initApplication( int argc, char ** argv ) | |||
282 | #ifdef QPE_OWNAPM | 278 | #ifdef QPE_OWNAPM |
283 | initAPM(); | 279 | initAPM(); |
284 | #endif | 280 | #endif |
285 | 281 | ||
286 | #ifdef QT_DEMO_SINGLE_FLOPPY | 282 | #ifdef QT_DEMO_SINGLE_FLOPPY |
287 | initFloppy(); | 283 | initFloppy(); |
288 | #endif | 284 | #endif |
289 | 285 | ||
290 | initEnvironment(); | 286 | initEnvironment(); |
291 | 287 | ||
292 | #if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) | 288 | #if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) |
293 | setenv( "QWS_SIZE", "240x320", 0 ); | 289 | setenv( "QWS_SIZE", "240x320", 0 ); |
294 | #endif | 290 | #endif |
295 | 291 | ||
296 | //Don't flicker at startup: | 292 | //Don't flicker at startup: |
297 | QWSServer::setDesktopBackground( QImage() ); | 293 | QWSServer::setDesktopBackground( QImage() ); |
298 | DesktopApplication a( argc, argv, QApplication::GuiServer ); | 294 | DesktopApplication a( argc, argv, QApplication::GuiServer ); |
299 | 295 | ||
300 | (void) new ModelKeyFilter ( ); | 296 | (void) new ModelKeyFilter ( ); |
301 | 297 | ||
302 | initBacklight(); | 298 | initBacklight(); |
303 | 299 | ||
304 | AlarmServer::initialize(); | 300 | AlarmServer::initialize(); |
305 | 301 | ||
306 | #if defined(QT_QWS_LOGIN) | ||
307 | for( int i=0; i<a.argc(); i++ ) | ||
308 | if( strcmp( a.argv()[i], "-login" ) == 0 ) { | ||
309 | QDMDialogImpl::login( ); | ||
310 | return 0; | ||
311 | } | ||
312 | #endif | ||
313 | |||
314 | Desktop *d = new Desktop(); | 302 | Desktop *d = new Desktop(); |
315 | 303 | ||
316 | QObject::connect( &a, SIGNAL(datebook()), d, SLOT(raiseDatebook()) ); | 304 | QObject::connect( &a, SIGNAL(datebook()), d, SLOT(raiseDatebook()) ); |
317 | QObject::connect( &a, SIGNAL(contacts()), d, SLOT(raiseContacts()) ); | 305 | QObject::connect( &a, SIGNAL(contacts()), d, SLOT(raiseContacts()) ); |
318 | QObject::connect( &a, SIGNAL(launch()), d, SLOT(raiseLauncher()) ); | 306 | QObject::connect( &a, SIGNAL(launch()), d, SLOT(raiseLauncher()) ); |
319 | QObject::connect( &a, SIGNAL(email()), d, SLOT(raiseEmail()) ); | 307 | QObject::connect( &a, SIGNAL(email()), d, SLOT(raiseEmail()) ); |
320 | QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) ); | 308 | QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) ); |
321 | QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) ); | 309 | QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) ); |
322 | QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) ); | 310 | QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) ); |
323 | QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) ); | 311 | QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) ); |
324 | QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) ); | 312 | QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) ); |
325 | QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) ); | 313 | QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) ); |
326 | 314 | ||
327 | (void)new SysFileMonitor(d); | 315 | (void)new SysFileMonitor(d); |
328 | Network::createServer(d); | 316 | Network::createServer(d); |
329 | 317 | ||
330 | #if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 318 | #if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) |
331 | if ( !QFile::exists( "/etc/pointercal" ) ) { | 319 | if ( !QFile::exists( "/etc/pointercal" ) ) { |
332 | // Make sure calibration widget starts on top. | 320 | // Make sure calibration widget starts on top. |
333 | Calibrate *cal = new Calibrate; | 321 | Calibrate *cal = new Calibrate; |
334 | cal->exec(); | 322 | cal->exec(); |
335 | delete cal; | 323 | delete cal; |
336 | } | 324 | } |
337 | #endif | 325 | #endif |