Changeset 16304 in vbox
- Timestamp:
- Jan 28, 2009 12:47:48 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r16264 r16304 217 217 void updateMediaDriveState (VBoxDefs::MediaType aType); 218 218 void updateSharedFoldersState(); 219 void updateACPIStatus();220 219 221 220 void tryClose(); … … 327 326 QString caption_prefix; 328 327 329 QTimer *mACPITimer;330 bool mACPIEnabled : 1;331 332 328 bool no_auto_close : 1; 333 329 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r16264 r16304 224 224 , console (0) 225 225 , machine_state (KMachineState_Null) 226 , mACPIEnabled (false)227 226 , no_auto_close (false) 228 227 , mIsFullscreen (false) … … 245 244 246 245 idle_timer = new QTimer (this); 247 mACPITimer = new QTimer (this);248 246 249 247 #if !(defined (Q_WS_WIN) || defined (Q_WS_MAC)) … … 916 914 idle_timer->start (50); 917 915 918 /* start an idle timer that will update acpi status */919 connect (mACPITimer, SIGNAL (timeout()), SLOT (updateACPIStatus()));920 mACPITimer->start (1000);921 922 916 connect (console, SIGNAL (mouseStateChanged (int)), 923 917 this, SLOT (updateMouseState (int))); … … 1280 1274 static const char *kDiscardCurState = "discardCurState"; 1281 1275 1276 bool isACPIEnabled = csession.GetConsole().GetGuestEnteredACPIMode(); 1277 1282 1278 if (!console) 1283 1279 { … … 1347 1343 dlg.mRbSave->setFocus(); 1348 1344 } 1349 else if ((lastAction [0] == kPowerOff) && ! mACPIEnabled)1345 else if ((lastAction [0] == kPowerOff) && !isACPIEnabled) 1350 1346 { 1351 1347 dlg.mRbShutdown->setEnabled (false); … … 1519 1515 idle_timer->disconnect (SIGNAL (timeout()), this, SLOT (updateDeviceLights())); 1520 1516 1521 /* Stop ACPI update timer */1522 mACPITimer->stop();1523 mACPITimer->disconnect (SIGNAL (timeout()), this, SLOT (updateACPIStatus()));1524 1525 1517 /* Hide console window */ 1526 1518 hide(); … … 2609 2601 void VBoxConsoleWnd::vmACPIShutdown() 2610 2602 { 2611 if (! mACPIEnabled)2603 if (!csession.GetConsole().GetGuestEnteredACPIMode()) 2612 2604 return vboxProblem().cannotSendACPIToMachine(); 2613 2605 … … 3546 3538 } 3547 3539 3548 void VBoxConsoleWnd::updateACPIStatus()3549 {3550 mACPIEnabled = csession.GetConsole().GetGuestEnteredACPIMode();3551 }3552 3553 3540 /** 3554 3541 * Helper to safely close the main console window.
Note:
See TracChangeset
for help on using the changeset viewer.