aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-09-01 18:51:01 +0800
committerMilan Crha <mcrha@redhat.com>2009-09-01 18:51:01 +0800
commit140aa99d94049e35d54c8b34599085f2ca6119e0 (patch)
tree3077fa96914f0bf1a50e207deee6f222d50e012f /mail
parente4cf860e0cfcb0656d2000d4d2f27e5b99382db4 (diff)
downloadgsoc2013-evolution-140aa99d94049e35d54c8b34599085f2ca6119e0.tar
gsoc2013-evolution-140aa99d94049e35d54c8b34599085f2ca6119e0.tar.gz
gsoc2013-evolution-140aa99d94049e35d54c8b34599085f2ca6119e0.tar.bz2
gsoc2013-evolution-140aa99d94049e35d54c8b34599085f2ca6119e0.tar.lz
gsoc2013-evolution-140aa99d94049e35d54c8b34599085f2ca6119e0.tar.xz
gsoc2013-evolution-140aa99d94049e35d54c8b34599085f2ca6119e0.tar.zst
gsoc2013-evolution-140aa99d94049e35d54c8b34599085f2ca6119e0.zip
Bug #593779 - re-committing patch from bug #214238
Diffstat (limited to 'mail')
-rw-r--r--mail/em-folder-tree.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 7c9293ca19..568bf490e5 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -788,7 +788,7 @@ static void
render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
{
- gboolean is_store, bold;
+ gboolean is_store, bold, subdirs_unread = FALSE;
guint unread;
gchar *display;
gchar *name;
@@ -797,18 +797,29 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
COL_BOOL_IS_STORE, &is_store,
COL_UINT_UNREAD, &unread, -1);
- if (!(bold = is_store || unread)) {
- if (gtk_tree_model_iter_has_child (model, iter))
- bold = subdirs_contain_unread (model, iter);
+ bold = is_store || unread;
+
+ if (gtk_tree_model_iter_has_child (model, iter)) {
+ gboolean expanded = TRUE;
+
+ g_object_get (renderer, "is-expanded", &expanded, NULL);
+
+ if (!bold || !expanded)
+ subdirs_unread = subdirs_contain_unread (model, iter);
}
+ bold = bold || subdirs_unread;
+
if (!is_store && unread) {
/* Translators: This is the string used for displaying the
- * folder names in folder trees. "%s" will be replaced by
- * the folder's name and "%u" will be replaced with the
- * number of unread messages in the folder.
+ * folder names in folder trees. The first "%s" will be
+ * replaced by the folder's name and "%u" will be replaced
+ * with the number of unread messages in the folder. The
+ * second %s will be replaced with a "+" letter for collapsed
+ * folders with unread messages in some subfolder too,
+ * or with an empty string for other cases.
*
- * Most languages should translate this as "%s (%u)". The
+ * Most languages should translate this as "%s (%u%s)". The
* languages that use localized digits (like Persian) may
* need to replace "%u" with "%Iu". Right-to-left languages
* (like Arabic and Hebrew) may need to add bidirectional
@@ -818,7 +829,7 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
* Do not translate the "folder-display|" part. Remove it
* from your translation.
*/
- display = g_strdup_printf (C_("folder-display", "%s (%u)"), name, unread);
+ display = g_strdup_printf (C_("folder-display", "%s (%u%s)"), name, unread, subdirs_unread ? "+" : "");
g_free (name);
} else
display = name;