VirtualBox

Changeset 16304 in vbox


Ignore:
Timestamp:
Jan 28, 2009 12:47:48 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3225: Disable ACPI actions if guest is not entered ACPI for now. Removed unnecessary timer.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 edited

Legend:

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

    r16264 r16304  
    217217    void updateMediaDriveState (VBoxDefs::MediaType aType);
    218218    void updateSharedFoldersState();
    219     void updateACPIStatus();
    220219
    221220    void tryClose();
     
    327326    QString caption_prefix;
    328327
    329     QTimer *mACPITimer;
    330     bool mACPIEnabled : 1;
    331 
    332328    bool no_auto_close : 1;
    333329
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r16264 r16304  
    224224    , console (0)
    225225    , machine_state (KMachineState_Null)
    226     , mACPIEnabled (false)
    227226    , no_auto_close (false)
    228227    , mIsFullscreen (false)
     
    245244
    246245    idle_timer = new QTimer (this);
    247     mACPITimer = new QTimer (this);
    248246
    249247#if !(defined (Q_WS_WIN) || defined (Q_WS_MAC))
     
    916914    idle_timer->start (50);
    917915
    918     /* start an idle timer that will update acpi status */
    919     connect (mACPITimer, SIGNAL (timeout()), SLOT (updateACPIStatus()));
    920     mACPITimer->start (1000);
    921 
    922916    connect (console, SIGNAL (mouseStateChanged (int)),
    923917             this, SLOT (updateMouseState (int)));
     
    12801274    static const char *kDiscardCurState = "discardCurState";
    12811275
     1276    bool isACPIEnabled = csession.GetConsole().GetGuestEnteredACPIMode();
     1277
    12821278    if (!console)
    12831279    {
     
    13471343                    dlg.mRbSave->setFocus();
    13481344                }
    1349                 else if ((lastAction [0] == kPowerOff) && !mACPIEnabled)
     1345                else if ((lastAction [0] == kPowerOff) && !isACPIEnabled)
    13501346                {
    13511347                    dlg.mRbShutdown->setEnabled (false);
     
    15191515        idle_timer->disconnect (SIGNAL (timeout()), this, SLOT (updateDeviceLights()));
    15201516
    1521         /* Stop ACPI update timer */
    1522         mACPITimer->stop();
    1523         mACPITimer->disconnect (SIGNAL (timeout()), this, SLOT (updateACPIStatus()));
    1524 
    15251517        /* Hide console window */
    15261518        hide();
     
    26092601void VBoxConsoleWnd::vmACPIShutdown()
    26102602{
    2611     if (!mACPIEnabled)
     2603    if (!csession.GetConsole().GetGuestEnteredACPIMode())
    26122604        return vboxProblem().cannotSendACPIToMachine();
    26132605
     
    35463538}
    35473539
    3548 void VBoxConsoleWnd::updateACPIStatus()
    3549 {
    3550     mACPIEnabled = csession.GetConsole().GetGuestEnteredACPIMode();
    3551 }
    3552 
    35533540/**
    35543541 *  Helper to safely close the main console window.
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