Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h	(revision 46697)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h	(revision 46698)
@@ -258,4 +258,16 @@
 Q_DECLARE_METATYPE(IndicatorType);
 
+/* Machine close action: */
+enum MachineCloseAction
+{
+    MachineCloseAction_Cancel,
+    MachineCloseAction_Save,
+    MachineCloseAction_Shutdown,
+    MachineCloseAction_PowerOff,
+    MachineCloseAction_PowerOff_Restoring_Snapshot,
+    MachineCloseAction_Max
+};
+Q_DECLARE_METATYPE(MachineCloseAction);
+
 #endif // __UIDefs_h__
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 46697)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 46698)
@@ -261,5 +261,5 @@
 
     /* Choose the close action: */
-    UIVMCloseDialog::ResultCode closeAction = UIVMCloseDialog::ResultCode_Cancel;
+    MachineCloseAction closeAction = MachineCloseAction_Cancel;
 
     /* If there IS default close-action defined: */
@@ -272,15 +272,15 @@
          * we should ask the user about what to do: */
         if (uisession()->isStuck() &&
-            closeAction != UIVMCloseDialog::ResultCode_PowerOff)
-            closeAction = UIVMCloseDialog::ResultCode_Cancel;
+            closeAction != MachineCloseAction_PowerOff)
+            closeAction = MachineCloseAction_Cancel;
         /* If the default-action is 'power-off',
          * we should check if its possible to discard machine-state: */
-        if (closeAction == UIVMCloseDialog::ResultCode_PowerOff &&
+        if (closeAction == MachineCloseAction_PowerOff &&
             machine().GetSnapshotCount() > 0)
-            closeAction = UIVMCloseDialog::ResultCode_PowerOff_With_Discarding;
+            closeAction = MachineCloseAction_PowerOff_Restoring_Snapshot;
     }
 
     /* If the close-action still undefined: */
-    if (closeAction == UIVMCloseDialog::ResultCode_Cancel)
+    if (closeAction == MachineCloseAction_Cancel)
     {
         /* Prepare close-dialog: */
@@ -297,5 +297,5 @@
                 /* Show close-dialog to let the user make the choice: */
                 windowManager().registerNewParent(pCloseDlg, pParentDlg);
-                closeAction = (UIVMCloseDialog::ResultCode)pCloseDlg->exec();
+                closeAction = static_cast<MachineCloseAction>(pCloseDlg->exec());
 
                 /* Make sure the dialog still valid: */
@@ -306,10 +306,10 @@
                  * we should resume it if user canceled dialog or chosen shutdown: */
                 if (!fWasPaused && uisession()->isPaused() &&
-                    (closeAction == UIVMCloseDialog::ResultCode_Cancel ||
-                     closeAction == UIVMCloseDialog::ResultCode_Shutdown))
+                    (closeAction == MachineCloseAction_Cancel ||
+                     closeAction == MachineCloseAction_Shutdown))
                 {
                     /* If we unable to resume VM, cancel closing: */
                     if (!uisession()->unpause())
-                        closeAction = UIVMCloseDialog::ResultCode_Cancel;
+                        closeAction = MachineCloseAction_Cancel;
                 }
             }
@@ -318,5 +318,5 @@
         {
             /* Else user misconfigured .vbox file, 'power-off' will be the action: */
-            closeAction = UIVMCloseDialog::ResultCode_PowerOff;
+            closeAction = MachineCloseAction_PowerOff;
         }
 
@@ -328,5 +328,5 @@
     switch (closeAction)
     {
-        case UIVMCloseDialog::ResultCode_Save:
+        case MachineCloseAction_Save:
         {
             /* Save VM state: */
@@ -334,5 +334,5 @@
             break;
         }
-        case UIVMCloseDialog::ResultCode_Shutdown:
+        case MachineCloseAction_Shutdown:
         {
             /* Shutdown VM: */
@@ -340,9 +340,9 @@
             break;
         }
-        case UIVMCloseDialog::ResultCode_PowerOff:
-        case UIVMCloseDialog::ResultCode_PowerOff_With_Discarding:
+        case MachineCloseAction_PowerOff:
+        case MachineCloseAction_PowerOff_Restoring_Snapshot:
         {
             /* Power VM off: */
-            machineLogic()->powerOff(closeAction == UIVMCloseDialog::ResultCode_PowerOff_With_Discarding);
+            machineLogic()->powerOff(closeAction == MachineCloseAction_PowerOff_Restoring_Snapshot);
             break;
         }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 46697)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 46698)
