From 2e87aa81fc94f5d9564421e036adae7b48e7380a Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Sun, 10 Mar 2013 09:53:12 -0400
Subject: Remove EMailShellSettings.

EShellSettings predates GSettings and is no longer necessary.

GSettings allows binding GObject properties to GSettings keys,
with optional mapping functions.  That fulfills the purpose of
EShellSettings.
---
 modules/mail/e-mail-attachment-handler.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

(limited to 'modules/mail/e-mail-attachment-handler.c')

diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c
index 98680f8299..d6caecf556 100644
--- a/modules/mail/e-mail-attachment-handler.c
+++ b/modules/mail/e-mail-attachment-handler.c
@@ -121,19 +121,18 @@ mail_attachment_handler_forward (GtkAction *action,
                                  EAttachmentHandler *handler)
 {
 	EMailAttachmentHandlerPrivate *priv;
-	EShellSettings *shell_settings;
+	GSettings *settings;
 	EMailForwardStyle style;
 	CamelMimeMessage *message;
-	const gchar *property_name;
 
 	priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
 
 	message = mail_attachment_handler_get_selected_message (handler);
 	g_return_if_fail (message != NULL);
 
-	property_name = "mail-forward-style";
-	shell_settings = e_shell_get_shell_settings (priv->shell);
-	style = e_shell_settings_get_int (shell_settings, property_name);
+	settings = g_settings_new ("org.gnome.evolution.mail");
+	style = g_settings_get_enum (settings, "forward-style-name");
+	g_object_unref (settings);
 
 	em_utils_forward_message (
 		priv->shell, CAMEL_SESSION (priv->session),
@@ -147,19 +146,18 @@ mail_attachment_handler_reply (EAttachmentHandler *handler,
                                EMailReplyType reply_type)
 {
 	EMailAttachmentHandlerPrivate *priv;
-	EShellSettings *shell_settings;
+	GSettings *settings;
 	EMailReplyStyle style;
 	CamelMimeMessage *message;
-	const gchar *property_name;
 
 	priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
 
 	message = mail_attachment_handler_get_selected_message (handler);
 	g_return_if_fail (message != NULL);
 
-	property_name = "mail-reply-style";
-	shell_settings = e_shell_get_shell_settings (priv->shell);
-	style = e_shell_settings_get_int (shell_settings, property_name);
+	settings = g_settings_new ("org.gnome.evolution.mail");
+	style = g_settings_get_enum (settings, "reply-style-name");
+	g_object_unref (settings);
 
 	em_utils_reply_to_message (
 		priv->shell, message,
-- 
cgit