Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp	(revision 52586)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp	(revision 52589)
@@ -329,4 +329,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Application); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Application); }
 
     void retranslateUi()
@@ -354,4 +356,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuApplicationActionType_Close); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuApplication(UIExtraDataMetaDefs::MenuApplicationActionType_Close); }
 
     QString shortcutExtraDataID() const
@@ -391,4 +395,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Help); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Help); }
 
     void retranslateUi()
@@ -416,4 +422,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_Contents); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_Contents); }
 
     QString shortcutExtraDataID() const
@@ -457,4 +465,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_WebSite); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_WebSite); }
 
     QString shortcutExtraDataID() const
@@ -488,4 +498,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_ResetWarnings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_ResetWarnings); }
 
     QString shortcutExtraDataID() const
@@ -520,4 +532,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_NetworkAccessManager); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_NetworkAccessManager); }
 
     QString shortcutExtraDataID() const
@@ -552,4 +566,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_CheckForUpdates); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_CheckForUpdates); }
 
     QString shortcutExtraDataID() const
@@ -599,4 +615,13 @@
 #endif /* !Q_WS_MAC */
     }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const
+    {
+#ifdef Q_WS_MAC
+        return actionPool()->isAllowedInMenuApplication(UIExtraDataMetaDefs::MenuApplicationActionType_About);
+#else /* !Q_WS_MAC */
+        return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_About);
+#endif /* !Q_WS_MAC */
+    }
 
     QString shortcutExtraDataID() const
@@ -643,4 +668,13 @@
 #else /* !Q_WS_MAC */
         return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_Preferences);
+#endif /* !Q_WS_MAC */
+    }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const
+    {
+#ifdef Q_WS_MAC
+        return actionPool()->isAllowedInMenuApplication(UIExtraDataMetaDefs::MenuApplicationActionType_Preferences);
+#else /* !Q_WS_MAC */
+        return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_Preferences);
 #endif /* !Q_WS_MAC */
     }
@@ -945,26 +979,10 @@
 
     /* 'About' action: */
-    const bool fAllowToShowActionAbout = isAllowedInMenuApplication(UIExtraDataMetaDefs::MenuApplicationActionType_About);
-    action(UIActionIndex_M_Application_S_About)->setEnabled(fAllowToShowActionAbout);
-    action(UIActionIndex_M_Application_S_About)->setVisible(fAllowToShowActionAbout);
-    if (!pMenu->isConsumed())
-        pMenu->addAction(action(UIActionIndex_M_Application_S_About));
-
-    /* Only for Runtime pool: */
+    addAction(pMenu, action(UIActionIndex_M_Application_S_About));
+    /* 'Preferences' action (only for Runtime pool): */
     if (type() == UIActionPoolType_Runtime)
-    {
-        /* 'Preferences' action: */
-        const bool fAllowToShowActionPreferences = isAllowedInMenuApplication(UIExtraDataMetaDefs::MenuApplicationActionType_Preferences);
-        action(UIActionIndex_M_Application_S_Preferences)->setEnabled(fAllowToShowActionPreferences);
-        action(UIActionIndex_M_Application_S_Preferences)->setVisible(fAllowToShowActionPreferences);
-        if (!pMenu->isConsumed())
-            pMenu->addAction(action(UIActionIndex_M_Application_S_Preferences));
-    }
-
-    /* Close action: */
-    const bool fAllowToShowActionClose = isAllowedInMenuApplication(UIExtraDataMetaDefs::MenuApplicationActionType_Close);
-    action(UIActionIndex_M_Application_S_Close)->setEnabled(fAllowToShowActionClose);
-    if (!pMenu->isConsumed())
-        pMenu->addAction(action(UIActionIndex_M_Application_S_Close));
+        addAction(pMenu, action(UIActionIndex_M_Application_S_Preferences));
+    /* 'Close' action: */
+    addAction(pMenu, action(UIActionIndex_M_Application_S_Close));
 
     /* Mark menu as valid: */
@@ -976,32 +994,16 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndex_Menu_Help)->menu();
+    UIMenu *pMenu = action(UIActionIndex_Menu_Help)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
     pMenu->clear();
 
-
     /* Separator? */
     bool fSeparator = false;
 
-
     /* 'Contents' action: */
-    const bool fAllowToShowActionContents = isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_Contents);
-    action(UIActionIndex_Simple_Contents)->setEnabled(fAllowToShowActionContents);
-    if (fAllowToShowActionContents)
-    {
-        pMenu->addAction(action(UIActionIndex_Simple_Contents));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_Contents));
     /* 'Web Site' action: */
-    const bool fAllowToShowActionWebSite = isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_WebSite);
-    action(UIActionIndex_Simple_WebSite)->setEnabled(fAllowToShowActionWebSite);
-    if (fAllowToShowActionWebSite)
-    {
-        pMenu->addAction(action(UIActionIndex_Simple_WebSite));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_WebSite));
 
     /* Separator? */
@@ -1012,14 +1014,6 @@
     }
 
-
     /* 'Reset Warnings' action: */
-    const bool fAllowToShowActionResetWarnings = isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_ResetWarnings);
-    action(UIActionIndex_Simple_ResetWarnings)->setEnabled(fAllowToShowActionResetWarnings);
-    if (fAllowToShowActionResetWarnings)
-    {
-        pMenu->addAction(action(UIActionIndex_Simple_ResetWarnings));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_ResetWarnings));
 
     /* Separator? */
