[gpointing-device-settings] add gpds_ui_set-get_gconf_float().



commit ed32af013ec7893b8bb6e96370c6822d348d6086
Author: Hiroyuki Ikezoe <poincare ikezoe net>
Date:   Thu Jan 14 19:13:45 2010 +0900

    add gpds_ui_set-get_gconf_float().

 src/gpds-ui.c |   31 +++++++++++++++++++++++++++++++
 src/gpds-ui.h |    6 ++++++
 2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/src/gpds-ui.c b/src/gpds-ui.c
index cc8b933..7be5672 100644
--- a/src/gpds-ui.c
+++ b/src/gpds-ui.c
@@ -352,6 +352,37 @@ gpds_ui_get_gconf_int (GpdsUI *ui, const gchar *key, gint *value)
 }
 
 void
+gpds_ui_set_gconf_float (GpdsUI *ui, const gchar *key, gdouble 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_float(priv->gconf, gconf_key, value, NULL);
+    g_free(gconf_key);
+}
+
+gboolean
+gpds_ui_get_gconf_float (GpdsUI *ui, const gchar *key, gdouble *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);
+    exist_value =gpds_gconf_get_float(priv->gconf, gconf_key, value);
+    g_free(gconf_key);
+
+    return exist_value;
+}
+
+void
 gpds_ui_set_gconf_string (GpdsUI *ui, const gchar *key, const gchar *value)
 {
     gchar *gconf_key;
diff --git a/src/gpds-ui.h b/src/gpds-ui.h
index 9f92dbe..d575659 100644
--- a/src/gpds-ui.h
+++ b/src/gpds-ui.h
@@ -86,6 +86,12 @@ void         gpds_ui_set_gconf_int        (GpdsUI *ui,
 gboolean     gpds_ui_get_gconf_int        (GpdsUI *ui,
                                            const gchar *key,
                                            gboolean *value);
+void         gpds_ui_set_gconf_float      (GpdsUI *ui,
+                                           const gchar *key,
+                                           gdouble value);
+gboolean     gpds_ui_get_gconf_float      (GpdsUI *ui,
+                                           const gchar *key,
+                                           gdouble *value);
 void         gpds_ui_set_gconf_string     (GpdsUI *ui,
                                            const gchar *key,
                                            const gchar *value);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]