VirtualBox

Changeset 16090 in vbox


Ignore:
Timestamp:
Jan 20, 2009 4:48:28 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
41800
Message:

FE/Qt4: 3512: List of hostif should be disabled if network type != hostif. Host Interfaces list have to be re-enabled/re-disabled on network attachment type changing and adapter page switching.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsNetwork.h

    r11871 r16090  
    161161
    162162    void updateNetworksList();
     163#if defined (VBOX_WITH_NETFLT)
     164    void updateInterfaceList();
     165#endif
    163166#if defined (Q_WS_WIN) || defined (VBOX_WITH_NETFLT)
    164167    void onCurrentPageChanged (int);
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsNetwork.cpp

    r15600 r16090  
    760760
    761761        /* Setup connections */
     762#if defined (VBOX_WITH_NETFLT)
     763        connect (page->mCbNAType, SIGNAL (activated (int)),
     764                 this, SLOT (updateInterfaceList()));
     765#endif
    762766        connect (page->mCbNetwork, SIGNAL (editTextChanged (const QString&)),
    763767                 this, SLOT (updateNetworksList()));
     
    879883}
    880884
     885#if defined (VBOX_WITH_NETFLT)
     886void VBoxVMSettingsNetworkPage::updateInterfaceList()
     887{
     888    VBoxVMSettingsNetwork *page =
     889        static_cast <VBoxVMSettingsNetwork*> (mTwAdapters->currentWidget());
     890
     891    bool isHostInterfaceAttached = vboxGlobal().toNetworkAttachmentType (
     892        page->mCbNAType->currentText()) == KNetworkAttachmentType_HostInterface;
     893
     894    mNIList->setEnabled (isHostInterfaceAttached);
     895}
     896#endif
     897
    881898#if defined (Q_WS_WIN) || defined (VBOX_WITH_NETFLT)
    882899void VBoxVMSettingsNetworkPage::onCurrentPageChanged (int aIndex)
     
    886903    Assert (page);
    887904    mNIList->setCurrentInterface (page->interfaceName());
     905
     906#if defined (VBOX_WITH_NETFLT)
     907    updateInterfaceList();
     908#endif
    888909}
    889910
Note: See TracChangeset for help on using the changeset viewer.

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