r14981 - gnucash/branches/swig-redo/src - Automated rename of swig-wrapped engine functions related to Budgets,

Chris Shoemaker chris at cvs.gnucash.org
Mon Oct 9 20:11:34 EDT 2006


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

Modified:
   gnucash/branches/swig-redo/src/app-utils/options.scm
   gnucash/branches/swig-redo/src/business/business-core/business-core.scm
   gnucash/branches/swig-redo/src/business/business-reports/aging.scm
   gnucash/branches/swig-redo/src/business/business-reports/business-reports.scm
   gnucash/branches/swig-redo/src/business/business-reports/easy-invoice.scm
   gnucash/branches/swig-redo/src/business/business-reports/fancy-invoice.scm
   gnucash/branches/swig-redo/src/business/business-reports/invoice.scm
   gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm
   gnucash/branches/swig-redo/src/engine/engine-interface.scm
   gnucash/branches/swig-redo/src/engine/engine-utilities.scm
   gnucash/branches/swig-redo/src/engine/test/test-create-account.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-merge-groups.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/import-export/qif-io-core/qif-bank-xtn-import.scm
   gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-invst-xtn-import.scm
   gnucash/branches/swig-redo/src/import-export/qif-io-core/test/test-import-phase-1.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/commodity-utilities.scm
   gnucash/branches/swig-redo/src/report/report-system/html-acct-table.scm
   gnucash/branches/swig-redo/src/report/report-system/html-utilities.scm
   gnucash/branches/swig-redo/src/report/report-system/report-utilities.scm
   gnucash/branches/swig-redo/src/report/standard-reports/account-piecharts.scm
   gnucash/branches/swig-redo/src/report/standard-reports/account-summary.scm
   gnucash/branches/swig-redo/src/report/standard-reports/advanced-portfolio.scm
   gnucash/branches/swig-redo/src/report/standard-reports/average-balance.scm
   gnucash/branches/swig-redo/src/report/standard-reports/balance-sheet.scm
   gnucash/branches/swig-redo/src/report/standard-reports/budget.scm
   gnucash/branches/swig-redo/src/report/standard-reports/cash-flow.scm
   gnucash/branches/swig-redo/src/report/standard-reports/category-barchart.scm
   gnucash/branches/swig-redo/src/report/standard-reports/daily-reports.scm
   gnucash/branches/swig-redo/src/report/standard-reports/equity-statement.scm
   gnucash/branches/swig-redo/src/report/standard-reports/general-journal.scm
   gnucash/branches/swig-redo/src/report/standard-reports/income-statement.scm
   gnucash/branches/swig-redo/src/report/standard-reports/net-barchart.scm
   gnucash/branches/swig-redo/src/report/standard-reports/portfolio.scm
   gnucash/branches/swig-redo/src/report/standard-reports/price-scatter.scm
   gnucash/branches/swig-redo/src/report/standard-reports/register.scm
   gnucash/branches/swig-redo/src/report/standard-reports/transaction.scm
   gnucash/branches/swig-redo/src/report/standard-reports/trial-balance.scm
   gnucash/branches/swig-redo/src/report/utility-reports/hello-world.scm
Log:
Automated rename of swig-wrapped engine functions related to Budgets,
Lots, Groups, Splits, Transactions, and Accounts to their swig-names.

#### Split Stuff

s/gnc:split-get-guid/gncSplitGetGUID/g
s/gnc:split-get-balance /xaccSplitGetBalance /g
s/gnc:split-get-memo/xaccSplitGetMemo/g
s/gnc:split-get-action/xaccSplitGetAction/g
s/gnc:split-get-reconcile-state/xaccSplitGetReconcile/g
s/gnc:split-get-reconciled-date/gnc-split-get-date-reconciled/g
s/gnc:split-get-amount/xaccSplitGetAmount/g
s/gnc:split-get-share-price/xaccSplitGetSharePrice/g
s/gnc:split-get-value/xaccSplitGetValue/g
s/gnc:split-get-account/xaccSplitGetAccount/g
s/gnc:split-get-parent/xaccSplitGetParent/g
s/gnc:split-get-other-split/xaccSplitGetOtherSplit/g
s/gnc:split-compare-account-full-names/xaccSplitCompareAccountFullNames/g
s/gnc:split-compare-account-codes/xaccSplitCompareAccountCodes/g
s/gnc:split-compare-other-account-full-names/xaccSplitCompareOtherAccountFullNames/g
s/gnc:split-compare-other-account-codes/xaccSplitCompareOtherAccountCodes/g
s/gnc:split-get-corr-account-name/xaccSplitGetCorrAccountName/g
s/gnc:split-get-corr-account-full-name-internal/xaccSplitGetCorrAccountFullName/g
s/gnc:split-get-lot/xaccSplitGetLot/g
s/gnc:split-void-former-amount/xaccSplitVoidFormerAmount/g
s/gnc:split-destroy/xaccSplitDestroy/g
s/gnc:split-create/xaccMallocSplit/g
s/gnc:split-set-value/xaccSplitSetValue/g
s/gnc:split-set-base-value/xaccSplitSetBaseValue/g
s/gnc:split-set-memo/xaccSplitSetMemo/g
s/gnc:split-set-action/xaccSplitSetAction/g
s/gnc:split-set-reconcile/xaccSplitSetReconcile/g
s/gnc:split-set-share-price/xaccSplitSetSharePrice/g
s/gnc:split-set-amount/xaccSplitSetAmount/g
s/gnc:split-set-share-price-and-amount/xaccSplitSetSharePriceAndAmount/g


#### Transaction Stuff

s/gnc:transaction-get-guid/gncTransGetGUID/g
s/gnc:transaction-get-split/xaccTransGetSplit/g
s/gnc:transaction-get-splits/xaccTransGetSplitList/g
s/gnc:transaction-get-num/xaccTransGetNum/g
s/gnc:transaction-get-description/xaccTransGetDescription/g
s/gnc:transaction-get-notes/xaccTransGetNotes/g
s/gnc:transaction-get-void-status/xaccTransGetVoidStatus/g
s/gnc:transaction-order/xaccTransOrder/g
s/gnc:transaction-get-date-posted/gnc-transaction-get-date-posted/g
s/gnc:transaction-get-date-entered/gnc-transaction-get-date-entered/g
s/gnc:transaction-get-account-value/xaccTransGetAccountValue/g
s/gnc:transaction-get-txn-type/xaccTransGetTxnType/g
s/gnc:transaction-destroy/xaccTransDestroy/g
s/gnc:transaction-begin-edit/xaccTransBeginEdit/g
s/gnc:transaction-commit-edit/xaccTransCommitEdit/g
s/gnc:transaction-is-open/xaccTransIsOpen/g
s/gnc:transaction-append-split/xaccTransAppendSplit/g
s/gnc:transaction-set-date /xaccTransSetDate /g
s/gnc:transaction-set-date-time-pair/gnc-transaction-set-date/g
s/gnc:transaction-set-xnum/xaccTransSetNum/g
s/gnc:transaction-set-description/xaccTransactionSetDescription/g
s/gnc:transaction-set-notes/xaccTransSetNotes/g
s/gnc:transaction-create/xaccMallocTransaction/g

#### Account stuff

s/gnc:account-get-guid/gncAccountGetGUID/g
s/gnc:account-lookup/xaccAccountLookup/g

s/gnc:malloc-account /xaccMallocAccount /g
s/gnc:account-begin-edit/xaccAccountBeginEdit/g
s/gnc:account-commit-edit/xaccAccountCommitEdit/g
s/gnc:account-insert-split/xaccSplitSetAccount/g
s/gnc:account-set-name/xaccAccountSetName/g
s/gnc:account-set-code/xaccAccountSetCode/g
s/gnc:account-set-description/xaccAccountSetDescription/g
s/gnc:account-set-notes/xaccAccountSetNotes/g
s/gnc:account-get-name/xaccAccountGetName/g
s/gnc:account-get-code/xaccAccountGetCode/g
s/gnc:account-get-description/xaccAccountGetDescription/g
s/gnc:account-get-notes/xaccAccountGetNotes/g
s/gnc:account-get-tax-related/xaccAccountGetTaxRelated/g
s/gnc:account-get-tax-US-code/xaccAccountGetTaxUSCode/g
s/gnc:account-get-tax-US-payer-name-source/xaccAccountGetTaxUSPayerNameSource/g
s/gnc:account-get-children/xaccAccountGetChildren/g
s/gnc:account-get-parent-account/xaccAccountGetParentAccount/g
s/gnc:account-get-parent/xaccAccountGetParent/g
s/gnc:account-get-balance /xaccAccountGetBalance /g
s/gnc:account-get-split-list /xaccAccountGetSplitList /g
s/gnc:get-account-from-full-name/xaccGetAccountFromFullName/g
s/gnc:account-insert-subaccount/xaccAccountInsertSubAccount/g
s/gnc:account-separator-string/gnc-get-account-separator-string/g

#### Group stuff

s/gnc:group-get-book/xaccGroupGetBook/g
s/gnc:malloc-account-group/xaccMallocAccountGroup/g
s/gnc:account-group-begin-edit/xaccAccountGroupBeginEdit/g
s/gnc:account-group-destroy/xaccAccountGroupDestroy/g
s/gnc:group-merge-accounts/xaccGroupMergeAccounts/g
s/gnc:group-concat-group/xaccGroupConcatGroup/g
s/gnc:group-get-num-subaccounts/xaccGroupGetNumSubAccounts/g
s/gnc:group-get-num-accounts/xaccGroupGetNumAccounts/g
s/gnc:group-get-account-list/xaccGroupGetAccountListSorted/g
s/gnc:group-get-account/xaccGroupGetAccount/g
s/gnc:group-get-parent/xaccGroupGetParentAccount/g
s/gnc:group-insert-account/xaccGroupInsertAccount/g
s/gnc:group-get-subaccounts/xaccGroupGetSubAccountsSorted/g

s/gnc:lot-closed?/gnc-lot-is-closed/g
s/gnc:lot-get-splits/gnc-lot-get-split-list/g
s/gnc:lot-get-balance/gnc-lot-get-balance/g

s/gnc:budget-get-guid/gncBudgetGetGUID/g
s/gnc:budget-lookup/gnc-budget-lookup/g
s/gnc:budget-get-/gnc-budget-get-/g



Modified: gnucash/branches/swig-redo/src/app-utils/options.scm
===================================================================
--- gnucash/branches/swig-redo/src/app-utils/options.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/app-utils/options.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -312,14 +312,14 @@
   (define (budget->guid budget)
     (if (string? budget)
         budget
-        (gnc:budget-get-guid budget)))
+        (gncBudgetGetGUID budget)))
 
   (define (guid->budget budget)
     (if (string? budget)
-        (gnc:budget-lookup budget (gnc-get-current-book))
+        (gnc-budget-lookup budget (gnc-get-current-book))
         budget))
 
