author | zecke <zecke> | 2003-10-04 07:27:33 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-10-04 07:27:33 (UTC) |
commit | 364d30ca7c212a531b79bb7cbceb8af7a0130f2c (patch) (side-by-side diff) | |
tree | 7c0d70c49a884d02418a7708ce819a8d0b02130f /core/launcher/firstuse.cpp | |
parent | 271ba635536db4a9f4ae1e575194d0f388b1c991 (diff) | |
download | opie-364d30ca7c212a531b79bb7cbceb8af7a0130f2c.zip opie-364d30ca7c212a531b79bb7cbceb8af7a0130f2c.tar.gz opie-364d30ca7c212a531b79bb7cbceb8af7a0130f2c.tar.bz2 |
Check if there is a Mouse Driver
And get rid off the QPE_NEED_CALIBRATION define for defining the need of calibration
We will find out at runtime
SomeOne Apply this to core/server in the BRANCH as well
-rw-r--r-- | core/launcher/firstuse.cpp | 24 |
1 files changed, 13 insertions, 11 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 @@ -32,5 +32,4 @@ #include <qtopia/custom.h> -#if defined(QPE_NEED_CALIBRATION) + #include "calibrate.h" -#endif #include "documentlist.h" @@ -170,8 +169,12 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : calcMaxWindowRect(); -#if defined(QPE_NEED_CALIBRATION) - if ( !QFile::exists("/etc/pointercal") ) { - needCalibrate = TRUE; - grabMouse(); + + 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"); @@ -232,3 +235,3 @@ void FirstUse::nextDialog() // The last application is still running. - // Tell it to stop, and when its done we'll come back + // Tell it to stop, and when its done we'll come back // to nextDialog and exit. @@ -493,2 +496,3 @@ void FirstUse::updateButtons() next->setText(tr("Next >>")); + next->setEnabled( !waitingForLaunch ); @@ -506,4 +510,3 @@ void FirstUse::mouseReleaseEvent( QMouseEvent * ) if ( currApp < 0 ) { -#if defined(QPE_NEED_CALIBRATION) - if ( needCalibrate ) { + if ( m_calHandler && needCalibrate ) { releaseMouse(); @@ -513,3 +516,2 @@ void FirstUse::mouseReleaseEvent( QMouseEvent * ) } -#endif nextDialog(); |