mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
details: Add auto USB redirection support in console viewer
Add "Redirect USB device" option in console viewer. Initialize and embed UsbDeviceWidget object from SpiceClientGtk into a dialog to let user choose available USB devices for redirection. Throw an error message if USB connection failed. Auto-redirection is enable by default. There is race between creating usbredir channel and calling has_usb_redirection() when initializing spice session like happening on virt-viwer. So adding a new signal handler on_details_menu_virtual_manager_activate() to recheck the status of usbredir channel, set "Redirect USB device" option sensitive if it is availiable.
This commit is contained in:
committed by
Cole Robinson
parent
d6fc079ae8
commit
88f2d1abe0
@@ -184,6 +184,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Virtual _Machine</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_details_menu_virtual_manager_activate" swapped="no"/>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="virtual_machine1_menu">
|
||||
<property name="can_focus">False</property>
|
||||
@@ -331,6 +332,15 @@
|
||||
<signal name="activate" handler="on_details_menu_screenshot_activate" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="details-menu-usb-redirection">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_Redirect USB device</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_details_menu_usb_redirection" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
Reference in New Issue
Block a user