After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 395781 - Indicate the tree level of items in the Gaim (post 2.0 beta 3.1) buddy list
Indicate the tree level of items in the Gaim (post 2.0 beta 3.1) buddy list
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: gail
git master
Other All
: Normal enhancement
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks: 407647
 
 
Reported: 2007-01-12 13:35 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2007-11-19 10:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Joanmarie Diggs (IRC: joanie) 2007-01-12 13:35:17 UTC
In Gaim version 2.0.0 beta 4, the structure of the buddy list was changed, necessitating a corresponding change in Orca (see bug #376791).

While we now have access to the buddy list in these later versions of Gaim, Orca does not indicate the tree level of items as you navigate.  As a result no distinction is made between groups and individual "buddies".  If possible, Orca should indicate the tree level of items in the (post 2.0 beta 3.1) buddy list.

Thanks!!
Comment 1 Rich Burridge 2007-01-16 19:05:30 UTC
I think fixing this is going to be dependent upon implementing
bug #395548 (Refactor calls to util.py as calls from delegates 
in default.py), because the change to the structure of the buddy
list will probably require us to cons up a special version of
[default,util].getNodeLevel().
Comment 2 Rich Burridge 2007-01-29 17:51:07 UTC
While I'm waiting for Ubuntu to generate a working update-manager for
Feisty so that I can continue to investigate bug #400763, I thought I'd
take another look at this one.

The problem is that with gaim 2.0.0 beta5, when we call util.getNodeLevel(),
with the obj being a table cell in the buddy list, the obj.relations list
has a length of 0, so that routine always returns -1.

With gaim 2.0.0 beta1, when we call util.getNodeLevel(), with the obj being 
a table cell in the buddy list, the obj.relations list has a length of 1,
and one of the relations is atspi.Accessibility.RELATION_NODE_CHILD_OF,
allowing us to generating a valid node level.

What we need to determine now is why obj.relations is getting set to a
zero length list.
Comment 3 Rich Burridge 2007-02-07 21:33:12 UTC
Well, I can get Orca to nicely speak the tree level again with gaim 2.0.0beta6,
if I make the following change to gail/gailtreeview.c:

Index: gailtreeview.c
===================================================================
--- gailtreeview.c      (revision 1239)
+++ gailtreeview.c      (working copy)
@@ -1021,7 +1021,7 @@
   if (container)
     child =  ATK_OBJECT (container);

