Index: /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp	(revision 46707)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp	(revision 46708)
@@ -400,20 +400,22 @@
 template<> IndicatorType fromInternalString<IndicatorType>(const QString &strIndicatorType)
 {
-    QHash<QString, IndicatorType> list;
-    list.insert("HardDisks",     IndicatorType_HardDisks);
-    list.insert("OpticalDisks",  IndicatorType_OpticalDisks);
-    list.insert("FloppyDisks",   IndicatorType_FloppyDisks);
-    list.insert("Network",       IndicatorType_Network);
-    list.insert("USB",           IndicatorType_USB);
-    list.insert("SharedFolders", IndicatorType_SharedFolders);
-    list.insert("VideoCapture",  IndicatorType_VideoCapture);
-    list.insert("Features",      IndicatorType_Features);
-    list.insert("Mouse",         IndicatorType_Mouse);
-    list.insert("Keyboard",      IndicatorType_Keyboard);
-    if (!list.contains(strIndicatorType))
-    {
-        AssertMsgFailed(("No value for '%s'", strIndicatorType.toAscii().constData()));
-    }
-    return list.value(strIndicatorType);
+    /* Here we have some fancy stuff allowing us
+     * to search through the keys using 'case-insensitive' rule: */
+    QStringList keys;        QList<IndicatorType> values;
+    keys << "HardDisks";     values << IndicatorType_HardDisks;
+    keys << "OpticalDisks";  values << IndicatorType_OpticalDisks;
+    keys << "FloppyDisks";   values << IndicatorType_FloppyDisks;
+    keys << "Network";       values << IndicatorType_Network;
+    keys << "USB";           values << IndicatorType_USB;
+    keys << "SharedFolders"; values << IndicatorType_SharedFolders;
+    keys << "VideoCapture";  values << IndicatorType_VideoCapture;
+    keys << "Features";      values << IndicatorType_Features;
+    keys << "Mouse";         values << IndicatorType_Mouse;
+    keys << "Keyboard";      values << IndicatorType_Keyboard;
+    /* Invalid type for unknown words: */
+    if (!keys.contains(strIndicatorType, Qt::CaseInsensitive))
+        return IndicatorType_Invalid;
+    /* Corresponding type for known words: */
+    return values.at(keys.indexOf(QRegExp(strIndicatorType, Qt::CaseInsensitive)));
 }
 
@@ -440,11 +442,15 @@
 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))
+    /* Here we have some fancy stuff allowing us
+     * to search through the keys using 'case-insensitive' rule: */
+    QStringList keys;                    QList<MachineCloseAction> values;
+    keys << "Save";                      values << MachineCloseAction_Save;
+    keys << "Shutdown";                  values << MachineCloseAction_Shutdown;
+    keys << "PowerOff";                  values << MachineCloseAction_PowerOff;
+    keys << "PowerOffRestoringSnapshot"; values << MachineCloseAction_PowerOff_RestoringSnapshot;
+    /* Invalid type for unknown words: */
+    if (!keys.contains(strMachineCloseAction, Qt::CaseInsensitive))
         return MachineCloseAction_Invalid;
-    return list.value(strMachineCloseAction);
-}
+    /* Corresponding type for known words: */
+    return values.at(keys.indexOf(QRegExp(strMachineCloseAction, Qt::CaseInsensitive)));
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h	(revision 46707)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h	(revision 46708)
@@ -244,4 +244,5 @@
 enum IndicatorType
 {
+    IndicatorType_Invalid,
     IndicatorType_HardDisks,
     IndicatorType_OpticalDisks,
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 46707)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 46708)
@@ -3724,24 +3724,39 @@
 
 /* static */
