summaryrefslogtreecommitdiff
path: root/core/launcher/main.cpp
Side-by-side diff
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
@@ -21,40 +21,39 @@
#include "desktop.h"
#include "taskbar.h"
#include "stabmon.h"
#include <qpe/qpeapplication.h>
#include <qpe/network.h>
#include <qpe/config.h>
#if defined( QT_QWS_SL5XXX ) || defined( QT_QWS_IPAQ )
#include <qpe/custom.h>
#endif
#include <opie/odevice.h>
+#include <opie/oprocess.h>
#include <qmessagebox.h>
#include <qfile.h>
#include <qimage.h>
#include <qwindowsystem_qws.h>
#include <qwsmouse_qws.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/alarmserver.h>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
-#include "../calibrate/calibrate.h"
-
using namespace Opie;
void initEnvironment()
{
int rot;
Config config("locale");
config.setGroup( "Location" );
QString tz = config.readEntry( "Timezone", getenv("TZ") );
// if not timezone set, pick New York
if (tz.isNull())
@@ -109,28 +108,32 @@ int initApplication( int argc, char ** argv )
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 ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
if ( !QFile::exists( "/etc/pointercal" ) ) {
- // Make sure calibration widget starts on top.
- Calibrate *cal = new Calibrate;
- cal->exec();
- delete cal;
+ OProcess cal;
+ cal << "calibrate";
+
+ if ( ! cal.start(OProcess::Block, OProcess::NoCommunication) ) {
+ QMessageBox::warning( 0, "Unable to calibrate",
+ "Failed to start the calibration tool.\n"
+ );
+ }
}
}
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 ( );
}
}