summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2019-06-03 14:46:37 +0200
committerBenjamin Berg <benjamin@sipsolutions.net>2019-07-30 08:37:12 +0000
commitb4793f936172b5b3a413a10c9f3cffdbfffe6762 (patch)
treee0375b73db5d0c88caa03ac7c143960dc31a3011
parentf0b38977e97687d668005c6ea85fa9121739a369 (diff)
downloadgnome-settings-daemon-b4793f936172b5b3a413a10c9f3cffdbfffe6762.tar.gz
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.
-rw-r--r--plugins/color/gsd-color-profiles.c32
-rw-r--r--plugins/color/gsd-color-state.c4
2 files changed, 0 insertions, 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 {