summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-04 16:33:40 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-08 20:11:00 +0100
commit8a432b3e4f07eaa0599ef86b2cd81e3cf26be628 (patch)
treebe8b90cf9e5b1aeebd35d578b4b0f785f265adcf
parentbcae7d99f54e372826f3c074ef4a6740bd86f04a (diff)
downloadtelepathy-mission-control-8a432b3e4f07eaa0599ef86b2cd81e3cf26be628.tar.gz
Adapt for removal of tp_connection_manager_param_get_default
This is far from the best possible implementation, but it unblocks us. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77139
-rw-r--r--src/mcd-account.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 8033e349..f4c51b42 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -2399,6 +2399,23 @@ set_parameter_changed (GHashTable *dbus_properties,
}
}
+/* A reimplementation of the old tp_connection_manager_param_get_default(),
+ * because one day we should switch McdAccount to use GVariant throughout,
+ * but this is not that day */
+static gboolean
+param_get_default (const TpConnectionManagerParam *param,
+ GValue *value)
+{
+ GVariant *variant = tp_connection_manager_param_dup_default_variant (param);
+
+ if (variant == NULL)
+ return FALSE;
+
+ dbus_g_value_parse_g_variant (variant, value);
+ g_variant_unref (variant);
+ return TRUE;
+}
+
static gboolean
check_one_parameter_update (McdAccount *account,
TpProtocol *protocol,
@@ -2446,7 +2463,7 @@ check_one_parameter_update (McdAccount *account,
*/
if (mcd_account_get_parameter (account, param,
&current_value, NULL) ||
- tp_connection_manager_param_get_default (param, &current_value))
+ param_get_default (param, &current_value))
{
if (!value_is_same (&current_value, new_value))
set_parameter_changed (dbus_properties, not_yet, param,
@@ -2495,7 +2512,7 @@ check_one_parameter_unset (McdAccount *account,
*/
GValue default_value = G_VALUE_INIT;
- if (tp_connection_manager_param_get_default (param, &default_value))
+ if (param_get_default (param, &default_value))
{
if (!value_is_same (&current_value, &default_value))
set_parameter_changed (dbus_properties, not_yet, param,