Changeset 49466 in vbox for trunk/src/VBox
- Timestamp:
- Nov 13, 2013 1:35:56 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp
r49462 r49466 225 225 #endif /* !Q_WS_MAC */ 226 226 pMenu->addAction(gActionPool->action(UIActionIndexRuntime_Simple_Close)); 227 if (m_pSession->isAllCloseActionsRestricted()) 228 gActionPool->action(UIActionIndexRuntime_Simple_Close)->setEnabled(false); 227 229 } 228 230 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r49465 r49466 134 134 , m_defaultCloseAction(MachineCloseAction_Invalid) 135 135 , m_restrictedCloseActions(MachineCloseAction_Invalid) 136 , m_fAllCloseActionsRestricted(false) 136 137 , m_fSnapshotOperationsAllowed(true) 137 138 /* Common flags: */ … … 1092 1093 m_defaultCloseAction = vboxGlobal().defaultMachineCloseAction(machine); 1093 1094 m_restrictedCloseActions = vboxGlobal().restrictedMachineCloseActions(machine); 1095 m_fAllCloseActionsRestricted = (m_restrictedCloseActions & MachineCloseAction_SaveState) 1096 && (m_restrictedCloseActions & MachineCloseAction_Shutdown) 1097 && (m_restrictedCloseActions & MachineCloseAction_PowerOff); 1098 // Close VM Dialog hides PowerOff_RestoringSnapshot implicitly if PowerOff is hidden.. 1099 // && (m_restrictedCloseActions & MachineCloseAction_PowerOff_RestoringSnapshot); 1094 1100 1095 1101 /* Should we allow snapshot operations? */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r49465 r49466 111 111 /** Returns merged restricted close actions. */ 112 112 MachineCloseAction restrictedCloseActions() const { return m_restrictedCloseActions; } 113 /** Returns whether all the close actions are restricted. */ 114 bool isAllCloseActionsRestricted() const { return m_fAllCloseActionsRestricted; } 113 115 /** @} */ 114 116 … … 333 335 /** Merged restricted close actions. */ 334 336 MachineCloseAction m_restrictedCloseActions; 337 /** Determines whether all the close actions are restricted. */ 338 bool m_fAllCloseActionsRestricted; 335 339 /** @} */ 336 340
Note:
See TracChangeset
for help on using the changeset viewer.