[gnome-color-manager/colord] Use the new Commit methods so we can assign properties before emitting DeviceAdded



commit 413fc7768bcda3c725079e323532e90ae8c97ffb
Author: Richard Hughes <richard hughsie com>
Date:   Sat Jan 29 17:50:16 2011 +0000

    Use the new Commit methods so we can assign properties before emitting DeviceAdded

 src/gcm-session.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-session.c b/src/gcm-session.c
index 4e4bc52..32b80f1 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -686,6 +686,17 @@ gcm_session_profile_store_added_cb (GcmProfileStore *profile_store_,
 		g_error_free (error);
 		goto out;
 	}
+
+	/* commit */
+	ret = cd_profile_commit_sync (profile,
+				      NULL,
+				      &error);
+	if (!ret) {
+		g_warning ("failed to commit profile: %s",
+			   error->message);
+		g_error_free (error);
+		goto out;
+	}
 out:
 	if (profile != NULL)
 		g_object_unref (profile);
@@ -766,6 +777,17 @@ gcm_x11_screen_output_added_cb (GcmX11Screen *screen_,
 		g_error_free (error);
 		goto out;
 	}
+
+	/* commit */
+	ret = cd_device_commit_sync (device,
+				     NULL,
+				     &error);
+	if (!ret) {
+		g_warning ("failed to commit device: %s",
+			   error->message);
+		g_error_free (error);
+		goto out;
+	}
 out:
 	if (device != NULL)
 		g_object_unref (device);



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