VirtualBox

Changeset 22329 in vbox


Ignore:
Timestamp:
Aug 18, 2009 3:29:30 PM (15 years ago)
Author:
vboxsync
Message:

Show confirmation dialog when discarding a snapshot.

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

Legend:

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

    r21833 r22329  
    796796}
    797797
     798bool VBoxProblemReporter::askAboutSnapshotDiscarding()
     799{
     800    return messageOkCancel (mainWindowShown(), Question,
     801        tr ("<p>Are you sure you wish to merge the selected snapshot?</p>"),
     802        "confirmSnapshotDiscarding" /* aAutoConfirmId */,
     803        tr ("Discard"), tr ("Cancel"));
     804}
     805
    798806bool VBoxProblemReporter::askAboutSnapshotAndStateDiscarding()
    799807{
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotsWgt.cpp

    r19239 r22329  
    539539void VBoxSnapshotsWgt::discardCurState()
    540540{
     541    if (!vboxProblem().askAboutSnapshotDiscarding())
     542        return;
     543
    541544    SnapshotWgtItem *item = mTreeWidget->selectedItems().isEmpty() ? 0 :
    542545        static_cast<SnapshotWgtItem*> (mTreeWidget->selectedItems() [0]);
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