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 472407 - Orca doesn't always announce new messages in unfocused tabs in Pidgin
Orca doesn't always announce new messages in unfocused tabs in Pidgin
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.19.x
Other All
: Normal normal
: 2.20.0
Assigned To: Joanmarie Diggs (IRC: joanie)
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-01 02:13 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2008-07-22 19:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
proposed patch (1.15 KB, patch)
2007-09-01 02:34 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2007-09-01 02:13:18 UTC
Steps to reproduce:

1. Launch Pidgin and get two chat tabs open (Chat1, Chat2).  Chat1 should NOT be focused.

2. Leave Pidgin alone, quit Orca, and restart it. Cause a message to appear in Chat1.

Expected results:  Orca would speak the new message that appeared.

Actual resutls:  Orca does not speak the new message that appeared.

Notes/Observations:

1. The trick seems to be launching (or restarting) Orca after the tabs have already been created.  If Orca is running (and not quit) when the tabs have been created, things work as expected.

2. This bug is NOT a regression of the recent changes to gaim.py.  I can reproduce this problem prior to both the "only speak the unfocused chatroom name" and "announce new tabs" fixes.

Patch and additional comments to follow.
Comment 1 Joanmarie Diggs (IRC: joanie) 2007-09-01 02:34:09 UTC
Created attachment 94739 [details] [review]
proposed patch

In gaim.onTextInserted(), we check to see if we already have a chatArea that corresponds to the chatRoomTab associated with the new message.  In the test case described in the bug, we won't have one so we look for the chatArea:

     allTextFields = self.findByRole(chatRoomTab,
                                     rolenames.ROLE_TEXT)

default.findByRole has a third, optional argument, onlyShowing, which defaults to True and which gets passed along to default.getObjects().  When onlyShowing is True, getObjects() won't examine objects that lack STATE_SHOWING.  Our chatArea (and just about all of its ancestors) in the test case will lack STATE_SHOWING.  Therefore gaim.onTextInserted() should call findByRole() with onlyShowing set to False.

getObjects() is recursive.  It doesn't pass onlyShowing along:

     objlist.extend(self.getObjects(child))

And onlyShowing in getObjects() also defaults to True.  So we're not descending the hierarchy far enough.
Comment 2 Willie Walker 2007-09-01 08:54:38 UTC
Good catch.  Please check in to trunk and gnome-2-20.
Comment 3 Joanmarie Diggs (IRC: joanie) 2007-09-01 19:01:40 UTC
Thanks Will.  Checked in to both.  Moving to [pending]
Comment 4 Willie Walker 2007-09-04 14:50:25 UTC
Mike - please test and mark as verified if this has been fixed.  :-)
Comment 5 Mike Pedersen 2007-09-04 18:08:37 UTC
This one seems good.  
Comment 6 Joanmarie Diggs (IRC: joanie) 2007-09-04 18:12:08 UTC
Yea!  Thanks.  Closing as FIXED.