From 23f5773903d64a554d977ae7d0ebbaca73528f1f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 30 Nov 2011 20:53:20 -0600 Subject: Coding style and whitespace cleanup. --- plugins/mark-all-read/mark-all-read.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'plugins/mark-all-read') diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c index beac49ae47..69b3893e6f 100644 --- a/plugins/mark-all-read/mark-all-read.c +++ b/plugins/mark-all-read/mark-all-read.c @@ -267,7 +267,11 @@ scan_folder_tree_for_unread_helper (GtkTreeModel *model, gboolean folder_has_unread; gboolean is_draft = FALSE; gboolean is_store = FALSE; - guint unread = 0, folder_flags = 0; + gboolean is_trash; + gboolean is_virtual; + guint unread = 0; + guint folder_flags = 0; + guint folder_type; gtk_tree_model_get ( model, iter, @@ -276,10 +280,13 @@ scan_folder_tree_for_unread_helper (GtkTreeModel *model, COL_BOOL_IS_STORE, &is_store, COL_BOOL_IS_DRAFT, &is_draft, -1); + folder_type = (folder_flags & CAMEL_FOLDER_TYPE_MASK); + is_virtual = ((folder_flags & CAMEL_FOLDER_VIRTUAL) != 0); + is_trash = (folder_type == CAMEL_FOLDER_TYPE_TRASH); + folder_has_unread = !is_store && !is_draft && - ((folder_flags & CAMEL_FOLDER_VIRTUAL) == 0 || - (folder_flags & CAMEL_FOLDER_TYPE_MASK) != CAMEL_FOLDER_TYPE_TRASH) && + (!is_virtual || !is_trash) && unread > 0 && unread != ~((guint) 0); if (folder_has_unread) { -- cgit v1.2.3