| Panel Applet Library Reference Manual | ||||
|---|---|---|---|---|
Panel Applet GConf UtilitiesPanel Applet GConf Utilities — Utility methods for manipulating per-applet GConf preferences. |
#include <panel-applet-gconf.h>gchar * panel_applet_gconf_get_full_key (PanelApplet *applet, constgchar *key);gboolean panel_applet_gconf_get_bool (PanelApplet *applet, constgchar *key,GError **opt_error);gint panel_applet_gconf_get_int (PanelApplet *applet, constgchar *key,GError **opt_error);gchar * panel_applet_gconf_get_string (PanelApplet *applet, constgchar *key,GError **opt_error);gdouble panel_applet_gconf_get_float (PanelApplet *applet, constgchar *key,GError **opt_error);GSList * panel_applet_gconf_get_list (PanelApplet *applet, constgchar *key,GConfValueType list_type,GError **opt_error);GConfValue * panel_applet_gconf_get_value (PanelApplet *applet, constgchar *key,GError **opt_error);void panel_applet_gconf_set_bool (PanelApplet *applet, constgchar *key,gboolean the_bool,GError **opt_error);void panel_applet_gconf_set_int (PanelApplet *applet, constgchar *key,gint the_int,GError **opt_error);void panel_applet_gconf_set_string (PanelApplet *applet, constgchar *key, constgchar *the_string,GError **opt_error);void panel_applet_gconf_set_float (PanelApplet *applet, constgchar *key,gdouble the_float,GError **opt_error);void panel_applet_gconf_set_list (PanelApplet *applet, constgchar *key,GConfValueType list_type,GSList *list,GError **opt_error);void panel_applet_gconf_set_value (PanelApplet *applet, constgchar *key,GConfValue *value,GError **opt_error);
Applets typically define a set of preferences using a schemas
file and panel_applet_add_preferences(). Such preferences apply
only to an individual applet instance. For example, you may add
two clock applets to the panel and configure them differently.
In order for the preferences to only apply to a single applet,
each applet must have a seperate GConf key for each of these
preferences. The methods described below provide convient wrappers
around the usual
gchar * panel_applet_gconf_get_full_key (PanelApplet *applet, constgchar *key);
Access the full path for an individual per-applet GConf key. Using the returned path you may directly modify the preference using the usual GConf functions without using any of the convenience wrappers described below.
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
| Returns : | The full GConf key - free using g_free() |
gboolean panel_applet_gconf_get_bool (PanelApplet *applet, constgchar *key,GError **opt_error);
Convience wrapper for gconf_client_get_bool()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_get_bool()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
opt_error : |
Optional |
| Returns : | The bool value of the key. |
gint panel_applet_gconf_get_int (PanelApplet *applet, constgchar *key,GError **opt_error);
Convience wrapper for gconf_client_get_int()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_get_int()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
opt_error : |
Optional |
| Returns : | The integer value of the key. |
gchar * panel_applet_gconf_get_string (PanelApplet *applet, constgchar *key,GError **opt_error);
Convience wrapper for gconf_client_get_string()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_get_string()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
opt_error : |
Optional |
| Returns : | The string value of the key, or NULL |
gdouble panel_applet_gconf_get_float (PanelApplet *applet, constgchar *key,GError **opt_error);
Convience wrapper for gconf_client_get_float()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_get_float()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
opt_error : |
Optional |
| Returns : | The floating point value of the key. |
GSList * panel_applet_gconf_get_list (PanelApplet *applet, constgchar *key,GConfValueType list_type,GError **opt_error);
Convience wrapper for gconf_client_get_list()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_get_list()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
list_type : |
The GConf value type of the list elements. |
opt_error : |
Optional |
| Returns : | The list of values set for the key. |
GConfValue * panel_applet_gconf_get_value (PanelApplet *applet, constgchar *key,GError **opt_error);
Convience wrapper for gconf_client_get_value()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_get_value()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
opt_error : |
Optional |
| Returns : | The GConf value set for the key. |
void panel_applet_gconf_set_bool (PanelApplet *applet, constgchar *key,gboolean the_bool,GError **opt_error);
Convience wrapper for gconf_client_set_bool()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_set_bool()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
the_bool : |
The boolean value to set the key with. |
opt_error : |
Optional |
void panel_applet_gconf_set_int (PanelApplet *applet, constgchar *key,gint the_int,GError **opt_error);
Convience wrapper for gconf_client_set_int()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_set_int()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
the_int : |
The integer value to set the key with. |
opt_error : |
Optional |
void panel_applet_gconf_set_string (PanelApplet *applet, constgchar *key, constgchar *the_string,GError **opt_error);
Convience wrapper for gconf_client_set_string()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_set_string()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
the_string : |
The string value to set the key with. |
opt_error : |
Optional |
void panel_applet_gconf_set_float (PanelApplet *applet, constgchar *key,gdouble the_float,GError **opt_error);
Convience wrapper for gconf_client_set_float()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_set_float()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
the_float : |
The floating point value to set the key with. |
opt_error : |
Optional |
void panel_applet_gconf_set_list (PanelApplet *applet, constgchar *key,GConfValueType list_type,GSList *list,GError **opt_error);
Convience wrapper for gconf_client_set_list()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_set_list()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
list_type : |
The GConf value type of the list items. |
list : |
The list of values to set the key with. |
opt_error : |
Optional |
void panel_applet_gconf_set_value (PanelApplet *applet, constgchar *key,GConfValue *value,GError **opt_error);
Convience wrapper for gconf_client_set_value()
If you pass NULLopt_error, this function will print
a warning message from any gconf_client_set_value()
applet : |
The PanelApplet. |
key : |
The key name of the preference. |
value : |
The GConf value to set the key with. |
opt_error : |
Optional |