VirtualBox

Changeset 52151 in vbox


Ignore:
Timestamp:
Jul 23, 2014 3:12:33 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95185
Message:

FE/Qt: 7462: Runtime UI: Menu-bar, menu cleanup/rework (part 06).

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

Legend:

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

    r52100 r52151  
    31603160                emit sigLanguageChange(extraDataString(strKey));
    31613161            /* Selector UI shortcut changed? */
    3162             else if (strKey == GUI_Input_SelectorShortcuts && gActionPool->type() == UIActionPoolType_Selector)
     3162            else if (strKey == GUI_Input_SelectorShortcuts && gpActionPool->type() == UIActionPoolType_Selector)
    31633163                emit sigSelectorUIShortcutChange();
    31643164            /* Runtime UI shortcut changed? */
    3165             else if (strKey == GUI_Input_MachineShortcuts && gActionPool->type() == UIActionPoolType_Runtime)
     3165            else if (strKey == GUI_Input_MachineShortcuts && gpActionPool->type() == UIActionPoolType_Runtime)
    31663166                emit sigRuntimeUIShortcutChange();
    31673167#ifdef Q_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r51390 r52151  
    11/* $Id$ */
    22/** @file
    3  *
    4  * VBox frontends: Qt GUI ("VirtualBox"):
    5  * UIActionPool class implementation
     3 * VBox Qt GUI - UIActionPool class implementation.
    64 */
    75
    86/*
    9  * Copyright (C) 2010-2013 Oracle Corporation
     7 * Copyright (C) 2010-2014 Oracle Corporation
    108 *
    119 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1816 */
    1917
    20 /* Global includes: */
     18/* Qt includes: */
    2119#include <QHelpEvent>
    2220#include <QToolTip>
    2321
    24 /* Local includes: */
     22/* GUI includes: */
    2523#include "UIActionPool.h"
    2624#include "UIActionPoolSelector.h"
    2725#include "UIActionPoolRuntime.h"
     26#include "UIShortcutPool.h"
    2827#include "UIIconPool.h"
    29 #include "UIShortcutPool.h"
    3028#include "VBoxGlobal.h"
    3129
    32 /* Action activation event: */
     30
     31/** QEvent extension
     32  * representing action-activation event. */
    3333class ActivateActionEvent : public QEvent
    3434{
    3535public:
    3636
     37    /** Constructor. */
    3738    ActivateActionEvent(QAction *pAction)
    3839        : QEvent((QEvent::Type)ActivateActionEventType)
    3940        , m_pAction(pAction) {}
     41
     42    /** Returns the action this event corresponding to. */
    4043    QAction* action() const { return m_pAction; }
    4144
    4245private:
    4346
     47    /** Ho0lds the action this event corresponding to. */
    4448    QAction *m_pAction;
    4549};
    4650
    47 /* UIAction stuff: */
     51
    4852UIAction::UIAction(UIActionPool *pParent, UIActionType type)
    4953    : QAction(pParent)
     
    5862}
    5963
    60 UIActionState* UIAction::toStateAction()
    61 {
    62     return qobject_cast<UIActionState*>(this);
     64UIActionPolymorphic* UIAction::toActionPolymorphic()
     65{
     66    return qobject_cast<UIActionPolymorphic*>(this);
    6367}
    6468
     
    132136}
    133137
    134 /* UIMenu stuff: */
     138
    135139UIMenu::UIMenu()
    136     : m_fShowToolTips(false)
     140    : m_fShowToolTip(false)
    137141{
    138142}
     
    151155            QAction *pAction = actionAt(pHelpEvent->pos());
    152156            /* If action present => show action's tool-tip if needed: */
    153             if (pAction && m_fShowToolTips)
     157            if (pAction && m_fShowToolTip)
    154158                QToolTip::showText(pHelpEvent->globalPos(), pAction->toolTip());
    155159            break;
     
    158162            break;
    159163    }
    160     /* Base-class event-handler: */
     164    /* Call to base-class: */
    161165    return QMenu::event(pEvent);
    162166}
    163167
    164 /* UIActionSimple stuff: */
     168
    165169UIActionSimple::UIActionSimple(UIActionPool *pParent,
    166170                               const QString &strIcon /* = QString() */, const QString &strIconDisabled /* = QString() */)
     
    186190}
    187191
    188 /* UIActionState stuff: */
    189 UIActionState::UIActionState(UIActionPool *pParent,
     192
     193UIActionPolymorphic::UIActionPolymorphic(UIActionPool *pParent,
    190194                             const QString &strIcon /* = QString() */, const QString &strIconDisabled /* = QString() */)
    191     : UIAction(pParent, UIActionType_State)
     195    : UIAction(pParent, UIActionType_Polymorphic)
    192196    , m_iState(0)
    193197{
     
    196200}
    197201
    198 UIActionState::UIActionState(UIActionPool *pParent,
     202UIActionPolymorphic::UIActionPolymorphic(UIActionPool *pParent,
    199203                             const QString &strIconNormal, const QString &strIconSmall,
    200204                             const QString &strIconNormalDisabled, const QString &strIconSmallDisabled)
    201     : UIAction(pParent, UIActionType_State)
     205    : UIAction(pParent, UIActionType_Polymorphic)
    202206    , m_iState(0)
    203207{
     
    205209}
    206210
    207 UIActionState::UIActionState(UIActionPool *pParent,
     211UIActionPolymorphic::UIActionPolymorphic(UIActionPool *pParent,
    208212                             const QIcon& icon)
    209     : UIAction(pParent, UIActionType_State)
     213    : UIAction(pParent, UIActionType_Polymorphic)
    210214    , m_iState(0)
    211215{
     
    214218}
    215219
    216 /* UIActionToggle stuff: */
     220
    217221UIActionToggle::UIActionToggle(UIActionPool *pParent,
    218222                               const QString &strIcon /* = QString() */, const QString &strIconDisabled /* = QString() */)
     
    221225    if (!strIcon.isNull())
    222226        setIcon(UIIconPool::iconSet(strIcon, strIconDisabled));
    223     init();
     227    prepare();
    224228}
    225229
     
    230234{
    231235    setIcon(UIIconPool::iconSetOnOff(strIconOn, strIconOff, strIconOnDisabled, strIconOffDisabled));
    232     init();
     236    prepare();
    233237}
    234238
     
    239243    if (!icon.isNull())
    240244        setIcon(icon);
    241     init();
    242 }
    243 
    244 void UIActionToggle::sltUpdate()
    245 {
    246     retranslateUi();
    247 }
    248 
    249 void UIActionToggle::init()
     245    prepare();
     246}
     247
     248void UIActionToggle::prepare()
    250249{
    251250    setCheckable(true);
    252     connect(this, SIGNAL(toggled(bool)), this, SLOT(sltUpdate()));
    253 }
    254 
    255 /* UIActionMenu stuff: */
     251}
     252
     253
    256254UIActionMenu::UIActionMenu(UIActionPool *pParent,
    257255                           const QString &strIcon, const QString &strIconDis)
     
    270268        setIcon(icon);
    271269    setMenu(new UIMenu);
     270}
     271
     272void UIActionMenu::setShowToolTip(bool fShowToolTip)
     273{
     274    qobject_cast<UIMenu*>(menu())->setShowToolTip(fShowToolTip);
    272275}
    273276
     
    544547
    545548
    546 /* UIActionPool stuff: */
    547549UIActionPool* UIActionPool::m_pInstance = 0;
    548550
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r51390 r52151  
    11/** @file
    2  *
    3  * VBox frontends: Qt GUI ("VirtualBox"):
    4  * UIActionPool class declaration
     2 * VBox Qt GUI - UIActionPool class declaration.
    53 */
    64
    75/*
    8  * Copyright (C) 2010-2013 Oracle Corporation
     6 * Copyright (C) 2010-2014 Oracle Corporation
    97 *
    108 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1715 */
    1816
    19 #ifndef __UIActionPool_h__
    20 #define __UIActionPool_h__
     17#ifndef ___UIActionPool_h___
     18#define ___UIActionPool_h___
    2119
    2220/* Qt includes: */
     
    2826
    2927/* Forward declarations: */
    30 class UIActionState;
     28class UIActionPolymorphic;
    3129class UIActionPool;
    3230
    33 /* Action pool types: */
     31
     32/** Action-pool types. */
    3433enum UIActionPoolType
    3534{
     
    3837};
    3938
    40 /* Action types: */
     39/** Action types. */
    4140enum UIActionType
    4241{
    4342    UIActionType_Simple,
    44     UIActionType_State,
     43    UIActionType_Polymorphic,
    4544    UIActionType_Toggle,
    4645    UIActionType_Menu
    4746};
    4847
    49 /* Action keys: */
     48/** Action indexes. */
    5049enum UIActionIndex
    5150{
    52     /* Various dialog actions: */
     51    /* Various actions: */
    5352    UIActionIndex_Simple_Preferences,
    5453    UIActionIndex_Simple_LogDialog,
     
    6968};
    7069
    71 /* Basic abstract QAction reimplemetation, extending interface: */
     70
     71/** Abstract QAction extension. */
    7272class UIAction : public QAction
    7373{
     
    7676public:
    7777
    78     /* API: RTTI: */
     78    /** Returns action type. */
    7979    UIActionType type() const { return m_type; }
    8080
    81     /* API: Parent stuff: */
     81    /** Returns action-pool this action belongs to. */
    8282    UIActionPool* actionPool() const { return m_pActionPool; }
    8383
    84     /* API: Update stuff: */
    85     virtual void update() {}
    86 
    87     /* API: Cast stuff: */
    88     UIActionState* toStateAction();
    89 
    90     /* API: Name stuff: */
     84    /** Casts action to polymorphic-action. */
     85    UIActionPolymorphic* toActionPolymorphic();
     86
     87    /** Returns current action name. */
    9188    const QString& name() const { return m_strName; }
     89    /** Defines current action name. */
    9290    void setName(const QString &strName);
    9391
    94     /* API: Shortcut stuff: */
     92    /** Returns extra-data ID to save keyboard shortcut under. */
    9593    virtual QString shortcutExtraDataID() const { return QString(); }
     94    /** Returns default keyboard shortcut for this action. */
    9695    virtual QKeySequence defaultShortcut(UIActionPoolType) const { return QKeySequence(); }
     96
     97    /** Defines current keyboard shortcut for this action. */
    9798    void setShortcut(const QKeySequence &shortcut);
     99    /** Make action show keyboard shortcut. */
    98100    void showShortcut();
     101    /** Make action hide keyboard shortcut. */
    99102    void hideShortcut();
    100103
    101     /** Calls for action translation handler. */
     104    /** Retranslates action. */
    102105    virtual void retranslateUi() = 0;
    103106
    104107protected:
    105108
    106     /* Constructor: */
     109    /** Constructor. */
    107110    UIAction(UIActionPool *pParent, UIActionType type);
    108111
    109     /* Protected API: Menu stuff: */
     112    /** Returns current action name in menu. */
    110113    QString nameInMenu() const;
    111114
     
    115118private:
    116119
    117     /* Variables: */
     120    /** Holds the action type. */
     121    UIActionType m_type;
     122
     123    /** Holds the reference to the action-pool this action belongs to. */
    118124    UIActionPool *m_pActionPool;
    119     UIActionType m_type;
     125    /** Holds the type of the action-pool this action belongs to. */
    120126    UIActionPoolType m_actionPoolType;
     127
     128    /** Holds the action name. */
    121129    QString m_strName;
     130    /** Holds the action shortcut. */
    122131    QKeySequence m_shortcut;
     132    /** Holds whether action shortcut hidden. */
    123133    bool m_fShortcutHidden;
    124134};
    125135
    126 /* Basic QMenu reimplemetation, extending interface: */
     136
     137/** QMenu extension
     138  * allowing to show tool-tips. */
    127139class UIMenu : public QMenu
    128140{
     
    131143public:
    132144
    133     /* Constructor: */
     145    /** Constructor. */
    134146    UIMenu();
    135147
    136     /* API: Tool-tip stuff: */
    137     void setShowToolTips(bool fShowToolTips) { m_fShowToolTips = fShowToolTips; }
    138     bool isToolTipsShown() const { return m_fShowToolTips; }
    139 
    140 private:
    141 
    142     /* Helper: Event stuff: */
    143     bool event(QEvent *pEvent);
    144 
    145     /* Variables: */
    146     bool m_fShowToolTips;
    147 };
    148 
    149 /* Abstract extention for UIAction, describing 'simple' action type: */
     148    /** Defines whether tool-tip should be shown. */
     149    void setShowToolTip(bool fShowToolTips) { m_fShowToolTip = fShowToolTips; }
     150
     151protected:
     152
     153    /** General event handler. */
     154    virtual bool event(QEvent *pEvent);
     155
     156private:
     157
     158    /** Holds whether tool-tip should be shown. */
     159    bool m_fShowToolTip;
     160};
     161
     162
     163/** Abstract UIAction extension for 'Simple' action type. */
    150164class UIActionSimple : public UIAction
    151165{
     
    154168protected:
    155169
    156     /* Constructors: */
     170    /** Constructor, taking normal icon name and name for disabled analog. */
    157171    UIActionSimple(UIActionPool *pParent,
    158172                   const QString &strIcon = QString(), const QString &strIconDisabled = QString());
     173    /** Constructor, taking normal, small icon names and names for disabled analogs. */
    159174    UIActionSimple(UIActionPool *pParent,
    160175                   const QString &strIconNormal, const QString &strIconSmall,
    161176                   const QString &strIconNormalDisabled, const QString &strIconSmallDisabled);
     177    /** Constructor, taking copy of existing icon. */
    162178    UIActionSimple(UIActionPool *pParent,
    163179                   const QIcon& icon);
    164180};
    165181
    166 /* Abstract extention for UIAction, describing 'state' action type: */
    167 class UIActionState : public UIAction
     182
     183/** Abstract UIAction extension for 'Polymorphic' action type. */
     184class UIActionPolymorphic : public UIAction
    168185{
    169186    Q_OBJECT;
     
    171188public:
    172189
    173     /* API: State stuff: */
     190    /** Returns current action state. */
     191    int state() const { return m_iState; }
     192    /** Defines current action state. */
    174193    void setState(int iState) { m_iState = iState; retranslateUi(); }
    175194
    176195protected:
    177196
    178     /* Constructors: */
    179     UIActionState(UIActionPool *pParent,
     197    /** Constructor, taking normal icon name and name for disabled analog. */
     198    UIActionPolymorphic(UIActionPool *pParent,
    180199                  const QString &strIcon = QString(), const QString &strIconDisabled = QString());
    181     UIActionState(UIActionPool *pParent,
     200    /** Constructor, taking normal, small icon names and names for disabled analogs. */
     201    UIActionPolymorphic(UIActionPool *pParent,
    182202                  const QString &strIconNormal, const QString &strIconSmall,
    183203                  const QString &strIconNormalDisabled, const QString &strIconSmallDisabled);
    184     UIActionState(UIActionPool *pParent,
     204    /** Constructor, taking copy of existing icon. */
     205    UIActionPolymorphic(UIActionPool *pParent,
    185206                  const QIcon& icon);
    186207
    187     /* Variables: */
     208private:
     209
     210    /** Holds current action state. */
    188211    int m_iState;
    189212};
    190213
    191 /* Abstract extention for UIAction, describing 'toggle' action type: */
     214
     215/** Abstract UIAction extension for 'Toggle' action type. */
    192216class UIActionToggle : public UIAction
    193217{
     
    196220protected:
    197221
    198     /* Constructors: */
     222    /** Constructor, taking normal icon name and name for disabled analog. */
    199223    UIActionToggle(UIActionPool *pParent,
    200224                   const QString &strIcon = QString(), const QString &strIconDisabled = QString());
     225    /** Constructor, taking normal on/off icon names and names for disabled analogs. */
    201226    UIActionToggle(UIActionPool *pParent,
    202227                   const QString &strIconOn, const QString &strIconOff,
    203228                   const QString &strIconOnDisabled, const QString &strIconOffDisabled);
     229    /** Constructor, taking copy of existing icon. */
    204230    UIActionToggle(UIActionPool *pParent,
    205231                   const QIcon &icon);
    206232
    207     /* API reimplementation: Update stuff: */
    208     void update() { sltUpdate(); }
    209 
    210 private slots:
    211 
    212     /* Handler: Update stuff: */
    213     void sltUpdate();
    214 
    215 private:
    216 
    217     /* Helper: Prepare stuff: */
    218     void init();
    219 };
    220 
    221 /* Abstract extention for UIAction, describing 'menu' action type: */
     233private:
     234
     235    /** Prepare routine. */
     236    void prepare();
     237};
     238
     239
     240/** Abstract UIAction extension for 'Menu' action type. */
    222241class UIActionMenu : public UIAction
    223242{
     
    226245protected:
    227246
    228     /* Constructors: */
     247    /** Constructor, taking normal icon name and name for disabled analog. */
    229248    UIActionMenu(UIActionPool *pParent,
    230249                 const QString &strIcon = QString(), const QString &strIconDis = QString());
     250    /** Constructor, taking copy of existing icon. */
    231251    UIActionMenu(UIActionPool *pParent,
    232252                 const QIcon &icon);
    233253
     254    /** Defines whether tool-tip should be shown. */
     255    void setShowToolTip(bool fShowToolTip);
     256
     257private:
     258
    234259    /** Updates action text accordingly. */
    235260    virtual void updateText();
    236261};
    237262
    238 /* Singleton action pool: */
     263
     264/** Abstract QObject extension
     265  * representing action-pool singleton. */
    239266class UIActionPool : public QIWithRetranslateUI3<QObject>
    240267{
     
    243270public:
    244271
    245     /* API: Singleton stuff: */
     272    /** Singleton instance access member. */
    246273    static UIActionPool* instance();
     274
     275    /** Static factory constructor. */
    247276    static void create(UIActionPoolType type);
     277    /** Static factory destructor. */
    248278    static void destroy();
    249279
    250     /* API: Shortcut pool helper stuff: */
     280    /** Static factory constructor (temporary),
     281      * used to initialize shortcuts-pool from action-pool of passed @a type. */
    251282    static void createTemporary(UIActionPoolType type);
    252283
    253     /* API: RTTI: */
     284    /** Returns action-pool type. */
    254285    UIActionPoolType type() const { return m_type; }
    255286
    256     /* API: Action stuff: */
    257     UIAction* action(int iIndex) const { return m_pool[iIndex]; }
     287    /** Returns the action for the passed @a iIndex. */
     288    UIAction* action(int iIndex) const { return m_pool.value(iIndex); }
     289    /** Returns all the actions action-pool contains. */
    258290    QList<UIAction*> actions() const { return m_pool.values(); }
    259291
    260     /* API: Shortcuts stuff: */
     292    /** Returns extra-data ID to save keyboard shortcuts under. */
    261293    virtual QString shortcutsExtraDataID() const = 0;
    262294
    263     /* API: Prepare stuff: */
     295    /** Recreates menus. */
    264296    void recreateMenus() { createMenus(); }
    265297
    266     /* API: Hot-key handling stuff: */
     298    /** Hot-key processing delegate. */
    267299    bool processHotKey(const QKeySequence &key);
    268300
    269301protected slots:
    270302
    271     /* Handler: Shortcuts stuff: */
     303    /** Loads keyboard shortcuts of action-pool into shortcuts-pool. */
    272304    void sltApplyShortcuts();
    273305
    274306protected:
    275307
    276     /* Constructor/destructor: */
     308    /** Constructor of the action-pool of passed @a type. */
    277309    UIActionPool(UIActionPoolType type);
     310    /** Destructor. */
    278311    ~UIActionPool();
    279312
    280     /* Helpers: Prepare/cleanup stuff: */
     313    /** Prepare routine. */
    281314    void prepare();
     315    /** Cleanup routine. */
    282316    void cleanup();
    283317
    284     /* Virtual helpers: Prepare/cleanup stuff: */
     318    /** Creates actions. */
    285319    virtual void createActions();
     320    /** Creates menus. */
    286321    virtual void createMenus();
     322    /** Destroyes poll contents. */
    287323    virtual void destroyPool();
    288324
    289     /* Helper: Event stuff: */
    290     bool event(QEvent *pEvent);
    291 
    292     /* Instance: */
     325    /** General event handler. */
     326    virtual bool event(QEvent *pEvent);
     327
     328    /** Holds the singleton action-pool instance. */
    293329    static UIActionPool *m_pInstance;
    294     /* Action pool type: */
     330    /** Holds the action-pool type. */
    295331    UIActionPoolType m_type;
    296     /* Actions pool itself: */
     332    /** Holds all the actions action-pool contains. */
    297333    QMap<int, UIAction*> m_pool;
    298334};
    299335
    300 #define gActionPool UIActionPool::instance()
    301 
    302 #endif /* __UIActionPool_h__ */
    303 
     336#define gpActionPool UIActionPool::instance()
     337
     338#endif /* !___UIActionPool_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp

    r52133 r52151  
    814814        : UIActionMenu(pParent, ":/hd_16px.png", ":/hd_disabled_16px.png")
    815815    {
    816         qobject_cast<UIMenu*>(menu())->setShowToolTips(true);
     816        setShowToolTip(true);
    817817        retranslateUi();
    818818    }
     
    858858        : UIActionMenu(pParent, ":/cd_16px.png", ":/cd_disabled_16px.png")
    859859    {
    860         qobject_cast<UIMenu*>(menu())->setShowToolTips(true);
     860        setShowToolTip(true);
    861861        retranslateUi();
    862862    }
     
    879879        : UIActionMenu(pParent, ":/fd_16px.png", ":/fd_disabled_16px.png")
    880880    {
    881         qobject_cast<UIMenu*>(menu())->setShowToolTips(true);
     881        setShowToolTip(true);
    882882        retranslateUi();
    883883    }
     
    900900        : UIActionMenu(pParent, ":/usb_16px.png", ":/usb_disabled_16px.png")
    901901    {
    902         qobject_cast<UIMenu*>(menu())->setShowToolTips(true);
     902        setShowToolTip(true);
    903903        retranslateUi();
    904904    }
     
    921921        : UIActionMenu(pParent, ":/web_camera_16px.png", ":/web_camera_disabled_16px.png")
    922922    {
    923         qobject_cast<UIMenu*>(menu())->setShowToolTips(true);
     923        setShowToolTip(true);
    924924        retranslateUi();
    925925    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r52131 r52151  
    10031003                    }
    10041004                    /* Process hot keys not processed in keyEvent() (as in case of non-alphanumeric keys): */
    1005                     gActionPool->processHotKey(QKeySequence(pKeyEvent->key()));
     1005                    gpActionPool->processHotKey(QKeySequence(pKeyEvent->key()));
    10061006                }
    10071007                else if (!m_bIsHostComboPressed && pEvent->type() == QEvent::KeyRelease)
     
    15781578            symbol = 0;
    15791579        if (symbol)
    1580             fWasProcessed = gActionPool->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + QChar(symbol).toUpper().unicode())));
     1580            fWasProcessed = gpActionPool->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + QChar(symbol).toUpper().unicode())));
    15811581    }
    15821582    delete[] pList;
     
    15961596        {
    15971597            QChar qtSymbol = QString::fromLocal8Bit(&symbol, 1)[0];
    1598             fWasProcessed = gActionPool->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + qtSymbol.toUpper().unicode())));
     1598            fWasProcessed = gpActionPool->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + qtSymbol.toUpper().unicode())));
    15991599        }
    16001600    }
     
    16041604    Q_UNUSED(iHotKey);
    16051605    if (pHotKey && pHotKey[0] && !pHotKey[1])
    1606         fWasProcessed = gActionPool->processHotKey(QKeySequence(Qt::UNICODE_ACCEL + QChar(pHotKey[0]).toUpper().unicode()));
     1606        fWasProcessed = gpActionPool->processHotKey(QKeySequence(Qt::UNICODE_ACCEL + QChar(pHotKey[0]).toUpper().unicode()));
    16071607#endif /* Q_WS_MAC */
    16081608
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r52133 r52151  
    273273    /* Append 'Machine' menu: */
    274274    if (uisession()->allowedMenus() & RuntimeMenuType_Machine)
    275         result << gActionPool->action(UIActionIndexRT_M_Machine)->menu();
     275        result << gpActionPool->action(UIActionIndexRT_M_Machine)->menu();
    276276    /* Append 'View' menu: */
    277277    if (uisession()->allowedMenus() & RuntimeMenuType_View)
    278         result << gActionPool->action(UIActionIndexRT_M_View)->menu();
     278        result << gpActionPool->action(UIActionIndexRT_M_View)->menu();
    279279    /* Append 'Devices' menu: */
    280280    if (uisession()->allowedMenus() & RuntimeMenuType_Devices)
    281         result << gActionPool->action(UIActionIndexRT_M_Devices)->menu();
     281        result << gpActionPool->action(UIActionIndexRT_M_Devices)->menu();
    282282#ifdef VBOX_WITH_DEBUGGER_GUI
    283283    /* Append 'Debug' menu: */
    284284    if (uisession()->allowedMenus() & RuntimeMenuType_Debug)
    285         result << gActionPool->action(UIActionIndexRT_M_Debug)->menu();
     285        result << gpActionPool->action(UIActionIndexRT_M_Debug)->menu();
    286286#endif /* VBOX_WITH_DEBUGGER_GUI */
    287287    /* Append 'Help' menu: */
    288288    if (uisession()->allowedMenus() & RuntimeMenuType_Help)
    289         result << gActionPool->action(UIActionIndex_Menu_Help)->menu();
     289        result << gpActionPool->action(UIActionIndex_Menu_Help)->menu();
    290290
    291291    /* Return result: */
     
    474474        case KMachineState_TeleportingPausedVM:
    475475        {
    476             QAction *pPauseAction = gActionPool->action(UIActionIndexRT_M_Machine_T_Pause);
     476            QAction *pPauseAction = gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause);
    477477            if (!pPauseAction->isChecked())
    478478            {
     
    488488        case KMachineState_LiveSnapshotting:
    489489        {
    490             QAction *pPauseAction = gActionPool->action(UIActionIndexRT_M_Machine_T_Pause);
     490            QAction *pPauseAction = gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause);
    491491            if (pPauseAction->isChecked())
    492492            {
     
    536536{
    537537    /* Update action states: */
    538     gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(uisession()->isGuestSupportsGraphics());
    539     gActionPool->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(uisession()->isVisualStateAllowed(UIVisualStateType_Seamless) &&
     538    gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(uisession()->isGuestSupportsGraphics());
     539    gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(uisession()->isVisualStateAllowed(UIVisualStateType_Seamless) &&
    540540                                                                          uisession()->isGuestSupportsSeamless());
    541541}
     
    553553
    554554    /* Update action state: */
    555     QAction *pAction = gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration);
     555    QAction *pAction = gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration);
    556556    pAction->setEnabled(fIsMouseSupportsAbsolute && fIsMouseSupportsRelative && !fIsMouseHostCursorNeeded);
    557557    if (fIsMouseHostCursorNeeded)
     
    840840     * another QMenu or a QMenuBar. This means we have to recreate all QMenus
    841841     * when creating a new QMenuBar. */
    842     gActionPool->recreateMenus();
     842    gpActionPool->recreateMenus();
    843843#endif /* Q_WS_MAC */
    844844
     
    862862
    863863    /* Move actions into running actions group: */
    864     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD));
     864    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD));
    865865#ifdef Q_WS_X11
    866     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS));
     866    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS));
    867867#endif
    868     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Reset));
    869     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown));
    870     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_ViewPopup));
    871     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen));
    872     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_View_T_Seamless));
    873     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_View_T_Scale));
    874     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
    875     m_pRunningActions->addAction(gActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
     868    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Reset));
     869    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown));
     870    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_ViewPopup));
     871    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen));
     872    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless));
     873    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Scale));
     874    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
     875    m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
    876876
    877877    /* Move actions into running-n-paused actions group: */
    878     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Save));
    879     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Settings));
    880     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot));
    881     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot));
    882     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation));
    883     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard));
    884     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
    885     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse));
    886     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
    887     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_T_Pause));
    888     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar));
    889     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
    890     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
    891     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives));
    892     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
    893     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices));
    894     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices));
    895     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices));
    896     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_WebCams));
    897     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard));
    898     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop));
    899     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_Network));
    900     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
    901     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders));
    902     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
    903     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer));
    904     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture));
    905     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
    906     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
    907     m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
     878    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Save));
     879    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings));
     880    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot));
     881    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot));
     882    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation));
     883    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard));
     884    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
     885    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse));
     886    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
     887    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause));
     888    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar));
     889    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
     890    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
     891    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives));
     892    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
     893    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices));
     894    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices));
     895    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices));
     896    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams));
     897    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard));
     898    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop));
     899    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network));
     900    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
     901    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders));
     902    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
     903    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer));
     904    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture));
     905    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
     906    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
     907    m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
    908908
    909909    /* Move actions into running-n-paused-n-stucked actions group: */
    910     m_pRunningOrPausedOrStackedActions->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff));
     910    m_pRunningOrPausedOrStackedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff));
    911911}
    912912
     
    914914{
    915915    /* "Machine" actions connections: */
    916     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_Settings), SIGNAL(triggered()),
     916    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings), SIGNAL(triggered()),
    917917            this, SLOT(sltOpenVMSettingsDialog()));
    918     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot), SIGNAL(triggered()),
     918    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot), SIGNAL(triggered()),
    919919            this, SLOT(sltTakeSnapshot()));
    920     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot), SIGNAL(triggered()),
     920    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot), SIGNAL(triggered()),
    921921            this, SLOT(sltTakeScreenshot()));
    922     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation), SIGNAL(triggered()),
     922    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation), SIGNAL(triggered()),
    923923            this, SLOT(sltShowInformationDialog()));
    924     connect(gActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings), SIGNAL(triggered()),
     924    connect(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings), SIGNAL(triggered()),
    925925            this, SLOT(sltShowKeyboardSettings()));
    926     connect(gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration), SIGNAL(toggled(bool)),
     926    connect(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration), SIGNAL(toggled(bool)),
    927927            this, SLOT(sltToggleMouseIntegration(bool)));
    928     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD), SIGNAL(triggered()),
     928    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD), SIGNAL(triggered()),
    929929            this, SLOT(sltTypeCAD()));
    930930#ifdef Q_WS_X11
    931     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS), SIGNAL(triggered()),
     931    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS), SIGNAL(triggered()),
    932932            this, SLOT(sltTypeCABS()));
    933933#endif
    934     connect(gActionPool->action(UIActionIndexRT_M_Machine_T_Pause), SIGNAL(toggled(bool)),
     934    connect(gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause), SIGNAL(toggled(bool)),
    935935            this, SLOT(sltPause(bool)));
    936     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_Reset), SIGNAL(triggered()),
     936    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Reset), SIGNAL(triggered()),
    937937            this, SLOT(sltReset()));
    938     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_Save), SIGNAL(triggered()),
     938    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Save), SIGNAL(triggered()),
    939939            this, SLOT(sltSaveState()));
    940     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown), SIGNAL(triggered()),
     940    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown), SIGNAL(triggered()),
    941941            this, SLOT(sltShutdown()));
    942     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff), SIGNAL(triggered()),
     942    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff), SIGNAL(triggered()),
    943943            this, SLOT(sltPowerOff()));
    944     connect(gActionPool->action(UIActionIndexRT_M_Machine_S_Close), SIGNAL(triggered()),
     944    connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SIGNAL(triggered()),
    945945            this, SLOT(sltClose()));
    946946
    947947    /* "View" actions connections: */
    948     connect(gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize), SIGNAL(toggled(bool)),
     948    connect(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize), SIGNAL(toggled(bool)),
    949949            this, SLOT(sltToggleGuestAutoresize(bool)));
    950     connect(gActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow), SIGNAL(triggered()),
     950    connect(gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow), SIGNAL(triggered()),
    951951            this, SLOT(sltAdjustWindow()));
    952952
    953953    /* "Devices" actions connections: */
    954     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings), SIGNAL(triggered()),
     954    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings), SIGNAL(triggered()),
    955955            this, SLOT(sltOpenStorageSettingsDialog()));
    956     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu(), SIGNAL(aboutToShow()),
     956    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu(), SIGNAL(aboutToShow()),
    957957            this, SLOT(sltPrepareStorageMenu()));
    958     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu(), SIGNAL(aboutToShow()),
     958    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu(), SIGNAL(aboutToShow()),
    959959            this, SLOT(sltPrepareStorageMenu()));
    960     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(), SIGNAL(aboutToShow()),
     960    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(), SIGNAL(aboutToShow()),
    961961            this, SLOT(sltPrepareUSBMenu()));
    962     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu(), SIGNAL(aboutToShow()),
     962    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu(), SIGNAL(aboutToShow()),
    963963            this, SLOT(sltPrepareWebCamMenu()));
    964     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu(), SIGNAL(aboutToShow()),
     964    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu(), SIGNAL(aboutToShow()),
    965965            this, SLOT(sltPrepareSharedClipboardMenu()));
    966     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu(), SIGNAL(aboutToShow()),
     966    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu(), SIGNAL(aboutToShow()),
    967967            this, SLOT(sltPrepareDragAndDropMenu()));
    968     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu(), SIGNAL(aboutToShow()),
     968    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu(), SIGNAL(aboutToShow()),
    969969            this, SLOT(sltPrepareNetworkMenu()));
    970     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings), SIGNAL(triggered()),
     970    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings), SIGNAL(triggered()),
    971971            this, SLOT(sltOpenNetworkAdaptersDialog()));
    972     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings), SIGNAL(triggered()),
     972    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings), SIGNAL(triggered()),
    973973            this, SLOT(sltOpenSharedFoldersDialog()));
    974     connect(gActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer), SIGNAL(toggled(bool)),
     974    connect(gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer), SIGNAL(toggled(bool)),
    975975            this, SLOT(sltToggleVRDE(bool)));
    976     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start), SIGNAL(toggled(bool)),
     976    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start), SIGNAL(toggled(bool)),
    977977            this, SLOT(sltToggleVideoCapture(bool)));
    978     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings), SIGNAL(triggered()),
     978    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings), SIGNAL(triggered()),
    979979            this, SLOT(sltOpenVideoCaptureOptions()));
    980     connect(gActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools), SIGNAL(triggered()),
     980    connect(gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools), SIGNAL(triggered()),
    981981            this, SLOT(sltInstallGuestAdditions()));
    982982
    983983#ifdef VBOX_WITH_DEBUGGER_GUI
    984984    /* "Debug" actions connections: */
    985     connect(gActionPool->action(UIActionIndexRT_M_Debug)->menu(), SIGNAL(aboutToShow()),
     985    connect(gpActionPool->action(UIActionIndexRT_M_Debug)->menu(), SIGNAL(aboutToShow()),
    986986            this, SLOT(sltPrepareDebugMenu()));
    987     connect(gActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics), SIGNAL(triggered()),
     987    connect(gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics), SIGNAL(triggered()),
    988988            this, SLOT(sltShowDebugStatistics()));
    989     connect(gActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine), SIGNAL(triggered()),
     989    connect(gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine), SIGNAL(triggered()),
    990990            this, SLOT(sltShowDebugCommandLine()));
    991     connect(gActionPool->action(UIActionIndexRT_M_Debug_T_Logging), SIGNAL(toggled(bool)),
     991    connect(gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging), SIGNAL(toggled(bool)),
    992992            this, SLOT(sltLoggingToggled(bool)));
    993     connect(gActionPool->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()),
     993    connect(gpActionPool->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()),
    994994            this, SLOT(sltShowLogDialog()));
    995995#endif
     
    10371037void UIMachineLogic::prepareDock()
    10381038{
    1039     QMenu *pDockMenu = gActionPool->action(UIActionIndexRT_M_Dock)->menu();
     1039    QMenu *pDockMenu = gpActionPool->action(UIActionIndexRT_M_Dock)->menu();
    10401040
    10411041    /* Add all VM menu entries to the dock menu. Leave out close and stuff like
    10421042     * this. */
    1043     QList<QAction*> actions = gActionPool->action(UIActionIndexRT_M_Machine)->menu()->actions();
     1043    QList<QAction*> actions = gpActionPool->action(UIActionIndexRT_M_Machine)->menu()->actions();
    10441044    for (int i=0; i < actions.size(); ++i)
    10451045        if (actions.at(i)->menuRole() == QAction::NoRole)
     
    10471047    pDockMenu->addSeparator();
    10481048
    1049     QMenu *pDockSettingsMenu = gActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings)->menu();
     1049    QMenu *pDockSettingsMenu = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings)->menu();
    10501050    QActionGroup *pDockPreviewModeGroup = new QActionGroup(this);
    1051     QAction *pDockDisablePreview = gActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);
     1051    QAction *pDockDisablePreview = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);
    10521052    pDockPreviewModeGroup->addAction(pDockDisablePreview);
    1053     QAction *pDockEnablePreviewMonitor = gActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_PreviewMonitor);
     1053    QAction *pDockEnablePreviewMonitor = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_PreviewMonitor);
    10541054    pDockPreviewModeGroup->addAction(pDockEnablePreviewMonitor);
    10551055    pDockSettingsMenu->addActions(pDockPreviewModeGroup->actions());
     
    11821182{
    11831183    /* Get corresponding menu: */
    1184     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_Machine)->menu();
     1184    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Machine)->menu();
    11851185    AssertPtrReturnVoid(pMenu);
    11861186    /* Clear contents: */
     
    11941194    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_SettingsDialog)
    11951195    {
    1196         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Settings));
     1196        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings));
    11971197        fSeparator1 = true;
    11981198    }
    11991199    else
    1200         gActionPool->action(UIActionIndexRT_M_Machine_S_Settings)->setEnabled(false);
     1200        gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings)->setEnabled(false);
    12011201
    12021202    /* 'Take Snapshot' action: */
     
    12041204        uisession()->isSnapshotOperationsAllowed())
    12051205    {
    1206         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot));
     1206        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot));
    12071207        fSeparator1 = true;
    12081208    }
    12091209    else
    1210         gActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot)->setEnabled(false);
     1210        gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot)->setEnabled(false);
    12111211
    12121212    /* 'Take Screenshot' action: */
    12131213    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_TakeScreenshot)
    12141214    {
    1215         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot));
     1215        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot));
    12161216        fSeparator1 = true;
    12171217    }
    12181218    else
    1219         gActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot)->setEnabled(false);
     1219        gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot)->setEnabled(false);
    12201220
    12211221    /* 'Information Dialog' action: */
    12221222    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_InformationDialog)
    12231223    {
    1224         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation));
     1224        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation));
    12251225        fSeparator1 = true;
    12261226    }
    12271227    else
    1228         gActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation)->setEnabled(false);
     1228        gpActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation)->setEnabled(false);
    12291229
    12301230    /* Separator #1: */
     
    12391239    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_KeyboardSettings)
    12401240    {
    1241 //        pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
     1241//        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
    12421242//        fSeparator2 = true;
    12431243    }
    12441244    else
    1245         gActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)->setEnabled(false);
     1245        gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings)->setEnabled(false);
    12461246
    12471247    /* 'Mouse Integration' action: */
    12481248    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_MouseIntegration)
    12491249    {
    1250         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
     1250        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
    12511251        fSeparator2 = true;
    12521252    }
    12531253    else
    1254         gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)->setEnabled(false);
     1254        gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)->setEnabled(false);
    12551255
    12561256    /* Separator #2: */
     
    12651265    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_TypeCAD)
    12661266    {
    1267         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD));
     1267        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD));
    12681268        fSeparator3 = true;
    12691269    }
    12701270    else
    1271         gActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD)->setEnabled(false);
     1271        gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD)->setEnabled(false);
    12721272
    12731273#ifdef Q_WS_X11
     
    12751275    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_TypeCABS)
    12761276    {
    1277         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS));
     1277        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS));
    12781278        fSeparator3 = true;
    12791279    }
    12801280    else
    1281         gActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS)->setEnabled(false);
     1281        gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS)->setEnabled(false);
    12821282#endif /* Q_WS_X11 */
    12831283
     
    12931293    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_Pause)
    12941294    {
    1295         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_T_Pause));
     1295        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause));
    12961296        fSeparator4 = true;
    12971297    }
    12981298    else
    1299         gActionPool->action(UIActionIndexRT_M_Machine_T_Pause)->setEnabled(false);
     1299        gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause)->setEnabled(false);
    13001300
    13011301    /* 'Reset' action: */
    13021302    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_Reset)
    13031303    {
    1304         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Reset));
     1304        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Reset));
    13051305        fSeparator4 = true;
    13061306    }
    13071307    else
    1308         gActionPool->action(UIActionIndexRT_M_Machine_S_Reset)->setEnabled(false);
     1308        gpActionPool->action(UIActionIndexRT_M_Machine_S_Reset)->setEnabled(false);
    13091309
    13101310    /* 'Save' action: */
    13111311    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_SaveState)
    13121312    {
    1313 //        pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Save));
     1313//        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Save));
    13141314//        fSeparator4 = true;
    13151315    }
    13161316    else
    1317         gActionPool->action(UIActionIndexRT_M_Machine_S_Save)->setEnabled(false);
     1317        gpActionPool->action(UIActionIndexRT_M_Machine_S_Save)->setEnabled(false);
    13181318
    13191319    /* 'Shutdown' action: */
    13201320    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_Shutdown)
    13211321    {
    1322         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown));
     1322        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown));
    13231323        fSeparator4 = true;
    13241324    }
    13251325    else
    1326         gActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown)->setEnabled(false);
     1326        gpActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown)->setEnabled(false);
    13271327
    13281328    /* 'PowerOff' action: */
    13291329    if (uisession()->allowedActionsMenuMachine() & RuntimeMenuMachineActionType_PowerOff)
    13301330    {
    1331 //        pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff));
     1331//        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff));
    13321332//        fSeparator4 = true;
    13331333    }
    13341334    else
    1335         gActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff)->setEnabled(false);
     1335        gpActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff)->setEnabled(false);
    13361336
    13371337#ifndef Q_WS_MAC
     
    13431343
    13441344    /* Close action: */
    1345     pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_S_Close));
     1345    pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Close));
    13461346    if (uisession()->isAllCloseActionsRestricted())
    1347         gActionPool->action(UIActionIndexRT_M_Machine_S_Close)->setEnabled(false);
     1347        gpActionPool->action(UIActionIndexRT_M_Machine_S_Close)->setEnabled(false);
    13481348}
    13491349
     
    13511351{
    13521352    /* Get corresponding menu: */
    1353     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_View)->menu();
     1353    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View)->menu();
    13541354    AssertPtrReturnVoid(pMenu);
    13551355    /* Clear contents: */
     
    13651365
    13661366    /* 'Fullscreen' action: */
    1367     gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->setEnabled(fIsAllowedFullscreen);
     1367    gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->setEnabled(fIsAllowedFullscreen);
    13681368    if (fIsAllowedFullscreen)
    1369         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen));
     1369        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen));
    13701370
    13711371    /* 'Seamless' action: */
    1372     gActionPool->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(fIsAllowedSeamless);
     1372    gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(fIsAllowedSeamless);
    13731373    if (fIsAllowedSeamless)
    1374         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_T_Seamless));
     1374        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless));
    13751375
    13761376    /* 'Scale' action: */
    1377     gActionPool->action(UIActionIndexRT_M_View_T_Scale)->setEnabled(fIsAllowedScale);
     1377    gpActionPool->action(UIActionIndexRT_M_View_T_Scale)->setEnabled(fIsAllowedScale);
    13781378    if (fIsAllowedScale)
    1379         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_T_Scale));
     1379        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Scale));
    13801380
    13811381    /* Visual representation mode separator: */
     
    13871387{
    13881388    /* Get corresponding menu: */
    1389     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_Devices)->menu();
     1389    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices)->menu();
    13901390    AssertPtrReturnVoid(pMenu);
    13911391    /* Clear contents: */
     
    13991399    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_OpticalDevices)
    14001400    {
    1401         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices));
     1401        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices));
    14021402        fSeparator1 = true;
    14031403    }
    14041404    else
    1405         gActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->setEnabled(false);
     1405        gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->setEnabled(false);
    14061406
    14071407    /* 'Floppy Devices' submenu: */
    14081408    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_FloppyDevices)
    14091409    {
    1410         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices));
     1410        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices));
    14111411        fSeparator1 = true;
    14121412    }
    14131413    else
    1414         gActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->setEnabled(false);
     1414        gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->setEnabled(false);
    14151415
    14161416    /* 'USB Devices' submenu: */
    14171417    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_USBDevices)
    14181418    {
    1419         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices));
     1419        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices));
    14201420        fSeparator1 = true;
    14211421    }
    14221422    else
    1423         gActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->setEnabled(false);
     1423        gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->setEnabled(false);
    14241424
    14251425    /* 'Web Cams' submenu: */
    14261426    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_WebCams)
    14271427    {
    1428         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_WebCams));
     1428        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams));
    14291429        fSeparator1 = true;
    14301430    }
    14311431    else
    1432         gActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->setEnabled(false);
     1432        gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->setEnabled(false);
    14331433
    14341434    /* 'Shared Clipboard' submenu: */
    14351435    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_SharedClipboard)
    14361436    {
    1437         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard));
     1437        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard));
    14381438        fSeparator1 = true;
    14391439    }
    14401440    else
    1441         gActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->setEnabled(false);
     1441        gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->setEnabled(false);
    14421442
    14431443    /* 'Drag&Drop' submenu: */
    14441444    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_DragAndDrop)
    14451445    {
    1446         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop));
     1446        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop));
    14471447        fSeparator1 = true;
    14481448    }
    14491449    else
    1450         gActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->setEnabled(false);
     1450        gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->setEnabled(false);
    14511451
    14521452    /* 'Network' submenu: */
    14531453    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_Network)
    14541454    {
    1455         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_Network));
     1455        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network));
    14561456        fSeparator1 = true;
    14571457    }
    14581458    else
    1459         gActionPool->action(UIActionIndexRT_M_Devices_M_Network)->setEnabled(false);
     1459        gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->setEnabled(false);
    14601460    updateMenuDevicesNetwork();
    14611461
     
    14631463    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_SharedFoldersSettings)
    14641464    {
    1465         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
     1465        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
    14661466        fSeparator1 = true;
    14671467    }
    14681468    else
    1469         gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(false);
     1469        gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(false);
    14701470
    14711471    /* Separator #1: */
     
    14801480    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_VRDEServer)
    14811481    {
    1482         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer));
     1482        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer));
    14831483        if (!uisession()->isExtensionPackUsable())
    1484             gActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(false);
     1484            gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(false);
    14851485        fSeparator2 = true;
    14861486    }
    14871487    else
    1488         gActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(false);
     1488        gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(false);
    14891489
    14901490    /* 'Video Capture' action: */
    14911491    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_VideoCapture)
    14921492    {
    1493         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
     1493        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
    14941494        fSeparator2 = true;
    14951495    }
    14961496    else
    1497         gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setEnabled(false);
     1497        gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setEnabled(false);
    14981498
    14991499    /* Separator #2: */
     
    15041504    /* Install Guest Tools action: */
    15051505    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_InstallGuestTools)
    1506         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
    1507     else
    1508         gActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools)->setEnabled(false);
     1506        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
     1507    else
     1508        gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools)->setEnabled(false);
    15091509}
    15101510
     
    15121512{
    15131513    /* Get corresponding menu: */
    1514     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu();
     1514    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu();
    15151515    AssertPtrReturnVoid(pMenu);
    15161516    /* Clear contents: */
     
    15201520    /* 'Network Settings' action: */
    15211521    if (uisession()->allowedActionsMenuDevices() & RuntimeMenuDevicesActionType_NetworkSettings)
    1522         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
    1523     else
    1524         gActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(false);
     1522        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
     1523    else
     1524        gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(false);
    15251525}
    15261526
     
    15291529{
    15301530    /* Get corresponding menu: */
    1531     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_Debug)->menu();
     1531    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Debug)->menu();
    15321532    AssertPtrReturnVoid(pMenu);
    15331533    /* Clear contents: */
     
    15371537    /* 'Statistics' action: */
    15381538    if (uisession()->allowedActionsMenuDebugger() & RuntimeMenuDebuggerActionType_Statistics)
    1539         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics));
    1540     else
    1541         gActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics)->setEnabled(false);
     1539        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics));
     1540    else
     1541        gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics)->setEnabled(false);
    15421542
    15431543    /* 'Command Line' action: */
    15441544    if (uisession()->allowedActionsMenuDebugger() & RuntimeMenuDebuggerActionType_CommandLine)
    1545         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine));
    1546     else
    1547         gActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine)->setEnabled(false);
     1545        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine));
     1546    else
     1547        gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine)->setEnabled(false);
    15481548
    15491549    /* 'Logging' action: */
    15501550    if (uisession()->allowedActionsMenuDebugger() & RuntimeMenuDebuggerActionType_Logging)
    1551         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Debug_T_Logging));
    1552     else
    1553         gActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(false);
     1551        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging));
     1552    else
     1553        gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(false);
    15541554
    15551555    /* 'Log Dialog' action: */
    15561556    if (uisession()->allowedActionsMenuDebugger() & RuntimeMenuDebuggerActionType_LogDialog)
    1557         pMenu->addAction(gActionPool->action(UIActionIndex_Simple_LogDialog));
    1558     else
    1559         gActionPool->action(UIActionIndex_Simple_LogDialog)->setEnabled(false);
     1557        pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_LogDialog));
     1558    else
     1559        gpActionPool->action(UIActionIndex_Simple_LogDialog)->setEnabled(false);
    15601560}
    15611561#endif /* VBOX_WITH_DEBUGGER_GUI */
     
    15641564{
    15651565    /* Get corresponding menu: */
    1566     QMenu *pMenu = gActionPool->action(UIActionIndex_Menu_Help)->menu();
     1566    QMenu *pMenu = gpActionPool->action(UIActionIndex_Menu_Help)->menu();
    15671567    AssertPtrReturnVoid(pMenu);
    15681568    /* Clear contents: */
     
    15761576    if (uisession()->allowedActionsMenuHelp() & RuntimeMenuHelpActionType_Contents)
    15771577    {
    1578         pMenu->addAction(gActionPool->action(UIActionIndex_Simple_Contents));
    1579         VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()),
     1578        pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_Contents));
     1579        VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()),
    15801580                            &msgCenter(), SLOT(sltShowHelpHelpDialog()), Qt::UniqueConnection);
    15811581        fSeparator1 = true;
    15821582    }
    15831583    else
    1584         gActionPool->action(UIActionIndex_Simple_Contents)->setEnabled(false);
     1584        gpActionPool->action(UIActionIndex_Simple_Contents)->setEnabled(false);
    15851585
    15861586    /* 'Web Site' action: */
    15871587    if (uisession()->allowedActionsMenuHelp() & RuntimeMenuHelpActionType_WebSite)
    15881588    {
    1589         pMenu->addAction(gActionPool->action(UIActionIndex_Simple_WebSite));
    1590         VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()),
     1589        pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_WebSite));
     1590        VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()),
    15911591                            &msgCenter(), SLOT(sltShowHelpWebDialog()), Qt::UniqueConnection);
    15921592        fSeparator1 = true;
    15931593    }
    15941594    else
    1595         gActionPool->action(RuntimeMenuHelpActionType_WebSite)->setEnabled(false);
     1595        gpActionPool->action(RuntimeMenuHelpActionType_WebSite)->setEnabled(false);
    15961596
    15971597    /* Separator #1: */
     
    16061606    if (uisession()->allowedActionsMenuHelp() & RuntimeMenuHelpActionType_ResetWarnings)
    16071607    {
    1608         pMenu->addAction(gActionPool->action(UIActionIndex_Simple_ResetWarnings));
    1609         VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()),
     1608        pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_ResetWarnings));
     1609        VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()),
    16101610                            &msgCenter(), SLOT(sltResetSuppressedMessages()), Qt::UniqueConnection);
    16111611        fSeparator2 = true;
    16121612    }
    16131613    else
    1614         gActionPool->action(UIActionIndex_Simple_ResetWarnings)->setEnabled(false);
     1614        gpActionPool->action(UIActionIndex_Simple_ResetWarnings)->setEnabled(false);
    16151615
    16161616    /* Separator #2: */
     
    16281628    if (uisession()->allowedActionsMenuHelp() & RuntimeMenuHelpActionType_NetworkAccessManager)
    16291629    {
    1630         pMenu->addAction(gActionPool->action(UIActionIndex_Simple_NetworkAccessManager));
    1631         VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()),
     1630        pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager));
     1631        VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()),
    16321632                            gNetworkManager, SLOT(show()), Qt::UniqueConnection);
    16331633# ifndef Q_WS_MAC
     
    16361636    }
    16371637    else
    1638         gActionPool->action(UIActionIndex_Simple_NetworkAccessManager)->setEnabled(false);
     1638        gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager)->setEnabled(false);
    16391639
    16401640# ifndef Q_WS_MAC
     
    16531653#endif /* Q_WS_MAC */
    16541654    {
    1655         pMenu->addAction(gActionPool->action(UIActionIndex_Simple_About));
    1656         VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()),
     1655        pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_About));
     1656        VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()),
    16571657                            &msgCenter(), SLOT(sltShowHelpAboutDialog()), Qt::UniqueConnection);
    16581658    }
    16591659    else
    1660         gActionPool->action(UIActionIndex_Simple_About)->setEnabled(false);
     1660        gpActionPool->action(UIActionIndex_Simple_About)->setEnabled(false);
    16611661
    16621662    /* 'Preferences' action: */
     
    16671667#endif /* Q_WS_MAC */
    16681668    {
    1669         pMenu->addAction(gActionPool->action(UIActionIndex_Simple_Preferences));
    1670         VBoxGlobal::connect(gActionPool->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()),
     1669        pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_Preferences));
     1670        VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()),
    16711671                            this, SLOT(sltShowGlobalPreferences()), Qt::UniqueConnection);
    16721672    }
    16731673    else
    1674         gActionPool->action(UIActionIndex_Simple_Preferences)->setEnabled(false);
     1674        gpActionPool->action(UIActionIndex_Simple_Preferences)->setEnabled(false);
    16751675}
    16761676
     
    20972097
    20982098    /* Determine device-type: */
    2099     const QMenu *pOpticalDevicesMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu();
    2100     const QMenu *pFloppyDevicesMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu();
     2099    const QMenu *pOpticalDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu();
     2100    const QMenu *pFloppyDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu();
    21012101    const KDeviceType deviceType = pMenu == pOpticalDevicesMenu ? KDeviceType_DVD :
    21022102                                   pMenu == pFloppyDevicesMenu  ? KDeviceType_Floppy :
     
    21662166    /* Get and check the sender menu object: */
    21672167    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    2168     QMenu *pUSBDevicesMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();
     2168    QMenu *pUSBDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();
    21692169    AssertMsg(pMenu == pUSBDevicesMenu, ("This slot should only be called on hovering USB menu!\n"));
    21702170    Q_UNUSED(pUSBDevicesMenu);
     
    22352235    /* Get and check the sender menu object: */
    22362236    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    2237     QMenu *pWebCamMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu();
     2237    QMenu *pWebCamMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu();
    22382238    AssertReturnVoid(pMenu == pWebCamMenu); Q_UNUSED(pWebCamMenu);
    22392239
     
    23702370    /* Get and check the sender menu object: */
    23712371    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    2372     QMenu *pSharedClipboardMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu();
     2372    QMenu *pSharedClipboardMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu();
    23732373    AssertMsg(pMenu == pSharedClipboardMenu, ("This slot should only be called on hovering Shared Clipboard menu!\n"));
    23742374    Q_UNUSED(pSharedClipboardMenu);
     
    24082408    /* Get and check the sender menu object: */
    24092409    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    2410     QMenu *pDragAndDropMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu();
     2410    QMenu *pDragAndDropMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu();
    24112411    AssertMsg(pMenu == pDragAndDropMenu, ("This slot should only be called on hovering Drag'n'drop menu!\n"));
    24122412    Q_UNUSED(pDragAndDropMenu);
     
    24402440    /* Get and check 'the sender' menu object: */
    24412441    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    2442     QMenu *pNetworkMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu();
     2442    QMenu *pNetworkMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu();
    24432443    AssertReturnVoid(pMenu == pNetworkMenu);
    24442444    Q_UNUSED(pNetworkMenu);
     
    26742674        }
    26752675    }
    2676     if (fEnabled != gActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->isEnabled())
    2677         gActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fEnabled);
    2678     if (fChecked != gActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->isChecked())
    2679         gActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setChecked(fChecked);
     2676    if (fEnabled != gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->isEnabled())
     2677        gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fEnabled);
     2678    if (fChecked != gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->isChecked())
     2679        gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setChecked(fChecked);
    26802680}
    26812681
     
    27242724    if (!machine.isNull())
    27252725    {
    2726         bool fEnabled = pAction != gActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);
     2726        bool fEnabled = pAction != gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);
    27272727        gEDataManager->setRealtimeDockIconUpdateEnabled(fEnabled, vboxGlobal().managedVMUuid());
    27282728        updateDockOverlay();
     
    28352835
    28362836    /* Check that we do NOT handling that already: */
    2837     if (gActionPool->action(UIActionIndex_Simple_Preferences)->data().toBool())
     2837    if (gpActionPool->action(UIActionIndex_Simple_Preferences)->data().toBool())
    28382838        return;
    28392839    /* Remember that we handling that already: */
    2840     gActionPool->action(UIActionIndex_Simple_Preferences)->setData(true);
     2840    gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(true);
    28412841
    28422842    /* Create and execute global settings window: */
     
    28482848
    28492849    /* Remember that we do NOT handling that already: */
    2850     gActionPool->action(UIActionIndex_Simple_Preferences)->setData(false);
     2850    gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(false);
    28512851}
    28522852
     
    29412941            {
    29422942                m_pDbgGuiVT->pfnSetParent(m_pDbgGui, activeMachineWindow());
    2943                 m_pDbgGuiVT->pfnSetMenu(m_pDbgGui, gActionPool->action(UIActionIndexRT_M_Debug));
     2943                m_pDbgGuiVT->pfnSetMenu(m_pDbgGui, gpActionPool->action(UIActionIndexRT_M_Debug));
    29442944                dbgAdjustRelativePos();
    29452945                return true;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp

    r52133 r52151  
    359359
    360360    /* Get the list of all view-menu actions: */
    361     QList<QAction*> viewMenuActions = gActionPool->action(UIActionIndexRT_M_View)->menu()->actions();
     361    QList<QAction*> viewMenuActions = gpActionPool->action(UIActionIndexRT_M_View)->menu()->actions();
    362362    /* Get the list of all view related actions: */
    363363    QList<QAction*> viewActions;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r52133 r52151  
    760760    bool fIsVRDEServerAvailable = !server.isNull();
    761761    /* Show/Hide VRDE action depending on VRDE server availability status: */
    762     gActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setVisible(fIsVRDEServerAvailable);
     762    gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setVisible(fIsVRDEServerAvailable);
    763763    /* Check/Uncheck VRDE action depending on VRDE server activity status: */
    764764    if (fIsVRDEServerAvailable)
    765         gActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setChecked(server.GetEnabled());
     765        gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setChecked(server.GetEnabled());
    766766    /* Notify listeners about VRDE change: */
    767767    emit sigVRDEChange();
     
    773773    const CMachine machine = session().GetMachine();
    774774    /* Check/Uncheck Video Capture action depending on feature status: */
    775     gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setChecked(machine.GetVideoCaptureEnabled());
     775    gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setChecked(machine.GetVideoCaptureEnabled());
    776776    /* Notify listeners about Video Capture change: */
    777777    emit sigVideoCaptureChange();
     
    990990                ++iDevicesCountFD;
    991991        }
    992         QAction *pOpticalDevicesMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices);
    993         QAction *pFloppyDevicesMenu = gActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices);
     992        QAction *pOpticalDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices);
     993        QAction *pFloppyDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices);
    994994        pOpticalDevicesMenu->setData(iDevicesCountCD);
    995995        pOpticalDevicesMenu->setVisible(iDevicesCountCD);
     
    10131013            }
    10141014        }
    1015         gActionPool->action(UIActionIndexRT_M_Devices_M_Network)->setVisible(fAtLeastOneAdapterActive);
     1015        gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->setVisible(fAtLeastOneAdapterActive);
    10161016    }
    10171017
     
    10221022                                 && !machine.GetUSBControllers().isEmpty()
    10231023                                 && machine.GetUSBProxyAvailable();
    1024         gActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->setVisible(fUSBEnabled);
     1024        gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->setVisible(fUSBEnabled);
    10251025    }
    10261026
     
    10301030        host.GetVideoInputDevices();
    10311031        const bool fWebCamsEnabled = host.isOk() && !machine.GetUSBControllers().isEmpty();
    1032         gActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->setVisible(fWebCamsEnabled);
     1032        gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->setVisible(fWebCamsEnabled);
    10331033    }
    10341034}
     
    11561156
    11571157        /* Should guest autoresize? */
    1158         QAction *pGuestAutoresizeSwitch = gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize);
     1158        QAction *pGuestAutoresizeSwitch = gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize);
    11591159        pGuestAutoresizeSwitch->setChecked(gEDataManager->guestScreenAutoResizeEnabled(vboxGlobal().managedVMUuid()));
    11601160
     
    11681168        const bool fEnabledForMachine = gEDataManager->statusBarEnabled(vboxGlobal().managedVMUuid());
    11691169        const bool fEnabled = fEnabledGlobally && fEnabledForMachine;
    1170         QAction *pActionStatusBarSettings = gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);
     1170        QAction *pActionStatusBarSettings = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);
    11711171        pActionStatusBarSettings->setEnabled(fEnabled);
    1172         QAction *pActionStatusBarSwitch = gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);
     1172        QAction *pActionStatusBarSwitch = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);
    11731173        pActionStatusBarSwitch->blockSignals(true);
    11741174        pActionStatusBarSwitch->setChecked(fEnabled);
     
    12051205
    12061206        /* Remember if guest should autoresize: */
    1207         gEDataManager->setGuestScreenAutoResizeEnabled(gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid());
     1207        gEDataManager->setGuestScreenAutoResizeEnabled(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid());
    12081208
    12091209#if 0 /* Disabled for now! */
     
    12591259{
    12601260    /* Particularly enable/disable reconfigurable action: */
    1261     gActionPool->action(UIActionIndexRT_M_Machine_S_Settings)->setEnabled(m_fReconfigurable);
    1262     gActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)->setEnabled(m_fReconfigurable);
    1263     gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(m_fReconfigurable);
    1264     gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)->setEnabled(m_fReconfigurable);
    1265     gActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(m_fReconfigurable);
     1261    gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings)->setEnabled(m_fReconfigurable);
     1262    gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)->setEnabled(m_fReconfigurable);
     1263    gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(m_fReconfigurable);
     1264    gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)->setEnabled(m_fReconfigurable);
     1265    gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(m_fReconfigurable);
    12661266    /* Particularly enable/disable snapshot related action: */
    1267     gActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot)->setEnabled(m_fSnapshotOperationsAllowed);
     1267    gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot)->setEnabled(m_fSnapshotOperationsAllowed);
    12681268}
    12691269
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r52133 r52151  
    7575     * the linked key without the 'Host+' part we are adding it here. */
    7676    QString hotKey = QString("Host+%1")
    77         .arg(VBoxGlobal::extractKeyFromActionText(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->text()));
     77        .arg(VBoxGlobal::extractKeyFromActionText(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->text()));
    7878    Assert(!hotKey.isEmpty());
    7979
     
    446446
    447447    /* Take care of view-action toggle state: */
    448     UIAction *pActionFullscreen = gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);
     448    UIAction *pActionFullscreen = gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);
    449449    if (!pActionFullscreen->isChecked())
    450450    {
     
    452452        pActionFullscreen->setChecked(true);
    453453        pActionFullscreen->blockSignals(false);
    454         pActionFullscreen->update();
    455454    }
    456455}
     
    462461
    463462    /* "View" actions connections: */
    464     connect(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     463    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    465464            this, SLOT(sltChangeVisualStateToNormal()));
    466     connect(gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     465    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    467466            this, SLOT(sltChangeVisualStateToSeamless()));
    468     connect(gActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     467    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    469468            this, SLOT(sltChangeVisualStateToScale()));
    470469}
     
    608607{
    609608    /* "View" actions disconnections: */
    610     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     609    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    611610               this, SLOT(sltChangeVisualStateToNormal()));
    612     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     611    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    613612               this, SLOT(sltChangeVisualStateToSeamless()));
    614     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     613    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    615614               this, SLOT(sltChangeVisualStateToScale()));
    616615
     
    622621{
    623622    /* Take care of view-action toggle state: */
    624     UIAction *pActionFullscreen = gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);
     623    UIAction *pActionFullscreen = gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);
    625624    if (pActionFullscreen->isChecked())
    626625    {
     
    628627        pActionFullscreen->setChecked(false);
    629628        pActionFullscreen->blockSignals(false);
    630         pActionFullscreen->update();
    631629    }
    632630
     
    641639
    642640    /* Get corresponding menu: */
    643     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_View)->menu();
     641    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View)->menu();
    644642    AssertPtrReturnVoid(pMenu);
    645643
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r52133 r52151  
    5151#endif
    5252                    )
    53     , m_bIsGuestAutoresizeEnabled(gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
     53    , m_bIsGuestAutoresizeEnabled(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
    5454{
    5555}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp

    r52133 r52151  
    226226#endif /* !RT_OS_DARWIN */
    227227    connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
    228             gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
     228            gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
    229229    connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
    230             gActionPool->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger()));
     230            gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger()));
    231231    connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()), this, SLOT(sltRevokeFocus()));
    232232}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r52133 r52151  
    8181
    8282    /* Make sure status-bar is enabled: */
    83     const bool fEnabled = gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();
     83    const bool fEnabled = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();
    8484    AssertReturnVoid(fEnabled);
    8585
    8686    /* Prevent user from opening another one editor or toggle status-bar: */
    87     gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false);
    88     gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false);
     87    gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false);
     88    gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false);
    8989    /* Create status-bar editor: */
    9090    UIStatusBarEditorWindow *pStatusBarEditor = new UIStatusBarEditorWindow(activeMachineWindow());
     
    106106{
    107107    /* Make sure status-bar is enabled: */
    108     const bool fEnabled = gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();
     108    const bool fEnabled = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();
    109109    AssertReturnVoid(fEnabled);
    110110
    111111    /* Allow user to open editor and toggle status-bar again: */
    112     gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(true);
    113     gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(true);
     112    gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(true);
     113    gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(true);
    114114}
    115115
     
    134134
    135135    /* Add default contents: */
    136     pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
    137     pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
     136    pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
     137    pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
    138138    pMenu->addSeparator();
    139139
     
    233233    AssertMsg(pMenu, ("This slot should be called only on Hard Disks menu show!\n"));
    234234    pMenu->clear();
    235     pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
     235    pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
    236236}
    237237
     
    241241    AssertMsg(menu, ("This slot should be called only on Shared Folders menu show!\n"));
    242242    menu->clear();
    243     menu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
     243    menu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
    244244}
    245245
     
    249249    AssertMsg(pMenu, ("This slot should be called only on Video Capture menu show!\n"));
    250250    pMenu->clear();
    251     pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
    252     pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
     251    pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
     252    pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
    253253}
    254254
     
    258258    AssertMsg(pMenu, ("This slot should be called only on Keyboard menu show!\n"));
    259259    pMenu->clear();
    260     pMenu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
     260    pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
    261261}
    262262
     
    266266    AssertMsg(menu, ("This slot should be called only on Mouse Integration Menu show!\n"));
    267267    menu->clear();
    268     menu->addAction(gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
     268    menu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
    269269}
    270270
     
    275275
    276276    /* "View" actions connections: */
    277     connect(gActionPool->action(UIActionIndexRT_M_ViewPopup)->menu(), SIGNAL(aboutToShow()),
     277    connect(gpActionPool->action(UIActionIndexRT_M_ViewPopup)->menu(), SIGNAL(aboutToShow()),
    278278            this, SLOT(sltPrepareMenuViewPopup()));
    279     connect(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     279    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    280280            this, SLOT(sltChangeVisualStateToFullscreen()));
    281     connect(gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     281    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    282282            this, SLOT(sltChangeVisualStateToSeamless()));
    283     connect(gActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     283    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    284284            this, SLOT(sltChangeVisualStateToScale()));
    285     connect(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
     285    connect(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
    286286            this, SLOT(sltOpenStatusBarSettings()));
    287     connect(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
     287    connect(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
    288288            this, SLOT(sltToggleStatusBar()));
    289289
    290290    /* "Device" actions connections: */
    291     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives)->menu(), SIGNAL(aboutToShow()),
     291    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives)->menu(), SIGNAL(aboutToShow()),
    292292            this, SLOT(sltPrepareHardDisksMenu()));
    293     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu(), SIGNAL(aboutToShow()),
     293    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu(), SIGNAL(aboutToShow()),
    294294            this, SLOT(sltPrepareSharedFoldersMenu()));
    295     connect(gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu(), SIGNAL(aboutToShow()),
     295    connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu(), SIGNAL(aboutToShow()),
    296296            this, SLOT(sltPrepareVideoCaptureMenu()));
    297     connect(gActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard)->menu(), SIGNAL(aboutToShow()),
     297    connect(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard)->menu(), SIGNAL(aboutToShow()),
    298298            this, SLOT(sltPrepareKeyboardMenu()));
    299     connect(gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse)->menu(), SIGNAL(aboutToShow()),
     299    connect(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse)->menu(), SIGNAL(aboutToShow()),
    300300            this, SLOT(sltPrepareMouseIntegrationMenu()));
    301301}
     
    343343{
    344344    /* "View" actions disconnections: */
    345     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     345    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    346346               this, SLOT(sltChangeVisualStateToFullscreen()));
    347     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     347    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    348348               this, SLOT(sltChangeVisualStateToSeamless()));
    349     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     349    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    350350               this, SLOT(sltChangeVisualStateToScale()));
    351     disconnect(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
     351    disconnect(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
    352352               this, SLOT(sltOpenStatusBarSettings()));
    353     disconnect(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
     353    disconnect(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
    354354               this, SLOT(sltToggleStatusBar()));
    355355
     
    364364
    365365    /* Get corresponding menu: */
    366     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_View)->menu();
     366    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View)->menu();
    367367    AssertPtrReturnVoid(pMenu);
    368368
     
    373373    if (uisession()->allowedActionsMenuView() & RuntimeMenuViewActionType_AdjustWindow)
    374374    {
    375         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
     375        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
    376376        fSeparator1 = true;
    377377    }
    378378    else
    379         gActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(false);
     379        gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(false);
    380380
    381381    /* 'Guest Autoresize' action: */
    382382    if (uisession()->allowedActionsMenuView() & RuntimeMenuViewActionType_GuestAutoresize)
    383383    {
    384         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
     384        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
    385385        fSeparator1 = true;
    386386    }
    387387    else
    388         gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(false);
     388        gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(false);
    389389
    390390    /* Separator #1: */
     
    394394    /* 'Status Bar' submenu: */
    395395    if (uisession()->allowedActionsMenuView() & RuntimeMenuViewActionType_StatusBar)
    396         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar));
     396        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar));
    397397    else
    398         gActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->setEnabled(false);
     398        gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->setEnabled(false);
    399399    updateMenuViewStatusBar();
    400400}
     
    403403{
    404404    /* Get corresponding menu: */
    405     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->menu();
     405    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->menu();
    406406    AssertPtrReturnVoid(pMenu);
    407407    /* Clear contents: */
     
    410410    /* 'Status Bar Settings' action: */
    411411    if (uisession()->allowedActionsMenuView() & RuntimeMenuViewActionType_StatusBarSettings)
    412         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
     412        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
    413413    else
    414         gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false);
     414        gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false);
    415415
    416416    /* 'Toggle Status Bar' action: */
    417417    if (uisession()->allowedActionsMenuView() & RuntimeMenuViewActionType_ToggleStatusBar)
    418         pMenu->addAction(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
     418        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
    419419    else
    420         gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false);
    421 }
    422 
     420        gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false);
     421}
     422
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r52133 r52151  
    4848#endif
    4949                    )
    50     , m_bIsGuestAutoresizeEnabled(gActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
     50    , m_bIsGuestAutoresizeEnabled(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
    5151{
    5252    /* Resend the last resize hint if there was a fullscreen or
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r52133 r52151  
    120120    const bool fEnabled = gEDataManager->statusBarEnabled(vboxGlobal().managedVMUuid());
    121121    /* Update settings action 'enable' state: */
    122     QAction *pActionStatusBarSettings = gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);
     122    QAction *pActionStatusBarSettings = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);
    123123    pActionStatusBarSettings->setEnabled(fEnabled);
    124124    /* Update switch action 'checked' state: */
    125     QAction *pActionStatusBarSwitch = gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);
     125    QAction *pActionStatusBarSwitch = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);
    126126    pActionStatusBarSwitch->blockSignals(true);
    127127    pActionStatusBarSwitch->setChecked(fEnabled);
     
    139139{
    140140    /* Raise action's context-menu: */
    141     gActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->menu()->exec(statusBar()->mapToGlobal(position));
     141    gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->menu()->exec(statusBar()->mapToGlobal(position));
    142142}
    143143
     
    148148    switch (indicatorType)
    149149    {
    150         case IndicatorType_HardDisks:     pAction = gActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives);        break;
    151         case IndicatorType_OpticalDisks:  pAction = gActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices);   break;
    152         case IndicatorType_FloppyDisks:   pAction = gActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices);    break;
    153         case IndicatorType_USB:           pAction = gActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices);       break;
    154         case IndicatorType_Network:       pAction = gActionPool->action(UIActionIndexRT_M_Devices_M_Network);          break;
    155         case IndicatorType_SharedFolders: pAction = gActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders);    break;
    156         case IndicatorType_Display:       pAction = gActionPool->action(UIActionIndexRT_M_ViewPopup);        break;
    157         case IndicatorType_VideoCapture:  pAction = gActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture);     break;
    158         case IndicatorType_Mouse:         pAction = gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse); break;
    159         case IndicatorType_Keyboard:      pAction = gActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard);         break;
     150        case IndicatorType_HardDisks:     pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives);        break;
     151        case IndicatorType_OpticalDisks:  pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices);   break;
     152        case IndicatorType_FloppyDisks:   pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices);    break;
     153        case IndicatorType_USB:           pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices);       break;
     154        case IndicatorType_Network:       pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_Network);          break;
     155        case IndicatorType_SharedFolders: pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders);    break;
     156        case IndicatorType_Display:       pAction = gpActionPool->action(UIActionIndexRT_M_ViewPopup);        break;
     157        case IndicatorType_VideoCapture:  pAction = gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture);     break;
     158        case IndicatorType_Mouse:         pAction = gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse); break;
     159        case IndicatorType_Keyboard:      pAction = gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard);         break;
    160160        default: break;
    161161    }
     
    286286#endif /* !Q_WS_MAC */
    287287        /* Update status-bar visibility: */
    288         statusBar()->setVisible(gActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked());
     288        statusBar()->setVisible(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked());
    289289        m_pIndicatorsPool->setAutoUpdateIndicatorStates(statusBar()->isVisible());
    290290    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp

    r52133 r52151  
    4848     * the linked key without the 'Host+' part we are adding it here. */
    4949    QString strHotKey = QString("Host+%1")
    50         .arg(VBoxGlobal::extractKeyFromActionText(gActionPool->action(UIActionIndexRT_M_View_T_Scale)->text()));
     50        .arg(VBoxGlobal::extractKeyFromActionText(gpActionPool->action(UIActionIndexRT_M_View_T_Scale)->text()));
    5151    Assert(!strHotKey.isEmpty());
    5252
     
    7676
    7777    /* Take care of view-action toggle state: */
    78     UIAction *pActionScale = gActionPool->action(UIActionIndexRT_M_View_T_Scale);
     78    UIAction *pActionScale = gpActionPool->action(UIActionIndexRT_M_View_T_Scale);
    7979    if (!pActionScale->isChecked())
    8080    {
     
    8282        pActionScale->setChecked(true);
    8383        pActionScale->blockSignals(false);
    84         pActionScale->update();
    8584    }
    8685}
     
    9291
    9392    /* "View" actions connections: */
    94     connect(gActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     93    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    9594            this, SLOT(sltChangeVisualStateToNormal()));
    96     connect(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     95    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    9796            this, SLOT(sltChangeVisualStateToFullscreen()));
    98     connect(gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     97    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    9998            this, SLOT(sltChangeVisualStateToSeamless()));
    10099}
     
    171170{
    172171    /* "View" actions disconnections: */
    173     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     172    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    174173               this, SLOT(sltChangeVisualStateToNormal()));
    175     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     174    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    176175               this, SLOT(sltChangeVisualStateToFullscreen()));
    177     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     176    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    178177               this, SLOT(sltChangeVisualStateToSeamless()));
    179178
     
    186185{
    187186    /* Take care of view-action toggle state: */
    188     UIAction *pActionScale = gActionPool->action(UIActionIndexRT_M_View_T_Scale);
     187    UIAction *pActionScale = gpActionPool->action(UIActionIndexRT_M_View_T_Scale);
    189188    if (pActionScale->isChecked())
    190189    {
     
    192191        pActionScale->setChecked(false);
    193192        pActionScale->blockSignals(false);
    194         pActionScale->update();
    195193    }
    196194
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp

    r52133 r52151  
    7575     * the linked key without the 'Host+' part we are adding it here. */
    7676    QString hotKey = QString("Host+%1")
    77         .arg(VBoxGlobal::extractKeyFromActionText(gActionPool->action(UIActionIndexRT_M_View_T_Seamless)->text()));
     77        .arg(VBoxGlobal::extractKeyFromActionText(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->text()));
    7878    Assert(!hotKey.isEmpty());
    7979
     
    204204
    205205    /* Disable mouse-integration isn't allowed in seamless: */
    206     gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)->setVisible(false);
     206    gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)->setVisible(false);
    207207
    208208    /* Take care of view-action toggle state: */
    209     UIAction *pActionSeamless = gActionPool->action(UIActionIndexRT_M_View_T_Seamless);
     209    UIAction *pActionSeamless = gpActionPool->action(UIActionIndexRT_M_View_T_Seamless);
    210210    if (!pActionSeamless->isChecked())
    211211    {
     
    213213        pActionSeamless->setChecked(true);
    214214        pActionSeamless->blockSignals(false);
    215         pActionSeamless->update();
    216215    }
    217216}
     
    223222
    224223    /* "View" actions connections: */
    225     connect(gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     224    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    226225            this, SLOT(sltChangeVisualStateToNormal()));
    227     connect(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     226    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    228227            this, SLOT(sltChangeVisualStateToFullscreen()));
    229     connect(gActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     228    connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    230229            this, SLOT(sltChangeVisualStateToScale()));
    231230}
     
    304303{
    305304    /* "View" actions disconnections: */
    306     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     305    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    307306               this, SLOT(sltChangeVisualStateToNormal()));
    308     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     307    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    309308               this, SLOT(sltChangeVisualStateToFullscreen()));
    310     disconnect(gActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     309    disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    311310               this, SLOT(sltChangeVisualStateToScale()));
    312311
     
    318317{
    319318    /* Take care of view-action toggle state: */
    320     UIAction *pActionSeamless = gActionPool->action(UIActionIndexRT_M_View_T_Seamless);
     319    UIAction *pActionSeamless = gpActionPool->action(UIActionIndexRT_M_View_T_Seamless);
    321320    if (pActionSeamless->isChecked())
    322321    {
     
    324323        pActionSeamless->setChecked(false);
    325324        pActionSeamless->blockSignals(false);
    326         pActionSeamless->update();
    327325    }
    328326
    329327    /* Reenable mouse-integration action: */
    330     gActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)->setVisible(true);
     328    gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration)->setVisible(true);
    331329
    332330    /* Call to base-class: */
     
    340338
    341339    /* Get corresponding menu: */
    342     QMenu *pMenu = gActionPool->action(UIActionIndexRT_M_View)->menu();
     340    QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View)->menu();
    343341    AssertPtrReturnVoid(pMenu);
    344342
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r52133 r52151  
    119119    connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()));
    120120    connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
    121             gActionPool->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger()));
     121            gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger()));
    122122    connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
    123             gActionPool->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger()));
     123            gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger()));
    124124    connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()), this, SLOT(sltRevokeFocus()));
    125125}
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp

    r51931 r52151  
    599599
    600600
    601 class UIActionStateCommonStartOrShow : public UIActionState
     601class UIActionStateCommonStartOrShow : public UIActionPolymorphic
    602602{
    603603    Q_OBJECT;
     
    606606
    607607    UIActionStateCommonStartOrShow(UIActionPool *pParent)
    608         : UIActionState(pParent,
     608        : UIActionPolymorphic(pParent,
    609609                        ":/vm_start_32px.png", ":/vm_start_16px.png",
    610610                        ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png")
     
    622622    void retranslateUi()
    623623    {
    624         switch (m_iState)
     624        switch (state())
    625625        {
    626626            case 0:
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r51992 r52151  
    10961096{
    10971097    /* Prepare File-menu: */
    1098     m_pFileMenu = gActionPool->action(UIActionIndexSelector_Menu_File)->menu();
     1098    m_pFileMenu = gpActionPool->action(UIActionIndexSelector_Menu_File)->menu();
    10991099    prepareMenuFile(m_pFileMenu);
    11001100    menuBar()->addMenu(m_pFileMenu);
    11011101
    11021102    /* Prepare 'Group' / 'Close' menu: */
    1103     m_pGroupCloseMenuAction = gActionPool->action(UIActionIndexSelector_Menu_Group_Close);
     1103    m_pGroupCloseMenuAction = gpActionPool->action(UIActionIndexSelector_Menu_Group_Close);
    11041104    m_pGroupCloseMenu = m_pGroupCloseMenuAction->menu();
    11051105    prepareMenuGroupClose(m_pGroupCloseMenu);
    11061106
    11071107    /* Prepare 'Machine' / 'Close' menu: */
    1108     m_pMachineCloseMenuAction = gActionPool->action(UIActionIndexSelector_Menu_Machine_Close);
     1108    m_pMachineCloseMenuAction = gpActionPool->action(UIActionIndexSelector_Menu_Machine_Close);
    11091109    m_pMachineCloseMenu = m_pMachineCloseMenuAction->menu();
    11101110    prepareMenuMachineClose(m_pMachineCloseMenu);
     
    11161116
    11171117    /* Prepare Group-menu: */
    1118     m_pGroupMenu = gActionPool->action(UIActionIndexSelector_Menu_Group)->menu();
     1118    m_pGroupMenu = gpActionPool->action(UIActionIndexSelector_Menu_Group)->menu();
    11191119    prepareMenuGroup(m_pGroupMenu);
    11201120    m_pGroupMenuAction = menuBar()->addMenu(m_pGroupMenu);
    11211121
    11221122    /* Prepare Machine-menu: */
    1123     m_pMachineMenu = gActionPool->action(UIActionIndexSelector_Menu_Machine)->menu();
     1123    m_pMachineMenu = gpActionPool->action(UIActionIndexSelector_Menu_Machine)->menu();
    11241124    prepareMenuMachine(m_pMachineMenu);
    11251125    m_pMachineMenuAction = menuBar()->addMenu(m_pMachineMenu);
     
    11301130
    11311131    /* Prepare Help-menu: */
    1132     m_pHelpMenu = gActionPool->action(UIActionIndex_Menu_Help)->menu();
     1132    m_pHelpMenu = gpActionPool->action(UIActionIndex_Menu_Help)->menu();
    11331133    prepareMenuHelp(m_pHelpMenu);
    11341134    menuBar()->addMenu(m_pHelpMenu);
     
    11451145
    11461146    /* Populate File-menu: */
    1147     m_pMediumManagerDialogAction = gActionPool->action(UIActionIndexSelector_Simple_File_MediumManagerDialog);
     1147    m_pMediumManagerDialogAction = gpActionPool->action(UIActionIndexSelector_Simple_File_MediumManagerDialog);
    11481148    pMenu->addAction(m_pMediumManagerDialogAction);
    1149     m_pImportApplianceWizardAction = gActionPool->action(UIActionIndexSelector_Simple_File_ImportApplianceWizard);
     1149    m_pImportApplianceWizardAction = gpActionPool->action(UIActionIndexSelector_Simple_File_ImportApplianceWizard);
    11501150    pMenu->addAction(m_pImportApplianceWizardAction);
    1151     m_pExportApplianceWizardAction = gActionPool->action(UIActionIndexSelector_Simple_File_ExportApplianceWizard);
     1151    m_pExportApplianceWizardAction = gpActionPool->action(UIActionIndexSelector_Simple_File_ExportApplianceWizard);
    11521152    pMenu->addAction(m_pExportApplianceWizardAction);
    11531153#ifndef Q_WS_MAC
     
    11551155#endif /* Q_WS_MAC */
    11561156#ifdef DEBUG
    1157     m_pExtraDataManagerWindowAction = gActionPool->action(UIActionIndexSelector_Simple_File_ExtraDataManagerWindow);
     1157    m_pExtraDataManagerWindowAction = gpActionPool->action(UIActionIndexSelector_Simple_File_ExtraDataManagerWindow);
    11581158    pMenu->addAction(m_pExtraDataManagerWindowAction);
    11591159#endif /* DEBUG */
    1160     m_pPreferencesDialogAction = gActionPool->action(UIActionIndex_Simple_Preferences);
     1160    m_pPreferencesDialogAction = gpActionPool->action(UIActionIndex_Simple_Preferences);
    11611161    pMenu->addAction(m_pPreferencesDialogAction);
    11621162#ifndef Q_WS_MAC
    11631163    pMenu->addSeparator();
    11641164#endif /* Q_WS_MAC */
    1165     m_pExitAction = gActionPool->action(UIActionIndexSelector_Simple_File_Exit);
     1165    m_pExitAction = gpActionPool->action(UIActionIndexSelector_Simple_File_Exit);
    11661166    pMenu->addAction(m_pExitAction);
    11671167}
     
    11691169void UISelectorWindow::prepareCommonActions()
    11701170{
    1171     m_pAction_Common_StartOrShow       = gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow)->toStateAction();
    1172     m_pAction_Common_PauseAndResume    = gActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume);
    1173     m_pAction_Common_Reset             = gActionPool->action(UIActionIndexSelector_Simple_Common_Reset);
    1174     m_pAction_Common_Discard           = gActionPool->action(UIActionIndexSelector_Simple_Common_Discard);
    1175     m_pAction_Common_Refresh           = gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh);
    1176     m_pAction_Common_ShowInFileManager = gActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager);
    1177     m_pAction_Common_CreateShortcut    = gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut);
     1171    m_pAction_Common_StartOrShow       = gpActionPool->action(UIActionIndexSelector_State_Common_StartOrShow)->toActionPolymorphic();
     1172    m_pAction_Common_PauseAndResume    = gpActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume);
     1173    m_pAction_Common_Reset             = gpActionPool->action(UIActionIndexSelector_Simple_Common_Reset);
     1174    m_pAction_Common_Discard           = gpActionPool->action(UIActionIndexSelector_Simple_Common_Discard);
     1175    m_pAction_Common_Refresh           = gpActionPool->action(UIActionIndexSelector_Simple_Common_Refresh);
     1176    m_pAction_Common_ShowInFileManager = gpActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager);
     1177    m_pAction_Common_CreateShortcut    = gpActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut);
    11781178}
    11791179
    11801180void UISelectorWindow::prepareGroupActions()
    11811181{
    1182     m_pAction_Group_New    = gActionPool->action(UIActionIndexSelector_Simple_Group_New);
    1183     m_pAction_Group_Add    = gActionPool->action(UIActionIndexSelector_Simple_Group_Add);
    1184     m_pAction_Group_Rename = gActionPool->action(UIActionIndexSelector_Simple_Group_Rename);
    1185     m_pAction_Group_Remove = gActionPool->action(UIActionIndexSelector_Simple_Group_Remove);
    1186     m_pAction_Group_Sort   = gActionPool->action(UIActionIndexSelector_Simple_Group_Sort);
     1182    m_pAction_Group_New    = gpActionPool->action(UIActionIndexSelector_Simple_Group_New);
     1183    m_pAction_Group_Add    = gpActionPool->action(UIActionIndexSelector_Simple_Group_Add);
     1184    m_pAction_Group_Rename = gpActionPool->action(UIActionIndexSelector_Simple_Group_Rename);
     1185    m_pAction_Group_Remove = gpActionPool->action(UIActionIndexSelector_Simple_Group_Remove);
     1186    m_pAction_Group_Sort   = gpActionPool->action(UIActionIndexSelector_Simple_Group_Sort);
    11871187}
    11881188
    11891189void UISelectorWindow::prepareMachineActions()
    11901190{
    1191     m_pAction_Machine_New        = gActionPool->action(UIActionIndexSelector_Simple_Machine_New);
    1192     m_pAction_Machine_Add        = gActionPool->action(UIActionIndexSelector_Simple_Machine_Add);
    1193     m_pAction_Machine_Settings   = gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings);
    1194     m_pAction_Machine_Clone      = gActionPool->action(UIActionIndexSelector_Simple_Machine_Clone);
    1195     m_pAction_Machine_Remove     = gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove);
    1196     m_pAction_Machine_AddGroup   = gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup);
    1197     m_pAction_Machine_LogDialog  = gActionPool->action(UIActionIndex_Simple_LogDialog);
    1198     m_pAction_Machine_SortParent = gActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent);
     1191    m_pAction_Machine_New        = gpActionPool->action(UIActionIndexSelector_Simple_Machine_New);
     1192    m_pAction_Machine_Add        = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Add);
     1193    m_pAction_Machine_Settings   = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Settings);
     1194    m_pAction_Machine_Clone      = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Clone);
     1195    m_pAction_Machine_Remove     = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Remove);
     1196    m_pAction_Machine_AddGroup   = gpActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup);
     1197    m_pAction_Machine_LogDialog  = gpActionPool->action(UIActionIndex_Simple_LogDialog);
     1198    m_pAction_Machine_SortParent = gpActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent);
    11991199}
    12001200
     
    12791279
    12801280    /* Populate 'Group' / 'Close' menu: */
    1281     m_pGroupSaveAction = gActionPool->action(UIActionIndexSelector_Simple_Group_Close_Save);
     1281    m_pGroupSaveAction = gpActionPool->action(UIActionIndexSelector_Simple_Group_Close_Save);
    12821282    pMenu->addAction(m_pGroupSaveAction);
    1283     m_pGroupACPIShutdownAction = gActionPool->action(UIActionIndexSelector_Simple_Group_Close_ACPIShutdown);
     1283    m_pGroupACPIShutdownAction = gpActionPool->action(UIActionIndexSelector_Simple_Group_Close_ACPIShutdown);
    12841284    pMenu->addAction(m_pGroupACPIShutdownAction);
    1285     m_pGroupPowerOffAction = gActionPool->action(UIActionIndexSelector_Simple_Group_Close_PowerOff);
     1285    m_pGroupPowerOffAction = gpActionPool->action(UIActionIndexSelector_Simple_Group_Close_PowerOff);
    12861286    pMenu->addAction(m_pGroupPowerOffAction);
    12871287
     
    12991299
    13001300    /* Populate 'Machine' / 'Close' menu: */
    1301     m_pMachineSaveAction = gActionPool->action(UIActionIndexSelector_Simple_Machine_Close_Save);
     1301    m_pMachineSaveAction = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Close_Save);
    13021302    pMenu->addAction(m_pMachineSaveAction);
    1303     m_pMachineACPIShutdownAction = gActionPool->action(UIActionIndexSelector_Simple_Machine_Close_ACPIShutdown);
     1303    m_pMachineACPIShutdownAction = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Close_ACPIShutdown);
    13041304    pMenu->addAction(m_pMachineACPIShutdownAction);
    1305     m_pMachinePowerOffAction = gActionPool->action(UIActionIndexSelector_Simple_Machine_Close_PowerOff);
     1305    m_pMachinePowerOffAction = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Close_PowerOff);
    13061306    pMenu->addAction(m_pMachinePowerOffAction);
    13071307
     
    13191319
    13201320    /* Populate Help-menu: */
    1321     m_pHelpAction = gActionPool->action(UIActionIndex_Simple_Contents);
     1321    m_pHelpAction = gpActionPool->action(UIActionIndex_Simple_Contents);
    13221322    pMenu->addAction(m_pHelpAction);
    1323     m_pWebAction = gActionPool->action(UIActionIndex_Simple_WebSite);
     1323    m_pWebAction = gpActionPool->action(UIActionIndex_Simple_WebSite);
    13241324    pMenu->addAction(m_pWebAction);
    13251325    pMenu->addSeparator();
    1326     m_pResetWarningsAction = gActionPool->action(UIActionIndex_Simple_ResetWarnings);
     1326    m_pResetWarningsAction = gpActionPool->action(UIActionIndex_Simple_ResetWarnings);
    13271327    pMenu->addAction(m_pResetWarningsAction);
    13281328#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    13291329    pMenu->addSeparator();
    1330     m_pNetworkAccessManager = gActionPool->action(UIActionIndex_Simple_NetworkAccessManager);
     1330    m_pNetworkAccessManager = gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager);
    13311331    pMenu->addAction(m_pNetworkAccessManager);
    1332     m_pUpdateAction = gActionPool->action(UIActionIndex_Simple_CheckForUpdates);
     1332    m_pUpdateAction = gpActionPool->action(UIActionIndex_Simple_CheckForUpdates);
    13331333    if (gEDataManager->applicationUpdateEnabled())
    13341334        pMenu->addAction(m_pUpdateAction);
     
    13391339    pMenu->addSeparator();
    13401340#endif /* !Q_WS_MAC */
    1341     m_pAboutAction = gActionPool->action(UIActionIndex_Simple_About);
     1341    m_pAboutAction = gpActionPool->action(UIActionIndex_Simple_About);
    13421342    pMenu->addAction(m_pAboutAction);
    13431343}
     
    16581658    m_pAction_Common_PauseAndResume->blockSignals(true);
    16591659    m_pAction_Common_PauseAndResume->setChecked(pFirstStartedAction && UIVMItem::isItemPaused(pFirstStartedAction));
    1660     m_pAction_Common_PauseAndResume->update();
     1660    m_pAction_Common_PauseAndResume->retranslateUi();
    16611661    m_pAction_Common_PauseAndResume->blockSignals(false);
    16621662
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h

    r51931 r52151  
    3131class QMenu;
    3232class UIAction;
    33 class UIActionState;
     33class UIActionPolymorphic;
    3434class UIMainBar;
    3535class UIToolBar;
     
    191191
    192192    /* Common Group/Machine actions: */
    193     UIActionState *m_pAction_Common_StartOrShow;
     193    UIActionPolymorphic *m_pAction_Common_StartOrShow;
    194194    UIAction *m_pAction_Common_PauseAndResume;
    195195    UIAction *m_pAction_Common_Reset;
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp

    r51579 r52151  
    11411141
    11421142    connect(m_pSettingsButton, SIGNAL(sigButtonClicked()),
    1143             gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings), SLOT(trigger()),
     1143            gpActionPool->action(UIActionIndexSelector_Simple_Machine_Settings), SLOT(trigger()),
    11441144            Qt::QueuedConnection);
    11451145    connect(m_pStartButton, SIGNAL(sigButtonClicked()),
    1146             gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow), SLOT(trigger()),
     1146            gpActionPool->action(UIActionIndexSelector_State_Common_StartOrShow), SLOT(trigger()),
    11471147            Qt::QueuedConnection);
    11481148    connect(m_pPauseButton, SIGNAL(sigButtonClicked()),
    1149             gActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume), SLOT(trigger()),
     1149            gpActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume), SLOT(trigger()),
    11501150            Qt::QueuedConnection);
    11511151    connect(m_pCloseButton, SIGNAL(sigButtonClicked()),
    1152             gActionPool->action(UIActionIndexSelector_Simple_Machine_Close_PowerOff), SLOT(trigger()),
     1152            gpActionPool->action(UIActionIndexSelector_Simple_Machine_Close_PowerOff), SLOT(trigger()),
    11531153            Qt::QueuedConnection);
    11541154}
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r51679 r52151  
    530530void UIGChooserModel::activateMachineItem()
    531531{
    532     gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow)->activate(QAction::Trigger);
     532    gpActionPool->action(UIActionIndexSelector_State_Common_StartOrShow)->activate(QAction::Trigger);
    533533}
    534534
     
    699699{
    700700    /* Check if action is enabled: */
    701     if (!gActionPool->action(UIActionIndexSelector_Simple_Group_Rename)->isEnabled())
     701    if (!gpActionPool->action(UIActionIndexSelector_Simple_Group_Rename)->isEnabled())
    702702        return;
    703703
     
    713713{
    714714    /* Check if action is enabled: */
    715     if (!gActionPool->action(UIActionIndexSelector_Simple_Group_Sort)->isEnabled())
     715    if (!gpActionPool->action(UIActionIndexSelector_Simple_Group_Sort)->isEnabled())
    716716        return;
    717717
     
    727727{
    728728    /* Check if action is enabled: */
    729     if (!gActionPool->action(UIActionIndexSelector_Simple_Group_Remove)->isEnabled())
     729    if (!gpActionPool->action(UIActionIndexSelector_Simple_Group_Remove)->isEnabled())
    730730        return;
    731731
     
    803803{
    804804    /* Check if action is enabled: */
    805     if (!gActionPool->action(UIActionIndexSelector_Simple_Machine_New)->isEnabled())
     805    if (!gpActionPool->action(UIActionIndexSelector_Simple_Machine_New)->isEnabled())
    806806        return;
    807807
     
    827827{
    828828    /* Check if action is enabled: */
    829     if (!gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup)->isEnabled())
     829    if (!gpActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup)->isEnabled())
    830830        return;
    831831
     
    902902{
    903903    /* Check if action is enabled: */
    904     if (!gActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent)->isEnabled())
     904    if (!gpActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent)->isEnabled())
    905905        return;
    906906
     
    916916{
    917917    /* Check if action is enabled: */
    918     if (!gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh)->isEnabled())
     918    if (!gpActionPool->action(UIActionIndexSelector_Simple_Common_Refresh)->isEnabled())
    919919        return;
    920920
     
    957957{
    958958    /* Check if action is enabled: */
    959     if (!gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove)->isEnabled())
     959    if (!gpActionPool->action(UIActionIndexSelector_Simple_Machine_Remove)->isEnabled())
    960960        return;
    961961
     
    11261126    /* Context menu for group(s): */
    11271127    m_pContextMenuGroup = new QMenu;
    1128     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_New));
    1129     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Add));
     1128    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Group_New));
     1129    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Group_Add));
    11301130    m_pContextMenuGroup->addSeparator();
    1131     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Rename));
    1132     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Remove));
     1131    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Group_Rename));
     1132    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Group_Remove));
    11331133    m_pContextMenuGroup->addSeparator();
    1134     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow));
    1135     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume));
    1136     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Reset));
    1137     m_pContextMenuGroup->addMenu(gActionPool->action(UIActionIndexSelector_Menu_Group_Close)->menu());
     1134    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_State_Common_StartOrShow));
     1135    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume));
     1136    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_Reset));
     1137    m_pContextMenuGroup->addMenu(gpActionPool->action(UIActionIndexSelector_Menu_Group_Close)->menu());
    11381138    m_pContextMenuGroup->addSeparator();
    1139     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Discard));
    1140     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh));
     1139    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_Discard));
     1140    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_Refresh));
    11411141    m_pContextMenuGroup->addSeparator();
    1142     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager));
    1143     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut));
     1142    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager));
     1143    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut));
    11441144    m_pContextMenuGroup->addSeparator();
    1145     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Sort));
     1145    m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Group_Sort));
    11461146
    11471147    /* Context menu for machine(s): */
    11481148    m_pContextMenuMachine = new QMenu;
    1149     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings));
    1150     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Clone));
    1151     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove));
    1152     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup));
     1149    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Machine_Settings));
     1150    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Machine_Clone));
     1151    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Machine_Remove));
     1152    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup));
    11531153    m_pContextMenuMachine->addSeparator();
    1154     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow));
    1155     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume));
    1156     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Reset));
    1157     m_pContextMenuMachine->addMenu(gActionPool->action(UIActionIndexSelector_Menu_Machine_Close)->menu());
     1154    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_State_Common_StartOrShow));
     1155    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume));
     1156    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_Reset));
     1157    m_pContextMenuMachine->addMenu(gpActionPool->action(UIActionIndexSelector_Menu_Machine_Close)->menu());
    11581158    m_pContextMenuMachine->addSeparator();
    1159     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Discard));
    1160     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndex_Simple_LogDialog));
    1161     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh));
     1159    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_Discard));
     1160    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndex_Simple_LogDialog));
     1161    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_Refresh));
    11621162    m_pContextMenuMachine->addSeparator();
    1163     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager));
    1164     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut));
     1163    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager));
     1164    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut));
    11651165    m_pContextMenuMachine->addSeparator();
    1166     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent));
     1166    m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent));
    11671167
    11681168    connect(m_pContextMenuGroup, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*)));
    11691169    connect(m_pContextMenuMachine, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*)));
    11701170
    1171     connect(gActionPool->action(UIActionIndexSelector_Simple_Group_New), SIGNAL(triggered()),
     1171    connect(gpActionPool->action(UIActionIndexSelector_Simple_Group_New), SIGNAL(triggered()),
    11721172            this, SLOT(sltCreateNewMachine()));
    1173     connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_New), SIGNAL(triggered()),
     1173    connect(gpActionPool->action(UIActionIndexSelector_Simple_Machine_New), SIGNAL(triggered()),
    11741174            this, SLOT(sltCreateNewMachine()));
    1175     connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Rename), SIGNAL(triggered()),
     1175    connect(gpActionPool->action(UIActionIndexSelector_Simple_Group_Rename), SIGNAL(triggered()),
    11761176            this, SLOT(sltEditGroupName()));
    1177     connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Remove), SIGNAL(triggered()),
     1177    connect(gpActionPool->action(UIActionIndexSelector_Simple_Group_Remove), SIGNAL(triggered()),
    11781178            this, SLOT(sltUngroupSelectedGroup()));
    1179     connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove), SIGNAL(triggered()),
     1179    connect(gpActionPool->action(UIActionIndexSelector_Simple_Machine_Remove), SIGNAL(triggered()),
    11801180            this, SLOT(sltRemoveSelectedMachine()));
    1181     connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup), SIGNAL(triggered()),
     1181    connect(gpActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup), SIGNAL(triggered()),
    11821182            this, SLOT(sltGroupSelectedMachines()));
    1183     connect(gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh), SIGNAL(triggered()),
     1183    connect(gpActionPool->action(UIActionIndexSelector_Simple_Common_Refresh), SIGNAL(triggered()),
    11841184            this, SLOT(sltPerformRefreshAction()));
    1185     connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent), SIGNAL(triggered()),
     1185    connect(gpActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent), SIGNAL(triggered()),
    11861186            this, SLOT(sltSortParentGroup()));
    1187     connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Sort), SIGNAL(triggered()),
     1187    connect(gpActionPool->action(UIActionIndexSelector_Simple_Group_Sort), SIGNAL(triggered()),
    11881188            this, SLOT(sltSortGroup()));
    11891189
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette