diff options
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 4a98ad1df1..10f0aeaf5b 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -36,8 +36,8 @@ #include "mail-mt.h" #include "mail-folder-cache.h" -#define ld(x) -#define d(x) +#define ld(x) +#define d(x) /* Structures */ @@ -896,6 +896,28 @@ mail_folder_cache_try_folder (const gchar *uri) return ret; } +gchar * +mail_folder_cache_try_name (const gchar *uri) +{ + mail_folder_info *mfi; + gchar *ret; + + g_return_val_if_fail (uri, NULL); + + LOCK_FOLDERS (); + + mfi = get_folder_info (uri); + + if (mfi->flags & MAIL_FIF_NAME_VALID) + ret = g_strdup (mfi->name); + else + ret = NULL; + + UNLOCK_FOLDERS (); + + return ret; +} + void mail_folder_cache_set_shell_view (GNOME_Evolution_ShellView sv) { |