[gnome-color-manager] Remove cd_icc_has_colorspace_description() as we can use the profile MD now
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Remove cd_icc_has_colorspace_description() as we can use the profile MD now
- Date: Tue, 30 Apr 2013 14:26:38 +0000 (UTC)
commit a221c09f6ea5e326a56bd69324d78118c216fd45
Author: Richard Hughes <richard hughsie com>
Date: Tue Apr 30 15:24:28 2013 +0100
Remove cd_icc_has_colorspace_description() as we can use the profile MD now
src/gcm-picker.c | 6 ++----
src/gcm-utils.c | 29 -----------------------------
src/gcm-utils.h | 1 -
3 files changed, 2 insertions(+), 34 deletions(-)
---
diff --git a/src/gcm-picker.c b/src/gcm-picker.c
index 8e102c1..ed9e6f1 100644
--- a/src/gcm-picker.c
+++ b/src/gcm-picker.c
@@ -541,7 +541,6 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
CdProfile *profile;
const gchar *filename;
const gchar *tmp;
- gboolean has_colorspace_description;
gboolean has_profile = FALSE;
gboolean has_vcgt;
gchar *text = NULL;
@@ -588,14 +587,13 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
/* only for correct kind */
has_vcgt = cd_profile_get_has_vcgt (profile);
- has_colorspace_description = cd_icc_has_colorspace_description (profile);
+ tmp = cd_profile_get_metadata_item (profile, CD_PROFILE_METADATA_STANDARD_SPACE);
colorspace = cd_profile_get_colorspace (profile);
- if (!has_vcgt && has_colorspace_description &&
+ if (!has_vcgt && tmp != NULL &&
colorspace == CD_COLORSPACE_RGB) {
gcm_prefs_combobox_add_profile (widget, profile, &iter);
/* set active option */
- tmp = cd_profile_get_metadata_item (profile, CD_PROFILE_METADATA_STANDARD_SPACE);
if (g_strcmp0 (tmp, "adobe-rgb") == 0) {
profile_filename = filename;
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (widget), &iter);
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index fa49309..bd2acf6 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -340,35 +340,6 @@ cd_colorspace_to_localised_string (CdColorspace colorspace)
return NULL;
}
-/**
- * cd_icc_has_colorspace_description:
- * @profile: A valid #CdProfile
- *
- * Finds out if the profile contains a colorspace description.
- *
- * Return value: %TRUE if the description mentions the profile colorspace explicity,
- * e.g. "Adobe RGB" for %CD_COLORSPACE_RGB.
- **/
-gboolean
-cd_icc_has_colorspace_description (CdProfile *profile)
-{
- CdColorspace colorspace;
- const gchar *description;
-
- g_return_val_if_fail (CD_IS_PROFILE (profile), FALSE);
-
- /* for each profile type */
- colorspace = cd_profile_get_colorspace (profile);
- description = cd_profile_get_title (profile);
- if (colorspace == CD_COLORSPACE_RGB)
- return (g_strstr_len (description, -1, "RGB") != NULL);
- if (colorspace == CD_COLORSPACE_CMYK)
- return (g_strstr_len (description, -1, "CMYK") != NULL);
-
- /* nothing */
- return FALSE;
-}
-
#define HYP(a,b) (sqrt((a)*(a) + (b)*(b)))
/**
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index cdf3897..00c2afc 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -49,7 +49,6 @@ gboolean gcm_utils_install_package (const gchar *package_name,
GtkWindow *window);
gchar *gcm_utils_linkify (const gchar *text);
const gchar *cd_colorspace_to_localised_string (CdColorspace colorspace);
-gboolean cd_icc_has_colorspace_description (CdProfile *profile);
GcmHull *cd_icc_generate_gamut_hull (CdIcc *icc,
guint res);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]