[next] telepathy-idle: Adapt for GVariant-based tp_group_mixin_change_members
Simon McVittie
smcv at kemper.freedesktop.org
Thu Apr 10 05:50:00 PDT 2014
Module: telepathy-idle
Branch: next
Commit: db272591994a1c19c109b072ce203771f5e6ac5c
URL: http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=db272591994a1c19c109b072ce203771f5e6ac5c
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed Apr 9 19:18:28 2014 +0100
Adapt for GVariant-based tp_group_mixin_change_members
This means we need GLib 2.40 for GVariantDict. Enable GLib 2.28
deprecations, but not 2.30 because we still use GValueArray.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77190
---
configure.ac | 6 +++---
src/idle-muc-channel.c | 20 +++++++++++---------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/configure.ac b/configure.ac
index b378afb..1c79d50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,11 +86,11 @@ fi
AC_HEADER_STDC([])
AC_C_INLINE
-AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_28, [Ignore post 2.28 deprecations])
-AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_34, [Prevent post 2.34 APIs])
+AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_30, [Ignore post 2.30 deprecations])
+AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_40, [Prevent post 2.40 APIs])
PKG_CHECK_MODULES([GLIB],
- [glib-2.0 >= 2.34.0, gobject-2.0 >= 2.34.0, gio-2.0 >= 2.34.0 ])
+ [glib-2.0 >= 2.40, gobject-2.0 >= 2.40, gio-2.0 >= 2.40 ])
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.51, dbus-glib-1 >= 0.51])
diff --git a/src/idle-muc-channel.c b/src/idle-muc-channel.c
index 4fc2091..7ee6313 100644
--- a/src/idle-muc-channel.c
+++ b/src/idle-muc-channel.c
@@ -196,20 +196,22 @@ change_members (GObject *obj,
TpHandle actor,
TpChannelGroupChangeReason reason)
{
- GHashTable *details;
+ GVariantDict details;
- details = tp_asv_new (
- "actor", G_TYPE_UINT, actor,
- "change-reason", G_TYPE_UINT, reason,
- NULL);
+ g_variant_dict_init (&details, NULL);
+
+ g_variant_dict_insert_value (&details, "actor",
+ g_variant_new_uint32 (actor));
+ g_variant_dict_insert_value (&details, "change-reason",
+ g_variant_new_uint32 (reason));
if (message != NULL)
- tp_asv_set_string (details, "message", message);
+ g_variant_dict_insert_value (&details, "message",
+ g_variant_new_string (message));
tp_group_mixin_change_members (obj,
- add, del, add_local_pending, add_remote_pending, details);
-
- g_hash_table_unref (details);
+ add, del, add_local_pending, add_remote_pending,
+ g_variant_dict_end (&details));
}
static void
More information about the telepathy-commits
mailing list