aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-view.c
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2004-03-13 02:27:45 +0800
committerRadek Doulik <rodo@src.gnome.org>2004-03-13 02:27:45 +0800
commit3f727f063b1e13a89588f9cd1e5cf45a89c391e1 (patch)
tree379fc5060d1e8e0db70fbb7e7c1b1907179430cd /mail/em-folder-view.c
parente38174d76c6aad5d3f177c2a7e2ff2611941df9a (diff)
downloadgsoc2013-evolution-3f727f063b1e13a89588f9cd1e5cf45a89c391e1.tar.gz
gsoc2013-evolution-3f727f063b1e13a89588f9cd1e5cf45a89c391e1.tar.zst
gsoc2013-evolution-3f727f063b1e13a89588f9cd1e5cf45a89c391e1.zip
remove junk learning thread, it's handled in camel-folder.c:folder_changed
2004-03-11 Radek Doulik <rodo@ximian.com> * mail-ops.c: remove junk learning thread, it's handled in camel-folder.c:folder_changed now * em-folder-view.c (emfv_popup_mark_junk): use em_folder_view_mark_selected, set junk, junk-learn and seen flags (emfv_popup_mark_nojunk): similar, reset junk, set junk-learn flags svn path=/trunk/; revision=25046
Diffstat (limited to 'mail/em-folder-view.c')
-rw-r--r--mail/em-folder-view.c36
1 files changed, 9 insertions, 27 deletions
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 7d104c99e4..175650fa8c 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -560,37 +560,16 @@ emfv_popup_mark_unimportant(GtkWidget *w, EMFolderView *emfv)
static void
emfv_popup_mark_junk (GtkWidget *w, EMFolderView *emfv)
{
- GPtrArray *uids, *uidsjunk;
- int i;
-
- if (emfv->folder == NULL)
- return;
+ GPtrArray *uids;
- uidsjunk = g_ptr_array_new();
uids = message_list_get_selected(emfv->list);
- camel_folder_freeze(emfv->folder);
-
- for (i=0; i<uids->len; i++) {
- char *uid = uids->pdata[i];
-
- if (camel_folder_set_message_flags(emfv->folder, uid,
- CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK,
- CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK)) {
- g_ptr_array_add(uidsjunk, g_strdup(uid));
- }
- }
-
- camel_folder_thaw(emfv->folder);
-
+ em_folder_view_mark_selected(emfv,
+ CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN,
+ CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN);
if (uids->len == 1)
message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE);
message_list_free_uids(emfv->list, uids);
-
- if (uidsjunk->len)
- mail_mark_junk(emfv->folder, uidsjunk, TRUE);
- else
- em_utils_uids_free(uidsjunk);
}
static void
@@ -599,10 +578,13 @@ emfv_popup_mark_nojunk (GtkWidget *w, EMFolderView *emfv)
GPtrArray *uids;
uids = message_list_get_selected(emfv->list);
- em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_JUNK, 0);
+ em_folder_view_mark_selected(emfv,
+ CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN,
+ CAMEL_MESSAGE_JUNK_LEARN);
if (uids->len == 1)
message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE);
- mail_mark_junk(emfv->folder, uids, FALSE);
+
+ message_list_free_uids(emfv->list, uids);
}
static void