diff options
author | Alberto Mardegan <alberto.mardegan@canonical.com> | 2013-01-10 19:20:12 +0800 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2013-01-11 20:17:21 +0800 |
commit | 02db084adde59fc94129ebd7ea5c2c24fad7c07a (patch) | |
tree | d750e5f0653a1e44093237e95b1780739acc6cf3 /ubuntu-online-accounts/cc-plugins | |
parent | cfef33e79d3d01b5a407381267bd5f481ceca340 (diff) | |
download | gsoc2013-empathy-02db084adde59fc94129ebd7ea5c2c24fad7c07a.tar gsoc2013-empathy-02db084adde59fc94129ebd7ea5c2c24fad7c07a.tar.gz gsoc2013-empathy-02db084adde59fc94129ebd7ea5c2c24fad7c07a.tar.bz2 gsoc2013-empathy-02db084adde59fc94129ebd7ea5c2c24fad7c07a.tar.lz gsoc2013-empathy-02db084adde59fc94129ebd7ea5c2c24fad7c07a.tar.xz gsoc2013-empathy-02db084adde59fc94129ebd7ea5c2c24fad7c07a.tar.zst gsoc2013-empathy-02db084adde59fc94129ebd7ea5c2c24fad7c07a.zip |
UOA: Use the new libaccounts-glib APIs
The APIs based on GValue are now deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=691469
Diffstat (limited to 'ubuntu-online-accounts/cc-plugins')
-rw-r--r-- | ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c | 22 |
1 files changed, 10 insertions, 12 deletions
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 34729960c..28b4716ab 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); |