[evolution-patches] patches for displaying shared-folder icons.
- From: Vivek Jain <jvivek novell com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] patches for displaying shared-folder icons.
- Date: Mon, 10 Jan 2005 10:51:07 +0530
Hi,
I am sending two patches, for displaying different icons if a folder is
a shared-folder.
Thanks,
Vivek Jain
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3519
diff -u -p -r1.3519 ChangeLog
--- ChangeLog 22 Dec 2004 07:38:16 -0000 1.3519
+++ ChangeLog 10 Jan 2005 04:55:46 -0000
@@ -1,3 +1,8 @@
+2005-01-10 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.
+
2004-12-22 Not Zed <NotZed Ximian com>
* em-account-editor.c (emae_needs_auth): moved to after
Index: em-folder-tree.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-tree.c,v
retrieving revision 1.138
diff -u -p -r1.138 em-folder-tree.c
--- em-folder-tree.c 4 Jan 2005 08:51:15 -0000 1.138
+++ em-folder-tree.c 10 Jan 2005 04:55:47 -0000
@@ -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
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
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
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);
}
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2343
diff -u -p -r1.2343 ChangeLog
--- ChangeLog 31 Dec 2004 17:54:13 -0000 1.2343
+++ ChangeLog 10 Jan 2005 05:05:29 -0000
@@ -1,3 +1,6 @@
+2005-01-10 Vivek Jain <jvivek novell com>
+ * camel-store.h : defined flags for shared folders
+
2004-12-31 JP Rosevear <jpr novell com>
* providers/groupwise/Makefile.am: dist the private header, fix
Index: camel-store.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-store.h,v
retrieving revision 1.70
diff -u -p -r1.70 camel-store.h
--- camel-store.h 4 Nov 2004 05:34:05 -0000 1.70
+++ camel-store.h 10 Jan 2005 05:05:30 -0000
@@ -74,6 +74,8 @@ typedef struct _CamelFolderInfo {
#define CAMEL_FOLDER_SYSTEM (1<<6)
/* a virtual folder that can't be copied to, and can only be moved to if in an existing folder */
#define CAMEL_FOLDER_VTRASH (1<<7)
+#define CAMEL_FOLDER_SHARED_TO_ME (1<<8)
+#define CAMEL_FOLDER_SHARED_BY_ME (1<<9)
/* Structure of rename event's event_data */
typedef struct _CamelRenameInfo {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]