[gtk+] gtkcombobox: Only use the child if It is a GtkCellLayout
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkcombobox: Only use the child if It is a GtkCellLayout
- Date: Sun, 8 Aug 2010 04:23:05 +0000 (UTC)
commit 8b2108a8a458621e82b4b1de8eb25fded6829c48
Author: Javier Jardón <jjardon gnome org>
Date: Fri Jul 23 11:59:36 2010 +0200
gtkcombobox: Only use the child if It is a GtkCellLayout
This error was introduced in
commit 4427760bcc330f60ec5778be04274f9f8073a84d
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=625104
gtk/gtkcombobox.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index d91561a..e8a535f 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -4283,8 +4283,9 @@ pack_start_recurse (GtkWidget *menu,
for (i = list; i; i = i->next)
{
child = gtk_bin_get_child (GTK_BIN (i->data));
- gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (child),
- cell, expand);
+ if (GTK_IS_CELL_LAYOUT (child))
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (child),
+ cell, expand);
submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (i->data));
if (submenu != NULL)
@@ -4338,8 +4339,9 @@ pack_end_recurse (GtkWidget *menu,
for (i = list; i; i = i->next)
{
child = gtk_bin_get_child (GTK_BIN (i->data));
- gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (child),
- cell, expand);
+ if (GTK_IS_CELL_LAYOUT (child))
+ gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (child),
+ cell, expand);
submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (i->data));
if (submenu != NULL)
@@ -4408,7 +4410,8 @@ clear_recurse (GtkWidget *menu)
for (i = list; i; i = i->next)
{
child = gtk_bin_get_child (GTK_BIN (i->data));
- gtk_cell_layout_clear (GTK_CELL_LAYOUT (child));
+ if (GTK_IS_CELL_LAYOUT (child))
+ gtk_cell_layout_clear (GTK_CELL_LAYOUT (child));
submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (i->data));
if (submenu != NULL)
@@ -4461,8 +4464,9 @@ add_attribute_recurse (GtkWidget *menu,
for (i = list; i; i = i->next)
{
child = gtk_bin_get_child (GTK_BIN (i->data));
- gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (child),
- cell, attribute, column);
+ if (GTK_IS_CELL_LAYOUT (child))
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (child),
+ cell, attribute, column);
submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (i->data));
if (submenu != NULL)
@@ -4607,7 +4611,8 @@ clear_attributes_recurse (GtkWidget *menu,
for (i = list; i; i = i->next)
{
child = gtk_bin_get_child (GTK_BIN (i->data));
- gtk_cell_layout_clear_attributes (GTK_CELL_LAYOUT (child), cell);
+ if (GTK_IS_CELL_LAYOUT (child))
+ gtk_cell_layout_clear_attributes (GTK_CELL_LAYOUT (child), cell);
submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (i->data));
if (submenu != NULL)
@@ -4665,8 +4670,9 @@ reorder_recurse (GtkWidget *menu,
for (i = list; i; i = i->next)
{
child = gtk_bin_get_child (GTK_BIN (i->data));
- gtk_cell_layout_reorder (GTK_CELL_LAYOUT (child),
- cell, position);
+ if (GTK_IS_CELL_LAYOUT (child))
+ gtk_cell_layout_reorder (GTK_CELL_LAYOUT (child),
+ cell, position);
submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (i->data));
if (submenu != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]