@@ -1030,28 +1024,10 @@
     }
 
-
 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER
     /* 'Network Manager' action: */
-    const bool fAllowToShowActionNetworkManager = isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_NetworkAccessManager);
-    action(UIActionIndex_Simple_NetworkAccessManager)->setEnabled(fAllowToShowActionNetworkManager);
-    if (fAllowToShowActionNetworkManager)
-    {
-        pMenu->addAction(action(UIActionIndex_Simple_NetworkAccessManager));
-        fSeparator = true;
-    }
-
-    /* Only for Selector pool: */
+    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_NetworkAccessManager));
+    /* 'Check for Updates' action (only for Selector pool): */
     if (type() == UIActionPoolType_Selector)
-    {
-        /* 'Check for Updates' action: */
-        const bool fAllowToShowActionCheckForUpdates = isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_CheckForUpdates);
-        action(UIActionIndex_Simple_NetworkAccessManager)->setEnabled(fAllowToShowActionCheckForUpdates);
-        if (fAllowToShowActionCheckForUpdates)
-        {
-            pMenu->addAction(action(UIActionIndex_Simple_CheckForUpdates));
-            fSeparator = true;
-        }
-    }
-
+        fSeparator = addAction(pMenu, action(UIActionIndex_Simple_CheckForUpdates));
 
     /* Separator? */
@@ -1063,23 +1039,11 @@
 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
 
-
 #ifndef RT_OS_DARWIN
     /* 'About' action: */
-    const bool fAllowToShowActionAbout = isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_About);
-    action(UIActionIndex_Simple_About)->setEnabled(fAllowToShowActionAbout);
-    if (fAllowToShowActionAbout)
-        pMenu->addAction(action(UIActionIndex_Simple_About));
-
-    /* Only for Runtime pool: */
+    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_About));
+    /* 'Preferences' action (only for Runtime pool): */
     if (type() == UIActionPoolType_Runtime)
-    {
-        /* 'Preferences' action: */
-        const bool fAllowToShowActionPreferences = isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_Preferences);
-        action(UIActionIndex_Simple_Preferences)->setEnabled(fAllowToShowActionPreferences);
-        if (fAllowToShowActionPreferences)
-            pMenu->addAction(action(UIActionIndex_Simple_Preferences));
-    }
+        fSeparator = addAction(pMenu, action(UIActionIndex_Simple_Preferences));
 #endif /* !RT_OS_DARWIN */
-
 
     /* Mark menu as valid: */
@@ -1116,4 +1080,91 @@
 }
 
+bool UIActionPool::addAction(UIMenu *pMenu, UIAction *pAction, bool fReallyAdd /* = true */)
+{
+    /* Check if action is allowed: */
+    const bool fIsActionAllowed = pAction->isAllowed();
+
+#ifdef RT_OS_DARWIN
+    /* Check if menu is consumable: */
+    const bool fIsMenuConsumable = pMenu->isConsumable();
+    /* Check if menu is NOT yet consumed: */
+    const bool fIsMenuConsumed = pMenu->isConsumed();
+#endif /* RT_OS_DARWIN */
+
+    /* Make this action enabled/visible
+     * depending on clearance state. */
+    pAction->setEnabled(fIsActionAllowed);
+    pAction->setVisible(fIsActionAllowed);
+
+#ifdef RT_OS_DARWIN
+    /* If menu is consumable: */
+    if (fIsMenuConsumable)
+    {
+        /* Add action only if menu was not yet consumed: */
+        if (!fIsMenuConsumed)
+            pMenu->addAction(pAction);
+    }
+    /* If menu is NOT consumable: */
+    else
+#endif /* RT_OS_DARWIN */
+    {
+        /* Add action only if is allowed: */
+        if (fIsActionAllowed && fReallyAdd)
+            pMenu->addAction(pAction);
+    }
+
+    /* Return if action is allowed: */
+    return fIsActionAllowed;
+}
+
+bool UIActionPool::addMenu(QList<QMenu*> &menuList, UIAction *pAction, bool fReallyAdd /* = true */)
+{
+    /* Check if action is allowed: */
+    const bool fIsActionAllowed = pAction->isAllowed();
+
+    /* Get action's menu: */
+    UIMenu *pMenu = pAction->menu();
+
+#ifdef RT_OS_DARWIN
+    /* Check if menu is consumable: */
+    const bool fIsMenuConsumable = pMenu->isConsumable();
+    /* Check if menu is NOT yet consumed: */
+    const bool fIsMenuConsumed = pMenu->isConsumed();
+#endif /* RT_OS_DARWIN */
+
+    /* Make this action enabled/visible
+     * depending on clearance state. */
+    pAction->setEnabled(   fIsActionAllowed
+#ifdef RT_OS_DARWIN
+                        && !fIsMenuConsumable
+#endif /* RT_OS_DARWIN */
+                        );
+    pAction->setVisible(   fIsActionAllowed
+#ifdef RT_OS_DARWIN
+                        && !fIsMenuConsumable
+#endif /* RT_OS_DARWIN */
+                        );
+
+#ifdef RT_OS_DARWIN
+    /* If menu is consumable: */
+    if (fIsMenuConsumable)
+    {
+        /* Add action's menu only if menu was not yet consumed: */
+        if (!fIsMenuConsumed)
+            menuList << pMenu;
+    }
+    /* If menu is NOT consumable: */
+    else
+#endif /* RT_OS_DARWIN */
+    {
+        /* Add action only if is allowed: */
+        if (fIsActionAllowed && fReallyAdd)
+            menuList << pMenu;
+    }
+
+    /* Return if action is allowed: */
+    return fIsActionAllowed;
+}
+
 #include "UIActionPool.moc"
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h	(revision 52586)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h	(revision 52589)
@@ -159,4 +159,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return QString(); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return true; }
 
     /** Returns extra-data ID to save keyboard shortcut under. */
