summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-10-20 04:30:34 (UTC)
committer llornkcor <llornkcor>2002-10-20 04:30:34 (UTC)
commite2694c5aedb3697a373e363cebe72cddb3114a8f (patch) (unidiff)
tree5ba5910a40cfc151e01a956c609f1bdd0243668e
parentf6a0af65b96edf63135d2b88c17b8510eebbbd51 (diff)
downloadopie-e2694c5aedb3697a373e363cebe72cddb3114a8f.zip
opie-e2694c5aedb3697a373e363cebe72cddb3114a8f.tar.gz
opie-e2694c5aedb3697a373e363cebe72cddb3114a8f.tar.bz2
fix menu button on zaurus F11 raising opie menu
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp10
-rw-r--r--core/launcher/desktop.h131
-rw-r--r--core/launcher/main.cpp1
3 files changed, 72 insertions, 70 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 3546e28..9863187 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -414,9 +414,9 @@ void DesktopApplication::systemMessage( const QCString & msg, const QByteArray &
414 m_screensaver-> setMode ( mode ); 414 m_screensaver-> setMode ( mode );
415 } 415 }
416 else if ( msg == "setDisplayState(int)" ) { 416 else if ( msg == "setDisplayState(int)" ) {
417 int state; 417 int state;
418 stream >> state; 418 stream >> state;
419 m_screensaver-> setDisplayState ( state != 0 ); 419 m_screensaver-> setDisplayState ( state != 0 );
420 } 420 }
421 else if ( msg == "suspend()" ) { 421 else if ( msg == "suspend()" ) {
422 emit power(); 422 emit power();
@@ -475,12 +475,12 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
475 } 475 }
476 return TRUE; 476 return TRUE;
477 } 477 }
478 /* menu key now opens application menu/toolbar 478// menu key now opens application menu/toolbar
479 if ( ke->simpleData.keycode == Key_F11 ) { 479 if ( ke->simpleData.keycode == Key_F11 ) {
480 if ( press ) emit menu(); 480 if ( press ) emit menu();
481 return TRUE; 481 return TRUE;
482 } 482 }
483 */ 483
484 if ( ke->simpleData.keycode == Key_F12 ) { 484 if ( ke->simpleData.keycode == Key_F12 ) {
485 while ( activePopupWidget() ) 485 while ( activePopupWidget() )
486 activePopupWidget() ->close(); 486 activePopupWidget() ->close();
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h
index 09ffe1c..5de85f4 100644
--- a/core/launcher/desktop.h
+++ b/core/launcher/desktop.h
@@ -41,104 +41,105 @@ class QPEScreenSaver;
41 41
42class DesktopApplication : public QPEApplication 42class DesktopApplication : public QPEApplication
43{ 43{
44 Q_OBJECT 44 Q_OBJECT
45public: 45public:
46 DesktopApplication( int& argc, char **argv, Type t ); 46 DesktopApplication( int& argc, char **argv, Type t );
47 ~DesktopApplication(); 47 ~DesktopApplication();
48 48
49 static void switchLCD ( bool on ); // only for togglePower in Desktop 49 static void switchLCD ( bool on ); // only for togglePower in Desktop
50 50
51signals: 51signals:
52 void home(); 52 void menu();
53 void datebook(); 53 void home();
54 void contacts(); 54 void datebook();
55 void launch(); 55 void contacts();
56 void email(); 56 void launch();
57 void backlight(); 57 void email();
58 void power(); 58 void backlight();
59 void symbol(); 59 void power();
60 void numLockStateToggle(); 60 void symbol();
61 void capsLockStateToggle(); 61 void numLockStateToggle();
62 void prepareForRestart(); 62 void capsLockStateToggle();
63 void prepareForRestart();
63 64
64protected: 65protected:
65#ifdef Q_WS_QWS 66#ifdef Q_WS_QWS
66 67
67 bool qwsEventFilter( QWSEvent * ); 68 bool qwsEventFilter( QWSEvent * );
68#endif 69#endif
69 70
70 void shutdown(); 71 void shutdown();
71 void restart(); 72 void restart();
72 73
73public slots: 74public slots:
74 virtual void desktopMessage ( const QCString &msg, const QByteArray &data ); 75 virtual void desktopMessage ( const QCString &msg, const QByteArray &data );
75 virtual void systemMessage ( const QCString &msg, const QByteArray &data ); 76 virtual void systemMessage ( const QCString &msg, const QByteArray &data );
76 77
77protected slots: 78protected slots:
78 void shutdown( ShutdownImpl::Type ); 79 void shutdown( ShutdownImpl::Type );
79 void psTimeout(); 80 void psTimeout();
80 void sendCard(); 81 void sendCard();
81private: 82private:
82 DesktopPowerAlerter *pa; 83 DesktopPowerAlerter *pa;
83 PowerStatus *ps; 84 PowerStatus *ps;
84 QTimer *cardSendTimer; 85 QTimer *cardSendTimer;
85 QCopChannel *channel; 86 QCopChannel *channel;
86 QPEScreenSaver *m_screensaver; 87 QPEScreenSaver *m_screensaver;
87}; 88};
88 89
89 90
90class Desktop : public QWidget 91class Desktop : public QWidget
91{ 92{
92 Q_OBJECT 93 Q_OBJECT
93public: 94public:
94 Desktop(); 95 Desktop();
95 ~Desktop(); 96 ~Desktop();
96 97
97 static bool screenLocked(); 98 static bool screenLocked();
98 99
99 void show(); 100 void show();
100 void checkMemory(); 101 void checkMemory();
101 102
102 void keyClick(); 103 void keyClick();
103 void screenClick(); 104 void screenClick();
104 static void soundAlarm(); 105 static void soundAlarm();
105 106
106public slots: 107public slots:
107 void raiseDatebook(); 108 void raiseDatebook();
108 void raiseContacts(); 109 void raiseContacts();
109 void raiseMenu(); 110 void raiseMenu();
110 void raiseLauncher(); 111 void raiseLauncher();
111 void raiseEmail(); 112 void raiseEmail();
112 void execAutoStart(); 113 void execAutoStart();
113 void togglePower(); 114 void togglePower();
114 void toggleLight(); 115 void toggleLight();
115 void toggleNumLockState(); 116 void toggleNumLockState();
116 void toggleCapsLockState(); 117 void toggleCapsLockState();
117 void toggleSymbolInput(); 118 void toggleSymbolInput();
118 void terminateServers(); 119 void terminateServers();
119 void rereadVolumes(); 120 void rereadVolumes();
120 121
121 void home ( ); 122 void home ( );
122 123
123protected: 124protected:
124 void executeOrModify( const QString& appLnkFile ); 125 void executeOrModify( const QString& appLnkFile );
125 void styleChange( QStyle & ); 126 void styleChange( QStyle & );
126 void timerEvent( QTimerEvent *e ); 127 void timerEvent( QTimerEvent *e );
127 128
128 QWidget *bg; 129 QWidget *bg;
129 Launcher *launcher; 130 Launcher *launcher;
130 TaskBar *tb; 131 TaskBar *tb;
131 132
132private: 133private:
133 void startTransferServer(); 134 void startTransferServer();
134 bool recoverMemory(); 135 bool recoverMemory();
135 136
136 QCopBridge *qcopBridge; 137 QCopBridge *qcopBridge;
137 TransferServer *transferServer; 138 TransferServer *transferServer;
138 PackageSlave *packageSlave; 139 PackageSlave *packageSlave;
139 140
140 QDateTime suspendTime; 141 QDateTime suspendTime;
141 bool keyclick, touchclick, alarmsound; 142 bool keyclick, touchclick, alarmsound;
142}; 143};
143 144
144 145
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 762a596..8974ced 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -91,6 +91,7 @@ int initApplication( int argc, char ** argv )
91 91
92 Desktop *d = new Desktop(); 92 Desktop *d = new Desktop();
93 93
94 QObject::connect( &a, SIGNAL(menu()), d, SLOT(raiseMenu()) );
94 QObject::connect( &a, SIGNAL(datebook()), d, SLOT(raiseDatebook()) ); 95 QObject::connect( &a, SIGNAL(datebook()), d, SLOT(raiseDatebook()) );
95 QObject::connect( &a, SIGNAL(contacts()), d, SLOT(raiseContacts()) ); 96 QObject::connect( &a, SIGNAL(contacts()), d, SLOT(raiseContacts()) );
96 QObject::connect( &a, SIGNAL(launch()), d, SLOT(raiseLauncher()) ); 97 QObject::connect( &a, SIGNAL(launch()), d, SLOT(raiseLauncher()) );