diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-25 11:28:18 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-25 11:28:18 +0800 |
commit | 32ffc3ca1ca80b2d843fbe28da7deab35fabcbf1 (patch) | |
tree | 36f52060c250aacf445013b1bf15541892098f3f /mail/em-folder-utils.c | |
parent | cbb3a71adc5551f4c600cfc6f53fc112f3022a78 (diff) | |
download | gsoc2013-evolution-32ffc3ca1ca80b2d843fbe28da7deab35fabcbf1.tar.gz gsoc2013-evolution-32ffc3ca1ca80b2d843fbe28da7deab35fabcbf1.tar.zst gsoc2013-evolution-32ffc3ca1ca80b2d843fbe28da7deab35fabcbf1.zip |
Make the sidebar icon follow the folder icon.
Fix more runtime warnings.
svn path=/branches/kill-bonobo/; revision=37130
Diffstat (limited to 'mail/em-folder-utils.c')
-rw-r--r-- | mail/em-folder-utils.c | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index aa9e6aa402..cb1c333bfb 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -40,8 +40,6 @@ #include <glib/gi18n.h> #include <camel/camel-session.h> -#include <camel/camel-store.h> -#include <camel/camel-folder.h> #include <camel/camel-vee-store.h> #include <camel/camel-vtrash-folder.h> #include <camel/camel-stream-mem.h> @@ -696,3 +694,38 @@ em_folder_utils_create_folder (CamelFolderInfo *folderinfo, EMFolderTree *emft) g_signal_connect (dialog, "response", G_CALLBACK (emfu_popup_new_folder_response), emft); gtk_widget_show (dialog); } + +const gchar * +em_folder_utils_get_icon_name (guint32 flags) +{ + const gchar *icon_name; + + switch (flags & CAMEL_FOLDER_TYPE_MASK) { + case CAMEL_FOLDER_TYPE_INBOX: + icon_name = "mail-inbox"; + break; + case CAMEL_FOLDER_TYPE_OUTBOX: + icon_name = "mail-outbox"; + break; + case CAMEL_FOLDER_TYPE_TRASH: + icon_name = "user-trash"; + break; + case CAMEL_FOLDER_TYPE_JUNK: + icon_name = "mail-mark-junk"; + break; + case CAMEL_FOLDER_TYPE_SENT: + icon_name = "mail-sent"; + break; + default: + if (flags & CAMEL_FOLDER_SHARED_TO_ME) + icon_name = "stock_shared-to-me"; + else if (flags & CAMEL_FOLDER_SHARED_BY_ME) + icon_name = "stock_shared-by-me"; + else if (flags & CAMEL_FOLDER_VIRTUAL) + icon_name = "folder-saved-search"; + else + icon_name = "folder"; + } + + return icon_name; +} |