[gnome-settings-daemon] color: Use cd_client_create_profile_for_icc() if available



commit 3480250c665e4db050c3f02ade1e06f781ebb73e
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jul 16 12:45:51 2013 +0100

    color: Use cd_client_create_profile_for_icc() if available
    
    This alows us to share code with xiccd and also allows us to drop about a two
    dozen lines of code in the future.

 plugins/color/gsd-color-manager.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c
index fb81ee9..b319f53 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -1654,11 +1654,19 @@ gcm_session_icc_store_added_cb (CdIccStore *icc_store,
                                 CdIcc *icc,
                                 GsdColorManager *manager)
 {
+        GsdColorManagerPrivate *priv = manager->priv;
+#if CD_CHECK_VERSION(1,1,1)
+        cd_client_create_profile_for_icc (priv->client,
+                                          icc,
+                                          CD_OBJECT_SCOPE_TEMP,
+                                          NULL,
+                                          gcm_session_create_profile_cb,
+                                          manager);
+#else
         const gchar *filename;
         const gchar *checksum;
         gchar *profile_id = NULL;
         GHashTable *profile_props = NULL;
-        GsdColorManagerPrivate *priv = manager->priv;
 
         filename = cd_icc_get_filename (icc);
         g_debug ("profile %s added", filename);
@@ -1684,6 +1692,7 @@ gcm_session_icc_store_added_cb (CdIccStore *icc_store,
         g_free (profile_id);
         if (profile_props != NULL)
                 g_hash_table_unref (profile_props);
+#endif
 }
 
 static void


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