-  (let* ((default-value (gnc:budget-get-default (gnc-get-current-book)))
+  (let* ((default-value (gnc-budget-get-default (gnc-get-current-book)))
          (value (budget->guid default-value))
          (option-set #f)
          (value->string (lambda ()
@@ -340,7 +340,7 @@
              (set! option-set #t)) ;; setter
      (lambda ()
        (guid->budget
-        (gnc:budget-get-default (gnc-get-current-book)))) ;; default-getter
+        (gnc-budget-get-default (gnc-get-current-book)))) ;; default-getter
      (gnc:restore-form-generator value->string) ;; ??
      (lambda (f p) (kvp-frame-set-slot-path-gslist f value p))
      (lambda (f p)
@@ -613,11 +613,11 @@
   (define (convert-to-guid item)
     (if (string? item)
         item
-        (gnc:account-get-guid item)))
+        (gncAccountGetGUID item)))
 
   (define (convert-to-account item)
     (if (string? item)
-        (gnc:account-lookup item (gnc-get-current-book))
+        (xaccAccountLookup item (gnc-get-current-book))
         item))
 
   (let* ((option (map convert-to-guid (default-getter)))
@@ -640,7 +640,7 @@
        (if (not account-list) (set! account-list (default-getter)))
        (set! account-list
              (filter (lambda (x) (if (string? x)
-                                     (gnc:account-lookup
+                                     (xaccAccountLookup
                                       x (gnc-get-current-book))
                                      x)) account-list))
        (let* ((result (validator account-list))
@@ -715,11 +715,11 @@
   (define (convert-to-guid item)
     (if (string? item)
         item
-        (gnc:account-get-guid item)))
+        (gncAccountGetGUID item)))
 
   (define (convert-to-account item)
     (if (string? item)
-        (gnc:account-lookup item (gnc-get-current-book))
+        (xaccAccountLookup item (gnc-get-current-book))
         item))
 
   (define (find-first-account)
@@ -735,7 +735,7 @@
 		(find-first (cdr account-list))))))
 
     (let* ((current-group (gnc-get-current-group))
-	   (account-list (gnc:group-get-subaccounts current-group)))
+	   (account-list (xaccGroupGetSubAccountsSorted current-group)))
       (find-first account-list)))
 	   
   (define (get-default)

Modified: gnucash/branches/swig-redo/src/business/business-core/business-core.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-core/business-core.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/business/business-core/business-core.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -88,18 +88,18 @@
     (equal? type GNC-AMT-TYPE-PERCENT)))
 
 (define (gnc:owner-from-split split result-owner)
-  (let* ((trans (gnc:split-get-parent split))
+  (let* ((trans (xaccSplitGetParent split))
 	 (invoice (gncInvoiceGetInvoiceFromTxn trans))
 	 (temp-owner (gncOwnerCreate))
 	 (owner #f))
 
     (if invoice
 	(set! owner (gncInvoiceGetOwner invoice))
-	(let ((split-list (gnc:transaction-get-splits trans)))
+	(let ((split-list (xaccTransGetSplits trans)))
 	  (define (check-splits splits)
 	    (if (and splits (not (null? splits)))
 		(let* ((split (car splits))
-		       (lot (gnc:split-get-lot split)))
+		       (lot (xaccSplitGetLot split)))
 		  (if lot
 		      (let* ((invoice (gncInvoiceGetInvoiceFromLot lot))
 			     (owner? (gnc:owner-get-owner-from-lot

Modified: gnucash/branches/swig-redo/src/business/business-reports/aging.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/aging.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/business/business-reports/aging.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -179,7 +179,7 @@
 			     reverse? show-zeros)
 
   (define (do-update value)
-    (let* ((transaction (gnc:split-get-parent split))
+    (let* ((transaction (xaccSplitGetParent split))
 	   (temp-owner (gncOwnerCreate))
 	   (owner (gnc:owner-from-split split temp-owner)))
 
@@ -187,7 +187,7 @@
        owner
        (let* ((guid (gncOwnerReturnGUID owner))
 	      (this-currency (xaccTransGetCurrency transaction))
-	      (this-date (gnc:transaction-get-date-posted transaction))
+	      (this-date (gnc-transaction-get-date-posted transaction))
 	      (company-info (hash-ref hash guid)))
 
 	 (gnc:debug "update-company-hash called")
@@ -227,9 +227,9 @@
   
   ;; figure out if this split is part of a closed lot
   ;; also save the split value...
-  (let* ((lot (gnc:split-get-lot split))
-	 (value (gnc:split-get-value split))
-	 (is-paid? (if (null? lot) #f (gnc:lot-closed? lot))))
+  (let* ((lot (xaccSplitGetLot split))
+	 (value (xaccSplitGetValue split))
+	 (is-paid? (if (null? lot) #f (gnc-lot-is-closed lot))))
 
     ;; if it's closed, then ignore it because it doesn't matter.
     ;; XXX: we _could_ just set the value to 0 in order to list
@@ -546,7 +546,7 @@
     (if account
         (begin
           (gnc:html-document-set-title!
-           document (string-append report-title ": " (gnc:account-get-name account)))
+           document (string-append report-title ": " (xaccAccountGetName account)))
           (gnc:html-document-set-headline! document
                                            (gnc:html-markup
                                             "!" 
@@ -554,7 +554,7 @@
                                             ": "
                                             (gnc:html-markup-anchor
                                              (gnc:account-anchor-text account)
-                                             (gnc:account-get-name account))))))
+                                             (xaccAccountGetName account))))))
 
     (gnc:html-table-set-col-headers! table heading-list)
 				     

Modified: gnucash/branches/swig-redo/src/business/business-reports/business-reports.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/business-reports.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/business/business-reports/business-reports.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -92,7 +92,7 @@
 	  (set! ref (string-append ref (gncOwnerReturnGUID end-owner)))
 	  (if acc
 	      (set! ref (string-append ref "&acct="
-				       (gnc:account-get-guid acc))))
+				       (gncAccountGetGUID acc))))
 	  (gnc-build-url URL-TYPE-OWNERREPORT ref ""))
 	ref)))
 

Modified: gnucash/branches/swig-redo/src/business/business-reports/easy-invoice.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/easy-invoice.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/business/business-reports/easy-invoice.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -415,10 +415,10 @@
 		  currency-totals)))
 
     (define (add-payment-row table used-columns split total-collector)
-      (let* ((t (gnc:split-get-parent split))
+      (let* ((t (xaccSplitGetParent split))
 	     (currency (xaccTransGetCurrency t))
 	     ;; XXX Need to know when to reverse the value
-	     (amt (gnc:make-gnc-monetary currency (gnc:split-get-value split)))
+	     (amt (gnc:make-gnc-monetary currency (xaccSplitGetValue split)))
 	     (payment-style "grand-total")
 	     (row '()))
 	
@@ -428,7 +428,7 @@
 
 	(if (date-col used-columns)
 	    (addto! row
-		    (gnc-print-date (gnc:transaction-get-date-posted t))))
+		    (gnc-print-date (gnc-transaction-get-date-posted t))))
 
 	(if (description-col used-columns)
 	    (addto! row (_ "Payment, thank you")))
@@ -463,7 +463,7 @@
 		 (lambda (acct value)
 		   (let ((collector (gnc:make-commodity-collector))
 			 (commodity (xaccAccountGetCommodity acct))
-			 (name (gnc:account-get-name acct)))
+			 (name (xaccAccountGetName acct)))
 		     (collector 'add commodity value)
 		     (add-subtotal-row table used-columns collector
 				       "grand-total" name)))
@@ -475,14 +475,14 @@
 
 	    (if (and show-payments lot)
 		(let ((splits (sort-list!
-			       (gnc:lot-get-splits lot)
+			       (gnc-lot-get-split-list lot)
 			       (lambda (s1 s2)
-				 (let ((t1 (gnc:split-get-parent s1))
-				       (t2 (gnc:split-get-parent s2)))
-				   (< (gnc:transaction-order t1 t2) 0))))))
+				 (let ((t1 (xaccSplitGetParent s1))
+				       (t2 (xaccSplitGetParent s2)))
+				   (< (xaccTransOrder t1 t2) 0))))))
 		  (for-each
 		   (lambda (split)
-		     (if (not (equal? (gnc:split-get-parent split) txn))
+		     (if (not (equal? (xaccSplitGetParent split) txn))
 			 (add-payment-row table used-columns
 					  split total-collector)))
 		   splits)))

Modified: gnucash/branches/swig-redo/src/business/business-reports/fancy-invoice.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/fancy-invoice.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/business/business-reports/fancy-invoice.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -432,10 +432,10 @@
 		  currency-totals)))
 
     (define (add-payment-row table used-columns split total-collector)
-      (let* ((t (gnc:split-get-parent split))
+      (let* ((t (xaccSplitGetParent split))
 	     (currency (xaccTransGetCurrency t))
 	     ;; XXX Need to know when to reverse the value
-	     (amt (gnc:make-gnc-monetary currency (gnc:split-get-value split)))
+	     (amt (gnc:make-gnc-monetary currency (xaccSplitGetValue split)))
 	     (payment-style "grand-total")
 	     (row '()))
 	
@@ -445,7 +445,7 @@
 
 	(if (date-col used-columns)
 	    (addto! row
-		    (gnc-print-date (gnc:transaction-get-date-posted t))))
+		    (gnc-print-date (gnc-transaction-get-date-posted t))))
 
 	(if (description-col used-columns)
 	    (addto! row (_ "Payment, thank you")))
@@ -489,7 +489,7 @@
 		 (lambda (acct value)
 		   (let ((collector (gnc:make-commodity-collector))
 			 (commodity (xaccAccountGetCommodity acct))
-			 (name (gnc:account-get-name acct)))
+			 (name (xaccAccountGetName acct)))
 		     (collector 'add commodity value)
 		     (add-subtotal-row table used-columns collector
 				       "grand-total" (string-expand
@@ -502,14 +502,14 @@
 
 	    (if (and show-payments lot)
 		(let ((splits (sort-list!
-			       (gnc:lot-get-splits lot)
+			       (gnc-lot-get-split-list lot)
 			       (lambda (s1 s2)
-				 (let ((t1 (gnc:split-get-parent s1))
-				       (t2 (gnc:split-get-parent s2)))
-				   (< (gnc:transaction-order t1 t2) 0))))))
+				 (let ((t1 (xaccSplitGetParent s1))
+				       (t2 (xaccSplitGetParent s2)))
+				   (< (xaccTransOrder t1 t2) 0))))))
 		  (for-each
 		   (lambda (split)
-		     (if (not (equal? (gnc:split-get-parent split) txn))
+		     (if (not (equal? (xaccSplitGetParent split) txn))
 			 (add-payment-row table used-columns
 					  split total-collector)))
 		   splits)))

Modified: gnucash/branches/swig-redo/src/business/business-reports/invoice.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/invoice.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/business/business-reports/invoice.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -381,10 +381,10 @@
 		  currency-totals)))
 
     (define (add-payment-row table used-columns split total-collector)
-      (let* ((t (gnc:split-get-parent split))
+      (let* ((t (xaccSplitGetParent split))
 	     (currency (xaccTransGetCurrency t))
 	     ;; XXX Need to know when to reverse the value
-	     (amt (gnc:make-gnc-monetary currency (gnc:split-get-value split)))
+	     (amt (gnc:make-gnc-monetary currency (xaccSplitGetValue split)))
 	     (payment-style "grand-total")
 	     (row '()))
 	
@@ -394,7 +394,7 @@
 
 	(if (date-col used-columns)
 	    (addto! row
-		    (gnc-print-date (gnc:transaction-get-date-posted t))))
+		    (gnc-print-date (gnc-transaction-get-date-posted t))))
 
 	(if (description-col used-columns)
 	    (addto! row (_ "Payment, thank you")))
@@ -427,7 +427,7 @@
 		 (lambda (acct value)
 		   (let ((collector (gnc:make-commodity-collector))
 			 (commodity (xaccAccountGetCommodity acct))
-			 (name (gnc:account-get-name acct)))
+			 (name (xaccAccountGetName acct)))
 		     (collector 'add commodity value)
 		     (add-subtotal-row table used-columns collector
 				       "grand-total" name)))
@@ -439,14 +439,14 @@
 
 	    (if (and show-payments lot)
 		(let ((splits (sort-list!
-			       (gnc:lot-get-splits lot)
+			       (gnc-lot-get-split-list lot)
 			       (lambda (s1 s2)
-				 (let ((t1 (gnc:split-get-parent s1))
-				       (t2 (gnc:split-get-parent s2)))
-				   (< (gnc:transaction-order t1 t2) 0))))))
+				 (let ((t1 (xaccSplitGetParent s1))
+				       (t2 (xaccSplitGetParent s2)))
+				   (< (xaccTransOrder t1 t2) 0))))))
 		  (for-each
 		   (lambda (split)
-		     (if (not (equal? (gnc:split-get-parent split) txn))
+		     (if (not (equal? (xaccSplitGetParent split) txn))
 			 (add-payment-row table used-columns
 					  split total-collector)))
 		   splits)))

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -155,7 +155,7 @@
 
     (for-each
      (lambda (lot)
-       (let* ((bal (gnc:lot-get-balance lot))
+       (let* ((bal (gnc-lot-get-balance lot))
 	      (invoice (gncInvoiceGetInvoiceFromLot lot))
 	      (post-date (gncInvoiceGetDatePosted invoice)))
 
@@ -192,11 +192,11 @@
 ;;
 (define (add-txn-row table txn acc column-vector odd-row? printed?
 		     inv-str reverse? start-date total)
-  (let* ((type (gnc:transaction-get-txn-type txn))
-	 (date (gnc:transaction-get-date-posted txn))
+  (let* ((type (xaccTransGetTxnType txn))
+	 (date (gnc-transaction-get-date-posted txn))
 	 (due-date #f)
-	 (value (gnc:transaction-get-account-value txn acc))
-	 (split (gnc:transaction-get-split txn 0))
+	 (value (xaccTransGetAccountValue txn acc))
+	 (split (xaccTransGetSplit txn 0))
 	 (invoice (gncInvoiceGetInvoiceFromTxn txn))
 	 (currency (xaccTransGetCurrency txn))
 	 (type-str
@@ -258,8 +258,8 @@
 	  (if invoice
 	      (set! due-date (gncInvoiceGetDateDue invoice)))
 
-	  (let ((row (make-row date due-date (gnc:transaction-get-num txn)
-			       type-str (gnc:split-get-memo split) value))
+	  (let ((row (make-row date due-date (xaccTransGetNum txn)
+			       type-str (xaccSplitGetMemo split) value))
 		(row-style (if odd-row? "normal-row" "alternate-row")))
 
 	    (gnc:html-table-append-row/markup! table row-style
@@ -288,13 +288,13 @@
      (make-heading-list used-columns))
 
     ; Order the transactions properly
-    (set! txns (sort txns (lambda (a b) (> 0 (gnc:transaction-order a b)))))
+    (set! txns (sort txns (lambda (a b) (> 0 (xaccTransOrder a b)))))
 
     (let ((printed? #f)
 	  (odd-row? #t))
       (for-each
        (lambda (txn)
-	 (let ((type (gnc:transaction-get-txn-type txn)))
+	 (let ((type (xaccTransGetTxnType txn)))
 	   (if
 	    (or (equal? type gnc:transaction-type-invoice)
 		(equal? type gnc:transaction-type-payment))
@@ -629,14 +629,14 @@
   (define (find-first group num index)
     (if (>= index num)
 	'()
-	(let* ((this-account (gnc:group-get-account group index))
+	(let* ((this-account (xaccGroupGetAccount group index))
 	       (account-type (xaccAccountGetType this-account)))
 	  (if (eq? account-type type)
 	      this-account
 	      (find-first group num (+ index 1))))))
 
   (let* ((current-group (gnc-get-current-group))
-	 (num-accounts (gnc:group-get-num-accounts
+	 (num-accounts (xaccGroupGetNumAccounts
 			current-group)))
     (if (> num-accounts 0)
 	(find-first current-group num-accounts 0)

Modified: gnucash/branches/swig-redo/src/engine/engine-interface.scm
===================================================================
--- gnucash/branches/swig-redo/src/engine/engine-interface.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/engine/engine-interface.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -95,15 +95,15 @@
 ;; for editing.
 (define (gnc:split->split-scm split use-cut-semantics?)
   (gnc:make-split-scm
-   (gnc:split-get-guid split)
-   (gnc:account-get-guid (gnc:split-get-account split))
-   (gnc:transaction-get-guid (gnc:split-get-parent split))
-   (gnc:split-get-memo split)
-   (gnc:split-get-action split)
-   (gnc:split-get-reconcile-state split)
-   (gnc:split-get-reconciled-date split)
-   (gnc:split-get-amount split)
-   (gnc:split-get-value split)))
+   (gncSplitGetGUID split)
+   (gncAccountGetGUID (xaccSplitGetAccount split))
+   (gncTransGetGUID (xaccSplitGetParent split))
+   (xaccSplitGetMemo split)
+   (xaccSplitGetAction split)
+   (xaccSplitGetReconcile split)
+   (gnc-split-get-date-reconciled split)
+   (xaccSplitGetAmount split)
+   (xaccSplitGetValue split)))
 
 ;; Copy a scheme representation of a split onto a C split.
 ;; If possible, insert the C split into the account of the
@@ -118,18 +118,18 @@
               (action   (gnc:split-scm-get-action split-scm))
               (amount   (gnc:split-scm-get-amount split-scm))
               (value    (gnc:split-scm-get-value split-scm)))
-          (if memo     (gnc:split-set-memo split memo))
-          (if action   (gnc:split-set-action split action))
-          (if amount   (gnc:split-set-amount split amount))
-          (if value    (gnc:split-set-value split value)))
-        (let ((account (gnc:account-lookup
+          (if memo     (xaccSplitSetMemo split memo))
+          (if action   (xaccSplitSetAction split action))
+          (if amount   (xaccSplitSetAmount split amount))
+          (if value    (xaccSplitSetValue split value)))
+        (let ((account (xaccAccountLookup
                         (gnc:split-scm-get-account-guid split-scm)
                         book)))
           (if account
               (begin
-                (gnc:account-begin-edit account)
-                (gnc:account-insert-split account split)
-                (gnc:account-commit-edit account)))))))
+                (xaccAccountBeginEdit account)
+                (xaccSplitSetAccount account split)
+                (xaccAccountCommitEdit account)))))))
 
 ;; Defines a scheme representation of a transaction.
 (define gnc:transaction-structure
@@ -218,23 +218,23 @@
 ;; a representation of it as a transaction-structure.
 (define (gnc:transaction->transaction-scm trans use-cut-semantics?)
   (define (trans-splits i)
-    (let ((split (gnc:transaction-get-split trans i)))
+    (let ((split (xaccTransGetSplit trans i)))
       (if (not split)
           '()
           (cons (gnc:split->split-scm split use-cut-semantics?)
                 (trans-splits (+ i 1))))))
   (gnc:make-transaction-scm
-   (gnc:transaction-get-guid trans)
+   (gncTransGetGUID trans)
    (xaccTransGetCurrency trans)
-   (gnc:transaction-get-date-entered trans)
+   (gnc-transaction-get-date-entered trans)
    (if use-cut-semantics?
-       (gnc:transaction-get-date-posted trans)
+       (gnc-transaction-get-date-posted trans)
        #f)
    (if use-cut-semantics?
-       (gnc:transaction-get-num trans)
+       (xaccTransGetNum trans)
        #f)
-   (gnc:transaction-get-description trans)
-   (gnc:transaction-get-notes trans)
+   (xaccTransGetDescription trans)
+   (xaccTransGetNotes trans)
    (trans-splits 0)))
 
 ;; Copy a scheme representation of a transaction onto a C transaction.
@@ -246,8 +246,8 @@
       #f
       (begin
         ;; open the transaction for editing
-        (if (not (gnc:transaction-is-open trans))
-            (gnc:transaction-begin-edit trans))
+        (if (not (xaccTransIsOpen trans))
+            (xaccTransBeginEdit trans))
 
         ;; copy in the transaction values
         (let ((currency    (gnc:transaction-scm-get-currency trans-scm))
@@ -256,22 +256,22 @@
               (notes       (gnc:transaction-scm-get-notes trans-scm))
               (date-posted (gnc:transaction-scm-get-date-posted trans-scm)))
           (if currency    (xaccTransSetCurrency trans currency))
-          (if description (gnc:transaction-set-description trans description))
-          (if num         (gnc:transaction-set-xnum trans num))
-          (if notes       (gnc:transaction-set-notes trans notes))
-          (if date-posted (gnc:transaction-set-date-time-pair
+          (if description (xaccTransactionSetDescription trans description))
+          (if num         (xaccTransSetNum trans num))
+          (if notes       (xaccTransSetNotes trans notes))
+          (if date-posted (gnc-transaction-set-date
                            trans date-posted)))
 
         ;; strip off the old splits
         (for-each (lambda (split)
-                    (gnc:split-destroy split)) 
-                  (gnc:transaction-get-splits trans))
+                    (xaccSplitDestroy split))
+                  (xaccTransGetSplits trans))
 
         ;; and put on the new ones! Please note they go in the *same*
         ;; order as in the original transaction. This is important.
         (for-each 
          (lambda (split-scm) 
-           (let* ((new-split (gnc:split-create book))
+           (let* ((new-split (xaccMallocSplit book))
                   (old-guid  (gnc:split-scm-get-account-guid split-scm))
                   (new-guid  (assoc-ref guid-mapping old-guid)))
              (if (not new-guid)
@@ -279,9 +279,9 @@
              (gnc:split-scm-set-account-guid split-scm new-guid)
              (gnc:split-scm-onto-split split-scm new-split book)
              (gnc:split-scm-set-account-guid split-scm old-guid)
-             (gnc:transaction-append-split trans new-split)))
+             (xaccTransAppendSplit trans new-split)))
          (gnc:transaction-scm-get-split-scms trans-scm))
         
         ;; close the transaction
         (if commit?
-            (gnc:transaction-commit-edit trans)))))
+            (xaccTransCommitEdit trans)))))

Modified: gnucash/branches/swig-redo/src/engine/engine-utilities.scm
===================================================================
--- gnucash/branches/swig-redo/src/engine/engine-utilities.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/engine/engine-utilities.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -22,9 +22,9 @@
 ;; Copyright 2000 Rob Browning <rlb at cs.utexas.edu>
 
 (define (gnc:group-map-all-accounts thunk group)
-  (let ((accounts (or (gnc:group-get-subaccounts group) '())))
+  (let ((accounts (or (xaccGroupGetSubAccountsSorted group) '())))
     (map thunk accounts)))
 
 (define (gnc:group-map-accounts thunk group)
-  (let ((accounts (or (gnc:group-get-account-list group) '())))
+  (let ((accounts (or (xaccGroupGetAccountListSorted group) '())))
     (map thunk accounts)))

Modified: gnucash/branches/swig-redo/src/engine/test/test-create-account.scm
===================================================================
--- gnucash/branches/swig-redo/src/engine/test/test-create-account.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/engine/test/test-create-account.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -9,10 +9,10 @@
 
   (let* ((session (qof-session-new))
          (book (qof-session-get-book session))
-         (group (gnc:malloc-account-group book))
-         (acct (gnc:malloc-account book)))
-    (gnc:account-begin-edit acct)
-    (gnc:account-set-name acct "foo")
-    (gnc:account-commit-edit acct)
-    (gnc:group-insert-account group acct))
+         (group (xaccMallocAccountGroup book))
+         (acct (xaccMallocAccount book)))
+    (xaccAccountBeginEdit acct)
+    (xaccAccountSetName acct "foo")
+    (xaccAccountCommitEdit acct)
+    (xaccGroupInsertAccount group acct))
   #t)

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/import-export/qif-import/qif-dialog-utils.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -9,39 +9,39 @@
 (use-modules (ice-9 regex))
 
 (define (default-stock-acct brokerage security)
-  (string-append brokerage (gnc:account-separator-string) security))
+  (string-append brokerage (gnc-get-account-separator-string) security))
 
 (define (default-dividend-acct brokerage security)
-  (string-append (_ "Dividends") (gnc:account-separator-string) 
-                 brokerage (gnc:account-separator-string) 
+  (string-append (_ "Dividends") (gnc-get-account-separator-string)
+                 brokerage (gnc-get-account-separator-string)
                  security))
 
 (define (default-interest-acct brokerage security) 
-  (string-append (_ "Interest") (gnc:account-separator-string) 
+  (string-append (_ "Interest") (gnc-get-account-separator-string)
                  brokerage
 		 (if (string=? security "")
 		  ""
-		  (string-append (gnc:account-separator-string)  
+		  (string-append (gnc-get-account-separator-string)
 				  security))))
 
 (define (default-capital-return-acct brokerage security) 
-  (string-append (_ "Cap Return") (gnc:account-separator-string) 
-                 brokerage (gnc:account-separator-string)  
+  (string-append (_ "Cap Return") (gnc-get-account-separator-string)
+                 brokerage (gnc-get-account-separator-string)
                  security))
 
 (define (default-cglong-acct brokerage security)
-  (string-append (_ "Cap. gain (long)") (gnc:account-separator-string) 
-                 brokerage (gnc:account-separator-string) 
+  (string-append (_ "Cap. gain (long)") (gnc-get-account-separator-string)
+                 brokerage (gnc-get-account-separator-string)
                  security))
 
 (define (default-cgmid-acct brokerage security)
-  (string-append (_ "Cap. gain (mid)") (gnc:account-separator-string) 
-                 brokerage (gnc:account-separator-string) 
+  (string-append (_ "Cap. gain (mid)") (gnc-get-account-separator-string)
+                 brokerage (gnc-get-account-separator-string)
                  security))
 
 (define (default-cgshort-acct brokerage security)
-  (string-append (_ "Cap. gain (short)") (gnc:account-separator-string) 
-                 brokerage (gnc:account-separator-string) 
+  (string-append (_ "Cap. gain (short)") (gnc-get-account-separator-string)
+                 brokerage (gnc-get-account-separator-string)
                  security))
 
 (define (default-equity-holding security) (_ "Retained Earnings"))
@@ -49,11 +49,11 @@
 (define (default-equity-account) (_ "Retained Earnings"))  
 
 (define (default-commission-acct brokerage) 
-  (string-append (_ "Commissions") (gnc:account-separator-string) 
+  (string-append (_ "Commissions") (gnc-get-account-separator-string)
                  brokerage))
 
 (define (default-margin-interest-acct brokerage) 
-  (string-append (_ "Margin Interest") (gnc:account-separator-string) 
+  (string-append (_ "Margin Interest") (gnc-get-account-separator-string)
                  brokerage))
 
 (define (default-unspec-acct)
@@ -567,7 +567,7 @@
   (if (not qif-import:account-name-regexp)
       (let* ((rstr ":([^:]+)$|^([^:]+)$")
              (newstr (regexp-substitute/global 
-                      #f ":" rstr 'pre (gnc:account-separator-string) 'post)))
+                      #f ":" rstr 'pre (gnc-get-account-separator-string) 'post)))
         
         (set! qif-import:account-name-regexp (make-regexp newstr))))
   
@@ -604,12 +604,12 @@
                   (memv GNC-MUTUAL-TYPE 
                         (qif-map-entry:allowed-types map-entry)))
               (not (hash-ref stock-hash stock-name)))
-             (let* ((separator (string-ref (gnc:account-separator-string) 0))
+             (let* ((separator (string-ref (gnc-get-account-separator-string) 0))
                     (existing-gnc-acct 
-                     (gnc:get-account-from-full-name 
+                     (xaccGetAccountFromFullName
                       (gnc-get-current-group)
                       (qif-map-entry:gnc-name map-entry)))
-		    (book (gnc:group-get-book (gnc-get-current-group)))
+		    (book (xaccGroupGetBook (gnc-get-current-group)))
                     (existing-type 
                      (xaccAccountGetType existing-gnc-acct)))
                (if (and existing-gnc-acct 
@@ -685,7 +685,7 @@
 
   (let ((accts '())
         (acct-tree '())
-        (separator (string-ref (gnc:account-separator-string) 0)))
+        (separator (string-ref (gnc-get-account-separator-string) 0)))
     ;; get the new accounts from the account map
     (for-each 
      (lambda (acctmap)
@@ -713,7 +713,7 @@
                      separator)
                     #f)
               accts)))
-     (gnc:group-get-subaccounts (gnc-get-current-group)))
+     (xaccGroupGetSubAccountsSorted (gnc-get-current-group)))
 
     ;; now build a tree structure 
     (for-each 

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/import-export/qif-import/qif-guess-map.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -28,23 +28,23 @@
   (define (extract-all-account-info agroup root-name)
     (if (not agroup)
         '()
-        (let ((children-list (gnc:group-get-account-list agroup))
+        (let ((children-list (xaccGroupGetAccountListSorted agroup))
               (names '()))
           
           ;; now descend the tree of child accounts.
           (for-each 
            (lambda (child-acct)
-             (let* ((name (gnc:account-get-name child-acct))
+             (let* ((name (xaccAccountGetName child-acct))
                     (fullname 
                      (if (string? root-name)
                          (string-append root-name 
-                                        (gnc:account-separator-string)
+                                        (gnc-get-account-separator-string)
                                         name)
                          name)))
                (set! names 
                      (append (cons (list name fullname child-acct)
                                    (extract-all-account-info 
-                                    (gnc:account-get-children child-acct)
+                                    (xaccAccountGetChildren child-acct)
                                     fullname))
                              names))))
            children-list)

Modified: gnucash/branches/swig-redo/src/import-export/qif-import/qif-merge-groups.scm
===================================================================
--- gnucash/branches/swig-redo/src/import-export/qif-import/qif-merge-groups.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/import-export/qif-import/qif-merge-groups.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -9,12 +9,12 @@
   (let ((query (qof-query-create-for-splits))
         (xtns #f))
 
-    (qof-query-set-book query (gnc:group-get-book group))
+    (qof-query-set-book query (xaccGroupGetBook group))
 
     ;; we want to find all transactions with every split inside the
     ;; account group.
     (xaccQueryAddAccountMatch query
-                                 (gnc:group-get-subaccounts group)
+                                 (xaccGroupGetSubAccountsSorted group)
                                  QOF-GUID-MATCH-ANY QOF-QUERY-AND)
 
     (set! xtns (xaccQueryGetTransactions query QUERY-TXN-MATCH-ALL))
@@ -59,15 +59,15 @@
 		progress-dialog (/ work-done work-to-do))
 	       (gnc-progress-dialog-update progress-dialog)))
 
-	 (qof-query-set-book query (gnc:group-get-book old-group))
+	 (qof-query-set-book query (xaccGroupGetBook old-group))
 
 	 ;; first, we want to find only transactions from the old group.
 	 (xaccQueryAddAccountMatch query
-				      (gnc:group-get-subaccounts old-group)
+				      (xaccGroupGetSubAccountsSorted old-group)
 				      QOF-GUID-MATCH-ANY QOF-QUERY-AND)
          
          ;; the date should be close to the same.. +/- a week. 
-         (let ((date (gnc:transaction-get-date-posted xtn)))               
+         (let ((date (gnc-transaction-get-date-posted xtn)))
            (xaccQueryAddDateMatchTS
             query #t (decdate date WeekDelta) #t (incdate date WeekDelta)
             QOF-QUERY-AND))
@@ -78,7 +78,7 @@
            (for-each 
             (lambda (split)
               (let ((sq (qof-query-create-for-splits)))
-		(qof-query-set-book sq (gnc:group-get-book old-group))
+		(qof-query-set-book sq (xaccGroupGetBook old-group))
                 
                 ;; we want to match the account in the old group that
                 ;; has the same name as an account in the new group.  If
@@ -87,16 +87,16 @@
                 ;; this later.
                 (xaccQueryAddSingleAccountMatch
                  sq 
-                 (gnc:get-account-from-full-name
+                 (xaccGetAccountFromFullName
                   old-group (gnc-account-get-full-name
-                             (gnc:split-get-account split)))
+                             (xaccSplitGetAccount split)))
                  QOF-QUERY-AND)
                 
                 ;; we want the value for the split to match the value
                 ;; the old-group split.  We should really check for
                 ;; fuzziness.
                 (xaccQueryAddValueMatch
-                 sq (gnc:split-get-value split)
+                 sq (xaccSplitGetValue split)
                  QOF-NUMERIC-MATCH-ANY QOF-COMPARE-EQUAL
                  QOF-QUERY-AND)
                 
@@ -108,7 +108,7 @@
                   (qof-query-destroy q-splits)
                   (qof-query-destroy sq)
                   (set! q-splits q-new))))
-            (gnc:transaction-get-splits xtn))
+            (xaccTransGetSplits xtn))
            
            ;; now q-splits will match any split that is the same as one
            ;; split in the old-group xtn.  Merge it in.
@@ -151,14 +151,14 @@
         matches)
        (if do-delete 
            (begin 
-             (gnc:transaction-begin-edit new-xtn)
-             (gnc:transaction-destroy new-xtn)
-             (gnc:transaction-commit-edit new-xtn)))))
+             (xaccTransBeginEdit new-xtn)
+             (xaccTransDestroy new-xtn)
+             (xaccTransCommitEdit new-xtn)))))
    match-list))
 
 (define (gnc:group-catenate-and-merge old-group new-group)
   ;; stuff the new accounts into the old group and merge the accounts
-  (gnc:group-concat-group old-group new-group)
-  (gnc:account-group-begin-edit new-group)
-  (gnc:account-group-destroy new-group)
-  (gnc:group-merge-accounts old-group))
+  (xaccGroupConcatGroup old-group new-group)
+  (xaccAccountGroupBeginEdit new-group)
+  (xaccAccountGroupDestroy new-group)
+  (xaccGroupMergeAccounts old-group))

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/import-export/qif-import/qif-to-gnc.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -15,11 +15,11 @@
 (define (qif-import:find-or-make-acct acct-info check-types? commodity
 				      check-commodity? default-currency
                                       gnc-acct-hash old-group new-group)
-  (let* ((separator (string-ref (gnc:account-separator-string) 0))
+  (let* ((separator (string-ref (gnc-get-account-separator-string) 0))
          (gnc-name (qif-map-entry:gnc-name acct-info))
          (existing-account (hash-ref gnc-acct-hash gnc-name))
          (same-gnc-account 
-          (gnc:get-account-from-full-name old-group gnc-name))
+          (xaccGetAccountFromFullName old-group gnc-name))
          (allowed-types 
           (qif-map-entry:allowed-types acct-info))
          (make-new-acct #f)
@@ -38,12 +38,12 @@
 	     #t))))
     
     (define (make-unique-name-variant long-name short-name)
-      (if (gnc:get-account-from-full-name old-group long-name)
+      (if (xaccGetAccountFromFullName old-group long-name)
           (let loop ((count 2))
             (let* ((test-name 
                     (string-append long-name (sprintf #f " %a" count)))
                    (test-acct 
-                    (gnc:get-account-from-full-name old-group test-name)))
+                    (xaccGetAccountFromFullName old-group test-name)))
               (if (and test-acct (not (compatible? test-acct)))
                   (loop (+ 1 count))
                   (string-append short-name (sprintf #f " %a" count)))))
@@ -79,32 +79,32 @@
     ;; acct)
     (if (and existing-account (compatible? existing-account))
         existing-account 
-        (let ((new-acct (gnc:malloc-account (gnc-get-current-book)))
+        (let ((new-acct (xaccMallocAccount (gnc-get-current-book)))
               (parent-acct #f)
               (parent-name #f)
               (acct-name #f)
               (last-colon #f))
           (set! last-colon (string-rindex gnc-name separator))
           
-          (gnc:account-begin-edit new-acct)
+          (xaccAccountBeginEdit new-acct)
           
           ;; if this is a copy of an existing gnc account, copy the
           ;; account properties.  For incompatible existing accts,
           ;; we'll do something different later.
           (if same-gnc-account
               (begin 
-                (gnc:account-set-name 
-                 new-acct (gnc:account-get-name same-gnc-account))
-                (gnc:account-set-description
-                 new-acct (gnc:account-get-description same-gnc-account))
+                (xaccAccountSetName
+                 new-acct (xaccAccountGetName same-gnc-account))
+                (xaccAccountSetDescription
+                 new-acct (xaccAccountGetDescription same-gnc-account))
                 (xaccAccountSetType
                  new-acct (xaccAccountGetType same-gnc-account))
                 (xaccAccountSetCommodity
                  new-acct (xaccAccountGetCommodity same-gnc-account))
-                (gnc:account-set-notes 
-                 new-acct (gnc:account-get-notes same-gnc-account))
-                (gnc:account-set-code 
-                 new-acct (gnc:account-get-code same-gnc-account))))
+                (xaccAccountSetNotes
+                 new-acct (xaccAccountGetNotes same-gnc-account))
+                (xaccAccountSetCode
+                 new-acct (xaccAccountGetCode same-gnc-account))))
           
           ;; make sure that if this is a nested account foo:bar:baz,
           ;; foo:bar and foo exist also.
@@ -121,9 +121,9 @@
           (if make-new-acct
               (begin 
                 ;; set the name, description, etc.
-                (gnc:account-set-name new-acct acct-name)
+                (xaccAccountSetName new-acct acct-name)
                 (if (qif-map-entry:description acct-info)
-                    (gnc:account-set-description 
+                    (xaccAccountSetDescription
                      new-acct (qif-map-entry:description acct-info)))
                 (xaccAccountSetCommodity new-acct commodity)
                 
@@ -133,8 +133,8 @@
                 (if incompatible-acct
                     (let ((new-name (make-unique-name-variant 
                                      gnc-name acct-name)))
-                      (gnc:account-set-name new-acct new-name)
-                      (gnc:account-set-description 
+                      (xaccAccountSetName new-acct new-name)
+                      (xaccAccountSetDescription
                        new-acct 
                        (_ "QIF import: Name conflict with another account."))))
                 
@@ -142,7 +142,7 @@
                 (if (qif-map-entry:allowed-types acct-info)
                     (xaccAccountSetType
                      new-acct (car (qif-map-entry:allowed-types acct-info))))))
-          (gnc:account-commit-edit new-acct)
+          (xaccAccountCommitEdit new-acct)
 
           (if last-colon
               (let ((pinfo (make-qif-map-entry)))
@@ -157,8 +157,8 @@
                                    pinfo #t default-currency #f default-currency
                                    gnc-acct-hash old-group new-group))))
           (if parent-acct
-              (gnc:account-insert-subaccount parent-acct new-acct)
-              (gnc:group-insert-account new-group new-acct))
+              (xaccAccountInsertSubAccount parent-acct new-acct)
+              (xaccGroupInsertAccount new-group new-acct))
           
           (hash-set! gnc-acct-hash gnc-name new-acct)
           new-acct))))
@@ -178,9 +178,9 @@
   (gnc:backtrace-if-exception 
    (lambda ()
      (let* ((old-group (gnc-get-current-group))
-            (new-group (gnc:malloc-account-group (gnc-get-current-book)))
+            (new-group (xaccMallocAccountGroup (gnc-get-current-book)))
             (gnc-acct-hash (make-hash-table 20))
-            (separator (string-ref (gnc:account-separator-string) 0))
+            (separator (string-ref (gnc-get-account-separator-string) 0))
             (default-currency 
               (gnc-commodity-table-find-full
                (gnc-commodity-table-get-table (gnc-get-current-book))
@@ -333,9 +333,9 @@
              (if (not (qif-xtn:mark xtn))
                  (begin 
                    ;; create and fill in the GNC transaction
-                   (let ((gnc-xtn (gnc:transaction-create
+                   (let ((gnc-xtn (xaccMallocTransaction
                                    (gnc-get-current-book))))
-                     (gnc:transaction-begin-edit gnc-xtn)
+                     (xaccTransBeginEdit gnc-xtn)
 
                      ;; FIXME. This is probably wrong
                      (xaccTransSetCurrency gnc-xtn
@@ -347,7 +347,7 @@
                       qif-acct-map qif-cat-map qif-memo-map)
                      
                      ;; rebalance and commit everything
-                     (gnc:transaction-commit-edit gnc-xtn)))))
+                     (xaccTransCommitEdit gnc-xtn)))))
            (qif-file:xtns qif-file)))
         sorted-qif-files-list)
        
@@ -367,7 +367,7 @@
                                        gnc-acct-hash 
                                        qif-acct-map qif-cat-map qif-memo-map)
   (let ((splits (qif-xtn:splits qif-xtn))
-        (gnc-near-split (gnc:split-create (gnc-get-current-book)))
+        (gnc-near-split (xaccMallocSplit (gnc-get-current-book)))
         (near-split-total (gnc-numeric-zero))
         (near-acct-info #f)
         (near-acct-name #f)
@@ -386,24 +386,24 @@
         (n/ (lambda (a b) (gnc-numeric-div a b 0 GNC-DENOM-REDUCE))))
     
     ;; set properties of the whole transaction     
-    (apply gnc:transaction-set-date gnc-xtn (qif-xtn:date qif-xtn))
+    (apply xaccTransSetDate gnc-xtn (qif-xtn:date qif-xtn))
     
     ;; fixme: bug #105 
     (if qif-payee
-        (gnc:transaction-set-description gnc-xtn qif-payee))
+        (xaccTransactionSetDescription gnc-xtn qif-payee))
     (if qif-number
-        (gnc:transaction-set-xnum gnc-xtn qif-number))
+        (xaccTransSetNum gnc-xtn qif-number))
     (if qif-memo
 	(begin
-	  (gnc:split-set-memo gnc-near-split qif-memo)
+	  (xaccSplitSetMemo gnc-near-split qif-memo)
 	  (if (or (not qif-payee)
 		  (equal? qif-payee ""))
-	      (gnc:transaction-set-description gnc-xtn qif-memo))))
+	      (xaccTransactionSetDescription gnc-xtn qif-memo))))
     
     (if (eq? qif-cleared 'cleared)        
-        (gnc:split-set-reconcile gnc-near-split #\c))
+        (xaccSplitSetReconcile gnc-near-split #\c))
     (if (eq? qif-cleared 'reconciled)
-        (gnc:split-set-reconcile gnc-near-split #\y))
+        (xaccSplitSetReconcile gnc-near-split #\y))
     
     (if (not qif-security)
         (begin 
@@ -420,7 +420,7 @@
           (for-each 
            (lambda (qif-split)
              (if (not (qif-split:mark qif-split))
-                 (let ((gnc-far-split (gnc:split-create
+                 (let ((gnc-far-split (xaccMallocSplit
                                        (gnc-get-current-book)))
                        (far-acct-info #f)
                        (far-acct-name #f)
@@ -435,10 +435,10 @@
                    ;; files in multiple currencies by pulling the
                    ;; currency value from the file import.
                    (set! near-split-total (n+ near-split-total split-amt))
-                   (gnc:split-set-value gnc-far-split (n- split-amt))
-                   (gnc:split-set-amount gnc-far-split (n- split-amt))
+                   (xaccSplitSetValue gnc-far-split (n- split-amt))
+                   (xaccSplitSetAmount gnc-far-split (n- split-amt))
 
-                   (if memo (gnc:split-set-memo gnc-far-split memo))
+                   (if memo (xaccSplitSetMemo gnc-far-split memo))
                    
                    ;; figure out what the far acct is
                    (cond 
@@ -475,20 +475,20 @@
                    ;; set the reconcile status. 
                    (let ((cleared (qif-split:matching-cleared qif-split)))
                      (if (eq? 'cleared cleared)
-                         (gnc:split-set-reconcile gnc-far-split #\c))
+                         (xaccSplitSetReconcile gnc-far-split #\c))
                      (if (eq? 'reconciled cleared)
-                         (gnc:split-set-reconcile gnc-far-split #\y)))
+                         (xaccSplitSetReconcile gnc-far-split #\y)))
                    
                    ;; finally, plug the split into the account 
-                   (gnc:account-insert-split far-acct gnc-far-split)
-                   (gnc:transaction-append-split gnc-xtn gnc-far-split))))
+                   (xaccSplitSetAccount far-acct gnc-far-split)
+                   (xaccTransAppendSplit gnc-xtn gnc-far-split))))
            splits)
           
           ;; the value of the near split is the total of the far splits.
-          (gnc:split-set-value gnc-near-split near-split-total)
-          (gnc:split-set-amount gnc-near-split near-split-total)
-          (gnc:transaction-append-split gnc-xtn gnc-near-split)
-          (gnc:account-insert-split near-acct gnc-near-split))
+          (xaccSplitSetValue gnc-near-split near-split-total)
+          (xaccSplitSetAmount gnc-near-split near-split-total)
+          (xaccTransAppendSplit gnc-xtn gnc-near-split)
+          (xaccSplitSetAccount near-acct gnc-near-split))
         
         ;; STOCK TRANSACTIONS: the near/far accounts depend on the
         ;; "action" encoded in the Number field.  It's generally the
@@ -509,7 +509,7 @@
                (commission-amt (qif-xtn:commission qif-xtn))
                (commission-split #f)
                (defer-share-price #f)
-               (gnc-far-split (gnc:split-create (gnc-get-current-book))))
+               (gnc-far-split (xaccMallocSplit (gnc-get-current-book))))
           
           (if (not num-shares) (set! num-shares (gnc-numeric-zero)))
           (if (not share-price) (set! share-price (gnc-numeric-zero)))
@@ -550,45 +550,45 @@
           (case qif-action
             ((buy buyx reinvint reinvdiv reinvsg reinvsh reinvmd reinvlg)
              (if (not share-price) (set! share-price (gnc-numeric-zero)))
-             (gnc:split-set-amount gnc-near-split num-shares)
-             (gnc:split-set-value gnc-near-split split-amt)
-             (gnc:split-set-value gnc-far-split (n- xtn-amt))
-             (gnc:split-set-amount gnc-far-split (n- xtn-amt)))
+             (xaccSplitSetAmount gnc-near-split num-shares)
+             (xaccSplitSetValue gnc-near-split split-amt)
+             (xaccSplitSetValue gnc-far-split (n- xtn-amt))
+             (xaccSplitSetAmount gnc-far-split (n- xtn-amt)))
             
             ((sell sellx) 
              (if (not share-price) (set! share-price (gnc-numeric-zero)))
-             (gnc:split-set-amount gnc-near-split (n- num-shares))
-             (gnc:split-set-value gnc-near-split (n- split-amt))
-             (gnc:split-set-value gnc-far-split xtn-amt)
-             (gnc:split-set-amount gnc-far-split xtn-amt))
+             (xaccSplitSetAmount gnc-near-split (n- num-shares))
+             (xaccSplitSetValue gnc-near-split (n- split-amt))
+             (xaccSplitSetValue gnc-far-split xtn-amt)
+             (xaccSplitSetAmount gnc-far-split xtn-amt))
             
             ((cgshort cgshortx cgmid cgmidx cglong cglongx intinc intincx 
                       div divx miscinc miscincx xin rtrncap rtrncapx)
-             (gnc:split-set-value gnc-near-split xtn-amt)
-             (gnc:split-set-amount gnc-near-split xtn-amt)
-             (gnc:split-set-value gnc-far-split (n- xtn-amt))
-             (gnc:split-set-amount gnc-far-split (n- xtn-amt)))
+             (xaccSplitSetValue gnc-near-split xtn-amt)
+             (xaccSplitSetAmount gnc-near-split xtn-amt)
+             (xaccSplitSetValue gnc-far-split (n- xtn-amt))
+             (xaccSplitSetAmount gnc-far-split (n- xtn-amt)))
             
             ((xout miscexp miscexpx margint margintx)
-             (gnc:split-set-value gnc-near-split (n- xtn-amt))
-             (gnc:split-set-amount gnc-near-split (n- xtn-amt))
-             (gnc:split-set-value gnc-far-split  xtn-amt)
-             (gnc:split-set-amount gnc-far-split  xtn-amt))
+             (xaccSplitSetValue gnc-near-split (n- xtn-amt))
+             (xaccSplitSetAmount gnc-near-split (n- xtn-amt))
+             (xaccSplitSetValue gnc-far-split  xtn-amt)
+             (xaccSplitSetAmount gnc-far-split  xtn-amt))
             
             ((shrsin)
              ;; getting rid of the old equity-acct-per-stock trick.
              ;; you must now have a cash/basis value for the stock.
-             (gnc:split-set-amount gnc-near-split num-shares)
-             (gnc:split-set-value gnc-near-split split-amt)
-             (gnc:split-set-value gnc-far-split (n- xtn-amt))
-             (gnc:split-set-amount gnc-far-split (n- xtn-amt)))
+             (xaccSplitSetAmount gnc-near-split num-shares)
+             (xaccSplitSetValue gnc-near-split split-amt)
+             (xaccSplitSetValue gnc-far-split (n- xtn-amt))
+             (xaccSplitSetAmount gnc-far-split (n- xtn-amt)))
             
             ((shrsout)
              ;; shrsout is like shrsin             
-             (gnc:split-set-amount gnc-near-split (n- num-shares))
-             (gnc:split-set-value gnc-near-split (n- split-amt))
-             (gnc:split-set-value gnc-far-split xtn-amt)
-             (gnc:split-set-amount gnc-far-split xtn-amt))
+             (xaccSplitSetAmount gnc-near-split (n- num-shares))
+             (xaccSplitSetValue gnc-near-split (n- split-amt))
+             (xaccSplitSetValue gnc-far-split xtn-amt)
+             (xaccSplitSetAmount gnc-far-split xtn-amt))
             
             ;; stock splits: QIF just specifies the split ratio, not
             ;; the number of shares in and out, so we have to fetch
@@ -599,19 +599,19 @@
             ((stksplit)
              (let* ((splitratio (n/ num-shares (gnc-numeric-create 10 1)))
                     (in-shares 
-                     (gnc:account-get-balance near-acct))
+                     (xaccAccountGetBalance near-acct))
                     (out-shares (n* in-shares splitratio)))
-               (gnc:split-set-amount gnc-near-split out-shares)
-               (gnc:split-set-amount gnc-far-split (n- in-shares))
-               (gnc:split-set-value gnc-near-split (n- split-amt))
-               (gnc:split-set-value gnc-far-split split-amt))))
+               (xaccSplitSetAmount gnc-near-split out-shares)
+               (xaccSplitSetAmount gnc-far-split (n- in-shares))
+               (xaccSplitSetValue gnc-near-split (n- split-amt))
+               (xaccSplitSetValue gnc-far-split split-amt))))
           
           (let ((cleared (qif-split:matching-cleared 
                           (car (qif-xtn:splits qif-xtn)))))
             (if (eq? 'cleared cleared)
-                (gnc:split-set-reconcile gnc-far-split #\c))
+                (xaccSplitSetReconcile gnc-far-split #\c))
             (if (eq? 'reconciled cleared)
-                (gnc:split-set-reconcile gnc-far-split #\y)))
+                (xaccSplitSetReconcile gnc-far-split #\y)))
           
           (if qif-commission-acct
               (let* ((commission-acct-info 
@@ -624,23 +624,23 @@
           
           (if (and commission-amt commission-acct)
               (begin 
-                (set! commission-split (gnc:split-create
+                (set! commission-split (xaccMallocSplit
                                         (gnc-get-current-book)))
-                (gnc:split-set-value commission-split commission-amt)
-                (gnc:split-set-amount commission-split commission-amt)))
+                (xaccSplitSetValue commission-split commission-amt)
+                (xaccSplitSetAmount commission-split commission-amt)))
 
           (if (and qif-near-acct qif-far-acct)
               (begin 
-                (gnc:transaction-append-split gnc-xtn gnc-near-split)
-                (gnc:account-insert-split near-acct gnc-near-split)
+                (xaccTransAppendSplit gnc-xtn gnc-near-split)
+                (xaccSplitSetAccount near-acct gnc-near-split)
                 
-                (gnc:transaction-append-split gnc-xtn gnc-far-split)
-                (gnc:account-insert-split far-acct gnc-far-split)
+                (xaccTransAppendSplit gnc-xtn gnc-far-split)
+                (xaccSplitSetAccount far-acct gnc-far-split)
                 
                 (if commission-split
                     (begin 
-                      (gnc:transaction-append-split gnc-xtn commission-split)
-                      (gnc:account-insert-split commission-acct 
+                      (xaccTransAppendSplit gnc-xtn commission-split)
+                      (xaccSplitSetAccount commission-acct
                                                 commission-split)))))))
     ;; return the modified transaction (though it's ignored).
     gnc-xtn))

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-acct-table.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -49,7 +49,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define (qif-io:acct-table-make-gnc-group acct-table qif-file commodity)
-  (let ((group (gnc:malloc-account-group (gnc-get-current-book))))
+  (let ((group (xaccMallocAccountGroup (gnc-get-current-book))))
     ;; poke through the qif-file accounts to see if any of them
     ;; show up in the data 
     (let ((qif-acct-table (qif-io:acct-table-accounts acct-table)))
@@ -61,13 +61,13 @@
                 (gnc-acct (hash-ref qif-acct-table name)))
            (if gnc-acct
                (let ((gnc-type (qif-io:parse-acct-type type)))
-                 (gnc:account-begin-edit gnc-acct)
+                 (xaccAccountBeginEdit gnc-acct)
                  (if gnc-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)))))
+                     (xaccAccountSetDescription gnc-acct desc))
+                 (xaccAccountCommitEdit gnc-acct)))))
        (qif-io:file-accounts qif-file))
       
       (hash-fold
@@ -75,13 +75,13 @@
          (let ((cmdty (xaccAccountGetCommodity acct)))
            (if (not cmdty)
                (begin 
-                 (gnc:account-begin-edit acct)
+                 (xaccAccountBeginEdit acct)
                  (xaccAccountSetCommodity acct commodity)
-                 (gnc:account-commit-edit acct))))
+                 (xaccAccountCommitEdit acct))))
          (let ((type (xaccAccountGetType acct)))
            (if (= type -1)
                (xaccAccountSetType acct GNC-BANK-TYPE)))
-         (gnc:group-insert-account group acct)
+         (xaccGroupInsertAccount group acct)
          #t) #t (qif-io:acct-table-accounts acct-table)))
 
     ;; now the categories 
@@ -96,13 +96,13 @@
                 (gnc-acct (hash-ref qif-cat-table name)))
            (if gnc-acct
                (begin 
-                 (gnc:account-begin-edit gnc-acct)
+                 (xaccAccountBeginEdit gnc-acct)
                  (cond (income?
                         (xaccAccountSetType gnc-acct GNC-INCOME-TYPE))
                        (#t
                         (xaccAccountSetType gnc-acct GNC-EXPENSE-TYPE)))
-                 (gnc:account-set-description gnc-acct desc)
-                 (gnc:account-commit-edit gnc-acct)))))
+                 (xaccAccountSetDescription gnc-acct desc)
+                 (xaccAccountCommitEdit gnc-acct)))))
        (qif-io:file-categories qif-file))
 
       (hash-fold
@@ -110,13 +110,13 @@
          (let ((cmdty (xaccAccountGetCommodity acct)))
            (if (not cmdty)
                (begin 
-                 (gnc:account-begin-edit acct)
+                 (xaccAccountBeginEdit acct)
                  (xaccAccountSetCommodity acct commodity)
-                 (gnc:account-commit-edit acct))))
+                 (xaccAccountCommitEdit acct))))
          (let ((type (xaccAccountGetType acct)))
            (if (= type -1)
                (xaccAccountSetType acct GNC-EXPENSE-TYPE)))
-         (gnc:group-insert-account group acct)
+         (xaccGroupInsertAccount group acct)
          #t) #t (qif-io:acct-table-categories acct-table)))
 
     ;; the securities 

Modified: gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-bank-xtn-import.scm
===================================================================
--- gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-bank-xtn-import.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-bank-xtn-import.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -35,7 +35,7 @@
 (define (qif-io:bank-xtn-import qif-xtn qif-file gnc-acct-info commodity)
   (let* ((format-info 
           (qif-io:file-bank-xtn-format qif-file))
-         (gnc-xtn (gnc:transaction-create (gnc-get-current-book)))
+         (gnc-xtn (xaccMallocTransaction (gnc-get-current-book)))
          (near-split-amt
           ;; the u-amount has a larger range and is more correct,
           ;; but is optional
@@ -54,40 +54,40 @@
              (acct-type (cdr acct-info))
              (acct (qif-io:acct-table-lookup 
                     gnc-acct-info acct-name acct-type))
-             (split (gnc:split-create (gnc-get-current-book))))
+             (split (xaccMallocSplit (gnc-get-current-book))))
         ;; make the account if necessary 
         (if (not acct)
             (begin 
-              (set! acct (gnc:malloc-account (gnc-get-current-book)))
-              (gnc:account-begin-edit acct)
-              (gnc:account-set-name acct acct-name)
-              (gnc:account-commit-edit acct)
+              (set! acct (xaccMallocAccount (gnc-get-current-book)))
+              (xaccAccountBeginEdit acct)
+              (xaccAccountSetName acct acct-name)
+              (xaccAccountCommitEdit acct)
               (qif-io:acct-table-insert! gnc-acct-info 
                                          acct-name acct-type acct)))
         ;; fill in the split 
-        (gnc:split-set-amount split amount)
-        (gnc:split-set-value split amount)
-        (gnc:split-set-memo split memo)
-        (gnc:split-set-reconcile split reconcile)
+        (xaccSplitSetAmount split amount)
+        (xaccSplitSetValue split amount)
+        (xaccSplitSetMemo split memo)
+        (xaccSplitSetReconcile split reconcile)
         
         ;; add it to the account and the transaction
-        (gnc:account-begin-edit acct)
-        (gnc:account-insert-split acct split)
-        (gnc:account-commit-edit acct)
-        (gnc:transaction-append-split gnc-xtn split)
+        (xaccAccountBeginEdit acct)
+        (xaccSplitSetAccount acct split)
+        (xaccAccountCommitEdit acct)
+        (xaccTransAppendSplit gnc-xtn split)
         split))
 
-    (gnc:transaction-begin-edit gnc-xtn)
+    (xaccTransBeginEdit gnc-xtn)
     (xaccTransSetCurrency gnc-xtn commodity)
 
     ;; set the transaction date, number and description 
     (let ((date (qif-io:parse-date/format 
                  (qif-io:bank-xtn-date qif-xtn) 
                  (qif-io:bank-xtn-date format-info))))
-      (apply gnc:transaction-set-date gnc-xtn date))    
+      (apply xaccTransSetDate gnc-xtn date))
     
-    (gnc:transaction-set-xnum gnc-xtn (qif-io:bank-xtn-number qif-xtn))
-    (gnc:transaction-set-description gnc-xtn (qif-io:bank-xtn-payee qif-xtn))
+    (xaccTransSetNum gnc-xtn (qif-io:bank-xtn-number qif-xtn))
+    (xaccTransactionSetDescription gnc-xtn (qif-io:bank-xtn-payee qif-xtn))
     
     ;; create the near split (the one that goes to the source-acct)
     (let* ((near-acct-name (qif-io:bank-xtn-source-acct qif-xtn)))
@@ -141,6 +141,6 @@
              qif-splits))))
     
     ;; we're done.  
-    (gnc:transaction-commit-edit gnc-xtn)
+    (xaccTransCommitEdit gnc-xtn)
     gnc-xtn))
 

Modified: gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-invst-xtn-import.scm
===================================================================
--- gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-invst-xtn-import.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/import-export/qif-io-core/qif-invst-xtn-import.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -145,7 +145,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define (qif-io:invst-xtn-import qif-xtn qif-file gnc-acct-info commodity)
-  (let ((gnc-xtn (gnc:transaction-create (gnc-get-current-book)))
+  (let ((gnc-xtn (xaccMallocTransaction (gnc-get-current-book)))
         (format-info (qif-io:file-invst-xtn-format qif-file)))
     ;; utility to make a new split and add it both to an 
     ;; account and to the transaction
@@ -154,47 +154,47 @@
              (acct-type (cdr acct-info))
              (acct (qif-io:acct-table-lookup 
                     gnc-acct-info acct-name acct-type))
-             (split (gnc:split-create (gnc-get-current-book))))
+             (split (xaccMallocSplit (gnc-get-current-book))))
         ;; make the account if necessary 
         (if (not acct)
             (begin 
-              (set! acct (gnc:malloc-account (gnc-get-current-book)))
-              (gnc:account-set-name acct acct-name)
+              (set! acct (xaccMallocAccount (gnc-get-current-book)))
+              (xaccAccountSetName acct acct-name)
               (qif-io:acct-table-insert! gnc-acct-info 
                                          acct-name acct-type acct)))
         ;; fill in the split 
-        (gnc:split-set-amount split amount)
-        (gnc:split-set-value split value)
-        (gnc:split-set-memo split memo)
-        (gnc:split-set-reconcile split reconcile)
+        (xaccSplitSetAmount split amount)
+        (xaccSplitSetValue split value)
+        (xaccSplitSetMemo split memo)
+        (xaccSplitSetReconcile split reconcile)
         
         ;; add it to the account and the transaction
-        (gnc:account-begin-edit acct)
-        (gnc:account-insert-split acct split)
-        (gnc:account-commit-edit acct)
-        (gnc:transaction-append-split gnc-xtn split)
+        (xaccAccountBeginEdit acct)
+        (xaccSplitSetAccount acct split)
+        (xaccAccountCommitEdit acct)
+        (xaccTransAppendSplit gnc-xtn split)
         split))
 
     (define (lookup-balance acct-info)
       (let ((acct (qif-io:acct-table-lookup gnc-acct-info 
                                             (car acct-info) (cdr acct-info))))
-        (gnc:account-get-balance acct)))
+        (xaccAccountGetBalance acct)))
     
     (if (not (qif-io:invst-xtn-source-acct qif-xtn))
         (qif-io:invst-xtn-set-source-acct! 
          qif-xtn (qif-io:file-default-src-acct qif-file)))
     
-    (gnc:transaction-begin-edit gnc-xtn)
+    (xaccTransBeginEdit gnc-xtn)
     (xaccTransSetCurrency gnc-xtn commodity)
     
     ;; set the transaction date, number and description 
     (let ((date (qif-io:parse-date/format 
                  (qif-io:invst-xtn-date qif-xtn) 
                  (qif-io:invst-xtn-date format-info))))
-      (apply gnc:transaction-set-date gnc-xtn date))    
+      (apply xaccTransSetDate gnc-xtn date))
     
-    (gnc:transaction-set-xnum gnc-xtn (qif-io:invst-xtn-action qif-xtn))
-    (gnc:transaction-set-description gnc-xtn (qif-io:invst-xtn-payee qif-xtn))
+    (xaccTransSetNum gnc-xtn (qif-io:invst-xtn-action qif-xtn))
+    (xaccTransactionSetDescription gnc-xtn (qif-io:invst-xtn-payee qif-xtn))
     
     ;; get the relevant info, including 'near-acct' and 'far-acct', 
     ;; the accounts affected by the transaction
@@ -303,7 +303,7 @@
         (else 
          (throw 'qif-io:unhandled-action action))))
     
-    (gnc:transaction-commit-edit gnc-xtn)
+    (xaccTransCommitEdit gnc-xtn)
     gnc-xtn))
 
 

Modified: gnucash/branches/swig-redo/src/import-export/qif-io-core/test/test-import-phase-1.scm
===================================================================
--- gnucash/branches/swig-redo/src/import-export/qif-io-core/test/test-import-phase-1.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/import-export/qif-io-core/test/test-import-phase-1.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -62,8 +62,8 @@
         ;; write the file
         (let* ((name (simple-format #f "file:~A.gnc" filename)))
           (simple-format #t "using book name='~A'\n" name)
-          (gnc:group-concat-group (xaccGetAccountGroup book) group)
-	  (gnc:account-group-destroy group)
+          (xaccGroupConcatGroup (xaccGetAccountGroup book) group)
+	  (xaccAccountGroupDestroy group)
           (gnc:session-begin session name #t #t)
           (gnc:session-save session)
           (gnc:session-end session)

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf-de_DE.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -84,7 +84,7 @@
 
 (define (make-split-list account split-filter-pred)
   (reverse (filter split-filter-pred
-                   (gnc:account-get-split-list account))))
+                   (xaccAccountGetSplitList account))))
 
 ;; returns a predicate that returns true only if a split is
 ;; between early-date and late-date
@@ -92,8 +92,8 @@
                                                  end-date-tp)
   (lambda (split) 
     (let ((tp
-           (gnc:transaction-get-date-posted
-            (gnc:split-get-parent split))))
+           (gnc-transaction-get-date-posted
+            (xaccSplitGetParent split))))
       (and (gnc:timepair-ge-date tp begin-date-tp)
            (gnc:timepair-le-date tp end-date-tp)))))
 
@@ -192,11 +192,11 @@
   (member payer (list 'current 'parent)))
 
 (define (gnc:account-get-txf account)
-  (and (gnc:account-get-tax-related account)
+  (and (xaccAccountGetTaxRelated account)
        (not (equal? (gnc:account-get-txf-code account) 'N000))))
 
 (define (gnc:account-get-txf-code account)
-  (let ((code (gnc:account-get-tax-US-code account)))
+  (let ((code (xaccAccountGetTaxUSCode account)))
     (string->symbol (if code code "N000"))))
 
 (define (gnc:get-txf-format code income?)
@@ -206,7 +206,7 @@
                       code))
 
 (define (gnc:account-get-txf-payer-source account)
-  (let ((pns (gnc:account-get-tax-US-payer-name-source account)))
+  (let ((pns (xaccAccountGetTaxUSPayerNameSource account)))
     (string->symbol (if pns pns "keine"))))
 
 ;; check for duplicate txf codes
@@ -315,21 +315,21 @@
 	       (payer-src (gnc:account-get-txf-payer-source account))
                (account-name (let* ((named-acct
 				    (if (eq? payer-src 'parent)
-					(gnc:group-get-parent
-					 (gnc:account-get-parent account))
+					(xaccGroupGetParentAccount
+					 (xaccAccountGetParent account))
 					account))
-				    (name (gnc:account-get-name named-acct)))
+				    (name (xaccAccountGetName named-acct)))
 			       (if name
 				   name
 				   (begin
 				     (display
 				      (string-append
 				       "Failed to get name for account: "
-				       (gnc:account-get-guid named-acct)
+				       (gncAccountGetGUID named-acct)
 				       (if (not (eq? account named-acct))
 					   (string-append
 					    " which is the parent of "
-					    (gnc:account-get-guid account)))
+					    (gncAccountGetGUID account)))
 				       "\n"))
 				     "<NONE> -- See the Terminal Output"))))
                (action (if (eq? type ACCT-TYPE-INCOME)
@@ -387,7 +387,7 @@
                            (strftime "%d.%m.%Y" (localtime (car txf-date)))
                            (if (or full-names (equal? level 1))
                                (gnc-account-get-full-name account)
-                               (gnc:account-get-name account))))
+                               (xaccAccountGetName account))))
          (blue? (gnc:account-get-txf account))
          (print-info (gnc-account-print-info account #f))
          (value (xaccPrintAmount lx-value print-info))
@@ -431,12 +431,12 @@
 ;; Returns the Parent if a child or grandchild is valid.
 (define (validate accounts)
   (filter (lambda (a)
-            (if (gnc:account-get-tax-related a)
+            (if (xaccAccountGetTaxRelated a)
                 #t
                 ;; check children
                 (if (null? (validate
-                            (gnc:group-get-subaccounts
-                             (gnc:account-get-children a))))
+                            (xaccGroupGetSubAccountsSorted
+                             (xaccAccountGetChildren a))))
                     #f
                     #t)))
           accounts))
@@ -454,9 +454,9 @@
 
   ;; the number of account generations: children, grandchildren etc.
   (define (num-generations account gen)
-    (let ((children (gnc:account-get-children account)))
-      (if (eq? (gnc:group-get-num-accounts children) 0)
-          (if (and (gnc:account-get-tax-related account)
+    (let ((children (xaccAccountGetChildren account)))
+      (if (eq? (xaccGroupGetNumAccounts children) 0)
+          (if (and (xaccAccountGetTaxRelated account)
                    (txf-special-split? (gnc:account-get-txf-code account)))
               (+ gen 1)		; Est Fed Tax has a extra generation
               gen)	       		; no kids, return input
@@ -482,7 +482,7 @@
          (selected-accounts (if (not (null? user-sel-accnts))
                                 valid-user-sel-accnts
                                 (validate (reverse 
-                                           (gnc:group-get-account-list
+                                           (xaccGroupGetAccountListSorted
                                             (gnc-get-current-group))))))
          (generations (if (pair? selected-accounts)
                           (apply max (map (lambda (x) (num-generations x 1))
@@ -575,7 +575,7 @@
     ;; for quarterly estimated tax payments, we need a different period
     ;; return the sometimes changed (from-est to-est full-year?) dates
     (define (txf-special-splits-period account from-value to-value)
-      (if (and (gnc:account-get-tax-related account)
+      (if (and (xaccAccountGetTaxRelated account)
                (txf-special-split? (gnc:account-get-txf-code account)))
           (let* 
               ((full-year?
@@ -622,9 +622,9 @@
                      (+ 1 level)
                      level)))
         (map (lambda (spl) 
-               (let* ((date (gnc:transaction-get-date-posted 
-                             (gnc:split-get-parent spl)))
-                      (amount (gnc:split-get-amount spl))
+               (let* ((date (gnc-transaction-get-date-posted
+                             (xaccSplitGetParent spl)))
+                      (amount (xaccSplitGetAmount spl))
                       ;; TurboTax 1999 and 2000 ignore dates after Dec 31
                       (fudge-date (if (and full-year? 
                                            (gnc:timepair-lt to-value date))
@@ -656,7 +656,7 @@
 					    (/ work-done work-to-do)
 					    1)))
         (if (gnc:account-is-inc-exp? account)
-            (let* ((children (gnc:account-get-children account))
+            (let* ((children (xaccAccountGetChildren account))
                    (to-special #f)	; clear special-splits-period
                    (from-special #f)
                    (childrens-output 
@@ -680,10 +680,10 @@
                                    (handle-level-x-account (+ 1 level) x)
                                    '()))
                              (reverse 
-                              (gnc:group-get-account-list children)))))
+                              (xaccGroupGetAccountListSorted children)))))
 
                    (account-balance 
-                    (if (gnc:account-get-tax-related account)
+                    (if (xaccAccountGetTaxRelated account)
                         (if to-special
                             (gnc:account-get-balance-interval
                              account from-special to-special #f)

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/locale-specific/us/taxtxf.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -68,7 +68,7 @@
 
 (define (make-split-list account split-filter-pred)
   (reverse (filter split-filter-pred
-                   (gnc:account-get-split-list account))))
+                   (xaccAccountGetSplitList account))))
 
 ;; returns a predicate that returns true only if a split is
 ;; between early-date and late-date
@@ -76,8 +76,8 @@
                                                  end-date-tp)
   (lambda (split) 
     (let ((tp
-           (gnc:transaction-get-date-posted
-            (gnc:split-get-parent split))))
+           (gnc-transaction-get-date-posted
+            (xaccSplitGetParent split))))
       (and (gnc:timepair-ge-date tp begin-date-tp)
            (gnc:timepair-le-date tp end-date-tp)))))
 
@@ -176,11 +176,11 @@
   (member payer (list 'current 'parent)))
 
 (define (gnc:account-get-txf account)
-  (and (gnc:account-get-tax-related account)
+  (and (xaccAccountGetTaxRelated account)
        (not (equal? (gnc:account-get-txf-code account) 'N000))))
 
 (define (gnc:account-get-txf-code account)
-  (let ((code (gnc:account-get-tax-US-code account)))
+  (let ((code (xaccAccountGetTaxUSCode account)))
     (string->symbol (if code code "N000"))))
 
 (define (gnc:get-txf-format code income?)
@@ -190,7 +190,7 @@
                       code))
 
 (define (gnc:account-get-txf-payer-source account)
-  (let ((pns (gnc:account-get-tax-US-payer-name-source account)))
+  (let ((pns (xaccAccountGetTaxUSPayerNameSource account)))
     (string->symbol (if pns pns "none"))))
 
 ;; check for duplicate txf codes
@@ -290,21 +290,21 @@
                (payer-src (gnc:account-get-txf-payer-source account))
                (account-name (let* ((named-acct
 				    (if (eq? payer-src 'parent)
-					(gnc:group-get-parent
-					 (gnc:account-get-parent account))
+					(xaccGroupGetParentAccount
+					 (xaccAccountGetParent account))
 					account))
-				    (name (gnc:account-get-name named-acct)))
+				    (name (xaccAccountGetName named-acct)))
 			       (if name
 				   name
 				   (begin
 				     (display
 				      (string-append
 				       "Failed to get name for account: "
-				       (gnc:account-get-guid named-acct)
+				       (gncAccountGetGUID named-acct)
 				       (if (not (eq? account named-acct))
 					   (string-append
 					    " which is the parent of "
-					    (gnc:account-get-guid account)))
+					    (gncAccountGetGUID account)))
 				       "\n"))
 				     "<NONE> -- See the Terminal Output"))))
                (action (if (eq? type ACCT-TYPE-INCOME)
@@ -364,7 +364,7 @@
                            (strftime "%Y-%b-%d" (localtime (car txf-date)))
                            (if (or full-names (equal? level 1))
                                (gnc-account-get-full-name account)
-                               (gnc:account-get-name account))))
+                               (xaccAccountGetName account))))
          (blue? (gnc:account-get-txf account))
          (print-info (gnc-account-print-info account #f))
          (value (xaccPrintAmount lx-value print-info))
@@ -408,12 +408,12 @@
 ;; Returns the Parent if a child or grandchild is valid.
 (define (validate accounts)
   (filter (lambda (a)
-            (if (gnc:account-get-tax-related a)
+            (if (xaccAccountGetTaxRelated a)
                 #t
                 ;; check children
                 (if (null? (validate
-                            (gnc:group-get-subaccounts
-                             (gnc:account-get-children a))))
+                            (xaccGroupGetSubAccountsSorted
+                             (xaccAccountGetChildren a))))
                     #f
                     #t)))
           accounts))
@@ -431,9 +431,9 @@
 
   ;; the number of account generations: children, grandchildren etc.
   (define (num-generations account gen)
-    (let ((children (gnc:account-get-children account)))
-      (if (eq? (gnc:group-get-num-accounts children) 0)
-          (if (and (gnc:account-get-tax-related account)
+    (let ((children (xaccAccountGetChildren account)))
+      (if (eq? (xaccGroupGetNumAccounts children) 0)
+          (if (and (xaccAccountGetTaxRelated account)
                    (txf-special-split? (gnc:account-get-txf-code account)))
               (+ gen 1)		; Est Fed Tax has a extra generation
               gen)	       		; no kids, return input
@@ -459,7 +459,7 @@
          (selected-accounts (if (not (null? user-sel-accnts))
                                 valid-user-sel-accnts
                                 (validate (reverse 
-                                           (gnc:group-get-account-list
+                                           (xaccGroupGetAccountListSorted
                                             (gnc-get-current-group))))))
          (generations (if (pair? selected-accounts)
                           (apply max (map (lambda (x) (num-generations x 1))
@@ -552,7 +552,7 @@
     ;; for quarterly estimated tax payments, we need a different period
     ;; return the sometimes changed (from-est to-est full-year?) dates
     (define (txf-special-splits-period account from-value to-value)
-      (if (and (gnc:account-get-tax-related account)
+      (if (and (xaccAccountGetTaxRelated account)
                (txf-special-split? (gnc:account-get-txf-code account)))
           (let* 
               ((full-year?
@@ -599,9 +599,9 @@
                      (+ 1 level)
                      level)))
         (map (lambda (spl) 
-               (let* ((date (gnc:transaction-get-date-posted 
-                             (gnc:split-get-parent spl)))
-                      (amount (gnc:split-get-amount spl))
+               (let* ((date (gnc-transaction-get-date-posted
+                             (xaccSplitGetParent spl)))
+                      (amount (xaccSplitGetAmount spl))
                       ;; TurboTax 1999 and 2000 ignore dates after Dec 31
                       (fudge-date (if (and full-year? 
                                            (gnc:timepair-lt to-value date))
@@ -633,7 +633,7 @@
 					    (/ work-done work-to-do)
 					    1)))
         (if (gnc:account-is-inc-exp? account)
-            (let* ((children (gnc:account-get-children account))
+            (let* ((children (xaccAccountGetChildren account))
                    (to-special #f)	; clear special-splits-period
                    (from-special #f)
                    (childrens-output 
@@ -657,10 +657,10 @@
                                    (handle-level-x-account (+ 1 level) x)
                                    '()))
                              (reverse 
-                              (gnc:group-get-account-list children)))))
+                              (xaccGroupGetAccountListSorted children)))))
 
                    (account-balance 
-                    (if (gnc:account-get-tax-related account)
+                    (if (xaccAccountGetTaxRelated account)
                         (if to-special
                             (gnc:account-get-balance-interval
                              account from-special to-special #f)

Modified: gnucash/branches/swig-redo/src/report/report-system/commodity-utilities.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/report-system/commodity-utilities.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/report-system/commodity-utilities.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -59,10 +59,10 @@
 		  ;; involved.
 		  (lambda (s) (let ((trans-comm
 				     (xaccTransGetCurrency
-				      (gnc:split-get-parent s)))
+				      (xaccSplitGetParent s)))
 				    (acc-comm
 				     (xaccAccountGetCommodity
-				      (gnc:split-get-account s))))
+				      (xaccSplitGetAccount s))))
 				(and
 				 (not (gnc-commodity-equiv
 				       trans-comm acc-comm))
@@ -86,8 +86,8 @@
 					end-date-tp commodity)
 	(lambda (a b)
 	  (gnc:timepair-lt 
-	   (gnc:transaction-get-date-posted (gnc:split-get-parent a))
-	   (gnc:transaction-get-date-posted (gnc:split-get-parent b))))))
+	   (gnc-transaction-get-date-posted (xaccSplitGetParent a))
+	   (gnc-transaction-get-date-posted (xaccSplitGetParent b))))))
 
 
 ;; Returns a list of all splits in the currency-accounts up to
@@ -131,15 +131,15 @@
      (map-in-order
       (lambda (a)
 	(let* ((transaction-comm (xaccTransGetCurrency
-				  (gnc:split-get-parent a)))
+				  (xaccSplitGetParent a)))
 	       (account-comm (xaccAccountGetCommodity
-			      (gnc:split-get-account a)))
+			      (xaccSplitGetAccount a)))
 	       (share-amount (gnc-numeric-abs
-			      (gnc:split-get-amount a)))
+			      (xaccSplitGetAmount a)))
 	       (value-amount (gnc-numeric-abs
-			      (gnc:split-get-value a)))
-	       (transaction-date (gnc:transaction-get-date-posted
-				  (gnc:split-get-parent a)))
+			      (xaccSplitGetValue a)))
+	       (transaction-date (gnc-transaction-get-date-posted
+				  (xaccSplitGetParent a)))
 	       (foreignlist
 		(if (gnc-commodity-equiv transaction-comm
 					  price-commodity)
@@ -210,7 +210,7 @@
   (let ((currency-accounts 
 	 ;;(filter gnc:account-has-shares?  
 	 ;; -- use all accounts, not only share accounts, since gnucash-1.7
-	 (gnc:group-get-subaccounts (gnc-get-current-group)))
+	 (xaccGroupGetSubAccountsSorted (gnc-get-current-group)))
 	(work-to-do (length commodity-list))
 	(work-done 0))
     (map
@@ -239,15 +239,15 @@
    (map-in-order
     (lambda (a)
       (let* ((transaction-comm (xaccTransGetCurrency
-				(gnc:split-get-parent a)))
+				(xaccSplitGetParent a)))
 	     (account-comm (xaccAccountGetCommodity
-			    (gnc:split-get-account a)))
+			    (xaccSplitGetAccount a)))
 	     (share-amount (gnc-numeric-abs
-			    (gnc:split-get-amount a)))
+			    (xaccSplitGetAmount a)))
 	     (value-amount (gnc-numeric-abs
-			    (gnc:split-get-value a)))
-	     (transaction-date (gnc:transaction-get-date-posted
-				(gnc:split-get-parent a)))
+			    (xaccSplitGetValue a)))
+	     (transaction-date (gnc-transaction-get-date-posted
+				(xaccSplitGetParent a)))
 	     (foreignlist 
 	      (if (gnc-commodity-equiv transaction-comm price-commodity)
 		  (list account-comm
@@ -311,7 +311,7 @@
   (let ((currency-accounts 
 	 ;;(filter gnc:account-has-shares? 
 	 ;; -- use all accounts, not only share accounts, since gnucash-1.7
-	 (gnc:group-get-subaccounts (gnc-get-current-group)))
+	 (xaccGroupGetSubAccountsSorted (gnc-get-current-group)))
 	(work-to-do (length commodity-list))
 	(work-done 0))
     (map
@@ -530,7 +530,7 @@
   (let ((curr-accounts 
 	 ;;(filter gnc:account-has-shares? ))
 	 ;; -- use all accounts, not only share accounts, since gnucash-1.7
-	 (gnc:group-get-subaccounts (gnc-get-current-group)))
+	 (xaccGroupGetSubAccountsSorted (gnc-get-current-group)))
 	;; sumlist: a multilevel alist. Each element has a commodity
 	;; as key, and another alist as a value. The value-alist's
 	;; elements consist of a commodity as a key, and a pair of two
@@ -552,14 +552,14 @@
 	(for-each 
 	 (lambda (a)
 	   (let* ((transaction-comm (xaccTransGetCurrency
-				     (gnc:split-get-parent a)))
+				     (xaccSplitGetParent a)))
 		  (account-comm (xaccAccountGetCommodity
-				 (gnc:split-get-account a)))
+				 (xaccSplitGetAccount a)))
 		  ;; Always use the absolute value here.
 		  (share-amount (gnc-numeric-abs
-				 (gnc:split-get-amount a)))
+				 (xaccSplitGetAmount a)))
 		  (value-amount (gnc-numeric-abs
-				 (gnc:split-get-value a)))
+				 (xaccSplitGetValue a)))
 		  (tmp (assoc transaction-comm sumlist))
 		  (comm-list (if (not tmp) 
 				 (assoc account-comm sumlist)

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/report-system/html-acct-table.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -268,17 +268,17 @@
 ;;     account-guid: guid
 ;; 
 ;;         the guid of the account in the current row, as returned by
-;;         gnc:account-get-guid.
+;;         gncAccountGetGUID.
 ;; 
 ;;     account-desc: string?
 ;; 
 ;;         the account description of the account in the current row,
-;;         as returned by gnc:account-get-description.
+;;         as returned by xaccAccountGetDescription.
 ;; 
 ;;     account-notes: string?
 ;; 
 ;;         the account notes of the account in the current row, as
-;;         returned by gnc:account-get-notes.
+;;         returned by xaccAccountGetNotes.
 ;; 
 ;;     account-path: string
 ;; 
@@ -295,7 +295,7 @@
 ;;     account-code: string
 ;; 
 ;;         the account of the account in the current row, as returned
-;;         by gnc:account-get-code.
+;;         by xaccAccountGetCode.
 ;; 
 ;;     account-anchor: text(maybe?)
 ;; 
@@ -551,11 +551,11 @@
 
 ;; some useful predicates to export
 (define (gnc:account-code-less-p a b)
-  (string<? (gnc:account-get-code a)
-	    (gnc:account-get-code b)))
+  (string<? (xaccAccountGetCode a)
+	    (xaccAccountGetCode b)))
 (define (gnc:account-name-less-p a b)
-  (string<? (gnc:account-get-name a)
-	    (gnc:account-get-name b)))
+  (string<? (xaccAccountGetName a)
+	    (xaccAccountGetName b)))
 (define (gnc:account-path-less-p a b)
   (string<? (gnc-account-get-full-name a)
 	    (gnc-account-get-full-name b)))
@@ -631,7 +631,7 @@
 				 )
 				))
 	 ;; local variables
-	 (toplvl-accts (gnc:group-get-account-list (gnc-get-current-group)))
+	 (toplvl-accts (xaccGroupGetAccountListSorted (gnc-get-current-group)))
 	 (acct-depth-reached 0)
 	 (logi-depth-reached (if depth-limit (- depth-limit 1) 0))
 	 (disp-depth-reached 0)
@@ -703,7 +703,7 @@
 	      ;; account a is shown, i.e. (use-acct? a) == #t.
 	      (and (use-acct? a)
 		   (my-get-balance-nosub a start-date end-date)))
-	    (gnc:account-get-children account)))
+	    (xaccAccountGetChildren account)))
 	  this-collector))
 
       
@@ -718,11 +718,11 @@
 	   (let* ((subaccts (gnc:account-get-immediate-subaccounts acct))
 		  ;; assign output parameters
 		  (account acct)
-		  (account-name (gnc:account-get-name acct))
-		  (account-code (gnc:account-get-code acct))
+		  (account-name (xaccAccountGetName acct))
+		  (account-code (xaccAccountGetCode acct))
 		  (account-path (gnc-account-get-full-name acct))
 		  (account-anchor (gnc:html-account-anchor acct))
-		  (account-parent (gnc:account-get-parent-account acct))
+		  (account-parent (xaccAccountGetParentAccount acct))
 		  (account-children subaccts)
 		  (account-depth acct-depth)
 		  (logical-depth logi-depth)
@@ -732,9 +732,9 @@
 		  ;; called gnc:account-type-get-string
 		  (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))
+		  (account-guid (gncAccountGetGUID acct))
+		  (account-description (xaccAccountGetDescription acct))
+		  (account-notes (xaccAccountGetNotes acct))
                   ;; These next two are commodity-collectors.
 		  (account-bal (my-get-balance-nosub
 				acct start-date end-date))

Modified: gnucash/branches/swig-redo/src/report/report-system/html-utilities.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/report-system/html-utilities.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/report-system/html-utilities.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -33,13 +33,13 @@
   (gnc-build-url URL-TYPE-REGISTER (string-append type guid) ""))
 
 (define (gnc:account-anchor-text acct)
-  (gnc:register-guid "acct-guid=" (gnc:account-get-guid acct)))
+  (gnc:register-guid "acct-guid=" (gncAccountGetGUID acct)))
 
 (define (gnc:split-anchor-text split)
-  (gnc:register-guid "split-guid=" (gnc:split-get-guid split)))
+  (gnc:register-guid "split-guid=" (gncSplitGetGUID split)))
 
 (define (gnc:transaction-anchor-text trans)
-  (gnc:register-guid "trans-guid=" (gnc:transaction-get-guid trans)))
+  (gnc:register-guid "trans-guid=" (gncTransGetGUID trans)))
 
 (define (gnc:report-anchor-text report-id)
   (gnc-build-url URL-TYPE-REPORT
@@ -81,11 +81,11 @@
   (gnc:make-html-text (if acct
                           (gnc:html-markup-anchor
                            (gnc:account-anchor-text acct)
-                           (gnc:account-get-name acct))
+                           (xaccAccountGetName acct))
                           "")))
 
 (define (gnc:html-split-anchor split text)
-  (gnc:make-html-text (if (gnc:split-get-account split)
+  (gnc:make-html-text (if (xaccSplitGetAccount split)
                           (gnc:html-markup-anchor
                            (gnc:split-anchor-text split)
                            text)
@@ -428,7 +428,7 @@
   (let ((table (gnc:make-html-table))
 	(work-to-do 0)
 	(work-done 0)
-	(topl-accounts (gnc:group-get-account-list 
+	(topl-accounts (xaccGroupGetAccountListSorted
 			(gnc-get-current-group))))
 
     ;; The following functions are defined inside build-acct-table
@@ -464,7 +464,7 @@
 	    ;; account a is shown, i.e. (use-acct? a) == #t.
 	    (and (use-acct? a)
 		 (my-get-balance-nosub a)))
-	  (gnc:account-get-children account)))
+	  (xaccAccountGetChildren account)))
 	this-collector))
 
     ;; Use this account in the account hierarchy? Check against the
@@ -474,7 +474,7 @@
     (define (use-acct? a)
       (or (member a accounts)
 	  (and show-subaccts? 
-	       (let ((parent (gnc:account-get-parent-account a)))
+	       (let ((parent (xaccAccountGetParentAccount a)))
 		 (and parent
 		      (use-acct? parent))))))
 
@@ -491,8 +491,8 @@
     (define (sort-fn accts)
       (sort accts
 	    (lambda (a b) 
-	      (string<? (gnc:account-get-code a)
-			(gnc:account-get-code b)))))
+	      (string<? (xaccAccountGetCode a)
+			(xaccAccountGetCode b)))))
 
     ;; Remove the last appended row iff *all* its fields are empty
     ;; (==#f) or have an html-table-cell which in turn is empty

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/report-system/report-utilities.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -147,10 +147,10 @@
 			(+ 1 (accounts-get-children-depth children)))))
 		accounts)))
   (accounts-get-children-depth 
-   (gnc:group-get-account-list (gnc-get-current-group))))
+   (xaccGroupGetAccountListSorted (gnc-get-current-group))))
 
 (define (gnc:split-get-corr-account-full-name split)
-  (gnc:split-get-corr-account-full-name-internal split))
+  (xaccSplitGetCorrAccountFullName split))
 
 
 ;; get children that are the direct descendant of this acct
@@ -162,12 +162,12 @@
            (with-output-to-string (lambda () (write a2)))))
       (string=? a1-str a2-str)))
   
-  (let* ((group (gnc:account-get-children acct))
-         (children (gnc:group-get-subaccounts group))
+  (let* ((group (xaccAccountGetChildren acct))
+         (children (xaccGroupGetSubAccountsSorted group))
          (retval '()))
     (for-each 
      (lambda (child)
-       (if (acctptr-eq? acct (gnc:account-get-parent-account child))
+       (if (acctptr-eq? acct (xaccAccountGetParentAccount child))
            (begin 
              (set! retval (cons child retval)))))
      children)
@@ -175,15 +175,15 @@
 
 ;; get all children of this account 
 (define (gnc:account-get-all-subaccounts acct)
-  (let ((group (gnc:account-get-children acct)))
-    (gnc:group-get-subaccounts group)))
+  (let ((group (xaccAccountGetChildren acct)))
+    (xaccGroupGetSubAccountsSorted group)))
 
 ;; Get all children of this list of accounts.
 (define (gnc:acccounts-get-all-subaccounts accountlist)
   (append-map 
    (lambda (a)
-     (gnc:group-get-subaccounts
-      (gnc:account-get-children a)))
+     (xaccGroupGetSubAccountsSorted
+      (xaccAccountGetChildren a)))
    accountlist))
 
 ;;; Here's a statistics collector...  Collects max, min, total, and makes
@@ -496,7 +496,7 @@
   (let ((balance-collector
          (if include-children?
              (gnc:group-get-comm-balance-at-date
-              (gnc:account-get-children account) date)
+              (xaccAccountGetChildren account) date)
              (gnc:make-commodity-collector)))
 	  (query (qof-query-create-for-splits))
 	  (splits #f))
@@ -517,7 +517,7 @@
       (if (and splits (not (null? splits)))
 	  (gnc-commodity-collector-add balance-collector
 				       (xaccAccountGetCommodity account)
-				       (gnc:split-get-balance (car splits))))
+				       (xaccSplitGetBalance (car splits))))
       balance-collector))
 
 ;; Adds all accounts' balances, where the balances are determined with
@@ -678,8 +678,8 @@
      (set! query (qof-query-merge query temp-query QOF-QUERY-AND))))
 
 (define (gnc:split-voided? split)
-  (let ((trans (gnc:split-get-parent split)))
-    (gnc:transaction-get-void-status trans)))
+  (let ((trans (xaccSplitGetParent split)))
+    (xaccTransGetVoidStatus trans)))
 
 (define (gnc:report-starting report-name)
   (gnc-window-show-progress (sprintf #f
@@ -704,7 +704,7 @@
 ;; function to count the total number of splits to be iterated
 (define (gnc:accounts-count-splits accounts)
   (if (not (null? accounts))
-      (+ (length (gnc:account-get-split-list (car accounts)))
+      (+ (length (xaccAccountGetSplitList (car accounts)))
 	 (gnc:accounts-count-splits (cdr accounts)))
       0))
 
@@ -734,9 +734,9 @@
     
     (set! splits (qof-query-run query))
     (map (lambda (split)
-		(let* ((shares (gnc:split-get-amount split))
+		(let* ((shares (xaccSplitGetAmount split))
 		       (acct-comm (xaccAccountGetCommodity
-				   (gnc:split-get-account split)))
+				   (xaccSplitGetAccount split)))
 		       )
 		  (gnc-commodity-collector-add total acct-comm shares)
 		  )
@@ -792,9 +792,9 @@
     
     (set! splits (qof-query-run total-query))
     (map (lambda (split)
-	   (let* ((shares (gnc:split-get-amount split))
+	   (let* ((shares (xaccSplitGetAmount split))
 		  (acct-comm (xaccAccountGetCommodity
-			      (gnc:split-get-account split)))
+			      (xaccSplitGetAccount split)))
 		  )
 	     (or (gnc-numeric-negative-p shares)
 		 (gnc-commodity-collector-add total acct-comm shares)

Modified: gnucash/branches/swig-redo/src/report/standard-reports/account-piecharts.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/account-piecharts.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/account-piecharts.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -110,7 +110,7 @@
       (lambda ()
         (gnc:filter-accountlist-type 
          account-types
-         (gnc:group-get-subaccounts (gnc-get-current-group))))
+         (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       (lambda (accounts)
         (list #t
               (gnc:filter-accountlist-type
@@ -200,7 +200,7 @@
         (chart (gnc:make-html-piechart))
         (topl-accounts (gnc:filter-accountlist-type 
                         account-types
-                        (gnc:group-get-account-list 
+                        (xaccGroupGetAccountListSorted
                          (gnc-get-current-group)))))
 
     ;; Returns true if the account a was selected in the account
@@ -311,16 +311,16 @@
 			(cond
 			 ((eq? sort-method 'acct-code)
 			  (lambda (a b) 
-			    (string<? (gnc:account-get-code (cadr a))
-				      (gnc:account-get-code (cadr b)))))
+			    (string<? (xaccAccountGetCode (cadr a))
+				      (xaccAccountGetCode (cadr b)))))
 			 ((eq? sort-method 'alphabetical)
 			  (lambda (a b) 
 			    (string<? ((if show-fullname?
 					   gnc-account-get-full-name
-					   gnc:account-get-name) (cadr a))
+					   xaccAccountGetName) (cadr a))
 				      ((if show-fullname?
 					   gnc-account-get-full-name
-					   gnc:account-get-name) (cadr b)))))
+					   xaccAccountGetName) (cadr b)))))
 			 (else
 			  (lambda (a b) (> (car a) (car b)))))))
 
@@ -378,7 +378,7 @@
                                        gnc:optname-reportname
                                        ((if show-fullname?
                                             gnc-account-get-full-name
-                                            gnc:account-get-name) acct))))))))
+                                            xaccAccountGetName) acct))))))))
                    combined)))
               (gnc:html-piechart-set-button-1-slice-urls! 
                chart urls)
@@ -427,7 +427,7 @@
 			       (cadr pair)
 			       ((if show-fullname?
 				    gnc-account-get-full-name
-				    gnc:account-get-name) (cadr pair)))
+				    xaccAccountGetName) (cadr pair)))
 			       'pre " " (_ "and") " " 'post)
 			   (if show-total?
 			       (string-append 

Modified: gnucash/branches/swig-redo/src/report/standard-reports/account-summary.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/account-summary.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/account-summary.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -158,7 +158,7 @@
                ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
                ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
                ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
-	 (gnc:group-get-subaccounts (gnc-get-current-group))))
+	 (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       #f #t))
     (gnc:options-add-account-levels!
      options gnc:pagename-accounts optname-depth-limit
@@ -492,8 +492,8 @@
                 report-commodity exchange-fn 
                 (append-map
                  (lambda (a)
-                   (gnc:group-get-subaccounts
-                    (gnc:account-get-children a)))
+                   (xaccGroupGetSubAccountsSorted
+                    (xaccAccountGetChildren a)))
                  accounts))))
 	  )
 	)

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/advanced-portfolio.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -151,7 +151,7 @@
       "b"
       (N_ "Stock Accounts to report on")
       (lambda () (filter gnc:account-is-stock?
-                         (gnc:group-get-subaccounts
+                         (xaccGroupGetSubAccountsSorted
                           (gnc-get-current-group))))
       (lambda (accounts) (list  #t 
                                 (filter gnc:account-is-stock? accounts)))
@@ -188,13 +188,13 @@
     (gnc:option-value (get-op section name)))
   
   (define (split-account-type? split type)
-    (eq? type (xaccAccountGetType (gnc:split-get-account split))))
+    (eq? type (xaccAccountGetType (xaccSplitGetAccount split))))
 
   (define (same-split? s1 s2)
-    (string=? (gnc:split-get-guid s1) (gnc:split-get-guid s2)))
+    (string=? (gncSplitGetGUID s1) (gncSplitGetGUID s2)))
 
   (define (same-account? a1 a2)
-    (string=? (gnc:account-get-guid a1) (gnc:account-get-guid a2)))
+    (string=? (gncAccountGetGUID a1) (gncAccountGetGUID a2)))
   
   ;; this builds a list for basis calculation and handles average, fifo and filo methods
   ;; the list is cons cells of (units-of-stock . price-per-unit)... average method produces only one
@@ -294,7 +294,7 @@
           (let* ((row-style (if odd-row? "normal-row" "alternate-row"))
                  (current (car accounts))
                  (rest (cdr accounts))
-                 (name (gnc:account-get-name current))
+                 (name (xaccAccountGetName current))
                  (commodity (xaccAccountGetCommodity current))
                  (ticker-symbol (gnc-commodity-get-mnemonic commodity))
                  (listing (gnc-commodity-get-namespace commodity))
@@ -335,33 +335,33 @@
 	     (lambda (split)
 	       (set! work-done (+ 1 work-done))
 	       (gnc:report-percent-done (* 100 (/ work-done work-to-do)))
-	       (let ((parent (gnc:split-get-parent split)))
-		 (if (gnc:timepair-le (gnc:transaction-get-date-posted parent) to-date)
+	       (let ((parent (xaccSplitGetParent split)))
+		 (if (gnc:timepair-le (gnc-transaction-get-date-posted parent) to-date)
 		     (begin
 		       (for-each
 			(lambda (s)
 			  ;; If this is an asset type account for buy or sell, then grab a 
 			  ;; currency and a txn-value for later computation
 			  (cond
-			   ((and (not (same-account? current (gnc:split-get-account s))) 
+			   ((and (not (same-account? current (xaccSplitGetAccount s)))
 				 (not (or (split-account-type?
                                            s ACCT-TYPE-EXPENSE)
 					  (split-account-type?
                                            s ACCT-TYPE-INCOME))))
 
 			    ;;only change the commod-currency if price failed
-			    (if (not price) (set! commod-currency (xaccAccountGetCommodity (gnc:split-get-account s))))
-			    (set! txn-value (gnc-numeric-abs (gnc:split-get-value s)));;FIXME use gnc:split-get-share-price
-			    (set! txn-date (gnc:transaction-get-date-posted parent))
+			    (if (not price) (set! commod-currency (xaccAccountGetCommodity (xaccSplitGetAccount s))))
+			    (set! txn-value (gnc-numeric-abs (xaccSplitGetValue s)));;FIXME use xaccSplitGetSharePrice
+			    (set! txn-date (gnc-transaction-get-date-posted parent))
 			    (set! pricing-txn parent)
 			    )
-			   ((same-account? current (gnc:split-get-account s))
-			    (set! txn-units (gnc:split-get-amount s)))
+			   ((same-account? current (xaccSplitGetAccount s))
+			    (set! txn-units (xaccSplitGetAmount s)))
 			    
 			      )
 			  )
 
-			(gnc:transaction-get-splits parent))
+			(xaccTransGetSplits parent))
 
 
 		       ;; go build the basis-list
@@ -376,54 +376,54 @@
 			(lambda (s)
 			  (cond
 			   ((same-split? s split) 
-;;                       (gnc:debug "amount " (gnc-numeric-to-double (gnc:split-get-amount s))
-;;                                  " acct " (gnc:account-get-name (gnc:split-get-account s)) )
-;;                       (gnc:debug "value " (gnc-numeric-to-double (gnc:split-get-value s))
+;;                       (gnc:debug "amount " (gnc-numeric-to-double (xaccSplitGetAmount s))
+;;                                  " acct " (xaccAccountGetName (xaccSplitGetAccount s)) )
+;;                       (gnc:debug "value " (gnc-numeric-to-double (xaccSplitGetValue s))
 ;;                                  " in " (gnc-commodity-get-printname commod-currency)
-;;                                  " from " (gnc:transaction-get-description (gnc:split-get-parent s)))
+;;                                  " from " (xaccTransGetDescription (xaccSplitGetParent s)))
 			    (cond
-			     ((or include-gains (not (gnc-numeric-zero-p (gnc:split-get-amount s))))
-			      (unitscoll 'add commodity (gnc:split-get-amount s)) ;; Is the stock transaction?
+			     ((or include-gains (not (gnc-numeric-zero-p (xaccSplitGetAmount s))))
+			      (unitscoll 'add commodity (xaccSplitGetAmount s)) ;; Is the stock transaction?
 ;; these lines do nothing, but are in a debug so I'm leaving it, just in case. asw.			     
 ;;			      (if (< 0 (gnc-numeric-to-double
-;;					(gnc:split-get-amount s)))
+;;					(xaccSplitGetAmount s)))
 
 
 ;;				  (set! totalunits
 ;;					(+ totalunits
-;;					   (gnc-numeric-to-double (gnc:split-get-amount s))))
+;;					   (gnc-numeric-to-double (xaccSplitGetAmount s))))
 ;;				  )
 
 
 ;;			      (set! totalunityears
 ;;				    (+ totalunityears 
-;;				       (* (gnc-numeric-to-double (gnc:split-get-amount s))
+;;				       (* (gnc-numeric-to-double (xaccSplitGetAmount s))
 ;;					  (gnc:date-year-delta 
-;;					   (car (gnc:transaction-get-date-posted parent))
+;;					   (car (gnc-transaction-get-date-posted parent))
 ;;					   (current-time))))) 
 			      (cond 
-			       ((gnc-numeric-negative-p (gnc:split-get-value s))
+			       ((gnc-numeric-negative-p (xaccSplitGetValue s))
 				(moneyoutcoll
 				 'add commod-currency
-				 (gnc-numeric-neg (gnc:split-get-value s))))
+				 (gnc-numeric-neg (xaccSplitGetValue s))))
 			       (else (moneyincoll 
 				      'add commod-currency
-				      (gnc-numeric-neg (gnc:split-get-value s))))))))
+				      (gnc-numeric-neg (xaccSplitGetValue s))))))))
 			 
 			   ((split-account-type? s ACCT-TYPE-EXPENSE)
-			     (brokeragecoll 'add commod-currency (gnc:split-get-value s)))
+			     (brokeragecoll 'add commod-currency (xaccSplitGetValue s)))
 			   
 			   ((split-account-type? s ACCT-TYPE-INCOME)
-			     (dividendcoll 'add commod-currency (gnc:split-get-value s)))
+			     (dividendcoll 'add commod-currency (xaccSplitGetValue s)))
 			   )
 			  )
-			(gnc:transaction-get-splits parent)
+			(xaccTransGetSplits parent)
 			)
 		       )
 		     )
 		 )
 	       )
-	     (gnc:account-get-split-list current)
+	     (xaccAccountGetSplitList current)
 	     )
 ;;          (gnc:debug "totalunits" totalunits)
 ;;          (gnc:debug "totalunityears" totalunityears)

Modified: gnucash/branches/swig-redo/src/report/standard-reports/average-balance.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/average-balance.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/average-balance.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -77,7 +77,7 @@
                   ;; or: (list ACCT-TYPE-BANK ACCT-TYPE-CASH
                   ;; ACCT-TYPE-CHECKING ACCT-TYPE-SAVINGS ACCT-TYPE-STOCK
                   ;; ACCT-TYPE-MUTUAL ACCT-TYPE-MONEYMRKT)
-                  (gnc:group-get-account-list (gnc-get-current-group)))))))
+                  (xaccGroupGetAccountListSorted (gnc-get-current-group)))))))
       #f #t))
 
     ;; Display tab
@@ -159,8 +159,8 @@
     (define (get-split-value split date)
       (monetary->double
        (gnc:make-gnc-monetary
-        (xaccAccountGetCommodity (gnc:split-get-account split))
-        (gnc:split-get-amount split))
+        (xaccAccountGetCommodity (xaccSplitGetAccount split))
+        (xaccSplitGetAmount split))
        date))
     
     ;; calculate the statistics for one interval - returns a list 
@@ -195,14 +195,14 @@
 
         (define (split-recurse)
           (if (or (null? splits) (gnc:timepair-gt 
-                                  (gnc:transaction-get-date-posted 
-                                   (gnc:split-get-parent
+                                  (gnc-transaction-get-date-posted
+                                   (xaccSplitGetParent
                                     (car splits))) to)) 
               #f
               (let* 
                   ((split (car splits))
-                   (split-time (gnc:transaction-get-date-posted 
-                                (gnc:split-get-parent split)))
+                   (split-time (gnc-transaction-get-date-posted
+                                (xaccSplitGetParent split)))
                    ;; FIXME: Which date should we use here? The 'to'
                    ;; date? the 'split-time'?
                    (split-amt (get-split-value split split-time)))

Modified: gnucash/branches/swig-redo/src/report/standard-reports/balance-sheet.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/balance-sheet.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/balance-sheet.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -182,7 +182,7 @@
                ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
                ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
                ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
-	 (gnc:group-get-subaccounts (gnc-get-current-group))))
+	 (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       #f #t))
     (gnc:options-add-account-levels!
      options gnc:pagename-accounts optname-depth-limit

Modified: gnucash/branches/swig-redo/src/report/standard-reports/budget.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/budget.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/budget.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -92,7 +92,7 @@
        (gnc:filter-accountlist-type
         (list ACCT-TYPE-ASSET ACCT-TYPE-LIABILITY ACCT-TYPE-INCOME
                           ACCT-TYPE-EXPENSE)
-        (gnc:group-get-subaccounts (gnc-get-current-group))))
+        (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
      #f)
 
     ;; Set the general page as default option tab
@@ -107,7 +107,7 @@
   (define (gnc:html-table-add-budget-line!
            html-table rownum colnum
            budget acct exchange-fn)
-    (let* ((num-periods (gnc:budget-get-num-periods budget))
+    (let* ((num-periods (gnc-budget-get-num-periods budget))
            (period 0)
            )
       (while (< period num-periods)
@@ -115,12 +115,12 @@
                     (act-col (+ 1 bgt-col))
 
                     (comm (xaccAccountGetCommodity acct))
-                    (numeric-val (gnc:budget-get-account-period-value
+                    (numeric-val (gnc-budget-get-account-period-value
                                   budget acct period))
 
                     (bgt-val (gnc:make-gnc-monetary
                               comm numeric-val))
-                    (numeric-val (gnc:budget-get-account-period-actual-value
+                    (numeric-val (gnc-budget-get-account-period-actual-value
                                   budget acct period))
                     (act-val (gnc:make-gnc-monetary
                               comm numeric-val))
@@ -146,7 +146,7 @@
     )
   (define (gnc:html-table-add-budget-headers!
            html-table colnum budget)
-    (let* ((num-periods (gnc:budget-get-num-periods budget))
+    (let* ((num-periods (gnc-budget-get-num-periods budget))
            (period 0)
            )
 
@@ -158,7 +158,7 @@
       (while (< period num-periods)
              (let* ((bgt-col (+ (* period 2) colnum 1))
                     (act-col (+ 1 bgt-col))
-                    (date (gnc:budget-get-period-start-date budget period))
+                    (date (gnc-budget-get-period-start-date budget period))
                     )
                (gnc:html-table-set-cell!
                 html-table 0 bgt-col (gnc-print-date date))
@@ -250,10 +250,10 @@
 
     ;; is account in list of accounts?
     (define (same-account? a1 a2)
-      (string=? (gnc:account-get-guid a1) (gnc:account-get-guid a2)))
+      (string=? (gncAccountGetGUID a1) (gncAccountGetGUID a2)))
 
     (define (same-split? s1 s2)
-      (string=? (gnc:split-get-guid s1) (gnc:split-get-guid s2)))
+      (string=? (gncSplitGetGUID s1) (gncSplitGetGUID s2)))
 
     (define account-in-list?
       (lambda (account accounts)
@@ -283,7 +283,7 @@
     ;; helper for account depth
     (define (account-get-depth account)
       (define (account-get-depth-internal account-internal depth)
-        (let ((parent (gnc:account-get-parent-account account-internal)))
+        (let ((parent (xaccAccountGetParentAccount account-internal)))
           (if parent
             (account-get-depth-internal parent (+ depth 1))
             depth)))
@@ -331,7 +331,7 @@
 
           (gnc:html-document-set-title!
            doc (sprintf #f (_ "%s - %s")
-                        report-name (gnc:budget-get-name budget)))
+                        report-name (gnc-budget-get-name budget)))
 
           (set! accounts (sort accounts account-full-name<?))
 

Modified: gnucash/branches/swig-redo/src/report/standard-reports/cash-flow.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/cash-flow.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/cash-flow.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -93,7 +93,7 @@
        (gnc:filter-accountlist-type 
         (ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-ASSET
                         ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL)
-        (gnc:group-get-subaccounts (gnc-get-current-group))))
+        (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
      #f)
     
     ;; Set the general page as default option tab
@@ -151,10 +151,10 @@
 
     ;; is account in list of accounts?
     (define (same-account? a1 a2)
-      (string=? (gnc:account-get-guid a1) (gnc:account-get-guid a2)))
+      (string=? (gncAccountGetGUID a1) (gncAccountGetGUID a2)))
 
     (define (same-split? s1 s2) 
-      (string=? (gnc:split-get-guid s1) (gnc:split-get-guid s2)))
+      (string=? (gncSplitGetGUID s1) (gncSplitGetGUID s2)))
 
     (define account-in-list?
       (lambda (account accounts)
@@ -184,7 +184,7 @@
     ;; helper for account depth
     (define (account-get-depth account)
       (define (account-get-depth-internal account-internal depth)
-        (let ((parent (gnc:account-get-parent-account account-internal)))
+        (let ((parent (xaccAccountGetParentAccount account-internal)))
           (if parent
             (account-get-depth-internal parent (+ depth 1))
             depth)))
@@ -251,7 +251,7 @@
               (if (not (null? accounts-internal))
                 (let* ((current (car accounts-internal))
                        (rest (cdr accounts-internal))
-                       (name (gnc:account-get-name current))
+                       (name (xaccAccountGetName current))
                        (curr-commodity (xaccAccountGetCommodity current))
                       )
 
@@ -261,19 +261,19 @@
                     (lambda (split)
 		      (set! work-done (+ 1 work-done))
 		      (gnc:report-percent-done (* 85 (/ work-done splits-to-do)))
-                      (let ((parent (gnc:split-get-parent split)))
-                        (if (and (gnc:timepair-le (gnc:transaction-get-date-posted parent) to-date-tp)
-                                 (gnc:timepair-ge (gnc:transaction-get-date-posted parent) from-date-tp))
-                          (let* ((parent-description (gnc:transaction-get-description parent))
+                      (let ((parent (xaccSplitGetParent split)))
+                        (if (and (gnc:timepair-le (gnc-transaction-get-date-posted parent) to-date-tp)
+                                 (gnc:timepair-ge (gnc-transaction-get-date-posted parent) from-date-tp))
+                          (let* ((parent-description (xaccTransGetDescription parent))
                                  (parent-currency (xaccTransGetCurrency parent)))
                             ;(gnc:debug parent-description
                             ;           " - " 
                             ;           (gnc-commodity-get-printname parent-currency))
                             (for-each
                               (lambda (s)
-                                (let* ((s-account (gnc:split-get-account s))
-                                       (s-amount (gnc:split-get-amount s))
-                                       (s-value (gnc:split-get-value s))
+                                (let* ((s-account (xaccSplitGetAccount s))
+                                       (s-amount (xaccSplitGetAmount s))
+                                       (s-value (xaccSplitGetValue s))
                                        (s-commodity (xaccAccountGetCommodity s-account)))
 				  ;; Check if this is a dangling split
 				  ;; and print a warning
@@ -281,9 +281,9 @@
 				      (display
 				       (string-append
 					"WARNING: s-account is NULL for split: "
-					(gnc:split-get-guid s) "\n")))
+					(gncSplitGetGUID s) "\n")))
 
-                                  ;(gnc:debug (gnc:account-get-name s-account))
+                                  ;(gnc:debug (xaccAccountGetName s-account))
                                   (if (and	 ;; make sure we don't have
 				       s-account ;;  any dangling splits
 				       (not (account-in-list? s-account accounts)))
@@ -307,7 +307,7 @@
 						  (let ((s-account-in-collector (cadr pair))
 							(s-report-value (to-report-currency parent-currency
 											    (gnc-numeric-neg s-value)
-											    (gnc:transaction-get-date-posted
+											    (gnc-transaction-get-date-posted
 											     parent))))
 						    (money-in-collector 'add report-currency s-report-value)
 						    (s-account-in-collector 'add report-currency s-report-value))
@@ -328,7 +328,7 @@
 						  (let ((s-account-out-collector (cadr pair))
 							(s-report-value (to-report-currency parent-currency
 											    s-value
-											    (gnc:transaction-get-date-posted
+											    (gnc-transaction-get-date-posted
 											     parent))))
 						    (money-out-collector 'add report-currency s-report-value)
 						    (s-account-out-collector 'add report-currency s-report-value))
@@ -339,13 +339,13 @@
 				      )
 				  )
 				)
-                              (gnc:transaction-get-splits parent)
+                              (xaccTransGetSplits parent)
                             )
                           )
                         )
                       )
                     )
-                    (gnc:account-get-split-list current)
+                    (xaccAccountGetSplitList current)
                   )
 
                   (calc-money-in-out-internal rest))))
@@ -391,7 +391,7 @@
                                    (gnc:account-anchor-text account)
                                    (if show-full-names?
                                      (gnc-account-get-full-name account)
-                                     (gnc:account-get-name account))))))
+                                     (xaccAccountGetName account))))))
                   
                   (set! account-disp-list (cons anchor account-disp-list))
                 )
@@ -440,7 +440,7 @@
                       (gnc:account-anchor-text acct)
                       (if show-full-names?
                         (gnc-account-get-full-name acct)
-                        (gnc:account-get-name acct))))
+                        (xaccAccountGetName acct))))
                   (gnc:make-html-table-header-cell/markup
                    "number-cell" (gnc:sum-collector-commodity (cadr pair) report-currency exchange-fn))))
               )
@@ -485,7 +485,7 @@
                       (gnc:account-anchor-text acct)
                       (if show-full-names?
                         (gnc-account-get-full-name acct)
-                        (gnc:account-get-name acct))))
+                        (xaccAccountGetName acct))))
                   (gnc:make-html-table-header-cell/markup
                    "number-cell" (gnc:sum-collector-commodity (cadr pair) report-currency exchange-fn))))
               )

Modified: gnucash/branches/swig-redo/src/report/standard-reports/category-barchart.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/category-barchart.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/category-barchart.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -116,7 +116,7 @@
       (lambda ()
         (gnc:filter-accountlist-type 
          account-types
-         (gnc:group-get-subaccounts (gnc-get-current-group))))
+         (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       (lambda (accounts)
         (list #t
               (gnc:filter-accountlist-type account-types accounts)))
@@ -212,7 +212,7 @@
         (chart (gnc:make-html-barchart))
         (topl-accounts (gnc:filter-accountlist-type 
                         account-types
-                        (gnc:group-get-account-list 
+                        (xaccGroupGetAccountListSorted
                          (gnc-get-current-group)))))
     
     ;; Returns true if the account a was selected in the account
@@ -370,16 +370,16 @@
 			  (cond
 			   ((eq? sort-method 'acct-code)
 			    (lambda (a b) 
-			      (string<? (gnc:account-get-code (car a))
-					(gnc:account-get-code (car b)))))
+			      (string<? (xaccAccountGetCode (car a))
+					(xaccAccountGetCode (car b)))))
 			   ((eq? sort-method 'alphabetical)
 			    (lambda (a b) 
 			      (string<? ((if show-fullname?
 					     gnc-account-get-full-name
-					     gnc:account-get-name) (car a))
+					     xaccAccountGetName) (car a))
 					((if show-fullname?
 					     gnc-account-get-full-name
-					     gnc:account-get-name) (car b)))))
+					     xaccAccountGetName) (car b)))))
 			   (else
 			    (lambda (a b)
 			      (> (apply + (cadr a))
@@ -469,7 +469,7 @@
                                (car pair)
                                ((if show-fullname?
                                     gnc-account-get-full-name
-                                    gnc:account-get-name) (car pair)))
+                                    xaccAccountGetName) (car pair)))
 			   'pre " " (_ "and") " " 'post))
                          all-data))
              (gnc:html-barchart-set-col-colors! 
@@ -508,7 +508,7 @@
                                      gnc:optname-reportname
                                      ((if show-fullname?
                                           gnc-account-get-full-name
-                                          gnc:account-get-name) acct))))))))
+                                          xaccAccountGetName) acct))))))))
                     all-data)))
                (gnc:html-barchart-set-button-1-bar-urls! 
                 chart (append urls urls))

Modified: gnucash/branches/swig-redo/src/report/standard-reports/daily-reports.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/daily-reports.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/daily-reports.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -102,7 +102,7 @@
       (lambda ()
         (gnc:filter-accountlist-type 
          account-types
-         (gnc:group-get-subaccounts (gnc-get-current-group))))
+         (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       (lambda (accounts)
         (list #t
               (gnc:filter-accountlist-type
@@ -170,8 +170,8 @@
     (define (get-split-value split date)
       (monetary->double
        (gnc:make-gnc-monetary
-        (xaccAccountGetCommodity (gnc:split-get-account split))
-        (gnc:split-get-amount split))
+        (xaccAccountGetCommodity (xaccSplitGetAccount split))
+        (xaccSplitGetAmount split))
        date))
     
     ;; calculate the statistics for one interval - returns a list 
@@ -206,14 +206,14 @@
 
         (define (split-recurse)
           (if (or (null? splits) (gnc:timepair-gt 
-                                  (gnc:transaction-get-date-posted 
-                                   (gnc:split-get-parent
+                                  (gnc-transaction-get-date-posted
+                                   (xaccSplitGetParent
                                     (car splits))) to)) 
               #f
               (let* 
                   ((split (car splits))
-                   (split-time (gnc:transaction-get-date-posted 
-                                (gnc:split-get-parent split)))
+                   (split-time (gnc-transaction-get-date-posted
+                                (xaccSplitGetParent split)))
                    ;; FIXME: Which date should we use here? The 'to'
                    ;; date? the 'split-time'?
                    (split-amt (get-split-value split split-time)))
@@ -314,7 +314,7 @@
          (chart (gnc:make-html-piechart))
          (topl-accounts (gnc:filter-accountlist-type 
                          account-types
-                         (gnc:group-get-account-list 
+                         (xaccGroupGetAccountListSorted
                           (gnc-get-current-group)))))
     
     (define (monetary->double foreign-monetary date)

Modified: gnucash/branches/swig-redo/src/report/standard-reports/equity-statement.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/equity-statement.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/equity-statement.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -134,7 +134,7 @@
                ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
                ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
                ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
-         (gnc:group-get-subaccounts (gnc-get-current-group))))
+         (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       #f #t))
     
     ;; all about currencies

Modified: gnucash/branches/swig-redo/src/report/standard-reports/general-journal.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/general-journal.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/general-journal.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -70,7 +70,7 @@
 
     (xaccQueryAddAccountMatch
      query
-     (gnc:group-get-subaccounts (gnc-book-get-template-group (gnc-get-current-book)))
+     (xaccGroupGetSubAccountsSorted (gnc-book-get-template-group (gnc-get-current-book)))
      QOF-GUID-MATCH-NONE
      QOF-QUERY-AND)
 

Modified: gnucash/branches/swig-redo/src/report/standard-reports/income-statement.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/income-statement.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/income-statement.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -158,7 +158,7 @@
 	(gnc:filter-accountlist-type
 	 ;; select, by default, only income and expense accounts
 	 (list ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
-	 (gnc:group-get-subaccounts (gnc-get-current-group))))
+	 (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       #f #t))
     (gnc:options-add-account-levels!
      options gnc:pagename-accounts optname-depth-limit

Modified: gnucash/branches/swig-redo/src/report/standard-reports/net-barchart.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/net-barchart.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/net-barchart.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -88,7 +88,7 @@
          (if inc-exp?
              gnc:account-is-inc-exp?
              (lambda (account) (not (gnc:account-is-inc-exp? account))))
-         (gnc:group-get-subaccounts (gnc-get-current-group))))
+         (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       (lambda (accounts)
         (list #t
               (filter 

Modified: gnucash/branches/swig-redo/src/report/standard-reports/portfolio.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/portfolio.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/portfolio.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -72,7 +72,7 @@
       "b"
       (N_ "Stock Accounts to report on")
       (lambda () (filter gnc:account-is-stock?
-                         (gnc:group-get-subaccounts
+                         (xaccGroupGetSubAccountsSorted
                           (gnc-get-current-group))))
       (lambda (accounts) (list  #t 
                                 (filter gnc:account-is-stock? accounts)))

Modified: gnucash/branches/swig-redo/src/report/standard-reports/price-scatter.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/price-scatter.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/price-scatter.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -166,7 +166,7 @@
          (document (gnc:make-html-document))
          (chart (gnc:make-html-scatter))
          (currency-accounts 
-          (filter gnc:account-has-shares? (gnc:group-get-subaccounts
+          (filter gnc:account-has-shares? (xaccGroupGetSubAccountsSorted
                                            (gnc-get-current-group))))
          (data '()))
 

Modified: gnucash/branches/swig-redo/src/report/standard-reports/register.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/register.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/register.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -114,8 +114,8 @@
     (reverse heading-list)))
 
 (define (gnc:split-get-balance-display split)
-  (let ((account (gnc:split-get-account split))
-        (balance (gnc:split-get-balance split)))
+  (let ((account (xaccSplitGetAccount split))
+        (balance (xaccSplitGetBalance split)))
     (if (and account (gnc-reverse-balance account))
         (gnc-numeric-neg balance)
         balance)))
@@ -123,56 +123,56 @@
 (define (add-split-row table split column-vector row-style
                        transaction-info? split-info? double?)
   (let* ((row-contents '())
-         (parent (gnc:split-get-parent split))
-         (account (gnc:split-get-account split))
+         (parent (xaccSplitGetParent split))
+         (account (xaccSplitGetAccount split))
          (currency (if account
                        (xaccAccountGetCommodity account)
                        (gnc-default-currency)))
-         (damount (gnc:split-get-amount split))
+         (damount (xaccSplitGetAmount split))
          (split-value (gnc:make-gnc-monetary currency damount)))
 
     (if (date-col column-vector)
         (addto! row-contents
                 (if transaction-info?
                     (gnc-print-date
-                     (gnc:transaction-get-date-posted parent))
+                     (gnc-transaction-get-date-posted parent))
                     " ")))
     (if (num-col column-vector)
         (addto! row-contents
                 (if transaction-info?
-                    (gnc:transaction-get-num parent)
+                    (xaccTransGetNum parent)
                     (if split-info?
-                        (gnc:split-get-action split)
+                        (xaccSplitGetAction split)
                         " "))))
     (if (description-col column-vector)
         (addto! row-contents
                 (if transaction-info?
-                    (gnc:transaction-get-description parent)
+                    (xaccTransGetDescription parent)
                     (if split-info?
-                        (gnc:split-get-memo split)
+                        (xaccSplitGetMemo split)
                         " "))))
     (if (account-col column-vector)
         (addto! row-contents
                 (if split-info?
                     (if transaction-info?
                         (let ((other-split
-                               (gnc:split-get-other-split split)))
+                               (xaccSplitGetOtherSplit split)))
                           (if other-split
                               (gnc-account-get-full-name
-                               (gnc:split-get-account other-split))
+                               (xaccSplitGetAccount other-split))
                               (_ "-- Split Transaction --")))
                         (gnc-account-get-full-name account))
                     " ")))
     (if (shares-col column-vector)
         (addto! row-contents
                 (if split-info?
-                    (gnc:split-get-amount split)
+                    (xaccSplitGetAmount split)
                     " ")))
     (if (price-col column-vector)
         (addto! row-contents 
                 (if split-info?
                     (gnc:make-gnc-monetary
-                     currency (gnc:split-get-share-price split))
+                     currency (xaccSplitGetSharePrice split))
                     " ")))
     (if (amount-single-col column-vector)
         (addto! row-contents
@@ -228,7 +228,7 @@
             (addto! row-contents
                     (gnc:make-html-table-cell/size
                      1 (- (num-columns-required column-vector) count)
-                     (gnc:transaction-get-notes parent)))
+                     (xaccTransGetNotes parent)))
             (gnc:html-table-append-row/markup! table row-style
                                                (reverse row-contents)))))
     split-value))
@@ -373,14 +373,14 @@
 
   (define (add-other-split-rows split table used-columns row-style)
     (define (other-rows-driver split parent table used-columns i)
-      (let ((current (gnc:transaction-get-split parent i)))
+      (let ((current (xaccTransGetSplit parent i)))
         (if current
             (begin
               (add-split-row table current used-columns row-style #f #t #f)
               (other-rows-driver split parent table
                                  used-columns (+ i 1))))))
 
-    (other-rows-driver split (gnc:split-get-parent split)
+    (other-rows-driver split (xaccSplitGetParent split)
                        table used-columns 0))
 
   (define (do-rows-with-subtotals leader
@@ -452,7 +452,7 @@
 				  credit-collector))))
 
   (define (splits-leader splits)
-    (let ((accounts (map gnc:split-get-account splits)))
+    (let ((accounts (map xaccSplitGetAccount splits)))
       (if (null? accounts) #f
           (begin
             (set! accounts (cons (car accounts)

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:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/transaction.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -71,16 +71,16 @@
                            corresponding-acc-code))
 
 (define (split-account-full-name-same-p a b)
-  (= (gnc:split-compare-account-full-names a b) 0))
+  (= (xaccSplitCompareAccountFullNames a b) 0))
 
 (define (split-account-code-same-p a b)
-  (= (gnc:split-compare-account-codes a b) 0))
+  (= (xaccSplitCompareAccountCodes a b) 0))
 
 (define (split-same-corr-account-full-name-p a b)
-  (= (gnc:split-compare-other-account-full-names a b) 0))
+  (= (xaccSplitCompareOtherAccountFullNames a b) 0))
 
 (define (split-same-corr-account-code-p a b)
-  (= (gnc:split-compare-other-account-codes a b) 0))
+  (= (xaccSplitCompareOtherAccountCodes a b) 0))
 
 (define (timepair-same-year tp-a tp-b)
   (= (gnc:timepair-get-year tp-a)
@@ -97,18 +97,18 @@
           (gnc:timepair-get-month tp-b))))
 
 (define (split-same-month-p a b)
-  (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
-        (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
+  (let ((tp-a (gnc-transaction-get-date-posted (xaccSplitGetParent a)))
+        (tp-b (gnc-transaction-get-date-posted (xaccSplitGetParent b))))
     (timepair-same-month tp-a tp-b)))
 
 (define (split-same-quarter-p a b)
-  (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
-        (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
+  (let ((tp-a (gnc-transaction-get-date-posted (xaccSplitGetParent a)))
+        (tp-b (gnc-transaction-get-date-posted (xaccSplitGetParent b))))
     (timepair-same-quarter tp-a tp-b)))
 
 (define (split-same-year-p a b)
-  (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
-        (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
+  (let ((tp-a (gnc-transaction-get-date-posted (xaccSplitGetParent a)))
+        (tp-b (gnc-transaction-get-date-posted (xaccSplitGetParent b))))
     (timepair-same-year tp-a tp-b)))
 
 (define (set-last-row-style! table tag . rest)
@@ -134,20 +134,20 @@
         (string-append 
            ;; display account code?
            (if show-account-code
-                 (string-append (gnc:account-get-code account) " ")
+                 (string-append (xaccAccountGetCode account) " ")
                  "")
            ;; display account name?
            (if show-account-name
                  ;; display full account name?
                  (if show-account-full-name
                       (gnc-account-get-full-name account)
-                      (gnc:account-get-name account))
+                      (xaccAccountGetName account))
                  ""))))
 
 ;; render an account subheading - column-vector determines what is displayed
 (define (render-account-subheading
          split table width subheading-style column-vector)
-  (let ((account (gnc:split-get-account split)))
+  (let ((account (xaccSplitGetAccount split)))
     (add-subheading-row (gnc:make-html-text
                          (gnc:html-markup-anchor
                            (gnc:account-anchor-text account)
@@ -159,7 +159,7 @@
 
 (define (render-corresponding-account-subheading 
          split table width subheading-style column-vector)
-  (let ((account (gnc:split-get-account (gnc:split-get-other-split split))))
+  (let ((account (xaccSplitGetAccount (xaccSplitGetOtherSplit split))))
     (add-subheading-row (gnc:make-html-text
                          (gnc:html-markup-anchor
                            (gnc:account-anchor-text account)
@@ -172,22 +172,22 @@
 (define (render-month-subheading split table width subheading-style column-vector)
   (add-subheading-row (gnc:date-get-month-year-string
                       (gnc:timepair->date 
-                       (gnc:transaction-get-date-posted
-                        (gnc:split-get-parent split))))
+                       (gnc-transaction-get-date-posted
+                        (xaccSplitGetParent split))))
                      table width subheading-style))
 
 (define (render-quarter-subheading split table width subheading-style column-vector)
   (add-subheading-row (gnc:date-get-quarter-year-string 
                       (gnc:timepair->date 
-                       (gnc:transaction-get-date-posted
-                        (gnc:split-get-parent split))))
+                       (gnc-transaction-get-date-posted
+                        (xaccSplitGetParent split))))
                      table width subheading-style))
 
 (define (render-year-subheading split table width subheading-style column-vector)
   (add-subheading-row (gnc:date-get-year-string 
                       (gnc:timepair->date 
-                       (gnc:transaction-get-date-posted
-                        (gnc:split-get-parent split))))
+                       (gnc-transaction-get-date-posted
+                        (xaccSplitGetParent split))))
                       table width subheading-style))
 
 
@@ -227,7 +227,7 @@
 (define (render-account-subtotal 
          table width split total-collector subtotal-style column-vector export?)
     (add-subtotal-row table width 
-                      (total-string (account-namestring (gnc:split-get-account split)
+                      (total-string (account-namestring (xaccSplitGetAccount split)
                                                         (used-sort-account-code      column-vector)
                                                         #t
                                                         (used-sort-account-full-name column-vector)))
@@ -236,8 +236,8 @@
 (define (render-corresponding-account-subtotal
          table width split total-collector subtotal-style column-vector export?)
     (add-subtotal-row table width
-                      (total-string (account-namestring (gnc:split-get-account 
-                                                          (gnc:split-get-other-split split))
+                      (total-string (account-namestring (xaccSplitGetAccount
+                                                          (xaccSplitGetOtherSplit split))
                                                         (used-sort-account-code      column-vector)
                                                         #t
                                                         (used-sort-account-full-name column-vector)))
@@ -245,8 +245,8 @@
 
 (define (render-month-subtotal
          table width split total-collector subtotal-style column-vector export?)
-  (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
-                                 (gnc:split-get-parent split)))))
+  (let ((tm (gnc:timepair->date (gnc-transaction-get-date-posted
+                                 (xaccSplitGetParent split)))))
     (add-subtotal-row table width 
                       (total-string (gnc:date-get-month-year-string tm))
                       total-collector subtotal-style export?)))
@@ -254,16 +254,16 @@
 
 (define (render-quarter-subtotal
          table width split total-collector subtotal-style column-vector export?)
-  (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
-                                 (gnc:split-get-parent split)))))
+  (let ((tm (gnc:timepair->date (gnc-transaction-get-date-posted
+                                 (xaccSplitGetParent split)))))
     (add-subtotal-row table width 
                       (total-string (gnc:date-get-quarter-year-string tm))
                      total-collector subtotal-style export?)))
 
 (define (render-year-subtotal
          table width split total-collector subtotal-style column-vector export?)
-  (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
-                                 (gnc:split-get-parent split)))))
+  (let ((tm (gnc:timepair->date (gnc-transaction-get-date-posted
+                                 (xaccSplitGetParent split)))))
     (add-subtotal-row table width 
                       (total-string (strftime "%Y" tm))
                       total-collector subtotal-style export?)))
@@ -415,8 +415,8 @@
 
   (let* ((row-contents '())
 	 (dummy  (gnc:debug "split is originally" split))
-         (parent (gnc:split-get-parent split))
-         (account (gnc:split-get-account split))
+         (parent (xaccSplitGetParent split))
+         (account (xaccSplitGetAccount split))
          (account-type (xaccAccountGetType account))
          (currency (if account
                        (xaccAccountGetCommodity account)
@@ -425,9 +425,9 @@
 			       (opt-val gnc:pagename-general optname-currency)
 			       currency))
          (damount (if (gnc:split-voided? split)
-					 (gnc:split-void-former-amount split)
-					 (gnc:split-get-amount split)))
-	 (trans-date (gnc:transaction-get-date-posted parent))
+					 (xaccSplitVoidFormerAmount split)
+					 (xaccSplitGetAmount split)))
+	 (trans-date (gnc-transaction-get-date-posted parent))
 	 (split-value (gnc:exchange-by-pricedb-nearest
 		       (gnc:make-gnc-monetary 
 			currency
@@ -443,28 +443,28 @@
     (if (used-date column-vector)
         (addto! row-contents
                 (if transaction-row?
-                    (gnc-print-date (gnc:transaction-get-date-posted parent))
+                    (gnc-print-date (gnc-transaction-get-date-posted parent))
                     " ")))
     (if (used-reconciled-date column-vector)
         (addto! row-contents
-		(let ((date (gnc:split-get-reconciled-date split)))
+		(let ((date (gnc-split-get-date-reconciled split)))
 		  (if (equal? date (cons 0 0))
 		      " "
 		      (gnc-print-date date)))))
     (if (used-num column-vector)
         (addto! row-contents
                 (if transaction-row?
-                    (gnc:transaction-get-num parent)
+                    (xaccTransGetNum parent)
                     " ")))
     (if (used-description column-vector)
         (addto! row-contents
                 (if transaction-row?
-                    (gnc:transaction-get-description parent)
+                    (xaccTransGetDescription parent)
                     " ")))
     
     (if (used-memo column-vector)
         (addto! row-contents
-                (gnc:split-get-memo split)))
+                (xaccSplitGetMemo split)))
     
     (if (or (used-account-name column-vector) (used-account-code column-vector))
        (addto! row-contents (account-namestring account
@@ -473,19 +473,19 @@
                                                 (used-account-full-name column-vector))))
     
     (if (or (used-other-account-name column-vector) (used-other-account-code column-vector))
-       (addto! row-contents (account-namestring (gnc:split-get-account
-                                                   (gnc:split-get-other-split split))
+       (addto! row-contents (account-namestring (xaccSplitGetAccount
+                                                   (xaccSplitGetOtherSplit split))
                                                 (used-other-account-code      column-vector)
                                                 (used-other-account-name      column-vector)
                                                 (used-other-account-full-name column-vector))))
     
     (if (used-shares column-vector)
-        (addto! row-contents (gnc:split-get-amount split)))
+        (addto! row-contents (xaccSplitGetAmount split)))
     (if (used-price column-vector)
         (addto! 
          row-contents 
          (gnc:make-gnc-monetary (xaccTransGetCurrency parent)
-                                (gnc:split-get-share-price split))))
+                                (xaccSplitGetSharePrice split))))
     (if (used-amount-single column-vector)
         (addto! row-contents
                 (gnc:make-html-table-cell/markup "number-cell"
@@ -505,12 +505,12 @@
     (if (used-running-balance column-vector)
 	(begin
 	  (gnc:debug "split is " split)
-	  (gnc:debug "split get balance:" (gnc:split-get-balance split))
+	  (gnc:debug "split get balance:" (xaccSplitGetBalance split))
 	  (addto! row-contents
 		  (gnc:make-html-table-cell/markup
 		   "number-cell"
 		   (gnc:make-gnc-monetary currency
-					  (gnc:split-get-balance split))))))
+					  (xaccSplitGetBalance split))))))
 	(gnc:html-table-append-row/markup! table row-style
                                        (reverse row-contents))
     split-value))
@@ -577,7 +577,7 @@
              ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
              ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
              ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
-       (gnc:group-get-subaccounts (gnc-get-current-group))))
+       (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
     #f #t))
 
   (gnc:register-trep-option
@@ -587,9 +587,9 @@
     (lambda ()
       ;; FIXME : gnc:get-current-accounts disappeared.
       (let ((current-accounts '())
-	    (num-accounts (gnc:group-get-num-accounts
+	    (num-accounts (xaccGroupGetNumAccounts
 			   (gnc-get-current-group)))
-	    (first-account (gnc:group-get-account
+	    (first-account (xaccGroupGetAccount
 			    (gnc-get-current-group) 0)))
 	(cond ((not (null? current-accounts))
 	       (list (car current-accounts)))
@@ -922,7 +922,7 @@
   (define (add-other-split-rows split table used-columns
                                 row-style account-types-to-reverse)
     (define (other-rows-driver split parent table used-columns i)
-      (let ((current (gnc:transaction-get-split parent i)))
+      (let ((current (xaccTransGetSplit parent i)))
         (cond ((not current) #f)
               ((equal? current split)
                (other-rows-driver split parent table used-columns (+ i 1)))
@@ -932,7 +932,7 @@
                       (other-rows-driver split parent table used-columns
                                          (+ i 1)))))))
 
-    (other-rows-driver split (gnc:split-get-parent split)
+    (other-rows-driver split (xaccSplitGetParent split)
                        table used-columns 0))
 
   (define (do-rows-with-subtotals splits 
@@ -1227,8 +1227,8 @@
 	  ;; Yep, this is a split transaction.
 
 	  (if splits-ok?
-	      (let* ((txn (gnc:split-get-parent split))
-		     (splits (gnc:transaction-get-splits txn)))
+	      (let* ((txn (xaccSplitGetParent split))
+		     (splits (xaccTransGetSplits txn)))
 
 		;; Walk through the list of splits.
 		;; if we reach the end, return #f
@@ -1239,7 +1239,7 @@
 		      #f
 		      (let* ((this (car splits))
 			     (rest (cdr splits))
-			     (acct (gnc:split-get-account this)))
+			     (acct (xaccSplitGetAccount this)))
 			(if (and (not (eq? this split))
 				 (member acct account-list))
 			    #t

Modified: gnucash/branches/swig-redo/src/report/standard-reports/trial-balance.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/standard-reports/trial-balance.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/standard-reports/trial-balance.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -185,7 +185,7 @@
                ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
                ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
                ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
-	 (gnc:group-get-subaccounts (gnc-get-current-group))))
+	 (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
       #f #t))
     (gnc:options-add-account-levels!
      options gnc:pagename-accounts optname-depth-limit

Modified: gnucash/branches/swig-redo/src/report/utility-reports/hello-world.scm
===================================================================
--- gnucash/branches/swig-redo/src/report/utility-reports/hello-world.scm	2006-10-10 00:10:28 UTC (rev 14980)
+++ gnucash/branches/swig-redo/src/report/utility-reports/hello-world.scm	2006-10-10 00:11:32 UTC (rev 14981)
@@ -452,7 +452,7 @@
 						    (gnc-account-get-full-name
 						     acct))
 				     "")
-                 (gnc:account-get-name acct)))
+                 (xaccAccountGetName acct)))
               accounts))))
           (gnc:html-document-add-object!
            document



More information about the gnucash-changes mailing list