From 405101d856ee64332c6c617404de51ceb8806e68 Mon Sep 17 00:00:00 2001 From: Li Yuan Date: Mon, 22 Dec 2008 09:04:19 +0000 Subject: [PATCH] Bug #549251. No need to set name if there is no a11y item object. 2008-12-23 Li Yuan * gtk/gtkiconview.c: (gtk_icon_view_accessible_model_row_changed): Bug #549251. No need to set name if there is no a11y item object. svn path=/trunk/; revision=21926 --- ChangeLog | 5 +++++ gtk/gtkiconview.c | 27 +++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9533713bf1..469688e242 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-23 Li Yuan + + * gtk/gtkiconview.c: (gtk_icon_view_accessible_model_row_changed): + Bug #549251. No need to set name if there is no a11y item object. + 2008-12-21 Yair Hershkovitz Bug 565203: RTL locales: icons are misplaced when horizontal diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 81ef0bded7..4afb10b383 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -8891,20 +8891,23 @@ gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model, index = gtk_tree_path_get_indices(path)[0]; a11y_item = gtk_icon_view_accessible_find_child (atk_obj, index); - widget = GTK_ACCESSIBLE (atk_obj)->widget; - icon_view = GTK_ICON_VIEW (widget); - item = a11y_item->item; - - name = gtk_icon_view_item_accessible_get_name (ATK_OBJECT (a11y_item)); - - if (!name || strcmp (name, "") == 0) + if (a11y_item) { - gtk_icon_view_set_cell_data (icon_view, item); - text = get_text (icon_view, item); - if (text) + widget = GTK_ACCESSIBLE (atk_obj)->widget; + icon_view = GTK_ICON_VIEW (widget); + item = a11y_item->item; + + name = gtk_icon_view_item_accessible_get_name (ATK_OBJECT (a11y_item)); + + if (!name || strcmp (name, "") == 0) { - gtk_text_buffer_set_text (a11y_item->text_buffer, text, -1); - g_free (text); + gtk_icon_view_set_cell_data (icon_view, item); + text = get_text (icon_view, item); + if (text) + { + gtk_text_buffer_set_text (a11y_item->text_buffer, text, -1); + g_free (text); + } } }