Changeset 98653 in vbox
- Timestamp:
- Feb 20, 2023 1:36:19 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155953
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r98621 r98653 1053 1053 QApplication::translate("UIMessageCenter", "Can't shutdown machine ..."), 1054 1054 QApplication::translate("UIMessageCenter", "Failed to send the ACPI Power Button press event to the virtual machine " 1055 "<b>%1</b>.").arg(CConsole(comConsole).GetMachine().GetName()) + 1056 UIErrorString::formatErrorInfo(comConsole)); 1057 } 1058 1059 /* static */ 1060 void UINotificationMessage::cannotResetMachine(const CConsole &comConsole) 1061 { 1062 createMessage( 1063 QApplication::translate("UIMessageCenter", "Can't reset machine ..."), 1064 QApplication::translate("UIMessageCenter", "Failed to reset the virtual machine " 1055 1065 "<b>%1</b>.").arg(CConsole(comConsole).GetMachine().GetName()) + 1056 1066 UIErrorString::formatErrorInfo(comConsole)); -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r98621 r98653 425 425 * @param comConsole Brings console trying to shutdown machine. */ 426 426 static void cannotACPIShutdownMachine(const CConsole &comConsole); 427 /** Notifies about inability to reset machine. 428 * @param comConsole Brings console trying to reset machine. */ 429 static void cannotResetMachine(const CConsole &comConsole); 427 430 /** @} */ 428 431 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98621 r98653 324 324 { 325 325 return uisession()->isGuestScreenUnDrawable(); 326 } 327 328 bool UIMachine::reset() 329 { 330 return uisession()->reset(); 326 331 } 327 332 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98621 r98653 233 233 bool isGuestScreenUnDrawable() const; 234 234 235 /** Resets VM. */ 236 bool reset(); 235 237 /** Performes VM pausing. */ 236 238 bool pause(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98647 r98653 3202 3202 void UIMachineLogic::reset(bool fShowConfirmation) 3203 3203 { 3204 if ( fShowConfirmation)3205 {3206 /* Confirm/Reset current console: */3207 if (msgCenter().confirmResetMachine(machineName()))3208 console().Reset();3209 }3210 else3211 console().Reset();3212 3213 /* TODO_NEW_CORE: On reset the additional screens didn't get a display3214 update. Emulate this for now until it get fixed. */3215 ulong uMonitorCount = machine().GetGraphicsAdapter().GetMonitorCount();3216 for (ulong uScreenId = 1; uScreenId < uMonitorCount; ++uScreenId)3217 machineWindows().at(uScreenId)->update();3218 } 3204 if ( !fShowConfirmation 3205 || msgCenter().confirmResetMachine(machineName())) 3206 { 3207 const bool fSuccess = uimachine()->reset(); 3208 if (fSuccess) 3209 { 3210 // WORKAROUND: 3211 // On reset the additional screens didn't get a display 3212 // update. Emulate this for now until it get fixed. */ 3213 const ulong uMonitorCount = machine().GetGraphicsAdapter().GetMonitorCount(); 3214 for (ulong uScreenId = 1; uScreenId < uMonitorCount; ++uScreenId) 3215 machineWindows().at(uScreenId)->update(); 3216 } 3217 } 3218 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98621 r98653 257 257 { 258 258 return mainMachineWindow() ? mainMachineWindow()->winId() : 0; 259 } 260 261 bool UISession::reset() 262 { 263 CConsole comConsole = console(); 264 comConsole.Reset(); 265 const bool fSuccess = comConsole.isOk(); 266 if (!fSuccess) 267 UINotificationMessage::cannotResetMachine(comConsole); 268 return fSuccess; 259 269 } 260 270 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98621 r98653 230 230 || machineState() == KMachineState_Saving; } 231 231 232 /** Resets VM. */ 233 bool reset(); 232 234 /** Performes VM pausing. */ 233 235 bool pause() { return setPause(true); }
Note:
See TracChangeset
for help on using the changeset viewer.