color: Do not show standard colorspaces in the 'Add profile' UI

NOTE: You need colord >= 0.1.4 and shared-color-profiles >= 0.1.5 for this
to work.
This commit is contained in:
Richard Hughes 2011-10-13 15:57:55 +01:00
parent f4ac4f1a0f
commit c9647e530d

View file

@ -291,6 +291,9 @@ static gboolean
gcm_prefs_is_profile_suitable_for_device (CdProfile *profile, gcm_prefs_is_profile_suitable_for_device (CdProfile *profile,
CdDevice *device) CdDevice *device)
{ {
#if CD_CHECK_VERSION(0,1,14)
const gchar *data_source;
#endif
CdProfileKind profile_kind_tmp; CdProfileKind profile_kind_tmp;
CdProfileKind profile_kind; CdProfileKind profile_kind;
CdColorspace profile_colorspace; CdColorspace profile_colorspace;
@ -311,6 +314,14 @@ gcm_prefs_is_profile_suitable_for_device (CdProfile *profile,
if (profile_kind_tmp != profile_kind) if (profile_kind_tmp != profile_kind)
goto out; goto out;
#if CD_CHECK_VERSION(0,1,14)
/* ignore the colorspace profiles */
data_source = cd_profile_get_metadata_item (profile,
CD_PROFILE_METADATA_DATA_SOURCE);
if (g_strcmp0 (data_source, CD_PROFILE_METADATA_DATA_SOURCE_STANDARD) == 0)
goto out;
#endif
/* success */ /* success */
ret = TRUE; ret = TRUE;
out: out: