aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/em-composer-prefs.c6
-rw-r--r--mail/evolution-mail.schemas.in14
-rw-r--r--mail/mail-config.c22
-rw-r--r--mail/mail-config.glade19
5 files changed, 73 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3f60f7a0fe..8212ec62f2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+2008-11-12 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #524377
+
+ * mail-config.glade:
+ * evolution-mail.schemas.in:
+ * em-composer-prefs.c: (em_composer_prefs_construct):
+ * mail-config.c: (gconf_outlook_filenames_changed), (mail_config_init):
+ Declare, be able to change and listen to changes on new key,
+ '/apps/evolution/mail/composer/outlook_filenames' to encode file names
+ header in camel based on the RFC 2047, instead of the correct RFC 2231.
+
2008-11-07 Matthew Barnes <mbarnes@redhat.com>
** Fix for bug #552583
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c
index 5c5b491afb..0b19cc24bf 100644
--- a/mail/em-composer-prefs.c
+++ b/mail/em-composer-prefs.c
@@ -917,6 +917,12 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
gtk_widget_set_sensitive (widget, FALSE);
gconf_bridge_bind_property (bridge, key, G_OBJECT (widget), "active");
+ key = "/apps/evolution/mail/composer/outlook_filenames";
+ widget = glade_xml_get_widget (gui, "chkOutlookFilenames");
+ if (!gconf_client_key_is_writable (client, key, NULL))
+ gtk_widget_set_sensitive (widget, FALSE);
+ gconf_bridge_bind_property (bridge, key, G_OBJECT (widget), "active");
+
key = "/apps/evolution/mail/composer/top_signature";
widget = glade_xml_get_widget (gui, "chkTopSignature");
if (!gconf_client_key_is_writable (client, key, NULL))
diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in
index 5e328b5457..9eb7f9ebc1 100644
--- a/mail/evolution-mail.schemas.in
+++ b/mail/evolution-mail.schemas.in
@@ -186,6 +186,20 @@
</schema>
<schema>
+ <key>/schemas/apps/evolution/mail/composer/outlook_filenames</key>
+ <applyto>/apps/evolution/mail/composer/outlook_filenames</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Encode file names in an Outlook/GMail way</short>
+ <long>
+ Encode file names in the mail headers same as Outlook or GMail does, to let them understand localized file names sent by Evolution, because they do not follow the RFC 2231, but uses incorrect RFC 2047 standard.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/evolution/mail/composer/width</key>
<applyto>/apps/evolution/mail/composer/width</applyto>
<owner>evolution-mail</owner>
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 4629d7a310..001b5399c7 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -248,6 +248,22 @@ gconf_style_changed (GConfClient *client, guint cnxn_id,
}
static void
+gconf_outlook_filenames_changed (GConfClient *client, guint cnxn_id,
+ GConfEntry *entry, gpointer user_data)
+{
+ extern int camel_header_param_encode_filenames_in_rfc_2047;
+
+ g_return_if_fail (client != NULL);
+
+ /* pass option to the camel */
+ if (gconf_client_get_bool (client, "/apps/evolution/mail/composer/outlook_filenames", NULL)) {
+ camel_header_param_encode_filenames_in_rfc_2047 = 1;
+ } else {
+ camel_header_param_encode_filenames_in_rfc_2047 = 0;
+ }
+}
+
+static void
gconf_jh_check_changed (GConfClient *client, guint cnxn_id,
GConfEntry *entry, gpointer user_data)
{
@@ -369,6 +385,12 @@ mail_config_init (void)
gconf_client_notify_add (
config->gconf, key, func, NULL, NULL, NULL);
+ key = "/apps/evolution/mail/composer/outlook_filenames";
+ func = (GConfClientNotifyFunc) gconf_outlook_filenames_changed;
+ gconf_outlook_filenames_changed (config->gconf, 0, NULL, NULL);
+ gconf_client_notify_add (
+ config->gconf, key, func, NULL, NULL, NULL);
+
/* Display Configuration */
gconf_client_add_dir (
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 69a9016535..6c3dc7937a 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -7124,6 +7124,25 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
</child>
<child>
+ <widget class="GtkCheckButton" id="chkOutlookFilenames">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Encode file names in an Outlook/GMail way</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkTable" id="tableForwardsReplies">
<property name="visible">True</property>
<property name="n_rows">3</property>