[evolution-data-server] Change Google/ownCloud calendar color only when the source is new
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Change Google/ownCloud calendar color only when the source is new
- Date: Thu, 21 May 2015 15:51:44 +0000 (UTC)
commit f4fb3c7f077a43d0d5bca7887c81f53b722a7d47
Author: Milan Crha <mcrha redhat com>
Date: Thu May 21 17:49:24 2015 +0200
Change Google/ownCloud calendar color only when the source is new
That way users can select their color locally and it'll not be
reverted back to the server color during the next discovery.
modules/google-backend/module-google-backend.c | 3 ++-
modules/owncloud-backend/module-owncloud-backend.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/modules/google-backend/module-google-backend.c b/modules/google-backend/module-google-backend.c
index c79ce63..3255d6d 100644
--- a/modules/google-backend/module-google-backend.c
+++ b/modules/google-backend/module-google-backend.c
@@ -290,9 +290,10 @@ google_add_found_source (ECollectionBackend *collection,
e_source_backend_set_backend_name (backend, provider);
e_source_set_display_name (source, display_name);
+
/* Also check whether the color format is as expected; it cannot
be used gdk_rgba_parse here, because it required gdk/gtk. */
- if (source_type != E_WEBDAV_DISCOVER_SUPPORTS_CONTACTS && color &&
+ if (is_new && source_type != E_WEBDAV_DISCOVER_SUPPORTS_CONTACTS && color &&
sscanf (color, "#%02x%02x%02x", &rr, &gg, &bb) == 3) {
gchar *safe_color;
diff --git a/modules/owncloud-backend/module-owncloud-backend.c
b/modules/owncloud-backend/module-owncloud-backend.c
index 204188a..d35b0ed 100644
--- a/modules/owncloud-backend/module-owncloud-backend.c
+++ b/modules/owncloud-backend/module-owncloud-backend.c
@@ -218,9 +218,10 @@ owncloud_add_found_source (ECollectionBackend *collection,
e_source_backend_set_backend_name (backend, provider);
e_source_set_display_name (source, display_name);
+
/* Also check whether the color format is as expected; it cannot
be used gdk_rgba_parse here, because it required gdk/gtk. */
- if (source_type != E_WEBDAV_DISCOVER_SUPPORTS_CONTACTS && color &&
+ if (is_new && source_type != E_WEBDAV_DISCOVER_SUPPORTS_CONTACTS && color &&
sscanf (color, "#%02x%02x%02x", &rr, &gg, &bb) == 3) {
gchar *safe_color;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]