[gnome-settings-daemon] color: Do not show multiple warnings if colord is not available at runtime



commit 6031e6b86c9756aa1c9836e01993d91cd12fb555
Author: Richard Hughes <richard hughsie com>
Date:   Wed Aug 3 11:02:59 2011 +0100

    color: Do not show multiple warnings if colord is not available at runtime
    
    It perfectly possible to build gnome-settings-daemon in jhbuild with colord
    support, but for there to be no system activatable daemon at runtime.
    
    In this case, do not spam the console with WARNINGs and do not try to coldplug
    all the devices and profiles with colord.

 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 0391175..f30b586 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -1360,6 +1360,15 @@ gcm_session_client_connect_cb (GObject *source_object,
                 return;
         }
 
+#if CD_CHECK_VERSION(0,1,12)
+        /* is there an available colord instance? */
+        ret = cd_client_get_has_server (manager->priv->client);
+        if (!ret) {
+                g_warning ("There is no colord server available");
+                goto out;
+        }
+#endif
+
         /* add profiles */
         gcm_profile_store_search (priv->profile_store);
 



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