summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-19 22:07:06 (UTC)
committer kergoth <kergoth>2003-04-19 22:07:06 (UTC)
commit29c556ffc9b1497cd996ceb46d646b1eaf1288be (patch) (unidiff)
treeb89c424de93f541bc80908c93172eb4e601e8c02
parentc502394063598e63591e06072802f1c5a9e0c266 (diff)
downloadopie-29c556ffc9b1497cd996ceb46d646b1eaf1288be.zip
opie-29c556ffc9b1497cd996ceb46d646b1eaf1288be.tar.gz
opie-29c556ffc9b1497cd996ceb46d646b1eaf1288be.tar.bz2
Split calibrate out as a standalone application, and ensure taskbar depends
on it. This makes ts debugging easier, having a seperate calibration tool around, and as a side affect fixes calibration on the C700, which previously required a reboot to take effect.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/calibrate/main.cpp20
-rw-r--r--core/apps/calibrate/opie-calibrate.control8
-rw-r--r--core/launcher/desktop.cpp2
-rw-r--r--core/launcher/launcher.pro4
-rw-r--r--core/launcher/main.cpp15
-rw-r--r--core/launcher/opie-taskbar.control4
-rw-r--r--core/launcher/taskbar.cpp17
-rw-r--r--core/launcher/taskbar.h2
8 files changed, 32 insertions, 40 deletions
diff --git a/core/apps/calibrate/main.cpp b/core/apps/calibrate/main.cpp
index d1ad083..1c295eb 100644
--- a/core/apps/calibrate/main.cpp
+++ b/core/apps/calibrate/main.cpp
@@ -23,20 +23,24 @@
23#include <qfile.h> 23#include <qfile.h>
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25 25
26#ifdef QWS
27#include <qwindowsystem_qws.h>
28#endif
29
26int main( int argc, char ** argv ) 30int main( int argc, char ** argv )
27{ 31{
28 QPEApplication a( argc, argv ); 32 QPEApplication a( argc, argv );
29 int retval = 0; 33 int retval = 0;
30 34
31#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) 35#ifdef QWS
32 if ( !QFile::exists( "/etc/pointercal" ) ) { 36 if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
37#endif
33 // Make sure calibration widget starts on top. 38 // Make sure calibration widget starts on top.
34 Calibrate *cal = new Calibrate; 39 Calibrate cal;
35 a.setMainWidget(cal); 40 a.setMainWidget(&cal);
36 a.showMainWidget(cal); 41 a.showMainWidget(&cal);
37 retval = a.exec(); 42 return a.exec();
38 delete cal; 43#ifdef QWS
39 } 44 }
40#endif 45#endif
41 return retval;
42} 46}
diff --git a/core/apps/calibrate/opie-calibrate.control b/core/apps/calibrate/opie-calibrate.control
new file mode 100644
index 0000000..6eafb94
--- a/dev/null
+++ b/core/apps/calibrate/opie-calibrate.control
@@ -0,0 +1,8 @@
1Files: bin/calibrate apps/Settings/Calibrate.desktop
2Priority: required
3Section: opie/system
4Maintainer: Project Opie <opie@handhelds.org>
5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION.3
7Depends: libqpe1, libqt2-emb
8Description: Opie calibration tool
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 6def126..ef0bf4c 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -98,7 +98,6 @@ static int loggedin = 0;
98static void login( bool at_poweron ) 98static void login( bool at_poweron )
99{ 99{
100 if ( !loggedin ) { 100 if ( !loggedin ) {
101 Global::terminateBuiltin( "calibrate" );
102 Password::authenticate( at_poweron ); 101 Password::authenticate( at_poweron );
103 loggedin = 1; 102 loggedin = 1;
104 QCopEnvelope e( "QPE/Desktop", "unlocked()" ); 103 QCopEnvelope e( "QPE/Desktop", "unlocked()" );
@@ -622,7 +621,6 @@ void Desktop::executeOrModify( const QString& appLnkFile )
622 AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); 621 AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile );
623 if ( lnk.isValid() ) { 622 if ( lnk.isValid() ) {
624 QCString app = lnk.exec().utf8(); 623 QCString app = lnk.exec().utf8();
625 Global::terminateBuiltin( "calibrate" );
626 if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { 624 if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) {
627 // MRUList::addTask( &lnk ); 625 // MRUList::addTask( &lnk );
628 if ( hasVisibleWindow( app ) ) 626 if ( hasVisibleWindow( app ) )
diff --git a/core/launcher/launcher.pro b/core/launcher/launcher.pro
index d0a573b..007e48c 100644
--- a/core/launcher/launcher.pro
+++ b/core/launcher/launcher.pro
@@ -17,7 +17,6 @@ HEADERS = background.h \
17 shutdownimpl.h \ 17 shutdownimpl.h \
18 launcher.h \ 18 launcher.h \
19 launcherview.h \ 19 launcherview.h \
20 ../../core/apps/calibrate/calibrate.h \
21 startmenu.h \ 20 startmenu.h \
22 transferserver.h \ 21 transferserver.h \
23 qcopbridge.h \ 22 qcopbridge.h \
@@ -58,7 +57,6 @@ SOURCES = background.cpp \
58 shutdownimpl.cpp \ 57 shutdownimpl.cpp \
59 launcher.cpp \ 58 launcher.cpp \
60 launcherview.cpp \ 59 launcherview.cpp \
61 ../../core/apps/calibrate/calibrate.cpp \
62 transferserver.cpp \ 60 transferserver.cpp \
63 packageslave.cpp \ 61 packageslave.cpp \
64 irserver.cpp \ 62 irserver.cpp \
@@ -94,8 +92,6 @@ SOURCES = background.cpp \
94 INTERFACES= syncdialog.ui 92 INTERFACES= syncdialog.ui
95INCLUDEPATH += ../../include 93INCLUDEPATH += ../../include
96 DEPENDPATH+= ../../include . 94 DEPENDPATH+= ../../include .
97INCLUDEPATH += ../../core/apps/calibrate
98 DEPENDPATH+= ../../core/apps/calibrate
99INCLUDEPATH += ../../rsync 95INCLUDEPATH += ../../rsync
100 DEPENDPATH+= ../../rsync 96 DEPENDPATH+= ../../rsync
101 TARGET = qpe 97 TARGET = qpe
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
@@ -30,6 +30,7 @@
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>
@@ -44,8 +45,6 @@
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()
@@ -118,10 +117,14 @@ int initApplication( int argc, char ** argv )
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
diff --git a/core/launcher/opie-taskbar.control b/core/launcher/opie-taskbar.control
index c0430b7..db66a05 100644
--- a/core/launcher/opie-taskbar.control
+++ b/core/launcher/opie-taskbar.control
@@ -1,9 +1,9 @@
1Files: bin/qpe apps/Settings/Calibrate.desktop pics/launcher pics/devicebuttons/*.png plugins/applets/libsuspendapplet.so* plugins/applets/libhomeapplet.so* plugins/applets/liblogoutapplet.so* plugins/applets/librotateapplet.so* root/etc/init.d/opie 1Files: bin/qpe pics/launcher pics/devicebuttons/*.png plugins/applets/libsuspendapplet.so* plugins/applets/libhomeapplet.so* plugins/applets/liblogoutapplet.so* plugins/applets/librotateapplet.so* root/etc/init.d/opie
2Priority: required 2Priority: required
3Section: opie/system 3Section: opie/system
4Maintainer: Project Opie <opie@handhelds.org> 4Maintainer: Project Opie <opie@handhelds.org>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION.3 6Version: $QPE_VERSION-$SUB_VERSION.3
7Depends: opie-base 7Depends: opie-base, opie-calibrate
8Replaces: opie-rotation 8Replaces: opie-rotation
9Description: Launcher for Opie 9Description: Launcher for Opie
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 8af568d..8158128 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -22,7 +22,6 @@
22#include "inputmethods.h" 22#include "inputmethods.h"
23#include "runningappbar.h" 23#include "runningappbar.h"
24#include "systray.h" 24#include "systray.h"
25#include "calibrate.h"
26#include "wait.h" 25#include "wait.h"
27#include "appicons.h" 26#include "appicons.h"
28 27
@@ -82,15 +81,12 @@ static Global::Command builtins[] = {
82#undef APP 81#undef APP
83#endif 82#endif
84 83
85#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX)
86 { "calibrate", TaskBar::calibrate, 1, 0 },
87#endif
88#if !defined(QT_QWS_CASSIOPEIA) 84#if !defined(QT_QWS_CASSIOPEIA)
89 { "shutdown", Global::shutdown, 1, 0 }, 85 { "shutdown", Global::shutdown, 1, 0 },
90// { "run", run, 1, 0 }, 86// { "run", run, 1, 0 },
91#endif 87#endif
92 88
93 { 0, TaskBar::calibrate, 0, 0 }, 89 { 0, 0, 0, 0 },
94}; 90};
95 91
96static bool initNumLock() 92static bool initNumLock()
@@ -306,17 +302,6 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data )
306 } 302 }
307} 303}
308 304
309QWidget *TaskBar::calibrate(bool)
310{
311#ifdef Q_WS_QWS
312 Calibrate *c = new Calibrate;
313 c->show();
314 return c;
315#else
316 return 0;
317#endif
318}
319
320void TaskBar::toggleNumLockState() 305void TaskBar::toggleNumLockState()
321{ 306{
322 if ( lockState ) lockState->toggleNumLockState(); 307 if ( lockState ) lockState->toggleNumLockState();
diff --git a/core/launcher/taskbar.h b/core/launcher/taskbar.h
index a0bf395..575a8c9 100644
--- a/core/launcher/taskbar.h
+++ b/core/launcher/taskbar.h
@@ -42,8 +42,6 @@ public:
42 TaskBar(); 42 TaskBar();
43 ~TaskBar(); 43 ~TaskBar();
44 44
45 static QWidget *calibrate( bool );
46
47 bool recoverMemory(); 45 bool recoverMemory();
48 46
49 StartMenu *startMenu() const { return sm; } 47 StartMenu *startMenu() const { return sm; }