[gnome-settings-daemon/gnome-3-2] color: Set model and vendor to 'unknown' if not specified or unavailable



commit 3b8eefcd83d685672e581701f8dc2faf77cdb001
Author: Richard Hughes <richard hughsie com>
Date:   Wed Nov 2 16:49:07 2011 +0000

    color: Set model and vendor to 'unknown' if not specified or unavailable
    
    If the user has connected a device without the ability to get the EDID (e.g.
    composite TV connection) then don't show a critical warning and fail to add
    the device.
    
    Resolves https://bugzilla.redhat.com/show_bug.cgi?id=749504

 plugins/color/gsd-color-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c
index 9135fc1..d99e0b5 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -1323,6 +1323,12 @@ gcm_session_add_x11_output (GsdColorManager *manager, GnomeRROutput *output)
         if (serial == NULL)
                 serial = "unknown";
 
+        /* ensure mandatory fields are set */
+        if (model == NULL)
+                model = "unknown";
+        if (vendor == NULL)
+                vendor = "unknown";
+
         device_id = gcm_session_get_output_id (manager, output);
         g_debug ("output %s added", device_id);
         device_props = g_hash_table_new_full (g_str_hash, g_str_equal,



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