[evolution-exchange] Bug #659555 - Add custom icons in a folder Subscription dialog
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-exchange] Bug #659555 - Add custom icons in a folder Subscription dialog
- Date: Mon, 26 Sep 2011 08:29:34 +0000 (UTC)
commit f88b11aee5162df2ea988ff862331695995de403
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 26 10:29:09 2011 +0200
Bug #659555 - Add custom icons in a folder Subscription dialog
camel/camel-exchange-store.c | 12 ++++++++++++
camel/camel-exchange-utils.c | 20 ++++++++++++++++----
2 files changed, 28 insertions(+), 4 deletions(-)
---
diff --git a/camel/camel-exchange-store.c b/camel/camel-exchange-store.c
index 3595c81..dcba636 100644
--- a/camel/camel-exchange-store.c
+++ b/camel/camel-exchange-store.c
@@ -114,6 +114,18 @@ make_folder_info (CamelExchangeStore *exch,
if ((flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_SENT)
info->flags |= CAMEL_FOLDER_TYPE_SENT;
+ if ((flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_CONTACTS)
+ info->flags |= CAMEL_FOLDER_TYPE_CONTACTS;
+
+ if ((flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_EVENTS)
+ info->flags |= CAMEL_FOLDER_TYPE_EVENTS;
+
+ if ((flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_MEMOS)
+ info->flags |= CAMEL_FOLDER_TYPE_MEMOS;
+
+ if ((flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TASKS)
+ info->flags |= CAMEL_FOLDER_TYPE_TASKS;
+
if (flags & CAMEL_FOLDER_SUBSCRIBED)
info->flags |= CAMEL_FOLDER_SUBSCRIBED;
diff --git a/camel/camel-exchange-utils.c b/camel/camel-exchange-utils.c
index 47f91a3..947069c 100644
--- a/camel/camel-exchange-utils.c
+++ b/camel/camel-exchange-utils.c
@@ -2157,12 +2157,24 @@ get_folder_info_data (ExchangeData *ed,
if (inbox_uri && !strcmp (uri, inbox_uri))
folder_flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
-
- if (trash_uri && !strcmp (uri, trash_uri))
+ else if (trash_uri && !strcmp (uri, trash_uri))
folder_flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_TRASH;
-
- if (sent_items_uri && !strcmp (uri, sent_items_uri))
+ else if (sent_items_uri && !strcmp (uri, sent_items_uri))
folder_flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_SENT;
+ else if (E_IS_FOLDER_EXCHANGE (folder)) {
+ const gchar *outlook_class = e_folder_exchange_get_outlook_class (folder);
+
+ if (outlook_class) {
+ if (g_ascii_strcasecmp (outlook_class, "IPF.Contact") == 0)
+ folder_flags |= CAMEL_FOLDER_TYPE_CONTACTS;
+ else if (g_ascii_strcasecmp (outlook_class, "IPF.Appointment") == 0)
+ folder_flags |= CAMEL_FOLDER_TYPE_EVENTS;
+ else if (g_ascii_strcasecmp (outlook_class, "IPF.StickyNote") == 0)
+ folder_flags |= CAMEL_FOLDER_TYPE_MEMOS;
+ else if (g_ascii_strcasecmp (outlook_class, "IPF.Task") == 0)
+ folder_flags |= CAMEL_FOLDER_TYPE_TASKS;
+ }
+ }
if (!e_folder_exchange_get_has_subfolders (folder)) {
d(printf ("%s:%d:%s - %s has no subfolders", __FILE__, __LINE__, G_STRFUNC, name));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]