[gnome-color-manager] Don't emit a two critical warnings when calibrating a printer



commit d0ea36667dc655415de01098897e2b1a7821fa41
Author: Richard Hughes <richard hughsie com>
Date:   Tue May 29 16:48:23 2012 +0100

    Don't emit a two critical warnings when calibrating a printer

 src/gcm-calibrate-main.c |    8 +++++---
 src/gcm-calibrate.c      |    2 --
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gcm-calibrate-main.c b/src/gcm-calibrate-main.c
index 77298c9..511f7fe 100644
--- a/src/gcm-calibrate-main.c
+++ b/src/gcm-calibrate-main.c
@@ -1922,9 +1922,11 @@ gcm_calib_got_sensor (GcmCalibratePriv *calib, CdSensor *sensor)
 	    cd_sensor_get_kind (sensor) == CD_SENSOR_KIND_I1_DISPLAY3) {
 		is_photospectrometer = TRUE;
 	}
-	vbox = gcm_calib_get_vbox_for_page (calib,
-					    GCM_CALIBRATE_PAGE_DISPLAY_TEMPERATURE);
-	gtk_widget_set_visible (vbox, is_photospectrometer);
+	if (calib->device_kind == CD_DEVICE_KIND_DISPLAY) {
+		vbox = gcm_calib_get_vbox_for_page (calib,
+						    GCM_CALIBRATE_PAGE_DISPLAY_TEMPERATURE);
+		gtk_widget_set_visible (vbox, is_photospectrometer);
+	}
 out:
 	return;
 }
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index 6f4e4b7..df242e4 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -1887,8 +1887,6 @@ gcm_calibrate_printer (GcmCalibrate *calibrate, CdDevice *device, GtkWindow *win
 		goto out;
 
 	/* copy */
-	g_object_get (NULL, "print-kind", &priv->print_kind, NULL);
-
 	if (priv->print_kind == GCM_CALIBRATE_PRINT_KIND_ANALYZE) {
 
 		/* remove previously set value (if any) */



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