@@ -430,4 +432,9 @@
     virtual bool event(QEvent *pEvent);
 
+    /** Adds action into corresponding menu. */
+    bool addAction(UIMenu *pMenu, UIAction *pAction, bool fReallyAdd = true);
+    /** Adds action's menu into corresponding menu list. */
+    bool addMenu(QList<QMenu*> &menuList, UIAction *pAction, bool fReallyAdd = true);
+
     /** Holds the action-pool type. */
     const UIActionPoolType m_type;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp	(revision 52586)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp	(revision 52589)
@@ -49,4 +49,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Machine); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Machine); }
 
     void retranslateUi()
@@ -71,4 +73,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog); }
 
     QString shortcutExtraDataID() const
@@ -104,4 +108,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot); }
 
     QString shortcutExtraDataID() const
@@ -137,4 +143,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeScreenshot); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeScreenshot); }
 
     QString shortcutExtraDataID() const
@@ -170,4 +178,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog); }
 
     QString shortcutExtraDataID() const
@@ -203,4 +213,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Keyboard); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Keyboard); }
 
     void retranslateUi()
@@ -225,4 +237,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_KeyboardSettings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_KeyboardSettings); }
 
     QString shortcutExtraDataID() const
@@ -253,4 +267,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Mouse); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Mouse); }
 
     void retranslateUi()
@@ -277,4 +293,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_MouseIntegration); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_MouseIntegration); }
 
     QString shortcutExtraDataID() const
@@ -310,4 +328,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TypeCAD); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TypeCAD); }
 
     QString shortcutExtraDataID() const
@@ -344,4 +364,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TypeCABS); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TypeCABS); }
 
     QString shortcutExtraDataID() const
@@ -380,4 +402,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause); }
 
     QString shortcutExtraDataID() const
@@ -413,4 +437,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset); }
 
     QString shortcutExtraDataID() const
@@ -446,4 +472,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState); }
 
     QString shortcutExtraDataID() const
@@ -474,4 +502,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown); }
 
     QString shortcutExtraDataID() const
@@ -511,4 +541,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff); }
 
     QString shortcutExtraDataID() const
@@ -543,4 +575,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Close);}
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Close); }
 
     QString shortcutExtraDataID() const
@@ -577,4 +611,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_View); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_View); }
 
     void retranslateUi()
@@ -599,4 +635,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_View); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_View); }
 
     void retranslateUi() {}
@@ -620,4 +658,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen); }
 
     QString shortcutExtraDataID() const
@@ -655,4 +695,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless); }
 
     QString shortcutExtraDataID() const
@@ -690,4 +732,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale); }
 
     QString shortcutExtraDataID() const
@@ -725,4 +769,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize); }
 
     QString shortcutExtraDataID() const
@@ -758,4 +804,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow); }
 
     QString shortcutExtraDataID() const
@@ -791,4 +839,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar); }
 
     void retranslateUi()
@@ -813,4 +863,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings); }
 
     QString shortcutExtraDataID() const
@@ -841,4 +893,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar); }
 
     void retranslateUi()
@@ -863,4 +917,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings); }
 
     QString shortcutExtraDataID() const
@@ -892,4 +948,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar); }
 
     QString shortcutExtraDataID() const
@@ -920,4 +978,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Devices); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Devices); }
 
     void retranslateUi()
@@ -945,4 +1005,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives); }
 
     void retranslateUi()
@@ -967,4 +1029,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings); }
 
     QString shortcutExtraDataID() const
@@ -998,4 +1062,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices); }
 
     void retranslateUi()
@@ -1023,4 +1089,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices); }
 
     void retranslateUi()
@@ -1045,4 +1113,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network); }
 
     void retranslateUi()
@@ -1067,4 +1137,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings); }
 
     QString shortcutExtraDataID() const
@@ -1098,4 +1170,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices); }
 
     void retranslateUi()
@@ -1120,4 +1194,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings); }
 
     QString shortcutExtraDataID() const
@@ -1151,4 +1227,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams); }
 
     void retranslateUi()
@@ -1173,4 +1251,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard); }
 
     void retranslateUi()
@@ -1195,4 +1275,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop); }
 
     void retranslateUi()
@@ -1217,4 +1299,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders); }
 
     void retranslateUi()
@@ -1239,4 +1323,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings); }
 
     QString shortcutExtraDataID() const
@@ -1269,4 +1355,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_VRDEServer); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_VRDEServer); }
 
     QString shortcutExtraDataID() const
@@ -1297,4 +1385,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_VideoCapture); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_VideoCapture); }
 
     void retranslateUi()
@@ -1321,4 +1411,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_StartVideoCapture); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_StartVideoCapture); }
 
     QString shortcutExtraDataID() const
@@ -1349,4 +1441,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_VideoCaptureSettings); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_VideoCaptureSettings); }
 
     QString shortcutExtraDataID() const
@@ -1377,4 +1471,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools); }
 
     QString shortcutExtraDataID() const
@@ -1411,4 +1507,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Debug); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Debug); }
 
     void retranslateUi()
@@ -1433,4 +1531,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics); }
 
     QString shortcutExtraDataID() const
@@ -1460,4 +1560,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine); }
 
     QString shortcutExtraDataID() const
@@ -1487,4 +1589,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging); }
 
     QString shortcutExtraDataID() const
@@ -1514,4 +1618,6 @@
     /** Returns action extra-data key. */
     virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog); }
+    /** Returns whether action is allowed. */
+    virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog); }
 
     QString shortcutExtraDataID() const
@@ -1989,46 +2095,31 @@
 #ifdef RT_OS_DARWIN
     /* 'Application' menu: */
-    action(UIActionIndex_M_Application)->setVisible(false);
-    m_mainMenus << action(UIActionIndex_M_Application)->menu();
+    addMenu(m_mainMenus, action(UIActionIndex_M_Application));
     updateMenuApplication();
 #endif /* RT_OS_DARWIN */
 
     /* 'Machine' menu: */
-    const bool fAllowToShowMenuMachine = isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Machine);
-    action(UIActionIndexRT_M_Machine)->setVisible(fAllowToShowMenuMachine);
-    if (fAllowToShowMenuMachine)
-        m_mainMenus << action(UIActionIndexRT_M_Machine)->menu();
+    addMenu(m_mainMenus, action(UIActionIndexRT_M_Machine));
     updateMenuMachine();
 
     /* 'View' menu: */
-    const bool fAllowToShowMenuView = isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_View);
-    action(UIActionIndexRT_M_View)->setVisible(fAllowToShowMenuView);
-    action(UIActionIndexRT_M_ViewPopup)->setVisible(fAllowToShowMenuView);
-    if (fAllowToShowMenuView)
-        m_mainMenus << action(UIActionIndexRT_M_View)->menu();
+    addMenu(m_mainMenus, action(UIActionIndexRT_M_View));
     updateMenuView();
+    /* 'View' popup menu: */
+    addMenu(m_mainMenus, action(UIActionIndexRT_M_ViewPopup), false);
     updateMenuViewPopup();
 
     /* 'Devices' menu: */
-    const bool fAllowToShowMenuDevices = isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Devices);
-    action(UIActionIndexRT_M_Devices)->setVisible(fAllowToShowMenuDevices);
-    if (fAllowToShowMenuDevices)
-        m_mainMenus << action(UIActionIndexRT_M_Devices)->menu();
+    addMenu(m_mainMenus, action(UIActionIndexRT_M_Devices));
     updateMenuDevices();
 
 #ifdef VBOX_WITH_DEBUGGER_GUI
     /* 'Debug' menu: */
-    const bool fAllowToShowMenuDebug = isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Debug);
-    action(UIActionIndexRT_M_Debug)->setVisible(fAllowToShowMenuDebug);
-    if (fAllowToShowMenuDebug)
-        m_mainMenus << action(UIActionIndexRT_M_Debug)->menu();
+    addMenu(m_mainMenus, action(UIActionIndexRT_M_Debug));
     updateMenuDebug();
 #endif /* VBOX_WITH_DEBUGGER_GUI */
 
     /* 'Help' menu: */
-    const bool fAllowToShowMenuHelp = isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Help);
-    action(UIActionIndex_Menu_Help)->setVisible(fAllowToShowMenuHelp);
-    if (fAllowToShowMenuHelp)
-        m_mainMenus << action(UIActionIndex_Menu_Help)->menu();
+    addMenu(m_mainMenus, action(UIActionIndex_Menu_Help));
     updateMenuHelp();
 }
@@ -2037,50 +2128,20 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Machine)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Machine)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
     pMenu->clear();
 
-
     /* Separator: */
     bool fSeparator = false;
 
-
     /* 'Settings Dialog' action: */
-    const bool fAllowToShowActionSettingsDialog = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog);
-    action(UIActionIndexRT_M_Machine_S_Settings)->setEnabled(fAllowToShowActionSettingsDialog);
-    if (fAllowToShowActionSettingsDialog)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_Settings));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_Settings)) || fSeparator;
     /* 'Take Snapshot' action: */
-    const bool fAllowToShowActionTakeSnapshot = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot);
-    action(UIActionIndexRT_M_Machine_S_TakeSnapshot)->setEnabled(fAllowToShowActionTakeSnapshot);
-    if (fAllowToShowActionTakeSnapshot)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_TakeSnapshot));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_TakeSnapshot)) || fSeparator;
     /* 'Take Screenshot' action: */
-    const bool fAllowToShowActionTakeScreenshot = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeScreenshot);
-    action(UIActionIndexRT_M_Machine_S_TakeScreenshot)->setEnabled(fAllowToShowActionTakeScreenshot);
-    if (fAllowToShowActionTakeScreenshot)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_TakeScreenshot));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_TakeScreenshot)) || fSeparator;
     /* 'Information Dialog' action: */
