]> git.0d.be Git - empathy.git/commitdiff
Move empathy-conf to libempathy-gtk. libempathy do not depend directly on gconf anymore.
authorXavier Claessens <xclaesse@src.gnome.org>
Wed, 23 Jan 2008 13:16:06 +0000 (13:16 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Wed, 23 Jan 2008 13:16:06 +0000 (13:16 +0000)
svn path=/trunk/; revision=597

24 files changed:
configure.ac
docs/libempathy-gtk/libempathy-gtk-docs.sgml
docs/libempathy/libempathy-docs.sgml
libempathy-gtk/Makefile.am
libempathy-gtk/empathy-avatar-chooser.c
libempathy-gtk/empathy-chat-view.c
libempathy-gtk/empathy-chat-window.c
libempathy-gtk/empathy-chat.c
libempathy-gtk/empathy-conf.c [new file with mode: 0644]
libempathy-gtk/empathy-conf.h [new file with mode: 0644]
libempathy-gtk/empathy-group-chat.c
libempathy-gtk/empathy-main-window.c
libempathy-gtk/empathy-preferences.c
libempathy-gtk/empathy-spell.c
libempathy-gtk/empathy-status-icon.c
libempathy-gtk/empathy-theme-manager.c
libempathy-gtk/empathy-theme.c
libempathy/Makefile.am
libempathy/empathy-conf.c [deleted file]
libempathy/empathy-conf.h [deleted file]
python/pyempathy/pyempathy.defs
python/pyempathy/pyempathy.override
python/pyempathygtk/pyempathygtk.defs
python/pyempathygtk/pyempathygtk.override

index 1d0c5b13edf29891ee00f67d4792449eddfd757a..3ed9516595b14b0d26bbdd16e7bbe09f25a297cd 100644 (file)
@@ -73,7 +73,6 @@ PKG_CHECK_MODULES(LIBEMPATHY,
 [
    glib-2.0 >= $GLIB_REQUIRED
    gobject-2.0
-   gconf-2.0 >= $GCONF_REQUIRED
    libxml-2.0
    libtelepathy >= $TELEPATHY_REQUIRED
    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
index df56e2784f2cd066d59d056f0843042d707166cc..774f051464bb789a425f9818f506c311e749c5ea 100644 (file)
@@ -33,6 +33,7 @@
     <xi:include href="xml/empathy-chat.xml"/>
     <xi:include href="xml/empathy-chat-view.xml"/>
     <xi:include href="xml/empathy-chat-window.xml"/>
+    <xi:include href="xml/empathy-conf.xml"/>
     <xi:include href="xml/empathy-contact-dialogs.xml"/>
     <xi:include href="xml/empathy-contact-list-store.xml"/>
     <xi:include href="xml/empathy-contact-list-view.xml"/>
index 5aa6819d1eecaf60637e6b7cbf327669749af884..bcdc5d0ff87fb8601357cd639154d0c4a851d29e 100644 (file)
@@ -20,7 +20,6 @@
       <xi:include href="xml/empathy-chandler.xml"/>
       <xi:include href="xml/empathy-chatroom-manager.xml"/>
       <xi:include href="xml/empathy-chatroom.xml"/>
-      <xi:include href="xml/empathy-conf.xml"/>
       <xi:include href="xml/empathy-contact-factory.xml"/>
       <xi:include href="xml/empathy-contact-groups.xml"/>
       <xi:include href="xml/empathy-contact-list.xml"/>
index 721bd82e22e5e2f0b57617e30f3f64e508f8173e..083065f8107d3caad4af37788317dfe32b59782b 100644 (file)
@@ -15,6 +15,7 @@ libempathy_gtk_la_SOURCES =                   \
        ephy-spinner.c ephy-spinner.h           \
        empathy-main-window.c                   \
        empathy-status-icon.c                   \
+       empathy-conf.c                          \
        empathy-contact-widget.c                \
        empathy-contact-dialogs.c               \
        empathy-accounts-dialog.c               \
@@ -69,6 +70,7 @@ libempathy_gtk_headers =                      \
        empathy-images.h                        \
        empathy-main-window.h                   \
        empathy-status-icon.h                   \
+       empathy-conf.h                          \
        empathy-contact-widget.h                \
        empathy-contact-dialogs.h               \
        empathy-accounts-dialog.h               \
index 348186a6cf30692ddbc291a24e3a0fbc0a3c8f24..ba557787c00aaa87eff3c00ac57e4fb2d3209dda 100644 (file)
 #include <libgnomevfs/gnome-vfs-ops.h>
 
 #include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-conf.h>
+
 
 #include "empathy-avatar-chooser.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-ui-utils.h"
 
index d6c85606f2fbc90e61e4461abd10d1113599dc90..f4ad7f316c4a3848f9fbe74cd2e9052478c5f22a 100644 (file)
 
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-conf.h>
 
 #include "empathy-chat-view.h"
 #include "empathy-chat.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-theme-manager.h"
 #include "empathy-ui-utils.h"
index b6409f6a8f30c404ae7b79c88bbcce40d2ad50b9..5acddc1e6c0e0d8ec27692a9a254cf3e4dda41df 100644 (file)
@@ -43,7 +43,6 @@
 #include <libempathy/empathy-contact.h>
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-message.h>
-#include <libempathy/empathy-conf.h>
 #include <libempathy/empathy-utils.h>
 
 #include "empathy-chat-window.h"
@@ -52,6 +51,7 @@
 #include "empathy-contact-dialogs.h"
 #include "empathy-log-window.h"
 #include "empathy-new-chatroom-dialog.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-private-chat.h"
 #include "empathy-group-chat.h"
index d07b84b0741b4e762284b5cc8d6da8282698d90b..fbdf6df44f7dfd433ea040dc5bbdff047069490f 100644 (file)
 #include <libempathy/empathy-log-manager.h>
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-conf.h>
 #include <libempathy/empathy-marshal.h>
 
 #include "empathy-chat.h"
 #include "empathy-chat-window.h"
 #include "empathy-geometry.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-spell.h"
 #include "empathy-spell-dialog.h"
diff --git a/libempathy-gtk/empathy-conf.c b/libempathy-gtk/empathy-conf.c
new file mode 100644 (file)
index 0000000..1ec3fee
--- /dev/null
@@ -0,0 +1,373 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2006 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Richard Hult <richard@imendio.com>
+ */
+
+#include "config.h"
+
+#include <string.h>
+
+#include <gconf/gconf-client.h>
+
+#include <libempathy/empathy-debug.h>
+
+#include "empathy-conf.h"
+
+#define DEBUG_DOMAIN "Config"
+
+#define EMPATHY_CONF_ROOT       "/apps/empathy"
+#define DESKTOP_INTERFACE_ROOT  "/desktop/gnome/interface"
+
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CONF, EmpathyConfPriv))
+
+typedef struct {
+       GConfClient *gconf_client;
+} EmpathyConfPriv;
+
+typedef struct {
+       EmpathyConf           *conf;
+       EmpathyConfNotifyFunc  func;
+       gpointer               user_data;
+} EmpathyConfNotifyData;
+
+static void conf_finalize (GObject *object);
+
+G_DEFINE_TYPE (EmpathyConf, empathy_conf, G_TYPE_OBJECT);
+
+static EmpathyConf *global_conf = NULL;
+
+static void
+empathy_conf_class_init (EmpathyConfClass *class)
+{
+       GObjectClass *object_class;
+
+       object_class = G_OBJECT_CLASS (class);
+
+       object_class->finalize = conf_finalize;
+
+       g_type_class_add_private (object_class, sizeof (EmpathyConfPriv));
+}
+
+static void
+empathy_conf_init (EmpathyConf *conf)
+{
+       EmpathyConfPriv *priv;
+
+       priv = GET_PRIV (conf);
+
+       priv->gconf_client = gconf_client_get_default ();
+
+       gconf_client_add_dir (priv->gconf_client,
+                             EMPATHY_CONF_ROOT,
+                             GCONF_CLIENT_PRELOAD_ONELEVEL,
+                             NULL);
+       gconf_client_add_dir (priv->gconf_client,
+                             DESKTOP_INTERFACE_ROOT,
+                             GCONF_CLIENT_PRELOAD_NONE,
+                             NULL);
+}
+
+static void
+conf_finalize (GObject *object)
+{
+       EmpathyConfPriv *priv;
+
+       priv = GET_PRIV (object);
+
+       gconf_client_remove_dir (priv->gconf_client,
+                                EMPATHY_CONF_ROOT,
+                                NULL);
+       gconf_client_remove_dir (priv->gconf_client,
+                                DESKTOP_INTERFACE_ROOT,
+                                NULL);
+
+       g_object_unref (priv->gconf_client);
+
+       G_OBJECT_CLASS (empathy_conf_parent_class)->finalize (object);
+}
+
+EmpathyConf *
+empathy_conf_get (void)
+{
+       if (!global_conf) {
+               global_conf = g_object_new (EMPATHY_TYPE_CONF, NULL);
+       }
+
+       return global_conf;
+}
+
+void
+empathy_conf_shutdown (void)
+{
+       if (global_conf) {
+               g_object_unref (global_conf);
+               global_conf = NULL;
+       }
+}
+
+gboolean
+empathy_conf_set_int (EmpathyConf  *conf,
+                    const gchar *key,
+                    gint         value)
+{
+       EmpathyConfPriv *priv;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+
+       empathy_debug (DEBUG_DOMAIN, "Setting int:'%s' to %d", key, value);
+
+       priv = GET_PRIV (conf);
+
+       return gconf_client_set_int (priv->gconf_client,
+                                    key,
+                                    value,
+                                    NULL);
+}
+
+gboolean
+empathy_conf_get_int (EmpathyConf  *conf,
+                    const gchar *key,
+                    gint        *value)
+{
+       EmpathyConfPriv *priv;
+       GError          *error = NULL;
+
+       *value = 0;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+       g_return_val_if_fail (value != NULL, FALSE);
+
+       priv = GET_PRIV (conf);
+
+       *value = gconf_client_get_int (priv->gconf_client,
+                                      key,
+                                      &error);
+
+       if (error) {
+               g_error_free (error);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+gboolean
+empathy_conf_set_bool (EmpathyConf  *conf,
+                     const gchar *key,
+                     gboolean     value)
+{
+       EmpathyConfPriv *priv;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+
+       empathy_debug (DEBUG_DOMAIN, "Setting bool:'%s' to %d ---> %s",
+                     key, value, value ? "true" : "false");
+
+       priv = GET_PRIV (conf);
+
+       return gconf_client_set_bool (priv->gconf_client,
+                                     key,
+                                     value,
+                                     NULL);
+}
+
+gboolean
+empathy_conf_get_bool (EmpathyConf  *conf,
+                     const gchar *key,
+                     gboolean    *value)
+{
+       EmpathyConfPriv *priv;
+       GError          *error = NULL;
+
+       *value = FALSE;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+       g_return_val_if_fail (value != NULL, FALSE);
+
+       priv = GET_PRIV (conf);
+
+       *value = gconf_client_get_bool (priv->gconf_client,
+                                       key,
+                                       &error);
+
+       if (error) {
+               g_error_free (error);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+gboolean
+empathy_conf_set_string (EmpathyConf  *conf,
+                       const gchar *key,
+                       const gchar *value)
+{
+       EmpathyConfPriv *priv;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+
+       empathy_debug (DEBUG_DOMAIN, "Setting string:'%s' to '%s'",
+                     key, value);
+
+       priv = GET_PRIV (conf);
+
+       return gconf_client_set_string (priv->gconf_client,
+                                       key,
+                                       value,
+                                       NULL);
+}
+
+gboolean
+empathy_conf_get_string (EmpathyConf   *conf,
+                       const gchar  *key,
+                       gchar       **value)
+{
+       EmpathyConfPriv *priv;
+       GError          *error = NULL;
+
+       *value = NULL;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+
+       priv = GET_PRIV (conf);
+
+       *value = gconf_client_get_string (priv->gconf_client,
+                                         key,
+                                         &error);
+
+       if (error) {
+               g_error_free (error);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+gboolean
+empathy_conf_set_string_list (EmpathyConf  *conf,
+                            const gchar *key,
+                            GSList      *value)
+{
+       EmpathyConfPriv *priv;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+
+       priv = GET_PRIV (conf);
+
+       return gconf_client_set_list (priv->gconf_client,
+                                     key,
+                                     GCONF_VALUE_STRING,
+                                     value,
+                                     NULL);
+}
+
+gboolean
+empathy_conf_get_string_list (EmpathyConf   *conf,
+                            const gchar  *key,
+                            GSList      **value)
+{
+       EmpathyConfPriv *priv;
+       GError          *error = NULL;
+
+       *value = NULL;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+
+       priv = GET_PRIV (conf);
+
+       *value = gconf_client_get_list (priv->gconf_client,
+                                       key,
+                                       GCONF_VALUE_STRING,
+                                       &error);
+       if (error) {
+               g_error_free (error);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+static void
+conf_notify_data_free (EmpathyConfNotifyData *data)
+{
+       g_object_unref (data->conf);
+       g_slice_free (EmpathyConfNotifyData, data);
+}
+
+static void
+conf_notify_func (GConfClient *client,
+                 guint        id,
+                 GConfEntry  *entry,
+                 gpointer     user_data)
+{
+       EmpathyConfNotifyData *data;
+
+       data = user_data;
+
+       data->func (data->conf,
+                   gconf_entry_get_key (entry),
+                   data->user_data);
+}
+
+guint
+empathy_conf_notify_add (EmpathyConf           *conf,
+                       const gchar          *key,
+                       EmpathyConfNotifyFunc func,
+                       gpointer              user_data)
+{
+       EmpathyConfPriv       *priv;
+       guint                  id;
+       EmpathyConfNotifyData *data;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), 0);
+
+       priv = GET_PRIV (conf);
+
+       data = g_slice_new (EmpathyConfNotifyData);
+       data->func = func;
+       data->user_data = user_data;
+       data->conf = g_object_ref (conf);
+
+       id = gconf_client_notify_add (priv->gconf_client,
+                                     key,
+                                     conf_notify_func,
+                                     data,
+                                     (GFreeFunc) conf_notify_data_free,
+                                     NULL);
+
+       return id;
+}
+
+gboolean
+empathy_conf_notify_remove (EmpathyConf *conf,
+                          guint       id)
+{
+       EmpathyConfPriv *priv;
+
+       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
+
+       priv = GET_PRIV (conf);
+
+       gconf_client_notify_remove (priv->gconf_client, id);
+
+       return TRUE;
+}
+
diff --git a/libempathy-gtk/empathy-conf.h b/libempathy-gtk/empathy-conf.h
new file mode 100644 (file)
index 0000000..7e8e60e
--- /dev/null
@@ -0,0 +1,87 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2006 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EMPATHY_CONF_H__
+#define __EMPATHY_CONF_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_CONF         (empathy_conf_get_type ())
+#define EMPATHY_CONF(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CONF, EmpathyConf))
+#define EMPATHY_CONF_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_CONF, EmpathyConfClass))
+#define EMPATHY_IS_CONF(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CONF))
+#define EMPATHY_IS_CONF_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CONF))
+#define EMPATHY_CONF_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CONF, EmpathyConfClass))
+
+typedef struct _EmpathyConf      EmpathyConf;
+typedef struct _EmpathyConfClass EmpathyConfClass;
+
+struct _EmpathyConf  {
+       GObject parent;
+};
+
+struct _EmpathyConfClass {
+       GObjectClass parent_class;
+};
+
+typedef void (*EmpathyConfNotifyFunc) (EmpathyConf  *conf, 
+                                     const gchar *key,
+                                     gpointer     user_data);
+
+GType       empathy_conf_get_type        (void) G_GNUC_CONST;
+EmpathyConf *empathy_conf_get             (void);
+void        empathy_conf_shutdown        (void);
+guint       empathy_conf_notify_add      (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        EmpathyConfNotifyFunc   func,
+                                        gpointer               data);
+gboolean    empathy_conf_notify_remove   (EmpathyConf            *conf,
+                                        guint                  id);
+gboolean    empathy_conf_set_int         (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        gint                   value);
+gboolean    empathy_conf_get_int         (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        gint                  *value);
+gboolean    empathy_conf_set_bool        (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        gboolean               value);
+gboolean    empathy_conf_get_bool        (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        gboolean              *value);
+gboolean    empathy_conf_set_string      (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        const gchar           *value);
+gboolean    empathy_conf_get_string      (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        gchar                **value);
+gboolean    empathy_conf_set_string_list (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        GSList                *value);
+gboolean    empathy_conf_get_string_list (EmpathyConf            *conf,
+                                        const gchar           *key,
+                                        GSList              **value);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_CONF_H__ */
+
index 534f66c272534ac2103346c47bf3af1417efb510..4f86ef2bab2c2e88a868464184422389aff8dca8 100644 (file)
@@ -40,7 +40,6 @@
 #include <libempathy/empathy-contact.h>
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-conf.h>
 
 #include "empathy-group-chat.h"
 #include "empathy-chat.h"
@@ -51,6 +50,7 @@
 //#include "empathy-sound.h"
 #include "empathy-images.h"
 #include "empathy-ui-utils.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 
 #define DEBUG_DOMAIN "GroupChat"
index 6b51eccadb6c9aed236daf83260c9701c4f182e8..951b80e95cc054dad3e6190d78b89af1fe123bf4 100644 (file)
@@ -28,7 +28,6 @@
 #include <glade/glade.h>
 #include <glib/gi18n.h>
 
-#include <libempathy/empathy-conf.h>
 #include <libempathy/empathy-contact.h>
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-utils.h>
@@ -47,6 +46,7 @@
 #include "empathy-presence-chooser.h"
 #include "empathy-ui-utils.h"
 #include "empathy-geometry.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-accounts-dialog.h"
 #include "empathy-about-dialog.h"
index d6e21a73338c7a6db809c00f43a8cc6a5192e3ea..50c9d566090d84e3ac31edf3dee392006906ee09 100644 (file)
@@ -30,8 +30,7 @@
 #include <glade/glade.h>
 #include <glib/gi18n.h>
 
-#include <libempathy/empathy-conf.h>
-
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-ui-utils.h"
 #include "empathy-theme-manager.h"
index 88696cca30df7922cd924478e2dd950f663c5b56..b6620118ad8e91ddb289388786a1a8dc88081715 100644 (file)
@@ -33,9 +33,9 @@
 #endif
 
 #include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-conf.h>
 
 #include "empathy-spell.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 
 #define DEBUG_DOMAIN "Spell"
index 24132e6555e2ca718b411b811ae42a6b2b51f8fd..9e62a1e189e363bc4bb5b2ae88db428f1bc9133f 100644 (file)
 #include <libempathy/empathy-tp-chat.h>
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-conf.h>
 #include <libempathy/empathy-idle.h>
 #include <libempathy/empathy-filter.h>
 
 #include "empathy-status-icon.h"
 #include "empathy-contact-dialogs.h"
 #include "empathy-presence-chooser.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-ui-utils.h"
 #include "empathy-accounts-dialog.h"
index 6bece75065ce5e3b9b6630512dbe60e2c0923913..94276c964a5155cb0a56361e2a9df2eb00c5d5d6 100644 (file)
@@ -26,9 +26,9 @@
 #include <gtk/gtk.h>
 
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-conf.h>
 
 #include "empathy-chat-view.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-theme.h"
 #include "empathy-theme-boxes.h"
index 1895b8ccb901b278e0f192aef72cc56c08dbe97c..c8a9a0d48c80bd423eb720207522a205434faf27 100644 (file)
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include <libempathy/empathy-conf.h>
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-marshal.h>
 
 #include "empathy-chat.h"
+#include "empathy-conf.h"
 #include "empathy-preferences.h"
 #include "empathy-theme.h"
 #include "empathy-smiley-manager.h"
index e6711c3c642e993045c770ee00747c3f2d57da39..285dff185451aaba5d81a84fdb7fb10427deb046 100644 (file)
@@ -16,7 +16,6 @@ BUILT_SOURCES =                                       \
 lib_LTLIBRARIES = libempathy.la
 
 libempathy_la_SOURCES =                                        \
-       empathy-conf.c                                  \
        empathy-avatar.c                                \
        empathy-time.c                                  \
        empathy-presence.c                              \
@@ -54,7 +53,6 @@ libempathy_la_LDFLAGS =               \
        -version-info ${LIBEMPATHY_CURRENT}:${LIBEMPATHY_REVISION}:${LIBEMPATHY_AGE}
 
 libempathy_headers =                           \
-       empathy-conf.h                          \
        empathy-avatar.h                        \
        empathy-time.h                          \
        empathy-presence.h                      \
diff --git a/libempathy/empathy-conf.c b/libempathy/empathy-conf.c
deleted file mode 100644 (file)
index 71e520f..0000000
+++ /dev/null
@@ -1,372 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2006 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Richard Hult <richard@imendio.com>
- */
-
-#include "config.h"
-
-#include <string.h>
-
-#include <gconf/gconf-client.h>
-
-#include "empathy-conf.h"
-#include "empathy-debug.h"
-
-#define DEBUG_DOMAIN "Config"
-
-#define EMPATHY_CONF_ROOT       "/apps/empathy"
-#define DESKTOP_INTERFACE_ROOT "/desktop/gnome/interface"
-
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CONF, EmpathyConfPriv))
-
-typedef struct {
-       GConfClient *gconf_client;
-} EmpathyConfPriv;
-
-typedef struct {
-       EmpathyConf           *conf;
-       EmpathyConfNotifyFunc  func;
-       gpointer               user_data;
-} EmpathyConfNotifyData;
-
-static void conf_finalize (GObject *object);
-
-G_DEFINE_TYPE (EmpathyConf, empathy_conf, G_TYPE_OBJECT);
-
-static EmpathyConf *global_conf = NULL;
-
-static void
-empathy_conf_class_init (EmpathyConfClass *class)
-{
-       GObjectClass *object_class;
-
-       object_class = G_OBJECT_CLASS (class);
-
-       object_class->finalize = conf_finalize;
-
-       g_type_class_add_private (object_class, sizeof (EmpathyConfPriv));
-}
-
-static void
-empathy_conf_init (EmpathyConf *conf)
-{
-       EmpathyConfPriv *priv;
-
-       priv = GET_PRIV (conf);
-
-       priv->gconf_client = gconf_client_get_default ();
-
-       gconf_client_add_dir (priv->gconf_client,
-                             EMPATHY_CONF_ROOT,
-                             GCONF_CLIENT_PRELOAD_ONELEVEL,
-                             NULL);
-       gconf_client_add_dir (priv->gconf_client,
-                             DESKTOP_INTERFACE_ROOT,
-                             GCONF_CLIENT_PRELOAD_NONE,
-                             NULL);
-}
-
-static void
-conf_finalize (GObject *object)
-{
-       EmpathyConfPriv *priv;
-
-       priv = GET_PRIV (object);
-
-       gconf_client_remove_dir (priv->gconf_client,
-                                EMPATHY_CONF_ROOT,
-                                NULL);
-       gconf_client_remove_dir (priv->gconf_client,
-                                DESKTOP_INTERFACE_ROOT,
-                                NULL);
-
-       g_object_unref (priv->gconf_client);
-
-       G_OBJECT_CLASS (empathy_conf_parent_class)->finalize (object);
-}
-
-EmpathyConf *
-empathy_conf_get (void)
-{
-       if (!global_conf) {
-               global_conf = g_object_new (EMPATHY_TYPE_CONF, NULL);
-       }
-
-       return global_conf;
-}
-
-void
-empathy_conf_shutdown (void)
-{
-       if (global_conf) {
-               g_object_unref (global_conf);
-               global_conf = NULL;
-       }
-}
-
-gboolean
-empathy_conf_set_int (EmpathyConf  *conf,
-                    const gchar *key,
-                    gint         value)
-{
-       EmpathyConfPriv *priv;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-
-       empathy_debug (DEBUG_DOMAIN, "Setting int:'%s' to %d", key, value);
-
-       priv = GET_PRIV (conf);
-
-       return gconf_client_set_int (priv->gconf_client,
-                                    key,
-                                    value,
-                                    NULL);
-}
-
-gboolean
-empathy_conf_get_int (EmpathyConf  *conf,
-                    const gchar *key,
-                    gint        *value)
-{
-       EmpathyConfPriv *priv;
-       GError          *error = NULL;
-
-       *value = 0;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-       g_return_val_if_fail (value != NULL, FALSE);
-
-       priv = GET_PRIV (conf);
-
-       *value = gconf_client_get_int (priv->gconf_client,
-                                      key,
-                                      &error);
-
-       if (error) {
-               g_error_free (error);
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-gboolean
-empathy_conf_set_bool (EmpathyConf  *conf,
-                     const gchar *key,
-                     gboolean     value)
-{
-       EmpathyConfPriv *priv;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-
-       empathy_debug (DEBUG_DOMAIN, "Setting bool:'%s' to %d ---> %s",
-                     key, value, value ? "true" : "false");
-
-       priv = GET_PRIV (conf);
-
-       return gconf_client_set_bool (priv->gconf_client,
-                                     key,
-                                     value,
-                                     NULL);
-}
-
-gboolean
-empathy_conf_get_bool (EmpathyConf  *conf,
-                     const gchar *key,
-                     gboolean    *value)
-{
-       EmpathyConfPriv *priv;
-       GError          *error = NULL;
-
-       *value = FALSE;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-       g_return_val_if_fail (value != NULL, FALSE);
-
-       priv = GET_PRIV (conf);
-
-       *value = gconf_client_get_bool (priv->gconf_client,
-                                       key,
-                                       &error);
-
-       if (error) {
-               g_error_free (error);
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-gboolean
-empathy_conf_set_string (EmpathyConf  *conf,
-                       const gchar *key,
-                       const gchar *value)
-{
-       EmpathyConfPriv *priv;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-
-       empathy_debug (DEBUG_DOMAIN, "Setting string:'%s' to '%s'",
-                     key, value);
-
-       priv = GET_PRIV (conf);
-
-       return gconf_client_set_string (priv->gconf_client,
-                                       key,
-                                       value,
-                                       NULL);
-}
-
-gboolean
-empathy_conf_get_string (EmpathyConf   *conf,
-                       const gchar  *key,
-                       gchar       **value)
-{
-       EmpathyConfPriv *priv;
-       GError          *error = NULL;
-
-       *value = NULL;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-
-       priv = GET_PRIV (conf);
-
-       *value = gconf_client_get_string (priv->gconf_client,
-                                         key,
-                                         &error);
-
-       if (error) {
-               g_error_free (error);
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-gboolean
-empathy_conf_set_string_list (EmpathyConf  *conf,
-                            const gchar *key,
-                            GSList      *value)
-{
-       EmpathyConfPriv *priv;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-
-       priv = GET_PRIV (conf);
-
-       return gconf_client_set_list (priv->gconf_client,
-                                     key,
-                                     GCONF_VALUE_STRING,
-                                     value,
-                                     NULL);
-}
-
-gboolean
-empathy_conf_get_string_list (EmpathyConf   *conf,
-                            const gchar  *key,
-                            GSList      **value)
-{
-       EmpathyConfPriv *priv;
-       GError          *error = NULL;
-
-       *value = NULL;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-
-       priv = GET_PRIV (conf);
-
-       *value = gconf_client_get_list (priv->gconf_client,
-                                       key,
-                                       GCONF_VALUE_STRING,
-                                       &error);
-       if (error) {
-               g_error_free (error);
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-static void
-conf_notify_data_free (EmpathyConfNotifyData *data)
-{
-       g_object_unref (data->conf);
-       g_slice_free (EmpathyConfNotifyData, data);
-}
-
-static void
-conf_notify_func (GConfClient *client,
-                 guint        id,
-                 GConfEntry  *entry,
-                 gpointer     user_data)
-{
-       EmpathyConfNotifyData *data;
-
-       data = user_data;
-
-       data->func (data->conf,
-                   gconf_entry_get_key (entry),
-                   data->user_data);
-}
-
-guint
-empathy_conf_notify_add (EmpathyConf           *conf,
-                       const gchar          *key,
-                       EmpathyConfNotifyFunc func,
-                       gpointer              user_data)
-{
-       EmpathyConfPriv       *priv;
-       guint                  id;
-       EmpathyConfNotifyData *data;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), 0);
-
-       priv = GET_PRIV (conf);
-
-       data = g_slice_new (EmpathyConfNotifyData);
-       data->func = func;
-       data->user_data = user_data;
-       data->conf = g_object_ref (conf);
-
-       id = gconf_client_notify_add (priv->gconf_client,
-                                     key,
-                                     conf_notify_func,
-                                     data,
-                                     (GFreeFunc) conf_notify_data_free,
-                                     NULL);
-
-       return id;
-}
-
-gboolean
-empathy_conf_notify_remove (EmpathyConf *conf,
-                          guint       id)
-{
-       EmpathyConfPriv *priv;
-
-       g_return_val_if_fail (EMPATHY_IS_CONF (conf), FALSE);
-
-       priv = GET_PRIV (conf);
-
-       gconf_client_notify_remove (priv->gconf_client, id);
-
-       return TRUE;
-}
-
diff --git a/libempathy/empathy-conf.h b/libempathy/empathy-conf.h
deleted file mode 100644 (file)
index 7e8e60e..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2006 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __EMPATHY_CONF_H__
-#define __EMPATHY_CONF_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define EMPATHY_TYPE_CONF         (empathy_conf_get_type ())
-#define EMPATHY_CONF(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CONF, EmpathyConf))
-#define EMPATHY_CONF_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_CONF, EmpathyConfClass))
-#define EMPATHY_IS_CONF(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CONF))
-#define EMPATHY_IS_CONF_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CONF))
-#define EMPATHY_CONF_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CONF, EmpathyConfClass))
-
-typedef struct _EmpathyConf      EmpathyConf;
-typedef struct _EmpathyConfClass EmpathyConfClass;
-
-struct _EmpathyConf  {
-       GObject parent;
-};
-
-struct _EmpathyConfClass {
-       GObjectClass parent_class;
-};
-
-typedef void (*EmpathyConfNotifyFunc) (EmpathyConf  *conf, 
-                                     const gchar *key,
-                                     gpointer     user_data);
-
-GType       empathy_conf_get_type        (void) G_GNUC_CONST;
-EmpathyConf *empathy_conf_get             (void);
-void        empathy_conf_shutdown        (void);
-guint       empathy_conf_notify_add      (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        EmpathyConfNotifyFunc   func,
-                                        gpointer               data);
-gboolean    empathy_conf_notify_remove   (EmpathyConf            *conf,
-                                        guint                  id);
-gboolean    empathy_conf_set_int         (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        gint                   value);
-gboolean    empathy_conf_get_int         (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        gint                  *value);
-gboolean    empathy_conf_set_bool        (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        gboolean               value);
-gboolean    empathy_conf_get_bool        (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        gboolean              *value);
-gboolean    empathy_conf_set_string      (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        const gchar           *value);
-gboolean    empathy_conf_get_string      (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        gchar                **value);
-gboolean    empathy_conf_set_string_list (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        GSList                *value);
-gboolean    empathy_conf_get_string_list (EmpathyConf            *conf,
-                                        const gchar           *key,
-                                        GSList              **value);
-
-G_END_DECLS
-
-#endif /* __EMPATHY_CONF_H__ */
-
index d98f2605ffe383c3a60ab58e4b7a2faeb07b7e8b..f6c7e0b8087bd814fe60139c4292cf0d68f89d6c 100644 (file)
   (gtype-id "EMPATHY_TYPE_CHATROOM_MANAGER")
 )
 
-(define-object Conf
-  (in-module "Empathy")
-  (parent "GObject")
-  (c-name "EmpathyConf")
-  (gtype-id "EMPATHY_TYPE_CONF")
-)
-
 (define-object Contact
   (in-module "Empathy")
   (parent "GObject")
 
 
 
-;; From empathy-chandler-glue.h
-
-(define-function dbus_glib_marshal_empathy_chandler_BOOLEAN__STRING_BOXED_STRING_BOXED_UINT_UINT_POINTER
-  (c-name "dbus_glib_marshal_empathy_chandler_BOOLEAN__STRING_BOXED_STRING_BOXED_UINT_UINT_POINTER")
-  (return-type "none")
-  (parameters
-    '("GClosure*" "closure")
-    '("GValue*-return_value" "G_GNUC_UNUSED")
-    '("guint" "n_param_values")
-    '("const-GValue*" "param_values")
-    '("gpointer-invocation_hint" "G_GNUC_UNUSED")
-    '("gpointer" "marshal_data")
-  )
-)
-
-
-
 ;; From empathy-chandler.h
 
 (define-function empathy_chandler_get_type
 
 
 
-;; From empathy-conf.h
-
-(define-function empathy_conf_get_type
-  (c-name "empathy_conf_get_type")
-  (return-type "GType")
-)
-
-(define-function empathy_conf_get
-  (c-name "empathy_conf_get")
-  (return-type "EmpathyConf*")
-)
-
-(define-function empathy_conf_shutdown
-  (c-name "empathy_conf_shutdown")
-  (return-type "none")
-)
-
-(define-method notify_add
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_notify_add")
-  (return-type "guint")
-  (parameters
-    '("const-gchar*" "key")
-    '("EmpathyConfNotifyFunc" "func")
-    '("gpointer" "data")
-  )
-)
-
-(define-method notify_remove
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_notify_remove")
-  (return-type "gboolean")
-  (parameters
-    '("guint" "id")
-  )
-)
-
-(define-method set_int
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_set_int")
-  (return-type "gboolean")
-  (parameters
-    '("const-gchar*" "key")
-    '("gint" "value")
-  )
-)
-
-(define-method get_int
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_get_int")
-  (return-type "gboolean")
-  (parameters
-    '("const-gchar*" "key")
-    '("gint*" "value")
-  )
-)
-
-(define-method set_bool
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_set_bool")
-  (return-type "gboolean")
-  (parameters
-    '("const-gchar*" "key")
-    '("gboolean" "value")
-  )
-)
-
-(define-method get_bool
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_get_bool")
-  (return-type "gboolean")
-  (parameters
-    '("const-gchar*" "key")
-    '("gboolean*" "value")
-  )
-)
-
-(define-method set_string
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_set_string")
-  (return-type "gboolean")
-  (parameters
-    '("const-gchar*" "key")
-    '("const-gchar*" "value")
-  )
-)
-
-(define-method get_string
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_get_string")
-  (return-type "gboolean")
-  (parameters
-    '("const-gchar*" "key")
-    '("gchar**" "value")
-  )
-)
-
-(define-method set_string_list
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_set_string_list")
-  (return-type "gboolean")
-  (parameters
-    '("const-gchar*" "key")
-    '("GSList*" "value")
-  )
-)
-
-(define-method get_string_list
-  (of-object "EmpathyConf")
-  (c-name "empathy_conf_get_string_list")
-  (return-type "gboolean")
-  (parameters
-    '("const-gchar*" "key")
-    '("GSList**" "value")
-  )
-)
-
-
-
 ;; From empathy-contact-factory.h
 
 (define-function empathy_contact_factory_get_type
 
 
 
-;; From empathy-enum-types.h
-
-(define-function empathy_reg_ex_type_get_type
-  (c-name "empathy_reg_ex_type_get_type")
-  (return-type "GType")
-)
-
-(define-function empathy_message_type_get_type
-  (c-name "empathy_message_type_get_type")
-  (return-type "GType")
-)
-
-(define-function empathy_capabilities_get_type
-  (c-name "empathy_capabilities_get_type")
-  (return-type "GType")
-)
-
-(define-function empathy_tp_call_status_get_type
-  (c-name "empathy_tp_call_status_get_type")
-  (return-type "GType")
-)
-
-
-
-;; From empathy-filter-glue.h
-
-(define-function dbus_glib_marshal_empathy_filter_BOOLEAN__STRING_BOXED_STRING_BOXED_UINT_UINT_UINT_POINTER
-  (c-name "dbus_glib_marshal_empathy_filter_BOOLEAN__STRING_BOXED_STRING_BOXED_UINT_UINT_UINT_POINTER")
-  (return-type "none")
-  (parameters
-    '("GClosure*" "closure")
-    '("GValue*-return_value" "G_GNUC_UNUSED")
-    '("guint" "n_param_values")
-    '("const-GValue*" "param_values")
-    '("gpointer-invocation_hint" "G_GNUC_UNUSED")
-    '("gpointer" "marshal_data")
-  )
-)
-
-
-
 ;; From empathy-filter.h
 
 (define-function empathy_filter_get_type
 
 
 
-;; From empathy-marshal.h
-
-
-
 ;; From empathy-message.h
 
 (define-function empathy_message_get_gtype
 
 
 
-;; From stamp-empathy-enum-types.h
-
-
-
 ;; From tp-stream-engine-gen.h
 
 (define-function dbus_g_proxy_begin_call
index d1f434839cd819164c7a24e3f8f2adfae5132065..a21700fca8c532015819ffa113703c69cb5a8dcb 100644 (file)
@@ -6,7 +6,6 @@ headers
 #include "empathy-chandler.h"
 #include "empathy-chatroom-manager.h"
 #include "empathy-chatroom.h"
-#include "empathy-conf.h"
 #include "empathy-contact-groups.h"
 #include "empathy-contact-list.h"
 #include "empathy-contact-manager.h"
index f63e16d4ac7fe69a82c7464cd0062ec69bda110a..a8412437f8de6afaf51ad909e65716e5dfa96005 100644 (file)
   (gtype-id "EMPATHY_TYPE_CHAT_WINDOW")
 )
 
+(define-object Conf
+  (in-module "Empathy")
+  (parent "GObject")
+  (c-name "EmpathyConf")
+  (gtype-id "EMPATHY_TYPE_CONF")
+)
+
 (define-object ContactListStore
   (in-module "Empathy")
   (parent "GtkTreeStore")
 
 
 
+;; From empathy-conf.h
+
+(define-function empathy_conf_get_type
+  (c-name "empathy_conf_get_type")
+  (return-type "GType")
+)
+
+(define-function empathy_conf_get
+  (c-name "empathy_conf_get")
+  (return-type "EmpathyConf*")
+)
+
+(define-function empathy_conf_shutdown
+  (c-name "empathy_conf_shutdown")
+  (return-type "none")
+)
+
+(define-method notify_add
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_notify_add")
+  (return-type "guint")
+  (parameters
+    '("const-gchar*" "key")
+    '("EmpathyConfNotifyFunc" "func")
+    '("gpointer" "data")
+  )
+)
+
+(define-method notify_remove
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_notify_remove")
+  (return-type "gboolean")
+  (parameters
+    '("guint" "id")
+  )
+)
+
+(define-method set_int
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_set_int")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("gint" "value")
+  )
+)
+
+(define-method get_int
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_get_int")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("gint*" "value")
+  )
+)
+
+(define-method set_bool
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_set_bool")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("gboolean" "value")
+  )
+)
+
+(define-method get_bool
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_get_bool")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("gboolean*" "value")
+  )
+)
+
+(define-method set_string
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_set_string")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("const-gchar*" "value")
+  )
+)
+
+(define-method get_string
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_get_string")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("gchar**" "value")
+  )
+)
+
+(define-method set_string_list
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_set_string_list")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("GSList*" "value")
+  )
+)
+
+(define-method get_string_list
+  (of-object "EmpathyConf")
+  (c-name "empathy_conf_get_string_list")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("GSList**" "value")
+  )
+)
+
+
+
 ;; From empathy-contact-dialogs.h
 
 (define-function empathy_subscription_dialog_show
 
 
 
-;; From empathy-gtk-enum-types.h
-
-(define-function empathy_contact_widget_flags_get_type
-  (c-name "empathy_contact_widget_flags_get_type")
-  (return-type "GType")
-)
-
-(define-function empathy_contact_list_store_sort_get_type
-  (c-name "empathy_contact_list_store_sort_get_type")
-  (return-type "GType")
-)
-
-(define-function empathy_contact_list_store_col_get_type
-  (c-name "empathy_contact_list_store_col_get_type")
-  (return-type "GType")
-)
-
-(define-function empathy_contact_list_features_get_type
-  (c-name "empathy_contact_list_features_get_type")
-  (return-type "GType")
-)
-
-(define-function empathy_chat_view_block_get_type
-  (c-name "empathy_chat_view_block_get_type")
-  (return-type "GType")
-)
-
-
-
 ;; From empathy-images.h
 
 
 )
 
 
-
-;; From stamp-empathy-gtk-enum-types.h
-
-
index f15151762ecd538965ec518e4fa09c5410921852..26eb10119caed4eeddee05cf734bd6bb411dbb6d 100644 (file)
@@ -17,6 +17,7 @@ headers
 #include "empathy-chatrooms-window.h"
 #include "empathy-chat-view.h"
 #include "empathy-chat-window.h"
+#include "empathy-conf.h"
 #include "empathy-contact-dialogs.h"
 #include "empathy-contact-list-store.h"
 #include "empathy-contact-list-view.h"