Bug #549251. No need to set name if there is no a11y item object.

2008-12-23  Li Yuan  <li.yuan@sun.com>

        * 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
This commit is contained in:
Li Yuan 2008-12-22 09:04:19 +00:00 committed by Li Yuan
parent bf84d781d7
commit 405101d856
2 changed files with 20 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2008-12-23 Li Yuan <li.yuan@sun.com>
* 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 <yairhr@gmail.com>
Bug 565203: RTL locales: icons are misplaced when horizontal

View File

@ -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);
}
}
}