[gnome-color-manager] trivial: adapt gcm-session to the new colord async API



commit d1563391639351e75469450f0536c04dc1645485
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jun 1 09:53:11 2011 +0100

    trivial: adapt gcm-session to the new colord async API

 src/gcm-session.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-session.c b/src/gcm-session.c
index d0f84bf..3d3e8e3 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -615,6 +615,7 @@ gcm_session_get_profile_for_window (GcmSessionPrivate *priv,
 	GcmX11Output *output = NULL;
 	GdkWindow *window;
 	GError *error_local = NULL;
+	gboolean ret;
 
 	g_debug ("getting profile for %i", xid);
 
@@ -652,6 +653,11 @@ gcm_session_get_profile_for_window (GcmSessionPrivate *priv,
 		goto out;
 	}
 
+	/* get properties */
+	ret = cd_device_connect_sync (device, NULL, error);
+	if (!ret)
+		goto out;
+
 	/* get the default profile for the device */
 	profile = cd_device_get_default_profile (device);
 	if (filename == NULL) {
@@ -661,6 +667,11 @@ gcm_session_get_profile_for_window (GcmSessionPrivate *priv,
 		goto out;
 	}
 
+	/* get properties */
+	ret = cd_profile_connect_sync (profile, NULL, error);
+	if (!ret)
+		goto out;
+
 	/* get the filename */
 	filename = cd_profile_get_filename (profile);
 	if (filename == NULL) {



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