diff options
author | Dan Winship <danw@src.gnome.org> | 2001-12-10 22:34:45 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-12-10 22:34:45 +0800 |
commit | 7cdf441965e654cc407a245482ee17467fb376e8 (patch) | |
tree | bf4c6da991f807d6736c7842de216358af6ecd5b | |
parent | 4e5542ad2842655ab1a8e424d367331311177bcb (diff) | |
download | gsoc2013-evolution-7cdf441965e654cc407a245482ee17467fb376e8.tar gsoc2013-evolution-7cdf441965e654cc407a245482ee17467fb376e8.tar.gz gsoc2013-evolution-7cdf441965e654cc407a245482ee17467fb376e8.tar.bz2 gsoc2013-evolution-7cdf441965e654cc407a245482ee17467fb376e8.tar.lz gsoc2013-evolution-7cdf441965e654cc407a245482ee17467fb376e8.tar.xz gsoc2013-evolution-7cdf441965e654cc407a245482ee17467fb376e8.tar.zst gsoc2013-evolution-7cdf441965e654cc407a245482ee17467fb376e8.zip |
Don't just assume all of the GtkHTMLEmbedded's fields are filled in, since
* mail-display.c (on_object_requested): Don't just assume all of
the GtkHTMLEmbedded's fields are filled in, since HTML messages
may have <object>s in them that we're not expecting.
* mail-send-recv.c (mail_send_receive): Add a "current_folder"
arg.
(build_dialogue): Remember the current_folder
(free_send_data): If current_folder is set, refresh it so it's
guaranteed to be synced with the folder tree. Fixes #14770.
* mail-callbacks.c (send_receive_mail): Pass current_folder to
mail_send_receive().
svn path=/trunk/; revision=14950
-rw-r--r-- | mail/ChangeLog | 17 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 2 | ||||
-rw-r--r-- | mail/mail-display.c | 7 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 14 | ||||
-rw-r--r-- | mail/mail-send-recv.h | 2 |
5 files changed, 35 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index bbfbca8527..d2f513f89c 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -23,6 +23,23 @@ (on_right_click): Hide "Mark as (Not) Needing Reply" context menu elements as appropriate. +2001-12-08 Dan Winship <danw@ximian.com> + + * mail-display.c (on_object_requested): Don't just assume all of + the GtkHTMLEmbedded's fields are filled in, since HTML messages + may have <object>s in them that we're not expecting. + +2001-12-07 Dan Winship <danw@ximian.com> + + * mail-send-recv.c (mail_send_receive): Add a "current_folder" + arg. + (build_dialogue): Remember the current_folder + (free_send_data): If current_folder is set, refresh it so it's + guaranteed to be synced with the folder tree. Fixes #14770. + + * mail-callbacks.c (send_receive_mail): Pass current_folder to + mail_send_receive(). + 2001-12-04 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (stream_write_or_redisplay_when_loaded): Check diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 8942aaf283..d627ab4da6 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -235,7 +235,7 @@ send_receive_mail (GtkWidget *widget, gpointer user_data) return; } - mail_send_receive (); + mail_send_receive (fb->folder); } static void diff --git a/mail/mail-display.c b/mail/mail-display.c index 8b4545880a..4746c348aa 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -952,11 +952,14 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data) GHashTable *urls; CamelMimePart *part; + if (!eb->classid) + return FALSE; + urls = g_datalist_get_data (md->data, "part_urls"); if (!urls) return FALSE; - if (!strncmp (eb->classid, "popup:", 6)) { + if (!strncmp (eb->classid, "popup:", 6) && eb->type) { part = g_hash_table_lookup (urls, eb->classid + 6); if (!CAMEL_IS_MIME_PART (part)) return FALSE; @@ -966,7 +969,7 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data) if (!CAMEL_IS_MIME_PART (part)) return FALSE; return do_signature (html, eb, part, md); - } else if (!strncmp (eb->classid, "cid:", 4)) { + } else if (!strncmp (eb->classid, "cid:", 4) && eb->type) { part = g_hash_table_lookup (urls, eb->classid); if (!CAMEL_IS_MIME_PART (part)) return FALSE; diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index f42c018a8e..3017203e6e 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -78,6 +78,8 @@ struct _send_data { CamelFolder *inbox; /* since we're never asked to update this one, do it ourselves */ time_t inbox_update; + CamelFolder *current_folder; + GMutex *lock; GHashTable *folders; @@ -177,6 +179,10 @@ free_send_data(void) /*camel_folder_thaw (data->inbox); */ camel_object_unref((CamelObject *)data->inbox); } + if (data->current_folder) { + mail_refresh_folder(data->current_folder, NULL, NULL); + camel_object_unref((CamelObject *)data->current_folder); + } g_list_free(data->infos); g_hash_table_foreach(data->active, (GHFunc)free_send_info, NULL); g_hash_table_destroy(data->active); @@ -268,7 +274,7 @@ static send_info_t get_receive_type(const char *url) } static struct _send_data * -build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination) +build_dialogue (GSList *sources, CamelFolder *current_folder, CamelFolder *outbox, const char *destination) { GnomeDialog *gd; GtkTable *table; @@ -427,6 +433,8 @@ build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination) data->infos = list; data->gd = gd; + data->current_folder = current_folder; + camel_object_ref (CAMEL_OBJECT (current_folder)); return data; } @@ -639,7 +647,7 @@ receive_update_got_store (char *uri, CamelStore *store, void *data) } } -void mail_send_receive (void) +void mail_send_receive (CamelFolder *current_folder) { GSList *sources; GList *scan; @@ -666,7 +674,7 @@ void mail_send_receive (void) Well, probably hook into receive_done or receive_status on the right pop account, and when it is, then kick off the smtp one. */ - data = build_dialogue(sources, outbox_folder, account->transport->url); + data = build_dialogue(sources, current_folder, outbox_folder, account->transport->url); scan = data->infos; while (scan) { struct _send_info *info = scan->data; diff --git a/mail/mail-send-recv.h b/mail/mail-send-recv.h index 7d43d610fb..19afea853b 100644 --- a/mail/mail-send-recv.h +++ b/mail/mail-send-recv.h @@ -31,7 +31,7 @@ extern "C" { #include "mail-config.h" /* send/receive all uri's */ -void mail_send_receive(void); +void mail_send_receive(CamelFolder *current_folder); /* receive a single uri */ void mail_receive_uri(const char *uri, int keep); /* setup auto receive stuff */ |