[evolution-data-server/openismus-work-master: 90/137] Changes for Review: EBookClientCursor changes.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-master: 90/137] Changes for Review: EBookClientCursor changes.
- Date: Mon, 21 Oct 2013 22:54:07 +0000 (UTC)
commit 548a2758dc8d1167a768327c8a3fb26158cff28e
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Sat Oct 5 02:03:42 2013 +0200
Changes for Review: EBookClientCursor changes.
Various changes here, adaptation for other API changes, other
minor fixes related to review comments in bug 705178.
addressbook/libebook/e-book-client-cursor.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/libebook/e-book-client-cursor.c b/addressbook/libebook/e-book-client-cursor.c
index 2d12b5d..da4150c 100644
--- a/addressbook/libebook/e-book-client-cursor.c
+++ b/addressbook/libebook/e-book-client-cursor.c
@@ -871,9 +871,6 @@ book_client_cursor_set_client (EBookClientCursor *cursor,
g_signal_handler_disconnect (current_client, priv->locale_changed_id);
priv->revision_changed_id = 0;
priv->locale_changed_id = 0;
-
- /* e_book_client_cursor_ref_client() gave us a ref */
- g_object_unref (current_client);
}
/* Set the new client */
@@ -907,6 +904,9 @@ book_client_cursor_set_client (EBookClientCursor *cursor,
g_free (revision);
}
}
+
+ /* e_book_client_cursor_ref_client() gave us a ref */
+ g_clear_object (¤t_client);
}
static void
@@ -1006,6 +1006,8 @@ book_client_cursor_set_context (EBookClientCursor *cursor,
{
EBookClientCursorPrivate *priv = cursor->priv;
+ g_mutex_lock (&cursor->priv->main_context_lock);
+
if (priv->main_context != context) {
if (priv->main_context)
g_main_context_unref (priv->main_context);
@@ -1015,6 +1017,8 @@ book_client_cursor_set_context (EBookClientCursor *cursor,
if (priv->main_context)
g_main_context_ref (priv->main_context);
}
+
+ g_mutex_unlock (&cursor->priv->main_context_lock);
}
static GMainContext *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]