Commit Graph

10 Commits

Author SHA1 Message Date
Thomas Lamprecht
17f6a3f6f4 ui: vm/usbedit: don't use getUSBValue to avoid possible duplicate "usb3"
As getUSBValue() always added the "usb3" property if the selected
device was recognized as USB3. But we can now also pass such a device
as USB2 so lift this restriction - which also fixes a bug for USB3
selected devices with the USB3 checkbox set.

The solution also avoids the me.down query, which is nice too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 17:08:08 +02:00
Thomas Lamprecht
2e8f031f99 ui: vm/usbedit: code & indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 10:01:27 +02:00
Thomas Lamprecht
7c72eb5112 ui: vm/usbedit: cleanup and refactor usb selector change
split the long ternary operation into a common if/else, to make it
readable.

Also, remove the usb3field.isDisabled check as:
1. we do not disable it anywhere anymore
2. if we would, it makes sense to do this anyhow

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 08:42:25 +02:00
Thomas Lamprecht
4292a318ee ui: vm/usbedit: use simple bind for radio button changes
reduces code and is more expressive

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 08:18:15 +02:00
Thomas Lamprecht
410313f8b2 ui: vm/usbedit: omit usb3 changes for spice completely
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 08:17:56 +02:00
Aaron Lauterer
4d51f6572b usb: Enable USB3 for Spice USB passthrough
Instead of having two times the check if the USB3 setting needs to be
added to the config string it is now checked at one place only.

If USB3 is checked for a non USB3 device it will be attached to the USB2
root hub of the xhci controller.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-23 07:44:57 +02:00
Thomas Lamprecht
d49d0443b8 ui: use cbind to make usb input panel static
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-05-18 15:39:54 +02:00
Thomas Lamprecht
ef4ef788d5 use InputPanel from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
9fccc702ec use windowEdit from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
f46721af8e add usbselector and usb edit window for qemu
the edit window has 3 radiobuttons (spice,device,port)

and a checkbox for usb3 (which gets disabled and checked
if you choose a usb3 device)

also it makes use of the help feature

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:57:56 +02:00