- Timestamp:
- Jan 27, 2009 3:09:27 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 42075
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r15804 r16264 74 74 void refreshView(); 75 75 76 bool isWindowMaximized() const 77 { 76 bool isWindowMaximized() const 77 { 78 78 #ifdef Q_WS_MAC 79 79 /* On Mac OS X we didn't really jump to the fullscreen mode but … … 83 83 #else /* Q_WS_MAC */ 84 84 return QMainWindow::isMaximized(); 85 #endif /* Q_WS_MAC */ 85 #endif /* Q_WS_MAC */ 86 86 } 87 bool isWindowFullScreen() const 88 { 87 bool isWindowFullScreen() const 88 { 89 89 #ifdef Q_WS_MAC 90 90 /* On Mac OS X we didn't really jump to the fullscreen mode but … … 94 94 #else /* Q_WS_MAC */ 95 95 return QMainWindow::isFullScreen(); 96 #endif /* Q_WS_MAC */ 96 #endif /* Q_WS_MAC */ 97 97 } 98 98 … … 217 217 void updateMediaDriveState (VBoxDefs::MediaType aType); 218 218 void updateSharedFoldersState(); 219 void updateACPIStatus(); 219 220 220 221 void tryClose(); … … 326 327 QString caption_prefix; 327 328 329 QTimer *mACPITimer; 330 bool mACPIEnabled : 1; 331 328 332 bool no_auto_close : 1; 329 333 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r14441 r16264 232 232 void cannotDiscardSavedState (const CConsole &console); 233 233 234 void cannotSendACPIToMachine(); 235 234 236 void cannotSetSnapshotFolder (const CMachine &aMachine, const QString &aPath); 235 237 void cannotDiscardSnapshot (const CConsole &aConsole, -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r16256 r16264 224 224 , console (0) 225 225 , machine_state (KMachineState_Null) 226 , mACPIEnabled (false) 226 227 , no_auto_close (false) 227 228 , mIsFullscreen (false) … … 244 245 245 246 idle_timer = new QTimer (this); 247 mACPITimer = new QTimer (this); 246 248 247 249 #if !(defined (Q_WS_WIN) || defined (Q_WS_MAC)) … … 914 916 idle_timer->start (50); 915 917 918 /* start an idle timer that will update acpi status */ 919 connect (mACPITimer, SIGNAL (timeout()), SLOT (updateACPIStatus())); 920 mACPITimer->start (1000); 921 916 922 connect (console, SIGNAL (mouseStateChanged (int)), 917 923 this, SLOT (updateMouseState (int))); … … 1336 1342 cmachine.GetExtraData (VBoxDefs::GUI_LastCloseAction).split (','); 1337 1343 AssertWrapperOk (cmachine); 1338 if (lastAction [0] == kPowerOff) 1339 { 1340 dlg.mRbPowerOff->setChecked (true); 1341 dlg.mRbPowerOff->setFocus(); 1342 } 1343 else if (lastAction [0] == kShutdown) 1344 { 1345 dlg.mRbShutdown->setChecked (true); 1346 dlg.mRbShutdown->setFocus(); 1347 } 1348 else if (lastAction [0] == kSave) 1344 if (lastAction [0] == kSave) 1349 1345 { 1350 1346 dlg.mRbSave->setChecked (true); 1351 1347 dlg.mRbSave->setFocus(); 1348 } 1349 else if ((lastAction [0] == kPowerOff) && !mACPIEnabled) 1350 { 1351 dlg.mRbShutdown->setEnabled (false); 1352 dlg.mRbPowerOff->setChecked (true); 1353 dlg.mRbPowerOff->setFocus(); 1352 1354 } 1353 1355 else /* the default is ACPI Shutdown */ … … 1517 1519 idle_timer->disconnect (SIGNAL (timeout()), this, SLOT (updateDeviceLights())); 1518 1520 1521 /* Stop ACPI update timer */ 1522 mACPITimer->stop(); 1523 mACPITimer->disconnect (SIGNAL (timeout()), this, SLOT (updateACPIStatus())); 1524 1519 1525 /* Hide console window */ 1520 1526 hide(); … … 2603 2609 void VBoxConsoleWnd::vmACPIShutdown() 2604 2610 { 2611 if (!mACPIEnabled) 2612 return vboxProblem().cannotSendACPIToMachine(); 2613 2605 2614 if (console) 2606 2615 { … … 3537 3546 } 3538 3547 3548 void VBoxConsoleWnd::updateACPIStatus() 3549 { 3550 mACPIEnabled = csession.GetConsole().GetGuestEnteredACPIMode(); 3551 } 3552 3539 3553 /** 3540 3554 * Helper to safely close the main console window. -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r14869 r16264 922 922 } 923 923 924 void VBoxProblemReporter::cannotSendACPIToMachine() 925 { 926 message (mainWindowShown(), Warning, 927 tr ("Cannot send the ACPI Power Button press event to the " 928 "virtual machine because ACPI is not available now.")); 929 } 930 924 931 void VBoxProblemReporter::cannotSetSnapshotFolder (const CMachine &aMachine, 925 932 const QString &aPath)
Note:
See TracChangeset
for help on using the changeset viewer.