-    const bool fAllowToShowActionInformationDialog = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog);
-    action(UIActionIndexRT_M_Machine_S_ShowInformation)->setEnabled(fAllowToShowActionInformationDialog);
-    if (fAllowToShowActionInformationDialog)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_ShowInformation));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowInformation)) || fSeparator;
 
     /* Separator: */
@@ -2091,43 +2152,14 @@
     }
 
-
     /* 'Keyboard' submenu: */
-    const bool fAllowToShowActionKeyboard = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Keyboard);
-    action(UIActionIndexRT_M_Machine_M_Keyboard)->setEnabled(fAllowToShowActionKeyboard);
-    if (fAllowToShowActionKeyboard)
-    {
-//        pMenu->addAction(action(UIActionIndexRT_M_Machine_M_Keyboard));
-//        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_M_Keyboard), false) || fSeparator;
     updateMenuMachineKeyboard();
-
     /* 'Keyboard Settings' action: */
-    const bool fAllowToShowActionKeyboardSettings = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_KeyboardSettings);
-    action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)->setEnabled(fAllowToShowActionKeyboardSettings);
-    if (fAllowToShowActionKeyboardSettings)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)) || fSeparator;
     /* 'Mouse' submenu: */
-    const bool fAllowToShowActionMouse = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Mouse);
-    action(UIActionIndexRT_M_Machine_M_Mouse)->setEnabled(fAllowToShowActionMouse);
-    if (fAllowToShowActionMouse)
-    {
-//        pMenu->addAction(action(UIActionIndexRT_M_Machine_M_Mouse));
-//        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_M_Mouse), false) || fSeparator;
     updateMenuMachineMouse();
-
     /* 'Mouse Integration' action: */
-    const bool fAllowToShowActionMouseIntegration = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_MouseIntegration);
-    action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)->setEnabled(fAllowToShowActionMouseIntegration);
-    if (fAllowToShowActionMouseIntegration)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)) || fSeparator;
 
     /* Separator: */
@@ -2138,25 +2170,10 @@
     }
 
-
     /* 'Type CAD' action: */
-    const bool fAllowToShowActionTypeCAD = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TypeCAD);
-    action(UIActionIndexRT_M_Machine_S_TypeCAD)->setEnabled(fAllowToShowActionTypeCAD);
-    if (fAllowToShowActionTypeCAD)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_TypeCAD));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_TypeCAD)) || fSeparator;
 #ifdef Q_WS_X11
     /* 'Type CABS' action: */
-    const bool fAllowToShowActionTypeCABS = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TypeCABS);
-    action(UIActionIndexRT_M_Machine_S_TypeCABS)->setEnabled(fAllowToShowActionTypeCABS);
-    if (fAllowToShowActionTypeCABS)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_TypeCABS));
-        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_TypeCABS)) || fSeparator;
 #endif /* Q_WS_X11 */
-
 
     /* Separator: */
@@ -2167,50 +2184,14 @@
     }
 
-
     /* 'Pause' action: */
-    const bool fAllowToShowActionPause = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause);
-    action(UIActionIndexRT_M_Machine_T_Pause)->setEnabled(fAllowToShowActionPause);
-    if (fAllowToShowActionPause)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_T_Pause));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_T_Pause)) || fSeparator;
     /* 'Reset' action: */
-    const bool fAllowToShowActionReset = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset);
-    action(UIActionIndexRT_M_Machine_S_Reset)->setEnabled(fAllowToShowActionReset);
-    if (fAllowToShowActionReset)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_Reset));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_Reset)) || fSeparator;
     /* 'Save' action: */
-    const bool fAllowToShowActionSaveState = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState);
-    action(UIActionIndexRT_M_Machine_S_Save)->setEnabled(fAllowToShowActionSaveState);
-    if (fAllowToShowActionSaveState)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_Save));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_Save)) || fSeparator;
     /* 'Shutdown' action: */
-    const bool fAllowToShowActionShutdown = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown);
-    action(UIActionIndexRT_M_Machine_S_Shutdown)->setEnabled(fAllowToShowActionShutdown);
-    if (fAllowToShowActionShutdown)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_Shutdown));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_Shutdown)) || fSeparator;
     /* 'PowerOff' action: */
-    const bool fAllowToShowActionPowerOff = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff);
-    action(UIActionIndexRT_M_Machine_S_PowerOff)->setEnabled(fAllowToShowActionPowerOff);
-    if (fAllowToShowActionPowerOff)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_S_PowerOff));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_PowerOff)) || fSeparator;
 
 #ifndef Q_WS_MAC
@@ -2222,11 +2203,7 @@
     }
 
-
-    /* Close action: */
-    const bool fAllowToShowActionClose = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Close);
-    pMenu->addAction(action(UIActionIndexRT_M_Machine_S_Close));
-    action(UIActionIndexRT_M_Machine_S_Close)->setEnabled(fAllowToShowActionClose);
+    /* 'Close' action: */
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_Close)) || fSeparator;
 #endif /* !Q_WS_MAC */
-
 
     /* Mark menu as valid: */
@@ -2237,5 +2214,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Machine_M_Keyboard)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Machine_M_Keyboard)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2243,8 +2220,5 @@
 
     /* 'Keyboard Settings' action: */
