[gnome-boxes] Hide USB devices from properties when usbredir is disabled



commit 977ed1d393cd811c9c9ab32d7a5bedfac4af501f
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Mon Mar 4 12:03:27 2013 +0100

    Hide USB devices from properties when usbredir is disabled
    
    We currently show USB devices to be redirected in the 'devices'
    tab of boxes properties even when Boxes was compiled without
    --enable-usbredir. When trying to use such a device on a VM without
    USB redirection support, the redirection would just fail with an
    error message with no way for the user to fix it.
    Showing the devices in this case is unintended, so let's hide them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695114

 src/spice-display.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/spice-display.vala b/src/spice-display.vala
index 458b1dd..ba4b6af 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -273,7 +273,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
             break;
 
         case PropertiesPage.DEVICES:
-            if (!(PropertyCreationFlag.NO_USB in flags)) {
+            if (!(PropertyCreationFlag.NO_USB in flags) && Config.HAVE_USBREDIR) {
                 var toggle = new Gtk.Switch ();
                 gtk_session.bind_property ("auto-usbredir", toggle, "active",
                                            BindingFlags.BIDIRECTIONAL | BindingFlags.SYNC_CREATE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]