[gnome-color-manager] You can't calibrate a device that is not connected at the present time



commit 3f570ef89d9908e4612143a2d1fbbc8b8a210961
Author: Richard Hughes <richard hughsie com>
Date:   Wed Nov 18 13:14:28 2009 +0000

    You can't calibrate a device that is not connected at the present time

 src/gcm-prefs.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index ff4ebc1..fd1f789 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -656,15 +656,23 @@ gcm_prefs_set_calibrate_button_sensitivity (void)
 	gboolean ret = FALSE;
 	GtkWidget *widget;
 	GcmDeviceType type;
+	gboolean connected;
 
 	/* no device selected */
 	if (current_device == NULL)
 		goto out;
 
-	/* are we a display */
+	/* get current device properties */
 	g_object_get (current_device,
 		      "type", &type,
+		      "connected", &connected,
 		      NULL);
+
+	/* are we disconnected */
+	if (!connected)
+		goto out;
+
+	/* are we a display */
 	if (type == GCM_DEVICE_TYPE_DISPLAY) {
 
 		/* find if ArgyllCMS is installed */



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