r14976 - gnucash/branches/swig-redo/src - Automated rename of AccountType-related swig-wrapped functions to

Chris Shoemaker chris at cvs.gnucash.org
Mon Oct 9 20:07:33 EDT 2006


Author: chris
Date: 2006-10-09 20:07:32 -0400 (Mon, 09 Oct 2006)
New Revision: 14976
Trac: http://svn.gnucash.org/trac/changeset/14976

Modified:
   gnucash/branches/swig-redo/src/app-utils/options.scm
   gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm
   gnucash/branches/swig-redo/src/import-export/qif-import/qif-dialog-utils.scm
   gnucash/branches/swig-redo/src/import-export/qif-import/qif-guess-map.scm
   gnucash/branches/swig-redo/src/import-export/qif-import/qif-to-gnc.scm
   gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-acct-table.scm
   gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf-de_DE.scm
   gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf.scm
   gnucash/branches/swig-redo/src/report/report-system/html-acct-table.scm
   gnucash/branches/swig-redo/src/report/report-system/report-utilities.scm
   gnucash/branches/swig-redo/src/report/standard-reports/advanced-portfolio.scm
   gnucash/branches/swig-redo/src/report/standard-reports/standard-reports.scm
   gnucash/branches/swig-redo/src/report/standard-reports/transaction.scm
Log:
Automated rename of AccountType-related swig-wrapped functions to
their swig-names.

s/gnc:account-get-type-string /xaccAccountGetTypeStr /g
s/gnc:account-get-type-string$/xaccAccountGetTypeStr/g
s/gnc:account-get-type /xaccAccountGetType /g
s/gnc:account-set-type/xaccAccountSetType/g




Modified: gnucash/branches/swig-redo/src/app-utils/options.scm
===================================================================
--- gnucash/branches/swig-redo/src/app-utils/options.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/app-utils/options.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -727,7 +727,7 @@
       (if (null? account-list)
 	  '()
 	  (let* ((this-account (car account-list))
-		 (account-type (gnc:account-get-type this-account)))
+		 (account-type (xaccAccountGetType this-account)))
 	    (if (if (null? acct-type-list)
                     #t
                     (member account-type acct-type-list))

Modified: gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -630,7 +630,7 @@
     (if (>= index num)
 	'()
 	(let* ((this-account (gnc:group-get-account group index))
-	       (account-type (gnc:account-get-type this-account)))
+	       (account-type (xaccAccountGetType this-account)))
 	  (if (eq? account-type type)
 	      this-account
 	      (find-first group num (+ index 1))))))

