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 376791 - Orca does not provide access to the buddy list in Gaim 2.0.0 beta 5
Orca does not provide access to the buddy list in Gaim 2.0.0 beta 5
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.17.x
Other All
: Normal normal
: ---
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-18 22:01 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2007-01-16 23:37 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
debug.out for Gaim 2.0 beta 5 (72.56 KB, text/plain)
2006-12-13 16:43 UTC, Joanmarie Diggs (IRC: joanie)
  Details
debug.out for Gaim 2.0 beta 3 (72.28 KB, text/plain)
2006-12-13 16:44 UTC, Joanmarie Diggs (IRC: joanie)
  Details
Patch to just get it so Orca can speak something... (1.33 KB, patch)
2006-12-19 21:36 UTC, Willie Walker
none Details | Review
Patch to hopefully fix the problem. (1.22 KB, patch)
2007-01-11 18:28 UTC, Rich Burridge
none Details | Review

Description Joanmarie Diggs (IRC: joanie) 2006-11-18 22:01:48 UTC
Please describe the problem:
Orca says nothing as you arrow among items in the buddy list of Gaim 2.0.0 beta 5.

Steps to reproduce:
1. Build Gaim 2.0.0 beta 5 (http://gaim.sourceforge.net/)
2. Launch Orca
3. Arrow among the items in the buddy list


Actual results:
Orca is silent.

Expected results:
Orca would speak the names of the groups and buddies.

Does this happen every time?
Yes

Other information:
Comment 1 Joanmarie Diggs (IRC: joanie) 2006-12-13 16:43:54 UTC
Created attachment 78295 [details]
debug.out for Gaim 2.0 beta 5

I looked at the full debug.out's that resulted from Gaim 2.0 beta 5 (included in Feisty) with Gaim 2.0 beta 3 (included in Edgy).  Debugging event-related issues seems to be Rich's area of expertise. :-)

The relevant section to look at/compare is line 470 in this file with line 331 of the beta 3 debug.out (to be attached).  In both cases, an object:active-descendant-changed event triggers _getSpeechForTableCell().  However, in beta 5 the string is empty, whereas in beta 3, it contains the correct text.

I also compared each version of Gaim using at-poke.  The only thing that jumped out at me is that in beta 3 the tree table has 2 columns and in beta 5 it has 1.

Any ideas of where to go from here?  Thanks!
Comment 2 Joanmarie Diggs (IRC: joanie) 2006-12-13 16:44:39 UTC
Created attachment 78296 [details]
debug.out for Gaim 2.0 beta 3
Comment 3 Willie Walker 2006-12-19 21:33:05 UTC
> Any ideas of where to go from here?  Thanks!

I think the GAIM folks might have broken the accessible table implementation.  If I look at the accessible hierarchy dump we can get from Orca via Insert+F8, I see the following -- note the "WARNING CHILD IS NONE" lines.  This means the object is telling us is has children, but we run into problems when we try to get them:

+-name='gaim' role='application' state='' relations=''
  +-name='Buddy List' role='frame' state='ACTIVE ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations=''
    +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations=''
      +-name=None role='menu bar' state='ENABLED SENSITIVE SHOWING VISIBLE' relations=''
        +-name='Buddies' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''
        +-name='Accounts' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''
        +-name='Tools' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''
        +-name='Help' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''
          +-name='Online Help' role='menu item' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''
          +-name='Debug Window' role='menu item' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''
          +-name='About' role='menu item' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''
        +-name=None role='menu item' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''
      +-name=None role='scroll pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations=''
        +-name=None role='tree table' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' relations=''
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
          WARNING CHILD IS NONE!!!
        +-name=None role='scroll bar' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations=''
      +-name=None role='separator' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations=''
      +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations=''
      +-name='Away' role='combo box' state='ENABLED SENSITIVE SHOWING VISIBLE' relations=''
Comment 4 Willie Walker 2006-12-19 21:36:22 UTC
Created attachment 78656 [details] [review]
Patch to just get it so Orca can speak something...

This is not a good patch.  It is only to allow someone to hear the buddies as they arrow through them (braille will not work).  Something is still horribly messed up somewhere with the tree hierarchy, and we also get bizarre text inserted/deleted events that screw everything up.
Comment 5 Rich Burridge 2007-01-03 21:04:24 UTC
I've opened a bug against gaim for this problem. See:

http://sourceforge.net/tracker/index.php?func=detail&aid=1627333&group_id=235&atid=100235

Comment 6 Rich Burridge 2007-01-03 21:14:08 UTC
Adding "blocked" to the summary.
Comment 7 Rich Burridge 2007-01-10 17:32:58 UTC
I've just had a quick look at this. The gaim code changed in
a major way between 2.0.0 beta3.1 and 2.0.0 beta4. In beta3.1,
the Buddy List code was in .../src/gtkblist.c. In beta4, the
code is in .../console/gntblist.c, but it's been rewritten to
use routines in .../console/libgnt/.

If you look at:

  http://gaim.sourceforge.net/sean/blog/gaim-text

you'll find:

"Hi! I am Sadrul, and I am going to talk about gaim-text. gaim-text 
is a text-frontend for Gaim. It uses libgaim for the IM-services, 
and libgnt for the UI widgets. gaim-text was developed for Google's 
Summer of Code 2006 program."

At this point, I've no idea what changed (in a bad way) that accessibility
of the buddy list doesn't work.

Still investigating...
Comment 8 Rich Burridge 2007-01-10 18:26:02 UTC
I take it back. The Gtk Buddy List is in .../gtk/gtkblist.c.
There are virtually no comments in this code. Sigh. Still
looking.
Comment 9 Rich Burridge 2007-01-10 22:50:26 UTC
I've worked out what's going on. I'm not sure what the best way
to fix it is though.

