author | llornkcor <llornkcor> | 2002-10-20 04:30:34 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-10-20 04:30:34 (UTC) |
commit | e2694c5aedb3697a373e363cebe72cddb3114a8f (patch) (unidiff) | |
tree | 5ba5910a40cfc151e01a956c609f1bdd0243668e /core/launcher | |
parent | f6a0af65b96edf63135d2b88c17b8510eebbbd51 (diff) | |
download | opie-e2694c5aedb3697a373e363cebe72cddb3114a8f.zip opie-e2694c5aedb3697a373e363cebe72cddb3114a8f.tar.gz opie-e2694c5aedb3697a373e363cebe72cddb3114a8f.tar.bz2 |
fix menu button on zaurus F11 raising opie menu
-rw-r--r-- | core/launcher/desktop.cpp | 10 | ||||
-rw-r--r-- | core/launcher/desktop.h | 131 | ||||
-rw-r--r-- | core/launcher/main.cpp | 1 |
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 | |||
@@ -413,11 +413,11 @@ void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & | |||
413 | stream >> mode; | 413 | stream >> mode; |
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(); |
423 | } | 423 | } |
@@ -474,14 +474,14 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) | |||
474 | connect( cardSendTimer, SIGNAL( timeout() ), this, SLOT( sendCard() ) ); | 474 | connect( cardSendTimer, SIGNAL( timeout() ), this, SLOT( sendCard() ) ); |
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(); |
487 | if ( press ) | 487 | if ( press ) |
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 | |||
@@ -40,106 +40,107 @@ class PackageSlave; | |||
40 | class QPEScreenSaver; | 40 | class QPEScreenSaver; |
41 | 41 | ||
42 | class DesktopApplication : public QPEApplication | 42 | class DesktopApplication : public QPEApplication |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | public: | 45 | public: |
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 | ||
51 | signals: | 51 | signals: |
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 | ||
64 | protected: | 65 | protected: |
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 | ||
73 | public slots: | 74 | public 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 | ||
77 | protected slots: | 78 | protected slots: |
78 | void shutdown( ShutdownImpl::Type ); | 79 | void shutdown( ShutdownImpl::Type ); |
79 | void psTimeout(); | 80 | void psTimeout(); |
80 | void sendCard(); | 81 | void sendCard(); |
81 | private: | 82 | private: |
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 | ||
90 | class Desktop : public QWidget | 91 | class Desktop : public QWidget |
91 | { | 92 | { |
92 | Q_OBJECT | 93 | Q_OBJECT |
93 | public: | 94 | public: |
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 | ||
106 | public slots: | 107 | public 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 | ||
123 | protected: | 124 | protected: |
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 | ||
132 | private: | 133 | private: |
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 | ||
145 | #endif // __DESKTOP_H__ | 146 | #endif // __DESKTOP_H__ |
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 | |||
@@ -90,8 +90,9 @@ int initApplication( int argc, char ** argv ) | |||
90 | AlarmServer::initialize(); | 90 | AlarmServer::initialize(); |
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()) ); |
97 | QObject::connect( &a, SIGNAL(email()), d, SLOT(raiseEmail()) ); | 98 | QObject::connect( &a, SIGNAL(email()), d, SLOT(raiseEmail()) ); |