X-Git-Url: https://git.0d.be/?p=empathy.git;a=blobdiff_plain;f=ubuntu-online-accounts%2Fcc-plugins%2Faccount-plugins%2Fempathy-accounts-plugin-widget.c;h=28b4716ab76a9bf7a28f01b3687e31b1d5686efb;hp=34729960c52a464f55a463f28d20447305f324d7;hb=02db084adde59fc94129ebd7ea5c2c24fad7c07a;hpb=cfef33e79d3d01b5a407381267bd5f481ceca340 diff --git a/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c b/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c index 34729960..28b4716a 100644 --- a/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c +++ b/ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c @@ -102,7 +102,7 @@ create_account_settings (AgAccount *account) AgService *service; GList *services; AgAccountService *account_service; - GValue v = G_VALUE_INIT; + GVariant *v; gchar *manager = NULL, *protocol = NULL; EmpathyAccountSettings *settings; @@ -114,17 +114,15 @@ create_account_settings (AgAccount *account) account_service = ag_account_service_new (account, service); - g_value_init (&v, G_TYPE_STRING); - if (ag_account_service_get_value (account_service, - "telepathy/manager", &v) != AG_SETTING_SOURCE_NONE) - manager = g_value_dup_string (&v); - g_value_unset (&v); - - g_value_init (&v, G_TYPE_STRING); - if (ag_account_service_get_value (account_service, - "telepathy/protocol", &v) != AG_SETTING_SOURCE_NONE) - protocol = g_value_dup_string (&v); - g_value_unset (&v); + v = ag_account_service_get_variant (account_service, + "telepathy/manager", NULL); + if (v != NULL) + manager = g_variant_dup_string (v, NULL); + + v = ag_account_service_get_variant (account_service, + "telepathy/protocol", NULL); + if (v != NULL) + protocol = g_variant_dup_string (v, NULL); g_return_val_if_fail (manager != NULL, NULL); g_return_val_if_fail (protocol != NULL, NULL);