aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-attachment-handler.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-20 01:32:26 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-20 01:41:14 +0800
commitd305e8ff1052c9ec109a0d220c05c669e2180662 (patch)
treee4bfa16c9165be5159b0a07f5d0e006f20f30019 /modules/mail/e-mail-attachment-handler.c
parent689bb1148d8494b71036f9dcce8a9f79b53cbfe6 (diff)
downloadgsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.tar.gz
gsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.tar.zst
gsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.zip
Reduce GConf usage in em-composer-utils.c.
To reduce GConf usage in em-composer-utils.c: - Relevant functions in em-composer-utils.c now take arguments for reply and forward styles. - Redundant forwarding functions were removed: em_utils_forward_attached() em_utils_forward_inline() em_utils_forward_quoted() - EMailReader now has "forward-style" and "reply-style" properties, which get bound to the appropriate EShellSettings properties in modules/mail/e-mail-config-reader.c. These same EShellSettings properties are bound to the combo boxes in Composer Preferences.
Diffstat (limited to 'modules/mail/e-mail-attachment-handler.c')
-rw-r--r--modules/mail/e-mail-attachment-handler.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c
index 2b74b2a1ed..b868c3069d 100644
--- a/modules/mail/e-mail-attachment-handler.c
+++ b/modules/mail/e-mail-attachment-handler.c
@@ -61,10 +61,13 @@ mail_attachment_handler_forward (GtkAction *action,
EAttachmentHandler *handler)
{
EMailAttachmentHandlerPrivate *priv;
+ EShellSettings *shell_settings;
EAttachment *attachment;
EAttachmentView *view;
CamelMimePart *mime_part;
CamelDataWrapper *wrapper;
+ EMailForwardStyle style;
+ const gchar *property_name;
GList *selected;
view = e_attachment_handler_get_view (handler);
@@ -77,8 +80,12 @@ mail_attachment_handler_forward (GtkAction *action,
mime_part = e_attachment_get_mime_part (attachment);
wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
+ property_name = "mail-forward-style";
+ shell_settings = e_shell_get_shell_settings (priv->shell);
+ style = e_shell_settings_get_int (shell_settings, property_name);
+
em_utils_forward_message (
- priv->shell, CAMEL_MIME_MESSAGE (wrapper), NULL);
+ priv->shell, CAMEL_MIME_MESSAGE (wrapper), NULL, style);
g_list_foreach (selected, (GFunc) g_object_unref, NULL);
g_list_free (selected);
@@ -89,10 +96,13 @@ mail_attachment_handler_reply_all (GtkAction *action,
EAttachmentHandler *handler)
{
EMailAttachmentHandlerPrivate *priv;
+ EShellSettings *shell_settings;
EAttachment *attachment;
EAttachmentView *view;
CamelMimePart *mime_part;
CamelDataWrapper *wrapper;
+ EMailReplyStyle style;
+ const gchar *property_name;
GList *selected;
view = e_attachment_handler_get_view (handler);
@@ -105,9 +115,13 @@ mail_attachment_handler_reply_all (GtkAction *action,
mime_part = e_attachment_get_mime_part (attachment);
wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
+ property_name = "mail-reply-style";
+ shell_settings = e_shell_get_shell_settings (priv->shell);
+ style = e_shell_settings_get_int (shell_settings, property_name);
+
em_utils_reply_to_message (
priv->shell, NULL, NULL, CAMEL_MIME_MESSAGE (wrapper),
- REPLY_MODE_ALL, NULL);
+ E_MAIL_REPLY_TO_ALL, style, NULL);
g_list_foreach (selected, (GFunc) g_object_unref, NULL);
g_list_free (selected);
@@ -118,10 +132,13 @@ mail_attachment_handler_reply_sender (GtkAction *action,
EAttachmentHandler *handler)
{
EMailAttachmentHandlerPrivate *priv;
+ EShellSettings *shell_settings;
EAttachment *attachment;
EAttachmentView *view;
CamelMimePart *mime_part;
CamelDataWrapper *wrapper;
+ EMailForwardStyle style;
+ const gchar *property_name;
GList *selected;
view = e_attachment_handler_get_view (handler);
@@ -134,9 +151,13 @@ mail_attachment_handler_reply_sender (GtkAction *action,
mime_part = e_attachment_get_mime_part (attachment);
wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
+ property_name = "mail-reply-style";
+ shell_settings = e_shell_get_shell_settings (priv->shell);
+ style = e_shell_settings_get_int (shell_settings, property_name);
+
em_utils_reply_to_message (
priv->shell, NULL, NULL, CAMEL_MIME_MESSAGE (wrapper),
- REPLY_MODE_SENDER, NULL);
+ E_MAIL_REPLY_TO_SENDER, style, NULL);
g_list_foreach (selected, (GFunc) g_object_unref, NULL);
g_list_free (selected);