Accepting request 155653 from GNOME:Factory

- Add evolution-data-server requires to libedataserver-1_2
  subpackage: the library references uses the glib schemas, which
  live in the main package. Fixes issues similar to bnc#803959.

Wanted for 12.3 (forwarded request 155524 from Zaitor)

OBS-URL: https://build.opensuse.org/request/show/155653
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/evolution-data-server?expand=0&rev=114
This commit is contained in:
Stephan Kulow 2013-02-19 12:31:30 +00:00 committed by Git OBS Bridge
commit 12609cbdd6
8 changed files with 1230 additions and 0 deletions

View File

@ -0,0 +1,249 @@
From 7c52fbd81093c1264e3d8aa6cdcf5c8bdc7b1772 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Fri, 25 Jan 2013 16:27:55 +0000
Subject: EGdbusTemplates: Address crash on operation cancel
In situations when a synchronous operation was cancelled, but the response
was already piled in main context the client could receive two replies, one
from the reply, the other from the cancelled operation, effectively accessing
invalid memory in the second response. This may address also other similar
situations caused by cancelled operations.
---
(limited to 'libedataserver/e-gdbus-templates.c')
diff --git a/libedataserver/e-gdbus-templates.c b/libedataserver/e-gdbus-templates.c
index 60306be..ef3e476 100644
--- a/libedataserver/e-gdbus-templates.c
+++ b/libedataserver/e-gdbus-templates.c
@@ -844,6 +844,7 @@ e_gdbus_complete_sync_method_uint (gpointer object,
typedef struct _AsyncOpData
{
+ gint ref_count;
EGdbusAsyncOpKeeper *proxy;
guint opid;
@@ -871,27 +872,37 @@ async_op_data_free (AsyncOpData *op_data)
g_return_if_fail (op_data != NULL);
+ pending_ops = e_gdbus_async_op_keeper_get_pending_ops (op_data->proxy);
+
if (op_data->cancel_idle_id) {
GError *error = NULL;
g_source_remove (op_data->cancel_idle_id);
op_data->cancel_idle_id = 0;
+ if (pending_ops)
+ g_hash_table_remove (pending_ops, GUINT_TO_POINTER (op_data->opid));
+
if (!e_gdbus_async_op_keeper_cancel_op_sync (op_data->proxy, op_data->opid, NULL, &error)) {
g_debug ("%s: Failed to cancel operation: %s\n", G_STRFUNC, error ? error->message : "Unknown error");
g_clear_error (&error);
}
+ } else if (pending_ops) {
+ g_hash_table_remove (pending_ops, GUINT_TO_POINTER (op_data->opid));
}
if (op_data->cancellable) {
- if (op_data->cancel_id)
+ if (op_data->cancel_id) {
g_cancellable_disconnect (op_data->cancellable, op_data->cancel_id);
+ op_data->cancel_id = 0;
+ }
g_object_unref (op_data->cancellable);
+ op_data->cancellable = NULL;
}
- pending_ops = e_gdbus_async_op_keeper_get_pending_ops (E_GDBUS_ASYNC_OP_KEEPER (op_data->proxy));
- if (pending_ops)
- g_hash_table_remove (pending_ops, GUINT_TO_POINTER (op_data->opid));
+ if (!g_atomic_int_dec_and_test (&op_data->ref_count))
+ return;
+
g_object_unref (op_data->proxy);
switch (op_data->result_type) {
@@ -919,6 +930,7 @@ async_op_complete (AsyncOpData *op_data,
g_return_if_fail (op_data != NULL);
+ g_atomic_int_inc (&op_data->ref_count);
simple = g_simple_async_result_new (G_OBJECT (op_data->proxy), op_data->async_callback, op_data->async_user_data, op_data->async_source_tag);
g_simple_async_result_set_op_res_gpointer (simple, op_data, (GDestroyNotify) async_op_data_free);
if (error)
@@ -932,13 +944,43 @@ async_op_complete (AsyncOpData *op_data,
g_object_unref (simple);
}
+typedef struct _CancelData
+{
+ EGdbusAsyncOpKeeper *proxy;
+ guint opid;
+ AsyncOpData *op_data;
+} CancelData;
+
+static void
+cancel_data_free (gpointer ptr)
+{
+ CancelData *cd = ptr;
+
+ if (!cd)
+ return;
+
+ g_object_unref (cd->proxy);
+ g_free (cd);
+}
+
static gboolean
e_gdbus_op_cancelled_idle_cb (gpointer user_data)
{
- AsyncOpData *op_data = user_data;
+ CancelData *cd = user_data;
+ AsyncOpData *op_data;
+ GHashTable *pending_ops;
GCancellable *cancellable;
GError *error = NULL;
+ g_return_val_if_fail (cd != NULL, FALSE);
+
+ pending_ops = e_gdbus_async_op_keeper_get_pending_ops (cd->proxy);
+ if (pending_ops && !g_hash_table_lookup (pending_ops, GUINT_TO_POINTER (cd->opid))) {
+ /* got served already */
+ return FALSE;
+ }
+
+ op_data = cd->op_data;
g_return_val_if_fail (op_data != NULL, FALSE);
cancellable = op_data->cancellable;
@@ -961,12 +1003,19 @@ static void
e_gdbus_op_cancelled_cb (GCancellable *cancellable,
AsyncOpData *op_data)
{
+ CancelData *cd;
+
g_return_if_fail (op_data != NULL);
g_return_if_fail (op_data->cancellable == cancellable);
+ cd = g_new0 (CancelData, 1);
+ cd->proxy = g_object_ref (op_data->proxy);
+ cd->opid = op_data->opid;
+ 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 */
- op_data->cancel_idle_id = g_idle_add (e_gdbus_op_cancelled_idle_cb, op_data);
+ op_data->cancel_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, e_gdbus_op_cancelled_idle_cb, cd, cancel_data_free);
}
static void
@@ -1370,9 +1419,21 @@ e_gdbus_proxy_sync_ready_cb (GObject *proxy,
GAsyncResult *result,
gpointer user_data)
{
- SyncOpData *sync_data = user_data;
+ gint sync_opid = GPOINTER_TO_INT (user_data);
+ gchar *sync_opid_ident;
+ SyncOpData *sync_data;
+
+ sync_opid_ident = g_strdup_printf ("EGdbusTemplates-SyncOp-%d", sync_opid);
+ sync_data = g_object_get_data (proxy, sync_opid_ident);
+ g_free (sync_opid_ident);
+
+ if (!sync_data) {
+ /* already finished operation; it can happen when the operation is cancelled,
+ but the result is already waiting in an idle queue.
+ */
+ return;
+ }
- g_return_if_fail (sync_data != NULL);
g_return_if_fail (sync_data->flag != NULL);
switch (sync_data->out_type) {
@@ -1415,12 +1476,17 @@ e_gdbus_proxy_call_sync (GDBusProxy *proxy,
guint out_type,
gpointer out_value)
{
+ static volatile gint sync_op_counter = 0;
+ gint sync_opid;
+ gchar *sync_opid_ident;
SyncOpData sync_data = { 0 };
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
g_return_val_if_fail (finish_func != NULL, FALSE);
+ g_object_ref (proxy);
+
switch (out_type) {
case E_GDBUS_TYPE_VOID:
sync_data.finish_func.finish_void = finish_func;
@@ -1443,6 +1509,7 @@ e_gdbus_proxy_call_sync (GDBusProxy *proxy,
break;
default:
g_warning ("%s: Unknown 'out' E_GDBUS_TYPE %x", G_STRFUNC, out_type);
+ g_object_unref (proxy);
return FALSE;
}
@@ -1450,30 +1517,37 @@ e_gdbus_proxy_call_sync (GDBusProxy *proxy,
sync_data.error = error;
sync_data.out_type = out_type;
+ sync_opid = g_atomic_int_add (&sync_op_counter, 1);
+ sync_opid_ident = g_strdup_printf ("EGdbusTemplates-SyncOp-%d", sync_opid);
+ g_object_set_data (G_OBJECT (proxy), sync_opid_ident, &sync_data);
+
switch (in_type) {
case E_GDBUS_TYPE_VOID: {
EGdbusCallStartVoid start = start_func;
- start (proxy, cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
case E_GDBUS_TYPE_BOOLEAN: {
EGdbusCallStartBoolean start = start_func;
- start (proxy, * ((gboolean *) in_value), cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, * ((gboolean *) in_value), cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
case E_GDBUS_TYPE_STRING: {
EGdbusCallStartString start = start_func;
- start (proxy, (const gchar *) in_value, cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, (const gchar *) in_value, cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
case E_GDBUS_TYPE_STRV: {
EGdbusCallStartStrv start = start_func;
- start (proxy, (const gchar * const *) in_value, cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, (const gchar * const *) in_value, cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
case E_GDBUS_TYPE_UINT: {
EGdbusCallStartUint start = start_func;
- start (proxy, * ((guint *) in_value), cancellable, e_gdbus_proxy_sync_ready_cb, &sync_data);
+ start (proxy, * ((guint *) in_value), cancellable, e_gdbus_proxy_sync_ready_cb, GINT_TO_POINTER (sync_opid));
} break;
default:
g_warning ("%s: Unknown 'in' E_GDBUS_TYPE %x", G_STRFUNC, in_type);
e_flag_free (sync_data.flag);
+ g_object_set_data (G_OBJECT (proxy), sync_opid_ident, NULL);
+ g_free (sync_opid_ident);
+ g_object_unref (proxy);
return FALSE;
}
@@ -1502,8 +1576,12 @@ e_gdbus_proxy_call_sync (GDBusProxy *proxy,
/* is called in a dedicated thread */
e_flag_wait (sync_data.flag);
}
+ g_object_set_data (G_OBJECT (proxy), sync_opid_ident, NULL);
e_flag_free (sync_data.flag);
+ g_free (sync_opid_ident);
+ g_object_unref (proxy);
+
return sync_data.finish_result;
}
--
cgit v0.9.0.2

View File

@ -0,0 +1,29 @@
From d92dc8b420cd599143649dca65bed55a035dd5b6 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Thu, 31 Jan 2013 16:33:07 +0000
Subject: Bug #689476 - Slow composer open (ENameSelector object leaks)
---
diff --git a/libedataserverui/e-name-selector.c b/libedataserverui/e-name-selector.c
index ddbb067..4badff3 100644
--- a/libedataserverui/e-name-selector.c
+++ b/libedataserverui/e-name-selector.c
@@ -331,6 +331,16 @@ name_selector_dispose (GObject *object)
g_array_set_size (priv->source_books, 0);
g_array_set_size (priv->sections, 0);
+ if (priv->dialog) {
+ gtk_widget_destroy (GTK_WIDGET (priv->dialog));
+ priv->dialog = NULL;
+ }
+
+ if (priv->model) {
+ g_object_unref (priv->model);
+ priv->model = NULL;
+ }
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_name_selector_parent_class)->dispose (object);
}
--
cgit v0.9.0.2

View File

@ -0,0 +1,133 @@
From a84d0269dcd3978232cf5dce77ae4a6d7f6107fd Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 22 Jan 2013 19:44:41 +0000
Subject: Bug #692278 - LDAP backend mutex deadlock on finalize
---
diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c
index 0de07f2..1f346ac 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -214,7 +214,7 @@ struct _EBookBackendLDAPPrivate {
gboolean marked_for_offline;
/* our operations */
- GStaticRecMutex op_hash_mutex;
+ GStaticRecMutex op_hash_mutex; /* lock also eds_ldap_handler_lock before this lock */
GHashTable *id_to_op;
gint active_ops;
guint poll_timeout;
@@ -1147,6 +1147,7 @@ ldap_op_add (LDAPOp *op,
op->handler = handler;
op->dtor = dtor;
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
if (g_hash_table_lookup (bl->priv->id_to_op, &op->id)) {
g_warning ("conflicting ldap msgid's");
@@ -1161,6 +1162,7 @@ ldap_op_add (LDAPOp *op,
LDAP_POLL_INTERVAL,
(GSourceFunc) poll_ldap, bl);
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
static void
@@ -1169,6 +1171,7 @@ ldap_op_finished (LDAPOp *op)
EBookBackend *backend = op->backend;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
g_hash_table_remove (bl->priv->id_to_op, &op->id);
@@ -1176,10 +1179,8 @@ ldap_op_finished (LDAPOp *op)
book_view_notify_status (bl, find_book_view (bl), "");
/* should handle errors here */
- g_static_rec_mutex_lock (&eds_ldap_handler_lock);
if (bl->priv->ldap)
ldap_abandon (bl->priv->ldap, op->id);
- g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
if (op->dtor)
op->dtor (op);
@@ -1193,6 +1194,7 @@ ldap_op_finished (LDAPOp *op)
}
}
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
static void
@@ -1202,6 +1204,7 @@ ldap_op_change_id (LDAPOp *op,
EBookBackend *backend = op->backend;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
g_hash_table_remove (bl->priv->id_to_op, &op->id);
@@ -1209,6 +1212,7 @@ ldap_op_change_id (LDAPOp *op,
g_hash_table_insert (bl->priv->id_to_op, &op->id, op);
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
static GError *
@@ -5226,10 +5230,11 @@ ldap_cancel_op (gpointer key,
LDAPOp *op = value;
/* ignore errors, its only best effort? */
- g_static_rec_mutex_lock (&eds_ldap_handler_lock);
+ /* lock is held by the caller */
+ /* g_static_rec_mutex_lock (&eds_ldap_handler_lock); */
if (bl->priv->ldap)
ldap_abandon (bl->priv->ldap, op->id);
- g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
+ /* g_static_rec_mutex_unlock (&eds_ldap_handler_lock); */
}
static void
@@ -5237,9 +5242,11 @@ ldap_cancel_all_operations (EBookBackend *backend)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
g_hash_table_foreach (bl->priv->id_to_op, ldap_cancel_op, bl);
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
}
static void
@@ -5533,10 +5540,11 @@ call_dtor (gint msgid,
bl = E_BOOK_BACKEND_LDAP (op->backend);
- g_static_rec_mutex_lock (&eds_ldap_handler_lock);
+ /* lock is held by the caller */
+ /* g_static_rec_mutex_lock (&eds_ldap_handler_lock); */
if (bl->priv->ldap)
ldap_abandon (bl->priv->ldap, op->id);
- g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
+ /* g_static_rec_mutex_unlock (&eds_ldap_handler_lock); */
op->dtor (op);
@@ -5550,10 +5558,12 @@ e_book_backend_ldap_finalize (GObject *object)
priv = E_BOOK_BACKEND_LDAP_GET_PRIVATE (object);
+ g_static_rec_mutex_lock (&eds_ldap_handler_lock);
g_static_rec_mutex_lock (&priv->op_hash_mutex);
g_hash_table_foreach_remove (priv->id_to_op, (GHRFunc) call_dtor, NULL);
g_hash_table_destroy (priv->id_to_op);
g_static_rec_mutex_unlock (&priv->op_hash_mutex);
+ g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
g_static_rec_mutex_free (&priv->op_hash_mutex);
/* Remove the timeout before unbinding to avoid a race. */
--
cgit v0.9.0.2

View File

@ -0,0 +1,386 @@
From 9e0e08e201f853239fe02b7e694d3e1eac770e47 Mon Sep 17 00:00:00 2001
From: Michel Dänzer <michel@daenzer.net>
Date: Fri, 08 Feb 2013 11:07:39 +0000
Subject: Bug #683867 - Schedule actions with higher idle priority
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 3c43bed..b956550 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -1151,7 +1151,7 @@ async_report_idle (ECal *ecal,
data->ecal = g_object_ref (ecal);
data->error = error;
- g_idle_add (idle_async_error_reply_cb, data);
+ 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 a262b02..9788c96 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -2782,7 +2782,7 @@ camel_folder_search_free (CamelFolder *folder,
* Marks @folder as deleted and performs any required cleanup.
*
* This also emits the #CamelFolder::deleted signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
+ * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
**/
void
camel_folder_delete (CamelFolder *folder)
@@ -2823,7 +2823,7 @@ camel_folder_delete (CamelFolder *folder)
signal_data->folder = g_object_ref (folder);
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
folder_emit_deleted_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -2836,7 +2836,7 @@ camel_folder_delete (CamelFolder *folder)
* Marks @folder as renamed.
*
* This also emits the #CamelFolder::renamed signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
+ * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
*
* NOTE: This is an internal function used by camel stores, no locking
* is performed on the folder.
@@ -2873,7 +2873,7 @@ camel_folder_rename (CamelFolder *folder,
signal_data->folder_name = old_name; /* transfer ownership */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
folder_emit_renamed_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 75b73f6..2708f16 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6284,7 +6284,7 @@ imapx_server_dispose (GObject *object)
if (server->parser_thread) {
if (server->parser_thread == g_thread_self ())
- g_idle_add (&join_helper, server->parser_thread);
+ g_idle_add_full (G_PRIORITY_HIGH, &join_helper, server->parser_thread, NULL);
else
g_thread_join (server->parser_thread);
server->parser_thread = NULL;
diff --git a/camel/camel-service.c b/camel/camel-service.c
index 316b688..6fed559 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -409,7 +409,7 @@ service_queue_notify_connection_status (CamelService *service)
session = camel_service_get_session (service);
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
service_notify_connection_status_cb,
g_object_ref (service),
(GDestroyNotify) g_object_unref);
diff --git a/camel/camel-session.c b/camel/camel-session.c
index abcf34f..ba65eb8 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -53,7 +53,7 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), CAMEL_TYPE_SESSION, CamelSessionPrivate))
-#define JOB_PRIORITY G_PRIORITY_LOW
+#define JOB_PRIORITY G_PRIORITY_DEFAULT
#define d(x)
diff --git a/camel/camel-store.c b/camel/camel-store.c
index b74126f..e80a304 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -1268,7 +1268,7 @@ camel_store_error_quark (void)
* @folder_info: information about the created folder
*
* Emits the #CamelStore::folder-created signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
+ * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
*
* This function is only intended for Camel providers.
*
@@ -1291,7 +1291,7 @@ camel_store_folder_created (CamelStore *store,
signal_data->folder_info = camel_folder_info_clone (folder_info);
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
store_emit_folder_created_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -1302,7 +1302,7 @@ camel_store_folder_created (CamelStore *store,
* @folder_info: information about the deleted folder
*
* Emits the #CamelStore::folder-deleted signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
+ * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
*
* This function is only intended for Camel providers.
*
@@ -1325,7 +1325,7 @@ camel_store_folder_deleted (CamelStore *store,
signal_data->folder_info = camel_folder_info_clone (folder_info);
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
store_emit_folder_deleted_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -1336,7 +1336,7 @@ camel_store_folder_deleted (CamelStore *store,
* @folder: the #CamelFolder that was opened
*
* Emits the #CamelStore::folder-opened signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
+ * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
*
* This function is only intended for Camel providers.
*
@@ -1359,7 +1359,7 @@ camel_store_folder_opened (CamelStore *store,
signal_data->folder = g_object_ref (folder);
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
store_emit_folder_opened_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -1371,7 +1371,7 @@ camel_store_folder_opened (CamelStore *store,
* @folder_info: information about the renamed folder
*
* Emits the #CamelStore::folder-renamed signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
+ * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
*
* This function is only intended for Camel providers.
*
@@ -1397,7 +1397,7 @@ camel_store_folder_renamed (CamelStore *store,
signal_data->folder_name = g_strdup (old_name);
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
store_emit_folder_renamed_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
diff --git a/camel/camel-subscribable.c b/camel/camel-subscribable.c
index ceb18d0..b73395e 100644
--- a/camel/camel-subscribable.c
+++ b/camel/camel-subscribable.c
@@ -611,7 +611,7 @@ camel_subscribable_unsubscribe_folder_finish (CamelSubscribable *subscribable,
* @folder_info: information about the subscribed folder
*
* Emits the #CamelSubscribable::folder-subscribed signal from an idle source
- * on the main loop. The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
+ * on the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
*
* This function is only intended for Camel providers.
*
@@ -636,7 +636,7 @@ camel_subscribable_folder_subscribed (CamelSubscribable *subscribable,
signal_data->folder_info = camel_folder_info_clone (folder_info);
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
subscribable_emit_folder_subscribed_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -647,7 +647,7 @@ camel_subscribable_folder_subscribed (CamelSubscribable *subscribable,
* @folder_info: information about the unsubscribed folder
*
* Emits the #CamelSubscribable::folder-unsubscribed signal from an idle source
- * on the main loop. The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
+ * on the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
*
* This function is only intended for Camel providers.
*
@@ -672,7 +672,7 @@ camel_subscribable_folder_unsubscribed (CamelSubscribable *subscribable,
signal_data->folder_info = camel_folder_info_clone (folder_info);
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT_IDLE,
+ session, G_PRIORITY_DEFAULT,
subscribable_emit_folder_unsubscribed_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
diff --git a/libedataserver/e-gdbus-templates.c b/libedataserver/e-gdbus-templates.c
index ef3e476..5d99703 100644
--- a/libedataserver/e-gdbus-templates.c
+++ b/libedataserver/e-gdbus-templates.c
@@ -1015,7 +1015,7 @@ e_gdbus_op_cancelled_cb (GCancellable *cancellable,
/* do this on idle, because this callback should be left
* as soon as possible, with no sync calls being done */
- op_data->cancel_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, e_gdbus_op_cancelled_idle_cb, cd, cancel_data_free);
+ op_data->cancel_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT, e_gdbus_op_cancelled_idle_cb, cd, cancel_data_free);
}
static void
--
cgit v0.9.0.2
From 03fcc5f17581b6b1b50a11bd46cc46ddb4289391 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Fri, 08 Feb 2013 16:34:48 +0000
Subject: Add comments around g_idle_add() changes
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index b956550..c54011a 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -1151,6 +1151,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 9788c96..8c2a31c 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -2822,6 +2822,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,
@@ -2872,6 +2874,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 2708f16..1d16189 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6284,6 +6284,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 6fed559..e23cb31 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 ba65eb8..48c39fb 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 e80a304..7015fd2 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -1290,6 +1290,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,
@@ -1324,6 +1326,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,
@@ -1358,6 +1362,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,
@@ -1396,6 +1402,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);
}
--
cgit v0.9.0.2

View File

@ -0,0 +1,122 @@
From 71257132e4673566a26d8a0f9cb2e066367444bb Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Fri, 01 Feb 2013 12:42:14 +0000
Subject: store_synchronize_sync() cleanups.
(cherry picked from commit ad1b7cd145c5fa5443556c17ba6e9d701c531bb7)
---
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 593b426..e5a1863 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -343,9 +343,8 @@ store_synchronize_sync (CamelStore *store,
GError **error)
{
GPtrArray *folders;
- CamelFolder *folder;
gboolean success = TRUE;
- gint i;
+ gint ii;
GError *local_error = NULL;
if (expunge) {
@@ -353,27 +352,32 @@ store_synchronize_sync (CamelStore *store,
CamelFolderInfo *root, *fi;
folders = g_ptr_array_new ();
- root = camel_store_get_folder_info_sync (store, NULL, CAMEL_STORE_FOLDER_INFO_RECURSIVE | CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL, NULL, NULL);
+ root = camel_store_get_folder_info_sync (
+ store, NULL,
+ CAMEL_STORE_FOLDER_INFO_RECURSIVE |
+ CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL,
+ NULL, NULL);
fi = root;
- while (fi) {
+ while (fi != NULL) {
CamelFolderInfo *next;
if ((fi->flags & CAMEL_FOLDER_NOSELECT) == 0) {
- CamelFolder *fldr;
+ CamelFolder *folder;
- fldr = camel_store_get_folder_sync (store, fi->full_name, 0, NULL, NULL);
- if (fldr)
- g_ptr_array_add (folders, fldr);
+ folder = camel_store_get_folder_sync (
+ store, fi->full_name, 0, NULL, NULL);
+ if (folder != NULL)
+ g_ptr_array_add (folders, folder);
}
/* pick the next */
next = fi->child;
- if (!next)
+ if (next == NULL)
next = fi->next;
- if (!next) {
+ if (next == NULL) {
next = fi->parent;
- while (next) {
- if (next->next) {
+ while (next != NULL) {
+ if (next->next != NULL) {
next = next->next;
break;
}
@@ -385,7 +389,7 @@ store_synchronize_sync (CamelStore *store,
fi = next;
}
- if (root)
+ if (root != NULL)
camel_store_free_folder_info_full (store, root);
} else {
/* sync only folders opened until now */
@@ -395,10 +399,10 @@ store_synchronize_sync (CamelStore *store,
/* We don't sync any vFolders, that is used to update certain
* vfolder queries mainly, and we're really only interested in
* storing/expunging the physical mails. */
- for (i = 0; i < folders->len; i++) {
- folder = folders->pdata[i];
- if (!CAMEL_IS_VEE_FOLDER (folder)
- && local_error == NULL) {
+ for (ii = 0; ii < folders->len; ii++) {
+ CamelFolder *folder = folders->pdata[ii];
+
+ if (!CAMEL_IS_VEE_FOLDER (folder) && local_error == NULL) {
camel_folder_synchronize_sync (
folder, expunge, cancellable, &local_error);
ignore_no_such_table_exception (&local_error);
--
cgit v0.9.0.2
From 3e7b237a6242a724830a412b95bbf8a80eb65d99 Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Fri, 01 Feb 2013 12:45:56 +0000
Subject: store_synchronize_sync(): Only sync subscribed folders.
I recently added a Gmane (NNTP) account and have only a few newsgroup
subscriptions. Yet when I quit Evolution, Camel tries to synchronize
all 13,872 newsgroups which literally takes days to complete.
This adds a CAMEL_STORE_FOLDER_INFO_SUBSCRIBED flag to the request for
a folder info tree while synchronizing + expunging.
Note, CamelIMAPXStore will ignore the CAMEL_STORE_FOLDER_INFO_SUBSCRIBED
flag if its "use-subscriptions" setting is FALSE, which is what we want.
(cherry picked from commit 48b9d17d16be9f0ecb6066036cc83d08b3cca817)
---
diff --git a/camel/camel-store.c b/camel/camel-store.c
index e5a1863..b74126f 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -355,6 +355,7 @@ store_synchronize_sync (CamelStore *store,
root = camel_store_get_folder_info_sync (
store, NULL,
CAMEL_STORE_FOLDER_INFO_RECURSIVE |
+ CAMEL_STORE_FOLDER_INFO_SUBSCRIBED |
CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL,
NULL, NULL);
fi = root;
--
cgit v0.9.0.2

View File

@ -0,0 +1,268 @@
From 147c817dd31ddee0ee097aa58ac3489c4d918f64 Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Fri, 08 Feb 2013 19:08:00 +0000
Subject: 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.
(cherry picked from commit 820dcf6cfc43265c6376f15d983381c3087a5d20)
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index c54011a..fcb8e9e 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -1151,8 +1151,10 @@ 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);
+ /* Prioritize ahead of GTK+ redraws. */
+ g_idle_add_full (
+ G_PRIORITY_HIGH_IDLE,
+ idle_async_error_reply_cb, data, NULL);
}
/**
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 8c2a31c..677f147 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -2782,7 +2782,7 @@ camel_folder_search_free (CamelFolder *folder,
* Marks @folder as deleted and performs any required cleanup.
*
* This also emits the #CamelFolder::deleted signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop. The idle source's priority is #G_PRIORITY_HIGH_IDLE.
**/
void
camel_folder_delete (CamelFolder *folder)
@@ -2822,10 +2822,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
folder_emit_deleted_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -2838,7 +2837,7 @@ camel_folder_delete (CamelFolder *folder)
* Marks @folder as renamed.
*
* This also emits the #CamelFolder::renamed signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop. The idle source's priority is #G_PRIORITY_HIGH_IDLE.
*
* NOTE: This is an internal function used by camel stores, no locking
* is performed on the folder.
@@ -2874,10 +2873,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
folder_emit_renamed_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 1d16189..b522df1 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6284,8 +6284,10 @@ 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);
+ /* Prioritize ahead of GTK+ redraws. */
+ g_idle_add_full (
+ G_PRIORITY_HIGH_IDLE,
+ &join_helper, server->parser_thread, NULL);
else
g_thread_join (server->parser_thread);
server->parser_thread = NULL;
diff --git a/camel/camel-service.c b/camel/camel-service.c
index e23cb31..1fa28dd 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -408,10 +408,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
service_notify_connection_status_cb,
g_object_ref (service),
(GDestroyNotify) g_object_unref);
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 48c39fb..7feaeb5 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -53,9 +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
+/* Prioritize ahead of GTK+ redraws. */
+#define JOB_PRIORITY G_PRIORITY_HIGH_IDLE
#define d(x)
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 7015fd2..e03ed2c 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -1268,7 +1268,7 @@ camel_store_error_quark (void)
* @folder_info: information about the created folder
*
* Emits the #CamelStore::folder-created signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop. The idle source's priority is #G_PRIORITY_HIGH_IDLE.
*
* This function is only intended for Camel providers.
*
@@ -1290,10 +1290,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
store_emit_folder_created_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -1304,7 +1303,7 @@ camel_store_folder_created (CamelStore *store,
* @folder_info: information about the deleted folder
*
* Emits the #CamelStore::folder-deleted signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop. The idle source's priority is #G_PRIORITY_HIGH_IDLE.
*
* This function is only intended for Camel providers.
*
@@ -1326,10 +1325,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
store_emit_folder_deleted_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -1340,7 +1338,7 @@ camel_store_folder_deleted (CamelStore *store,
* @folder: the #CamelFolder that was opened
*
* Emits the #CamelStore::folder-opened signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop. The idle source's priority is #G_PRIORITY_HIGH_IDLE.
*
* This function is only intended for Camel providers.
*
@@ -1362,10 +1360,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
store_emit_folder_opened_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -1377,7 +1374,7 @@ camel_store_folder_opened (CamelStore *store,
* @folder_info: information about the renamed folder
*
* Emits the #CamelStore::folder-renamed signal from an idle source on
- * the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop. The idle source's priority is #G_PRIORITY_HIGH_IDLE.
*
* This function is only intended for Camel providers.
*
@@ -1402,10 +1399,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
store_emit_folder_renamed_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
diff --git a/camel/camel-subscribable.c b/camel/camel-subscribable.c
index 470a4e0..ef14132 100644
--- a/camel/camel-subscribable.c
+++ b/camel/camel-subscribable.c
@@ -611,7 +611,7 @@ camel_subscribable_unsubscribe_folder_finish (CamelSubscribable *subscribable,
* @folder_info: information about the subscribed folder
*
* Emits the #CamelSubscribable::folder-subscribed signal from an idle source
- * on the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
+ * on the main loop. The idle source's priority is #G_PRIORITY_HIGH_IDLE.
*
* This function is only intended for Camel providers.
*
@@ -635,10 +635,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
subscribable_emit_folder_subscribed_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
@@ -649,7 +648,7 @@ camel_subscribable_folder_subscribed (CamelSubscribable *subscribable,
* @folder_info: information about the unsubscribed folder
*
* Emits the #CamelSubscribable::folder-unsubscribed signal from an idle source
- * on the main loop. The idle source's priority is #G_PRIORITY_DEFAULT.
+ * on the main loop. The idle source's priority is #G_PRIORITY_HIGH_IDLE.
*
* This function is only intended for Camel providers.
*
@@ -673,10 +672,9 @@ 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 */
+ /* Prioritize ahead of GTK+ redraws. */
camel_session_idle_add (
- session, G_PRIORITY_DEFAULT,
+ session, G_PRIORITY_HIGH_IDLE,
subscribable_emit_folder_unsubscribed_cb,
signal_data, (GDestroyNotify) signal_data_free);
}
--
cgit v0.9.0.2

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Fri Feb 15 12:41:30 UTC 2013 - dimstar@opensuse.org
- Add evolution-data-server requires to libedataserver-1_2
subpackage: the library references uses the glib schemas, which
live in the main package. Fixes issues similar to bnc#803959.
-------------------------------------------------------------------
Sat Feb 9 15:25:22 UTC 2013 - badshah400@gmail.com
- Add patches from upstream stable branch:
+ e-d-s-ldap-mutex-deadlock-fix.patch (bgo#692278)
+ e-d-s-address-crash-on-cancel.patch: fix invalid memory access
during situations while cancelling some synchronous operations.
+ e-d-s-fix-slow-composer-open.patch: fix slowness of composer
window when launched due to some leaks (bgo#689476).
+ e-d-s-store_synchronize_sync.patch: some cleanups in
store_synchronize_sync().
+ e-d-s-schedule-higher-idle-priority-actions.patch: schedule
actions with higher idle priority (bgo#683867).
+ e-d-s-use-G_PRIORITY_HIGH_IDLE.patch: make use of
G_PRIORITY_HIGH_IDLE to beat gtk+ redraws.
-------------------------------------------------------------------
Tue Jan 22 16:21:11 UTC 2013 - dimstar@opensuse.org

View File

@ -40,6 +40,18 @@ Group: Development/Libraries/GNOME
Url: http://www.gnome.org
Source0: http://download.gnome.org/sources/evolution-data-server/3.6/%{name}-%{version}.tar.xz
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM e-d-s-ldap-mutex-deadlock-fix.patch bgo#692278 badshah400@gmail.com -- Fix LDAP backend mutex deadlock on finalize; patch taken from upstream git
Patch0: e-d-s-ldap-mutex-deadlock-fix.patch
# PATCH-FIX-UPSTREAM e-d-s-address-crash-on-cancel.patch badshah400@gmail.com -- Fix invalid memory access during situations while cancelling some synchronous operations; patch taken from upstream git
Patch1: e-d-s-address-crash-on-cancel.patch
# PATCH-FIX-UPSTREAM e-d-s-fix-slow-composer-open.patch bgo#689476 badshah400@gmail.com -- Fix composer opening slowly because of leaks; patch taken from upstream git
Patch2: e-d-s-fix-slow-composer-open.patch
# PATCH-FIX-UPSTREAM e-d-s-store_synchronize_sync.patch badshah400@gmail.com -- Cleanups in store_synchronize_sync(); patch taken from upstream git
Patch3: e-d-s-store_synchronize_sync.patch
# PATCH-FIX-UPSTREAM e-d-s-schedule-higher-idle-priority-actions.patch bgo#683867 badshah400@gmail.com -- Schedule actions with higher idle priority; patch taken from upstream git
Patch4: e-d-s-schedule-higher-idle-priority-actions.patch
# PATCH-FIX-UPSTREAM e-d-s-use-G_PRIORITY_HIGH_IDLE.patch badshah400@gmail.com -- Use G_PRIORITY_HIGH_IDLE to beat gtk+ redraws; patch taken from upstream git
Patch5: e-d-s-use-G_PRIORITY_HIGH_IDLE.patch
BuildRequires: db-devel
%if %USE_EVOLDAP
BuildRequires: evoldap2-devel
@ -181,6 +193,8 @@ This package contains a shared system library for calendar backends.
%package -n libedataserver-1_2-%{so_edataserver}
Summary: Evolution Data Server - Utilities Library
Group: System/Libraries
# libedataserver references the gsettings schemas, which live in e-d-s package
Requires: %{name} >= %{version}
%description -n libedataserver-1_2-%{so_edataserver}
Evolution Data Server provides a central location for your address book
@ -255,6 +269,12 @@ This package contains developer documentation.
%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
translation-update-upstream
%build