aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-migrate-butterfly-logs.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-migrate-butterfly-logs.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-migrate-butterfly-logs.c')
-rw-r--r--src/empathy-migrate-butterfly-logs.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/empathy-migrate-butterfly-logs.c b/src/empathy-migrate-butterfly-logs.c
index 9ee135ef0..4a8bf973c 100644
--- a/src/empathy-migrate-butterfly-logs.c
+++ b/src/empathy-migrate-butterfly-logs.c
@@ -22,8 +22,7 @@
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include <libempathy/empathy-debug.h>
-
-#include <libempathy-gtk/empathy-conf.h>
+#include <libempathy/empathy-gsettings.h>
#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/util.h>
@@ -139,7 +138,7 @@ migration_account_manager_prepared_cb (GObject *source_object,
TpAccountManager *am = TP_ACCOUNT_MANAGER (source_object);
GError *error = NULL;
GList *accounts, *l;
- EmpathyConf *conf;
+ GSettings *gsettings;
if (!tp_account_manager_prepare_finish (am, result, &error))
{
@@ -175,8 +174,10 @@ migration_account_manager_prepared_cb (GObject *source_object,
DEBUG ("Finished all migrating");
- conf = empathy_conf_get ();
- empathy_conf_set_bool (conf, EMPATHY_PREFS_BUTTERFLY_LOGS_MIGRATED, TRUE);
+ gsettings = g_settings_new (EMPATHY_PREFS_SCHEMA);
+ g_settings_set_boolean (gsettings, EMPATHY_PREFS_BUTTERFLY_LOGS_MIGRATED,
+ TRUE);
+ g_object_unref (gsettings);
g_list_free (accounts);
}
@@ -199,22 +200,15 @@ migrate_logs (gpointer data)
gboolean
empathy_migrate_butterfly_logs (EmpathyContact *contact)
{
- EmpathyConf *conf;
- gboolean logs_migrated;
+ GSettings *gsettings = g_settings_new (EMPATHY_PREFS_SCHEMA);
gchar *cm;
- conf = empathy_conf_get ();
-
/* Already in progress. */
if (butterfly_log_migration_id != 0)
return FALSE;
/* Already done. */
- if (!empathy_conf_get_bool (conf, EMPATHY_PREFS_BUTTERFLY_LOGS_MIGRATED,
- &logs_migrated))
- return FALSE;
-
- if (logs_migrated)
+ if (g_settings_get_boolean (gsettings, EMPATHY_PREFS_BUTTERFLY_LOGS_MIGRATED))
return FALSE;
tp_account_parse_object_path (