[Gnucash-changes] Put the saved stylesheets into their own file in the .gnucash directory.

David Hampton hampton at cvs.gnucash.org
Fri Oct 7 18:21:11 EDT 2005


Log Message:
-----------
Put the saved stylesheets into their own file in the .gnucash
directory.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/report/report-system:
        html-style-sheet.scm
    gnucash/src/scm:
        main.scm
        path.scm

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.312
retrieving revision 1.1487.2.313
diff -LChangeLog -LChangeLog -u -r1.1487.2.312 -r1.1487.2.313
--- ChangeLog
+++ ChangeLog
@@ -1,5 +1,10 @@
 2005-10-07  David Hampton  <hampton at employees.org>
 
+	* src/report/report-system/html-style-sheet.scm:
+	* src/scm/main.scm:
+	* src/scm/path.scm: Put the saved stylesheets into their own file
+	in the .gnucash directory.
+
 	* src/app-utils/Makefile.am:
 	* src/app-utils/gnc-exp-parser.c: Convert the expression parser
 	over from saving persistent data as a scheme fragments to saving
Index: html-style-sheet.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-style-sheet.scm,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -Lsrc/report/report-system/html-style-sheet.scm -Lsrc/report/report-system/html-style-sheet.scm -u -r1.1 -r1.1.6.1
--- src/report/report-system/html-style-sheet.scm
+++ src/report/report-system/html-style-sheet.scm
@@ -127,8 +127,8 @@
 
 (define (gnc:save-style-sheet-options) 
   (let ((port (false-if-exception
-               (open gnc:current-config-auto
-                     (logior O_WRONLY O_CREAT O_APPEND)))))
+               (open gnc:current-saved-stylesheets
+                     (logior O_WRONLY O_CREAT)))))
     (if (not port)
         (gnc:warn (_ "Can't save style sheet"))
         (begin
Index: main.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main.scm,v
retrieving revision 1.109.2.24
retrieving revision 1.109.2.25
diff -Lsrc/scm/main.scm -Lsrc/scm/main.scm -u -r1.109.2.24 -r1.109.2.25
--- src/scm/main.scm
+++ src/scm/main.scm
@@ -64,6 +64,7 @@
 (export gnc:make-home-dir)
 (export gnc:current-config-auto)
 (export gnc:current-saved-reports)
+(export gnc:current-saved-stylesheets)
 
 ;; from command-line.scm
 (export gnc:*config-path*)
Index: path.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/path.scm,v
retrieving revision 1.18.4.2
retrieving revision 1.18.4.3
diff -Lsrc/scm/path.scm -Lsrc/scm/path.scm -u -r1.18.4.2 -r1.18.4.3
--- src/scm/path.scm
+++ src/scm/path.scm
@@ -45,6 +45,9 @@
 (define gnc:current-saved-reports
   (build-path (getenv "HOME") ".gnucash" "saved-reports-2.0"))
 
+(define gnc:current-saved-stylesheets
+  (build-path (getenv "HOME") ".gnucash" "stylesheets-2.0"))
+
 (define gnc:load-user-config-if-needed
   (let ((user-config-loaded? #f))
 
@@ -81,6 +84,9 @@
 	    (gnc:debug "loading saved reports")
 	    (or-map try-load-no-set
 		    '("saved-reports-2.0" "saved-reports-1.8"))
+	    (gnc:debug "loading stylesheets")
+	    (or-map try-load-no-set
+		    '("stylesheets-2.0"))
 	    )))))
 
 ;; the system config should probably be loaded from some directory


More information about the gnucash-changes mailing list