[gtk+/gtk-2-22] Make toolbutton not call functions on non-GtkMisc
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-22] Make toolbutton not call functions on non-GtkMisc
- Date: Wed, 30 Jun 2010 16:44:29 +0000 (UTC)
commit b1cc8b9cd88cf1eab4e9ec8c3cdbfb1307b6e79c
Author: Benjamin Otte <otte redhat com>
Date: Mon May 3 18:22:42 2010 +0200
Make toolbutton not call functions on non-GtkMisc
gtk/gtktoolbutton.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c
index 4225401..0e6ae59 100644
--- a/gtk/gtktoolbutton.c
+++ b/gtk/gtktoolbutton.c
@@ -470,11 +470,11 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
gtk_widget_show (icon);
}
- if (icon && text_orientation == GTK_ORIENTATION_HORIZONTAL)
+ if (GTK_IS_MISC (icon) && text_orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_misc_set_alignment (GTK_MISC (icon),
1.0 - gtk_tool_item_get_text_alignment (GTK_TOOL_ITEM (button)),
0.5);
- else if (icon)
+ else if (GTK_IS_MISC (icon))
gtk_misc_set_alignment (GTK_MISC (icon),
0.5,
gtk_tool_item_get_text_alignment (GTK_TOOL_ITEM (button)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]