addhardware: Make network model a combo entry

So users can add non-advertised models
This commit is contained in:
Cole Robinson 2015-04-09 12:58:13 -04:00
parent 058c06972e
commit 771154d104
2 changed files with 18 additions and 12 deletions

View File

@ -485,17 +485,6 @@
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="net-model">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="network-source-label-align">
<property name="visible">True</property>
@ -526,6 +515,23 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="net-model">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="has_entry">True</property>
<child internal-child="entry">
<object class="GtkEntry" id="combobox-entry3">
<property name="can_focus">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>

View File

@ -1005,7 +1005,7 @@ class vmmAddHardware(vmmGObjectUI):
# Network getters
def get_config_net_model(self):
return uiutil.get_list_selection(self.widget("net-model"), 0)
return uiutil.get_combo_entry(self.widget("net-model"))
def get_config_macaddr(self):
macaddr = None