[evolution-data-server/openismus-work-3-8] 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-3-8] Changes for Review: EBookClientCursor changes.
- Date: Sat, 5 Oct 2013 00:08:05 +0000 (UTC)
commit 1098615cdc94053e86103486ae6b0091aa66cc64
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 a19bdbc..a6f0f08 100644
--- a/addressbook/libebook/e-book-client-cursor.c
+++ b/addressbook/libebook/e-book-client-cursor.c
@@ -883,9 +883,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 */
@@ -919,6 +916,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
@@ -1018,6 +1018,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);
@@ -1027,6 +1029,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]