Changeset 51392 in vbox
- Timestamp:
- May 26, 2014 12:32:56 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 93913
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r51215 r51392 249 249 enum RuntimeMenuApplicationActionType 250 250 { 251 RuntimeMenuApplicationActionType_Invalid = 0, 252 RuntimeMenuApplicationActionType_About = RT_BIT(0), 253 RuntimeMenuApplicationActionType_All = 0xFFFF 251 RuntimeMenuApplicationActionType_Invalid = 0, 252 RuntimeMenuApplicationActionType_About = RT_BIT(0), 253 RuntimeMenuApplicationActionType_Preferences = RT_BIT(1), 254 RuntimeMenuApplicationActionType_All = 0xFFFF 254 255 }; 255 256 #endif /* Q_WS_MAC */ … … 335 336 #ifndef Q_WS_MAC 336 337 RuntimeMenuHelpActionType_About = RT_BIT(4), 338 RuntimeMenuHelpActionType_Preferences = RT_BIT(5), 337 339 #endif /* !Q_WS_MAC */ 338 340 RuntimeMenuHelpActionType_All = 0xFFFF -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp
r50165 r51392 629 629 else 630 630 gActionPool->action(UIActionIndex_Simple_About)->setEnabled(false); 631 632 /* Preferences action: */ 633 #ifdef Q_WS_MAC 634 if (m_pSession->allowedActionsMenuApplication() & RuntimeMenuApplicationActionType_Preferences) 635 #else /* !Q_WS_MAC */ 636 if (m_pSession->allowedActionsMenuHelp() & RuntimeMenuHelpActionType_Preferences) 637 #endif /* Q_WS_MAC */ 638 { 639 pMenu->addAction(gActionPool->action(UIActionIndex_Simple_Preferences)); 640 VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()), 641 m_pSession, SLOT(sltOpenGlobalPreferences())); 642 } 643 else 644 gActionPool->action(UIActionIndex_Simple_Preferences)->setEnabled(false); 631 645 } 632 646 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r51322 r51392 40 40 #include "UIConsoleEventHandler.h" 41 41 #include "UIFrameBuffer.h" 42 #include "UISettingsDialogSpecific.h" 42 43 #ifdef VBOX_WITH_VIDEOHWACCEL 43 44 # include "VBoxFBOverlay.h" … … 698 699 } 699 700 701 void UISession::sltOpenGlobalPreferences() 702 { 703 /* Check that we do NOT handling that already: */ 704 if (gActionPool->action(UIActionIndex_Simple_Preferences)->data().toBool()) 705 return; 706 /* Remember that we handling that already: */ 707 gActionPool->action(UIActionIndex_Simple_Preferences)->setData(true); 708 709 /* Create and execute global settings window: */ 710 QPointer<UISettingsDialogGlobal> pDialog = new UISettingsDialogGlobal(machineLogic()->activeMachineWindow()); 711 pDialog->execute(); 712 if (pDialog) 713 delete pDialog; 714 715 /* Remember that we do NOT handling that already: */ 716 gActionPool->action(UIActionIndex_Simple_Preferences)->setData(false); 717 } 718 700 719 void UISession::sltMousePointerShapeChange(bool fVisible, bool fAlpha, QPoint hotCorner, QSize size, QVector<uint8_t> shape) 701 720 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r51252 r51392 284 284 void sltCloseRuntimeUI(); 285 285 286 /** Open global preferences. */ 287 void sltOpenGlobalPreferences(); 288 286 289 /* Console events slots */ 287 290 void sltMousePointerShapeChange(bool fVisible, bool fAlpha, QPoint hotCorner, QSize size, QVector<uint8_t> shape);
Note:
See TracChangeset
for help on using the changeset viewer.