aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-01-18 14:09:31 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-01-18 14:09:31 +0800
commitce004bd794e3cea909fada955e8f483b86a579f7 (patch)
treead29998a8245b35fd7557cca7b6630fdbf1b109b /mail/message-list.c
parentc075b7d96c7c9e4bbfc32f1541c96c6a3ef538e3 (diff)
downloadgsoc2013-evolution-ce004bd794e3cea909fada955e8f483b86a579f7.tar.gz
gsoc2013-evolution-ce004bd794e3cea909fada955e8f483b86a579f7.tar.zst
gsoc2013-evolution-ce004bd794e3cea909fada955e8f483b86a579f7.zip
** See bug #70768.
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. svn path=/trunk/; revision=28425
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c54
1 files changed, 13 insertions, 41 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index bbbd192cdb..688c45e437 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2987,47 +2987,6 @@ on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, Mess
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;
@@ -3048,6 +3007,19 @@ ml_getselected_cb(ETreePath path, void *user_data)
}
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 *
message_list_get_selected(MessageList *ml)
{
struct _ml_selected_data data = {