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.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 20a1ecd..e96eeae 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -27,12 +27,13 @@
27#include <qpe/config.h> 27#include <qpe/config.h>
28#if defined( QT_QWS_SL5XXX ) || 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#include <opie/oprocess.h>
33 34
34#include <qmessagebox.h> 35#include <qmessagebox.h>
35#include <qfile.h> 36#include <qfile.h>
36#include <qimage.h> 37#include <qimage.h>
37#include <qwindowsystem_qws.h> 38#include <qwindowsystem_qws.h>
38#include <qwsmouse_qws.h> 39#include <qwsmouse_qws.h>
@@ -41,14 +42,12 @@
41 42
42#include <stdlib.h> 43#include <stdlib.h>
43#include <stdio.h> 44#include <stdio.h>
44#include <signal.h> 45#include <signal.h>
45#include <unistd.h> 46#include <unistd.h>
46 47
47#include "../calibrate/calibrate.h"
48
49using namespace Opie; 48using namespace Opie;
50 49
51void initEnvironment() 50void initEnvironment()
52{ 51{
53 int rot; 52 int rot;
54 Config config("locale"); 53 Config config("locale");
@@ -115,16 +114,20 @@ int initApplication( int argc, char ** argv )
115 114
116 (void)new SysFileMonitor(d); 115 (void)new SysFileMonitor(d);
117 Network::createServer(d); 116 Network::createServer(d);
118 117
119 if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { 118 if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
120 if ( !QFile::exists( "/etc/pointercal" ) ) { 119 if ( !QFile::exists( "/etc/pointercal" ) ) {
121 // Make sure calibration widget starts on top. 120 OProcess cal;
122 Calibrate *cal = new Calibrate; 121 cal << "calibrate";
123 cal->exec(); 122
124 delete cal; 123 if ( ! cal.start(OProcess::Block, OProcess::NoCommunication) ) {
124 QMessageBox::warning( 0, "Unable to calibrate",
125 "Failed to start the calibration tool.\n"
126 );
127 }
125 } 128 }
126 } 129 }
127 130
128 d->show(); 131 d->show();
129 132
130 if ( QDate::currentDate ( ). year ( ) < 2000 ) { 133 if ( QDate::currentDate ( ). year ( ) < 2000 ) {