aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-01 04:05:47 +0800
committerDan Winship <danw@src.gnome.org>2000-07-01 04:05:47 +0800
commit6f95a96083dc0c00b18a612e2309a008b9cc0e21 (patch)
treee8eb7c3517da349a0bb655982d036c39bbc18818 /mail/message-list.c
parent39361c665a62e68991e51a9c13c2b2074a130ed4 (diff)
downloadgsoc2013-evolution-6f95a96083dc0c00b18a612e2309a008b9cc0e21.tar.gz
gsoc2013-evolution-6f95a96083dc0c00b18a612e2309a008b9cc0e21.tar.zst
gsoc2013-evolution-6f95a96083dc0c00b18a612e2309a008b9cc0e21.zip
New function, a wrapper around e_table_selected_row_foreach, which calls
* message-list.c (message_list_foreach): New function, a wrapper around e_table_selected_row_foreach, which calls the callback function with UIDs rather than row numbers. * folder-browser-factory.c: Remove never-used "Find" button from the toolbar and replace it with "Refile". (We need a better icon for this...). Hook up "Refile" to "refile_msg". * mail-ops.c (refile_msg): Call the shell's user_select_folder routine, and then use message_list_foreach and real_refile_msg to do the work. (delete_msg): Update to use message_list_foreach. * folder-browser.c (mail_uri_to_folder): new function, extracted from folder_browser_load_folder, to turn a URI into a folder. (folder_browser_load_folder): Use it. svn path=/trunk/; revision=3833
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 3167a3fe8c..7ca6140b8f 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -1073,7 +1073,6 @@ on_row_selection (ETable *table, int row, gboolean selected,
/* FIXME: this is all a kludge. */
-
static gint
idle_select_row (gpointer user_data)
{
@@ -1088,3 +1087,38 @@ select_row (ETable *table, gpointer user_data)
gtk_idle_add (idle_select_row, message_list->etable);
}
+
+
+struct message_list_foreach_data {
+ MessageList *message_list;
+ MessageListForeachFunc callback;
+ gpointer user_data;
+};
+
+static void
+mlfe_callback (int row, gpointer user_data)
+{
+ struct message_list_foreach_data *mlfe_data = user_data;
+ CamelMessageInfo *info;
+
+ info = get_message_info (mlfe_data->message_list, row);
+ if (info) {
+ mlfe_data->callback (mlfe_data->message_list,
+ info->uid,
+ mlfe_data->user_data);
+ }
+}
+
+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_table_selected_row_foreach (E_TABLE (message_list->etable),
+ mlfe_callback, &mlfe_data);
+}