The problem is all to do with the way that util.getRealActiveDescendant()
works in Orca.

With gaim 2.0.0beta3.1, in gaim_gtk_blist_show() in .../src/gtkblist.c
(at about line 3745), the buddy list tree table was constructed
in such a way that the last child in one of the table cells was
for the NAME_COLUMN renderer. In that table cell, obj.childCount was
2 and a handle to the appropriate child object was returned by
util.getRealActiveDescendant().

With gaim 2.0.0beta5, in gaim_gtk_blist_show() in .../gtk/gtkblist.c
(at about line 4047), the buddy list tree table was constructed
with more cell renderers and the last child in one of the table cells was
NOT for the NAME_COLUMN renderer. In that table cell, obj.childCount was
6 and a handle to an inappropriate child object was returned by
util.getRealActiveDescendant().

I don't think we can ask the gaim folk to adjust their code to behave with
the "quirks" of the screen reader. We need to fix it on our side.

One potential way to fix this is to subclass the BrailleGenerator and
SpeechGenerator classes in gaim.py, add in our own versions of
_getBrailleRegionsForTableCell() and _getSpeechForTableCell() and
check to see whether that particular table cell has 2 or 6 children and
do self._getDefaultBrailleRegions(...) and 
utterances.append(util.getDisplayedText(...)) on the appropriate
child object.

It's a pity we can't subclass util.getRealActiveDescendant() in the script.
It would have been so much simpler to apply a fix there.
Perhaps we should move it to default.py...

Another possible solution is to put some smarts into
util.getRealActiveDescendant(), to try to determine the best
child object to return.

B.t.w. the "WARNING CHILD IS NONE!!!" message when you do an Insert-F8 in
Orca to print the component hierarchy, are for an invisible expander column
in that tree table, so even though that's broken, it was a red herring for
finding the real problem.

Suggestions on how to proceed?
Comment 10 Rich Burridge 2007-01-11 18:28:26 UTC
Created attachment 80047 [details] [review]
Patch to hopefully fix the problem.

I went with the "add smarts to getRealActiveDescendant()" approach.
See comment in patch for more details. I've tested this with gaim 2.0.0beta3.1
and gaim 2.0.0beta5 and both seem to work okay. I've also tested it
with gconf-editor and evolution to make sure I hadn't broken anything.
Both of those seem okay too.

I haven't checked it into SVN trunk yet.

Comments? Is this the right approach to take?
Comment 11 Rich Burridge 2007-01-11 18:33:42 UTC
B.t.w. I've fixed up the two spelling mistakes in the comment. In my
workspace, it now reads:

    # If obj is a table cell and all of it's children are table cells
    # (probably cell renderers), then return the first child which has
    # a non zero length text string. If no such object is found, just
    # fall through and use the default approach below. See bug #376791
    # for more details.
    #
Comment 12 Rich Burridge 2007-01-11 19:17:07 UTC
Further quick update. I've just tested the patch against
the three tree table demos in gtk-demo (thanks for the
prod Will), and everything seems to be working fine.

Joanie, if you could test it please, that would be great.
If it seems to be working for you, I'll check it into SVN 
trunk.
Comment 13 Willie Walker 2007-01-11 19:27:58 UTC
Nice sleuthing, Rich!  The fix looks good to me, especially since you've tested it with both versions of GAIM and various other things such as Evolution and gtk-demo.

> It's a pity we can't subclass util.getRealActiveDescendant() in the script.
> It would have been so much simpler to apply a fix there.
> Perhaps we should move it to default.py...

I've been laboring over this as well since we have seen examples where we need to override or extend the behavior of the util.py methods.  I've been thinking we should create a bunch of "one line" delegate methods in default.py that call into util.py.  This would allow subscripts to override the behavior if they want.  Maybe something to put on our "nice to do" list for 2.20?
Comment 14 Rich Burridge 2007-01-11 19:36:48 UTC
> Maybe something to put on our "nice to do" list for 2.20?

Agreed.
Comment 15 Willie Walker 2007-01-11 20:12:12 UTC
(In reply to comment #14)
> > Maybe something to put on our "nice to do" list for 2.20?
> 
> Agreed.
> 

Logged as bug 395548: http://bugzilla.gnome.org/show_bug.cgi?id=395548.
Comment 16 Joanmarie Diggs (IRC: joanie) 2007-01-11 20:24:34 UTC
The patch works quite nicely.    I did notice, however, that there is no distinction made between groups and individual buddies.  Everything is being read at the same level.  I don't know if this is something that can be detected and handled, but if it could....

Regardless, this is 1000 times better.  Thanks!!
Comment 17 Rich Burridge 2007-01-11 20:40:54 UTC
Thanks for testing it. I've commit the patch to SVN trunk.
Mike, could you give it a try before I close it out as FIXED please?

As for the groups/individuals. Could you file a separate enhancement
request for this please? It's probably something we can script for,
but it's definitely separate from this bug. 

(Adjusting bug summary and removing the "[blocked]" now that
we know what the problem is).
Comment 18 Joanmarie Diggs (IRC: joanie) 2007-01-12 13:37:09 UTC
> Could you file a separate enhancement request for this please?

Done.  See bug #395781.

Comment 19 Mike Pedersen 2007-01-16 21:57:23 UTC
Looks good I think it's safe to close.
Comment 20 Rich Burridge 2007-01-16 23:37:04 UTC
Okay, closing as FIXED. Thanks Mike.