diff options
author | Not Zed <NotZed@Ximian.com> | 2004-09-27 11:35:18 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-09-27 11:35:18 +0800 |
commit | a03468d97f0aff1cdc2c4ef99e474d10e07df0c5 (patch) | |
tree | 3b6cde352c84e71dd6316f683d988391f8090f47 | |
parent | 2f751c1ba18a05f6acaf0dea495e259783ed55e7 (diff) | |
download | gsoc2013-evolution-a03468d97f0aff1cdc2c4ef99e474d10e07df0c5.tar gsoc2013-evolution-a03468d97f0aff1cdc2c4ef99e474d10e07df0c5.tar.gz gsoc2013-evolution-a03468d97f0aff1cdc2c4ef99e474d10e07df0c5.tar.bz2 gsoc2013-evolution-a03468d97f0aff1cdc2c4ef99e474d10e07df0c5.tar.lz gsoc2013-evolution-a03468d97f0aff1cdc2c4ef99e474d10e07df0c5.tar.xz gsoc2013-evolution-a03468d97f0aff1cdc2c4ef99e474d10e07df0c5.tar.zst gsoc2013-evolution-a03468d97f0aff1cdc2c4ef99e474d10e07df0c5.zip |
** See bug #66706.
2004-09-24 Not Zed <NotZed@Ximian.com>
** See bug #66706.
* em-subscribe-editor.c: add a sequence number to EMSubscribe and
the subscribe_msg structures. NOOP if the sequence has changed in
all callbacks. up the sequence number when we refresh.
svn path=/trunk/; revision=27386
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/em-subscribe-editor.c | 16 |
2 files changed, 20 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 1d1bc0f896..8ea9c62be9 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2004-09-24 Not Zed <NotZed@Ximian.com> + + ** See bug #66706. + + * em-subscribe-editor.c: add a sequence number to EMSubscribe and + the subscribe_msg structures. NOOP if the sequence has changed in + all callbacks. up the sequence number when we refresh. + 2004-09-20 Not Zed <NotZed@Ximian.com> ** See bug #65329. diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index 08954e9c8c..e3958076af 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -86,6 +86,7 @@ struct _EMSubscribe { int ref_count; int cancel; + int seq; /* upped every time we refresh */ struct _EMSubscribeEditor *editor; /* parent object*/ @@ -327,6 +328,8 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in struct _emse_folderinfo_msg { struct _mail_msg msg; + int seq; + EMSubscribe *sub; EMSubscribeNode *node; CamelFolderInfo *info; @@ -337,9 +340,11 @@ sub_folderinfo_get (struct _mail_msg *mm) { struct _emse_folderinfo_msg *m = (struct _emse_folderinfo_msg *) mm; - camel_operation_register(mm->cancel); - m->info = camel_store_get_folder_info (m->sub->store, m->node?m->node->info->full_name:"", CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, &mm->ex); - camel_operation_unregister(mm->cancel); + if (m->seq == m->sub->seq) { + camel_operation_register(mm->cancel); + m->info = camel_store_get_folder_info(m->sub->store, m->node?m->node->info->full_name:"", CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, &mm->ex); + camel_operation_unregister(mm->cancel); + } } static void @@ -349,7 +354,7 @@ sub_folderinfo_got(struct _mail_msg *mm) EMSubscribeNode *node; m->sub->pending_id = -1; - if (m->sub->cancel) + if (m->sub->cancel || m->seq != m->sub->seq) return; if (camel_exception_is_set (&mm->ex)) { @@ -407,6 +412,7 @@ sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node) sub_ref(sub); m->sub = sub; m->node = node; + m->seq = sub->seq; sub->pending_id = m->msg.seq; @@ -684,6 +690,8 @@ sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se) if (sub == NULL || sub->store == NULL) return; + sub->seq++; + /* drop any currently pending */ if (sub->pending_id != -1) mail_msg_cancel(sub->pending_id); |