[evolution-patches] 45063, more etree api workarounds



this can't be done in the message-list since it doesn't know which
message the folder-browser has displayed.

this probaly introduces other races (e.g. select one, goto another, go
back very fast, perhaps), but what can you do eh

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2750
diff -u -3 -r1.2750 ChangeLog
--- ChangeLog	17 Jun 2003 03:15:44 -0000	1.2750
+++ ChangeLog	18 Jun 2003 21:12:11 -0000
@@ -1,3 +1,11 @@
+2003-06-19  Not Zed  <NotZed Ximian com>
+
+	** See bug #45063
+
+	* folder-browser.c (do_message_selected): dont re-load if the same
+	message gets selected again as one we've already shown.  Etree
+	sends out selection changed events even when when it hasn't.
+
 2003-06-16  Not Zed  <NotZed Ximian com>
 
 	** See bug #44609
Index: folder-browser.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/folder-browser.c,v
retrieving revision 1.345
diff -u -3 -r1.345 folder-browser.c
--- folder-browser.c	11 Jun 2003 16:19:34 -0000	1.345
+++ folder-browser.c	18 Jun 2003 21:12:13 -0000
@@ -2473,12 +2473,16 @@
 	
 	/* if we are loading, then set a pending, but leave the loading, coudl cancel here (?) */
 	if (fb->loading_uid) {
-		g_free (fb->pending_uid);
-		fb->pending_uid = g_strdup (fb->new_uid);
+		if (fb->new_uid == NULL || strcmp(fb->pending_uid, fb->new_uid) != 0) {
+			g_free (fb->pending_uid);
+			fb->pending_uid = g_strdup (fb->new_uid);
+		}
 	} else {
 		if (fb->new_uid) {
-			fb->loading_uid = g_strdup (fb->new_uid);
-			mail_get_message (fb->folder, fb->loading_uid, done_message_selected, fb, mail_thread_new);
+			if (fb->loaded_uid == NULL || strcmp(fb->new_uid, fb->loaded_uid) != 0) {
+				fb->loading_uid = g_strdup (fb->new_uid);
+				mail_get_message (fb->folder, fb->loading_uid, done_message_selected, fb, mail_thread_new);
+			}
 		} else {
 			mail_display_set_message (fb->mail_display, NULL, NULL, NULL);
 		}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]