VirtualBox

Changeset 49467 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 13, 2013 1:45:14 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Close actions handling rework (step 3): Some change in Close VM dialog initialization.

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  
    291291        /* Prepare close-dialog: */
    292292        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());
    294295
    295296        /* Make sure close-dialog is valid: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp

    r49465 r49467  
    4646#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4747
    48 UIVMCloseDialog::UIVMCloseDialog(QWidget *pParent, CMachine &machine, const CSession &session)
     48UIVMCloseDialog::UIVMCloseDialog(QWidget *pParent, CMachine &machine, bool fIsACPIEnabled)
    4949    : QIWithRetranslateUI<QIDialog>(pParent)
    5050    , m_machine(machine)
    51     , m_session(session)
     51    , m_fIsACPIEnabled(fIsACPIEnabled)
    5252    , m_fValid(false)
    53     , m_fIsACPIEnabled(false)
    5453    , m_lastCloseAction(MachineCloseAction_Invalid)
    5554{
     
    297296    /* Make 'Shutdown button' visible/hidden depending on restriction: */
    298297    setShutdownButtonVisible(fIsACPIShutdownAllowed);
    299     /* Make 'Shutdown button' enabled/disabled depending on ACPI-state & machine-state: */
    300     m_fIsACPIEnabled = m_session.GetConsole().GetGuestEnteredACPIMode();
    301298    setShutdownButtonEnabled(m_fIsACPIEnabled && machineState != KMachineState_Stuck);
    302299    /* Make 'Power off' button visible/hidden depending on restriction: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h

    r49465 r49467  
    2727/* Forward declarations: */
    2828class CMachine;
    29 class CSession;
    3029class QLabel;
    3130class QRadioButton;
     
    4039
    4140    /* Constructor: */
    42     UIVMCloseDialog(QWidget *pParent, CMachine &machine, const CSession &session);
     41    UIVMCloseDialog(QWidget *pParent, CMachine &machine, bool fIsACPIEnabled);
    4342
    4443    /* API: Validation stuff: */
     
    9695    /* Variables: */
    9796    CMachine &m_machine;
    98     const CSession &m_session;
     97    bool m_fIsACPIEnabled;
    9998    bool m_fValid;
    100     bool m_fIsACPIEnabled;
    10199    QString m_strDiscardCheckBoxText;
    102100    MachineCloseAction m_lastCloseAction;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette