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 632058 - Search results in TreeViews aren't spoken
Search results in TreeViews aren't spoken
Status: RESOLVED OBSOLETE
Product: orca
Classification: Applications
Component: speech
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-13 13:11 UTC by Marcus Habermehl (BMH1980)
Modified: 2018-02-08 12:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Speek search results in GtkTreeView widgets. (838 bytes, patch)
2010-10-13 13:11 UTC, Marcus Habermehl (BMH1980)
none Details | Review
This debug.out file possible show what the problem. (485.09 KB, application/octet-stream)
2010-10-13 14:22 UTC, Hammer Attila
  Details
[PATCH] Speek search results in GtkTreeView widgets. (1.38 KB, patch)
2010-10-16 09:11 UTC, Marcus Habermehl (BMH1980)
none Details | Review
[PATCH] Speek search results in GtkTreeView widgets. (913 bytes, patch)
2010-10-17 12:11 UTC, Marcus Habermehl (BMH1980)
reviewed Details | Review
This version should solve Attila's problem (868 bytes, patch)
2010-10-25 11:12 UTC, Marcus Habermehl (BMH1980)
reviewed Details | Review
Maybe the solution (1.73 KB, patch)
2011-01-24 20:31 UTC, Marcus Habermehl (BMH1980)
reviewed Details | Review
Debug file with show a problem (108.51 KB, application/octet-stream)
2011-01-25 06:22 UTC, Hammer Attila
  Details

Description Marcus Habermehl (BMH1980) 2010-10-13 13:11:30 UTC
Created attachment 172263 [details] [review]
[PATCH] Speek search results in GtkTreeView widgets.

If you start searching in a TreeView with entery the keyword(s) the search results aren't spoken.

I'm attaching a patch that solves this problem. But I don't know if this fix creates a new problem. Currently I can't find one.

Steps to Reproduce:

1) Open a window/dialog that is using a GtkTreeView widget to store data.
2) Enter a search term/char and use up/down arrow keys.

Actual Results:

No results are spoken.

Expected Results:

The current search result should be spoken.
Comment 1 Hammer Attila 2010-10-13 13:45:23 UTC
Marcus, I tryed your patch, your patch is fantasticc.
I see only one problem yet:
If I try searching a list with one letter, and press down arrow keys, if the caret jump the last filtered item and I press again the Down arrow key, Orca says:
Not selected
Selected.
Can you verify this issue?

This is not true if I press up arrow keys, and the caret go to top of the filtered list.

Attila
Comment 2 Hammer Attila 2010-10-13 14:22:40 UTC
Created attachment 172270 [details]
This debug.out file possible show what the problem.

Marcus, I sending a debug.out file.
Hungarian labels now not interesting, the "nincs kijelölve" text means "not selected", the "kijelölve" text means "selected" texts if I have the end of search results and press again Down arrow key.
This simple list is a Zenity generated one column list.

Attila
Comment 3 Marcus Habermehl (BMH1980) 2010-10-16 09:11:51 UTC
Created attachment 172485 [details] [review]
[PATCH] Speek search results in GtkTreeView widgets.

I have removed some lines from default.py. Please try if this doesn't break something. I haven't found differences.

