Changeset 51051 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 11, 2014 3:56:09 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 93273
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r51021 r51051 786 786 m_machineState = state; 787 787 788 /* Update session settings: */789 updateSessionSettings();790 791 788 /* Notify listeners about machine state changed: */ 792 789 emit sigMachineStateChange(); … … 1150 1147 1151 1148 /* Should we allow reconfiguration? */ 1152 m_fReconfigurable = VBoxGlobal::shouldWeAllowMachineReconfiguration(machine); 1153 updateSessionSettings(); 1149 m_fReconfigurable = VBoxGlobal::shouldWeAllowMachineReconfiguration(machine); 1150 /* Should we allow snapshot operations? */ 1151 m_fSnapshotOperationsAllowed = vboxGlobal().shouldWeAllowSnapshotOperations(machine); 1154 1152 1155 1153 /* What is the default close action and the restricted are? */ … … 1162 1160 // && (m_restrictedCloseActions & MachineCloseAction_PowerOff_RestoringSnapshot); 1163 1161 1164 /* Should we allow snapshot operations? */1165 m_fSnapshotOperationsAllowed = vboxGlobal().shouldWeAllowSnapshotOperations(machine);1166 1167 1162 #if 0 /* Disabled for now! */ 1168 1163 # ifdef Q_WS_WIN … … 1173 1168 #endif 1174 1169 } 1170 1171 /* Update session settings: */ 1172 updateSessionSettings(); 1175 1173 } 1176 1174 … … 1247 1245 void UISession::updateSessionSettings() 1248 1246 { 1249 bool fAllowReconfiguration = m_machineState != KMachineState_Stuck && m_fReconfigurable; 1250 gActionPool->action(UIActionIndexRuntime_Simple_SettingsDialog)->setEnabled(fAllowReconfiguration); 1251 gActionPool->action(UIActionIndexRuntime_Simple_StorageSettings)->setEnabled(fAllowReconfiguration); 1252 gActionPool->action(UIActionIndexRuntime_Simple_SharedFoldersSettings)->setEnabled(fAllowReconfiguration); 1253 gActionPool->action(UIActionIndexRuntime_Simple_VideoCaptureSettings)->setEnabled(fAllowReconfiguration); 1254 gActionPool->action(UIActionIndexRuntime_Simple_NetworkSettings)->setEnabled(fAllowReconfiguration); 1247 /* Particularly enable/disable reconfigurable action: */ 1248 gActionPool->action(UIActionIndexRuntime_Simple_SettingsDialog)->setEnabled(m_fReconfigurable); 1249 gActionPool->action(UIActionIndexRuntime_Simple_StorageSettings)->setEnabled(m_fReconfigurable); 1250 gActionPool->action(UIActionIndexRuntime_Simple_SharedFoldersSettings)->setEnabled(m_fReconfigurable); 1251 gActionPool->action(UIActionIndexRuntime_Simple_VideoCaptureSettings)->setEnabled(m_fReconfigurable); 1252 gActionPool->action(UIActionIndexRuntime_Simple_NetworkSettings)->setEnabled(m_fReconfigurable); 1253 /* Particularly enable/disable snapshot related action: */ 1254 gActionPool->action(UIActionIndexRuntime_Simple_TakeSnapshot)->setEnabled(m_fSnapshotOperationsAllowed); 1255 1255 } 1256 1256
Note:
See TracChangeset
for help on using the changeset viewer.