summaryrefslogtreecommitdiff
path: root/core/launcher/main.cpp
Unidiff
Diffstat (limited to 'core/launcher/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 49b41d6..8eaea17 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -16,43 +16,43 @@
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "desktop.h" 21#include "desktop.h"
22#include "taskbar.h" 22#include "taskbar.h"
23#include "stabmon.h" 23#include "stabmon.h"
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_SHARP ) || defined( QT_QWS_IPAQ ) 28#if defined( QT_QWS_SL5XXX ) || 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 <qmessagebox.h> 34#include <qmessagebox.h>
35#include <qfile.h> 35#include <qfile.h>
36#include <qimage.h> 36#include <qimage.h>
37#include <qwindowsystem_qws.h> 37#include <qwindowsystem_qws.h>
38#include <qpe/qcopenvelope_qws.h> 38#include <qpe/qcopenvelope_qws.h>
39#include <qpe/alarmserver.h> 39#include <qpe/alarmserver.h>
40 40
41#include <stdlib.h> 41#include <stdlib.h>
42#include <stdio.h> 42#include <stdio.h>
43#include <signal.h> 43#include <signal.h>
44#include <unistd.h> 44#include <unistd.h>
45 45
46#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 46#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
47#include "../calibrate/calibrate.h" 47#include "../calibrate/calibrate.h"
48#endif 48#endif
49 49
50using namespace Opie; 50using namespace Opie;
51 51
52void initEnvironment() 52void initEnvironment()
53{ 53{
54 Config config("locale"); 54 Config config("locale");
55 config.setGroup( "Location" ); 55 config.setGroup( "Location" );
56 QString tz = config.readEntry( "Timezone", getenv("TZ") ); 56 QString tz = config.readEntry( "Timezone", getenv("TZ") );
57 57
58 // if not timezone set, pick New York 58 // if not timezone set, pick New York
@@ -64,25 +64,25 @@ void initEnvironment()
64 64
65 config.setGroup( "Language" ); 65 config.setGroup( "Language" );
66 QString lang = config.readEntry( "Language", getenv("LANG") ); 66 QString lang = config.readEntry( "Language", getenv("LANG") );
67 if ( !lang.isNull() ) 67 if ( !lang.isNull() )
68 setenv( "LANG", lang, 1 ); 68 setenv( "LANG", lang, 1 );
69} 69}
70 70
71 71
72int initApplication( int argc, char ** argv ) 72int initApplication( int argc, char ** argv )
73{ 73{
74 initEnvironment(); 74 initEnvironment();
75 75
76#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) 76#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_SL5XXX)
77 setenv( "QWS_SIZE", "240x320", 0 ); 77 setenv( "QWS_SIZE", "240x320", 0 );
78#endif 78#endif
79 79
80 //Don't flicker at startup: 80 //Don't flicker at startup:
81 QWSServer::setDesktopBackground( QImage() ); 81 QWSServer::setDesktopBackground( QImage() );
82 DesktopApplication a( argc, argv, QApplication::GuiServer ); 82 DesktopApplication a( argc, argv, QApplication::GuiServer );
83 83
84 ODevice::inst ( )-> setSoftSuspend ( true ); 84 ODevice::inst ( )-> setSoftSuspend ( true );
85 85
86 { // init backlight 86 { // init backlight
87 QCopEnvelope e("QPE/System", "setBacklight(int)" ); 87 QCopEnvelope e("QPE/System", "setBacklight(int)" );
88 e << -3; // Forced on 88 e << -3; // Forced on
@@ -93,25 +93,25 @@ int initApplication( int argc, char ** argv )
93 Desktop *d = new Desktop(); 93 Desktop *d = new Desktop();
94 94
95 QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) ); 95 QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) );
96 QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) ); 96 QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) );
97 QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) ); 97 QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) );
98 QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) ); 98 QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) );
99 QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) ); 99 QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) );
100 QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) ); 100 QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) );
101 101
102 (void)new SysFileMonitor(d); 102 (void)new SysFileMonitor(d);
103 Network::createServer(d); 103 Network::createServer(d);
104 104
105#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 105#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
106 if ( !QFile::exists( "/etc/pointercal" ) ) { 106 if ( !QFile::exists( "/etc/pointercal" ) ) {
107 // Make sure calibration widget starts on top. 107 // Make sure calibration widget starts on top.
108 Calibrate *cal = new Calibrate; 108 Calibrate *cal = new Calibrate;
109 cal->exec(); 109 cal->exec();
110 delete cal; 110 delete cal;
111 } 111 }
112#endif 112#endif
113 113
114 d->show(); 114 d->show();
115 115
116 if ( QDate::currentDate ( ). year ( ) < 2000 ) { 116 if ( QDate::currentDate ( ). year ( ) < 2000 ) {
117 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 ) { 117 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 ) {