diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-10-05 05:29:55 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-10-05 05:29:55 +0800 |
commit | 3eed228723a8c745e6ae28df8a80191c24dd483a (patch) | |
tree | ca5b0d15aec57c3f7c30418b3aea24275b10e7fa | |
parent | 447e2e189e014678bd8af495a3fc6ca5d70297ca (diff) | |
download | gsoc2013-evolution-3eed228723a8c745e6ae28df8a80191c24dd483a.tar.gz gsoc2013-evolution-3eed228723a8c745e6ae28df8a80191c24dd483a.tar.zst gsoc2013-evolution-3eed228723a8c745e6ae28df8a80191c24dd483a.zip |
Ignore the signal if the radio button is not "on". This fixes bug #10532
2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
* mail-accounts.c (images_radio_toggled): Ignore the signal if the
radio button is not "on". This fixes bug #10532 because the on/off
signals don't always come in the off->on order.
* mail-ops.c (mail_send_message): Reduced some redundancy.
svn path=/trunk/; revision=13424
-rw-r--r-- | mail/ChangeLog | 11 | ||||
-rw-r--r-- | mail/mail-accounts.c | 5 | ||||
-rw-r--r-- | mail/mail-config.c | 2 | ||||
-rw-r--r-- | mail/mail-config.h | 9 | ||||
-rw-r--r-- | mail/mail-ops.c | 49 |
5 files changed, 42 insertions, 34 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index d907c82976..3b2ac73b54 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2001-10-04 Jeffrey Stedfast <fejj@ximian.com> + + * mail-accounts.c (images_radio_toggled): Ignore the signal if the + radio button is not "on". This fixes bug #10532 because the on/off + signals don't always come in the off->on order. + + * mail-ops.c (mail_send_message): Reduced some redundancy. + 2001-10-04 Dan Winship <danw@ximian.com> * mail-format.c (write_address): Fix so that an email address with @@ -19,7 +27,8 @@ 2001-10-04 Jeffrey Stedfast <fejj@ximian.com> - * mail-account-gui.c (mail_account_gui_save): Added some more NULL checks. + * mail-account-gui.c (mail_account_gui_save): Added some more NULL + checks. 2001-10-04 <NotZed@Ximian.com> diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 0bc9191743..bd125de1fa 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -656,7 +656,10 @@ static void images_radio_toggled (GtkWidget *radio, gpointer data) { MailAccountsDialog *dialog = data; - + + if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio))) + return; + if (radio == (GtkWidget *)dialog->images_always) mail_config_set_http_mode (MAIL_CONFIG_HTTP_ALWAYS); else if (radio == (GtkWidget *)dialog->images_sometimes) diff --git a/mail/mail-config.c b/mail/mail-config.c index 17a3a25550..aa94a2c8e3 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -560,7 +560,7 @@ config_read (void) /* HTTP images */ config->http_mode = bonobo_config_get_long_with_default (config->db, - "/Mail/Display/http_images", MAIL_CONFIG_HTTP_SOMETIMES, NULL); + "/Mail/Display/http_images", MAIL_CONFIG_HTTP_NEVER, NULL); /* Forwarding */ config->default_forward_style = bonobo_config_get_long_with_default ( diff --git a/mail/mail-config.h b/mail/mail-config.h index 1264a8cbc3..ad79825865 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -69,17 +69,20 @@ typedef struct { } MailConfigAccount; typedef enum { - MAIL_CONFIG_HTTP_NEVER, MAIL_CONFIG_HTTP_SOMETIMES, + MAIL_CONFIG_HTTP_NEVER, + MAIL_CONFIG_HTTP_SOMETIMES, MAIL_CONFIG_HTTP_ALWAYS } MailConfigHTTPMode; typedef enum { - MAIL_CONFIG_FORWARD_ATTACHED, MAIL_CONFIG_FORWARD_INLINE, + MAIL_CONFIG_FORWARD_ATTACHED, + MAIL_CONFIG_FORWARD_INLINE, MAIL_CONFIG_FORWARD_QUOTED } MailConfigForwardStyle; typedef enum { - MAIL_CONFIG_DISPLAY_NORMAL, MAIL_CONFIG_DISPLAY_FULL_HEADERS, + MAIL_CONFIG_DISPLAY_NORMAL, + MAIL_CONFIG_DISPLAY_FULL_HEADERS, MAIL_CONFIG_DISPLAY_SOURCE, MAIL_CONFIG_DISPLAY_MAX } MailConfigDisplayStyle; diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 371a12f626..009581b6d9 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -403,10 +403,10 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte { CamelMessageInfo *info; CamelTransport *xport = NULL; + char *transport_url = NULL; + char *sent_folder_uri = NULL; CamelFolder *folder; - const char *version, *header; - gchar *acct_header; - char *transport_url = NULL, *sent_folder_uri = NULL; + const char *version; XEvolution *xev; if (SUB_VERSION[0] == '\0') @@ -416,39 +416,36 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte camel_medium_add_header (CAMEL_MEDIUM (message), "X-Mailer", version); camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0); - /* Get information about the account this was composed by. */ - acct_header = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account")); - if (acct_header) { + xev = mail_tool_remove_xevolution_headers (message); + + if (xev->transport) { + transport_url = g_strstrip (g_strdup (xev->transport)); + } else if (xev->account) { const MailConfigAccount *account; + char *name; + + name = g_strstrip (g_strdup (xev->account)); + account = mail_config_get_account_by_name (name); + g_free (name); - account = mail_config_get_account_by_name (acct_header); - if (account) { + if (account && account->transport && account->transport->url) transport_url = g_strdup (account->transport->url); - sent_folder_uri = g_strdup (account->sent_folder_uri); - } - } - - if (!transport_url) { - header = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Transport"); - if (header) - transport_url = g_strstrip (g_strdup (header)); } - if (!sent_folder_uri) { - header = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc"); - if (header) - sent_folder_uri = g_strstrip (g_strdup (header)); - } + if (xev->fcc) + sent_folder_uri = g_strstrip (g_strdup (xev->fcc)); xport = camel_session_get_transport (session, transport_url ? transport_url : destination, ex); g_free (transport_url); if (!xport) { + mail_tool_restore_xevolution_headers (message, xev); + mail_tool_destroy_xevolution (xev); g_free (sent_folder_uri); return; } - xev = mail_tool_remove_xevolution_headers (message); camel_transport_send (xport, CAMEL_MEDIUM (message), ex); + mail_tool_restore_xevolution_headers (message, xev); mail_tool_destroy_xevolution (xev); @@ -462,12 +459,6 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte info = camel_message_info_new (); info->flags = CAMEL_MESSAGE_SEEN; - /* Re-attach account header */ - if (acct_header) { - camel_medium_add_header (CAMEL_MEDIUM (message), "X-Evolution-Account", acct_header); - g_free (acct_header); - } - if (driver) { camel_filter_driver_filter_message (driver, message, info, NULL, NULL, NULL, "", ex); @@ -483,6 +474,8 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte g_free (description); camel_message_info_free (info); + g_free (sent_folder_uri); + return; } } |