aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-09 03:21:42 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-09 03:21:42 +0800
commit60d1c3054aa60d02c763538d6b1f16d9d6ab6ade (patch)
tree755a59156908bd215c03f20f59b0ef770564c805 /mail
parent9c6a7673b80268d96eb007b3273b26d5422f48a1 (diff)
downloadgsoc2013-evolution-60d1c3054aa60d02c763538d6b1f16d9d6ab6ade.tar
gsoc2013-evolution-60d1c3054aa60d02c763538d6b1f16d9d6ab6ade.tar.gz
gsoc2013-evolution-60d1c3054aa60d02c763538d6b1f16d9d6ab6ade.tar.bz2
gsoc2013-evolution-60d1c3054aa60d02c763538d6b1f16d9d6ab6ade.tar.lz
gsoc2013-evolution-60d1c3054aa60d02c763538d6b1f16d9d6ab6ade.tar.xz
gsoc2013-evolution-60d1c3054aa60d02c763538d6b1f16d9d6ab6ade.tar.zst
gsoc2013-evolution-60d1c3054aa60d02c763538d6b1f16d9d6ab6ade.zip
G_PRIORITY_HIGH_IDLE is sufficient to beat GTK+ redraws.
GTK+ uses (G_PRIORITY_HIGH_IDLE + 20) for redrawing operations, which is actually a slightly lower priority than G_PRIORITY_HIGH_IDLE. Therefore for our purpose, G_PRIORITY_HIGH_IDLE is sufficient.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-browser.c6
-rw-r--r--mail/e-mail-display.c9
-rw-r--r--mail/e-mail-ui-session.c4
3 files changed, 11 insertions, 8 deletions
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index e708f29bbc..bdebf269aa 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -302,8 +302,10 @@ 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);
+ /* Prioritize ahead of GTK+ redraws. */
+ g_idle_add_full (
+ G_PRIORITY_HIGH_IDLE,
+ close_on_idle_cb, browser, NULL);
}
static gboolean
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 26415f2599..0a478b072a 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -1924,10 +1924,11 @@ e_mail_display_reload (EMailDisplay *display)
if (display->priv->scheduled_reload > 0)
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);
+ /* Schedule reloading if neccessary.
+ * Prioritize ahead of GTK+ redraws. */
+ display->priv->scheduled_reload = g_idle_add_full (
+ G_PRIORITY_HIGH_IDLE,
+ (GSourceFunc) do_reload_display, display, NULL);
}
GtkAction *
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index 6324a290ba..b9dc11e9a7 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -596,9 +596,9 @@ 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) */
+ /* Prioritize ahead of GTK+ redraws. */
g_idle_add_full (
- G_PRIORITY_DEFAULT,
+ G_PRIORITY_HIGH_IDLE,
(GSourceFunc) mail_ui_session_add_service_cb,
context, (GDestroyNotify) source_context_free);
}