-rw-r--r-- | core/launcher/desktop.cpp | 3 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 693e77f..974de0c 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -1,89 +1,92 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
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 "desktop.h" | 21 | #include "desktop.h" |
22 | #include "info.h" | 22 | #include "info.h" |
23 | #include "launcher.h" | 23 | #include "launcher.h" |
24 | #include "mrulist.h" | 24 | #include "mrulist.h" |
25 | #include "qcopbridge.h" | 25 | #include "qcopbridge.h" |
26 | #include "shutdownimpl.h" | 26 | #include "shutdownimpl.h" |
27 | #include "startmenu.h" | 27 | #include "startmenu.h" |
28 | #include "taskbar.h" | 28 | #include "taskbar.h" |
29 | #include "transferserver.h" | 29 | #include "transferserver.h" |
30 | #include "irserver.h" | 30 | #include "irserver.h" |
31 | #include "packageslave.h" | 31 | #include "packageslave.h" |
32 | 32 | ||
33 | #include <qpe/applnk.h> | 33 | #include <qpe/applnk.h> |
34 | #include <qpe/mimetype.h> | 34 | #include <qpe/mimetype.h> |
35 | #include <qpe/password.h> | 35 | #include <qpe/password.h> |
36 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
37 | #include <qpe/power.h> | 37 | #include <qpe/power.h> |
38 | #include <qpe/timeconversion.h> | 38 | #include <qpe/timeconversion.h> |
39 | #include <qpe/qcopenvelope_qws.h> | 39 | #include <qpe/qcopenvelope_qws.h> |
40 | #include <qpe/global.h> | 40 | #include <qpe/global.h> |
41 | |||
42 | #ifdef QT_QWS_CUSTOM | ||
41 | #include <qpe/custom.h> | 43 | #include <qpe/custom.h> |
44 | #endif | ||
42 | 45 | ||
43 | #include <qgfx_qws.h> | 46 | #include <qgfx_qws.h> |
44 | #include <qmainwindow.h> | 47 | #include <qmainwindow.h> |
45 | #include <qmessagebox.h> | 48 | #include <qmessagebox.h> |
46 | #include <qtimer.h> | 49 | #include <qtimer.h> |
47 | #include <qwindowsystem_qws.h> | 50 | #include <qwindowsystem_qws.h> |
48 | 51 | ||
49 | #include <qvaluelist.h> | 52 | #include <qvaluelist.h> |
50 | 53 | ||
51 | #include <stdlib.h> | 54 | #include <stdlib.h> |
52 | #include <unistd.h> | 55 | #include <unistd.h> |
53 | 56 | ||
54 | class QCopKeyRegister | 57 | class QCopKeyRegister |
55 | { | 58 | { |
56 | public: | 59 | public: |
57 | QCopKeyRegister() : keyCode(0) { } | 60 | QCopKeyRegister() : keyCode(0) { } |
58 | QCopKeyRegister(int k, const QString &c, const QString &m) | 61 | QCopKeyRegister(int k, const QString &c, const QString &m) |
59 | : keyCode(k), channel(c), message(m) { } | 62 | : keyCode(k), channel(c), message(m) { } |
60 | 63 | ||
61 | int getKeyCode() const { return keyCode; } | 64 | int getKeyCode() const { return keyCode; } |
62 | QString getChannel() const { return channel; } | 65 | QString getChannel() const { return channel; } |
63 | QString getMessage() const { return message; } | 66 | QString getMessage() const { return message; } |
64 | 67 | ||
65 | private: | 68 | private: |
66 | int keyCode; | 69 | int keyCode; |
67 | QString channel, message; | 70 | QString channel, message; |
68 | }; | 71 | }; |
69 | 72 | ||
70 | typedef QValueList<QCopKeyRegister> KeyRegisterList; | 73 | typedef QValueList<QCopKeyRegister> KeyRegisterList; |
71 | KeyRegisterList keyRegisterList; | 74 | KeyRegisterList keyRegisterList; |
72 | 75 | ||
73 | static Desktop* qpedesktop = 0; | 76 | static Desktop* qpedesktop = 0; |
74 | static int loggedin=0; | 77 | static int loggedin=0; |
75 | static void login(bool at_poweron) | 78 | static void login(bool at_poweron) |
76 | { | 79 | { |
77 | if ( !loggedin ) { | 80 | if ( !loggedin ) { |
78 | Global::terminateBuiltin("calibrate"); | 81 | Global::terminateBuiltin("calibrate"); |
79 | Password::authenticate(at_poweron); | 82 | Password::authenticate(at_poweron); |
80 | loggedin=1; | 83 | loggedin=1; |
81 | QCopEnvelope e( "QPE/Desktop", "unlocked()" ); | 84 | QCopEnvelope e( "QPE/Desktop", "unlocked()" ); |
82 | } | 85 | } |
83 | } | 86 | } |
84 | 87 | ||
85 | bool Desktop::screenLocked() | 88 | bool Desktop::screenLocked() |
86 | { | 89 | { |
87 | return loggedin == 0; | 90 | return loggedin == 0; |
88 | } | 91 | } |
89 | 92 | ||
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index b69d165..bff2a1c 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp | |||
@@ -1,85 +1,85 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
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 "startmenu.h" | 21 | #include "startmenu.h" |
22 | #include "inputmethods.h" | 22 | #include "inputmethods.h" |
23 | #include "mrulist.h" | 23 | #include "mrulist.h" |
24 | #include "systray.h" | 24 | #include "systray.h" |
25 | #include "calibrate.h" | 25 | #include "calibrate.h" |
26 | #include "wait.h" | 26 | #include "wait.h" |
27 | #include "appicons.h" | 27 | #include "appicons.h" |
28 | 28 | ||
29 | #include "taskbar.h" | 29 | #include "taskbar.h" |
30 | #include "desktop.h" | 30 | #include "desktop.h" |
31 | 31 | ||
32 | #include <qpe/qpeapplication.h> | 32 | #include <qpe/qpeapplication.h> |
33 | #include <qpe/qcopenvelope_qws.h> | 33 | #include <qpe/qcopenvelope_qws.h> |
34 | #include <qpe/global.h> | 34 | #include <qpe/global.h> |
35 | //#ifdef QT_QWS_CUSTOM | 35 | #ifdef QT_QWS_CUSTOM |
36 | //#include <qpe/custom.h> | 36 | #include <qpe/custom.h> |
37 | //#endif | 37 | #endif |
38 | #if defined(QT_QWS_IPAQ) | 38 | #if defined(QT_QWS_IPAQ) |
39 | #include "qpe/custom-ipaq.h" | 39 | #include "qpe/custom-ipaq.h" |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | 42 | ||
43 | #include <qlabel.h> | 43 | #include <qlabel.h> |
44 | #include <qlayout.h> | 44 | #include <qlayout.h> |
45 | #include <qtimer.h> | 45 | #include <qtimer.h> |
46 | #include <qwindowsystem_qws.h> | 46 | #include <qwindowsystem_qws.h> |
47 | #include <qwidgetstack.h> | 47 | #include <qwidgetstack.h> |
48 | 48 | ||
49 | #if defined( Q_WS_QWS ) | 49 | #if defined( Q_WS_QWS ) |
50 | #include <qwsdisplay_qws.h> | 50 | #include <qwsdisplay_qws.h> |
51 | #include <qgfx_qws.h> | 51 | #include <qgfx_qws.h> |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | 54 | ||
55 | #define FACTORY(T) \ | 55 | #define FACTORY(T) \ |
56 | static QWidget *new##T( bool maximized ) { \ | 56 | static QWidget *new##T( bool maximized ) { \ |
57 | QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ | 57 | QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ |
58 | if ( maximized ) { \ | 58 | if ( maximized ) { \ |
59 | if ( qApp->desktop()->width() <= 350 ) { \ | 59 | if ( qApp->desktop()->width() <= 350 ) { \ |
60 | w->showMaximized(); \ | 60 | w->showMaximized(); \ |
61 | } else { \ | 61 | } else { \ |
62 | w->resize( QSize( 300, 300 ) ); \ | 62 | w->resize( QSize( 300, 300 ) ); \ |
63 | } \ | 63 | } \ |
64 | } \ | 64 | } \ |
65 | w->show(); \ | 65 | w->show(); \ |
66 | return w; \ | 66 | return w; \ |
67 | } | 67 | } |
68 | 68 | ||
69 | 69 | ||
70 | #ifdef SINGLE_APP | 70 | #ifdef SINGLE_APP |
71 | #define APP(a,b,c,d) FACTORY(b) | 71 | #define APP(a,b,c,d) FACTORY(b) |
72 | #include "../launcher/apps.h" | 72 | #include "../launcher/apps.h" |
73 | #undef APP | 73 | #undef APP |
74 | #endif // SINGLE_APP | 74 | #endif // SINGLE_APP |
75 | 75 | ||
76 | static Global::Command builtins[] = { | 76 | static Global::Command builtins[] = { |
77 | 77 | ||
78 | #ifdef SINGLE_APP | 78 | #ifdef SINGLE_APP |
79 | #define APP(a,b,c,d) { a, new##b, c }, | 79 | #define APP(a,b,c,d) { a, new##b, c }, |
80 | #include "../launcher/apps.h" | 80 | #include "../launcher/apps.h" |
81 | #undef APP | 81 | #undef APP |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX) | 84 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX) |
85 | { "calibrate", TaskBar::calibrate, 1, 0 }, | 85 | { "calibrate", TaskBar::calibrate, 1, 0 }, |