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 707729 - orca speaks wrong label when using flat review on GtkTree
orca speaks wrong label when using flat review on GtkTree
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Accessibility
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-09-08 16:42 UTC by Jarek Czekalski
Modified: 2014-03-19 18:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Orca-free, simple way to reproduce this bug (581 bytes, text/x-python)
2013-09-08 19:15 UTC, Joanmarie Diggs (IRC: joanie)
  Details
Proposed patch. (7.75 KB, patch)
2014-01-07 21:15 UTC, Mike Gorse
none Details | Review

Description Jarek Czekalski 2013-09-08 16:42:33 UTC
To reproduce:

1. Enter orca preferences
2. Click with mouse "Key bindings"
3. Press KP_8 - you're at tabs, ok
4. Press KP_9 - you're Modifier keys, ok
5. Press KP_9 - you're at Function, ok
6. Press KP_9 - you're at Default, orca speaks "Add bookmark", WRONG
7. Press KP_9 - you're at Go to bookmark, orca speaks
   "Add bookmark. Insert+Alt_L+6", wrong
8. Press KP_9 - you're at the next item, but orca is stuck at Alt_L+6, wrong

Sometimes when reqesting a line with flat review orca causes an exception in gtk (gtkpango.c, _gtk_pango_get_text_at, line "if (text[0] == 0)"). Since orca is first in getting wrong, I think this issue should be solved before trying to fix pango.
Related pango bug entry (originally orca):
https://bugzilla.gnome.org/show_bug.cgi?id=707659
Comment 1 Joanmarie Diggs (IRC: joanie) 2013-09-08 17:27:55 UTC
Removing the "blocks". If there is a bug in Pango, that bug should be fixed.
Comment 2 Joanmarie Diggs (IRC: joanie) 2013-09-08 19:15:04 UTC
Created attachment 254432 [details]
Orca-free, simple way to reproduce this bug

Steps to reproduce:

1. Launch gtk3-demo and start the GtkListStore demo
2. Launch the attached in a terminal
3. Switch back to the GtkListStore demo window

Expected results: The unit of text retrieved by getTextAtOffset() would accurately reflect the contents.

Actual results: The unit of text retrieved by getTextAtOffset() reflects text present, but in some other cell.

Impact: Orca's flat review feature fails to work correctly in a GtkTreeView.

Sample output:

name: 60620
text: 60482

name: Critical
text: Normal

name: gdk_window_clear_area (gdkwindow-win32.c) is not thread-safe
text: scrollable notebooks and hidden tabs

name: 50214
text: 60482

name: Major
text: Normal

name: Xft support does not clean up correctly
text: scrollable notebooks and hidden tabs

name: 52877
text: 60482

name: Major
text: Normal

name: GtkFileSelection needs a refresh method. 
text: scrollable notebooks and hidden tabs

name: 56070
text: 60482

name: Can't click button after setting in sensitive
text: scrollable notebooks and hidden tabs

name: 56355
text: 60482

name: GtkLabel - Not all changes propagate correctly
text: scrollable notebooks and hidden tabs
Comment 3 Joanmarie Diggs (IRC: joanie) 2013-09-08 19:16:37 UTC
Transferring to Gtk+.
Comment 4 Mike Gorse 2014-01-07 21:15:06 UTC
Created attachment 265582 [details] [review]
Proposed patch.

Construct a pango layout in update_cache, and keep it around (as Benjamin suggested on IRC a while ago).

Works for me, although I'm not sure if we need to initialize the layout in the constructor. Also, maybe we should have an accessible-dump-style test with a tree view.
Comment 5 Jarek Czekalski 2014-01-14 17:07:23 UTC
I guess it's applied as
https://git.gnome.org/browse/gtk+/commit/?id=e529dfe94951acf992a979c878f0d03dc479b694
Comment 6 Jarek Czekalski 2014-03-19 18:54:18 UTC
I confirm that orca on gtk+ 3.11.4 is free of this bug. Thank you guys.