diff options
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r-- | mail/mail-send-recv.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 7012b5fd35..e70eade3e5 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -696,13 +696,11 @@ static void auto_clean_set(void *key, struct _auto_data *info, GHashTable *set) /* call to setup initial, and after changes are made to the config */ /* FIXME: Need a cleanup funciton for when object is deactivated */ -void -mail_autoreceive_setup(void) +static void +autoreceive_setup_list(GSList *sources, gboolean clear_absent) { - GSList *sources; GHashTable *set_hash; - sources = mail_config_get_sources(); if (!sources) return; @@ -744,10 +742,28 @@ mail_autoreceive_setup(void) sources = sources->next; } - g_hash_table_foreach(set_hash, (GHFunc)auto_clean_set, auto_active); + if (clear_absent) + g_hash_table_foreach(set_hash, (GHFunc)auto_clean_set, auto_active); g_hash_table_destroy(set_hash); } +void +mail_autoreceive_setup (void) +{ + autoreceive_setup_list (mail_config_get_sources(), TRUE); +} + +void +mail_autoreceive_setup_account (MailConfigService *service) +{ + GSList list; + + list.data = service; + list.next = NULL; + + autoreceive_setup_list (&list, FALSE); +} + /* we setup the download info's in a hashtable, if we later need to build the gui, we insert them in to add them. */ void mail_receive_uri(const char *uri, int keep) |