Changeset 28937 in vbox
- Timestamp:
- Apr 30, 2010 1:22:46 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotsWgt.cpp
r28842 r28937 448 448 s = curStateItem()->getCurrentState(); 449 449 450 /* Whether taking or deleting snapshots is possible right now */ 451 bool canTakeDeleteSnapshot = !busy 452 || s == KMachineState_PoweredOff 453 || s == KMachineState_Saved 454 || s == KMachineState_Aborted 455 || s == KMachineState_Running 456 || s == KMachineState_Paused; 457 450 458 /* Enable/disable restoring snapshot */ 451 459 mRestoreSnapshotAction->setEnabled (!busy && mCurSnapshotItem && item && !item->isCurrentStateItem()); 452 460 453 461 /* Enable/disable deleting snapshot */ 454 mDeleteSnapshotAction->setEnabled ( ( !busy 455 || s == KMachineState_PoweredOff 456 || s == KMachineState_Saved 457 || s == KMachineState_Aborted 458 || s == KMachineState_Running 459 || s == KMachineState_Paused) 462 mDeleteSnapshotAction->setEnabled ( canTakeDeleteSnapshot 460 463 && mCurSnapshotItem && item && !item->isCurrentStateItem()); 461 464 … … 463 466 mShowSnapshotDetailsAction->setEnabled (mCurSnapshotItem && item && !item->isCurrentStateItem()); 464 467 465 /* Enable/disable current state actions */466 m CurStateActionGroup->setEnabled ((!busy && mCurSnapshotItem && item && item->isCurrentStateItem()) ||467 (item && !mCurSnapshotItem));468 /* Enable/disable taking snapshots */ 469 mTakeSnapshotAction->setEnabled ( canTakeDeleteSnapshot 470 && mCurSnapshotItem && item && item->isCurrentStateItem()); 468 471 } 469 472 … … 561 564 return; 562 565 #endif 563 566 564 567 565 568 /* Open a direct session (this call will handle all errors) */ … … 634 637 { 635 638 /* Open a direct session (this call will handle all errors) */ 636 CSession session = vboxGlobal().openSession (mMachineId); 639 bool busy = mSessionState != KSessionState_Closed; 640 CSession session = vboxGlobal().openSession (mMachineId, busy /* aExisting */); 637 641 if (session.isNull()) 638 642 return;
Note:
See TracChangeset
for help on using the changeset viewer.