summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/applauncher.cpp11
-rw-r--r--core/launcher/config.in6
-rw-r--r--core/launcher/documentlist.cpp11
-rw-r--r--core/launcher/main.cpp9
-rw-r--r--core/launcher/qcopbridge.cpp7
-rw-r--r--core/launcher/screensaver.cpp2
-rw-r--r--core/launcher/server.cpp4
-rw-r--r--core/launcher/server.pro7
-rw-r--r--core/launcher/startmenu.cpp2
-rw-r--r--core/launcher/transferserver.cpp27
-rw-r--r--core/launcher/wait.cpp2
11 files changed, 45 insertions, 43 deletions
diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp
index 0db99dd..f161e98 100644
--- a/core/launcher/applauncher.cpp
+++ b/core/launcher/applauncher.cpp
@@ -22,17 +22,17 @@
#define QTOPIA_INTERNAL_PRELOADACCESS
#endif
#ifndef QTOPIA_INTERNAL_FILEOPERATIONS
#define QTOPIA_INTERNAL_FILEOPERATIONS
#endif
#ifndef QTOPIA_PROGRAM_MONITOR
#define QTOPIA_PROGRAM_MONITOR
#endif
-#include <qtopia/global.h>
+#include <opie2/oglobal.h>
#ifndef Q_OS_WIN32
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/file.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -56,17 +56,16 @@
#include <qtopia/qcopenvelope_qws.h>
#include <qtopia/applnk.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/config.h>
#include <qtopia/global.h>
#include "applauncher.h"
#include "documentlist.h"
-#include "launcherglobal.h"
const int AppLauncher::RAISE_TIMEOUT_MS = 5000;
//---------------------------------------------------------------------------
static AppLauncher* appLauncherPtr;
const int appStopEventID = 1290;
@@ -399,17 +398,17 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus)
sig += tr("<qt><p>Fast loading has been disabled for this application. Tap and hold the application icon to reenable it.</qt>");
QString str = tr("<qt><b>%1</b> was terminated due to signal code %2</qt>").arg( app->name() ).arg( sig );
QMessageBox::information(0, tr("Application terminated"), str );
} else {
if ( exitStatus == 255 ) { //could not find app (because global returns -1)
QMessageBox::information(0, tr("Application not found"), tr("<qt>Could not locate application <b>%1</b></qt>").arg( app->exec() ) );
} else {
- QFileInfo fi(Opie::Global::tempDir() + "qcop-msg-" + appName);
+ QFileInfo fi(OGlobal::tempDirPath() + "qcop-msg-" + appName);
if ( fi.exists() && fi.size() ) {
emit terminated(sigPid, appName);
qWarning("Re executing obmitted for %s", appName.latin1() );
// execute( appName, QString::null );
return;
}
}
}
@@ -441,18 +440,18 @@ bool AppLauncher::isRunning(const QString &app)
}
}
return FALSE;
}
bool AppLauncher::executeBuiltin(const QString &c, const QString &document)
{
- Global::Command* builtin = Opie::Global::builtinCommands();
- QGuardedPtr<QWidget> *running = Opie::Global::builtinRunning();
+ Global::Command* builtin = OGlobal::builtinCommands();
+ QGuardedPtr<QWidget> *running = OGlobal::builtinRunning();
// Attempt to execute the app using a builtin class for the app
if (builtin) {
for (int i = 0; builtin[i].file; i++) {
if ( builtin[i].file == c ) {
if ( running[i] ) {
if ( !document.isNull() && builtin[i].documentary )
Global::setDocument(running[i], document);
@@ -492,17 +491,17 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais
list.append( docParam );
QString appName = list[0];
if ( isRunning(appName) ) {
QCString channel = "QPE/Application/";
channel += appName.latin1();
// Need to lock it to avoid race conditions with QPEApplication::processQCopFile
- QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName);
+ QFile f(OGlobal::tempDirPath() + "qcop-msg-" + appName);
if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) {
#ifndef Q_OS_WIN32
flock(f.handle(), LOCK_EX);
#endif
QDataStream ds(&f);
QByteArray b;
QDataStream bstream(b, IO_WriteOnly);
diff --git a/core/launcher/config.in b/core/launcher/config.in
index 2d9c1c2..db39210 100644
--- a/core/launcher/config.in
+++ b/core/launcher/config.in
@@ -1,16 +1,16 @@
config LAUNCHER
boolean "opie-taskbar (program launcher qpe for Opie)"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI
if LAUNCHER
config PRELOAD
boolean
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && LAUNCHER
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && LAUNCHER
config LAUNCHER_CORE
boolean
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && LAUNCHER && PRELOAD
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && LAUNCHER && PRELOAD
endif
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index ece6931..440bf1e 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -14,22 +14,22 @@
** 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 "documentlist.h"
#include "serverinterface.h"
-#include "launcherglobal.h"
+
+#include <opie2/oglobal.h>
#include <qtopia/config.h>
#include <qtopia/mimetype.h>
#include <qtopia/resource.h>
-#include <qtopia/global.h>
#include <qtopia/private/categories.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/applnk.h>
#include <qtopia/storage.h>
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
@@ -85,17 +85,20 @@ public:
bool needToSendAllDocLinks;
bool sendAppLnks;
bool sendDocLnks;
bool scanDocs;
};
-DocumentList::DocumentList( ServerInterface *serverGui, bool scanDocs,
+/*
+ * scandocs will be read from Config
+ */
+DocumentList::DocumentList( ServerInterface *serverGui, bool /*scanDocs*/,
QObject *parent, const char *name )
: QObject( parent, name )
{
appLnkSet = new AppLnkSet( MimeType::appsFolderName() );
d = new DocumentListPrivate( serverGui );
d->needToSendAllDocLinks = false;
Config cfg( "Launcher" );
@@ -264,17 +267,17 @@ void DocumentList::reloadDocLnks()
rescan();
}
void DocumentList::linkChanged( QString arg )
{
//qDebug( "linkchanged( %s )", arg.latin1() );
- if ( arg.isNull() || Opie::Global::isAppLnkFileName( arg ) ) {
+ if ( arg.isNull() || OGlobal::isAppLnkFileName( arg ) ) {
reloadAppLnks();
} else {
const QList<DocLnk> &list = d->dls.children();
QListIterator<DocLnk> it( list );
while ( it.current() ) {
DocLnk *doc = it.current();
++it;
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 988e432..bf06e75 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -22,23 +22,24 @@
#define QTOPIA_INTERNAL_FILEOPERATIONS
#endif
#include "server.h"
#include "serverapp.h"
#include "taskbar.h"
#include "stabmon.h"
#include "launcher.h"
#include "firstuse.h"
-#include "launcherglobal.h"
+
+#include <opie2/oglobal.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/network.h>
#include <qtopia/config.h>
//#include <qtopia/custom.h>
-#include <qtopia/global.h>
+
#include <qfile.h>
#include <qdir.h>
#ifdef QWS
#include <qwindowsystem_qws.h>
#include <qtopia/qcopenvelope_qws.h>
#endif
#include <qtopia/alarmserver.h>
@@ -59,24 +60,24 @@
#include "../login/qdmdialogimpl.h"
#endif
#ifdef Q_WS_QWS
#include <qkeyboard_qws.h>
#endif
#include <qmessagebox.h>
-#include <opie/odevice.h>
+#include <opie2/odevice.h>
using namespace Opie;
static void cleanup()
{
- QDir dir( Opie::Global::tempDir(), "qcop-msg-*" );
+ QDir dir( OGlobal::tempDirPath(), "qcop-msg-*" );
QStringList stale = dir.entryList();
QStringList::Iterator it;
for ( it = stale.begin(); it != stale.end(); ++it ) {
dir.remove( *it );
}
}
diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp
index 9cb56ce..b45f0cc 100644
--- a/core/launcher/qcopbridge.cpp
+++ b/core/launcher/qcopbridge.cpp
@@ -16,21 +16,23 @@
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "qcopbridge.h"
#include "transferserver.h"
+#include <opie2/oglobal.h>
+
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
#include <qtopia/qpeapplication.h>
-#include <qtopia/global.h>
+
#include <qtopia/version.h>
#include <qtopia/config.h>
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qdatastream.h>
#include <qcstring.h>
@@ -50,17 +52,16 @@
#include <unistd.h>
#include <sys/types.h>
#endif
#if defined(_OS_LINUX_)
#include <shadow.h>
#endif
-#include "launcherglobal.h"
//#define INSECURE
const int block_size = 51200;
QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent,
const char* name )
: QServerSocket( port, 1, parent, name ),
@@ -320,17 +321,17 @@ void QCopBridgePI::sendDesktopMessage( const QCString &msg, const QByteArray& da
{
if ( !isOpen() ) // eg. Forbidden
return;
const char hdr[]="CALLB QPE/Desktop ";
writeBlock(hdr,sizeof(hdr)-1);
writeBlock(msg,msg.length());
writeBlock(" ",1);
- QByteArray b64 = Opie::Global::encodeBase64(data);
+ QByteArray b64 = OGlobal::encodeBase64(data);
writeBlock(b64.data(),b64.size());
writeBlock("\r\n",2);
}
void QCopBridgePI::send( const QString& msg )
{
diff --git a/core/launcher/screensaver.cpp b/core/launcher/screensaver.cpp
index 48770e8..1146dcd 100644
--- a/core/launcher/screensaver.cpp
+++ b/core/launcher/screensaver.cpp
@@ -1,16 +1,16 @@
#include "screensaver.h"
#include <qpe/config.h>
#include <qpe/power.h>
#include <qpe/network.h>
-#include <opie/odevice.h>
+#include <opie2/odevice.h>
using namespace Opie;
OpieScreenSaver::OpieScreenSaver ( )
: QObject ( 0, "screensaver" ), QWSScreenSaver ( )
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp
index b9580c7..32fcdd0 100644
--- a/core/launcher/server.cpp
+++ b/core/launcher/server.cpp
@@ -46,18 +46,18 @@
#include <qtopia/storage.h>
#include <qtopia/qcopenvelope_qws.h>
#include <qwindowsystem_qws.h>
#include <qgfx_qws.h>
#include <qtopia/global.h>
//#include <qtopia/custom.h>
-#include <opie/odevicebutton.h>
-#include <opie/odevice.h>
+#include <opie2/odevicebutton.h>
+#include <opie2/odevice.h>
#include <unistd.h>
#include <qmainwindow.h>
#include <qmessagebox.h>
#include <qtimer.h>
#include <qtextstream.h>
#include <stdlib.h>
diff --git a/core/launcher/server.pro b/core/launcher/server.pro
index 0513536..f82c741 100644
--- a/core/launcher/server.pro
+++ b/core/launcher/server.pro
@@ -41,17 +41,16 @@ HEADERS += server.h \
$$(OPIEDIR)/rsync/trace.h \
$$(OPIEDIR)/rsync/types.h \
$$(OPIEDIR)/rsync/util.h \
$$(OPIEDIR)/rsync/whole.h \
$$(OPIEDIR)/rsync/config_rsync.h \
$$(OPIEDIR)/rsync/qrsync.h \
syncdialog.h \
serverapp.h \
- launcherglobal.h \
qprocess.h \
screensaver.h
SOURCES += server.cpp \
serverinterface.cpp \
launchertab.cpp \
documentlist.cpp \
appicons.cpp \
@@ -96,30 +95,30 @@ SOURCES += server.cpp \
$$(OPIEDIR)/rsync/trace.c \
$$(OPIEDIR)/rsync/tube.c \
$$(OPIEDIR)/rsync/util.c \
$$(OPIEDIR)/rsync/version.c \
$$(OPIEDIR)/rsync/whole.c \
$$(OPIEDIR)/rsync/qrsync.cpp \
syncdialog.cpp \
serverapp.cpp \
- launcherglobal.cpp \
qprocess.cpp \
qprocess_unix.cpp \
screensaver.cpp
INCLUDEPATH += $(OPIEDIR)/core/apps/calibrate
DEPENDPATH += $(OPIEDIR)/core/apps/calibrate
INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/rsync
DEPENDPATH += $(OPIEDIR)/rsync
TARGET = qpe
+#needs OWait and ODevice
CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX )
contains( CONFTEST, y ){
- LIBS += -lqpe -lopie
+ LIBS += -lqpe -lopiecore2 -lopieui2
}else{
- LIBS += -lcrypt -lqpe -lopie
+ LIBS += -lcrypt -lqpe -lopiecore2 -lopieui2
}
include ( $(OPIEDIR)/include.pro )
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp
index b84eed8..c199063 100644
--- a/core/launcher/startmenu.cpp
+++ b/core/launcher/startmenu.cpp
@@ -349,17 +349,16 @@ void StartMenu::loadApplets()
}
}
cfg.writeEntry( "ExcludeApplets", exclude, ',' );
qsort(xapplets, napplets, sizeof(menuApplets[0]), compareAppletPositions);
while ( napplets-- ) {
MenuApplet *applet = xapplets[napplets];
-
applet->popup = applet->iface->popup( this );
// menuApplets got an id < -1
menuApplets.insert( -( currentItem + 2 ), new MenuApplet( *applet ) );
currentItem++;
}
delete [] xapplets;
@@ -379,16 +378,17 @@ void StartMenu::addApplets(QPopupMenu* pop) {
MenuApplet *applet = it.current();
if ( applet->popup )
applet->id = pop->insertItem( applet->iface->icon(),
applet->iface->text(), applet->popup );
else
applet->id = pop->insertItem( applet->iface->icon(),
applet->iface->text() );
+
dict.insert( applet->id, new MenuApplet( *applet ) );
}
/* need to update the key */
menuApplets.setAutoDelete( true );
menuApplets.clear();
menuApplets.setAutoDelete( false );
menuApplets = dict;
}
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index 9519d11..9cb9d7a 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -14,30 +14,30 @@
** 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.
**
**********************************************************************/
//#define _XOPEN_SOURCE
-#include <qtopia/global.h>
+#include <opie2/oglobal.h>
#include <qtopia/qpeapplication.h>
#ifndef Q_OS_WIN32
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#ifndef Q_OS_MACX
#include <shadow.h>
#include <crypt.h>
-#endif /* Q_OS_MACX */
+#endif /* Q_OS_MACX */
#else
#include <stdlib.h>
#include <time.h>
#endif
#if defined(_OS_LINUX_)
@@ -58,17 +58,16 @@
#include <qtopia/config.h>
#include <qtopia/private/contact.h>
#include <qtopia/quuid.h>
#include <qtopia/version.h>
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
-#include "launcherglobal.h"
#include "transferserver.h"
#include <qtopia/qprocess.h>
const int block_size = 51200;
TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
const char* name)
@@ -109,17 +108,17 @@ void TransferServer::newConnection( int socket )
QString SyncAuthentication::serverId()
{
Config cfg("Security");
cfg.setGroup("Sync");
QString r = cfg.readEntry("serverid");
if ( r.isEmpty() ) {
- r = Opie::Global::uuid();
+ r = OGlobal::generateUuid();
cfg.writeEntry("serverid", r );
}
return r;
}
QString SyncAuthentication::ownerName()
{
QString vfilename = Global::applicationFileName("addressbook",
@@ -188,53 +187,53 @@ bool SyncAuthentication::checkPassword( const QString& password )
QString cpassword = QString::fromLocal8Bit( crypt( password.local8Bit(), cpwd.local8Bit() ) );
if ( cpwd == cpassword )
return TRUE;
#endif
static int lastdenial=0;
static int denials=0;
int now = time(0);
-
+
Config cfg("Security");
- cfg.setGroup("Sync");
+ cfg.setGroup("Sync");
QString syncapp = cfg.readEntry("syncapp","Qtopia");
-
+
//No password needed if the user really wants it
if (syncapp == "IntelliSync") {
return TRUE;
- }
-
+ }
+
// Detect old Qtopia Desktop (no password)
- if ( password.isEmpty() ) {
+ if ( password.isEmpty() ) {
if ( denials < 3 || now > lastdenial+600 ) {
QMessageBox unauth(
tr("Sync Connection"),
tr("<p>An unauthorized system is requesting access to this device."
"<p>If you are using a version of Qtopia Desktop older than 1.5.1, "
"please upgrade or change the security setting to use IntelliSync." ),
QMessageBox::Warning,
QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton,
0, QString::null, TRUE, WStyle_StaysOnTop);
unauth.setButtonText(QMessageBox::Cancel, tr("Deny"));
unauth.exec();
denials++;
lastdenial=now;
- }
+ }
return FALSE;
-
- }
+
+ }
// Second, check sync password...
static int lock=0;
if ( lock ) return FALSE;
- ++lock;
+ ++lock;
/*
* we need to support old Sync software and QtopiaDesktop
*/
if ( password.left(6) == "Qtopia" || password.left(6) == "rootme" ) {
Config cfg( "Security" );
cfg.setGroup("Sync");
QStringList pwds = cfg.readListEntry("Passwords",' ');
diff --git a/core/launcher/wait.cpp b/core/launcher/wait.cpp
index ab53a07..34ffd1a 100644
--- a/core/launcher/wait.cpp
+++ b/core/launcher/wait.cpp
@@ -18,17 +18,17 @@
**
**********************************************************************/
#include "wait.h"
#include <qtopia/resource.h>
#include <qtopia/config.h>
-#include <opie/owait.h>
+#include <opie2/owait.h>
#include <qwidget.h>
#include <qpixmap.h>
#include <qpainter.h>
Wait *lastWaitObject = NULL;