summaryrefslogtreecommitdiff
authorsandman <sandman>2002-06-13 15:09:47 (UTC)
committer sandman <sandman>2002-06-13 15:09:47 (UTC)
commit0d66b6176567eceda8dc5880a292df19386c7f78 (patch) (unidiff)
tree63e4ed13d59c3972e6731fdf604f1cdbe14b5922
parent1b5c103ca47a091c37c084133c3b26b8d6e04db5 (diff)
downloadopie-0d66b6176567eceda8dc5880a292df19386c7f78.zip
opie-0d66b6176567eceda8dc5880a292df19386c7f78.tar.gz
opie-0d66b6176567eceda8dc5880a292df19386c7f78.tar.bz2
Fix for ljp's fix for my fix of custom.h handling on iPAQs
Should now work for iPAQ, Z and x86
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp2
-rw-r--r--core/launcher/main.cpp2
-rw-r--r--core/launcher/taskbar.cpp7
-rw-r--r--core/launcher/taskbar.h2
4 files changed, 5 insertions, 8 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 974de0c..aa51898 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -1,90 +1,90 @@
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 41
42#ifdef QT_QWS_CUSTOM 42#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
43#include <qpe/custom.h> 43#include <qpe/custom.h>
44#endif 44#endif
45 45
46#include <qgfx_qws.h> 46#include <qgfx_qws.h>
47#include <qmainwindow.h> 47#include <qmainwindow.h>
48#include <qmessagebox.h> 48#include <qmessagebox.h>
49#include <qtimer.h> 49#include <qtimer.h>
50#include <qwindowsystem_qws.h> 50#include <qwindowsystem_qws.h>
51 51
52#include <qvaluelist.h> 52#include <qvaluelist.h>
53 53
54#include <stdlib.h> 54#include <stdlib.h>
55#include <unistd.h> 55#include <unistd.h>
56 56
57class QCopKeyRegister 57class QCopKeyRegister
58{ 58{
59public: 59public:
60 QCopKeyRegister() : keyCode(0) { } 60 QCopKeyRegister() : keyCode(0) { }
61 QCopKeyRegister(int k, const QString &c, const QString &m) 61 QCopKeyRegister(int k, const QString &c, const QString &m)
62 : keyCode(k), channel(c), message(m) { } 62 : keyCode(k), channel(c), message(m) { }
63 63
64 int getKeyCode() const { return keyCode; } 64 int getKeyCode() const { return keyCode; }
65 QString getChannel() const { return channel; } 65 QString getChannel() const { return channel; }
66 QString getMessage() const { return message; } 66 QString getMessage() const { return message; }
67 67
68private: 68private:
69 int keyCode; 69 int keyCode;
70 QString channel, message; 70 QString channel, message;
71}; 71};
72 72
73typedef QValueList<QCopKeyRegister> KeyRegisterList; 73typedef QValueList<QCopKeyRegister> KeyRegisterList;
74KeyRegisterList keyRegisterList; 74KeyRegisterList keyRegisterList;
75 75
76static Desktop* qpedesktop = 0; 76static Desktop* qpedesktop = 0;
77static int loggedin=0; 77static int loggedin=0;
78static void login(bool at_poweron) 78static void login(bool at_poweron)
79{ 79{
80 if ( !loggedin ) { 80 if ( !loggedin ) {
81 Global::terminateBuiltin("calibrate"); 81 Global::terminateBuiltin("calibrate");
82 Password::authenticate(at_poweron); 82 Password::authenticate(at_poweron);
83 loggedin=1; 83 loggedin=1;
84 QCopEnvelope e( "QPE/Desktop", "unlocked()" ); 84 QCopEnvelope e( "QPE/Desktop", "unlocked()" );
85 } 85 }
86} 86}
87 87
88bool Desktop::screenLocked() 88bool Desktop::screenLocked()
89{ 89{
90 return loggedin == 0; 90 return loggedin == 0;
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 12c2a7c..fc6d829 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -1,76 +1,76 @@
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 "taskbar.h" 22#include "taskbar.h"
23#include "stabmon.h" 23#include "stabmon.h"
24 24
25#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
26#include <qpe/network.h> 26#include <qpe/network.h>
27#include <qpe/config.h> 27#include <qpe/config.h>
28#ifdef QT_QWS_CUSTOM 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 <qfile.h> 32#include <qfile.h>
33#include <qwindowsystem_qws.h> 33#include <qwindowsystem_qws.h>
34#include <qpe/qcopenvelope_qws.h> 34#include <qpe/qcopenvelope_qws.h>
35#include <qpe/alarmserver.h> 35#include <qpe/alarmserver.h>
36 36
37#include <stdlib.h> 37#include <stdlib.h>
38#include <stdio.h> 38#include <stdio.h>
39#include <signal.h> 39#include <signal.h>
40#include <unistd.h> 40#include <unistd.h>
41 41
42#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 42#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
43#include "../calibrate/calibrate.h" 43#include "../calibrate/calibrate.h"
44#endif 44#endif
45 45
46#ifdef QT_QWS_LOGIN 46#ifdef QT_QWS_LOGIN
47#include "../login/qdmdialogimpl.h" 47#include "../login/qdmdialogimpl.h"
48#endif 48#endif
49 49
50#ifdef QT_QWS_CASSIOPEIA 50#ifdef QT_QWS_CASSIOPEIA
51static void ignoreMessage( QtMsgType, const char * ) 51static void ignoreMessage( QtMsgType, const char * )
52{ 52{
53} 53}
54#include <sys/mount.h> 54#include <sys/mount.h>
55#include <sys/types.h> 55#include <sys/types.h>
56#include <sys/stat.h> 56#include <sys/stat.h>
57#include <sys/time.h> 57#include <sys/time.h>
58#include <fcntl.h> 58#include <fcntl.h>
59#include <qdatetime.h> 59#include <qdatetime.h>
60 60
61void initCassiopeia() 61void initCassiopeia()
62{ 62{
63 // MIPSEL-specific init - make sure /proc exists for shm 63 // MIPSEL-specific init - make sure /proc exists for shm
64/* 64/*
65 if ( mount("/dev/ram0", "/", "ext2", MS_REMOUNT | MS_MGC_VAL, 0 ) ) { 65 if ( mount("/dev/ram0", "/", "ext2", MS_REMOUNT | MS_MGC_VAL, 0 ) ) {
66 perror("Remounting - / read/write"); 66 perror("Remounting - / read/write");
67 } 67 }
68*/ 68*/
69 if ( mount("none", "/tmp", "ramfs", 0, 0 ) ) { 69 if ( mount("none", "/tmp", "ramfs", 0, 0 ) ) {
70 perror("mounting ramfs /tmp"); 70 perror("mounting ramfs /tmp");
71 } else { 71 } else {
72 fprintf( stderr, "mounted /tmp\n" ); 72 fprintf( stderr, "mounted /tmp\n" );
73 } 73 }
74 if ( mount("none", "/home", "ramfs", 0, 0 ) ) { 74 if ( mount("none", "/home", "ramfs", 0, 0 ) ) {
75 perror("mounting ramfs /home"); 75 perror("mounting ramfs /home");
76 } else { 76 } else {
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index bff2a1c..5e95c99 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -1,89 +1,86 @@
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
36#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
36#include <qpe/custom.h> 37#include <qpe/custom.h>
37#endif 38#endif
38#if defined(QT_QWS_IPAQ)
39#include "qpe/custom-ipaq.h"
40#endif
41
42 39
43#include <qlabel.h> 40#include <qlabel.h>
44#include <qlayout.h> 41#include <qlayout.h>
45#include <qtimer.h> 42#include <qtimer.h>
46#include <qwindowsystem_qws.h> 43#include <qwindowsystem_qws.h>
47#include <qwidgetstack.h> 44#include <qwidgetstack.h>
48 45
49#if defined( Q_WS_QWS ) 46#if defined( Q_WS_QWS )
50#include <qwsdisplay_qws.h> 47#include <qwsdisplay_qws.h>
51#include <qgfx_qws.h> 48#include <qgfx_qws.h>
52#endif 49#endif
53 50
54 51
55#define FACTORY(T) \ 52#define FACTORY(T) \
56 static QWidget *new##T( bool maximized ) { \ 53 static QWidget *new##T( bool maximized ) { \
57 QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ 54 QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \
58 if ( maximized ) { \ 55 if ( maximized ) { \
59 if ( qApp->desktop()->width() <= 350 ) { \ 56 if ( qApp->desktop()->width() <= 350 ) { \
60 w->showMaximized(); \ 57 w->showMaximized(); \
61 } else { \ 58 } else { \
62 w->resize( QSize( 300, 300 ) ); \ 59 w->resize( QSize( 300, 300 ) ); \
63 } \ 60 } \
64 } \ 61 } \
65 w->show(); \ 62 w->show(); \
66 return w; \ 63 return w; \
67 } 64 }
68 65
69 66
70#ifdef SINGLE_APP 67#ifdef SINGLE_APP
71#define APP(a,b,c,d) FACTORY(b) 68#define APP(a,b,c,d) FACTORY(b)
72#include "../launcher/apps.h" 69#include "../launcher/apps.h"
73#undef APP 70#undef APP
74#endif // SINGLE_APP 71#endif // SINGLE_APP
75 72
76static Global::Command builtins[] = { 73static Global::Command builtins[] = {
77 74
78#ifdef SINGLE_APP 75#ifdef SINGLE_APP
79#define APP(a,b,c,d) { a, new##b, c }, 76#define APP(a,b,c,d) { a, new##b, c },
80#include "../launcher/apps.h" 77#include "../launcher/apps.h"
81#undef APP 78#undef APP
82#endif 79#endif
83 80
84#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX) 81#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX)
85 { "calibrate", TaskBar::calibrate, 1, 0 }, 82 { "calibrate", TaskBar::calibrate, 1, 0 },
86#endif 83#endif
87#if !defined(QT_QWS_CASSIOPEIA) 84#if !defined(QT_QWS_CASSIOPEIA)
88 { "shutdown", Global::shutdown, 1, 0 }, 85 { "shutdown", Global::shutdown, 1, 0 },
89// { "run", run, 1, 0 }, 86// { "run", run, 1, 0 },
diff --git a/core/launcher/taskbar.h b/core/launcher/taskbar.h
index cdeb3c7..78c4722 100644
--- a/core/launcher/taskbar.h
+++ b/core/launcher/taskbar.h
@@ -1,72 +1,72 @@
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#ifndef __TASKBAR_H__ 21#ifndef __TASKBAR_H__
22#define __TASKBAR_H__ 22#define __TASKBAR_H__
23 23
24#ifdef QT_QWS_CUSTOM 24#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
25#include <qpe/custom.h> 25#include <qpe/custom.h>
26#endif 26#endif
27 27
28#include <qhbox.h> 28#include <qhbox.h>
29 29
30class QLabel; 30class QLabel;
31class QTimer; 31class QTimer;
32class InputMethods; 32class InputMethods;
33class Wait; 33class Wait;
34class SysTray; 34class SysTray;
35class MRUList; 35class MRUList;
36class QWidgetStack; 36class QWidgetStack;
37class QTimer; 37class QTimer;
38class QLabel; 38class QLabel;
39class StartMenu; 39class StartMenu;
40class LockKeyState; 40class LockKeyState;
41 41
42class TaskBar : public QHBox { 42class TaskBar : public QHBox {
43 Q_OBJECT 43 Q_OBJECT
44public: 44public:
45 TaskBar(); 45 TaskBar();
46 ~TaskBar(); 46 ~TaskBar();
47 47
48 static QWidget *calibrate( bool ); 48 static QWidget *calibrate( bool );
49 49
50 bool recoverMemory(); 50 bool recoverMemory();
51 51
52 StartMenu *startMenu() const { return sm; } 52 StartMenu *startMenu() const { return sm; }
53public slots: 53public slots:
54 void startWait(); 54 void startWait();
55 void stopWait(const QString&); 55 void stopWait(const QString&);
56 void stopWait(); 56 void stopWait();
57 void clearStatusBar(); 57 void clearStatusBar();
58 void toggleNumLockState(); 58 void toggleNumLockState();
59 void toggleCapsLockState(); 59 void toggleCapsLockState();
60 void toggleSymbolInput(); 60 void toggleSymbolInput();
61 61
62protected: 62protected:
63 void resizeEvent( QResizeEvent * ); 63 void resizeEvent( QResizeEvent * );
64 void styleChange( QStyle & ); 64 void styleChange( QStyle & );
65 void setStatusMessage( const QString &text ); 65 void setStatusMessage( const QString &text );
66 66
67private slots: 67private slots:
68 void calcMaxWindowRect(); 68 void calcMaxWindowRect();
69 void receive( const QCString &msg, const QByteArray &data ); 69 void receive( const QCString &msg, const QByteArray &data );
70 70
71private: 71private:
72 72