X-Git-Url: https://git.0d.be/?p=empathy.git;a=blobdiff_plain;f=src%2Fempathy-preferences.c;h=6901aa9c8b88e366ed27b78d925306df0a6dbec8;hp=0c996863192f591a79d0c8ea1a0b941c955bea50;hb=f2d81bc778ae11d5518d9b054ce230fc90d37c82;hpb=87f41f93a0c79b428e0eff6f9f843fce005b82ae diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c index 0c996863..6901aa9c 100644 --- a/src/empathy-preferences.c +++ b/src/empathy-preferences.c @@ -23,29 +23,20 @@ * Danielle Madeley */ -#include - -#include -#include +#include "config.h" +#include "empathy-preferences.h" -#include #include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "empathy-preferences.h" +#include "empathy-client-factory.h" +#include "empathy-gsettings.h" +#include "empathy-spell.h" +#include "empathy-theme-manager.h" +#include "empathy-ui-utils.h" +#include "empathy-utils.h" #define DEBUG_FLAG EMPATHY_DEBUG_OTHER -#include +#include "empathy-debug.h" G_DEFINE_TYPE (EmpathyPreferences, empathy_preferences, GTK_TYPE_DIALOG); @@ -607,7 +598,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 +616,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 +659,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 @@ -1031,7 +1024,7 @@ empathy_preferences_init (EmpathyPreferences *preferences) gtk_window_set_role (GTK_WINDOW (preferences), "preferences"); gtk_window_set_position (GTK_WINDOW (preferences), GTK_WIN_POS_CENTER_ON_PARENT); - gtk_window_set_icon_name (GTK_WINDOW (preferences), "gtk-preferences"); + gtk_window_set_icon_name (GTK_WINDOW (preferences), "preferences-desktop"); filename = empathy_file_lookup ("empathy-preferences.ui", "src"); gui = empathy_builder_get_file (filename,