aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mark-all-read
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-10-11 16:03:17 +0800
committerMilan Crha <mcrha@redhat.com>2011-10-11 16:03:17 +0800
commit23f7fa75705e667f85568341d1184616443bc029 (patch)
treea60ad723677037e5ba0a510f12f85b3c6a952d06 /plugins/mark-all-read
parent7225739d7d2a26f98c6835cf83e345894201a575 (diff)
downloadgsoc2013-evolution-23f7fa75705e667f85568341d1184616443bc029.tar
gsoc2013-evolution-23f7fa75705e667f85568341d1184616443bc029.tar.gz
gsoc2013-evolution-23f7fa75705e667f85568341d1184616443bc029.tar.bz2
gsoc2013-evolution-23f7fa75705e667f85568341d1184616443bc029.tar.lz
gsoc2013-evolution-23f7fa75705e667f85568341d1184616443bc029.tar.xz
gsoc2013-evolution-23f7fa75705e667f85568341d1184616443bc029.tar.zst
gsoc2013-evolution-23f7fa75705e667f85568341d1184616443bc029.zip
Bug #660829 - Allow 'Mark as read' in right click menu on spam folder
Diffstat (limited to 'plugins/mark-all-read')
-rw-r--r--plugins/mark-all-read/mark-all-read.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index a05515b54c..5e48a59920 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -277,10 +277,8 @@ scan_folder_tree_for_unread_helper (GtkTreeModel *model,
folder_has_unread =
!is_store && !is_draft &&
- (folder_flags & CAMEL_FOLDER_VTRASH) == 0 &&
((folder_flags & CAMEL_FOLDER_VIRTUAL) == 0 ||
- ((folder_flags & CAMEL_FOLDER_TYPE_MASK) != CAMEL_FOLDER_TYPE_TRASH &&
- (folder_flags & CAMEL_FOLDER_TYPE_MASK) != CAMEL_FOLDER_TYPE_JUNK)) &&
+ (folder_flags & CAMEL_FOLDER_TYPE_MASK) != CAMEL_FOLDER_TYPE_TRASH) &&
unread > 0 && unread != ~((guint) 0);
if (folder_has_unread) {
@@ -384,6 +382,8 @@ mar_got_folder (CamelStore *store,
CamelFolder *folder;
gchar *folder_name;
GError *error = NULL;
+ GPtrArray *uids;
+ gint ii;
alert_sink = e_activity_get_alert_sink (context->activity);
cancellable = e_activity_get_cancellable (context->activity);
@@ -408,26 +408,20 @@ mar_got_folder (CamelStore *store,
g_return_if_fail (CAMEL_IS_FOLDER (folder));
- /* Skip virtual trash/junk folders. */
- if (!CAMEL_IS_VTRASH_FOLDER (folder)) {
- GPtrArray *uids;
- gint ii;
- camel_folder_freeze (folder);
+ camel_folder_freeze (folder);
- uids = camel_folder_get_uids (folder);
+ uids = camel_folder_get_uids (folder);
- for (ii = 0; ii < uids->len; ii++)
- camel_folder_set_message_flags (
- folder, uids->pdata[ii],
- CAMEL_MESSAGE_SEEN,
- CAMEL_MESSAGE_SEEN);
+ for (ii = 0; ii < uids->len; ii++)
+ camel_folder_set_message_flags (
+ folder, uids->pdata[ii],
+ CAMEL_MESSAGE_SEEN,
+ CAMEL_MESSAGE_SEEN);
- camel_folder_free_uids (folder, uids);
-
- camel_folder_thaw (folder);
- }
+ camel_folder_free_uids (folder, uids);
+ camel_folder_thaw (folder);
g_object_unref (folder);
/* If the folder name queue is empty, we're done. */