diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-12-01 10:53:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-02-20 23:04:25 +0800 |
commit | 23f5773903d64a554d977ae7d0ebbaca73528f1f (patch) | |
tree | 104e1a59da8bf96b004bce204b79f47bbe0a6d13 /plugins/mark-all-read | |
parent | 49bc4c2d765ee1780c23fdc9f42152850dabb220 (diff) | |
download | gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.gz gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.bz2 gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.lz gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.xz gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.zst gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'plugins/mark-all-read')
-rw-r--r-- | plugins/mark-all-read/mark-all-read.c | 13 |
1 files changed, 10 insertions, 3 deletions
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) { |