VirtualBox

Changeset 83059 in vbox


Ignore:
Timestamp:
Feb 12, 2020 1:27:13 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Separate VM details toolbar representation for the cases when single group item was selected or not.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp

    r82968 r83059  
    396396    virtual void retranslateUi() /* override */
    397397    {
     398        /// @todo replace that one with separate "New" before 6.2
     399        setIconText(QApplication::translate("UIActionPool", "&New...").remove('.'));
    398400        setName(QApplication::translate("UIActionPool", "&New Machine..."));
    399401        setStatusTip(QApplication::translate("UIActionPool", "Create new virtual machine"));
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r83055 r83059  
    5050    , m_pSlidingAnimation(0)
    5151    , m_pPaneTools(0)
     52    , m_fSingleGroupSelected(false)
    5253{
    5354    prepare();
     
    248249    /* If that was machine or group item selected: */
    249250    if (isMachineItemSelected() || isGroupItemSelected())
     251    {
     252        /* Recache current item info: */
    250253        recacheCurrentItemInformation();
     254
     255        /* Update toolbar if we are switching beween single group item and rest of possible items: */
     256        if (m_fSingleGroupSelected != isSingleGroupSelected())
     257            updateToolbar();
     258    }
     259
     260    /* Remember whether single group item was selected: */
     261    m_fSingleGroupSelected = isSingleGroupSelected();
    251262}
    252263
     
    615626                case UIToolType_Details:
    616627                {
    617                     m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_New));
    618                     m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings));
    619                     m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard));
    620                     m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow));
     628                    if (isSingleGroupSelected())
     629                    {
     630                        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Group_S_New));
     631                        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Group_S_Discard));
     632                        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow));
     633                    }
     634                    else
     635                    {
     636                        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_New));
     637                        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Settings));
     638                        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_S_Discard));
     639                        m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow));
     640                    }
    621641                    break;
    622642                }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r82968 r83059  
    215215    /** Holds the Tools-pane instance. */
    216216    UITools            *m_pPaneTools;
     217
     218    /** Holds whether last time single group item was selected exclusively. */
     219    bool  m_fSingleGroupSelected;
    217220};
    218221
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