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:
Matthias Clasen 2014-06-28 10:56:54 -04:00
parent 4287e44a9a
commit 733a590fbe

View File

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