aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-12-12 20:09:39 +0800
committerXan Lopez <xan@igalia.com>2012-12-12 20:09:39 +0800
commitceab3ce08927ec45bb880371b7f31041a5192851 (patch)
tree8ab7c7d77d071f21e12954e89a5fefcacbcbac60 /lib
parent5660617413c37eb397a50361b6ca5bdd250b5be5 (diff)
downloadgsoc2013-epiphany-ceab3ce08927ec45bb880371b7f31041a5192851.tar
gsoc2013-epiphany-ceab3ce08927ec45bb880371b7f31041a5192851.tar.gz
gsoc2013-epiphany-ceab3ce08927ec45bb880371b7f31041a5192851.tar.bz2
gsoc2013-epiphany-ceab3ce08927ec45bb880371b7f31041a5192851.tar.lz
gsoc2013-epiphany-ceab3ce08927ec45bb880371b7f31041a5192851.tar.xz
gsoc2013-epiphany-ceab3ce08927ec45bb880371b7f31041a5192851.tar.zst
gsoc2013-epiphany-ceab3ce08927ec45bb880371b7f31041a5192851.zip
Define the names of the history and bookmarks files in just one place
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-file-helpers.c2
-rw-r--r--lib/ephy-profile-migrator.c6
-rw-r--r--lib/ephy-profile-utils.h4
3 files changed, 8 insertions, 4 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 898e218bd..b21b8a7f5 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -353,7 +353,7 @@ ephy_file_helpers_init (const char *profile_dir,
if (steal_data_from_profile && profile_dir)
{
int i;
- char *files_to_copy[] = { "ephy-history.db", "ephy-bookmarks.xml" };
+ char *files_to_copy[] = { EPHY_HISTORY_FILE, EPHY_BOOKMARKS_FILE };
for (i = 0; i < G_N_ELEMENTS (files_to_copy); i++)
{
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index c7cf49415..e757cbd80 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -559,11 +559,11 @@ migrate_history (void)
char buffer[1024];
HistoryParseData parse_data;
- gchar *temporary_file = g_build_filename (ephy_dot_dir (), "ephy-history.db", NULL);
+ gchar *temporary_file = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL);
/* Do nothing if the history file already exists. Safer than wiping
* it out. */
if (g_file_test (temporary_file, G_FILE_TEST_EXISTS)) {
- g_warning ("Did not migrate Epiphany's history, the ephy-history.db file already exists");
+ g_warning ("Did not migrate Epiphany's history, the %s file already exists", EPHY_HISTORY_FILE);
g_free (temporary_file);
return;
}
@@ -779,7 +779,7 @@ migrate_new_urls_table (void)
char *filename;
GError *error = NULL;
- filename = g_build_filename (ephy_dot_dir (), "ephy-history.db", NULL);
+ filename = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL);
history_database = ephy_sqlite_connection_new ();
ephy_sqlite_connection_open (history_database, filename, &error);
diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h
index 5a9b84433..1e9d071db 100644
--- a/lib/ephy-profile-utils.h
+++ b/lib/ephy-profile-utils.h
@@ -28,6 +28,10 @@
#define EPHY_PROFILE_MIGRATION_VERSION 8
+#define EPHY_HISTORY_FILE "ephy-history.db"
+#define EPHY_BOOKMARKS_FILE "ephy-bookmarks.xml"
+#define EPHY_BOOKMARKS_FILE_RDF "bookmarks.rdf"
+
int ephy_profile_utils_get_migration_version (void);
gboolean ephy_profile_utils_set_migration_version (int version);