VirtualBox

Changeset 16372 in vbox


Ignore:
Timestamp:
Jan 29, 2009 3:25:19 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3225: Disable ACPI actions if ACPI is not supported atm. Logic reworked according last requirements from comment #16.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r16365 r16372  
    13481348                QStringList lastAction =
    13491349                    cmachine.GetExtraData (VBoxDefs::GUI_LastCloseAction).split (',');
     1350                bool wasDiscardCurState = lastAction.count() > 1 &&
     1351                                          lastAction [1] == kDiscardCurState;
    13501352                AssertWrapperOk (cmachine);
    13511353                if (lastAction [0] == kSave)
     
    13541356                    dlg.mRbSave->setFocus();
    13551357                }
    1356                 else if ((lastAction [0] == kPowerOff) && !isACPIEnabled)
     1358                else if (wasDiscardCurState || !isACPIEnabled)
    13571359                {
    1358                     dlg.mRbShutdown->setEnabled (false);
     1360                    dlg.mRbShutdown->setEnabled (isACPIEnabled);
    13591361                    dlg.mRbPowerOff->setChecked (true);
    13601362                    dlg.mRbPowerOff->setFocus();
     
    13651367                    dlg.mRbShutdown->setFocus();
    13661368                }
    1367                 dlg.mCbDiscardCurState->setChecked (
    1368                     lastAction.count() > 1 && lastAction [1] == kDiscardCurState);
     1369                dlg.mCbDiscardCurState->setChecked (wasDiscardCurState);
    13691370            }
    13701371            else
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