Blob Blame History Raw
<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" style="task" id="overview-settings" xml:lang="zh-CN">
  <info>
    <link type="guide" xref="index" group="settings"/>
    <revision version="0.1" date="2013-08-06" status="review"/>

    <credit type="author copyright">
      <name>David King</name>
      <email its:translate="no">davidk@gnome.org</email>
      <years>2013</years>
    </credit>

    <include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>

    <desc>Flexible user configuration system.</desc>
  </info>

<title>Settings management</title>

<list>
  <item>
    <p><em style="strong">High-level access for application settings</em></p>
  </item>
  <item>
    <p><em style="strong">Easily bind settings to UI elements</em></p>
  </item>
  <item>
    <p><em style="strong">Flexible overrides for packagers and system
    administrators</em></p>
  </item>
</list>

<p>Store user settings and make your application respond to them automatically
with GSettings. Easily override settings defaults as a system administrator.
Store a wide variety of data, such as integers and arrays of strings, with
ease.</p>

<section id="what">
  <title>What can you do?</title>
 
  <p>Use the <em style="strong" xref="tech-gsettings">GSettings</em> API of
  GIO to read and write <em style="strong">application settings</em>. GSettings
  <em style="strong">transparently uses the platform configuration
  database</em> so that platform-specific configuration tools can be
  used. Make <em style="strong">UI controls update according to settings</em>
  with a single function.</p>
 
</section>

<!-- TODO: Write code sample.
<section id="samples">
 <title>Code samples</title>
 <list>
  <item><p>A sample we should write</p></item>
  <item><p><link xref="samples">Moreā€¦</link></p></item>
 </list>
</section>
-->

<section id="realworld">
  <title>Real-world examples</title>
 
  <p>Nearly all GNOME applications use GSettings.</p>
  <list>
    <item>
      <p><em style="strong">Dconf editor</em> is the GUI tool for managing
      preferences stored in the dconf database with GSettings.</p>
      <p>( <link href="https://developer.gnome.org/dconf/unstable/dconf-editor.html">Website</link> | <link href="https://git.gnome.org/browse/dconf/tree/editor">Source code</link> )</p>
    </item>
  </list>
</section>
</page>