-    const bool fAllowToShowActionKeyboardSettings = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_KeyboardSettings);
-    action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)->setEnabled(fAllowToShowActionKeyboardSettings);
-    if (fAllowToShowActionKeyboardSettings)
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
+    addAction(pMenu, action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
 
     /* Mark menu as valid: */
@@ -2255,5 +2229,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Machine_M_Mouse)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Machine_M_Mouse)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2261,8 +2235,5 @@
 
     /* 'Machine Integration' action: */
-    const bool fAllowToShowActionMouseIntegration = isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_MouseIntegration);
-    action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)->setEnabled(fAllowToShowActionMouseIntegration);
-    if (fAllowToShowActionMouseIntegration)
-        pMenu->addAction(action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
+    addAction(pMenu, action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
 
     /* Mark menu as valid: */
@@ -2273,41 +2244,18 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_View)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_View)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
     pMenu->clear();
 
-
     /* Separator: */
     bool fSeparator = false;
 
-
     /* 'Fullscreen' action: */
-    const bool fIsAllowToShowActionFullscreen = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen);
-    action(UIActionIndexRT_M_View_T_Fullscreen)->setEnabled(fIsAllowToShowActionFullscreen);
-    if (fIsAllowToShowActionFullscreen)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_T_Fullscreen));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_T_Fullscreen)) || fSeparator;
     /* 'Seamless' action: */
-    const bool fIsAllowToShowActionSeamless   = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless);
-    action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(fIsAllowToShowActionSeamless);
-    if (fIsAllowToShowActionSeamless)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_T_Seamless));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_T_Seamless)) || fSeparator;
     /* 'Scale' action: */
-    const bool fIsAllowToShowActionScale      = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale);
-    action(UIActionIndexRT_M_View_T_Scale)->setEnabled(fIsAllowToShowActionScale);
-    if (fIsAllowToShowActionScale)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_T_Scale));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_T_Scale)) || fSeparator;
 
     /* Separator: */
@@ -2318,23 +2266,8 @@
     }
 
-
     /* 'Adjust Window' action: */
-    const bool fAllowToShowActionAdjustWindow = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow);
-    action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow);
-    if (fAllowToShowActionAdjustWindow)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_S_AdjustWindow));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_S_AdjustWindow)) || fSeparator;
     /* 'Guest Autoresize' action: */
-    const bool fAllowToShowActionGuestAutoresize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize);
-    action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize);
-    if (fAllowToShowActionGuestAutoresize)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_T_GuestAutoresize));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_T_GuestAutoresize)) || fSeparator;
 
     /* Separator: */
@@ -2345,25 +2278,10 @@
     }
 
-
     /* 'Menu Bar' submenu: */
-    const bool fAllowToShowActionMenuBar = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar);
-    action(UIActionIndexRT_M_View_M_MenuBar)->setEnabled(fAllowToShowActionMenuBar);
-    if (fAllowToShowActionMenuBar)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_M_MenuBar));
-        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_MenuBar)) || fSeparator;
     updateMenuViewMenuBar();
-
     /* 'Status Bar' submenu: */
-    const bool fAllowToShowActionStatusBar = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar);
-    action(UIActionIndexRT_M_View_M_StatusBar)->setEnabled(fAllowToShowActionStatusBar);
-    if (fAllowToShowActionStatusBar)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar));
-        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_StatusBar)) || fSeparator;
     updateMenuViewStatusBar();
-
 
     /* Separator: */
@@ -2373,5 +2291,4 @@
         fSeparator = false;
     }
-
 
     /* Do we have to show resize or multiscreen menu? */
@@ -2405,5 +2322,4 @@
     }
 
-
     /* Mark menu as valid: */
     m_invalidations.remove(UIActionIndexRT_M_View);
@@ -2413,32 +2329,16 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_ViewPopup)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_ViewPopup)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
     pMenu->clear();
 
-
     /* Separator: */
     bool fSeparator = false;
 
-
     /* 'Adjust Window' action: */
-    const bool fAllowToShowActionAdjustWindow = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow);
-    action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow);
-    if (fAllowToShowActionAdjustWindow)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_S_AdjustWindow));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_S_AdjustWindow)) || fSeparator;
     /* 'Guest Autoresize' action: */
-    const bool fAllowToShowActionGuestAutoresize = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize);
-    action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize);
-    if (fAllowToShowActionGuestAutoresize)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_View_T_GuestAutoresize));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_T_GuestAutoresize)) || fSeparator;
 
     /* Separator: */
@@ -2448,5 +2348,4 @@
         fSeparator = false;
     }
-
 
     /* Do we have to show resize menu? */
@@ -2464,5 +2363,4 @@
     }
 
-
     /* Mark menu as valid: */
     m_invalidations.remove(UIActionIndexRT_M_ViewPopup);
@@ -2472,5 +2370,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_View_M_MenuBar)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_View_M_MenuBar)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2478,8 +2376,5 @@
 
     /* 'Menu Bar Settings' action: */
-    const bool fAllowToShowActionMenuBarSettings = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings);
-    action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)->setEnabled(fAllowToShowActionMenuBarSettings);
-    if (fAllowToShowActionMenuBarSettings)
-        pMenu->addAction(action(UIActionIndexRT_M_View_M_MenuBar_S_Settings));
+    addAction(pMenu, action(UIActionIndexRT_M_View_M_MenuBar_S_Settings));
 
     /* Mark menu as valid: */
@@ -2490,5 +2385,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_View_M_StatusBar)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_View_M_StatusBar)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2496,14 +2391,7 @@
 
     /* 'Status Bar Settings' action: */
