[gnome-settings-daemon/benzea/blackbody-color-unstable: 1/3] color: Remove compatibility ifdef's for old colord versions
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/benzea/blackbody-color-unstable: 1/3] color: Remove compatibility ifdef's for old colord versions
- Date: Mon, 3 Jun 2019 13:03:14 +0000 (UTC)
commit a03e70e50784b909289845c1376ca0293143c132
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 | 32 --------------------------------
plugins/color/gsd-color-state.c | 4 ----
2 files changed, 36 deletions(-)
---
diff --git a/plugins/color/gsd-color-profiles.c b/plugins/color/gsd-color-profiles.c
index eacb20c6..c73abd71 100644
--- a/plugins/color/gsd-color-profiles.c
+++ b/plugins/color/gsd-color-profiles.c
@@ -135,44 +135,12 @@ gcm_session_icc_store_added_cb (CdIccStore *icc_store,
CdIcc *icc,
GsdColorProfiles *profiles)
{
-#if CD_CHECK_VERSION(1,1,1)
cd_client_create_profile_for_icc (profiles->client,
icc,
CD_OBJECT_SCOPE_TEMP,
profiles->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 (profiles->client,
- profile_id,
- CD_OBJECT_SCOPE_TEMP,
- profile_props,
- profiles->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 fcc56fc5..b744c44b 100644
--- a/plugins/color/gsd-color-state.c
+++ b/plugins/color/gsd-color-state.c
@@ -409,13 +409,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]