[gimp] app: use gimp_config_writer_string() to output the mypaint-brush-path
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use gimp_config_writer_string() to output the mypaint-brush-path
- Date: Sat, 31 Mar 2018 09:29:13 +0000 (UTC)
commit 7be2d1457ce2e5fbb313569af4e62c7bee252a5f
Author: Michael Natterer <mitch gimp org>
Date: Sat Mar 31 11:28:12 2018 +0200
app: use gimp_config_writer_string() to output the mypaint-brush-path
so it is properly escaped.
app/config/gimpconfig-dump.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/app/config/gimpconfig-dump.c b/app/config/gimpconfig-dump.c
index 3f23795..2107bdd 100644
--- a/app/config/gimpconfig-dump.c
+++ b/app/config/gimpconfig-dump.c
@@ -173,12 +173,15 @@ dump_gimprc_system (GimpConfig *rc,
}
else if (! strcmp (prop_spec->name, "mypaint-brush-path"))
{
+ gchar *path = g_strdup_printf ("@mypaint_brushes_dir@%s"
+ "~/.mypaint/brushes",
+ G_SEARCHPATH_SEPARATOR_S);
+
gimp_config_writer_open (writer, "mypaint-brush-path");
- gimp_config_writer_printf (writer,
- "\"@mypaint_brushes_dir@%s"
- "~/.mypaint/brushes\"",
- G_SEARCHPATH_SEPARATOR_S);
+ gimp_config_writer_string (writer, path);
gimp_config_writer_close (writer);
+
+ g_free (path);
}
else
{
@@ -326,13 +329,16 @@ dump_gimprc_manpage (GimpConfig *rc,
}
else if (! strcmp (prop_spec->name, "mypaint-brush-path"))
{
+ gchar *path = g_strdup_printf ("@mypaint_brushes_dir@%s"
+ "~/.mypaint/brushes",
+ G_SEARCHPATH_SEPARATOR_S);
+
gimp_config_writer_open (writer, "mypaint-brush-path");
- gimp_config_writer_printf (writer,
- "\"@mypaint_brushes_dir@%s"
- "~/.mypaint/brushes\"",
- G_SEARCHPATH_SEPARATOR_S);
+ gimp_config_writer_string (writer, path);
gimp_config_writer_close (writer);
+ g_free (path);
+
success = TRUE;
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]