-    const bool fAllowToShowActionStatusBarSettings = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings);
-    action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(fAllowToShowActionStatusBarSettings);
-    if (fAllowToShowActionStatusBarSettings)
-        pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
-
+    addAction(pMenu, action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
     /* 'Toggle Status Bar' action: */
-    const bool fAllowToShowActionToggleStatusBar = isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar);
-    action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(fAllowToShowActionToggleStatusBar);
-    if (fAllowToShowActionToggleStatusBar)
-        pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
+    addAction(pMenu, action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
 
     /* Mark menu as valid: */
@@ -2578,7 +2466,5 @@
                 if (screenSize.width() == size.width() &&
                     screenSize.height() == size.height())
-                {
                     pAction->setChecked(true);
-                }
             }
         }
@@ -2633,99 +2519,34 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Devices)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Devices)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
     pMenu->clear();
 
-
     /* Separator: */
     bool fSeparator = false;
 
-
     /* 'Hard Drives' submenu: */
-    const bool fAllowToShowActionHardDrives = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives);
-    action(UIActionIndexRT_M_Devices_M_HardDrives)->setEnabled(fAllowToShowActionHardDrives);
-    if (fAllowToShowActionHardDrives)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_HardDrives));
-        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_HardDrives)) || fSeparator;
     updateMenuDevicesHardDrives();
-
     /* 'Optical Devices' submenu: */
-    const bool fAllowToShowActionOpticalDevices = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices);
-    action(UIActionIndexRT_M_Devices_M_OpticalDevices)->setEnabled(fAllowToShowActionOpticalDevices);
-    if (fAllowToShowActionOpticalDevices)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_OpticalDevices));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_OpticalDevices)) || fSeparator;
     /* 'Floppy Devices' submenu: */
-    const bool fAllowToShowActionFloppyDevices = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices);
-    action(UIActionIndexRT_M_Devices_M_FloppyDevices)->setEnabled(fAllowToShowActionFloppyDevices);
-    if (fAllowToShowActionFloppyDevices)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_FloppyDevices));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_FloppyDevices)) || fSeparator;
     /* 'Network' submenu: */
-    const bool fAllowToShowActionNetwork = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network);
-    action(UIActionIndexRT_M_Devices_M_Network)->setEnabled(fAllowToShowActionNetwork);
-    if (fAllowToShowActionNetwork)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_Network));
-        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_Network)) || fSeparator;
     updateMenuDevicesNetwork();
-
     /* 'USB Devices' submenu: */
-    const bool fAllowToShowActionUSBDevices = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices);
-    action(UIActionIndexRT_M_Devices_M_USBDevices)->setEnabled(fAllowToShowActionUSBDevices);
-    if (fAllowToShowActionUSBDevices)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_USBDevices));
-        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_USBDevices)) || fSeparator;
     updateMenuDevicesUSBDevices();
-
     /* 'Web Cams' submenu: */
-    const bool fAllowToShowActionWebCams = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams);
-    action(UIActionIndexRT_M_Devices_M_WebCams)->setEnabled(fAllowToShowActionWebCams);
-    if (fAllowToShowActionWebCams)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_WebCams));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_WebCams)) || fSeparator;
     /* 'Shared Clipboard' submenu: */
-    const bool fAllowToShowActionSharedClipboard = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard);
-    action(UIActionIndexRT_M_Devices_M_SharedClipboard)->setEnabled(fAllowToShowActionSharedClipboard);
-    if (fAllowToShowActionSharedClipboard)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedClipboard));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_SharedClipboard)) || fSeparator;
     /* 'Drag&Drop' submenu: */
-    const bool fAllowToShowActionDragAndDrop = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop);
-    action(UIActionIndexRT_M_Devices_M_DragAndDrop)->setEnabled(fAllowToShowActionDragAndDrop);
-    if (fAllowToShowActionDragAndDrop)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_DragAndDrop));
-        fSeparator = true;
-    }
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_DragAndDrop)) || fSeparator;
     /* 'Shared Folders' submenu: */
-    const bool fAllowToShowActionSharedFolders = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders);
-    action(UIActionIndexRT_M_Devices_M_SharedFolders)->setEnabled(fAllowToShowActionSharedFolders);
-    if (fAllowToShowActionSharedFolders)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedFolders));
-        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_SharedFolders)) || fSeparator;
     updateMenuDevicesSharedFolders();
-
 
     /* Separator: */
@@ -2736,24 +2557,11 @@
     }
 
-
     /* 'VRDE Server' action: */
-    const bool fAllowToShowActionVRDEServer = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_VRDEServer);
-    action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(fAllowToShowActionVRDEServer);
-    if (fAllowToShowActionVRDEServer)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_T_VRDEServer));
-        fSeparator = true;
-    }
-
-    /* 'Video Capture' action: */
-    const bool fAllowToShowActionVideoCapture = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_StartVideoCapture);
-    action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setEnabled(fAllowToShowActionVideoCapture);
-    if (fAllowToShowActionVideoCapture)
-    {
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
-        fSeparator = true;
-    }
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_T_VRDEServer)) || fSeparator;
+    /* 'Video Capture' submenu: */
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_VideoCapture), false) || fSeparator;
     updateMenuDevicesVideoCapture();
