VirtualBox

Ignore:
Timestamp:
Oct 26, 2018 2:50:02 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9230: Cloud Profile Manager: Hide Cloud Profile Manager if valid ExtPack is not present.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r75093 r75102  
    6363
    6464/* COM includes: */
     65# include "CExtPack.h"
     66# include "CExtPackManager.h"
    6567# include "CSystemProperties.h"
    6668
     
    13481350        return;
    13491351
     1352    /* Check if Ext Pack is ready, some of actions my depend on it: */
     1353    CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName);
     1354    const bool fExtPackAccessible = !extPack.isNull() && extPack.GetUsable();
     1355
    13501356    /* The Application / 'File' menu contents is very different depending on host type. */
    13511357
     
    13811387    pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager));
    13821388    /* 'Show Cloud Profile Manager' action goes to 'File' menu: */
    1383     pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
     1389    if (fExtPackAccessible)
     1390        pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
    13841391
    13851392#else /* !VBOX_WS_MAC */
     
    14001407    addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager));
    14011408    addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager));
    1402     addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
     1409    if (fExtPackAccessible)
     1410        addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
    14031411#  ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    14041412    addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager));
     
    14281436    pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager));
    14291437    /* 'Show Cloud Profile Manager' action goes to 'File' menu: */
    1430     pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
     1438    if (fExtPackAccessible)
     1439        pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
    14311440# ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    14321441    /* 'Network Access Manager' action goes to 'File' menu: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r75016 r75102  
    5151
    5252/* COM includes: */
     53# include "CExtPack.h"
     54# include "CExtPackManager.h"
    5355# include "CMachine.h"
    5456# include "CMedium.h"
     
    13301332    if (m_pContextMenuGlobal)
    13311333    {
     1334        /* Check if Ext Pack is ready, some of actions my depend on it: */
     1335        CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName);
     1336        const bool fExtPackAccessible = !extPack.isNull() && extPack.GetUsable();
     1337
    13321338#ifdef VBOX_WS_MAC
    13331339        m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndex_M_Application_S_About));
     
    13471353        m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager));
    13481354        m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager));
    1349         m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
     1355        if (fExtPackAccessible)
     1356            m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
    13501357
    13511358#else /* !VBOX_WS_MAC */
     
    13611368        m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager));
    13621369        m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager));
    1363         m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
     1370        if (fExtPackAccessible)
     1371            m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowCloudProfileManager));
    13641372# ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    13651373        m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager));
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp

    r75099 r75102  
    4747# include "UIWizardNewVM.h"
    4848
     49/* COM includes: */
     50# include "CExtPack.h"
     51# include "CExtPackManager.h"
     52
    4953#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    5054
     
    455459void UIToolsModel::prepareItems()
    456460{
     461    /* Check if Ext Pack is ready, some of actions my depend on it: */
     462    CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName);
     463    const bool fExtPackAccessible = !extPack.isNull() && extPack.GetUsable();
     464
    457465    /* Enable both classes of tools initially: */
    458466    m_statesToolsEnabled[UIToolClass_Global] = true;
     
    472480
    473481    /* Cloud: */
    474     m_items << new UIToolsItem(scene(), UIToolClass_Global, UIToolType_Cloud, tr("Cloud"),
    475                                UIIconPool::iconSet(":/cloud_profile_manager_24px.png", ":/cloud_profile_manager_disabled_24px.png"));
     482    if (fExtPackAccessible)
     483        m_items << new UIToolsItem(scene(), UIToolClass_Global, UIToolType_Cloud, tr("Cloud"),
     484                                   UIIconPool::iconSet(":/cloud_profile_manager_24px.png", ":/cloud_profile_manager_disabled_24px.png"));
    476485
    477486    /* Details: */
Note: See TracChangeset for help on using the changeset viewer.

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