diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-04-26 20:05:51 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-04-26 20:23:39 +0200 |
commit | b8ec73a52fe3dc3012db78f45bfcafa2cb3e14ae (patch) | |
tree | b332a847a1839a80e050ae1040e6dd0486a53a71 /gtk/gtktoolbutton.c | |
parent | 621b415e5b3d0f4f1ad59e032b049815d3624519 (diff) | |
download | gtk+-b8ec73a52fe3dc3012db78f45bfcafa2cb3e14ae.tar.gz |
Only a GtkMisc widget should be passed to gtk_tool_button_new()
Reported by Hernando Torque here:
https://bugzilla.gnome.org/show_bug.cgi?id=616851
Diffstat (limited to 'gtk/gtktoolbutton.c')
-rw-r--r-- | gtk/gtktoolbutton.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index a0e16b98ed..e8a6eca90e 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -928,7 +928,7 @@ gtk_tool_button_new_from_stock (const gchar *stock_id) /** * gtk_tool_button_new: * @label: (allow-none): a string that will be used as label, or %NULL - * @icon_widget: (allow-none): a widget that will be used as icon widget, or %NULL + * @icon_widget: (allow-none): a #GtkMisc widget that will be used as icon widget, or %NULL * * Creates a new %GtkToolButton using @icon_widget as icon and @label as * label. @@ -943,6 +943,8 @@ gtk_tool_button_new (GtkWidget *icon_widget, { GtkToolButton *button; + g_return_val_if_fail (GTK_IS_MISC (icon_widget), NULL); + button = g_object_new (GTK_TYPE_TOOL_BUTTON, "label", label, "icon-widget", icon_widget, |