migration docs tweaks

This commit is contained in:
Ryan Lortie 2010-04-16 23:59:41 -04:00
parent dbe65858b2
commit 9e59edacf7

View File

@ -170,7 +170,9 @@ start_monitoring_trash (void)
GSettings can be done at will. But desktop-wide settings like font or GSettings can be done at will. But desktop-wide settings like font or
theme settings often have consumers in multiple modules. Therefore, theme settings often have consumers in multiple modules. Therefore,
some consideration has to go into making sure that all users of a setting some consideration has to go into making sure that all users of a setting
are converted to GSettings at the same time. are converted to GSettings at the same time or that the program
responsible for configuring that setting continues to update the value in
both places.
</para> </para>
</section> </section>
@ -270,7 +272,7 @@ start_monitoring_trash (void)
<section><title>Change sets</title> <section><title>Change sets</title>
<para> <para>
GConf has a a concept of a set of changes with can be applied or reverted GConf has a a concept of a set of changes which can be applied or reverted
at once: #GConfChangeSet (GConf doesn't actually apply changes atomically, at once: #GConfChangeSet (GConf doesn't actually apply changes atomically,
which is one of its shortcomings). which is one of its shortcomings).
</para> </para>
@ -285,7 +287,7 @@ start_monitoring_trash (void)
<para> <para>
To apply the pending changes all at once (GSettings <emphasis>does</emphasis> To apply the pending changes all at once (GSettings <emphasis>does</emphasis>
atomicity here), call g_settings_apply(). To revert the pending changes, atomicity here), call g_settings_apply(). To revert the pending changes,
call g_settings_revert(). call g_settings_revert() or just drop the reference to the #GSettings object.
</para> </para>
</section> </section>
@ -294,9 +296,9 @@ start_monitoring_trash (void)
<para> <para>
One possible pitfall in doing schema conversion is that the default One possible pitfall in doing schema conversion is that the default
values in GSettings schemas are in the format of a serialized #GVariant, values in GSettings schemas are parsed by the #GVariant parser.
and the types are specified as #GVariant type strings. This means that strings need to include quotes in the XML. Also note
This means that strings need to include quotes in the XML, so that the types are now specified as #GVariant type strings.
<programlisting> <programlisting>
<![CDATA[ <![CDATA[
<type>string</type> <type>string</type>
@ -306,8 +308,8 @@ start_monitoring_trash (void)
becomes becomes
<programlisting> <programlisting>
<![CDATA[ <![CDATA[
<key name="rgba_order" type="s"> <key name="rgba-order" type="s">
<default>'rgb'</default> <default>'rgb'</default> <!-- note quotes -->
</key> </key>
]]> ]]>
</programlisting> </programlisting>
@ -348,7 +350,7 @@ start_monitoring_trash (void)
becomes becomes
<programlisting> <programlisting>
<![CDATA[ <![CDATA[
<key name="font_size" type="i"> <key name="font-size" type="i">
<default l10n="messages" context="font_size">18</default> <default l10n="messages" context="font_size">18</default>
</key> </key>
]]> ]]>
@ -367,9 +369,10 @@ start_monitoring_trash (void)
The <link linkend="gschema-compile">gschema-compile</link> schema The <link linkend="gschema-compile">gschema-compile</link> schema
compiler has a <option>--allow-any-name</option> that lets you compiler has a <option>--allow-any-name</option> that lets you
ignore these restrictions. Note that this option is only meant ignore these restrictions. Note that this option is only meant
to facilitate the migration from GConf, and you should make your to ease the process of porting your application, allowing parts
key names follow the more stringent GSettings rules when you of your application to continue to access GConf and parts to use
migrate your data from GConf to dconf. GSettings. By the time you have finished porting your application
you must ensure that all key names are valid.
</para> </para>
<para> <para>
GIO comes with a commandline tool GIO comes with a commandline tool