diff options
author | Benjamin Otte <otte@redhat.com> | 2017-01-20 08:02:48 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-11-15 14:22:16 -0500 |
commit | f53b72e5ffc034f003801b9d4ee64328180bc297 (patch) | |
tree | c358e13d2d02ecbe63ca7a90e1359c7be3895e53 /gtk/gtkbutton.c | |
parent | 3da65ff2337ef24cdf20fbd161722ff37d2d3f9a (diff) | |
download | gtk+-f53b72e5ffc034f003801b9d4ee64328180bc297.tar.gz |
button: Get rid of icon size
In fact, make gtk_button_new_from_icon_name() just set the icon-name
property instead of creating a GtkImage.
Diffstat (limited to 'gtk/gtkbutton.c')
-rw-r--r-- | gtk/gtkbutton.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index eb2958cac2..b66e8971a9 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -614,7 +614,6 @@ gtk_button_new_with_label (const gchar *label) /** * gtk_button_new_from_icon_name: * @icon_name: (nullable): an icon name or %NULL - * @size: (type int): an icon size (#GtkIconSize) * * Creates a new button containing an icon from the current icon theme. * @@ -627,15 +626,13 @@ gtk_button_new_with_label (const gchar *label) * Since: 3.10 */ GtkWidget* -gtk_button_new_from_icon_name (const gchar *icon_name, - GtkIconSize size) +gtk_button_new_from_icon_name (const gchar *icon_name) { GtkWidget *button; - GtkWidget *image; - image = gtk_image_new_from_icon_name (icon_name, size); - button = g_object_new (GTK_TYPE_BUTTON, NULL); - gtk_container_add (GTK_CONTAINER (button), image); + button = g_object_new (GTK_TYPE_BUTTON, + "icon-name", icon_name, + NULL); return button; } |