/usr/share/gtk-doc/html/libpanel-applet/getting-started.settings.html is in libpanel-applet-doc 1:3.18.2-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Settings: Panel Applet Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Panel Applet Reference Manual">
<link rel="up" href="getting-started.html" title="Part II. Getting Started with the Panel Applet library">
<link rel="prev" href="getting-started.context-menu.setup.html" title="Setting Up the Menu">
<link rel="next" href="getting-started.install.html" title="Applet Registration, Installation and Build System">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="getting-started.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="getting-started.context-menu.setup.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="getting-started.install.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="getting-started.settings"></a>Settings</h2></div></div></div>
<div class="toc"><dl class="toc"><dt><span class="sect1"><a href="getting-started.settings.html#getting-started.settings.per-instance">Per Instance Settings</a></span></dt></dl></div>
<p>
There are two main design patterns to store settings for an applet:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>
Global settings: those are settings that should be shared among all instances of the same applets.
For instance, the preferred unit for temperature is something that the user will want to set only one.
The way to store those settings is in no way specific to the Panel Applet library, as it should work
like in any other application.
</p></li>
<li class="listitem"><p>
Per-applet instance settings: those are settings that might be different depending on the instance
of an applet. For instance, an applet whose goal is to display a picture should make it possible for
the user to choose a different picture for each instance of the applet. The Panel Applet library
provides API to help with this.
</p></li>
</ul></div>
<p>
There is actually a third case, which is rather rare, though: per-screen settings.
It might be that some applets control some per-screen settings, like the layout of the workspaces.
There is currently no API to help with this as it is a very specific case that you will probably
never have to deal with for a usual applet.
</p>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="getting-started.settings.per-instance"></a>Per Instance Settings</h2></div></div></div>
<p>
In order to store per instance settings for an applet it is recommended to use GSettings. The
Panel Applet Library privides a function named <code class="function">panel_applet_settings_new()</code>
for this purpose. You need to provide a GSettings schema file for your applet and the Panel
Applet library will setup the GSettings object for you.
</p>
TODO: describe settings-oriented API in more detail and give an example for per instance settings.
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>
|