VirtualBox

Changeset 52202 in vbox


Ignore:
Timestamp:
Jul 25, 2014 8:34:38 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95262
Message:

FE/Qt: 7462: Action-pool interface cleanup/rework (part 02).

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

Legend:

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

    r52190 r52202  
    31663166                emit sigLanguageChange(extraDataString(strKey));
    31673167            /* Selector UI shortcut changed? */
    3168             else if (strKey == GUI_Input_SelectorShortcuts && gpActionPool->type() == UIActionPoolType_Selector)
     3168            else if (strKey == GUI_Input_SelectorShortcuts)
    31693169                emit sigSelectorUIShortcutChange();
    31703170            /* Runtime UI shortcut changed? */
    3171             else if (strKey == GUI_Input_MachineShortcuts && gpActionPool->type() == UIActionPoolType_Runtime)
     3171            else if (strKey == GUI_Input_MachineShortcuts)
    31723172                emit sigRuntimeUIShortcutChange();
    31733173#ifdef Q_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r52184 r52202  
    547547
    548548
    549 UIActionPool* UIActionPool::m_pInstance = 0;
    550 
    551549/* static */
    552 UIActionPool* UIActionPool::instance()
    553 {
    554     return m_pInstance;
     550UIActionPool* UIActionPool::create(UIActionPoolType type)
     551{
     552    UIActionPool *pActionPool = 0;
     553    switch (type)
     554    {
     555        case UIActionPoolType_Selector: pActionPool = new UIActionPoolSelector; break;
     556        case UIActionPoolType_Runtime: pActionPool = new UIActionPoolRuntime; break;
     557        default: AssertFailedReturn(0);
     558    }
     559    AssertPtrReturn(pActionPool, 0);
     560    pActionPool->prepare();
     561    return pActionPool;
    555562}
    556563
    557564/* static */
    558 void UIActionPool::create(UIActionPoolType type)
    559 {
    560     /* Check that instance do NOT exists: */
    561     if (m_pInstance)
    562         return;
    563 
    564     /* Create instance: */
    565     switch (type)
    566     {
    567         case UIActionPoolType_Selector: new UIActionPoolSelector; break;
    568         case UIActionPoolType_Runtime: new UIActionPoolRuntime; break;
    569         default: break;
    570     }
    571 
    572     /* Prepare instance: */
    573     m_pInstance->prepare();
    574 }
    575 
    576 /* static */
    577 void UIActionPool::destroy()
    578 {
    579     /* Check that instance exists: */
    580     if (!m_pInstance)
    581         return;
    582 
    583     /* Cleanup instance: */
    584     m_pInstance->cleanup();
    585 
    586     /* Delete instance: */
    587     delete m_pInstance;
     565void UIActionPool::destroy(UIActionPool *pActionPool)
     566{
     567    AssertPtrReturnVoid(pActionPool);
     568    pActionPool->cleanup();
     569    delete pActionPool;
    588570}
    589571
     
    591573void UIActionPool::createTemporary(UIActionPoolType type)
    592574{
    593     UIActionPool *pHelperPool = 0;
     575    UIActionPool *pActionPool = 0;
    594576    switch (type)
    595577    {
    596         case UIActionPoolType_Selector: pHelperPool = new UIActionPoolSelector; break;
    597         case UIActionPoolType_Runtime: pHelperPool = new UIActionPoolRuntime; break;
    598         default: break;
    599     }
    600     if (pHelperPool)
    601     {
    602         pHelperPool->prepare();
    603         pHelperPool->cleanup();
    604         delete pHelperPool;
    605     }
    606 }
    607 
    608 UIActionPool::UIActionPool(UIActionPoolType type)
     578        case UIActionPoolType_Selector: pActionPool = new UIActionPoolSelector(true); break;
     579        case UIActionPoolType_Runtime: pActionPool = new UIActionPoolRuntime(true); break;
     580        default: AssertFailedReturnVoid();
     581    }
     582    AssertPtrReturnVoid(pActionPool);
     583    pActionPool->prepare();
     584    pActionPool->cleanup();
     585    delete pActionPool;
     586}
     587
     588UIActionPool::UIActionPool(UIActionPoolType type, bool fTemporary /* = false */)
    609589    : m_type(type)
    610 {
    611     /* Prepare instance: */
    612     if (!m_pInstance)
    613         m_pInstance = this;
    614 }
    615 
    616 UIActionPool::~UIActionPool()
    617 {
    618     /* Cleanup instance: */
    619     if (m_pInstance == this)
    620         m_pInstance = 0;
     590    , m_fTemporary(fTemporary)
     591{
    621592}
    622593
     
    639610    /* Update configuration: */
    640611    updateConfiguration();
    641     /* Apply shortcuts: */
    642     sltApplyShortcuts();
     612    /* Update shortcuts: */
     613    updateShortcuts();
    643614}
    644615
    645616void UIActionPool::preparePool()
    646617{
    647     /* Various actions: */
     618    /* Create various actions: */
    648619    m_pool[UIActionIndex_Simple_Preferences] = new UIActionSimplePreferences(this);
    649620    m_pool[UIActionIndex_Simple_LogDialog] = new UIActionSimpleLogDialog(this);
    650621
    651     /* 'Help' actions: */
     622    /* Create 'Help' actions: */
    652623    m_pool[UIActionIndex_Menu_Help] = new UIActionMenuHelp(this);
    653624    m_pool[UIActionIndex_Simple_Contents] = new UIActionSimpleContents(this);
     
    671642    /* Cleanup pool: */
    672643    cleanupPool();
     644}
     645
     646void UIActionPool::updateShortcuts()
     647{
     648    gShortcutPool->applyShortcuts(this);
    673649}
    674650
     
    706682}
    707683
    708 void UIActionPool::sltApplyShortcuts()
    709 {
    710     gShortcutPool->applyShortcuts(this);
    711 }
    712 
    713684bool UIActionPool::event(QEvent *pEvent)
    714685{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r52184 r52202  
    7070};
    7171
     72/** Restriction levels. */
     73enum UIActionRestrictionLevel
     74{
     75    UIActionRestrictionLevel_Base,
     76    UIActionRestrictionLevel_Session,
     77    UIActionRestrictionLevel_Logic
     78};
     79
    7280
    7381/** QMenu extension
     
    265273
    266274/** Abstract QObject extension
    267   * representing action-pool singleton. */
     275  * representing action-pool interface and factory. */
    268276class UIActionPool : public QIWithRetranslateUI3<QObject>
    269277{
     
    272280public:
    273281
    274     /** Restriction levels. */
    275     enum UIActionRestrictionLevel
    276     {
    277         UIActionRestrictionLevel_Base,
    278         UIActionRestrictionLevel_Session,
    279         UIActionRestrictionLevel_Logic
    280     };
    281 
    282     /** Singleton instance access member. */
    283     static UIActionPool* instance();
    284 
    285282    /** Static factory constructor. */
    286     static void create(UIActionPoolType type);
     283    static UIActionPool* create(UIActionPoolType type);
    287284    /** Static factory destructor. */
    288     static void destroy();
     285    static void destroy(UIActionPool *pActionPool);
    289286
    290287    /** Static factory constructor (temporary),
     
    317314
    318315    /** Loads keyboard shortcuts of action-pool into shortcuts-pool. */
    319     void sltApplyShortcuts();
     316    void sltApplyShortcuts() { updateShortcuts(); }
    320317
    321318protected:
    322319
    323320    /** Constructor of the action-pool of passed @a type. */
    324     UIActionPool(UIActionPoolType type);
    325     /** Destructor. */
    326     ~UIActionPool();
     321    UIActionPool(UIActionPoolType type, bool fTemporary = false);
    327322
    328323    /** Prepare routine. */
     
    341336    /** Update configuration routine. */
    342337    virtual void updateConfiguration() = 0;
     338    /** Update shortcuts. */
     339    virtual void updateShortcuts();
    343340
    344341    /** General event handler. */
    345342    virtual bool event(QEvent *pEvent);
    346343
    347     /** Holds the singleton action-pool instance. */
    348     static UIActionPool *m_pInstance;
    349344    /** Holds the action-pool type. */
    350     UIActionPoolType m_type;
     345    const UIActionPoolType m_type;
     346    /** Holds whether this action-pool is temporary. */
     347    const bool m_fTemporary;
    351348    /** Holds all the actions action-pool contains. */
    352349    QMap<int, UIAction*> m_pool;
    353350};
    354351
    355 #define gpActionPool UIActionPool::instance()
    356 
    357352#endif /* !___UIActionPool_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r52188 r52202  
    6464#include "UIIconPool.h"
    6565#include "UIShortcutPool.h"
    66 #include "UIActionPoolSelector.h"
    67 #include "UIActionPoolRuntime.h"
    6866#include "UIExtraDataManager.h"
    6967#include "QIFileDialog.h"
     
    43084306    UIUpdateManager::schedule();
    43094307#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    4310 
    4311     /* Create action pool: */
    4312     if (isVMConsoleProcess())
    4313     {
    4314         UIActionPool::create(UIActionPoolType_Runtime);
    4315         UIActionPool::createTemporary(UIActionPoolType_Selector);
    4316     }
    4317     else
    4318     {
    4319         UIActionPool::create(UIActionPoolType_Selector);
    4320         UIActionPool::createTemporary(UIActionPoolType_Runtime);
    4321     }
    43224308}
    43234309
     
    43354321    UINetworkManager::destroy();
    43364322#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    4337 
    4338     /* Destroy action pool: */
    4339     UIActionPool::destroy();
    43404323
    43414324    /* Destroy shortcut pool: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp

    r52186 r52202  
    4141
    4242    UIActionMenuMachineRuntime(UIActionPool *pParent)
    43         : UIActionMenu(pParent)
    44     {
    45         retranslateUi();
    46     }
     43        : UIActionMenu(pParent) {}
    4744
    4845protected:
     
    6158
    6259    UIActionSimpleShowSettingsDialog(UIActionPool *pParent)
    63         : UIActionSimple(pParent, ":/vm_settings_16px.png", ":/vm_settings_disabled_16px.png")
    64     {
    65         retranslateUi();
    66     }
     60        : UIActionSimple(pParent, ":/vm_settings_16px.png", ":/vm_settings_disabled_16px.png") {}
    6761
    6862protected:
     
    9286
    9387    UIActionSimplePerformTakeSnapshot(UIActionPool *pParent)
    94         : UIActionSimple(pParent, ":/snapshot_take_16px.png", ":/snapshot_take_disabled_16px.png")
    95     {
    96         retranslateUi();
    97     }
     88        : UIActionSimple(pParent, ":/snapshot_take_16px.png", ":/snapshot_take_disabled_16px.png") {}
    9889
    9990protected:
     
    123114
    124115    UIActionSimplePerformTakeScreenshot(UIActionPool *pParent)
    125         : UIActionSimple(pParent, ":/screenshot_take_16px.png", ":/screenshot_take_disabled_16px.png")
    126     {
    127         retranslateUi();
    128     }
     116        : UIActionSimple(pParent, ":/screenshot_take_16px.png", ":/screenshot_take_disabled_16px.png") {}
    129117
    130118protected:
     
    154142
    155143    UIActionSimpleShowInformationDialog(UIActionPool *pParent)
    156         : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png")
    157     {
    158         retranslateUi();
    159     }
     144        : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png") {}
    160145
    161146protected:
     
    185170
    186171    UIActionMenuKeyboard(UIActionPool *pParent)
    187         : UIActionMenu(pParent)
    188     {
    189         retranslateUi();
    190     }
     172        : UIActionMenu(pParent) {}
    191173
    192174protected:
     
    202184
    203185    UIActionSimpleKeyboardSettings(UIActionPool *pParent)
    204         : UIActionSimple(pParent, ":/keyboard_settings_16px.png", ":/keyboard_settings_disabled_16px.png")
    205     {
    206         retranslateUi();
    207     }
     186        : UIActionSimple(pParent, ":/keyboard_settings_16px.png", ":/keyboard_settings_disabled_16px.png") {}
    208187
    209188protected:
     
    228207
    229208    UIActionMenuMouseIntegration(UIActionPool *pParent)
    230         : UIActionMenu(pParent)
    231     {
    232         retranslateUi();
    233     }
     209        : UIActionMenu(pParent) {}
    234210
    235211protected:
     
    247223        : UIActionToggle(pParent,
    248224                         ":/mouse_can_seamless_on_16px.png", ":/mouse_can_seamless_16px.png",
    249                          ":/mouse_can_seamless_on_disabled_16px.png", ":/mouse_can_seamless_disabled_16px.png")
    250     {
    251         retranslateUi();
    252     }
     225                         ":/mouse_can_seamless_on_disabled_16px.png", ":/mouse_can_seamless_disabled_16px.png") {}
    253226
    254227protected:
     
    278251
    279252    UIActionSimplePerformTypeCAD(UIActionPool *pParent)
    280         : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png")
    281     {
    282         retranslateUi();
    283     }
     253        : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png") {}
    284254
    285255protected:
     
    310280
    311281    UIActionSimplePerformTypeCABS(UIActionPool *pParent)
    312         : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png")
    313     {
    314         retranslateUi();
    315     }
     282        : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png") {}
    316283
    317284protected:
     
    344311        : UIActionToggle(pParent,
    345312                         ":/vm_pause_on_16px.png", ":/vm_pause_16px.png",
    346                          ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png")
    347     {
    348         retranslateUi();
    349     }
     313                         ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png") {}
    350314
    351315protected:
     
    375339
    376340    UIActionSimplePerformReset(UIActionPool *pParent)
    377         : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png")
    378     {
    379         retranslateUi();
    380     }
     341        : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") {}
    381342
    382343protected:
     
    406367
    407368    UIActionSimplePerformSave(UIActionPool *pParent)
    408         : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png")
    409     {
    410         retranslateUi();
    411     }
     369        : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") {}
    412370
    413371protected:
     
    432390
    433391    UIActionSimplePerformShutdown(UIActionPool *pParent)
    434         : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png")
    435     {
    436         retranslateUi();
    437     }
     392        : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") {}
    438393
    439394protected:
     
    467422
    468423    UIActionSimplePerformPowerOff(UIActionPool *pParent)
    469         : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png")
    470     {
    471         retranslateUi();
    472     }
     424        : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") {}
    473425
    474426protected:
     
    496448    {
    497449        setMenuRole(QAction::QuitRole);
    498         retranslateUi();
    499450    }
    500451
     
    525476
    526477    UIActionMenuView(UIActionPool *pParent)
    527         : UIActionMenu(pParent)
    528     {
    529         retranslateUi();
    530     }
     478        : UIActionMenu(pParent) {}
    531479
    532480protected:
     
    545493
    546494    UIActionMenuViewPopup(UIActionPool *pParent)
    547         : UIActionMenu(pParent)
    548     {
    549         retranslateUi();
    550     }
     495        : UIActionMenu(pParent) {}
    551496
    552497protected:
     
    564509        : UIActionToggle(pParent,
    565510                         ":/fullscreen_on_16px.png", ":/fullscreen_16px.png",
    566                          ":/fullscreen_on_disabled_16px.png", ":/fullscreen_disabled_16px.png")
    567     {
    568         retranslateUi();
    569     }
     511                         ":/fullscreen_on_disabled_16px.png", ":/fullscreen_disabled_16px.png") {}
    570512
    571513protected:
     
    597539        : UIActionToggle(pParent,
    598540                         ":/seamless_on_16px.png", ":/seamless_16px.png",
    599                          ":/seamless_on_disabled_16px.png", ":/seamless_disabled_16px.png")
    600     {
    601         retranslateUi();
    602     }
     541                         ":/seamless_on_disabled_16px.png", ":/seamless_disabled_16px.png") {}
    603542
    604543protected:
     
    630569        : UIActionToggle(pParent,
    631570                         ":/scale_on_16px.png", ":/scale_16px.png",
    632                          ":/scale_on_disabled_16px.png", ":/scale_disabled_16px.png")
    633     {
    634         retranslateUi();
    635     }
     571                         ":/scale_on_disabled_16px.png", ":/scale_disabled_16px.png") {}
    636572
    637573protected:
     
    663599        : UIActionToggle(pParent,
    664600                         ":/auto_resize_on_on_16px.png", ":/auto_resize_on_16px.png",
    665                          ":/auto_resize_on_on_disabled_16px.png", ":/auto_resize_on_disabled_16px.png")
    666     {
    667         retranslateUi();
    668     }
     601                         ":/auto_resize_on_on_disabled_16px.png", ":/auto_resize_on_disabled_16px.png") {}
    669602
    670603protected:
     
    694627
    695628    UIActionSimplePerformWindowAdjust(UIActionPool *pParent)
    696         : UIActionSimple(pParent, ":/adjust_win_size_16px.png", ":/adjust_win_size_disabled_16px.png")
    697     {
    698         retranslateUi();
    699     }
     629        : UIActionSimple(pParent, ":/adjust_win_size_16px.png", ":/adjust_win_size_disabled_16px.png") {}
    700630
    701631protected:
     
    725655
    726656    UIActionMenuStatusBar(UIActionPool *pParent)
    727         : UIActionMenu(pParent, ":/statusbar_16px.png", ":/statusbar_disabled_16px.png")
    728     {
    729         retranslateUi();
    730     }
     657        : UIActionMenu(pParent, ":/statusbar_16px.png", ":/statusbar_disabled_16px.png") {}
    731658
    732659protected:
     
    745672
    746673    UIActionSimpleShowStatusBarSettingsWindow(UIActionPool *pParent)
    747         : UIActionSimple(pParent, ":/statusbar_settings_16px.png", ":/statusbar_settings_disabled_16px.png")
    748     {
    749         retranslateUi();
    750     }
     674        : UIActionSimple(pParent, ":/statusbar_settings_16px.png", ":/statusbar_settings_disabled_16px.png") {}
    751675
    752676protected:
     
    772696    UIActionToggleStatusBar(UIActionPool *pParent)
    773697        : UIActionToggle(pParent, ":/statusbar_on_16px.png", ":/statusbar_16px.png",
    774                                   ":/statusbar_on_disabled_16px.png", ":/statusbar_disabled_16px.png")
    775     {
    776         retranslateUi();
    777     }
     698                                  ":/statusbar_on_disabled_16px.png", ":/statusbar_disabled_16px.png") {}
    778699
    779700protected:
     
    798719
    799720    UIActionMenuDevices(UIActionPool *pParent)
    800         : UIActionMenu(pParent)
    801     {
    802         retranslateUi();
    803     }
     721        : UIActionMenu(pParent) {}
    804722
    805723protected:
     
    821739    {
    822740        setShowToolTip(true);
    823         retranslateUi();
    824741    }
    825742
     
    836753
    837754    UIActionSimpleShowStorageSettingsDialog(UIActionPool *pParent)
    838         : UIActionSimple(pParent, ":/hd_settings_16px.png", ":/hd_settings_disabled_16px.png")
    839     {
    840         retranslateUi();
    841     }
     755        : UIActionSimple(pParent, ":/hd_settings_16px.png", ":/hd_settings_disabled_16px.png") {}
    842756
    843757protected:
     
    865779    {
    866780        setShowToolTip(true);
    867         retranslateUi();
    868781    }
    869782
     
    886799    {
    887800        setShowToolTip(true);
    888         retranslateUi();
    889801    }
    890802
     
    907819    {
    908820        setShowToolTip(true);
    909         retranslateUi();
    910821    }
    911822
     
    925836
    926837    UIActionSimpleShowUSBDevicesSettingsDialog(UIActionPool *pParent)
    927         : UIActionSimple(pParent, ":/usb_settings_16px.png", ":/usb_settings_disabled_16px.png")
    928     {
    929         retranslateUi();
    930     }
     838        : UIActionSimple(pParent, ":/usb_settings_16px.png", ":/usb_settings_disabled_16px.png") {}
    931839
    932840protected:
     
    954862    {
    955863        setShowToolTip(true);
    956         retranslateUi();
    957864    }
    958865
     
    972879
    973880    UIActionMenuSharedClipboard(UIActionPool *pParent)
    974         : UIActionMenu(pParent, ":/shared_clipboard_16px.png", ":/shared_clipboard_disabled_16px.png")
    975     {
    976         retranslateUi();
    977     }
     881        : UIActionMenu(pParent, ":/shared_clipboard_16px.png", ":/shared_clipboard_disabled_16px.png") {}
    978882
    979883protected:
     
    992896
    993897    UIActionMenuDragAndDrop(UIActionPool *pParent)
    994         : UIActionMenu(pParent, ":/drag_drop_16px.png", ":/drag_drop_disabled_16px.png")
    995     {
    996         retranslateUi();
    997     }
     898        : UIActionMenu(pParent, ":/drag_drop_16px.png", ":/drag_drop_disabled_16px.png") {}
    998899
    999900protected:
     
    1012913
    1013914    UIActionMenuNetworkAdapters(UIActionPool *pParent)
    1014         : UIActionMenu(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png")
    1015     {
    1016         retranslateUi();
    1017     }
     915        : UIActionMenu(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png") {}
    1018916
    1019917protected:
     
    1032930
    1033931    UIActionSimpleShowNetworkSettingsDialog(UIActionPool *pParent)
    1034         : UIActionSimple(pParent, ":/nw_settings_16px.png", ":/nw_settings_disabled_16px.png")
    1035     {
    1036         retranslateUi();
    1037     }
     932        : UIActionSimple(pParent, ":/nw_settings_16px.png", ":/nw_settings_disabled_16px.png") {}
    1038933
    1039934protected:
     
    1058953
    1059954    UIActionMenuSharedFolders(UIActionPool *pParent)
    1060         : UIActionMenu(pParent)
    1061     {
    1062         retranslateUi();
    1063     }
     955        : UIActionMenu(pParent) {}
    1064956
    1065957protected:
     
    1075967
    1076968    UIActionSimpleShowSharedFoldersSettingsDialog(UIActionPool *pParent)
    1077         : UIActionSimple(pParent, ":/sf_settings_16px.png", ":/sf_settings_disabled_16px.png")
    1078     {
    1079         retranslateUi();
    1080     }
     969        : UIActionSimple(pParent, ":/sf_settings_16px.png", ":/sf_settings_disabled_16px.png") {}
    1081970
    1082971protected:
     
    1103992        : UIActionToggle(pParent,
    1104993                         ":/vrdp_on_16px.png", ":/vrdp_16px.png",
    1105                          ":/vrdp_on_disabled_16px.png", ":/vrdp_disabled_16px.png")
    1106     {
    1107         retranslateUi();
    1108     }
     994                         ":/vrdp_on_disabled_16px.png", ":/vrdp_disabled_16px.png") {}
    1109995
    1110996protected:
     
    11291015
    11301016    UIActionMenuVideoCapture(UIActionPool *pParent)
    1131         : UIActionMenu(pParent)
    1132     {
    1133         retranslateUi();
    1134     }
     1017        : UIActionMenu(pParent) {}
    11351018
    11361019protected:
     
    11481031        : UIActionToggle(pParent,
    11491032                         ":/video_capture_on_16px.png", ":/video_capture_16px.png",
    1150                          ":/video_capture_on_disabled_16px.png", ":/video_capture_disabled_16px.png")
    1151     {
    1152         retranslateUi();
    1153     }
     1033                         ":/video_capture_on_disabled_16px.png", ":/video_capture_disabled_16px.png") {}
    11541034
    11551035protected:
     
    11741054
    11751055    UIActionSimpleShowVideoCaptureSettingsDialog(UIActionPool *pParent)
    1176         : UIActionSimple(pParent, ":/video_capture_settings_16px.png")
    1177     {
    1178         retranslateUi();
    1179     }
     1056        : UIActionSimple(pParent, ":/video_capture_settings_16px.png") {}
    11801057
    11811058protected:
     
    12001077
    12011078    UIActionSimplePerformInstallGuestTools(UIActionPool *pParent)
    1202         : UIActionSimple(pParent, ":/guesttools_16px.png", ":/guesttools_disabled_16px.png")
    1203     {
    1204         retranslateUi();
    1205     }
     1079        : UIActionSimple(pParent, ":/guesttools_16px.png", ":/guesttools_disabled_16px.png") {}
    12061080
    12071081protected:
     
    12321106
    12331107    UIActionMenuDebug(UIActionPool *pParent)
    1234         : UIActionMenu(pParent)
    1235     {
    1236         retranslateUi();
    1237     }
     1108        : UIActionMenu(pParent) {}
    12381109
    12391110protected:
     
    12521123
    12531124    UIActionSimpleShowStatistics(UIActionPool *pParent)
    1254         : UIActionSimple(pParent)
    1255     {
    1256         retranslateUi();
    1257     }
     1125        : UIActionSimple(pParent) {}
    12581126
    12591127protected:
     
    12771145
    12781146    UIActionSimpleShowCommandLine(UIActionPool *pParent)
    1279         : UIActionSimple(pParent)
    1280     {
    1281         retranslateUi();
    1282     }
     1147        : UIActionSimple(pParent) {}
    12831148
    12841149protected:
     
    13021167
    13031168    UIActionToggleLogging(UIActionPool *pParent)
    1304         : UIActionToggle(pParent)
    1305     {
    1306         retranslateUi();
    1307     }
     1169        : UIActionToggle(pParent) {}
    13081170
    13091171protected:
     
    13291191
    13301192    UIActionMenuDock(UIActionPool *pParent)
    1331         : UIActionMenu(pParent)
    1332     {
    1333         retranslateUi();
    1334     }
     1193        : UIActionMenu(pParent) {}
    13351194
    13361195protected:
     
    13461205
    13471206    UIActionMenuDockSettings(UIActionPool *pParent)
    1348         : UIActionMenu(pParent)
    1349     {
    1350         retranslateUi();
    1351     }
     1207        : UIActionMenu(pParent) {}
    13521208
    13531209protected:
     
    13661222
    13671223    UIActionToggleDockPreviewMonitor(UIActionPool *pParent)
    1368         : UIActionToggle(pParent)
    1369     {
    1370         retranslateUi();
    1371     }
     1224        : UIActionToggle(pParent) {}
    13721225
    13731226protected:
     
    13911244
    13921245    UIActionToggleDockDisableMonitor(UIActionPool *pParent)
    1393         : UIActionToggle(pParent)
    1394     {
    1395         retranslateUi();
    1396     }
     1246        : UIActionToggle(pParent) {}
    13971247
    13981248protected:
     
    14111261
    14121262
    1413 UIActionPoolRuntime::UIActionPoolRuntime()
    1414     : UIActionPool(UIActionPoolType_Runtime)
     1263UIActionPoolRuntime::UIActionPoolRuntime(bool fTemporary /* = false */)
     1264    : UIActionPool(UIActionPoolType_Runtime, fTemporary)
    14151265{
    14161266}
     
    16251475    m_pool[UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor] = new UIActionToggleDockDisableMonitor(this);
    16261476#endif /* Q_WS_MAC */
     1477
     1478    /* Retranslate finally: */
     1479    retranslateUi();
    16271480}
    16281481
     
    17311584    /* 'Machine' menu: */
    17321585    const bool fAllowToShowMenuMachine = isAllowedInMenuBar(RuntimeMenuType_Machine);
    1733     gpActionPool->action(UIActionIndexRT_M_Machine)->setVisible(fAllowToShowMenuMachine);
     1586    action(UIActionIndexRT_M_Machine)->setVisible(fAllowToShowMenuMachine);
    17341587    if (fAllowToShowMenuMachine)
    1735         m_mainMenus << gpActionPool->action(UIActionIndexRT_M_Machine)->menu();
     1588        m_mainMenus << action(UIActionIndexRT_M_Machine)->menu();
    17361589    updateMenuMachine();
    17371590
    17381591    /* 'View' menu: */
    17391592    const bool fAllowToShowMenuView = isAllowedInMenuBar(RuntimeMenuType_View);
    1740     gpActionPool->action(UIActionIndexRT_M_View)->setVisible(fAllowToShowMenuView);
    1741     gpActionPool->action(UIActionIndexRT_M_ViewPopup)->setVisible(fAllowToShowMenuView);
     1593    action(UIActionIndexRT_M_View)->setVisible(fAllowToShowMenuView);
     1594    action(UIActionIndexRT_M_ViewPopup)->setVisible(fAllowToShowMenuView);
    17421595    if (fAllowToShowMenuView)
    1743         m_mainMenus << gpActionPool->action(UIActionIndexRT_M_View)->menu();
     1596        m_mainMenus << action(UIActionIndexRT_M_View)->menu();
    17441597    updateMenuView();
    17451598    updateMenuViewPopup();
     
    17471600    /* 'Devices' menu: */
    17481601    const bool fAllowToShowMenuDevices = isAllowedInMenuBar(RuntimeMenuType_Devices);
    1749     gpActionPool->action(UIActionIndexRT_M_Devices)->setVisible(fAllowToShowMenuDevices);
     1602    action(UIActionIndexRT_M_Devices)->setVisible(fAllowToShowMenuDevices);
    17501603    if (fAllowToShowMenuDevices)
    1751         m_mainMenus << gpActionPool->action(UIActionIndexRT_M_Devices)->menu();
     1604        m_mainMenus << action(UIActionIndexRT_M_Devices)->menu();
    17521605    updateMenuDevices();
    17531606
     
    17551608    /* 'Debug' menu: */
    17561609    const bool fAllowToShowMenuDebug = isAllowedInMenuBar(RuntimeMenuType_Debug);
    1757     gpActionPool->action(UIActionIndexRT_M_Debug)->setVisible(fAllowToShowMenuDebug);
     1610    action(UIActionIndexRT_M_Debug)->setVisible(fAllowToShowMenuDebug);
    17581611    if (fAllowToShowMenuDebug)
    1759         m_mainMenus << gpActionPool->action(UIActionIndexRT_M_Debug)->menu();
     1612        m_mainMenus << action(UIActionIndexRT_M_Debug)->menu();
    17601613    updateMenuDebug();
    17611614#endif /* VBOX_WITH_DEBUGGER_GUI */
     
    17631616    /* 'Help' menu: */
    17641617    const bool fAllowToShowMenuHelp = isAllowedInMenuBar(RuntimeMenuType_Help);
    1765     gpActionPool->action(UIActionIndex_Menu_Help)->setVisible(fAllowToShowMenuHelp);
     1618    action(UIActionIndex_Menu_Help)->setVisible(fAllowToShowMenuHelp);
    17661619    if (fAllowToShowMenuHelp)
    1767         m_mainMenus << gpActionPool->action(UIActionIndex_Menu_Help)->menu();
     1620        m_mainMenus << action(UIActionIndex_Menu_Help)->menu();
    17681621    updateMenuHelp();
    17691622}
     
    19451798{
    19461799    /* Get corresponding menu: */
    1947     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View)->menu();
     1800    QMenu *pMenu = action(UIActionIndexRT_M_View)->menu();
    19481801    AssertPtrReturnVoid(pMenu);
    19491802    /* Clear contents: */
     
    19571810
    19581811    /* 'Fullscreen' action: */
    1959     gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->setEnabled(fIsAllowToShowActionFullscreen);
     1812    action(UIActionIndexRT_M_View_T_Fullscreen)->setEnabled(fIsAllowToShowActionFullscreen);
    19601813    if (fIsAllowToShowActionFullscreen)
    1961         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen));
     1814        pMenu->addAction(action(UIActionIndexRT_M_View_T_Fullscreen));
    19621815
    19631816    /* 'Seamless' action: */
    1964     gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(fIsAllowToShowActionSeamless);
     1817    action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(fIsAllowToShowActionSeamless);
    19651818    if (fIsAllowToShowActionSeamless)
    1966         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless));
     1819        pMenu->addAction(action(UIActionIndexRT_M_View_T_Seamless));
    19671820
    19681821    /* 'Scale' action: */
    1969     gpActionPool->action(UIActionIndexRT_M_View_T_Scale)->setEnabled(fIsAllowToShowActionScale);
     1822    action(UIActionIndexRT_M_View_T_Scale)->setEnabled(fIsAllowToShowActionScale);
    19701823    if (fIsAllowToShowActionScale)
    1971         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Scale));
     1824        pMenu->addAction(action(UIActionIndexRT_M_View_T_Scale));
    19721825
    19731826    /* Visual representation mode separator: */
     
    19811834    /* 'Adjust Window' action: */
    19821835    const bool fAllowToShowActionAdjustWindow = isAllowedInMenuView(RuntimeMenuViewActionType_AdjustWindow);
    1983     gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow);
     1836    action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow);
    19841837    if (fAllowToShowActionAdjustWindow)
    19851838    {
    1986         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
     1839        pMenu->addAction(action(UIActionIndexRT_M_View_S_AdjustWindow));
    19871840        fSeparator1 = true;
    19881841    }
     
    19901843    /* 'Guest Autoresize' action: */
    19911844    const bool fAllowToShowActionGuestAutoresize = isAllowedInMenuView(RuntimeMenuViewActionType_GuestAutoresize);
    1992     gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize);
     1845    action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize);
    19931846    if (fAllowToShowActionGuestAutoresize)
    19941847    {
    1995         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
     1848        pMenu->addAction(action(UIActionIndexRT_M_View_T_GuestAutoresize));
    19961849        fSeparator1 = true;
    19971850    }
     
    20071860    /* 'Status Bar' submenu: */
    20081861    const bool fAllowToShowActionStatusBar = isAllowedInMenuView(RuntimeMenuViewActionType_StatusBar);
    2009     gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->setEnabled(fAllowToShowActionStatusBar);
     1862    action(UIActionIndexRT_M_View_M_StatusBar)->setEnabled(fAllowToShowActionStatusBar);
    20101863    if (fAllowToShowActionStatusBar)
    20111864    {
    2012         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar));
     1865        pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar));
    20131866        fSeparator2 = true;
    20141867    }
     
    20361889{
    20371890    /* Get corresponding menu: */
    2038     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_ViewPopup)->menu();
     1891    QMenu *pMenu = action(UIActionIndexRT_M_ViewPopup)->menu();
    20391892    AssertPtrReturnVoid(pMenu);
    20401893    /* Clear contents: */
     
    20471900    /* 'Adjust Window' action: */
    20481901    const bool fAllowToShowActionAdjustWindow = isAllowedInMenuView(RuntimeMenuViewActionType_AdjustWindow);
    2049     gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow);
     1902    action(UIActionIndexRT_M_View_S_AdjustWindow)->setEnabled(fAllowToShowActionAdjustWindow);
    20501903    if (fAllowToShowActionAdjustWindow)
    20511904    {
    2052         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
     1905        pMenu->addAction(action(UIActionIndexRT_M_View_S_AdjustWindow));
    20531906        fSeparator1 = true;
    20541907    }
     
    20561909    /* 'Guest Autoresize' action: */
    20571910    const bool fAllowToShowActionGuestAutoresize = isAllowedInMenuView(RuntimeMenuViewActionType_GuestAutoresize);
    2058     gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize);
     1911    action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(fAllowToShowActionGuestAutoresize);
    20591912    if (fAllowToShowActionGuestAutoresize)
    20601913    {
    2061         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
     1914        pMenu->addAction(action(UIActionIndexRT_M_View_T_GuestAutoresize));
    20621915        fSeparator1 = true;
    20631916    }
     
    20841937{
    20851938    /* Get corresponding menu: */
    2086     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->menu();
     1939    QMenu *pMenu = action(UIActionIndexRT_M_View_M_StatusBar)->menu();
    20871940    AssertPtrReturnVoid(pMenu);
    20881941    /* Clear contents: */
     
    20911944    /* 'Status Bar Settings' action: */
    20921945    const bool fAllowToShowActionStatusBarSettings = isAllowedInMenuView(RuntimeMenuViewActionType_StatusBarSettings);
    2093     gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(fAllowToShowActionStatusBarSettings);
     1946    action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(fAllowToShowActionStatusBarSettings);
    20941947    if (fAllowToShowActionStatusBarSettings)
    2095         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
     1948        pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
    20961949
    20971950    /* 'Toggle Status Bar' action: */
    20981951    const bool fAllowToShowActionToggleStatusBar = isAllowedInMenuView(RuntimeMenuViewActionType_ToggleStatusBar);
    2099     gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(fAllowToShowActionToggleStatusBar);
     1952    action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(fAllowToShowActionToggleStatusBar);
    21001953    if (fAllowToShowActionToggleStatusBar)
    2101         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
     1954        pMenu->addAction(action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
    21021955}
    21031956
     
    21612014{
    21622015    /* Get corresponding menu: */
    2163     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices)->menu();
     2016    QMenu *pMenu = action(UIActionIndexRT_M_Devices)->menu();
    21642017    AssertPtrReturnVoid(pMenu);
    21652018    /* Clear contents: */
     
    21722025    /* 'Hard Drives' submenu: */
    21732026    const bool fAllowToShowActionHardDrives = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_HardDrives);
    2174     gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives)->setEnabled(fAllowToShowActionHardDrives);
     2027    action(UIActionIndexRT_M_Devices_M_HardDrives)->setEnabled(fAllowToShowActionHardDrives);
    21752028    if (fAllowToShowActionHardDrives)
    21762029    {
    2177 //        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives));
     2030//        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_HardDrives));
    21782031//        fSeparator1 = true;
    21792032    }
     
    21822035    /* 'Optical Devices' submenu: */
    21832036    const bool fAllowToShowActionOpticalDevices = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_OpticalDevices);
    2184     gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->setEnabled(fAllowToShowActionOpticalDevices);
     2037    action(UIActionIndexRT_M_Devices_M_OpticalDevices)->setEnabled(fAllowToShowActionOpticalDevices);
    21852038    if (fAllowToShowActionOpticalDevices)
    21862039    {
    2187         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices));
     2040        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_OpticalDevices));
    21882041        fSeparator1 = true;
    21892042    }
     
    21912044    /* 'Floppy Devices' submenu: */
    21922045    const bool fAllowToShowActionFloppyDevices = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_FloppyDevices);
    2193     gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->setEnabled(fAllowToShowActionFloppyDevices);
     2046    action(UIActionIndexRT_M_Devices_M_FloppyDevices)->setEnabled(fAllowToShowActionFloppyDevices);
    21942047    if (fAllowToShowActionFloppyDevices)
    21952048    {
    2196         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices));
     2049        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_FloppyDevices));
    21972050        fSeparator1 = true;
    21982051    }
     
    22002053    /* 'USB Devices' submenu: */
    22012054    const bool fAllowToShowActionUSBDevices = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_USBDevices);
    2202     gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->setEnabled(fAllowToShowActionUSBDevices);
     2055    action(UIActionIndexRT_M_Devices_M_USBDevices)->setEnabled(fAllowToShowActionUSBDevices);
    22032056    if (fAllowToShowActionUSBDevices)
    22042057    {
    2205         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices));
     2058        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_USBDevices));
    22062059        fSeparator1 = true;
    22072060    }
     
    22102063    /* 'Web Cams' submenu: */
    22112064    const bool fAllowToShowActionWebCams = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_WebCams);
    2212     gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->setEnabled(fAllowToShowActionWebCams);
     2065    action(UIActionIndexRT_M_Devices_M_WebCams)->setEnabled(fAllowToShowActionWebCams);
    22132066    if (fAllowToShowActionWebCams)
    22142067    {
    2215         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams));
     2068        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_WebCams));
    22162069        fSeparator1 = true;
    22172070    }
     
    22192072    /* 'Shared Clipboard' submenu: */
    22202073    const bool fAllowToShowActionSharedClipboard = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_SharedClipboard);
    2221     gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->setEnabled(fAllowToShowActionSharedClipboard);
     2074    action(UIActionIndexRT_M_Devices_M_SharedClipboard)->setEnabled(fAllowToShowActionSharedClipboard);
    22222075    if (fAllowToShowActionSharedClipboard)
    22232076    {
    2224         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard));
     2077        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedClipboard));
    22252078        fSeparator1 = true;
    22262079    }
     
    22282081    /* 'Drag&Drop' submenu: */
    22292082    const bool fAllowToShowActionDragAndDrop = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_DragAndDrop);
    2230     gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->setEnabled(fAllowToShowActionDragAndDrop);
     2083    action(UIActionIndexRT_M_Devices_M_DragAndDrop)->setEnabled(fAllowToShowActionDragAndDrop);
    22312084    if (fAllowToShowActionDragAndDrop)
    22322085    {
    2233         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop));
     2086        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_DragAndDrop));
    22342087        fSeparator1 = true;
    22352088    }
     
    22372090    /* 'Network' submenu: */
    22382091    const bool fAllowToShowActionNetwork = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_Network);
    2239     gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->setEnabled(fAllowToShowActionNetwork);
     2092    action(UIActionIndexRT_M_Devices_M_Network)->setEnabled(fAllowToShowActionNetwork);
    22402093    if (fAllowToShowActionNetwork)
    22412094    {
    2242         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network));
     2095        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_Network));
    22432096        fSeparator1 = true;
    22442097    }
     
    22472100    /* 'Shared Folders' submenu: */
    22482101    const bool fAllowToShowActionSharedFolders = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_SharedFolders);
    2249     gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders)->setEnabled(fAllowToShowActionSharedFolders);
     2102    action(UIActionIndexRT_M_Devices_M_SharedFolders)->setEnabled(fAllowToShowActionSharedFolders);
    22502103    if (fAllowToShowActionSharedFolders)
    22512104    {
    2252 //        pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders));
     2105//        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedFolders));
    22532106//        fSeparator1 = true;
    22542107    }
     
    22652118    /* 'VRDE Server' action: */
    22662119    const bool fAllowToShowActionVRDEServer = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_VRDEServer);
    2267     gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(fAllowToShowActionVRDEServer);
     2120    action(UIActionIndexRT_M_Devices_T_VRDEServer)->setEnabled(fAllowToShowActionVRDEServer);
    22682121    if (fAllowToShowActionVRDEServer)
    22692122    {
    2270         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer));
     2123        pMenu->addAction(action(UIActionIndexRT_M_Devices_T_VRDEServer));
    22712124        fSeparator2 = true;
    22722125    }
     
    22742127    /* 'Video Capture' action: */
    22752128    const bool fAllowToShowActionVideoCapture = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_VideoCapture);
    2276     gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setEnabled(fAllowToShowActionVideoCapture);
     2129    action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setEnabled(fAllowToShowActionVideoCapture);
    22772130    if (fAllowToShowActionVideoCapture)
    22782131    {
    2279         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
     2132        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
    22802133        fSeparator2 = true;
    22812134    }
     
    22892142    /* Install Guest Tools action: */
    22902143    const bool fAllowToShowActionInstallGuestTools = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_InstallGuestTools);
    2291     gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools)->setEnabled(fAllowToShowActionInstallGuestTools);
     2144    action(UIActionIndexRT_M_Devices_S_InstallGuestTools)->setEnabled(fAllowToShowActionInstallGuestTools);
    22922145    if (fAllowToShowActionInstallGuestTools)
    2293         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
     2146        pMenu->addAction(action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
    22942147}
    22952148
     
    22972150{
    22982151    /* Get corresponding menu: */
    2299     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives)->menu();
     2152    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_HardDrives)->menu();
    23002153    AssertPtrReturnVoid(pMenu);
    23012154    /* Clear contents: */
     
    23042157    /* 'Hard Drives Settings' action: */
    23052158    const bool fAllowToShowActionHardDrivesSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_HardDrivesSettings);
    2306     gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)->setEnabled(fAllowToShowActionHardDrivesSettings);
     2159    action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings)->setEnabled(fAllowToShowActionHardDrivesSettings);
    23072160    if (fAllowToShowActionHardDrivesSettings)
    2308         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
     2161        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
    23092162}
    23102163
     
    23122165{
    23132166    /* Get corresponding menu: */
    2314     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();
     2167    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();
    23152168    AssertPtrReturnVoid(pMenu);
    23162169    /* Clear contents: */
     
    23192172    /* 'USB Devices Settings' action: */
    23202173    const bool fAllowToShowActionUSBDevicesSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_USBDevicesSettings);
    2321     gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)->setEnabled(fAllowToShowActionUSBDevicesSettings);
     2174    action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings)->setEnabled(fAllowToShowActionUSBDevicesSettings);
    23222175    if (fAllowToShowActionUSBDevicesSettings)
    2323         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));
     2176        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));
    23242177}
    23252178
     
    23272180{
    23282181    /* Get corresponding menu: */
    2329     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu();
     2182    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_Network)->menu();
    23302183    AssertPtrReturnVoid(pMenu);
    23312184    /* Clear contents: */
     
    23342187    /* 'Network Settings' action: */
    23352188    const bool fAllowToShowActionNetworkSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_NetworkSettings);
    2336     gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(fAllowToShowActionNetworkSettings);
     2189    action(UIActionIndexRT_M_Devices_M_Network_S_Settings)->setEnabled(fAllowToShowActionNetworkSettings);
    23372190    if (fAllowToShowActionNetworkSettings)
    2338         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
     2191        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
    23392192}
    23402193
     
    23422195{
    23432196    /* Get corresponding menu: */
    2344     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu();
     2197    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu();
    23452198    AssertPtrReturnVoid(pMenu);
    23462199    /* Clear contents: */
     
    23492202    /* 'Shared Folders Settings' action: */
    23502203    const bool fAllowToShowActionSharedFoldersSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_SharedFoldersSettings);
    2351     gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(fAllowToShowActionSharedFoldersSettings);
     2204    action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings)->setEnabled(fAllowToShowActionSharedFoldersSettings);
    23522205    if (fAllowToShowActionSharedFoldersSettings)
    2353         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
     2206        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
    23542207}
    23552208
     
    23572210{
    23582211    /* Get corresponding menu: */
    2359     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu();
     2212    QMenu *pMenu = action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu();
    23602213    AssertPtrReturnVoid(pMenu);
    23612214    /* Clear contents: */
     
    23642217    /* 'Video Capture Settings' action: */
    23652218    const bool fAllowToShowActionVideoCaptureSettings = isAllowedInMenuDevices(RuntimeMenuDevicesActionType_VideoCaptureSettings);
    2366     gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)->setEnabled(fAllowToShowActionVideoCaptureSettings);
     2219    action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings)->setEnabled(fAllowToShowActionVideoCaptureSettings);
    23672220    if (fAllowToShowActionVideoCaptureSettings)
    2368         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
     2221        pMenu->addAction(action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
    23692222}
    23702223
     
    23732226{
    23742227    /* Get corresponding menu: */
    2375     QMenu *pMenu = gpActionPool->action(UIActionIndexRT_M_Debug)->menu();
     2228    QMenu *pMenu = action(UIActionIndexRT_M_Debug)->menu();
    23762229    AssertPtrReturnVoid(pMenu);
    23772230    /* Clear contents: */
     
    23802233    /* 'Statistics' action: */
    23812234    const bool fAllowToShowActionStatistics = isAllowedInMenuDebug(RuntimeMenuDebuggerActionType_Statistics);
    2382     gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics)->setEnabled(fAllowToShowActionStatistics);
     2235    action(UIActionIndexRT_M_Debug_S_ShowStatistics)->setEnabled(fAllowToShowActionStatistics);
    23832236    if (fAllowToShowActionStatistics)
    2384         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics));
     2237        pMenu->addAction(action(UIActionIndexRT_M_Debug_S_ShowStatistics));
    23852238
    23862239    /* 'Command Line' action: */
    23872240    const bool fAllowToShowActionCommandLine = isAllowedInMenuDebug(RuntimeMenuDebuggerActionType_CommandLine);
    2388     gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine)->setEnabled(fAllowToShowActionCommandLine);
     2241    action(UIActionIndexRT_M_Debug_S_ShowCommandLine)->setEnabled(fAllowToShowActionCommandLine);
    23892242    if (fAllowToShowActionCommandLine)
    2390         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine));
     2243        pMenu->addAction(action(UIActionIndexRT_M_Debug_S_ShowCommandLine));
    23912244
    23922245    /* 'Logging' action: */
    23932246    const bool fAllowToShowActionLogging = isAllowedInMenuDebug(RuntimeMenuDebuggerActionType_Logging);
    2394     gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fAllowToShowActionLogging);
     2247    action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fAllowToShowActionLogging);
    23952248    if (fAllowToShowActionLogging)
    2396         pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging));
     2249        pMenu->addAction(action(UIActionIndexRT_M_Debug_T_Logging));
    23972250
    23982251    /* 'Log Dialog' action: */
    23992252    const bool fAllowToShowActionLogDialog = isAllowedInMenuDebug(RuntimeMenuDebuggerActionType_LogDialog);
    2400     gpActionPool->action(UIActionIndex_Simple_LogDialog)->setEnabled(fAllowToShowActionLogDialog);
     2253    action(UIActionIndex_Simple_LogDialog)->setEnabled(fAllowToShowActionLogDialog);
    24012254    if (fAllowToShowActionLogDialog)
    2402         pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_LogDialog));
     2255        pMenu->addAction(action(UIActionIndex_Simple_LogDialog));
    24032256}
    24042257#endif /* VBOX_WITH_DEBUGGER_GUI */
     
    24072260{
    24082261    /* Get corresponding menu: */
    2409     QMenu *pMenu = gpActionPool->action(UIActionIndex_Menu_Help)->menu();
     2262    QMenu *pMenu = action(UIActionIndex_Menu_Help)->menu();
    24102263    AssertPtrReturnVoid(pMenu);
    24112264    /* Clear contents: */
     
    24182271    /* 'Contents' action: */
    24192272    const bool fAllowToShowActionContents = isAllowedInMenuHelp(RuntimeMenuHelpActionType_Contents);
    2420     gpActionPool->action(UIActionIndex_Simple_Contents)->setEnabled(fAllowToShowActionContents);
     2273    action(UIActionIndex_Simple_Contents)->setEnabled(fAllowToShowActionContents);
    24212274    if (fAllowToShowActionContents)
    24222275    {
    2423         pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_Contents));
    2424         VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()),
     2276        pMenu->addAction(action(UIActionIndex_Simple_Contents));
     2277        VBoxGlobal::connect(action(UIActionIndex_Simple_Contents), SIGNAL(triggered()),
    24252278                            &msgCenter(), SLOT(sltShowHelpHelpDialog()), Qt::UniqueConnection);
    24262279        fSeparator1 = true;
     
    24292282    /* 'Web Site' action: */
    24302283    const bool fAllowToShowActionWebSite = isAllowedInMenuHelp(RuntimeMenuHelpActionType_WebSite);
    2431     gpActionPool->action(RuntimeMenuHelpActionType_WebSite)->setEnabled(fAllowToShowActionWebSite);
     2284    action(RuntimeMenuHelpActionType_WebSite)->setEnabled(fAllowToShowActionWebSite);
    24322285    if (fAllowToShowActionWebSite)
    24332286    {
    2434         pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_WebSite));
    2435         VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()),
     2287        pMenu->addAction(action(UIActionIndex_Simple_WebSite));
     2288        VBoxGlobal::connect(action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()),
    24362289                            &msgCenter(), SLOT(sltShowHelpWebDialog()), Qt::UniqueConnection);
    24372290        fSeparator1 = true;
     
    24482301    /* 'Reset Warnings' action: */
    24492302    const bool fAllowToShowActionResetWarnings = isAllowedInMenuHelp(RuntimeMenuHelpActionType_ResetWarnings);
    2450     gpActionPool->action(UIActionIndex_Simple_ResetWarnings)->setEnabled(fAllowToShowActionResetWarnings);
     2303    action(UIActionIndex_Simple_ResetWarnings)->setEnabled(fAllowToShowActionResetWarnings);
    24512304    if (fAllowToShowActionResetWarnings)
    24522305    {
    2453         pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_ResetWarnings));
    2454         VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()),
     2306        pMenu->addAction(action(UIActionIndex_Simple_ResetWarnings));
     2307        VBoxGlobal::connect(action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()),
    24552308                            &msgCenter(), SLOT(sltResetSuppressedMessages()), Qt::UniqueConnection);
    24562309        fSeparator2 = true;
     
    24702323    /* 'Network Manager' action: */
    24712324    const bool fAllowToShowActionNetworkManager = isAllowedInMenuHelp(RuntimeMenuHelpActionType_NetworkAccessManager);
    2472     gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager)->setEnabled(fAllowToShowActionNetworkManager);
     2325    action(UIActionIndex_Simple_NetworkAccessManager)->setEnabled(fAllowToShowActionNetworkManager);
    24732326    if (fAllowToShowActionNetworkManager)
    24742327    {
    2475         pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager));
    2476         VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()),
     2328        pMenu->addAction(action(UIActionIndex_Simple_NetworkAccessManager));
     2329        VBoxGlobal::connect(action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()),
    24772330                            gNetworkManager, SLOT(show()), Qt::UniqueConnection);
    24782331# ifndef Q_WS_MAC
     
    24962349        isAllowedInMenuHelp(RuntimeMenuHelpActionType_About);
    24972350#endif /* Q_WS_MAC */
    2498     gpActionPool->action(UIActionIndex_Simple_About)->setEnabled(fAllowToShowActionAbout);
     2351    action(UIActionIndex_Simple_About)->setEnabled(fAllowToShowActionAbout);
    24992352    if (fAllowToShowActionAbout)
    25002353    {
    2501         pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_About));
    2502         VBoxGlobal::connect(gpActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()),
     2354        pMenu->addAction(action(UIActionIndex_Simple_About));
     2355        VBoxGlobal::connect(action(UIActionIndex_Simple_About), SIGNAL(triggered()),
    25032356                            &msgCenter(), SLOT(sltShowHelpAboutDialog()), Qt::UniqueConnection);
    25042357    }
     
    25112364        isAllowedInMenuHelp(RuntimeMenuHelpActionType_Preferences);
    25122365#endif /* Q_WS_MAC */
    2513     gpActionPool->action(UIActionIndex_Simple_Preferences)->setEnabled(fAllowToShowActionPreferences);
     2366    action(UIActionIndex_Simple_Preferences)->setEnabled(fAllowToShowActionPreferences);
    25142367    if (fAllowToShowActionPreferences)
    2515         pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_Preferences));
     2368        pMenu->addAction(action(UIActionIndex_Simple_Preferences));
    25162369}
    25172370
     
    25212374    foreach (const int iActionPoolKey, m_pool.keys())
    25222375        m_pool[iActionPoolKey]->retranslateUi();
    2523     /* Re-apply Runtime UI shortcuts: */
    2524     sltApplyShortcuts();
    2525     /* Temporary create Selector UI pool to do the same: */
    2526     UIActionPool::createTemporary(UIActionPoolType_Selector);
     2376    /* Update Runtime UI shortcuts: */
     2377    updateShortcuts();
     2378    /* Create temporary Selector UI pool to do the same: */
     2379    if (!m_fTemporary)
     2380        UIActionPool::createTemporary(UIActionPoolType_Selector);
    25272381}
    25282382
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h

    r52186 r52202  
    174174protected:
    175175
    176     /** Constructor. */
    177     UIActionPoolRuntime();
     176    /** Constructor,
     177      * @param fTemporary is used to determine whether this action-pool is temporary,
     178      *                   which can be created to re-initialize shortcuts-pool. */
     179    UIActionPoolRuntime(bool fTemporary = false);
    178180
    179181    /** Prepare pool routine. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r52195 r52202  
    840840}
    841841
     842/* Action-pool getter: */
     843UIActionPool* UIKeyboardHandler::actionPool() const
     844{
     845    return machineLogic()->actionPool();
     846}
     847
    842848/* UI Session getter: */
    843849UISession* UIKeyboardHandler::uisession() const
     
    10031009                    }
    10041010                    /* Process hot keys not processed in keyEvent() (as in case of non-alphanumeric keys): */
    1005                     gpActionPool->processHotKey(QKeySequence(pKeyEvent->key()));
     1011                    actionPool()->processHotKey(QKeySequence(pKeyEvent->key()));
    10061012                }
    10071013                else if (!m_bIsHostComboPressed && pEvent->type() == QEvent::KeyRelease)
     
    15821588            symbol = 0;
    15831589        if (symbol)
    1584             fWasProcessed = gpActionPool->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + QChar(symbol).toUpper().unicode())));
     1590            fWasProcessed = actionPool()->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + QChar(symbol).toUpper().unicode())));
    15851591    }
    15861592    delete[] pList;
     
    16001606        {
    16011607            QChar qtSymbol = QString::fromLocal8Bit(&symbol, 1)[0];
    1602             fWasProcessed = gpActionPool->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + qtSymbol.toUpper().unicode())));
     1608            fWasProcessed = actionPool()->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + qtSymbol.toUpper().unicode())));
    16031609        }
    16041610    }
     
    16081614    Q_UNUSED(iHotKey);
    16091615    if (pHotKey && pHotKey[0] && !pHotKey[1])
    1610         fWasProcessed = gpActionPool->processHotKey(QKeySequence(Qt::UNICODE_ACCEL + QChar(pHotKey[0]).toUpper().unicode()));
     1616        fWasProcessed = actionPool()->processHotKey(QKeySequence(Qt::UNICODE_ACCEL + QChar(pHotKey[0]).toUpper().unicode()));
    16111617#endif /* Q_WS_MAC */
    16121618
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h

    r52014 r52202  
    3838class CSession;
    3939class UISession;
     40class UIActionPool;
    4041class UIMachineLogic;
    4142class UIMachineWindow;
     
    115116    /* Common getters: */
    116117    UIMachineLogic* machineLogic() const;
     118    UIActionPool* actionPool() const;
    117119    UISession* uisession() const;
    118120    CSession& session() const;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r52200 r52202  
    234234}
    235235
     236UIActionPool* UIMachineLogic::actionPool() const
     237{
     238    return uisession()->actionPool();
     239}
     240
    236241CSession& UIMachineLogic::session() const
    237242{
     
    447452        case KMachineState_TeleportingPausedVM:
    448453        {
    449             QAction *pPauseAction = gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause);
     454            QAction *pPauseAction = actionPool()->action(UIActionIndexRT_M_Machine_T_Pause);
    450455            if (!pPauseAction->isChecked())
    451456            {
     
    461466        case KMachineState_LiveSnapshotting:
    462467        {
    463             QAction *pPauseAction = gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause);
     468            QAction *pPauseAction = actionPool()->action(UIActionIndexRT_M_Machine_T_Pause);
    464469            if (pPauseAction->isChecked())
    465470            {
     
    509514{
    510515    /* Update action states: */
    511     gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(uisession()->isGuestSupportsGraphics());
    512     gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(uisession()->isVisualStateAllowed(UIVisualStateType_Seamless) &&
     516    actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->setEnabled(uisession()->isGuestSupportsGraphics());
     517    actionPool()->action(UIActionIndexRT_M_View_T_Seamless)->setEnabled(uisession()->isVisualStateAllowed(UIVisualStateType_Seamless) &&
    513518                                                                          uisession()->isGuestSupportsSeamless());
    514519}
     
    526531
    527532    /* Update action state: */
    528     QAction *pAction = gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration);
     533    QAction *pAction = actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration);
    529534    pAction->setEnabled(fIsMouseSupportsAbsolute && fIsMouseSupportsRelative && !fIsMouseHostCursorNeeded);
    530535    if (fIsMouseHostCursorNeeded)
     
    827832
    828833    /* Move actions into running actions group: */
    829     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD));
     834    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_TypeCAD));
    830835#ifdef Q_WS_X11
    831     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS));
     836    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_TypeCABS));
    832837#endif
    833     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Reset));
    834     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown));
    835     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen));
    836     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless));
    837     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_Scale));
    838     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize));
    839     m_pRunningActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow));
     838    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_Reset));
     839    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_Shutdown));
     840    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen));
     841    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_Seamless));
     842    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_Scale));
     843    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize));
     844    m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow));
    840845
    841846    /* Move actions into running-n-paused actions group: */
    842     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Save));
    843     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings));
    844     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot));
    845     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot));
    846     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation));
    847     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard));
    848     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
    849     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse));
    850     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
    851     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause));
    852     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar));
    853     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
    854     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
    855     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives));
    856     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
    857     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices));
    858     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices));
    859     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices));
    860     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));
    861     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams));
    862     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard));
    863     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop));
    864     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network));
    865     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
    866     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders));
    867     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
    868     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer));
    869     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture));
    870     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
    871     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
    872     m_pRunningOrPausedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
     847    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_Save));
     848    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_Settings));
     849    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_TakeSnapshot));
     850    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_TakeScreenshot));
     851    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowInformation));
     852    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard));
     853    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
     854    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse));
     855    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
     856    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_T_Pause));
     857    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar));
     858    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings));
     859    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility));
     860    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives));
     861    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
     862    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices));
     863    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices));
     864    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices));
     865    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));
     866    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_WebCams));
     867    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedClipboard));
     868    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_DragAndDrop));
     869    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_Network));
     870    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_Network_S_Settings));
     871    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders));
     872    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
     873    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_T_VRDEServer));
     874    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture));
     875    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
     876    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
     877    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_Devices_S_InstallGuestTools));
    873878
    874879    /* Move actions into running-n-paused-n-stucked actions group: */
    875     m_pRunningOrPausedOrStackedActions->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff));
     880    m_pRunningOrPausedOrStackedActions->addAction(actionPool()->action(UIActionIndexRT_M_Machine_S_PowerOff));
    876881}
    877882
     
    879884{
    880885    /* 'Machine' actions connections: */
    881     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Settings), SIGNAL(triggered()),
     886    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Settings), SIGNAL(triggered()),
    882887            this, SLOT(sltOpenVMSettingsDialog()));
    883     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeSnapshot), SIGNAL(triggered()),
     888    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_TakeSnapshot), SIGNAL(triggered()),
    884889            this, SLOT(sltTakeSnapshot()));
    885     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_TakeScreenshot), SIGNAL(triggered()),
     890    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_TakeScreenshot), SIGNAL(triggered()),
    886891            this, SLOT(sltTakeScreenshot()));
    887     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_ShowInformation), SIGNAL(triggered()),
     892    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowInformation), SIGNAL(triggered()),
    888893            this, SLOT(sltShowInformationDialog()));
    889     connect(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings), SIGNAL(triggered()),
     894    connect(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings), SIGNAL(triggered()),
    890895            this, SLOT(sltShowKeyboardSettings()));
    891     connect(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration), SIGNAL(toggled(bool)),
     896    connect(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration), SIGNAL(toggled(bool)),
    892897            this, SLOT(sltToggleMouseIntegration(bool)));
    893     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCAD), SIGNAL(triggered()),
     898    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_TypeCAD), SIGNAL(triggered()),
    894899            this, SLOT(sltTypeCAD()));
    895900#ifdef Q_WS_X11
    896     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_TypeCABS), SIGNAL(triggered()),
     901    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_TypeCABS), SIGNAL(triggered()),
    897902            this, SLOT(sltTypeCABS()));
    898903#endif
    899     connect(gpActionPool->action(UIActionIndexRT_M_Machine_T_Pause), SIGNAL(toggled(bool)),
     904    connect(actionPool()->action(UIActionIndexRT_M_Machine_T_Pause), SIGNAL(toggled(bool)),
    900905            this, SLOT(sltPause(bool)));
    901     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Reset), SIGNAL(triggered()),
     906    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Reset), SIGNAL(triggered()),
    902907            this, SLOT(sltReset()));
    903     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Save), SIGNAL(triggered()),
     908    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Save), SIGNAL(triggered()),
    904909            this, SLOT(sltSaveState()));
    905     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Shutdown), SIGNAL(triggered()),
     910    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Shutdown), SIGNAL(triggered()),
    906911            this, SLOT(sltShutdown()));
    907     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_PowerOff), SIGNAL(triggered()),
     912    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_PowerOff), SIGNAL(triggered()),
    908913            this, SLOT(sltPowerOff()));
    909     connect(gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SIGNAL(triggered()),
     914    connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Close), SIGNAL(triggered()),
    910915            this, SLOT(sltClose()));
    911916
    912917    /* 'View' actions connections: */
    913     connect(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize), SIGNAL(toggled(bool)),
     918    connect(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize), SIGNAL(toggled(bool)),
    914919            this, SLOT(sltToggleGuestAutoresize(bool)));
    915     connect(gpActionPool->action(UIActionIndexRT_M_View_S_AdjustWindow), SIGNAL(triggered()),
     920    connect(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow), SIGNAL(triggered()),
    916921            this, SLOT(sltAdjustWindow()));
    917922
    918923    /* 'Devices' actions connections: */
    919     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings), SIGNAL(triggered()),
     924    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings), SIGNAL(triggered()),
    920925            this, SLOT(sltOpenStorageSettingsDialog()));
    921     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu(), SIGNAL(aboutToShow()),
     926    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu(), SIGNAL(aboutToShow()),
    922927            this, SLOT(sltPrepareStorageMenu()));
    923     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu(), SIGNAL(aboutToShow()),
     928    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu(), SIGNAL(aboutToShow()),
    924929            this, SLOT(sltPrepareStorageMenu()));
    925     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(), SIGNAL(aboutToShow()),
     930    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu(), SIGNAL(aboutToShow()),
    926931            this, SLOT(sltPrepareUSBMenu()));
    927     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings), SIGNAL(triggered()),
     932    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings), SIGNAL(triggered()),
    928933            this, SLOT(sltOpenUSBDevicesSettingsDialog()));
    929     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu(), SIGNAL(aboutToShow()),
     934    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_WebCams)->menu(), SIGNAL(aboutToShow()),
    930935            this, SLOT(sltPrepareWebCamMenu()));
    931     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu(), SIGNAL(aboutToShow()),
     936    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu(), SIGNAL(aboutToShow()),
    932937            this, SLOT(sltPrepareSharedClipboardMenu()));
    933     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu(), SIGNAL(aboutToShow()),
     938    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu(), SIGNAL(aboutToShow()),
    934939            this, SLOT(sltPrepareDragAndDropMenu()));
    935     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu(), SIGNAL(aboutToShow()),
     940    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_Network)->menu(), SIGNAL(aboutToShow()),
    936941            this, SLOT(sltPrepareNetworkMenu()));
    937     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_Network_S_Settings), SIGNAL(triggered()),
     942    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_Network_S_Settings), SIGNAL(triggered()),
    938943            this, SLOT(sltOpenNetworkSettingsDialog()));
    939     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings), SIGNAL(triggered()),
     944    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings), SIGNAL(triggered()),
    940945            this, SLOT(sltOpenSharedFoldersSettingsDialog()));
    941     connect(gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer), SIGNAL(toggled(bool)),
     946    connect(actionPool()->action(UIActionIndexRT_M_Devices_T_VRDEServer), SIGNAL(toggled(bool)),
    942947            this, SLOT(sltToggleVRDE(bool)));
    943     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start), SIGNAL(toggled(bool)),
     948    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start), SIGNAL(toggled(bool)),
    944949            this, SLOT(sltToggleVideoCapture(bool)));
    945     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings), SIGNAL(triggered()),
     950    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings), SIGNAL(triggered()),
    946951            this, SLOT(sltOpenVideoCaptureOptions()));
    947     connect(gpActionPool->action(UIActionIndexRT_M_Devices_S_InstallGuestTools), SIGNAL(triggered()),
     952    connect(actionPool()->action(UIActionIndexRT_M_Devices_S_InstallGuestTools), SIGNAL(triggered()),
    948953            this, SLOT(sltInstallGuestAdditions()));
    949954
    950955#ifdef VBOX_WITH_DEBUGGER_GUI
    951956    /* 'Debug' actions connections: */
    952     connect(gpActionPool->action(UIActionIndexRT_M_Debug)->menu(), SIGNAL(aboutToShow()),
     957    connect(actionPool()->action(UIActionIndexRT_M_Debug)->menu(), SIGNAL(aboutToShow()),
    953958            this, SLOT(sltPrepareDebugMenu()));
    954     connect(gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowStatistics), SIGNAL(triggered()),
     959    connect(actionPool()->action(UIActionIndexRT_M_Debug_S_ShowStatistics), SIGNAL(triggered()),
    955960            this, SLOT(sltShowDebugStatistics()));
    956     connect(gpActionPool->action(UIActionIndexRT_M_Debug_S_ShowCommandLine), SIGNAL(triggered()),
     961    connect(actionPool()->action(UIActionIndexRT_M_Debug_S_ShowCommandLine), SIGNAL(triggered()),
    957962            this, SLOT(sltShowDebugCommandLine()));
    958     connect(gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging), SIGNAL(toggled(bool)),
     963    connect(actionPool()->action(UIActionIndexRT_M_Debug_T_Logging), SIGNAL(toggled(bool)),
    959964            this, SLOT(sltLoggingToggled(bool)));
    960     connect(gpActionPool->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()),
     965    connect(actionPool()->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()),
    961966            this, SLOT(sltShowLogDialog()));
    962967#endif /* VBOX_WITH_DEBUGGER_GUI */
    963968
    964969    /* 'Help' actions connections: */
    965     connect(gpActionPool->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()),
     970    connect(actionPool()->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()),
    966971            this, SLOT(sltShowGlobalPreferences()), Qt::UniqueConnection);
    967972}
     
    986991void UIMachineLogic::prepareDock()
    987992{
    988     QMenu *pDockMenu = gpActionPool->action(UIActionIndexRT_M_Dock)->menu();
     993    QMenu *pDockMenu = actionPool()->action(UIActionIndexRT_M_Dock)->menu();
    989994
    990995    /* Add all VM menu entries to the dock menu. Leave out close and stuff like
    991996     * this. */
    992     QList<QAction*> actions = gpActionPool->action(UIActionIndexRT_M_Machine)->menu()->actions();
     997    QList<QAction*> actions = actionPool()->action(UIActionIndexRT_M_Machine)->menu()->actions();
    993998    for (int i=0; i < actions.size(); ++i)
    994999        if (actions.at(i)->menuRole() == QAction::NoRole)
     
    9961001    pDockMenu->addSeparator();
    9971002
    998     QMenu *pDockSettingsMenu = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings)->menu();
     1003    QMenu *pDockSettingsMenu = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings)->menu();
    9991004    QActionGroup *pDockPreviewModeGroup = new QActionGroup(this);
    1000     QAction *pDockDisablePreview = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);
     1005    QAction *pDockDisablePreview = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);
    10011006    pDockPreviewModeGroup->addAction(pDockDisablePreview);
    1002     QAction *pDockEnablePreviewMonitor = gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_PreviewMonitor);
     1007    QAction *pDockEnablePreviewMonitor = actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_PreviewMonitor);
    10031008    pDockPreviewModeGroup->addAction(pDockEnablePreviewMonitor);
    10041009    pDockSettingsMenu->addActions(pDockPreviewModeGroup->actions());
     
    14891494    }
    14901495    /* Pass that list to the action-pool to update 'View' menu accordingly: */
    1491     gpActionPool->toRuntime()->setCurrentFrameBufferSizes(frameBufferSizes);
     1496    actionPool()->toRuntime()->setCurrentFrameBufferSizes(frameBufferSizes);
    14921497}
    14931498
     
    15571562
    15581563    /* Determine device-type: */
    1559     const QMenu *pOpticalDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu();
    1560     const QMenu *pFloppyDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu();
     1564    const QMenu *pOpticalDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices)->menu();
     1565    const QMenu *pFloppyDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices)->menu();
    15611566    const KDeviceType deviceType = pMenu == pOpticalDevicesMenu ? KDeviceType_DVD :
    15621567                                   pMenu == pFloppyDevicesMenu  ? KDeviceType_Floppy :
     
    16261631    /* Get and check the sender menu object: */
    16271632    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    1628     QMenu *pUSBDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();
     1633    QMenu *pUSBDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices)->menu();
    16291634    AssertMsg(pMenu == pUSBDevicesMenu, ("This slot should only be called on hovering USB menu!\n"));
    16301635    Q_UNUSED(pUSBDevicesMenu);
     
    16341639
    16351640    /* Add settings action: */
    1636     pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));
     1641    pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices_S_Settings));
    16371642
    16381643    /* Get current host: */
     
    16981703    /* Get and check the sender menu object: */
    16991704    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    1700     QMenu *pWebCamMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_WebCams)->menu();
     1705    QMenu *pWebCamMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_WebCams)->menu();
    17011706    AssertReturnVoid(pMenu == pWebCamMenu); Q_UNUSED(pWebCamMenu);
    17021707
     
    18331838    /* Get and check the sender menu object: */
    18341839    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    1835     QMenu *pSharedClipboardMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu();
     1840    QMenu *pSharedClipboardMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_SharedClipboard)->menu();
    18361841    AssertMsg(pMenu == pSharedClipboardMenu, ("This slot should only be called on hovering Shared Clipboard menu!\n"));
    18371842    Q_UNUSED(pSharedClipboardMenu);
     
    18711876    /* Get and check the sender menu object: */
    18721877    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    1873     QMenu *pDragAndDropMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu();
     1878    QMenu *pDragAndDropMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_DragAndDrop)->menu();
    18741879    AssertMsg(pMenu == pDragAndDropMenu, ("This slot should only be called on hovering Drag'n'drop menu!\n"));
    18751880    Q_UNUSED(pDragAndDropMenu);
     
    19031908    /* Get and check 'the sender' menu object: */
    19041909    QMenu *pMenu = qobject_cast<QMenu*>(sender());
    1905     QMenu *pNetworkMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_Network)->menu();
     1910    QMenu *pNetworkMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_Network)->menu();
    19061911    AssertReturnVoid(pMenu == pNetworkMenu);
    19071912    Q_UNUSED(pNetworkMenu);
     
    21372142        }
    21382143    }
    2139     if (fEnabled != gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->isEnabled())
    2140         gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fEnabled);
    2141     if (fChecked != gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->isChecked())
    2142         gpActionPool->action(UIActionIndexRT_M_Debug_T_Logging)->setChecked(fChecked);
     2144    if (fEnabled != actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)->isEnabled())
     2145        actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)->setEnabled(fEnabled);
     2146    if (fChecked != actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)->isChecked())
     2147        actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)->setChecked(fChecked);
    21432148}
    21442149
     
    21872192    if (!machine.isNull())
    21882193    {
    2189         bool fEnabled = pAction != gpActionPool->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);
     2194        bool fEnabled = pAction != actionPool()->action(UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor);
    21902195        gEDataManager->setRealtimeDockIconUpdateEnabled(fEnabled, vboxGlobal().managedVMUuid());
    21912196        updateDockOverlay();
     
    22982303
    22992304    /* Check that we do NOT handling that already: */
    2300     if (gpActionPool->action(UIActionIndex_Simple_Preferences)->data().toBool())
     2305    if (actionPool()->action(UIActionIndex_Simple_Preferences)->data().toBool())
    23012306        return;
    23022307    /* Remember that we handling that already: */
    2303     gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(true);
     2308    actionPool()->action(UIActionIndex_Simple_Preferences)->setData(true);
    23042309
    23052310    /* Create and execute global settings window: */
     
    23112316
    23122317    /* Remember that we do NOT handling that already: */
    2313     gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(false);
     2318    actionPool()->action(UIActionIndex_Simple_Preferences)->setData(false);
    23142319}
    23152320
     
    24042409            {
    24052410                m_pDbgGuiVT->pfnSetParent(m_pDbgGui, activeMachineWindow());
    2406                 m_pDbgGuiVT->pfnSetMenu(m_pDbgGui, gpActionPool->action(UIActionIndexRT_M_Debug));
     2411                m_pDbgGuiVT->pfnSetMenu(m_pDbgGui, actionPool()->action(UIActionIndexRT_M_Debug));
    24072412                dbgAdjustRelativePos();
    24082413                return true;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r52186 r52202  
    3232class QActionGroup;
    3333class UISession;
     34class UIActionPool;
    3435class UIKeyboardHandler;
    3536class UIMouseHandler;
     
    7172    /* Main getters/setters: */
    7273    UISession* uisession() const { return m_pSession; }
     74    UIActionPool* actionPool() const;
    7375    CSession& session() const;
    7476    UIVisualStateType visualStateType() const { return m_visualStateType; }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r52200 r52202  
    544544    /* Detach framebuffer from view: */
    545545    m_pFrameBuffer->setView(NULL);
     546}
     547
     548UIActionPool* UIMachineView::actionPool() const
     549{
     550    return machineWindow()->actionPool();
    546551}
    547552
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r52179 r52202  
    3636/* Forward declarations: */
    3737class UISession;
     38class UIActionPool;
    3839class UIMachineLogic;
    3940class UIMachineWindow;
     
    145146    /* Protected getters: */
    146147    UIMachineWindow* machineWindow() const { return m_pMachineWindow; }
     148    UIActionPool* actionPool() const;
    147149    UIMachineLogic* machineLogic() const;
    148150    UISession* uisession() const;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r52179 r52202  
    190190}
    191191
     192UIActionPool* UIMachineWindow::actionPool() const
     193{
     194    return machineLogic()->actionPool();
     195}
     196
    192197UISession* UIMachineWindow::uisession() const
    193198{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r52179 r52202  
    3939class UIMachineLogic;
    4040class UIMachineView;
     41class UIActionPool;
    4142
    4243/* Machine-window interface: */
     
    6465    UIMachineView* machineView() const { return m_pMachineView; }
    6566    UIMachineLogic* machineLogic() const { return m_pMachineLogic; }
     67    UIActionPool* actionPool() const;
    6668    UISession* uisession() const;
    6769    CSession& session() const;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp

    r52151 r52202  
    359359
    360360    /* Get the list of all view-menu actions: */
    361     QList<QAction*> viewMenuActions = gpActionPool->action(UIActionIndexRT_M_View)->menu()->actions();
     361    QList<QAction*> viewMenuActions = m_pMachineLogic->actionPool()->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

    r52195 r52202  
    125125    , m_pMachine(pMachine)
    126126    , m_session(sessionReference)
     127    , m_pActionPool(0)
    127128#ifdef Q_WS_MAC
    128129    , m_pMenuBar(0)
     
    766767    bool fIsVRDEServerAvailable = !server.isNull();
    767768    /* Show/Hide VRDE action depending on VRDE server availability status: */
    768     gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setVisible(fIsVRDEServerAvailable);
     769    actionPool()->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setVisible(fIsVRDEServerAvailable);
    769770    /* Check/Uncheck VRDE action depending on VRDE server activity status: */
    770771    if (fIsVRDEServerAvailable)
    771         gpActionPool->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setChecked(server.GetEnabled());
     772        actionPool()->action(UIActionIndexRT_M_Devices_T_VRDEServer)->setChecked(server.GetEnabled());
    772773    /* Notify listeners about VRDE change: */
    773774    emit sigVRDEChange();
     
    779780    const CMachine machine = session().GetMachine();
    780781    /* Check/Uncheck Video Capture action depending on feature status: */
    781     gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setChecked(machine.GetVideoCaptureEnabled());
     782    actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start)->setChecked(machine.GetVideoCaptureEnabled());
    782783    /* Notify listeners about Video Capture change: */
    783784    emit sigVideoCaptureChange();
     
    980981void UISession::prepareActions()
    981982{
     983    /* Create action-pool: */
     984    m_pActionPool = UIActionPool::create(UIActionPoolType_Runtime);
     985
    982986    /* Get host/machine: */
    983987    const CHost host = vboxGlobal().host();
     
    9971001                ++iDevicesCountFD;
    9981002        }
    999         QAction *pOpticalDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_OpticalDevices);
    1000         QAction *pFloppyDevicesMenu = gpActionPool->action(UIActionIndexRT_M_Devices_M_FloppyDevices);
     1003        QAction *pOpticalDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices);
     1004        QAction *pFloppyDevicesMenu = actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices);
    10011005        pOpticalDevicesMenu->setData(iDevicesCountCD);
    10021006        pFloppyDevicesMenu->setData(iDevicesCountFD);
     
    10461050
    10471051    /* Apply cumulative restriction: */
    1048     gpActionPool->toRuntime()->setRestrictionForMenuDevices(UIActionPool::UIActionRestrictionLevel_Session, restriction);
     1052    actionPool()->toRuntime()->setRestrictionForMenuDevices(UIActionRestrictionLevel_Session, restriction);
    10491053
    10501054#ifdef Q_WS_MAC
     
    10541058    {
    10551059        /* Prepare menu-bar: */
    1056         foreach (QMenu *pMenu, gpActionPool->menus())
     1060        foreach (QMenu *pMenu, actionPool()->menus())
    10571061            m_pMenuBar->addMenu(pMenu);
    10581062    }
     
    11251129    m_frameBufferVector.resize(uMonitorCount);
    11261130    QVector<QSize> sizes(uMonitorCount);
    1127     gpActionPool->toRuntime()->setCurrentFrameBufferSizes(sizes.toList(), true);
     1131    actionPool()->toRuntime()->setCurrentFrameBufferSizes(sizes.toList(), true);
    11281132}
    11291133
     
    11611165
    11621166        /* Should guest autoresize? */
    1163         QAction *pGuestAutoresizeSwitch = gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize);
     1167        QAction *pGuestAutoresizeSwitch = actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize);
    11641168        pGuestAutoresizeSwitch->setChecked(gEDataManager->guestScreenAutoResizeEnabled(strMachineID));
    11651169
     
    11681172        const bool fEnabledForMachine = gEDataManager->statusBarEnabled(strMachineID);
    11691173        const bool fEnabled = fEnabledGlobally && fEnabledForMachine;
    1170         QAction *pActionStatusBarSettings = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);
     1174        QAction *pActionStatusBarSettings = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);
    11711175        pActionStatusBarSettings->setEnabled(fEnabled);
    1172         QAction *pActionStatusBarSwitch = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);
     1176        QAction *pActionStatusBarSwitch = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);
    11731177        pActionStatusBarSwitch->blockSignals(true);
    11741178        pActionStatusBarSwitch->setChecked(fEnabled);
     
    11941198
    11951199        /* Remember if guest should autoresize: */
    1196         gEDataManager->setGuestScreenAutoResizeEnabled(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid());
     1200        gEDataManager->setGuestScreenAutoResizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid());
    11971201
    11981202#ifndef Q_WS_MAC
     
    12441248    m_pMenuBar = 0;
    12451249#endif /* Q_WS_MAC */
     1250
     1251    /* Destroy action-pool: */
     1252    UIActionPool::destroy(m_pActionPool);
    12461253}
    12471254
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r52195 r52202  
    3636class UIMachine;
    3737class UIMachineLogic;
     38class UIActionPool;
    3839class CSession;
    3940class CUSBDevice;
     
    8990    /* Common getters: */
    9091    CSession& session() { return m_session; }
     92    UIActionPool* actionPool() const { return m_pActionPool; }
    9193    KMachineState machineStatePrevious() const { return m_machineStatePrevious; }
    9294    KMachineState machineState() const { return m_machineState; }
     
    317319    CSession &m_session;
    318320
     321    /** Holds the action-pool instance. */
     322    UIActionPool *m_pActionPool;
     323
    319324#ifdef Q_WS_MAC
    320325    /** Holds the menu-bar instance. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r52184 r52202  
    7575     * the linked key without the 'Host+' part we are adding it here. */
    7676    QString hotKey = QString("Host+%1")
    77         .arg(VBoxGlobal::extractKeyFromActionText(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen)->text()));
     77        .arg(VBoxGlobal::extractKeyFromActionText(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen)->text()));
    7878    Assert(!hotKey.isEmpty());
    7979
     
    446446
    447447    /* Restrict 'Adjust Window', 'Status Bar' and 'Resize' actions for 'View' menu: */
    448     gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,
     448    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    449449                                                         (RuntimeMenuViewActionType)
    450450                                                         (RuntimeMenuViewActionType_AdjustWindow |
     
    453453
    454454    /* Take care of view-action toggle state: */
    455     UIAction *pActionFullscreen = gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);
     455    UIAction *pActionFullscreen = actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen);
    456456    if (!pActionFullscreen->isChecked())
    457457    {
     
    468468
    469469    /* "View" actions connections: */
    470     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     470    connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    471471            this, SLOT(sltChangeVisualStateToNormal()));
    472     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     472    connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    473473            this, SLOT(sltChangeVisualStateToSeamless()));
    474     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     474    connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    475475            this, SLOT(sltChangeVisualStateToScale()));
    476476}
     
    509509
    510510    // TODO: Make this through action-pool.
    511     m_pScreenLayout->setViewMenu(gpActionPool->action(UIActionIndexRT_M_View)->menu());
     511    m_pScreenLayout->setViewMenu(actionPool()->action(UIActionIndexRT_M_View)->menu());
    512512
    513513    /* Create machine-window(s): */
     
    576576    {
    577577        /* Prepare popup-menu: */
    578         foreach (QMenu *pMenu, gpActionPool->menus())
     578        foreach (QMenu *pMenu, actionPool()->menus())
    579579            m_pPopupMenu->addMenu(pMenu);
    580580    }
     
    619619{
    620620    /* "View" actions disconnections: */
    621     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     621    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    622622               this, SLOT(sltChangeVisualStateToNormal()));
    623     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     623    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    624624               this, SLOT(sltChangeVisualStateToSeamless()));
    625     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     625    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    626626               this, SLOT(sltChangeVisualStateToScale()));
    627627
     
    633633{
    634634    /* Take care of view-action toggle state: */
    635     UIAction *pActionFullscreen = gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen);
     635    UIAction *pActionFullscreen = actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen);
    636636    if (pActionFullscreen->isChecked())
    637637    {
     
    642642
    643643    /* Allow 'Adjust Window', 'Status Bar' and 'Resize' actions for 'View' menu: */
    644     gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,
     644    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    645645                                                         RuntimeMenuViewActionType_Invalid);
    646646
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

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

    r52184 r52202  
    221221                                              gEDataManager->miniToolbarAlignment(vboxGlobal().managedVMUuid()),
    222222                                              gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid()));
    223     m_pMiniToolBar->addMenus(gpActionPool->menus());
     223    m_pMiniToolBar->addMenus(actionPool()->menus());
    224224#ifndef RT_OS_DARWIN
    225225    connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()));
    226226#endif /* !RT_OS_DARWIN */
    227227    connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
    228             gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
     228            actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
    229229    connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
    230             gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger()));
     230            actionPool()->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

    r52184 r52202  
    8181
    8282    /* Make sure status-bar is enabled: */
    83     const bool fEnabled = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();
     83    const bool fEnabled = actionPool()->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     gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false);
    88     gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false);
     87    actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false);
     88    actionPool()->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 = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();
     108    const bool fEnabled = actionPool()->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     gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(true);
    113     gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(true);
     112    actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(true);
     113    actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(true);
    114114}
    115115
     
    137137    AssertMsg(pMenu, ("This slot should be called only on Hard Disks menu show!\n"));
    138138    pMenu->clear();
    139     pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
     139    pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives_S_Settings));
    140140}
    141141
     
    145145    AssertMsg(menu, ("This slot should be called only on Shared Folders menu show!\n"));
    146146    menu->clear();
    147     menu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
     147    menu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders_S_Settings));
    148148}
    149149
     
    153153    AssertMsg(pMenu, ("This slot should be called only on Video Capture menu show!\n"));
    154154    pMenu->clear();
    155     pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
    156     pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
     155    pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_S_Settings));
     156    pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture_T_Start));
    157157}
    158158
     
    162162    AssertMsg(pMenu, ("This slot should be called only on Keyboard menu show!\n"));
    163163    pMenu->clear();
    164     pMenu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
     164    pMenu->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard_S_Settings));
    165165}
    166166
     
    170170    AssertMsg(menu, ("This slot should be called only on Mouse Integration Menu show!\n"));
    171171    menu->clear();
    172     menu->addAction(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
     172    menu->addAction(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse_T_Integration));
    173173}
    174174
     
    179179
    180180    /* "View" actions connections: */
    181     connect(gpActionPool, SIGNAL(sigNotifyAboutTriggeringViewResize(int, const QSize&)),
     181    connect(actionPool(), SIGNAL(sigNotifyAboutTriggeringViewResize(int, const QSize&)),
    182182            this, SLOT(sltHandleActionTriggerViewResize(int, const QSize&)));
    183     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     183    connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    184184            this, SLOT(sltChangeVisualStateToFullscreen()));
    185     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     185    connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    186186            this, SLOT(sltChangeVisualStateToSeamless()));
    187     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     187    connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    188188            this, SLOT(sltChangeVisualStateToScale()));
    189     connect(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
     189    connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
    190190            this, SLOT(sltOpenStatusBarSettings()));
    191     connect(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
     191    connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
    192192            this, SLOT(sltToggleStatusBar()));
    193193
    194194    /* "Device" actions connections: */
    195     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_HardDrives)->menu(), SIGNAL(aboutToShow()),
     195    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives)->menu(), SIGNAL(aboutToShow()),
    196196            this, SLOT(sltPrepareHardDisksMenu()));
    197     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu(), SIGNAL(aboutToShow()),
     197    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders)->menu(), SIGNAL(aboutToShow()),
    198198            this, SLOT(sltPrepareSharedFoldersMenu()));
    199     connect(gpActionPool->action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu(), SIGNAL(aboutToShow()),
     199    connect(actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture)->menu(), SIGNAL(aboutToShow()),
    200200            this, SLOT(sltPrepareVideoCaptureMenu()));
    201     connect(gpActionPool->action(UIActionIndexRT_M_Machine_M_Keyboard)->menu(), SIGNAL(aboutToShow()),
     201    connect(actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard)->menu(), SIGNAL(aboutToShow()),
    202202            this, SLOT(sltPrepareKeyboardMenu()));
    203     connect(gpActionPool->action(UIActionIndexRT_M_Machine_M_Mouse)->menu(), SIGNAL(aboutToShow()),
     203    connect(actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse)->menu(), SIGNAL(aboutToShow()),
    204204            this, SLOT(sltPrepareMouseIntegrationMenu()));
    205205}
     
    252252{
    253253    /* "View" actions disconnections: */
    254     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     254    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    255255               this, SLOT(sltChangeVisualStateToFullscreen()));
    256     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     256    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    257257               this, SLOT(sltChangeVisualStateToSeamless()));
    258     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     258    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    259259               this, SLOT(sltChangeVisualStateToScale()));
    260     disconnect(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
     260    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
    261261               this, SLOT(sltOpenStatusBarSettings()));
    262     disconnect(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
     262    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
    263263               this, SLOT(sltToggleStatusBar()));
    264264
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r52151 r52202  
    4848#endif
    4949                    )
    50     , m_bIsGuestAutoresizeEnabled(gpActionPool->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
     50    , m_bIsGuestAutoresizeEnabled(actionPool()->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

    r52184 r52202  
    120120    const bool fEnabled = gEDataManager->statusBarEnabled(vboxGlobal().managedVMUuid());
    121121    /* Update settings action 'enable' state: */
    122     QAction *pActionStatusBarSettings = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);
     122    QAction *pActionStatusBarSettings = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings);
    123123    pActionStatusBarSettings->setEnabled(fEnabled);
    124124    /* Update switch action 'checked' state: */
    125     QAction *pActionStatusBarSwitch = gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);
     125    QAction *pActionStatusBarSwitch = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility);
    126126    pActionStatusBarSwitch->blockSignals(true);
    127127    pActionStatusBarSwitch->setChecked(fEnabled);
     
    139139{
    140140    /* Raise action's context-menu: */
    141     gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar)->menu()->exec(statusBar()->mapToGlobal(position));
     141    actionPool()->action(UIActionIndexRT_M_View_M_StatusBar)->menu()->exec(statusBar()->mapToGlobal(position));
    142142}
    143143
     
    148148    switch (indicatorType)
    149149    {
    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;
     150        case IndicatorType_HardDisks:     pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives);       break;
     151        case IndicatorType_OpticalDisks:  pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_OpticalDevices);   break;
     152        case IndicatorType_FloppyDisks:   pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_FloppyDevices);    break;
     153        case IndicatorType_USB:           pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_USBDevices);       break;
     154        case IndicatorType_Network:       pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_Network);          break;
     155        case IndicatorType_SharedFolders: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders);    break;
     156        case IndicatorType_Display:       pAction = actionPool()->action(UIActionIndexRT_M_ViewPopup);                  break;
     157        case IndicatorType_VideoCapture:  pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_VideoCapture);     break;
     158        case IndicatorType_Mouse:         pAction = actionPool()->action(UIActionIndexRT_M_Machine_M_Mouse);            break;
     159        case IndicatorType_Keyboard:      pAction = actionPool()->action(UIActionIndexRT_M_Machine_M_Keyboard);         break;
    160160        default: break;
    161161    }
     
    207207    {
    208208        /* Prepare menu-bar: */
    209         foreach (QMenu *pMenu, gpActionPool->menus())
     209        foreach (QMenu *pMenu, actionPool()->menus())
    210210            menuBar()->addMenu(pMenu);
    211211    }
     
    286286#endif /* !Q_WS_MAC */
    287287        /* Update status-bar visibility: */
    288         statusBar()->setVisible(gpActionPool->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked());
     288        statusBar()->setVisible(actionPool()->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

    r52184 r52202  
    4848     * the linked key without the 'Host+' part we are adding it here. */
    4949    QString strHotKey = QString("Host+%1")
    50         .arg(VBoxGlobal::extractKeyFromActionText(gpActionPool->action(UIActionIndexRT_M_View_T_Scale)->text()));
     50        .arg(VBoxGlobal::extractKeyFromActionText(actionPool()->action(UIActionIndexRT_M_View_T_Scale)->text()));
    5151    Assert(!strHotKey.isEmpty());
    5252
     
    7676
    7777    /* Restrict 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */
    78     gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,
     78    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    7979                                                         (RuntimeMenuViewActionType)
    8080                                                         (RuntimeMenuViewActionType_AdjustWindow |
     
    8484
    8585    /* Take care of view-action toggle state: */
    86     UIAction *pActionScale = gpActionPool->action(UIActionIndexRT_M_View_T_Scale);
     86    UIAction *pActionScale = actionPool()->action(UIActionIndexRT_M_View_T_Scale);
    8787    if (!pActionScale->isChecked())
    8888    {
     
    9999
    100100    /* "View" actions connections: */
    101     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     101    connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    102102            this, SLOT(sltChangeVisualStateToNormal()));
    103     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     103    connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    104104            this, SLOT(sltChangeVisualStateToFullscreen()));
    105     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     105    connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    106106            this, SLOT(sltChangeVisualStateToSeamless()));
    107107}
     
    145145    {
    146146        /* Prepare popup-menu: */
    147         foreach (QMenu *pMenu, gpActionPool->menus())
     147        foreach (QMenu *pMenu, actionPool()->menus())
    148148            m_pPopupMenu->addMenu(pMenu);
    149149    }
     
    177177{
    178178    /* "View" actions disconnections: */
    179     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     179    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    180180               this, SLOT(sltChangeVisualStateToNormal()));
    181     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     181    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    182182               this, SLOT(sltChangeVisualStateToFullscreen()));
    183     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     183    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    184184               this, SLOT(sltChangeVisualStateToSeamless()));
    185185
     
    192192{
    193193    /* Take care of view-action toggle state: */
    194     UIAction *pActionScale = gpActionPool->action(UIActionIndexRT_M_View_T_Scale);
     194    UIAction *pActionScale = actionPool()->action(UIActionIndexRT_M_View_T_Scale);
    195195    if (pActionScale->isChecked())
    196196    {
     
    201201
    202202    /* Allow 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */
    203     gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,
     203    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    204204                                                         RuntimeMenuViewActionType_Invalid);
    205205
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp

    r52184 r52202  
    7575     * the linked key without the 'Host+' part we are adding it here. */
    7676    QString hotKey = QString("Host+%1")
    77         .arg(VBoxGlobal::extractKeyFromActionText(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless)->text()));
     77        .arg(VBoxGlobal::extractKeyFromActionText(actionPool()->action(UIActionIndexRT_M_View_T_Seamless)->text()));
    7878    Assert(!hotKey.isEmpty());
    7979
     
    204204
    205205    /* Restrict 'Disable Mouse Integration' action for 'Machine' menu: */
    206     gpActionPool->toRuntime()->setRestrictionForMenuMachine(UIActionPool::UIActionRestrictionLevel_Logic,
     206    actionPool()->toRuntime()->setRestrictionForMenuMachine(UIActionRestrictionLevel_Logic,
    207207                                                            RuntimeMenuMachineActionType_MouseIntegration);
    208208    /* Restrict 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */
    209     gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,
     209    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    210210                                                         (RuntimeMenuViewActionType)
    211211                                                         (RuntimeMenuViewActionType_AdjustWindow |
     
    215215
    216216    /* Take care of view-action toggle state: */
    217     UIAction *pActionSeamless = gpActionPool->action(UIActionIndexRT_M_View_T_Seamless);
     217    UIAction *pActionSeamless = actionPool()->action(UIActionIndexRT_M_View_T_Seamless);
    218218    if (!pActionSeamless->isChecked())
    219219    {
     
    230230
    231231    /* "View" actions connections: */
    232     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     232    connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    233233            this, SLOT(sltChangeVisualStateToNormal()));
    234     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     234    connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    235235            this, SLOT(sltChangeVisualStateToFullscreen()));
    236     connect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     236    connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    237237            this, SLOT(sltChangeVisualStateToScale()));
    238238}
     
    254254
    255255    // TODO: Make this through action-pool.
    256     m_pScreenLayout->setViewMenu(gpActionPool->action(UIActionIndexRT_M_View)->menu());
     256    m_pScreenLayout->setViewMenu(actionPool()->action(UIActionIndexRT_M_View)->menu());
    257257
    258258    /* Create machine-window(s): */
     
    281281    {
    282282        /* Prepare popup-menu: */
    283         foreach (QMenu *pMenu, gpActionPool->menus())
     283        foreach (QMenu *pMenu, actionPool()->menus())
    284284            m_pPopupMenu->addMenu(pMenu);
    285285    }
     
    313313{
    314314    /* "View" actions disconnections: */
    315     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
     315    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    316316               this, SLOT(sltChangeVisualStateToNormal()));
    317     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
     317    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    318318               this, SLOT(sltChangeVisualStateToFullscreen()));
    319     disconnect(gpActionPool->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
     319    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    320320               this, SLOT(sltChangeVisualStateToScale()));
    321321
     
    327327{
    328328    /* Take care of view-action toggle state: */
    329     UIAction *pActionSeamless = gpActionPool->action(UIActionIndexRT_M_View_T_Seamless);
     329    UIAction *pActionSeamless = actionPool()->action(UIActionIndexRT_M_View_T_Seamless);
    330330    if (pActionSeamless->isChecked())
    331331    {
     
    336336
    337337    /* Allow 'Disable Mouse Integration' action for 'Machine' menu: */
    338     gpActionPool->toRuntime()->setRestrictionForMenuMachine(UIActionPool::UIActionRestrictionLevel_Logic,
     338    actionPool()->toRuntime()->setRestrictionForMenuMachine(UIActionRestrictionLevel_Logic,
    339339                                                            RuntimeMenuMachineActionType_Invalid);
    340340    /* Allow 'Adjust Window', 'Guest Autoresize', 'Status Bar' and 'Resize' actions for 'View' menu: */
    341     gpActionPool->toRuntime()->setRestrictionForMenuView(UIActionPool::UIActionRestrictionLevel_Logic,
     341    actionPool()->toRuntime()->setRestrictionForMenuView(UIActionRestrictionLevel_Logic,
    342342                                                         RuntimeMenuViewActionType_Invalid);
    343343
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r52184 r52202  
    116116                                              gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid()));
    117117    m_pMiniToolBar->show();
    118     m_pMiniToolBar->addMenus(gpActionPool->menus());
     118    m_pMiniToolBar->addMenus(actionPool()->menus());
    119119    connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()));
    120120    connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
    121             gpActionPool->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger()));
     121            actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger()));
    122122    connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
    123             gpActionPool->action(UIActionIndexRT_M_Machine_S_Close), SLOT(trigger()));
     123            actionPool()->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

    r52184 r52202  
    3333
    3434    UIActionMenuFile(UIActionPool *pParent)
    35         : UIActionMenu(pParent)
    36     {
    37         retranslateUi();
    38     }
     35        : UIActionMenu(pParent) {}
    3936
    4037protected:
     
    5754
    5855    UIActionSimpleMediumManagerDialog(UIActionPool *pParent)
    59         : UIActionSimple(pParent, ":/diskimage_16px.png")
    60     {
    61         retranslateUi();
    62     }
     56        : UIActionSimple(pParent, ":/diskimage_16px.png") {}
    6357
    6458protected:
     
    8882
    8983    UIActionSimpleImportApplianceWizard(UIActionPool *pParent)
    90         : UIActionSimple(pParent, ":/import_16px.png")
    91     {
    92         retranslateUi();
    93     }
     84        : UIActionSimple(pParent, ":/import_16px.png") {}
    9485
    9586protected:
     
    119110
    120111    UIActionSimpleExportApplianceWizard(UIActionPool *pParent)
    121         : UIActionSimple(pParent, ":/export_16px.png")
    122     {
    123         retranslateUi();
    124     }
     112        : UIActionSimple(pParent, ":/export_16px.png") {}
    125113
    126114protected:
     
    151139
    152140    UIActionSimpleExtraDataManagerWindow(UIActionPool *pParent)
    153         : UIActionSimple(pParent, ":/edataman_16px.png")
    154     {
    155         retranslateUi();
    156     }
     141        : UIActionSimple(pParent, ":/edataman_16px.png") {}
    157142
    158143protected:
     
    186171    {
    187172        setMenuRole(QAction::QuitRole);
    188         retranslateUi();
    189173    }
    190174
     
    216200
    217201    UIActionMenuGroup(UIActionPool *pParent)
    218         : UIActionMenu(pParent)
    219     {
    220         retranslateUi();
    221     }
     202        : UIActionMenu(pParent) {}
    222203
    223204protected:
     
    236217
    237218    UIActionSimpleGroupNew(UIActionPool *pParent)
    238         : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png")
    239     {
    240         retranslateUi();
    241     }
     219        : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") {}
    242220
    243221protected:
     
    269247
    270248    UIActionSimpleGroupAdd(UIActionPool *pParent)
    271         : UIActionSimple(pParent, ":/vm_add_16px.png")
    272     {
    273         retranslateUi();
    274     }
     249        : UIActionSimple(pParent, ":/vm_add_16px.png") {}
    275250
    276251protected:
     
    300275
    301276    UIActionSimpleGroupRename(UIActionPool *pParent)
    302         : UIActionSimple(pParent, ":/vm_group_name_16px.png", ":/vm_group_name_disabled_16px.png")
    303     {
    304         retranslateUi();
    305     }
     277        : UIActionSimple(pParent, ":/vm_group_name_16px.png", ":/vm_group_name_disabled_16px.png") {}
    306278
    307279protected:
     
    331303
    332304    UIActionSimpleGroupRemove(UIActionPool *pParent)
    333         : UIActionSimple(pParent, ":/vm_group_remove_16px.png", ":/vm_group_remove_disabled_16px.png")
    334     {
    335         retranslateUi();
    336     }
     305        : UIActionSimple(pParent, ":/vm_group_remove_16px.png", ":/vm_group_remove_disabled_16px.png") {}
    337306
    338307protected:
     
    362331
    363332    UIActionSimpleGroupSort(UIActionPool *pParent)
    364         : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png")
    365     {
    366         retranslateUi();
    367     }
     333        : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") {}
    368334
    369335protected:
     
    389355
    390356    UIActionMenuMachineSelector(UIActionPool *pParent)
    391         : UIActionMenu(pParent)
    392     {
    393         retranslateUi();
    394     }
     357        : UIActionMenu(pParent) {}
    395358
    396359protected:
     
    409372
    410373    UIActionSimpleMachineNew(UIActionPool *pParent)
    411         : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png")
    412     {
    413         retranslateUi();
    414     }
     374        : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") {}
    415375
    416376protected:
     
    442402
    443403    UIActionSimpleMachineAdd(UIActionPool *pParent)
    444         : UIActionSimple(pParent, ":/vm_add_16px.png")
    445     {
    446         retranslateUi();
    447     }
     404        : UIActionSimple(pParent, ":/vm_add_16px.png") {}
    448405
    449406protected:
     
    473430
    474431    UIActionSimpleMachineAddGroup(UIActionPool *pParent)
    475         : UIActionSimple(pParent, ":/vm_group_create_16px.png", ":/vm_group_create_disabled_16px.png")
    476     {
    477         retranslateUi();
    478     }
     432        : UIActionSimple(pParent, ":/vm_group_create_16px.png", ":/vm_group_create_disabled_16px.png") {}
    479433
    480434protected:
     
    506460        : UIActionSimple(pParent,
    507461                         ":/vm_settings_32px.png", ":/vm_settings_16px.png",
    508                          ":/vm_settings_disabled_32px.png", ":/vm_settings_disabled_16px.png")
    509     {
    510         retranslateUi();
    511     }
     462                         ":/vm_settings_disabled_32px.png", ":/vm_settings_disabled_16px.png") {}
    512463
    513464protected:
     
    539490
    540491    UIActionSimpleMachineClone(UIActionPool *pParent)
    541         : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png")
    542     {
    543         retranslateUi();
    544     }
     492        : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png") {}
    545493
    546494protected:
     
    572520        : UIActionSimple(pParent,
    573521                         ":/vm_delete_32px.png", ":/vm_delete_16px.png",
    574                          ":/vm_delete_disabled_32px.png", ":/vm_delete_disabled_16px.png")
    575     {
    576         retranslateUi();
    577     }
     522                         ":/vm_delete_disabled_32px.png", ":/vm_delete_disabled_16px.png") {}
    578523
    579524protected:
     
    606551        : UIActionPolymorphic(pParent,
    607552                        ":/vm_start_32px.png", ":/vm_start_16px.png",
    608                         ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png")
    609     {
    610         retranslateUi();
    611     }
     553                        ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png") {}
    612554
    613555protected:
     
    653595        : UIActionToggle(pParent,
    654596                         ":/vm_pause_32px.png", ":/vm_pause_16px.png",
    655                          ":/vm_pause_disabled_32px.png", ":/vm_pause_disabled_16px.png")
    656     {
    657         retranslateUi();
    658     }
     597                         ":/vm_pause_disabled_32px.png", ":/vm_pause_disabled_16px.png") {}
    659598
    660599protected:
     
    684623
    685624    UIActionSimpleCommonReset(UIActionPool *pParent)
    686         : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png")
    687     {
    688         retranslateUi();
    689     }
     625        : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") {}
    690626
    691627protected:
     
    717653        : UIActionSimple(pParent,
    718654                         ":/vm_discard_32px.png", ":/vm_discard_16px.png",
    719                          ":/vm_discard_disabled_32px.png", ":/vm_discard_disabled_16px.png")
    720     {
    721         retranslateUi();
    722     }
     655                         ":/vm_discard_disabled_32px.png", ":/vm_discard_disabled_16px.png") {}
    723656
    724657protected:
     
    753686        : UIActionSimple(pParent,
    754687                         ":/refresh_32px.png", ":/refresh_16px.png",
    755                          ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png")
    756     {
    757         retranslateUi();
    758     }
     688                         ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") {}
    759689
    760690protected:
     
    779709
    780710    UIActionSimpleCommonShowInFileManager(UIActionPool *pParent)
    781         : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png")
    782     {
    783         retranslateUi();
    784     }
     711        : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") {}
    785712
    786713protected:
     
    813740
    814741    UIActionSimpleCommonCreateShortcut(UIActionPool *pParent)
    815         : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png")
    816     {
    817         retranslateUi();
    818     }
     742        : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") {}
    819743
    820744protected:
     
    844768
    845769    UIActionSimpleMachineSortParent(UIActionPool *pParent)
    846         : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png")
    847     {
    848         retranslateUi();
    849     }
     770        : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") {}
    850771
    851772protected:
     
    871792
    872793    UIActionMenuClose(UIActionPool *pParent)
    873         : UIActionMenu(pParent, ":/exit_16px.png")
    874     {
    875         retranslateUi();
    876     }
     794        : UIActionMenu(pParent, ":/exit_16px.png") {}
    877795
    878796protected:
     
    891809
    892810    UIActionSimpleSave(UIActionPool *pParent)
    893         : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png")
    894     {
    895         retranslateUi();
    896     }
     811        : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") {}
    897812
    898813protected:
     
    922837
    923838    UIActionSimpleACPIShutdown(UIActionPool *pParent)
    924         : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png")
    925     {
    926         retranslateUi();
    927     }
     839        : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") {}
    928840
    929841protected:
     
    953865
    954866    UIActionSimplePowerOff(UIActionPool *pParent)
    955         : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png")
    956     {
    957         retranslateUi();
    958     }
     867        : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") {}
    959868
    960869protected:
     
    978887
    979888
    980 UIActionPoolSelector::UIActionPoolSelector()
    981     : UIActionPool(UIActionPoolType_Selector)
     889UIActionPoolSelector::UIActionPoolSelector(bool fTemporary /* = false */)
     890    : UIActionPool(UIActionPoolType_Selector, fTemporary)
    982891{
    983892}
     
    1037946    m_pool[UIActionIndexST_M_Machine_S_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this);
    1038947    m_pool[UIActionIndexST_M_Machine_S_SortParent] = new UIActionSimpleMachineSortParent(this);
     948
     949    /* Retranslate finally: */
     950    retranslateUi();
    1039951}
    1040952
     
    1055967    foreach (const int iActionPoolKey, m_pool.keys())
    1056968        m_pool[iActionPoolKey]->retranslateUi();
    1057     /* Re-apply Selector UI shortcuts: */
    1058     sltApplyShortcuts();
    1059     /* Temporary create Runtime UI pool to do the same: */
    1060     UIActionPool::createTemporary(UIActionPoolType_Runtime);
     969    /* Update Selector UI shortcuts: */
     970    updateShortcuts();
     971    /* Create temporary Runtime UI pool to do the same: */
     972    if (!m_fTemporary)
     973        UIActionPool::createTemporary(UIActionPoolType_Runtime);
    1061974}
    1062975
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h

    r52184 r52202  
    9292protected:
    9393
    94     /** Constructor. */
    95     UIActionPoolSelector();
     94    /** Constructor,
     95      * @param fTemporary is used to determine whether this action-pool is temporary,
     96      *                   which can be created to re-initialize shortcuts-pool. */
     97    UIActionPoolSelector(bool fTemporary = false);
    9698
    9799    /** Prepare pool routine. */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r52155 r52202  
    8383    , m_fPolished(false)
    8484    , m_fWarningAboutInaccessibleMediumShown(false)
     85    , m_pActionPool(0)
    8586    , m_pSplitter(0)
    8687#ifndef Q_WS_MAC
     
    146147#endif /* Q_WS_MAC */
    147148
    148     /* Cleanup connections: */
    149     cleanupConnections();
    150 
    151149    /* Save settings: */
    152150    saveSettings();
     151
     152    /* Cleanup: */
     153    cleanupConnections();
     154    cleanupMenuBar();
    153155}
    154156
     
    320322{
    321323    /* Check that we do NOT handling that already: */
    322     if (gpActionPool->action(UIActionIndex_Simple_Preferences)->data().toBool())
     324    if (actionPool()->action(UIActionIndex_Simple_Preferences)->data().toBool())
    323325        return;
    324326    /* Remember that we handling that already: */
    325     gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(true);
     327    actionPool()->action(UIActionIndex_Simple_Preferences)->setData(true);
    326328
    327329    /* Don't show the inaccessible warning
     
    334336
    335337    /* Remember that we do NOT handling that already: */
    336     gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(false);
     338    actionPool()->action(UIActionIndex_Simple_Preferences)->setData(false);
    337339}
    338340
     
    393395{
    394396    /* Check that we do NOT handling that already: */
    395     if (gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->data().toBool())
     397    if (actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->data().toBool())
    396398        return;
    397399    /* Remember that we handling that already: */
    398     gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setData(true);
     400    actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setData(true);
    399401
    400402    /* Process href from VM details / description: */
     
    430432
    431433    /* Remember that we do NOT handling that already: */
    432     gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setData(false);
     434    actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setData(false);
    433435}
    434436
     
    798800    AssertMsgReturnVoid(!items.isEmpty(), ("At least one item should be selected!\n"));
    799801
    800     gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items));
     802    actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items));
    801803}
    802804
     
    807809    AssertMsgReturnVoid(!items.isEmpty(), ("At least one item should be selected!\n"));
    808810
    809     gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items));
     811    actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items));
    810812}
    811813
     
    10961098void UISelectorWindow::prepareMenuBar()
    10971099{
     1100    /* Create action-pool: */
     1101    m_pActionPool = UIActionPool::create(UIActionPoolType_Selector);
     1102
    10981103    /* Prepare File-menu: */
    1099     prepareMenuFile(gpActionPool->action(UIActionIndexST_M_File)->menu());
    1100     menuBar()->addMenu(gpActionPool->action(UIActionIndexST_M_File)->menu());
     1104    prepareMenuFile(actionPool()->action(UIActionIndexST_M_File)->menu());
     1105    menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_File)->menu());
    11011106
    11021107    /* Prepare 'Group' / 'Close' menu: */
    1103     prepareMenuGroupClose(gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu());
     1108    prepareMenuGroupClose(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu());
    11041109
    11051110    /* Prepare 'Machine' / 'Close' menu: */
    1106     prepareMenuMachineClose(gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu());
     1111    prepareMenuMachineClose(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu());
    11071112
    11081113    /* Prepare Group-menu: */
    1109     prepareMenuGroup(gpActionPool->action(UIActionIndexST_M_Group)->menu());
    1110     m_pGroupMenuAction = menuBar()->addMenu(gpActionPool->action(UIActionIndexST_M_Group)->menu());
     1114    prepareMenuGroup(actionPool()->action(UIActionIndexST_M_Group)->menu());
     1115    m_pGroupMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Group)->menu());
    11111116
    11121117    /* Prepare Machine-menu: */
    1113     prepareMenuMachine(gpActionPool->action(UIActionIndexST_M_Machine)->menu());
    1114     m_pMachineMenuAction = menuBar()->addMenu(gpActionPool->action(UIActionIndexST_M_Machine)->menu());
     1118    prepareMenuMachine(actionPool()->action(UIActionIndexST_M_Machine)->menu());
     1119    m_pMachineMenuAction = menuBar()->addMenu(actionPool()->action(UIActionIndexST_M_Machine)->menu());
    11151120
    11161121#ifdef Q_WS_MAC
     
    11191124
    11201125    /* Prepare Help-menu: */
    1121     prepareMenuHelp(gpActionPool->action(UIActionIndex_Menu_Help)->menu());
    1122     menuBar()->addMenu(gpActionPool->action(UIActionIndex_Menu_Help)->menu());
     1126    prepareMenuHelp(actionPool()->action(UIActionIndex_Menu_Help)->menu());
     1127    menuBar()->addMenu(actionPool()->action(UIActionIndex_Menu_Help)->menu());
    11231128
    11241129    /* Setup menubar policy: */
     
    11331138
    11341139    /* Populate File-menu: */
    1135     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_ShowMediumManager));
    1136     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_ImportAppliance));
    1137     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_ExportAppliance));
     1140    pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowMediumManager));
     1141    pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ImportAppliance));
     1142    pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance));
    11381143#ifndef Q_WS_MAC
    11391144    pMenu->addSeparator();
    11401145#endif /* Q_WS_MAC */
    11411146#ifdef DEBUG
    1142     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_ShowExtraDataManager));
     1147    pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowExtraDataManager));
    11431148#endif /* DEBUG */
    1144     pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_Preferences));
     1149    pMenu->addAction(actionPool()->action(UIActionIndex_Simple_Preferences));
    11451150#ifndef Q_WS_MAC
    11461151    pMenu->addSeparator();
    11471152#endif /* Q_WS_MAC */
    1148     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_Close));
     1153    pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_Close));
    11491154}
    11501155
     
    11561161
    11571162    /* Populate Machine-menu: */
    1158     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_New));
    1159     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Add));
     1163    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_New));
     1164    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Add));
    11601165    pMenu->addSeparator();
    1161     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Rename));
    1162     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Remove));
     1166    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Rename));
     1167    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Remove));
    11631168    pMenu->addSeparator();
    1164     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow));
    1165     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_T_Pause));
    1166     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Reset));
    1167     pMenu->addMenu(gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu());
     1169    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow));
     1170    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_T_Pause));
     1171    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Reset));
     1172    pMenu->addMenu(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu());
    11681173    pMenu->addSeparator();
    1169     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Discard));
    1170     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Refresh));
     1174    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Discard));
     1175    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Refresh));
    11711176    pMenu->addSeparator();
    1172     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager));
    1173     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut));
     1177    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager));
     1178    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut));
    11741179    pMenu->addSeparator();
    1175     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Sort));
     1180    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Sort));
    11761181
    11771182    /* Remember action list: */
    1178     m_groupActions << gpActionPool->action(UIActionIndexST_M_Group_S_New)
    1179                    << gpActionPool->action(UIActionIndexST_M_Group_S_Add)
    1180                    << gpActionPool->action(UIActionIndexST_M_Group_S_Rename)
    1181                    << gpActionPool->action(UIActionIndexST_M_Group_S_Remove)
    1182                    << gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)
    1183                    << gpActionPool->action(UIActionIndexST_M_Group_T_Pause)
    1184                    << gpActionPool->action(UIActionIndexST_M_Group_S_Reset)
    1185                    << gpActionPool->action(UIActionIndexST_M_Group_S_Discard)
    1186                    << gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)
    1187                    << gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager)
    1188                    << gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut)
    1189                    << gpActionPool->action(UIActionIndexST_M_Group_S_Sort);
     1183    m_groupActions << actionPool()->action(UIActionIndexST_M_Group_S_New)
     1184                   << actionPool()->action(UIActionIndexST_M_Group_S_Add)
     1185                   << actionPool()->action(UIActionIndexST_M_Group_S_Rename)
     1186                   << actionPool()->action(UIActionIndexST_M_Group_S_Remove)
     1187                   << actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)
     1188                   << actionPool()->action(UIActionIndexST_M_Group_T_Pause)
     1189                   << actionPool()->action(UIActionIndexST_M_Group_S_Reset)
     1190                   << actionPool()->action(UIActionIndexST_M_Group_S_Discard)
     1191                   << actionPool()->action(UIActionIndexST_M_Group_S_Refresh)
     1192                   << actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager)
     1193                   << actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut)
     1194                   << actionPool()->action(UIActionIndexST_M_Group_S_Sort);
    11901195}
    11911196
     
    11971202
    11981203    /* Populate Machine-menu: */
    1199     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_New));
    1200     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Add));
    1201     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Settings));
    1202     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Clone));
    1203     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Remove));
    1204     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup));
     1204    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_New));
     1205    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Add));
     1206    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings));
     1207    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Clone));
     1208    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Remove));
     1209    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup));
    12051210    pMenu->addSeparator();
    1206     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow));
    1207     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_T_Pause));
    1208     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Reset));
    1209     pMenu->addMenu(gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu());
     1211    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow));
     1212    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_T_Pause));
     1213    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Reset));
     1214    pMenu->addMenu(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu());
    12101215    pMenu->addSeparator();
    1211     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Discard));
    1212     pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_LogDialog));
    1213     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh));
     1216    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard));
     1217    pMenu->addAction(actionPool()->action(UIActionIndex_Simple_LogDialog));
     1218    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh));
    12141219    pMenu->addSeparator();
    1215     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager));
    1216     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut));
     1220    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager));
     1221    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut));
    12171222    pMenu->addSeparator();
    1218     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent));
     1223    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_SortParent));
    12191224
    12201225    /* Remember action list: */
    1221     m_machineActions << gpActionPool->action(UIActionIndexST_M_Machine_S_New)
    1222                      << gpActionPool->action(UIActionIndexST_M_Machine_S_Add)
    1223                      << gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)
    1224                      << gpActionPool->action(UIActionIndexST_M_Machine_S_Clone)
    1225                      << gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)
    1226                      << gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)
    1227                      << gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)
    1228                      << gpActionPool->action(UIActionIndexST_M_Machine_T_Pause)
    1229                      << gpActionPool->action(UIActionIndexST_M_Machine_S_Reset)
    1230                      << gpActionPool->action(UIActionIndexST_M_Machine_S_Discard)
    1231                      << gpActionPool->action(UIActionIndex_Simple_LogDialog)
    1232                      << gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh)
    1233                      << gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager)
    1234                      << gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut)
    1235                      << gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent);
     1226    m_machineActions << actionPool()->action(UIActionIndexST_M_Machine_S_New)
     1227                     << actionPool()->action(UIActionIndexST_M_Machine_S_Add)
     1228                     << actionPool()->action(UIActionIndexST_M_Machine_S_Settings)
     1229                     << actionPool()->action(UIActionIndexST_M_Machine_S_Clone)
     1230                     << actionPool()->action(UIActionIndexST_M_Machine_S_Remove)
     1231                     << actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)
     1232                     << actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)
     1233                     << actionPool()->action(UIActionIndexST_M_Machine_T_Pause)
     1234                     << actionPool()->action(UIActionIndexST_M_Machine_S_Reset)
     1235                     << actionPool()->action(UIActionIndexST_M_Machine_S_Discard)
     1236                     << actionPool()->action(UIActionIndex_Simple_LogDialog)
     1237                     << actionPool()->action(UIActionIndexST_M_Machine_S_Refresh)
     1238                     << actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager)
     1239                     << actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut)
     1240                     << actionPool()->action(UIActionIndexST_M_Machine_S_SortParent);
    12361241}
    12371242
     
    12431248
    12441249    /* Populate 'Group' / 'Close' menu: */
    1245     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState));
    1246     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown));
    1247     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff));
     1250    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState));
     1251    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown));
     1252    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff));
    12481253
    12491254    /* Remember action list: */
    1250     m_groupActions << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState)
    1251                    << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)
    1252                    << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff);
     1255    m_groupActions << actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState)
     1256                   << actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)
     1257                   << actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff);
    12531258}
    12541259
     
    12601265
    12611266    /* Populate 'Machine' / 'Close' menu: */
    1262     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState));
    1263     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown));
    1264     pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff));
     1267    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState));
     1268    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown));
     1269    pMenu->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff));
    12651270
    12661271    /* Remember action list: */
    1267     m_machineActions << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)
    1268                      << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)
    1269                      << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff);
     1272    m_machineActions << actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)
     1273                     << actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)
     1274                     << actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff);
    12701275}
    12711276
     
    12771282
    12781283    /* Populate Help-menu: */
    1279     pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_Contents));
    1280     pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_WebSite));
     1284    pMenu->addAction(actionPool()->action(UIActionIndex_Simple_Contents));
     1285    pMenu->addAction(actionPool()->action(UIActionIndex_Simple_WebSite));
    12811286    pMenu->addSeparator();
    1282     pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_ResetWarnings));
     1287    pMenu->addAction(actionPool()->action(UIActionIndex_Simple_ResetWarnings));
    12831288#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    12841289    pMenu->addSeparator();
    1285     pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager));
     1290    pMenu->addAction(actionPool()->action(UIActionIndex_Simple_NetworkAccessManager));
    12861291    if (gEDataManager->applicationUpdateEnabled())
    1287         pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_CheckForUpdates));
     1292        pMenu->addAction(actionPool()->action(UIActionIndex_Simple_CheckForUpdates));
    12881293    else
    1289         gpActionPool->action(UIActionIndex_Simple_CheckForUpdates)->setEnabled(false);
     1294        actionPool()->action(UIActionIndex_Simple_CheckForUpdates)->setEnabled(false);
    12901295#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    12911296#ifndef Q_WS_MAC
    12921297    pMenu->addSeparator();
    12931298#endif /* !Q_WS_MAC */
    1294     pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_About));
     1299    pMenu->addAction(actionPool()->action(UIActionIndex_Simple_About));
    12951300}
    12961301
     
    13211326    mVMToolBar->setIconSize(QSize(32, 32));
    13221327    mVMToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    1323     mVMToolBar->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_New));
    1324     mVMToolBar->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Settings));
    1325     mVMToolBar->addAction(gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow));
    1326     mVMToolBar->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Discard));
     1328    mVMToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_New));
     1329    mVMToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings));
     1330    mVMToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow));
     1331    mVMToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard));
    13271332
    13281333    /* Prepare graphics VM list: */
     
    13381343
    13391344    /* Prepare details and snapshots tabs: */
    1340     m_pVMDesktop = new UIVMDesktop(mVMToolBar, gpActionPool->action(UIActionIndexST_M_Group_S_Refresh), this);
     1345    m_pVMDesktop = new UIVMDesktop(mVMToolBar, actionPool()->action(UIActionIndexST_M_Group_S_Refresh), this);
    13411346
    13421347    /* Crate container: */
     
    13821387
    13831388    /* 'File' menu connections: */
    1384     connect(gpActionPool->action(UIActionIndexST_M_File_S_ShowMediumManager), SIGNAL(triggered()), this, SLOT(sltShowMediumManager()));
    1385     connect(gpActionPool->action(UIActionIndexST_M_File_S_ImportAppliance), SIGNAL(triggered()), this, SLOT(sltShowImportApplianceWizard()));
    1386     connect(gpActionPool->action(UIActionIndexST_M_File_S_ExportAppliance), SIGNAL(triggered()), this, SLOT(sltShowExportApplianceWizard()));
     1389    connect(actionPool()->action(UIActionIndexST_M_File_S_ShowMediumManager), SIGNAL(triggered()), this, SLOT(sltShowMediumManager()));
     1390    connect(actionPool()->action(UIActionIndexST_M_File_S_ImportAppliance), SIGNAL(triggered()), this, SLOT(sltShowImportApplianceWizard()));
     1391    connect(actionPool()->action(UIActionIndexST_M_File_S_ExportAppliance), SIGNAL(triggered()), this, SLOT(sltShowExportApplianceWizard()));
    13871392#ifdef DEBUG
    1388     connect(gpActionPool->action(UIActionIndexST_M_File_S_ShowExtraDataManager), SIGNAL(triggered()), this, SLOT(sltOpenExtraDataManagerWindow()));
     1393    connect(actionPool()->action(UIActionIndexST_M_File_S_ShowExtraDataManager), SIGNAL(triggered()), this, SLOT(sltOpenExtraDataManagerWindow()));
    13891394#endif /* DEBUG */
    1390     connect(gpActionPool->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()), this, SLOT(sltShowPreferencesDialog()));
    1391     connect(gpActionPool->action(UIActionIndexST_M_File_S_Close), SIGNAL(triggered()), this, SLOT(sltPerformExit()));
     1395    connect(actionPool()->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()), this, SLOT(sltShowPreferencesDialog()));
     1396    connect(actionPool()->action(UIActionIndexST_M_File_S_Close), SIGNAL(triggered()), this, SLOT(sltPerformExit()));
    13921397
    13931398    /* 'Group' menu connections: */
    1394     connect(gpActionPool->action(UIActionIndexST_M_Group_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog()));
    1395     connect(gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction()));
    1396     connect(gpActionPool->action(UIActionIndexST_M_Group_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool)));
    1397     connect(gpActionPool->action(UIActionIndexST_M_Group_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction()));
    1398     connect(gpActionPool->action(UIActionIndexST_M_Group_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction()));
    1399     connect(gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager()));
    1400     connect(gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction()));
     1399    connect(actionPool()->action(UIActionIndexST_M_Group_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog()));
     1400    connect(actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction()));
     1401    connect(actionPool()->action(UIActionIndexST_M_Group_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool)));
     1402    connect(actionPool()->action(UIActionIndexST_M_Group_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction()));
     1403    connect(actionPool()->action(UIActionIndexST_M_Group_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction()));
     1404    connect(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager()));
     1405    connect(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction()));
    14011406
    14021407    /* 'Machine' menu connections: */
    1403     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog()));
    1404     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Settings), SIGNAL(triggered()), this, SLOT(sltShowMachineSettingsDialog()));
    1405     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Clone), SIGNAL(triggered()), this, SLOT(sltShowCloneMachineWizard()));
    1406     connect(gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction()));
    1407     connect(gpActionPool->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool)));
    1408     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction()));
    1409     connect(gpActionPool->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()), this, SLOT(sltShowLogDialog()));
    1410     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction()));
    1411     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager()));
    1412     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction()));
     1408    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog()));
     1409    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), SIGNAL(triggered()), this, SLOT(sltShowMachineSettingsDialog()));
     1410    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Clone), SIGNAL(triggered()), this, SLOT(sltShowCloneMachineWizard()));
     1411    connect(actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction()));
     1412    connect(actionPool()->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool)));
     1413    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction()));
     1414    connect(actionPool()->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()), this, SLOT(sltShowLogDialog()));
     1415    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction()));
     1416    connect(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager()));
     1417    connect(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction()));
    14131418
    14141419    /* 'Group/Close' menu connections: */
    1415     connect(gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltGroupCloseMenuAboutToShow()));
    1416     connect(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction()));
    1417     connect(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction()));
    1418     connect(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction()));
     1420    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltGroupCloseMenuAboutToShow()));
     1421    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction()));
     1422    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction()));
     1423    connect(actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction()));
    14191424
    14201425    /* 'Machine/Close' menu connections: */
    1421     connect(gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltMachineCloseMenuAboutToShow()));
    1422     connect(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction()));
    1423     connect(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction()));
    1424     connect(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction()));
     1426    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltMachineCloseMenuAboutToShow()));
     1427    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction()));
     1428    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction()));
     1429    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction()));
    14251430
    14261431    /* 'Help' menu connections: */
    1427     connect(gpActionPool->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpHelpDialog()));
    1428     connect(gpActionPool->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpWebDialog()));
    1429     connect(gpActionPool->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()), &msgCenter(), SLOT(sltResetSuppressedMessages()));
     1432    connect(actionPool()->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpHelpDialog()));
     1433    connect(actionPool()->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpWebDialog()));
     1434    connect(actionPool()->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()), &msgCenter(), SLOT(sltResetSuppressedMessages()));
    14301435#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    1431     connect(gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()), gNetworkManager, SLOT(show()));
    1432     connect(gpActionPool->action(UIActionIndex_Simple_CheckForUpdates), SIGNAL(triggered()), gUpdateManager, SLOT(sltForceCheck()));
     1436    connect(actionPool()->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()), gNetworkManager, SLOT(show()));
     1437    connect(actionPool()->action(UIActionIndex_Simple_CheckForUpdates), SIGNAL(triggered()), gUpdateManager, SLOT(sltForceCheck()));
    14331438#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    1434     connect(gpActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpAboutDialog()));
     1439    connect(actionPool()->action(UIActionIndex_Simple_About), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpAboutDialog()));
    14351440
    14361441    /* Status-bar connections: */
     
    15501555}
    15511556
     1557void UISelectorWindow::cleanupMenuBar()
     1558{
     1559    /* Destroy action-pool: */
     1560    UIActionPool::destroy(m_pActionPool);
     1561}
     1562
    15521563UIVMItem* UISelectorWindow::currentItem() const
    15531564{
     
    15671578
    15681579    /* Enable/disable group actions: */
    1569     gpActionPool->action(UIActionIndexST_M_Group_S_Rename)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Rename, items));
    1570     gpActionPool->action(UIActionIndexST_M_Group_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Remove, items));
    1571     gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_P_StartOrShow, items));
    1572     gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_T_Pause, items));
    1573     gpActionPool->action(UIActionIndexST_M_Group_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Reset, items));
    1574     gpActionPool->action(UIActionIndexST_M_Group_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Discard, items));
    1575     gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Refresh, items));
    1576     gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_ShowInFileManager, items));
    1577     gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_CreateShortcut, items));
    1578     gpActionPool->action(UIActionIndexST_M_Group_S_Sort)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Sort, items));
     1580    actionPool()->action(UIActionIndexST_M_Group_S_Rename)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Rename, items));
     1581    actionPool()->action(UIActionIndexST_M_Group_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Remove, items));
     1582    actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_P_StartOrShow, items));
     1583    actionPool()->action(UIActionIndexST_M_Group_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_T_Pause, items));
     1584    actionPool()->action(UIActionIndexST_M_Group_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Reset, items));
     1585    actionPool()->action(UIActionIndexST_M_Group_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Discard, items));
     1586    actionPool()->action(UIActionIndexST_M_Group_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Refresh, items));
     1587    actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_ShowInFileManager, items));
     1588    actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_CreateShortcut, items));
     1589    actionPool()->action(UIActionIndexST_M_Group_S_Sort)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Sort, items));
    15791590
    15801591    /* Enable/disable machine actions: */
    1581     gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Settings, items));
    1582     gpActionPool->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Clone, items));
    1583     gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Remove, items));
    1584     gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_AddGroup, items));
    1585     gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_P_StartOrShow, items));
    1586     gpActionPool->action(UIActionIndexST_M_Machine_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_T_Pause, items));
    1587     gpActionPool->action(UIActionIndexST_M_Machine_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Reset, items));
    1588     gpActionPool->action(UIActionIndexST_M_Machine_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Discard, items));
    1589     gpActionPool->action(UIActionIndex_Simple_LogDialog)->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items));
    1590     gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Refresh, items));
    1591     gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_ShowInFileManager, items));
    1592     gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_CreateShortcut, items));
    1593     gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_SortParent, items));
     1592    actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Settings, items));
     1593    actionPool()->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Clone, items));
     1594    actionPool()->action(UIActionIndexST_M_Machine_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Remove, items));
     1595    actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_AddGroup, items));
     1596    actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_P_StartOrShow, items));
     1597    actionPool()->action(UIActionIndexST_M_Machine_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_T_Pause, items));
     1598    actionPool()->action(UIActionIndexST_M_Machine_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Reset, items));
     1599    actionPool()->action(UIActionIndexST_M_Machine_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Discard, items));
     1600    actionPool()->action(UIActionIndex_Simple_LogDialog)->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items));
     1601    actionPool()->action(UIActionIndexST_M_Machine_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Refresh, items));
     1602    actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_ShowInFileManager, items));
     1603    actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_CreateShortcut, items));
     1604    actionPool()->action(UIActionIndexST_M_Machine_S_SortParent)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_SortParent, items));
    15941605
    15951606    /* Enable/disable group-close actions: */
    1596     gpActionPool->action(UIActionIndexST_M_Group_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close, items));
    1597     gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_SaveState, items));
    1598     gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items));
    1599     gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_PowerOff, items));
     1607    actionPool()->action(UIActionIndexST_M_Group_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close, items));
     1608    actionPool()->action(UIActionIndexST_M_Group_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_SaveState, items));
     1609    actionPool()->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items));
     1610    actionPool()->action(UIActionIndexST_M_Group_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_PowerOff, items));
    16001611
    16011612    /* Enable/disable machine-close actions: */
    1602     gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close, items));
    1603     gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_SaveState, items));
    1604     gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items));
    1605     gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_PowerOff, items));
     1613    actionPool()->action(UIActionIndexST_M_Machine_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close, items));
     1614    actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_SaveState, items));
     1615    actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items));
     1616    actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_PowerOff, items));
    16061617
    16071618    /* Start/Show action is deremined by 1st item: */
    16081619    if (pItem && pItem->accessible())
    16091620    {
    1610         gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1);
    1611         gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1);
     1621        actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1);
     1622        actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1);
    16121623    }
    16131624    else
    16141625    {
    1615         gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(0);
    1616         gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(0);
     1626        actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(0);
     1627        actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(0);
    16171628    }
    16181629
     
    16231634            pFirstStartedAction = pSelectedItem;
    16241635    /* Update the Pause/Resume action appearance: */
    1625     gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(true);
    1626     gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->setChecked(pFirstStartedAction && UIVMItem::isItemPaused(pFirstStartedAction));
    1627     gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->retranslateUi();
    1628     gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(false);
     1636    actionPool()->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(true);
     1637    actionPool()->action(UIActionIndexST_M_Group_T_Pause)->setChecked(pFirstStartedAction && UIVMItem::isItemPaused(pFirstStartedAction));
     1638    actionPool()->action(UIActionIndexST_M_Group_T_Pause)->retranslateUi();
     1639    actionPool()->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(false);
    16291640
    16301641#ifdef QT_MAC_USE_COCOA
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h

    r52155 r52202  
    3838class UIGChooser;
    3939class UIGDetails;
     40class UIActionPool;
    4041class QStackedWidget;
    4142
     
    5253                     Qt::WindowFlags flags = Qt::Window);
    5354    ~UISelectorWindow();
     55
     56    /** Returns the action-pool instance. */
     57    UIActionPool* actionPool() const { return m_pActionPool; }
    5458
    5559private slots:
     
    132136    void saveSettings();
    133137    void cleanupConnections();
     138    void cleanupMenuBar();
    134139
    135140    /* Helpers: Current item stuff: */
     
    156161    bool m_fPolished : 1;
    157162    bool m_fWarningAboutInaccessibleMediumShown : 1;
     163
     164    /** Holds the action-pool instance. */
     165    UIActionPool *m_pActionPool;
    158166
    159167    /* Central splitter window: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.cpp

    r44051 r52202  
    2626#include "UIGChooserModel.h"
    2727#include "UIGChooserView.h"
     28#include "UISelectorWindow.h"
    2829#include "VBoxGlobal.h"
    2930
    30 UIGChooser::UIGChooser(QWidget *pParent)
     31UIGChooser::UIGChooser(UISelectorWindow *pParent)
    3132    : QWidget(pParent)
     33    , m_pSelectorWindow(pParent)
    3234    , m_pMainLayout(0)
    3335    , m_pChooserModel(0)
     
    5860    /* Save: */
    5961    save();
     62}
     63
     64UIActionPool* UIGChooser::actionPool() const
     65{
     66    return selector()->actionPool();
    6067}
    6168
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooser.h

    r43514 r52202  
    2929class UIVMItem;
    3030class QVBoxLayout;
     31class UISelectorWindow;
     32class UIActionPool;
    3133class UIGChooserModel;
    3234class UIGChooserView;
     
    5658
    5759    /* Constructor/destructor: */
    58     UIGChooser(QWidget *pParent);
     60    UIGChooser(UISelectorWindow *pParent);
    5961    ~UIGChooser();
     62
     63    /** Returns the selector-window reference. */
     64    UISelectorWindow* selector() const { return m_pSelectorWindow; }
     65    /** Returns the action-pool reference. */
     66    UIActionPool* actionPool() const;
    6067
    6168    /* API: Current-item stuff: */
     
    8491    void save();
    8592
     93    /** Holds the selector-window reference. */
     94    UISelectorWindow* m_pSelectorWindow;
     95
    8696    /* Variables: */
    8797    QVBoxLayout *m_pMainLayout;
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp

    r50932 r52202  
    115115}
    116116
     117UIActionPool* UIGChooserItem::actionPool() const
     118{
     119    return model()->actionPool();
     120}
     121
    117122UIGChooserItem* UIGChooserItem::parentItem() const
    118123{
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h

    r50932 r52202  
    3131
    3232/* Forward declaration: */
     33class UIActionPool;
    3334class UIGChooserModel;
    3435class UIGChooserItemGroup;
     
    8788    /* API: Model stuff: */
    8889    UIGChooserModel* model() const;
     90
     91    /** Returns the action-pool reference. */
     92    UIActionPool* actionPool() const;
    8993
    9094    /* API: Parent stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp

    r52155 r52202  
    11411141
    11421142    connect(m_pSettingsButton, SIGNAL(sigButtonClicked()),
    1143             gpActionPool->action(UIActionIndexST_M_Machine_S_Settings), SLOT(trigger()),
     1143            actionPool()->action(UIActionIndexST_M_Machine_S_Settings), SLOT(trigger()),
    11441144            Qt::QueuedConnection);
    11451145    connect(m_pStartButton, SIGNAL(sigButtonClicked()),
    1146             gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow), SLOT(trigger()),
     1146            actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow), SLOT(trigger()),
    11471147            Qt::QueuedConnection);
    11481148    connect(m_pPauseButton, SIGNAL(sigButtonClicked()),
    1149             gpActionPool->action(UIActionIndexST_M_Machine_T_Pause), SLOT(trigger()),
     1149            actionPool()->action(UIActionIndexST_M_Machine_T_Pause), SLOT(trigger()),
    11501150            Qt::QueuedConnection);
    11511151    connect(m_pCloseButton, SIGNAL(sigButtonClicked()),
    1152             gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SLOT(trigger()),
     1152            actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SLOT(trigger()),
    11531153            Qt::QueuedConnection);
    11541154}
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r52155 r52202  
    3030
    3131/* GUI includes: */
     32#include "UIGChooser.h"
    3233#include "UIGChooserModel.h"
    3334#include "UIGChooserItemGroup.h"
     
    5253typedef QSet<QString> UIStringSet;
    5354
    54 UIGChooserModel::UIGChooserModel(QObject *pParent)
     55UIGChooserModel::UIGChooserModel(UIGChooser *pParent)
    5556    : QObject(pParent)
     57    , m_pChooser(pParent)
    5658    , m_pScene(0)
    5759    , m_fSliding(false)
     
    133135    makeSureGroupDefinitionsSaveIsFinished();
    134136    makeSureGroupOrdersSaveIsFinished();
     137}
     138
     139UIActionPool* UIGChooserModel::actionPool() const
     140{
     141    return chooser()->actionPool();
    135142}
    136143
     
    530537void UIGChooserModel::activateMachineItem()
    531538{
    532     gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->activate(QAction::Trigger);
     539    actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow)->activate(QAction::Trigger);
    533540}
    534541
     
    699706{
    700707    /* Check if action is enabled: */
    701     if (!gpActionPool->action(UIActionIndexST_M_Group_S_Rename)->isEnabled())
     708    if (!actionPool()->action(UIActionIndexST_M_Group_S_Rename)->isEnabled())
    702709        return;
    703710
     
    713720{
    714721    /* Check if action is enabled: */
    715     if (!gpActionPool->action(UIActionIndexST_M_Group_S_Sort)->isEnabled())
     722    if (!actionPool()->action(UIActionIndexST_M_Group_S_Sort)->isEnabled())
    716723        return;
    717724
     
    727734{
    728735    /* Check if action is enabled: */
    729     if (!gpActionPool->action(UIActionIndexST_M_Group_S_Remove)->isEnabled())
     736    if (!actionPool()->action(UIActionIndexST_M_Group_S_Remove)->isEnabled())
    730737        return;
    731738
     
    803810{
    804811    /* Check if action is enabled: */
    805     if (!gpActionPool->action(UIActionIndexST_M_Machine_S_New)->isEnabled())
     812    if (!actionPool()->action(UIActionIndexST_M_Machine_S_New)->isEnabled())
    806813        return;
    807814
     
    827834{
    828835    /* Check if action is enabled: */
    829     if (!gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)->isEnabled())
     836    if (!actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup)->isEnabled())
    830837        return;
    831838
     
    902909{
    903910    /* Check if action is enabled: */
    904     if (!gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent)->isEnabled())
     911    if (!actionPool()->action(UIActionIndexST_M_Machine_S_SortParent)->isEnabled())
    905912        return;
    906913
     
    916923{
    917924    /* Check if action is enabled: */
    918     if (!gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)->isEnabled())
     925    if (!actionPool()->action(UIActionIndexST_M_Group_S_Refresh)->isEnabled())
    919926        return;
    920927
     
    957964{
    958965    /* Check if action is enabled: */
    959     if (!gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)->isEnabled())
     966    if (!actionPool()->action(UIActionIndexST_M_Machine_S_Remove)->isEnabled())
    960967        return;
    961968
     
    11261133    /* Context menu for group(s): */
    11271134    m_pContextMenuGroup = new QMenu;
    1128     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_New));
    1129     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Add));
     1135    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_New));
     1136    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Add));
    11301137    m_pContextMenuGroup->addSeparator();
    1131     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Rename));
    1132     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Remove));
     1138    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Rename));
     1139    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Remove));
    11331140    m_pContextMenuGroup->addSeparator();
    1134     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow));
    1135     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_T_Pause));
    1136     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Reset));
    1137     m_pContextMenuGroup->addMenu(gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu());
     1141    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_P_StartOrShow));
     1142    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_T_Pause));
     1143    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Reset));
     1144    m_pContextMenuGroup->addMenu(actionPool()->action(UIActionIndexST_M_Group_M_Close)->menu());
    11381145    m_pContextMenuGroup->addSeparator();
    1139     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Discard));
    1140     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Refresh));
     1146    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Discard));
     1147    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Refresh));
    11411148    m_pContextMenuGroup->addSeparator();
    1142     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager));
    1143     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut));
     1149    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_ShowInFileManager));
     1150    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_CreateShortcut));
    11441151    m_pContextMenuGroup->addSeparator();
    1145     m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Sort));
     1152    m_pContextMenuGroup->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Sort));
    11461153
    11471154    /* Context menu for machine(s): */
    11481155    m_pContextMenuMachine = new QMenu;
    1149     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Settings));
    1150     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Clone));
    1151     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Remove));
    1152     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup));
     1156    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings));
     1157    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Clone));
     1158    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Remove));
     1159    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup));
    11531160    m_pContextMenuMachine->addSeparator();
    1154     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow));
    1155     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_T_Pause));
    1156     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Reset));
    1157     m_pContextMenuMachine->addMenu(gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu());
     1161    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_P_StartOrShow));
     1162    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_T_Pause));
     1163    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Reset));
     1164    m_pContextMenuMachine->addMenu(actionPool()->action(UIActionIndexST_M_Machine_M_Close)->menu());
    11581165    m_pContextMenuMachine->addSeparator();
    1159     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Discard));
    1160     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndex_Simple_LogDialog));
    1161     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh));
     1166    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard));
     1167    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndex_Simple_LogDialog));
     1168    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh));
    11621169    m_pContextMenuMachine->addSeparator();
    1163     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager));
    1164     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut));
     1170    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_ShowInFileManager));
     1171    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_CreateShortcut));
    11651172    m_pContextMenuMachine->addSeparator();
    1166     m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent));
     1173    m_pContextMenuMachine->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_SortParent));
    11671174
    11681175    connect(m_pContextMenuGroup, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*)));
    11691176    connect(m_pContextMenuMachine, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*)));
    11701177
    1171     connect(gpActionPool->action(UIActionIndexST_M_Group_S_New), SIGNAL(triggered()),
     1178    connect(actionPool()->action(UIActionIndexST_M_Group_S_New), SIGNAL(triggered()),
    11721179            this, SLOT(sltCreateNewMachine()));
    1173     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_New), SIGNAL(triggered()),
     1180    connect(actionPool()->action(UIActionIndexST_M_Machine_S_New), SIGNAL(triggered()),
    11741181            this, SLOT(sltCreateNewMachine()));
    1175     connect(gpActionPool->action(UIActionIndexST_M_Group_S_Rename), SIGNAL(triggered()),
     1182    connect(actionPool()->action(UIActionIndexST_M_Group_S_Rename), SIGNAL(triggered()),
    11761183            this, SLOT(sltEditGroupName()));
    1177     connect(gpActionPool->action(UIActionIndexST_M_Group_S_Remove), SIGNAL(triggered()),
     1184    connect(actionPool()->action(UIActionIndexST_M_Group_S_Remove), SIGNAL(triggered()),
    11781185            this, SLOT(sltUngroupSelectedGroup()));
    1179     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Remove), SIGNAL(triggered()),
     1186    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Remove), SIGNAL(triggered()),
    11801187            this, SLOT(sltRemoveSelectedMachine()));
    1181     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup), SIGNAL(triggered()),
     1188    connect(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup), SIGNAL(triggered()),
    11821189            this, SLOT(sltGroupSelectedMachines()));
    1183     connect(gpActionPool->action(UIActionIndexST_M_Group_S_Refresh), SIGNAL(triggered()),
     1190    connect(actionPool()->action(UIActionIndexST_M_Group_S_Refresh), SIGNAL(triggered()),
    11841191            this, SLOT(sltPerformRefreshAction()));
    1185     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh), SIGNAL(triggered()),
     1192    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh), SIGNAL(triggered()),
    11861193            this, SLOT(sltPerformRefreshAction()));
    1187     connect(gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent), SIGNAL(triggered()),
     1194    connect(actionPool()->action(UIActionIndexST_M_Machine_S_SortParent), SIGNAL(triggered()),
    11881195            this, SLOT(sltSortParentGroup()));
    1189     connect(gpActionPool->action(UIActionIndexST_M_Group_S_Sort), SIGNAL(triggered()),
     1196    connect(actionPool()->action(UIActionIndexST_M_Group_S_Sort), SIGNAL(triggered()),
    11901197            this, SLOT(sltSortGroup()));
    11911198
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h

    r48310 r52202  
    4343class QPaintDevice;
    4444class UIVMItem;
     45class UIGChooser;
     46class UIActionPool;
    4547class UIGChooserHandlerMouse;
    4648class UIGChooserHandlerKeyboard;
     
    8789
    8890    /* Constructor/destructor: */
    89     UIGChooserModel(QObject *pParent);
     91    UIGChooserModel(UIGChooser *pParent);
    9092    ~UIGChooserModel();
    9193
     
    9395    void prepare();
    9496    void cleanup();
     97
     98    /** Returns the chooser reference. */
     99    UIGChooser* chooser() const { return m_pChooser; }
     100    /** Returns the action-pool reference. */
     101    UIActionPool* actionPool() const;
    95102
    96103    /* API: Scene stuff: */
     
    272279    void makeSureGroupOrdersSaveIsFinished();
    273280
     281    /** Holds the chooser reference. */
     282    UIGChooser *m_pChooser;
     283
    274284    /* Variables: */
    275285    QGraphicsScene *m_pScene;
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