[evolution-patches] mail, 70768 mark all marking too many all




simple/obvious fix

Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3444.2.32
diff -u -p -r1.3444.2.32 ChangeLog
--- mail/ChangeLog	2 Dec 2004 04:11:04 -0000	1.3444.2.32
+++ mail/ChangeLog	18 Jan 2005 06:01:13 -0000
@@ -1,3 +1,32 @@
+2005-01-18  Not Zed  <NotZed Ximian com>
+
+	** See bug #70768.
+
+	* em-folder-browser.c (emfb_mark_all_read): get the uid list from
+	the message-list (view) rather than folder (model).
+
+	* message-list.c (message_list_foreach): removed, no longer used.
+	(message_list_get_uids): new function replacing ml_foreach, get
+	visible uids's of messages.
+
+2005-01-18  Not Zed  <NotZed Ximian com>
+
+	* em-format-html.c (emfh_gethttp): kill old 'load http 0 now=0' debug.
+
+	** See bug #70563.
+
+	* em-utils.c (emu_set_proxy, emu_proxy_setup)
+	(em_utils_get_proxy_uri): make sure the init code is called from
+	main thread (gconf usage), and add locking for data consistency.
+
+2005-01-08  Not Zed  <NotZed Ximian com>
+
+	* mail-account-gui.c (save_service): dont skip the authtype
+	setting if we don't have a needsauth widget at all (i.e. the store
+	page).
+
+	* em-folder-tree.c (emft_get_folder_info__desc): fix broken cast.
+
 2004-12-01  Not Zed  <NotZed Ximian com>
 
 	** See bug #69851.
Index: mail/em-folder-browser.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-browser.c,v
retrieving revision 1.50.8.1
diff -u -p -r1.50.8.1 em-folder-browser.c
--- mail/em-folder-browser.c	1 Dec 2004 03:17:11 -0000	1.50.8.1
+++ mail/em-folder-browser.c	18 Jan 2005 06:01:13 -0000
@@ -576,12 +576,12 @@ emfb_mark_all_read(BonoboUIComponent *ui
 	if (emfv->folder == NULL)
 		return;
 
-	uids = camel_folder_get_uids(emfv->folder);
+	uids = message_list_get_uids(emfv->list);
 	camel_folder_freeze(emfv->folder);
 	for (i=0;i<uids->len;i++)
 		camel_folder_set_message_flags(emfv->folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
 	camel_folder_thaw(emfv->folder);
-	camel_folder_free_uids(emfv->folder, uids);
+	message_list_free_uids(emfv->list, uids);
 }
 
 static void
Index: mail/message-list.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/message-list.c,v
retrieving revision 1.397.4.1
diff -u -p -r1.397.4.1 message-list.c
--- mail/message-list.c	16 Sep 2004 14:45:56 -0000	1.397.4.1
+++ mail/message-list.c	18 Jan 2005 06:01:14 -0000
@@ -2962,47 +2962,6 @@ on_click (ETree *tree, gint row, ETreePa
 	return TRUE;
 }
 
-struct message_list_foreach_data {
-	MessageList *message_list;
-	MessageListForeachFunc callback;
-	gpointer user_data;
-};
-
-static void
-mlfe_callback (ETreePath path, gpointer user_data)
-{
-	struct message_list_foreach_data *mlfe_data = user_data;
-	const char *uid;
-
-	if (e_tree_model_node_is_root (mlfe_data->message_list->model, path))
-		return;
-	
-	uid = get_message_uid (mlfe_data->message_list,
-			       path);
-	if (uid) {
-		mlfe_data->callback (mlfe_data->message_list, uid,
-				     mlfe_data->user_data);
-	} else {
-		/* FIXME: could this the cause of bug #6637 and friends? */
-		g_warning ("I wonder if this could be the cause of bug #6637 and friends?");
-		g_assert_not_reached ();
-	}
-}
-
-void
-message_list_foreach (MessageList *message_list,
-		      MessageListForeachFunc callback,
-		      gpointer user_data)
-{
-	struct message_list_foreach_data mlfe_data;
-	
-	mlfe_data.message_list = message_list;
-	mlfe_data.callback = callback;
-	mlfe_data.user_data = user_data;
-	e_tree_selected_path_foreach (message_list->tree,
-				      mlfe_callback, &mlfe_data);
-}
-
 struct _ml_selected_data {
 	MessageList *ml;
 	GPtrArray *uids;
@@ -3020,6 +2979,19 @@ ml_getselected_cb(ETreePath path, void *
 	uid = get_message_uid(data->ml, path);
 	g_assert(uid != NULL);
 	g_ptr_array_add(data->uids, g_strdup(uid));
+}
+
+GPtrArray *
+message_list_get_uids(MessageList *ml)
+{
+	struct _ml_selected_data data = {
+		ml,
+		g_ptr_array_new()
+	};
+
+	e_tree_path_foreach(ml->tree, ml_getselected_cb, &data);
+
+	return data.uids;
 }
 
 GPtrArray *
Index: mail/message-list.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/message-list.h,v
retrieving revision 1.85
diff -u -p -r1.85 message-list.h
--- mail/message-list.h	28 Jul 2004 02:55:52 -0000	1.85
+++ mail/message-list.h	18 Jan 2005 06:01:14 -0000
@@ -160,10 +160,6 @@ typedef struct {
 	void (*message_list_scrolled) (MessageList *ml);
 } MessageListClass;
 
-typedef void (*MessageListForeachFunc) (MessageList *message_list,
-					const char *uid,
-					gpointer user_data);
-
 typedef enum {
 	MESSAGE_LIST_SELECT_NEXT = 0,
 	MESSAGE_LIST_SELECT_PREVIOUS = 1,
@@ -175,13 +171,10 @@ GtkType        message_list_get_type   (
 GtkWidget     *message_list_new        (void);
 void           message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const char *uri, gboolean outgoing);
 
-void           message_list_foreach    (MessageList *message_list,
-					MessageListForeachFunc callback,
-					gpointer user_data);
-
 void	       message_list_freeze(MessageList *ml);
 void	       message_list_thaw(MessageList *ml);
 
+GPtrArray     *message_list_get_uids(MessageList *message_list);
 GPtrArray     *message_list_get_selected(MessageList *ml);
 void           message_list_set_selected(MessageList *ml, GPtrArray *uids);
 void	       message_list_free_uids(MessageList *ml, GPtrArray *uids);


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