forked from AuroraMiddleware/gtk
GtkButton: warn slightly less
Use gtk_misc_set_alignment when setting x/align on button children where possible, to avoid the runtime warning that g_object_set incurs nowadays.
This commit is contained in:
parent
4287e44a9a
commit
733a590fbe
@ -702,7 +702,9 @@ maybe_set_alignment (GtkButton *button,
|
||||
return;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
if (GTK_IS_MISC (widget) || GTK_IS_ALIGNMENT (widget))
|
||||
if (GTK_IS_MISC (widget))
|
||||
gtk_misc_set_alignment (GTK_MISC (widget), priv->xalign, priv->yalign);
|
||||
else if (GTK_IS_ALIGNMENT (widget))
|
||||
g_object_set (widget, "xalign", priv->xalign, "yalign", priv->yalign, NULL);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user