summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-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
7 files changed, 32 insertions, 20 deletions
diff --git a/core/apps/calibrate/opie-calibrate.control b/core/apps/calibrate/opie-calibrate.control
deleted file mode 100644
index 6eafb94..0000000
--- a/core/apps/calibrate/opie-calibrate.control
+++ b/dev/null
@@ -1,8 +0,0 @@
-Files: bin/calibrate apps/Settings/Calibrate.desktop
-Priority: required
-Section: opie/system
-Maintainer: Project Opie <opie@handhelds.org>
-Architecture: arm
-Version: $QPE_VERSION-$SUB_VERSION.3
-Depends: libqpe1, libqt2-emb
-Description: Opie calibration tool
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
@@ -89,24 +89,25 @@ private:
int keyCode;
QCString channel, message;
};
typedef QValueList<QCopKeyRegister> KeyRegisterList;
KeyRegisterList keyRegisterList;
static Desktop* qpedesktop = 0;
static int loggedin = 0;
static void login( bool at_poweron )
{
if ( !loggedin ) {
+ Global::terminateBuiltin( "calibrate" );
Password::authenticate( at_poweron );
loggedin = 1;
QCopEnvelope e( "QPE/Desktop", "unlocked()" );
}
}
bool Desktop::screenLocked()
{
return loggedin == 0;
}
/*
@@ -612,24 +613,25 @@ static bool hasVisibleWindow( const QString& clientname )
return TRUE;
}
#endif
return FALSE;
}
void Desktop::executeOrModify( const QString& appLnkFile )
{
AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile );
if ( lnk.isValid() ) {
QCString app = lnk.exec().utf8();
+ Global::terminateBuiltin( "calibrate" );
if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) {
// MRUList::addTask( &lnk );
if ( hasVisibleWindow( app ) )
QCopChannel::send( "QPE/Application/" + app, "nextView()" );
else
QCopChannel::send( "QPE/Application/" + app, "raise()" );
}
else {
lnk.execute();
}
}
}
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
@@ -8,24 +8,25 @@ HEADERS = background.h \
info.h \
appicons.h \
taskbar.h \
sidething.h \
runningappbar.h \
stabmon.h \
inputmethods.h \
systray.h \
wait.h \
shutdownimpl.h \
launcher.h \
launcherview.h \
+ ../../core/apps/calibrate/calibrate.h \
startmenu.h \
transferserver.h \
qcopbridge.h \
packageslave.h \
irserver.h \
../../rsync/buf.h \
../../rsync/checksum.h \
../../rsync/command.h \
../../rsync/emit.h \
../../rsync/job.h \
../../rsync/netint.h \
../../rsync/protocol.h \
@@ -48,24 +49,25 @@ SOURCES = background.cpp \
info.cpp \
appicons.cpp \
taskbar.cpp \
sidething.cpp \
runningappbar.cpp \
stabmon.cpp \
inputmethods.cpp \
systray.cpp \
wait.cpp \
shutdownimpl.cpp \
launcher.cpp \
launcherview.cpp \
+ ../../core/apps/calibrate/calibrate.cpp \
transferserver.cpp \
packageslave.cpp \
irserver.cpp \
qcopbridge.cpp \
startmenu.cpp \
main.cpp \
../../rsync/base64.c \
../../rsync/buf.c \
../../rsync/checksum.c \
../../rsync/command.c \
../../rsync/delta.c \
../../rsync/emit.c \
@@ -83,24 +85,26 @@ SOURCES = background.cpp \
../../rsync/stats.c \
../../rsync/stream.c \
../../rsync/sumset.c \
../../rsync/trace.c \
../../rsync/tube.c \
../../rsync/util.c \
../../rsync/version.c \
../../rsync/whole.c \
../../rsync/qrsync.cpp
INTERFACES = syncdialog.ui
INCLUDEPATH += ../../include
DEPENDPATH += ../../include .
+INCLUDEPATH += ../../core/apps/calibrate
+DEPENDPATH += ../../core/apps/calibrate
INCLUDEPATH += ../../rsync
DEPENDPATH += ../../rsync
TARGET = qpe
LIBS += -lqpe -lcrypt -lopie
TRANSLATIONS = ../../i18n/de/qpe.ts \
../../i18n/nl/qpe.ts \
../../i18n/xx/qpe.ts \
../../i18n/en/qpe.ts \
../../i18n/es/qpe.ts \
../../i18n/fr/qpe.ts \
../../i18n/hu/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
@@ -21,39 +21,40 @@
#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())
@@ -108,32 +109,28 @@ 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" ) ) {
- OProcess cal;
- cal << "calibrate";
-
- if ( ! cal.start(OProcess::Block, OProcess::NoCommunication) ) {
- QMessageBox::warning( 0, "Unable to calibrate",
- "Failed to start the calibration tool.\n"
- );
- }
+ // Make sure calibration widget starts on top.
+ Calibrate *cal = new Calibrate;
+ cal->exec();
+ delete cal;
}
}
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 ( );
}
}
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 @@
-Files: 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
+Files: 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
Priority: required
Section: opie/system
Maintainer: Project Opie <opie@handhelds.org>
Architecture: arm
Version: $QPE_VERSION-$SUB_VERSION.3
-Depends: opie-base, opie-calibrate
+Depends: opie-base
Replaces: opie-rotation
Description: 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
@@ -13,24 +13,25 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
*********************************************************************/
#include "startmenu.h"
#include "inputmethods.h"
#include "runningappbar.h"
#include "systray.h"
+#include "calibrate.h"
#include "wait.h"
#include "appicons.h"
#include "taskbar.h"
#include "desktop.h"
#include <qpe/qpeapplication.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/global.h>
#if defined( QT_QWS_SL5XXX ) || defined( QT_QWS_IPAQ )
#include <qpe/custom.h>
@@ -72,30 +73,33 @@ using namespace Opie;
#include "../launcher/apps.h"
#undef APP
#endif // SINGLE_APP
static Global::Command builtins[] = {
#ifdef SINGLE_APP
#define APP(a,b,c,d) { a, new##b, c },
#include "../launcher/apps.h"
#undef APP
#endif
+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX)
+ { "calibrate", TaskBar::calibrate, 1, 0 },
+#endif
#if !defined(QT_QWS_CASSIOPEIA)
{ "shutdown", Global::shutdown, 1, 0 },
// { "run", run, 1, 0 },
#endif
- { 0, 0, 0, 0 },
+ { 0, TaskBar::calibrate, 0, 0 },
};
static bool initNumLock()
{
#ifdef QPE_INITIAL_NUMLOCK_STATE
QPE_INITIAL_NUMLOCK_STATE
#endif
return FALSE;
}
class LockKeyState : public QWidget
{
@@ -293,24 +297,35 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data )
else if ( msg == "toggleMenu()" ) {
if ( sm-> launchMenu-> isVisible ( ))
sm-> launch ( );
else {
QCopEnvelope e ( "QPE/System", "toggleApplicationMenu()" );
}
}
else if ( msg == "toggleStartMenu()" ) {
sm-> launch ( );
}
}
+QWidget *TaskBar::calibrate(bool)
+{
+#ifdef Q_WS_QWS
+ Calibrate *c = new Calibrate;
+ c->show();
+ return c;
+#else
+ return 0;
+#endif
+}
+
void TaskBar::toggleNumLockState()
{
if ( lockState ) lockState->toggleNumLockState();
}
void TaskBar::toggleCapsLockState()
{
if ( lockState ) lockState->toggleCapsLockState();
}
void TaskBar::toggleSymbolInput()
{
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
@@ -33,24 +33,26 @@ class RunningAppBar;
class QWidgetStack;
class QTimer;
class QLabel;
class StartMenu;
class LockKeyState;
class TaskBar : public QHBox {
Q_OBJECT
public:
TaskBar();
~TaskBar();
+ static QWidget *calibrate( bool );
+
bool recoverMemory();
StartMenu *startMenu() const { return sm; }
public slots:
void startWait();
void stopWait(const QString&);
void stopWait();
void clearStatusBar();
void toggleNumLockState();
void toggleCapsLockState();
void toggleSymbolInput();