[Spice-commits] gtk/usb-device-widget.c

Hans de Goede jwrdegoede at kemper.freedesktop.org
Thu Mar 29 08:39:36 PDT 2012


 gtk/usb-device-widget.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 3a424e64d5b86f90e3db62a33c48bbbcc9aa9268
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Thu Mar 29 17:25:17 2012 +0200

    usb-device-widget: Call set_active on the toggle_button, not the alignment
    
    Since the gnome HIG-ifying of usb-device-widget.c, the vbox contains
    alignments, which in turn contain a toggle_button, so calling
    gtk_toggle_button_set_active directly on the vbox-containers childdren is
    wrong.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

diff --git a/gtk/usb-device-widget.c b/gtk/usb-device-widget.c
index 8501ab4..bad36b2 100644
--- a/gtk/usb-device-widget.c
+++ b/gtk/usb-device-widget.c
@@ -518,8 +518,10 @@ static void device_removed_cb(SpiceUsbDeviceManager *manager,
 
 static void set_inactive_by_usb_device(GtkWidget *widget, gpointer user_data)
 {
-    if (get_usb_device(widget) == user_data)
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FALSE);
+    if (get_usb_device(widget) == user_data) {
+        GtkWidget *check = gtk_bin_get_child(GTK_BIN(widget));
+        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), FALSE);
+    }
 }
 
 static void device_error_cb(SpiceUsbDeviceManager *manager,


More information about the Spice-commits mailing list