GNOME Bugzilla – Bug 472407
Orca doesn't always announce new messages in unfocused tabs in Pidgin
Last modified: 2008-07-22 19:28:31 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.
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.
Good catch. Please check in to trunk and gnome-2-20.
Thanks Will. Checked in to both. Moving to [pending]
Mike - please test and mark as verified if this has been fixed. :-)
This one seems good.
Yea! Thanks. Closing as FIXED.