details: Allow removing USB controllers on non-x86

It's only x86 where we are forced to have a USB controller (more or
less), so make it VM arch dependent
This commit is contained in:
Cole Robinson 2017-06-27 15:35:54 -04:00
parent 30e2f314a7
commit a213c8d9e9

View File

@ -3013,9 +3013,12 @@ class vmmDetails(vmmGObjectUI):
if not dev: if not dev:
return return
self.widget("config-remove").set_sensitive( can_remove = True
dev.type not in [virtinst.VirtualController.TYPE_USB, if self.vm.get_xmlobj().os.is_x86() and dev.type == "usb":
virtinst.VirtualController.TYPE_PCI]) can_remove = False
if dev.type == "pci":
can_remove = False
self.widget("config-remove").set_sensitive(can_remove)
type_label = dev.pretty_desc() type_label = dev.pretty_desc()
self.widget("controller-type").set_text(type_label) self.widget("controller-type").set_text(type_label)