aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-30 01:15:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-30 01:15:28 +0800
commitf5dda1db35cab0589ebfe37f71d96eedf4b16901 (patch)
treefe9538fb0628b89d586523e42fbefa9ab36ea890 /e-util
parent9232ac29b40f8a317afd9cb68f7d68dd7aac8950 (diff)
downloadgsoc2013-evolution-f5dda1db35cab0589ebfe37f71d96eedf4b16901.tar
gsoc2013-evolution-f5dda1db35cab0589ebfe37f71d96eedf4b16901.tar.gz
gsoc2013-evolution-f5dda1db35cab0589ebfe37f71d96eedf4b16901.tar.bz2
gsoc2013-evolution-f5dda1db35cab0589ebfe37f71d96eedf4b16901.tar.lz
gsoc2013-evolution-f5dda1db35cab0589ebfe37f71d96eedf4b16901.tar.xz
gsoc2013-evolution-f5dda1db35cab0589ebfe37f71d96eedf4b16901.tar.zst
gsoc2013-evolution-f5dda1db35cab0589ebfe37f71d96eedf4b16901.zip
Fix build break. My bad.
Keep forgetting 3.8 doesn't have e_weak_ref_new() / e_weak_ref_free().
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-client-cache.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/e-util/e-client-cache.c b/e-util/e-client-cache.c
index 94530951e0..c69f98c9ce 100644
--- a/e-util/e-client-cache.c
+++ b/e-util/e-client-cache.c
@@ -100,6 +100,28 @@ enum {
static guint signals[LAST_SIGNAL];
+/* Based on e_weak_ref_new() (new in libedataserver 3.9) */
+static GWeakRef *
+client_cache_weak_ref_new (EClientCache *client_cache)
+{
+ GWeakRef *weak_ref;
+
+ weak_ref = g_slice_new0 (GWeakRef);
+ g_weak_ref_set (weak_ref, client_cache);
+
+ return weak_ref;
+}
+
+/* Based on e_weak_ref_free() (new in libedataserver 3.9) */
+static void
+client_cache_weak_ref_free (GWeakRef *weak_ref)
+{
+ g_return_if_fail (weak_ref != NULL);
+
+ g_weak_ref_set (weak_ref, NULL);
+ g_slice_free (GWeakRef, weak_ref);
+}
+
static ClientData *
client_data_new (EClientCache *client_cache)
{
@@ -793,15 +815,15 @@ client_cache_constructed (GObject *object)
handler_id = g_signal_connect_data (
registry, "source-removed",
G_CALLBACK (client_cache_source_removed_cb),
- e_weak_ref_new (client_cache),
- (GClosureNotify) e_weak_ref_free, 0);
+ client_cache_weak_ref_new (client_cache),
+ (GClosureNotify) client_cache_weak_ref_free, 0);
client_cache->priv->source_removed_handler_id = handler_id;
handler_id = g_signal_connect_data (
registry, "source-disabled",
G_CALLBACK (client_cache_source_disabled_cb),
- e_weak_ref_new (client_cache),
- (GClosureNotify) e_weak_ref_free, 0);
+ client_cache_weak_ref_new (client_cache),
+ (GClosureNotify) client_cache_weak_ref_free, 0);
client_cache->priv->source_disabled_handler_id = handler_id;
g_object_unref (registry);