[evolution-data-server] Add comments around g_idle_add() changes



commit 7dd6aa6cd934a754fcadabfeb34b9f58e773139f
Author: Milan Crha <mcrha redhat com>
Date:   Fri Feb 8 17:34:34 2013 +0100

    Add comments around g_idle_add() changes

 calendar/libecal/e-cal.c           |    1 +
 camel/camel-folder.c               |    4 ++++
 camel/camel-imapx-server.c         |    1 +
 camel/camel-service.c              |    2 ++
 camel/camel-session.c              |    2 ++
 camel/camel-store.c                |    8 ++++++++
 camel/camel-subscribable.c         |    4 ++++
 libedataserver/e-gdbus-templates.c |    4 +++-
 8 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index d108828..aeb7823 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -726,6 +726,7 @@ async_report_idle (ECal *ecal,
 	data->ecal = g_object_ref (ecal);
 	data->error = error;
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 	g_idle_add_full (G_PRIORITY_DEFAULT, idle_async_error_reply_cb, data, NULL);
 }
 
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 3464d0a..9bf9d14 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -2927,6 +2927,8 @@ camel_folder_delete (CamelFolder *folder)
 	signal_data = g_slice_new0 (SignalData);
 	signal_data->folder = g_object_ref (folder);
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		folder_emit_deleted_cb,
@@ -2977,6 +2979,8 @@ camel_folder_rename (CamelFolder *folder,
 	signal_data->folder = g_object_ref (folder);
 	signal_data->folder_name = old_name;  /* transfer ownership */
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		folder_emit_renamed_cb,
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 26544aa..49266b6 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6903,6 +6903,7 @@ imapx_server_dispose (GObject *object)
 
 	if (server->parser_thread) {
 		if (server->parser_thread == g_thread_self ())
+			/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 			g_idle_add_full (G_PRIORITY_HIGH, &join_helper, server->parser_thread, NULL);
 		else
 			g_thread_join (server->parser_thread);
diff --git a/camel/camel-service.c b/camel/camel-service.c
index 5cf9e92..b7f0ee7 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -408,6 +408,8 @@ service_queue_notify_connection_status (CamelService *service)
 
 	session = camel_service_get_session (service);
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		service_notify_connection_status_cb,
diff --git a/camel/camel-session.c b/camel/camel-session.c
index df6f254..544fd9b 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -53,6 +53,8 @@
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), CAMEL_TYPE_SESSION, CamelSessionPrivate))
 
+/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+   same as GAsyncResult, where this operation is quite similar to it anyway */
 #define JOB_PRIORITY G_PRIORITY_DEFAULT
 
 #define d(x)
diff --git a/camel/camel-store.c b/camel/camel-store.c
index b81c372..e4947fd 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -1279,6 +1279,8 @@ camel_store_folder_created (CamelStore *store,
 	signal_data->store = g_object_ref (store);
 	signal_data->folder_info = camel_folder_info_clone (folder_info);
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		store_emit_folder_created_cb,
@@ -1313,6 +1315,8 @@ camel_store_folder_deleted (CamelStore *store,
 	signal_data->store = g_object_ref (store);
 	signal_data->folder_info = camel_folder_info_clone (folder_info);
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		store_emit_folder_deleted_cb,
@@ -1347,6 +1351,8 @@ camel_store_folder_opened (CamelStore *store,
 	signal_data->store = g_object_ref (store);
 	signal_data->folder = g_object_ref (folder);
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		store_emit_folder_opened_cb,
@@ -1385,6 +1391,8 @@ camel_store_folder_renamed (CamelStore *store,
 	signal_data->folder_info = camel_folder_info_clone (folder_info);
 	signal_data->folder_name = g_strdup (old_name);
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		store_emit_folder_renamed_cb,
diff --git a/camel/camel-subscribable.c b/camel/camel-subscribable.c
index b73395e..470a4e0 100644
--- a/camel/camel-subscribable.c
+++ b/camel/camel-subscribable.c
@@ -635,6 +635,8 @@ camel_subscribable_folder_subscribed (CamelSubscribable *subscribable,
 	signal_data->subscribable = g_object_ref (subscribable);
 	signal_data->folder_info = camel_folder_info_clone (folder_info);
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		subscribable_emit_folder_subscribed_cb,
@@ -671,6 +673,8 @@ camel_subscribable_folder_unsubscribed (CamelSubscribable *subscribable,
 	signal_data->subscribable = g_object_ref (subscribable);
 	signal_data->folder_info = camel_folder_info_clone (folder_info);
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE),
+	   same as GAsyncResult, where this operation is quite similar to it anyway */
 	camel_session_idle_add (
 		session, G_PRIORITY_DEFAULT,
 		subscribable_emit_folder_unsubscribed_cb,
diff --git a/libedataserver/e-gdbus-templates.c b/libedataserver/e-gdbus-templates.c
index 5d99703..d741001 100644
--- a/libedataserver/e-gdbus-templates.c
+++ b/libedataserver/e-gdbus-templates.c
@@ -1014,7 +1014,9 @@ e_gdbus_op_cancelled_cb (GCancellable *cancellable,
 	cd->op_data = op_data;
 
 	/* do this on idle, because this callback should be left
-	 * as soon as possible, with no sync calls being done */
+	 * as soon as possible, with no sync calls being done;
+	 * also schedule with priority higher than gtk+ uses
+	 * for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 	op_data->cancel_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT, e_gdbus_op_cancelled_idle_cb, cd, cancel_data_free);
 }
 


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