[gnome-settings-daemon] color: Save the OutputEdidMd5 metadata for future UCMM compatibility



commit 3fff3ee20a82fde35efb8568f560c4ebb8003092
Author: Richard Hughes <richard hughsie com>
Date:   Fri Apr 26 09:27:52 2013 +0100

    color: Save the OutputEdidMd5 metadata for future UCMM compatibility

 plugins/color/gsd-color-manager.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c
index e28ad58..72902b3 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -996,6 +996,7 @@ gcm_session_create_device_cb (GObject *object,
 static void
 gcm_session_add_x11_output (GsdColorManager *manager, GnomeRROutput *output)
 {
+        const gchar *edid_checksum = NULL;
         const gchar *model = NULL;
         const gchar *serial = NULL;
         const gchar *vendor = NULL;
@@ -1023,6 +1024,7 @@ gcm_session_add_x11_output (GsdColorManager *manager, GnomeRROutput *output)
 
         /* use EDID data if we have it */
         if (edid != NULL) {
+                edid_checksum = gcm_edid_get_checksum (edid);
                 if (model == NULL)
                         model = gcm_edid_get_monitor_name (edid);
                 if (vendor == NULL)
@@ -1071,6 +1073,13 @@ gcm_session_add_x11_output (GsdColorManager *manager, GnomeRROutput *output)
                              (gpointer) CD_DEVICE_METADATA_OUTPUT_PRIORITY_PRIMARY :
                              (gpointer) CD_DEVICE_METADATA_OUTPUT_PRIORITY_SECONDARY);
 #endif
+#if CD_CHECK_VERSION(0,1,34)
+        if (edid_checksum != NULL) {
+                g_hash_table_insert (device_props,
+                                     (gpointer) CD_DEVICE_METADATA_OUTPUT_EDID_MD5,
+                                     (gpointer) edid_checksum);
+        }
+#endif
 #if CD_CHECK_VERSION(0,1,27)
         /* set this so we can call the device a 'Laptop Screen' in the
          * control center main panel */


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