Changeset 75102 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 26, 2018 2:50:02 PM (6 years ago)
- 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 63 63 64 64 /* COM includes: */ 65 # include "CExtPack.h" 66 # include "CExtPackManager.h" 65 67 # include "CSystemProperties.h" 66 68 … … 1348 1350 return; 1349 1351 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 1350 1356 /* The Application / 'File' menu contents is very different depending on host type. */ 1351 1357 … … 1381 1387 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1382 1388 /* '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)); 1384 1391 1385 1392 #else /* !VBOX_WS_MAC */ … … 1400 1407 addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager)); 1401 1408 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)); 1403 1411 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1404 1412 addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager)); … … 1428 1436 pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowHostNetworkManager)); 1429 1437 /* '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)); 1431 1440 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1432 1441 /* 'Network Access Manager' action goes to 'File' menu: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r75016 r75102 51 51 52 52 /* COM includes: */ 53 # include "CExtPack.h" 54 # include "CExtPackManager.h" 53 55 # include "CMachine.h" 54 56 # include "CMedium.h" … … 1330 1332 if (m_pContextMenuGlobal) 1331 1333 { 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 1332 1338 #ifdef VBOX_WS_MAC 1333 1339 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndex_M_Application_S_About)); … … 1347 1353 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager)); 1348 1354 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)); 1350 1357 1351 1358 #else /* !VBOX_WS_MAC */ … … 1361 1368 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndexST_M_File_S_ShowVirtualMediumManager)); 1362 1369 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)); 1364 1372 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1365 1373 m_pContextMenuGlobal->addAction(actionPool()->action(UIActionIndex_M_Application_S_NetworkAccessManager)); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp
r75099 r75102 47 47 # include "UIWizardNewVM.h" 48 48 49 /* COM includes: */ 50 # include "CExtPack.h" 51 # include "CExtPackManager.h" 52 49 53 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 50 54 … … 455 459 void UIToolsModel::prepareItems() 456 460 { 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 457 465 /* Enable both classes of tools initially: */ 458 466 m_statesToolsEnabled[UIToolClass_Global] = true; … … 472 480 473 481 /* 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")); 476 485 477 486 /* Details: */
Note:
See TracChangeset
for help on using the changeset viewer.