Changeset 26815 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
- Timestamp:
- Feb 26, 2010 2:43:37 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r26773 r26815 27 27 28 28 /* Local includes */ 29 #include "COMDefs.h" 29 30 #include "VBoxGlobal.h" 30 31 #include "VBoxProblemReporter.h" … … 55 56 prepareRequiredFeatures(); 56 57 57 /* Load common logic settings: */58 loadLogicSettings();59 60 58 /* Prepare normal machine window: */ 61 59 prepareMachineWindow(); 60 61 /* Initialization: */ 62 sltMachineStateChanged(); 63 sltAdditionsStateChanged(); 64 sltMouseCapabilityChanged(); 62 65 } 63 66 … … 66 69 /* Cleanup normal machine window: */ 67 70 cleanupMachineWindow(); 68 69 /* Save common logic settings: */70 saveLogicSettings();71 71 } 72 72 … … 97 97 void UIMachineLogicNormal::prepareActionConnections() 98 98 { 99 /* Base -class connections: */99 /* Base class connections: */ 100 100 UIMachineLogic::prepareActionConnections(); 101 101 … … 124 124 setMachineWindowWrapper(UIMachineWindow::create(this, visualStateType())); 125 125 126 bool bIsSaved = machineState() == KMachineState_Saved;127 bool bIsRunning = machineState() == KMachineState_Running ||128 machineState() == KMachineState_Teleporting ||129 machineState() == KMachineState_LiveSnapshotting;130 bool bIsRunningOrPaused = bIsRunning ||131 machineState() == KMachineState_Paused;132 133 126 /* If we are not started yet: */ 134 if (! bIsRunningOrPaused)127 if (!uisession()->isRunning() && !uisession()->isPaused()) 135 128 { 136 129 /* Get current machine/console: */ … … 143 136 144 137 /* Shows first run wizard if necessary: */ 145 if ( isFirstTimeStarted())138 if (uisession()->isFirstTimeStarted()) 146 139 { 147 140 UIFirstRunWzd wzd(machineWindowWrapper()->machineWindow(), machine); … … 160 153 } 161 154 162 /* Disable auto 155 /* Disable auto-closure because we want to have a chance to show the error dialog on startup failure: */ 163 156 setPreventAutoClose(true); 164 157 165 158 /* Show "Starting/Restoring" progress dialog: */ 166 if ( bIsSaved)159 if (uisession()->isSaved()) 167 160 vboxProblem().showModalProgressDialog(progress, machine.GetName(), machineWindowWrapper()->machineWindow(), 0); 168 161 else … … 180 173 qApp->processEvents(); 181 174 182 /* Enable auto 175 /* Enable auto-closure again: */ 183 176 setPreventAutoClose(false); 184 177 185 178 /* Check if we missed a really quick termination after successful startup, and process it if we did: */ 186 if (machineState() == KMachineState_PoweredOff || machineState() == KMachineState_Saved || 187 machineState() == KMachineState_Teleported || machineState() == KMachineState_Aborted) 179 if (uisession()->isTurnedOff()) 188 180 { 189 181 machineWindowWrapper()->machineWindow()->close(); … … 216 208 #ifdef VBOX_WITH_UPDATE_REQUEST 217 209 /* Check for updates if necessary: */ 218 vboxGlobal().showUpdateDialog(false /* aForce*/);210 vboxGlobal().showUpdateDialog(false /* force request? */); 219 211 #endif 220 212 } … … 227 219 return; 228 220 229 /* Cleanup machine window: */221 /* Cleanup normal machine window: */ 230 222 UIMachineWindow::destroy(machineWindowWrapper()); 231 223 setMachineWindowWrapper(0);
Note:
See TracChangeset
for help on using the changeset viewer.