aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-16 17:10:19 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-16 17:10:19 +0800
commit25c022091cf9527a80db041e554e8ec35b131bf2 (patch)
treef64b2aafa4a6ff4fc8d1ab01437de87d2f3d1416
parentcf41b427508a00295ebbac0d05fbc744f44f8c6a (diff)
downloadgsoc2013-empathy-25c022091cf9527a80db041e554e8ec35b131bf2.tar
gsoc2013-empathy-25c022091cf9527a80db041e554e8ec35b131bf2.tar.gz
gsoc2013-empathy-25c022091cf9527a80db041e554e8ec35b131bf2.tar.bz2
gsoc2013-empathy-25c022091cf9527a80db041e554e8ec35b131bf2.tar.lz
gsoc2013-empathy-25c022091cf9527a80db041e554e8ec35b131bf2.tar.xz
gsoc2013-empathy-25c022091cf9527a80db041e554e8ec35b131bf2.tar.zst
gsoc2013-empathy-25c022091cf9527a80db041e554e8ec35b131bf2.zip
preferences: use the factory to create the TpAccount
tp_account_new() has been deprecated.
-rw-r--r--src/empathy-preferences.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index 0c9968631..99d920fcd 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -33,6 +33,7 @@
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/util.h>
+#include <libempathy/empathy-client-factory.h>
#include <libempathy/empathy-gsettings.h>
#include <libempathy/empathy-utils.h>
@@ -607,7 +608,7 @@ preferences_preview_theme_changed_cb (EmpathyThemeManager *manager,
EmpathyPreferences *preferences)
{
EmpathyPreferencesPriv *priv = GET_PRIV (preferences);
- TpDBusDaemon *dbus;
+ EmpathyClientFactory *factory;
TpAccount *account;
EmpathyContact *juliet;
EmpathyContact *romeo;
@@ -625,9 +626,11 @@ preferences_preview_theme_changed_cb (EmpathyThemeManager *manager,
/* FIXME: It is ugly to add a fake conversation like that.
* Would be cool if we could request a TplLogManager for a fake
* conversation */
- dbus = tp_dbus_daemon_dup (NULL);
- account = tp_account_new (dbus,
- TP_ACCOUNT_OBJECT_PATH_BASE "cm/jabber/account", NULL);
+ factory = empathy_client_factory_dup ();
+
+ account = tp_simple_client_factory_ensure_account (
+ TP_SIMPLE_CLIENT_FACTORY (factory),
+ TP_ACCOUNT_OBJECT_PATH_BASE "cm/jabber/account", NULL, NULL);
juliet = g_object_new (EMPATHY_TYPE_CONTACT,
"account", account,
"id", "juliet",
@@ -666,7 +669,7 @@ preferences_preview_theme_changed_cb (EmpathyThemeManager *manager,
g_object_unref (juliet);
g_object_unref (romeo);
g_object_unref (account);
- g_object_unref (dbus);
+ g_object_unref (factory);
}
static void