mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-25 06:03:55 +03:00
details: Small direct interface tweaks
- List nicer names for mode in the UI - Fix a label spacing issue if expanding the UI - Don't set mode = "" for non direct interfaces
This commit is contained in:
parent
37ab864cfb
commit
7d5acf4b86
@ -1837,10 +1837,9 @@ class vmmDetails(vmmGObjectUI):
|
||||
net_bridge = self.window.get_widget("network-bridge")
|
||||
nettype, source = uihelpers.get_network_selection(net_list, net_bridge)
|
||||
|
||||
source_mode = None
|
||||
if (nettype == "direct"):
|
||||
source_mode = self.get_combo_label_value("network-source-mode")
|
||||
else:
|
||||
source_mode = ""
|
||||
|
||||
model = self.get_combo_label_value("network-model")
|
||||
|
||||
|
@ -543,9 +543,10 @@ class vmmDomain(vmmLibvirtObject):
|
||||
if not newtype:
|
||||
return
|
||||
editdev.source = None
|
||||
|
||||
editdev.type = newtype
|
||||
editdev.source = newsource
|
||||
editdev.source_mode = newmode
|
||||
editdev.source_mode = newmode or None
|
||||
return self._redefine_device(change, devobj)
|
||||
def define_network_model(self, devobj, newmodel):
|
||||
def change(editdev):
|
||||
|
@ -209,10 +209,10 @@ def populate_source_mode_combo(vm, combo):
|
||||
|
||||
# [xml value, label]
|
||||
model.append([None, _("")])
|
||||
model.append(["vepa", "vepa"])
|
||||
model.append(["bridge", "bridge"])
|
||||
model.append(["private", "private"])
|
||||
model.append(["passthrough", "passthrough"])
|
||||
model.append(["vepa", "VEPA"])
|
||||
model.append(["bridge", "Bridge"])
|
||||
model.append(["private", "Private"])
|
||||
model.append(["passthrough", "Passthrough"])
|
||||
|
||||
def build_netmodel_combo(vm, combo):
|
||||
dev_model = gtk.ListStore(str, str)
|
||||
|
@ -3721,7 +3721,6 @@ I/O:</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="network-source-mode-box">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="network-source-mode-combo">
|
||||
<property name="visible">True</property>
|
||||
@ -3762,6 +3761,7 @@ I/O:</property>
|
||||
<packing>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
Loading…
x
Reference in New Issue
Block a user