author | sandman <sandman> | 2002-11-25 01:14:19 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-11-25 01:14:19 (UTC) |
commit | 1b4665ddf28fdb59810b90138a5a88f87a2d9bc6 (patch) (side-by-side diff) | |
tree | 14254d02145e88f1970f3c26af4ad006ab00c15a | |
parent | da8050fe68a443773447ee176793a30df256ea9b (diff) | |
download | opie-1b4665ddf28fdb59810b90138a5a88f87a2d9bc6.zip opie-1b4665ddf28fdb59810b90138a5a88f87a2d9bc6.tar.gz opie-1b4665ddf28fdb59810b90138a5a88f87a2d9bc6.tar.bz2 |
*** empty log message ***
-rw-r--r-- | core/launcher/desktop.cpp | 23 | ||||
-rw-r--r-- | core/launcher/desktop.h | 1 | ||||
-rw-r--r-- | core/launcher/startmenu.cpp | 7 |
3 files changed, 10 insertions, 21 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 3e8c731..34b52d2 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -349,16 +349,16 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) cardSendTimer->start( 2000, TRUE ); connect( cardSendTimer, SIGNAL( timeout() ), this, SLOT( sendCard() ) ); } return TRUE; } -// if ( ke->simpleData.keycode == Key_F11 ) { -// if ( press ) emit menu(); -// return TRUE; -// } + if ( ke->simpleData.keycode == Key_F11 ) { + if ( press ) emit menu(); + return TRUE; + } if ( ke->simpleData.keycode == Key_F12 ) { while ( activePopupWidget() ) activePopupWidget() ->close(); if ( press ) emit launch(); @@ -900,21 +900,6 @@ void Desktop::screenClick() void Desktop::soundAlarm() { if ( qpedesktop-> alarmsound ) ODevice::inst ( ) -> alarmSound ( ); } -bool Desktop::eventFilter( QObject *, QEvent *ev ) -{ - if ( ev->type() == QEvent::KeyPress ) { - QKeyEvent *ke = (QKeyEvent *)ev; - if ( ke->key() == Qt::Key_F11 ) { // menu key - QWidget *active = qApp->activeWindow(); - if ( active && active->isPopup() ) { - active->close(); - } - raiseMenu(); - return TRUE; - } - } - return FALSE; -} diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index f6059b8..13f28b3 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h @@ -127,13 +127,12 @@ public slots: void home ( ); protected: void executeOrModify( const QString& appLnkFile ); void styleChange( QStyle & ); void timerEvent( QTimerEvent *e ); - bool eventFilter( QObject *, QEvent * ); QWidget *bg; Launcher *launcher; TaskBar *tb; private: diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index d9382d2..e663072 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp @@ -244,14 +244,19 @@ bool StartMenu::loadMenu( AppLnkSet *folder, QPopupMenu *menu ) void StartMenu::launch() { int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); if ( launchMenu->isVisible() ) launchMenu->hide(); - else + else { + QWidget *active = qApp->activeWindow(); + if ( active && active->isPopup() ) + active->close(); + launchMenu->popup( QPoint( 1, y ) ); + } } const AppLnk* StartMenu::execToLink(const QString& appname) { const AppLnk* a = apps->findExec( appname ); return a; |