desktop schemas review [was: Re: GSettings migration status]


I think we should use the opportunity of converting to gsettings to
redesign the desktop schemas, not just do a 1:1 translation from gconf.

Let me make some remarks about the gsettings desktop schemas as
they right now are in gsettings-desktop-schemas module.


    <key name="picture-options"
<default>'zoom'</default> <summary>Picture Options</summary>
      <description>Determines how the image set by wallpaper_filename
is rendered.  Possible values are "none", "wallpaper", "centered",
"scaled", "stretched", "zoom", "spanned".</description> </key>

I don't think we need to enumerate all choices in the <description>
here. With gsettings, the valid values are stored in the schema via the
enum, so this is unnecessary work for translators, and superflous.

Coincidentally, taking a look at all the <summary> and <description>
strings, it seems to me that once these value enumerations are taken
out, not too much remains that justifies the split between two strings.
IMHO we should consider dropping <summary> from gschema and only
provide for the one <description> strings.

    <key name="picture-filename" type="s">
      <summary>Picture Filename</summary>
      <description>File to use for the background image.</description>

This is a common error. Filenames need to be stored as "ay" and *NOT*
"s" (since "s" is UTF-8). (I think this needs some enhancement in
glib-compile-schemas to be able to still put a string in <default>.)

    <key name="picture-opacity" type="i">
      <range min="0" max="100"/>
      <summary>Picture Opacity</summary>
      <description>Opacity with which to draw the background
    picture.</description> </key>

IMHO, should be a "d" with <range min=0.0 max=1.0> instead.

Also, I wonder if all the picture-* keys should be inside a child schema



Looks like this should use a settings list, with a base schema
containing "exec", "needs-term" (should be "needs-terminal" as below)
keys, and an extended schema for the browser settings adding the
"nremote" key.

    <key name="exec" type="s">
      <summary>Default browser</summary>
      <description>Default browser for all URLs.</description>

I wonder if we should support "as" as argv here, instead. Also, whether
this should be "ay" (or "aay") since technically, programme names need
not be UTF-8.



Looks ok, but maybe the keys could be named more consistently.



I wonder if this schema should simply contain a flag setting, instead
of several boolean lockdown settings?



This should be a settings list, with a base schema for the "enabled",
"exec" and "needs-terminal" keys; actually the same base schema as the
default-applications schemas above.



Should use a settings list for the various (http/https/ftp/socks)

Maybe the developers working on GIO proxy support could look at this
schema and see if it maps nicely to what their code supports ?

    <key name="host" type="s">
      <summary>HTTP proxy host name</summary>
      <description>The machine name to proxy HTTP through.</description>
    <key name="port" type="i">
      <range min="0" max="65535"/>
      <summary>HTTP proxy port</summary>
      <description>The port on the machine defined by
    "/system/proxy/http/host" that you proxy through.</description>

IMHO this is _one_ setting that belongs together, as a "(sq)" tuple
(string, uint16).


Finally, I'd like to suggest that gsettings-desktop-schemas install a
header file containing #define's for each schema ID, schema, path and
all the key names.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]