r15316 - gnucash/branches/register-rewrite - Merge -r 15058:15313 from trunk.

Chris Shoemaker chris at cvs.gnucash.org
Fri Jan 5 18:52:12 EST 2007


Author: chris
Date: 2007-01-05 18:51:55 -0500 (Fri, 05 Jan 2007)
New Revision: 15316
Trac: http://svn.gnucash.org/trac/changeset/15316

Added:
   gnucash/branches/register-rewrite/packaging/win32/dist.sh
   gnucash/branches/register-rewrite/packaging/win32/functions
   gnucash/branches/register-rewrite/packaging/win32/goffice-0.3.2-patch.diff
   gnucash/branches/register-rewrite/src/pixmaps/gnucash-icon.ico
Removed:
   gnucash/branches/register-rewrite/doc/build-suse.txt
   gnucash/branches/register-rewrite/src/gnome-utils/argv-list-converters.c
   gnucash/branches/register-rewrite/src/gnome-utils/argv-list-converters.h
Modified:
   gnucash/branches/register-rewrite/
   gnucash/branches/register-rewrite/AUTHORS
   gnucash/branches/register-rewrite/ChangeLog
   gnucash/branches/register-rewrite/HACKING
   gnucash/branches/register-rewrite/README
   gnucash/branches/register-rewrite/README.dependencies
   gnucash/branches/register-rewrite/autogen.sh
   gnucash/branches/register-rewrite/configure.in
   gnucash/branches/register-rewrite/doc/Makefile.am
   gnucash/branches/register-rewrite/doc/README.francais
   gnucash/branches/register-rewrite/doc/README.german
   gnucash/branches/register-rewrite/doc/guile-hackers.txt
   gnucash/branches/register-rewrite/lib/libqof/qof/Makefile.am
   gnucash/branches/register-rewrite/lib/libqof/qof/qofmath128.c
   gnucash/branches/register-rewrite/lib/libqof/qof/qofquerycore.c
   gnucash/branches/register-rewrite/lib/libqof/qof/qofsession-p.h
   gnucash/branches/register-rewrite/lib/libqof/qof/qofsession.c
   gnucash/branches/register-rewrite/lib/libqof/qof/qofsession.h
   gnucash/branches/register-rewrite/macros/ac_pkg_swig.m4
   gnucash/branches/register-rewrite/packaging/win32/custom.sh
   gnucash/branches/register-rewrite/packaging/win32/gnucash.iss.in
   gnucash/branches/register-rewrite/packaging/win32/install.sh
   gnucash/branches/register-rewrite/src/app-utils/Makefile.am
   gnucash/branches/register-rewrite/src/app-utils/gnc-component-manager.c
   gnucash/branches/register-rewrite/src/app-utils/gnc-ui-util.c
   gnucash/branches/register-rewrite/src/app-utils/gnc-ui-util.h
   gnucash/branches/register-rewrite/src/app-utils/options.scm
   gnucash/branches/register-rewrite/src/app-utils/test/Makefile.am
   gnucash/branches/register-rewrite/src/backend/file/gnc-account-xml-v2.c
   gnucash/branches/register-rewrite/src/backend/file/gnc-backend-file.c
   gnucash/branches/register-rewrite/src/backend/file/gnc-commodity-xml-v2.c
   gnucash/branches/register-rewrite/src/backend/file/gnc-transaction-xml-v2.c
   gnucash/branches/register-rewrite/src/backend/file/io-gncxml-v2.c
   gnucash/branches/register-rewrite/src/backend/file/test/Makefile.am
   gnucash/branches/register-rewrite/src/backend/file/test/test-xml-account.c
   gnucash/branches/register-rewrite/src/backend/file/test/test-xml-commodity.c
   gnucash/branches/register-rewrite/src/backend/file/test/test-xml-pricedb.c
   gnucash/branches/register-rewrite/src/backend/file/test/test-xml-transaction.c
   gnucash/branches/register-rewrite/src/backend/postgres/test/Makefile.am
   gnucash/branches/register-rewrite/src/base-typemaps.i
   gnucash/branches/register-rewrite/src/bin/Makefile.am
   gnucash/branches/register-rewrite/src/bin/gnucash-bin.c
   gnucash/branches/register-rewrite/src/business/business-core/Makefile.am
   gnucash/branches/register-rewrite/src/business/business-core/business-core.scm
   gnucash/branches/register-rewrite/src/business/business-core/file/gnc-invoice-xml-v2.c
   gnucash/branches/register-rewrite/src/business/business-core/file/gnc-order-xml-v2.c
   gnucash/branches/register-rewrite/src/business/business-core/gncAddress.c
   gnucash/branches/register-rewrite/src/business/business-core/gncBillTerm.c
   gnucash/branches/register-rewrite/src/business/business-core/gncCustomer.c
   gnucash/branches/register-rewrite/src/business/business-core/gncEmployee.c
   gnucash/branches/register-rewrite/src/business/business-core/gncEntry.c
   gnucash/branches/register-rewrite/src/business/business-core/gncInvoice.c
   gnucash/branches/register-rewrite/src/business/business-core/gncJob.c
   gnucash/branches/register-rewrite/src/business/business-core/gncOrder.c
   gnucash/branches/register-rewrite/src/business/business-core/gncTaxTable.c
   gnucash/branches/register-rewrite/src/business/business-core/gncVendor.c
   gnucash/branches/register-rewrite/src/business/business-core/test/Makefile.am
   gnucash/branches/register-rewrite/src/business/business-gnome/Makefile.am
   gnucash/branches/register-rewrite/src/business/business-reports/aging.scm
   gnucash/branches/register-rewrite/src/business/business-reports/business-reports.scm
   gnucash/branches/register-rewrite/src/business/business-reports/easy-invoice.scm
   gnucash/branches/register-rewrite/src/business/business-reports/fancy-invoice.scm
   gnucash/branches/register-rewrite/src/business/business-reports/invoice.scm
   gnucash/branches/register-rewrite/src/business/business-reports/owner-report.scm
   gnucash/branches/register-rewrite/src/business/business-utils/Makefile.am
   gnucash/branches/register-rewrite/src/business/business-utils/business-options.scm
   gnucash/branches/register-rewrite/src/business/dialog-tax-table/Makefile.am
   gnucash/branches/register-rewrite/src/calculation/test/Makefile.am
   gnucash/branches/register-rewrite/src/core-utils/Makefile.am
   gnucash/branches/register-rewrite/src/core-utils/gnc-gobject-utils.c
   gnucash/branches/register-rewrite/src/engine/Account.c
   gnucash/branches/register-rewrite/src/engine/Makefile.am
   gnucash/branches/register-rewrite/src/engine/SchedXaction.c
   gnucash/branches/register-rewrite/src/engine/Split.c
   gnucash/branches/register-rewrite/src/engine/TransLog.c
   gnucash/branches/register-rewrite/src/engine/binreloc.c
   gnucash/branches/register-rewrite/src/engine/binreloc.h
   gnucash/branches/register-rewrite/src/engine/engine-interface.scm
   gnucash/branches/register-rewrite/src/engine/gnc-budget.c
   gnucash/branches/register-rewrite/src/engine/gnc-commodity.c
   gnucash/branches/register-rewrite/src/engine/gnc-lot.c
   gnucash/branches/register-rewrite/src/engine/gnc-path.c
   gnucash/branches/register-rewrite/src/engine/gnc-path.h
   gnucash/branches/register-rewrite/src/engine/gnc-pricedb.c
   gnucash/branches/register-rewrite/src/engine/gncla-dir.h.in
   gnucash/branches/register-rewrite/src/engine/kvp-scm.c
   gnucash/branches/register-rewrite/src/engine/test-core/Makefile.am
   gnucash/branches/register-rewrite/src/engine/test/Makefile.am
   gnucash/branches/register-rewrite/src/engine/test/test-book-merge.c
   gnucash/branches/register-rewrite/src/engine/test/test-group-vs-book.c
   gnucash/branches/register-rewrite/src/engine/test/test-guid.c
   gnucash/branches/register-rewrite/src/engine/test/test-load-engine.c
   gnucash/branches/register-rewrite/src/engine/test/test-lots.c
   gnucash/branches/register-rewrite/src/engine/test/test-numeric.c
   gnucash/branches/register-rewrite/src/engine/test/test-object.c
   gnucash/branches/register-rewrite/src/engine/test/test-period.c
   gnucash/branches/register-rewrite/src/engine/test/test-query.c
   gnucash/branches/register-rewrite/src/engine/test/test-querynew.c
   gnucash/branches/register-rewrite/src/engine/test/test-split-vs-account.c
   gnucash/branches/register-rewrite/src/engine/test/test-transaction-reversal.c
   gnucash/branches/register-rewrite/src/engine/test/test-transaction-voiding.c
   gnucash/branches/register-rewrite/src/gnc-module/Makefile.am
   gnucash/branches/register-rewrite/src/gnc-module/gnc-module.c
   gnucash/branches/register-rewrite/src/gnc-module/gnc-module.h
   gnucash/branches/register-rewrite/src/gnc-module/test/Makefile.am
   gnucash/branches/register-rewrite/src/gnc-module/test/misc-mods/Makefile.am
   gnucash/branches/register-rewrite/src/gnc-module/test/mod-bar/Makefile.am
   gnucash/branches/register-rewrite/src/gnc-module/test/mod-baz/Makefile.am
   gnucash/branches/register-rewrite/src/gnc-module/test/mod-foo/Makefile.am
   gnucash/branches/register-rewrite/src/gnc-test-env
   gnucash/branches/register-rewrite/src/gnome-utils/Makefile.am
   gnucash/branches/register-rewrite/src/gnome-utils/dialog-transfer.c
   gnucash/branches/register-rewrite/src/gnome-utils/druid-gconf-setup.c
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-dense-cal.c
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-file.c
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-frequency.c
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-gnome-utils.c
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-html.c
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-main-window.c
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-plugin-file-history.c
   gnucash/branches/register-rewrite/src/gnome-utils/gnc-tree-view.c
   gnucash/branches/register-rewrite/src/gnome-utils/test/Makefile.am
   gnucash/branches/register-rewrite/src/gnome/Makefile.am
   gnucash/branches/register-rewrite/src/gnome/dialog-sxsincelast.c
   gnucash/branches/register-rewrite/src/gnome/druid-hierarchy.c
   gnucash/branches/register-rewrite/src/gnome/druid-loan.c
   gnucash/branches/register-rewrite/src/gnome/druid-merge.c
   gnucash/branches/register-rewrite/src/gnome/glade/account.glade
   gnucash/branches/register-rewrite/src/gnome/gnc-plugin-basic-commands.c
   gnucash/branches/register-rewrite/src/gnome/top-level.c
   gnucash/branches/register-rewrite/src/gnome/ui/gnc-plugin-basic-commands-ui.xml
   gnucash/branches/register-rewrite/src/import-export/hbci/gnc-file-aqb-import.c
   gnucash/branches/register-rewrite/src/import-export/hbci/gnc-hbci-getbalance.c
   gnucash/branches/register-rewrite/src/import-export/hbci/test/Makefile.am
   gnucash/branches/register-rewrite/src/import-export/log-replay/gnc-log-replay.c
   gnucash/branches/register-rewrite/src/import-export/ofx/gnc-ofx-import.c
   gnucash/branches/register-rewrite/src/import-export/ofx/test/Makefile.am
   gnucash/branches/register-rewrite/src/import-export/qif-import/Makefile.am
   gnucash/branches/register-rewrite/src/import-export/qif-import/druid-qif-import.c
   gnucash/branches/register-rewrite/src/import-export/qif-import/qif-dialog-utils.scm
   gnucash/branches/register-rewrite/src/import-export/qif-import/qif-file.scm
   gnucash/branches/register-rewrite/src/import-export/qif-import/qif-guess-map.scm
   gnucash/branches/register-rewrite/src/import-export/qif-import/qif-merge-groups.scm
   gnucash/branches/register-rewrite/src/import-export/qif-import/qif-parse.scm
   gnucash/branches/register-rewrite/src/import-export/qif-import/qif-to-gnc.scm
   gnucash/branches/register-rewrite/src/import-export/qif-import/test/Makefile.am
   gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-acct-table.scm
   gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-bank-xtn-import.scm
   gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-invst-xtn-import.scm
   gnucash/branches/register-rewrite/src/import-export/qif/test/Makefile.am
   gnucash/branches/register-rewrite/src/import-export/test/Makefile.am
   gnucash/branches/register-rewrite/src/network-utils/test/Makefile.am
   gnucash/branches/register-rewrite/src/pixmaps/Makefile.am
   gnucash/branches/register-rewrite/src/quotes/gnc-fq-check.in
   gnucash/branches/register-rewrite/src/quotes/gnc-fq-update.in
   gnucash/branches/register-rewrite/src/register/ledger-core/test/Makefile.am
   gnucash/branches/register-rewrite/src/register/register-core/test/Makefile.am
   gnucash/branches/register-rewrite/src/register/register-gnome/test/Makefile.am
   gnucash/branches/register-rewrite/src/report/locale-specific/us/taxtxf-de_DE.scm
   gnucash/branches/register-rewrite/src/report/locale-specific/us/taxtxf.scm
   gnucash/branches/register-rewrite/src/report/locale-specific/us/test/Makefile.am
   gnucash/branches/register-rewrite/src/report/report-gnome/Makefile.am
   gnucash/branches/register-rewrite/src/report/report-gnome/gnc-plugin-page-report.c
   gnucash/branches/register-rewrite/src/report/report-gnome/report-gnome.scm
   gnucash/branches/register-rewrite/src/report/report-gnome/test/Makefile.am
   gnucash/branches/register-rewrite/src/report/report-system/Makefile.am
   gnucash/branches/register-rewrite/src/report/report-system/gnc-report.h
   gnucash/branches/register-rewrite/src/report/report-system/html-utilities.scm
   gnucash/branches/register-rewrite/src/report/report-system/report.scm
   gnucash/branches/register-rewrite/src/report/report-system/test/Makefile.am
   gnucash/branches/register-rewrite/src/report/standard-reports/account-piecharts.scm
   gnucash/branches/register-rewrite/src/report/standard-reports/budget.scm
   gnucash/branches/register-rewrite/src/report/standard-reports/cash-flow.scm
   gnucash/branches/register-rewrite/src/report/standard-reports/category-barchart.scm
   gnucash/branches/register-rewrite/src/report/standard-reports/register.scm
   gnucash/branches/register-rewrite/src/report/standard-reports/standard-reports.scm
   gnucash/branches/register-rewrite/src/report/standard-reports/transaction.scm
   gnucash/branches/register-rewrite/src/scm/price-quotes.scm
   gnucash/branches/register-rewrite/src/scm/printing/print-check.scm
   gnucash/branches/register-rewrite/src/tax/us/test/Makefile.am
   gnucash/branches/register-rewrite/util/gnc-svnversion
Log:
Merge -r 15058:15313 from trunk.



Property changes on: gnucash/branches/register-rewrite
___________________________________________________________________
Name: svk:merge
   - 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/swig-redo:802
3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/trunk:859
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13528
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk2:13366
   + 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/swig-redo:802
3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/trunk:1037
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13824
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk2:13366

Modified: gnucash/branches/register-rewrite/AUTHORS
===================================================================
--- gnucash/branches/register-rewrite/AUTHORS	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/AUTHORS	2007-01-05 23:51:55 UTC (rev 15316)
@@ -25,16 +25,14 @@
    he put the selection of the name up to popular vote. We all learned
    that democracy is not a good way to pick names.) Jeremy registered 
    the domain name, and created and maintained the gnucash.org web site 
-   for years, and got the initial GTK/gnome code working. The newest 
-   website design is Jeremy's as well. 
+   for years, and got the initial GTK/gnome code working.
 
 Rob Browning <rlb at cs.utexas.edu> abused everyone for not using perl,
    and then after we added Perl support, dumped Perl in favor of 
-   Guile/Scheme support. Rob maintined the build infrastructure for a 
-   while, added user preferences, and re-wrote the reports in scheme. 
-   One of Rob's recent contributions is the change-over of the 
-   file-format to XML. He is now concentrating on scheme performance. 
-   He is the g-wrap guile wrapper maintainer. 
+   Guile/Scheme support. Rob added user preferences, re-wrote the
+   reports in scheme, and contributed the change-over of the
+   file-format to XML. He then concentrated on scheme performance and
+   has been the g-wrap guile wrapper maintainer.
 
 Dave Peticolas <dave at krondo.com> worked on most parts of Gnucash, especially
    the register and GUI.
@@ -52,12 +50,13 @@
    automated test suite, new file hierarchy import.
 
 Christian Stimming <stimming at tuhh.de> is a report-generating 
-   monster. He's been one of the largest contributors to the current report
-   infrastructure, creating many of the important reports. 
-   He has also contributed HBCI support.
+   monster. He's been one of the largest contributors to the report
+   infrastructure, creating many of the important reports initially. 
+   He has also contributed HBCI online banking support and manages
+   internationalization and translation.
 
 Joshua Sled <jsled at asynchronous.org> works on scheduled transactions
-   and budgeting.
+   and budgeting. The current website design is his as well.
 
 Derek Atkins <derek at ihtfp.com> wrote the business-accounting package
    for Gnucash. This includes the Customer/Vendor database, Job tracking,
@@ -73,20 +72,24 @@
    hack obsessively on GnuCash. (Something in the name?)
 
 Chris Lyttle <chris at wilddev.net> Administers the GnuCash bug list.
-   Is currently writing new help and integrating and finishing a
-   concepts and tutorial written by Carol Champagne. Looks after
+   Improved the help and integrated and finished a concepts and
+   tutorial written by Carol Champagne. Looks after
    releasing new GnuCash versions and updating the website.
 
 Benoit Grégoire <bock at step.polymtl.ca> coded a long awaited OFX module
    for GnuCash and wrote the external libOFX library that it uses.
 
 Neil Williams <linux at codehelp.co.uk> finished conversion from GncBook
-   to QofBook and the separation of QoF into a standalone library.
-   Lots of Doxygen fixes and updates.
+   to QofBook and worked on the separation of QoF into a standalone
+   library. He also contributed lots of Doxygen fixes and updates.
 
 Chris Shoemaker <c.shoemaker at cox.net> implemented budgeting support
-   for GnuCash. He is also an all around hacker.
+   for GnuCash. He replaced g-wrap by SWIG as GnuCash's guile wrapper
+   generator and is also an all around hacker.
 
+Andreas Köhler <andi5.py at gmx.net> is hunting down lots of bugs,
+   especially for GUI code and other gtk related issues.
+
 Other Contributors:
 ----------------
 (In alphabetical order)
@@ -94,6 +97,7 @@
 Mike Alexander <mta at umich.edu> Cap gains, lot and MacOS fixes.
 Andrew Arensburger <arensb at cfar.umd.edu> for FreeBSD & other patches
 Matt Armstrong <matt_armstrong at bigfoot.com> for misc fixes
+Jon Arney <jarney1 at cox.net> Windows porting patches, misc fixes
 A. Alper Atici <alper_atici at yahoo.com> Turkish translation
 Fred Baube <fred at moremagic.com> for attempted Java port/MoneyDance
 Roman Bertle <bertle at smoerz.org> Austrian German account templates
@@ -160,7 +164,6 @@
 Alexey Kakunin <small at arcadia.spb.ru> quickfill patch for Cyrillic
 Ben Kelly <ben.kelly at ieee.org> for Motif menu bug fix, core dump fixes
 Tom Kludy <tkludy at csd.sgi.com> for SGI Irix port
-Andreas Köhler <KoehlerAndreas at web.de> German translation
 Matt Kraai <kraai at alumni.carnegiemellon.edu> date accelerator bug fix
 Sven Kuenzler <sk at xgm.de> for SuSE README file
 Fabrice Kurz <kurzf at voila.fr> French translation
@@ -220,6 +223,7 @@
 Paul Poulain <famille.p.poulain at free.fr> French translations
 Ron Record <rr at sco.com> for SCO Unixware & OpenServer binaries
 Keith Refson <Keith.Refson at earth.ox.ac.uk> Solaris fixes
+Jerry Quinn <jlquinn at optonline.net> Bugfixes
 Andreas Rottmann <a.rottmann at gmx.at> fixes for g-wrap 1.9
 Betina Schmidt <betina-s at gmx.de> German account template
 Dirk Schoenberger <schoenberger at signsoft.com> Qt/KDE work

Modified: gnucash/branches/register-rewrite/ChangeLog
===================================================================
--- gnucash/branches/register-rewrite/ChangeLog	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/ChangeLog	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,3 +1,20 @@
+2006-11-24  Christian Stimming <stimming at tuhh.de>
+
+	* src/engine/gnc-path.c: Fix gnc_path_get_localedir() because
+	binreloc's implementation did not respect the choice of
+	DATADIRNAME from AM_GLIB_GNU_GETTEXT in configure.
+
+2006-11-20  Derek Atkins  <derek at ihtfp.com>
+
+	* src/import-export/qif-import/qif-parse.scm:
+	  Don't have aktzu in the "case" twice.  Fixes #377519.
+
+2006-11-05  David Hampton  <hampton at employees.org>
+
+	* src/report/standard-reports/category-barchart.scm:
+	* src/report/standard-reports/account-piecharts.scm: Fix some
+	scheme inexact errors.  Fixes 347462.
+
 2006-10-09  Josh Sled <jsled at asynchronous.org>
 
 	* art/: Add, with 2.0 {banner,icon,logo,splash} art.

Modified: gnucash/branches/register-rewrite/HACKING
===================================================================
--- gnucash/branches/register-rewrite/HACKING	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/HACKING	2007-01-05 23:51:55 UTC (rev 15316)
@@ -60,8 +60,10 @@
 
  * All private functions are enclosed in __ (i.e. gnc:_do-not-call_)
 
- * All C functions wrapped with g-wrap have dashes in place of underscores.
-   (xaccSplitGetBalance --> gnc:split-get-balance).
+ * All C functions wrapped into scheme have dashes in place of underscores.
+   (xaccSplitGetBalance --> gnc:split-get-balance) - but FIXME:
+   This policy seems to have been dropped in favor of having
+   identical function names. cstim, 2006-10-30.
 
 
 Dave Peticolas <dave at krondo.com>

Modified: gnucash/branches/register-rewrite/README
===================================================================
--- gnucash/branches/register-rewrite/README	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/README	2007-01-05 23:51:55 UTC (rev 15316)
@@ -7,7 +7,7 @@
 USE AT YOUR OWN RISK (AND KEEP *LOTS* OF BACKUPS) 
 
 If you want something a bit more tested, please use the 
-1.8 stable series. 
+2.0 stable series. 
 ------------------------------------------------------------
 
 ##################
@@ -15,7 +15,7 @@
 ------------------
 
   - Overview
-  - Upgrading from 1.8.x
+  - Upgrading from 2.0.x
   - Dependencies
   - Invocation/running
   - Internationalization
@@ -139,11 +139,13 @@
 Upgrading from earlier versions
 -------------------------------
 
-There are many, many changes from the 1.8 series - have a look at the
+There are many changes from the 2.0 series - have a look at the
 NEWS file if you want more details. In particular:
 
-- GnuCash now requires g-wrap 1.3.4 or better. See the "dependencies"
-section of this file for more detail. 
+- GnuCash now uses SWIG 1.3.28 instead of g-wrap for the
+inter-language bindings. g-wrap has been dropped completely in
+gnucash 2.2.0. See the "dependencies" section of this file for
+more detail.
 
 - The data files are not able to be accessed by 1.6 once the new
 features are used and saved, i.e. they are not backwards-compatible! 
@@ -243,7 +245,7 @@
 
 GnuCash uses GNU Automake to handle the build process, so for most of
 the details, see the generic instructions in INSTALL.  (If you are
-building directory from CVS, read the README.cvs for more instructions.)
+building directory from SVN, read the README.svn for more instructions.)
 Below we detail the GnuCash specific bits.
 
 Prior to building GnuCash, you will have to obtain and install the
@@ -257,11 +259,12 @@
 
   libxml: available from ftp.gnome.org
 
-  g-wrap: RPM's, debs, and source available at 
-          http://www.gnucash.org/pub/g-wrap.
-          You should use g-wrap 1.3.4 or later.
+  SWIG: 1.3.28 or later is needed. See http://www.swig.org or
+    http://sourceforge.net/project/showfiles.php?group_id=1645
+    (Note: g-wrap has been dropped completely in gnucash 2.2.0 and
+    is no longer needed.)
 
-  texinfo: If you are building from CVS, you need the GNU texinfo
+  texinfo: If you are building from SVN, you need the GNU texinfo
            package, version 4.0 or later.
 
 What you'll need to get and install in order to make sure you have all
@@ -279,7 +282,7 @@
 
 
   SuSE:
-    see README.dependencies and doc/build-suse.txt
+    see README.dependencies
 
 GnuCash understands a few non-standard ./configure options.  You
 should run ./configure --help for the most up to date summary of the
@@ -365,7 +368,7 @@
 
   - http://www.unixrealm.com/downloads/
 
-You can get GnuCash Mandrake packages on Mandrake Cooker sites.
+You can get GnuCash Mandrake packages on Mandriva Cooker sites.
 
 
 Precompiled binaries & pre-requisite packages can be found at the
@@ -436,7 +439,7 @@
 
 Submitting a Patch:
 
-  This section has been removed to the file README.patches
+  This section has been moved to the file README.patches
 
   Please consult that file for details on using the script provided to make
   patches suitable for submitting to the GnuCash development team.

Modified: gnucash/branches/register-rewrite/README.dependencies
===================================================================
--- gnucash/branches/register-rewrite/README.dependencies	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/README.dependencies	2007-01-05 23:51:55 UTC (rev 15316)
@@ -61,18 +61,22 @@
 glib2
 gtk+2
 guile
-gwrap
 libart2
 libglade2
 libgnomeprint2.2
 libgnomeui2
+[lib]goffice
 libgsf1
 [lib]gtkhtml3
 libofx
 libxml2
 pango
+swig
 
+(Note: gwrap has been replaced by swig and dropped completely in
+SVN-trunk on 2006-10-20 and for gnucash-2.2.0.)
 
+
 libgoffice/libgsf details
 -------------------------
 
@@ -205,12 +209,32 @@
     - libxml-2.6.17
     - pango-1.8.1
     - libgtkhtml-3.1.11
-- SUSE
+- SUSE / opensuse
+  -  10.2 = 2006-12-07
+    - aqbanking-2.2.3
+    - cairo-1.2.4
+    - gconf2-2.14.0
+    - glib2-2.12.4
+    - goffice-0.2.1
+    - gtk2-2.10.6
+    - gtkhtml2-3.12.2
+    - guile-1.8.1
+    - g-wrap: not included
+    - libart_lgpl-2.3.17
+    - libglade2-2.6.0
+    - libgnomeprint-2.12.1
+    - libgnomeui-2.16.1
+    - libgsf-1.14.2
+    - libofx-0.8.2
+    - libxml2-2.6.26
+    - pango-1.14.5
+    - swig-1.3.29
   -  10.1 = 2006-05-11
     - aqbanking-1.2.0 (but package is broken; needs to be replaced by >=1.3.0)
     - cairo-1.0.2
     - gconf2-2.12.1
     - glib2-2.8.5
+    - goffice-0.1.2
     - gtk2-2.8.10
     - gtkhtml2-3.10.0
     - guile-1.6.7
@@ -223,6 +247,7 @@
     - libofx-0.8.0
     - libxml2-2.6.23
     - pango-1.10.2
+    - swig-1.3.27
   -  10.0 = 2005-10-06
     - aqbanking: not included; binary aqbanking-1.6.0 available at ftp://ftp.gwdg.de/linux/misc/suser-crauch/10.0/
     - cairo-1.0.0
@@ -239,6 +264,7 @@
     - libofx-0.7.0
     - libxml2-2.6.20
     - pango-1.10.0
+    - swig-1.3.24
   - *9.3  = 2005-04-15
     - aqbanking: not included, but binary aqbanking-1.6.0 provided by upstream
     - cairo-0.3.0
@@ -256,6 +282,7 @@
     - libofx-0.7.0
     - libxml2-2.6.17
     - pango-1.8.1
+    - swig-1.3.21
 - Fedora Core
   - *FC4 = 2005-06-13
     - aqbanking-1.0.4beta

Modified: gnucash/branches/register-rewrite/autogen.sh
===================================================================
--- gnucash/branches/register-rewrite/autogen.sh	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/autogen.sh	2007-01-05 23:51:55 UTC (rev 15316)
@@ -135,12 +135,17 @@
   DIE=1
 }
 
+# On MacOS, libtoolize is installed as glibtoolize, so handle that here.
 (${LIBTOOLIZE} --version) < /dev/null > /dev/null 2>&1 || {
-  echo
-  echo "**Error**: You must have \`libtoolize' installed to compile GnuCash."
-  echo "Download the appropriate package for your distribution,"
-  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
-  DIE=1
+  LIBTOOLIZE=glibtoolize
+  (${LIBTOOLIZE} --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtoolize' installed to compile GnuCash."
+    echo "Could not find either \`libtoolize' or \'glibtoolize'."
+    echo "Download the appropriate package for your distribution,"
+    echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+    DIE=1
+  }
 }
 
 (${AUTOMAKE} --version) < /dev/null > /dev/null 2>&1 || {

Modified: gnucash/branches/register-rewrite/configure.in
===================================================================
--- gnucash/branches/register-rewrite/configure.in	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/configure.in	2007-01-05 23:51:55 UTC (rev 15316)
@@ -836,13 +836,14 @@
 ### --------------------------------------------------------------------------
 ### i18n
 
-AC_ARG_WITH( locale-dir, 
-  [  --with-locale-dir=PATH    specify where to look for locale-specific information],
-  LOCALE_DIR="$with_locale_dir",
-  LOCALE_DIR="\${prefix}/share/locale")
+# This variable is set by GLIB_WITH_NLS, called through
+# AM_GLIB_GNU_GETTEXT above. Usually it is "share", but on some
+# platforms it is "lib". Make sure it is set.
+if test "x$DATADIRNAME" = "x"; then
+  DATADIRNAME="share"
+  AC_SUBST(DATADIRNAME)
+fi
 
-AC_SUBST(LOCALE_DIR)
-
 dnl check for nl_langinfo(D_FMT) which is missing on FreeBSD
 LANGINFO_D_FMT_CHECK
 

Modified: gnucash/branches/register-rewrite/doc/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/doc/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/doc/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -26,7 +26,6 @@
   TRANSLATION_HOWTO \
   build-aix.txt \
   build-solaris.txt \
-  build-suse.txt \
   generic_objects.txt \
   gnome-hackers.txt \
   gnc-prices.1.in \

Modified: gnucash/branches/register-rewrite/doc/README.francais
===================================================================
--- gnucash/branches/register-rewrite/doc/README.francais	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/doc/README.francais	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,397 +1,248 @@
-#######################################################################
-          Fichier README de Gnucash 1.5.x .
+###########################################
+          GnuCash version  2.0.x
+-------------------------------------------
 
-NOTE: C'EST UNE VERSION DE DEVELOPPEMENT!!! CETTE VERSION N'A PAS
-ETE TESTEE CORRECTEMENT ET PEUT FAIRE ABSOLUMENT N'IMPORTE QUOI!  
-
-UTILISEZ LA A VOS PROPRES RISQUES (ET FAITES *BEAUCOUP* DE SAUVEGARDES)
-
-Si vous voulez quelque chose de plus testé, s'il vous plaît utilisez
-les series stables 1.4.
------------------------------------------------------------------------
-
 #########
 Sommaire:
 ---------
 
   - Vue d'ensemble
-  - Mise à jour depuis la version 1.2.x
-  - Dépendences
+  - Mise à jour depuis la version 1.8.x
+  - Dépendances
   - Mise en route
   - Internationalisation
   - Compilation et installation
-  - OS supportés
-  - Sites additionnels de téléchargement
-  - Récupérer les sources avec CVS
+  - plates-formes supportées
+  - Sites de téléchargement miroirs
+  - Récupérer les sources avec SVN
   - Développement de GnuCash
 
-###############
+
+##############
 Vue d'ensemble
----------------
+--------------
 
-GnuCash est un gestionnaire de finances personnelles.Une interface
-graphique d'enregistrement ressemblant au talon de votre chéquier
-vous permet d'entrer et de suivre vos comptes bancaires,actions,
-revenus et même les marchés des changes.  L'interface est conçu pour
-être simple et facile à utiliser, mais elle est adossée à
-des principes de comptabilité de la partie double pour
-s'assurer que les livres sont équilibrés.
+GnuCash est un gestionnaire de finances personnelles. Une interface graphique
+d'enregistrement ressemblant au talon de votre chéquier vous permet d'entrer et
+de suivre vos comptes bancaires, actions, revenus et même vos opérations
+boursières. L'interface est conçue pour être simple et facile à utiliser, mais
+elle est adossée aux principes de comptabilité de la partie double pour assurer
+l'équilibre des comptes.
 
 Quelques une de ces caractéristiques sont:
 
-  - Une interface facile à utiliser.  Si vous savez utiliser
-    le talon de votre chéquier, vous savez utiliser GnuCash.
-    Tapez directement dans le registre,
-    déplacez vous entre les champs, et utilisez quick-fill
-    (saisie rapide) pour compléter automatiquement la transaction.
-    L'interface est personalisable depuis l'application elle-même
-    (pas de fichiers de config à modifier :) ).
-  - Importation de fichiers Quicken: Importation de fichiers au format
-    QIF de Quicken.
-    Les fichiers QIF sont automatiquement fusionnés pour éliminer
-    les transactions dupliquées
-  - La fenêtre de rapprochement avec soldes actuels rapprochés et
-    pointés rend le rapprochement facile.
-  - Potefeuille d'actions/fonds de placements (SICAV et FCP en France):
-    Suivi d'actions individuellement (une par compte) ou dans un
-    portefeuille de comptes (un groupe de comptes qui peuvent
-    être affiché ensemble).
-  - Récupère les cours des actions et fonds communs (FCP et SICAV) depuis
-    différents sites web, met à jour automatiquement le porte-feuille
-    (plus de fonds étant ajouter régulièrement).
-  - Rapports: Affichent la feuille bilan , pertes et profits, évaluation du
-    portefeuille, rapports de transactions, ou suivi du solde du compte,
-    ou exportation de ceux-ci en HTML. Vous pouvez écrire votre propre
-    rapport personalisé si vous connaissez un peu Scheme. Les rapports
-    peuvent maintenant être réalisés sur une période comptable!
-  - Monnaies/devises multiples et Marché des changes:
-    De multiple monnaies sont supportées et peuvent être achetées
-    et vendus(faire du commerce avec elles). Les mouvements monétaires
-    entre comptes sont totallement équilibrés quand la partie double
-    est activée.
-    (Quelques aspects du support de multiples monnaies ne sont pas 
-    totallement implémentés.
-  - Tableau de comptes: Un compte maitre/principal peut avoir une arborescence
-    de comptes détaillés en desssous de lui. Celà permet d'avoir des types de
-    comptes similaires (par exemple Liquidités, Banque, Actions)
-    groupés dans un compte maitre (par exemple Avoirs).
-  - Transactions réparties: Une simple transaction peut être répartie
-    en plusieurs morceaux pour enregistrer les impôts, paiements, et
-    autres entrées composées.
-  - Partie double: Quand elle est activé, chaque transaction
-    doit débiter un compte et créditer un autre d'un montant équivalent.
-    Celà permet de s'assurer que les "livres sont équilibrés":
-    c'est à dire que la différence entre les revenus et les sorties est
-    exactement égale à la somme de tous les avoirs, qu'ils soit bancaire, 
-    liquidités, actions ou autre.
-  - Types de comptes Revenus/Dépenses (Catégories):  
-    Ils ne servent pas uniquement à catégoriser votre flux
-    de liquidités/argent, mais quand ils sont utilisés avec la fonction de
-    la partie double, ceux-ci peuvent fournir un état exact des pertes et
-    profits et donc du résultat de la période.
-  - Extrait de compte/grand livre: De multiples comptes peuvent être affichés
-     dans une fenêtre registre/d'enregistrement au même moment. Celà peut
-    faciliter l'ennui de la recherche/vérification des erreurs de
-    frappe/d'entrée.
-    Il fournit aussi une manière agréable de visualiser un porte-feuille de
-    beaucoup d'actions, en montrant toutes les transactions dans ce
-    portefeuille.
-  - Ecrit en C avec un support étendu de scheme via Guile.
-  - Le support de Perl est disponible en option pour les scripts fonctionnant
-    via SWIG.
-  - L'accès au fichier est verrouillé par un drapeau de sécurité réseau,
-    prévenant des dommages accidentels si plusieurs utilisateurs essaient
-    d'accéder au même fichier, même si le fichier est monté par NFS.
-  - Fournit un format de flux de données(byte-stream format), qui permet aux
-    comptes et groupes de comptes d'être transmi par d'autres processus
-    via pipes ou sockets.
-  - Chargement de la date au format européen, traductions française,
-    anglaise, allemande et suédoise.
+* Une interface facile à utiliser.  Si vous savez utiliser le talon de votre
+chéquier, vous savez utiliser GnuCash. Tapez directement dans le registre,
+déplacez vous entre les champs, et utilisez quick-fill (saisie rapide) pour
+compléter automatiquement la transaction. L'interface est personnalisable depuis
+l'application elle-même (pas de fichiers de config à modifier :) ).
+* Transactions récurrentes : GnuCash a la possibilité de générer automatiquement
+des transactions, de rappeler leur échéance, de proposer de la valider ou de la
+retarder et également de les supprimer après un certain temps.
+* Importation de fichiers OFX : GnuCash est le premier logiciel libre à
+supporter le protocole « Open Financial Exchange » qui est de plus en plus
+utilisé par les banques. Le développement du support OFX et HBCI a permis une
+amélioration du mécanisme permettant de retrouver des transactions homologues
+et les doublons.
+* Support de l'HBCI : GnuCash est le premier logiciel libre à supporter le
+protocole allemand d'opérations bancaires en ligne
+* Importation de fichiers Quicken: Importation de fichiers au format QIF de
+Quicken. Les fichiers QIF sont automatiquement fusionnés pour éliminer les
+transactions dupliquées.
+* La fenêtre de rapprochement avec les soldes actuels rapprochés et pointés rend
+le rapprochement facile.
+* Portefeuille d'actions/fonds de placements (SICAV et FCP en France): suivi
+d'actions individuellement (une par compte) ou dans un portefeuille de comptes
+(un groupe de comptes qui peuvent être affichés ensemble).
+* Récupération des cours des actions et fonds communs (FCP et SICAV) depuis
+différents sites Web, mise à jour automatique du portefeuille.
+* Rapports : affichent le bilan , les pertes et profits, évaluation du
+portefeuille, rapports de transactions, ou suivi du solde du compte, ou
+exportation de ceux-ci en HTML. Vous pouvez écrire votre propre rapport
+personnalisé si vous connaissez un peu le langage Scheme. Les rapports peuvent
+maintenant être réalisés sur une période comptable.
+* Monnaies/devises multiples et Marché des changes : de multiple monnaies sont
+supportées et peuvent être achetées et vendues (faire du commerce avec elles).
+Les mouvements monétaires entre comptes sont totalement équilibrés quand la
+partie double est activée. Les transferts en devises multiples sont supportés.
+* Tableau de comptes : un compte maître/principal peut avoir une arborescence
+de comptes détaillés en dessous de lui. Cela permet d'avoir des types de
+comptes similaires (par exemple Liquidités, Banque, Actions) groupés dans un
+compte maître (par exemple Avoirs).
+* Transactions réparties : une simple transaction peut être répartie en
+plusieurs morceaux pour enregistrer les impôts, paiements, et autres entrées
+composées.
+* Partie double: Quand elle est activée, chaque transaction doit débiter un
+compte et créditer un autre d'un montant équivalent. Cela permet de s'assurer
+que les "livres sont équilibrés" : c'est à dire que la différence entre les
+revenus et les sorties est exactement égale à la somme de tous les avoirs,
+qu'ils soient bancaire, liquidités, actions ou autre.
+* Types de comptes Revenus/Dépenses (Catégories) : ils ne servent pas uniquement
+à catégoriser votre flux de liquidités/argent, mais quand ils sont utilisés avec
+la fonction de la partie double, ceux-ci peuvent fournir un état exact des
+pertes et profits et donc du résultat de la période.
+* Extrait de compte/grand livre : de multiples comptes peuvent être affichés
+dans une fenêtre registre/d'enregistrement au même moment. Cela peut faciliter
+l'ennui de la recherche/vérification des erreurs de frappe/d'entrée. Il fournit
+aussi une manière agréable de visualiser un portefeuille de beaucoup d'actions,
+en montrant toutes les transactions dans ce portefeuille.
+* Écrit en C avec un support étendu de Scheme via Guile.
+* L'accès au fichier est verrouillé par un drapeau de sécurité réseau, prévenant
+des dommages accidentels si plusieurs utilisateurs essaient d'accéder au même
+fichier, même si le fichier est monté par NFS.
+* Fournit un format de flux de données (byte-stream format), qui permet aux
+comptes et groupes de comptes d'être transmis par d'autres processus via pipes
+ou sockets.
+* Chargement de la date au format européen, traductions diverses.
+* Nouveau manuel utilisateur : une toute nouvelle aide en ligne a été écrite :
+elle se focalise sur comment faire les actions en relation avec un tutoriel et
+un guide des concepts.
+* De nouveaux menus : les menus de GnuCash ont été revus pour se conformer aux
+principes d'interface de Gnome.
 
 
 Home Page:
 
 http://gnucash.org/ (site officiel - version anglaise)
-http://www.multimania.com/yleny/gnucash (version française)
 
 Binaires précompilés / exécutables:
 http://www.gnucash.org/pub/gnucash/
 
 Versions de développement:
-http://www.gnucash.org/source_code.php3
+http://www.gnucash.org/en/hacking.phtml
 
-
 ###################################
-Mise à jour depuis la version 1.2.x
+Mise à jour depuis la version 1.8.x
 -----------------------------------
 
-Il y a beaucoup, beaucoup de changements depuis la serie 1.2 - 
-donnez un coup d'oeil au fichier NEWS si vous voulez plus de détails.
-Toutefois, le plus important pour l'installation est que GnuCash
-maintenant requiert les librairies Gnome à la place de Motif, et guile
-est requis.  Regardez la section "dépendances" de ce fichier pour plus
-de détails. Le format de fichier n'a pas changé
-(mais faites une sauvegarde de vos données de toute façon . . . )
+Il y a beaucoup, beaucoup de changements depuis la série 1.8 -
+Jetez un coup d'oeil au fichier NEWS si vous voulez plus de détails.
 
-Nous espérons que vous vous amuserez avec toutes les nouvelles fonctionnalités!
+- GnuCash nécessite g-wrap version 1.3.4 ou supérieur. Consultez la section «
+Dépendances » pour plus de détails.
 
-############
-Dépendences
-------------
+- Les données ne sont plus accessibles à partir de la version 1.6 une fois de
+nouvelles fonctionnalités utilisées : il n'y a pas de compatibilité
+descendante. Sauvegardez vos données!!
 
-Les packages suivants sont requis et doivent être installé pour faire
-fonctionner gnucash: 
+- La documentation de GnuCash est désormais déplacée dans un package séparé
+(gnucash-docs). si vous voyez un message du type « URL non trouvée », en
+cliquant un item du menu Aide, vous devrez installer la package gnucash-docs.
 
-guile   -- Fournit l'infrastructure du langage d'extension principal.
-           Il est utilisé intensivement par gnucash pour l'initialisation
-           et le démarrage.
-           Requiert la version 1.3 ou ultérieure/plus récente.
-           Le rpm guile-1.3-7 fonctionne.
+Nous espérons que vous vous apprécierez toutes les nouvelles fonctionnalités!
 
-slib    -- librairies scheme pour guile. A besoin de slib2c4 ou ultérieure.
+############
+Dépendances
+------------
 
-libpng  -- librairie PNG(portable network graphics). N'importe quelle version.
+Les packages suivants sont requis et doivent être installés pour faire
+fonctionner GnuCash:
 
-libjpeg -- librairie de chargement d'image JPEG. N'importe quelle version.
+[Consultez le fichier README.dependencies]
 
-libz    -- librairie de compression. N'importe quelle version.
 
-xpm     -- extension Pixmap pour X. N'importe quelle version.
-
-gnome-libs: la version 1.0.40 ou ultérieure/plus récente devrait fonctionner.
-            Ces librairies requièrent des librairies supportant de nombreuses
-	      autres, tel que gtk et glib.
-
-gnome-print: N'importe quelle version récente devrait fonctionner.
-
-gdk-pixbuf: N'importe quelle version devrait fonctionner.
-
-gtkhtml:   La version 0.4 ou ultérieure/plus récente devrait fonctionner.
-             Vous pouvez obtenir la dernière version de gtkhtml depuis
-	 Helix Code. (voir site ftp Gnome: ftp.gnome.org)
-	 Noter que celà à changé depuis la 1.4, qui utilisait la vieille
-	librairie gtkxmhtml.
-            Pour compiler les sources de GtkHTML-0.4, il faut gdk-pixbuf 0.7.0
-	(ou ultérieure), Bonobo 0.15 (ou ultérieure) et gnome-print 0.16
-	(ou ultérieure).
-
-Pour avoir la possibilité d'utiliser certaines fonctionnalitées de GnuCash,
-tel que les rapports et les téléchargements de cours d'actions par le réseau,
-vous devez avoir les packages suivant ci-dessous installés
-(en plus de ceux listés ci-dessus).
-
-Les RPM pour la plupart de ceux-ci peuvent être trouvés à
-  http://rufus.w3.org/linux/
-
-perl    -- A peu près n'importe quelle version de perl5 devrait fonctionner.
-           J'utilise perl-5.004 
-
-En plus, quelques modules perl ont besoin d'être installés:
-
-perl-LWP/libwww-perl-5.36
-perl-HTML/HTML-0.6
-perl-HTML/HTML-Parser-2.20
-        -- ces modules perl sont utilisés pour récupérer les cours des
-           actions et fonds de placements à partir d'internet. Vous pouvez
-	     récupérer ces RPMS à:
-           ftp://ftp.gnucash.org/pub/gnucash/binaries/RPMS
-           http://rufus.w3.org/linux/RPM/PByName.html
-           http://linas.org/linux/gnucash (en dernier recours)
-           ou les sources à
-           http://www.cpan.org/CPAN.html
-
- Si vous souhaitez utiliser le rapport de suivi du solde et avoir de superbes
- graphiques,
- vous aurez besoin d'installer:
-
-   gnuplot:  Un programme de dessin.
-	       Les RPM et debs sont disponible depuis les distributeurs
-	       Vous pouvez récupérer les sources depuis:
-             http://www.gnuplot.vt.edu/ 
-
 #############
 Mise en route
 -------------
 
 Pour les détails d'invocation/de lancement de GnuCash, regardez les pages de
 man dans doc/gnucash.1.
-Bientôt, nous aurons aussi la possibilité de lancer gnucash --help, mais ce
-n'est pas encore fini ...
+Vous pouvez également taper gnucash --help sur la ligne de commande.
 
-Vous pouvez démarrer GnuCash en ligne de commande, avec "gnucash" ou "gnucash
-<nom du fichier>", où <nom du fichier> est un fichier de compte de GnuCash.
-Des exemples de comptes peuvent être trouvé dans le sous-répertoire "data".
-les fichiers *.dat sont les comptes de GnuCash qui peuvent être ouvert avec
-l'entrée du menu "Ouvrir fichier". Les fichiers *.qif sont des fichiers 
-au format d'importation Quicken qui peuvent être ouvert avec l'entrée du menu
-"Importer QIF".
+Vous pouvez démarrer GnuCash en ligne de commande, avec « gnucash » ou « gnucash
+<nom du fichier> », où <nom du fichier> est un fichier de données de GnuCash.
 
-GnuCash répond aux variables d'environnement suivantes:
+Des exemples de comptes peuvent être trouvés dans le sous-répertoire "data".
+Les fichiers *.xac sont les comptes de GnuCash qui peuvent être ouverts avec
+le menu « Fichier/Ouvrir ».
+Les fichiers *.qif sont des fichiers au format Quicken qui peuvent être ouverts
+par le menu « Fichier/Importer QIF ».
 
-  GNC_RUN_AS_SHELL - si activé, permet à GnuCash de s'ouvrir dans un shell
-  guile avec toutes les fonctions de gnucash chargées. Depuis là, vous pouvez
-  récupérer comportement du démarrage normal comme ceci:
+GnuCash répond aux variables d'environnement suivantes :
 
-    GNC_RUN_AS_SHELL=t ./gnucash
-    guile> (primitive-load (getenv "GNC_BOOTSTRAP_SCM"))
-    guile> (gnc:load "startup.scm")
-    guile> (gnc:main)
-
-  C'est la même chose qui se passe si vous n'utilisez pas cette variable
-  d'environnement. Celà peut être utile quand vous essayez d'écrire et tester
-  de nouveaux fichiers .scm.
-
   GNC_BOOTSTRAP_SCM - l'emplacement du code scheme initial de bootstrapping.
 
-  GNC_SCM_LOAD_PATH - une contrainte pour le chemin de chargement de scheme
-  pour GnuCash.Il devrait être une chaine représentant une liste scheme
-  appropriée. Chaque élément peut soit être une chaine représentant un
-  répertoire, soit le symbole par défaut qui s'étendra au chemin par défaut,
-  ou l'actuel qui s'étendra au chemin de chargement par défaut au moment où
-  il rencontre le symbole.
+  GUILE_LOAD_PATH - Pour surpasser le chemin de GnuCash utilisé pour le
+  chargement de fichiers Scheme. C'est une variable de la même forme que les
+  variables d'environnement PATH ou LIBRARY_PATH.
 
-  GNC_DEBUG - active la sortie de débogage. Celà vous permet d'activer
-  le débogage précédent dans le processus de démarrage que vous pouvez faire
-  avec --debug.
+  GNC_MODULE_PATH - Pour surpasser le chemin de GnuCash utilisé pour le
+  chargement de modules GnuCash. C'est une variable de la même forme que les
+  variables d'environnement PATH ou LIBRARY_PATH.
 
-Comme exemple, voici un script d'encapsulation (wrapper script) que nous
-utilisons pour vous permettre d'utiliser de lancer gnucash depuis le répertoire
-local:
+  GNC_DEBUG - active la sortie de débogage. Cela vous permet d'activer
+  le débogage dans le processus de démarrageplus rapidement qu'avec l'option
+  --debug.
 
-  #! /bin/sh
 
-  export G
-  
-  NC_BOOTSTRAP_SCM=./share/scm/bootstrap.scm
-  export GNC_SCM_LOAD_PATH='("./share/scm")'
-  export GNC_DEBUG=t
-
-  # Run whichever one was built last.
-  exec ./src/gnucash \
-    --debug \
-    --share-dir ./share \
-    --config-dir ./etc \
-    --doc-path '("./doc/html/C")' \
-    "$@"
-
-
 ###########################
 Internationalisation (i18n)
 ---------------------------
 
-Des catalogues de messages existent pour le français et l'allemand. Ceux-ci
-sont activés avec les variables d'environnement. Par example, 
+Des traductions (fichiers .po) existent pour différentes langues. Ceux-ci
+sont activés avec les variables d'environnement. Par exemple,
 
 En français, avec bash:
     export LANG=fr_FR
-    
+
 En français, avec tcsh:
     setenv LANG fr_FR
-    
+
 Pour la version allemande:
     export LANG=de_DE
-    
 
-Les autres locales qui devrait pour la plupart fonctionner, mais sont
-toujours en développement:
 
-en_US
-en_GB
-fr_CH
-de_CH
+###########################
+Compilation et installation
+---------------------------
 
-(Gnucash utilise gettext maintenant, alors il faut utiliser
-les fichiers *.po , le traduire et le compiler par msgfmt.
-exemple: msgfmt fr.po --output=./gnucash.mo en ligne de commande
-dans /gnucash/po pour le fichier pour la france et copier gnucash.mo sur une
-redhat 6.1 GPL dans /usr/share/locale/fr/LC_MESSAGES et vous aurez vos menus
-et messages en français.)
+[Pour plus de détails sur la compilation, lisez doc/README.build-system]
 
-
-############################
-Compilation et installation:
-----------------------------
-
-Ces étapes ne s'applique pas aux distributions de binaires; uniquement aux
-distributions de sources.
-
-Pour plus de détails sur le système de compilation, regardez
-doc/README.build-system.)
-
 GnuCash utilise GNU Automake pour traiter le processus de compilation, donc
 pour plus de détails, regardez les instructions générales dans INSTALL.
-(Notez que, pour avoir un ./configure fonctionnant, vous devrez lancer 
-./autogen.sh.)
-Ci-dessous nous détaillons les parties spécifiques de Gnucash.
-  
 
+Ci-dessous nous détaillons les parties spécifiques de GnuCash.
+
+
 Avant de compiler GnuCash, vous devrez obtenir et installer les packages
 suivants:
 
-libtool :  Utiliser pour compiler nos versions internes de g-wrap qui charge
-           nos encapsuleurs C avec guile.
-           Disponible à ftp://ftp.gnu.org/gnu.
-           Les RPMs et debs sont largement disponible avec la plupart des
+libtool : Disponible à ftp://ftp.gnu.org/gnu.
+          Les RPMs et debs sont largement disponibles avec la plupart des
 	     distributions.
 
-SWIG    : Utilisé pour autogénérer les encapsuleurs perl.
-           Disponible à www.swig.org
-           nécessite 1.1p5 ou ultérieure ...
-
 système de développement gnome: en-têtes (headers), librairies, etc.
-ibxml: disponible sur ftp.gnome.org
 
+libxml:   disponible sur ftp.gnome.org
+
 g-wrap  : Les RPM's, debs, et sources sont disponibles à
-	ftp://ftp.gnucash.org/pub/g-wrap.
-	Si vous utilisez guile version 1.4 ou ultérieure, vous avez besoin de
-	g-wrap 0.9.5 ou ultérieure. Si vous utilisez une précédente version
-	de guile, vous devrez utilisez g-wrap 0.9.4.
+	     http://www.gnucash.org/pub/g-wrap.
+	     vous devrez utilisez g-wrap 1.3.4 ou supérieur
 
-  texinfo: Si vous compilez le CVS, vous avez besoin du package GNU texinfo,
-	version 4.0 ou ultérieure.
+texinfo: Si vous compilez depuis svn, vous avez besoin du package GNU texinfo,
+	    version 4.0 ou ultérieure.
 
-  docbook: Pour compiler le manuel en ligne, vous aurez besoin des outils
-	docbook,  incluant jade et les feuillles de style (stylesheets) de docbook .
 
-	
-Ce que vous aurez besoin de récupérer et d'installer dans l'ordre pour être
-sûr que vous ayez tous ces éléments corectement installés pour votre
-système d'exploitation favorit en particulier variera, mais ici se trouve au
-moins une liste partielle de ce que vous aurez besoin pour les systèmes
-que nous connaissons:
+Ce que vous aurez besoin de récupérer et d'installer pour être sûr d'avoir
+tous ces éléments correctement installés dépendra de votre système
+d'exploitation , mais ici se trouve une liste partielle de ce que vous aurez
+besoin pour les systèmes que nous connaissons:
 
-  Debian/GNU/Linux:
+  Debian/GNU/Linux: (cf README.dependencies)
     actuel:
       libgnome-dev
-      libgtkhtml-dev (vous pouvez le récupérer depuis Helixcode, il n'est pas  
-      dans la Debian)
-      guile1.3
-      libguile6-dev
-      libguile6-slib
+      libgtkhtml-dev
+      guile1.4
+      libguile9-dev
+      libguile9-slib
 
-  RedHat:
-    ???
 
-GnuCash comprend quelques options de ./configure non-standard. Vous
-devriez lancer ./configure --help pour le résumé le plus à jour des options
-supportées, mais ici se trouvent quelques descriptions sétaillées de
-quelques-unes d'entre elles:
+GnuCash comprend quelques options non-standard de ./configure . Vous
+devriez lancer « ./configure --help » pour la liste la plus à jour des options
+supportées.
 
-  --enable-opt-style-install
-
-    Gnucash supporte deux types d'installation, la première est le style normal
-    /usr ou /usr/local/ , où les fichiers sont installés dans
-    /usr/bin /usr/lib, etc.  Celà se fait par défaut.
-
-    Le second style est le FSSTND, l'installation de style opt. Dans ce style,
-    tous les fichiers sont installés sous un sous-répertoire commun,souvent
-    dans /usr/local/opt, avec les exécutables allant dans
-    /usr/local/opt/foo/bin, les librairies allant dans /usr/local/opt/foo/lib,
-    etc.  Pour demander ce style d'installation, utilisez uniquement l'option 
-    --enable-opt-style-install de ./configure.
-
-Si seulement vous voulez q'une langue en particulier soit installée, vous
-pouvez mettre la variable d'environnement LINGUAS avant de lancer configure.
+Si vous voulez seulement qu'une langue en particulier soit installée, vous
+pouvez définir la variable d'environnement LINGUAS avant de lancer ./configure.
 Par exemple, pour installer seulement les traductions française, lancez
 
   $ export LINGUAS=fr
@@ -402,229 +253,122 @@
   $ unset LINGUAS
   $ ./configure
 
-La dernière version 1.2 stable de GnuCash avait une interface utilisateur basée
-sur Motif, et il y avait aussi un expérimental, mais jamais terminé interface
-en QT.
-L'ensemble de ceux-ci ont été enlevé de l'arborescence des sources durant le
-processus de migration vers automake, mais quelqu'un qui est intéressé par la
-resurrection de ces parties peut facilement les retrouver dans le CVS.
-Notez que  tandis que vous avez besoin des librairies Gnome installées, vous 
-n'avez pas besoin d'avoir le bureau/interface Gnome.  
+Bien que vous ayez besoin des librairies Gnome installées, vous n'avez pas
+besoin d'utiliser le bureau/interface Gnome.
 
-Les destinations de lancement et d'installations sont séparées.  Le --prefix
-que vous spécifiez à configure détermine où les exécutables résultant seront
-regardé pour des choses au lancement.  Normallement celà détermine où un 
-"make install" mettra tous les fichiers.  Toutefois, automake aussi supporte la
-variable.  DESTDIR est utilisé durant l'étape `make install' pour relocaliser
-les objets d'installation dans un endroit prédisposé.  Chaque objet et chemin
-est préfixé avec la valeur de `DESTDIR' avant d'être copié dans l'endroit
-d'installation.
-Voici un exemple d'usage typique de DESTDIR:
+Les chemins de lancement et d'installations sont séparées.  Le --prefix que vous
+spécifiez à ./configure détermine le chemin où les exécutables chercheront des
+fichiers à leur lancement. Normalement, cela détermine où « make install »
+installera les fichiers. Cependant, automake supporte également des variables.
+DESTDIR est utilisée pendant le processus « make install » pour installer des
+objets dans un répertoire tampon. Chaque objet et chemin est préfixé avec la
+valeur de 'DESTDIR' avant d'être copié dans les répertoires d'installation.
 
-     make DESTDIR=/tmp/staging install
+   make DESTDIR=/tmp/staging install
 
-   Celà place les objets d'installation dans une arborescence de répertoire
-  construit  sous `/tmp/staging'.  Si `/gnu/bin/foo' et
-   `/gnu/share/aclocal/foo.m4' sont à être installés,
-   la commande ci-dessous devrait installer 
-`/tmp/staging/gnu/bin/foo' et `/tmp/staging/gnu/share/aclocal/foo.m4'.
+Cela place les objets d'installation dans une arborescence de répertoire
+construit  sous `/tmp/staging'.
+Si `/gnu/bin/foo' et /gnu/share/aclocal/foo.m4' doivent être installés, la
+commande ci-dessus installera `/tmp/staging/gnu/bin/foo' et
+`/tmp/staging/gnu/share/aclocal/foo.m4'.
 
 DESTDIR peut être utile quand on essaie de construire des images d'installation
 et des packages.
 
 
-###############
-Os supportés  :
----------------
-La version 1.5.X de GnuCash est connu pour fonctionner sur les systèmes
+########################
+Plates-formes supportées
+------------------------
+
+La version 2.0.x de GnuCash est réputer fonctionner sur les systèmes
 d'exploitation suivants:
 
-GNU/Linux             -- x86, Sparc, Alpha
+GNU/Linux            -- x86, Sparc, Alpha
 Solaris		      -- Sparc
-FreeBSD               -- x86
-OpenBSD               -- x86
+FreeBSD              -- x86
+OpenBSD              -- x86
+MacOS X		      -- PPC
 
-Les précédente versions sont  connu pour fonctionner sur les
-plateformes suivantes, mais leurs états actuels sont inconnus:
+Les précédentes versions étaient réputées fonctionner sur les plateformes
+suivantes :
 
-SGI IRIX              -- MIPS 
+SGI IRIX              -- MIPS
 IBM AIX 4.1.5         -- RS/6000   http://www-frec.bull.com/
 Unixware 7            -- Intel
 SCO OpenServer 5.0.4  -- Intel
 
-regardez à ftp://ftp.gnucash.org/pub/xacc (grande-bande passante)
-ou  http://linas.org/linux/gnucash (slow-www ) 
-pour les binaires précompilés ( mais *très vieilles*) pour ces plateformes.
+GnuCash peut probablement fonctionner avec la plupart des plateformes POSIX, si
+les librairies et les outils sont disponibles.
 
-Gnucash peut probablement être fait pour fonctionner avec la plupart des
-plateformes POSIX, si les les librairies fournies et les outils sont 
-disponibles.
 
-#####################################
-Sites additionnels de téléchargement:
--------------------------------------
+###############################
+Sites de téléchargement miroirs
+-------------------------------
 
-Vous pouvez aussi télécharger gnucash à partir de:
+Vous pouvez aussi télécharger GnuCash à partir de:
 
   - http://download.sourceforge.net/gnucash
-  - ftp://ftp.krondo.com
 
+
 Vous pouvez télécharger les packages Solaris de GnuCash à partir de:
 
   - http://www.unixrealm.com/downloads/
 
-Vous pouvez récupérer les packages Mandrake de GnuCash sur les sites Cooker de 
-Mandrake.
+Vous pouvez récupérer les packages Mandriva de GnuCash sur les sites Cooker de
+Mandriva ou dans les dernières versions de la distribution)
 
-Les binaires précompilés et les packages pré-requis peuvent être trouvé sur
-les sites suivants.Les versions de Gnucash ici sont toutes *extrêmement*
-vieilles, et sont en fait de l'ancêtre de gnucash : "x-accountant ou xacc".
 
-IBM AIX 4.1.5 
-      -- SMIT-installable images
-      -- warning, this is from the 1.0 series of xacc
-      http://www.bull.de/pub/
-      see also http://www-frec.bull.com/
+#####################################
+Récupérer les sources avec Subversion
+-------------------------------------
 
-SCO OpenServer 5.0.4 
-      http://www.sco.com/skunkware/osr5/x11/apps/xacc/VOLS.tar
-      -- warning, this is from the 1.0 series of xacc
+Une version en lecture seule de l'arborescence Subversion est disponible à
+cette adresse :
 
+	http://svn.gnucash.org/repo/gnucash/
 
-Unixware 7
-      -- use pkgadd to install
-      http://www.sco.com/skunkware/uw7/x11/apps/xacc/xacc.pkg.gz
+Pour obtenir ce qui fut le CVS HEAD (et ce qui inclus maintenant ce qui était
+gnucash-gnome2-dev), vous devrez obtenir le svn TRUNK :
 
-SGI Irix
-      -- in SGI install format
-      -- warning, this is a very down-level version
-      http://linas.org/linux/xacc/xacc-1.0b7-sgi-irix.inst.tar
+	svn checkout http://svn.gnucash.org/repo/gnucash/trunk gnucash
 
-###############################
-Récupérer les sources avec CVS
--------------------------------
+L'argument « gnucash » ci dessus peut être n'importe quel nom de répertoire sur
+votre disque local, et est optionnel. Si vous l'omettez, vous aurez un
+répertoire nommé « trunk » contenant les sources.
 
-Une version en lecture-seule de l'arborescence de cvs tree est disponible
-sur le net.
-Pour y accéder, premièrement, loggger vous, comme ceci:
+Si vous voulez obtenir les derniers sources de la version 2.0.x, vous devrez
+les récupérer dans le branche 2.0, comme suit :
 
- cvs -d :pserver:cvs at cvs.gnucash.org:/home/cvs/cvsroot login
+	svn checkout http://svn.gnucash.org/repo/gnucash/branches/2.0 gnucash-2.0
 
-Le mot de passe (password)est "guest"
 
-Pour récupérer une copie des sources dans l'arborescence de développpement
-expérimental faites un
-
-cvs -z3 -d :pserver:cvs at cvs.gnucash.org:/home/cvs/cvsroot checkout -r HEAD 
-gnucash
-
-Pour récupérer une copie des sources de l'arborescence de la version de
-production stable gnucash-1.4, faites un
-
-cvs -z3 -d :pserver:cvs at cvs.gnucash.org:/home/cvs/cvsroot checkout -r
-gnucash-1-4-branch gnucash
-
 ########################
 Développement de GnuCash
 ------------------------
 Avant de démarrer à développer sur GnuCash, vous devriez faire les choses
 suivantes:
 
-1. lisez le fichier src/coding-style.txt pour apprendre les styles
-   de codage utilisés dans le code source de GnuCash.
+1. lisez le fichier src/doc/coding-style.txt pour apprendre les styles
+   de codage utilisés dans le code source de GnuCash. Lisez également
+   http://wiki.gnucash.org/wiki/Development
 
 2. Plusieurs des répertoires sous src contiennent des fichiers appellés
    design.txt qui expliquent beaucoup des aspects de la conception de GnuCash.
    Lisez les.
 
-3. Allez sur le site web de gnucash et survoler les archives de la liste de
-   courriers de développement de gnucash(development mailing list).
+3. Allez sur le site web de GnuCash et survoler les archives de la liste de
+   diffusion du développement de GnuCash (gnucash-devel).
 
-4. Rejoignez la liste de courriers de développement de gnucash(development
-   mailing list).
-   Regardez le site web de gnucash pour des détails sur comment faire celà.
+   4. Rejoignez la liste de diffusion de développement de GnuCash
+   (gnucash-devel). Regardez le site web de GnuCash pour des détails sur la
+   méthode pour y parvenir.
 
 
 Soumettre un patch
 
-Dès que vous avez fait un certain travail que vous aimeriez soumettre, vous
-avez besoin d'envoyer un patch. Il y a un script perl appelé make-gnucash-patch
-fourni avec la distribution que vous pouvez utiliser pour créer le patch.
-Ici, se trouve comment utiliser ce script perl.
+[Cette section a été transférée dans le fichier README.patches]
 
-Premièrement, configurer vos répertoires de développement comme ce qui suit:
+Lisez SVP ce fichier sur les méthodes utilisées pour transmettre un patch à
+l'équipe de développement de GnuCash.
 
-< Répertoire de développement maison (home) de GnuCash >
-    |
-    |---- < répertoire contenant les sources originales de GnuCash >
-    |
-    |---- < répertoire contenant vos sources modifiées de GnuCash >
-
-Un exemple concret de ces répertoires devrait être:
-
-/home/me/gnucash
-    |
-    |---- /home/me/gnucash/gnucash.pristine (sources originales)
-    |
-    |---- /home/me/gnucash/gnucash.mywork (sources originales + mes modifs)
-
-Copier le script make-gnucash-patch vers le répertoire de développement maison
-(/home/me/gnucash au-dessus). Maintenant metter les trois variables en haut
-de ce fichier pour refléter les noms de vos répertoires. Les noms donnés
-ci-dessous, vous devriez les utiliser
-
-  export GNC_MAKEPATCH_OLD_DIR=gnucash.pristine
-  export GNC_MAKEPATCH_NEW_DIR=gnucash.mywork
-  export GNC_MAKEPATCH_HOME_DIR=/home/me/gnucash
-
-Bien sûr avant de faire votre, soyez sûr *qu'ensemble* votre répertoire de
-travail et votre répertoire pristine sont synchroniser avec le cvs.
-Lancez 'cvs -z3 update -dP' dans l'ensemble des répertoires pour vous assurer
-que c'est le cas.
-La mise à jour depuis le cvs dans votre répertoire de travail
-peut causer les conflits dans un fichier.
-Vous devez résoudre ces conflits avant de faire un patch.
-
-
-Maintenant lancer le script. Notez que le script requiert les programmes
-'makepatch', 'gzip', 'diff', et 'uuencode' (et, bien sûr , 'perl')
-pour fonctionner. 
-
-Quand vous lancez le script, trois fichiers seront générés:
-
-  gnc.diff - Ce fichier est un fichier texte ascii contenant les différences
-             entre les sources originales et vos modifications. En bas de ce
-             fichier se trouve une liste de fichiers qui sont ajoutés,
-             changés, ou supprimés.
-
-             S'il vous plait examinez ce fichier (spéciallement la liste en 
-bas)
-             pour être sûr que tous vos changements (et pas d'autres 
-changements)
-             sont présent dans le fichier.
-
-             Ne pas soumettre ce fichier!
-
-  gnucash.diff.gz - C'est une version gzippé du fichier au-dessus.
-
-                    Ne pas soumettre ce fichier!
-
-  gnucash.diff.gz.uue - C'est une version uuencodée (ascii-encodé) 
-                        du fichier au-dessus.
-
-                        C'est le fichier à soumettre.
-
-Envoyez gnucash.diff.gz.uue à gnucash-patches at gnucash.org
-
-Merci par avance pour votre contribution!
-
-
-Traduction faite le 12/11/00 par Yannick LE NY
-Cette traduction n'est peut-etre plus à jour,
-donc référez vous au fichier README en anglais.
-Pour toutes remarques ou suggestions:
-y-le-ny at ifrance.com
-
-Local Variables:
-mode: text
-End:
+Merci,

Modified: gnucash/branches/register-rewrite/doc/README.german
===================================================================
--- gnucash/branches/register-rewrite/doc/README.german	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/doc/README.german	2007-01-05 23:51:55 UTC (rev 15316)
@@ -45,7 +45,8 @@
 -----------------
 
 Siehe README.dependencies; im wesentlichen alle
-Gnome2-Entwickler-Pakete sowie guile, slib und g-wrap.
+Gnome2-Entwickler-Pakete sowie guile, slib und swig. (g-wrap wurde
+mit gnucash-2.2.0 durch swig ersetzt und wird nicht mehr benutzt.)
 
 Für die HBCI-Funktionen muss außerdem das Paket aqbanking
 installiert sein, welches noch ein Paket namens gwenhywfar
@@ -72,9 +73,7 @@
 Nur beim Uebersetzen von GnuCash braucht man zusaetzlich die folgenden 
 Pakete: 
 
-libtool -- Um unsere interne Version von g-wrap zu uebersetzen, die 
-           unsere guile-C 'wrappers' enthaelt.
-           Erhaeltlich bei ftp://ftp.gnu.org/gnu.
+libtool -- Erhaeltlich bei ftp://ftp.gnu.org/gnu.
            RPM's und deb's sind in ihrer Betriebssystem-Distribution.
 
 Normalerweise wird GnuCash wie folgt übersetzt und installiert:

Deleted: gnucash/branches/register-rewrite/doc/build-suse.txt
===================================================================
--- gnucash/branches/register-rewrite/doc/build-suse.txt	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/doc/build-suse.txt	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,105 +0,0 @@
-How to install gnucash on SuSE
-==============================
-(written 2000-01-07 by Peter Pointner <peter at wuzel.m.isar.de>)
-(last changed 2002-08-08 by Herbert Thoma (herbie at hthoma.de))
-
-Notes:
-
-- This is only one way to get GnuCash running on SuSE. I did test
-  that, but there might be errors anyway, and of course you do all at
-  your own risk. If you find errors, you might report them to the
-  gnucash mailing list (gnucash-devel at gnucash.org)
-
-- This is for SuSE 7.2, 7.3 and 8.0 (Intel). Earlier SuSE 
-  distributions lack some required packages. Later SuSE distributions 
-  didn't exist at the time of writing.
-  NOTE: You can install new packages to older versions of SuSE from
-        CD or ftp.suse.de or ftp.suse.com
-
-- This howto is primarily intended for compiling from source.
-  If you install the rpm, you don't need the various dev packages
-  (However, you won't see this howto until you installed the 
-  GnuCash rpm succesfully ;-).)
-
-- The current stable version is gnucash-1.6.x,
-  the current development version is gnucash-1.7.x.
-
-Let's go:
-
-* Make sure you have a running system, including X and gnome
-  (and don't forget the development packages)
-
-* Download g-wrap from
-    ftp://ftp.gnucash.org/pub/g-wrap/
-  For the 1.6.x version you need g-wrap-1.2.1
-  unpack and untar, then
-  ./configure, make, su, make install
-
-  For the 1.7.x version you need g-wrap-1.3.2
-  g-wrap-1.2 and g-wrap-1-3 are NOT compatible. If you want to
-  use both the stable and the development version of GnuCash
-  see the notes at the end of this file.
-
-* Download GnuCash
-  stable version:
-    http://www.gnucash.org/pub/gnucash/sources/stable/gnucash-1.6.x.tar.gz
-  development version:
-    http://www.gnucash.org/pub/gnucash/sources/unstable/
-  and unpack it
-    tar xzf gnucash-1.y.x.tar.gz
-* Alternatively get GnuCash from cvs
-    cvs -d :pserver:cvs at cvs.gnucash.org:/home/cvs/cvsroot login (password guest)
-    cvs -d :pserver:cvs at cvs.gnucash.org:/home/cvs/cvsroot checkout gnucash
-    (this will get you the latest development version)
-
-* The lib directory contains packages that are needed to build GnuCash
-  but are not widely available yet. Read the file lib/README for details.
-
-* Make symbolic link for every file in /opt/gnome/share/aclocal
-  to /usr/share/aclocal (or tell me how to modify the automake setup
-  so that it looks in /opt/gnome/share/aclocal for input ;-))
-
-* Configure, build and install gnucash. Installation must probably be
-  done as root, the files go to various places in /usr/local.
-
-    cd gnucash-1.y.x
-    ./autogen.sh
-    make
-    su root -c "make install"
-
-  To build GnuCash 1.7.x you need to add the argument --host=i686-pc-linux-gnu
-  to the autogen.sh command (at least with SuSE 8.0).
-
-* You may need to run GnuCash once as root, because guile needs to set up
-  some things for slib. Alternatively you can try as root:
-    guile -c "(use-modules (ice-9 slib)) (require 'new-catalog)"
-
-* If want to send a patch, you need the makepatch perl module, which can
-  be found at:
-    ftp://ftp.cpan.org/pub/CPAN/authors/Johan_Vromans/makepatch-2.00a.tar.gz
-  unpack and untar, then
-  perl Makefile.PL, make, su, make install
-
-
-Installing GnuCash 1.6 and 1.7 to one system:
----------------------------------------------
-
-It is quite tricky to have the stable and development versions of
-GnuCash running on one system, because they need incompatible
-versions of g-wrap (1.2.1 resp. 1.3.2).
-
-On my system I have GnuCash 1.6.x and g-wrap-1.2.1 installed in the
-usual location (/usr/local/).
-
-GnuCash 1.7.x is installed in /opt/gnucash/test_install/cvs_head
-g-wrap-1.3.2 is installed in /opt/gnucash/g-wrap-latest
-
-To compile GnuCash 1.7.x I do:
-
-export PATH=/opt/gnucash/g-wrap-latest/bin:$PATH
-export LD_LIBRARY_PATH=/opt/gnucash/g-wrap-latest/lib:$LD_LIBRARY_PATH
-
-./autogen.sh --prefix=/opt/gnucash/test_install/cvs_head 
- --with-g-wrap-prefix=/opt/gnucash/g-wrap-latest --host=i686-pc-linux-gnu
-
-make

Modified: gnucash/branches/register-rewrite/doc/guile-hackers.txt
===================================================================
--- gnucash/branches/register-rewrite/doc/guile-hackers.txt	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/doc/guile-hackers.txt	2007-01-05 23:51:55 UTC (rev 15316)
@@ -53,17 +53,15 @@
 g-wrap
 ------
 
-g-wrap is the tool used to automate the wrapping of C functions to
-make them callable from the guile code.  g-wrap is now maintained by
-Rob Browning and is available from ftp://ftp.gnucash.org/pub/g-wrap,
-or as a Debian package from http://www.cs.mu.oz.au/~rgmerk/software.
-Documentation in info format is distributed as part of the package.
-Available C functions are wrapped in gnucash/src/g-wrap/gnc.gwp.
-Pointers are wrapped using some stuff in
-gnucash/lib/g-wrap/guile/pointer.scm which is not documented but looks
-reasonably straightforward.
+Note: gwrap has been replaced by swig and dropped completely in
+SVN-trunk on 2006-10-20 and for gnucash-2.2.0.
 
+(Old info: g-wrap is the tool used to automate the wrapping of C
+functions to make them callable from the guile code.  g-wrap is
+now maintained by Rob Browning and is available from
+ftp://ftp.gnucash.org/pub/g-wrap )
 
+
 Garbage collection:
 -------------------
 

Modified: gnucash/branches/register-rewrite/lib/libqof/qof/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/lib/libqof/qof/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/lib/libqof/qof/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -82,8 +82,6 @@
    qofquerycore-p.h \
    qofsession-p.h
 
-QOFLIBdir = $(QOF_LIB_DIR)
-
 EXTRA_DIST = \
   qofla-dir.h.in \
   qofmath128.c
@@ -91,8 +89,16 @@
 qofla-dir.h: $(srcdir)/qofla-dir.h.in Makefile
 	rm -f $@.tmp
 	sed < $< > $@.tmp \
-                -e 's#@-libdir-@#${QOFLIBdir}#g'
+                -e 's#@-libdir-@#${QOF_LIB_DIR}#g'
 	 mv $@.tmp $@
 
 BUILT_SOURCES = qofla-dir.h
 CLEANFILES = $(BUILT_SOURCES)
+
+## For testing the qofmath128 routines
+# run "make check" (to build the test program) and then run test-qofmath
+check_PROGRAMS = test-qofmath
+test_qofmath_SOURCES=gnc-numeric.c
+test_qofmath_CPPFLAGS=$(libgncqof_la_CPPFLAGS) -DTEST_128_BIT_MULT
+test_qofmath_LDFLAGS=$(libgncqof_la_LDFLAGS)
+test_qofmath_LDADD=$(libgncqof_la_LIBADD)

Modified: gnucash/branches/register-rewrite/lib/libqof/qof/qofmath128.c
===================================================================
--- gnucash/branches/register-rewrite/lib/libqof/qof/qofmath128.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/lib/libqof/qof/qofmath128.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -329,10 +329,13 @@
 
 
 #ifdef TEST_128_BIT_MULT
+
 static void pr (gint64 a, gint64 b)
 {
    qofint128 prod = mult128 (a,b);
-   printf ("%" G_GINT64_FORMAT " * %" G_GINT64_FORMAT " = %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " (0x%llx %llx) %hd\n",
+   printf ("%" G_GINT64_FORMAT " * %" G_GINT64_FORMAT " = %"
+	   G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " (0x%"
+	   G_GINT64_MODIFIER "x %" G_GINT64_MODIFIER "x) %hd\n",
 	   a, b, prod.hi, prod.lo, prod.hi, prod.lo, prod.isbig);
 }
 
@@ -341,15 +344,24 @@
    qofint128 prod = mult128 (a,b);
    qofint128 quot = div128 (prod, c);
    gint64 rem = rem128 (prod, c);
-   printf ("%" G_GINT64_FORMAT " * %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " = %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " + %" G_GINT64_FORMAT " (0x%llx %llx) %hd\n",
+   printf ("%" G_GINT64_FORMAT " * %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT
+	   " = %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " + %"
+	   G_GINT64_FORMAT " (0x%" G_GINT64_MODIFIER "x %"
+	   G_GINT64_MODIFIER "x) %hd\n",
 	   a, b, c, quot.hi, quot.lo, rem, quot.hi, quot.lo, quot.isbig);
 }
 
 int main ()
 {
+  gint64 x;
+  qofint128 n;
+  gint64 d;
+  qofint128 quot;
+  int i;
+
   pr (2,2);
 
-  gint64 x = 1<<30;
+  x = 1<<30;
   x <<= 2;
 
   pr (x,x);
@@ -366,7 +378,7 @@
   pr (x,x);
   pr (x,-x);
 
-  pr (1000000, 10000000000000);
+  pr (1000000, G_GINT64_CONSTANT(10000000000000));
 
   prd (x,x,2);
   prd (x,x,3);
@@ -384,17 +396,16 @@
   prd (1111,x,11);
 
   /* Really test division */
-  qofint128 n;
   n.hi = 0xdd91;
   n.lo = 0x6c5abefbb9e13480ULL;
 
-  gint64 d = 0x2ae79964d3ae1d04ULL;
+  d = 0x2ae79964d3ae1d04ULL;
   
-  int i;
   for (i=0; i<20; i++) {
 
-  qofint128 quot = div128 (n, d);
-  printf ("%d result = %llx %llx\n", i, quot.hi, quot.lo);
+  quot = div128 (n, d);
+  printf ("%d result = %" G_GINT64_MODIFIER "x %" G_GINT64_MODIFIER "x\n",
+	  i, quot.hi, quot.lo);
     d >>=1;
     n = shift128 (n);
   }

Modified: gnucash/branches/register-rewrite/lib/libqof/qof/qofquerycore.c
===================================================================
--- gnucash/branches/register-rewrite/lib/libqof/qof/qofquerycore.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/lib/libqof/qof/qofquerycore.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -269,11 +269,17 @@
   pdata->matchstring = g_strdup (str);
 
   if (is_regex) {
+    int rc;
     int flags = REG_EXTENDED;
     if (options == QOF_STRING_MATCH_CASEINSENSITIVE)
       flags |= REG_ICASE;
 
-    regcomp(&pdata->compiled, str, flags);
+    rc = regcomp(&pdata->compiled, str, flags);
+    if (rc) {
+	g_free(pdata->matchstring);
+	g_free(pdata);
+	return NULL;
+    }
     pdata->is_regex = TRUE;
   }
 

Modified: gnucash/branches/register-rewrite/lib/libqof/qof/qofsession-p.h
===================================================================
--- gnucash/branches/register-rewrite/lib/libqof/qof/qofsession-p.h	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/lib/libqof/qof/qofsession-p.h	2007-01-05 23:51:55 UTC (rev 15316)
@@ -63,6 +63,7 @@
   /* Pointer to the backend that is actually used to move data
    * between the persistant store and the local engine.  */
   QofBackend *backend;
+  gint lock;
 };
 
 

Modified: gnucash/branches/register-rewrite/lib/libqof/qof/qofsession.c
===================================================================
--- gnucash/branches/register-rewrite/lib/libqof/qof/qofsession.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/lib/libqof/qof/qofsession.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -197,6 +197,7 @@
   session->books = g_list_append (NULL, qof_book_new ());
   session->book_id = NULL;
   session->backend = NULL;
+  session->lock = 1;
 
   qof_session_clear_error (session);
 }
@@ -1061,7 +1062,7 @@
           g_free(session->book_id);
           session->book_id = NULL;
           qof_session_push_error (session, err, msg);
-          LEAVE(" backend error %d %s", err, msg);
+          LEAVE(" backend error %d %s", err, msg ? msg : "(null)");
           return;
       }
       if (msg != NULL) 
@@ -1203,8 +1204,10 @@
 	int err;
 	gint num;
 	char *msg, *book_id;
-	
+
 	if (!session) return;
+	if (!g_atomic_int_dec_and_test(&session->lock))
+	    goto leave;
 	ENTER ("sess=%p book_id=%s", 
 		 session, session->book_id ? session->book_id : "(null)");
 	/* Partial book handling. */
@@ -1270,7 +1273,7 @@
 						session->book_id = NULL;
 						qof_session_push_error (session, err, msg);
 						LEAVE("changed backend error %d", err);
-						return;
+						goto leave;
 					}
 					if (msg != NULL) 
 					{
@@ -1290,11 +1293,11 @@
 				p = p->next;
 			}
 		}
-		if(!session->backend) 
+		if(!session->backend)
 		{
 			msg = g_strdup_printf("failed to load backend");
 			qof_session_push_error(session, ERR_BACKEND_NO_HANDLER, msg);
-			return;
+			goto leave;
 		}
 	}
 	/* If there is a backend, and the backend is reachable
@@ -1318,7 +1321,8 @@
 			if (be->sync)
 			{
 				(be->sync)(be, abook);
-				if (save_error_handler(be, session)) return;
+				if (save_error_handler(be, session)) 
+                                    goto leave;
 			}
 		}
 		/* If we got to here, then the backend saved everything 
@@ -1326,7 +1330,7 @@
 		/* Return the book_id to previous value. */
 		qof_session_clear_error (session);
 		LEAVE("Success");
-		return;
+		goto leave;
 	}
 	else
 	{
@@ -1334,9 +1338,17 @@
 		qof_session_push_error(session, ERR_BACKEND_NO_HANDLER, msg);
 	}
 	LEAVE("error -- No backend!");
+ leave:
+	g_atomic_int_inc(&session->lock);
+	return;
 }
 
 /* ====================================================================== */
+gboolean
+qof_session_save_in_progress(QofSession *session)
+{
+    return (session && g_atomic_int_get(&session->lock) != 1);
+}
 
 void
 qof_session_end (QofSession *session)

Modified: gnucash/branches/register-rewrite/lib/libqof/qof/qofsession.h
===================================================================
--- gnucash/branches/register-rewrite/lib/libqof/qof/qofsession.h	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/lib/libqof/qof/qofsession.h	2007-01-05 23:51:55 UTC (rev 15316)
@@ -222,6 +222,7 @@
  *    if any data in the session hasn't been saved to long-term storage.
  */
 gboolean qof_session_not_saved(QofSession *session);
+gboolean qof_session_save_in_progress(QofSession *session);
 
 /** Allows the backend to warn the user if a dataset already exists. */
 gboolean qof_session_save_may_clobber_data (QofSession *session);

Modified: gnucash/branches/register-rewrite/macros/ac_pkg_swig.m4
===================================================================
--- gnucash/branches/register-rewrite/macros/ac_pkg_swig.m4	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/macros/ac_pkg_swig.m4	2007-01-05 23:51:55 UTC (rev 15316)
@@ -28,7 +28,7 @@
 AC_DEFUN([AC_PROG_SWIG],[
         AC_PATH_PROG([SWIG],[swig])
         if test -z "$SWIG" ; then
-                AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org])
+                AC_MSG_ERROR([cannot find 'swig' program. You should look at http://www.swig.org])
                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
         elif test -n "$1" ; then
                 AC_MSG_CHECKING([for SWIG version])
@@ -74,15 +74,16 @@
                                 SWIG='echo "Error: SWIG version >= $1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
                         else
                                 AC_MSG_NOTICE([SWIG executable is '$SWIG'])
-                                SWIG_LIB=`$SWIG -swiglib`
-                                AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
+dnl We do not make use of SWIG_LIB and `$SWIG -swiglib` made problems on MinGW (output was two lines)
+dnl                                SWIG_LIB=`$SWIG -swiglib`
+dnl                                AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
                         fi
                 else
                         AC_MSG_ERROR([cannot determine SWIG version])
                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
                 fi
         fi
-        AC_SUBST([SWIG_LIB])
+dnl        AC_SUBST([SWIG_LIB])
 ])
 
 # SWIG_ENABLE_CXX()

Modified: gnucash/branches/register-rewrite/packaging/win32/custom.sh
===================================================================
--- gnucash/branches/register-rewrite/packaging/win32/custom.sh	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/packaging/win32/custom.sh	2007-01-05 23:51:55 UTC (rev 15316)
@@ -6,9 +6,13 @@
 TMP_DIR=$GLOBAL_DIR\\tmp
 DOWNLOAD_DIR=$GLOBAL_DIR\\downloads
 
+GNUCASH_DIR=$GLOBAL_DIR\\gnucash
 REPOS_URL="http://svn.gnucash.org/repo/gnucash/trunk"
-REPOS_DIR=$GLOBAL_DIR\\repos
-GNUCASH_DIR=$GLOBAL_DIR\\gnucash
+REPOS_DIR=$GNUCASH_DIR\\repos
+# keep this pointing from BUILD_DIR to REPOS_DIR
+REL_REPOS_DIR=..\\repos
+BUILD_DIR=$GNUCASH_DIR\\build
+INSTALL_DIR=$GNUCASH_DIR\\inst
 
 ####
 cross_compile="no"
@@ -46,14 +50,15 @@
 
 DTK_URL="$SF_MIRROR/mingw/msysDTK-1.0.1.exe"
 
-MINGW_URL="$SF_MIRROR/mingw/MinGW-5.0.2.exe"
+MINGW_URL="$SF_MIRROR/mingw/MinGW-5.1.0.exe"
 MINGW_DIR=$GLOBAL_DIR\\mingw
 
 UNZIP_URL="$SF_MIRROR/gnuwin32/unzip-5.51-1.exe"
 UNZIP_DIR=$GLOBAL_DIR\\unzip
 
-REGEX_BIN_URL="$SF_MIRROR/gnuwin32/regex-0.12-bin.zip"
-REGEX_LIB_URL="$SF_MIRROR/gnuwin32/regex-0.12-lib.zip"
+# do not use regex-gnu or regex-spencer v3.8.g3, see bug #382852
+REGEX_BIN_URL="$SF_MIRROR/gnuwin32/regex-spencer-3.8-bin.zip"
+REGEX_LIB_URL="$SF_MIRROR/gnuwin32/regex-spencer-3.8-lib.zip"
 REGEX_DIR=$GLOBAL_DIR\\regex
 
 READLINE_BIN_URL="$SF_MIRROR/gnuwin32/readline-5.0-bin.zip"
@@ -66,6 +71,11 @@
 ACTIVE_PERL_URL="http://downloads.activestate.com/ActivePerl/Windows/5.6/ActivePerl-5.6.1.638-MSWin32-x86.zip"
 ACTIVE_PERL_DIR=$GLOBAL_DIR\\active-perl
 
+AUTOCONF_URL="http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.bz2"
+AUTOMAKE_URL="http://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.bz2"
+LIBTOOL_URL="http://ftp.gnu.org/gnu/libtool/libtool-1.5.22.tar.gz"
+AUTOTOOLS_DIR=$GLOBAL_DIR\\autotools
+
 GUILE_URL="http://ftp.gnu.org/pub/gnu/guile/guile-1.6.8.tar.gz"
 SLIB_URL="http://swiss.csail.mit.edu/ftpdir/scm/OLD/slib3a3.zip"
 GUILE_DIR=$GLOBAL_DIR\\guile
@@ -76,50 +86,49 @@
 PEXPORTS_URL="http://www.emmestech.com/software/cygwin/pexports-0.43/pexports-0.43.zip"
 PEXPORTS_DIR=$GLOBAL_DIR\\pexports
 
-LIBXML2_URL="http://www.zlatkovic.com/pub/libxml/libxml2-2.6.26.win32.zip"
+LIBXML2_URL="http://www.zlatkovic.com/pub/libxml/libxml2-2.6.27.win32.zip"
 LIBXML2_DIR=$GLOBAL_DIR\\gnome #avoid XML_FLAGS
 
-EXPAT_URL="ftp://ftp.jclark.com/pub/xml/expat.zip"
-EXPAT_DIR=$GLOBAL_DIR\\gnome #avoid EXPAT_FLAGS
-
 GNOME_WIN32_URL="$GNOME_MIRROR/binaries/win32"
-GETTEXT_URL="$GTK_MIRROR/glib/2.12/win32/dependencies/gettext-0.14.5.zip"
-GETTEXT_DEV_URL="$GTK_MIRROR/glib/2.12/win32/dependencies/gettext-dev-0.14.5.zip"
-LIBICONV_URL="$GTK_MIRROR/glib/2.12/win32/dependencies/libiconv-1.9.1.bin.woe32.zip"
-GLIB_URL="$GNOME_WIN32_URL/glib/2.12/glib-2.12.3.zip"
-GLIB_DEV_URL="$GNOME_WIN32_URL/glib/2.12/glib-dev-2.12.3.zip"
-LIBJPEG_URL="$GNOME_MIRROR/platform/2.13/2.13.92/win32/dependencies/libjpeg-6b-4.zip"
+GNOME_WIN32_DEPS_URL="$GNOME_WIN32_URL/dependencies"
+GETTEXT_URL="$GNOME_WIN32_DEPS_URL/gettext-0.14.5.zip"
+GETTEXT_DEV_URL="$GNOME_WIN32_DEPS_URL/gettext-dev-0.14.5.zip"
+LIBICONV_URL="$GNOME_WIN32_DEPS_URL/libiconv-1.9.1.bin.woe32.zip"
+GLIB_URL="$GNOME_WIN32_URL/glib/2.12/glib-2.12.4.zip"
+GLIB_DEV_URL="$GNOME_WIN32_URL/glib/2.12/glib-dev-2.12.4.zip"
+LIBJPEG_URL="$GNOME_WIN32_DEPS_URL/libjpeg-6b-4.zip"
 LIBPNG_URL="$GTK_MIRROR/gtk/v2.10/win32/dependencies/libpng-1.2.8-bin.zip"
 ZLIB_URL="$GTK_MIRROR/gtk/v2.10/win32/dependencies/zlib123-dll.zip"
-PKG_CONFIG_URL="$GTK_MIRROR/gtk/v2.10/win32/dependencies/pkg-config-0.20.zip"
-CAIRO_URL="$GTK_MIRROR/gtk/v2.8/win32/cairo-1.2.4.zip"
-CAIRO_DEV_URL="$GTK_MIRROR/gtk/v2.8/win32/cairo-dev-1.2.4.zip"
-FONTCONFIG_URL="$GTK_MIRROR/gtk/v2.8/win32/dependencies/fontconfig-2.2.2-20040412.zip"
-FONTCONFIG_DEV_URL="$GTK_MIRROR/gtk/v2.8/win32/dependencies/fontconfig-dev-2.2.2-20040412.zip"
-FREETYPE_URL="$GTK_MIRROR/gtk/v2.8/win32/dependencies/freetype-2.1.10.zip"
+PKG_CONFIG_URL="$GNOME_WIN32_DEPS_URL/pkg-config-0.20.zip"
+CAIRO_URL="$GNOME_WIN32_DEPS_URL/cairo-1.2.6.zip"
+CAIRO_DEV_URL="$GNOME_WIN32_DEPS_URL/cairo-dev-1.2.6.zip"
+EXPAT_URL="$GNOME_WIN32_DEPS_URL/expat-2.0.0.zip"
+FONTCONFIG_URL="$GNOME_WIN32_DEPS_URL/fontconfig-2.3.2-tml-20060825.zip"
+FONTCONFIG_DEV_URL="$GNOME_WIN32_DEPS_URL/fontconfig-dev-2.3.2-tml-20060825.zip"
+FREETYPE_URL="$GNOME_WIN32_DEPS_URL/freetype-2.1.10.zip"
 FREETYPE_DEV_URL="$SF_MIRROR/gnuwin32/freetype-2.1.10-lib.zip"
-ATK_URL="$GNOME_WIN32_URL/atk/1.12/atk-1.12.2.zip"
-ATK_DEV_URL="$GNOME_WIN32_URL/atk/1.12/atk-dev-1.12.2.zip"
-PANGO_URL="$GNOME_WIN32_URL/pango/1.14/pango-1.14.3.zip"
-PANGO_DEV_URL="$GNOME_WIN32_URL/pango/1.14/pango-dev-1.14.3.zip"
+ATK_URL="$GNOME_WIN32_URL/atk/1.12/atk-1.12.3.zip"
+ATK_DEV_URL="$GNOME_WIN32_URL/atk/1.12/atk-dev-1.12.3.zip"
+PANGO_URL="$GNOME_WIN32_URL/pango/1.14/pango-1.14.5.zip"
+PANGO_DEV_URL="$GNOME_WIN32_URL/pango/1.14/pango-dev-1.14.5.zip"
 LIBART_LGPL_URL="$GNOME_WIN32_URL/libart_lgpl/2.3/libart_lgpl-2.3.17.zip"
 LIBART_LGPL_DEV_URL="$GNOME_WIN32_URL/libart_lgpl/2.3/libart_lgpl-dev-2.3.17.zip"
-GTK_URL="$GNOME_WIN32_URL/gtk+/2.10/gtk+-2.10.3.zip"
-GTK_DEV_URL="$GNOME_WIN32_URL/gtk+/2.10/gtk+-dev-2.10.3.zip"
+GTK_URL="$GNOME_WIN32_URL/gtk+/2.10/gtk+-2.10.6.zip"
+GTK_DEV_URL="$GNOME_WIN32_URL/gtk+/2.10/gtk+-dev-2.10.6.zip"
 INTLTOOL_URL="$GNOME_WIN32_URL/intltool/0.35/intltool-0.35.0.zip"
-ORBIT2_URL="$GNOME_WIN32_URL/ORBit2/2.14/ORBit2-2.14.2.zip"
-ORBIT2_DEV_URL="$GNOME_WIN32_URL/ORBit2/2.14/ORBit2-dev-2.14.2.zip"
-GAIL_URL="$GNOME_WIN32_URL/gail/1.9/gail-1.9.2.zip"
-GAIL_DEV_URL="$GNOME_WIN32_URL/gail/1.9/gail-dev-1.9.2.zip"
-POPT_URL="$GNOME_MIRROR/platform/2.13/2.13.92/win32/dependencies/popt-1.10.2-tml-20050828.zip"
-POPT_DEV_URL="$GNOME_MIRROR/platform/2.13/2.13.92/win32/dependencies/popt-dev-1.10.2-tml-20050828.zip"
+ORBIT2_URL="$GNOME_WIN32_URL/ORBit2/2.13/ORBit2-2.13.3.zip"
+ORBIT2_DEV_URL="$GNOME_WIN32_URL/ORBit2/2.13/ORBit2-dev-2.13.3.zip"
+GAIL_URL="$GNOME_WIN32_URL/gail/1.9/gail-1.9.3.zip"
+GAIL_DEV_URL="$GNOME_WIN32_URL/gail/1.9/gail-dev-1.9.3.zip"
+POPT_URL="$GNOME_WIN32_DEPS_URL/popt-1.10.2-tml-20050828.zip"
+POPT_DEV_URL="$GNOME_WIN32_DEPS_URL/popt-dev-1.10.2-tml-20050828.zip"
 GCONF_URL="$GNOME_WIN32_URL/GConf/2.14/GConf-2.14.0.zip"
 GCONF_DEV_URL="$GNOME_WIN32_URL/GConf/2.14/GConf-dev-2.14.0.zip"
 LIBBONOBO_URL="$GNOME_WIN32_URL/libbonobo/2.16/libbonobo-2.16.0.zip"
 LIBBONOBO_DEV_URL="$GNOME_WIN32_URL/libbonobo/2.16/libbonobo-dev-2.16.0.zip"
 GNOME_VFS_URL="$GNOME_WIN32_URL/gnome-vfs/2.14/gnome-vfs-2.14.2.zip"
 GNOME_VFS_DEV_URL="$GNOME_WIN32_URL/gnome-vfs/2.14/gnome-vfs-dev-2.14.2.zip"
-LIBGNOME_URL="$GNOME_WIN32_URL/libgnome/2.16/libgnome-2.16.0.zip"
+LIBGNOME_URL="$GNOME_WIN32_URL/libgnome/2.16/libgnome-2.16.0-1.zip"
 LIBGNOME_DEV_URL="$GNOME_WIN32_URL/libgnome/2.16/libgnome-dev-2.16.0.zip"
 LIBGNOMECANVAS_URL="$GNOME_WIN32_URL/libgnomecanvas/2.14/libgnomecanvas-2.14.0.zip"
 LIBGNOMECANVAS_DEV_URL="$GNOME_WIN32_URL/libgnomecanvas/2.14/libgnomecanvas-dev-2.14.0.zip"
@@ -137,25 +146,24 @@
 GTKHTML_DEV_URL="$GNOME_WIN32_URL/gtkhtml/3.12/gtkhtml-dev-3.12.0.zip"
 GNOME_DIR=$GLOBAL_DIR\\gnome
 
-SWIG_URL="$SF_MIRROR/swig/swigwin-1.3.29.zip"
+SWIG_URL="$SF_MIRROR/swig/swigwin-1.3.31.zip"
 SWIG_DIR=$GLOBAL_DIR\\swig
 
-AUTOCONF_URL="http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.bz2"
-AUTOMAKE_URL="http://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.bz2"
-LIBTOOL_URL="http://ftp.gnu.org/gnu/libtool/libtool-1.5.22.tar.gz"
-AUTOTOOLS_DIR=$GLOBAL_DIR\\autotools
-
-LIBGSF_URL="$GNOME_MIRROR/sources/libgsf/1.14/libgsf-1.14.1.tar.bz2"
+LIBGSF_URL="$GNOME_MIRROR/sources/libgsf/1.14/libgsf-1.14.3.tar.bz2"
 LIBGSF_DIR=$GLOBAL_DIR\\libgsf
 
+# do not update this if you are unwilling to hack gnc-html-graph-gog.c
 GOFFICE_URL="$GNOME_MIRROR/sources/goffice/0.3/goffice-0.3.0.tar.bz2"
 GOFFICE_DIR=$GLOBAL_DIR\\goffice
 GOFFICE_PATCH=`pwd`/goffice-0.3.0-patch.diff
 
-GLADE_URL="$GNOME_MIRROR/sources/glade3/3.0/glade3-3.0.1.tar.bz2"
+GLADE_URL="$GNOME_MIRROR/sources/glade3/3.0/glade3-3.1.2.tar.bz2"
 GLADE_DIR=$GLOBAL_DIR\\glade
 
-SVN_URL="http://subversion.tigris.org/files/documents/15/32856/svn-1.3.2-setup.exe"
+INNO_URL="http://files.jrsoftware.org/ispack/ispack-5.1.9.exe"
+INNO_DIR=$GLOBAL_DIR\\inno
+
+SVN_URL="http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe"
 SVN_DIR=$GLOBAL_DIR\\svn
 
 # There is no reason to ever need to comment these out!
@@ -172,19 +180,21 @@
 if test x$cross_compile != xyes ; then
  add_step inst_active_perl
 fi
+add_step inst_autotools
 add_step inst_guile
 if test x$cross_compile != xyes ; then
  add_step inst_openssl
 fi
 add_step inst_pexports
 add_step inst_libxml2
-add_step inst_expat
 add_step inst_gnome
 add_step inst_swig
-add_step inst_autotools
 add_step inst_libgsf
 add_step inst_goffice
 #add_step inst_glade
+if test x$cross_compile != xyes ; then
+ add_step inst_inno
+fi
 add_step inst_svn
 add_step svn_up
 add_step inst_gnucash

Copied: gnucash/branches/register-rewrite/packaging/win32/dist.sh (from rev 15313, gnucash/trunk/packaging/win32/dist.sh)

Copied: gnucash/branches/register-rewrite/packaging/win32/functions (from rev 15313, gnucash/trunk/packaging/win32/functions)

Modified: gnucash/branches/register-rewrite/packaging/win32/gnucash.iss.in
===================================================================
--- gnucash/branches/register-rewrite/packaging/win32/gnucash.iss.in	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/packaging/win32/gnucash.iss.in	2007-01-05 23:51:55 UTC (rev 15316)
@@ -15,12 +15,12 @@
 AppUpdatesURL=http://www.gnucash.org
 DefaultDirName={pf}\@PACKAGE@
 DefaultGroupName=GnuCash
-LicenseFile=..\..\COPYING
+LicenseFile=@prefix@\..\dist\share\@PACKAGE@\doc\COPYING
 Compression=lzma
 OutputDir=.
 OutputBaseFilename=@PACKAGE at -@VERSION at -setup
 UninstallFilesDir={app}\uninstall\@PACKAGE@
-InfoAfterFile=README
+InfoAfterFile=@prefix@\..\dist\share\@PACKAGE@\doc\README
 
 [Types]
 Name: "full"; Description: "{cm:FullInstall}"
@@ -28,20 +28,21 @@
 
 [Components]
 Name: "main"; Description: "{cm:MainFiles}"; Types: full custom; Flags: fixed
-Name: "translations"; Description: "{cm:TranslFiles}"; Types: full
-Name: "templates"; Description: "{cm:TemplFiles}"; Types: full
+;Name: "translations"; Description: "{cm:TranslFiles}"; Types: full
+;Name: "templates"; Description: "{cm:TemplFiles}"; Types: full
 
 [Tasks]
 Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
 Name: menuicon; Description: "{cm:CreateMenuLink}"; GroupDescription: "{cm:AdditionalIcons}"
 
 [Icons]
-Name: "{group}\GnuCash"; Filename: "{app}\bin\gnucash.bat"; WorkingDir: "{app}\bin"; Comment: "GnuCash Free Finance Manager"; IconFilename: "{app}\share\pixmaps\gnucash-icon.png"; Tasks: menuicon
+Name: "{group}\GnuCash"; Filename: "{app}\bin\gnucash.bat"; WorkingDir: "{app}\bin"; Comment: "GnuCash Free Finance Manager"; IconFilename: "{app}\share\gnucash\pixmaps\gnucash-icon.ico"; Tasks: menuicon
 Name: "{group}\Uninstall GnuCash"; Filename: "{uninstallexe}"; Tasks: menuicon
-Name: "{userdesktop}\GnuCash"; Filename: "{app}\bin\gnucash.bat"; WorkingDir: "{app}\bin"; Comment: "GnuCash Free Finance Manager"; IconFilename: "{app}\share\pixmaps\gnucash-icon.png"; Tasks: desktopicon
+Name: "{userdesktop}\GnuCash"; Filename: "{app}\bin\gnucash.bat"; WorkingDir: "{app}\bin"; Comment: "GnuCash Free Finance Manager"; IconFilename: "{app}\share\gnucash\pixmaps\gnucash-icon.ico"; Tasks: desktopicon
 
 [Run]
 Filename: "{app}\bin\gnucash.bat"; Description: "{cm:RunPrg}"; WorkingDir: "{app}\bin"; Flags: postinstall skipifsilent
+Filename: "{app}\bin\guile.bat"; Parameters: "-c ""(use-modules (ice-9 slib)) (require 'printf)"""; Flags: runhidden
 
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Here we configure the included files and the place of their
@@ -49,43 +50,48 @@
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [Files]
 ; The main executables and DLLs
-Source: "@prefix@\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: main
-Source: "@prefix@\etc\*"; DestDir: "{app}\etc"; Flags: recursesubdirs; Components: main
-Source: "@prefix@\lib\*"; DestDir: "{app}\lib"; Flags: recursesubdirs; Components: main
-Source: "@prefix@\libexec\*"; DestDir: "{app}\libexec"; Flags: recursesubdirs; Components: main
-Source: "@prefix@\share\*"; DestDir: "{app}\share"; Flags: recursesubdirs; Components: main
+Source: "@prefix@\..\dist\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: main; AfterInstall: MyAfterInstallConfig()
+; Note: The above AfterInstall function will create the 
+; gnucash.bat file on-the-fly by the Pascal script below.
 
-; The translations (no idea why mingw installs them in prefix/lib/locale)
-Source: "@prefix@\lib\locale\*"; DestDir: "{app}\lib\locale"; Flags: recursesubdirs; Components: translations
+Source: "@prefix@\..\dist\etc\*"; DestDir: "{app}\etc"; Flags: recursesubdirs; Components: main
+Source: "@prefix@\..\dist\lib\*"; DestDir: "{app}\lib"; Flags: recursesubdirs; Components: main
+Source: "@prefix@\..\dist\libexec\*"; DestDir: "{app}\libexec"; Flags: recursesubdirs; Components: main
+Source: "@prefix@\..\dist\share\*"; DestDir: "{app}\share"; Flags: recursesubdirs; Components: main
 
-; The account templates
-Source: "@prefix@\share\gnucash\accounts\*"; DestDir: "{app}\share\gnucash\accounts"; Flags: recursesubdirs; Components: templates
+;; The translations (no idea why mingw installs them in prefix/lib/locale)
+;Source: "@prefix@\..\dist\lib\locale\*"; DestDir: "{app}\lib\locale"; Flags: recursesubdirs; Components: translations
+;
+;; The account templates
+;Source: "@prefix@\..\dist\share\gnucash\accounts\*"; DestDir: "{app}\share\gnucash\accounts"; Flags: recursesubdirs; Components: templates
 
-; The loading shell script. It is post-processed by the Pascal script below.
-Source: "..\..\src\bin\gnucash.in"; DestDir: "{app}\bin"; Components: main; AfterInstall: MyAfterInstallConfig(ExpandConstant('{app}\bin\gnucash'))
-
 ; And all the documentation
-Source: "..\..\README"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
-Source: "..\..\COPYING"; DestDir: "{app}\doc\@PACKAGE@"; Flags: ignoreversion; Components: main
-Source: "..\..\AUTHORS"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
-Source: "..\..\ChangeLog"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
+Source: "@prefix@\..\dist\share\@PACKAGE@\doc\README"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
+Source: "@prefix@\..\dist\share\@PACKAGE@\doc\COPYING"; DestDir: "{app}\doc\@PACKAGE@"; Flags: ignoreversion; Components: main
+Source: "@prefix@\..\dist\share\@PACKAGE@\doc\AUTHORS"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
+Source: "@prefix@\..\dist\share\@PACKAGE@\doc\ChangeLog"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
 
 
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Define the registry keys Setup should create (HKCU = HKEY_CURRENT_USER)
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [Registry]
-Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "prefix"; ValueData: "{app}"
-Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "libdir"; ValueData: "{app}\lib"
-Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "pkglibdir"; ValueData: "{app}\lib\@PACKAGE@"
-Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "sysconfdir"; ValueData: "{app}\etc"
-Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "localedir"; ValueData: "{app}\share\locale"
+Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "prefix"; ValueData: "{app}"; Flags: uninsdeletekey
+Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "libdir"; ValueData: "{app}\lib"; Flags: uninsdeletekey
+Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "pkglibdir"; ValueData: "{app}\lib\@PACKAGE@"; Flags: uninsdeletekey
+Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "sysconfdir"; ValueData: "{app}\etc"; Flags: uninsdeletekey
+Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "localedir"; ValueData: "{app}\share\locale"; Flags: uninsdeletekey
 
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Delete the created config script on uninstall
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [UninstallDelete]
-Type: files; Name: "{app}\bin\gnucash"
+Type: files; Name: "{app}\bin\gnucash.bat"
+Type: files; Name: "{app}\bin\guile.bat"
+Type: files; Name: "{app}\share\guile\1.6\slibcat"
+Type: filesandordirs; Name: "{app}\share\guile"
+Type: filesandordirs; Name: "{app}\etc\gconf"
+Type: dirifempty; Name: "{app}\etc"
 
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; This large section is a Pascal scripting program that will modify
@@ -106,41 +112,40 @@
   StringChange(Result, '\', '/');
 end;
 
-procedure MyAfterInstallConfig(FileName: String);
+procedure MyAfterInstallConfig();
 var
-  FileString, appdir, libdir, pkglibdir, pkgdatadir: String;
+  FileName, FileString, appdir, libdir, pkglibdir, pkgdatadir: String;
   Res: Boolean;
 begin
 
-  { Load the unchanged original file }
-  Res := LoadStringFromFile(Format('%s.in',[FileName]), FileString);
-  if Res = False then
-    MsgBox('Error on loading '+FileName+'.in for final adaptation', mbInformation, MB_OK);
+  { Get the installation-specific paths }
+  appdir := ExpandConstant('{app}');
+  libdir := appdir + '\lib';
+  pkglibdir := libdir + '\gnucash';
+  pkgdatadir := appdir + '\share\gnucash';
 
-  { Insert the custom file header; #10 is the linefeed character }
-  Insert('#!/bin/sh '#10'dir="@prefix'+'@"'#10, FileString, 0);
+  { Create the gnucash.bat file; #10 is the linefeed character and #13 CR }
+  FileName := appdir + '\bin\gnucash.bat' ;
+  FileString := 'set PATH=' + appdir + '\bin;' + libdir + '\bin;%PATH%'#13#10 ;
 
-  { Get the installation-specific paths }
-  appdir := MingwBacksl(ExpandConstant('{app}'));
-  libdir := appdir + '/lib';
-  pkglibdir := libdir + '/gnucash';
-  pkgdatadir := appdir + '/share/gnucash';
+  FileString := FileString + 'set GUILE_WARN_DEPRECATED=no'#13#10 ;
+  FileString := FileString + 'set GNC_MODULE_PATH=' + pkglibdir + ''#13#10 ;
+  FileString := FileString + 'set GUILE_LOAD_PATH=' + pkgdatadir + '\guile-modules;' + pkgdatadir + '\scm;' + appdir + '\share\guile\1.6;%GUILE_LOAD_PATH%'#13#10 ;
+  FileString := FileString + 'set LTDL_LIBRARY_PATH=' + libdir + ''#13#10 ;
+  FileString := FileString + 'start gnucash-bin'#13#10 ;
 
-  { Now make all the replacements }
-  { Explanation: StringChange(S,FromStr,ToStr): Change all occurances in S of FromStr to ToStr. }
-  StringChange(FileString, '@'+'-PATH_SEPARATOR-@', ';');
-  StringChange(FileString, '@'+'-BIN_DIR-@', appdir + '/bin');
-  StringChange(FileString, '@'+'-GNC_PKGLIB_INSTALLDIR-@', pkglibdir);
-  StringChange(FileString, '@'+'-GNC_MODULE_DIR-@', pkglibdir);
-  StringChange(FileString, '@'+'-GNC_LIB_INSTALLDIR-@', libdir);
-  StringChange(FileString, '@'+'-GNC_GUILE_MODULE_DIR-@', pkgdatadir + '/guile-modules');
-  StringChange(FileString, '@'+'-GNC_SCM_INSTALL_DIR-@', pkgdatadir + '/scm');
-
   { Save the final file }
   Res := SaveStringToFile(FileName, FileString, False);
   if Res = False then
-    MsgBox('Error on saving '+FileName+' for final adaptation', mbInformation, MB_OK);
+    MsgBox('Error on saving '+FileName+' for completing the installation', mbInformation, MB_OK);
 
+  FileName := appdir + '\bin\guile.bat' ;
+  FileString := 'set GUILE_LOAD_PATH=' + pkgdatadir + '\guile-modules;' + pkgdatadir + '\scm;' + appdir + '\share\guile\1.6;%GUILE_LOAD_PATH%'#13#10 ;
+  FileString := FileString + 'start guile.exe %*'#13#10 ;
+  Res := SaveStringToFile(FileName, FileString, False);
+  if Res = False then
+    MsgBox('Error on saving '+FileName+' for completing the installation', mbInformation, MB_OK);
+
 end;
 
 

Copied: gnucash/branches/register-rewrite/packaging/win32/goffice-0.3.2-patch.diff (from rev 15313, gnucash/trunk/packaging/win32/goffice-0.3.2-patch.diff)

Modified: gnucash/branches/register-rewrite/packaging/win32/install.sh
===================================================================
--- gnucash/branches/register-rewrite/packaging/win32/install.sh	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/packaging/win32/install.sh	2007-01-05 23:51:55 UTC (rev 15316)
@@ -2,128 +2,65 @@
 
 set -e
 
-function add_step() { steps=("${steps[@]}" "$@"); }
 function qpushd() { pushd "$@" >/dev/null; }
 function qpopd() { popd >/dev/null; }
+function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
 
-# c:/dir/sub
-function win_fs_path() {
-    echo "$*" | sed 's,\\,/,g'
-}
-
-# /c/dir/sub
-function unix_path() {
-    echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'
-}
-
 qpushd "$(dirname $(unix_path "$0"))"
+. functions
 . custom.sh
 
-SEPS_ACLOCAL_FLAGS=" "
-SEPS_AUTOTOOLS_CPPFLAGS=" "
-SEPS_AUTOTOOLS_LDFLAGS=" "
-SEPS_GNOME_CPPFLAGS=" "
-SEPS_GNOME_LDFLAGS=" "
-SEPS_GUILE_LOAD_PATH=";"
-SEPS_GUILE_CPPFLAGS=" "
-SEPS_GUILE_LDFLAGS=" "
-SEPS_INTLTOOL_PERL=" "
-SEPS_PATH=":"
-SEPS_PKG_CONFIG_PATH=":"
-SEPS_READLINE_CPPFLAGS=" "
-SEPS_READLINE_LDFLAGS=" "
-SEPS_REGEX_CPPFLAGS=" "
-SEPS_REGEX_LDFLAGS=" "
-ENV_VARS="\
-ACLOCAL_FLAGS \
-AUTOTOOLS_CPPFLAGS \
-AUTOTOOLS_LDFLAGS \
-GNOME_CPPFLAGS \
-GNOME_LDFLAGS \
-GUILE_LOAD_PATH \
-GUILE_CPPFLAGS \
-GUILE_LDFLAGS \
-INTLTOOL_PERL \
-PATH \
-PKG_CONFIG_PATH \
-READLINE_CPPFLAGS \
-READLINE_LDFLAGS \
-REGEX_CPPFLAGS \
-REGEX_LDFLAGS \
-"
+register_env_var ACLOCAL_FLAGS " "
+register_env_var AUTOTOOLS_CPPFLAGS " "
+register_env_var AUTOTOOLS_LDFLAGS " "
+register_env_var GNOME_CPPFLAGS " "
+register_env_var GNOME_LDFLAGS " "
+register_env_var GUILE_LOAD_PATH ";"
+register_env_var GUILE_CPPFLAGS " "
+register_env_var GUILE_LDFLAGS " "
+register_env_var INTLTOOL_PERL " "
+register_env_var PATH ":"
+register_env_var PKG_CONFIG ":" ""
+register_env_var PKG_CONFIG_PATH ":"
+register_env_var READLINE_CPPFLAGS " "
+register_env_var READLINE_LDFLAGS " "
+register_env_var REGEX_CPPFLAGS " "
+register_env_var REGEX_LDFLAGS " "
 
-function setup() {
-    echo
-    echo "############################################################"
-    echo "###  $*"
-    echo "############################################################"
-}
-
-function die() {
-    echo
-    echo "!!! $* !!!"
-    echo "!!! ABORTING !!!"
-    exit -1
-}
-
-function quiet() { "$@" &>/dev/null; }
-function add_to_env() {
-    _SEP=`eval echo '"$'"SEPS_$2"'"'`
-    _ENV=`eval echo '"$'"$2"'"'`
-    _SED=`eval echo '"s#.*'"${_SEP}$1${_SEP}"'.*##"'`
-    _TEST=`echo "${_SEP}${_ENV}${_SEP}" | sed "${_SED}"`
-    if [ "$_TEST" ]; then
-	if [ "$_ENV" ]; then
-	    eval "$2_ADDS"'="'"$1${_SEP}"'$'"$2_ADDS"'"'
-	else
-	    eval "$2_ADDS"'="'"$1"'"'
-	fi
-	eval "$2"'="$'"$2_ADDS"'$'"$2_BASE"'"'
-    fi
-}
-
 function prepare() {
-    mkdir -p $TMP_DIR
-    mkdir -p $DOWNLOAD_DIR
-    for _ENV in $ENV_VARS; do
-	eval "${_ENV}_BASE"'=$'"${_ENV}"
-	eval "${_ENV}_ADDS="
-	eval export "${_ENV}"
+    # Necessary so that intltoolize doesn't come up with some
+    # foolish AC_CONFIG_AUX_DIR; bug#362006
+    # We cannot simply create install-sh in the repository, because
+    # this will confuse other parts of the tools
+    _REPOS_UDIR=`unix_path $REPOS_DIR`
+    level0=.
+    level1=$(basename ${_REPOS_UDIR})
+    level2=$(basename $(dirname ${_REPOS_UDIR}))"/"$level1
+    for mydir in $level0 $level1 $level2; do
+        if [ -f $mydir/gnucash.m4 ]; then
+            die "Do not save install.sh in the repository or one its parent directories"
+        fi
     done
+#     # Remove old empty install-sh files
+#     if [ -f ${_REPOS_UDIR}/install-sh -a "$(cat ${_REPOS_UDIR}/install-sh &>/dev/null | wc -l)" -eq 0 ]; then
+#         rm -f ${_REPOS_UDIR}/install-sh
+#     fi
+    # Partially remove RegEx-GNU if installed
+    _REGEX_UDIR=`unix_path $REGEX_DIR`
+    if [ -f ${_REGEX_UDIR}/contrib/regex-0.12-GnuWin32.README ]; then
+        qpushd ${_REGEX_UDIR}
+            rm -f bin/*regex*.dll
+            rm -f contrib/regex*
+            rm -f lib/*regex*
+        qpopd
+    fi
+
     DOWNLOAD_UDIR=`unix_path $DOWNLOAD_DIR`
     TMP_UDIR=`unix_path $TMP_DIR`
+    mkdir -p $TMP_UDIR
+    mkdir -p $DOWNLOAD_UDIR
 }
 
-# usage:  smart_wget URL DESTDIR
-function smart_wget() {
-    _FILE=`basename $1`
-    _DLD=`unix_path $2`
-
-    # If the file already exists in the download directory ($2)
-    # then don't do anything.  But if it does NOT exist then
-    # download the file to the tmpdir and then when that completes
-    # move it to the dest dir.
-    if [ ! -f $_DLD/$_FILE ] ; then
-	wget --passive-ftp -c $1 -P $TMP_DIR
-	mv $TMP_UDIR/$_FILE $_DLD
-    fi
-    LAST_FILE=$_DLD/$_FILE
-}
-
-# usage:  wget_unpacked URL DOWNLOAD_DIR UNPACK_DIR
-function wget_unpacked() {
-    smart_wget $1 $2
-    _UPD=`unix_path $3`
-    echo -n "Extracting ${LAST_FILE##*/} ... "
-    case $LAST_FILE in
-        *.zip)     unzip -q -o $LAST_FILE -d $_UPD;;
-        *.tar.gz)  tar -xzpf $LAST_FILE -C $_UPD;;
-        *.tar.bz2) tar -xjpf $LAST_FILE -C $_UPD;;
-        *)         die "Cannot unpack file $LAST_FILE!";;
-    esac
-    echo "done"
-}
-
 function inst_wget() {
     setup Wget
     _WGET_UDIR=`unix_path $WGET_DIR`
@@ -131,7 +68,7 @@
     then
         echo "already installed.  skipping."
     else
-        mkdir -p $WGET_DIR
+        mkdir -p $_WGET_UDIR
         tar -xjpf $DOWNLOAD_UDIR/wget*.tar.bz2 -C $WGET_DIR
         cp $_WGET_UDIR/*/*/wget.exe $WGET_DIR
     fi
@@ -141,7 +78,8 @@
 
 function inst_dtk() {
     setup MSYS DTK
-    if quiet perl --help
+    _MSYS_UDIR=`unix_path $MSYS_DIR`
+    if quiet ${_MSYS_UDIR}/bin/perl --help
     then
         echo "msys dtk already installed.  skipping."
     else
@@ -158,7 +96,7 @@
             mv $file $_dst_file
         done
     fi
-    quiet perl --help || die "msys dtk not installed correctly"
+    quiet ${_MSYS_UDIR}/bin/perl --help || die "msys dtk not installed correctly"
 }
 
 function inst_mingw() {
@@ -202,7 +140,7 @@
     then
         echo "regex already installed.  skipping."
     else
-        mkdir -p $REGEX_DIR
+        mkdir -p $_REGEX_UDIR
         wget_unpacked $REGEX_BIN_URL $DOWNLOAD_DIR $REGEX_DIR
         wget_unpacked $REGEX_LIB_URL $DOWNLOAD_DIR $REGEX_DIR
     fi
@@ -219,7 +157,7 @@
     then
         echo "readline already installed.  skipping."
     else
-        mkdir -p $READLINE_DIR
+        mkdir -p $_READLINE_UDIR
         wget_unpacked $READLINE_BIN_URL $DOWNLOAD_DIR $READLINE_DIR
         wget_unpacked $READLINE_LIB_URL $DOWNLOAD_DIR $READLINE_DIR
     fi
@@ -234,7 +172,7 @@
     then
         echo "indent already installed.  skipping."
     else
-        mkdir -p $INDENT_DIR
+        mkdir -p $_INDENT_UDIR
         wget_unpacked $INDENT_BIN_URL $DOWNLOAD_DIR $INDENT_DIR
     fi
     quiet which indent || die "indent unavailable"
@@ -260,6 +198,49 @@
     quiet $INTLTOOL_PERL --help || die "ActivePerl not installed correctly"
 }
 
+function inst_autotools() {
+    setup Autotools
+    _AUTOTOOLS_UDIR=`unix_path $AUTOTOOLS_DIR`
+    add_to_env $_AUTOTOOLS_UDIR/bin PATH
+    if quiet autoconf --help && quiet automake --help
+    then
+        echo "autoconf/automake already installed.  skipping."
+    else
+        wget_unpacked $AUTOCONF_URL $DOWNLOAD_DIR $TMP_DIR
+        wget_unpacked $AUTOMAKE_URL $DOWNLOAD_DIR $TMP_DIR
+        qpushd $TMP_UDIR/autoconf-*
+            echo "building autoconf..."
+            ./configure --prefix=$_AUTOTOOLS_UDIR
+            make
+            make install
+        qpopd
+        qpushd $TMP_UDIR/automake-*
+            echo "building automake..."
+            ./configure --prefix=$_AUTOTOOLS_UDIR
+            make
+            make install
+        qpopd
+    fi
+    if quiet ${LIBTOOLIZE} --help 
+    then
+        echo "libtool/libtoolize already installed.  skipping."
+    else
+        wget_unpacked $LIBTOOL_URL $DOWNLOAD_DIR $TMP_DIR
+        qpushd $TMP_UDIR/libtool-*
+            echo "building libtool..."
+            ./configure ${HOST_XCOMPILE} --prefix=$_AUTOTOOLS_UDIR
+            make
+            make install
+        qpopd
+    fi
+    add_to_env -I$_AUTOTOOLS_UDIR/include AUTOTOOLS_CPPFLAGS
+    add_to_env -L$_AUTOTOOLS_UDIR/lib AUTOTOOLS_LDFLAGS
+    add_to_env "-I $_AUTOTOOLS_UDIR/share/aclocal" ACLOCAL_FLAGS
+    quiet autoconf --help &&
+    quiet automake --help &&
+    quiet ${LIBTOOLIZE} --help || die "autotools not installed correctly"
+}
+
 function inst_guile() {
     setup Guile
     _GUILE_WFSDIR=`win_fs_path $GUILE_DIR`
@@ -273,8 +254,10 @@
         echo "guile and slib already installed.  skipping."
     else
         smart_wget $GUILE_URL $DOWNLOAD_DIR
+        _GUILE_BALL=$LAST_FILE
         smart_wget $SLIB_URL $DOWNLOAD_DIR
-        tar -xzpf $DOWNLOAD_UDIR/guile-*.tar.gz -C $TMP_UDIR
+        _SLIB_BALL=$LAST_FILE
+        tar -xzpf $_GUILE_BALL -C $TMP_UDIR
         qpushd $TMP_UDIR/guile-*
             qpushd ice-9
                 cp boot-9.scm boot-9.scm.bak
@@ -308,18 +291,11 @@
 	      cp Makefile Makefile.bak
 	      cat Makefile.bak | sed '/-bindir-/s,:,^,g' > Makefile
 	    qpopd
-	    make LDFLAGS="-lwsock32 ${READLINE_LDFLAGS} ${REGEX_LDFLAGS} -lregex -no-undefined"
+	    make LDFLAGS="-lwsock32 ${READLINE_LDFLAGS} ${REGEX_LDFLAGS} -lregex -no-undefined -avoid-version"
 	    make install
 	qpopd
-	qpushd $GUILE_DIR/bin
-	    mv libguilereadline-v-12-12.dll libguilereadline-v-12.dll
-	    mv libguile-srfi-srfi-4-v-1-1.dll libguile-srfi-srfi-4-v-1.dll
-	    mv libguile-srfi-srfi-13-14-v-1-1.dll libguile-srfi-srfi-13-14-v-1.dll
-	qpopd
-        _GUILE_MAJOR=`echo $_GUILE_UDIR/share/guile/1.* | sed 's,.*/,,'`
-	_SLIB_DIR=$GUILE_DIR\\share\\guile\\$_GUILE_MAJOR
-	mkdir -p $_SLIB_DIR
-	unzip $DOWNLOAD_DIR/slib*.zip -d $_SLIB_DIR
+	_SLIB_DIR=$_GUILE_UDIR/share/guile/1.*
+	unzip $_SLIB_BALL -d $_SLIB_DIR
 	qpushd $_SLIB_DIR/slib
 	    cp guile.init guile.init.bak
             sed '/lambda.*'"'"'unix/a\
@@ -327,7 +303,7 @@
 	qpopd
     fi
     if test x$cross_compile = xyes ; then
-	qpushd $GUILE_DIR/bin
+	qpushd $_GUILE_UDIR/bin
 	# The cross-compiling guile expects these program names
 	# for the build-time guile
 	ln -sf /usr/bin/guile-config mingw32-guile-config
@@ -401,7 +377,7 @@
 
 Name: libXML
 Version: $_LIBXML2_VERSION
-Description: libXML library version2.
+Description: libXML library version 2.
 Requires:
 Libs: -L\${libdir} -lxml2 -lz
 Cflags: -I\${includedir}
@@ -411,23 +387,6 @@
     quiet ${LD} -L$_LIBXML2_UDIR/lib -lxml2 -o $TMP_UDIR/ofile || die "libxml2 not installed correctly"
 }
 
-function inst_expat() {
-    setup Expat
-    _EXPAT_UDIR=`unix_path $EXPAT_DIR`
-    add_to_env $_EXPAT_UDIR/bin PATH
-    if quiet which xmlwf && test -f $_EXPAT_UDIR/bin/xmlwf.exe
-    then
-        echo "expat already installed.  skipping."
-    else
-        wget_unpacked $EXPAT_URL $DOWNLOAD_DIR $EXPAT_DIR
-        qpushd $EXPAT_DIR
-            cp -r expat/* .
-            rm -rf expat
-        qpopd
-    fi
-    quiet which xmlwf || die "expat not installed correctly"
-}
-
 function inst_gnome() {
     setup Gnome platform
     _GNOME_UDIR=`unix_path $GNOME_DIR`
@@ -435,14 +394,15 @@
     add_to_env -L$_GNOME_UDIR/lib GNOME_LDFLAGS
     add_to_env $_GNOME_UDIR/bin PATH
     add_to_env $_GNOME_UDIR/lib/pkgconfig PKG_CONFIG_PATH
+    add_to_env $_GNOME_UDIR/bin/pkg-config-msys.sh PKG_CONFIG
     add_to_env "-I $_GNOME_UDIR/share/aclocal" ACLOCAL_FLAGS
     if quiet gconftool-2 --version &&
-        pkg-config --exists gconf-2.0 libgnome-2.0 libgnomeui-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.8 &&
+        ${PKG_CONFIG} --exists gconf-2.0 libgnome-2.0 libgnomeui-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.8 &&
         quiet intltoolize --version
     then
         echo "gnome packages installed.  skipping."
     else
-        mkdir -p $GNOME_DIR
+        mkdir -p $_GNOME_UDIR
 	wget_unpacked $GETTEXT_URL $DOWNLOAD_DIR $GNOME_DIR
 	wget_unpacked $GETTEXT_DEV_URL $DOWNLOAD_DIR $GNOME_DIR
 	wget_unpacked $LIBICONV_URL $DOWNLOAD_DIR $GNOME_DIR
@@ -454,6 +414,7 @@
 	wget_unpacked $PKG_CONFIG_URL $DOWNLOAD_DIR $GNOME_DIR
 	wget_unpacked $CAIRO_URL $DOWNLOAD_DIR $GNOME_DIR
 	wget_unpacked $CAIRO_DEV_URL $DOWNLOAD_DIR $GNOME_DIR
+	wget_unpacked $EXPAT_URL $DOWNLOAD_DIR $GNOME_DIR
 	wget_unpacked $FONTCONFIG_URL $DOWNLOAD_DIR $GNOME_DIR
 	wget_unpacked $FONTCONFIG_DEV_URL $DOWNLOAD_DIR $GNOME_DIR
 	wget_unpacked $FREETYPE_URL $DOWNLOAD_DIR $GNOME_DIR
@@ -503,7 +464,17 @@
                     mv libz.dll.a ../lib
                 qpopd
             fi
-            [ -f bin/libintl-2.dll ] || cp bin/intl.dll bin/libintl-2.dll
+            # work around a bug in msys bash, adding 0x01 smilies
+            cat > bin/pkg-config-msys.sh <<EOF
+#!/bin/sh
+PKG_CONFIG="\$(dirname \$0)/pkg-config"
+if \${PKG_CONFIG} "\$@" > /dev/null 2>&1 ; then
+    res=true
+else
+    res=false
+fi
+\${PKG_CONFIG} "\$@" | tr -d \\\\r && \$res
+EOF
             _FREETYPE_VERSION=`echo $FREETYPE_DEV_URL | sed 's#.*freetype-\(.*\)-lib.zip#\1#'`
             cat > lib/pkgconfig/freetype2.pc <<EOF
 prefix=/ignore
@@ -521,18 +492,18 @@
         qpopd
     fi
     if test x$cross_compile = xyes ; then
-        qpushd $GNOME_DIR/lib/pkgconfig
+        qpushd $_GNOME_UDIR/lib/pkgconfig
 	    perl -pi.bak -e"s!^prefix=.*\$!prefix=$GNOME_DIR!" *.pc
 	    #perl -pi.bak -e's!^Libs: !Libs: -L\${prefix}/bin !' *.pc
 	qpopd
 	# Latest gnome-dev packages don't ship with *.la files
 	# anymore. What do we do...?
-        #qpushd $GNOME_DIR/bin
+        #qpushd $_GNOME_UDIR/bin
 	#    for A in *-0.dll; do ln -sf $A `echo $A|sed 's/\(.*\)-0.dll/\1.dll/'`; done
 	#qpopd
     fi
     quiet gconftool-2 --version &&
-    pkg-config --exists gconf-2.0 libgnome-2.0 libgnomeui-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.8 &&
+    ${PKG_CONFIG} --exists gconf-2.0 libgnome-2.0 libgnomeui-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.8 &&
     quiet intltoolize --version || die "gnome not installed correctly"
 }
 
@@ -548,6 +519,7 @@
         qpushd $SWIG_DIR
             mv swigwin-* mydir
             mv mydir/* .
+            mv mydir/.[A-Za-z]* . # hidden files
             rmdir mydir
             rm INSTALL # bites with /bin/install
         qpopd
@@ -555,75 +527,34 @@
     quiet swig -version || die "swig unavailable"
 }
 
-function inst_autotools() {
-    setup Autotools
-    _AUTOTOOLS_UDIR=`unix_path $AUTOTOOLS_DIR`
-    add_to_env $_AUTOTOOLS_UDIR/bin PATH
-    if quiet autoconf --help && quiet automake --help
-    then
-        echo "autoconf/automake already installed.  skipping."
-    else
-        wget_unpacked $AUTOCONF_URL $DOWNLOAD_DIR $TMP_DIR
-        wget_unpacked $AUTOMAKE_URL $DOWNLOAD_DIR $TMP_DIR
-        qpushd $TMP_UDIR/autoconf-*
-            echo "building autoconf..."
-           ./configure --prefix=$_AUTOTOOLS_UDIR
-            make
-            make install
-        qpopd
-        qpushd $TMP_UDIR/automake-*
-            echo "building automake..."
-            ./configure --prefix=$_AUTOTOOLS_UDIR
-            make
-            make install
-        qpopd
-    fi
-    if quiet ${LIBTOOLIZE} --help 
-    then
-        echo "libtool/libtoolize already installed.  skipping."
-    else
-        wget_unpacked $LIBTOOL_URL $DOWNLOAD_DIR $TMP_DIR
-        qpushd $TMP_UDIR/libtool-*
-            echo "building libtool..."
-            ./configure ${HOST_XCOMPILE} --prefix=$_AUTOTOOLS_UDIR
-            make
-            make install
-        qpopd
-    fi
-    add_to_env -I$_AUTOTOOLS_UDIR/include AUTOTOOLS_CPPFLAGS
-    add_to_env -L$_AUTOTOOLS_UDIR/lib AUTOTOOLS_LDFLAGS
-    add_to_env "-I $_AUTOTOOLS_UDIR/share/aclocal" ACLOCAL_FLAGS
-    quiet autoconf --help &&
-    quiet automake --help &&
-    quiet ${LIBTOOLIZE} --help || die "autotools not installed correctly"
-}
-
 function inst_libgsf() {
     setup libGSF
     _LIBGSF_UDIR=`unix_path $LIBGSF_DIR`
     add_to_env $_LIBGSF_UDIR/bin PATH
     add_to_env $_LIBGSF_UDIR/lib/pkgconfig PKG_CONFIG_PATH
-    if quiet pkg-config --exists libgsf-1 libgsf-gnome-1
+    if quiet ${PKG_CONFIG} --exists libgsf-1 libgsf-gnome-1
     then
 	echo "libgsf already installed.  skipping."
     else
 	wget_unpacked $LIBGSF_URL $DOWNLOAD_DIR $TMP_DIR
 	qpushd $TMP_UDIR/libgsf-*
-	    ./configure ${HOST_XCOMPILE} --prefix=$_LIBGSF_UDIR \
-	    CPPFLAGS="${GNOME_CPPFLAGS}" \
-	    LDFLAGS="${GNOME_LDFLAGS}"
+	    ./configure ${HOST_XCOMPILE} \
+	        --prefix=$_LIBGSF_UDIR \
+	        --without-python \
+	        CPPFLAGS="${GNOME_CPPFLAGS}" \
+	        LDFLAGS="${GNOME_LDFLAGS}"
 	    make
 	    make install
 	qpopd
     fi
-    pkg-config --exists libgsf-1 libgsf-gnome-1 || die "libgsf not installed correctly"
+    ${PKG_CONFIG} --exists libgsf-1 libgsf-gnome-1 || die "libgsf not installed correctly"
 }
 
 function inst_goffice() {
     setup GOffice
     _GOFFICE_UDIR=`unix_path $GOFFICE_DIR`
     add_to_env $_GOFFICE_UDIR/lib/pkgconfig PKG_CONFIG_PATH
-    if quiet pkg-config --exists libgoffice-0.3
+    if quiet ${PKG_CONFIG} --exists libgoffice-0.3
     then
 	echo "goffice already installed.  skipping."
     else
@@ -638,14 +569,14 @@
 	    automake
 	    autoconf
 	    ./configure ${HOST_XCOMPILE} --prefix=$_GOFFICE_UDIR \
-	    CPPFLAGS="${GNOME_CPPFLAGS}" \
-	    LDFLAGS="${GNOME_LDFLAGS}"
+	        CPPFLAGS="${GNOME_CPPFLAGS}" \
+	        LDFLAGS="${GNOME_LDFLAGS}"
 	    [ -f dumpdef.pl ] || cp -p ../libgsf-*/dumpdef.pl .
 	    make
 	    make install
 	qpopd
     fi
-    pkg-config --exists libgoffice-0.3 || die "goffice not installed correctly"
+    ${PKG_CONFIG} --exists libgoffice-0.3 || die "goffice not installed correctly"
 }
 
 function inst_glade() {
@@ -667,6 +598,22 @@
     quiet glade-3 --version || die "glade not installed correctly"
 }
 
+function inst_inno() {
+    setup Inno Setup Compiler
+    _INNO_UDIR=`unix_path $INNO_DIR`
+    add_to_env $_INNO_UDIR PATH
+    if quiet which iscc
+    then
+        echo "Inno Setup Compiler already installed.  Skipping."
+    else
+        smart_wget $INNO_URL $DOWNLOAD_DIR
+        echo "!!! When asked for the installation path, specify $INNO_DIR !!!"
+	echo "!!! Also, you can deselect all optional components."
+        $LAST_FILE
+    fi
+    quiet which iscc || die "iscc (Inno Setup Compiler) not installed correctly"
+}
+
 function inst_svn() {
     setup Subversion
     _SVN_UDIR=`unix_path $SVN_DIR`
@@ -682,12 +629,12 @@
 }
 
 function svn_up() {
-    mkdir -p $REPOS_DIR
+    mkdir -p $_REPOS_UDIR
     qpushd $REPOS_DIR
     # latest revision that should compile, use HEAD or vwxyz
     SVN_REV="HEAD"
     if [ -x .svn ]; then
-	setup svn up
+	setup "svn update in ${REPOS_DIR}"
 	svn up -r ${SVN_REV}
     else
 	setup svn co
@@ -698,79 +645,79 @@
 
 function inst_gnucash() {
     setup GnuCash
-    _GNUCASH_WFSDIR=`win_fs_path $GNUCASH_DIR`
-    _GNUCASH_UDIR=`unix_path $GNUCASH_DIR`
+    _INSTALL_WFSDIR=`win_fs_path $INSTALL_DIR`
+    _INSTALL_UDIR=`unix_path $INSTALL_DIR`
+    _BUILD_UDIR=`unix_path $BUILD_DIR`
+    _REL_REPOS_UDIR=`unix_path $REL_REPOS_DIR`
+    mkdir -p $_BUILD_UDIR
+
     qpushd $REPOS_DIR
-    # Necessary so that intltoolize doesn't come up with some
-    # foolish AC_CONFIG_AUX_DIR; bug#362006 
-    touch install-sh
-    if test "x$cross_compile" = xyes ; then
-	# Set these variables manually because of cross-compiling
-	export GUILE_LIBS="${GUILE_LDFLAGS} -lguile -lguile-ltdl"
-	export GUILE_INCS="${GUILE_CPPFLAGS}"
-	export BUILD_GUILE=yes
-	export name_build_guile=/usr/bin/guile-config
-    fi
-    ./autogen.sh
-    ./configure ${HOST_XCOMPILE} ${TARGET_XCOMPILE} \
-	--prefix=$_GNUCASH_WFSDIR \
-	--enable-debug \
-	--enable-schemas-install=no \
-	--enable-binreloc \
-	CPPFLAGS="${AUTOTOOLS_CPPFLAGS} ${REGEX_CPPFLAGS} ${GNOME_CPPFLAGS} ${GUILE_CPPFLAGS} -D_WIN32" \
-	LDFLAGS="${AUTOTOOLS_LDFLAGS} ${REGEX_LDFLAGS} ${GNOME_LDFLAGS} ${GUILE_LDFLAGS}" \
-	PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
+        if test "x$cross_compile" = xyes ; then
+            # Set these variables manually because of cross-compiling
+            export GUILE_LIBS="${GUILE_LDFLAGS} -lguile -lguile-ltdl"
+            export GUILE_INCS="${GUILE_CPPFLAGS}"
+            export BUILD_GUILE=yes
+            export name_build_guile=/usr/bin/guile-config
+        fi
+        ./autogen.sh
+        # Windows DLLs don't need relinking
+        grep -v "need_relink=yes" ltmain.sh > ltmain.sh.new ; mv ltmain.sh.new ltmain.sh
+    qpopd
 
-    # Windows DLLs don't need relinking
-    grep -v "need_relink=yes" ltmain.sh > ltmain.sh.new ; mv ltmain.sh.new ltmain.sh
-    grep -v "need_relink=yes" libtool   > libtool.new   ; mv libtool.new   libtool
-    # Exclude (for now) the test subdirectories from the build
-    # because executable linking is so painfully slow on mingw
-    perl -pi.instbak -e's#^(SUBDIRS.* )test( .*)?$#\1\2#' `find src -name Makefile`
-    find src -name Makefile.instbak -exec rm {} \;
+    qpushd $BUILD_DIR
+        $_REL_REPOS_UDIR/configure ${HOST_XCOMPILE} ${TARGET_XCOMPILE} \
+            --prefix=$_INSTALL_WFSDIR \
+            --enable-debug \
+            --enable-schemas-install=no \
+            --enable-binreloc \
+            CPPFLAGS="${AUTOTOOLS_CPPFLAGS} ${REGEX_CPPFLAGS} ${GNOME_CPPFLAGS} ${GUILE_CPPFLAGS} -D_WIN32" \
+            LDFLAGS="${AUTOTOOLS_LDFLAGS} ${REGEX_LDFLAGS} ${GNOME_LDFLAGS} ${GUILE_LDFLAGS}" \
+            PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
 
-    make
+        # Windows DLLs don't need relinking
+        grep -v "need_relink=yes" libtool   > libtool.new   ; mv libtool.new   libtool
 
-    # Try to fix the paths in the "gnucash" script
-    qpushd src/bin
-    rm gnucash
-    make PATH_SEPARATOR=";" \
-	bindir="${_GNUCASH_UDIR}/bin:${_GNUCASH_UDIR}/lib/bin:${_GOFFICE_UDIR}/bin:${_LIBGSF_UDIR}/bin:${_GNOME_UDIR}/bin:${_LIBXML2_UDIR}/bin:${_GUILE_UDIR}/bin:${_REGEX_UDIR}/bin:${_AUTOTOOLS_UDIR}/bin" \
-	gnucash
-    qpopd
+        make
 
-    make install
+        # Try to fix the paths in the "gnucash" script
+        qpushd src/bin
+            rm gnucash
+            make PATH_SEPARATOR=";" \
+                bindir="${_INSTALL_UDIR}/bin:${_INSTALL_UDIR}/lib/bin:${_GOFFICE_UDIR}/bin:${_LIBGSF_UDIR}/bin:${_GNOME_UDIR}/bin:${_LIBXML2_UDIR}/bin:${_GUILE_UDIR}/bin:${_REGEX_UDIR}/bin:${_AUTOTOOLS_UDIR}/bin" \
+                gnucash
+        qpopd
+
+        make install
     qpopd
 
-    qpushd ${_GNUCASH_WFSDIR}/lib/gnucash
-    # Remove the dependency_libs line from the installed .la files
-    # because otherwise loading the modules literally takes hours.
-    for A in *.la; do grep -v dependency_libs $A > tmp ; mv  tmp $A; done
+    qpushd $_INSTALL_UDIR/lib/gnucash
+        # Remove the dependency_libs line from the installed .la files
+        # because otherwise loading the modules literally takes hours.
+        for A in *.la; do grep -v dependency_libs $A > tmp ; mv  tmp $A; done
     qpopd
 
-    qpushd ${_GNUCASH_WFSDIR}/etc/gconf/schemas
-    for file in *.schemas; do
-        gconftool-2 \
-            --config-source=xml:merged:${_GNUCASH_WFSDIR}/etc/gconf/gconf.xml.defaults \
-            --install-schema-file $file
-    done
-    gconftool-2 --shutdown
+    qpushd $_INSTALL_UDIR/etc/gconf/schemas
+        for file in *.schemas; do
+            gconftool-2 \
+                --config-source=xml:merged:${_INSTALL_WFSDIR}/etc/gconf/gconf.xml.defaults \
+                --install-schema-file $file
+        done
+        gconftool-2 --shutdown
     qpopd
 
     # Create a startup script that works without the msys shell
-    qpushd ${_GNUCASH_WFSDIR}/bin
-    echo "set PATH=${GNUCASH_DIR}\\bin;${GNUCASH_DIR}\\lib\\bin;${GOFFICE_DIR}\\bin;${LIBGSF_DIR}\\bin;${GNOME_DIR}\\bin;${LIBXML2_DIR}\\bin;${GUILE_DIR}\\bin;${REGEX_DIR}\\bin;${AUTOTOOLS_DIR}\\bin" > gnucash.bat
-    echo "set GUILE_WARN_DEPRECATED=no" >> gnucash.bat
-    echo "set GNC_MODULE_PATH=${GNUCASH_DIR}\\lib\\gnucash" >> gnucash.bat
-    echo "set GUILE_LOAD_PATH=${GNUCASH_DIR}\\share\\gnucash\\guile-modules;${GNUCASH_DIR}\\share\\gnucash\\scm;%GUILE_LOAD_PATH%" >> gnucash.bat
-    # Really sure we don't need this?
-    #echo "set SCHEME_LIBRARY_PATH=${GUILE_DIR}\\share\\guile\\site\\slib\\" >> gnucash.bat
-    echo "set LTDL_LIBRARY_PATH=${GNUCASH_DIR}\\lib" >> gnucash.bat
-    echo "start gnucash-bin" >> gnucash.bat
+    qpushd $_INSTALL_UDIR/bin
+        echo "set PATH=${INSTALL_DIR}\\bin;${INSTALL_DIR}\\lib\\bin;${GOFFICE_DIR}\\bin;${LIBGSF_DIR}\\bin;${GNOME_DIR}\\bin;${LIBXML2_DIR}\\bin;${GUILE_DIR}\\bin;${REGEX_DIR}\\bin;${AUTOTOOLS_DIR}\\bin;%PATH%" > gnucash.bat
+        echo "set GUILE_WARN_DEPRECATED=no" >> gnucash.bat
+        echo "set GNC_MODULE_PATH=${INSTALL_DIR}\\lib\\gnucash" >> gnucash.bat
+        echo "set GUILE_LOAD_PATH=${INSTALL_DIR}\\share\\gnucash\\guile-modules;${INSTALL_DIR}\\share\\gnucash\\scm;%GUILE_LOAD_PATH%" >> gnucash.bat
+        echo "set LTDL_LIBRARY_PATH=${INSTALL_DIR}\\lib" >> gnucash.bat
+        echo "start gnucash-bin" >> gnucash.bat
     qpopd
 }
 
 function finish() {
+    setup Finish...
     _NEW=x
     for _ENV in $ENV_VARS; do
 	_ADDS=`eval echo '"\$'"${_ENV}"'_ADDS"'`
@@ -779,6 +726,7 @@
 		echo
 		echo "Environment variables changed, please do the following"
 		echo
+		[ -d /etc/profile.d ] || echo "mkdir -p /etc/profile.d"
 		_NEW=
 	    fi
 	    _VAL=`eval echo '"$'"${_ENV}_BASE"'"'`

Modified: gnucash/branches/register-rewrite/src/app-utils/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/app-utils/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/app-utils/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -5,6 +5,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/calculation \
   -I${top_srcdir}/src/core-utils \
@@ -76,7 +77,7 @@
   ${GLIB_LIBS}
 
 if BUILDING_FROM_SVN
-swig-app-utils.c: app-utils.i
+swig-app-utils.c: app-utils.i ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif

Modified: gnucash/branches/register-rewrite/src/app-utils/gnc-component-manager.c
===================================================================
--- gnucash/branches/register-rewrite/src/app-utils/gnc-component-manager.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/app-utils/gnc-component-manager.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -639,7 +639,7 @@
 changes_match (ComponentEventInfo *cei, ComponentEventInfo *changes)
 {
   ComponentEventInfo *big_cei;
-  GHashTable *small;
+  GHashTable *smalltable;
 
   if (cei == NULL)
     return FALSE;
@@ -653,18 +653,18 @@
   if (g_hash_table_size (cei->entity_events) <=
       g_hash_table_size (changes->entity_events))
   {
-    small = cei->entity_events;
+    smalltable = cei->entity_events;
     big_cei = changes;
   }
   else
   {
-    small = changes->entity_events;
+    smalltable = changes->entity_events;
     big_cei = cei;
   }
 
   big_cei->match = FALSE;
 
-  g_hash_table_foreach (small, match_helper, big_cei);
+  g_hash_table_foreach (smalltable, match_helper, big_cei);
 
   return big_cei->match;
 }

Modified: gnucash/branches/register-rewrite/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/branches/register-rewrite/src/app-utils/gnc-ui-util.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/app-utils/gnc-ui-util.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -174,30 +174,22 @@
 }
 
 
-void
-gnc_init_default_directory (char **dirname)
+gchar *
+gnc_get_default_directory (const gchar *gconf_section)
 {
-  if (*dirname == NULL)
-    *dirname = g_strdup_printf("%s/", g_get_home_dir());
+  gchar *dir;
+
+  dir = gnc_gconf_get_string (gconf_section, KEY_LAST_PATH, NULL);
+  if (!dir)
+    dir = g_strdup (g_get_home_dir ());
+
+  return dir;
 }
 
 void
-gnc_extract_directory (char **dirname, const char *filename)
+gnc_set_default_directory (const gchar *gconf_section, const gchar *directory)
 {
-  char *tmp;
-
-  if (*dirname)
-    free(*dirname);
-
-  /* Parse out the directory. */
-  if ((filename == NULL) || (strrchr(filename, '/') == NULL)) {
-    *dirname = NULL;
-    return;
-  }
-
-  *dirname = g_strdup(filename);
-  tmp = strrchr(*dirname, '/');
-  *(tmp+1) = '\0';
+  gnc_gconf_set_string(gconf_section, KEY_LAST_PATH, directory, NULL);
 }
 
 QofBook *
@@ -742,6 +734,11 @@
     *p_value = default_value;
 
   *p_value = g_locale_to_utf8 (*p_value, -1, NULL, NULL, NULL);
+  if (*p_value == NULL) {
+    // The g_locale_to_utf8 conversion failed. FIXME: Should we rather
+    // use an empty string instead of the default_value? Not sure.
+    *p_value = default_value;
+  }
   // FIXME: Do we really need to make a copy here ?
   //*p_value = g_strdup (*p_value);
 }
@@ -773,6 +770,7 @@
   gnc_lconv_set_utf8(&lc.mon_thousands_sep, ",");
   gnc_lconv_set_utf8(&lc.mon_grouping, "\003");
   gnc_lconv_set_utf8(&lc.negative_sign, "-");
+  gnc_lconv_set_utf8(&lc.positive_sign, "");
 
   gnc_lconv_set_char(&lc.frac_digits, 2);
   gnc_lconv_set_char(&lc.int_frac_digits, 2);

Modified: gnucash/branches/register-rewrite/src/app-utils/gnc-ui-util.h
===================================================================
--- gnucash/branches/register-rewrite/src/app-utils/gnc-ui-util.h	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/app-utils/gnc-ui-util.h	2007-01-05 23:51:55 UTC (rev 15316)
@@ -49,32 +49,10 @@
 
 /* Default directories **********************************************/
 
-void gnc_init_default_directory (char **dirname);
-/** 
- * Extracts the directory part of the given 'filename' into the char
- * pointer variable '*dirname'. If the 'filename' is NULL or does not
- * contain any directory separator '/', then '*dirname' will be set to
- * NULL.
- * 
- * WATCH OUT: If '*dirname' (i.e. the underlying char pointer
- * variable) is non-NULL, then it will be free()'d. Make sure that you
- * have initialized it to NULL, or otherwise you will get a bogus
- * free() or a double-free() here. FIXME: This is probably not-so-good
- * behaviour and should be changed (2005-10-08, cstim).
- *
- * Again watch out: The caller takes ownership of the char buffer
- * '*dirname', i.e. the caller has to do a g_free(*dirname) when that
- * buffer is no longer in use.
- *
- * NOTE: We strongly recommend to use g_path_get_dirname() from glib
- * instead of this function. (There's one slight functional difference:
- * If filename is NULL or does not contain a separator,
- * g_path_get_dirname will return "." whereas this function here will
- * return NULL. 2006-03-02, cstim)
-*/
-void gnc_extract_directory (char **dirname, const char *filename);
+gchar *gnc_get_default_directory (const gchar *gconf_section);
+void gnc_set_default_directory (const gchar *gconf_section,
+				const gchar *directory);
 
-
 /* Engine enhancements & i18n ***************************************/
 QofBook * gnc_get_current_book (void);
 AccountGroup * gnc_get_current_group (void);

Modified: gnucash/branches/register-rewrite/src/app-utils/options.scm
===================================================================
--- gnucash/branches/register-rewrite/src/app-utils/options.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/app-utils/options.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -639,7 +639,8 @@
     (gnc:make-option
      section name sort-tag 'account-list documentation-string getter
      (lambda (account-list)
-       (if (not account-list) (set! account-list (default-getter)))
+       (if (or (not account-list) (null? account-list)) 
+           (set! account-list (default-getter)))
        (set! account-list
              (filter (lambda (x) (if (string? x)
                                      (xaccAccountLookup
@@ -762,7 +763,7 @@
     (gnc:make-option
      section name sort-tag 'account-sel documentation-string getter
      (lambda (account)
-       (if (not account) (set! account (get-default)))
+       (if (or (not account) (null? account)) (set! account (get-default)))
        (set! account (convert-to-account account))
        (let* ((result (validator account))
 	      (valid (car result))

Modified: gnucash/branches/register-rewrite/src/app-utils/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/app-utils/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/app-utils/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -44,7 +44,7 @@
    ${QOF_LIBS} \
    ${GCONF_LIBS}
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-link-module \
   test-exp-parser \
   test-print-parse-amount \

Modified: gnucash/branches/register-rewrite/src/backend/file/gnc-account-xml-v2.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/gnc-account-xml-v2.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/gnc-account-xml-v2.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -194,7 +194,7 @@
 account_type_handler (xmlNodePtr node, gpointer act_pdata)
 {
     struct account_pdata *pdata = act_pdata;
-    int type;
+    GNCAccountType type = ACCT_TYPE_INVALID;
     char *string;
 
     string = (char*) xmlNodeGetContent (node->xmlChildrenNode);

Modified: gnucash/branches/register-rewrite/src/backend/file/gnc-backend-file.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/gnc-backend-file.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/gnc-backend-file.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -50,6 +50,7 @@
 #include "gnc-engine.h"
 
 #include "gnc-filepath-utils.h"
+#include "gnc-path.h"
 
 #include "io-gncxml.h"
 #include "io-gncxml-v2.h"
@@ -83,7 +84,7 @@
 gnc_file_be_get_file_lock (FileBackend *be)
 {
     struct stat statbuf;
-#ifndef _WIN32
+#ifndef G_OS_WIN32
     char pathbuf[PATH_MAX];
     char *path = NULL;
 #endif
@@ -132,7 +133,7 @@
      * provides a better long-term solution.
      */
 
-#ifndef _WIN32
+#ifndef G_OS_WIN32
     strcpy (pathbuf, be->lockfile);
     path = strrchr (pathbuf, '.');
     sprintf (path, ".%lx.%d.LNK", gethostid(), getpid());
@@ -183,12 +184,12 @@
 
     return TRUE;
 
-#else /* ifndef _WIN32 */
+#else /* ifndef G_OS_WIN32 */
     /* On windows, there is no NFS and the open(,O_CREAT | O_EXCL)
        is sufficient for locking. */
     be->linkfile = NULL;
     return TRUE;
-#endif /* ifndef _WIN32 */
+#endif /* ifndef G_OS_WIN32 */
 }
 
 /* ================================================================= */
@@ -1051,10 +1052,16 @@
 {
 	QofBackendProvider *prov;
 #ifdef ENABLE_NLS
+	gchar *localedir = gnc_path_get_localedir ();
+	/* FIXME: It is unclear whether setlocale() is actually
+	   needed here (added in r11313). Some platforms might
+	   need it so that gettext works correctly in this
+	   GModule. We'll keep it for now. */
 	setlocale (LC_ALL, "");
-	bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
+	bindtextdomain (GETTEXT_PACKAGE, localedir);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
+	g_free (localedir);
 #endif
         prov = g_new0 (QofBackendProvider, 1);
         prov->provider_name = "GnuCash File Backend Version 2";

Modified: gnucash/branches/register-rewrite/src/backend/file/gnc-commodity-xml-v2.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/gnc-commodity-xml-v2.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/gnc-commodity-xml-v2.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -58,6 +58,7 @@
 #define cmdty_get_quotes     "cmdty:get_quotes"
 #define cmdty_quote_source   "cmdty:quote_source"
 #define cmdty_quote_tz       "cmdty:quote_tz"
+#define cmdty_slots          "cmdty:slots"
 
 xmlNodePtr
 gnc_commodity_dom_tree_create(const gnc_commodity *com)
@@ -66,8 +67,11 @@
     const char *string;
     xmlNodePtr ret;
     gboolean currency = gnc_commodity_is_iso(com);
+    xmlNodePtr kvpnode =
+      kvp_frame_to_dom_tree(cmdty_slots,
+			    qof_instance_get_slots(QOF_INSTANCE(com)));
 
-    if (currency && !gnc_commodity_get_quote_flag(com))
+    if (currency && !gnc_commodity_get_quote_flag(com) && !kvpnode)
       return NULL;
 
     ret = xmlNewNode(NULL, BAD_CAST gnc_commodity_string);
@@ -108,6 +112,10 @@
       if (string)
 	xmlAddChild(ret, text_to_dom_tree(cmdty_quote_tz, string));
     }
+
+    if (kvpnode)
+      xmlAddChild(ret, kvpnode);
+
     return ret;
 }
 
@@ -157,6 +165,12 @@
 	gnc_commodity_set_quote_source(com, source);
         xmlFree (string);
     }
+    else if(safe_strcmp((char*)node->name, cmdty_slots) == 0)
+    {
+      /* We ignore the results here */
+      dom_tree_to_kvp_frame_given(node,
+				  qof_instance_get_slots(QOF_INSTANCE(com)));
+    }
     else 
     {
         struct com_char_handler *mark;

Modified: gnucash/branches/register-rewrite/src/backend/file/gnc-transaction-xml-v2.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/gnc-transaction-xml-v2.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/gnc-transaction-xml-v2.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -444,7 +444,7 @@
     return TRUE;
 }
 
-static inline gboolean
+static gboolean
 trn_id_handler(xmlNodePtr node, gpointer trans_pdata)
 {
     struct trans_pdata *pdata = trans_pdata;

Modified: gnucash/branches/register-rewrite/src/backend/file/io-gncxml-v2.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/io-gncxml-v2.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/io-gncxml-v2.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1138,7 +1138,7 @@
   if (!use_gzip)
     return fopen(filename, perms);
 
-#ifdef _WIN32
+#ifdef G_OS_WIN32
   PWARN("Compression not implemented on Windows. Opening uncompressed file.");
   return fopen(filename, perms);
 

Modified: gnucash/branches/register-rewrite/src/backend/file/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -191,13 +191,13 @@
   SRCDIR=${srcdir} \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_LTLIBRARIES = libgnc-test-file-stuff.la
+check_LTLIBRARIES = libgnc-test-file-stuff.la
 
 libgnc_test_file_stuff_la_SOURCES = test-file-stuff.c
 libgnc_test_file_stuff_la_LIBADD = \
   ${top_builddir}/src/engine/libgncmod-engine.la
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-date-converting \
   test-dom-converters1 \
   test-kvp-frames \

Modified: gnucash/branches/register-rewrite/src/backend/file/test/test-xml-account.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/test/test-xml-account.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/test/test-xml-account.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -247,7 +247,7 @@
         
     filename1 = g_strdup_printf("test_file_XXXXXX");
         
-    fd = mkstemp(filename1);
+    fd = g_mkstemp(filename1);
         
     write_dom_node_to_file(test_node, fd);
 

Modified: gnucash/branches/register-rewrite/src/backend/file/test/test-xml-commodity.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/test/test-xml-commodity.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/test/test-xml-commodity.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -175,7 +175,7 @@
         
         filename1 = g_strdup_printf("test_file_XXXXXX");
         
-        fd = mkstemp(filename1);
+        fd = g_mkstemp(filename1);
         
         write_dom_node_to_file(test_node, fd);
 

Modified: gnucash/branches/register-rewrite/src/backend/file/test/test-xml-pricedb.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/test/test-xml-pricedb.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/test/test-xml-pricedb.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -84,7 +84,7 @@
 
   filename1 = g_strdup_printf ("test_file_XXXXXX");
         
-  fd = mkstemp (filename1);
+  fd = g_mkstemp (filename1);
         
   write_dom_node_to_file (test_node, fd);
 

Modified: gnucash/branches/register-rewrite/src/backend/file/test/test-xml-transaction.c
===================================================================
--- gnucash/branches/register-rewrite/src/backend/file/test/test-xml-transaction.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/file/test/test-xml-transaction.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -429,7 +429,7 @@
         
         filename1 = g_strdup_printf("test_file_XXXXXX");
         
-        fd = mkstemp(filename1);
+        fd = g_mkstemp(filename1);
         
         write_dom_node_to_file(test_node, fd);
 

Modified: gnucash/branches/register-rewrite/src/backend/postgres/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/backend/postgres/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/backend/postgres/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -14,7 +14,7 @@
   TEST_DB_SOCKET_DIR=`pwd`/gnc_test_db_sock \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-load-backend \
   test-db \
   test-escape \

Modified: gnucash/branches/register-rewrite/src/base-typemaps.i
===================================================================
--- gnucash/branches/register-rewrite/src/base-typemaps.i	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/base-typemaps.i	2007-01-05 23:51:55 UTC (rev 15316)
@@ -20,11 +20,17 @@
 typedef int gint;
 typedef int time_t;
 typedef unsigned int guint;
+typedef double gdouble;
 typedef char * URLType;
 typedef char gchar;
 
 %typemap(newfree) gchar * "g_free($1);"
-
+%typemap (out) char * {
+  $result = scm_makfrom0str((const char *)$1);
+  if (!SCM_NFALSEP($result)) {
+    $result = scm_makstr(0, 0);
+  }
+}
 %typemap(in) GNCPrintAmountInfo "$1 = gnc_scm2printinfo($input);"
 %typemap(out) GNCPrintAmountInfo "$result = gnc_printinfo2scm($1);"
 

Modified: gnucash/branches/register-rewrite/src/bin/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/bin/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/bin/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -8,6 +8,7 @@
   -DPKGDATADIR=\"${GNC_SHAREDIR}\" \
   -DGNC_HELPDIR=\"${GNC_HELPDIR}\" \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/gnome-utils \

Modified: gnucash/branches/register-rewrite/src/bin/gnucash-bin.c
===================================================================
--- gnucash/branches/register-rewrite/src/bin/gnucash-bin.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/bin/gnucash-bin.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -82,7 +82,7 @@
 	    _("This is a development version. It may or may not work.\n"),
 	    _("Report bugs and other problems to gnucash-devel at gnucash.org.\n"),
 	    _("You can also lookup and file bug reports at http://bugzilla.gnome.org\n"),
-	    _("The last stable version was "), "GnuCash 2.0.2",
+	    _("The last stable version was "), "GnuCash 2.0.3",
 	    _("The next stable version will be "), "GnuCash 2.2");
 }
 
@@ -361,14 +361,12 @@
             gnc_module_load(modules[i].name, modules[i].version);
     }
     if (!gnc_engine_is_initialized()) {
-#ifdef G_OS_WIN32
-        g_warning("GnuCash engine indicates it hasn't been initialized correctly. On Windows this mechanism is know not to work. Ignoring for now.\n");
-        /* See more detailed discussion here
-	   https://lists.gnucash.org/pipermail/gnucash-devel/2006-September/018529.html */
-#else
+        /* On Windows this check used to fail anyway, see
+	   https://lists.gnucash.org/pipermail/gnucash-devel/2006-September/018529.html
+	   but more recently it seems to work as expected
+	   again. 2006-12-20, cstim. */
         g_error("GnuCash engine failed to initialize.  Exiting.\n");
         exit(0);
-#endif
     }
 }
 

Modified: gnucash/branches/register-rewrite/src/business/business-core/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -5,6 +5,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   ${GUILE_INCS} \
@@ -66,7 +67,8 @@
 # business-core-helpers.c
 
 if BUILDING_FROM_SVN
-swig-business-core.c: business-core.i ${noinst_HEADERS}
+swig-business-core.c: business-core.i ${noinst_HEADERS} \
+                      ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif

Modified: gnucash/branches/register-rewrite/src/business/business-core/business-core.scm
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/business-core.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/business-core.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -91,20 +91,20 @@
   (let* ((trans (xaccSplitGetParent split))
 	 (invoice (gncInvoiceGetInvoiceFromTxn trans))
 	 (temp-owner (gncOwnerCreate))
-	 (owner #f))
+	 (owner '()))
 
-    (if invoice
+    (if (not (null? invoice))
 	(set! owner (gncInvoiceGetOwner invoice))
 	(let ((split-list (xaccTransGetSplitList trans)))
 	  (define (check-splits splits)
 	    (if (and splits (not (null? splits)))
 		(let* ((split (car splits))
 		       (lot (xaccSplitGetLot split)))
-		  (if lot
+		  (if (not (null? lot))
 		      (let* ((invoice (gncInvoiceGetInvoiceFromLot lot))
 			     (owner? (gnc:owner-get-owner-from-lot
 				      lot temp-owner)))
-			(if invoice
+			(if (not (null? invoice))
 			    (set! owner (gncInvoiceGetOwner invoice))
 			    (if owner?
 				(set! owner temp-owner)
@@ -112,14 +112,14 @@
 		      (check-splits (cdr splits))))))
 	  (check-splits split-list)))
 
-    (if owner
+    (if (not (null? owner))
 	(begin
 	  (gncOwnerCopy (gncOwnerGetEndOwner owner) result-owner)
 	  (gncOwnerDestroy temp-owner)
 	  result-owner)
 	(begin
 	  (gncOwnerDestroy temp-owner)
-	  #f)))) ;; FIXME!
+	  '()))))
 
 
 (export gnc:owner-get-address)

Modified: gnucash/branches/register-rewrite/src/business/business-core/file/gnc-invoice-xml-v2.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/file/gnc-invoice-xml-v2.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/file/gnc-invoice-xml-v2.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -191,7 +191,7 @@
   return TRUE;
 }
 
-static inline gboolean
+static gboolean
 invoice_guid_handler (xmlNodePtr node, gpointer invoice_pdata)
 {
     struct invoice_pdata *pdata = invoice_pdata;

Modified: gnucash/branches/register-rewrite/src/business/business-core/file/gnc-order-xml-v2.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/file/gnc-order-xml-v2.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/file/gnc-order-xml-v2.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -137,7 +137,7 @@
   return TRUE;
 }
 
-static inline gboolean
+static gboolean
 order_guid_handler (xmlNodePtr node, gpointer order_pdata)
 {
     struct order_pdata *pdata = order_pdata;

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncAddress.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncAddress.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncAddress.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -254,14 +254,14 @@
   qof_begin_edit (&addr->inst);
 }
 
-static inline void gncAddressOnError (QofInstance *inst, QofBackendError errcode)
+static void gncAddressOnError (QofInstance *inst, QofBackendError errcode)
 {
   PERR("Address QofBackend Failure: %d", errcode);
 }
   
-static inline void gncAddressOnDone (QofInstance *addr) { }
+static void gncAddressOnDone (QofInstance *addr) { }
 
-static inline void address_free (QofInstance *inst)
+static void address_free (QofInstance *inst)
 {
   GncAddress *addr = (GncAddress *) inst;
   gncAddressFree (addr);

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncBillTerm.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncBillTerm.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncBillTerm.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -406,13 +406,13 @@
   PERR("BillTerm QofBackend Failure: %d", errcode);
 }
 
-static inline void bill_free (QofInstance *inst)
+static void bill_free (QofInstance *inst)
 {
   GncBillTerm *term = (GncBillTerm *) inst;
   gncBillTermFree(term);
 }
 
-static inline void on_done (QofInstance *inst) {}
+static void on_done (QofInstance *inst) {}
 
 void gncBillTermCommitEdit (GncBillTerm *term)
 {

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncCustomer.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncCustomer.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncCustomer.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -365,19 +365,19 @@
   qof_begin_edit (&cust->inst);
 }
 
-static inline void gncCustomerOnError (QofInstance *inst, QofBackendError errcode)
+static void gncCustomerOnError (QofInstance *inst, QofBackendError errcode)
 {
   PERR("Customer QofBackend Failure: %d", errcode);
 }
 
-static inline void gncCustomerOnDone (QofInstance *inst)
+static void gncCustomerOnDone (QofInstance *inst)
 {
   GncCustomer *cust = (GncCustomer *) inst;
   gncAddressClearDirty (cust->addr);
   gncAddressClearDirty (cust->shipaddr);
 }
 
-static inline void cust_free (QofInstance *inst)
+static void cust_free (QofInstance *inst)
 {
   GncCustomer *cust = (GncCustomer *) inst;
   gncCustomerFree (cust);

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncEmployee.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncEmployee.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncEmployee.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -344,18 +344,18 @@
   QOF_BEGIN_EDIT (&employee->inst);
 }
 
-static inline void gncEmployeeOnError (QofInstance *employee, QofBackendError errcode)
+static void gncEmployeeOnError (QofInstance *employee, QofBackendError errcode)
 {
   PERR("Employee QofBackend Failure: %d", errcode);
 }
 
-static inline void gncEmployeeOnDone (QofInstance *inst)
+static void gncEmployeeOnDone (QofInstance *inst)
 {
   GncEmployee *employee = (GncEmployee *) inst;
   gncAddressClearDirty (employee->addr);
 }
 
-static inline void emp_free (QofInstance *inst)
+static void emp_free (QofInstance *inst)
 {
   GncEmployee *employee = (GncEmployee *) inst;
   gncEmployeeFree (employee);

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncEntry.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncEntry.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncEntry.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1169,14 +1169,14 @@
   QOF_BEGIN_EDIT (&entry->inst);
 }
 
-static inline void gncEntryOnError (QofInstance *entry, QofBackendError errcode)
+static void gncEntryOnError (QofInstance *entry, QofBackendError errcode)
 {
   PERR("Entry QofBackend Failure: %d", errcode);
 }
 
-static inline void gncEntryOnDone (QofInstance *inst) {}
+static void gncEntryOnDone (QofInstance *inst) {}
 
-static inline void entry_free (QofInstance *inst)
+static void entry_free (QofInstance *inst)
 {
   GncEntry *entry = (GncEntry *)inst;
   gncEntryFree (entry);

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncInvoice.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncInvoice.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncInvoice.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1445,14 +1445,14 @@
   QOF_BEGIN_EDIT (&invoice->inst);
 }
 
-static inline void gncInvoiceOnError (QofInstance *inst, QofBackendError errcode)
+static void gncInvoiceOnError (QofInstance *inst, QofBackendError errcode)
 {
   PERR("Invoice QofBackend Failure: %d", errcode);
 }
 
-static inline void gncInvoiceOnDone (QofInstance *invoice) { }
+static void gncInvoiceOnDone (QofInstance *invoice) { }
 
-static inline void invoice_free (QofInstance *inst)
+static void invoice_free (QofInstance *inst)
 {
   GncInvoice *invoice = (GncInvoice *) inst;
   gncInvoiceFree (invoice);

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncJob.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncJob.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncJob.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -267,13 +267,13 @@
   PERR("Job QofBackend Failure: %d", errcode);
 }
 
-static inline void job_free (QofInstance *inst)
+static void job_free (QofInstance *inst)
 {
   GncJob *job = (GncJob *)inst;
   gncJobFree (job);
 }
 
-static inline void gncJobOnDone (QofInstance *qof) { }
+static void gncJobOnDone (QofInstance *qof) { }
 
 void gncJobCommitEdit (GncJob *job)
 {

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncOrder.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncOrder.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncOrder.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -336,14 +336,14 @@
   qof_begin_edit(&order->inst);
 }
 
-static inline void gncOrderOnError (QofInstance *order, QofBackendError errcode)
+static void gncOrderOnError (QofInstance *order, QofBackendError errcode)
 {
   PERR("Order QofBackend Failure: %d", errcode);
 }
 
-static inline void gncOrderOnDone (QofInstance *order) {}
+static void gncOrderOnDone (QofInstance *order) {}
 
-static inline void order_free (QofInstance *inst)
+static void order_free (QofInstance *inst)
 {
   GncOrder *order = (GncOrder *) inst;
   gncOrderFree (order);

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncTaxTable.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncTaxTable.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncTaxTable.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -508,14 +508,14 @@
   QOF_BEGIN_EDIT (&table->inst);
 }
 
-static inline void gncTaxTableOnError (QofInstance *inst, QofBackendError errcode)
+static void gncTaxTableOnError (QofInstance *inst, QofBackendError errcode)
 {
   PERR("TaxTable QofBackend Failure: %d", errcode);
 }
 
-static inline void gncTaxTableOnDone (QofInstance *inst) {}
+static void gncTaxTableOnDone (QofInstance *inst) {}
 
-static inline void table_free (QofInstance *inst)
+static void table_free (QofInstance *inst)
 {
   GncTaxTable *table = (GncTaxTable *) inst;
   gncTaxTableFree (table);

Modified: gnucash/branches/register-rewrite/src/business/business-core/gncVendor.c
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/gncVendor.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/gncVendor.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -422,18 +422,18 @@
   QOF_BEGIN_EDIT (&vendor->inst);
 }
 
-static inline void gncVendorOnError (QofInstance *vendor, QofBackendError errcode)
+static void gncVendorOnError (QofInstance *vendor, QofBackendError errcode)
 {
   PERR("Vendor QofBackend Failure: %d", errcode);
 }
 
-static inline void gncVendorOnDone (QofInstance *inst)
+static void gncVendorOnDone (QofInstance *inst)
 {
   GncVendor *vendor = (GncVendor *) inst;
   gncAddressClearDirty (vendor->addr);
 }
 
-static inline void vendor_free (QofInstance *inst)
+static void vendor_free (QofInstance *inst)
 {
   GncVendor *vendor = (GncVendor *) inst;
   gncVendorFree (vendor);

Modified: gnucash/branches/register-rewrite/src/business/business-core/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-core/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-core/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -39,7 +39,7 @@
 TESTS_ENVIRONMENT := \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-load-module \
   test-business \
   test-address \

Modified: gnucash/branches/register-rewrite/src/business/business-gnome/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-gnome/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-gnome/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -5,6 +5,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \

Modified: gnucash/branches/register-rewrite/src/business/business-reports/aging.scm
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-reports/aging.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-reports/aging.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -183,8 +183,7 @@
 	   (temp-owner (gncOwnerCreate))
 	   (owner (gnc:owner-from-split split temp-owner)))
 
-      (if
-       owner
+      (if (not (null? owner))
        (let* ((guid (gncOwnerReturnGUID owner))
 	      (this-currency (xaccTransGetCurrency transaction))
 	      (this-date (gnc-transaction-get-date-posted transaction))
@@ -543,7 +542,7 @@
     ;; set default title
     (gnc:html-document-set-title! document report-title)
     ;; maybe redefine better...
-    (if account
+    (if (not (null? account))
         (begin
           (gnc:html-document-set-title!
            document (string-append report-title ": " (xaccAccountGetName account)))
@@ -558,7 +557,7 @@
 
     (gnc:html-table-set-col-headers! table heading-list)
 				     
-    (if account
+    (if (not (null? account))
 	(begin
 	  (setup-query query account report-date)
 	  ;; get the appropriate splits

Modified: gnucash/branches/register-rewrite/src/business/business-reports/business-reports.scm
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-reports/business-reports.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-reports/business-reports.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -90,7 +90,7 @@
     (if ref
 	(begin
 	  (set! ref (string-append ref (gncOwnerReturnGUID end-owner)))
-	  (if acc
+	  (if (not (null? acc))
 	      (set! ref (string-append ref "&acct="
 				       (gncAccountGetGUID acc))))
 	  (gnc-build-url URL-TYPE-OWNERREPORT ref ""))

Modified: gnucash/branches/register-rewrite/src/business/business-reports/easy-invoice.scm
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-reports/easy-invoice.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-reports/easy-invoice.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -473,7 +473,7 @@
 		(add-subtotal-row table used-columns tax-collector
 				  "grand-total" (_ "Tax")))
 
-	    (if (and show-payments lot)
+	    (if (and show-payments (not (null? lot)))
 		(let ((splits (sort-list!
 			       (gnc-lot-get-split-list lot)
 			       (lambda (s1 s2)
@@ -523,8 +523,8 @@
 			     (gnc:gnc-monetary-commodity (cdr entry-values))
 			     (gnc:gnc-monetary-amount (cdr entry-values)))
 
-	    (let ((order (gnc:entry-get-order current)))
-	      (if order (add-order order)))
+	    (let ((order (gncEntryGetOrder current)))
+	      (if (not (null? order)) (add-order order)))
 
 	    (do-rows-with-subtotals rest
 				    table
@@ -683,7 +683,7 @@
       (if (and references? (not (member o orders)))
 	  (addto! orders o)))
 
-    (if invoice
+    (if (not (null? invoice))
 	(begin
 	  (set! owner (gncInvoiceGetOwner invoice))
 	  (let ((type (gncOwnerGetType
@@ -707,7 +707,7 @@
 
     (add-html! document "<tr><td align='left'>")
 
-    (if invoice
+    (if (not (null? invoice))
       (begin
         ; invoice number and ID String table
         (add-html! document "<table width='100%'><tr>")

Modified: gnucash/branches/register-rewrite/src/business/business-reports/fancy-invoice.scm
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-reports/fancy-invoice.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-reports/fancy-invoice.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -500,7 +500,7 @@
 		(add-subtotal-row table used-columns tax-collector
 				  "grand-total" (_ "Tax")))
 
-	    (if (and show-payments lot)
+	    (if (and show-payments (not (null? lot)))
 		(let ((splits (sort-list!
 			       (gnc-lot-get-split-list lot)
 			       (lambda (s1 s2)
@@ -551,8 +551,8 @@
 			     (gnc:gnc-monetary-commodity (cdr entry-values))
 			     (gnc:gnc-monetary-amount (cdr entry-values)))
 
-	    (let ((order (gnc:entry-get-order current)))
-	      (if order (add-order order)))
+	    (let ((order (gncEntryGetOrder current)))
+	      (if (not (null? order)) (add-order order)))
 
 	    (set! entries-added (+ entries-added 1))
 	    
@@ -766,7 +766,7 @@
       (if (and references? (not (member o orders)))
 	  (addto! orders o)))
 
-    (if invoice
+    (if (not (null? invoice))
 	(begin
 	  (set! owner (gncInvoiceGetOwner invoice))
 	  (let ((type (gncOwnerGetType
@@ -784,7 +784,7 @@
     ;; invoice number moved below
     ;;(gnc:html-document-set-title! document title)
 
-    (if invoice
+    (if (not (null? invoice))
 	(let* ((book (gncInvoiceGetBook invoice))
 	      (slots (gnc-book-get-slots book))
 	      (date-object #f)

Modified: gnucash/branches/register-rewrite/src/business/business-reports/invoice.scm
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-reports/invoice.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-reports/invoice.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -437,7 +437,7 @@
 		(add-subtotal-row table used-columns tax-collector
 				  "grand-total" (_ "Tax")))
 
-	    (if (and show-payments lot)
+	    (if (and show-payments (not (null? lot)))
 		(let ((splits (sort-list!
 			       (gnc-lot-get-split-list lot)
 			       (lambda (s1 s2)
@@ -487,8 +487,8 @@
 			     (gnc:gnc-monetary-commodity (cdr entry-values))
 			     (gnc:gnc-monetary-amount (cdr entry-values)))
 
-	    (let ((order (gnc:entry-get-order current)))
-	      (if order (add-order order)))
+	    (let ((order (gncEntryGetOrder current)))
+	      (if (not (null? order)) (add-order order)))
 
 	    (do-rows-with-subtotals rest
 				    table
@@ -636,7 +636,7 @@
       (if (and references? (not (member o orders)))
 	  (addto! orders o)))
 
-    (if invoice
+    (if (not (null? invoice))
 	(begin
 	  (set! owner (gncInvoiceGetOwner invoice))
 	  (let ((type (gncOwnerGetType
@@ -653,7 +653,7 @@
 
     (gnc:html-document-set-title! document title)
 
-    (if invoice
+    (if (not (null? invoice))
 	(let ((book (gncInvoiceGetBook invoice)))
 	  (set! table (make-entry-table invoice
 					(gnc:report-options report-obj)

Modified: gnucash/branches/register-rewrite/src/business/business-reports/owner-report.scm
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-reports/owner-report.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-reports/owner-report.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -163,7 +163,7 @@
 	     (begin
 	       (if reverse?
 		   (set! bal (gnc-numeric-neg bal)))
-	       (if invoice
+	       (if (not (null? invoice))
 		   (begin
 		     (apply-invoice post-date bal))
 		   (apply-payment bal))))))
@@ -202,7 +202,7 @@
 	 (type-str
 	  (cond
 	   ((equal? type gnc:transaction-type-invoice)
-	    (if invoice
+	    (if (not (null? invoice))
 		(gnc:make-html-text
 		 (gnc:html-markup-anchor
 		  (gnc:invoice-anchor-text invoice)
@@ -255,7 +255,7 @@
 		    )))
 	  
 	  ; Now print out the invoice row
-	  (if invoice
+	  (if (not (null? invoice))
 	      (set! due-date (gncInvoiceGetDateDue invoice)))
 
 	  (let ((row (make-row date due-date (xaccTransGetNum txn)
@@ -575,7 +575,7 @@
                        (gnc:owner-anchor-text owner)
                        (gncOwnerGetName owner))))
 	  
-	  (if account
+	  (if (not (null? account))
 	      (begin
 		(set! table (make-txn-table (gnc:report-options report-obj)
 					    query account start-date end-date))
@@ -709,7 +709,7 @@
 
 (define (gnc:owner-report-create owner account)
   ; Figure out an account to use if nothing exists here.
-  (if (not account)
+  (if (null? account)
       (set! account (find-first-account-for-owner owner)))
 
   (owner-report-create owner account))
@@ -722,7 +722,7 @@
 	 (owner (gnc:owner-from-split split temp-owner))
 	 (res #f))
 
-    (if owner
+    (if (not (null? owner))
 	(set! res (gnc:owner-report-create owner account)))
 
     (gncOwnerDestroy temp-owner)

Modified: gnucash/branches/register-rewrite/src/business/business-utils/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-utils/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-utils/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -2,6 +2,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \

Modified: gnucash/branches/register-rewrite/src/business/business-utils/business-options.scm
===================================================================
--- gnucash/branches/register-rewrite/src/business/business-utils/business-options.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/business-utils/business-options.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -61,7 +61,7 @@
     (gnc:make-option
      section name sort-tag 'invoice documentation-string getter
      (lambda (invoice) ;; setter
-       (if (not invoice) (set! invoice (default-getter)))
+       (if (null? invoice) (set! invoice (default-getter)))
        (set! invoice (convert-to-invoice invoice))
        (let* ((result (validator invoice))
 	      (valid (car result))
@@ -122,7 +122,7 @@
     (gnc:make-option
      section name sort-tag 'customer documentation-string getter
      (lambda (customer)
-       (if (not customer) (set! customer (default-getter)))
+       (if (null? customer) (set! customer (default-getter)))
        (set! customer (convert-to-customer customer))
        (let* ((result (validator customer))
 	      (valid (car result))
@@ -183,7 +183,7 @@
     (gnc:make-option
      section name sort-tag 'vendor documentation-string getter
      (lambda (vendor)
-       (if (not vendor) (set! vendor (default-getter)))
+       (if (null? vendor) (set! vendor (default-getter)))
        (set! vendor (convert-to-vendor vendor))
        (let* ((result (validator vendor))
 	      (valid (car result))
@@ -244,7 +244,7 @@
     (gnc:make-option
      section name sort-tag 'employee documentation-string getter
      (lambda (employee)
-       (if (not employee) (set! employee (default-getter)))
+       (if (null? employee) (set! employee (default-getter)))
        (set! employee (convert-to-employee employee))
        (let* ((result (validator employee))
 	      (valid (car result))
@@ -343,7 +343,7 @@
       (gnc:make-option
        section name sort-tag 'owner documentation-string getter
        (lambda (owner)
-	 (if (not owner) (set! owner (default-getter)))
+	 (if (null? owner) (set! owner (default-getter)))
 	 (set! owner (convert-to-owner owner))
 	 (let* ((result (validator owner))
 		(valid (car result))
@@ -410,7 +410,7 @@
     (gnc:make-option
      section name sort-tag 'taxtable documentation-string getter
      (lambda (taxtable)
-       (if (not taxtable) (set! taxtable (default-getter)))
+       (if (null? taxtable) (set! taxtable (default-getter)))
        (set! taxtable (convert-to-taxtable taxtable))
        (let* ((result (validator taxtable))
 	      (valid (car result))

Modified: gnucash/branches/register-rewrite/src/business/dialog-tax-table/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/business/dialog-tax-table/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/business/dialog-tax-table/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -41,7 +41,7 @@
   ${EFENCE_LIBS}
 
 if BUILDING_FROM_SVN
-swig-dialog-tax-table.c: dialog-tax-table.i
+swig-dialog-tax-table.c: dialog-tax-table.i ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif

Modified: gnucash/branches/register-rewrite/src/calculation/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/calculation/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/calculation/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,6 +1,6 @@
 TESTS=test-link
 
-noinst_PROGRAMS=test-link
+check_PROGRAMS=test-link
 
 test_link_SOURCES=test-link.c
 test_link_LDADD= \

Modified: gnucash/branches/register-rewrite/src/core-utils/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/core-utils/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/core-utils/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -26,7 +26,7 @@
   gnc-gtk-utils.h
 
 if BUILDING_FROM_SVN
-swig-core-utils.c: core-utils.i
+swig-core-utils.c: core-utils.i ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif

Modified: gnucash/branches/register-rewrite/src/core-utils/gnc-gobject-utils.c
===================================================================
--- gnucash/branches/register-rewrite/src/core-utils/gnc-gobject-utils.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/core-utils/gnc-gobject-utils.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -39,7 +39,7 @@
 
 /** Get a pointer to the hash table used by the tracking database.  If
  *  the hash table doesn't exist, it will be created.  If gnucash was
- *  compiled iwh --enable-ref-count-dumps, this funtion is also the
+ *  compiled with --enable-ref-count-dumps, this funtion is also the
  *  point where the gnc_gobject_tracking_dump() function is registered
  *  to be called the GTK exits.
  *

Modified: gnucash/branches/register-rewrite/src/engine/Account.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/Account.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/Account.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -315,18 +315,18 @@
 	qof_begin_edit(&acc->inst);
 }
 
-static inline void on_done(QofInstance *inst) 
+static void on_done(QofInstance *inst) 
 {
     /* old event style */
     qof_event_gen (&inst->entity, QOF_EVENT_MODIFY, NULL);
 }
 
-static inline void on_err (QofInstance *inst, QofBackendError errcode)
+static void on_err (QofInstance *inst, QofBackendError errcode)
 {
   PERR("commit error: %d", errcode);
 }
 
-static inline void acc_free (QofInstance *inst)
+static void acc_free (QofInstance *inst)
 {
   Account *acc = (Account *) inst;
   xaccGroupRemoveAccount(acc->parent, acc);

Modified: gnucash/branches/register-rewrite/src/engine/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/engine/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -7,6 +7,7 @@
 	-I${top_srcdir}/lib/libc \
 	-I${top_srcdir}/src/core-utils \
 	-I${top_srcdir}/src \
+	-I${top_builddir}/src \
 	-I${top_srcdir}/src/gnc-module \
 	-I${top_srcdir}/src/business/business-core/ \
 	${QOF_CFLAGS} \
@@ -168,7 +169,8 @@
 noinst_DATA = .scm-links
 
 if BUILDING_FROM_SVN
-swig-engine.c: engine.i ${gncinclude_HEADERS} ${noinst_HEADERS}
+swig-engine.c: engine.i ${top_srcdir}/src/base-typemaps.i \
+               ${gncinclude_HEADERS} ${noinst_HEADERS}
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/lib/libqof/qof -I${top_srcdir}/src -o $@ $<
 endif
@@ -180,11 +182,7 @@
 gncla-dir.h: gncla-dir.h.in ${top_builddir}/config.status Makefile
 	rm -f $@.tmp
 	sed < $< > $@.tmp \
-		-e 's#@-LOCALE_DIR-@#${LOCALE_DIR}#g' \
-		-e 's#@-GNC_ACCOUNTS_DIR-@#${GNC_ACCOUNTS_DIR}#g' \
-		-e 's#@-GNC_GLADE_DIR-@#${GNC_GLADE_DIR}#g' \
-		-e 's#@-GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY-@#${GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY}#g' \
-		-e 's#@-pkglibdir-@#${pkglibdir}#g' \
+		-e 's#@-DATADIRNAME-@#${DATADIRNAME}#g' \
 		-e 's#@-libdir-@#${libdir}#g' \
 		-e 's#@-sysconfdir-@#${sysconfdir}#g' \
 		-e 's#@-datadir-@#${datadir}#g' \

Modified: gnucash/branches/register-rewrite/src/engine/SchedXaction.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/SchedXaction.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/SchedXaction.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -186,12 +186,12 @@
   qof_begin_edit (&sx->inst);
 }
 
-static inline void commit_err (QofInstance *inst, QofBackendError errcode)
+static void commit_err (QofInstance *inst, QofBackendError errcode)
 {
   PERR ("Failed to commit: %d", errcode);
 }
 
-static inline void noop (QofInstance *inst) {}
+static void noop (QofInstance *inst) {}
 
 void
 gnc_sx_commit_edit (SchedXaction *sx)

Modified: gnucash/branches/register-rewrite/src/engine/Split.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/Split.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/Split.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1066,11 +1066,20 @@
     const Split *osplit = xaccSplitGetOtherSplit (split);
 
     if (osplit)
-        g_assert(gnc_commodity_equal(
-                     to_commodity, 
-                     xaccAccountGetCommodity(xaccSplitGetAccount(osplit))));
-    if (osplit)
-      return gnc_numeric_neg (xaccSplitGetAmount (osplit));
+    {
+        gnc_commodity* split_comm =
+                     xaccAccountGetCommodity(xaccSplitGetAccount(osplit));
+        if (!gnc_commodity_equal(to_commodity, split_comm))
+	{
+          PERR("The split's (%s) amount can't be converted from %s into %s.",
+               guid_to_string(xaccSplitGetGUID(osplit)),
+               gnc_commodity_get_mnemonic(split_comm),
+               gnc_commodity_get_mnemonic(to_commodity)
+               );
+          return gnc_numeric_zero();
+        }
+        return gnc_numeric_neg (xaccSplitGetAmount (osplit));
+    }
   }
 
   /* ... otherwise, we need to compute the amount from the conversion

Modified: gnucash/branches/register-rewrite/src/engine/TransLog.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/TransLog.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/TransLog.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -50,7 +50,7 @@
  *       No, using a perl script to analyze a file that's supposed to
  *       be human readable is not a contradication in terms -- that's 
  *       exactly the point.
- * (2.b) Use tabs as a human freindly field separator; its also a 
+ * (2.b) Use tabs as a human friendly field separator; its also a 
  *       character that does not (should not) appear naturally anywhere 
  *       in the data, as it serves no formatting purpose in the current 
  *       GUI design.  (hack alert -- this is not currently tested for 

Modified: gnucash/branches/register-rewrite/src/engine/binreloc.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/binreloc.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/binreloc.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -590,39 +590,6 @@
 }
 
 
-/** Locate the application's localization folder.
- *
- * The path is generated by the following pseudo-code evaluation:
- * \code
- * prefix + "/share/locale"
- * \endcode
- *
- * @param default_locale_dir  A default path which will used as fallback.
- * @return A string containing the localization folder's path, which must be freed when
- *         no longer necessary. If BinReloc is not initialized, or if the
- *         initialization function failed, then a copy of default_locale_dir will be returned.
- *         If default_locale_dir is NULL, then NULL will be returned.
- */
-gchar *
-gbr_find_locale_dir (const gchar *default_locale_dir)
-{
-	gchar *data_dir, *dir;
-
-	data_dir = gbr_find_data_dir (NULL);
-	if (data_dir == NULL) {
-		/* BinReloc not initialized. */
-		if (default_locale_dir != NULL)
-			return g_strdup (default_locale_dir);
-		else
-			return NULL;
-	}
-
-	dir = g_build_filename (data_dir, "locale", NULL);
-	g_free (data_dir);
-	return dir;
-}
-
-
 /** Locate the application's library folder.
  *
  * The path is generated by the following pseudo-code evaluation:

Modified: gnucash/branches/register-rewrite/src/engine/binreloc.h
===================================================================
--- gnucash/branches/register-rewrite/src/engine/binreloc.h	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/binreloc.h	2007-01-05 23:51:55 UTC (rev 15316)
@@ -41,7 +41,6 @@
 	#define gbr_find_bin_dir     ffEt66859784967989_gbr_find_bin_dir
 	#define gbr_find_sbin_dir    ffEt66859784967989_gbr_find_sbin_dir
 	#define gbr_find_data_dir    ffEt66859784967989_gbr_find_data_dir
-	#define gbr_find_locale_dir  ffEt66859784967989_gbr_find_locale_dir
 	#define gbr_find_lib_dir     ffEt66859784967989_gbr_find_lib_dir
 	#define gbr_find_libexec_dir ffEt66859784967989_gbr_find_libexec_dir
 	#define gbr_find_etc_dir     ffEt66859784967989_gbr_find_etc_dir
@@ -57,7 +56,6 @@
 gchar   *gbr_find_bin_dir     (const gchar *default_bin_dir);
 gchar   *gbr_find_sbin_dir    (const gchar *default_sbin_dir);
 gchar   *gbr_find_data_dir    (const gchar *default_data_dir);
-gchar   *gbr_find_locale_dir  (const gchar *default_locale_dir);
 gchar   *gbr_find_lib_dir     (const gchar *default_lib_dir);
 gchar   *gbr_find_libexec_dir (const gchar *default_libexec_dir);
 gchar   *gbr_find_etc_dir     (const gchar *default_etc_dir);

Modified: gnucash/branches/register-rewrite/src/engine/engine-interface.scm
===================================================================
--- gnucash/branches/register-rewrite/src/engine/engine-interface.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/engine-interface.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -111,7 +111,7 @@
 ;; status and date are not copied. The C split's guid is,
 ;; of course, unchanged.
 (define (gnc:split-scm-onto-split split-scm split book)
-  (if (not split)
+  (if (null? split)
       #f
       (begin
         (let ((memo     (gnc:split-scm-get-memo split-scm))
@@ -125,7 +125,7 @@
         (let ((account (xaccAccountLookup
                         (gnc:split-scm-get-account-guid split-scm)
                         book)))
-          (if account
+          (if (not (null? account))
               (begin
                 (xaccAccountBeginEdit account)
                 (xaccSplitSetAccount split account)
@@ -242,7 +242,7 @@
 ;; used to use alternate account guids when creating splits.
 (define (gnc:transaction-scm-onto-transaction trans-scm trans guid-mapping
                                               commit? book)
-  (if (not trans)
+  (if (null? trans)
       #f
       (begin
         ;; open the transaction for editing

Modified: gnucash/branches/register-rewrite/src/engine/gnc-budget.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gnc-budget.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/gnc-budget.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -49,7 +49,7 @@
     guint  num_periods;
 };
 
-static inline void commit_err (QofInstance *inst, QofBackendError errcode)
+static void commit_err (QofInstance *inst, QofBackendError errcode)
 {
   PERR ("Failed to commit: %d", errcode);
 }
@@ -75,7 +75,7 @@
     g_free(budget);
 }
 
-static inline void noop (QofInstance *inst) {}
+static void noop (QofInstance *inst) {}
 
 static void
 gnc_budget_begin_edit(GncBudget *bgt)

Modified: gnucash/branches/register-rewrite/src/engine/gnc-commodity.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gnc-commodity.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/gnc-commodity.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -480,12 +480,12 @@
   qof_begin_edit(&cm->inst);
 }
 
-static inline void commit_err (QofInstance *inst, QofBackendError errcode)
+static void commit_err (QofInstance *inst, QofBackendError errcode)
 {
   PERR ("Failed to commit: %d", errcode);
 }
 
-static inline void noop (QofInstance *inst) {}
+static void noop (QofInstance *inst) {}
 
 void
 gnc_commodity_commit_edit (gnc_commodity *cm)

Modified: gnucash/branches/register-rewrite/src/engine/gnc-lot.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gnc-lot.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/gnc-lot.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -108,12 +108,12 @@
   qof_begin_edit(&lot->inst);
 }
 
-static inline void commit_err (QofInstance *inst, QofBackendError errcode)
+static void commit_err (QofInstance *inst, QofBackendError errcode)
 {
   PERR ("Failed to commit: %d", errcode);
 }
 
-static inline void noop (QofInstance *inst) {}
+static void noop (QofInstance *inst) {}
 
 void
 gnc_lot_commit_edit (GNCLot *lot)

Modified: gnucash/branches/register-rewrite/src/engine/gnc-path.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gnc-path.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/gnc-path.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -100,8 +100,11 @@
  * @returns A newly allocated string. */
 gchar *gnc_path_get_localedir()
 {
-  //printf("Returning localedir %s\n", gbr_find_locale_dir (LOCALE_DIR));
-  return gbr_find_locale_dir (LOCALE_DIR);
+  gchar *prefix = gnc_path_get_prefix();
+  gchar *result = g_build_filename (prefix, LOCALE_DATADIRNAME, "locale", (char*)NULL);
+  g_free (prefix);
+  //printf("Returning localedir %s\n", result);
+  return result;
 }
 
 /** Returns the glade file path, usually
@@ -121,11 +124,23 @@
  * "$prefix/etc/gconf/gconf.xml.defaults".
  *
  * @returns A newly allocated string. */
-gchar *gnc_path_get_gconfdir()
+gchar *gnc_path_get_gconfdir(gboolean force_slashes)
 {
   gchar *sysconfdir = gbr_find_etc_dir (SYSCONFDIR);
-  gchar *result = g_build_filename (sysconfdir, "gconf", 
-				    "gconf.xml.defaults", (char*)NULL);
+  gchar *separator = G_DIR_SEPARATOR_S;
+  gchar *result;
+
+  if (force_slashes) {
+    gchar **splitted;
+    splitted = g_strsplit (sysconfdir, "\\", -1);
+    g_free (sysconfdir);
+    sysconfdir = g_strjoinv ("/", splitted);
+    g_strfreev (splitted);
+    separator = "/";
+  }
+
+  result = g_build_path (separator, sysconfdir, "gconf", "gconf.xml.defaults",
+			 (gchar*)NULL);
   g_free (sysconfdir);
   //printf("Returning gconfdir %s\n", result);
   return result;

Modified: gnucash/branches/register-rewrite/src/engine/gnc-path.h
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gnc-path.h	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/gnc-path.h	2007-01-05 23:51:55 UTC (rev 15316)
@@ -77,8 +77,11 @@
 /** Returns the gconf schema config source path, usually
  * "$prefix/etc/gconf/gconf.xml.defaults".
  *
+ * @param force_slashes Use slashes as separator of the elements
+ * of the path.
+ *
  * @returns A newly allocated string. */
-gchar *gnc_path_get_gconfdir(void);
+gchar *gnc_path_get_gconfdir(gboolean force_slashes);
 
 
 

Modified: gnucash/branches/register-rewrite/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gnc-pricedb.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/gnc-pricedb.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -142,12 +142,12 @@
   QOF_BEGIN_EDIT (&p->inst);
 }
 
-static inline void commit_err (QofInstance *inst, QofBackendError errcode)
+static void commit_err (QofInstance *inst, QofBackendError errcode)
 {
   PERR ("Failed to commit: %d", errcode);
 }
 
-static inline void noop (QofInstance *inst) {}
+static void noop (QofInstance *inst) {}
 
 void
 gnc_price_commit_edit (GNCPrice *p)

Modified: gnucash/branches/register-rewrite/src/engine/gncla-dir.h.in
===================================================================
--- gnucash/branches/register-rewrite/src/engine/gncla-dir.h.in	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/gncla-dir.h.in	2007-01-05 23:51:55 UTC (rev 15316)
@@ -28,10 +28,5 @@
 #define SYSCONFDIR "@-sysconfdir-@"
 
 #define LIBDIR "@-libdir-@"
-#define PKGLIBDIR "@-pkglibdir-@"
 
-#define LOCALE_DIR  "@-LOCALE_DIR-@"
-
-#define GNC_ACCOUNTS_DIR "@-GNC_ACCOUNTS_DIR-@"
-#define GNC_GLADE_DIR "@-GNC_GLADE_DIR-@"
-#define GNC_GCONF_DIR "@-GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY-@"
+#define LOCALE_DATADIRNAME "@-DATADIRNAME-@"

Modified: gnucash/branches/register-rewrite/src/engine/kvp-scm.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/kvp-scm.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/kvp-scm.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -23,14 +23,18 @@
 KvpValue *
 gnc_scm_to_kvp_value_ptr(SCM val)
 {
-    if(SCM_EXACTP (val) && gnc_gh_gint64_p(val))
+    if(SCM_NUMBERP(val))
     {
-        return kvp_value_new_gint64(gnc_scm_to_gint64(val));
+        /* in guile 1.8 (exact? ) only works on numbers */
+        if(SCM_EXACTP (val) && gnc_gh_gint64_p(val))
+        {
+            return kvp_value_new_gint64(gnc_scm_to_gint64(val));
+        }
+        else 
+        {
+            return kvp_value_new_double(scm_num2dbl(val, __FUNCTION__));
+        }
     }
-    else if(SCM_NUMBERP(val))
-    {
-        return kvp_value_new_double(scm_num2dbl(val, __FUNCTION__));
-    }
     else if(gnc_numeric_p(val))
     {
         return kvp_value_new_gnc_numeric(gnc_scm_to_numeric(val));

Modified: gnucash/branches/register-rewrite/src/engine/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -61,7 +61,7 @@
   SRCDIR=${srcdir} \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-link \
   test-commodities \
   test-date \

Modified: gnucash/branches/register-rewrite/src/engine/test/test-book-merge.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-book-merge.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-book-merge.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -472,5 +472,5 @@
 	test_merge();
 	print_test_results();
 	qof_close();
-	return 0;
+	return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-group-vs-book.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-group-vs-book.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-group-vs-book.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -175,5 +175,5 @@
   print_test_results();
 	}
 	qof_close();
-  return 0;
+  return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-guid.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-guid.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-guid.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -90,5 +90,5 @@
 		print_test_results();
 	}
 	qof_close();
-  return 0;
+  return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-load-engine.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-load-engine.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-load-engine.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -43,5 +43,5 @@
 		print_test_results();
 	}
 	qof_close();
-  return 0;
+  return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-lots.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-lots.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-lots.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -97,5 +97,5 @@
     print_test_results();
 
     qof_close();
-    return 0;
+    return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-numeric.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-numeric.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-numeric.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -54,19 +54,21 @@
 
 /* ======================================================= */
 
+#define check_unary_op(eq,ex,a,i,e) check_unary_op_r(eq,ex,a,i,e,__LINE__)
 static void
-check_unary_op (gboolean (*eqtest) (gnc_numeric, gnc_numeric), 
-                gnc_numeric expected, 
-                gnc_numeric actual, 
-                gnc_numeric input, 
-                const char * errmsg)
+check_unary_op_r (gboolean (*eqtest) (gnc_numeric, gnc_numeric), 
+		  gnc_numeric expected, 
+		  gnc_numeric actual, 
+		  gnc_numeric input, 
+		  const char * errmsg,
+		  int line)
 {
 	char *e = gnc_numeric_print (expected);
 	char *r = gnc_numeric_print (actual);
 	char *a = gnc_numeric_print (input);
 	char *str = g_strdup_printf (errmsg, e,r, a);
 	
-	do_test (eqtest(expected, actual), str);
+	do_test_call (eqtest(expected, actual), str, __FILE__, line);
 	
 	g_free (a);
 	g_free (r);
@@ -76,12 +78,14 @@
 
 /* ======================================================= */
 
+#define check_binary_op(ex,a,ia,ib,e) check_binary_op_r(ex,a,ia,ib,e,__LINE__)
 static void
-check_binary_op (gnc_numeric expected, 
-                 gnc_numeric actual, 
-                 gnc_numeric input_a, 
-                 gnc_numeric input_b, 
-                 const char * errmsg)
+check_binary_op_r (gnc_numeric expected, 
+		   gnc_numeric actual, 
+		   gnc_numeric input_a, 
+		   gnc_numeric input_b, 
+		   const char * errmsg,
+		   int line)
 {
 	char *e = gnc_numeric_print (expected);
 	char *r = gnc_numeric_print (actual);
@@ -89,7 +93,7 @@
 	char *b = gnc_numeric_print (input_b);
 	char *str = g_strdup_printf (errmsg, e,r,a,b);
 	
-	do_test (gnc_numeric_eq(expected, actual), str);
+	do_test_call (gnc_numeric_eq(expected, actual), str, __FILE__, line);
 	
 	g_free (a);
 	g_free (b);
@@ -864,7 +868,7 @@
 		print_test_results();
 	}
 	qof_close();
-  return 0;
+  return get_rv();
 }
 
 /* ======================== END OF FILE ====================== */

Modified: gnucash/branches/register-rewrite/src/engine/test/test-object.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-object.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-object.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -154,5 +154,5 @@
 		print_test_results();
 	}
 	qof_close();
-  return 0;
+  return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-period.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-period.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-period.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -151,5 +151,5 @@
         print_test_results();
     }
     qof_close();
-    return 0;
+    return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-query.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-query.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-query.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -110,5 +110,5 @@
 
  cleanup:
   qof_close();
-  return 0;
+  return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-querynew.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-querynew.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-querynew.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -100,5 +100,5 @@
 	}
 	qof_close();
   print_test_results();
-  return 0;
+  return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-split-vs-account.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-split-vs-account.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-split-vs-account.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -71,5 +71,5 @@
         print_test_results();
     }
     qof_close();
-    return 0;
+    return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-transaction-reversal.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-transaction-reversal.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-transaction-reversal.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -123,5 +123,5 @@
   print_test_results();
 	}
 	qof_close();
-  return 0;
+  return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test/test-transaction-voiding.c
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test/test-transaction-voiding.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test/test-transaction-voiding.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -202,5 +202,5 @@
   print_test_results();
 	}
 	qof_close();
-  return 0;
+  return get_rv();
 }

Modified: gnucash/branches/register-rewrite/src/engine/test-core/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/engine/test-core/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/engine/test-core/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,4 +1,4 @@
-noinst_LTLIBRARIES=libgncmod-test-engine.la
+check_LTLIBRARIES=libgncmod-test-engine.la
 
 LDADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \

Modified: gnucash/branches/register-rewrite/src/gnc-module/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-module/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-module/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -28,7 +28,7 @@
 noinst_DATA = .scm-links
 
 if BUILDING_FROM_SVN
-swig-gnc-module.c: gnc-module.i
+swig-gnc-module.c: gnc-module.i ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif

Modified: gnucash/branches/register-rewrite/src/gnc-module/gnc-module.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-module/gnc-module.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-module/gnc-module.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -313,11 +313,11 @@
       lt_ptr initfunc    = lt_dlsym(handle, "gnc_module_init");
       lt_ptr pathfunc    = lt_dlsym(handle, "gnc_module_path");
       lt_ptr descripfunc = lt_dlsym(handle, "gnc_module_description");
-      lt_ptr interface   = lt_dlsym(handle, "gnc_module_current");
+      lt_ptr iface       = lt_dlsym(handle, "gnc_module_current");
       lt_ptr revision    = lt_dlsym(handle, "gnc_module_revision");
       lt_ptr age         = lt_dlsym(handle, "gnc_module_age");
       
-      if (!(initfunc && pathfunc && descripfunc && interface &&
+      if (!(initfunc && pathfunc && descripfunc && iface &&
             revision && age)) {
           g_warning ("module '%s' does not match module signature\n",
                      fullpath);
@@ -333,7 +333,7 @@
           info->module_path        = f_path();
           info->module_description = f_descrip();
           info->module_filepath    = g_strdup(fullpath);
-          info->module_interface   = *(int *)interface;
+          info->module_interface   = *(int *)iface;
           info->module_age         = *(int *)age;
           info->module_revision    = *(int *)revision;
           //printf("(init) closing %s\n", fullpath);
@@ -350,7 +350,7 @@
  *************************************************************/
 
 static GNCModuleInfo * 
-gnc_module_locate(const gchar * module_name, int interface) 
+gnc_module_locate(const gchar * module_name, int iface) 
 {
   GNCModuleInfo * best    = NULL;
   GNCModuleInfo * current = NULL;
@@ -365,8 +365,8 @@
   {
     current = lptr->data;
     if(!strcmp(module_name, current->module_path) &&
-       (interface >= (current->module_interface - current->module_age)) &&
-       (interface <= current->module_interface)) 
+       (iface >= (current->module_interface - current->module_age)) &&
+       (iface <= current->module_interface)) 
     {
       if(best) 
       {
@@ -397,9 +397,9 @@
 }
 
 static GNCLoadedModule * 
-gnc_module_check_loaded(const char * module_name, gint interface) 
+gnc_module_check_loaded(const char * module_name, gint iface) 
 {
-  GNCModuleInfo * modinfo = gnc_module_locate(module_name, interface);
+  GNCModuleInfo * modinfo = gnc_module_locate(module_name, iface);
   GList * modules = NULL;
   GList * p = NULL;
   GNCLoadedModule * rv = NULL;
@@ -438,7 +438,7 @@
  *************************************************************/
 
 static GNCModule 
-gnc_module_load_common(char * module_name, gint interface, gboolean optional)
+gnc_module_load_common(char * module_name, gint iface, gboolean optional)
 {
 
   GNCLoadedModule * info;
@@ -448,7 +448,7 @@
     gnc_module_system_init();
   }
   
-  info = gnc_module_check_loaded(module_name, interface);
+  info = gnc_module_check_loaded(module_name, iface);
   
   /* if the module's already loaded, just increment its use count.
    * otherwise, load it and check for the initializer
@@ -478,7 +478,7 @@
   }
   else 
   {
-    GNCModuleInfo * modinfo = gnc_module_locate(module_name, interface);
+    GNCModuleInfo * modinfo = gnc_module_locate(module_name, iface);
     lt_dlhandle   handle = NULL;
     
     //if(modinfo) 
@@ -526,7 +526,7 @@
       g_warning ("Failed to open module %s", module_name);
       if(modinfo) printf(": %s\n", lt_dlerror());
       else g_warning (": could not locate %s interface v.%d\n",
-                      module_name, interface);
+                      module_name, iface);
       return NULL;
     }
     return NULL;
@@ -535,15 +535,15 @@
 
 
 GNCModule 
-gnc_module_load(char * module_name, gint interface) 
+gnc_module_load(char * module_name, gint iface) 
 {
-  return gnc_module_load_common(module_name, interface, FALSE);
+  return gnc_module_load_common(module_name, iface, FALSE);
 }
 
 GNCModule 
-gnc_module_load_optional(char * module_name, gint interface) 
+gnc_module_load_optional(char * module_name, gint iface) 
 {
-  return gnc_module_load_common(module_name, interface, TRUE);
+  return gnc_module_load_common(module_name, iface, TRUE);
 }
 
 /*************************************************************

Modified: gnucash/branches/register-rewrite/src/gnc-module/gnc-module.h
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-module/gnc-module.h	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-module/gnc-module.h	2007-01-05 23:51:55 UTC (rev 15316)
@@ -25,8 +25,8 @@
  * module_name is not a const gchar?! It certainly should be const
  * (because of passing string literals), and from a quick glance it is
  * also only used in a const way. */
-GNCModule       gnc_module_load(gchar * module_name, gint interface);
-GNCModule       gnc_module_load_optional(gchar * module_name, gint interface);
+GNCModule       gnc_module_load(gchar * module_name, gint iface);
+GNCModule       gnc_module_load_optional(gchar * module_name, gint iface);
 int             gnc_module_unload(GNCModule mod);
 
 #endif

Modified: gnucash/branches/register-rewrite/src/gnc-module/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-module/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-module/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,6 +1,8 @@
 SUBDIRS = mod-foo mod-bar mod-baz misc-mods
 
-LDADD = ../libgncmodule.la ${GLIB_LIBS} -lltdl ${GUILE_LIBS}
+LDADD = ../libgncmodule.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
+  ${GLIB_LIBS} -lltdl ${GUILE_LIBS}
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
@@ -23,6 +25,7 @@
   test-scm-init
 
 GNC_TEST_DEPS := \
+  --gnc-module-dir ${top_builddir}/src/core-utils \
   --gnc-module-dir ${top_builddir}/src/gnc-module \
   --gnc-module-dir ${top_builddir}/src/gnc-module/test/mod-foo \
   --gnc-module-dir ${top_builddir}/src/gnc-module/test/mod-bar \
@@ -37,7 +40,7 @@
 TESTS_ENVIRONMENT := \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-load-c \
   test-modsysver \
   test-incompatdep \

Modified: gnucash/branches/register-rewrite/src/gnc-module/test/misc-mods/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-module/test/misc-mods/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-module/test/misc-mods/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -7,25 +7,22 @@
 LDADD = -L../.. -L../../.libs
 
 PWD := $(shell pwd)
-checklibdir=${PWD}
-checklib_LTLIBRARIES=libfuturemodsys.la libincompatdep.la libagedver.la
+check_LTLIBRARIES=libfuturemodsys.la libincompatdep.la libagedver.la
 
 libfuturemodsys_la_SOURCES=futuremodsys.c
+libfuturemodsys_la_LDFLAGS=-rpath ${PWD}
 libfuturemodsys_la_LIBADD = \
   $(GLIB_LIBS)
 
 libincompatdep_la_SOURCES=incompatdep.c
-libincompatdep_la_LDFLAGS=-module
+libincompatdep_la_LDFLAGS=-module -rpath ${PWD}
 libincompatdep_la_LIBADD = \
   ../../libgncmodule.la \
   $(GLIB_LIBS)
 
 libagedver_la_SOURCES=agedver.c
+libagedver_la_LDFLAGS=-rpath ${PWD}
 libagedver_la_LIBADD = \
   $(GLIB_LIBS)
 
 CLEANFILES = *.so* *.a
-
-# Keep automake from generating install targets for test libs
-install-checklibLTLIBRARIES:
-uninstall-checklibLTLIBRARIES:

Modified: gnucash/branches/register-rewrite/src/gnc-module/test/mod-bar/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-module/test/mod-bar/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-module/test/mod-bar/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -5,10 +5,10 @@
   ${GLIB_CFLAGS}
 
 PWD := $(shell pwd)
-checklibdir=${PWD}
-checklib_LTLIBRARIES = libbar.la libgncmodbar.la
+check_LTLIBRARIES = libbar.la libgncmodbar.la
 
 libbar_la_SOURCES = bar.c
+libbar_la_LDFLAGS = -rpath ${PWD}
 
 # Make swig-bar.c for dist. It is an automatic dependency
 # of gnc-mod-bar.c
@@ -17,7 +17,7 @@
   swig-bar.c
 
 libgncmodbar_la_SOURCES=gnc-mod-bar.c
-
+libgncmodbar_la_LDFLAGS=-rpath ${PWD}
 libgncmodbar_la_LIBADD=libbar.la \
   $(GUILE_LIBS) \
   $(GLIB_LIBS)
@@ -33,7 +33,3 @@
 
 BUILT_SOURCES = swig-bar.c
 MAINTAINERCLEANFILES = swig-bar.c
-
-# Keep automake from generating install targets for test libs
-install-checklibLTLIBRARIES:
-uninstall-checklibLTLIBRARIES:

Modified: gnucash/branches/register-rewrite/src/gnc-module/test/mod-baz/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-module/test/mod-baz/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-module/test/mod-baz/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -6,10 +6,10 @@
   ${GUILE_INCS}
 
 PWD := $(shell pwd)
-checklibdir = ${PWD}
-checklib_LTLIBRARIES = libbaz.la libgncmodbaz.la
+check_LTLIBRARIES = libbaz.la libgncmodbaz.la
 
 libbaz_la_SOURCES = baz.c
+libbaz_la_LDFLAGS = -rpath ${PWD}
 libbaz_la_LIBADD = ../mod-foo/libfoo.la
 
 # Make swig-baz.c for dist. It is an automatic dependency
@@ -19,7 +19,7 @@
   swig-baz.c
 
 libgncmodbaz_la_SOURCES = gnc-mod-baz.c
-
+libgncmodbaz_la_LDFLAGS = -rpath ${PWD}
 libgncmodbaz_la_LIBADD = \
   libbaz.la \
   ../../libgncmodule.la \
@@ -37,7 +37,3 @@
 
 BUILT_SOURCES = swig-baz.c
 MAINTAINERCLEANFILES = swig-baz.c
-
-# Keep automake from generating install targets for test libs
-install-checklibLTLIBRARIES:
-uninstall-checklibLTLIBRARIES:

Modified: gnucash/branches/register-rewrite/src/gnc-module/test/mod-foo/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-module/test/mod-foo/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-module/test/mod-foo/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -5,10 +5,10 @@
   ${GLIB_CFLAGS}
 
 PWD := $(shell pwd)
-checklibdir=${PWD}
-checklib_LTLIBRARIES=libfoo.la libgncmodfoo.la
+check_LTLIBRARIES=libfoo.la libgncmodfoo.la
 
 libfoo_la_SOURCES = foo.c
+libfoo_la_LDFLAGS = -rpath ${PWD}
 
 # Make swig-foo.c for dist. It is an automatic dependency
 # of gnc-mod-foo.c
@@ -17,7 +17,7 @@
   swig-foo.c
 
 libgncmodfoo_la_SOURCES = gnc-mod-foo.c
-
+libgncmodfoo_la_LDFLAGS = -rpath ${PWD}
 libgncmodfoo_la_LIBADD = \
   libfoo.la \
   $(GUILE_LIBS) \
@@ -34,7 +34,3 @@
 
 BUILT_SOURCES = swig-foo.c
 MAINTAINERCLEANFILES = swig-foo.c
-
-# Keep automake from generating install targets for test libs
-install-checklibLTLIBRARIES:
-uninstall-checklibLTLIBRARIES:

Modified: gnucash/branches/register-rewrite/src/gnc-test-env
===================================================================
--- gnucash/branches/register-rewrite/src/gnc-test-env	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnc-test-env	2007-01-05 23:51:55 UTC (rev 15316)
@@ -104,6 +104,14 @@
 		    (string-append ":" dir ":" dir "/.libs"))
 		  (append gnc-module-dirs library-dirs)))))
 
+(display " DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}")
+(display (adapt-dirsep
+	  (apply string-append
+		 (map
+		  (lambda (dir)
+		    (string-append ":" dir ":" dir "/.libs"))
+		  (append gnc-module-dirs library-dirs)))))
+
 (display " LTDL_LIBRARY_PATH=${LTDL_LIBRARY_PATH}")
 (display (apply string-append
                 (map
@@ -126,6 +134,7 @@
       (display " export GNC_MODULE_PATH;")
       (display " export GUILE_LOAD_PATH;")
       (display " export LD_LIBRARY_PATH;")
+      (display " export DYLD_LIBRARY_PATH;")
       (display " export LTDL_LIBRARY_PATH;")))
 
 ;; Local Variables:

Modified: gnucash/branches/register-rewrite/src/gnome/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -93,7 +93,7 @@
   window-reconcile.h
 
 if BUILDING_FROM_SVN
-swig-gnome.c: gnome.i dialog-progress.h
+swig-gnome.c: gnome.i dialog-progress.h ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif
@@ -104,6 +104,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/calculation \
   -I${top_srcdir}/src/engine \

Modified: gnucash/branches/register-rewrite/src/gnome/dialog-sxsincelast.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/dialog-sxsincelast.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/dialog-sxsincelast.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -151,21 +151,21 @@
 
 /**
  * The states a to-be-created SX can be in...
- * TO_CREATE   : The SX is ready to be created, depending on variable-binding
+ * SX_TO_CREATE : The SX is ready to be created, depending on variable-binding
  *               requirements.
- * IGNORE      : Drop the SX on the floor forever.
- * POSTPONE    : Bring this SX up in the future, but we're not going to
+ * SX_IGNORE   : Drop the SX on the floor forever.
+ * SX_POSTPONE : Bring this SX up in the future, but we're not going to
  *               create it right now.
- * [MAX_STATE] : The maximum real value.
- * UNDEF       : Only used for prevState, to indicate that we haven't
+ * SX_[MAX_STATE] : The maximum real value.
+ * SX_UNDEF     : Only used for prevState, to indicate that we haven't
  *               processed this instance, yet.
  **/
 typedef enum {
-        TO_CREATE,
-        IGNORE,
-        POSTPONE,
-        MAX_STATE,
-        UNDEF
+        SX_TO_CREATE,
+        SX_IGNORE,
+        SX_POSTPONE,
+        SX_MAX_STATE,
+        SX_UNDEF
 } ToCreateState;
 
 typedef struct toCreateTuple_ {
@@ -1141,17 +1141,17 @@
 
         /* Undo the previous work. */
         switch ( tci->prevState ) {
-        case IGNORE:
+        case SX_IGNORE:
                 switch ( tci->state ) {
-                case IGNORE:
+                case SX_IGNORE:
                         /* Keep ignoring. */
                         break;
-                case POSTPONE:
+                case SX_POSTPONE:
                         /* remove from postponed list. */
                         gnc_sx_remove_defer_instance( tci->parentTCT->sx,
                                                       tci->sxStateData );
                         break;
-                case TO_CREATE:
+                case SX_TO_CREATE:
                         /* del prev txns. */
                         sxsld_revert_to_create_txns( sxsld, tci );
                         break;
@@ -1159,20 +1159,20 @@
                         g_assert( FALSE );
                 }
                 break;
-        case POSTPONE:
-                if ( tci->state != POSTPONE ) {
+        case SX_POSTPONE:
+                if ( tci->state != SX_POSTPONE ) {
                         /* remove from postponed list. */
                         gnc_sx_remove_defer_instance( tci->parentTCT->sx,
                                                       tci->sxStateData );
                 }
                 break;
-        case TO_CREATE:
-                if ( tci->state != TO_CREATE ) {
+        case SX_TO_CREATE:
+                if ( tci->state != SX_TO_CREATE ) {
                         /* del prev txns. */
                         sxsld_revert_to_create_txns( sxsld, tci );
                 }
                 break;
-        case UNDEF:
+        case SX_UNDEF:
                 /* Fine; do nothing. */
                 break;
         default:
@@ -1182,11 +1182,11 @@
 
         /* Now, process the currently-requested state. */
         switch ( tci->state ) {
-        case IGNORE:
+        case SX_IGNORE:
                 /* Fine ... just ignore it. */
                 break;
-        case POSTPONE:
-                if ( tci->prevState == POSTPONE ) {
+        case SX_POSTPONE:
+                if ( tci->prevState == SX_POSTPONE ) {
                         break;
                 }
                 /* add to the postponed list. */
@@ -1199,7 +1199,7 @@
                 }
                 gnc_sx_add_defer_instance( tci->parentTCT->sx, tci->sxStateData );
                 break;
-        case TO_CREATE:
+        case SX_TO_CREATE:
                 /* Go ahead and create... */
                 toRet = sxsld_create_to_create_txns(sxsld, tci, creation_errors);
                 break;
@@ -1238,7 +1238,7 @@
                  * ignoring the first instance. We only want to incrment the
                  * counters for newly-discovered-as-to-be-created SXes.
                  */
-                if ( tci->origState == UNDEF ) {
+                if ( tci->origState == SX_UNDEF ) {
                         tmp = gnc_sx_get_instance_count( sx, NULL );
                         gnc_sx_set_instance_count( sx, tmp+1 );
                         if ( xaccSchedXactionHasOccurDef( sx ) ) {
@@ -1278,8 +1278,8 @@
                       tcInstList = tcInstList->next ) {
                         tci = (toCreateInstance*)tcInstList->data;
 
-                        if ( tci->state == IGNORE
-                             || tci->state == POSTPONE ) {
+                        if ( tci->state == SX_IGNORE
+                             || tci->state == SX_POSTPONE ) {
                                 continue;
                         }
 
@@ -1506,10 +1506,10 @@
                               tciList;
                               tciList = tciList->next ) {
                                 tci = (toCreateInstance*)tciList->data;
-                                if ( tci->prevState == POSTPONE
-                                     && tci->origState    != POSTPONE ) {
+                                if ( tci->prevState == SX_POSTPONE
+                                     && tci->origState    != SX_POSTPONE ) {
                                         /* Any valid [non-null] 'prevState !=
-                                         * POSTPONE' sx temporal state
+                                         * SX_POSTPONE' sx temporal state
                                          * pointers will be destroyed at the
                                          * destruction of the dialog [the
                                          * non-cancel case], so if we need to
@@ -1720,9 +1720,9 @@
                 tci->dirty     = FALSE;
                 tci->date      = g_date_new();
                 *tci->date     = gd;
-                tci->origState = UNDEF;
-                tci->state     = TO_CREATE;
-                tci->prevState = UNDEF;
+                tci->origState = SX_UNDEF;
+                tci->state     = SX_TO_CREATE;
+                tci->prevState = SX_UNDEF;
                 tci->sxStateData =
                         gnc_sx_clone_temporal_state( seqStateData );
                 *instanceList  = g_list_append( *instanceList, tci );
@@ -1790,15 +1790,7 @@
         toCreateTuple *tct;
         toCreateInstance *tci;
         GList *instances;
-        int count, total;
 
-        count = 0;
-        total = 0;
-        /* get an accurate count of how many SX instances we're going to
-         * create. */
-        for ( l = autoCreateList; l; l = l->next ) {
-                total += g_list_length( ((toCreateTuple*)l->data)->instanceList );
-        }
         gnc_suspend_gui_refresh();
 
         for ( ; autoCreateList ; autoCreateList = autoCreateList->next ) {
@@ -1862,7 +1854,7 @@
                         
 
                         switch ( tci->state ) {
-                        case TO_CREATE:
+                        case SX_TO_CREATE:
                             allVarsBound = TRUE;
                             g_hash_table_foreach( tci->varBindings,
                                                   andequal_numerics_set,
@@ -1872,10 +1864,10 @@
                                            : _( "Needs values for variables" ) /* NEEDS_BINDINGS_TEXT */
                                     );
                             break;
-                        case IGNORE:
+                        case SX_IGNORE:
                             rowText[1] = _( "Ignored" ) /* IGNORE_TEXT */ ;
                             break;
-                        case POSTPONE:
+                        case SX_POSTPONE:
                             rowText[1] = _( "Postponed" ) /* POSTPONE_TEXT */ ;
                             break;
                         default:
@@ -2070,9 +2062,9 @@
                 tci->parentTCT   = tct;
                 tci->date        = g_date_new();
                 *tci->date       = *rit->occurDate;
-                tci->state       = TO_CREATE;
-                tci->prevState   = UNDEF;
-                tci->origState   = UNDEF;
+                tci->state       = SX_TO_CREATE;
+                tci->prevState   = SX_UNDEF;
+                tci->origState   = SX_UNDEF;
                 tci->varBindings = NULL;
                 tci->node        = NULL;
                 tci->sxStateData = rit->sxStateData;
@@ -2170,9 +2162,9 @@
                                         xaccSchedXactionGetNextInstance(
                                                 sx, tci->sxStateData );
                                 tci->dirty       = FALSE;
-                                tci->state       = POSTPONE;
-                                tci->prevState   = POSTPONE;
-                                tci->origState   = POSTPONE;
+                                tci->state       = SX_POSTPONE;
+                                tci->prevState   = SX_POSTPONE;
+                                tci->origState   = SX_POSTPONE;
 
                                 instanceList = g_list_append( instanceList, tci );
                                 tci = NULL;
@@ -3457,7 +3449,7 @@
                         }
                         
                         switch ( tci->state ) {
-                        case TO_CREATE:
+                        case SX_TO_CREATE:
                                 /* We were postpone or ignore, before ... so
                                  * add the new txns in. */
 
@@ -3474,18 +3466,18 @@
                                 g_list_free( txnSet );
                                 txnSet = NULL;
                                 break;
-                        case IGNORE:
-                        case POSTPONE:
+                        case SX_IGNORE:
+                        case SX_POSTPONE:
                                 /* We were {postpone,ignore} or to-create,
                                  * before, so either continue to ignore or
                                  * subtract out the txns. */
-                                if ( tci->prevState != TO_CREATE ) {
+                                if ( tci->prevState != SX_TO_CREATE ) {
                                         continue;
                                 }
                                 toRet -= g_list_length( tci->createdTxnGUIDs );
                                 break;
-                        case UNDEF:
-                        case MAX_STATE:
+                        case SX_UNDEF:
+                        case SX_MAX_STATE:
                                 g_assert( "We shouldn't see any of these." );
                                 break;
                         }
@@ -3519,7 +3511,7 @@
         newCtreeText = "FIXME";
 
         switch ( newState ) {
-        case TO_CREATE:
+        case SX_TO_CREATE:
                 newSensitivity = TRUE;
                 {
                         gboolean allVarsBound = TRUE;
@@ -3533,11 +3525,11 @@
                                          : _( NEEDS_BINDINGS_TEXT ) );
                 }
                 break;
-        case IGNORE:
+        case SX_IGNORE:
                 newSensitivity = FALSE;
                 newCtreeText = _( IGNORE_TEXT );
                 break;
-        case POSTPONE:
+        case SX_POSTPONE:
                 newSensitivity = FALSE;
                 newCtreeText = _( POSTPONE_TEXT );
                 break;
@@ -3937,8 +3929,8 @@
          * cancel-specific case handle that destruction [thus the
          * valid-pointer check].
          */
-        if ( tci->prevState      != POSTPONE
-             && tci->origState   != POSTPONE
+        if ( tci->prevState      != SX_POSTPONE
+             && tci->origState   != SX_POSTPONE
              && tci->sxStateData != NULL ) {
                 gnc_sx_destroy_temporal_state( tci->sxStateData );
                 tci->sxStateData = NULL;

Modified: gnucash/branches/register-rewrite/src/gnome/druid-hierarchy.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/druid-hierarchy.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/druid-hierarchy.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -185,12 +185,18 @@
 #ifdef HAVE_LC_MESSAGES
     locale = g_strdup(setlocale(LC_MESSAGES, NULL));
 #else
+# ifdef G_OS_WIN32
+    /* On win32, setlocale() doesn't say anything useful. Use
+       glib's function instead. */
+    locale = g_strdup( *g_get_language_names() );
+# else
     /*
      * Mac OS X 10.1 and earlier, not only doesn't have LC_MESSAGES
      * setlocale can sometimes return NULL instead of "C"
      */
     locale = g_strdup(setlocale(LC_ALL, NULL) ? 
 		      setlocale(LC_ALL, NULL) : "C");
+# endif
 #endif
 
     i = strlen(locale);

Modified: gnucash/branches/register-rewrite/src/gnome/druid-loan.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/druid-loan.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/druid-loan.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -122,7 +122,7 @@
  * . param account selection should fill in orig/cur principal amounts from
  *   the books.
  * . initialize type freq to monthly.
- * . if LoanType <- !FIXED
+ * . if LoanType <- !GNC_FIXED
  *   . Frequency <- sensitive
  **/
 
@@ -179,18 +179,18 @@
 } RepayOptUIData;
 
 typedef enum {
-        FIXED = 0,
-        VARIABLE,
-        VARIABLE_3_1 = VARIABLE,
-        VARIABLE_5_1,
-        VARIABLE_7_1,
-        VARIABLE_10_1,
+        GNC_FIXED = 0,
+        GNC_VARIABLE,
+        GNC_VARIABLE_3_1 = GNC_VARIABLE,
+        GNC_VARIABLE_5_1,
+        GNC_VARIABLE_7_1,
+        GNC_VARIABLE_10_1,
         /* ... FIXME */
 } LoanType;
 
 typedef enum {
-        MONTHS = 0,
-        YEARS
+        GNC_MONTHS = 0,
+        GNC_YEARS
 } PeriodSize;
 
 /**
@@ -927,7 +927,7 @@
         g_string_append_printf( gstr, "pmt( %.5f / 12 : %0.2f : %0.2f : 0 : 0 )",
                                 (ldd->ld.interestRate / 100),
                                 ( ldd->ld.numPer
-                                  * ( ldd->ld.perSize == MONTHS ? 1 : 12 ) ) * 1.,
+                                  * ( ldd->ld.perSize == GNC_MONTHS ? 1 : 12 ) ) * 1.,
                                 gnc_numeric_to_double(ldd->ld.principal) );
 }
 
@@ -940,7 +940,7 @@
         g_string_printf( gstr, "ppmt( %.5f / 12 : i : %0.2f : %0.2f : 0 : 0 )",
                          (ldd->ld.interestRate / 100),
                          ( ldd->ld.numPer
-                           * ( ldd->ld.perSize == MONTHS ? 1 : 12 ) ) * 1.,
+                           * ( ldd->ld.perSize == GNC_MONTHS ? 1 : 12 ) ) * 1.,
                          gnc_numeric_to_double(ldd->ld.principal));
 }
 
@@ -953,7 +953,7 @@
         g_string_printf( gstr, "ipmt( %.5f / 12 : i : %0.2f : %0.2f : 0 : 0 )",
                          (ldd->ld.interestRate / 100),
                          ( ldd->ld.numPer
-                           * ( ldd->ld.perSize == MONTHS ? 1 : 12 ) ) * 1.,
+                           * ( ldd->ld.perSize == GNC_MONTHS ? 1 : 12 ) ) * 1.,
                          gnc_numeric_to_double( ldd->ld.principal ) );
 }
 
@@ -1053,7 +1053,7 @@
         ldd = (LoanDruidData*)ud;
         index = gtk_combo_box_get_active( ldd->prmType );
         gtk_widget_set_sensitive( GTK_WIDGET(ldd->prmVarFrame),
-                                  index != FIXED );
+                                  index != GNC_FIXED );
 }
 
 static
@@ -1163,7 +1163,7 @@
         ldd->ld.principal = gnc_amount_edit_get_amount( ldd->prmOrigPrincGAE );
         ldd->ld.interestRate = gtk_spin_button_get_value( ldd->prmIrateSpin );
         ldd->ld.type = gtk_combo_box_get_active( ldd->prmType );
-        if ( ldd->ld.type != FIXED ) {
+        if ( ldd->ld.type != GNC_FIXED ) {
                 gnc_frequency_save_state( ldd->prmVarGncFreq,
                                           ldd->ld.loanFreq,
                                           ldd->ld.varStartDate );
@@ -1186,7 +1186,7 @@
         {
                 ldd->ld.perSize =
                         (gtk_combo_box_get_active( ldd->prmLengthType )
-                         == MONTHS) ? MONTHS : YEARS;
+                         == GNC_MONTHS) ? GNC_MONTHS : GNC_YEARS;
                 ldd->ld.numPer =
                         gtk_spin_button_get_value_as_int( ldd->prmLengthSpin );
                 ldd->ld.numMonRemain =
@@ -1205,7 +1205,7 @@
         gnc_amount_edit_set_amount( ldd->prmOrigPrincGAE, ldd->ld.principal );
         gtk_spin_button_set_value( ldd->prmIrateSpin, ldd->ld.interestRate );
         gtk_combo_box_set_active( ldd->prmType, ldd->ld.type );
-        if ( ldd->ld.type != FIXED ) {
+        if ( ldd->ld.type != GNC_FIXED ) {
                 gnc_frequency_setup( ldd->prmVarGncFreq,
                                      ldd->ld.loanFreq,
                                      ldd->ld.varStartDate );
@@ -2277,7 +2277,7 @@
         /* Figure out the correct current instance-count for the txns in the
          * SX. */
         paymentSX->instNum =
-                (ldd->ld.numPer * ( ldd->ld.perSize == YEARS ? 12 : 1 ))
+                (ldd->ld.numPer * ( ldd->ld.perSize == GNC_YEARS ? 12 : 1 ))
                 - ldd->ld.numMonRemain + 1;
 
         paymentSX->mainTxn = gnc_ttinfo_malloc();
@@ -2564,7 +2564,7 @@
         endDateMath = g_new0( struct tm, 1 );
         g_date_to_struct_tm( ldd->ld.startDate, endDateMath );
         monthsTotal = ( (ldd->ld.numPer - 1)
-                        * ( ldd->ld.perSize == MONTHS ? 1 : 12 ) );
+                        * ( ldd->ld.perSize == GNC_MONTHS ? 1 : 12 ) );
         endDateMath->tm_mon += monthsTotal;
         g_date_set_time_t( end, mktime( endDateMath ) );
         g_free( endDateMath );

Modified: gnucash/branches/register-rewrite/src/gnome/druid-merge.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/druid-merge.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/druid-merge.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -181,8 +181,8 @@
 static void
 on_merge_cancel (GnomeDruid *gnomedruid, gpointer user_data)
 {
+	g_return_if_fail(mergeBook != NULL);
 	gnc_suspend_gui_refresh ();
-	g_return_if_fail(mergeData != NULL);
 	delete_merge_window();
 	qof_book_destroy(mergeBook);
 	qof_session_end(merge_session);	
@@ -220,7 +220,7 @@
 	gnc_suspend_gui_refresh ();
 	result = qof_book_merge_commit(mergeData);
 	if(result != 0) {
-		message = _("Error: the Commit operation failed.");
+		message = g_strdup_printf(_("Error: the Commit operation failed, error code %d."), result);
 		top = gtk_widget_get_toplevel (GTK_WIDGET (gnomedruidpage));
 		gnc_error_dialog(top, message);
 	}

Modified: gnucash/branches/register-rewrite/src/gnome/glade/account.glade
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/glade/account.glade	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/glade/account.glade	2007-01-05 23:51:55 UTC (rev 15316)
@@ -3281,7 +3281,7 @@
 		      <child>
 			<widget class="GtkLabel" id="label8477439">
 			  <property name="visible">True</property>
-			  <property name="label">_Renumber</property>
+			  <property name="label" translatable="yes">_Renumber</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>

Modified: gnucash/branches/register-rewrite/src/gnome/gnc-plugin-basic-commands.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/gnc-plugin-basic-commands.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/gnc-plugin-basic-commands.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -56,9 +56,7 @@
 #include "gnc-session.h"
 
 /* This static indicates the debugging module that this .o belongs to.  */
-#ifdef QSF_IMPORT_NO_LONGER_BROKEN
 static QofLogModule log_module = GNC_MOD_GUI;
-#endif
 
 static void gnc_plugin_basic_commands_class_init (GncPluginBasicCommandsClass *klass);
 static void gnc_plugin_basic_commands_init (GncPluginBasicCommands *plugin);
@@ -69,20 +67,14 @@
 static void gnc_main_window_cmd_file_open (GtkAction *action, GncMainWindowActionData *data);
 static void gnc_main_window_cmd_file_save (GtkAction *action, GncMainWindowActionData *data);
 static void gnc_main_window_cmd_file_save_as (GtkAction *action, GncMainWindowActionData *data);
-#ifdef QSF_IMPORT_NO_LONGER_BROKEN
 static void gnc_main_window_cmd_file_qsf_import (GtkAction *action, GncMainWindowActionData *data);
-#endif
 static void gnc_main_window_cmd_file_export_accounts (GtkAction *action, GncMainWindowActionData *data);
-#ifdef QSF_EXPORT_NO_LONGER_BROKEN
 static void gnc_main_window_cmd_file_chart_export (GtkAction *action, GncMainWindowActionData *data);
-#endif
 static void gnc_main_window_cmd_edit_tax_options (GtkAction *action, GncMainWindowActionData *data);
 static void gnc_main_window_cmd_actions_mortgage_loan (GtkAction *action, GncMainWindowActionData *data);
 static void gnc_main_window_cmd_actions_scheduled_transaction_editor (GtkAction *action, GncMainWindowActionData *data);
 static void gnc_main_window_cmd_actions_since_last_run (GtkAction *action, GncMainWindowActionData *data);
-#ifdef BOOK_CLOSING_WORKS
 static void gnc_main_window_cmd_actions_close_books (GtkAction *action, GncMainWindowActionData *data);
-#endif
 static void gnc_main_window_cmd_tools_financial_calculator (GtkAction *action, GncMainWindowActionData *data);
 static void gnc_main_window_cmd_tools_find_transactions (GtkAction *action, GncMainWindowActionData *data);
 static void gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data);
@@ -112,22 +104,18 @@
   { "FileSaveAsAction", GTK_STOCK_SAVE_AS, N_("Save _As..."), "<shift><control>s",
     NULL,
     G_CALLBACK (gnc_main_window_cmd_file_save_as) },
-#ifdef QSF_IMPORT_NO_LONGER_BROKEN
   { "FileImportQSFAction", GTK_STOCK_CONVERT,
     N_("_QSF Import"), NULL,
     N_("Import a QSF object file"),
     G_CALLBACK (gnc_main_window_cmd_file_qsf_import) },
-#endif
   { "FileExportAccountsAction", GTK_STOCK_CONVERT,
     N_("Export _Accounts"), NULL,
     N_("Export the account hierarchy to a new GnuCash datafile"),
     G_CALLBACK (gnc_main_window_cmd_file_export_accounts) },
-#ifdef QSF_EXPORT_NO_LONGER_BROKEN
   { "FileExportChartAction", GTK_STOCK_CONVERT,
     N_("Export _Chart of Accounts to QSF"), NULL,
     N_("Export the chart of accounts for a date with balances as QSF"),
     G_CALLBACK (gnc_main_window_cmd_file_chart_export) },
-#endif
 
   /* Edit menu */
 
@@ -150,11 +138,9 @@
   { "ActionsMortgageLoanAction", NULL, N_("_Mortgage & Loan Repayment..."), NULL,
     N_("Setup scheduled transactions for repayment of a loan"),
     G_CALLBACK (gnc_main_window_cmd_actions_mortgage_loan) },
-#ifdef BOOK_CLOSING_WORKS
   { "ActionsCloseBooksAction", NULL, N_("Close _Books"), NULL,
     N_("Archive old data using accounting periods"),
     G_CALLBACK (gnc_main_window_cmd_actions_close_books) },
-#endif
 
   /* Tools menu */
 
@@ -359,13 +345,14 @@
   gnc_window_set_progressbar_window (NULL);
   /* FIXME GNOME 2 Port (update the title etc.) */
 }
-#ifdef QSF_IMPORT_NO_LONGER_BROKEN
+
 static void
 qsf_file_select_ok(GtkWidget *w, GtkFileSelection *fs )
 {
   QofSession *qsf_session, *first_session;
-  const gchar *filename;
+  const gchar *filename, *message, *error_message;
   QofBook *original;
+  QofBackendError err;
 
   ENTER (" ");
   qof_event_suspend();
@@ -376,6 +363,20 @@
   qsf_session = qof_session_new();
   qof_session_begin(qsf_session, filename, TRUE, FALSE);
   qof_session_load(qsf_session, NULL);
+  err = qof_session_get_error(qsf_session);
+  if (err != ERR_BACKEND_NO_ERR) {
+    error_message = qof_session_get_error_message(qsf_session);
+    if (!error_message)
+	error_message = "";
+    message = g_strdup_printf(_("Error: Loading failed, error code %d - %s."), err, error_message);
+    PERR("%s", message);
+    qof_session_destroy(qsf_session);
+    qof_event_resume();
+    gnc_error_dialog(gnc_ui_get_toplevel(), message);
+    LEAVE (" ");
+    return;
+  }
+
   qof_event_resume();
   gnc_ui_qsf_import_merge_druid(first_session, qsf_session);
   LEAVE (" ");
@@ -397,7 +398,7 @@
   gtk_widget_show (file_select);
   gnc_window_set_progressbar_window(NULL);
 }
-#endif
+
 static void
 gnc_main_window_cmd_file_export_accounts (GtkAction *action, GncMainWindowActionData *data)
 {
@@ -410,7 +411,6 @@
   /* gnc_refresh_main_window_info (); */
 }
 
-#ifdef QSF_EXPORT_NO_LONGER_BROKEN
 static void
 gnc_main_window_cmd_file_chart_export (GtkAction *action, GncMainWindowActionData *data)
 {
@@ -422,7 +422,6 @@
   /* FIXME GNOME 2 Port (update the title etc.) */
   /* gnc_refresh_main_window_info (); */
 }
-#endif
 
 static void
 gnc_main_window_cmd_edit_tax_options (GtkAction *action, GncMainWindowActionData *data)
@@ -472,13 +471,11 @@
   gnc_ui_sx_loan_druid_create ();
 }
 
-#ifdef BOOK_CLOSING_WORKS
 static void
 gnc_main_window_cmd_actions_close_books (GtkAction *action, GncMainWindowActionData *data)
 {
   gnc_acct_period_dialog();
 }
-#endif
 
 static void
 gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data)

Modified: gnucash/branches/register-rewrite/src/gnome/top-level.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/top-level.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/top-level.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -223,7 +223,7 @@
     GError *error = NULL;
     
     url = qof_session_get_url(session);
-    ENTER("session %p (%s)", session, url);
+    ENTER("session %p (%s)", session, url ? url : "(null)");
     if (!url) {
         LEAVE("no url, nothing to do");
         return;
@@ -310,7 +310,7 @@
     
     
     url = qof_session_get_url(session);
-    ENTER("session %p (%s)", session, url);
+    ENTER("session %p (%s)", session, url ? url : "(null)");
     if (!url) {
         LEAVE("no url, nothing to do");
         return;

Modified: gnucash/branches/register-rewrite/src/gnome/ui/gnc-plugin-basic-commands-ui.xml
===================================================================
--- gnucash/branches/register-rewrite/src/gnome/ui/gnc-plugin-basic-commands-ui.xml	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome/ui/gnc-plugin-basic-commands-ui.xml	2007-01-05 23:51:55 UTC (rev 15316)
@@ -15,12 +15,12 @@
         <menuitem name="FileSave" action="FileSaveAction"/>
         <menuitem name="FileSaveAs" action="FileSaveAsAction"/>
       </placeholder>
-      <!-- menu name="FileImport" action="FileImportAction">
+      <menu name="FileImport" action="FileImportAction">
         <menuitem name="FileImportQSF" action="FileImportQSFAction"/>
-      </menu -->
+      </menu>
       <menu name="FileExport" action="FileExportAction">
         <menuitem name="FileExportAccounts" action="FileExportAccountsAction"/>
-        <!-- menuitem name="FileExportChart" action="FileExportChartAction"/ -->
+        <menuitem name="FileExportChart" action="FileExportChartAction"/>
       </menu>
     </menu>
   
@@ -48,7 +48,7 @@
           <menuitem name="ActionsSinceLastRun" action="ActionsSinceLastRunAction"/>
           <menuitem name="ActionsMortgageLoan" action="ActionsMortgageLoanAction"/>
         </menu>
-        <!-- menuitem name="ActionsCloseBooks" action="ActionsCloseBooksAction"/ -->
+        <menuitem name="ActionsCloseBooks" action="ActionsCloseBooksAction"/>
       </placeholder>
     </menu>
   

Modified: gnucash/branches/register-rewrite/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -13,6 +13,7 @@
   -I${top_srcdir}/src/network-utils \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/lib/libc \
   ${GLIB_CFLAGS} \
   ${GLADE_CFLAGS} \
@@ -29,7 +30,6 @@
   QuickFill.c \
   account-quickfill.c \
   cursors.c \
-  argv-list-converters.c \
   dialog-account.c \
   dialog-commodity.c \
   dialog-options.c \
@@ -161,7 +161,6 @@
   window-main-summarybar.h
 
 noinst_HEADERS = \
-  argv-list-converters.h \
   gnc-druid-gnome.h \
   gnc-druid-provider-edge-gnome.h \
   gnc-druid-provider-file-gnome.h \
@@ -193,7 +192,8 @@
   ${LIBXML2_LIBS}
 
 if BUILDING_FROM_SVN
-swig-gnome-utils.c: gnome-utils.i gnc-html.h print-session.h
+swig-gnome-utils.c: gnome-utils.i gnc-html.h print-session.h \
+                    ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif
@@ -224,7 +224,7 @@
 	@echo "#ifndef GNC_VERSION_H"			>> _gnc-version.h
 	@echo "#define GNC_VERSION_H"			>> _gnc-version.h
 	@echo ""					>> _gnc-version.h
-	@svninfo=`${top_srcdir}/util/gnc-svnversion ${srcdir}` ; \
+	@svninfo=`${top_srcdir}/util/gnc-svnversion ${top_srcdir}` ; \
 	if [ $$? = 0 ] ; then \
 		echo "#define GNUCASH_SVN 1"		>> _gnc-version.h ; \
 	fi
@@ -238,11 +238,11 @@
 	-rm -f _gnc-svninfo.h
 
 _gnc-svninfo.h: Makefile
-	@svninfo=`${top_srcdir}/util/gnc-svnversion ${srcdir}` ; \
+	@svninfo=`${top_srcdir}/util/gnc-svnversion ${top_srcdir}` ; \
 	if [ $$? = 0 ] ; then \
 		if [ -z "$$svninfo" ] ; then \
 			echo "gnc-svnversion failed.  figure out why." ; \
-			echo "can't determine svn revision from ${srcdir}." ; \
+			echo "can't determine svn revision from ${top_srcdir}." ; \
 			exit 1 ; \
 		fi ; \
 		echo "/* Autogenerated. Do not change. */" > _gnc-svninfo.h ; \

Deleted: gnucash/branches/register-rewrite/src/gnome-utils/argv-list-converters.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/argv-list-converters.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/argv-list-converters.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,126 +0,0 @@
-/********************************************************************\
- * argv-list-converters.c                                           *
- * Copyright (C) 2000 Gnumatic, Inc                                 *
- * Copyright (C) 2000 James LewisMoss                               *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
- * Boston, MA  02110-1301,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include <glib.h>
-#include <libguile.h>
-
-#include "argv-list-converters.h"
-
-
-char**
-gnc_scheme_list_to_nulltermcharpp(int prelen, const char **prepend, SCM list)
-{
-    SCM next = list;
-    char **ret;
-    int len = 0;
-    int loc;
-
-    if(SCM_CONSP(list))
-    {
-        int i;
-        len = scm_ilength(list) + prelen;
-        ret = g_new(char *, len + 1);
-        ret[len] = NULL;
-        for(i = 0; i < prelen; i++)
-        {
-            ret[i] = g_strdup(prepend[i]);
-        }
-    }
-    else 
-    {
-        return NULL;
-    }
-
-    loc = prelen;
-    while(SCM_CONSP(next)) 
-    {
-        SCM scm_string = SCM_CAR(next);
-        next = SCM_CDR(next);
-        if(SCM_STRINGP(scm_string))
-        {
-	    const gchar *onestr = SCM_STRING_CHARS(scm_string);
-            ret[loc] = g_strdup (onestr);
-        }
-        else
-        {
-            int i;
-
-            for (i = 0; i < loc; i++)
-              g_free (ret[i]);
-            g_free(ret);
-            return NULL;
-        }
-        loc++;
-    }
-
-    return ret;
-}
-
-SCM
-gnc_argvarr_to_scheme_list(int argc, const char** argv)
-{
-    int i;
-    SCM ret = SCM_EOL;
-
-    for(i = 0; i < argc; i++)
-    {
-      ret = scm_cons(scm_makfrom0str(argv[i]), ret);
-    }
-
-    return scm_reverse(ret);
-}
-
-void
-gnc_free_argv(char** argv)
-{
-    char **now = argv;
-
-    if(!argv)
-    {
-        return;
-    }
-    
-    while(*now != 0)
-    {
-        g_free(*now);
-        now++;
-    }
-    g_free(argv);
-}
-
-int
-argv_length(char** nulltermlist)
-{
-    int ret = 0;
-
-    if(!nulltermlist)
-    {
-        return 0;
-    }
-    
-    while(nulltermlist[ret] != 0)
-        ret++;
-    return ret;
-}

Deleted: gnucash/branches/register-rewrite/src/gnome-utils/argv-list-converters.h
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/argv-list-converters.h	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/argv-list-converters.h	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,58 +0,0 @@
-/********************************************************************\
- * argv-list-converters.h                                           *
- * Copyright (C) 2000 Gnumatic, Inc                                 *
- * Copyright (C) 2000 James LewisMoss                               *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
- * Boston, MA  02110-1301,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef ARGV_LIST_CONVERTERS_H
-#define ARGV_LIST_CONVERTERS_H
-
-
-/*
- * This function takes a SCM value.  Determines whether it is a list
- * and whether that list contains only strings and returns a null
- * terminated array of strings (char*'s)
- */
-char** gnc_scheme_list_to_nulltermcharpp(int prelen, const char **prepend,
-                                         SCM list);
-
-
-/*
- * This function takes a length and char** and makes a scheme list
- * with similar contents
- */
-SCM gnc_argvarr_to_scheme_list(int argc, const char** argv);
-
-/*
- * Frees the strings and the argv array
- */
-void gnc_free_argv(char** argv);
-
-/*
- * print out the argv array in a nice manner
- */
-void print_argv(char **argv);
-
-/*
- * get the length of null terminated char* array
- */
-int argv_length(char** nulltermlist);
-
-#endif

Modified: gnucash/branches/register-rewrite/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/dialog-transfer.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/dialog-transfer.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -47,6 +47,7 @@
 
 
 #define DIALOG_TRANSFER_CM_CLASS "dialog-transfer"
+#define GCONF_SECTION "dialogs/transfer"
 
 #define PRECISION 1000000
 
@@ -1648,6 +1649,7 @@
 
   dialog = glade_xml_get_widget (xml, "Transfer Dialog");
   xferData->dialog = dialog;
+  g_object_set_data_full (G_OBJECT (dialog), "xml", xml, g_object_unref);
 
   /* parent */
   if (parent != NULL)
@@ -1824,6 +1826,7 @@
 			 _("To Amount:"));
     }
   }
+  gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW (dialog));
   LEAVE(" ");
 }
 
@@ -1836,6 +1839,7 @@
   ENTER(" ");
   dialog = GTK_WIDGET (xferData->dialog);
 
+  gnc_save_window_size (GCONF_SECTION, GTK_WINDOW (dialog));
   gtk_widget_hide (dialog);
   gnc_xfer_dialog_close_cb(GTK_DIALOG(dialog), xferData);
   gtk_widget_destroy (dialog);

Modified: gnucash/branches/register-rewrite/src/gnome-utils/druid-gconf-setup.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/druid-gconf-setup.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/druid-gconf-setup.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -152,7 +152,7 @@
   fprintf(output, "\n######## The following lines were added by GnuCash. ########\n");
   if (!found_user_dir)
     fprintf(output, PATH_STRING1);
-  gconfdir = gnc_path_get_gconfdir ();
+  gconfdir = gnc_path_get_gconfdir (TRUE);
   fprintf(output, PATH_STRING2, gconfdir);
   g_free (gconfdir);
   fprintf(output,   "############## End of lines added by GnuCash. ##############\n");
@@ -287,7 +287,7 @@
   GtkTextBuffer *textbuffer;
   GtkWidget *textview;
   gchar *msg;
-  gchar *gconfdir = gnc_path_get_gconfdir ();
+  gchar *gconfdir = gnc_path_get_gconfdir (TRUE);
 
   textview = gnc_glade_lookup_widget(GTK_WIDGET(druidpage), "update_text");
   textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
@@ -614,6 +614,25 @@
     return;
   }
 
+#ifdef G_OS_WIN32
+  {
+    /* automatically update the search path on windows */
+    GError *error = NULL;
+    if (!druid_gconf_update_path (&error)) {
+      gnc_error_dialog (NULL, error->message);
+      g_error_free (error);
+      exit(42);
+    } else {
+      if (!g_spawn_command_line_sync("gconftool-2 --shutdown", NULL, NULL,
+				     NULL, &error)) {
+	gnc_warning_dialog(NULL, error->message);
+	g_error_free(error);
+      }
+      return;
+    }
+  }
+#endif /* G_OS_WIN32 */
+
   xml = gnc_glade_xml_new ("druid-gconf-setup.glade", "GConf Query");
   dialog = glade_xml_get_widget (xml, "GConf Query");
   do {

Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-dense-cal.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-dense-cal.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-dense-cal.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -166,15 +166,16 @@
  * locale. (i18n'd version of the above static character array.) */
 static const gchar *month_name(int mon) 
 {
-    static gchar buf[MONTH_NAME_BUFSIZE];
-    struct tm my_tm;
-    int i;
+        static gchar buf[MONTH_NAME_BUFSIZE];
+        GDate *date;
 
-    memset( buf, 0, MONTH_NAME_BUFSIZE );
-    memset( &my_tm, 0, sizeof( struct tm ) );
-    my_tm.tm_mon = mon;
-    i = strftime (buf, MONTH_NAME_BUFSIZE-1, "%b", &my_tm);
-    return buf;
+        memset(buf, 0, MONTH_NAME_BUFSIZE);
+        date = g_date_new();
+        g_date_set_month(date, mon);
+        g_date_strftime(buf, MONTH_NAME_BUFSIZE-1, "%b", date);
+        g_date_free(date);
+
+        return buf;
 }
 /* FIXME: i18n 
    static const gchar *dayLabels[7] = {

Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-file.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-file.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-file.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -40,7 +40,6 @@
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
 #include "gnc-window.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-plugin-file-history.h"
 #include "qof.h"
 #include "TransLog.h"
@@ -129,15 +128,10 @@
     gtk_dialog_add_button(GTK_DIALOG(file_box),
 			  okbutton, GTK_RESPONSE_ACCEPT);
 
-  if (starting_dir) {
-    gchar *dir_name;
+  if (starting_dir)
+    gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (file_box),
+					starting_dir);
 
-    /* Ensure we have a directory name.  The set function fails otherwise. */
-    dir_name = g_path_get_dirname(starting_dir);
-    gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (file_box), dir_name);
-    g_free(dir_name);
-  }
-
   gtk_window_set_modal(GTK_WINDOW(file_box), TRUE);
   /*
   gtk_window_set_transient_for(GTK_WINDOW(file_box),
@@ -180,7 +174,7 @@
     file_name = g_strdup(internal_name);
   }
   gtk_widget_destroy(GTK_WIDGET(file_box));
-  LEAVE("%s", file_name);
+  LEAVE("%s", file_name ? file_name : "(null)");
   return file_name;
 }
 
@@ -877,21 +871,17 @@
   QofBackendError io_err = ERR_BACKEND_NO_ERR;
   gchar *default_dir;
 
-  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
-  if (default_dir == NULL)
-    gnc_init_default_directory(&default_dir);
-
   if (!newfile) {
+    default_dir = gnc_get_default_directory (GCONF_SECTION);
     newfile =  gnc_file_dialog (_("Export"), NULL, default_dir, GNC_FILE_DIALOG_EXPORT);
     g_free(default_dir);
-    default_dir = NULL;
     if (!newfile)
       return;
   }
 
   /* Remember the directory as the default. */
-  gnc_extract_directory(&default_dir, newfile);
-  gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
+  default_dir = g_path_get_dirname(newfile);
+  gnc_set_default_directory (GCONF_SECTION, default_dir);
   g_free(default_dir);
   
   qof_event_suspend();
@@ -1020,15 +1010,14 @@
 
   last = gnc_history_get_last();
   if (last) {
-    gnc_extract_directory(&default_dir, last);
+    default_dir = g_path_get_dirname(last);
     g_free(last);
   } else {
-    gnc_init_default_directory(&default_dir);
+    default_dir = gnc_get_default_directory(GCONF_SECTION);
   }
   filename = gnc_file_dialog (_("Save"), NULL, default_dir, 
-		  GNC_FILE_DIALOG_SAVE);
-  if (default_dir)
-    free(default_dir);
+			      GNC_FILE_DIALOG_SAVE);
+  g_free(default_dir);
   if (!filename) return;
 
   /* Check to see if the user specified the same file as the current
@@ -1168,5 +1157,6 @@
 gboolean
 gnc_file_save_in_progress (void)
 {
-  return (save_in_progress > 0);
+    QofSession *session = gnc_get_current_session();
+    return (qof_session_save_in_progress(session) || save_in_progress > 0);
 }

Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-frequency.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-frequency.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-frequency.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -26,6 +26,7 @@
 #include "config.h"
 
 #include <gtk/gtk.h>
+#include <glib/gtypes.h>
 #include "glib-compat.h"
 #include <math.h>
 #include <time.h>
@@ -977,7 +978,7 @@
         tmptm->tm_mday = gtk_combo_box_get_active( GTK_COMBO_BOX(o) )+1;
 
         /* FIXME: correct for
-           option_menu_selected_day > min(31,correct_days_in_month)
+           option_menu_selected_day > minn(31,correct_days_in_month)
            problem */
         while ( ! g_date_valid_dmy( tmptm->tm_mday,
                                     tmptm->tm_mon+1,
@@ -991,12 +992,12 @@
         g_signal_emit_by_name( gf, "changed" );
 }
 
-static inline guint32 min( guint32 a, guint32 b )
+static inline guint32 minn( guint32 a, guint32 b )
 {
         return a > b ? b : a;
 }
 
-static inline guint32 max( guint32 a, guint32 b )
+static inline guint32 maxn( guint32 a, guint32 b )
 {
         return a > b ? a : b;
 }
@@ -1031,10 +1032,10 @@
                 tmpDate = mktime( tmpTm );
                 tmpTm = localtime( &tmpDate );
                 gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-					  min( tmpTm->tm_mday, tmpDayOfMonth ) - 1 );
+					  minn( tmpTm->tm_mday, tmpDayOfMonth ) - 1 );
                 o = glade_xml_get_widget( gf->gxml, "semimonthly_second" );
                 gtk_combo_box_set_active( GTK_COMBO_BOX(o),
-					  max( tmpTm->tm_mday, tmpDayOfMonth ) - 1 );
+					  maxn( tmpTm->tm_mday, tmpDayOfMonth ) - 1 );
         }
         break;
         case UIFREQ_MONTHLY:

Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-gnome-utils.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-gnome-utils.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -24,6 +24,7 @@
 #include "config.h"
 
 #include <gnome.h>
+#include <glib/gi18n.h>
 #include <libguile.h>
 #include <gconf/gconf.h>
 #ifdef HAVE_X11_XLIB_H
@@ -32,7 +33,6 @@
 
 #include "gnc-html-graph-gog.h"
 
-#include "argv-list-converters.h"
 #include "druid-gconf-setup.h"
 #include "gnc-gconf-utils.h"
 #include "gnc-gnome-utils.h"
@@ -242,6 +242,12 @@
     return;
 
   g_assert(error != NULL);
+  {
+    const gchar *message =
+      _("GnuCash could not find the files for the help documentation.  "
+	"This is likely because the 'gnucash-docs' package is not installed.");
+    gnc_error_dialog(NULL, message);
+  }
   PERR ("%s", error->message);
   g_error_free(error);
 }

Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-html.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-html.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-html.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -180,8 +180,11 @@
   int         found_protocol=0, found_path=0, found_label=0; 
   URLType     retval;   
 
-  DEBUG("parsing %s, base_location %s", url,
-	html ? html->base_location : "<null hmtl>");
+  DEBUG("parsing %s, base_location %s",
+        url ? url : "(null)",
+        html ? (html->base_location ? html->base_location
+                : "(null base_location)")
+        : "(null html)");
   regcomp(&compiled, uri_rexp, REG_EXTENDED);
 
   if(!regexec(&compiled, url, 6, match, 0)) {
@@ -558,7 +561,8 @@
   char * fdata = NULL;
   int fdata_len = 0;
 
-  DEBUG("type %s, location %s, label %s", type, location, label);
+  DEBUG("type %s, location %s, label %s", type ? type : "(null)",
+	location ? location : "(null)", label ? label : "(null)");
   if(!html) {
     return;
   }
@@ -1027,8 +1031,9 @@
       html->base_type = result.base_type;
       html->base_location =
 	    g_strdup (extract_base_name(result.base_type, new_location));
-      DEBUG("resetting base location to %s",  html->base_location);
-    
+      DEBUG("resetting base location to %s",
+	    html->base_location ? html->base_location : "(null)");
+
       stream = gtk_html_begin (GTK_HTML(html->html));
       gnc_html_load_to_stream (html, stream, result.url_type,
                                new_location, new_label);
@@ -1128,6 +1133,8 @@
 gnc_html_new( GtkWindow *parent )
 {
   gnc_html * retval = g_new0(gnc_html, 1);
+
+  ENTER("parent %p", parent);
   
   retval->window    = GTK_WIDGET(parent);
   retval->container = gtk_scrolled_window_new(NULL, NULL);
@@ -1177,6 +1184,8 @@
 		    retval);
   
   gtk_html_load_empty(GTK_HTML(retval->html));
+
+  LEAVE("retval %p", retval);
   
   return retval;
 }

Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-main-window.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-main-window.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -403,6 +403,9 @@
 #define WINDOW_GEOMETRY		"Window Geometry"
 #define WINDOW_POSITION		"Window Position"
 #define WINDOW_MAXIMIZED	"Window Maximized"
+#define TOOLBAR_VISIBLE		"Toolbar Visible"
+#define STATUSBAR_VISIBLE	"Statusbar Visible"
+#define SUMMARYBAR_VISIBLE	"Summarybar Visible"
 #define WINDOW_FIRSTPAGE	"First Page"
 #define WINDOW_PAGECOUNT	"Page Count"
 #define WINDOW_PAGEORDER	"Page Order"
@@ -511,9 +514,10 @@
 gnc_main_window_restore_window (GncMainWindow *window, GncMainWindowSaveData *data)
 {
   GncMainWindowPrivate *priv;
+  GtkAction *action;
   gint *pos, *geom, *order;
   gsize length;
-  gboolean max;
+  gboolean max, visible, desired_visibility;
   gchar *window_group;
   gint page_start, page_count, i;
   GError *error = NULL;
@@ -612,6 +616,46 @@
     gtk_window_maximize(GTK_WINDOW(window));
   }
 
+  /* Common view menu items */
+  action = gnc_main_window_find_action(window, "ViewToolbarAction");
+  visible = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
+  desired_visibility = g_key_file_get_boolean(data->key_file, window_group,
+					      TOOLBAR_VISIBLE, &error);
+  if (error) {
+    g_warning("error reading group %s key %s: %s",
+	      window_group, TOOLBAR_VISIBLE, error->message);
+    g_error_free(error);
+    error = NULL;
+  } else if (visible != desired_visibility) {
+    gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action),desired_visibility);
+  }
+
+  action = gnc_main_window_find_action(window, "ViewSummaryAction");
+  visible = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
+  desired_visibility = g_key_file_get_boolean(data->key_file, window_group,
+					      SUMMARYBAR_VISIBLE, &error);
+  if (error) {
+    g_warning("error reading group %s key %s: %s",
+	      window_group, TOOLBAR_VISIBLE, error->message);
+    g_error_free(error);
+    error = NULL;
+  } else if (visible != desired_visibility) {
+    gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action),desired_visibility);
+  }
+
+  action = gnc_main_window_find_action(window, "ViewStatusbarAction");
+  visible = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
+  desired_visibility = g_key_file_get_boolean(data->key_file, window_group,
+					      STATUSBAR_VISIBLE, &error);
+  if (error) {
+    g_warning("error reading group %s key %s: %s",
+	      window_group, TOOLBAR_VISIBLE, error->message);
+    g_error_free(error);
+    error = NULL;
+  } else if (visible != desired_visibility) {
+    gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action),desired_visibility);
+  }
+
   /* Now populate the window with pages. */
   for (i = 0; i < page_count; i++) {
     data->page_offset = page_start;
@@ -752,8 +796,9 @@
 gnc_main_window_save_window (GncMainWindow *window, GncMainWindowSaveData *data)
 {
   GncMainWindowPrivate *priv;
+  GtkAction *action;
   gint i, num_pages, coords[4], *order;
-  gboolean maximized;
+  gboolean maximized, visible;
   gchar *window_group;
 
   /* Setup */
@@ -802,6 +847,20 @@
 	coords[2], coords[3],
 	maximized ? "maximized" : "not maximized");
 
+  /* Common view menu items */
+  action = gnc_main_window_find_action(window, "ViewToolbarAction");
+  visible = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
+  g_key_file_set_boolean(data->key_file, window_group,
+			 TOOLBAR_VISIBLE, visible);
+  action = gnc_main_window_find_action(window, "ViewSummaryAction");
+  visible = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
+  g_key_file_set_boolean(data->key_file, window_group,
+			 SUMMARYBAR_VISIBLE, visible);
+  action = gnc_main_window_find_action(window, "ViewStatusbarAction");
+  visible = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
+  g_key_file_set_boolean(data->key_file, window_group,
+			 STATUSBAR_VISIBLE, visible);
+
   /* Save individual pages in this window */
   g_list_foreach(priv->installed_pages, (GFunc)gnc_main_window_save_page, data);
 
@@ -995,12 +1054,30 @@
 }
 
 static gboolean
+gnc_main_window_quit(GncMainWindow *window)
+{
+    QofSession *session;
+    gboolean needs_save, do_shutdown;
+
+    session = gnc_get_current_session();
+    needs_save = qof_book_not_saved(qof_session_get_book(session)) && 
+        !gnc_file_save_in_progress();
+    do_shutdown = !needs_save || 
+        (needs_save && !gnc_main_window_prompt_for_save(GTK_WIDGET(window)));
+
+    if (do_shutdown) {
+        g_timeout_add(250, gnc_main_window_timed_quit, NULL);
+        return TRUE;
+    }
+    return FALSE;
+}
+
+static gboolean
 gnc_main_window_delete_event (GtkWidget *window,
 			      GdkEvent *event,
 			      gpointer user_data)
 {
   static gboolean already_dead = FALSE;
-  QofSession *session;
 
   if (already_dead)
     return TRUE;
@@ -1013,21 +1090,7 @@
   if (g_list_length(active_windows) > 1)
     return FALSE;
 
-  session = gnc_get_current_session();
-  if (qof_book_not_saved(qof_session_get_book(session))) {
-    if (!gnc_main_window_prompt_for_save(GTK_WIDGET(window))) {
-      /* Tell gnucash to shutdown cleanly */
-      g_timeout_add(250, gnc_main_window_timed_quit, NULL);
-      already_dead = TRUE;
-    }
-    /* Cancel the window deletion. It'll happen on the just queued shutdown. */
-    return TRUE;
-  }
-
-  /* Tell gnucash to shutdown cleanly */
-  g_timeout_add(250, gnc_main_window_timed_quit, NULL);
-  already_dead = TRUE;
-
+  already_dead = gnc_main_window_quit(GNC_MAIN_WINDOW(window));
   return TRUE;
 }
 
@@ -2003,6 +2066,8 @@
 	GtkWidget *image;
 	GList *tmp;
 
+	ENTER("window %p, page %p", window, page);
+
 	if (window)
 	  g_return_if_fail (GNC_IS_MAIN_WINDOW (window));
 	g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));
@@ -2104,6 +2169,8 @@
 	 * Now install it all in the window.
 	 */
 	gnc_main_window_connect(window, page, tab_hbox, label);
+
+	LEAVE("");
 }
 
 
@@ -2958,25 +3025,10 @@
 static void
 gnc_main_window_cmd_file_quit (GtkAction *action, GncMainWindow *window)
 {
-	QofSession *session;
+    if (!gnc_main_window_all_finish_pending())
+        return;
 
-	if (gnc_file_save_in_progress()) {
-	  g_timeout_add(250, gnc_main_window_timed_quit, NULL);
-	  return;
-	}
-
-	if (!gnc_main_window_all_finish_pending())
-	  return;
-
-	session = gnc_get_current_session();
-	if (qof_book_not_saved(qof_session_get_book(session))) {
-	  if (gnc_main_window_prompt_for_save(GTK_WIDGET(window))) {
-	    /* User canceled */
-	    return;
-	  }
-	}
-
-	gnc_shutdown (0);
+    gnc_main_window_quit(window);
 }
 
 static void
@@ -3062,6 +3114,11 @@
   ENTER(" ");
   priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
   page = priv->current_page;
+  if (!page) {
+    LEAVE("No current page");
+    return;
+  }
+  
   tab_hbox = gtk_notebook_get_tab_label(GTK_NOTEBOOK(priv->notebook),
                                        page->notebook_page);
   children = gtk_container_get_children(GTK_CONTAINER(tab_hbox));
@@ -3439,21 +3496,17 @@
 {
 	GncMainWindow *window;
 	GncMainWindowPrivate *priv;
-	GList *winp, *tmp;
-	GSList *widgetp, *toplevels;
+	GList *groupp, *groups, *winp, *tmp;
 	GtkWidget *close_button;
 
 	for (winp = active_windows; winp; winp = g_list_next(winp)) {
 	  window = winp->data;
 	  priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
-	  toplevels = gtk_ui_manager_get_toplevels(window->ui_merge,
-						   GTK_UI_MANAGER_MENUBAR |
-						   GTK_UI_MANAGER_TOOLBAR |
-						   GTK_UI_MANAGER_POPUP);
-	  for (widgetp = toplevels; widgetp; widgetp = g_slist_next(widgetp)) {
-	    gtk_widget_set_sensitive (widgetp->data, sensitive);
+
+	  groups = gtk_ui_manager_get_action_groups(window->ui_merge);
+	  for (groupp = groups; groupp; groupp = g_list_next(groupp)) {
+	    gtk_action_group_set_sensitive(GTK_ACTION_GROUP(groupp->data), sensitive);
 	  }
-	  g_slist_free(toplevels);
 
 	  for (tmp = priv->installed_pages; tmp; tmp = g_list_next(tmp)) {
 	    close_button = g_object_get_data(tmp->data, PLUGIN_PAGE_CLOSE_BUTTON);

Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-plugin-file-history.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-plugin-file-history.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-plugin-file-history.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -251,17 +251,19 @@
 	  dst += g_sprintf(result, "_%d ", (index + 1) % 10);
 
 	/* Find the filename portion of the path */
-	src = g_utf8_strrchr(filename, -1, '/');
-	src = g_utf8_next_char(src);
+	src = g_utf8_strrchr(filename, -1, G_DIR_SEPARATOR);
+	if (src) {
+	  src = g_utf8_next_char(src);
 
-	/* Fix up any underline characters so they aren't mistaken as
-	 * command accelerator keys. */
-	for ( ; *src; src = g_utf8_next_char(src)) {
-	  unichar = g_utf8_get_char(src);
-	  dst += g_unichar_to_utf8 (unichar, dst);
+	  /* Fix up any underline characters so they aren't mistaken as
+	   * command accelerator keys. */
+	  for ( ; *src; src = g_utf8_next_char(src)) {
+	    unichar = g_utf8_get_char(src);
+	    dst += g_unichar_to_utf8 (unichar, dst);
 
-	  if (unichar == '_')
-	    dst += g_unichar_to_utf8 ('_', dst);
+	    if (unichar == '_')
+	      dst += g_unichar_to_utf8 ('_', dst);
+	  }
 	}
 
 	*dst = '\0';

Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-tree-view.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-tree-view.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-tree-view.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -796,7 +796,7 @@
   gboolean visible;
   gchar *key;
 
-  ENTER("column %p, name %s", column, pref_name);
+  ENTER("column %p, name %s", column, pref_name ? pref_name : "(null)");
   priv = GNC_TREE_VIEW_GET_PRIVATE(view);
   if (column) {
     if (g_object_get_data(G_OBJECT(column), ALWAYS_VISIBLE)) {
@@ -804,7 +804,7 @@
       return TRUE;
     }
     pref_name = (gchar *)g_object_get_data(G_OBJECT(column), PREF_NAME);
-    DEBUG("pref_name is %s", pref_name);
+    DEBUG("pref_name is %s", pref_name ? pref_name : "(null)");
   }
 
   if (!pref_name) {
@@ -1434,7 +1434,7 @@
       gtk_tree_view_column_set_visible(priv->column_menu_column, FALSE);
   }
   LEAVE("menu: show %d, section %s", priv->show_column_menu,
-	priv->gconf_section);
+	priv->gconf_section ? priv->gconf_section : "(null)");
 }
 
 /** This function is called to synchronize the checkbox on a menu item

Modified: gnucash/branches/register-rewrite/src/gnome-utils/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/gnome-utils/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -37,7 +37,7 @@
 TESTS_ENVIRONMENT := \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-link-module test-gnc-recurrence test-gnc-dialog test-register
 
 INCLUDES= \

Modified: gnucash/branches/register-rewrite/src/import-export/hbci/gnc-file-aqb-import.c
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/hbci/gnc-file-aqb-import.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/hbci/gnc-file-aqb-import.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -45,7 +45,6 @@
 #include "gnc-engine.h"
 #include "gnc-file.h"
 #include "gnc-ui-util.h"
-#include "gnc-gconf-utils.h"
 
 #include "gnc-hbci-utils.h"
 #include "gnc-hbci-gettrans.h"
@@ -153,9 +152,7 @@
   /* qof_log_check(MOD_IMPORT, QOF_LOG_TRACE); */
   DEBUG("gnc_file_dtaus_import(): Begin...\n");
 
-  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
-  if (default_dir == NULL)
-    gnc_init_default_directory(&default_dir);
+  default_dir = gnc_get_default_directory(GCONF_SECTION);
   selected_filename = gnc_file_dialog(_("Select an DTAUS file to process"),
 				      NULL,
 				      default_dir,
@@ -165,7 +162,7 @@
   if(selected_filename!=NULL) {
     /* Remember the directory as the default. */
     default_dir = g_path_get_dirname(selected_filename);
-    gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
+    gnc_set_default_directory(GCONF_SECTION, default_dir);
     g_free(default_dir);
 
     /*strncpy(file,selected_filename, 255);*/

Modified: gnucash/branches/register-rewrite/src/import-export/hbci/gnc-hbci-getbalance.c
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/hbci/gnc-hbci-getbalance.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/hbci/gnc-hbci-getbalance.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -217,6 +217,10 @@
     ti=AB_Balance_GetTime(booked_grp);
     if (ti)
       booked_tt = GWEN_Time_toTime_t (ti);
+    else
+      /* No time found? Use today because the HBCI query asked for
+	 today's balance. */
+      booked_tt = gnc_timet_get_day_start(time(NULL));
     booked_val = AB_Balance_GetValue(booked_grp);
     if (booked_val)
       booked_value = AB_Value_GetValue (booked_val);

Modified: gnucash/branches/register-rewrite/src/import-export/hbci/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/hbci/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/hbci/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,6 +1,6 @@
 TESTS=test-link-module
 
-noinst_PROGRAMS=test-link-module
+check_PROGRAMS=test-link-module
 
 test_link_module_SOURCES=test-link-module.c
 test_link_module_LDADD=../libgncmod-hbci.la 

Modified: gnucash/branches/register-rewrite/src/import-export/log-replay/gnc-log-replay.c
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/log-replay/gnc-log-replay.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/log-replay/gnc-log-replay.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -43,7 +43,6 @@
 #include "qof.h"
 #include "gnc-book.h"
 #include "gnc-ui-util.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 
 #define GCONF_SECTION "dialogs/log_replay"
@@ -515,9 +514,7 @@
   qof_log_set_level(GNC_MOD_IMPORT, QOF_LOG_DEBUG);
   ENTER(" ");
 
-  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
-  if (default_dir == NULL)
-    gnc_init_default_directory(&default_dir);
+  default_dir = gnc_get_default_directory(GCONF_SECTION);
 
   filter = gtk_file_filter_new();
   gtk_file_filter_set_name(filter, "*.log");
@@ -526,12 +523,14 @@
 				      g_list_prepend(NULL, filter),
 				      default_dir,
 				      GNC_FILE_DIALOG_OPEN);
+  g_free(default_dir);
 
   if(selected_filename!=NULL)
     {
       /* Remember the directory as the default. */
-      gnc_extract_directory(&default_dir, selected_filename);
-      gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
+      default_dir = g_path_get_dirname(selected_filename);
+      gnc_set_default_directory(GCONF_SECTION, default_dir);
+      g_free(default_dir);
 
       /*strncpy(file,selected_filename, 255);*/
       DEBUG("Filename found: %s",selected_filename);
@@ -582,7 +581,6 @@
       }
       g_free(selected_filename);
     }
-  g_free(default_dir);
 }
 
 

Modified: gnucash/branches/register-rewrite/src/import-export/ofx/gnc-ofx-import.c
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/ofx/gnc-ofx-import.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/ofx/gnc-ofx-import.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -46,7 +46,6 @@
 #include "gnc-engine.h"
 #include "gnc-book.h"
 #include "gnc-ui-util.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-glib-utils.h"
 
 #define GCONF_SECTION "dialogs/import/ofx"
@@ -648,23 +647,19 @@
   qof_log_check(GNC_MOD_IMPORT, QOF_LOG_TRACE);
   DEBUG("gnc_file_ofx_import(): Begin...\n");
 
-  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
-  if (default_dir == NULL)
-    gnc_init_default_directory(&default_dir);
+  default_dir = gnc_get_default_directory(GCONF_SECTION);
   selected_filename = gnc_file_dialog(_("Select an OFX/QFX file to process"),
 				      NULL,
 				      default_dir,
 				      GNC_FILE_DIALOG_IMPORT);
   g_free(default_dir);
-  default_dir = NULL;
 
   if(selected_filename!=NULL)
     {
       /* Remember the directory as the default. */
-      gnc_extract_directory(&default_dir, selected_filename);
-      gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
+      default_dir = g_path_get_dirname(selected_filename);
+      gnc_set_default_directory(GCONF_SECTION, default_dir);
       g_free(default_dir);
-      default_dir = NULL;
 
       /*strncpy(file,selected_filename, 255);*/
       DEBUG("Filename found: %s",selected_filename);

Modified: gnucash/branches/register-rewrite/src/import-export/ofx/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/ofx/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/ofx/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,7 +1,7 @@
 TESTS=test-link
 
 AM_CFLAGS=${LIBOFX_CFLAGS}
-noinst_PROGRAMS=test-link
+check_PROGRAMS=test-link
 
 test_link_SOURCES=test-link.c
 test_link_LDADD=../libgncmod-ofx.la 

Modified: gnucash/branches/register-rewrite/src/import-export/qif/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -46,7 +46,7 @@
   GNC_TEST_FILES=${srcdir}/test-files \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-link \
   test-qif
 

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -51,6 +51,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/druid-qif-import.c
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/druid-qif-import.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/druid-qif-import.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -378,9 +378,7 @@
   char *file_name, *default_dir;
 
   /* Default to whatever's already present */
-  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
-  if (default_dir == NULL)
-    gnc_init_default_directory(&default_dir);
+  default_dir = gnc_get_default_directory(GCONF_SECTION);
 
   filter = gtk_file_filter_new ();
   gtk_file_filter_set_name (filter, "*.qif");
@@ -393,20 +391,20 @@
   /* Insure valid data, and something that can be freed. */
   if (new_file_name == NULL) {
     file_name = g_strdup(default_dir);
-  } else if (*new_file_name != '/') {
-    file_name = g_strdup_printf("%s%s", default_dir, new_file_name);
+  } else if (!g_path_is_absolute(new_file_name)) {
+    file_name = g_build_filename(default_dir, new_file_name, NULL);
     g_free(new_file_name);
   } else {
     file_name = new_file_name;
+    /* Update the working directory */
+    g_free(default_dir);
+    default_dir = g_path_get_dirname(file_name);
+    gnc_set_default_directory(GCONF_SECTION, default_dir);
   }
+  g_free(default_dir);
 
   /* set the filename entry for what was selected */
   gtk_entry_set_text(GTK_ENTRY(wind->filename_entry), file_name);
-
-  /* Update the working directory */
-  gnc_extract_directory(&default_dir, file_name);
-  gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
-  g_free(default_dir);
   g_free(file_name);
 }
 

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/qif-dialog-utils.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/qif-dialog-utils.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/qif-dialog-utils.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -612,7 +612,7 @@
 		    (book (xaccGroupGetBook (gnc-get-current-group)))
                     (existing-type 
                      (xaccAccountGetType existing-gnc-acct)))
-               (if (and existing-gnc-acct 
+               (if (and (not (null? existing-gnc-acct)) 
                         (memv existing-type (list GNC-STOCK-TYPE 
                                                   GNC-MUTUAL-TYPE)))
                    ;; gnc account already exists... we *know* what the 

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/qif-file.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/qif-file.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/qif-file.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -40,16 +40,13 @@
           (tag #f)
           (value #f)
           (heinous-error #f)
-          (start-time #f)
-          (end-time #f)
           (delimiters (string #\cr #\nl))
-          (progress-dialog #f)
+          (progress-dialog '())
           (file-stats (stat path))
           (file-size (stat:size file-stats))
           (bytes-read 0))
 
      (qif-file:set-path! self path)
-     (set! start-time (gettimeofday))
 
      (if (> file-size 10000)
          (begin
@@ -386,7 +383,7 @@
                            (set! heinous-error #t))))))
 
 		 ;; update the progress bar for each line read
-		 (if progress-dialog 
+		 (if (not (null? progress-dialog)) 
 		     (begin 
 		       (gnc-progress-dialog-set-value
 			progress-dialog (/ bytes-read file-size))
@@ -405,7 +402,7 @@
      ;; they were in the file.  This is important in a few cases. 
      (qif-file:set-xtns! self (reverse (qif-file:xtns self)))
 
-     (if progress-dialog
+     (if (not (null? progress-dialog))
          (gnc-progress-dialog-destroy progress-dialog))
 
      return-val)))

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/qif-guess-map.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/qif-guess-map.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/qif-guess-map.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -26,7 +26,7 @@
 
 (define (qif-import:load-map-prefs)
   (define (extract-all-account-info agroup root-name)
-    (if (not agroup)
+    (if (null? agroup)
         '()
         (let ((children-list (xaccGroupGetAccountListSorted agroup))
               (names '()))

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/qif-merge-groups.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/qif-merge-groups.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/qif-merge-groups.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -35,7 +35,7 @@
   ;; trying to find matches in the new group.  If there are matches, 
   ;; push the matches onto a list. 
   (let* ((new-xtns (gnc:group-get-transactions new-group))
-	 (progress-dialog #f)
+	 (progress-dialog '())
 	 (work-to-do (length new-xtns))
 	 (work-done 0)
          (matches '()))    
@@ -53,7 +53,7 @@
      (lambda (xtn) 
        (let ((query (qof-query-create-for-splits)))
 	 (set! work-done (+ 1 work-done))
-	 (if progress-dialog 
+	 (if (not (null? progress-dialog)) 
 	     (begin 
 	       (gnc-progress-dialog-set-value
 		progress-dialog (/ work-done work-to-do))
@@ -132,7 +132,7 @@
      new-xtns)
     
     ;; get rid of the progress dialog 
-    (if progress-dialog
+    (if (not (null? progress-dialog))
 	(gnc-progress-dialog-destroy progress-dialog))
 
     ;; return the matches 

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/qif-parse.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/qif-parse.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/qif-parse.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -219,7 +219,7 @@
 ;           'expire)
 ;          ((grant)
 ;           'grant)
-          ((int intinc aktzu) ;; zinsen
+          ((int intinc) ;; zinsen
            'intinc)
           ((intx intincx)
            'intincx)

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/qif-to-gnc.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/qif-to-gnc.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/qif-to-gnc.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -38,13 +38,13 @@
 	     #t))))
     
     (define (make-unique-name-variant long-name short-name)
-      (if (xaccGetAccountFromFullName old-group long-name)
+      (if (not (null? (xaccGetAccountFromFullName old-group long-name)))
           (let loop ((count 2))
             (let* ((test-name 
                     (string-append long-name (sprintf #f " %a" count)))
                    (test-acct 
                     (xaccGetAccountFromFullName old-group test-name)))
-              (if (and test-acct (not (compatible? test-acct)))
+              (if (and (not (null? test-acct)) (not (compatible? test-acct)))
                   (loop (+ 1 count))
                   (string-append short-name (sprintf #f " %a" count)))))
           short-name))
@@ -53,7 +53,7 @@
     ;; if the name is in use but the commodity, or type are
     ;; incompatible, we need to create a new account with a modified
     ;; name.
-    (if same-gnc-account 
+    (if (and same-gnc-account (not (null? same-gnc-account))) 
         (if (compatible? same-gnc-account)
             (begin 
               ;; everything is ok, so we can just use the same
@@ -77,7 +77,8 @@
     ;; here, existing-account means a previously *created* account
     ;; (possibly a new account, possibly a copy of an existing gnucash
     ;; acct)
-    (if (and existing-account (compatible? existing-account))
+    (if (and (and existing-account (not (null? existing-account))) 
+             (compatible? existing-account))
         existing-account 
         (let ((new-acct (xaccMallocAccount (gnc-get-current-book)))
               (parent-acct #f)
@@ -91,7 +92,7 @@
           ;; 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
+          (if (and same-gnc-account (not (null? same-gnc-account)))
               (begin 
                 (xaccAccountSetName
                  new-acct (xaccAccountGetName same-gnc-account))
@@ -156,7 +157,7 @@
                 (set! parent-acct (qif-import:find-or-make-acct 
                                    pinfo #t default-currency #f default-currency
                                    gnc-acct-hash old-group new-group))))
-          (if parent-acct
+          (if (and parent-acct (not (null? parent-acct)))
               (xaccAccountInsertSubAccount parent-acct new-acct)
               (xaccGroupInsertAccount new-group new-acct))
           
@@ -192,7 +193,7 @@
                    (lambda (a b)
                      (> (length (qif-file:xtns a)) 
                         (length (qif-file:xtns b))))))
-            (progress-dialog #f)
+            (progress-dialog '())
             (work-to-do 0)
             (work-done 0))
        
@@ -308,7 +309,7 @@
            (let xloop ((xtn (car markable-xtns))
                        (rest (cdr markable-xtns)))
              (set! work-done (+ 1 work-done))
-             (if progress-dialog 
+             (if (not (null? progress-dialog)) 
                  (begin 
                    (gnc-progress-dialog-set-value
                     progress-dialog (/ work-done work-to-do))
@@ -325,7 +326,7 @@
           (for-each 
            (lambda (xtn)
              (set! work-done (+ 1 work-done))
-             (if progress-dialog 
+             (if (not (null? progress-dialog)) 
                  (begin 
                    (gnc-progress-dialog-set-value
                     progress-dialog (/ work-done work-to-do))
@@ -352,7 +353,7 @@
         sorted-qif-files-list)
        
        ;; get rid of the progress dialog 
-       (if progress-dialog
+       (if (not (null? progress-dialog))
            (gnc-progress-dialog-destroy progress-dialog))
        
        new-group))))

Modified: gnucash/branches/register-rewrite/src/import-export/qif-import/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-import/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-import/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,6 +1,6 @@
 TESTS=test-link
 
-noinst_PROGRAMS=test-link
+check_PROGRAMS=test-link
 
 test_link_SOURCES = \
   test-link.c

Modified: gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-acct-table.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-acct-table.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-acct-table.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -59,7 +59,7 @@
                 (type (qif-io:account-type qif-acct))
                 (desc (qif-io:account-description qif-acct))
                 (gnc-acct (hash-ref qif-acct-table name)))
-           (if gnc-acct
+           (if (and gnc-acct (not (null? gnc-acct)))
                (let ((gnc-type (qif-io:parse-acct-type type)))
                  (xaccAccountBeginEdit gnc-acct)
                  (if gnc-type 
@@ -73,7 +73,7 @@
       (hash-fold
        (lambda (name acct p)
          (let ((cmdty (xaccAccountGetCommodity acct)))
-           (if (not cmdty)
+           (if (null? cmdty)
                (begin 
                  (xaccAccountBeginEdit acct)
                  (xaccAccountSetCommodity acct commodity)
@@ -94,7 +94,7 @@
                 (income? (qif-io:category-income-cat qif-cat))
                 (desc (qif-io:category-description qif-cat))
                 (gnc-acct (hash-ref qif-cat-table name)))
-           (if gnc-acct
+           (if (and gnc-acct (not (null? gnc-acct)))
                (begin 
                  (xaccAccountBeginEdit gnc-acct)
                  (cond (income?
@@ -108,7 +108,7 @@
       (hash-fold
        (lambda (name acct p)
          (let ((cmdty (xaccAccountGetCommodity acct)))
-           (if (not cmdty)
+           (if (null? cmdty)
                (begin 
                  (xaccAccountBeginEdit acct)
                  (xaccAccountSetCommodity acct commodity)

Modified: gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-bank-xtn-import.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-bank-xtn-import.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-bank-xtn-import.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -56,7 +56,7 @@
                     gnc-acct-info acct-name acct-type))
              (split (xaccMallocSplit (gnc-get-current-book))))
         ;; make the account if necessary 
-        (if (not acct)
+        (if (or (not acct) (null? acct))
             (begin 
               (set! acct (xaccMallocAccount (gnc-get-current-book)))
               (xaccAccountBeginEdit acct)

Modified: gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-invst-xtn-import.scm
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-invst-xtn-import.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/qif-io-core/qif-invst-xtn-import.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -156,7 +156,7 @@
                     gnc-acct-info acct-name acct-type))
              (split (xaccMallocSplit (gnc-get-current-book))))
         ;; make the account if necessary 
-        (if (not acct)
+        (if (or (not acct) (null? acct))
             (begin 
               (set! acct (xaccMallocAccount (gnc-get-current-book)))
               (xaccAccountSetName acct acct-name)

Modified: gnucash/branches/register-rewrite/src/import-export/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/import-export/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/import-export/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -43,6 +43,6 @@
 TESTS_ENVIRONMENT := \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-link \
   test-import-parse

Modified: gnucash/branches/register-rewrite/src/network-utils/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/network-utils/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/network-utils/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -7,6 +7,7 @@
   test-load-module
 
 GNC_TEST_DEPS := \
+  --gnc-module-dir ${top_builddir}/src/core-utils \
   --gnc-module-dir ${top_builddir}/src/gnc-module \
   --library-dir    ${top_builddir}/lib/libqof/qof \
   --gnc-module-dir ${top_builddir}/src/network-utils
@@ -14,7 +15,7 @@
 TESTS_ENVIRONMENT := \
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-link-module
 
 test_link_module_SOURCES=test-link-module.c

Modified: gnucash/branches/register-rewrite/src/pixmaps/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/pixmaps/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/pixmaps/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -28,6 +28,7 @@
   gnc-sx-new.png \
   gnc-transfer-16.png \
   gnc-transfer.png \
+  gnucash-icon.ico \
   gnucash-icon.png \
   gnucash_splash.png \
   stock_split_title.png \

Copied: gnucash/branches/register-rewrite/src/pixmaps/gnucash-icon.ico (from rev 15313, gnucash/trunk/src/pixmaps/gnucash-icon.ico)

Modified: gnucash/branches/register-rewrite/src/quotes/gnc-fq-check.in
===================================================================
--- gnucash/branches/register-rewrite/src/quotes/gnc-fq-check.in	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/quotes/gnc-fq-check.in	2007-01-05 23:51:55 UTC (rev 15316)
@@ -41,7 +41,7 @@
 # non-zero - failure
 
 sub check_modules {
-  my @modules = qw(Finance::Quote LWP HTML::Parser HTML::TableExtract Crypt::SSLeay);
+  my @modules = qw(Finance::Quote LWP HTML::Parser HTML::TableExtract Crypt::SSLeay Date::Manip);
   my @missing;
 
   foreach my $mod (@modules) {

Modified: gnucash/branches/register-rewrite/src/quotes/gnc-fq-update.in
===================================================================
--- gnucash/branches/register-rewrite/src/quotes/gnc-fq-update.in	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/quotes/gnc-fq-update.in	2007-01-05 23:51:55 UTC (rev 15316)
@@ -39,6 +39,7 @@
 }
 
 CPAN::Shell->install('LWP');
+CPAN::Shell->install('Date::Manip');
 CPAN::Shell->install('HTML::Parser');
 CPAN::Shell->install('HTML::TableExtract');
 CPAN::Shell->install('Crypt::SSLeay');

Modified: gnucash/branches/register-rewrite/src/register/ledger-core/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/register/ledger-core/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/register/ledger-core/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -1,6 +1,6 @@
 TESTS =  test-link-module
 
-noinst_PROGRAMS = test-link-module
+check_PROGRAMS = test-link-module
 
 test_link_module_SOURCES=test-link-module.c
 test_link_module_LDADD=../libgncmod-ledger-core.la

Modified: gnucash/branches/register-rewrite/src/register/register-core/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/register/register-core/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/register/register-core/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -8,7 +8,7 @@
    LTDL_LIBRARY_PATH=.. \
    LD_LIBRARY_PATH=${top_builddir}/src/gnc-module:${top_builddir}/src/gnc-module/.libs:${top_builddir}/src/engine:${top_builddir}/src/engine/.libs:${top_builddir}/src/calculation:${top_builddir}/src/calculation/.libs:${top_builddir}/src/network-utils:${top_builddir}/src/network-utils/.libs
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-link-module
 
 test_link_module_SOURCES=test-link-module.c

Modified: gnucash/branches/register-rewrite/src/register/register-gnome/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/register/register-gnome/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/register/register-gnome/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -8,7 +8,7 @@
    LTDL_LIBRARY_PATH=.. \
    LD_LIBRARY_PATH=${top_builddir}/src/gnc-module:${top_builddir}/src/gnc-module/.libs:${top_builddir}/src/engine:${top_builddir}/src/engine/.libs:${top_builddir}/src/calculation:${top_builddir}/src/calculation/.libs:${top_builddir}/src/network-utils:${top_builddir}/src/network-utils/.libs
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-link-module
 
 test_link_module_SOURCES = test-link-module.c

Modified: gnucash/branches/register-rewrite/src/report/locale-specific/us/taxtxf-de_DE.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/locale-specific/us/taxtxf-de_DE.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/locale-specific/us/taxtxf-de_DE.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -660,7 +660,7 @@
                    (to-special #f)	; clear special-splits-period
                    (from-special #f)
                    (childrens-output 
-                    (if (not children)
+                    (if (null? children)
                         (let* ((splits-period (txf-special-splits-period
                                                account from-value to-value)))
                           (if splits-period
@@ -736,7 +736,7 @@
                         (if tax-mode?
                             (list level-x-output
                                   childrens-output)
-                            (if (not children) ; swap for txf special splt
+                            (if (null? children) ; swap for txf special splt
                                 (list childrens-output level-x-output)
                                 (list level-x-output childrens-output)))))))
             ;; Ignore

Modified: gnucash/branches/register-rewrite/src/report/locale-specific/us/taxtxf.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/locale-specific/us/taxtxf.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/locale-specific/us/taxtxf.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -637,7 +637,7 @@
                    (to-special #f)	; clear special-splits-period
                    (from-special #f)
                    (childrens-output 
-                    (if (not children)
+                    (if (null? children)
                         (let* ((splits-period (txf-special-splits-period
                                                account from-value to-value)))
                           (if splits-period
@@ -713,7 +713,7 @@
                         (if tax-mode?
                             (list level-x-output
                                   childrens-output)
-                            (if (not children) ; swap for txf special splt
+                            (if (null? children) ; swap for txf special splt
                                 (list childrens-output level-x-output)
                                 (list level-x-output childrens-output)))))))
             ;; Ignore

Modified: gnucash/branches/register-rewrite/src/report/locale-specific/us/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/report/locale-specific/us/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/locale-specific/us/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -30,7 +30,7 @@
 
 EXTRA_DIST = test-load-module
 
-noinst_PROGRAMS = test-link-module
+check_PROGRAMS = test-link-module
 
 testit:
 	${TESTS_ENVIRONMENT} gdb guile

Modified: gnucash/branches/register-rewrite/src/report/report-gnome/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-gnome/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-gnome/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -7,6 +7,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_builddir}/src \
   -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/engine \
@@ -51,7 +52,7 @@
   ${GLIB_LIBS}
 
 if BUILDING_FROM_SVN
-swig-report-gnome.c: report-gnome.i
+swig-report-gnome.c: report-gnome.i ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif

Modified: gnucash/branches/register-rewrite/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-gnome/gnc-plugin-page-report.c	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-gnome/gnc-plugin-page-report.c	2007-01-05 23:51:55 UTC (rev 15316)
@@ -319,6 +319,8 @@
         char * url_location = NULL;
         char * url_label = NULL;
 
+	ENTER("page %p", page);
+
         report = GNC_PLUGIN_PAGE_REPORT(page);
         priv = GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(report);
 
@@ -347,7 +349,9 @@
         child_name = gnc_build_url( URL_TYPE_REPORT, id_name, NULL );
         type = gnc_html_parse_url( priv->html, child_name, &url_location, &url_label);
         DEBUG( "passing id_name=[%s] child_name=[%s] type=[%s], location=[%s], label=[%s]",
-               id_name, child_name, type, url_location, url_label );
+               id_name, child_name ? child_name : "(null)",
+               type ? type : "(null)", url_location ? url_location : "(null)",
+               url_label ? url_label : "(null)" );
 
         gnc_window_set_progressbar_window( GNC_WINDOW(page->window) );
         gnc_html_show_url(priv->html, type, url_location, url_label, 0);
@@ -358,6 +362,8 @@
   
         gtk_widget_show_all( GTK_WIDGET(priv->container) );
 
+	LEAVE("container %p", priv->container);
+
         return GTK_WIDGET( priv->container );
 }
 
@@ -431,7 +437,8 @@
         SCM  inst_report;
 
         ENTER( "load_cb: type=[%s], location=[%s], label=[%s]",
-               type, location, label );
+               type ? type : "(null)", location ? location : "(null)",
+               label ? label : "(null)" );
 
         /* we get this callback if a new report is requested to be loaded OR
          * if any URL is clicked.  If an options URL is clicked, we want to
@@ -834,7 +841,8 @@
   /* Is this a redundant call? */
   old_name = gnc_option_db_lookup_string_option(priv->cur_odb, "General",
 						"Report name", NULL);
-  DEBUG("Comparing old name '%s' to new name '%s'", old_name, name);
+  DEBUG("Comparing old name '%s' to new name '%s'",
+	old_name ? old_name : "(null)", name);
   if (old_name && (strcmp(old_name, name) == 0)) {
     LEAVE("no change");
     return;

Modified: gnucash/branches/register-rewrite/src/report/report-gnome/report-gnome.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-gnome/report-gnome.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-gnome/report-gnome.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -34,7 +34,7 @@
 ;; instead, this function's side-effect is to set the report's editor widget.
 (define (gnc:report-edit-options report) 
   (let* ((editor-widg (gnc:report-editor-widget report)))
-    (if editor-widg
+    (if (and editor-widg (not (null? editor-widg)))
         (gnc-report-raise-editor report)
         (begin
           (if (gnc:report-options report) 

Modified: gnucash/branches/register-rewrite/src/report/report-gnome/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-gnome/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-gnome/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -28,6 +28,6 @@
 
 LDADD = ../libgncmod-report-gnome.la 
 
-noinst_PROGRAMS = test-link-module 
+check_PROGRAMS = test-link-module 
 
 EXTRA_DIST = test-load-module

Modified: gnucash/branches/register-rewrite/src/report/report-system/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-system/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-system/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -18,7 +18,7 @@
   ${GLIB_LIBS}
 
 if BUILDING_FROM_SVN
-swig-report-system.c: report-system.i
+swig-report-system.c: report-system.i ${top_srcdir}/src/base-typemaps.i
 	$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
 	-I${top_srcdir}/src -o $@ $<
 endif

Modified: gnucash/branches/register-rewrite/src/report/report-system/gnc-report.h
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-system/gnc-report.h	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-system/gnc-report.h	2007-01-05 23:51:55 UTC (rev 15316)
@@ -38,6 +38,7 @@
  **/
 gchar* gnc_report_name( SCM report );
 
+/* returns #f if the report id cannot be found */
 SCM gnc_report_find(gint id);
 void gnc_report_remove_by_id(gint id);
 gint gnc_report_add(SCM report);

Modified: gnucash/branches/register-rewrite/src/report/report-system/html-utilities.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-system/html-utilities.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-system/html-utilities.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -78,14 +78,14 @@
 
 ;; returns the account name as html-text and anchor to the register.
 (define (gnc:html-account-anchor acct)
-  (gnc:make-html-text (if acct
+  (gnc:make-html-text (if (and acct (not (null? acct)))
                           (gnc:html-markup-anchor
                            (gnc:account-anchor-text acct)
                            (xaccAccountGetName acct))
                           "")))
 
 (define (gnc:html-split-anchor split text)
-  (gnc:make-html-text (if (xaccSplitGetAccount split)
+  (gnc:make-html-text (if (not (null? (xaccSplitGetAccount split)))
                           (gnc:html-markup-anchor
                            (gnc:split-anchor-text split)
                            text)

Modified: gnucash/branches/register-rewrite/src/report/report-system/report.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-system/report.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-system/report.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -434,19 +434,13 @@
 ;; marks the cursor busy during rendering; returns the html
 (define (gnc:report-run id)
   (let ((report (gnc-report-find id))
-	(start-time (gettimeofday))
 	(html #f))
     (gnc-set-busy-cursor '() #t)
     (gnc:backtrace-if-exception 
      (lambda ()
        (if report
 	   (begin 
-	     (set! html (gnc:report-render-html report #t))
-;;	     (display "total time to run report: ")
-;;	     (display (gnc:time-elapsed start-time (gettimeofday)))
-;;	     (newline)
-;;	     (display html) (newline)
-	     ))))
+	     (set! html (gnc:report-render-html report #t))))))
     (gnc-unset-busy-cursor '())
     html))
 

Modified: gnucash/branches/register-rewrite/src/report/report-system/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/report/report-system/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/report-system/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -29,6 +29,6 @@
 
 LDADD = ../libgncmod-report-system.la 
 
-noinst_PROGRAMS = test-link-module 
+check_PROGRAMS = test-link-module 
 
 EXTRA_DIST = test-load-module

Modified: gnucash/branches/register-rewrite/src/report/standard-reports/account-piecharts.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/standard-reports/account-piecharts.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/standard-reports/account-piecharts.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -188,7 +188,8 @@
 
         (show-fullname? (get-option gnc:pagename-display optname-fullname))
         (show-total? (get-option gnc:pagename-display optname-show-total))
-        (max-slices (get-option gnc:pagename-display optname-slices))
+        (max-slices (inexact->exact
+		     (get-option gnc:pagename-display optname-slices)))
         (height (get-option gnc:pagename-display optname-plot-height))
         (width (get-option gnc:pagename-display optname-plot-width))
 	(sort-method (get-option gnc:pagename-display optname-sort-method))

Modified: gnucash/branches/register-rewrite/src/report/standard-reports/budget.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/standard-reports/budget.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/standard-reports/budget.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -285,7 +285,7 @@
     (define (account-get-depth account)
       (define (account-get-depth-internal account-internal depth)
         (let ((parent (xaccAccountGetParentAccount account-internal)))
-          (if parent
+          (if (not (null? parent))
             (account-get-depth-internal parent (+ depth 1))
             depth)))
       (account-get-depth-internal account 1))

Modified: gnucash/branches/register-rewrite/src/report/standard-reports/cash-flow.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/standard-reports/cash-flow.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/standard-reports/cash-flow.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -185,7 +185,7 @@
     (define (account-get-depth account)
       (define (account-get-depth-internal account-internal depth)
         (let ((parent (xaccAccountGetParentAccount account-internal)))
-          (if parent
+          (if (not (null? parent))
             (account-get-depth-internal parent (+ depth 1))
             depth)))
       (account-get-depth-internal account 1))
@@ -277,7 +277,7 @@
                                        (s-commodity (xaccAccountGetCommodity s-account)))
 				  ;; Check if this is a dangling split
 				  ;; and print a warning
-				  (if (not s-account)
+				  (if (null? s-account)
 				      (display
 				       (string-append
 					"WARNING: s-account is NULL for split: "
@@ -285,7 +285,7 @@
 
                                   ;(gnc:debug (xaccAccountGetName s-account))
                                   (if (and	 ;; make sure we don't have
-				       s-account ;;  any dangling splits
+				       (not (null? s-account)) ;;  any dangling splits
 				       (not (account-in-list? s-account accounts)))
 				      (if (not (split-in-list? s seen-split-list))
 					  (begin  

Modified: gnucash/branches/register-rewrite/src/report/standard-reports/category-barchart.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/standard-reports/category-barchart.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/standard-reports/category-barchart.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -200,7 +200,8 @@
         
         (stacked? (get-option gnc:pagename-display optname-stacked))
         (show-fullname? (get-option gnc:pagename-display optname-fullname))
-        (max-slices (get-option gnc:pagename-display optname-slices))
+        (max-slices (inexact->exact
+		     (get-option gnc:pagename-display optname-slices)))
         (height (get-option gnc:pagename-display optname-plot-height))
         (width (get-option gnc:pagename-display optname-plot-width))
 	(sort-method (get-option gnc:pagename-display optname-sort-method))

Modified: gnucash/branches/register-rewrite/src/report/standard-reports/register.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/standard-reports/register.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/standard-reports/register.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -116,7 +116,7 @@
 (define (gnc:split-get-balance-display split)
   (let ((account (xaccSplitGetAccount split))
         (balance (xaccSplitGetBalance split)))
-    (if (and account (gnc-reverse-balance account))
+    (if (and (not (null? account)) (gnc-reverse-balance account))
         (gnc-numeric-neg balance)
         balance)))
 
@@ -125,7 +125,7 @@
   (let* ((row-contents '())
          (parent (xaccSplitGetParent split))
          (account (xaccSplitGetAccount split))
-         (currency (if account
+         (currency (if (not (null? account))
                        (xaccAccountGetCommodity account)
                        (gnc-default-currency)))
          (damount (xaccSplitGetAmount split))
@@ -157,7 +157,7 @@
                     (if transaction-info?
                         (let ((other-split
                                (xaccSplitGetOtherSplit split)))
-                          (if other-split
+                          (if (not (null? other-split))
                               (gnc-account-get-full-name
                                (xaccSplitGetAccount other-split))
                               (_ "-- Split Transaction --")))
@@ -343,7 +343,7 @@
 
       (define (display-subtotal monetary)
         (if (amount-single-col used-columns)
-            (if (and leader (gnc-reverse-balance leader))
+            (if (and (not (null? leader)) (gnc-reverse-balance leader))
                 (gnc:monetary-neg monetary)
                 monetary)
             (if (gnc-numeric-negative-p (gnc:gnc-monetary-amount monetary))
@@ -453,11 +453,11 @@
 
   (define (splits-leader splits)
     (let ((accounts (map xaccSplitGetAccount splits)))
-      (if (null? accounts) #f
+      (if (null? accounts) '()
           (begin
             (set! accounts (cons (car accounts)
                                  (delete (car accounts) (cdr accounts))))
-            (if (not (null? (cdr accounts))) #f
+            (if (not (null? (cdr accounts))) '()
                 (car accounts))))))
 
   (let* ((table (gnc:make-html-table))

Modified: gnucash/branches/register-rewrite/src/report/standard-reports/standard-reports.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/standard-reports/standard-reports.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/standard-reports/standard-reports.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -61,7 +61,7 @@
     (gnc:debug "hash: " gnc:*register-report-hash*)
     (gnc:debug "split: " split)
     (if type-info
-	(if split
+	(if (not (null? split))
 	    (begin (gnc:debug "get-split...") (get-split type-info))
 	    (begin (gnc:debug "get-non-split...") (get-non-split type-info)))
 	#f)))

Modified: gnucash/branches/register-rewrite/src/report/standard-reports/transaction.scm
===================================================================
--- gnucash/branches/register-rewrite/src/report/standard-reports/transaction.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/report/standard-reports/transaction.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -128,8 +128,8 @@
 
 ;; display an account name depending on the options the user has set
 (define (account-namestring account show-account-code show-account-name show-account-full-name)
-  ;;# on multi-line splits we can get an empty (#f) account
-  (if (not account)
+  ;;# on multi-line splits we can get an empty ('()) account
+  (if (null? account)
         (_ "Split")
         (string-append 
            ;; display account code?
@@ -418,7 +418,7 @@
          (parent (xaccSplitGetParent split))
          (account (xaccSplitGetAccount split))
          (account-type (xaccAccountGetType account))
-         (currency (if account
+         (currency (if (not (null? account))
                        (xaccAccountGetCommodity account)
                        (gnc-default-currency)))
 	 (report-currency (if (opt-val gnc:pagename-general optname-common-currency)

Modified: gnucash/branches/register-rewrite/src/scm/price-quotes.scm
===================================================================
--- gnucash/branches/register-rewrite/src/scm/price-quotes.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/scm/price-quotes.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -30,8 +30,8 @@
 (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
 (use-modules (gnucash gnc-module))
 (use-modules (gnucash core-utils))
-(use-modules (sw_gnome_utils)) ;; for gnucash-ui-is-running
 
+(gnc:module-load "gnucash/gnome-utils" 0) ;; for gnucash-ui-is-running
 (gnc:module-load "gnucash/app-utils" 0)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Modified: gnucash/branches/register-rewrite/src/scm/printing/print-check.scm
===================================================================
--- gnucash/branches/register-rewrite/src/scm/printing/print-check.scm	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/scm/printing/print-check.scm	2007-01-05 23:51:55 UTC (rev 15316)
@@ -108,7 +108,7 @@
 	 (payee-stub-text "")
 	 (memo-stub-text ""))
 
-    (if ps
+    (if (not (null? ps))
      (begin
       (if (not (eq? (print-check-format:format format-info) 'custom))
           (begin 

Modified: gnucash/branches/register-rewrite/src/tax/us/test/Makefile.am
===================================================================
--- gnucash/branches/register-rewrite/src/tax/us/test/Makefile.am	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/src/tax/us/test/Makefile.am	2007-01-05 23:51:55 UTC (rev 15316)
@@ -2,6 +2,7 @@
 
 # Some of these dirs may not be needed anymore.
 GNC_TEST_DEPS := \
+  --gnc-module-dir ${top_builddir}/src/core-utils \
   --gnc-module-dir ${top_builddir}/src/gnc-module \
   --gnc-module-dir ${top_builddir}/src/engine \
   --gnc-module-dir ${top_builddir}/src/report/report-system \
@@ -23,6 +24,6 @@
 
 EXTRA_DIST = test-load-module
 
-noinst_PROGRAMS=test-link-module 
+check_PROGRAMS=test-link-module 
 test_link_module_SOURCES=test-link-module.c
 test_link_module_LDADD=../libgncmod-tax-us.la ${GUILE_LIBS} ${GLIB_LIBS}

Modified: gnucash/branches/register-rewrite/util/gnc-svnversion
===================================================================
--- gnucash/branches/register-rewrite/util/gnc-svnversion	2007-01-05 23:45:26 UTC (rev 15315)
+++ gnucash/branches/register-rewrite/util/gnc-svnversion	2007-01-05 23:51:55 UTC (rev 15316)
@@ -4,7 +4,7 @@
 #   gnc-svnversion <srcdir>
 #
 # Prints the revision number to stdout and exits 0 on success
-# exits with errorcode 1 if we're not in an svn or svk checkout
+# exits with errorcode 1 if we're not in an svn, svk or git checkout
 #
 # Written By:  Derek Atkins <derek at ihtfp.com>
 #
@@ -40,8 +40,21 @@
   exit $?
 fi
 
-# If we get here then this is NOT an svn checkout.  Maybe it's
-# SVK?  First, check if we've got 'svk' in the path.  If not,
+# If we get here then this is NOT an svn checkout.
+
+# Maybe it's git?
+if test -d "${real_srcdir}"/.git
+then
+  githead=`git --git-dir "${real_srcdir}"/.git rev-parse HEAD 2>/dev/null`
+  if test $? = 0 ; then
+    echo $githead
+    exit 0
+  else
+    exit 1
+  fi
+fi
+
+# Maybe it's SVK?  First, check if we've got 'svk' in the path.  If not,
 # then exit with an error code of 1..
 which svk >/dev/null 2>&1
 if test $? != 0 ; then exit 1 ; fi



More information about the gnucash-changes mailing list