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 619306 - Indentation and justification is not always spoken.
Indentation and justification is not always spoken.
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: speech
2.31.x
Other All
: Normal normal
: 2.32.0
Assigned To: Mesar Hameed
Orca Maintainers
Depends on: 620320
Blocks:
 
 
Reported: 2010-05-21 16:30 UTC by Mesar Hameed
Modified: 2010-09-20 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Rev 1. (3.63 KB, patch)
2010-06-02 01:20 UTC, Mesar Hameed
none Details | Review
Rev 2. Fix for bgo#619306 - Indentation and justification is not always spoken. (2.45 KB, patch)
2010-06-02 21:34 UTC, Mesar Hameed
accepted-commit_now Details | Review

Description Mesar Hameed 2010-05-21 16:30:54 UTC
As Jose points out in:
http://mail.gnome.org/archives/orca-list/2010-May/msg00591.html

Indentation and justification isnt spoken when we give focus to application.

--cut--
1. Make sure that speak indentation and justification option is checked in the preference page of orca. 
2. launch gedit with an empty file.
3. include two lines in the file with the following content, do not include the quotation: "    line 1"
"    line 2"
4. Scroll in the file using up and down and observe that orca announces 4 spaces before line 1 and line 2. 5. Press ctrl+home.
6. Switch to another application pressing alt+tab.
7. Switch back to gedit pressing alt+tab.
Orca should announce 4 spaces line 1 but instead it only announces line 1.
--end cut--

I can reproduce this.
Comment 1 Mesar Hameed 2010-06-02 01:20:28 UTC
Created attachment 162511 [details] [review]
Rev 1.

Hi Jose,
This patch seems to fix the problem for me.
Before it will work, you need to apply the patch from bug #620320.

Thank you for your feedback.
Comment 2 Joanmarie Diggs (IRC: joanie) 2010-06-02 02:27:57 UTC
Oh look, see, great minds *do* think alike. <smile> This approach is what I was getting at in my comments to bug 620320.

Therefore, could you instead do something along the following lines:

1. Move your new generator out of generator.py and put it in speech_generator.py. The string we want in braille is likely not going to coincide with the string we want to speak.

2. Take the code you currently have in 620320 and place it directly in speech_generator._generateTextIndentation()

If you do the above, combined with the formatting string, I think you will have solved this bug and done so in a way which we can more easily expand upon later (tones instead of words, customizable braille).

Thoughts?
Comment 3 Joanmarie Diggs (IRC: joanie) 2010-06-02 02:33:25 UTC
By the way, this is something I'd like to see fixed for 2.31.3 if at all possible.
Comment 4 Jose Vilmar Estacio de Souza 2010-06-02 10:24:06 UTC
(In reply to comment #1)
> Created an attachment (id=162511) [details] [review]
> Rev 1.
> 
> Hi Jose,
> This patch seems to fix the problem for me.
> Before it will work, you need to apply the patch from bug #620320.
> 
> Thank you for your feedback.

Hi Jon.
I had problems to apply the patch, maybe I am doing something wrong.
My steps:

git branch teste
git checkout teste
git bz apply 620320
git bz apply 619306

I received the following messages:
Patch format detection failed.
Patch left in /tmp/Rev-1-H3ttk9.patch

This is my first try with bz, perhaps I am doing something wrong.
Thanks.
Comment 5 Jose Vilmar Estacio de Souza 2010-06-02 10:35:46 UTC
(In reply to comment #4)
> (In reply to comment #1)
> > Created an attachment (id=162511) [details] [review] [details] [review]
> > Rev 1.
> > 
> > Hi Jose,
> > This patch seems to fix the problem for me.
> > Before it will work, you need to apply the patch from bug #620320.
> > 
> > Thank you for your feedback.
> 
> Hi Jon.
> I had problems to apply the patch, maybe I am doing something wrong.
> My steps:
> 
> git branch teste
> git checkout teste
> git bz apply 620320
> git bz apply 619306
> 
> I received the following messages:
> Patch format detection failed.
> Patch left in /tmp/Rev-1-H3ttk9.patch
> 
> This is my first try with bz, perhaps I am doing something wrong.
> Thanks.

When I tried to apply manually I received the following:
/tmp/Rev-1-H3ttk9.patch:39: trailing whitespace.
warning: 1 line adds whitespace errors.

I confirm that the patches fix the bug.
Thanks.
Comment 6 Mesar Hameed 2010-06-02 21:34:04 UTC
Created attachment 162576 [details] [review]
Rev 2. Fix for bgo#619306 - Indentation and justification is not always spoken.

Joanie, doing as you suggested makes the patch for this smaller and 
cleaner :) Thanks!

Jose, thanks for testing it out, sorry the previous attachment was 
attached by hand, rather than git bz, and thats why git bz didnt like it.

This one also depends on the latest patch to bug #620320.
Comment 7 Jose Vilmar Estacio de Souza 2010-06-03 01:49:37 UTC
Works like a charm.
Thanks.
Comment 8 Joanmarie Diggs (IRC: joanie) 2010-06-04 18:22:34 UTC
Review of attachment 162576 [details] [review]:

LGTM. Please commit (along with/after the fix for bug 620320, of course. :-) ) Thanks!
Comment 9 Mesar Hameed 2010-06-04 20:35:46 UTC
Commited to master.
Thanks Joanie, Jose :)