[evolution] e_mail_folder_to_full_display_name: Special-case virtual Trash/Junk folders



commit 359aee3aa544d4b434588df87891fadc695f5d45
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jun 15 17:17:31 2017 +0200

    e_mail_folder_to_full_display_name: Special-case virtual Trash/Junk folders
    
    These used to show their raw names in the UI, which didn't look correct.

 src/libemail-engine/e-mail-folder-utils.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/libemail-engine/e-mail-folder-utils.c b/src/libemail-engine/e-mail-folder-utils.c
index f62b0a0..e41cbf1 100644
--- a/src/libemail-engine/e-mail-folder-utils.c
+++ b/src/libemail-engine/e-mail-folder-utils.c
@@ -2152,7 +2152,13 @@ e_mail_folder_to_full_display_name (CamelFolder *folder,
 
                service_display_name = camel_service_get_display_name (CAMEL_SERVICE (store));
 
-               full_display_name = g_strdup_printf ("%s : %s", service_display_name, folder_name);
+               if (CAMEL_IS_VEE_FOLDER (folder) && (
+                   g_strcmp0 (folder_name, CAMEL_VTRASH_NAME) == 0 ||
+                   g_strcmp0 (folder_name, CAMEL_VJUNK_NAME) == 0)) {
+                       full_display_name = g_strdup_printf ("%s : %s", service_display_name, 
camel_folder_get_display_name (folder));
+               } else {
+                       full_display_name = g_strdup_printf ("%s : %s", service_display_name, folder_name);
+               }
 
                g_free (folder_name);
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]