r23500 - gnucash/branches/2.4/src/report/report-gnome - [23499] Bug 627575 - Stylesheet names with non-alphanumeric characters and saved-reports
Geert Janssens
gjanssens at code.gnucash.org
Sat Dec 7 05:27:26 EST 2013
Author: gjanssens
Date: 2013-12-07 05:27:26 -0500 (Sat, 07 Dec 2013)
New Revision: 23500
Trac: http://svn.gnucash.org/trac/changeset/23500
Modified:
gnucash/branches/2.4/src/report/report-gnome/gnc-plugin-page-report.c
Log:
[23499] Bug 627575 - Stylesheet names with non-alphanumeric characters and saved-reports
g_key_file_[gs]et_string parses the string to escape newlines and comments
This erroneously does some escaping in the #{symbol name}# guile extended format
for symbols. Since we already strip newlines and comments ourselves,
we can save and store the string without any additional parsing
using g_key_file_[gs]et_value.
Modified: gnucash/branches/2.4/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/branches/2.4/src/report/report-gnome/gnc-plugin-page-report.c 2013-12-07 10:18:21 UTC (rev 23499)
+++ gnucash/branches/2.4/src/report/report-gnome/gnc-plugin-page-report.c 2013-12-07 10:27:26 UTC (rev 23500)
@@ -773,7 +773,7 @@
key_name = g_strdup_printf(SCHEME_OPTIONS_N, id);
text = gnc_guile_strip_comments(scm_to_locale_string(scm_text));
- g_key_file_set_string(key_file, group_name, key_name, text);
+ g_key_file_set_value(key_file, group_name, key_name, text);
g_free(text);
g_free(key_name);
}
@@ -786,7 +786,7 @@
}
text = gnc_guile_strip_comments(scm_to_locale_string(scm_text));
- g_key_file_set_string(key_file, group_name, SCHEME_OPTIONS, text);
+ g_key_file_set_value(key_file, group_name, SCHEME_OPTIONS, text);
g_free(text);
LEAVE(" ");
}
@@ -833,7 +833,7 @@
{
if (strncmp(keys[i], SCHEME_OPTIONS, strlen(SCHEME_OPTIONS)) != 0)
continue;
- option_string = g_key_file_get_string(key_file, group_name,
+ option_string = g_key_file_get_value(key_file, group_name,
keys[i], &error);
if (error)
{
@@ -855,7 +855,7 @@
if (final_id == SCM_BOOL_F)
{
- if (strcmp(keys[i], SCHEME_OPTIONS) == 0)
+ if (g_strcmp0(keys[i], SCHEME_OPTIONS) == 0)
{
final_id = scm_id;
}
More information about the gnucash-changes
mailing list