[gnome-color-manager] Set the reference kind when calibrating a camera device



commit 65b6dcbbaa6abac0399abef154458e89586909b9
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jan 4 09:55:27 2012 +0000

    Set the reference kind when calibrating a camera device

 src/gcm-calibrate-main.c |    3 +++
 src/gcm-calibrate.c      |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gcm-calibrate-main.c b/src/gcm-calibrate-main.c
index 0df92d5..ef3b1a6 100644
--- a/src/gcm-calibrate-main.c
+++ b/src/gcm-calibrate-main.c
@@ -1077,6 +1077,9 @@ gcm_calib_reference_kind_combobox_cb (GtkComboBox *combo_box,
 
 	/* not sorted so we can just use the index */
 	reference_kind = gtk_combo_box_get_active (GTK_COMBO_BOX (combo_box));
+	g_object_set (calib->calibrate,
+		      "reference-kind", reference_kind,
+		      NULL);
 	filename = gcm_calib_reference_kind_to_image_filename (reference_kind);
 
 	/* fallback */
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index 61ad712..e028485 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -2218,6 +2218,9 @@ gcm_calibrate_set_property (GObject *object, guint prop_id, const GValue *value,
 	case PROP_DISPLAY_KIND:
 		priv->display_kind = g_value_get_uint (value);
 		break;
+	case PROP_REFERENCE_KIND:
+		priv->reference_kind = g_value_get_uint (value);
+		break;
 	case PROP_WORKING_PATH:
 		g_free (priv->working_path);
 		priv->working_path = g_strdup (g_value_get_string (value));
@@ -2245,7 +2248,7 @@ gcm_calibrate_class_init (GcmCalibrateClass *klass)
 
 	pspec = g_param_spec_uint ("reference-kind", NULL, NULL,
 				   0, G_MAXUINT, 0,
-				   G_PARAM_READABLE);
+				   G_PARAM_READWRITE);
 	g_object_class_install_property (object_class, PROP_REFERENCE_KIND, pspec);
 
 	pspec = g_param_spec_uint ("display-kind", NULL, NULL,



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