VirtualBox

Changeset 68265 in vbox for trunk


Ignore:
Timestamp:
Aug 3, 2017 7:39:41 AM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8847: Refresh host-only networks action stub (required to add NLS now to make it possible to implement this stuff after release).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp

    r68264 r68265  
    198198    , m_pActionRemove(0)
    199199    , m_pActionDetails(0)
     200    , m_pActionRefresh(0)
    200201    , m_pTreeWidget(0)
    201202    , m_pDetailsWidget(0)
     
    229230        m_pActionDetails->setToolTip(UIHostNetworkManager::tr("Open Host-only Network Properties (%1)").arg(m_pActionDetails->shortcut().toString()));
    230231        m_pActionDetails->setStatusTip(UIHostNetworkManager::tr("Open pane with selected host-only network properties"));
     232    }
     233    if (m_pActionRefresh)
     234    {
     235        m_pActionRefresh->setText(UIHostNetworkManager::tr("&Refresh..."));
     236        m_pActionRefresh->setToolTip(UIHostNetworkManager::tr("Refresh Host-only Networks (%1)").arg(m_pActionRefresh->shortcut().toString()));
     237        m_pActionRefresh->setStatusTip(UIHostNetworkManager::tr("Refresh the list of host-only networks"));
    231238    }
    232239
     
    537544}
    538545
     546void UIHostNetworkManagerWidget::sltRefreshHostNetworks()
     547{
     548    // Not implemented.
     549    AssertMsgFailed(("Not implemented!"));
     550}
     551
    539552void UIHostNetworkManagerWidget::sltAdjustTreeWidget()
    540553{
     
    749762    }
    750763
     764    /* Create 'Refresh' action: */
     765    m_pActionRefresh = new QAction(this);
     766    AssertPtrReturnVoid(m_pActionRefresh);
     767    {
     768        /* Configure 'Details' action: */
     769        m_pActionRefresh->setCheckable(true);
     770        m_pActionRefresh->setShortcut(QKeySequence(QKeySequence::Refresh));
     771        m_pActionRefresh->setIcon(UIIconPool::iconSetFull(":/refresh_22px.png",
     772                                                          ":/refresh_16px.png",
     773                                                          ":/refresh_disabled_22px.png",
     774                                                          ":/refresh_disabled_16px.png"));
     775        connect(m_pActionRefresh, &QAction::toggled, this, &UIHostNetworkManagerWidget::sltRefreshHostNetworks);
     776    }
     777
    751778    /* Prepare menu: */
    752779    prepareMenu();
     
    766793        if (m_pActionDetails)
    767794            m_pMenu->addAction(m_pActionDetails);
     795//        if (m_pActionRefresh)
     796//            m_pMenu->addAction(m_pActionRefresh);
    768797    }
    769798}
     
    811840        if (m_pActionDetails)
    812841            m_pToolBar->addAction(m_pActionDetails);
     842//        if (m_pActionDetails && m_pActionRefresh)
     843//            m_pToolBar->addSeparator();
     844//        if (m_pActionRefresh)
     845//            m_pToolBar->addAction(m_pActionRefresh);
    813846#ifdef VBOX_WS_MAC
    814847        /* Check whether we are embedded into a stack: */
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.h

    r67811 r68265  
    9797        /** Handles command to make host network details @a fVisible. */
    9898        void sltToggleHostNetworkDetailsVisibility(bool fVisible);
     99        /** Handles command to refresh host networks. */
     100        void sltRefreshHostNetworks();
    99101    /** @} */
    100102
     
    168170        /** Holds the Details action instance. */
    169171        QAction   *m_pActionDetails;
     172        /** Holds the Refresh action instance. */
     173        QAction   *m_pActionRefresh;
    170174    /** @} */
    171175
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