[gnome-color-manager] Do not make the display calibration button sensitive (with tooltip) if we are using < XRandR 1.3 dri



commit 5182def1a00e57accfbca7f39d75ebdb4cc2813f
Author: Richard Hughes <richard hughsie com>
Date:   Tue Feb 23 17:56:09 2010 +0000

    Do not make the display calibration button sensitive (with tooltip) if we are using < XRandR 1.3 drivers. Fixes #610846

 src/gcm-prefs.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 9c6e845..d674e65 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -994,6 +994,7 @@ gcm_prefs_set_calibrate_button_sensitivity (void)
 	const gchar *tooltip;
 	GcmDeviceTypeEnum type;
 	gboolean connected;
+	gboolean xrandr_fallback;
 
 	/* TRANSLATORS: this is when the button is sensitive */
 	tooltip = _("Create a color profile for the selected device");
@@ -1021,6 +1022,16 @@ gcm_prefs_set_calibrate_button_sensitivity (void)
 			goto out;
 		}
 
+		/* are we not XRandR 1.3 compat */
+		g_object_get (current_device,
+			      "xrandr_fallback", &xrandr_fallback,
+			      NULL);
+		if (xrandr_fallback) {
+			/* TRANSLATORS: this is when the button is insensitive */
+			tooltip = _("Cannot calibrate: The display driver does not support XRandR 1.3");
+			goto out;
+		}
+
 		/* find whether we have hardware installed */
 		ret = gcm_colorimeter_get_present (colorimeter);
 #ifndef GCM_HARDWARE_DETECTION



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