gnucash master: Bug 721654 - Style sheet preference is not saved for a Preconfigured Report
Geert Janssens
gjanssens at code.gnucash.org
Sun Mar 9 15:26:19 EDT 2014
Updated via https://github.com/Gnucash/gnucash/commit/ce15a123 (commit)
from https://github.com/Gnucash/gnucash/commit/af4a5d44 (commit)
commit ce15a12356072be4a3149ee3e7cfc7952ec4a247
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Sun Mar 9 20:25:34 2014 +0100
Bug 721654 - Style sheet preference is not saved for a Preconfigured Report
diff --git a/src/app-utils/options.scm b/src/app-utils/options.scm
index e77847f..1019dfd 100644
--- a/src/app-utils/options.scm
+++ b/src/app-utils/options.scm
@@ -16,6 +16,7 @@
;; Free Software Foundation Voice: +1-617-542-5942
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
;; Boston, MA 02110-1301, USA gnu at gnu.org
+(use-modules (ice-9 regex))
(define (gnc:make-option
;; The category of this option
@@ -185,8 +186,16 @@
")))")))
(define (gnc:value->string value)
- (call-with-output-string
- (lambda (port) (write value port))))
+ (let ((result (call-with-output-string
+ (lambda (port) (write value port)))))
+ ;; Guile 1.8 has a bug that it serializes a space in a symbol to "\ "
+ ;; but can't deserialize this back to a symbol afterwards. Stripping the
+ ;; "\" appears to work around this (see gnucash bug 721654 which lead to this issue)
+ (cond-expand
+ (guile-2 )
+ (else (set! result (regexp-substitute/global #f "\\\\ " result 'pre " " 'post))))
+
+ result))
(define (gnc:make-string-option
section
Summary of changes:
src/app-utils/options.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list