r23293 - gnucash/trunk/src/app-utils - Prefs migration: write xsl transform to migrate a pair of coordinates
Geert Janssens
gjanssens at code.gnucash.org
Wed Oct 16 11:22:43 EDT 2013
Author: gjanssens
Date: 2013-10-16 11:22:42 -0400 (Wed, 16 Oct 2013)
New Revision: 23293
Trac: http://svn.gnucash.org/trac/changeset/23293
Modified:
gnucash/trunk/src/app-utils/make-prefs-migration-script.xsl
Log:
Prefs migration: write xsl transform to migrate a pair of coordinates
Modified: gnucash/trunk/src/app-utils/make-prefs-migration-script.xsl
===================================================================
--- gnucash/trunk/src/app-utils/make-prefs-migration-script.xsl 2013-10-16 15:22:28 UTC (rev 23292)
+++ gnucash/trunk/src/app-utils/make-prefs-migration-script.xsl 2013-10-16 15:22:42 UTC (rev 23293)
@@ -116,8 +116,21 @@
<xsl:when test="$curr-pref/gschematype = '(dd)'">
-;; Type: pair of decimals (stored in Gconf as [d,d])
-; guile command to write pair of decimals value
+;; Type: pair of decimals (stored in Gconf as list of floats)
+(let ((coords '()))
+ <xsl:for-each select="./li">
+ (set! coords (append coords '(<xsl:value-of select="./@value"/>)))
+ </xsl:for-each>
+ (if (> (length coords) 1)
+ (gnc-prefs-set-coords
+ ; preference group
+ "<xsl:value-of select="$curr-pref/../gschemaid"/>"
+ ; preference name
+ "<xsl:value-of select="$curr-pref/gschemaname"/>"
+ ; x coord
+ (car coords)
+ ; y coord
+ (cadr coords))))
</xsl:when>
More information about the gnucash-changes
mailing list