Commit 797f030c authored by Matthias Clasen's avatar Matthias Clasen

Handle separate append/set for rows. Patch by Li Yuan

        * gtk/gtkiconview.c (gtk_icon_view_accessible_model_row_changed):
        Handle separate append/set for rows.  Patch by Li Yuan



svn path=/trunk/; revision=21884
parent a3fad199
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Bug 549251 – GTK icon view accessible issue.
* gtk/gtkiconview.c (gtk_icon_view_accessible_model_row_changed):
Handle separate append/set for rows. Patch by Li Yuan
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Bug 556839 – Crash when opening a link
......
......@@ -8872,11 +8872,39 @@ static void
gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer user_data)
gpointer user_data)
{
AtkObject *atk_obj;
gint index;
GtkWidget *widget;
GtkIconView *icon_view;
GtkIconViewItem *item;
GtkIconViewAccessible *a11y_view;
GtkIconViewItemAccessible *a11y_item;
gchar *name, *text;
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
a11y_view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj);
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)
{
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);
}
}
g_signal_emit_by_name (atk_obj, "visible-data-changed");
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment