[gnome-latex] latexila -> gnome-latex migration: handle personal build tools
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-latex] latexila -> gnome-latex migration: handle personal build tools
- Date: Tue, 27 Mar 2018 14:42:49 +0000 (UTC)
commit fec425406888efdf8388d4b14aa3e85bbb87f935
Author: Sébastien Wilmet <swilmet gnome org>
Date: Tue Mar 27 16:33:23 2018 +0200
latexila -> gnome-latex migration: handle personal build tools
src/liblatexila/latexila-build-tools-personal.c | 16 ++++------------
src/liblatexila/latexila-utils.c | 23 +++++++++++++++++++++++
2 files changed, 27 insertions(+), 12 deletions(-)
---
diff --git a/src/liblatexila/latexila-build-tools-personal.c b/src/liblatexila/latexila-build-tools-personal.c
index fcc34fa..072e197 100644
--- a/src/liblatexila/latexila-build-tools-personal.c
+++ b/src/liblatexila/latexila-build-tools-personal.c
@@ -67,18 +67,10 @@ latexila_build_tools_personal_class_init (LatexilaBuildToolsPersonalClass *klass
static GFile *
get_xml_file (void)
{
- gchar *path;
- GFile *file;
-
- path = g_build_filename (g_get_user_config_dir (),
- "latexila",
- "build_tools.xml",
- NULL);
-
- file = g_file_new_for_path (path);
- g_free (path);
-
- return file;
+ return g_file_new_build_filename (g_get_user_config_dir (),
+ "gnome-latex",
+ "build_tools.xml",
+ NULL);
}
static void
diff --git a/src/liblatexila/latexila-utils.c b/src/liblatexila/latexila-utils.c
index 09ce407..06edd55 100644
--- a/src/liblatexila/latexila-utils.c
+++ b/src/liblatexila/latexila-utils.c
@@ -641,6 +641,28 @@ migrate_latexila_to_gnome_latex_projects (void)
g_object_unref (glatex_file);
}
+static void
+migrate_latexila_to_gnome_latex_personal_build_tools (void)
+{
+ GFile *latexila_file;
+ GFile *glatex_file;
+
+ latexila_file = g_file_new_build_filename (g_get_user_config_dir (),
+ "latexila",
+ "build_tools.xml",
+ NULL);
+
+ glatex_file = g_file_new_build_filename (g_get_user_config_dir (),
+ "gnome-latex",
+ "build_tools.xml",
+ NULL);
+
+ migrate_latexila_to_gnome_latex_copy_file (latexila_file, glatex_file);
+
+ g_object_unref (latexila_file);
+ g_object_unref (glatex_file);
+}
+
/**
* latexila_utils_migrate_latexila_to_gnome_latex:
*
@@ -659,6 +681,7 @@ latexila_utils_migrate_latexila_to_gnome_latex (void)
migrate_latexila_to_gnome_latex_gsettings ();
migrate_latexila_to_gnome_latex_most_used_symbols ();
migrate_latexila_to_gnome_latex_projects ();
+ migrate_latexila_to_gnome_latex_personal_build_tools ();
g_settings_set_boolean (settings, "latexila-to-gnome-latex-migration-done", TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]