Changeset 6376 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 18, 2008 2:01:16 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/ui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui.h
r6372 r6376 135 135 #endif 136 136 Assert (cbNetworkName); 137 QString curText = cbNetworkName->currentText(); 137 138 cbNetworkName->clear(); 138 139 cbNetworkName->clearEdit(); 139 140 cbNetworkName->insertStringList (aList); 141 cbNetworkName->setCurrentText (curText); 140 142 } 141 143 -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui
r6364 r6376 3220 3220 <variable access="private">bool mAllowResetFirstRunFlag;</variable> 3221 3221 <variable access="private">bool mResetFirstRunFlag;</variable> 3222 <variable access="private">bool mLockNetworkListUpdate;</variable> 3222 3223 </variables> 3223 3224 <slots> … … 3233 3234 <slot>showVDImageManager( QUuid *id, VBoxMediaComboBox *le, QLabel *tx = NULL )</slot> 3234 3235 <slot>addNetworkAdapter( const CNetworkAdapter & )</slot> 3236 <slot>updateNetworksList()</slot> 3235 3237 <slot>addSerialPort( const CSerialPort & )</slot> 3236 3238 <slot>addParallelPort( const CParallelPort & )</slot> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
r6372 r6376 1040 1040 } 1041 1041 } 1042 mLockNetworkListUpdate = false; 1042 1043 } 1043 1044 … … 2365 2366 wval, SLOT (revalidate())); 2366 2367 connect (cbNetworkName, SIGNAL (textChanged (const QString &)), 2368 this, SLOT (updateNetworksList())); 2369 connect (cbNetworkName, SIGNAL (textChanged (const QString &)), 2367 2370 wval, SLOT (revalidate())); 2368 2371 connect (wval, SIGNAL (validityChanged (const QIWidgetValidator *)), … … 2384 2387 2385 2388 #endif 2389 } 2390 2391 void VBoxVMSettingsDlg::updateNetworksList() 2392 { 2393 if (mLockNetworkListUpdate) 2394 return; 2395 mLockNetworkListUpdate = true; 2396 2397 QStringList curList (mNetworksList); 2398 for (int index = 0; index < tbwNetwork->count(); ++ index) 2399 { 2400 VBoxVMNetworkSettings *pg = tbwNetwork->page (index) ? 2401 static_cast <VBoxVMNetworkSettings*> (tbwNetwork->page (index)) : 0; 2402 if (pg) 2403 { 2404 QComboBox *cb = 0; 2405 #if defined Q_WS_WIN 2406 cb = pg->cbInternalNetworkName_WIN; 2407 #else 2408 cb = pg->cbInternalNetworkName_X11; 2409 #endif 2410 Assert (cb); 2411 QString curText = cb->currentText(); 2412 if (!curText.isEmpty() && !curList.contains (curText)) 2413 curList << curText; 2414 } 2415 } 2416 2417 for (int index = 0; index < tbwNetwork->count(); ++ index) 2418 { 2419 VBoxVMNetworkSettings *pg = tbwNetwork->page (index) ? 2420 static_cast <VBoxVMNetworkSettings*> (tbwNetwork->page (index)) : 0; 2421 pg->loadNetworksList (curList); 2422 } 2423 2424 mLockNetworkListUpdate = false; 2386 2425 } 2387 2426
Note:
See TracChangeset
for help on using the changeset viewer.