![]() |
![]() |
![]() |
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, const gchar *key); gboolean panel_applet_gconf_get_bool (PanelApplet *applet, const gchar *key, GError **opt_error); gint panel_applet_gconf_get_int (PanelApplet *applet, const gchar *key, GError **opt_error); gchar* panel_applet_gconf_get_string (PanelApplet *applet, const gchar *key, GError **opt_error); gdouble panel_applet_gconf_get_float (PanelApplet *applet, const gchar *key, GError **opt_error); GSList* panel_applet_gconf_get_list (PanelApplet *applet, const gchar *key, GConfValueType list_type, GError **opt_error); GConfValue* panel_applet_gconf_get_value (PanelApplet *applet, const gchar *key, GError **opt_error); void panel_applet_gconf_set_bool (PanelApplet *applet, const gchar *key, gboolean the_bool, GError **opt_error); void panel_applet_gconf_set_int (PanelApplet *applet, const gchar *key, gint the_int, GError **opt_error); void panel_applet_gconf_set_string (PanelApplet *applet, const gchar *key, const gchar *the_string, GError **opt_error); void panel_applet_gconf_set_float (PanelApplet *applet, const gchar *key, gdouble the_float, GError **opt_error); void panel_applet_gconf_set_list (PanelApplet *applet, const gchar *key, GConfValueType list_type, GSList *list, GError **opt_error); void panel_applet_gconf_set_value (PanelApplet *applet, const gchar *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 GConfClient functions and operate on these per-applet keys.
gchar* panel_applet_gconf_get_full_key (PanelApplet *applet, const gchar *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.
|
The PanelApplet. |
|
The key name of the preference. |
Returns : |
The full GConf key - free using g_free() .
|
gboolean panel_applet_gconf_get_bool (PanelApplet *applet, const gchar *key, GError **opt_error);
Convience wrapper for gconf_client_get_bool()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_get_bool()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
Optional GError**. |
Returns : |
The bool value of the key. |
gint panel_applet_gconf_get_int (PanelApplet *applet, const gchar *key, GError **opt_error);
Convience wrapper for gconf_client_get_int()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_get_int()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
Optional GError**. |
Returns : |
The integer value of the key. |
gchar* panel_applet_gconf_get_string (PanelApplet *applet, const gchar *key, GError **opt_error);
Convience wrapper for gconf_client_get_string()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_get_string()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
Optional GError**. |
Returns : |
The string value of the key, or NULL if unset.
|
gdouble panel_applet_gconf_get_float (PanelApplet *applet, const gchar *key, GError **opt_error);
Convience wrapper for gconf_client_get_float()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_get_float()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
Optional GError**. |
Returns : |
The floating point value of the key. |
GSList* panel_applet_gconf_get_list (PanelApplet *applet, const gchar *key, GConfValueType list_type, GError **opt_error);
Convience wrapper for gconf_client_get_list()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_get_list()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
The GConf value type of the list elements. |
|
Optional GError**. |
Returns : |
The list of values set for the key. |
GConfValue* panel_applet_gconf_get_value (PanelApplet *applet, const gchar *key, GError **opt_error);
Convience wrapper for gconf_client_get_value()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_get_value()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
Optional GError**. |
Returns : |
The GConf value set for the key. |
void panel_applet_gconf_set_bool (PanelApplet *applet, const gchar *key, gboolean the_bool, GError **opt_error);
Convience wrapper for gconf_client_set_bool()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_set_bool()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
The boolean value to set the key with. |
|
Optional GError**. |
void panel_applet_gconf_set_int (PanelApplet *applet, const gchar *key, gint the_int, GError **opt_error);
Convience wrapper for gconf_client_set_int()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_set_int()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
The integer value to set the key with. |
|
Optional GError**. |
void panel_applet_gconf_set_string (PanelApplet *applet, const gchar *key, const gchar *the_string, GError **opt_error);
Convience wrapper for gconf_client_set_string()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_set_string()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
The string value to set the key with. |
|
Optional GError**. |
void panel_applet_gconf_set_float (PanelApplet *applet, const gchar *key, gdouble the_float, GError **opt_error);
Convience wrapper for gconf_client_set_float()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_set_float()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
The floating point value to set the key with. |
|
Optional GError**. |
void panel_applet_gconf_set_list (PanelApplet *applet, const gchar *key, GConfValueType list_type, GSList *list, GError **opt_error);
Convience wrapper for gconf_client_set_list()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_set_list()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
The GConf value type of the list items. |
|
The list of values to set the key with. |
|
Optional GError**. |
void panel_applet_gconf_set_value (PanelApplet *applet, const gchar *key, GConfValue *value, GError **opt_error);
Convience wrapper for gconf_client_set_value()
which operates
on the individual per-applet key.
If you pass NULL
for opt_error
, this function will print
a warning message from any GError which gconf_client_set_value()
returns.
|
The PanelApplet. |
|
The key name of the preference. |
|
The GConf value to set the key with. |
|
Optional GError**. |