author | zecke <zecke> | 2002-10-17 16:45:38 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-17 16:45:38 (UTC) |
commit | 0655456f68849bfad9019a7760dec961792d7519 (patch) (side-by-side diff) | |
tree | 4651cad54a144385442a26e78f4a83b57501830f | |
parent | 8511273d7122d50ffea27f78ba13ab72af60326d (diff) | |
download | opie-0655456f68849bfad9019a7760dec961792d7519.zip opie-0655456f68849bfad9019a7760dec961792d7519.tar.gz opie-0655456f68849bfad9019a7760dec961792d7519.tar.bz2 |
Move around some #ifdefs to be able to be built with Qt2/X11
-rw-r--r-- | core/launcher/desktop.cpp | 10 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 2 | ||||
-rw-r--r-- | core/launcher/main.cpp | 7 | ||||
-rw-r--r-- | core/launcher/qcopbridge.cpp | 2 | ||||
-rw-r--r-- | core/launcher/runningappbar.cpp | 2 | ||||
-rw-r--r-- | core/launcher/transferserver.cpp | 2 |
6 files changed, 12 insertions, 13 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index d74b745..1fd3f6a 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -151,9 +151,8 @@ void DesktopPowerAlerter::hideEvent( QHideEvent *e ) alertCount = 0; currentPriority = INT_MAX; } - class QPEScreenSaver : public QWSScreenSaver { private: int LcdOn; @@ -324,9 +323,8 @@ private: int m_backlight_bright; bool m_backlight_forcedoff; }; - void DesktopApplication::switchLCD ( bool on ) { if ( qApp ) { DesktopApplication *dapp = (DesktopApplication *) qApp; @@ -641,9 +639,9 @@ Desktop::Desktop() : packageSlave = new PackageSlave( this ); connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); qApp->installEventFilter( this ); - + qApp-> setMainWidget ( launcher ); } void Desktop::show() @@ -708,25 +706,29 @@ void Desktop::checkMemory() } static bool isVisibleWindow( int wid ) { +#ifdef QWS const QList<QWSWindow> &list = qwsServer->clientWindows(); QWSWindow* w; for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { if ( w->winId() == wid ) return !w->isFullyObscured(); } +#endif return FALSE; } static bool hasVisibleWindow( const QString& clientname ) { +#ifdef QWS const QList<QWSWindow> &list = qwsServer->clientWindows(); QWSWindow* w; for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { if ( w->client() ->identity() == clientname && !w->isFullyObscured() ) return TRUE; } +#endif return FALSE; } void Desktop::raiseLauncher() @@ -744,9 +746,9 @@ void Desktop::raiseLauncher() } } void Desktop::home ( ) -{ +{ if ( isVisibleWindow( launcher->winId() ) ) launcher->nextView(); else launcher->raise(); diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 66cc3e6..a5955a4 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -21,11 +21,9 @@ // WARNING: Do *NOT* define this yourself. The SL5xxx from SHARP does NOT // have this class. #define QTOPIA_INTERNAL_FSLP -#ifdef QWS #include <qpe/qcopenvelope_qws.h> -#endif #include <qpe/resource.h> #include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/global.h> diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 073e19a..762a596 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -31,8 +31,9 @@ #include <opie/odevice.h> #include <qfile.h> +#include <qimage.h> #include <qwindowsystem_qws.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/alarmserver.h> @@ -52,9 +53,9 @@ void initEnvironment() Config config("locale"); config.setGroup( "Location" ); QString tz = config.readEntry( "Timezone", getenv("TZ") ); - // if not timezone set, pick New York + // if not timezone set, pick New York if (tz.isNull()) tz = "America/New_York"; setenv( "TZ", tz, 1 ); @@ -128,9 +129,9 @@ static const char *pidfile_path = "/var/run/opie.pid"; void create_pidfile ( ) { FILE *f; - + if (( f = ::fopen ( pidfile_path, "w" ))) { ::fprintf ( f, "%d", getpid ( )); ::fclose ( f ); } @@ -155,9 +156,9 @@ int main( int argc, char ** argv ) ::signal ( SIGINT, handle_sigterm ); ::setsid ( ); ::setpgid ( 0, 0 ); - + ::atexit ( remove_pidfile ); create_pidfile ( ); int retVal = initApplication ( argc, argv ); diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp index 85993ee..6177a7c 100644 --- a/core/launcher/qcopbridge.cpp +++ b/core/launcher/qcopbridge.cpp @@ -20,11 +20,9 @@ #include "qcopbridge.h" #include "transferserver.h" -#ifdef QWS #include <qpe/qcopenvelope_qws.h> -#endif #include <qpe/qpeapplication.h> #include <qpe/version.h> #include <qdir.h> diff --git a/core/launcher/runningappbar.cpp b/core/launcher/runningappbar.cpp index b830d1b..c8f45d5 100644 --- a/core/launcher/runningappbar.cpp +++ b/core/launcher/runningappbar.cpp @@ -43,10 +43,12 @@ RunningAppBar::RunningAppBar(QWidget* parent) setBackgroundMode( PaletteBackground ); m_AppLnkSet = new AppLnkSet( QPEApplication::qpeDir() + "apps" ); +#ifdef QWS connect(qwsServer, SIGNAL(newChannel(const QString&)), this, SLOT(newQcopChannel(const QString&))); connect(qwsServer, SIGNAL(removedChannel(const QString&)), this, SLOT(removedQcopChannel(const QString&))); +#endif QCopChannel* channel = new QCopChannel( "QPE/System", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(received(const QCString&, const QByteArray&)) ); diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index d2f5501..dea140d 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp @@ -55,11 +55,9 @@ extern "C" { #include <qpe/config.h> #include <qpe/contact.h> #include <qpe/quuid.h> #include <qpe/version.h> -#ifdef QWS #include <qpe/qcopenvelope_qws.h> -#endif #include "transferserver.h" #include "qprocess.h" |