[evolution-patches] 66706, mail crash refresh subscriptions window
- From: Not Zed <notzed ximian com>
- To: asdf <evolution-patches lists ximian com>
- Subject: [evolution-patches] 66706, mail crash refresh subscriptions window
- Date: Fri, 24 Sep 2004 16:18:32 +0800
nice straightforward fix
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3444.2.12
diff -u -3 -r1.3444.2.12 ChangeLog
--- mail/ChangeLog 24 Sep 2004 04:16:11 -0000 1.3444.2.12
+++ mail/ChangeLog 24 Sep 2004 08:21:06 -0000
@@ -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.
Index: mail/em-subscribe-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-subscribe-editor.c,v
retrieving revision 1.13
diff -u -3 -r1.13 em-subscribe-editor.c
--- mail/em-subscribe-editor.c 18 Jun 2004 04:43:59 -0000 1.13
+++ mail/em-subscribe-editor.c 24 Sep 2004 08:21:06 -0000
@@ -85,6 +85,7 @@
int ref_count;
int cancel;
+ int seq; /* upped every time we refresh */
struct _EMSubscribeEditor *editor; /* parent object*/
@@ -326,6 +327,8 @@
struct _emse_folderinfo_msg {
struct _mail_msg msg;
+ int seq;
+
EMSubscribe *sub;
EMSubscribeNode *node;
CamelFolderInfo *info;
@@ -336,9 +339,11 @@
{
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
@@ -348,7 +353,7 @@
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)) {
@@ -406,6 +411,7 @@
sub_ref(sub);
m->sub = sub;
m->node = node;
+ m->seq = sub->seq;
sub->pending_id = m->msg.seq;
@@ -682,6 +688,8 @@
d(printf("sub editor refresh?\n"));
if (sub == NULL || sub->store == NULL)
return;
+
+ sub->seq++;
/* drop any currently pending */
if (sub->pending_id != -1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]