[Spice-devel] [PATCH spice-gtk] usb-device-widget: Call set_active on the toggle_button, not the alignment

Marc-André Lureau mlureau at redhat.com
Thu Mar 29 08:39:06 PDT 2012


ack

----- Mensaje original -----
> 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>
> ---
>  gtk/usb-device-widget.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> 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,
> --
> 1.7.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list