-rw-r--r-- | core/launcher/firstuse.cpp | 2 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 2 | ||||
-rw-r--r-- | core/launcher/main.cpp | 2 | ||||
-rw-r--r-- | core/launcher/server.cpp | 2 | ||||
-rw-r--r-- | core/launcher/serverapp.cpp | 2 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp index 3f769ae..57469cf 100644 --- a/core/launcher/firstuse.cpp +++ b/core/launcher/firstuse.cpp | |||
@@ -1,96 +1,96 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the 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 | // I need access to some things you don't normally get access to. | 21 | // I need access to some things you don't normally get access to. |
22 | 22 | ||
23 | #ifndef _MSC_VER | 23 | #ifndef _MSC_VER |
24 | //### revise to allow removal of translators under MSVC | 24 | //### revise to allow removal of translators under MSVC |
25 | #define private public | 25 | #define private public |
26 | #define protected public | 26 | #define protected public |
27 | #endif | 27 | #endif |
28 | #include "firstuse.h" | 28 | #include "firstuse.h" |
29 | #include "inputmethods.h" | 29 | #include "inputmethods.h" |
30 | #include "applauncher.h" | 30 | #include "applauncher.h" |
31 | #include "serverapp.h" | 31 | #include "serverapp.h" |
32 | #include <qtopia/custom.h> | 32 | //#include <qtopia/custom.h> |
33 | 33 | ||
34 | #include "calibrate.h" | 34 | #include "calibrate.h" |
35 | #include "documentlist.h" | 35 | #include "documentlist.h" |
36 | 36 | ||
37 | #include <qtopia/resource.h> | 37 | #include <qtopia/resource.h> |
38 | #include <qtopia/qcopenvelope_qws.h> | 38 | #include <qtopia/qcopenvelope_qws.h> |
39 | #include <qtopia/qpeapplication.h> | 39 | #include <qtopia/qpeapplication.h> |
40 | #include <qtopia/config.h> | 40 | #include <qtopia/config.h> |
41 | #include <qtopia/applnk.h> | 41 | #include <qtopia/applnk.h> |
42 | #include <qtopia/mimetype.h> | 42 | #include <qtopia/mimetype.h> |
43 | #include <qtopia/fontmanager.h> | 43 | #include <qtopia/fontmanager.h> |
44 | 44 | ||
45 | #include <qapplication.h> | 45 | #include <qapplication.h> |
46 | #include <qfile.h> | 46 | #include <qfile.h> |
47 | #include <qpainter.h> | 47 | #include <qpainter.h> |
48 | #include <qcstring.h> | 48 | #include <qcstring.h> |
49 | #include <qsimplerichtext.h> | 49 | #include <qsimplerichtext.h> |
50 | #include <qcolor.h> | 50 | #include <qcolor.h> |
51 | #include <qpushbutton.h> | 51 | #include <qpushbutton.h> |
52 | #include <qhbox.h> | 52 | #include <qhbox.h> |
53 | #include <qlabel.h> | 53 | #include <qlabel.h> |
54 | #include <qtimer.h> | 54 | #include <qtimer.h> |
55 | 55 | ||
56 | #if defined( Q_WS_QWS ) | 56 | #if defined( Q_WS_QWS ) |
57 | #include <qwsdisplay_qws.h> | 57 | #include <qwsdisplay_qws.h> |
58 | #include <qgfx_qws.h> | 58 | #include <qgfx_qws.h> |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | #include <qwindowsystem_qws.h> | 61 | #include <qwindowsystem_qws.h> |
62 | 62 | ||
63 | #include <stdlib.h> | 63 | #include <stdlib.h> |
64 | #include <sys/types.h> | 64 | #include <sys/types.h> |
65 | #if defined(Q_OS_LINUX) || defined(_OS_LINUX_) | 65 | #if defined(Q_OS_LINUX) || defined(_OS_LINUX_) |
66 | #include <unistd.h> | 66 | #include <unistd.h> |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | 69 | ||
70 | struct { | 70 | struct { |
71 | bool enabled; | 71 | bool enabled; |
72 | const char *app; | 72 | const char *app; |
73 | const char *start; | 73 | const char *start; |
74 | const char *stop; | 74 | const char *stop; |
75 | const char *desc; | 75 | const char *desc; |
76 | } | 76 | } |
77 | settingsTable [] = | 77 | settingsTable [] = |
78 | { | 78 | { |
79 | { FALSE, "language", "raise()", "accept()", // No tr | 79 | { FALSE, "language", "raise()", "accept()", // No tr |
80 | QT_TR_NOOP("Language") }, | 80 | QT_TR_NOOP("Language") }, |
81 | #ifndef Q_OS_WIN32 | 81 | #ifndef Q_OS_WIN32 |
82 | { FALSE, "systemtime", "raise()", "accept()", // No tr | 82 | { FALSE, "systemtime", "raise()", "accept()", // No tr |
83 | QT_TR_NOOP("Time and Date") }, | 83 | QT_TR_NOOP("Time and Date") }, |
84 | #endif | 84 | #endif |
85 | { FALSE, "addressbook", "editPersonalAndClose()", "accept()", // No tr | 85 | { FALSE, "addressbook", "editPersonalAndClose()", "accept()", // No tr |
86 | QT_TR_NOOP("Personal Information") }, | 86 | QT_TR_NOOP("Personal Information") }, |
87 | { FALSE, 0, 0, 0, 0 } | 87 | { FALSE, 0, 0, 0, 0 } |
88 | }; | 88 | }; |
89 | 89 | ||
90 | 90 | ||
91 | FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : | 91 | FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : |
92 | QDialog( parent, name, TRUE, wf), | 92 | QDialog( parent, name, TRUE, wf), |
93 | transApp(0), transLib(0), needCalibrate(FALSE), currApp(-1), | 93 | transApp(0), transLib(0), needCalibrate(FALSE), currApp(-1), |
94 | waitForExit(-1), waitingForLaunch(FALSE), needRestart(FALSE) | 94 | waitForExit(-1), waitingForLaunch(FALSE), needRestart(FALSE) |
95 | { | 95 | { |
96 | ServerApplication::allowRestart = FALSE; | 96 | ServerApplication::allowRestart = FALSE; |
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 35d404a..d697c43 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -1,96 +1,96 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the 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 <qtopia/global.h> | 21 | #include <qtopia/global.h> |
22 | #ifdef Q_WS_QWS | 22 | #ifdef Q_WS_QWS |
23 | #include <qtopia/qcopenvelope_qws.h> | 23 | #include <qtopia/qcopenvelope_qws.h> |
24 | #endif | 24 | #endif |
25 | #include <qtopia/resource.h> | 25 | #include <qtopia/resource.h> |
26 | #include <qtopia/applnk.h> | 26 | #include <qtopia/applnk.h> |
27 | #include <qtopia/config.h> | 27 | #include <qtopia/config.h> |
28 | #include <qtopia/global.h> | 28 | #include <qtopia/global.h> |
29 | #include <qtopia/qpeapplication.h> | 29 | #include <qtopia/qpeapplication.h> |
30 | #include <qtopia/mimetype.h> | 30 | #include <qtopia/mimetype.h> |
31 | #include <qtopia/private/categories.h> | 31 | #include <qtopia/private/categories.h> |
32 | #include <qtopia/custom.h> | 32 | //#include <qtopia/custom.h> |
33 | 33 | ||
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #ifdef Q_WS_QWS | 35 | #ifdef Q_WS_QWS |
36 | #include <qwindowsystem_qws.h> | 36 | #include <qwindowsystem_qws.h> |
37 | #endif | 37 | #endif |
38 | #include <qtimer.h> | 38 | #include <qtimer.h> |
39 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
40 | #include <qvbox.h> | 40 | #include <qvbox.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qstyle.h> | 42 | #include <qstyle.h> |
43 | #include <qpushbutton.h> | 43 | #include <qpushbutton.h> |
44 | #include <qtabbar.h> | 44 | #include <qtabbar.h> |
45 | #include <qwidgetstack.h> | 45 | #include <qwidgetstack.h> |
46 | #include <qlayout.h> | 46 | #include <qlayout.h> |
47 | #include <qregexp.h> | 47 | #include <qregexp.h> |
48 | #include <qmessagebox.h> | 48 | #include <qmessagebox.h> |
49 | #include <qframe.h> | 49 | #include <qframe.h> |
50 | #include <qpainter.h> | 50 | #include <qpainter.h> |
51 | #include <qlabel.h> | 51 | #include <qlabel.h> |
52 | #include <qtextstream.h> | 52 | #include <qtextstream.h> |
53 | #include <qpopupmenu.h> | 53 | #include <qpopupmenu.h> |
54 | 54 | ||
55 | #include "startmenu.h" | 55 | #include "startmenu.h" |
56 | #include "taskbar.h" | 56 | #include "taskbar.h" |
57 | 57 | ||
58 | #include "serverinterface.h" | 58 | #include "serverinterface.h" |
59 | #include "launcherview.h" | 59 | #include "launcherview.h" |
60 | #include "launcher.h" | 60 | #include "launcher.h" |
61 | #include "server.h" | 61 | #include "server.h" |
62 | 62 | ||
63 | #define QTOPIA_INTERNAL_FSLP | 63 | #define QTOPIA_INTERNAL_FSLP |
64 | #include <qtopia/lnkproperties.h> | 64 | #include <qtopia/lnkproperties.h> |
65 | #include <stdlib.h> | 65 | #include <stdlib.h> |
66 | #include <assert.h> | 66 | #include <assert.h> |
67 | 67 | ||
68 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 68 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
69 | #include <unistd.h> | 69 | #include <unistd.h> |
70 | #include <stdio.h> | 70 | #include <stdio.h> |
71 | #include <sys/vfs.h> | 71 | #include <sys/vfs.h> |
72 | #include <mntent.h> | 72 | #include <mntent.h> |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #ifdef Q_WS_QWS | 75 | #ifdef Q_WS_QWS |
76 | #include <qkeyboard_qws.h> | 76 | #include <qkeyboard_qws.h> |
77 | #include <qpe/lnkproperties.h> | 77 | #include <qpe/lnkproperties.h> |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | 80 | ||
81 | static bool isVisibleWindow( int ); | 81 | static bool isVisibleWindow( int ); |
82 | //=========================================================================== | 82 | //=========================================================================== |
83 | 83 | ||
84 | LauncherTabWidget::LauncherTabWidget( Launcher* parent ) : | 84 | LauncherTabWidget::LauncherTabWidget( Launcher* parent ) : |
85 | QVBox( parent ) | 85 | QVBox( parent ) |
86 | { | 86 | { |
87 | docLoadingWidgetEnabled = false; | 87 | docLoadingWidgetEnabled = false; |
88 | docLoadingWidget = 0; | 88 | docLoadingWidget = 0; |
89 | docLoadingWidgetProgress = 0; | 89 | docLoadingWidgetProgress = 0; |
90 | launcher = parent; | 90 | launcher = parent; |
91 | categoryBar = new LauncherTabBar( this ); | 91 | categoryBar = new LauncherTabBar( this ); |
92 | QPalette pal = categoryBar->palette(); | 92 | QPalette pal = categoryBar->palette(); |
93 | pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) ); | 93 | pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) ); |
94 | pal.setColor( QColorGroup::Background, pal.active().background().light(110) ); | 94 | pal.setColor( QColorGroup::Background, pal.active().background().light(110) ); |
95 | categoryBar->setPalette( pal ); | 95 | categoryBar->setPalette( pal ); |
96 | stack = new QWidgetStack(this); | 96 | stack = new QWidgetStack(this); |
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 5416d33..988e432 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp | |||
@@ -1,99 +1,99 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the 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 | #ifndef QTOPIA_INTERNAL_FILEOPERATIONS | 21 | #ifndef QTOPIA_INTERNAL_FILEOPERATIONS |
22 | #define QTOPIA_INTERNAL_FILEOPERATIONS | 22 | #define QTOPIA_INTERNAL_FILEOPERATIONS |
23 | #endif | 23 | #endif |
24 | #include "server.h" | 24 | #include "server.h" |
25 | #include "serverapp.h" | 25 | #include "serverapp.h" |
26 | #include "taskbar.h" | 26 | #include "taskbar.h" |
27 | #include "stabmon.h" | 27 | #include "stabmon.h" |
28 | #include "launcher.h" | 28 | #include "launcher.h" |
29 | #include "firstuse.h" | 29 | #include "firstuse.h" |
30 | #include "launcherglobal.h" | 30 | #include "launcherglobal.h" |
31 | 31 | ||
32 | #include <qtopia/qpeapplication.h> | 32 | #include <qtopia/qpeapplication.h> |
33 | #include <qtopia/network.h> | 33 | #include <qtopia/network.h> |
34 | #include <qtopia/config.h> | 34 | #include <qtopia/config.h> |
35 | #include <qtopia/custom.h> | 35 | //#include <qtopia/custom.h> |
36 | #include <qtopia/global.h> | 36 | #include <qtopia/global.h> |
37 | 37 | ||
38 | #include <qfile.h> | 38 | #include <qfile.h> |
39 | #include <qdir.h> | 39 | #include <qdir.h> |
40 | #ifdef QWS | 40 | #ifdef QWS |
41 | #include <qwindowsystem_qws.h> | 41 | #include <qwindowsystem_qws.h> |
42 | #include <qtopia/qcopenvelope_qws.h> | 42 | #include <qtopia/qcopenvelope_qws.h> |
43 | #endif | 43 | #endif |
44 | #include <qtopia/alarmserver.h> | 44 | #include <qtopia/alarmserver.h> |
45 | 45 | ||
46 | #include <stdlib.h> | 46 | #include <stdlib.h> |
47 | #include <stdio.h> | 47 | #include <stdio.h> |
48 | #include <signal.h> | 48 | #include <signal.h> |
49 | #ifndef Q_OS_WIN32 | 49 | #ifndef Q_OS_WIN32 |
50 | #include <unistd.h> | 50 | #include <unistd.h> |
51 | #else | 51 | #else |
52 | #include <process.h> | 52 | #include <process.h> |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #include "calibrate.h" | 55 | #include "calibrate.h" |
56 | 56 | ||
57 | 57 | ||
58 | #ifdef QT_QWS_LOGIN | 58 | #ifdef QT_QWS_LOGIN |
59 | #include "../login/qdmdialogimpl.h" | 59 | #include "../login/qdmdialogimpl.h" |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #ifdef Q_WS_QWS | 62 | #ifdef Q_WS_QWS |
63 | #include <qkeyboard_qws.h> | 63 | #include <qkeyboard_qws.h> |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <qmessagebox.h> | 66 | #include <qmessagebox.h> |
67 | #include <opie/odevice.h> | 67 | #include <opie/odevice.h> |
68 | 68 | ||
69 | using namespace Opie; | 69 | using namespace Opie; |
70 | 70 | ||
71 | 71 | ||
72 | static void cleanup() | 72 | static void cleanup() |
73 | { | 73 | { |
74 | QDir dir( Opie::Global::tempDir(), "qcop-msg-*" ); | 74 | QDir dir( Opie::Global::tempDir(), "qcop-msg-*" ); |
75 | 75 | ||
76 | QStringList stale = dir.entryList(); | 76 | QStringList stale = dir.entryList(); |
77 | QStringList::Iterator it; | 77 | QStringList::Iterator it; |
78 | for ( it = stale.begin(); it != stale.end(); ++it ) { | 78 | for ( it = stale.begin(); it != stale.end(); ++it ) { |
79 | dir.remove( *it ); | 79 | dir.remove( *it ); |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | static void refreshTimeZoneConfig() | 83 | static void refreshTimeZoneConfig() |
84 | { | 84 | { |
85 | /* ### FIXME timezone handling */ | 85 | /* ### FIXME timezone handling */ |
86 | #if 0 | 86 | #if 0 |
87 | // We need to help WorldTime in setting up its configuration for | 87 | // We need to help WorldTime in setting up its configuration for |
88 | // the current translation | 88 | // the current translation |
89 | // BEGIN no tr | 89 | // BEGIN no tr |
90 | const char *defaultTz[] = { | 90 | const char *defaultTz[] = { |
91 | "America/New_York", | 91 | "America/New_York", |
92 | "America/Los_Angeles", | 92 | "America/Los_Angeles", |
93 | "Europe/Oslo", | 93 | "Europe/Oslo", |
94 | "Asia/Tokyo", | 94 | "Asia/Tokyo", |
95 | "Asia/Hong_Kong", | 95 | "Asia/Hong_Kong", |
96 | "Australia/Brisbane", | 96 | "Australia/Brisbane", |
97 | 0 | 97 | 0 |
98 | }; | 98 | }; |
99 | // END no tr | 99 | // END no tr |
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp index 4c62b78..6a140e9 100644 --- a/core/launcher/server.cpp +++ b/core/launcher/server.cpp | |||
@@ -1,116 +1,116 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the 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 "server.h" | 21 | #include "server.h" |
22 | #include "serverapp.h" | 22 | #include "serverapp.h" |
23 | #include "launcher.h" | 23 | #include "launcher.h" |
24 | #include "startmenu.h" | 24 | #include "startmenu.h" |
25 | #include "transferserver.h" | 25 | #include "transferserver.h" |
26 | #include "qcopbridge.h" | 26 | #include "qcopbridge.h" |
27 | #include "irserver.h" | 27 | #include "irserver.h" |
28 | #include "packageslave.h" | 28 | #include "packageslave.h" |
29 | #include "calibrate.h" | 29 | #include "calibrate.h" |
30 | #include "qrsync.h" | 30 | #include "qrsync.h" |
31 | #include "syncdialog.h" | 31 | #include "syncdialog.h" |
32 | #include "launcher.h" | 32 | #include "launcher.h" |
33 | #include "shutdownimpl.h" | 33 | #include "shutdownimpl.h" |
34 | #include "applauncher.h" | 34 | #include "applauncher.h" |
35 | #if 0 | 35 | #if 0 |
36 | #include "suspendmonitor.h" | 36 | #include "suspendmonitor.h" |
37 | #endif | 37 | #endif |
38 | #include "documentlist.h" | 38 | #include "documentlist.h" |
39 | 39 | ||
40 | #include <qtopia/applnk.h> | 40 | #include <qtopia/applnk.h> |
41 | #include <qtopia/private/categories.h> | 41 | #include <qtopia/private/categories.h> |
42 | #include <qtopia/mimetype.h> | 42 | #include <qtopia/mimetype.h> |
43 | #include <qtopia/config.h> | 43 | #include <qtopia/config.h> |
44 | #include <qtopia/resource.h> | 44 | #include <qtopia/resource.h> |
45 | #include <qtopia/version.h> | 45 | #include <qtopia/version.h> |
46 | #include <qtopia/storage.h> | 46 | #include <qtopia/storage.h> |
47 | 47 | ||
48 | #include <qtopia/qcopenvelope_qws.h> | 48 | #include <qtopia/qcopenvelope_qws.h> |
49 | #include <qwindowsystem_qws.h> | 49 | #include <qwindowsystem_qws.h> |
50 | #include <qgfx_qws.h> | 50 | #include <qgfx_qws.h> |
51 | #include <qtopia/global.h> | 51 | #include <qtopia/global.h> |
52 | #include <qtopia/custom.h> | 52 | //#include <qtopia/custom.h> |
53 | 53 | ||
54 | #include <opie/odevicebutton.h> | 54 | #include <opie/odevicebutton.h> |
55 | #include <opie/odevice.h> | 55 | #include <opie/odevice.h> |
56 | 56 | ||
57 | #include <unistd.h> | 57 | #include <unistd.h> |
58 | #include <qmainwindow.h> | 58 | #include <qmainwindow.h> |
59 | #include <qmessagebox.h> | 59 | #include <qmessagebox.h> |
60 | #include <qtimer.h> | 60 | #include <qtimer.h> |
61 | #include <qtextstream.h> | 61 | #include <qtextstream.h> |
62 | 62 | ||
63 | #include <stdlib.h> | 63 | #include <stdlib.h> |
64 | 64 | ||
65 | extern QRect qt_maxWindowRect; | 65 | extern QRect qt_maxWindowRect; |
66 | 66 | ||
67 | using namespace Opie; | 67 | using namespace Opie; |
68 | 68 | ||
69 | static QWidget *calibrate(bool) | 69 | static QWidget *calibrate(bool) |
70 | { | 70 | { |
71 | #ifdef Q_WS_QWS | 71 | #ifdef Q_WS_QWS |
72 | Calibrate *c = new Calibrate; | 72 | Calibrate *c = new Calibrate; |
73 | c->show(); | 73 | c->show(); |
74 | return c; | 74 | return c; |
75 | #else | 75 | #else |
76 | return 0; | 76 | return 0; |
77 | #endif | 77 | #endif |
78 | } | 78 | } |
79 | 79 | ||
80 | #define FACTORY(T) \ | 80 | #define FACTORY(T) \ |
81 | static QWidget *new##T( bool maximized ) { \ | 81 | static QWidget *new##T( bool maximized ) { \ |
82 | QWidget *w = new T( 0, 0, QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ | 82 | QWidget *w = new T( 0, 0, QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ |
83 | if ( maximized ) { \ | 83 | if ( maximized ) { \ |
84 | if ( qApp->desktop()->width() <= 350 ) { \ | 84 | if ( qApp->desktop()->width() <= 350 ) { \ |
85 | w->showMaximized(); \ | 85 | w->showMaximized(); \ |
86 | } else { \ | 86 | } else { \ |
87 | w->resize( QSize( 300, 300 ) ); \ | 87 | w->resize( QSize( 300, 300 ) ); \ |
88 | } \ | 88 | } \ |
89 | } \ | 89 | } \ |
90 | w->show(); \ | 90 | w->show(); \ |
91 | return w; \ | 91 | return w; \ |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | #ifdef SINGLE_APP | 95 | #ifdef SINGLE_APP |
96 | #define APP(a,b,c,d) FACTORY(b) | 96 | #define APP(a,b,c,d) FACTORY(b) |
97 | #include "apps.h" | 97 | #include "apps.h" |
98 | #undef APP | 98 | #undef APP |
99 | #endif // SINGLE_APP | 99 | #endif // SINGLE_APP |
100 | 100 | ||
101 | static Global::Command builtins[] = { | 101 | static Global::Command builtins[] = { |
102 | 102 | ||
103 | #ifdef SINGLE_APP | 103 | #ifdef SINGLE_APP |
104 | #define APP(a,b,c,d) { a, new##b, c, d }, | 104 | #define APP(a,b,c,d) { a, new##b, c, d }, |
105 | #include "apps.h" | 105 | #include "apps.h" |
106 | #undef APP | 106 | #undef APP |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | /* FIXME defines need to be defined*/ | 109 | /* FIXME defines need to be defined*/ |
110 | #if defined(QPE_NEED_CALIBRATION) | 110 | #if defined(QPE_NEED_CALIBRATION) |
111 | { "calibrate", calibrate, 1, 0 }, // No tr | 111 | { "calibrate", calibrate, 1, 0 }, // No tr |
112 | #endif | 112 | #endif |
113 | #if !defined(OPIE_NO_BUILTIN_SHUTDOWN) | 113 | #if !defined(OPIE_NO_BUILTIN_SHUTDOWN) |
114 | { "shutdown", Global::shutdown, 1, 0 }, // No tr | 114 | { "shutdown", Global::shutdown, 1, 0 }, // No tr |
115 | // { "run", run, 1, 0 }, // No tr | 115 | // { "run", run, 1, 0 }, // No tr |
116 | #endif | 116 | #endif |
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp index 69e083d..23a7f95 100644 --- a/core/launcher/serverapp.cpp +++ b/core/launcher/serverapp.cpp | |||
@@ -1,97 +1,97 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2003 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2003 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the 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 "serverapp.h" | 21 | #include "serverapp.h" |
22 | 22 | ||
23 | #include <opie/odevice.h> | 23 | #include <opie/odevice.h> |
24 | 24 | ||
25 | #include <qtopia/password.h> | 25 | #include <qtopia/password.h> |
26 | #include <qtopia/config.h> | 26 | #include <qtopia/config.h> |
27 | #include <qtopia/power.h> | 27 | #include <qtopia/power.h> |
28 | 28 | ||
29 | #ifdef Q_WS_QWS | 29 | #ifdef Q_WS_QWS |
30 | #include <qtopia/qcopenvelope_qws.h> | 30 | #include <qtopia/qcopenvelope_qws.h> |
31 | #endif | 31 | #endif |
32 | #include <qtopia/global.h> | 32 | #include <qtopia/global.h> |
33 | #include <qtopia/custom.h> | 33 | //#include <qtopia/custom.h> |
34 | 34 | ||
35 | #ifdef Q_WS_QWS | 35 | #ifdef Q_WS_QWS |
36 | #include <qgfx_qws.h> | 36 | #include <qgfx_qws.h> |
37 | #endif | 37 | #endif |
38 | #ifdef Q_OS_WIN32 | 38 | #ifdef Q_OS_WIN32 |
39 | #include <io.h> | 39 | #include <io.h> |
40 | #include <process.h> | 40 | #include <process.h> |
41 | #else | 41 | #else |
42 | #include <unistd.h> | 42 | #include <unistd.h> |
43 | #endif | 43 | #endif |
44 | #include <qmessagebox.h> | 44 | #include <qmessagebox.h> |
45 | #include <qtimer.h> | 45 | #include <qtimer.h> |
46 | #include <qpainter.h> | 46 | #include <qpainter.h> |
47 | #include <qfile.h> | 47 | #include <qfile.h> |
48 | #include <qpixmapcache.h> | 48 | #include <qpixmapcache.h> |
49 | 49 | ||
50 | #include <stdlib.h> | 50 | #include <stdlib.h> |
51 | #include "screensaver.h" | 51 | #include "screensaver.h" |
52 | 52 | ||
53 | static ServerApplication *serverApp = 0; | 53 | static ServerApplication *serverApp = 0; |
54 | static int loggedin=0; | 54 | static int loggedin=0; |
55 | 55 | ||
56 | using namespace Opie; | 56 | using namespace Opie; |
57 | 57 | ||
58 | QCopKeyRegister::QCopKeyRegister() | 58 | QCopKeyRegister::QCopKeyRegister() |
59 | : m_keyCode( 0 ) { | 59 | : m_keyCode( 0 ) { |
60 | } | 60 | } |
61 | 61 | ||
62 | QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m ) | 62 | QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m ) |
63 | :m_keyCode( k ), m_channel( c ), m_message( m ) { | 63 | :m_keyCode( k ), m_channel( c ), m_message( m ) { |
64 | } | 64 | } |
65 | 65 | ||
66 | int QCopKeyRegister::keyCode()const { | 66 | int QCopKeyRegister::keyCode()const { |
67 | return m_keyCode; | 67 | return m_keyCode; |
68 | } | 68 | } |
69 | 69 | ||
70 | QCString QCopKeyRegister::channel()const { | 70 | QCString QCopKeyRegister::channel()const { |
71 | return m_channel; | 71 | return m_channel; |
72 | } | 72 | } |
73 | 73 | ||
74 | QCString QCopKeyRegister::message()const { | 74 | QCString QCopKeyRegister::message()const { |
75 | return m_message; | 75 | return m_message; |
76 | } | 76 | } |
77 | 77 | ||
78 | bool QCopKeyRegister::send() { | 78 | bool QCopKeyRegister::send() { |
79 | if (m_channel.isNull() ) | 79 | if (m_channel.isNull() ) |
80 | return false; | 80 | return false; |
81 | 81 | ||
82 | QCopEnvelope( m_channel, m_message ); | 82 | QCopEnvelope( m_channel, m_message ); |
83 | 83 | ||
84 | return true; | 84 | return true; |
85 | } | 85 | } |
86 | 86 | ||
87 | //--------------------------------------------------------------------------- | 87 | //--------------------------------------------------------------------------- |
88 | 88 | ||
89 | /* | 89 | /* |
90 | Priority is number of alerts that are needed to pop up | 90 | Priority is number of alerts that are needed to pop up |
91 | alert. | 91 | alert. |
92 | */ | 92 | */ |
93 | class DesktopPowerAlerter : public QMessageBox | 93 | class DesktopPowerAlerter : public QMessageBox |
94 | { | 94 | { |
95 | Q_OBJECT | 95 | Q_OBJECT |
96 | public: | 96 | public: |
97 | DesktopPowerAlerter( QWidget *parent, const char *name = 0 ) | 97 | DesktopPowerAlerter( QWidget *parent, const char *name = 0 ) |
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 2966168..491a8a3 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp | |||
@@ -1,101 +1,101 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the 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 "runningappbar.h" | 23 | #include "runningappbar.h" |
24 | #include "systray.h" | 24 | #include "systray.h" |
25 | #include "wait.h" | 25 | #include "wait.h" |
26 | #include "appicons.h" | 26 | #include "appicons.h" |
27 | 27 | ||
28 | #include "taskbar.h" | 28 | #include "taskbar.h" |
29 | #include "server.h" | 29 | #include "server.h" |
30 | 30 | ||
31 | #include <qtopia/config.h> | 31 | #include <qtopia/config.h> |
32 | #include <qtopia/qpeapplication.h> | 32 | #include <qtopia/qpeapplication.h> |
33 | #ifdef QWS | 33 | #ifdef QWS |
34 | #include <qtopia/qcopenvelope_qws.h> | 34 | #include <qtopia/qcopenvelope_qws.h> |
35 | #endif | 35 | #endif |
36 | #include <qtopia/global.h> | 36 | #include <qtopia/global.h> |
37 | #include <qtopia/custom.h> | 37 | //#include <qtopia/custom.h> |
38 | 38 | ||
39 | #include <qlabel.h> | 39 | #include <qlabel.h> |
40 | #include <qlayout.h> | 40 | #include <qlayout.h> |
41 | #include <qtimer.h> | 41 | #include <qtimer.h> |
42 | #ifdef QWS | 42 | #ifdef QWS |
43 | #include <qwindowsystem_qws.h> | 43 | #include <qwindowsystem_qws.h> |
44 | #endif | 44 | #endif |
45 | #include <qwidgetstack.h> | 45 | #include <qwidgetstack.h> |
46 | 46 | ||
47 | #if defined( Q_WS_QWS ) | 47 | #if defined( Q_WS_QWS ) |
48 | #include <qwsdisplay_qws.h> | 48 | #include <qwsdisplay_qws.h> |
49 | #include <qgfx_qws.h> | 49 | #include <qgfx_qws.h> |
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | 52 | ||
53 | static bool initNumLock() | 53 | static bool initNumLock() |
54 | { | 54 | { |
55 | #ifdef QPE_INITIAL_NUMLOCK_STATE | 55 | #ifdef QPE_INITIAL_NUMLOCK_STATE |
56 | QPE_INITIAL_NUMLOCK_STATE | 56 | QPE_INITIAL_NUMLOCK_STATE |
57 | #endif | 57 | #endif |
58 | return FALSE; | 58 | return FALSE; |
59 | } | 59 | } |
60 | 60 | ||
61 | //--------------------------------------------------------------------------- | 61 | //--------------------------------------------------------------------------- |
62 | 62 | ||
63 | class SafeMode : public QWidget | 63 | class SafeMode : public QWidget |
64 | { | 64 | { |
65 | Q_OBJECT | 65 | Q_OBJECT |
66 | public: | 66 | public: |
67 | SafeMode( QWidget *parent ) : QWidget( parent ), menu(0) | 67 | SafeMode( QWidget *parent ) : QWidget( parent ), menu(0) |
68 | { | 68 | { |
69 | message = tr("Safe Mode"); | 69 | message = tr("Safe Mode"); |
70 | QFont f( font() ); | 70 | QFont f( font() ); |
71 | f.setWeight( QFont::Bold ); | 71 | f.setWeight( QFont::Bold ); |
72 | setFont( f ); | 72 | setFont( f ); |
73 | } | 73 | } |
74 | 74 | ||
75 | void mousePressEvent( QMouseEvent *); | 75 | void mousePressEvent( QMouseEvent *); |
76 | QSize sizeHint() const; | 76 | QSize sizeHint() const; |
77 | void paintEvent( QPaintEvent* ); | 77 | void paintEvent( QPaintEvent* ); |
78 | 78 | ||
79 | private slots: | 79 | private slots: |
80 | void action(int i); | 80 | void action(int i); |
81 | 81 | ||
82 | private: | 82 | private: |
83 | QString message; | 83 | QString message; |
84 | QPopupMenu *menu; | 84 | QPopupMenu *menu; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | void SafeMode::mousePressEvent( QMouseEvent *) | 87 | void SafeMode::mousePressEvent( QMouseEvent *) |
88 | { | 88 | { |
89 | if ( !menu ) { | 89 | if ( !menu ) { |
90 | menu = new QPopupMenu(this); | 90 | menu = new QPopupMenu(this); |
91 | menu->insertItem( tr("Plugin Manager..."), 0 ); | 91 | menu->insertItem( tr("Plugin Manager..."), 0 ); |
92 | menu->insertItem( tr("Restart Qtopia"), 1 ); | 92 | menu->insertItem( tr("Restart Qtopia"), 1 ); |
93 | menu->insertItem( tr("Help..."), 2 ); | 93 | menu->insertItem( tr("Help..."), 2 ); |
94 | connect(menu, SIGNAL(activated(int)), this, SLOT(action(int))); | 94 | connect(menu, SIGNAL(activated(int)), this, SLOT(action(int))); |
95 | } | 95 | } |
96 | QPoint curPos = mapToGlobal( QPoint(0,0) ); | 96 | QPoint curPos = mapToGlobal( QPoint(0,0) ); |
97 | QSize sh = menu->sizeHint(); | 97 | QSize sh = menu->sizeHint(); |
98 | menu->popup( curPos-QPoint((sh.width()-width())/2,sh.height()) ); | 98 | menu->popup( curPos-QPoint((sh.width()-width())/2,sh.height()) ); |
99 | } | 99 | } |
100 | 100 | ||
101 | void SafeMode::action(int i) | 101 | void SafeMode::action(int i) |