aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2014-03-24 00:31:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2014-03-24 00:33:00 +0800
commit759e4b67004e4e70c68fc52338e3de3c304007f6 (patch)
treeee2f256841d9bf92df19979955df777775d192eb
parent6652cf02080ab00dfd28acfad70299a971098239 (diff)
downloadgsoc2013-evolution-759e4b67004e4e70c68fc52338e3de3c304007f6.tar
gsoc2013-evolution-759e4b67004e4e70c68fc52338e3de3c304007f6.tar.gz
gsoc2013-evolution-759e4b67004e4e70c68fc52338e3de3c304007f6.tar.bz2
gsoc2013-evolution-759e4b67004e4e70c68fc52338e3de3c304007f6.tar.lz
gsoc2013-evolution-759e4b67004e4e70c68fc52338e3de3c304007f6.tar.xz
gsoc2013-evolution-759e4b67004e4e70c68fc52338e3de3c304007f6.tar.zst
gsoc2013-evolution-759e4b67004e4e70c68fc52338e3de3c304007f6.zip
folder_tree_render_icon: Readability cleanup.
Makes the logic easier to debug too.
-rw-r--r--mail/em-folder-tree.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 460fb9cb23..fef68109bc 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -845,6 +845,7 @@ folder_tree_render_icon (GtkTreeViewColumn *column,
gboolean is_selected;
gboolean is_drafts = FALSE;
gboolean is_drag_dest = FALSE;
+ gboolean show_new_mail_emblem;
guint32 fi_flags = 0;
gtk_tree_model_get (
@@ -888,8 +889,13 @@ folder_tree_render_icon (GtkTreeViewColumn *column,
icon = g_themed_icon_new (icon_name);
+ show_new_mail_emblem =
+ (unread > old_unread) &&
+ !is_selected && !is_drafts &&
+ ((fi_flags & CAMEL_FOLDER_VIRTUAL) == 0);
+
/* Show an emblem if there's new mail. */
- if (!is_selected && unread > old_unread && !is_drafts && !(fi_flags & CAMEL_FOLDER_VIRTUAL)) {
+ if (show_new_mail_emblem) {
GIcon *temp_icon;
GEmblem *emblem;