Modified: gnucash/branches/swig-redo/src/import-export/qif-import/qif-dialog-utils.scm
===================================================================
--- gnucash/branches/swig-redo/src/import-export/qif-import/qif-dialog-utils.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/import-export/qif-import/qif-dialog-utils.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -611,7 +611,7 @@
                       (qif-map-entry:gnc-name map-entry)))
 		    (book (gnc:group-get-book (gnc-get-current-group)))
                     (existing-type 
-                     (gnc:account-get-type existing-gnc-acct)))
+                     (xaccAccountGetType existing-gnc-acct)))
                (if (and existing-gnc-acct 
                         (memv existing-type (list GNC-STOCK-TYPE 
                                                   GNC-MUTUAL-TYPE)))

Modified: gnucash/branches/swig-redo/src/import-export/qif-import/qif-guess-map.scm
===================================================================
--- gnucash/branches/swig-redo/src/import-export/qif-import/qif-guess-map.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/import-export/qif-import/qif-guess-map.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -264,7 +264,7 @@
        (let ((acct-matches? #f))
          (for-each
           (lambda (type)
-            (if (= type (gnc:account-get-type (caddr gnc-acct)))
+            (if (= type (xaccAccountGetType (caddr gnc-acct)))
                 (set! acct-matches? #t)))
           allowed-types)
          (if acct-matches? 
@@ -285,7 +285,7 @@
     (if (not (null? matching-name-accts))
         (set! retval (list 
                       (cadr (car matching-name-accts))
-                      (list (gnc:account-get-type 
+                      (list (xaccAccountGetType
                              (caddr (car matching-name-accts))))))
         #f)
     retval))

Modified: gnucash/branches/swig-redo/src/import-export/qif-import/qif-to-gnc.scm
===================================================================
--- gnucash/branches/swig-redo/src/import-export/qif-import/qif-to-gnc.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/import-export/qif-import/qif-to-gnc.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -26,7 +26,7 @@
          (incompatible-acct #f))
     
     (define (compatible? account)
-      (let ((acc-type (gnc:account-get-type account))
+      (let ((acc-type (xaccAccountGetType account))
             (acc-commodity (gnc:account-get-commodity account)))
         (and
          (if check-types? 
@@ -61,7 +61,7 @@
               (set! make-new-acct #f)
               (set! incompatible-acct #f)
               (set! allowed-types 
-                    (list (gnc:account-get-type same-gnc-account))))
+                    (list (xaccAccountGetType same-gnc-account))))
             (begin 
               ;; there's an existing account with that name, so we
               ;; have to make a new acct with different properties and
@@ -97,8 +97,8 @@
                  new-acct (gnc:account-get-name same-gnc-account))
                 (gnc:account-set-description
                  new-acct (gnc:account-get-description same-gnc-account))
-                (gnc:account-set-type
-                 new-acct (gnc:account-get-type same-gnc-account))
+                (xaccAccountSetType
+                 new-acct (xaccAccountGetType same-gnc-account))
                 (gnc:account-set-commodity
                  new-acct (gnc:account-get-commodity same-gnc-account))
                 (gnc:account-set-notes 
@@ -140,7 +140,7 @@
                 
                 ;; set the account type.  this could be smarter. 
                 (if (qif-map-entry:allowed-types acct-info)
-                    (gnc:account-set-type 
+                    (xaccAccountSetType
                      new-acct (car (qif-map-entry:allowed-types acct-info))))))
           (gnc:account-commit-edit new-acct)
 
@@ -149,7 +149,7 @@
                 (qif-map-entry:set-qif-name! pinfo parent-name)
                 (qif-map-entry:set-gnc-name! pinfo parent-name)
                 (qif-map-entry:set-allowed-types! 
-                 acct-info (list (gnc:account-get-type new-acct)))
+                 acct-info (list (xaccAccountGetType new-acct)))
                 (qif-map-entry:set-allowed-types! 
                  pinfo (qif-map-entry:allowed-parent-types acct-info))
                 

Modified: gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-acct-table.scm
===================================================================
--- gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-acct-table.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-acct-table.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -63,8 +63,8 @@
                (let ((gnc-type (qif-io:parse-acct-type type)))
                  (gnc:account-begin-edit gnc-acct)
                  (if gnc-type 
-                     (gnc:account-set-type gnc-acct gnc-type)
-                     (gnc:account-set-type gnc-acct GNC-BANK-TYPE))
+                     (xaccAccountSetType gnc-acct gnc-type)
+                     (xaccAccountSetType gnc-acct GNC-BANK-TYPE))
                  (if desc 
                      (gnc:account-set-description gnc-acct desc))
                  (gnc:account-commit-edit gnc-acct)))))
@@ -78,9 +78,9 @@
                  (gnc:account-begin-edit acct)
                  (gnc:account-set-commodity acct commodity)
                  (gnc:account-commit-edit acct))))
-         (let ((type (gnc:account-get-type acct)))
+         (let ((type (xaccAccountGetType acct)))
            (if (= type -1)
-               (gnc:account-set-type acct GNC-BANK-TYPE)))
+               (xaccAccountSetType acct GNC-BANK-TYPE)))
          (gnc:group-insert-account group acct)
          #t) #t (qif-io:acct-table-accounts acct-table)))
 
@@ -98,9 +98,9 @@
                (begin 
                  (gnc:account-begin-edit gnc-acct)
                  (cond (income?
-                        (gnc:account-set-type gnc-acct GNC-INCOME-TYPE))
+                        (xaccAccountSetType gnc-acct GNC-INCOME-TYPE))
                        (#t
-                        (gnc:account-set-type gnc-acct GNC-EXPENSE-TYPE)))
+                        (xaccAccountSetType gnc-acct GNC-EXPENSE-TYPE)))
                  (gnc:account-set-description gnc-acct desc)
                  (gnc:account-commit-edit gnc-acct)))))
        (qif-io:file-categories qif-file))
@@ -113,9 +113,9 @@
                  (gnc:account-begin-edit acct)
                  (gnc:account-set-commodity acct commodity)
                  (gnc:account-commit-edit acct))))
-         (let ((type (gnc:account-get-type acct)))
+         (let ((type (xaccAccountGetType acct)))
            (if (= type -1)
-               (gnc:account-set-type acct GNC-EXPENSE-TYPE)))
+               (xaccAccountSetType acct GNC-EXPENSE-TYPE)))
          (gnc:group-insert-account group acct)
          #t) #t (qif-io:acct-table-categories acct-table)))
 

Modified: gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf-de_DE.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf-de_DE.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf-de_DE.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -292,7 +292,7 @@
          (txf? (gnc:account-get-txf account)))
     (if (and txf?
              (not (gnc:numeric-zero-p account-value)))
-        (let* ((type (gnc:account-get-type account))
+        (let* ((type (xaccAccountGetType account))
                (code (gnc:account-get-txf-code account))
                (date-str (if date
                              (strftime "%d.%m.%Y" (localtime (car date)))
@@ -650,7 +650,7 @@
 	  (length accounts)))
 
     (define (handle-level-x-account level account)
-      (let ((type (gnc:account-get-type account)))
+      (let ((type (xaccAccountGetType account)))
 	(set! work-done (+ 1 work-done))
 	(gnc:report-percent-done (* 100 (if (> work-to-do 0)
 					    (/ work-done work-to-do)

Modified: gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -277,7 +277,7 @@
          (txf? (gnc:account-get-txf account)))
     (if (and txf?
              (not (gnc:numeric-zero-p account-value)))
-        (let* ((type (gnc:account-get-type account))
+        (let* ((type (xaccAccountGetType account))
                (code (gnc:account-get-txf-code account))
                (date-str (if date
                              (strftime "%m/%d/%Y" (localtime (car date)))
@@ -627,7 +627,7 @@
 	  (length accounts)))
 
     (define (handle-level-x-account level account)
-      (let ((type (gnc:account-get-type account)))
+      (let ((type (xaccAccountGetType account)))
 	(set! work-done (+ 1 work-done))
 	(gnc:report-percent-done (* 100 (if (> work-to-do 0)
 					    (/ work-done work-to-do)

Modified: gnucash/branches/swig-redo/src/report/report-system/html-acct-table.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/report-system/html-acct-table.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/report/report-system/html-acct-table.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -727,11 +727,11 @@
 		  (account-depth acct-depth)
 		  (logical-depth logi-depth)
 		  (account-commodity (gnc:account-get-commodity acct))
-		  (account-type (gnc:account-get-type acct))
-		  ;; N.B.: gnc:account-get-type-string really should be
+		  (account-type (xaccAccountGetType acct))
+		  ;; N.B.: xaccAccountGetTypeStr really should be
 		  ;; called gnc:account-type-get-string
-		  (account-type-string (gnc:account-get-type-string
-					(gnc:account-get-type acct)))
+		  (account-type-string (xaccAccountGetTypeStr
+					(xaccAccountGetType acct)))
 		  (account-guid (gnc:account-get-guid acct))
 		  (account-description (gnc:account-get-description acct))
 		  (account-notes (gnc:account-get-notes acct))

Modified: gnucash/branches/swig-redo/src/report/report-system/report-utilities.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/report-system/report-utilities.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/report/report-system/report-utilities.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -52,25 +52,25 @@
 
 ;; True if the account is of type currency, stock, or mutual-fund
 (define (gnc:account-has-shares? account)
-  (let ((type (gnc:account-get-type account)))
+  (let ((type (xaccAccountGetType account)))
     (member type (list ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY))))
 
 ;; True if the account is of type stock or mutual-fund
 (define (gnc:account-is-stock? account)
-  (let ((type (gnc:account-get-type account)))
+  (let ((type (xaccAccountGetType account)))
     (member type (list ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL))))
 
 ;; True if the account is of type income or expense
 
 (define (gnc:account-is-inc-exp? account)
-  (let ((type (gnc:account-get-type account)))
+  (let ((type (xaccAccountGetType account)))
     (member type (list ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE))))
 
 ;; Returns only those accounts out of the list <accounts> which have
 ;; one of the type identifiers in typelist.
 (define (gnc:filter-accountlist-type typelist accounts)
   (filter (lambda (a) 
-	    (member (gnc:account-get-type a) typelist))
+	    (member (xaccAccountGetType a) typelist))
 	  accounts))
 
 ;; Decompose a given list of accounts 'accounts' into an alist
@@ -97,7 +97,7 @@
 	(cons ACCT-TYPE-EXPENSE (list ACCT-TYPE-EXPENSE)))))
 
 ;; Returns the name of the account type as a string, and in its plural
-;; form (as opposed to gnc:account-get-type-string which gives the
+;; form (as opposed to xaccAccountGetTypeStr which gives the
 ;; singular form of the word).
 (define (gnc:account-get-type-string-plural type)
   (assoc-ref

Modified: gnucash/branches/swig-redo/src/report/standard-reports/advanced-portfolio.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/advanced-portfolio.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/report/standard-reports/advanced-portfolio.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -188,7 +188,7 @@
     (gnc:option-value (get-op section name)))
   
   (define (split-account-type? split type)
-    (eq? type (gnc:account-get-type (gnc:split-get-account split))))
+    (eq? type (xaccAccountGetType (gnc:split-get-account split))))
 
   (define (same-split? s1 s2)
     (string=? (gnc:split-get-guid s1) (gnc:split-get-guid s2)))

Modified: gnucash/branches/swig-redo/src/report/standard-reports/standard-reports.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/standard-reports.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/report/standard-reports/standard-reports.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -91,7 +91,7 @@
 
 (define (gnc:register-report-create account split query journal? double?
 				    title debit-string credit-string)
-  (let* ((acct-type (gnc:account-get-type account))
+  (let* ((acct-type (xaccAccountGetType account))
 	 (create-fcn (lookup-register-report acct-type split)))
     (gnc:debug "create-fcn: " create-fcn)
     (if create-fcn

Modified: gnucash/branches/swig-redo/src/report/standard-reports/transaction.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/transaction.scm	2006-10-10 00:07:02 UTC (rev 14975)
+++ gnucash/branches/swig-redo/src/report/standard-reports/transaction.scm	2006-10-10 00:07:32 UTC (rev 14976)
@@ -417,7 +417,7 @@
 	 (dummy  (gnc:debug "split is originally" split))
          (parent (gnc:split-get-parent split))
          (account (gnc:split-get-account split))
-         (account-type (gnc:account-get-type account))
+         (account-type (xaccAccountGetType account))
          (currency (if account
                        (gnc:account-get-commodity account)
                        (gnc-default-currency)))



More information about the gnucash-changes mailing list