- Timestamp:
- Apr 29, 2008 3:48:12 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/ui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui
r8155 r8474 240 240 <property name="name"> 241 241 <cstring>cbHostInterfaceName</cstring> 242 </property> 243 <property name="editable"> 244 <bool>true</bool> 245 </property> 246 <property name="insertionPolicy"> 247 <enum>NoInsertion</enum> 242 248 </property> 243 249 <property name="whatsThis" stdset="0"> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui.h
r8452 r8474 87 87 KNetworkAttachmentType type = 88 88 vboxGlobal().toNetworkAttachmentType (cbNetworkAttachment->currentText()); 89 if (!grbEnabled->isChecked()) 90 return CheckPage_Ok; 91 else 89 92 #if defined Q_WS_WIN 90 93 if (type == KNetworkAttachmentType_HostInterface && … … 112 115 /* load current list items */ 113 116 if (aList.count()) 114 {115 117 cbHostInterfaceName->insertStringList (aList); 116 int index = aList.findIndex (currentListItemName); 117 if (index != -1) 118 cbHostInterfaceName->setCurrentItem (index); 119 } 120 else 121 { 118 else 122 119 cbHostInterfaceName->insertItem (aNillItem); 120 121 if (currentListItemName.isEmpty() || currentListItemName == aNillItem) 123 122 cbHostInterfaceName->setCurrentItem (0); 124 } 123 else 124 cbHostInterfaceName->setCurrentText (currentListItemName); 125 125 #else 126 126 NOREF (aList); … … 162 162 163 163 #if defined Q_WS_WIN 164 QString name = adapter.GetHostInterface(); 165 for (int index = 0; index < cbHostInterfaceName->count(); ++ index) 166 if (cbHostInterfaceName->text (index) == name) 167 { 168 cbHostInterfaceName->setCurrentItem (index); 169 break; 170 } 171 if (cbHostInterfaceName->currentItem() == -1) 172 cbHostInterfaceName->setCurrentText (name); 164 if (!adapter.GetHostInterface().isEmpty()) 165 cbHostInterfaceName->setCurrentText (adapter.GetHostInterface()); 173 166 #else 174 167 leHostInterface->setText (adapter.GetHostInterface()); … … 249 242 { 250 243 #if defined Q_WS_WIN 251 if (!aOn) 252 { 253 cbNetworkAttachment->setCurrentItem (0); 254 cbNetworkAttachment_activated (cbNetworkAttachment->currentText()); 255 } 244 cbNetworkAttachment_activated (cbNetworkAttachment->currentText()); 256 245 #else 257 246 NOREF (aOn); … … 261 250 void VBoxVMNetworkSettings::cbNetworkAttachment_activated (const QString &aString) 262 251 { 263 bool enableHostIf = vboxGlobal().toNetworkAttachmentType (aString) == 252 bool enableHostIf = grbEnabled->isChecked() && 253 vboxGlobal().toNetworkAttachmentType (aString) == 264 254 KNetworkAttachmentType_HostInterface; 265 bool enableIntNet = vboxGlobal().toNetworkAttachmentType (aString) == 255 bool enableIntNet = grbEnabled->isChecked() && 256 vboxGlobal().toNetworkAttachmentType (aString) == 266 257 KNetworkAttachmentType_Internal; 267 258 #if defined Q_WS_WIN
Note:
See TracChangeset
for help on using the changeset viewer.