[evolution/email-factory-3-4: 23/23] Migrate to gsettings.



commit f50477042ec09db012113b4948be572b56ec798a
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Wed Nov 23 14:35:53 2011 +0530

    Migrate to gsettings.

 libemail-utils/e-signature-list.c  |   11 ++++++-----
 libemail-utils/e-signature-list.h  |    5 ++---
 libemail-utils/e-signature-utils.c |   10 ++--------
 libemail-utils/e-signature.c       |    1 -
 4 files changed, 10 insertions(+), 17 deletions(-)
---
diff --git a/libemail-utils/e-signature-list.c b/libemail-utils/e-signature-list.c
index 037db0f..afc1d9e 100644
--- a/libemail-utils/e-signature-list.c
+++ b/libemail-utils/e-signature-list.c
@@ -264,7 +264,6 @@ free_func (gpointer data,
 
 /**
  * e_signature_list_new:
- * @gconf: a #GConfClient
  *
  * Reads the list of signaturess from @gconf and listens for changes.
  * Will emit #signature_added, #signature_changed, and #signature_removed
@@ -278,14 +277,16 @@ free_func (gpointer data,
  * Return value: the list of signatures
  **/
 ESignatureList *
-e_signature_list_new (GConfClient *gconf)
+e_signature_list_new (void)
 {
 	ESignatureList *signature_list;
-
-	g_return_val_if_fail (GCONF_IS_CLIENT (gconf), NULL);
+	GConfClient *client;
 
 	signature_list = g_object_new (E_TYPE_SIGNATURE_LIST, NULL);
-	e_signature_list_construct (signature_list, gconf);
+
+	client = gconf_client_get_default ();
+	e_signature_list_construct (signature_list, client);
+	g_object_unref (client);
 
 	return signature_list;
 }
diff --git a/libemail-utils/e-signature-list.h b/libemail-utils/e-signature-list.h
index 4e929c8..abeeed5 100644
--- a/libemail-utils/e-signature-list.h
+++ b/libemail-utils/e-signature-list.h
@@ -24,11 +24,10 @@
 #ifndef E_SIGNATURE_LIST_H
 #define E_SIGNATURE_LIST_H
 
+#include <gconf/gconf-client.h>
 #include <libedataserver/e-list.h>
 #include "libemail-utils/e-signature.h"
 
-#include <gconf/gconf-client.h>
-
 /* Standard GObject macros */
 #define E_TYPE_SIGNATURE_LIST \
 	(e_signature_list_get_type ())
@@ -72,7 +71,7 @@ struct _ESignatureListClass {
 };
 
 GType		e_signature_list_get_type	(void);
-ESignatureList *e_signature_list_new		(GConfClient *client);
+ESignatureList *e_signature_list_new		(void);
 void		e_signature_list_construct	(ESignatureList *signature_list,
 						 GConfClient *client);
 void		e_signature_list_save		(ESignatureList *signature_list);
diff --git a/libemail-utils/e-signature-utils.c b/libemail-utils/e-signature-utils.c
index a7eea3e..ca46f05 100644
--- a/libemail-utils/e-signature-utils.c
+++ b/libemail-utils/e-signature-utils.c
@@ -26,7 +26,6 @@
 #include <errno.h>
 #include <camel/camel.h>
 #include <glib/gstdio.h>
-#include <gconf/gconf-client.h>
 
 #ifndef G_OS_WIN32
 #include <sys/wait.h>
@@ -39,13 +38,8 @@ static ESignatureList *global_signature_list;
 ESignatureList *
 e_get_signature_list (void)
 {
-	if (G_UNLIKELY (global_signature_list == NULL)) {
-		GConfClient *client;
-
-		client = gconf_client_get_default ();
-		global_signature_list = e_signature_list_new (client);
-		g_object_unref (client);
-	}
+	if (G_UNLIKELY (global_signature_list == NULL))
+		global_signature_list = e_signature_list_new ();
 
 	g_return_val_if_fail (global_signature_list != NULL, NULL);
 
diff --git a/libemail-utils/e-signature.c b/libemail-utils/e-signature.c
index 185378d..1b49389 100644
--- a/libemail-utils/e-signature.c
+++ b/libemail-utils/e-signature.c
@@ -29,7 +29,6 @@
 #include <libxml/xmlmemory.h>
 
 #include <glib/gi18n-lib.h>
-#include <gconf/gconf-client.h>
 
 #include <libedataserver/e-uid.h>
 #include <libedataserver/e-data-server-util.h>



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