VirtualBox

Changeset 68373 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 10, 2017 2:30:36 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8900: Selector UI: Make sure Machine tools actions and tab-bar are restricted for inaccessible VM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r68342 r68373  
    281281    m_pPaneToolsMachine->setCurrentItem(pItem);
    282282
     283    /* Update Machine tab-bar visibility */
     284    m_pTabBarMachine->setEnabled(pItem && pItem->accessible());
     285
    283286    /* If current item exists & accessible: */
    284287    if (pItem && pItem->accessible())
     
    289292            /* Make sure Details or Snapshot pane is chosen if opened: */
    290293            if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details))
    291                 m_pPaneToolsMachine->openTool(ToolTypeMachine_Details);
     294                actionPool()->action(UIActionIndexST_M_Tools_M_Machine_Details)->trigger();
    292295            else
    293296            if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Snapshots))
    294                 m_pPaneToolsMachine->openTool(ToolTypeMachine_Snapshots);
     297                actionPool()->action(UIActionIndexST_M_Tools_M_Machine_Snapshots)->trigger();
    295298        }
    296299
     
    10911094    /* Update action visibility: */
    10921095    updateActionsVisibility();
     1096
     1097    /* Make sure chosen item fetched: */
     1098    sltHandleChooserPaneIndexChange(false /* update details? */, false /* update snapshots? */);
    10931099}
    10941100
     
    11741180    setWindowTitle(strTitle);
    11751181
    1176     /* Make sure details and snapshot panes are updated: */
     1182    /* Make sure chosen item fetched: */
    11771183    sltHandleChooserPaneIndexChange(false /* update details? */, false /* update snapshots? */);
    11781184
     
    23792385    actionPool()->action(UIActionIndexST_M_Machine_T_Pause)->blockSignals(false);
    23802386
     2387    /* Enable/disable tools actions: */
     2388    actionPool()->action(UIActionIndexST_M_Tools_M_Machine)->setEnabled(isActionEnabled(UIActionIndexST_M_Tools_M_Machine, items));
     2389    actionPool()->action(UIActionIndexST_M_Tools_M_Machine_Details)->setEnabled(isActionEnabled(UIActionIndexST_M_Tools_M_Machine_Details, items));
     2390    actionPool()->action(UIActionIndexST_M_Tools_M_Machine_Snapshots)->setEnabled(isActionEnabled(UIActionIndexST_M_Tools_M_Machine_Snapshots, items));
     2391
    23812392#ifdef VBOX_WS_MAC
    23822393    // WORKAROUND:
     
    25122523        {
    25132524            return isActionEnabled(UIActionIndexST_M_Machine_M_Close, items);
     2525        }
     2526        case UIActionIndexST_M_Tools_M_Machine:
     2527        case UIActionIndexST_M_Tools_M_Machine_Details:
     2528        case UIActionIndexST_M_Tools_M_Machine_Snapshots:
     2529        {
     2530            return pItem->accessible();
    25142531        }
    25152532        default:
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