@@ -65,14 +65,14 @@
 
 /* static */
-UIVMCloseDialog::ResultCode UIVMCloseDialog::parseResultCode(const QString &strCloseAction)
-{
-    ResultCode resultCode = ResultCode_Cancel;
+MachineCloseAction UIVMCloseDialog::parseResultCode(const QString &strCloseAction)
+{
+    MachineCloseAction closeAction = MachineCloseAction_Cancel;
     if (!strCloseAction.compare("Save", Qt::CaseInsensitive))
-        resultCode = ResultCode_Save;
+        closeAction = MachineCloseAction_Save;
     else if (!strCloseAction.compare("Shutdown", Qt::CaseInsensitive))
-        resultCode = ResultCode_Shutdown;
+        closeAction = MachineCloseAction_Shutdown;
     else if (!strCloseAction.compare("PowerOff", Qt::CaseInsensitive))
-        resultCode = ResultCode_PowerOff;
-    return resultCode;
+        closeAction = MachineCloseAction_PowerOff;
+    return closeAction;
 }
 
@@ -87,13 +87,13 @@
     /* Calculate result: */
     if (m_pSaveRadio->isChecked())
-        setResult(ResultCode_Save);
+        setResult(MachineCloseAction_Save);
     else if (m_pShutdownRadio->isChecked())
-        setResult(ResultCode_Shutdown);
+        setResult(MachineCloseAction_Shutdown);
     else if (m_pPowerOffRadio->isChecked())
     {
         if (!m_pDiscardCheckBox->isChecked() || !m_pDiscardCheckBox->isVisible())
-            setResult(ResultCode_PowerOff);
+            setResult(MachineCloseAction_PowerOff);
         else
-            setResult(ResultCode_PowerOff_With_Discarding);
+            setResult(MachineCloseAction_PowerOff_Restoring_Snapshot);
     }
 
@@ -104,15 +104,15 @@
     switch (result())
     {
-        case ResultCode_Save:
+        case MachineCloseAction_Save:
         {
             strLastAction = m_strExtraDataOptionSave;
             break;
         }
-        case ResultCode_Shutdown:
+        case MachineCloseAction_Shutdown:
         {
             strLastAction = m_strExtraDataOptionShutdown;
             break;
         }
-        case ResultCode_PowerOff:
+        case MachineCloseAction_PowerOff:
         {
             if (previousChoice[0] == m_strExtraDataOptionShutdown && !m_fIsACPIEnabled)
@@ -122,5 +122,5 @@
             break;
         }
-        case ResultCode_PowerOff_With_Discarding:
+        case MachineCloseAction_PowerOff_Restoring_Snapshot:
         {
             strLastAction = m_strExtraDataOptionPowerOff + "," +
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h	(revision 46697)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h	(revision 46698)
@@ -21,6 +21,7 @@
 
 /* GUI includes: */
+#include "QIWithRetranslateUI.h"
 #include "QIDialog.h"
-#include "QIWithRetranslateUI.h"
+#include "UIDefs.h"
 
 /* COM includes: */
@@ -41,14 +42,4 @@
 public:
 
-    /* Dialog result-code enumerator: */
-    enum ResultCode
-    {
-        ResultCode_Cancel = 0,
-        ResultCode_Save,
-        ResultCode_Shutdown,
-        ResultCode_PowerOff,
-        ResultCode_PowerOff_With_Discarding
-    };
-
     /* Constructor: */
     UIVMCloseDialog(QWidget *pParent, const CMachine &machine, const CSession &session);
@@ -58,5 +49,5 @@
 
     /* Static API: Parse string containing result-code: */
-    static ResultCode parseResultCode(const QString &strCloseAction);
+    static MachineCloseAction parseResultCode(const QString &strCloseAction);
 
 private slots:
