[evolution] Remove some unnecessary GConf crud.



commit dff45d6cd8a6d631bf4126e8a484c6b6c62b9a9a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Nov 27 20:23:55 2011 -0600

    Remove some unnecessary GConf crud.

 mail/em-config.c                        |   28 ----------------------------
 mail/em-config.h                        |   13 -------------
 modules/mail/e-mail-config-hook.c       |    1 -
 modules/mail/em-composer-prefs.c        |    4 ----
 modules/mail/em-mailer-prefs.c          |    4 ----
 modules/mail/em-mailer-prefs.h          |    2 ++
 modules/mail/em-network-prefs.c         |    4 ----
 plugins/itip-formatter/itip-formatter.c |    6 ++----
 plugins/prefer-plain/prefer-plain.c     |    1 -
 shell/e-shell-window-private.h          |    1 -
 shell/e-shell.h                         |    2 --
 11 files changed, 4 insertions(+), 62 deletions(-)
---
diff --git a/mail/em-config.c b/mail/em-config.c
index 352e16b..ca8e117 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -52,9 +52,6 @@ em_config_set_target (EConfig *ep,
 		case EM_CONFIG_TARGET_FOLDER: {
 			/*EMConfigTargetFolder *s = (EMConfigTargetFolder *)t;*/
 			break; }
-		case EM_CONFIG_TARGET_PREFS: {
-			/*EMConfigTargetPrefs *s = (EMConfigTargetPrefs *)t;*/
-			break; }
 		case EM_CONFIG_TARGET_SETTINGS: {
 			EMConfigTargetSettings *s = (EMConfigTargetSettings *) t;
 
@@ -78,8 +75,6 @@ em_config_target_free (EConfig *ep,
 		switch (t->type) {
 		case EM_CONFIG_TARGET_FOLDER:
 			break;
-		case EM_CONFIG_TARGET_PREFS:
-			break;
 		case EM_CONFIG_TARGET_SETTINGS: {
 			EMConfigTargetSettings *s = (EMConfigTargetSettings *) t;
 
@@ -95,12 +90,6 @@ em_config_target_free (EConfig *ep,
 
 		g_object_unref (s->folder);
 		break; }
-	case EM_CONFIG_TARGET_PREFS: {
-		EMConfigTargetPrefs *s = (EMConfigTargetPrefs *) t;
-
-		if (s->gconf)
-			g_object_unref (s->gconf);
-		break; }
 	case EM_CONFIG_TARGET_SETTINGS: {
 		EMConfigTargetSettings *s = (EMConfigTargetSettings *) t;
 
@@ -157,23 +146,6 @@ em_config_target_new_folder (EMConfig *emp,
 	return t;
 }
 
-EMConfigTargetPrefs *
-em_config_target_new_prefs (EMConfig *emp,
-                            GConfClient *gconf)
-{
-	EMConfigTargetPrefs *t;
-
-	t = e_config_target_new (
-		&emp->config, EM_CONFIG_TARGET_PREFS, sizeof (*t));
-
-	if (GCONF_IS_CLIENT (gconf))
-		t->gconf = g_object_ref (gconf);
-	else
-		t->gconf = NULL;
-
-	return t;
-}
-
 EMConfigTargetSettings *
 em_config_target_new_settings (EMConfig *emp,
                                const gchar *email_address,
diff --git a/mail/em-config.h b/mail/em-config.h
index a90ecf3..7c23495 100644
--- a/mail/em-config.h
+++ b/mail/em-config.h
@@ -24,7 +24,6 @@
 #define EM_CONFIG_H
 
 #include <camel/camel.h>
-#include <gconf/gconf-client.h>
 #include <libedataserver/e-account.h>
 
 #include "e-util/e-config.h"
@@ -58,12 +57,10 @@ typedef struct _EMConfigPrivate EMConfigPrivate;
 /* Types of popup tagets */
 enum _em_config_target_t {
 	EM_CONFIG_TARGET_FOLDER,
-	EM_CONFIG_TARGET_PREFS,
 	EM_CONFIG_TARGET_SETTINGS
 };
 
 typedef struct _EMConfigTargetFolder EMConfigTargetFolder;
-typedef struct _EMConfigTargetPrefs EMConfigTargetPrefs;
 typedef struct _EMConfigTargetSettings EMConfigTargetSettings;
 
 struct _EMConfigTargetFolder {
@@ -72,13 +69,6 @@ struct _EMConfigTargetFolder {
 	CamelFolder *folder;
 };
 
-struct _EMConfigTargetPrefs {
-	EConfigTarget target;
-
-	/* preferences are global from gconf */
-	GConfClient *gconf;
-};
-
 struct _EMConfigTargetSettings {
 	EConfigTarget target;
 
@@ -108,9 +98,6 @@ EMConfig *	em_config_new			(gint type,
 EMConfigTargetFolder *
 		em_config_target_new_folder	(EMConfig *emp,
 						 CamelFolder *folder);
-EMConfigTargetPrefs *
-		em_config_target_new_prefs	(EMConfig *emp,
-						 GConfClient *gconf);
 EMConfigTargetSettings *
 		em_config_target_new_settings	(EMConfig *emp,
 						 const gchar *email_address,
diff --git a/modules/mail/e-mail-config-hook.c b/modules/mail/e-mail-config-hook.c
index cc97346..14acc60 100644
--- a/modules/mail/e-mail-config-hook.c
+++ b/modules/mail/e-mail-config-hook.c
@@ -34,7 +34,6 @@ static const EConfigHookTargetMask no_masks[] = {
 
 static const EConfigHookTargetMap targets[] = {
 	{ "folder", EM_CONFIG_TARGET_FOLDER, no_masks },
-	{ "prefs", EM_CONFIG_TARGET_PREFS, no_masks },
 	{ "settings", EM_CONFIG_TARGET_SETTINGS, no_masks },
 	{ NULL }
 };
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index f46825e..a0091e3 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -328,7 +328,6 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
 	GtkCellRenderer *renderer;
 	GConfClient *client;
 	EMConfig *ec;
-	EMConfigTargetPrefs *target;
 	GSList *l;
 	gint i;
 
@@ -346,7 +345,6 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
 	 * @Id: org.gnome.evolution.mail.composerPrefs
 	 * @Type: E_CONFIG_BOOK
 	 * @Class: org.gnome.evolution.mail.config:1.0
-	 * @Target: EMConfigTargetPrefs
 	 *
 	 * The mail composer preferences settings page.
 	 */
@@ -589,8 +587,6 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
 
 	/* get our toplevel widget */
 	client = gconf_client_get_default ();
-	target = em_config_target_new_prefs (ec, client);
-	e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
 	toplevel = e_config_create_widget ((EConfig *) ec);
 	gtk_container_add (GTK_CONTAINER (prefs), toplevel);
 	g_object_unref (client);
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 27f7314..a629d39 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -712,7 +712,6 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
 	gboolean locked;
 	gint val, i;
 	EMConfig *ec;
-	EMConfigTargetPrefs *target;
 	GSList *l;
 
 	shell_settings = e_shell_get_shell_settings (shell);
@@ -729,7 +728,6 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
 	 * @Id: org.gnome.evolution.mail.prefs
 	 * @Type: E_CONFIG_BOOK
 	 * @Class: org.gnome.evolution.mail.config:1.0
-	 * @Target: EMConfigTargetPrefs
 	 *
 	 * The main mail preferences page.
 	 */
@@ -1115,8 +1113,6 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
 		G_CALLBACK (jh_remove_cb), prefs);
 
 	/* get our toplevel widget */
-	target = em_config_target_new_prefs (ec, prefs->gconf);
-	e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
 	toplevel = e_config_create_widget ((EConfig *) ec);
 	gtk_container_add (GTK_CONTAINER (prefs), toplevel);
 }
diff --git a/modules/mail/em-mailer-prefs.h b/modules/mail/em-mailer-prefs.h
index b8e01b3..d672d2c 100644
--- a/modules/mail/em-mailer-prefs.h
+++ b/modules/mail/em-mailer-prefs.h
@@ -24,6 +24,8 @@
 #define EM_MAILER_PREFS_H
 
 #include <gtk/gtk.h>
+#include <gconf/gconf-client.h>
+
 #include <shell/e-shell.h>
 #include <widgets/misc/e-preferences-window.h>
 
diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c
index 64fe23e..38e34f7 100644
--- a/modules/mail/em-network-prefs.c
+++ b/modules/mail/em-network-prefs.c
@@ -318,7 +318,6 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
 	GSList *l, *ignore;
 	gchar *buf;
 	EMConfig *ec;
-	EMConfigTargetPrefs *target;
 	gboolean locked;
 	gint i, val, port;
 
@@ -336,7 +335,6 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
 	 * @Id: org.gnome.evolution.mail.networkPrefs
 	 * @Type: E_CONFIG_BOOK
 	 * @Class: org.gnome.evolution.mail.config:1.0
-	 * @Target: EMConfigTargetPrefs
 	 *
 	 * The network preferences settings page.
 	 */
@@ -522,8 +520,6 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
 	}
 
 	/* get our toplevel widget */
-	target = em_config_target_new_prefs (ec, prefs->gconf);
-	e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
 	toplevel = e_config_create_widget ((EConfig *) ec);
 	gtk_container_add (GTK_CONTAINER (prefs), toplevel);
 }
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 916a853..b7ac7be 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -3130,8 +3130,7 @@ format_itip (EPlugin *ep,
 }
 
 static void
-delete_toggled_cb (GtkWidget *widget,
-                   gpointer data)
+delete_toggled_cb (GtkWidget *widget)
 {
 	GSettings *settings;
 	gboolean active;
@@ -3196,7 +3195,6 @@ GtkWidget *
 itip_formatter_page_factory (EPlugin *ep,
                              EConfigHookItemFactoryData *hook_data)
 {
-	EMConfigTargetPrefs *target = (EMConfigTargetPrefs *) hook_data->config->target;
 	GtkWidget *page;
 	GtkWidget *tab_label;
 	GtkWidget *frame;
@@ -3243,7 +3241,7 @@ itip_formatter_page_factory (EPlugin *ep,
 
 	check = gtk_check_button_new_with_mnemonic (_("_Delete message after acting"));
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), g_settings_get_boolean (settings, CONF_KEY_DELETE));
-	g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (delete_toggled_cb), target);
+	g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (delete_toggled_cb), NULL);
 	gtk_box_pack_start (GTK_BOX (inner_vbox), check, FALSE, FALSE, 0);
 
 	g_object_unref (settings);
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index c46e903..5a8c4b6 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -298,7 +298,6 @@ GtkWidget *
 org_gnome_prefer_plain_config_mode (EPlugin *epl,
                                     struct _EConfigHookItemFactoryData *data)
 {
-	/*EMConfigTargetPrefs *ep = (EMConfigTargetPrefs *)data->target;*/
 	GtkComboBox *dropdown;
 	GtkCellRenderer *cell;
 	GtkListStore *store;
diff --git a/shell/e-shell-window-private.h b/shell/e-shell-window-private.h
index 48226af..d1aef9b 100644
--- a/shell/e-shell-window-private.h
+++ b/shell/e-shell-window-private.h
@@ -27,7 +27,6 @@
 #include <string.h>
 #include <glib/gi18n.h>
 
-#include <gconf/gconf-client.h>
 #include <libebackend/e-extensible.h>
 
 #include <e-util/e-util.h>
diff --git a/shell/e-shell.h b/shell/e-shell.h
index a8def6f..04a8a18 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -22,8 +22,6 @@
 #ifndef E_SHELL_H
 #define E_SHELL_H
 
-#include <gconf/gconf-client.h>
-
 #include <e-util/e-activity.h>
 #include <e-util/e-alert.h>
 



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