-rw-r--r-- | core/launcher/startmenu.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index 88c6219..39e07c8 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp | |||
@@ -232,36 +232,37 @@ bool StartMenu::loadMenu( AppLnkSet *folder, QPopupMenu *menu ) | |||
232 | 232 | ||
233 | if ( sepId && ( menu-> idAt ( 0 ) == sepId )) { // no tabs entries | 233 | if ( sepId && ( menu-> idAt ( 0 ) == sepId )) { // no tabs entries |
234 | menu-> removeItem ( sepId ); | 234 | menu-> removeItem ( sepId ); |
235 | sepId = 0; | 235 | sepId = 0; |
236 | } | 236 | } |
237 | if ( !menu-> count ( )) // if we don't do this QPopupMenu will insert a dummy Separator, which won't go away later | 237 | if ( !menu-> count ( )) // if we don't do this QPopupMenu will insert a dummy Separator, which won't go away later |
238 | sepId = menu-> insertSeparator ( ); | 238 | sepId = menu-> insertSeparator ( ); |
239 | 239 | ||
240 | return result; | 240 | return result; |
241 | } | 241 | } |
242 | 242 | ||
243 | 243 | ||
244 | void StartMenu::launch() | 244 | void StartMenu::launch ( ) |
245 | { | 245 | { |
246 | int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); | 246 | int y = mapToGlobal ( QPoint ( )). y ( ) - launchMenu-> sizeHint ( ). height ( ); |
247 | 247 | ||
248 | if ( launchMenu->isVisible() ) | 248 | if ( launchMenu-> isVisible ( )) { |
249 | launchMenu->hide(); | 249 | launchMenu-> hide ( ); |
250 | } | ||
250 | else { | 251 | else { |
251 | QWidget *active = qApp->activeWindow(); | 252 | QWidget *active = qApp-> activeWindow ( ); |
252 | if ( active && active->isPopup() ) | 253 | if ( active && active-> isPopup ( )) |
253 | active->close(); | 254 | active-> close ( ); |
254 | 255 | ||
255 | launchMenu->popup( QPoint( 1, y ) ); | 256 | launchMenu-> popup ( QPoint ( 1, y )); |
256 | } | 257 | } |
257 | } | 258 | } |
258 | 259 | ||
259 | const AppLnk* StartMenu::execToLink(const QString& appname) | 260 | const AppLnk* StartMenu::execToLink(const QString& appname) |
260 | { | 261 | { |
261 | const AppLnk* a = apps->findExec( appname ); | 262 | const AppLnk* a = apps->findExec( appname ); |
262 | return a; | 263 | return a; |
263 | } | 264 | } |
264 | 265 | ||
265 | void StartPopupMenu::keyPressEvent( QKeyEvent *e ) | 266 | void StartPopupMenu::keyPressEvent( QKeyEvent *e ) |
266 | { | 267 | { |
267 | if ( e->key() == Key_F33 || e->key() == Key_Space ) { | 268 | if ( e->key() == Key_F33 || e->key() == Key_Space ) { |