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@redhat.com>
This commit is contained in:
Hans de Goede 2012-03-29 17:25:17 +02:00
parent 20da7a6d81
commit 3a424e64d5

View File

@ -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,