aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer <michel@daenzer.net>2013-02-08 19:36:38 +0800
committerMilan Crha <mcrha@redhat.com>2013-02-09 01:26:48 +0800
commiteb9e9279262050117e75547bc5ce200ac92c24fb (patch)
treeb3210c08b0920832face1fce796c0d3731d97a7d
parent1214f942cc9fd61a3caa2a13d00f0c0a46197cb2 (diff)
downloadgsoc2013-evolution-eb9e9279262050117e75547bc5ce200ac92c24fb.tar.gz
gsoc2013-evolution-eb9e9279262050117e75547bc5ce200ac92c24fb.tar.zst
gsoc2013-evolution-eb9e9279262050117e75547bc5ce200ac92c24fb.zip
Bug #683867 - Schedule actions with higher idle priority
-rw-r--r--em-format/e-mail-parser.c5
-rw-r--r--libemail-engine/e-mail-utils.c2
-rw-r--r--libemail-engine/mail-folder-cache.c4
-rw-r--r--libemail-engine/mail-mt.c10
-rw-r--r--mail/e-mail-browser.c2
-rw-r--r--mail/e-mail-display.c2
-rw-r--r--mail/e-mail-ui-session.c2
-rw-r--r--modules/itip-formatter/itip-view.c2
-rw-r--r--modules/settings/e-settings-mail-reader.c2
-rw-r--r--plugins/mail-to-task/mail-to-task.c2
-rw-r--r--shell/e-shell-searchbar.c2
-rw-r--r--smime/gui/certificate-manager.c2
12 files changed, 19 insertions, 18 deletions
diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c
index 359efe7d9b..f2832b1f03 100644
--- a/em-format/e-mail-parser.c
+++ b/em-format/e-mail-parser.c
@@ -723,9 +723,10 @@ e_mail_parser_wrap_as_attachment (EMailParser *parser,
}
/* e_attachment_load_async must be called from main thread */
- g_idle_add (
+ g_idle_add_full (G_PRIORITY_HIGH,
(GSourceFunc) load_attachment_idle,
- g_object_ref (empa->attachment));
+ g_object_ref (empa->attachment),
+ NULL);
if (size != 0) {
GFileInfo *fileinfo;
diff --git a/libemail-engine/e-mail-utils.c b/libemail-engine/e-mail-utils.c
index 5e9a6db853..17e61365db 100644
--- a/libemail-engine/e-mail-utils.c
+++ b/libemail-engine/e-mail-utils.c
@@ -824,7 +824,7 @@ free_mail_cache_thread (gpointer user_data)
e_cancellable_mutex_unlock (&photos_cache_lock);
}
- g_idle_add (free_mail_cache_idle, user_data);
+ 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 35e620862e..f1af370b1e 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -304,8 +304,8 @@ flush_updates (MailFolderCache *cache)
if (g_queue_is_empty (&cache->priv->updates))
return;
- cache->priv->update_id = g_idle_add (
- (GSourceFunc) flush_updates_idle_cb, cache);
+ cache->priv->update_id = g_idle_add_full (G_PRIORITY_DEFAULT,
+ (GSourceFunc) flush_updates_idle_cb, cache, NULL);
}
/* This is how unread counts work (and don't work):
diff --git a/libemail-engine/mail-mt.c b/libemail-engine/mail-mt.c
index baf1476f82..3ff5242344 100644
--- a/libemail-engine/mail-mt.c
+++ b/libemail-engine/mail-mt.c
@@ -216,7 +216,7 @@ mail_msg_unref (gpointer msg)
/* Destroy the message from an idle callback
* so we know we're in the main loop thread. */
- g_idle_add ((GSourceFunc) mail_msg_free, mail_msg);
+ g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) mail_msg_free, mail_msg, NULL);
}
}
@@ -429,8 +429,8 @@ mail_msg_proxy (MailMsg *msg)
G_LOCK (idle_source_id);
if (idle_source_id == 0)
- idle_source_id = g_idle_add (
- (GSourceFunc) mail_msg_idle_cb, NULL);
+ idle_source_id = g_idle_add_full (G_PRIORITY_DEFAULT,
+ (GSourceFunc) mail_msg_idle_cb, NULL, NULL);
G_UNLOCK (idle_source_id);
}
@@ -484,8 +484,8 @@ mail_msg_main_loop_push (gpointer msg)
G_LOCK (idle_source_id);
if (idle_source_id == 0)
- idle_source_id = g_idle_add (
- (GSourceFunc) mail_msg_idle_cb, NULL);
+ 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 9ca4ce230f..15f61c50a5 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -302,7 +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))
- g_idle_add (close_on_idle_cb, browser);
+ g_idle_add_full (G_PRIORITY_DEFAULT, close_on_idle_cb, browser, NULL);
}
static gboolean
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index a286787be0..d1e27f8fa3 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -1926,7 +1926,7 @@ e_mail_display_reload (EMailDisplay *display)
/* Schedule reloading if neccessary */
display->priv->scheduled_reload =
- g_idle_add ((GSourceFunc) do_reload_display, display);
+ g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) do_reload_display, display, NULL);
}
GtkAction *
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index d07bc1ee77..62defbc914 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -597,7 +597,7 @@ mail_ui_session_add_service (CamelSession *session,
context->service = g_object_ref (service);
g_idle_add_full (
- G_PRIORITY_DEFAULT_IDLE,
+ G_PRIORITY_DEFAULT,
(GSourceFunc) mail_ui_session_add_service_cb,
context, (GDestroyNotify) source_context_free);
}
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index 1a8742b574..6f72c9bda2 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -5705,7 +5705,7 @@ view_response_cb (ItipView *view,
send_item (pitip, view);
break;
case ITIP_VIEW_RESPONSE_OPEN:
- g_idle_add (idle_open_cb, pitip);
+ g_idle_add_full (G_PRIORITY_DEFAULT, idle_open_cb, pitip, NULL);
return;
default:
break;
diff --git a/modules/settings/e-settings-mail-reader.c b/modules/settings/e-settings-mail-reader.c
index 9cf906fbef..360ce321d3 100644
--- a/modules/settings/e-settings-mail-reader.c
+++ b/modules/settings/e-settings-mail-reader.c
@@ -86,7 +86,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. */
g_idle_add_full (
- G_PRIORITY_DEFAULT_IDLE,
+ G_PRIORITY_DEFAULT,
(GSourceFunc) settings_mail_reader_idle_cb,
g_object_ref (object),
(GDestroyNotify) g_object_unref);
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 978011f12f..4e773f06a7 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -1011,7 +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;
- g_idle_add ((GSourceFunc) do_manage_comp_idle, mc);
+ 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 b62d255ec3..2c762a31ea 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -1735,7 +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;
- g_idle_add (idle_execute_search, shell_view);
+ g_idle_add_full (G_PRIORITY_DEFAULT, idle_execute_search, shell_view, NULL);
}
void
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index 30bfb62291..a34e7ec04f 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -1085,7 +1085,7 @@ e_cert_manager_config_init (ECertManagerConfig *ecmc)
* 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. */
- g_idle_add ((GSourceFunc) populate_ui, ecmc);
+ g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) populate_ui, ecmc, NULL);
/* Disconnect cert-manager-notebook from it's window and attach it
* to this ECertManagerConfig */