VirtualBox

Changeset 17217 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Feb 27, 2009 5:13:14 PM (16 years ago)
Author:
vboxsync
Message:

make VBOX_WITH_NETFLT= compile on Linux hosts again

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

Legend:

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

    r16927 r17217  
    7171    void naTypeChanged (const QString &aString);
    7272    void genMACClicked();
    73 #if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)
    74     void tapSetupClicked();
    75     void tapTerminateClicked();
    76 #endif
    7773
    7874private:
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetwork.cpp

    r17115 r17217  
    6666#if !defined (Q_WS_X11) || defined (VBOX_WITH_NETFLT)
    6767    setTapVisible (false);
    68 #else
    69     /* Setup iconsets */
    70     mTbSetup_x11->setIcon (VBoxGlobal::iconSet (":/select_file_16px.png",
    71                                                 ":/select_file_dis_16px.png"));
    72     mTbTerminate_x11->setIcon (VBoxGlobal::iconSet (":/select_file_16px.png",
    73                                                     ":/select_file_dis_16px.png"));
    7468#endif
    7569
     
    116110#if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)
    117111    mLeInterface_x11->setText (aAdapter.GetHostInterface());
    118     mLeSetup_x11->setText (aAdapter.GetTAPSetupApplication());
    119     mLeTerminate_x11->setText (aAdapter.GetTAPTerminateApplication());
    120112#endif
    121113}
     
    168160        QString iface = mLeInterface_x11->text();
    169161        mAdapter.SetHostInterface (iface.isEmpty() ? QString::null : iface);
    170         QString setup = mLeSetup_x11->text();
    171         mAdapter.SetTAPSetupApplication (setup.isEmpty() ? QString::null : setup);
    172         QString term = mLeTerminate_x11->text();
    173         mAdapter.SetTAPTerminateApplication (term.isEmpty() ? QString::null : term);
    174162#endif
    175163    }
     
    200188             mValidator, SLOT (revalidate()));
    201189    connect (mPbMAC, SIGNAL (clicked()), this, SLOT (genMACClicked()));
    202 #if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)
    203     connect (mTbSetup_x11, SIGNAL (clicked()), this, SLOT (tapSetupClicked()));
    204     connect (mTbTerminate_x11, SIGNAL (clicked()), this, SLOT (tapTerminateClicked()));
    205 #endif
    206190
    207191    mValidator->revalidate();
     
    218202    setTabOrder (mPbMAC, mCbCable);
    219203    setTabOrder (mCbCable, mLeInterface_x11);
    220     setTabOrder (mLeInterface_x11, mLeSetup_x11);
    221     setTabOrder (mLeSetup_x11, mTbSetup_x11);
    222     setTabOrder (mTbSetup_x11, mLeTerminate_x11);
    223     setTabOrder (mLeTerminate_x11, mTbTerminate_x11);
    224     return mTbTerminate_x11;
     204    return mLeInterface_x11;
    225205}
    226206
     
    289269    mLeMAC->setText (mAdapter.GetMACAddress());
    290270}
    291 
    292 #if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)
    293 void VBoxVMSettingsNetwork::tapSetupClicked()
    294 {
    295     QString selected = QFileDialog::getOpenFileName (
    296         this, tr ("Select TAP setup application"), "/");
    297 
    298     if (!selected.isEmpty())
    299         mLeSetup_x11->setText (selected);
    300 }
    301 
    302 void VBoxVMSettingsNetwork::tapTerminateClicked()
    303 {
    304     QString selected = QFileDialog::getOpenFileName (
    305         this, tr ("Select TAP terminate application"), "/");
    306 
    307     if (!selected.isEmpty())
    308         mLeTerminate_x11->setText (selected);
    309 }
    310 #endif
    311271
    312272void VBoxVMSettingsNetwork::prepareComboboxes()
     
    374334    mLbInterface_x11->setEnabled (aEnabled);
    375335    mLeInterface_x11->setEnabled (aEnabled);
    376     mLbSetup_x11->setEnabled (aEnabled);
    377     mLeSetup_x11->setEnabled (aEnabled);
    378     mTbSetup_x11->setEnabled (aEnabled);
    379     mLbTerminate_x11->setEnabled (aEnabled);
    380     mLeTerminate_x11->setEnabled (aEnabled);
    381     mTbTerminate_x11->setEnabled (aEnabled);
    382336}
    383337
     
    387341    mLbInterface_x11->setVisible (aVisible);
    388342    mLeInterface_x11->setVisible (aVisible);
    389     mLbSetup_x11->setVisible (aVisible);
    390     mLeSetup_x11->setVisible (aVisible);
    391     mTbSetup_x11->setVisible (aVisible);
    392     mLbTerminate_x11->setVisible (aVisible);
    393     mLeTerminate_x11->setVisible (aVisible);
    394     mTbTerminate_x11->setVisible (aVisible);
    395343#ifdef Q_WS_MAC
    396344    /* Make sure the layout is recalculated (Important on the mac). */
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsNetwork.ui

    r12030 r17217  
    217217       </widget>
    218218      </item>
    219       <item row="7" column="0" >
    220        <widget class="QLabel" name="mLbSetup_x11" >
    221         <property name="text" >
    222          <string>&amp;Setup Application:</string>
    223         </property>
    224         <property name="alignment" >
    225          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    226         </property>
    227         <property name="buddy" >
    228          <cstring>mLeSetup_x11</cstring>
    229         </property>
    230        </widget>
    231       </item>
    232       <item row="7" column="1" >
    233        <widget class="QLineEdit" name="mLeSetup_x11" >
    234         <property name="sizePolicy" >
    235          <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
    236           <horstretch>0</horstretch>
    237           <verstretch>0</verstretch>
    238          </sizepolicy>
    239         </property>
    240         <property name="whatsThis" >
    241          <string>Displays the command executed to set up the TAP interface.</string>
    242         </property>
    243        </widget>
    244       </item>
    245       <item row="7" column="2" >
    246        <widget class="QToolButton" name="mTbSetup_x11" >
    247         <property name="whatsThis" >
    248          <string>Selects the setup application.</string>
    249         </property>
    250         <property name="autoRaise" >
    251          <bool>true</bool>
    252         </property>
    253        </widget>
    254       </item>
    255       <item row="8" column="0" >
    256        <widget class="QLabel" name="mLbTerminate_x11" >
    257         <property name="text" >
    258          <string>&amp;Terminate Application:</string>
    259         </property>
    260         <property name="alignment" >
    261          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    262         </property>
    263         <property name="buddy" >
    264          <cstring>mLeTerminate_x11</cstring>
    265         </property>
    266        </widget>
    267       </item>
    268       <item row="8" column="1" >
    269        <widget class="QLineEdit" name="mLeTerminate_x11" >
    270         <property name="sizePolicy" >
    271          <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
    272           <horstretch>0</horstretch>
    273           <verstretch>0</verstretch>
    274          </sizepolicy>
    275         </property>
    276         <property name="whatsThis" >
    277          <string>Displays the command executed to terminate the TAP interface.</string>
    278         </property>
    279        </widget>
    280       </item>
    281       <item row="8" column="2" >
    282        <widget class="QToolButton" name="mTbTerminate_x11" >
    283         <property name="whatsThis" >
    284          <string>Selects the terminate application.</string>
    285         </property>
    286         <property name="autoRaise" >
    287          <bool>true</bool>
    288         </property>
    289        </widget>
    290       </item>
    291219     </layout>
    292220    </widget>
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