Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h	(revision 46702)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h	(revision 46703)
@@ -58,4 +58,5 @@
 template<> bool canConvert<DetailsElementType>();
 template<> bool canConvert<IndicatorType>();
+template<> bool canConvert<MachineCloseAction>();
 
 /* Declare COM canConvert specializations: */
@@ -90,4 +91,6 @@
 template<> QString toInternalString(const IndicatorType &indicatorType);
 template<> IndicatorType fromInternalString<IndicatorType>(const QString &strIndicatorType);
+template<> QString toInternalString(const MachineCloseAction &machineCloseAction);
+template<> MachineCloseAction fromInternalString<MachineCloseAction>(const QString &strMachineCloseAction);
 
 /* Declare COM conversion specializations: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp	(revision 46702)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp	(revision 46703)
@@ -34,4 +34,5 @@
 template<> bool canConvert<DetailsElementType>() { return true; }
 template<> bool canConvert<IndicatorType>() { return true; }
+template<> bool canConvert<MachineCloseAction>() { return true; }
 
 /* QString <= StorageSlot: */
@@ -417,2 +418,33 @@
 }
 
+/* QString <= MachineCloseAction: */
+template<> QString toInternalString(const MachineCloseAction &machineCloseAction)
+{
+    QString strResult;
+    switch (machineCloseAction)
+    {
+        case MachineCloseAction_Save:                       strResult = "Save"; break;
+        case MachineCloseAction_Shutdown:                   strResult = "Shutdown"; break;
+        case MachineCloseAction_PowerOff:                   strResult = "PowerOff"; break;
+        case MachineCloseAction_PowerOff_RestoringSnapshot: strResult = "PowerOffRestoringSnapshot"; break;
+        default:
+        {
+            AssertMsgFailed(("No text for indicator type=%d", machineCloseAction));
+            break;
+        }
+    }
+    return strResult;
+}
+
+/* MachineCloseAction <= QString: */
+template<> MachineCloseAction fromInternalString<MachineCloseAction>(const QString &strMachineCloseAction)
+{
+    QHash<QString, MachineCloseAction> list;
+    list.insert("Save",                      MachineCloseAction_Save);
+    list.insert("Shutdown",                  MachineCloseAction_Shutdown);
+    list.insert("PowerOff",                  MachineCloseAction_PowerOff);
+    list.insert("PowerOffRestoringSnapshot", MachineCloseAction_PowerOff_RestoringSnapshot);
+    if (!list.contains(strMachineCloseAction))
+        return MachineCloseAction_Invalid;
+    return list.value(strMachineCloseAction);
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h	(revision 46702)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h	(revision 46703)
@@ -261,9 +261,9 @@
 enum MachineCloseAction
 {
-    MachineCloseAction_Cancel,
+    MachineCloseAction_Invalid,
     MachineCloseAction_Save,
     MachineCloseAction_Shutdown,
     MachineCloseAction_PowerOff,
-    MachineCloseAction_PowerOff_Restoring_Snapshot,
+    MachineCloseAction_PowerOff_RestoringSnapshot,
     MachineCloseAction_Max
 };
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 46702)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 46703)
@@ -261,5 +261,5 @@
 
     /* Choose the close action: */
-    MachineCloseAction closeAction = MachineCloseAction_Cancel;
+    MachineCloseAction closeAction = MachineCloseAction_Invalid;
 
     /* If there IS default close-action defined: */
@@ -273,14 +273,14 @@
         if (uisession()->isStuck() &&
             closeAction != MachineCloseAction_PowerOff)
-            closeAction = MachineCloseAction_Cancel;
+            closeAction = MachineCloseAction_Invalid;
         /* If the default-action is 'power-off',
          * we should check if its possible to discard machine-state: */
         if (closeAction == MachineCloseAction_PowerOff &&
             machine().GetSnapshotCount() > 0)
-            closeAction = MachineCloseAction_PowerOff_Restoring_Snapshot;
+            closeAction = MachineCloseAction_PowerOff_RestoringSnapshot;
     }
 
     /* If the close-action still undefined: */
-    if (closeAction == MachineCloseAction_Cancel)
+    if (closeAction == MachineCloseAction_Invalid)
     {
         /* Prepare close-dialog: */
@@ -306,10 +306,10 @@
                  * we should resume it if user canceled dialog or chosen shutdown: */
                 if (!fWasPaused && uisession()->isPaused() &&
-                    (closeAction == MachineCloseAction_Cancel ||
+                    (closeAction == MachineCloseAction_Invalid ||
                      closeAction == MachineCloseAction_Shutdown))
                 {
                     /* If we unable to resume VM, cancel closing: */
                     if (!uisession()->unpause())
-                        closeAction = MachineCloseAction_Cancel;
+                        closeAction = MachineCloseAction_Invalid;
                 }
             }
@@ -341,8 +341,8 @@
         }
         case MachineCloseAction_PowerOff:
-        case MachineCloseAction_PowerOff_Restoring_Snapshot:
+        case MachineCloseAction_PowerOff_RestoringSnapshot:
         {
             /* Power VM off: */
-            machineLogic()->powerOff(closeAction == MachineCloseAction_PowerOff_Restoring_Snapshot);
+            machineLogic()->powerOff(closeAction == MachineCloseAction_PowerOff_RestoringSnapshot);
             break;
         }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 46702)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 46703)
@@ -67,5 +67,5 @@
 MachineCloseAction UIVMCloseDialog::parseResultCode(const QString &strCloseAction)
 {
-    MachineCloseAction closeAction = MachineCloseAction_Cancel;
+    MachineCloseAction closeAction = MachineCloseAction_Invalid;
     if (!strCloseAction.compare("Save", Qt::CaseInsensitive))
         closeAction = MachineCloseAction_Save;
@@ -95,5 +95,5 @@
             setResult(MachineCloseAction_PowerOff);
         else
-            setResult(MachineCloseAction_PowerOff_Restoring_Snapshot);
+            setResult(MachineCloseAction_PowerOff_RestoringSnapshot);
     }
 
@@ -122,5 +122,5 @@
             break;
         }
-        case MachineCloseAction_PowerOff_Restoring_Snapshot:
+        case MachineCloseAction_PowerOff_RestoringSnapshot:
         {
             strLastAction = m_strExtraDataOptionPowerOff + "," +
