[evolution] Bug 723614 - Restore from GConf only once
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 723614 - Restore from GConf only once
- Date: Thu, 5 Mar 2015 21:05:43 +0000 (UTC)
commit 842adab4e27dbcaa5064ed7f8f10c62e5f4cdfb4
Author: Milan Crha <mcrha redhat com>
Date: Thu Mar 5 22:05:34 2015 +0100
Bug 723614 - Restore from GConf only once
modules/backup-restore/evolution-backup-tool.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/modules/backup-restore/evolution-backup-tool.c b/modules/backup-restore/evolution-backup-tool.c
index 7f87bd2..9604513 100644
--- a/modules/backup-restore/evolution-backup-tool.c
+++ b/modules/backup-restore/evolution-backup-tool.c
@@ -452,6 +452,16 @@ get_source_manager_reload_command (void)
}
static void
+unset_eds_migrated_flag (void)
+{
+ GSettings *settings;
+
+ settings = g_settings_new ("org.gnome.evolution-data-server");
+ g_settings_set_boolean (settings, "migrated", FALSE);
+ g_object_unref (settings);
+}
+
+static void
restore (const gchar *filename,
GCancellable *cancellable)
{
@@ -573,6 +583,8 @@ restore (const gchar *filename,
/* new format has it in DATADIR... */
GString *file = replace_variables (EVOLUTION_DIR ANCIENT_GCONF_DUMP_FILE, TRUE);
if (file && g_file_test (file->str, G_FILE_TEST_EXISTS)) {
+ unset_eds_migrated_flag ();
+
/* ancient backup */
replace_in_file (
EVOLUTION_DIR ANCIENT_GCONF_DUMP_FILE,
@@ -603,6 +615,8 @@ restore (const gchar *filename,
} else {
gchar *gconf_dump_file;
+ unset_eds_migrated_flag ();
+
/* ... old format in ~/.evolution */
gconf_dump_file = g_build_filename (
"$HOME", ".evolution", ANCIENT_GCONF_DUMP_FILE, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]