-
+    /* 'Video Capture Start' action: */
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)) || fSeparator;
 
     /* Separator: */
@@ -2764,11 +2572,6 @@
     }
 
-
     /* Install Guest Tools action: */
-    const bool fAllowToShowActionInstallGuestTools = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools);
-    action(UIActionIndexRT_M_Devices_S_InstallGuestTools)->setEnabled(fAllowToShowActionInstallGuestTools);
-    if (fAllowToShowActionInstallGuestTools)
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
-
+    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Devices_S_InstallGuestTools)) || fSeparator;
 
     /* Mark menu as valid: */
@@ -2779,5 +2582,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_HardDrives)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Devices_M_HardDrives)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2785,8 +2588,5 @@
 
     /* 'Hard Drives Settings' action: */
-    const bool fAllowToShowActionHardDrivesSettings = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings);
-    action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)->setEnabled(fAllowToShowActionHardDrivesSettings);
-    if (fAllowToShowActionHardDrivesSettings)
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
+    addAction(pMenu, action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
 
     /* Mark menu as valid: */
@@ -2797,5 +2597,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_Network)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Devices_M_Network)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2803,8 +2603,7 @@
 
     /* 'Network Settings' action: */
-    const bool fAllowToShowActionNetworkSettings = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings);
-    action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(fAllowToShowActionNetworkSettings);
-    if (fAllowToShowActionNetworkSettings)
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
+    addAction(pMenu, action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
+
+    /* This menu always remains invalid.. */
 }
 
@@ -2812,5 +2611,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2818,8 +2617,7 @@
 
     /* 'USB Devices Settings' action: */
-    const bool fAllowToShowActionUSBDevicesSettings = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings);
-    action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)->setEnabled(fAllowToShowActionUSBDevicesSettings);
-    if (fAllowToShowActionUSBDevicesSettings)
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));
+    addAction(pMenu, action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));
+
+    /* This menu always remains invalid.. */
 }
 
@@ -2827,5 +2625,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2833,8 +2631,5 @@
 
     /* 'Shared Folders Settings' action: */
-    const bool fAllowToShowActionSharedFoldersSettings = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings);
-    action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(fAllowToShowActionSharedFoldersSettings);
-    if (fAllowToShowActionSharedFoldersSettings)
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
+    addAction(pMenu, action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
 
     /* Mark menu as valid: */
@@ -2845,5 +2640,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2851,14 +2646,7 @@
 
     /* 'Video Capture Settings' action: */
-    const bool fAllowToShowActionVideoCaptureSettings = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_VideoCaptureSettings);
-    action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)->setEnabled(fAllowToShowActionVideoCaptureSettings);
-    if (fAllowToShowActionVideoCaptureSettings)
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
-
+    addAction(pMenu, action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
     /* 'Start Video Capture' action: */
-    const bool fAllowToShowActionStartVideoCapture = isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_StartVideoCapture);
-    action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)->setEnabled(fAllowToShowActionStartVideoCapture);
-    if (fAllowToShowActionStartVideoCapture)
-        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
+    addAction(pMenu, action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
 
     /* Mark menu as valid: */
@@ -2870,5 +2658,5 @@
 {
     /* Get corresponding menu: */
-    QMenu *pMenu = action(UIActionIndexRT_M_Debug)->menu();
+    UIMenu *pMenu = action(UIActionIndexRT_M_Debug)->menu();
     AssertPtrReturnVoid(pMenu);
     /* Clear contents: */
@@ -2876,26 +2664,11 @@
 
     /* 'Statistics' action: */
-    const bool fAllowToShowActionStatistics = isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics);
-    action(UIActionIndexRT_M_Debug_S_ShowStatistics)->setEnabled(fAllowToShowActionStatistics);
-    if (fAllowToShowActionStatistics)
-        pMenu->addAction(action(UIActionIndexRT_M_Debug_S_ShowStatistics));
-
+    addAction(pMenu, action(UIActionIndexRT_M_Debug_S_ShowStatistics));
     /* 'Command Line' action: */
-    const bool fAllowToShowActionCommandLine = isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine);
-    action(UIActionIndexRT_M_Debug_S_ShowCommandLine)->setEnabled(fAllowToShowActionCommandLine);
-    if (fAllowToShowActionCommandLine)
-        pMenu->addAction(action(UIActionIndexRT_M_Debug_S_ShowCommandLine));
-
+    addAction(pMenu, action(UIActionIndexRT_M_Debug_S_ShowCommandLine));
     /* 'Logging' action: */
-    const bool fAllowToShowActionLogging = isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging);
-    action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fAllowToShowActionLogging);
-    if (fAllowToShowActionLogging)
-        pMenu->addAction(action(UIActionIndexRT_M_Debug_T_Logging));
-
+    addAction(pMenu, action(UIActionIndexRT_M_Debug_T_Logging));
     /* 'Log Dialog' action: */
-    const bool fAllowToShowActionLogDialog = isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog);
-    action(UIActionIndexRT_M_Debug_S_ShowLogDialog)->setEnabled(fAllowToShowActionLogDialog);
-    if (fAllowToShowActionLogDialog)
-        pMenu->addAction(action(UIActionIndexRT_M_Debug_S_ShowLogDialog));
+    addAction(pMenu, action(UIActionIndexRT_M_Debug_S_ShowLogDialog));
 
     /* Mark menu as valid: */
