Commit b4793f93 authored by Benjamin Berg's avatar Benjamin Berg Committed by Benjamin Berg

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.
parent f0b38977
......@@ -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
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment