From 4183acdeb87980a80d4c5dcd2361139df979aa04 Mon Sep 17 00:00:00 2001 From: Vivek Jain Date: Tue, 11 Jan 2005 06:17:23 +0000 Subject: Added conditions to check for shared folders to display different icon if 2005-01-11 Vivek Jain * 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 --- mail/ChangeLog | 5 +++++ mail/em-folder-tree.c | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 044d0d812c..d0b30ca18b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2005-01-11 Vivek Jain + + * em-folder-tree.c (render_pixbuf): Added conditions to check for + shared folders to display different icon if it is a shard folder. + 2005-01-07 Not Zed * em-account-prefs.c (account_add_clicked): remove old code, setup 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); } -- cgit v1.2.3