Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Archive
gnome-latex
Commits
143c2c83
Commit
143c2c83
authored
Mar 27, 2018
by
swilmet
Browse files
latexila -> gnome-latex migration: handle most used symbols
Requires GIO 2.56 for g_file_new_build_filename().
parent
3af415b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
README
View file @
143c2c83
...
...
@@ -18,7 +18,7 @@ The web site:
Dependencies
------------
* GLib >= 2.5
0
* GLib >= 2.5
6
* GTK+ >= 3.22
* GtkSourceView >= 4.0
* Tepl >= 3.99.1 - https://wiki.gnome.org/Projects/Tepl
...
...
configure.ac
View file @
143c2c83
...
...
@@ -29,7 +29,7 @@ LT_INIT
# Required dependencies versions
# Update also the --target-glib option in src/Makefile.am.
GLIB_REQUIRED_VERSION="2.5
0
"
GLIB_REQUIRED_VERSION="2.5
6
"
GTK_REQUIRED_VERSION="3.22"
GTKSOURCEVIEW_REQUIRED_VERSION="4.0"
TEPL_REQUIRED_VERSION="3.99.1"
...
...
src/liblatexila/latexila-utils.c
View file @
143c2c83
...
...
@@ -576,14 +576,56 @@ out:
g_object_unref (settings);
}
static void
migrate_latexila_to_gnome_latex_most_used_symbols (void)
{
GFile *latexila_file;
GFile *glatex_file;
GError *error = NULL;
latexila_file = g_file_new_build_filename (g_get_user_data_dir (),
"latexila",
"most_used_symbols.xml",
NULL);
glatex_file = g_file_new_build_filename (g_get_user_data_dir (),
"gnome-latex",
"most_used_symbols.xml",
NULL);
latexila_utils_create_parent_directories (glatex_file, &error);
if (error != NULL)
{
goto out;
}
g_file_copy (latexila_file,
glatex_file,
G_FILE_COPY_TARGET_DEFAULT_PERMS,
NULL, NULL, NULL,
&error);
out:
if (error != NULL)
{
g_warning ("Error when migrating LaTeXila to GNOME LaTeX most used symbols: %s",
error->message);
g_clear_error (&error);
}
g_object_unref (latexila_file);
g_object_unref (glatex_file);
}
/**
* latexila_utils_migrate_latexila_to_gnome_latex:
*
* Migrates the #GSettings values
from LaTeXila to GNOME LaTeX, so that users
* don't lose all their settings.
* Migrates the #GSettings values
and user data/config files from LaTeXila to
*
GNOME LaTeX, so that users
don't lose all their settings.
*/
void
latexila_utils_migrate_latexila_to_gnome_latex (void)
{
migrate_latexila_to_gnome_latex_gsettings ();
migrate_latexila_to_gnome_latex_most_used_symbols ();
}
src/most_used_symbols.vala
View file @
143c2c83
...
...
@@ -130,7 +130,7 @@ public class MostUsedSymbols : GLib.Object
private File get_xml_file ()
{
string path = Path.build_filename (Environment.get_user_data_dir (),
"latex
ila
", "most_used_symbols.xml");
"
gnome-
latex", "most_used_symbols.xml");
return File.new_for_path (path);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment