addhardware: Remove non-spicevmc USB redir config

This is very rarely used, if at all, so it doesn't need to be in
the UI
This commit is contained in:
Cole Robinson 2018-04-24 14:16:41 -04:00
parent fd2fe1249d
commit 52b20ef40f
2 changed files with 7 additions and 86 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.2 -->
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment1">
@ -28,6 +28,9 @@
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<signal name="delete-event" handler="on_vmm_create_delete_event" swapped="no"/>
<child type="titlebar">
<placeholder/>
</child>
<child>
<object class="GtkBox" id="vbox23">
<property name="visible">True</property>
@ -1346,57 +1349,6 @@
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkBox" id="usbredir-host-box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkEntry" id="usbredir-host">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label439">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Port:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">usbredir-service</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="usbredir-service">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">adjustment1</property>
<property name="climb_rate">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3213">
<property name="visible">True</property>
@ -1411,20 +1363,6 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label438">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">_Host:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">usbredir-host</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="usbredir-list">
<property name="visible">True</property>
@ -1913,8 +1851,5 @@
</child>
</object>
</child>
<child type="titlebar">
<placeholder/>
</child>
</object>
</interface>

View File

@ -596,12 +596,11 @@ class vmmAddHardware(vmmGObjectUI):
model.clear()
# [xml value, label, conn details]
model.append(["spicevmc", _("Spice channel"), False])
model.append(["tcp", "TCP", True])
model.append(["spicevmc", _("Spice channel")])
@staticmethod
def build_redir_type_combo(vm, combo):
model = Gtk.ListStore(str, str, bool)
model = Gtk.ListStore(str, str)
combo.set_model(model)
uiutil.init_combo_text_column(combo, 1)
@ -1223,11 +1222,7 @@ class vmmAddHardware(vmmGObjectUI):
self.widget("char-mode").set_active(0)
def _change_usbredir_type(self, src):
showhost = uiutil.get_list_selection(src, column=2)
if showhost is None:
return
uiutil.set_grid_row_visible(self.widget("usbredir-host-box"),
showhost)
pass
def _change_rng(self, ignore1):
rtype = uiutil.get_list_selection(self.widget("rng-type"))
@ -1709,19 +1704,10 @@ class vmmAddHardware(vmmGObjectUI):
def _validate_page_usbredir(self):
conn = self.conn.get_backend()
stype = uiutil.get_list_selection(self.widget("usbredir-list"))
host = None
service = None
if self.widget("usbredir-host").is_visible():
host = self.widget("usbredir-host").get_text()
service = uiutil.spin_get_helper(self.widget("usbredir-service"))
try:
self._dev = DeviceRedirdev(conn)
self._dev.type = stype
if host:
self._dev.host = host
if service:
self._dev.service = service
except Exception as e:
return self.err.val_err(_("USB redirected device parameter error"),
str(e))