gpointing-device-settings r144 - trunk/src
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gpointing-device-settings r144 - trunk/src
- Date: Sat, 7 Mar 2009 05:52:45 +0000 (UTC)
Author: hiikezoe
Date: Sat Mar 7 05:52:45 2009
New Revision: 144
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=144&view=rev
Log:
added +gpds_ui_set_gconf_string.
Modified:
trunk/src/gpds-ui.c
trunk/src/gpds-ui.h
Modified: trunk/src/gpds-ui.c
==============================================================================
--- trunk/src/gpds-ui.c (original)
+++ trunk/src/gpds-ui.c Sat Mar 7 05:52:45 2009
@@ -359,6 +359,43 @@
return exist_value;
}
+void
+gpds_ui_set_gconf_string (GpdsUI *ui, const gchar *key, const gchar *value)
+{
+ gchar *gconf_key;
+ GpdsUIPriv *priv;
+
+ g_return_if_fail(GPDS_IS_UI(ui));
+
+ priv = GPDS_UI_GET_PRIVATE(ui);
+ gconf_key = build_gconf_key(ui, key);
+ gconf_client_set_string(priv->gconf, gconf_key, value, NULL);
+ g_free(gconf_key);
+}
+
+gboolean
+gpds_ui_get_gconf_string (GpdsUI *ui, const gchar *key, const gchar **value)
+{
+ GConfValue *gconf_value;
+ gchar *gconf_key;
+ gboolean exist_value = FALSE;
+ GpdsUIPriv *priv;
+
+ g_return_val_if_fail(GPDS_IS_UI(ui), FALSE);
+
+ priv = GPDS_UI_GET_PRIVATE(ui);
+ gconf_key = build_gconf_key(ui, key);
+ gconf_value = gconf_client_get(priv->gconf, gconf_key, NULL);
+ if (gconf_value) {
+ *value = gconf_value_get_string(gconf_value);
+ gconf_value_free(gconf_value);
+ exist_value = TRUE;
+ }
+ g_free(gconf_key);
+
+ return exist_value;
+}
+
/*
vi:ts=4:nowrap:ai:expandtab:sw=4
*/
Modified: trunk/src/gpds-ui.h
==============================================================================
--- trunk/src/gpds-ui.h (original)
+++ trunk/src/gpds-ui.h Sat Mar 7 05:52:45 2009
@@ -85,6 +85,12 @@
gboolean gpds_ui_get_gconf_int (GpdsUI *ui,
const gchar *key,
gboolean *value);
+void gpds_ui_set_gconf_string (GpdsUI *ui,
+ const gchar *key,
+ const gchar *value);
+gboolean gpds_ui_get_gconf_string (GpdsUI *ui,
+ const gchar *key,
+ const gchar **value);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]