Changeset 98401 in vbox
- Timestamp:
- Feb 1, 2023 2:53:16 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155645
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo
-
old new 19 19 /branches/dsen/gui2:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 20 20 /branches/dsen/gui3:79645-79692 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344 22 22 /trunk/src:92342,154921
-
- Property svn:mergeinfo
-
trunk/src/VBox
- Property svn:mergeinfo
-
old new 19 19 /branches/dsen/gui2/src/VBox:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 20 20 /branches/dsen/gui3/src/VBox:79645-79692 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends
- Property svn:mergeinfo
-
old new 16 16 /branches/dsen/gui2/src/VBox/Frontends:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 17 17 /branches/dsen/gui3/src/VBox/Frontends:79645-79692 18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336 18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98400 r98401 711 711 , m_fIsMouseIntegrated(true) 712 712 , m_iMouseState(0) 713 , m_defaultCloseAction(MachineCloseAction_Invalid) 714 , m_restrictedCloseActions(MachineCloseAction_Invalid) 713 715 { 714 716 m_spInstance = this; … … 737 739 prepareBranding(); 738 740 prepareKeyboard(); 741 prepareClose(); 739 742 prepareMachineLogic(); 740 743 … … 1002 1005 } 1003 1006 1007 void UIMachine::prepareClose() 1008 { 1009 /* What is the default close action and the restricted are? */ 1010 const QUuid uMachineID = uiCommon().managedVMUuid(); 1011 m_defaultCloseAction = gEDataManager->defaultMachineCloseAction(uMachineID); 1012 m_restrictedCloseActions = gEDataManager->restrictedMachineCloseActions(uMachineID); 1013 1014 /* Log whether HID LEDs sync is enabled: */ 1015 #if defined(VBOX_WS_MAC) || defined(VBOX_WS_WIN) 1016 LogRel(("GUI: HID LEDs sync is %s\n", isHidLedsSyncEnabled() ? "enabled" : "disabled")); 1017 #else 1018 LogRel(("GUI: HID LEDs sync is not supported on this platform\n")); 1019 #endif 1020 } 1021 1004 1022 void UIMachine::prepareMachineLogic() 1005 1023 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98400 r98401 296 296 /** @} */ 297 297 298 /** @name Close configuration stuff. 299 * @{ */ 300 /** Returns default close action. */ 301 MachineCloseAction defaultCloseAction() const { return m_defaultCloseAction; } 302 /** Returns merged restricted close actions. */ 303 MachineCloseAction restrictedCloseActions() const { return m_restrictedCloseActions; } 304 /** @} */ 305 298 306 public slots: 299 307 … … 422 430 /** Prepare routine: Keyboard stuff. */ 423 431 void prepareKeyboard(); 432 /** Prepare routine: Close stuff. */ 433 void prepareClose(); 424 434 /** Prepare routine: Machine-logic stuff. */ 425 435 void prepareMachineLogic(); … … 613 623 int m_iMouseState; 614 624 /** @} */ 625 626 /** @name Close configuration stuff. 627 * @{ */ 628 /** Default close action. */ 629 MachineCloseAction m_defaultCloseAction; 630 /** Merged restricted close actions. */ 631 MachineCloseAction m_restrictedCloseActions; 632 /** @} */ 615 633 }; 616 634 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r98385 r98401 409 409 410 410 /* If default close-action defined and not restricted: */ 411 MachineCloseAction defaultCloseAction = ui session()->defaultCloseAction();412 MachineCloseAction restrictedCloseActions = ui session()->restrictedCloseActions();411 MachineCloseAction defaultCloseAction = uimachine()->defaultCloseAction(); 412 MachineCloseAction restrictedCloseActions = uimachine()->restrictedCloseActions(); 413 413 if ((defaultCloseAction != MachineCloseAction_Invalid) && 414 414 !(restrictedCloseActions & defaultCloseAction)) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98400 r98401 176 176 loadVMSettings(); 177 177 178 /* Log whether HID LEDs sync is enabled: */179 #if defined(VBOX_WS_MAC) || defined(VBOX_WS_WIN)180 LogRel(("GUI: HID LEDs sync is %s\n",181 uimachine()->isHidLedsSyncEnabled()182 ? "enabled" : "disabled"));183 #else /* !VBOX_WS_MAC && !VBOX_WS_WIN */184 LogRel(("GUI: HID LEDs sync is not supported on this platform\n"));185 #endif /* !VBOX_WS_MAC && !VBOX_WS_WIN */186 187 178 #ifdef VBOX_GUI_WITH_PIDFILE 188 179 uiCommon().createPidfile(); … … 549 540 , m_machineStatePrevious(KMachineState_Null) 550 541 , m_machineState(KMachineState_Null) 551 , m_defaultCloseAction(MachineCloseAction_Invalid)552 , m_restrictedCloseActions(MachineCloseAction_Invalid)553 , m_fAllCloseActionsRestricted(false)554 542 /* Common flags: */ 555 543 , m_fInitialized(false) … … 586 574 prepareConnections(); 587 575 prepareSignalHandling(); 588 589 /* Load settings: */590 loadSessionSettings();591 576 592 577 /* True by default: */ … … 734 719 } 735 720 736 void UISession::loadSessionSettings()737 {738 /* Load extra-data settings: */739 {740 /* Get machine ID: */741 const QUuid uMachineID = uiCommon().managedVMUuid();742 743 /* What is the default close action and the restricted are? */744 m_defaultCloseAction = gEDataManager->defaultMachineCloseAction(uMachineID);745 m_restrictedCloseActions = gEDataManager->restrictedMachineCloseActions(uMachineID);746 m_fAllCloseActionsRestricted = (!uiCommon().isSeparateProcess() || (m_restrictedCloseActions & MachineCloseAction_Detach))747 && (m_restrictedCloseActions & MachineCloseAction_SaveState)748 && (m_restrictedCloseActions & MachineCloseAction_Shutdown)749 && (m_restrictedCloseActions & MachineCloseAction_PowerOff);750 }751 }752 753 721 void UISession::cleanupFramebuffers() 754 722 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98399 r98401 176 176 /** Returns the machine name. */ 177 177 const QString& machineName() const { return m_strMachineName; } 178 179 178 KMachineState machineStatePrevious() const { return m_machineStatePrevious; } 180 179 KMachineState machineState() const { return m_machineState; } 180 181 181 UIMachineLogic* machineLogic() const; 182 182 QWidget* mainMachineWindow() const; 183 183 WId mainMachineWindowId() const; 184 184 UIMachineWindow *activeMachineWindow() const; 185 186 /** @name Application Close configuration stuff.187 * @{ */188 /** Defines @a defaultCloseAction. */189 void setDefaultCloseAction(MachineCloseAction defaultCloseAction) { m_defaultCloseAction = defaultCloseAction; }190 /** Returns default close action. */191 MachineCloseAction defaultCloseAction() const { return m_defaultCloseAction; }192 /** Returns merged restricted close actions. */193 MachineCloseAction restrictedCloseActions() const { return m_restrictedCloseActions; }194 /** Returns whether all the close actions are restricted. */195 bool isAllCloseActionsRestricted() const { return m_fAllCloseActionsRestricted; }196 /** @} */197 185 198 186 /** Returns whether visual @a state is allowed. */ … … 329 317 void prepareSignalHandling(); 330 318 331 /* Settings stuff: */332 void loadSessionSettings();333 334 319 /* Cleanup helpers: */ 335 320 void cleanupFramebuffers(); … … 370 355 /** Holds the machine name. */ 371 356 QString m_strMachineName; 357 /** Holds the previous machine state. */ 358 KMachineState m_machineStatePrevious; 359 /** Holds the actual machine state. */ 360 KMachineState m_machineState; 372 361 373 362 /* Frame-buffers vector: */ 374 363 QVector<UIFrameBuffer*> m_frameBufferVector; 375 376 /* Common variables: */377 KMachineState m_machineStatePrevious;378 KMachineState m_machineState;379 380 /** @name Application Close configuration variables.381 * @{ */382 /** Default close action. */383 MachineCloseAction m_defaultCloseAction;384 /** Merged restricted close actions. */385 MachineCloseAction m_restrictedCloseActions;386 /** Determines whether all the close actions are restricted. */387 bool m_fAllCloseActionsRestricted;388 /** @} */389 364 390 365 /* Common flags: */
Note:
See TracChangeset
for help on using the changeset viewer.