diff options
author | Vivek Jain <jvivek@novell.com> | 2005-01-11 14:17:23 +0800 |
---|---|---|
committer | Jain Vivek <jvivek@src.gnome.org> | 2005-01-11 14:17:23 +0800 |
commit | 4183acdeb87980a80d4c5dcd2361139df979aa04 (patch) | |
tree | 884728159733937655f5d21c5e71f9678b042d60 /mail/em-folder-tree.c | |
parent | f66d06bd89b397722121ab940fb83a4986400bb7 (diff) | |
download | gsoc2013-evolution-4183acdeb87980a80d4c5dcd2361139df979aa04.tar.gz gsoc2013-evolution-4183acdeb87980a80d4c5dcd2361139df979aa04.tar.zst gsoc2013-evolution-4183acdeb87980a80d4c5dcd2361139df979aa04.zip |
Added conditions to check for shared folders to display different icon if
2005-01-11 Vivek Jain <jvivek@novell.com>
* em-folder-tree.c (render_pixbuf): Added conditions to check for
shared folders to display different icon if it is a shard folder.
svn path=/trunk/; revision=28349
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r-- | mail/em-folder-tree.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index ff6bb2636a..9ba773e30f 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -264,6 +264,8 @@ enum { FOLDER_ICON_OUTBOX, FOLDER_ICON_TRASH, FOLDER_ICON_JUNK, + FOLDER_ICON_SHARED_TO_ME, + FOLDER_ICON_SHARED_BY_ME, FOLDER_ICON_LAST }; @@ -276,6 +278,7 @@ render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer, static gboolean initialised = FALSE; GdkPixbuf *pixbuf = NULL; gboolean is_store; + guint32 flags; char *full_name; if (!initialised) { @@ -284,12 +287,13 @@ render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer, folder_icons[FOLDER_ICON_OUTBOX] = e_icon_factory_get_icon ("stock_outbox", E_ICON_SIZE_MENU); folder_icons[FOLDER_ICON_TRASH] = e_icon_factory_get_icon ("stock_delete", E_ICON_SIZE_MENU); folder_icons[FOLDER_ICON_JUNK] = e_icon_factory_get_icon ("stock_spam", E_ICON_SIZE_MENU); + folder_icons[FOLDER_ICON_SHARED_TO_ME] = e_icon_factory_get_icon ("stock_shared_to_me", E_ICON_SIZE_MENU); + folder_icons[FOLDER_ICON_SHARED_BY_ME] = e_icon_factory_get_icon ("stock_shared_by_me", E_ICON_SIZE_MENU); initialised = TRUE; } gtk_tree_model_get (model, iter, COL_STRING_FULL_NAME, &full_name, - COL_BOOL_IS_STORE, &is_store, -1); - + COL_BOOL_IS_STORE, &is_store, COL_UINT_FLAGS, &flags, -1); if (!is_store && full_name != NULL) { if (!g_ascii_strcasecmp (full_name, "Inbox")) pixbuf = folder_icons[FOLDER_ICON_INBOX]; @@ -299,10 +303,14 @@ render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer, pixbuf = folder_icons[FOLDER_ICON_TRASH]; else if (!strcmp (full_name, CAMEL_VJUNK_NAME)) pixbuf = folder_icons[FOLDER_ICON_JUNK]; + else if (flags & CAMEL_FOLDER_SHARED_TO_ME) + pixbuf = folder_icons[FOLDER_ICON_SHARED_TO_ME]; + else if (flags & CAMEL_FOLDER_SHARED_BY_ME) + pixbuf = folder_icons[FOLDER_ICON_SHARED_BY_ME]; else pixbuf = folder_icons[FOLDER_ICON_NORMAL]; } - + g_object_set (renderer, "pixbuf", pixbuf, "visible", !is_store, NULL); g_free (full_name); } |