-rw-r--r-- | core/launcher/firstuse.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp index 2dc6a72..3f769ae 100644 --- a/core/launcher/firstuse.cpp +++ b/core/launcher/firstuse.cpp @@ -29,11 +29,10 @@ #include "inputmethods.h" #include "applauncher.h" #include "serverapp.h" #include <qtopia/custom.h> -#if defined(QPE_NEED_CALIBRATION) + #include "calibrate.h" -#endif #include "documentlist.h" #include <qtopia/resource.h> #include <qtopia/qcopenvelope_qws.h> @@ -167,14 +166,18 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : connect(sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(message(const QCString &, const QByteArray &)) ); #endif calcMaxWindowRect(); -#if defined(QPE_NEED_CALIBRATION) + + m_calHandler = ( QWSServer::mouseHandler() && QWSServer::mouseHandler()->inherits("QCalibratedMouseHandler") ) ? true : false; + + if ( m_calHandler) { if ( !QFile::exists("/etc/pointercal") ) { needCalibrate = TRUE; grabMouse(); } -#endif + } + Config config("locale"); config.setGroup( "Language"); lang = config.readEntry( "Language", "en"); @@ -490,8 +493,9 @@ void FirstUse::updateButtons() if ( !settingsTable[i].app ) next->setText(tr("Finish")); else next->setText(tr("Next >>")); + next->setEnabled( !waitingForLaunch ); } void FirstUse::keyPressEvent( QKeyEvent *e ) @@ -503,15 +507,13 @@ void FirstUse::keyPressEvent( QKeyEvent *e ) void FirstUse::mouseReleaseEvent( QMouseEvent * ) { if ( currApp < 0 ) { -#if defined(QPE_NEED_CALIBRATION) - if ( needCalibrate ) { + if ( m_calHandler && needCalibrate ) { releaseMouse(); Calibrate *cal = new Calibrate; cal->exec(); delete cal; } -#endif nextDialog(); } } |