-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 | |||
@@ -147,17 +147,16 @@ void DesktopPowerAlerter::alert( const QString &text, int priority ) | |||
147 | 147 | ||
148 | void DesktopPowerAlerter::hideEvent( QHideEvent *e ) | 148 | void DesktopPowerAlerter::hideEvent( QHideEvent *e ) |
149 | { | 149 | { |
150 | QMessageBox::hideEvent( e ); | 150 | QMessageBox::hideEvent( e ); |
151 | alertCount = 0; | 151 | alertCount = 0; |
152 | currentPriority = INT_MAX; | 152 | currentPriority = INT_MAX; |
153 | } | 153 | } |
154 | 154 | ||
155 | |||
156 | class QPEScreenSaver : public QWSScreenSaver | 155 | class QPEScreenSaver : public QWSScreenSaver |
157 | { | 156 | { |
158 | private: | 157 | private: |
159 | int LcdOn; | 158 | int LcdOn; |
160 | 159 | ||
161 | public: | 160 | public: |
162 | QPEScreenSaver() | 161 | QPEScreenSaver() |
163 | { | 162 | { |
@@ -320,17 +319,16 @@ private: | |||
320 | bool m_enable_onlylcdoff; | 319 | bool m_enable_onlylcdoff; |
321 | 320 | ||
322 | bool m_lcd_status; | 321 | bool m_lcd_status; |
323 | 322 | ||
324 | int m_backlight_bright; | 323 | int m_backlight_bright; |
325 | bool m_backlight_forcedoff; | 324 | bool m_backlight_forcedoff; |
326 | }; | 325 | }; |
327 | 326 | ||
328 | |||
329 | void DesktopApplication::switchLCD ( bool on ) | 327 | void DesktopApplication::switchLCD ( bool on ) |
330 | { | 328 | { |
331 | if ( qApp ) { | 329 | if ( qApp ) { |
332 | DesktopApplication *dapp = (DesktopApplication *) qApp; | 330 | DesktopApplication *dapp = (DesktopApplication *) qApp; |
333 | 331 | ||
334 | if ( dapp-> m_screensaver ) { | 332 | if ( dapp-> m_screensaver ) { |
335 | if ( on ) { | 333 | if ( on ) { |
336 | dapp-> m_screensaver-> setDisplayState ( true ); | 334 | dapp-> m_screensaver-> setDisplayState ( true ); |
@@ -637,17 +635,17 @@ Desktop::Desktop() : | |||
637 | startTransferServer(); | 635 | startTransferServer(); |
638 | ( void ) new IrServer( this ); | 636 | ( void ) new IrServer( this ); |
639 | rereadVolumes(); | 637 | rereadVolumes(); |
640 | 638 | ||
641 | packageSlave = new PackageSlave( this ); | 639 | packageSlave = new PackageSlave( this ); |
642 | connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); | 640 | connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); |
643 | 641 | ||
644 | qApp->installEventFilter( this ); | 642 | qApp->installEventFilter( this ); |
645 | 643 | ||
646 | qApp-> setMainWidget ( launcher ); | 644 | qApp-> setMainWidget ( launcher ); |
647 | } | 645 | } |
648 | 646 | ||
649 | void Desktop::show() | 647 | void Desktop::show() |
650 | { | 648 | { |
651 | login( TRUE ); | 649 | login( TRUE ); |
652 | QWidget::show(); | 650 | QWidget::show(); |
653 | } | 651 | } |
@@ -704,33 +702,37 @@ void Desktop::checkMemory() | |||
704 | recoverMemory(); | 702 | recoverMemory(); |
705 | } | 703 | } |
706 | existingMessage = FALSE; | 704 | existingMessage = FALSE; |
707 | #endif | 705 | #endif |
708 | } | 706 | } |
709 | 707 | ||
710 | static bool isVisibleWindow( int wid ) | 708 | static bool isVisibleWindow( int wid ) |
711 | { | 709 | { |
710 | #ifdef QWS | ||
712 | const QList<QWSWindow> &list = qwsServer->clientWindows(); | 711 | const QList<QWSWindow> &list = qwsServer->clientWindows(); |
713 | QWSWindow* w; | 712 | QWSWindow* w; |
714 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { | 713 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { |
715 | if ( w->winId() == wid ) | 714 | if ( w->winId() == wid ) |
716 | return !w->isFullyObscured(); | 715 | return !w->isFullyObscured(); |
717 | } | 716 | } |
717 | #endif | ||
718 | return FALSE; | 718 | return FALSE; |
719 | } | 719 | } |
720 | 720 | ||
721 | static bool hasVisibleWindow( const QString& clientname ) | 721 | static bool hasVisibleWindow( const QString& clientname ) |
722 | { | 722 | { |
723 | #ifdef QWS | ||
723 | const QList<QWSWindow> &list = qwsServer->clientWindows(); | 724 | const QList<QWSWindow> &list = qwsServer->clientWindows(); |
724 | QWSWindow* w; | 725 | QWSWindow* w; |
725 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { | 726 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { |
726 | if ( w->client() ->identity() == clientname && !w->isFullyObscured() ) | 727 | if ( w->client() ->identity() == clientname && !w->isFullyObscured() ) |
727 | return TRUE; | 728 | return TRUE; |
728 | } | 729 | } |
730 | #endif | ||
729 | return FALSE; | 731 | return FALSE; |
730 | } | 732 | } |
731 | 733 | ||
732 | void Desktop::raiseLauncher() | 734 | void Desktop::raiseLauncher() |
733 | { | 735 | { |
734 | Config cfg( "qpe" ); //F12 'Home' | 736 | Config cfg( "qpe" ); //F12 'Home' |
735 | cfg.setGroup( "AppsKey" ); | 737 | cfg.setGroup( "AppsKey" ); |
736 | QString tempItem; | 738 | QString tempItem; |
@@ -740,17 +742,17 @@ void Desktop::raiseLauncher() | |||
740 | } | 742 | } |
741 | else { | 743 | else { |
742 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 744 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
743 | e << tempItem; | 745 | e << tempItem; |
744 | } | 746 | } |
745 | } | 747 | } |
746 | 748 | ||
747 | void Desktop::home ( ) | 749 | void Desktop::home ( ) |
748 | { | 750 | { |
749 | if ( isVisibleWindow( launcher->winId() ) ) | 751 | if ( isVisibleWindow( launcher->winId() ) ) |
750 | launcher->nextView(); | 752 | launcher->nextView(); |
751 | else | 753 | else |
752 | launcher->raise(); | 754 | launcher->raise(); |
753 | } | 755 | } |
754 | 756 | ||
755 | void Desktop::executeOrModify( const QString& appLnkFile ) | 757 | void Desktop::executeOrModify( const QString& appLnkFile ) |
756 | { | 758 | { |
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 | |||
@@ -17,19 +17,17 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | // WARNING: Do *NOT* define this yourself. The SL5xxx from SHARP does NOT | 21 | // WARNING: Do *NOT* define this yourself. The SL5xxx from SHARP does NOT |
22 | // have this class. | 22 | // have this class. |
23 | #define QTOPIA_INTERNAL_FSLP | 23 | #define QTOPIA_INTERNAL_FSLP |
24 | 24 | ||
25 | #ifdef QWS | ||
26 | #include <qpe/qcopenvelope_qws.h> | 25 | #include <qpe/qcopenvelope_qws.h> |
27 | #endif | ||
28 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
29 | #include <qpe/applnk.h> | 27 | #include <qpe/applnk.h> |
30 | #include <qpe/config.h> | 28 | #include <qpe/config.h> |
31 | #include <qpe/global.h> | 29 | #include <qpe/global.h> |
32 | #include <qpe/qpeapplication.h> | 30 | #include <qpe/qpeapplication.h> |
33 | #include <qpe/mimetype.h> | 31 | #include <qpe/mimetype.h> |
34 | #include <qpe/storage.h> | 32 | #include <qpe/storage.h> |
35 | #include <qpe/palmtoprecord.h> | 33 | #include <qpe/palmtoprecord.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 | |||
@@ -27,16 +27,17 @@ | |||
27 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
28 | #if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) | 28 | #if defined( QT_QWS_CUSTOM ) || 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 | 33 | ||
34 | #include <qfile.h> | 34 | #include <qfile.h> |
35 | #include <qimage.h> | ||
35 | #include <qwindowsystem_qws.h> | 36 | #include <qwindowsystem_qws.h> |
36 | #include <qpe/qcopenvelope_qws.h> | 37 | #include <qpe/qcopenvelope_qws.h> |
37 | #include <qpe/alarmserver.h> | 38 | #include <qpe/alarmserver.h> |
38 | 39 | ||
39 | #include <stdlib.h> | 40 | #include <stdlib.h> |
40 | #include <stdio.h> | 41 | #include <stdio.h> |
41 | #include <signal.h> | 42 | #include <signal.h> |
42 | #include <unistd.h> | 43 | #include <unistd.h> |
@@ -48,17 +49,17 @@ | |||
48 | using namespace Opie; | 49 | using namespace Opie; |
49 | 50 | ||
50 | void initEnvironment() | 51 | void initEnvironment() |
51 | { | 52 | { |
52 | Config config("locale"); | 53 | Config config("locale"); |
53 | config.setGroup( "Location" ); | 54 | config.setGroup( "Location" ); |
54 | QString tz = config.readEntry( "Timezone", getenv("TZ") ); | 55 | QString tz = config.readEntry( "Timezone", getenv("TZ") ); |
55 | 56 | ||
56 | // if not timezone set, pick New York | 57 | // if not timezone set, pick New York |
57 | if (tz.isNull()) | 58 | if (tz.isNull()) |
58 | tz = "America/New_York"; | 59 | tz = "America/New_York"; |
59 | 60 | ||
60 | setenv( "TZ", tz, 1 ); | 61 | setenv( "TZ", tz, 1 ); |
61 | config.writeEntry( "Timezone", tz); | 62 | config.writeEntry( "Timezone", tz); |
62 | 63 | ||
63 | config.setGroup( "Language" ); | 64 | config.setGroup( "Language" ); |
64 | QString lang = config.readEntry( "Language", getenv("LANG") ); | 65 | QString lang = config.readEntry( "Language", getenv("LANG") ); |
@@ -124,17 +125,17 @@ int initApplication( int argc, char ** argv ) | |||
124 | return rv; | 125 | return rv; |
125 | } | 126 | } |
126 | 127 | ||
127 | static const char *pidfile_path = "/var/run/opie.pid"; | 128 | static const char *pidfile_path = "/var/run/opie.pid"; |
128 | 129 | ||
129 | void create_pidfile ( ) | 130 | void create_pidfile ( ) |
130 | { | 131 | { |
131 | FILE *f; | 132 | FILE *f; |
132 | 133 | ||
133 | if (( f = ::fopen ( pidfile_path, "w" ))) { | 134 | if (( f = ::fopen ( pidfile_path, "w" ))) { |
134 | ::fprintf ( f, "%d", getpid ( )); | 135 | ::fprintf ( f, "%d", getpid ( )); |
135 | ::fclose ( f ); | 136 | ::fclose ( f ); |
136 | } | 137 | } |
137 | } | 138 | } |
138 | 139 | ||
139 | void remove_pidfile ( ) | 140 | void remove_pidfile ( ) |
140 | { | 141 | { |
@@ -151,17 +152,17 @@ int main( int argc, char ** argv ) | |||
151 | { | 152 | { |
152 | ::signal ( SIGCHLD, SIG_IGN ); | 153 | ::signal ( SIGCHLD, SIG_IGN ); |
153 | 154 | ||
154 | ::signal ( SIGTERM, handle_sigterm ); | 155 | ::signal ( SIGTERM, handle_sigterm ); |
155 | ::signal ( SIGINT, handle_sigterm ); | 156 | ::signal ( SIGINT, handle_sigterm ); |
156 | 157 | ||
157 | ::setsid ( ); | 158 | ::setsid ( ); |
158 | ::setpgid ( 0, 0 ); | 159 | ::setpgid ( 0, 0 ); |
159 | 160 | ||
160 | ::atexit ( remove_pidfile ); | 161 | ::atexit ( remove_pidfile ); |
161 | create_pidfile ( ); | 162 | create_pidfile ( ); |
162 | 163 | ||
163 | int retVal = initApplication ( argc, argv ); | 164 | int retVal = initApplication ( argc, argv ); |
164 | 165 | ||
165 | // Kill them. Kill them all. | 166 | // Kill them. Kill them all. |
166 | ::kill ( 0, SIGTERM ); | 167 | ::kill ( 0, SIGTERM ); |
167 | ::sleep ( 1 ); | 168 | ::sleep ( 1 ); |
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 | |||
@@ -16,19 +16,17 @@ | |||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "qcopbridge.h" | 21 | #include "qcopbridge.h" |
22 | #include "transferserver.h" | 22 | #include "transferserver.h" |
23 | 23 | ||
24 | #ifdef QWS | ||
25 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
26 | #endif | ||
27 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
28 | #include <qpe/version.h> | 26 | #include <qpe/version.h> |
29 | 27 | ||
30 | #include <qdir.h> | 28 | #include <qdir.h> |
31 | #include <qfile.h> | 29 | #include <qfile.h> |
32 | #include <qtextstream.h> | 30 | #include <qtextstream.h> |
33 | #include <qdatastream.h> | 31 | #include <qdatastream.h> |
34 | #include <qstringlist.h> | 32 | #include <qstringlist.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 | |||
@@ -39,18 +39,20 @@ | |||
39 | 39 | ||
40 | RunningAppBar::RunningAppBar(QWidget* parent) | 40 | RunningAppBar::RunningAppBar(QWidget* parent) |
41 | : QFrame(parent), m_AppLnkSet(0L), m_SelectedAppIndex(-1) | 41 | : QFrame(parent), m_AppLnkSet(0L), m_SelectedAppIndex(-1) |
42 | { | 42 | { |
43 | setBackgroundMode( PaletteBackground ); | 43 | setBackgroundMode( PaletteBackground ); |
44 | 44 | ||
45 | m_AppLnkSet = new AppLnkSet( QPEApplication::qpeDir() + "apps" ); | 45 | m_AppLnkSet = new AppLnkSet( QPEApplication::qpeDir() + "apps" ); |
46 | 46 | ||
47 | #ifdef QWS | ||
47 | connect(qwsServer, SIGNAL(newChannel(const QString&)), this, SLOT(newQcopChannel(const QString&))); | 48 | connect(qwsServer, SIGNAL(newChannel(const QString&)), this, SLOT(newQcopChannel(const QString&))); |
48 | connect(qwsServer, SIGNAL(removedChannel(const QString&)), this, SLOT(removedQcopChannel(const QString&))); | 49 | connect(qwsServer, SIGNAL(removedChannel(const QString&)), this, SLOT(removedQcopChannel(const QString&))); |
50 | #endif | ||
49 | QCopChannel* channel = new QCopChannel( "QPE/System", this ); | 51 | QCopChannel* channel = new QCopChannel( "QPE/System", this ); |
50 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 52 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
51 | this, SLOT(received(const QCString&, const QByteArray&)) ); | 53 | this, SLOT(received(const QCString&, const QByteArray&)) ); |
52 | 54 | ||
53 | spacing = AppLnk::smallIconSize()+3; | 55 | spacing = AppLnk::smallIconSize()+3; |
54 | } | 56 | } |
55 | 57 | ||
56 | RunningAppBar::~RunningAppBar() { | 58 | RunningAppBar::~RunningAppBar() { |
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 | |||
@@ -51,19 +51,17 @@ extern "C" { | |||
51 | #include <qregexp.h> | 51 | #include <qregexp.h> |
52 | //#include <qpe/qcopchannel_qws.h> | 52 | //#include <qpe/qcopchannel_qws.h> |
53 | #include <qpe/process.h> | 53 | #include <qpe/process.h> |
54 | #include <qpe/global.h> | 54 | #include <qpe/global.h> |
55 | #include <qpe/config.h> | 55 | #include <qpe/config.h> |
56 | #include <qpe/contact.h> | 56 | #include <qpe/contact.h> |
57 | #include <qpe/quuid.h> | 57 | #include <qpe/quuid.h> |
58 | #include <qpe/version.h> | 58 | #include <qpe/version.h> |
59 | #ifdef QWS | ||
60 | #include <qpe/qcopenvelope_qws.h> | 59 | #include <qpe/qcopenvelope_qws.h> |
61 | #endif | ||
62 | 60 | ||
63 | #include "transferserver.h" | 61 | #include "transferserver.h" |
64 | #include "qprocess.h" | 62 | #include "qprocess.h" |
65 | 63 | ||
66 | const int block_size = 51200; | 64 | const int block_size = 51200; |
67 | 65 | ||
68 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent , | 66 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent , |
69 | const char* name ) | 67 | const char* name ) |