diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-08-24 19:13:07 +0800 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-08-27 21:47:21 +0800 |
commit | c3933b7972672e533c33cf9f401a1dea83ba1368 (patch) | |
tree | 80957d6c8a7244c33d7fdc50bbc6e3a5e8f3b60e /libempathy/empathy-uoa-auth-handler.c | |
parent | 1b787a9f326fa5d4224f1a0fe7be56f455b2eedd (diff) | |
download | gsoc2013-empathy-c3933b7972672e533c33cf9f401a1dea83ba1368.tar gsoc2013-empathy-c3933b7972672e533c33cf9f401a1dea83ba1368.tar.gz gsoc2013-empathy-c3933b7972672e533c33cf9f401a1dea83ba1368.tar.bz2 gsoc2013-empathy-c3933b7972672e533c33cf9f401a1dea83ba1368.tar.lz gsoc2013-empathy-c3933b7972672e533c33cf9f401a1dea83ba1368.tar.xz gsoc2013-empathy-c3933b7972672e533c33cf9f401a1dea83ba1368.tar.zst gsoc2013-empathy-c3933b7972672e533c33cf9f401a1dea83ba1368.zip |
UOA: Use an AgManager singleton
This is especially useful in empathy-keyring where it would reload
all accounts each time we set a password.
https://bugzilla.gnome.org/show_bug.cgi?id=680776
Diffstat (limited to 'libempathy/empathy-uoa-auth-handler.c')
-rw-r--r-- | libempathy/empathy-uoa-auth-handler.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libempathy/empathy-uoa-auth-handler.c b/libempathy/empathy-uoa-auth-handler.c index d1b046512..9b1eade10 100644 --- a/libempathy/empathy-uoa-auth-handler.c +++ b/libempathy/empathy-uoa-auth-handler.c @@ -33,10 +33,9 @@ #include "empathy-debug.h" #include "empathy-utils.h" #include "empathy-uoa-auth-handler.h" +#include "empathy-uoa-utils.h" #include "empathy-sasl-mechanisms.h" -#define SERVICE_TYPE "IM" - struct _EmpathyUoaAuthHandlerPriv { AgManager *manager; @@ -50,7 +49,7 @@ empathy_uoa_auth_handler_init (EmpathyUoaAuthHandler *self) self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, EMPATHY_TYPE_UOA_AUTH_HANDLER, EmpathyUoaAuthHandlerPriv); - self->priv->manager = ag_manager_new_for_service_type (SERVICE_TYPE); + self->priv->manager = empathy_uoa_manager_dup (); } static void @@ -259,7 +258,7 @@ empathy_uoa_auth_handler_start (EmpathyUoaAuthHandler *self, account = ag_manager_get_account (self->priv->manager, id); if (account != NULL) - l = ag_account_list_services_by_type (account, SERVICE_TYPE); + l = ag_account_list_services_by_type (account, EMPATHY_UOA_SERVICE_TYPE); if (l == NULL) { DEBUG ("Couldn't find IM service for AgAccountId %u", id); |