[evolution] Add comments around g_idle_add() changes



commit 9c6a7673b80268d96eb007b3273b26d5422f48a1
Author: Milan Crha <mcrha redhat com>
Date:   Fri Feb 8 18:26:15 2013 +0100

    Add comments around g_idle_add() changes

 em-format/e-mail-parser.c                 |    1 +
 libemail-engine/e-mail-utils.c            |    1 +
 libemail-engine/mail-folder-cache.c       |    1 +
 libemail-engine/mail-mt.c                 |    3 +++
 mail/e-mail-browser.c                     |    1 +
 mail/e-mail-display.c                     |    1 +
 mail/e-mail-ui-session.c                  |    1 +
 modules/itip-formatter/itip-view.c        |    1 +
 modules/settings/e-settings-mail-reader.c |    1 +
 plugins/mail-to-task/mail-to-task.c       |    1 +
 shell/e-shell-searchbar.c                 |    1 +
 smime/gui/certificate-manager.c           |    4 +++-
 12 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c
index f2832b1..e569560 100644
--- a/em-format/e-mail-parser.c
+++ b/em-format/e-mail-parser.c
@@ -723,6 +723,7 @@ e_mail_parser_wrap_as_attachment (EMailParser *parser,
 	}
 
 	/* e_attachment_load_async must be called from main thread */
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 	g_idle_add_full (G_PRIORITY_HIGH,
 		(GSourceFunc) load_attachment_idle,
 		g_object_ref (empa->attachment),
diff --git a/libemail-engine/e-mail-utils.c b/libemail-engine/e-mail-utils.c
index 17e6136..e7f414a 100644
--- a/libemail-engine/e-mail-utils.c
+++ b/libemail-engine/e-mail-utils.c
@@ -824,6 +824,7 @@ free_mail_cache_thread (gpointer user_data)
 		e_cancellable_mutex_unlock (&photos_cache_lock);
 	}
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 	g_idle_add_full (G_PRIORITY_HIGH, free_mail_cache_idle, user_data, NULL);
 
 	return NULL;
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index f1af370..89c6a52 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -304,6 +304,7 @@ flush_updates (MailFolderCache *cache)
 	if (g_queue_is_empty (&cache->priv->updates))
 		return;
 
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 	cache->priv->update_id = g_idle_add_full (G_PRIORITY_DEFAULT,
 		(GSourceFunc) flush_updates_idle_cb, cache, NULL);
 }
diff --git a/libemail-engine/mail-mt.c b/libemail-engine/mail-mt.c
index 3ff5242..ef443d4 100644
--- a/libemail-engine/mail-mt.c
+++ b/libemail-engine/mail-mt.c
@@ -216,6 +216,7 @@ mail_msg_unref (gpointer msg)
 
 		/* Destroy the message from an idle callback
 		 * so we know we're in the main loop thread. */
+		/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 		g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) mail_msg_free, mail_msg, NULL);
 	}
 }
@@ -429,6 +430,7 @@ mail_msg_proxy (MailMsg *msg)
 
 	G_LOCK (idle_source_id);
 	if (idle_source_id == 0)
+		/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 		idle_source_id = g_idle_add_full (G_PRIORITY_DEFAULT,
 			(GSourceFunc) mail_msg_idle_cb, NULL, NULL);
 	G_UNLOCK (idle_source_id);
@@ -484,6 +486,7 @@ mail_msg_main_loop_push (gpointer msg)
 
 	G_LOCK (idle_source_id);
 	if (idle_source_id == 0)
+		/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 		idle_source_id = g_idle_add_full (G_PRIORITY_DEFAULT,
 			(GSourceFunc) mail_msg_idle_cb, NULL, NULL);
 	G_UNLOCK (idle_source_id);
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index 15f61c5..e708f29 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -302,6 +302,7 @@ mail_browser_message_list_built_cb (EMailBrowser *browser,
 	g_return_if_fail (IS_MESSAGE_LIST (message_list));
 
 	if (!message_list_count (message_list))
+		/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 		g_idle_add_full (G_PRIORITY_DEFAULT, close_on_idle_cb, browser, NULL);
 }
 
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index d1e27f8..26415f2 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -1925,6 +1925,7 @@ e_mail_display_reload (EMailDisplay *display)
 		return;
 
 	/* Schedule reloading if neccessary */
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 	display->priv->scheduled_reload =
 		g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) do_reload_display, display, NULL);
 }
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index 62defbc..6324a29 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -596,6 +596,7 @@ mail_ui_session_add_service (CamelSession *session,
 		context->session = g_object_ref (session);
 		context->service = g_object_ref (service);
 
+		/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 		g_idle_add_full (
 			G_PRIORITY_DEFAULT,
 			(GSourceFunc) mail_ui_session_add_service_cb,
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index 6f72c9b..c1712ab 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -5705,6 +5705,7 @@ view_response_cb (ItipView *view,
 			send_item (pitip, view);
 			break;
 		case ITIP_VIEW_RESPONSE_OPEN:
+			/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 			g_idle_add_full (G_PRIORITY_DEFAULT, idle_open_cb, pitip, NULL);
 			return;
 		default:
diff --git a/modules/settings/e-settings-mail-reader.c b/modules/settings/e-settings-mail-reader.c
index 360ce32..6c88e8f 100644
--- a/modules/settings/e-settings-mail-reader.c
+++ b/modules/settings/e-settings-mail-reader.c
@@ -85,6 +85,7 @@ settings_mail_reader_constructed (GObject *object)
 {
 	/* Bind properties to settings from an idle callback so the
 	 * EMailReader interface has a chance to be initialized first. */
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 	g_idle_add_full (
 		G_PRIORITY_DEFAULT,
 		(GSourceFunc) settings_mail_reader_idle_cb,
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 4e773f0..5cdb2bf 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -1011,6 +1011,7 @@ do_mail_to_event (AsyncData *data)
 			if (!e_cal_client_get_object_sync (E_CAL_CLIENT (client), icalcomponent_get_uid (icalcomp), NULL, &(mc->stored_comp), NULL, NULL))
 				mc->stored_comp = NULL;
 
+			/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 			g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) do_manage_comp_idle, mc, NULL);
 
 			oldmc = mc;
diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c
index 2c762a3..107a30a 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -1735,6 +1735,7 @@ e_shell_searchbar_load_state (EShellSearchbar *searchbar)
 	/* Execute the search when we have time. */
 	g_object_ref (shell_view);
 	searchbar->priv->state_dirty = FALSE;
+	/* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
 	g_idle_add_full (G_PRIORITY_DEFAULT, idle_execute_search, shell_view, NULL);
 }
 
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index a34e7ec..38645d2 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -1084,7 +1084,9 @@ e_cert_manager_config_init (ECertManagerConfig *ecmc)
 	/* Run this in an idle callback so Evolution has a chance to
 	 * fully initialize itself and start its main loop before we
 	 * load certificates, since doing so may trigger a password
-	 * dialog, and dialogs require a main loop. */
+	 * dialog, and dialogs require a main loop.
+	 * Schedule with priority higher than gtk+ uses for animations
+	 * (check docs for G_PRIORITY_HIGH_IDLE). */
 	g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) populate_ui, ecmc, NULL);
 
 	/* Disconnect cert-manager-notebook from it's window and attach it


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