Changeset 49467 in vbox for trunk/src/VBox
- Timestamp:
- Nov 13, 2013 1:45:14 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r49465 r49467 291 291 /* Prepare close-dialog: */ 292 292 QWidget *pParentDlg = windowManager().realParentWindow(this); 293 QPointer<UIVMCloseDialog> pCloseDlg = new UIVMCloseDialog(pParentDlg, m, session()); 293 QPointer<UIVMCloseDialog> pCloseDlg = new UIVMCloseDialog(pParentDlg, m, 294 session().GetConsole().GetGuestEnteredACPIMode()); 294 295 295 296 /* Make sure close-dialog is valid: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
r49465 r49467 46 46 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 47 47 48 UIVMCloseDialog::UIVMCloseDialog(QWidget *pParent, CMachine &machine, const CSession &session)48 UIVMCloseDialog::UIVMCloseDialog(QWidget *pParent, CMachine &machine, bool fIsACPIEnabled) 49 49 : QIWithRetranslateUI<QIDialog>(pParent) 50 50 , m_machine(machine) 51 , m_ session(session)51 , m_fIsACPIEnabled(fIsACPIEnabled) 52 52 , m_fValid(false) 53 , m_fIsACPIEnabled(false)54 53 , m_lastCloseAction(MachineCloseAction_Invalid) 55 54 { … … 297 296 /* Make 'Shutdown button' visible/hidden depending on restriction: */ 298 297 setShutdownButtonVisible(fIsACPIShutdownAllowed); 299 /* Make 'Shutdown button' enabled/disabled depending on ACPI-state & machine-state: */300 m_fIsACPIEnabled = m_session.GetConsole().GetGuestEnteredACPIMode();301 298 setShutdownButtonEnabled(m_fIsACPIEnabled && machineState != KMachineState_Stuck); 302 299 /* Make 'Power off' button visible/hidden depending on restriction: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h
r49465 r49467 27 27 /* Forward declarations: */ 28 28 class CMachine; 29 class CSession;30 29 class QLabel; 31 30 class QRadioButton; … … 40 39 41 40 /* Constructor: */ 42 UIVMCloseDialog(QWidget *pParent, CMachine &machine, const CSession &session);41 UIVMCloseDialog(QWidget *pParent, CMachine &machine, bool fIsACPIEnabled); 43 42 44 43 /* API: Validation stuff: */ … … 96 95 /* Variables: */ 97 96 CMachine &m_machine; 98 const CSession &m_session;97 bool m_fIsACPIEnabled; 99 98 bool m_fValid; 100 bool m_fIsACPIEnabled;101 99 QString m_strDiscardCheckBoxText; 102 100 MachineCloseAction m_lastCloseAction;
Note:
See TracChangeset
for help on using the changeset viewer.