Changeset 16319 in vbox
- Timestamp:
- Jan 28, 2009 4:24:35 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
-
include/VBoxConsoleWnd.h (modified) (4 diffs)
-
src/VBoxConsoleWnd.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r16304 r16319 35 35 #include <QColor> 36 36 #include <QDialog> 37 #include <QMenu> 37 38 38 39 #ifdef VBOX_WITH_DEBUGGER_GUI … … 49 50 class QLabel; 50 51 class QSpacerItem; 51 class QMenu;52 52 53 53 class VBoxConsoleView; … … 58 58 59 59 class VBoxChangeDockIconUpdateEvent; 60 61 /* We want to make the first action highlighted but not 62 * selected, but Qt makes the both or neither one of this, 63 * so, just move the focus to the next eligible object, 64 * which will be the first menu action. This little 65 * subclass made only for that purpose. */ 66 class QIMenu : public QMenu 67 { 68 Q_OBJECT; 69 70 public: 71 72 QIMenu (QWidget *aParent) : QMenu (aParent) {} 73 74 void selectFirstAction() { QMenu::focusNextChild(); } 75 }; 60 76 61 77 class VBoxConsoleWnd : public QIWithRetranslateUI2<QMainWindow> … … 236 252 237 253 /** Popup version of the main menu */ 238 Q Menu *mMainMenu;254 QIMenu *mMainMenu; 239 255 240 256 QActionGroup *mRunningActions; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r16304 r16319 398 398 ///// Menubar /////////////////////////////////////////////////////////// 399 399 400 mMainMenu = new Q Menu (this);400 mMainMenu = new QIMenu (this); 401 401 402 402 /* Machine submenu */ … … 1188 1188 } 1189 1189 1190 mMainMenu->setActiveAction (mMainMenu->actions().first());1191 1190 mMainMenu->popup (pos); 1192 mMainMenu-> activateWindow();1191 mMainMenu->selectFirstAction(); 1193 1192 } 1194 1193
Note:
See TracChangeset
for help on using the changeset viewer.

