aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-12-10 22:34:45 +0800
committerDan Winship <danw@src.gnome.org>2001-12-10 22:34:45 +0800
commit7cdf441965e654cc407a245482ee17467fb376e8 (patch)
treebf4c6da991f807d6736c7842de216358af6ecd5b /mail/mail-send-recv.c
parent4e5542ad2842655ab1a8e424d367331311177bcb (diff)
downloadgsoc2013-evolution-7cdf441965e654cc407a245482ee17467fb376e8.tar.gz
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
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c14
1 files changed, 11 insertions, 3 deletions
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;