From 96569c764125b9c80909c7cece9e37b65eb632ca Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Thu, 10 Jun 2010 14:16:00 +1000 Subject: Port Empathy code to GSettings, remove EmpathyConf --- src/empathy-accounts-dialog.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/empathy-accounts-dialog.c') diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index d81d3de2d..12ac5b244 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -39,14 +39,14 @@ #include #include #include -#include +#include +#include #include #include #include #include #include -#include #include #include "empathy-accounts-dialog.h" @@ -2219,8 +2219,8 @@ do_constructed (GObject *object) { EmpathyAccountsDialog *dialog = EMPATHY_ACCOUNTS_DIALOG (object); EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); - gboolean import_asked; GtkTreeModel *model; + GSettings *gsettings = g_settings_new (EMPATHY_PREFS_SCHEMA); accounts_dialog_build_ui (dialog); accounts_dialog_model_setup (dialog); @@ -2237,19 +2237,15 @@ do_constructed (GObject *object) tp_account_manager_prepare_async (priv->account_manager, NULL, accounts_dialog_manager_ready_cb, dialog); - empathy_conf_get_bool (empathy_conf_get (), - EMPATHY_PREFS_IMPORT_ASKED, &import_asked); - if (empathy_import_accounts_to_import ()) { gtk_widget_show (priv->button_import); - if (!import_asked) + if (!g_settings_get_boolean (gsettings, EMPATHY_PREFS_IMPORT_ASKED)) { GtkWidget *import_dialog; - empathy_conf_set_bool (empathy_conf_get (), - EMPATHY_PREFS_IMPORT_ASKED, TRUE); + g_settings_set_boolean (gsettings, EMPATHY_PREFS_IMPORT_ASKED, TRUE); import_dialog = empathy_import_dialog_new (GTK_WINDOW (dialog), FALSE); gtk_widget_show (import_dialog); @@ -2257,6 +2253,8 @@ do_constructed (GObject *object) } priv->connectivity = empathy_connectivity_dup_singleton (); + + g_object_unref (gsettings); } static void -- cgit v1.2.3