Changeset 19684 in vbox
- Timestamp:
- May 14, 2009 10:17:06 AM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r19191 r19684 3417 3417 { 3418 3418 if (QMenu *menu = pAction->menu()) 3419 return processHotKey (aKey, menu->actions()); 3420 3421 QString hotkey = VBoxGlobal::extractKeyFromActionText (pAction->text()); 3422 if (pAction->isEnabled() && !hotkey.isEmpty()) 3423 { 3424 if (aKey.matches (QKeySequence (hotkey)) == QKeySequence::ExactMatch) 3425 { 3426 /* 3427 * we asynchronously post a special event instead of calling 3428 * pAction->trigger() directly, to let key presses and 3429 * releases be processed correctly by Qt first. Note: we 3430 * assume that nobody will delete the menu item corresponding 3431 * to the key sequence, so that the pointer to menu data 3432 * posted along with the event will remain valid in the event 3433 * handler, at least until the main window is closed. 3434 */ 3435 QApplication::postEvent (this, 3436 new ActivateMenuEvent (pAction)); 3419 { 3420 /* Process recursively for each sub-menu */ 3421 if (processHotKey (aKey, menu->actions())) 3437 3422 return true; 3423 } 3424 else 3425 { 3426 QString hotkey = VBoxGlobal::extractKeyFromActionText (pAction->text()); 3427 if (pAction->isEnabled() && !hotkey.isEmpty()) 3428 { 3429 if (aKey.matches (QKeySequence (hotkey)) == QKeySequence::ExactMatch) 3430 { 3431 /* We asynchronously post a special event instead of calling 3432 * pAction->trigger() directly, to let key presses and 3433 * releases be processed correctly by Qt first. 3434 * Note: we assume that nobody will delete the menu item 3435 * corresponding to the key sequence, so that the pointer to 3436 * menu data posted along with the event will remain valid in 3437 * the event handler, at least until the main window is closed. */ 3438 QApplication::postEvent (this, new ActivateMenuEvent (pAction)); 3439 return true; 3440 } 3438 3441 } 3439 3442 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r19239 r19684 1713 1713 tr ("Open the dialog to operate on shared folders")); 1714 1714 1715 mDevicesInstallGuestToolsAction->setText (tr ("&Install Guest Additions...")); 1715 mDevicesInstallGuestToolsAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Install Guest Additions..."), 1716 "D")); 1716 1717 mDevicesInstallGuestToolsAction->setStatusTip ( 1717 1718 tr ("Mount the Guest Additions installation image"));
Note:
See TracChangeset
for help on using the changeset viewer.