[evolution-data-server/gnome-3-16] Change ownCloud calendar color only when the source is new



commit b00d491ab6459fe90e094b7b457e6c3d182a9bc1
Author: Milan Crha <mcrha redhat com>
Date:   Thu May 21 18:23:53 2015 +0200

    Change 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/owncloud-backend/module-owncloud-backend.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/modules/owncloud-backend/module-owncloud-backend.c 
b/modules/owncloud-backend/module-owncloud-backend.c
index 0e898cc..a461dea 100644
--- a/modules/owncloud-backend/module-owncloud-backend.c
+++ b/modules/owncloud-backend/module-owncloud-backend.c
@@ -184,9 +184,10 @@ owncloud_source_found_cb (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 != OwnCloud_Source_Contacts && color &&
+               if (is_new && source_type != OwnCloud_Source_Contacts && color &&
                    sscanf (color, "#%02x%02x%02x", &rr, &gg, &bb) == 3)
                        e_source_selectable_set_color (E_SOURCE_SELECTABLE (backend), color);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]