[gnome-settings-daemon/benzea/blackbody-color-stable: 1/2] color: Remove compatibility ifdef's for old colord versions



commit 00f7347a63c9aa1a1c6a1f6d74d6cb04f4beb5a6
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Jun 3 14:46:37 2019 +0200

    color: Remove compatibility ifdef's for old colord versions
    
    We already have a dependency on 1.3.5 which removes the need for the
    switches.

 plugins/color/gsd-color-profiles.c | 33 +--------------------------------
 plugins/color/gsd-color-state.c    |  4 ----
 2 files changed, 1 insertion(+), 36 deletions(-)
---
diff --git a/plugins/color/gsd-color-profiles.c b/plugins/color/gsd-color-profiles.c
index 29d39ac2..ef083a19 100644
--- a/plugins/color/gsd-color-profiles.c
+++ b/plugins/color/gsd-color-profiles.c
@@ -141,44 +141,13 @@ gcm_session_icc_store_added_cb (CdIccStore *icc_store,
                                 GsdColorProfiles *profiles)
 {
         GsdColorProfilesPrivate *priv = profiles->priv;
-#if CD_CHECK_VERSION(1,1,1)
+
         cd_client_create_profile_for_icc (priv->client,
                                           icc,
                                           CD_OBJECT_SCOPE_TEMP,
                                           priv->cancellable,
                                           gcm_session_create_profile_cb,
                                           profiles);
-#else
-        const gchar *filename;
-        const gchar *checksum;
-        gchar *profile_id = NULL;
-        GHashTable *profile_props = NULL;
-
-        filename = cd_icc_get_filename (icc);
-        g_debug ("profile %s added", filename);
-
-        /* generate ID */
-        checksum = cd_icc_get_checksum (icc);
-        profile_id = g_strdup_printf ("icc-%s", checksum);
-        profile_props = g_hash_table_new_full (g_str_hash, g_str_equal,
-                                               NULL, NULL);
-        g_hash_table_insert (profile_props,
-                             CD_PROFILE_PROPERTY_FILENAME,
-                             (gpointer) filename);
-        g_hash_table_insert (profile_props,
-                             CD_PROFILE_METADATA_FILE_CHECKSUM,
-                             (gpointer) checksum);
-        cd_client_create_profile (priv->client,
-                                  profile_id,
-                                  CD_OBJECT_SCOPE_TEMP,
-                                  profile_props,
-                                  priv->cancellable,
-                                  gcm_session_create_profile_cb,
-                                  profiles);
-        g_free (profile_id);
-        if (profile_props != NULL)
-                g_hash_table_unref (profile_props);
-#endif
 }
 
 static void
diff --git a/plugins/color/gsd-color-state.c b/plugins/color/gsd-color-state.c
index 6629d153..f46d8cef 100644
--- a/plugins/color/gsd-color-state.c
+++ b/plugins/color/gsd-color-state.c
@@ -413,13 +413,9 @@ gcm_session_generate_vcgt (CdProfile *profile, guint color_temperature, guint si
         }
 
         /* get the color temperature */
-#if CD_CHECK_VERSION(1,3,5)
         if (!cd_color_get_blackbody_rgb_full (color_temperature,
                                               &temp,
                                               CD_COLOR_BLACKBODY_FLAG_USE_PLANCKIAN)) {
-#else
-        if (!cd_color_get_blackbody_rgb (color_temperature, &temp)) {
-#endif
                 g_warning ("failed to get blackbody for %uK", color_temperature);
                 cd_color_rgb_set (&temp, 1.0, 1.0, 1.0);
         } else {


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