But this isn't the final patch. If you use the object navigator with Orca+Ctrl+F8 search results aren't spoken again. :-( Only search results in lists are spoken. With trees it's the same as before.
Comment 4 Hammer Attila 2010-10-16 09:49:53 UTC
Marcus, my wroted problem is solwed, Thank you.

Attila
Comment 5 Marcus Habermehl (BMH1980) 2010-10-17 12:11:19 UTC
Created attachment 172539 [details] [review]
[PATCH] Speek search results in GtkTreeView widgets.

This patch solves the bug for lists and trees.

But Attila, I have to remove the selected/unselected fix. Because those lines was added to solve #519564. If you press the down arrow key Gtk+/Gail/what ever emmits the object:state-changed:selected signal twice:

object:state-changed:selected(0, 0, None)
	source: [table cell | Google-Suche  Knopf]
	host_application: [application | orca]
object:state-changed:selected(1, 0, None)
	source: [table cell | Google-Suche  Knopf]
	host_application: [application | orca]

And that's clearly a bug. Because there isn't a state that was changed.
Comment 6 Joanmarie Diggs (IRC: joanie) 2010-10-24 13:41:52 UTC
Review of attachment 172539 [details] [review]:

Thanks for doing this Marcus.

I am concerned about the potential for side effects. In particular:

         if not event.source.getState().contains(pyatspi.STATE_FOCUSED):
-            return
+            if not event.source.getRole() in [pyatspi.ROLE_TABLE,
+                                              pyatspi.ROLE_TREE_TABLE]:
+                return

Basically, we expect to get object:active-descendant-changed events from two main AtkRoles: ATK_ROLE_TABLE and ATK_ROLE_TREE_TABLE. In other words, I believe the functional equivalent of your change is just to completely remove this check:

         if not event.source.getState().contains(pyatspi.STATE_FOCUSED):
             return

That check is there because we get bogus events and we get irrelevant events (including object:active-descendant-changed) from tables and tree tables. Therefore, the fix for this bug will need to be one that identifies that we're in a search and that the search is what triggered the active-descendant-changed event.
Comment 7 Marcus Habermehl (BMH1980) 2010-10-25 11:12:08 UTC
Created attachment 173163 [details] [review]
This version should solve Attila's problem

I have applied your suggestion joanie and it works. The search results are spoken and I doesn't get Attila's 'selected'/'unselected' messages.
Comment 8 Marcus Habermehl (BMH1980) 2010-10-29 20:54:13 UTC
I have to take back what I've said. seledted/unselected is spoken beyond.
Comment 9 Joanmarie Diggs (IRC: joanie) 2010-11-29 13:23:55 UTC
Review of attachment 173163 [details] [review]:

The thing is.... MOST of the time, we don't want non-focused events spoken. That is why the check is present. Removing the check is not really the right way to solve this problem in my opinion; instead we should find a way to heuristically identify the one time we do want to speak this information.
Comment 10 Marcus Habermehl (BMH1980) 2010-12-05 20:39:17 UTC
It's interesting. If you use the search function in nautilus what is using a GtkIconView widget the focus signal is emmited. For a TreeView it's only object:state-changed:selected and object:active-descendant-changed.

Any idea how to use this to identify the time where orca must speak?

At the moment I haven't any idea. :-(
Comment 11 Marcus Habermehl (BMH1980) 2011-01-24 20:31:44 UTC
Created attachment 179224 [details] [review]
Maybe the solution

joanie, maybe I have found the solution. Can you please have a look on the patch? Thanks.
Comment 12 Hammer Attila 2011-01-25 06:15:29 UTC
Marcus, when I type a search term, the first founded search result is spokened only if I press a down arrow and up arrow key. This is right?
I tested for example with my HOME folder with press a letter with have more files and directoryes.
For example my home folder have lot of l letter beginning folders. When I type l letter, not spokened the first founded result (Letöltések folder name). When I press a down arrow key and an up arrow key, I hear right the Letöltések folder name.
Possible fix this?
When I moving the searched results with arrow keys, all searched results is spokening right, but this is not true for example the #620331 bug added structural navigation list patch my system.
When I ask links list with www.origo.hu/hirmondo webpage and type a search letter, I not hear the first founded link (autó named link name).
This webpage only have two a beginning link: autó and a böngésző letöltése named links.
I attaching a debug.out with showing this problem with last comment.

Attila
Comment 13 Hammer Attila 2011-01-25 06:22:03 UTC
Created attachment 179268 [details]
Debug file with show a problem

This debug.out show a problem with I described prewious comment.
Reproducation steps to verify:
1. Open for example www.origo.hu/hirmondo webpage.
2. Ask links list with press Orca+Ctrl+F7 key.
3. Type for example a letter. You not will be hear the first founded search result (autó link) when end of the typing. This is first problem with need fixing.
4. Try move down arrow and Up arrow key the searched results. You newer will be hear the first founded result (autó link), only will be hear following link name: "A böngésző letöltése"

Attila
Comment 14 Joanmarie Diggs (IRC: joanie) 2012-02-14 17:00:38 UTC
Review of attachment 179224 [details] [review]:

The real solution should be that ATs have a means to connect related objects and their events/signals. See, for instance bug 658148.