[Spice-devel] [PATCH spice-gtk] usb-device-widget: Remove deprecated GTK_MISC

Frediano Ziglio fziglio at redhat.com
Fri Jun 23 15:39:43 UTC 2017


> 
> ---
>  src/usb-device-widget.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/usb-device-widget.c b/src/usb-device-widget.c
> index e87bdff..2d07468 100644
> --- a/src/usb-device-widget.c
> +++ b/src/usb-device-widget.c
> @@ -208,7 +208,7 @@ static GObject *spice_usb_device_widget_constructor(
>      str = g_strdup_printf("<b>%s</b>", _("Select USB devices to redirect"));
>      gtk_label_set_markup(GTK_LABEL (priv->label), str);
>      g_free(str);
> -    gtk_misc_set_alignment(GTK_MISC(priv->label), 0.0, 0.5);
> +    g_object_set(G_OBJECT(priv->label), "xalign", 0.0, "yalign", 0.5, NULL);
>      gtk_container_add(GTK_CONTAINER(self), priv->label);
>  
>      priv->manager = spice_usb_device_manager_get(priv->session, &err);

Why not using gtk_label_set_xalign/gtk_label_set_yalign ?

Frediano


More information about the Spice-devel mailing list