[gnome-color-manager/gnome-3-2] Actually enable the non-display calibrate codepath



commit 573cc0a1f5ba9eb78a13fbb88dcba20f3ac32857
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jan 4 10:07:06 2012 +0000

    Actually enable the non-display calibrate codepath
    
    Resolves https://bugzilla.gnome.org/show_bug.cgi?id=667081

 src/gcm-calibrate-main.c |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)
---
diff --git a/src/gcm-calibrate-main.c b/src/gcm-calibrate-main.c
index 16cf21e..834e790 100644
--- a/src/gcm-calibrate-main.c
+++ b/src/gcm-calibrate-main.c
@@ -432,10 +432,31 @@ gcm_calib_start_idle_cb (gpointer user_data)
 
 	/* actuall do the action */
 	calib->started_calibration = TRUE;
-	ret = gcm_calibrate_display (calib->calibrate,
-				     calib->device,
-				     calib->main_window,
-				     &error);
+
+	switch (calib->device_kind) {
+	case CD_DEVICE_KIND_CAMERA:
+	case CD_DEVICE_KIND_WEBCAM:
+		ret = gcm_calibrate_device (calib->calibrate,
+					    calib->device,
+					    calib->main_window,
+					    &error);
+		break;
+	case CD_DEVICE_KIND_DISPLAY:
+		ret = gcm_calibrate_display (calib->calibrate,
+					     calib->device,
+					     calib->main_window,
+					     &error);
+		break;
+	case CD_DEVICE_KIND_PRINTER:
+		ret = gcm_calibrate_printer (calib->calibrate,
+					     calib->device,
+					     calib->main_window,
+					     &error);
+		break;
+	default:
+		g_assert_not_reached ();
+		break;
+	}
 	if (!ret) {
 		gcm_calibrate_set_title (calib->calibrate, _("Failed to calibrate"));
 		gcm_calibrate_set_message (calib->calibrate, error->message);



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