aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2010-06-10 12:16:00 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2010-06-18 09:34:19 +0800
commit96569c764125b9c80909c7cece9e37b65eb632ca (patch)
tree27afa60ac7dc1c6bce5195b8b9bcf645b6fe97a6 /src/empathy-accounts-dialog.c
parentf748067f6fa10635261313a28e0a0102168de91e (diff)
downloadgsoc2013-empathy-96569c764125b9c80909c7cece9e37b65eb632ca.tar
gsoc2013-empathy-96569c764125b9c80909c7cece9e37b65eb632ca.tar.gz
gsoc2013-empathy-96569c764125b9c80909c7cece9e37b65eb632ca.tar.bz2
gsoc2013-empathy-96569c764125b9c80909c7cece9e37b65eb632ca.tar.lz
gsoc2013-empathy-96569c764125b9c80909c7cece9e37b65eb632ca.tar.xz
gsoc2013-empathy-96569c764125b9c80909c7cece9e37b65eb632ca.tar.zst
gsoc2013-empathy-96569c764125b9c80909c7cece9e37b65eb632ca.zip
Port Empathy code to GSettings, remove EmpathyConf
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c16
1 files changed, 7 insertions, 9 deletions
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 <libempathy/empathy-utils.h>
#include <libempathy/empathy-connection-managers.h>
#include <libempathy/empathy-connectivity.h>
-#include <libempathy-gtk/empathy-ui-utils.h>
+#include <libempathy/empathy-gsettings.h>
+#include <libempathy-gtk/empathy-ui-utils.h>
#include <libempathy-gtk/empathy-protocol-chooser.h>
#include <libempathy-gtk/empathy-account-widget.h>
#include <libempathy-gtk/empathy-account-widget-irc.h>
#include <libempathy-gtk/empathy-account-widget-sip.h>
#include <libempathy-gtk/empathy-cell-renderer-activatable.h>
-#include <libempathy-gtk/empathy-conf.h>
#include <libempathy-gtk/empathy-images.h>
#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