mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06: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")
|
net_bridge = self.window.get_widget("network-bridge")
|
||||||
nettype, source = uihelpers.get_network_selection(net_list, net_bridge)
|
nettype, source = uihelpers.get_network_selection(net_list, net_bridge)
|
||||||
|
|
||||||
|
source_mode = None
|
||||||
if (nettype == "direct"):
|
if (nettype == "direct"):
|
||||||
source_mode = self.get_combo_label_value("network-source-mode")
|
source_mode = self.get_combo_label_value("network-source-mode")
|
||||||
else:
|
|
||||||
source_mode = ""
|
|
||||||
|
|
||||||
model = self.get_combo_label_value("network-model")
|
model = self.get_combo_label_value("network-model")
|
||||||
|
|
||||||
|
@ -543,9 +543,10 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
if not newtype:
|
if not newtype:
|
||||||
return
|
return
|
||||||
editdev.source = None
|
editdev.source = None
|
||||||
|
|
||||||
editdev.type = newtype
|
editdev.type = newtype
|
||||||
editdev.source = newsource
|
editdev.source = newsource
|
||||||
editdev.source_mode = newmode
|
editdev.source_mode = newmode or None
|
||||||
return self._redefine_device(change, devobj)
|
return self._redefine_device(change, devobj)
|
||||||
def define_network_model(self, devobj, newmodel):
|
def define_network_model(self, devobj, newmodel):
|
||||||
def change(editdev):
|
def change(editdev):
|
||||||
|
@ -209,10 +209,10 @@ def populate_source_mode_combo(vm, combo):
|
|||||||
|
|
||||||
# [xml value, label]
|
# [xml value, label]
|
||||||
model.append([None, _("")])
|
model.append([None, _("")])
|
||||||
model.append(["vepa", "vepa"])
|
model.append(["vepa", "VEPA"])
|
||||||
model.append(["bridge", "bridge"])
|
model.append(["bridge", "Bridge"])
|
||||||
model.append(["private", "private"])
|
model.append(["private", "Private"])
|
||||||
model.append(["passthrough", "passthrough"])
|
model.append(["passthrough", "Passthrough"])
|
||||||
|
|
||||||
def build_netmodel_combo(vm, combo):
|
def build_netmodel_combo(vm, combo):
|
||||||
dev_model = gtk.ListStore(str, str)
|
dev_model = gtk.ListStore(str, str)
|
||||||
|
@ -3721,7 +3721,6 @@ I/O:</property>
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="network-source-mode-box">
|
<widget class="GtkHBox" id="network-source-mode-box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="spacing">6</property>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkComboBox" id="network-source-mode-combo">
|
<widget class="GtkComboBox" id="network-source-mode-combo">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -3762,6 +3761,7 @@ I/O:</property>
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">3</property>
|
||||||
<property name="bottom_attach">4</property>
|
<property name="bottom_attach">4</property>
|
||||||
|
<property name="x_options">GTK_FILL</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
Reference in New Issue
Block a user