Changeset 13374 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 17, 2008 1:01:44 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r11228 r13374 170 170 void cannotTakeSnapshot (const CProgress &progress); 171 171 void cannotStopMachine (const CConsole &console); 172 void cannotStopMachine (const CProgress &progress); 172 173 void cannotDeleteMachine (const CVirtualBox &vbox, const CMachine &machine); 173 174 void cannotDiscardSavedState (const CConsole &console); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r12424 r13374 1302 1302 if (dlg.rbPowerOff->isChecked()) 1303 1303 { 1304 cconsole.PowerDown(); 1305 if (!cconsole.isOk()) 1304 CProgress progress = cconsole.PowerDownAsync(); 1305 1306 if (cconsole.isOk()) 1306 1307 { 1307 /// @todo (dmik) add an option to close the GUI anyway 1308 // and handle it 1309 vboxProblem().cannotStopMachine (cconsole); 1308 /* show the power down progress dialog */ 1309 vboxProblem() 1310 .showModalProgressDialog (progress, cmachine.GetName(), 1311 this, 0); 1312 if (progress.GetResultCode() != 0) 1313 vboxProblem().cannotStopMachine (progress); 1314 else 1315 success = true; 1310 1316 } 1311 1317 else 1318 vboxProblem().cannotStopMachine (cconsole); 1319 1320 if (success) 1312 1321 { 1313 /* 1314 * set success to true even if we fail to discard the 1315 * current state later -- the console window will be 1316 * closed anyway 1317 */ 1318 success = true; 1322 /* Note: leave success = true even if we fail to 1323 * discard the current state later -- the console window 1324 * will closed anyway */ 1319 1325 1320 1326 /* discard the current state if requested */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r11228 r13374 811 811 } 812 812 813 void VBoxProblemReporter::cannotStopMachine (const CProgress &progress) 814 { 815 AssertWrapperOk (progress); 816 CConsole console = CProgress (progress).GetInitiator(); 817 AssertWrapperOk (console); 818 819 message (mainWindowShown(), Error, 820 tr ("Failed to stop the virtual machine <b>%1</b>.") 821 .arg (console.GetMachine().GetName()), 822 formatErrorInfo (progress.GetErrorInfo())); 823 } 824 813 825 void VBoxProblemReporter::cannotDeleteMachine (const CVirtualBox &vbox, 814 826 const CMachine &machine)
Note:
See TracChangeset
for help on using the changeset viewer.