aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-07-23 21:55:13 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-07-23 21:55:13 +0800
commite3f8e22df0178b8c471f0a4f6e57ac76d1f1c36c (patch)
tree58a8929b11f8e3d517a953b37d0a4e800e256716 /mail
parenta80bd46ba3507bfceb1a70300f71aef1ea821e75 (diff)
downloadgsoc2013-evolution-e3f8e22df0178b8c471f0a4f6e57ac76d1f1c36c.tar
gsoc2013-evolution-e3f8e22df0178b8c471f0a4f6e57ac76d1f1c36c.tar.gz
gsoc2013-evolution-e3f8e22df0178b8c471f0a4f6e57ac76d1f1c36c.tar.bz2
gsoc2013-evolution-e3f8e22df0178b8c471f0a4f6e57ac76d1f1c36c.tar.lz
gsoc2013-evolution-e3f8e22df0178b8c471f0a4f6e57ac76d1f1c36c.tar.xz
gsoc2013-evolution-e3f8e22df0178b8c471f0a4f6e57ac76d1f1c36c.tar.zst
gsoc2013-evolution-e3f8e22df0178b8c471f0a4f6e57ac76d1f1c36c.zip
Add a "Send HTML mail" toggle in the message composer.
svn path=/trunk/; revision=4284
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-ops.c37
2 files changed, 39 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b00f4e3086..5fff503a98 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
2000-07-23 Ettore Perazzoli <ettore@helixcode.com>
+ * mail-ops.c (create_message_composer): New.
+ (compose_msg): Use it.
+ (send_to_url): Likewise.
+ (forward_msg): Likewise.
+
* folder-browser-factory.c (control_activate): Use `_()' instead
of `N_()'.
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 94cd42fae0..c28564aad8 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -568,6 +568,37 @@ free_psd (GtkWidget *composer, gpointer user_data)
g_free (psd);
}
+static GtkWidget *
+create_msg_composer (const char *url)
+{
+ GtkWidget *composer_widget;
+ gboolean send_html;
+ char *path;
+ char *string;
+
+ path = g_strdup_printf ("=%s/config=/mail/msg_format", evolution_dir);
+ string = gnome_config_get_string (path);
+ g_free (path);
+
+ if (string == NULL) {
+ send_html = FALSE;
+ } else {
+ if (!strcasecmp(string, "plain"))
+ send_html = FALSE;
+ else
+ send_html = TRUE;
+ }
+
+ if (url != NULL)
+ composer_widget = e_msg_composer_new_from_url (url);
+ else
+ composer_widget = e_msg_composer_new ();
+
+ e_msg_composer_set_send_html (E_MSG_COMPOSER (composer_widget), send_html);
+
+ return composer_widget;
+}
+
void
compose_msg (GtkWidget *widget, gpointer user_data)
{
@@ -576,7 +607,7 @@ compose_msg (GtkWidget *widget, gpointer user_data)
if (!check_configured ())
return;
- composer = e_msg_composer_new ();
+ composer = create_msg_composer (NULL);
gtk_signal_connect (GTK_OBJECT (composer), "send",
GTK_SIGNAL_FUNC (composer_send_cb), NULL);
@@ -592,7 +623,7 @@ send_to_url (const char *url)
if (!check_configured ())
return;
- composer = e_msg_composer_new_from_url (url);
+ composer = create_msg_composer (url);
gtk_signal_connect (GTK_OBJECT (composer), "send",
GTK_SIGNAL_FUNC (composer_send_cb), NULL);
@@ -681,7 +712,7 @@ forward_msg (GtkWidget *button, gpointer user_data)
if (!check_configured () || !cursor_msg)
return;
- composer = E_MSG_COMPOSER (e_msg_composer_new ());
+ composer = E_MSG_COMPOSER (create_msg_composer (NULL));
message_list_foreach (fb->message_list, attach_msg, composer);
from = camel_mime_message_get_from (cursor_msg);