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 523268 - Clean up braille attributes code
Clean up braille attributes code
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: braille
unspecified
Other Linux
: Normal enhancement
: 2.24.0
Assigned To: Eitan Isaacson
Orca Maintainers
Depends on:
Blocks: 520612
 
 
Reported: 2008-03-18 23:15 UTC by Eitan Isaacson
Modified: 2009-03-10 00:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (9.85 KB, patch)
2008-03-18 23:28 UTC, Eitan Isaacson
reviewed Details | Review
Proposed patch (11.65 KB, patch)
2008-03-25 23:35 UTC, Eitan Isaacson
accepted-commit_now Details | Review

Description Eitan Isaacson 2008-03-18 23:15:35 UTC
The current Text.getAttributeMask() method in braille.py is longer than it really needs to be. It also does some toolkit specific operations directly. These stuff should be delegated to the scripts for proper handling.
Comment 1 Eitan Isaacson 2008-03-18 23:28:11 UTC
Created attachment 107576 [details] [review]
Proposed patch

This patch cleans up the code a bit, and delegates all the appropriate operations to the script.
Comment 2 Willie Walker 2008-03-19 16:11:33 UTC
Joanie - you added the braille attributes code.  When you get time, can you please take a look at this patch?  Delegating to the script seems like the right thing to do.
Comment 3 Joanmarie Diggs (IRC: joanie) 2008-03-20 21:48:02 UTC
Yup, Eitan and I talked about this at CSUN.  Seems to do the right thing and is a lot cleaner. Thanks Eitan!
Comment 4 Willie Walker 2008-03-20 22:01:16 UTC
(In reply to comment #3)
> Yup, Eitan and I talked about this at CSUN.  Seems to do the right thing and is
> a lot cleaner. Thanks Eitan!
> 

Cool.  So...I didn't wrap my mind around the original implementation, and we don't really have any good tests for it.  So...on this one...Joanie, Eitan, Mike, can you test with the new patch and get a decent feeling about the code?  The patch seems good to me (modulo lint and testing).  If it pylints well and tests well, I say commit.  Thanks!
Comment 5 Eitan Isaacson 2008-03-25 23:35:46 UTC
Created attachment 108032 [details] [review]
Proposed patch

This does a minor tweak in StarOffice, removes a warning about a differing method signature on an override. And thus we get a pylint score of 10.00.
Comment 6 Eitan Isaacson 2008-03-25 23:47:26 UTC
OK, committed to trunk. Thanks y'all.
Comment 7 Mike Pedersen 2008-03-26 02:36:31 UTC
This patch seems to have broken the speaking of the addressbar in firefox.  Open firefox and press CTRL+l to get to the address bar.  Notice that you hear nothing after updating  orca to the release containing this patch.   
Comment 8 Eitan Isaacson 2008-03-26 04:00:03 UTC
Damn. Crises mode...

Obviously this was premature. I will post here once I get a fix in trunk.
Comment 9 Eitan Isaacson 2008-03-26 04:31:16 UTC
Ok, I fixed this in trunk. Sorry about that.
I hope I didn't introduce any other trouble.
Comment 10 Mike Pedersen 2008-03-26 14:48:36 UTC
This checkin seems to have an error in braille.py and orca will not run! 
Comment 11 Joanmarie Diggs (IRC: joanie) 2008-03-26 16:32:34 UTC
Eitan, I took a look at the error Mike reported and the patch. This was in your patch:

@@ -613,7 +613,11 @@
 
 
         if self.label:
+<<<<<<< HEAD:src/orca/braille.py
             regionMask = [0]*len(self.label) + mask
+=======
+            regionMask = [0]*len(self.label) + regionMask
+>>>>>>> brl_attributes_cleanup:src/orca/braille.py
 
         return ''.join(map(chr, regionMask))


So I got rid of the bogus lines.  That at least gets trunk working again.  The location bar does the right thing.  A very cursory glance at other things related to selection and attributes hasn't turned up any problems.  But I want to stress *very* cursory.
Comment 12 Mike Pedersen 2008-03-26 18:15:56 UTC
Joanie, thanks a lot for making trunk functional again.  (smile)   I haven't noticed any problem with your changes yet.  
Comment 13 Eitan Isaacson 2008-03-28 17:13:04 UTC
Ok, so this has been in trunk for two days, and we only had two major breakages.
I think it's time to close it ;)
Comment 14 Mike Pedersen 2008-03-29 21:01:31 UTC
This can't be closed because the functionality does not work in trunk.  
Comment 15 Willie Walker 2008-03-29 21:28:31 UTC
Reopening per Mike's comments.
Comment 16 Eitan Isaacson 2008-04-03 22:20:50 UTC
Reclosing per Mike's phone comments.