summaryrefslogtreecommitdiff
path: root/core/launcher
Unidiff
Diffstat (limited to 'core/launcher') (more/less context) (ignore whitespace changes)
-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
6 files changed, 32 insertions, 12 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index ef0bf4c..6def126 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -95,12 +95,13 @@ KeyRegisterList keyRegisterList;
95 95
96static Desktop* qpedesktop = 0; 96static Desktop* qpedesktop = 0;
97static int loggedin = 0; 97static 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" );
101 Password::authenticate( at_poweron ); 102 Password::authenticate( at_poweron );
102 loggedin = 1; 103 loggedin = 1;
103 QCopEnvelope e( "QPE/Desktop", "unlocked()" ); 104 QCopEnvelope e( "QPE/Desktop", "unlocked()" );
104 } 105 }
105} 106}
106 107
@@ -618,12 +619,13 @@ static bool hasVisibleWindow( const QString& clientname )
618 619
619void Desktop::executeOrModify( const QString& appLnkFile ) 620void Desktop::executeOrModify( const QString& appLnkFile )
620{ 621{
621 AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); 622 AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile );
622 if ( lnk.isValid() ) { 623 if ( lnk.isValid() ) {
623 QCString app = lnk.exec().utf8(); 624 QCString app = lnk.exec().utf8();
625 Global::terminateBuiltin( "calibrate" );
624 if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { 626 if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) {
625 // MRUList::addTask( &lnk ); 627 // MRUList::addTask( &lnk );
626 if ( hasVisibleWindow( app ) ) 628 if ( hasVisibleWindow( app ) )
627 QCopChannel::send( "QPE/Application/" + app, "nextView()" ); 629 QCopChannel::send( "QPE/Application/" + app, "nextView()" );
628 else 630 else
629 QCopChannel::send( "QPE/Application/" + app, "raise()" ); 631 QCopChannel::send( "QPE/Application/" + app, "raise()" );
diff --git a/core/launcher/launcher.pro b/core/launcher/launcher.pro
index ba01954..f5597c5 100644
--- a/core/launcher/launcher.pro
+++ b/core/launcher/launcher.pro
@@ -14,12 +14,13 @@ HEADERS = background.h \
14 inputmethods.h \ 14 inputmethods.h \
15 systray.h \ 15 systray.h \
16 wait.h \ 16 wait.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 \
20 startmenu.h \ 21 startmenu.h \
21 transferserver.h \ 22 transferserver.h \
22 qcopbridge.h \ 23 qcopbridge.h \
23 packageslave.h \ 24 packageslave.h \
24 irserver.h \ 25 irserver.h \
25 ../../rsync/buf.h \ 26 ../../rsync/buf.h \
@@ -54,12 +55,13 @@ SOURCES = background.cpp \
54 inputmethods.cpp \ 55 inputmethods.cpp \
55 systray.cpp \ 56 systray.cpp \
56 wait.cpp \ 57 wait.cpp \
57 shutdownimpl.cpp \ 58 shutdownimpl.cpp \
58 launcher.cpp \ 59 launcher.cpp \
59 launcherview.cpp \ 60 launcherview.cpp \
61 ../../core/apps/calibrate/calibrate.cpp \
60 transferserver.cpp \ 62 transferserver.cpp \
61 packageslave.cpp \ 63 packageslave.cpp \
62 irserver.cpp \ 64 irserver.cpp \
63 qcopbridge.cpp \ 65 qcopbridge.cpp \
64 startmenu.cpp \ 66 startmenu.cpp \
65 main.cpp \ 67 main.cpp \
@@ -89,12 +91,14 @@ SOURCES = background.cpp \
89 ../../rsync/version.c \ 91 ../../rsync/version.c \
90 ../../rsync/whole.c \ 92 ../../rsync/whole.c \
91 ../../rsync/qrsync.cpp 93 ../../rsync/qrsync.cpp
92 INTERFACES= syncdialog.ui 94 INTERFACES= syncdialog.ui
93INCLUDEPATH += ../../include 95INCLUDEPATH += ../../include
94 DEPENDPATH+= ../../include . 96 DEPENDPATH+= ../../include .
97INCLUDEPATH += ../../core/apps/calibrate
98 DEPENDPATH+= ../../core/apps/calibrate
95INCLUDEPATH += ../../rsync 99INCLUDEPATH += ../../rsync
96 DEPENDPATH+= ../../rsync 100 DEPENDPATH+= ../../rsync
97 TARGET = qpe 101 TARGET = qpe
98 LIBS += -lqpe -lcrypt -lopie 102 LIBS += -lqpe -lcrypt -lopie
99 103
100TRANSLATIONS = ../../i18n/de/qpe.ts \ 104TRANSLATIONS = ../../i18n/de/qpe.ts \
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index e96eeae..20a1ecd 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -27,13 +27,12 @@
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>
34 33
35#include <qmessagebox.h> 34#include <qmessagebox.h>
36#include <qfile.h> 35#include <qfile.h>
37#include <qimage.h> 36#include <qimage.h>
38#include <qwindowsystem_qws.h> 37#include <qwindowsystem_qws.h>
39#include <qwsmouse_qws.h> 38#include <qwsmouse_qws.h>
@@ -42,12 +41,14 @@
42 41
43#include <stdlib.h> 42#include <stdlib.h>
44#include <stdio.h> 43#include <stdio.h>
45#include <signal.h> 44#include <signal.h>
46#include <unistd.h> 45#include <unistd.h>
47 46
47#include "../calibrate/calibrate.h"
48
48using namespace Opie; 49using namespace Opie;
49 50
50void initEnvironment() 51void initEnvironment()
51{ 52{
52 int rot; 53 int rot;
53 Config config("locale"); 54 Config config("locale");
@@ -114,20 +115,16 @@ int initApplication( int argc, char ** argv )
114 115
115 (void)new SysFileMonitor(d); 116 (void)new SysFileMonitor(d);
116 Network::createServer(d); 117 Network::createServer(d);
117 118
118 if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { 119 if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
119 if ( !QFile::exists( "/etc/pointercal" ) ) { 120 if ( !QFile::exists( "/etc/pointercal" ) ) {
120 OProcess cal; 121 // Make sure calibration widget starts on top.
121 cal << "calibrate"; 122 Calibrate *cal = new Calibrate;
122 123 cal->exec();
123 if ( ! cal.start(OProcess::Block, OProcess::NoCommunication) ) { 124 delete cal;
124 QMessageBox::warning( 0, "Unable to calibrate",
125 "Failed to start the calibration tool.\n"
126 );
127 }
128 } 125 }
129 } 126 }
130 127
131 d->show(); 128 d->show();
132 129
133 if ( QDate::currentDate ( ). year ( ) < 2000 ) { 130 if ( QDate::currentDate ( ). year ( ) < 2000 ) {
diff --git a/core/launcher/opie-taskbar.control b/core/launcher/opie-taskbar.control
index db66a05..c0430b7 100644
--- a/core/launcher/opie-taskbar.control
+++ b/core/launcher/opie-taskbar.control
@@ -1,9 +1,9 @@
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 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
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, opie-calibrate 7Depends: opie-base
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 8158128..8af568d 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -19,12 +19,13 @@
19*********************************************************************/ 19*********************************************************************/
20 20
21#include "startmenu.h" 21#include "startmenu.h"
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"
25#include "wait.h" 26#include "wait.h"
26#include "appicons.h" 27#include "appicons.h"
27 28
28#include "taskbar.h" 29#include "taskbar.h"
29#include "desktop.h" 30#include "desktop.h"
30 31
@@ -78,18 +79,21 @@ static Global::Command builtins[] = {
78#ifdef SINGLE_APP 79#ifdef SINGLE_APP
79#define APP(a,b,c,d) { a, new##b, c }, 80#define APP(a,b,c,d) { a, new##b, c },
80#include "../launcher/apps.h" 81#include "../launcher/apps.h"
81#undef APP 82#undef APP
82#endif 83#endif
83 84
85#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX)
86 { "calibrate", TaskBar::calibrate, 1, 0 },
87#endif
84#if !defined(QT_QWS_CASSIOPEIA) 88#if !defined(QT_QWS_CASSIOPEIA)
85 { "shutdown", Global::shutdown, 1, 0 }, 89 { "shutdown", Global::shutdown, 1, 0 },
86// { "run", run, 1, 0 }, 90// { "run", run, 1, 0 },
87#endif 91#endif
88 92
89 { 0, 0, 0, 0 }, 93 { 0, TaskBar::calibrate, 0, 0 },
90}; 94};
91 95
92static bool initNumLock() 96static bool initNumLock()
93{ 97{
94#ifdef QPE_INITIAL_NUMLOCK_STATE 98#ifdef QPE_INITIAL_NUMLOCK_STATE
95 QPE_INITIAL_NUMLOCK_STATE 99 QPE_INITIAL_NUMLOCK_STATE
@@ -299,12 +303,23 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data )
299 } 303 }
300 else if ( msg == "toggleStartMenu()" ) { 304 else if ( msg == "toggleStartMenu()" ) {
301 sm-> launch ( ); 305 sm-> launch ( );
302 } 306 }
303} 307}
304 308
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
305void TaskBar::toggleNumLockState() 320void TaskBar::toggleNumLockState()
306{ 321{
307 if ( lockState ) lockState->toggleNumLockState(); 322 if ( lockState ) lockState->toggleNumLockState();
308} 323}
309 324
310void TaskBar::toggleCapsLockState() 325void TaskBar::toggleCapsLockState()
diff --git a/core/launcher/taskbar.h b/core/launcher/taskbar.h
index 575a8c9..a0bf395 100644
--- a/core/launcher/taskbar.h
+++ b/core/launcher/taskbar.h
@@ -39,12 +39,14 @@ class LockKeyState;
39class TaskBar : public QHBox { 39class TaskBar : public QHBox {
40 Q_OBJECT 40 Q_OBJECT
41public: 41public:
42 TaskBar(); 42 TaskBar();
43 ~TaskBar(); 43 ~TaskBar();
44 44
45 static QWidget *calibrate( bool );
46
45 bool recoverMemory(); 47 bool recoverMemory();
46 48
47 StartMenu *startMenu() const { return sm; } 49 StartMenu *startMenu() const { return sm; }
48public slots: 50public slots:
49 void startWait(); 51 void startWait();
50 void stopWait(const QString&); 52 void stopWait(const QString&);