GNOME Bugzilla – Bug 642032
Add magnifier schemas and make them nicer
Last modified: 2011-06-22 15:04:43 UTC
Created attachment 180584 [details] [review] Patch Add magnifier schemas so that they can be shared between Shell and the Universal Access settings panel.
This also needs the magnifier schemas being removed from gnome-shell at the same time, since they conflict.
Created attachment 180593 [details] [review] Updated patch
Review of attachment 180593 [details] [review]: You add translations, but didn't update POTFILES.in ::: schemas/org.gnome.desktop.a11y.magnifier.gschema.xml.in.in @@ +1,3 @@ +<schemalist> + + <enum id="MouseTrackingMode"> enums are declared in the gdesktop-enums.h file. @@ +8,3 @@ + </enum> + + <enum id="ScreenPosition"> ditto.
Review of attachment 180593 [details] [review]: The updated patch was supposed to include updated POTFILES.in and POTFILES.skip, but it seems it somehow got missed. What name space should the enums use?
(In reply to comment #4) > Review of attachment 180593 [details] [review]: > > The updated patch was supposed to include updated POTFILES.in and > POTFILES.skip, but it seems it somehow got missed. > > What name space should the enums use? GDesktop, so probably GDesktopMagnifier in this case.
Created attachment 180601 [details] [review] Substitute GETTEXT_PACKAGE in schemas Substitute GETTEXT_PACKAGE in the schemas to ensure the correct gettext-domain is used. This is used in the magnifier schema and also in the screensaver schema.
Created attachment 180602 [details] [review] Updated patch with new enums
Review of attachment 180601 [details] [review]: Could you also change the xml.in.in files that don't have a GETTEXT_PACKAGE right now to have one?
Review of attachment 180602 [details] [review]: Looks good.
+ path="/desktop/gnome/a11y/magnifier/" I thought it was agreed that schemas should use paths of the form /org/gnome/foo/bar/ ? + <key name="mag-factor" type="d"> + <default>2.0</default> Probably should add some <range min=... max=...> for this to limit the factor to sensible values. + <key name="cross-hairs-thickness" type="i"> + <default>8</default> And for this. + <key name="cross-hairs-opacity" type="i"> + <default>169</default> + <_summary>Opacity of the crosshairs</_summary> + <_description> + Determines the transparency of the crosshairs, from fully opaque + to fully transparent. + </_description> + </key> IMHO this should be "d" with range 0.0 .. 1.0 instead of integer with some unspecified range. + <key name="cross-hairs-length" type="i"> + <default>4096</default> + <_summary>Length of the crosshairs</_summary> + <_description> + Determines the length of the vertical and horizontal lines that + make up the crosshairs. + </_description> + </key> Is that in pixels? If so, at least the description should say so. Also, a range (limiting to 16 bit ints, and positive ?) (or just using type "q" (uint16)).
I've pushed the two patches since the main purpose of this change was to move the schemas from gnome-shell to gsettings-desktop-schemas so that they could be shared between other applications.
Any response to comment 10 ?
Adding Joseph Scheuhammer to CC list, who has been working on the magnifier in gnome-shell and may be able to comment on the schema details.
Fixed the first 2: commit 6e409111044577d34f1f73f1694af60100abc617 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Feb 12 15:31:12 2011 +0000 schemas: Use value between 0 and 1 for opacity Changes the type to double, and the range between 0 and 1. commit 520d2abffbdf3819c8dfa7f6afe9ba8935b346c9 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Feb 12 15:16:55 2011 +0000 schemas: Fix schemas path in a11y schemas Not sure what to do with the cross-hairs-length. I filed bug 642175 for gnome-shell.
(In reply to comment #10) > + <key name="mag-factor" type="d"> > + <default>2.0</default> > > Probably should add some <range min=... max=...> for this to limit the factor > to sensible values. The common range for low vision users is [1.0, 32.0]. But, it's undesirable to exclude minification, in which case the theoretical range is (0, 32.0]. Probably [0.1, 32.0] would suffice for all uses. > > + <key name="cross-hairs-thickness" type="i"> > + <default>8</default> > > And for this. The dialog I wrote to test the magnifier settings uses a range of [1, 100] pixels. > > + <key name="cross-hairs-opacity" type="i"> > + <default>169</default> > + <_summary>Opacity of the crosshairs</_summary> > + <_description> > + Determines the transparency of the crosshairs, from fully opaque > + to fully transparent. > + </_description> > + </key> > > IMHO this should be "d" with range 0.0 .. 1.0 instead of integer with some > unspecified range. The value space was based on the way Clutter represents opacity, namely, [0,255]. Whether to use that or [0.0, 1.0] depends on how user friendly the settings are. I have no objection to changing it to [0.0, 1.0]; in fact I prefer it. However, that's moot, since Bastien has already made the change :-). > > + <key name="cross-hairs-length" type="i"> > + <default>4096</default> > + <_summary>Length of the crosshairs</_summary> > + <_description> > + Determines the length of the vertical and horizontal lines that > + make up the crosshairs. > + </_description> > + </key> > > Is that in pixels? If so, at least the description should say so. Also, a range > (limiting to 16 bit ints, and positive ?) (or just using type "q" (uint16)). It is pixels. My dialog uses a range of [20, 4096], and the length is never negative, so a uin1t6 works. The low end needs to be large enough such that the crosshairs appear as more than just noise especially when cross-hairs-clip is 'true'. The purpose of the high end is to make the crosshairs appear infinite stretching full across the screen regardless of the mouse location. To achieve that, cross-hairs-length must be twice the size of the larger of the width or height of the screen. I don't know how to express that in the schema, or even if one can.
commit bf42692dd7b6ec2b07b680082e2cdfe648940b36 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Jun 22 16:04:18 2011 +0100 schemas: More tweaks to magnifier schemas