[gnome-color-manager] Only require the device to be present if it is a display type



commit ad796d726594381d38dc4e28f7fedd593d684098
Author: Richard Hughes <richard hughsie com>
Date:   Tue Feb 9 19:34:43 2010 +0000

    Only require the device to be present if it is a display type

 src/gcm-prefs.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index d9fae5e..8f7d0ea 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -1504,13 +1504,13 @@ gcm_prefs_set_calibrate_button_sensitivity (void)
 		      "connected", &connected,
 		      NULL);
 
-	/* are we disconnected */
-	if (!connected)
-		goto out;
-
 	/* are we a display */
 	if (type == GCM_DEVICE_TYPE_ENUM_DISPLAY) {
 
+		/* are we disconnected */
+		if (!connected)
+			goto out;
+
 		/* find whether we have hardware installed */
 		g_object_get (color_device,
 			      "present", &ret,



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