Commit 2686af2f authored by Szilárd Pfeiffer's avatar Szilárd Pfeiffer Committed by Matthias Clasen

Make Gail work with custom treemodels

Gail did set the role to ATK_ROLE_TABLE for anything that is
not a GtkTreeStore. The propery way to do this is to look at the
tree model flags for list-onlyness. Bug 580291.
parent 99e8a76c
......@@ -481,10 +481,10 @@ gail_tree_view_real_initialize (AtkObject *obj,
g_object_add_weak_pointer (G_OBJECT (view->tree_model), (gpointer *)&view->tree_model);
connect_model_signals (tree_view, view);
if (GTK_IS_TREE_STORE (tree_model))
obj->role = ATK_ROLE_TREE_TABLE;
else
if (gtk_tree_model_get_flags (tree_model) & GTK_TREE_MODEL_LIST_ONLY)
obj->role = ATK_ROLE_TABLE;
else
obj->role = ATK_ROLE_TREE_TABLE;
}
else
{
......@@ -568,10 +568,10 @@ gail_tree_view_real_notify_gtk (GObject *obj,
g_object_add_weak_pointer (G_OBJECT (gailview->tree_model), (gpointer *)&gailview->tree_model);
connect_model_signals (tree_view, gailview);
if (GTK_IS_TREE_STORE (tree_model))
role = ATK_ROLE_TREE_TABLE;
else
if (gtk_tree_model_get_flags (tree_model) & GTK_TREE_MODEL_LIST_ONLY)
role = ATK_ROLE_TABLE;
else
role = ATK_ROLE_TREE_TABLE;
}
else
{
......
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