diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-ops.c | 37 |
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); |