mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-10 12:58:27 +03:00
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:
parent
30e2f314a7
commit
a213c8d9e9
@ -3013,9 +3013,12 @@ class vmmDetails(vmmGObjectUI):
|
||||
if not dev:
|
||||
return
|
||||
|
||||
self.widget("config-remove").set_sensitive(
|
||||
dev.type not in [virtinst.VirtualController.TYPE_USB,
|
||||
virtinst.VirtualController.TYPE_PCI])
|
||||
can_remove = True
|
||||
if self.vm.get_xmlobj().os.is_x86() and dev.type == "usb":
|
||||
can_remove = False
|
||||
if dev.type == "pci":
|
||||
can_remove = False
|
||||
self.widget("config-remove").set_sensitive(can_remove)
|
||||
|
||||
type_label = dev.pretty_desc()
|
||||
self.widget("controller-type").set_text(type_label)
|
||||
|
Loading…
x
Reference in New Issue
Block a user