diff options
author | Peter Williams <peterw@ximian.com> | 2002-08-01 23:52:38 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2002-08-01 23:52:38 +0800 |
commit | c89f5e6986b6f4ea6d5ee5104e0b052e6916d081 (patch) | |
tree | 3a5577dc01e102ebe5b71313f5c8a37453917580 /mail | |
parent | 1a8f31eb034c28a588b9bb3f2b838ea03b2b4c7c (diff) | |
download | gsoc2013-evolution-c89f5e6986b6f4ea6d5ee5104e0b052e6916d081.tar.gz gsoc2013-evolution-c89f5e6986b6f4ea6d5ee5104e0b052e6916d081.tar.zst gsoc2013-evolution-c89f5e6986b6f4ea6d5ee5104e0b052e6916d081.zip |
camel:
2002-07-29 Peter Williams <peterw@ximian.com>
Fix bug #28238
* providers/imap/camel-imap-store.c (imap_forget_folder): New
function, breaking out the code in delete_folder() to handle when
a folder is removed.
(imap_folder_effectively_unsubscribed): New function, breaking out
the code in unsubscribe_folder() to handle when a folder is
unsubscribed.
(imap_check_folder_still_extant): New function, check whether a
folder exists by LIST'ing it.
(imap_store_refresh_folders): Add code here to check if the folder
still exists if we're unable to refresh its info. If so, pretend
that it was unsubscribed (to get the mailer to remove it from
the tree) and delete its cache. If somehow this goofs up, the
worst that can happen is that we must redownload the headers.
(get_folder_status): If we can't get the status, behave as above.
(delete_folder): Call imap_forget_folder() where the bulk of this
code has gone.
(unsubscribe_folder): Call imap_folder_effectively_unsubscribed()
where the bulk of this code has gone.
mail:
2002-07-31 Peter Williams <peterw@ximian.com>
* mail-folder-cache.c: Add another bitfield "unsub"
(real_flush_updates): If unsubscribing, manually remove the folder
from the shell.
(unset_folder_info): Add another parameter which is used to set
the unsub member.
(store_folder_unsubscribed): Pass true for @unsub.
(unset_folder_info_hash): Pass false for @unsub.
* subscribe-dialog.c (fe_done_subscribing): Don't notify the shell
here. The folder cache does it now, and it was broken to make the
CORBA call in another thread anyway.
svn path=/trunk/; revision=17669
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 14 | ||||
-rw-r--r-- | mail/mail-folder-cache.c | 11 | ||||
-rw-r--r-- | mail/subscribe-dialog.c | 1 |
3 files changed, 22 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 0fbcac4fb1..ca365eefb5 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,17 @@ +2002-07-31 Peter Williams <peterw@ximian.com> + + * mail-folder-cache.c: Add another bitfield "unsub" + (real_flush_updates): If unsubscribing, manually remove the folder + from the shell. + (unset_folder_info): Add another parameter which is used to set + the unsub member. + (store_folder_unsubscribed): Pass true for @unsub. + (unset_folder_info_hash): Pass false for @unsub. + + * subscribe-dialog.c (fe_done_subscribing): Don't notify the shell + here. The folder cache does it now, and it was broken to make the + CORBA call in another thread anyway. + 2002-08-01 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (setup_mime_tables): Don't setup a handler for diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 5d7f1c879e..ab49fd0c25 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -76,6 +76,7 @@ struct _folder_update { unsigned int remove:1; /* removing from vfolders */ unsigned int delete:1; /* deleting as well? */ unsigned int add:1; /* add to vfolder */ + unsigned int unsub:1; /* unsubcribing? */ char *path; char *name; @@ -159,6 +160,8 @@ real_flush_updates(void *o, void *event_data, void *data) mail_vfolder_delete_uri(up->store, up->uri); mail_filter_delete_uri(up->store, up->uri); mail_config_uri_deleted(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(up->store))->compare_folder_name, up->uri); + if (up->unsub) + evolution_storage_removed_folder (storage, up->path); } else mail_vfolder_add_uri(up->store, up->uri, TRUE); } else { @@ -222,7 +225,7 @@ flush_updates(void) } static void -unset_folder_info(struct _folder_info *mfi, int delete) +unset_folder_info(struct _folder_info *mfi, int delete, int unsub) { struct _folder_update *up; @@ -242,7 +245,9 @@ unset_folder_info(struct _folder_info *mfi, int delete) up->remove = TRUE; up->delete = delete; + up->unsub = unsub; up->store = mfi->store_info->store; + up->path = g_strdup (mfi->path); camel_object_ref((CamelObject *)up->store); up->uri = g_strdup(mfi->uri); @@ -496,7 +501,7 @@ store_folder_unsubscribed(CamelObject *o, void *event_data, void *data) if (mfi) { g_hash_table_remove(si->folders, mfi->full_name); g_hash_table_remove(si->folders_uri, mfi->uri); - unset_folder_info(mfi, TRUE); + unset_folder_info(mfi, TRUE, TRUE); free_folder_info(mfi); } } @@ -639,7 +644,7 @@ struct _update_data { static void unset_folder_info_hash(char *path, struct _folder_info *mfi, void *data) { - unset_folder_info(mfi, FALSE); + unset_folder_info(mfi, FALSE, FALSE); } static void diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c index 878d95eebc..e9c42855c0 100644 --- a/mail/subscribe-dialog.c +++ b/mail/subscribe-dialog.c @@ -843,7 +843,6 @@ fe_done_subscribing (const char *full_name, const char *name, gboolean subscribe closure->data->flags &= ~FTREE_NODE_SUBSCRIBED; /* FIXME: recursively remove folder as well? Possible? */ - evolution_storage_removed_folder (closure->ftree->e_storage, path); } g_free (path); |