diff options
author | Peter Williams <peterw@src.gnome.org> | 2000-08-12 01:35:14 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2000-08-12 01:35:14 +0800 |
commit | 1fa80ef1b7e6de2c0653b68f60986ae4150d2780 (patch) | |
tree | 17909256c3f891914df8c2baec4b13198822725b /mail/mail-callbacks.c | |
parent | 5d79af0da616d725eebfc15d100ee62ff18cb037 (diff) | |
download | gsoc2013-evolution-1fa80ef1b7e6de2c0653b68f60986ae4150d2780.tar gsoc2013-evolution-1fa80ef1b7e6de2c0653b68f60986ae4150d2780.tar.gz gsoc2013-evolution-1fa80ef1b7e6de2c0653b68f60986ae4150d2780.tar.bz2 gsoc2013-evolution-1fa80ef1b7e6de2c0653b68f60986ae4150d2780.tar.lz gsoc2013-evolution-1fa80ef1b7e6de2c0653b68f60986ae4150d2780.tar.xz gsoc2013-evolution-1fa80ef1b7e6de2c0653b68f60986ae4150d2780.tar.zst gsoc2013-evolution-1fa80ef1b7e6de2c0653b68f60986ae4150d2780.zip |
Fix the camel-folder's thaw handler. Implement event forwarding into the main thread.
svn path=/trunk/; revision=4744
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r-- | mail/mail-callbacks.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 77143c9258..d67c9d90ad 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -69,7 +69,7 @@ check_configured (void) } static void -select_first_unread (CamelFolder *folder, gpointer event_data, gpointer data) +main_select_first_unread (CamelFolder *folder, gpointer event_data, gpointer data) { FolderBrowser *fb = FOLDER_BROWSER (data); ETable *table = E_TABLE_SCROLLED (fb->message_list->etable)->table; @@ -78,11 +78,16 @@ select_first_unread (CamelFolder *folder, gpointer event_data, gpointer data) 0, CAMEL_MESSAGE_SEEN); } +static void +select_first_unread (CamelFolder *folder, gpointer event_data, gpointer data) +{ + mail_op_forward_event (main_select_first_unread, folder, event_data, data); +} + void fetch_mail (GtkWidget *button, gpointer user_data) { - MailConfigService *source; - char *url = NULL; + GSList *sources; if (!check_configured ()) { GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (user_data), @@ -93,10 +98,9 @@ fetch_mail (GtkWidget *button, gpointer user_data) return; } - source = mail_config_get_default_source (); - url = source->url; + sources = mail_config_get_sources (); - if (!url) { + if (!sources || !sources->data) { GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (user_data), GTK_TYPE_WINDOW); @@ -105,7 +109,20 @@ fetch_mail (GtkWidget *button, gpointer user_data) return; } - mail_do_fetch_mail (url, source->keep_on_server, NULL, select_first_unread, user_data); + while (sources) { + MailConfigService *source; + + source = (MailConfigService *) sources->data; + sources = sources->next; + + if (!source || !source->url) { + g_warning ("Bad source in fetch_mail??"); + continue; + } + + mail_do_fetch_mail (source->url, source->keep_on_server, + NULL, select_first_unread, user_data); + } } static gboolean |