-bool VBoxGlobal::isItemRestrictedByExtraData(CMachine &machine,
-                                             const QString &strExtraDataKey,
-                                             const QString &strItemName)
-{
-    /* Load corresponding extra-data value: */
-    QString strExtraDataValue(machine.GetExtraData(strExtraDataKey));
-
-    /* 'false' if value was not set: */
-    if (strExtraDataValue.isEmpty())
-        return false;
-
-    /* Check if value represented as *string-list* contains passed *string-item*: */
-    return strExtraDataValue.split(",").contains(strItemName, Qt::CaseInsensitive);
-}
-
-/* static */
-bool VBoxGlobal::shouldWeShowStatusBarIndicator(CMachine &machine, const QString &strStatusBarIndicatorName)
-{
-    /* Check if list of restricted status-bar indicators contains passed status-bar indicator-name: */
-    return !isItemRestrictedByExtraData(machine, GUI_RestrictedStatusBarIndicators, strStatusBarIndicatorName);
+QList<IndicatorType> VBoxGlobal::restrictedStatusBarIndicators(CMachine &machine)
+{
+    /* Prepare result: */
+    QList<IndicatorType> result;
+    /* Load restricted status-bar-indicators: */
+    QString strList(machine.GetExtraData(GUI_RestrictedStatusBarIndicators));
+    QStringList list = strList.split(',');
+    /* Convert list into appropriate values: */
+    foreach (const QString &strValue, list)
+    {
+        IndicatorType value = gpConverter->fromInternalString<IndicatorType>(strValue);
+        if (value != IndicatorType_Invalid)
+            result << value;
+    }
+    /* Return result: */
+    return result;
+}
+
+/* static */
+QList<MachineCloseAction> VBoxGlobal::restrictedMachineCloseActions(CMachine &machine)
+{
+    /* Prepare result: */
+    QList<MachineCloseAction> result;
+    /* Load restricted machine-close-actions: */
+    QString strList(machine.GetExtraData(GUI_RestrictedCloseActions));
+    QStringList list = strList.split(',');
+    /* Convert list into appropriate values: */
+    foreach (const QString &strValue, list)
+    {
+        MachineCloseAction value = gpConverter->fromInternalString<MachineCloseAction>(strValue);
+        if (value != MachineCloseAction_Invalid)
+            result << value;
+    }
+    /* Return result: */
+    return result;
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 46707)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 46708)
@@ -383,7 +383,6 @@
                                     bool fIncludingMachineGeneralCheck = false);
     static bool shouldWeAutoMountGuestScreens(CMachine &machine, bool fIncludingSanityCheck = true);
-
-    static bool isItemRestrictedByExtraData(CMachine &machine, const QString &strExtraDataKey, const QString &strItemName);
-    static bool shouldWeShowStatusBarIndicator(CMachine &machine, const QString &strStatusBarIndicatorName);
+    static QList<IndicatorType> restrictedStatusBarIndicators(CMachine &machine);
+    static QList<MachineCloseAction> restrictedMachineCloseActions(CMachine &machine);
 
 #ifdef RT_OS_LINUX
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp	(revision 46707)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp	(revision 46708)
@@ -757,6 +757,7 @@
 void UIIndicatorsPool::prepare()
 {
-    /* Access machine: */
+    /* Get the list of restricted indicators: */
     CMachine machine = m_session.GetMachine();
+    QList<IndicatorType> restrictedIndicators = vboxGlobal().restrictedStatusBarIndicators(machine);
 
     /* Populate indicator-pool: */
@@ -765,6 +766,5 @@
         /* Make sure indicator presence is permitted: */
         IndicatorType index = static_cast<IndicatorType>(iIndex);
-        QString strIndicatorExtraDataName = gpConverter->toInternalString(static_cast<IndicatorType>(index));
-        if (!vboxGlobal().shouldWeShowStatusBarIndicator(machine, strIndicatorExtraDataName))
+        if (restrictedIndicators.contains(index))
             continue;
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 46707)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 46708)
@@ -281,9 +281,9 @@
 
     /* Check which close-actions are resticted: */
-    QStringList restictedActionsList = m_machine.GetExtraData(GUI_RestrictedCloseActions).split(',');
-    bool fIsStateSavingAllowed = !restictedActionsList.contains("SaveState", Qt::CaseInsensitive);
-    bool fIsACPIShutdownAllowed = !restictedActionsList.contains("Shutdown", Qt::CaseInsensitive);
-    bool fIsPowerOffAllowed = !restictedActionsList.contains("PowerOff", Qt::CaseInsensitive);
-    bool fIsPowerOffAndRestoreAllowed = fIsPowerOffAllowed && !restictedActionsList.contains("Restore", Qt::CaseInsensitive);
+    QList<MachineCloseAction> restictedCloseActions = vboxGlobal().restrictedMachineCloseActions(m_machine);
+    bool fIsStateSavingAllowed = !restictedCloseActions.contains(MachineCloseAction_Save);
+    bool fIsACPIShutdownAllowed = !restictedCloseActions.contains(MachineCloseAction_Shutdown);
+    bool fIsPowerOffAllowed = !restictedCloseActions.contains(MachineCloseAction_PowerOff);
+    bool fIsPowerOffAndRestoreAllowed = fIsPowerOffAllowed && !restictedCloseActions.contains(MachineCloseAction_PowerOff_RestoringSnapshot);
 
     /* Make 'Save state' button visible/hidden depending on restriction: */
