aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2007-02-09 16:37:42 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2007-02-09 16:37:42 +0800
commit491e3eddc69a0ee29d638564926eeeace8a3c80b (patch)
treeba80d5cda222ffb324801915f66744f2fbbb175e /plugins
parentdb89b2ded3ec3a81078718cbffe2aada8290067b (diff)
downloadgsoc2013-evolution-491e3eddc69a0ee29d638564926eeeace8a3c80b.tar
gsoc2013-evolution-491e3eddc69a0ee29d638564926eeeace8a3c80b.tar.gz
gsoc2013-evolution-491e3eddc69a0ee29d638564926eeeace8a3c80b.tar.bz2
gsoc2013-evolution-491e3eddc69a0ee29d638564926eeeace8a3c80b.tar.lz
gsoc2013-evolution-491e3eddc69a0ee29d638564926eeeace8a3c80b.tar.xz
gsoc2013-evolution-491e3eddc69a0ee29d638564926eeeace8a3c80b.tar.zst
gsoc2013-evolution-491e3eddc69a0ee29d638564926eeeace8a3c80b.zip
Picks a random color for proxy calendars, Checks the Memo/Notes component
2007-02-09 Sankar P <psankar@novell.com> * camel-gw-listener.c: (add_esource), (remove_esource), (add_proxy_sources): Picks a random color for proxy calendars, Checks the Memo/Notes component for proxies svn path=/trunk/; revision=33189
Diffstat (limited to 'plugins')
-rw-r--r--plugins/groupwise-account-setup/ChangeLog6
-rw-r--r--plugins/groupwise-account-setup/camel-gw-listener.c24
2 files changed, 25 insertions, 5 deletions
diff --git a/plugins/groupwise-account-setup/ChangeLog b/plugins/groupwise-account-setup/ChangeLog
index d3b24c912a..19dd5f3054 100644
--- a/plugins/groupwise-account-setup/ChangeLog
+++ b/plugins/groupwise-account-setup/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-09 Sankar P <psankar@novell.com>
+
+ * camel-gw-listener.c: (add_esource), (remove_esource),
+ (add_proxy_sources): Picks a random color for proxy calendars,
+ Checks the Memo/Notes component for proxies
+
2006-12-03 Harish Krishnaswamy <kharish@novell.com>
* plugins/groupwise-account-setup/camel-gw-listener.c:
diff --git a/plugins/groupwise-account-setup/camel-gw-listener.c b/plugins/groupwise-account-setup/camel-gw-listener.c
index 55b2c4e4e3..39328418a8 100644
--- a/plugins/groupwise-account-setup/camel-gw-listener.c
+++ b/plugins/groupwise-account-setup/camel-gw-listener.c
@@ -212,10 +212,11 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
e_source_set_property (source, "use_ssl", use_ssl);
e_source_set_property (source, "offline_sync", offline_sync ? "1" : "0" );
if (parent_id_name) {
+ guint32 color;
e_source_set_property (source, "parent_id_name", parent_id_name);
- e_source_set_color (source, 0xFF00FF);
- }
- else
+ color = (guint32) atoi((char *)(camel_url_get_param (url, "color")));
+ e_source_set_color (source, color);
+ } else
e_source_set_color (source, 0xEEBC60);
e_source_group_add_source (group, source, -1);
e_source_list_sync (source_list, NULL);
@@ -224,6 +225,8 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
source_selection_key = SELECTED_CALENDARS;
else if (!strcmp (conf_key, TASKS_SOURCES))
source_selection_key = SELECTED_TASKS;
+ else if (!strcmp (conf_key, NOTES_SOURCES))
+ source_selection_key = SELECTED_NOTES;
else
source_selection_key = NULL;
@@ -285,6 +288,8 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name,
source_selection_key = SELECTED_CALENDARS;
else if (!strcmp (conf_key, TASKS_SOURCES))
source_selection_key = SELECTED_TASKS;
+ else if (!strcmp (conf_key, NOTES_SOURCES))
+ source_selection_key = SELECTED_NOTES;
else source_selection_key = NULL;
if (source_selection_key) {
ids = gconf_client_get_list (client, source_selection_key ,
@@ -528,12 +533,21 @@ static void
add_proxy_sources (GwAccountInfo *info, const char *parent_name)
{
CamelURL *url;
-
+ char *color;
+
url = camel_url_new (info->source_url, NULL);
+
+ color = g_strdup_printf ("%u", g_random_int_range (0x100000, 0xffffaa));
+ /* The above range is chosen so that the colors are neither too light nor too dark
+ and appealing in all the themes */
+
+ camel_url_set_param (url, "color", color);
+
add_esource ("/apps/evolution/calendar/sources", info->name, _("Calendar"), url, parent_name);
add_esource ("/apps/evolution/tasks/sources", info->name, _("Tasks"), url, parent_name);
add_esource ("/apps/evolution/memos/sources", info->name, _("Notes"), url, parent_name);
-
+
+ g_free (color);
camel_url_free (url);
}