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 501414 - Orca should have (unbound) keybindings for quickly changing magnification settings
Orca should have (unbound) keybindings for quickly changing magnification set...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: magnification
2.21.x
Other All
: Normal enhancement
: 2.22.0
Assigned To: Joanmarie Diggs (IRC: joanie)
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-04 01:34 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2008-07-22 19:32 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
proposed patch (15.42 KB, patch)
2007-12-16 05:58 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2007-12-04 01:34:03 UTC
Magnification users benefit from having quick access to settings that regularly need "tweaking" as a result of switching among different documents while performing a given task. Under these circumstances, having to return to the Preferences dialog again and again is not ideal.  The addition of support for "unbound" keybindings means that we can now add these commands without having to identify and assign keystrokes which will impact all users.  Users who need this functionality can bind as they see fit.

Ranked in order of priority, with #1 being the most important IMHO. :-)

1. Increase/decrease magnification level:  
   Not all documents are written in the same font size.

2. Toggle color inversion: 
   Especially helpful on the web where the foreground and background
   colors frequently vary from site to site.

3. Toggle cross hairs:
   A user might normally like them on but find that they are covering
   up some text they are trying to read at the moment; a user might
   normally like them off but periodically lose the mouse pointer and
   want to quickly "zero in on it."

4. Toggle between full screen and a saved zoomer configuration:
   A user might want to switch to split screen to be able to see the
   layout of the original, while at the same time editing it using
   magnification.  For other tasks, full screen might be preferable.

5. Depending on what gets decided as part of bug #463881, we might
   think of other things that would be beneficial. :-)
Comment 1 Joanmarie Diggs (IRC: joanie) 2007-12-16 05:58:31 UTC
Created attachment 101041 [details] [review]
proposed patch

This patch creates the following unbound keybindings:

* Toggle color enhancements
* Toggle mouse enhancements
* Increase magnification level
* Decrese magnification level
* Cycle to the next magnifier position
* Toggle magnifier

All commands provide relevant speech output to accompany the change.

Color enhancements refers to all the color changes related to the zoomer (but not the mouse pointer).

* Border color
* Invert color
* Colorblind filter
* Brightness (basic and custom colors)
* Contrast (basic and custom colors)
* Smoothing

Mouse enhancements refers to all the changes a user can make related to the appearance of the mouse pointer.

Increase/Decrease magnification level should be self-explanatory.  The only thing worth commenting on is that these commands attempt to use "sensible" increments:

* Up to 4x, the increment is 0.25
* From 4x up to 7, the increment is 0.5
* From 7x on up, the increment is 1

Cycle to the next magnifier position moves you through all of the different zoomer positions, one position per key press.  At first I thought we could just toggle between full and custom.  But if the window you're looking at is short but really wide, you might want top/bottom half.  If it's really tall but not all that wide, you might want left/right half.  And if you're Will, you can't toggle to full screen anyway. ;-) ;-) ;-)

Speaking of the full-screen challenged, the cycling code attempts to be smart.  If we know that you're not full-screen capable, we just skip over that one.  But, if your default position is not full screen and you don't have the latest gnome-mag, we haven't worked out that you're not fullscreen capable -- and won't until you cycle into that.  Therefore you wind up with custom (because that is what comes before full screen in the cycle).  Orca then tells you "full screen mode unavailable" (as opposed to just saying "full screen" which is what it does if you're fullscreen capable).  Because Orca has now worked out the full screen mode ain't going to happen, it won't let you cycle to it again.

Toggle magnifier seemed worth doing.  It shuts gnome-mag down and starts it up.  I've worked with folks who use magnification only for very specific tasks (e.g. to see the diagrams in their document) and prefer to work with magnification off and rely upon speech the rest of the time.  Let's say you have a document with 5 diagrams in it.  Do you really want to get into and out of preferences 10 times?  Alternatively, if you use 6x magnification, you *could* press your binding for decrease magnification and work your way down to 1x (with the current "sensible" increments, that's still 15 keypresses) and press your binding for increase magnification to work your way back to 6x.  30 keypresses * 5 diagrams.... :-)

Pylinted, tested in Hardy (single and multi-head) and in Solaris (composite not enabled, using gnome-mag that's included with SNV77).

Thoughts?  And please test.  Thanks!
Comment 2 Joanmarie Diggs (IRC: joanie) 2007-12-16 06:06:18 UTC
Setting the target milestone to the 2.21.4 release because this introduces a number of new strings: keybinding and speech messages confirming the changes.  We can always work out any kinks before the final release.
Comment 3 Rich Burridge 2007-12-16 16:17:31 UTC
Tested on Ubuntu Gutsy with composite enabled.

Seems to work really nicely. Great stuff! I particularly like the 
ability to cycle between the different zoomer positions (sometimes 
the mag area just gets in the way for me if it's always on the right 
half of the screen).

I initially thought I'd found a bug in that when you use one of
these keybinding (to say increase the scale factor), the equivalent
control on the Orca Preferences magnifier pane wasn't getting set to
the new value. Then I realized that these weren't new settings that
the user wants to permanently set, so I think this is just fine.
(It's also possible that the Orca Preferences Glade GUI object(s)
might not have been instantiated at this point, and that would have
been quite a big change).

I think this is ready to check in for 2.21.4, but I'll let Will 
make that call.

Comment 4 Willie Walker 2007-12-16 16:45:58 UTC
I think this looks good.  The only thing is that a pylint regression was introduced in mag.py *somewhere* (not this patch):

************* Module orca.mag
W0621:1219:setZoomerMagFactor: Redefining name '_maxROIY' from outer scope (line
 81)
W0621:1218:setZoomerMagFactor: Redefining name '_maxROIX' from outer scope (line
 79)
W0621:1217:setZoomerMagFactor: Redefining name '_minROIY' from outer scope (line
 80)
W0621:1216:setZoomerMagFactor: Redefining name '_minROIX' from outer scope (line
 78)

To fix these, I think you just need a 'global' statement or two in setZoomerMagFactor.  If you want to tuck those into this patch, it's fine.  Otherwise, just please fix the pylint regressions -- there's no need to open a separate bug.
Comment 5 Joanmarie Diggs (IRC: joanie) 2007-12-16 17:20:03 UTC
Thanks guys!!  Patch committed.  Moving to [pending].

I caught and fixed those pylint regressions yesterday.  My apologies for letting them sneak in in the first place.
Comment 6 Willie Walker 2008-01-04 22:00:38 UTC
I think you can close this one as FIXED.  These are definitely cool to have.  Thanks!
Comment 7 Joanmarie Diggs (IRC: joanie) 2008-01-04 23:32:59 UTC
Thanks!  Closing as FIXED.