[gnome-color-manager] Don't hardcode the AdobeRGB profile



commit 09cdb66f7505121487fc4e3dff18ddf06738c682
Author: Richard Hughes <richard hughsie com>
Date:   Mon May 28 19:02:42 2012 +0100

    Don't hardcode the AdobeRGB profile

 src/gcm-picker.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gcm-picker.c b/src/gcm-picker.c
index 1926118..cdf6bb2 100644
--- a/src/gcm-picker.c
+++ b/src/gcm-picker.c
@@ -530,6 +530,7 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
 	CdDevice *device_tmp;
 	CdProfile *profile;
 	const gchar *filename;
+	const gchar *tmp;
 	gboolean has_colorspace_description;
 	gboolean has_profile = FALSE;
 	gboolean has_vcgt;
@@ -586,8 +587,11 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget)
 			gcm_prefs_combobox_add_profile (widget, profile, &iter);
 
 			/* set active option */
-			if (g_strcmp0 (filename, profile_filename) == 0)
+			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);
+			}
 			has_profile = TRUE;
 		}
 	}
@@ -745,9 +749,6 @@ gcm_picker_startup_cb (GApplication *application, gpointer user_data)
 	/* disable some ui if no hardware */
 	gcm_picker_sensor_client_setup_ui ();
 
-	/* default to AdobeRGB */
-	profile_filename = "/usr/share/color/icc/Argyll/ClayRGB1998.icm";
-
 	/* setup RGB combobox */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_colorspace"));
 	gcm_prefs_set_combo_simple_text (widget);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]