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 677221 - Orca does not present run dialog text
Orca does not present run dialog text
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: cally
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-31 18:59 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2012-06-22 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
event listener (870 bytes, application/octet-stream)
2012-05-31 18:59 UTC, Joanmarie Diggs (IRC: joanie)
  Details
event listener (870 bytes, text/plain)
2012-05-31 19:37 UTC, Joanmarie Diggs (IRC: joanie)
  Details
Implementation for atk_text_get_text_[before/at/after]_offset (24.75 KB, patch)
2012-06-06 10:51 UTC, Alejandro Piñeiro Iglesias (IRC: infapi00)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2012-05-31 18:59:51 UTC
Created attachment 215360 [details]
event listener

Steps to reproduce:

1. Launch the attached listener in a terminal
2. Press Alt + F2
3. Type some text
4. Press Left and Right Arrow

Expected results: lineAtOffset and charAtOffset would show the correct text and offsets

Actual results: lineAtOffset and charAtOffset are each ('', 0, 0)

The former is needed for the braille display; the latter for text presentation when arrowing. I could use pyatspi's getText() to get the character; getting the line is less straightforward. And both would require a gnome-shell (or clutter/cally) specific Orca hack or two. So I would prefer to see this fixed on the gnome-shell side if possible.
Comment 1 Joanmarie Diggs (IRC: joanie) 2012-05-31 19:37:31 UTC
Created attachment 215361 [details]
event listener

Corrected listener. Sorry for the noise.
Comment 2 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-06-05 11:27:33 UTC
After take a look, the problem are the missed implementation from some AtkText methods on Clutter, specifically:

 * atk_text_get_text_after_offset
 * atk_text_get_text_at_offset
 * atk_text_get_character_at_offset

I had a bug with that issue, but it seems that it was not moved to GNOME bugzilla when clutter bugzilla was moved there.
Comment 3 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-06-05 11:29:02 UTC
(In reply to comment #2)
> After take a look, the problem are the missed implementation from some AtkText
> methods on Clutter, specifically:
> 
>  * atk_text_get_text_after_offset
>  * atk_text_get_text_at_offset
>  * atk_text_get_character_at_offset

This is properly implemented, the one not implemented is this one:
   * text_get_text_before_offset

Sorry for the noise.
Comment 4 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-06-06 10:51:00 UTC
Created attachment 215729 [details] [review]
Implementation for atk_text_get_text_[before/at/after]_offset

When Matthias Clasen and Benjamin Otte made a revamp of the gtk+ ATK implementation, one the the great things that made is reimplement these methods based on pango insted of GtkTextBuffer, so making GailUtil not required (when cally was an isolated library, those methods were implemented using that library).

This patch is just a copy and paste of those methods, something that I'm not sure if it is acceptable or not.
Comment 5 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-06-06 11:08:13 UTC
Just to give some backgroun and/or some discussion.

Ideally code from last patch should be in a common place, like pango (probably it would be possible to add this utility methods and not adding a ATK dependency on pango). In fact we mentioned that when Matthias was working on that. The problem is that at this moment nobody is really happy with some methods of AtkText API, and specifically on those ones. The combination of three methods with almost the same signature (before/at/after) and all those boundaries make this hard to understand, on AT and implementor side. So AFAIR, the reason to not move this to a common library was the hope of getting a more reasonable AtkText API. Something that in the end didn't happen because what we have is used and working, and we had plenty of stuff not working.

So, in my opinion, what I would like to happen?:

1. In the short term: apply patch on comment 4 on clutter in order to solve this bug now.
2. In the medium term: move those methods from gtkpango.c to a common library. In this case it could be a specific library (like old GailUtil) or ideally on pango itself. Remove code added on 1.
3. In the long term: while 1. and 2. work on a more reasonable AtkText API, and implement it on that common library. Deprecate methods added on 2.
Comment 6 Emmanuele Bassi (:ebassi) 2012-06-06 11:19:18 UTC
Review of attachment 215729 [details] [review]:

the amount of duplicate code is pretty scary, but if the plan is to have it inside Pango and ATK in the long term, then I can live with it for the time being.

::: clutter/cally/cally-text.c
@@ +374,3 @@
 
+/***** pango stuff ****/
+

I'd add a pretty big:

  FIXME: all this code belongs into Pango

notice, just so that we don't accidentally forget about it. ;-)
Comment 7 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-06-22 16:12:33 UTC
(In reply to comment #6)

> 
> I'd add a pretty big:
> 
>   FIXME: all this code belongs into Pango
> 
> notice, just so that we don't accidentally forget about it. ;-)

FIXME added.

No one else complained about this, commit pushed, closing the bug.