-  if (expander_tv == tv_col)
+/*  if (expander_tv == tv_col) */
     {
       AtkRelationSet *relation_set;
       AtkObject *accessible_array[1];

What this is doing is going ahead and setting an ATK_RELATION_NODE_CHILD_OF
relationship irrespective of whether the current table cell is in the same
column as the expander cell. Here's more code context so you get the idea
of what's going on:


/*  if (expander_tv == tv_col) */
    {
      AtkRelationSet *relation_set;
      AtkObject *accessible_array[1];
      AtkRelation* relation;
      AtkObject *parent_node;

      relation_set = atk_object_ref_relation_set (ATK_OBJECT (child));

      gtk_tree_path_up (path);
      if (gtk_tree_path_get_depth (path) == 0)
        parent_node = obj;
      else
        {
          gint parent_index;
          gint n_columns;

          n_columns = get_n_actual_columns (tree_view);
          parent_index = get_index (tree_view, path, i % n_columns);
          parent_node = atk_object_ref_accessible_child (obj, parent_index);
        }
      accessible_array[0] = parent_node;
      relation = atk_relation_new (accessible_array, 1,
                                   ATK_RELATION_NODE_CHILD_OF);
      atk_relation_set_add (relation_set, relation);
      g_object_unref (relation);
      g_object_unref (relation_set);
    }

It would seem to be that you should do this for all the children table cells,
but I admit I don't understand this code fully yet.

Is it about time we filed a bug on gail for this?


Comment 4 Rich Burridge 2007-02-13 22:01:47 UTC
Transferring to the atk/gail developers for further investigation.
I'll also open an Orca bug so that we can keep track of it.
Add yourself to the cc: if you want up-to-the-minute updates
on this bug!

Comment 5 Li Yuan 2007-02-14 06:11:04 UTC
I don't think we should set the relationship to every columns. Only the expander column should have this relation.
For gaim, it should call gtk_tree_view_set_expander_column to set the correct expander column.
Probably gaim's bug. (because it works before gaim changed its treeview).
Comment 6 Rich Burridge 2007-02-14 06:32:16 UTC
Okay. That seems reasonable. Could you recategorize it please? 
It would be nice to try to get this resolved before GNOME 2.18 
final. 

Thanks!
Comment 7 Li Yuan 2007-02-14 06:44:54 UTC
I think I should file a new bug on sourceforge? I will talk with our gaim guy about this.
Comment 8 Willie Walker 2007-05-23 20:46:26 UTC
(In reply to comment #7)
> I think I should file a new bug on sourceforge? I will talk with our gaim guy
> about this.

Li - what did your gaim guy have to say?
Comment 9 Joanmarie Diggs (IRC: joanie) 2007-07-26 23:09:49 UTC
Li, I took a look at the pidgin source.  In gtkblist.c, pidgin_blist_show() they do call gtk_tree_view_set_expander_column.  Unfortunately -- assuming I'm reading the code correctly -- it seems that they are setting it to the first column which is hidden and also doesn't contain the expander.  If I remove that call or place it in the column that actually contains the expander, everything is fixed from an accessibility point of view.  Unfortunately, the buddy list shows two expander icons rather than just one.  I tried various and sundry other things and always wound up with two expander icons.  Based on this, my suspicion is that their use of gtk_tree_view_set_expander_column was done quite intentionally to solve this problem.  It just happens to introduce new problems for us.  :-( So is it a gaim/pidgin bug?  It would seem so. But here are my concerns:

1.  If what they did was indeed absolutely necessary to achieve the effect they wanted, they will not be all that receptive to changing it in the spirit of accessibility.   Is there some clever atk call they could do to solve our problem without breaking their look and feel?  If so, and we could point it out to them, that might make them more willing to make the change.

2. What if other application developers do something similar?   We'll be in the same boat of having to convince them to do whatever atk magic that I hope exists. :-)  Rich's solution in comment 3 makes the problem go away, but as you point out we don't want to set the relation for every column.  So I'm wondering, could gail do a check to see if the expander column is not the one that actually contains the expander and, if that's the case, set the relation based on the column that actually does contain the expander?
Comment 10 Li Yuan 2007-08-15 09:44:08 UTC
Hi Joanie, Sorry for reply so late.

(In reply to comment #9)
> Li, I took a look at the pidgin source.  In gtkblist.c, pidgin_blist_show()
> they do call gtk_tree_view_set_expander_column.  Unfortunately -- assuming I'm
> reading the code correctly -- it seems that they are setting it to the first
> column which is hidden and also doesn't contain the expander.  If I remove that
> call or place it in the column that actually contains the expander, everything
> is fixed from an accessibility point of view.  Unfortunately, the buddy list
> shows two expander icons rather than just one.  I tried various and sundry
> other things and always wound up with two expander icons.  

This is weird, sounds like a gtk+ bug? Or Gaim is doing something really special? I will ask rick.ju@sun.com who is working Gaim/Pidgin.

> 1.  If what they did was indeed absolutely necessary to achieve the effect they
> wanted, they will not be all that receptive to changing it in the spirit of
> accessibility.   Is there some clever atk call they could do to solve our
> problem without breaking their look and feel?  If so, and we could point it out
> to them, that might make them more willing to make the change.

I'm not sure. There is no relation between tow columns in the GUI. Add the relation 
to all columns can fix the problem, but it is not a smart way.

> 2. What if other application developers do something similar?   We'll be in the
> same boat of having to convince them to do whatever atk magic that I hope
> exists. :-)  Rich's solution in comment 3 makes the problem go away, but as you
> point out we don't want to set the relation for every column.  So I'm
> wondering, could gail do a check to see if the expander column is not the one
> that actually contains the expander and, if that's the case, set the relation
> based on the column that actually does contain the expander?

En... let me take a look at gtk+'s code.

I will also ask Yi to look at this.

Comment 11 Li Yuan 2007-08-17 09:35:29 UTC
OK, I think Gaim doesn't want to let gtk+ draw the expander for it. It want to draw by itself. There are two kinds of expanders in Gaim, one is for group, another is for contact. I think Gaim want to make the two expanders look same, so it just draw them by itself. But I still don't have any idea about finding the real column that contains the expander.
Comment 12 Joanmarie Diggs (IRC: joanie) 2007-09-07 14:13:26 UTC
Can the solution to bug 474504 solve this issue as well??
Comment 13 Li Yuan 2007-09-10 07:45:30 UTC
please see http://bugzilla.gnome.org/show_bug.cgi?id=474504#c3
Comment 14 Willie Walker 2007-11-01 20:05:43 UTC
Just a ping to see where this bug stands.  Thanks!
Comment 15 Li Yuan 2007-11-15 09:29:48 UTC
Please refer to http://bugzilla.gnome.org/show_bug.cgi?id=474504#c7
Comment 16 Joanmarie Diggs (IRC: joanie) 2007-11-15 21:45:44 UTC
And also http://bugzilla.gnome.org/show_bug.cgi?id=407647#c2

If you combine the two patches, we seem to be doing the right thing.  Yea! :-)
Comment 17 Li Yuan 2007-11-19 09:59:32 UTC
See bug 474504, the patch should fix this bug.