Changeset 55697 in vbox
- Timestamp:
- May 6, 2015 4:50:27 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
-
UIMachineLogic.cpp (modified) (7 diffs)
-
UIMachineLogic.h (modified) (2 diffs)
-
UISession.cpp (modified) (3 diffs)
-
fullscreen/UIMachineLogicFullscreen.cpp (modified) (1 diff)
-
normal/UIMachineLogicNormal.cpp (modified) (1 diff)
-
seamless/UIMachineLogicSeamless.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r55436 r55697 378 378 void UIMachineLogic::saveState() 379 379 { 380 /* Prevent auto-closure: */ 381 setPreventAutoClose(true); 380 /* Enable 'manual-override', 381 * preventing automatic Runtime UI closing: */ 382 setManualOverrideMode(true); 382 383 383 384 /* Was the step successful? */ … … 391 392 fSuccess = uisession()->saveState(); 392 393 393 /* Allow auto-closure: */394 set PreventAutoClose(false);394 /* Disable 'manual-override' finally: */ 395 setManualOverrideMode(false); 395 396 396 397 /* Manually close Runtime UI: */ … … 411 412 void UIMachineLogic::powerOff(bool fDiscardingState) 412 413 { 413 /* Prevent auto-closure: */ 414 setPreventAutoClose(true); 414 /* Enable 'manual-override', 415 * preventing automatic Runtime UI closing: */ 416 setManualOverrideMode(true); 415 417 416 418 /* Was the step successful? */ … … 420 422 fSuccess = uisession()->powerOff(fDiscardingState, fServerCrashed) || fServerCrashed; 421 423 422 /* Allow auto-closure: */423 set PreventAutoClose(false);424 /* Disable 'manual-override' finally: */ 425 setManualOverrideMode(false); 424 426 425 427 /* Manually close Runtime UI: */ … … 555 557 case KMachineState_Aborted: 556 558 { 557 /* I s it allowed to close Runtime UI?*/558 if (!is PreventAutoClose())559 /* If not in 'manual-override' mode: */ 560 if (!isManualOverrideMode()) 559 561 { 560 562 /* VM has been powered off, saved, teleported or aborted. … … 753 755 , m_pDragAndDropActions(0) 754 756 , m_fIsWindowsCreated(false) 755 , m_fIs PreventAutoClose(false)757 , m_fIsManualOverride(false) 756 758 #ifdef VBOX_WITH_DEBUGGER_GUI 757 759 , m_pDbgGui(0) … … 1506 1508 return; 1507 1509 1508 /* Do not try to close machine-window if restricted: */1509 if (is PreventAutoClose())1510 /* Do not close machine-window in 'manual-override' mode: */ 1511 if (isManualOverrideMode()) 1510 1512 return; 1511 1513 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r55401 r55697 118 118 UIMachineWindow* activeMachineWindow() const; 119 119 120 /* Maintenance getters/setters: */ 121 bool isPreventAutoClose() const { return m_fIsPreventAutoClose; } 122 void setPreventAutoClose(bool fIsPreventAutoClose) { m_fIsPreventAutoClose = fIsPreventAutoClose; } 120 /** Returns whether VM is in 'manual-override' mode. 121 * @note S.a. #m_fIsManualOverride description for more information. */ 122 bool isManualOverrideMode() const { return m_fIsManualOverride; } 123 /** Defines whether VM is in 'manual-override' mode. 124 * @note S.a. #m_fIsManualOverride description for more information. */ 125 void setManualOverrideMode(bool fIsManualOverride) { m_fIsManualOverride = fIsManualOverride; } 123 126 124 127 /** Adjusts machine-window(s) geometry if necessary. */ … … 361 364 362 365 bool m_fIsWindowsCreated : 1; 363 bool m_fIsPreventAutoClose : 1; 366 367 /** Holds whether VM is in 'manual-override' mode 368 * which means there will be no automatic UI shutdowns, 369 * visual representation mode changes and other similar routines. */ 370 bool m_fIsManualOverride : 1; 364 371 365 372 #ifdef VBOX_WITH_DEBUGGER_GUI -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r55687 r55697 273 273 } 274 274 275 /* Guard progressbar warnings from auto-closing: */ 276 if (uimachine()->machineLogic()) 277 uimachine()->machineLogic()->setPreventAutoClose(true); 275 /* Enable 'manual-override', 276 * preventing automatic Runtime UI closing 277 * and visual representation mode changes: */ 278 if (machineLogic()) 279 machineLogic()->setManualOverrideMode(true); 278 280 279 281 /* Show "Starting/Restoring" progress dialog: */ … … 295 297 } 296 298 297 /* Allow further auto-closing: */298 if ( uimachine()->machineLogic())299 uimachine()->machineLogic()->setPreventAutoClose(false);299 /* Disable 'manual-override' finally: */ 300 if (machineLogic()) 301 machineLogic()->setManualOverrideMode(false); 300 302 301 303 /* True by default: */ … … 1923 1925 if (fShouldWeClose) 1924 1926 { 1925 /* Prevent auto-closure during power off sequence: */ 1926 machineLogic()->setPreventAutoClose(true); 1927 /* Enable 'manual-override', 1928 * preventing automatic Runtime UI closing: */ 1929 if (machineLogic()) 1930 machineLogic()->setManualOverrideMode(true); 1927 1931 /* Power off VM: */ 1928 1932 bool fServerCrashed = false; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r55436 r55697 340 340 /* Do not try to change visual-state type if machine was not started yet: */ 341 341 if (!uisession()->isRunning() && !uisession()->isPaused()) 342 return; 343 344 /* Do not try to change visual-state type in 'manual override' mode: */ 345 if (isManualOverrideMode()) 342 346 return; 343 347 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r55436 r55697 70 70 /* Do not try to change visual-state type if machine was not started yet: */ 71 71 if (!uisession()->isRunning() && !uisession()->isPaused()) 72 return; 73 74 /* Do not try to change visual-state type in 'manual override' mode: */ 75 if (isManualOverrideMode()) 72 76 return; 73 77 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r55436 r55697 132 132 return; 133 133 134 /* Do not try to change visual-state type in 'manual override' mode: */ 135 if (isManualOverrideMode()) 136 return; 137 134 138 /* If 'seamless' visual-state type is no more supported: */ 135 139 if (!uisession()->isGuestSupportsSeamless())
Note:
See TracChangeset
for help on using the changeset viewer.

