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 642032 - Add magnifier schemas and make them nicer
Add magnifier schemas and make them nicer
Status: RESOLVED FIXED
Product: gsettings-desktop-schemas
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gsettings-desktop-schemas-maint
gsettings-desktop-schemas-maint
Depends on:
Blocks: 642034
 
 
Reported: 2011-02-10 14:34 UTC by Thomas Wood
Modified: 2011-06-22 15:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (6.30 KB, patch)
2011-02-10 14:34 UTC, Thomas Wood
none Details | Review
Updated patch (6.30 KB, patch)
2011-02-10 14:50 UTC, Thomas Wood
needs-work Details | Review
Substitute GETTEXT_PACKAGE in schemas (861 bytes, patch)
2011-02-10 16:27 UTC, Thomas Wood
committed Details | Review
Updated patch with new enums (8.02 KB, patch)
2011-02-10 16:30 UTC, Thomas Wood
committed Details | Review

Description Thomas Wood 2011-02-10 14:34:51 UTC
Created attachment 180584 [details] [review]
Patch

Add magnifier schemas so that they can be shared between Shell and the Universal Access settings panel.
Comment 1 Thomas Wood 2011-02-10 14:42:10 UTC
This also needs the magnifier schemas being removed from gnome-shell at the same time, since they conflict.
Comment 2 Thomas Wood 2011-02-10 14:50:39 UTC
Created attachment 180593 [details] [review]
Updated patch
Comment 3 Bastien Nocera 2011-02-10 15:01:21 UTC
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.
Comment 4 Thomas Wood 2011-02-10 15:51:08 UTC
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?
Comment 5 Bastien Nocera 2011-02-10 15:56:00 UTC
(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.
Comment 6 Thomas Wood 2011-02-10 16:27:48 UTC
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.
Comment 7 Thomas Wood 2011-02-10 16:30:08 UTC
Created attachment 180602 [details] [review]
Updated patch with new enums
Comment 8 Bastien Nocera 2011-02-10 16:37:21 UTC
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?
Comment 9 Bastien Nocera 2011-02-10 16:38:00 UTC
Review of attachment 180602 [details] [review]:

Looks good.
Comment 10 Christian Persch 2011-02-10 16:56:21 UTC
+          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)).
Comment 11 Thomas Wood 2011-02-11 17:07:53 UTC
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.
Comment 12 Christian Persch 2011-02-11 17:09:44 UTC
Any response to comment 10 ?
Comment 13 Thomas Wood 2011-02-11 17:14:37 UTC
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.
Comment 14 Bastien Nocera 2011-02-12 15:35:09 UTC
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.
Comment 15 Joseph Scheuhammer 2011-02-13 06:46:45 UTC
(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.
Comment 16 Bastien Nocera 2011-06-22 15:04:43 UTC
commit bf42692dd7b6ec2b07b680082e2cdfe648940b36
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed Jun 22 16:04:18 2011 +0100

    schemas: More tweaks to magnifier schemas