r15024 - gnucash/trunk - Merge swig-redo branch back into trunk.
Chris Shoemaker
chris at cvs.gnucash.org
Sun Oct 15 15:02:19 EDT 2006
Author: chris
Date: 2006-10-15 15:02:05 -0400 (Sun, 15 Oct 2006)
New Revision: 15024
Trac: http://svn.gnucash.org/trac/changeset/15024
Added:
gnucash/trunk/macros/ac_pkg_swig.m4
gnucash/trunk/src/app-utils/app-utils.i
gnucash/trunk/src/business/business-core/business-core.i
gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.i
gnucash/trunk/src/core-utils/core-utils.i
gnucash/trunk/src/core-utils/core-utils.scm
gnucash/trunk/src/engine/engine.i
gnucash/trunk/src/gnc-module/gnc-module.i
gnucash/trunk/src/gnc-module/test/mod-bar/bar.i
gnucash/trunk/src/gnc-module/test/mod-baz/baz.i
gnucash/trunk/src/gnc-module/test/mod-foo/foo.i
gnucash/trunk/src/gnome-utils/gnome-utils.i
gnucash/trunk/src/gnome/gnome.i
gnucash/trunk/src/report/report-gnome/report-gnome.i
gnucash/trunk/src/report/report-system/report-system.i
Removed:
gnucash/trunk/macros/g-wrap.m4
gnucash/trunk/src/app-utils/gw-app-utils-spec.scm
gnucash/trunk/src/app-utils/kvp-option-registry.scm
gnucash/trunk/src/app-utils/test/test-component-manager
gnucash/trunk/src/business/business-core/gw-business-core-spec.scm
gnucash/trunk/src/business/business-gnome/gw-business-gnome-spec.scm
gnucash/trunk/src/business/dialog-tax-table/gw-dialog-tax-table-spec.scm
gnucash/trunk/src/core-utils/gw-core-utils-spec.scm
gnucash/trunk/src/engine/gw-engine-spec.scm
gnucash/trunk/src/engine/gw-kvp-spec.scm
gnucash/trunk/src/gnc-module/gw-gnc-module-spec.scm
gnucash/trunk/src/gnc-module/test/mod-bar/bar-gwrap.scm
gnucash/trunk/src/gnc-module/test/mod-baz/baz-gwrap.scm
gnucash/trunk/src/gnc-module/test/mod-foo/foo-gwrap.scm
gnucash/trunk/src/gnome-utils/gw-gnome-utils-spec.scm
gnucash/trunk/src/gnome/gw-gnc-spec.scm
gnucash/trunk/src/optional/swig/
gnucash/trunk/src/register/register-core/gw-register-core-spec.scm
gnucash/trunk/src/report/report-gnome/gw-report-gnome-spec.scm
gnucash/trunk/src/report/report-system/gw-report-system-spec.scm
Modified:
gnucash/trunk/
gnucash/trunk/Makefile.am
gnucash/trunk/configure.in
gnucash/trunk/lib/libqof/qof/qofquery.c
gnucash/trunk/src/
gnucash/trunk/src/Makefile.am
gnucash/trunk/src/app-utils/
gnucash/trunk/src/app-utils/Makefile.am
gnucash/trunk/src/app-utils/app-utils.scm
gnucash/trunk/src/app-utils/c-interface.scm
gnucash/trunk/src/app-utils/date-utilities.scm
gnucash/trunk/src/app-utils/gfec.c
gnucash/trunk/src/app-utils/gfec.h
gnucash/trunk/src/app-utils/gnc-component-manager.c
gnucash/trunk/src/app-utils/gnc-component-manager.h
gnucash/trunk/src/app-utils/gnc-helpers.c
gnucash/trunk/src/app-utils/gnc-helpers.h
gnucash/trunk/src/app-utils/gnc-ui-util.c
gnucash/trunk/src/app-utils/gncmod-app-utils.c
gnucash/trunk/src/app-utils/guile-util.c
gnucash/trunk/src/app-utils/hooks.scm
gnucash/trunk/src/app-utils/option-util.c
gnucash/trunk/src/app-utils/option-util.h
gnucash/trunk/src/app-utils/options.scm
gnucash/trunk/src/app-utils/prefs.scm
gnucash/trunk/src/app-utils/test/Makefile.am
gnucash/trunk/src/app-utils/test/test-load-module
gnucash/trunk/src/backend/file/test/Makefile.am
gnucash/trunk/src/backend/postgres/test/Makefile.am
gnucash/trunk/src/bin/Makefile.am
gnucash/trunk/src/bin/gnucash-bin.c
gnucash/trunk/src/bin/gnucash-valgrind.in
gnucash/trunk/src/bin/gnucash.in
gnucash/trunk/src/bin/overrides/Makefile.am
gnucash/trunk/src/bin/overrides/gnucash-build-env.in
gnucash/trunk/src/bin/overrides/gnucash-env.in
gnucash/trunk/src/business/business-core/
gnucash/trunk/src/business/business-core/Makefile.am
gnucash/trunk/src/business/business-core/business-core.scm
gnucash/trunk/src/business/business-core/businessmod-core.c
gnucash/trunk/src/business/business-core/gncBillTerm.h
gnucash/trunk/src/business/business-core/gncBusGuile.c
gnucash/trunk/src/business/business-core/gncCustomer.h
gnucash/trunk/src/business/business-core/gncEntry.c
gnucash/trunk/src/business/business-core/gncEntry.h
gnucash/trunk/src/business/business-core/gncInvoice.c
gnucash/trunk/src/business/business-core/gncInvoice.h
gnucash/trunk/src/business/business-core/gncJob.h
gnucash/trunk/src/business/business-core/gncOrder.h
gnucash/trunk/src/business/business-core/gncOwner.h
gnucash/trunk/src/business/business-core/test/Makefile.am
gnucash/trunk/src/business/business-gnome/
gnucash/trunk/src/business/business-gnome/Makefile.am
gnucash/trunk/src/business/business-gnome/business-gnome.scm
gnucash/trunk/src/business/business-gnome/business-options-gnome.c
gnucash/trunk/src/business/business-gnome/businessmod-gnome.c
gnucash/trunk/src/business/business-gnome/dialog-invoice.c
gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c
gnucash/trunk/src/business/business-reports/aging.scm
gnucash/trunk/src/business/business-reports/business-reports.scm
gnucash/trunk/src/business/business-reports/easy-invoice.scm
gnucash/trunk/src/business/business-reports/fancy-invoice.scm
gnucash/trunk/src/business/business-reports/invoice.scm
gnucash/trunk/src/business/business-reports/owner-report.scm
gnucash/trunk/src/business/business-reports/payables.scm
gnucash/trunk/src/business/business-reports/receivables.scm
gnucash/trunk/src/business/business-utils/Makefile.am
gnucash/trunk/src/business/business-utils/business-options.c
gnucash/trunk/src/business/business-utils/business-options.scm
gnucash/trunk/src/business/business-utils/business-prefs.scm
gnucash/trunk/src/business/dialog-tax-table/
gnucash/trunk/src/business/dialog-tax-table/Makefile.am
gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.scm
gnucash/trunk/src/business/dialog-tax-table/gncmod-dialog-tax-table.c
gnucash/trunk/src/core-utils/
gnucash/trunk/src/core-utils/Makefile.am
gnucash/trunk/src/core-utils/gnc-main.c
gnucash/trunk/src/core-utils/gnc-main.h
gnucash/trunk/src/engine/
gnucash/trunk/src/engine/Account.h
gnucash/trunk/src/engine/Group.c
gnucash/trunk/src/engine/Group.h
gnucash/trunk/src/engine/Makefile.am
gnucash/trunk/src/engine/Query.c
gnucash/trunk/src/engine/Query.h
gnucash/trunk/src/engine/Transaction.h
gnucash/trunk/src/engine/engine-helpers.c
gnucash/trunk/src/engine/engine-helpers.h
gnucash/trunk/src/engine/engine-interface.scm
gnucash/trunk/src/engine/engine-utilities.scm
gnucash/trunk/src/engine/engine.scm
gnucash/trunk/src/engine/glib-helpers.c
gnucash/trunk/src/engine/glib-helpers.h
gnucash/trunk/src/engine/gnc-budget.h
gnucash/trunk/src/engine/gnc-commodity.c
gnucash/trunk/src/engine/gnc-commodity.h
gnucash/trunk/src/engine/gnc-hooks.c
gnucash/trunk/src/engine/gnc-numeric.scm
gnucash/trunk/src/engine/gnc-pricedb.c
gnucash/trunk/src/engine/gnc-pricedb.h
gnucash/trunk/src/engine/gncmod-engine.c
gnucash/trunk/src/engine/kvp-scm.c
gnucash/trunk/src/engine/test-core/Makefile.am
gnucash/trunk/src/engine/test/Makefile.am
gnucash/trunk/src/engine/test/test-create-account.scm
gnucash/trunk/src/engine/test/test-scm-query-import.scm
gnucash/trunk/src/gnc-module/
gnucash/trunk/src/gnc-module/Makefile.am
gnucash/trunk/src/gnc-module/gnc-module.c
gnucash/trunk/src/gnc-module/gnc-module.scm
gnucash/trunk/src/gnc-module/test/Makefile.am
gnucash/trunk/src/gnc-module/test/mod-bar/
gnucash/trunk/src/gnc-module/test/mod-bar/Makefile.am
gnucash/trunk/src/gnc-module/test/mod-bar/gnc-mod-bar.c
gnucash/trunk/src/gnc-module/test/mod-baz/
gnucash/trunk/src/gnc-module/test/mod-baz/Makefile.am
gnucash/trunk/src/gnc-module/test/mod-baz/gnc-mod-baz.c
gnucash/trunk/src/gnc-module/test/mod-foo/
gnucash/trunk/src/gnc-module/test/mod-foo/Makefile.am
gnucash/trunk/src/gnc-module/test/mod-foo/gnc-mod-foo.c
gnucash/trunk/src/gnc-module/test/test-gwrapped-c
gnucash/trunk/src/gnc-module/test/test-load-deps
gnucash/trunk/src/gnc-module/test/test-scm-multi
gnucash/trunk/src/gnome-search/Makefile.am
gnucash/trunk/src/gnome-utils/
gnucash/trunk/src/gnome-utils/Makefile.am
gnucash/trunk/src/gnome-utils/dialog-options.c
gnucash/trunk/src/gnome-utils/dialog-options.h
gnucash/trunk/src/gnome-utils/gnc-file.c
gnucash/trunk/src/gnome-utils/gnc-file.h
gnucash/trunk/src/gnome-utils/gnc-html.h
gnucash/trunk/src/gnome-utils/gnc-main-window.c
gnucash/trunk/src/gnome-utils/gnc-main-window.h
gnucash/trunk/src/gnome-utils/gnc-plugin-menu-additions.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c
gnucash/trunk/src/gnome-utils/gncmod-gnome-utils.c
gnucash/trunk/src/gnome-utils/gnome-utils.scm
gnucash/trunk/src/gnome-utils/test/Makefile.am
gnucash/trunk/src/gnome/
gnucash/trunk/src/gnome/Makefile.am
gnucash/trunk/src/gnome/dialog-price-edit-db.c
gnucash/trunk/src/gnome/dialog-sx-from-trans.c
gnucash/trunk/src/gnome/dialog-tax-info.c
gnucash/trunk/src/gnome/gnc-plugin-page-register.c
gnucash/trunk/src/gnome/top-level.c
gnucash/trunk/src/import-export/Makefile.am
gnucash/trunk/src/import-export/hbci/Makefile.am
gnucash/trunk/src/import-export/log-replay/Makefile.am
gnucash/trunk/src/import-export/qif-import/Makefile.am
gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
gnucash/trunk/src/import-export/qif-import/qif-dialog-utils.scm
gnucash/trunk/src/import-export/qif-import/qif-file.scm
gnucash/trunk/src/import-export/qif-import/qif-guess-map.scm
gnucash/trunk/src/import-export/qif-import/qif-import.scm
gnucash/trunk/src/import-export/qif-import/qif-merge-groups.scm
gnucash/trunk/src/import-export/qif-import/qif-objects.scm
gnucash/trunk/src/import-export/qif-import/qif-parse.scm
gnucash/trunk/src/import-export/qif-import/qif-to-gnc.scm
gnucash/trunk/src/import-export/qif-io-core/qif-acct-table.scm
gnucash/trunk/src/import-export/qif-io-core/qif-bank-xtn-import.scm
gnucash/trunk/src/import-export/qif-io-core/qif-format-check.scm
gnucash/trunk/src/import-export/qif-io-core/qif-invst-xtn-import.scm
gnucash/trunk/src/import-export/qif-io-core/qif-parse.scm
gnucash/trunk/src/import-export/qif-io-core/test/Makefile.am
gnucash/trunk/src/import-export/qif-io-core/test/test-import-phase-1.scm
gnucash/trunk/src/import-export/qif-io-core/test/test-parser.scm
gnucash/trunk/src/import-export/qif/Makefile.am
gnucash/trunk/src/import-export/qif/test/Makefile.am
gnucash/trunk/src/import-export/test/Makefile.am
gnucash/trunk/src/network-utils/test/Makefile.am
gnucash/trunk/src/optional/Makefile.am
gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
gnucash/trunk/src/register/register-core/Makefile.am
gnucash/trunk/src/register/register-core/gncmod-register-core.c
gnucash/trunk/src/register/register-core/test/Makefile.am
gnucash/trunk/src/register/register-gnome/test/Makefile.am
gnucash/trunk/src/report/locale-specific/us/taxtxf-de_DE.scm
gnucash/trunk/src/report/locale-specific/us/taxtxf.scm
gnucash/trunk/src/report/locale-specific/us/test/Makefile.am
gnucash/trunk/src/report/report-gnome/
gnucash/trunk/src/report/report-gnome/Makefile.am
gnucash/trunk/src/report/report-gnome/dialog-column-view.c
gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
gnucash/trunk/src/report/report-gnome/gncmod-report-gnome.c
gnucash/trunk/src/report/report-gnome/report-gnome.scm
gnucash/trunk/src/report/report-gnome/test/Makefile.am
gnucash/trunk/src/report/report-gnome/window-report.c
gnucash/trunk/src/report/report-system/
gnucash/trunk/src/report/report-system/Makefile.am
gnucash/trunk/src/report/report-system/commodity-utilities.scm
gnucash/trunk/src/report/report-system/gnc-report.c
gnucash/trunk/src/report/report-system/gnc-report.h
gnucash/trunk/src/report/report-system/gncmod-report-system.c
gnucash/trunk/src/report/report-system/html-acct-table.scm
gnucash/trunk/src/report/report-system/html-barchart.scm
gnucash/trunk/src/report/report-system/html-piechart.scm
gnucash/trunk/src/report/report-system/html-scatter.scm
gnucash/trunk/src/report/report-system/html-style-info.scm
gnucash/trunk/src/report/report-system/html-style-sheet.scm
gnucash/trunk/src/report/report-system/html-utilities.scm
gnucash/trunk/src/report/report-system/options-utilities.scm
gnucash/trunk/src/report/report-system/report-system.scm
gnucash/trunk/src/report/report-system/report-utilities.scm
gnucash/trunk/src/report/report-system/report.scm
gnucash/trunk/src/report/report-system/test/Makefile.am
gnucash/trunk/src/report/standard-reports/account-piecharts.scm
gnucash/trunk/src/report/standard-reports/account-summary.scm
gnucash/trunk/src/report/standard-reports/advanced-portfolio.scm
gnucash/trunk/src/report/standard-reports/average-balance.scm
gnucash/trunk/src/report/standard-reports/balance-sheet.scm
gnucash/trunk/src/report/standard-reports/budget.scm
gnucash/trunk/src/report/standard-reports/cash-flow.scm
gnucash/trunk/src/report/standard-reports/category-barchart.scm
gnucash/trunk/src/report/standard-reports/daily-reports.scm
gnucash/trunk/src/report/standard-reports/equity-statement.scm
gnucash/trunk/src/report/standard-reports/general-journal.scm
gnucash/trunk/src/report/standard-reports/income-statement.scm
gnucash/trunk/src/report/standard-reports/net-barchart.scm
gnucash/trunk/src/report/standard-reports/portfolio.scm
gnucash/trunk/src/report/standard-reports/price-scatter.scm
gnucash/trunk/src/report/standard-reports/register.scm
gnucash/trunk/src/report/standard-reports/standard-reports.scm
gnucash/trunk/src/report/standard-reports/test/Makefile.am
gnucash/trunk/src/report/standard-reports/transaction.scm
gnucash/trunk/src/report/standard-reports/trial-balance.scm
gnucash/trunk/src/report/stylesheets/stylesheet-easy.scm
gnucash/trunk/src/report/stylesheets/stylesheet-fancy.scm
gnucash/trunk/src/report/stylesheets/test/Makefile.am
gnucash/trunk/src/report/utility-reports/hello-world.scm
gnucash/trunk/src/report/utility-reports/test-graphing.scm
gnucash/trunk/src/report/utility-reports/test/Makefile.am
gnucash/trunk/src/report/utility-reports/view-column.scm
gnucash/trunk/src/report/utility-reports/welcome-to-gnucash.scm
gnucash/trunk/src/scm/command-line.scm
gnucash/trunk/src/scm/main-window.scm
gnucash/trunk/src/scm/main.scm
gnucash/trunk/src/scm/price-quotes.scm
gnucash/trunk/src/scm/printing/print-check.scm
gnucash/trunk/src/tax/us/test/Makefile.am
gnucash/trunk/src/tax/us/txf-de_DE.scm
Log:
Merge swig-redo branch back into trunk.
g-wrap is gone. I, for one, welcome our new swig overlords.
Property changes on: gnucash/trunk
___________________________________________________________________
Name: svk:merge
- 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/trunk:705
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13379
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk2:13366
+ 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/swig-redo:802
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:12971
Modified: gnucash/trunk/Makefile.am
===================================================================
--- gnucash/trunk/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -48,7 +48,7 @@
macros/as-scrub-include.m4 \
macros/binreloc.m4 \
macros/compiler-flags.m4 \
- macros/g-wrap.m4 \
+ macros/ac_pkg_swig.m4 \
macros/gnome-guile-checks.m4 \
macros/legacy_macros.m4 \
po/gnucash.pot \
Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/configure.in 2006-10-15 19:02:05 UTC (rev 15024)
@@ -151,6 +151,19 @@
AC_MSG_ERROR([Cannot find ltdl.h -- libtool-devel (or libtool-ltdl-devel) not installed?])
fi
+# test whether we are building directly from SVN/SVK
+${srcdir}/util/gnc-svnversion ${srcdir} >/dev/null 2>&1
+if test $? = 0 ; then
+ BUILDING_FROM_SVN=yes
+
+ # We need at least version 1.3.28 of SWIG because
+ # that's when SWIG added %delobject
+ AC_PROG_SWIG(1.3.28)
+else
+ BUILDING_FROM_SVN=no
+fi
+AM_CONDITIONAL(BUILDING_FROM_SVN, test "x$BUILDING_FROM_SVN" = "xyes")
+
# These are unavailable on windows/mingw32
AC_CHECK_HEADERS(X11/Xlib.h glob.h)
AC_CHECK_FUNCS(chown gethostname getppid getuid gettimeofday gmtime_r)
@@ -272,8 +285,7 @@
### --------------------------------------------------------------------------
-### Guile and g-wrap version checks (should this be something other than
-### the Gnome check?)
+### Guile version checks (should this be something other than the Gnome check?)
# If the user has given these values, cache them to override the
# detected values.
@@ -296,9 +308,6 @@
AS_SCRUB_INCLUDE(GUILE_INCS)
AC_SUBST(GUILE_LIBS)
-### --------------------------------------------------------------------------
-### G-wrap (libraries and executable)
-
AM_GUILE_VERSION_CHECK(1.6.0, , , [AC_MSG_ERROR([
guile does not appear to be installed correctly, or is not in the
@@ -318,92 +327,10 @@
AC_DEFINE(HAVE_GUILE18,1,[System has guile 1.8 or better])
], )
-AM_PATH_GWRAP(1.3.3, , [AC_MSG_ERROR([
-
- g-wrap does not appear to be installed correctly, or is not new
- enough. GnuCash requires at least version 1.3.3 to build,
- and 1.9.6 to build cleanly with GCC4. If you need to install g-wrap,
- you can find it at http://www.nongnu.org/g-wrap/ .
-])])
-
-# Find out what the g-wrap compile and link flags are.
-AC_MSG_CHECKING(for g-wrap compile args)
-if test "x$G_WRAP_COMPILE_ARGS" = "x" ; then
- G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile`
-fi
-AC_MSG_RESULT($G_WRAP_COMPILE_ARGS)
-
-AC_MSG_CHECKING(for g-wrap link args)
-if test "x$G_WRAP_LINK_ARGS" = "x" ; then
- G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-link-args guile`
-fi
-# Dear g-wrap: adding -L/usr/lib is very silly. Do not do this.
-G_WRAP_LINK_ARGS=`echo ${G_WRAP_LINK_ARGS} | sed -e 's|-L/usr/lib ||'`
-AC_MSG_RESULT($G_WRAP_LINK_ARGS)
-
-AC_MSG_CHECKING(for g-wrap module directory)
-G_WRAP_MODULE_DIR=`${G_WRAP_CONFIG} --guile-module-directory`
-G_WRAP_LIB_DIR=`echo $G_WRAP_MODULE_DIR | sed -e 's|share/guile.*$|lib|'`
-AC_MSG_RESULT($G_WRAP_MODULE_DIR)
-
-AC_GWRAP_CHECK_GUILE($G_WRAP_MODULE_DIR)
-
-save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $GUILE_INCS $G_WRAP_COMPILE_ARGS"
-AC_CHECK_HEADER(g-wrap-wct.h,,
- [AC_MSG_ERROR([
-
- cannot find g-wrap-wct.h where g-wrap claims it should be.
- are you on Debian or Ubuntu and still using g-wrap 1.9.6-2?
- See: http://bugzilla.gnome.org/show_bug.cgi?id=330539
-
-])])
-CPPFLAGS=$save_CPPFLAGS
-
-AC_SUBST(G_WRAP_CONFIG)
-AC_SUBST(G_WRAP_COMPILE_ARGS)
-AC_SUBST(G_WRAP_LINK_ARGS)
-AC_SUBST(G_WRAP_MODULE_DIR)
-AC_SUBST(G_WRAP_LIB_DIR)
-
AS_SCRUB_INCLUDE(CFLAGS)
-AC_MSG_CHECKING([for (g-wrap) guile module])
-if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
- GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
- ${GUILE} -c "(use-modules (g-wrap))" > /dev/null 2>&1
-then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_ERROR([
-
- Cannot find the (g-wrap) guile module.
- Are you sure you have g-wrap compile-time environment installed?
- See http://bugzilla.gnome.org/show_bug.cgi?id=347680
-
-])
-fi
-
-AC_MSG_CHECKING([for (g-wrap gw-glib-spec) guile module])
-if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
- GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
- ${GUILE} -c "(use-modules (g-wrap gw-glib-spec))" > /dev/null 2>&1
-then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_ERROR([
-
- Cannot find the (g-wrap gw-glib-spec) guile module.
- Are you sure you have g-wrap installed with glib support?
- See http://bugzilla.gnome.org/show_bug.cgi?id=347404
-
-])
-fi
-
AC_MSG_CHECKING([for SLIB support])
-if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
- GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
- ${GUILE} -c "(use-modules (ice-9 slib)) (require 'printf)" > /dev/null 2>&1
+if ${GUILE} -c "(use-modules (ice-9 slib)) (require 'printf)" > /dev/null 2>&1
then
AC_MSG_RESULT(yes)
else
@@ -415,31 +342,6 @@
])
fi
-AC_MSG_CHECKING([for (g-wrap gw-standard) guile module])
-if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
- GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
- ${GUILE} -c "(use-modules (g-wrap gw-standard))" > /dev/null 2>&1
-then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
- AC_MSG_CHECKING([for (g-wrap gw standard) guile module])
- if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
- GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
- ${GUILE} -c "(use-modules (g-wrap gw standard))" > /dev/null 2>&1
- then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- AC_MSG_WARN([
-
- Unable to find the g-wrap standard module, a.k.a. guile-g-wrap.
- You won't be able to run GnuCash without it!
-
- ])
- fi
-fi
-
### Check size of long_long - some guile's are broken.
AC_MSG_CHECKING(if guile long_long is at least as big as gint64)
GNC_OLDCFLAGS="$CFLAGS"
@@ -648,7 +550,6 @@
GNC_ACCOUNTS_DIR='${GNC_SHAREDIR}/accounts'
GNC_GLADE_DIR='${GNC_SHAREDIR}/glade'
GNC_UI_DIR='${GNC_SHAREDIR}/ui'
-GNC_GWRAP_LIBDIR='${GNC_SHAREDIR}/guile-modules/g-wrapped'
GNC_MODULE_DIR='${pkglibdir}'
GNC_PIXMAP_DIR='${GNC_SHAREDIR}/pixmaps'
@@ -657,7 +558,6 @@
AC_SUBST(GNC_DOC_INSTALL_DIR)
AC_SUBST(GNC_GLADE_DIR)
AC_SUBST(GNC_UI_DIR)
-AC_SUBST(GNC_GWRAP_LIBDIR)
AC_SUBST(GNC_INCLUDE_DIR)
AC_SUBST(GNC_LIBDIR)
AC_SUBST(GNC_MODULE_DIR)
@@ -2050,10 +1950,10 @@
### GnuCash flags and libs configuration
GNUCASH_ENGINE_BASE_LIBS="${GLIB_LIBS}"
-GNUCASH_ENGINE_LIBS="-L${GNC_MODULE_DIR} -L${GNC_GWRAP_LIBDIR} ${GNUCASH_ENGINE_BASE_LIBS} ${GUILE_LIBS} -lgncmod-engine -lgw-engine -lgw-kvp -lgncmodule"
+GNUCASH_ENGINE_LIBS="-L${GNC_MODULE_DIR} ${GNUCASH_ENGINE_BASE_LIBS} ${GUILE_LIBS} -lgncmod-engine -lgncmodule"
-GNUCASH_ENGINE_BASE_CFLAGS="-DGNUCASH ${GLIB_CFLAGS} ${G_WRAP_COMPILE_ARGS}"
-GNUCASH_ENGINE_CFLAGS="${GNUCASH_ENGINE_BASE_CFLAGS} ${GUILE_INCS}"
+GNUCASH_ENGINE_BASE_CFLAGS="-DGNUCASH ${GLIB_CFLAGS} ${GUILE_INCS}"
+GNUCASH_ENGINE_CFLAGS="${GNUCASH_ENGINE_BASE_CFLAGS}"
AC_SUBST(GNUCASH_ENGINE_BASE_LIBS)
AC_SUBST(GNUCASH_ENGINE_LIBS)
@@ -2096,9 +1996,7 @@
if test ${GCC}x = yesx
then
warnFLAGS=
- # These two are because of g-wrap -- it can't avoid unused and uninitialized.
- #warnFLAGS="${warnFLAGS} -Wno-uninitialized"
- #warnFLAGS="${warnFLAGS} -Wno-unused"
+ CFLAGS="${CFLAGS} -Wno-unused"
# other flags...
# These next two are included in the GNOME_COMPILE_WARNINGS
#warnFLAGS="${warnFLAGS} -Wmissing-prototypes"
@@ -2106,8 +2004,7 @@
#warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall
# error-on-warning should not be active in (stable) release tarballs
- ${srcdir}/util/gnc-svnversion ${srcdir} >/dev/null 2>&1
- if test $? = 0
+ if test "x$BUILDING_FROM_SVN" = "xyes"
then
# This code is from SVN/SVK, so enable error-on-warning
error_on_warning_as_default="yes"
@@ -2147,36 +2044,11 @@
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
# rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
- if test x$gwrap_major_version = x1 -a "$gwrap_minor_version" -lt 9 ; then
- # This is g-wrap 1.3 + gcc4. Test error-on-warning
- case "$gnc_error_on_warning" in
- auto)
- AC_MSG_ERROR([
-
- Sorry, your current configuration will not compile. You are
- running g-wrap 1.3.x, GCC4, and --enable-error-on-warning, which
- do not work together. You have three options: You can update
- g-wrap to 1.9.6, you can downgrade gcc to GCC3, or you can
- --disable-error-on-warning on the configure line. We recommend
- you update g-wrap to 1.9.6 so gnucash can compile cleanly on GCC4
- You can find it at http://www.nongnu.org/g-wrap/ .
-
-])
- ;;
- yes)
- AC_MSG_WARN([
-
- g-wrap 1.3.x and GCC4 may cause build problems. You have been warned!
-
-])
- ;;
- esac
- fi
fi
fi
fi
- CFLAGS="${CFLAGS} ${warnFLAGS}"
+ CFLAGS="${warnFLAGS} ${CFLAGS}"
else
warnFLAGS=none
@@ -2331,8 +2203,6 @@
src/network-utils/Makefile
src/network-utils/test/Makefile
src/optional/Makefile
- src/optional/swig/Makefile
- src/optional/swig/examples/Makefile
src/optional/xsl/Makefile
src/pixmaps/Makefile
src/quotes/Makefile
Modified: gnucash/trunk/lib/libqof/qof/qofquery.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/qofquery.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/lib/libqof/qof/qofquery.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1253,7 +1253,7 @@
}
void qof_query_add_guid_match (QofQuery *q, GSList *param_list,
- const GUID *guid, QofQueryOp op)
+ const GUID *guid, QofQueryOp op)
{
GList *g = NULL;
Copied: gnucash/trunk/macros/ac_pkg_swig.m4 (from rev 15023, gnucash/branches/swig-redo/macros/ac_pkg_swig.m4)
Deleted: gnucash/trunk/macros/g-wrap.m4
===================================================================
--- gnucash/trunk/macros/g-wrap.m4 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/macros/g-wrap.m4 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,81 +0,0 @@
-dnl g-wrap.m4
-dnl Written by Robert Merkel <rgmerk at mira.net>
-dnl Parts ripped off from guile.m4 and ORBit.m4
-
-dnl check whether we use the old or new guile smobs
-
-AC_DEFUN([AC_GWRAP_CHECK_GUILE],
-[if test x$GUILE = x ; then
- AC_PATH_PROG(GUILE, guile, no)
- fi
- dnl AC_MSG_WARN(guile is $GUILE)
- if test "${GUILE}" = "no" ; then
- AC_MSG_ERROR(g-wrap couldn't find guile.)
- fi
-])
-
-dnl AM_PATH_GWRAP ([MINIMUM-VERSION, [ACTION-IF-FOUND.
-dnl [ACTION-IF-NOT-FOUND]]])
-
-dnl tests for minimum version of g-wrap.
-dnl sets G_WRAP_CONFIG and GWRAP_OLD_GUILE_SMOB if needed.
-
-AC_DEFUN([AM_PATH_GWRAP],
-[dnl
-dnl
-dnl
-AC_ARG_WITH(g-wrap-prefix,[ --with-g-wrap-prefix=PFX Prefix where g-wrap is installed (optional)],
- gwrap_prefix="$withval", g_wrap_prefix="")
-
-min_gwrap_version=ifelse([$1], , 0.9.1,$1)
-
-if test x${GUILE} = x ; then
- AC_PATH_PROG(GUILE, guile, no)
-fi
-
-dnl if prefix set, then set them explicitly
-if test x${gwrap_prefix} != x ; then
- G_WRAP_CONFIG=${gwrap_prefix}/bin/g-wrap-config
-else
-
- AC_PATH_PROG(G_WRAP_CONFIG, g-wrap-config, no)
- if test x${G_WRAP_CONFIG} = xno ; then
- CHECK_VERSION="no"
- ifelse([$3], , true , [AC_MSG_WARN(g-wrap-config failed)
- $3])
- fi
-fi
-
-if test x$CHECK_VERSION != xno ; then
-AC_MSG_CHECKING(for g-wrap - version >= ${min_gwrap_version})
-
-gwrap_major_version=`${G_WRAP_CONFIG} --version | \
- sed 's/g-wrap-config \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-gwrap_minor_version=`${G_WRAP_CONFIG} --version | \
- sed 's/g-wrap-config \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-gwrap_micro_version=`${G_WRAP_CONFIG} --version | \
- sed 's/g-wrap-config \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-
-major_required=`echo ${min_gwrap_version} |\
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-minor_required=`echo ${min_gwrap_version} |\
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-micro_required=`echo ${min_gwrap_version} |\
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-if ${GUILE} -c "(cond ((> ${gwrap_major_version} ${major_required}) (exit 0))\
- ((< ${gwrap_major_version} ${major_required}) (exit 1))\
- ((> ${gwrap_minor_version} ${minor_required}) (exit 0))\
- ((< ${gwrap_minor_version} ${minor_required}) (exit 1))\
- ((< ${gwrap_micro_version} ${micro_required}) (exit 1))\
- (else (exit 0)))" ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , true, [$2])
-else
- AC_MSG_RESULT(no)
- ifelse([$3], , true , [AC_MSG_WARN(guile check failed)
- $3])
-fi
-dnl check version
-fi])
Property changes on: gnucash/trunk/src
___________________________________________________________________
Name: svn:ignore
- Makefile
Makefile.in
*.diff
*.diffs
*.patch
*.log
*.xac.*.xac
.deps
.libs
gnc-dir.h
.DS_Store
semantic.cache
TAGS
+ Makefile
Makefile.in
*.diff
*.diffs
*.patch
*.log
*.xac.*.xac
.deps
.libs
gnc-dir.h
swig-runtime.h
.DS_Store
semantic.cache
TAGS
Modified: gnucash/trunk/src/Makefile.am
===================================================================
--- gnucash/trunk/src/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -28,17 +28,24 @@
DIST_SUBDIRS = $(NONGUI_SUBDIRS) $(GUI_SUBDIRS_1) report $(GUI_SUBDIRS_2)
if GNUCASH_ENABLE_GUI
-SUBDIRS = $(DIST_SUBDIRS)
+SUBDIRS = . $(DIST_SUBDIRS)
else
-SUBDIRS = $(NONGUI_SUBDIRS) report
+SUBDIRS = . $(NONGUI_SUBDIRS) report
endif
noinst_HEADERS = \
RecnWindow.h \
+ swig-runtime.h \
gnc-ui.h
bin_SCRIPTS = gnc-test-env
+if BUILDING_FROM_SVN
+swig-runtime.h:
+ $(SWIG) -guile -external-runtime $@
+endif
+MAINTAINERCLEANFILES = swig-runtime.h
+
EXTRA_DIST = \
README.modules \
gnc-test-env \
Property changes on: gnucash/trunk/src/app-utils
___________________________________________________________________
Name: svn:ignore
- *.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
gw-app-utils.scm
gw-app-utils.c
gw-app-utils.h
gw-app-utils.html
i18n.h
g-wrapped
gnucash
semantic.cache
TAGS
+ *.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
swig-app-utils.c
gw-app-utils.scm
gw-app-utils.c
gw-app-utils.h
gw-app-utils.html
i18n.h
g-wrapped
gnucash
semantic.cache
TAGS
Modified: gnucash/trunk/src/app-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/app-utils/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,7 +1,7 @@
SUBDIRS = . test
PWD := $(shell pwd)
-pkglib_LTLIBRARIES = libgncmod-app-utils.la libgw-app-utils.la
+pkglib_LTLIBRARIES = libgncmod-app-utils.la
AM_CFLAGS = \
-I${top_srcdir}/src \
@@ -10,13 +10,13 @@
-I${top_srcdir}/src/core-utils \
-I${top_srcdir}/src/engine \
${GUILE_INCS} \
- ${G_WRAP_COMPILE_ARGS} \
${GLIB_CFLAGS} \
${QOF_CFLAGS} \
${GCONF_CFLAGS} \
${GTK_CFLAGS}
libgncmod_app_utils_la_SOURCES = \
+ swig-app-utils.c \
file-utils.c \
gfec.c \
gnc-account-merge.c \
@@ -67,28 +67,20 @@
libgncmod_app_utils_la_LIBADD = \
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/engine/libgncmod-engine.la \
- ${top_builddir}/src/engine/libgw-engine.la \
${top_builddir}/src/calculation/libgncmod-calculation.la \
${top_builddir}/src/core-utils/libcore-utils.la \
${GCONF_LIBS} \
${GTK_LIBS} \
- ${G_WRAP_LINK_ARGS} \
${GUILE_LIBS} \
${QOF_LIBS} \
${GLIB_LIBS}
-libgw_app_utils_la_LIBADD = \
- libgncmod-app-utils.la \
- ${top_builddir}/src/engine/libgncmod-engine.la \
- ${top_builddir}/src/engine/libgw-engine.la \
- ${top_builddir}/src/core-utils/libcore-utils.la \
- ${G_WRAP_LINK_ARGS} \
- ${GUILE_LIBS} \
- ${QOF_LIBS} \
- ${GLIB_LIBS}
+if BUILDING_FROM_SVN
+swig-app-utils.c: app-utils.i ${gncinclude_HEADERS}
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module \
+ -I${top_srcdir}/src/engine -I${top_srcdir}/lib/libqof/qof -o $@ $<
+endif
-nodist_libgw_app_utils_la_SOURCES = gw-app-utils.c
-
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = app-utils.scm
@@ -98,34 +90,27 @@
config-var.scm \
date-utilities.scm \
hooks.scm \
- kvp-option-registry.scm \
options.scm \
prefs.scm \
simple-obj.scm
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-app-utils-spec.scm
-nodist_gwmod_DATA = gw-app-utils.scm
-
noinst_DATA = .scm-links
EXTRA_DIST = \
+ app-utils.i \
${gncmod_DATA} \
- ${gncscm_DATA} \
- ${gwmod_DATA}
+ ${gncscm_DATA}
if GNUCASH_SEPARATE_BUILDDIR
-#For compiling
-SCM_FILE_LINKS = gw-app-utils-spec.scm
#For executing test cases
-SCM_FILE_LINKS += \
+SCM_FILE_LINKS = \
${gncmod_DATA} \
${gncscm_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
@@ -134,25 +119,5 @@
( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-app-utils.scm gw-app-utils.c gw-app-utils.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-app-utils-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/engine\" %load-path)) \
- (primitive-load \"./gw-app-utils-spec.scm\") \
- (gw:generate-wrapset \"gw-app-utils\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-app-utils.scm gw-app-utils.c gw-app-utils.h
-CLEANFILES = $(BUILT_SOURCES) ${SCM_FILE_LINKS} \
- .scm-links gw-app-utils.html
+CLEANFILES = ${SCM_FILE_LINKS} gnucash .scm-links
+MAINTAINERCLEANFILES = swig-app-utils.c
Copied: gnucash/trunk/src/app-utils/app-utils.i (from rev 15023, gnucash/branches/swig-redo/src/app-utils/app-utils.i)
Modified: gnucash/trunk/src/app-utils/app-utils.scm
===================================================================
--- gnucash/trunk/src/app-utils/app-utils.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/app-utils.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,8 +1,8 @@
(define-module (gnucash app-utils))
-(use-modules (g-wrapped gw-app-utils))
+(use-modules (sw_app_utils))
(use-modules (srfi srfi-1))
-(use-modules (gnucash main) (g-wrapped gw-gnc)) ;; FIXME: delete after we finish modularizing.
+(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/engine" 0)
@@ -125,7 +125,7 @@
(export gnc:config-file-format-version)
;; gw-engine-spec.scm
-(re-export gnc:*save-options-hook*)
+(re-export HOOK-SAVE-OPTIONS)
;; date-utilities.scm
@@ -225,14 +225,9 @@
(export gnc:reldate-initialize)
;; hooks
-(re-export gnc:hook-define)
(export gnc:hook-run-danglers) ;; from hooks.scm
-(re-export gnc:hook-add-dangler)
-(re-export gnc:hook-remove-dangler)
-(re-export gnc:*book-opened-hook*)
-(re-export gnc:*new-book-hook*)
-(re-export gnc:*book-closed-hook*)
-(re-export gnc:*report-hook*)
+(re-export gnc-hook-add-scm-dangler)
+(re-export HOOK-REPORT)
;; simple-obj
(export make-simple-class)
@@ -243,16 +238,12 @@
(export simple-obj-from-list)
(export make-simple-obj)
-;; kvp-option-registry
-(export gnc:register-kvp-option-generator)
-(export gnc:unregister-kvp-option-generator)
-(export gnc:make-kvp-options)
+(define gnc:*kvp-option-path* '("options"))
(export gnc:*kvp-option-path*)
(load-from-path "c-interface.scm")
(load-from-path "config-var.scm")
(load-from-path "options.scm")
-(load-from-path "kvp-option-registry.scm")
(load-from-path "hooks.scm")
(load-from-path "prefs.scm")
(load-from-path "date-utilities.scm")
Modified: gnucash/trunk/src/app-utils/c-interface.scm
===================================================================
--- gnucash/trunk/src/app-utils/c-interface.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/c-interface.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -41,7 +41,7 @@
;; gettext functions
-(define gnc:gettext gnc:gettext-helper)
+(define gnc:gettext gnc-gettext-helper)
(define gnc:_ gnc:gettext)
(define _ gnc:gettext)
(define-syntax N_
Modified: gnucash/trunk/src/app-utils/date-utilities.scm
===================================================================
--- gnucash/trunk/src/app-utils/date-utilities.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/date-utilities.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -203,22 +203,22 @@
;; date-granularity comparison functions.
(define (gnc:timepair-earlier-date t1 t2)
- (gnc:timepair-earlier (gnc:timepair-canonical-day-time t1)
- (gnc:timepair-canonical-day-time t2)))
+ (gnc:timepair-earlier (timespecCanonicalDayTime t1)
+ (timespecCanonicalDayTime t2)))
(define (gnc:timepair-later-date t1 t2)
(gnc:timepair-earlier-date t2 t1))
(define (gnc:timepair-le-date t1 t2)
- (gnc:timepair-le (gnc:timepair-canonical-day-time t1)
- (gnc:timepair-canonical-day-time t2)))
+ (gnc:timepair-le (timespecCanonicalDayTime t1)
+ (timespecCanonicalDayTime t2)))
(define (gnc:timepair-ge-date t1 t2)
(gnc:timepair-le t2 t1))
(define (gnc:timepair-eq-date t1 t2)
- (gnc:timepair-eq (gnc:timepair-canonical-day-time t1)
- (gnc:timepair-canonical-day-time t2)))
+ (gnc:timepair-eq (timespecCanonicalDayTime t1)
+ (timespecCanonicalDayTime t2)))
;; Build a list of time intervals.
;;
@@ -454,10 +454,10 @@
(gnc:date->timepair now)))
(define (gnc:get-start-accounting-period)
- (gnc:secs->timepair (gnc:accounting-period-start)))
+ (gnc:secs->timepair (gnc-accounting-period-fiscal-start)))
(define (gnc:get-end-accounting-period)
- (gnc:secs->timepair (gnc:accounting-period-end)))
+ (gnc:secs->timepair (gnc-accounting-period-fiscal-end)))
(define (gnc:get-start-this-month)
(let ((now (localtime (current-time))))
Modified: gnucash/trunk/src/app-utils/gfec.c
===================================================================
--- gnucash/trunk/src/app-utils/gfec.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gfec.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -163,3 +163,26 @@
return result;
}
+
+static int error_in_scm_eval = FALSE;
+
+static void
+error_handler(const char *msg)
+{
+ g_warning(msg);
+ error_in_scm_eval = TRUE;
+}
+
+gboolean
+gfec_try_load(gchar *fn)
+{
+ g_message("looking for %s", fn);
+ if (g_file_test(fn, G_FILE_TEST_EXISTS)) {
+ g_message("trying to load %s", fn);
+ error_in_scm_eval = FALSE;
+ gfec_eval_file(fn, error_handler);
+ return !error_in_scm_eval;
+ }
+ return FALSE;
+}
+
Modified: gnucash/trunk/src/app-utils/gfec.h
===================================================================
--- gnucash/trunk/src/app-utils/gfec.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gfec.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -10,6 +10,7 @@
#define GFEC_H
#include <libguile.h>
+#include <glib.h>
#include "guile-mappings.h"
typedef void (*gfec_error_handler)(const char *error_message);
@@ -17,5 +18,6 @@
SCM gfec_eval_file(const char *file, gfec_error_handler error_handler);
SCM gfec_eval_string(const char *str, gfec_error_handler error_handler);
SCM gfec_apply(SCM proc, SCM arglist, gfec_error_handler error_handler);
+gboolean gfec_try_load(gchar *fn);
#endif
Modified: gnucash/trunk/src/app-utils/gnc-component-manager.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-component-manager.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gnc-component-manager.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -51,9 +51,6 @@
GNCComponentCloseHandler close_handler;
gpointer user_data;
- SCM refresh_handler_scm;
- SCM close_handler_scm;
-
ComponentEventInfo watch_info;
char *component_class;
@@ -404,9 +401,6 @@
/* found one, add the handler */
ci = g_new0 (ComponentInfo, 1);
- ci->refresh_handler_scm = SCM_BOOL_F;
- ci->close_handler_scm = SCM_BOOL_F;
-
ci->watch_info.event_masks = g_hash_table_new (g_str_hash, g_str_equal);
ci->watch_info.entity_events = guid_hash_table_new ();
@@ -453,32 +447,6 @@
return ci->component_id;
}
-gint
-gnc_register_gui_component_scm (const char * component_class,
- SCM refresh_handler,
- SCM close_handler)
-{
- ComponentInfo *ci;
-
- /* sanity check */
- if (!component_class)
- {
- PERR ("no class specified");
- return NO_COMPONENT;
- }
-
- ci = gnc_register_gui_component_internal (component_class);
- g_return_val_if_fail (ci, NO_COMPONENT);
-
- ci->refresh_handler_scm = refresh_handler;
- scm_gc_protect_object (refresh_handler);
-
- ci->close_handler_scm = close_handler;
- scm_gc_protect_object (close_handler);
-
- return ci->component_id;
-}
-
void
gnc_gui_component_watch_entity (gint component_id,
const GUID *entity,
@@ -579,14 +547,6 @@
g_free (ci->component_class);
ci->component_class = NULL;
- if (ci->refresh_handler_scm != SCM_BOOL_F)
- scm_gc_unprotect_object (ci->refresh_handler_scm);
- ci->refresh_handler_scm = SCM_BOOL_F;
-
- if (ci->close_handler_scm != SCM_BOOL_F)
- scm_gc_unprotect_object (ci->close_handler_scm);
- ci->close_handler_scm = SCM_BOOL_F;
-
g_free (ci);
#if CM_DEBUG
@@ -745,8 +705,7 @@
if (!ci)
continue;
- if (!ci->refresh_handler &&
- !SCM_PROCEDUREP (ci->refresh_handler_scm)) {
+ if (!ci->refresh_handler) {
#if CM_DEBUG
fprintf (stderr, "no handlers for %s:%d\n", ci->component_class, ci->component_id);
#endif
@@ -760,11 +719,6 @@
fprintf (stderr, "calling %s:%d C handler\n", ci->component_class, ci->component_id);
#endif
ci->refresh_handler (NULL, ci->user_data);
- } else {
-#if CM_DEBUG
- fprintf (stderr, "calling %s:%d SCM handler\n", ci->component_class, ci->component_id);
-#endif
- scm_call_0 (ci->refresh_handler_scm);
}
}
else if (changes_match (&ci->watch_info, &changes_backup))
@@ -774,11 +728,6 @@
fprintf (stderr, "calling %s:%d C handler\n", ci->component_class, ci->component_id);
#endif
ci->refresh_handler (changes_backup.entity_events, ci->user_data);
- } else {
-#if CM_DEBUG
- fprintf (stderr, "calling %s:%d SCM handler\n", ci->component_class, ci->component_id);
-#endif
- scm_call_0 (ci->refresh_handler_scm);
}
}
else
@@ -827,14 +776,11 @@
return;
}
- if (!ci->close_handler &&
- !SCM_PROCEDUREP (ci->close_handler_scm))
+ if (!ci->close_handler)
return;
if (ci->close_handler)
ci->close_handler (ci->user_data);
- else
- scm_call_0 (ci->close_handler_scm);
}
void
Modified: gnucash/trunk/src/app-utils/gnc-component-manager.h
===================================================================
--- gnucash/trunk/src/app-utils/gnc-component-manager.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gnc-component-manager.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -21,8 +21,6 @@
#define GNC_COMPONENT_MANAGER_H
#include <glib.h>
-#include <libguile.h>
-#include "guile-mappings.h"
#include "GNCId.h"
#include "qof.h"
@@ -154,24 +152,6 @@
GNCComponentCloseHandler close_handler,
gpointer user_data);
-/* gnc_register_gui_component_scm
- * Register a GUI component with the manager with scheme callbacks.
- *
- * component_class: same as gnc_register_gui_component
- * refresh_cb: refresh handler, may be SCM_BOOL_F, indicating
- * no handler. the handler is invoked with no
- * arguments
- * close_cb: close handler, may be SCM_BOOL_F, invoked
- * with no arguments
- *
- * Notes: The same notes apply as in gnc_register_gui_component.
- *
- * Return: id of component, or NO_COMPONENT if error
- */
-gint gnc_register_gui_component_scm (const char * component_class,
- SCM refresh_handler,
- SCM close_handler);
-
/* gnc_gui_component_set_session
* Set the associated session of this component
*
Modified: gnucash/trunk/src/app-utils/gnc-helpers.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-helpers.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gnc-helpers.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,5 +1,5 @@
/********************************************************************\
- * gnc-helpers.c -- gnucash g-wrap helper functions *
+ * gnc-helpers.c -- gnucash app-util helper functions *
* Copyright (C) 2000 Linas Vepstas *
* *
* This program is free software; you can redistribute it and/or *
@@ -26,7 +26,7 @@
#include <libguile.h>
#include "guile-mappings.h"
#include <string.h>
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include "gnc-engine.h"
#include "engine-helpers.h"
@@ -67,10 +67,12 @@
info.commodity = gnc_scm_to_commodity (SCM_CAR (info_scm));
info_scm = SCM_CDR (info_scm);
- info.max_decimal_places = scm_num2int (SCM_CAR (info_scm), SCM_ARG1, __FUNCTION__);
+ info.max_decimal_places = scm_num2int (SCM_CAR (info_scm), SCM_ARG1,
+ __FUNCTION__);
info_scm = SCM_CDR (info_scm);
- info.min_decimal_places = scm_num2int (SCM_CAR (info_scm), SCM_ARG1, __FUNCTION__);
+ info.min_decimal_places = scm_num2int (SCM_CAR (info_scm), SCM_ARG1,
+ __FUNCTION__);
info_scm = SCM_CDR (info_scm);
info.use_separators = SCM_NFALSEP (SCM_CAR (info_scm));
@@ -117,7 +119,7 @@
* attempt to optimize the speed of price quote retrieval, this
* routine only converts the fields that price-quotes.scm uses. Since
* it converts these fields all at once, it should prevent multiple
- * transitions back and forth from Scheme to C (via g-wrap) to extract
+ * transitions back and forth from Scheme to C to extract
* the data from a pointers to a gnc-commodity (the older method).
* This is *not* a reversible conversion as it drops data.
*
@@ -139,9 +141,9 @@
source = gnc_commodity_get_quote_source (comm);
name = gnc_quote_source_get_internal_name (source);
tz = gnc_commodity_get_quote_tz (comm);
- comm_scm = gw_wcp_assimilate_ptr (comm, scm_c_eval_string("<gnc:commodity*>"));
- def_comm_scm = gw_wcp_assimilate_ptr (gnc_default_currency (),
- scm_c_eval_string("<gnc:commodity*>"));
+ comm_scm = SWIG_NewPointerObj(comm, SWIG_TypeQuery("_p_gnc_commodity"), 0);
+ def_comm_scm = SWIG_NewPointerObj(gnc_default_currency (),
+ SWIG_TypeQuery("_p_gnc_commodity"), 0);
if (tz)
info_scm = scm_cons (scm_makfrom0str (tz), info_scm);
Modified: gnucash/trunk/src/app-utils/gnc-helpers.h
===================================================================
--- gnucash/trunk/src/app-utils/gnc-helpers.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gnc-helpers.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,5 +1,5 @@
/********************************************************************\
- * gnc-helpers.h -- gnucash g-wrap helper functions *
+ * gnc-helpers.h -- gnucash app-util helper functions *
* Copyright (C) 2000 Linas Vepstas *
* *
* This program is free software; you can redistribute it and/or *
Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -24,6 +24,7 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include <libguile.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
Modified: gnucash/trunk/src/app-utils/gncmod-app-utils.c
===================================================================
--- gnucash/trunk/src/app-utils/gncmod-app-utils.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gncmod-app-utils.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -57,6 +57,9 @@
gnc_hook_run(HOOK_SAVE_OPTIONS, NULL);
}
+
+extern SCM scm_init_sw_app_utils_module(void);
+
int
libgncmod_app_utils_LTX_gnc_module_init(int refcount)
{
@@ -70,9 +73,10 @@
return FALSE;
}
- /* publish g-wrapped bindings */
+ scm_init_sw_app_utils_module();
+ /* publish swig bindings */
/* load the scheme code */
- lmod("(g-wrapped gw-app-utils)");
+ lmod("(sw_app_utils)");
lmod("(gnucash app-utils)");
if (refcount == 0) {
Modified: gnucash/trunk/src/app-utils/guile-util.c
===================================================================
--- gnucash/trunk/src/app-utils/guile-util.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/guile-util.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -23,7 +23,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <string.h>
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include <libguile.h>
#include "qof.h"
@@ -367,7 +367,7 @@
SCM
gnc_copy_split(Split *split, gboolean use_cut_semantics)
{
- static SCM split_type = SCM_UNDEFINED;
+ static swig_type_info *split_type = NULL;
SCM func;
SCM arg;
@@ -378,13 +378,10 @@
if (!SCM_PROCEDUREP(func))
return SCM_UNDEFINED;
- if(split_type == SCM_UNDEFINED) {
- split_type = scm_c_eval_string("<gnc:Split*>");
- /* don't really need this - types are bound globally anyway. */
- if(split_type != SCM_UNDEFINED) scm_gc_protect_object(split_type);
- }
+ if (!split_type)
+ split_type = SWIG_TypeQuery("_p_Split");
- arg = gw_wcp_assimilate_ptr(split, split_type);
+ arg = SWIG_NewPointerObj(split, split_type, 0);
return scm_call_2(func, arg, SCM_BOOL(use_cut_semantics));
}
@@ -402,7 +399,7 @@
gnc_copy_split_scm_onto_split(SCM split_scm, Split *split,
QofBook * book)
{
- static SCM split_type = SCM_UNDEFINED;
+ static swig_type_info *split_type = NULL;
SCM result;
SCM func;
SCM arg;
@@ -427,13 +424,10 @@
if (!SCM_PROCEDUREP(func))
return;
- if(split_type == SCM_UNDEFINED) {
- split_type = scm_c_eval_string("<gnc:Split*>");
- /* don't really need this - types are bound globally anyway. */
- if(split_type != SCM_UNDEFINED) scm_gc_protect_object(split_type);
- }
+ if (!split_type)
+ split_type = SWIG_TypeQuery("_p_Split");
- arg = gw_wcp_assimilate_ptr(split, split_type);
+ arg = SWIG_NewPointerObj(split, split_type, 0);
scm_call_3(func, split_scm, arg, gnc_book_to_scm (book));
}
@@ -736,7 +730,7 @@
SCM
gnc_copy_trans(Transaction *trans, gboolean use_cut_semantics)
{
- static SCM trans_type = SCM_UNDEFINED;
+ static swig_type_info *trans_type = NULL;
SCM func;
SCM arg;
@@ -747,13 +741,10 @@
if (!SCM_PROCEDUREP(func))
return SCM_UNDEFINED;
- if(trans_type == SCM_UNDEFINED) {
- trans_type = scm_c_eval_string("<gnc:Transaction*>");
- /* don't really need this - types are bound globally anyway. */
- if(trans_type != SCM_UNDEFINED) scm_gc_protect_object(trans_type);
- }
+ if (!trans_type)
+ trans_type = SWIG_TypeQuery("_p_Transaction");
- arg = gw_wcp_assimilate_ptr(trans, trans_type);
+ arg = SWIG_NewPointerObj(trans, trans_type, 0);
return scm_call_2(func, arg, SCM_BOOL(use_cut_semantics));
}
@@ -798,7 +789,7 @@
gboolean do_commit,
QofBook *book)
{
- static SCM trans_type = SCM_UNDEFINED;
+ static swig_type_info *trans_type = NULL;
SCM result;
SCM func;
SCM arg;
@@ -823,13 +814,10 @@
if (!SCM_PROCEDUREP(func))
return;
- if(trans_type == SCM_UNDEFINED) {
- trans_type = scm_c_eval_string("<gnc:Transaction*>");
- /* don't really need this - types are bound globally anyway. */
- if(trans_type != SCM_UNDEFINED) scm_gc_protect_object(trans_type);
- }
+ if (!trans_type)
+ trans_type = SWIG_TypeQuery("_p_Transaction");
- arg = gw_wcp_assimilate_ptr(trans, trans_type);
+ arg = SWIG_NewPointerObj(trans, trans_type, 0);
if ((guid_1 == NULL) || (guid_2 == NULL))
{
@@ -1088,7 +1076,6 @@
char *
gnc_get_debit_string(GNCAccountType account_type)
{
- const char *type_string;
const gchar *string;
SCM result;
SCM arg;
@@ -1101,10 +1088,8 @@
if ((account_type < ACCT_TYPE_NONE) || (account_type >= NUM_ACCOUNT_TYPES))
account_type = ACCT_TYPE_NONE;
- type_string = xaccAccountTypeEnumAsString(account_type);
+ arg = scm_long2num(account_type);
- arg = scm_str2symbol(type_string);
-
result = scm_call_1(getters.debit_string, arg);
if (!SCM_STRINGP(result))
return NULL;
@@ -1126,7 +1111,6 @@
char *
gnc_get_credit_string(GNCAccountType account_type)
{
- const char *type_string;
const gchar *string;
SCM result;
SCM arg;
@@ -1139,10 +1123,8 @@
if ((account_type < ACCT_TYPE_NONE) || (account_type >= NUM_ACCOUNT_TYPES))
account_type = ACCT_TYPE_NONE;
- type_string = xaccAccountTypeEnumAsString(account_type);
+ arg = scm_long2num(account_type);
- arg = scm_str2symbol(type_string);
-
result = scm_call_1(getters.credit_string, arg);
if (!SCM_STRINGP(result))
return NULL;
Deleted: gnucash/trunk/src/app-utils/gw-app-utils-spec.scm
===================================================================
--- gnucash/trunk/src/app-utils/gw-app-utils-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/gw-app-utils-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,394 +0,0 @@
-(define-module (g-wrapped gw-app-utils-spec))
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap))
-(use-modules (g-wrap simple-type))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(use-modules (g-wrapped gw-engine-spec))
-
-(let ((ws (gw:new-wrapset "gw-app-utils")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
- (gw:wrapset-depends-on ws "gw-glib")
-
- (gw:wrapset-depends-on ws "gw-engine")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-app-utils))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <option-util.h>\n"
- "#include <gnc-euro.h>\n"
- "#include <gnc-exp-parser.h>\n"
- "#include <gnc-ui-util.h>\n"
- "#include <gnc-gettext-util.h>\n"
- "#include <gnc-helpers.h>\n"
- "#include <gnc-accounting-period.h>\n"
- "#include <gnc-session.h>\n"
- "#include <gnc-component-manager.h>\n")))
-
- (gw:wrap-simple-type ws '<gnc:print-amount-info-scm> "GNCPrintAmountInfo"
- '("gnc_printinfo_p(" scm-var ")")
- '(c-var " = gnc_scm2printinfo(" scm-var ");\n")
- '(scm-var " = gnc_printinfo2scm(" c-var ");\n"))
-
- (gw:wrap-simple-type ws '<gnc:quote-info-scm> "gnc_commodity *"
- '("FALSE")
- '(c-var " = NULL;\n")
- '(scm-var " = gnc_quoteinfo2scm(" c-var ");\n"))
-
- (gw:wrap-as-wct ws
- '<gnc:OptionChangeCallback>
- "GNCOptionChangeCallback" "const GNCOptionChangeCallback")
-
- (gw:wrap-as-wct ws '<gnc:OptionDB*> "GNCOptionDB*" "const GNCOptionDB*")
-
- (gw:wrap-function
- ws
- 'gnc:get-current-group
- '<gnc:AccountGroup*>
- "gnc_get_current_group"
- '()
- "Get the current top-level group.")
-
- (gw:wrap-function
- ws
- 'gnc:get-current-book
- '<gnc:Book*>
- "gnc_get_current_book"
- '()
- "Get the current top-level book.")
-
- (gw:wrap-function
- ws
- 'gnc:get-current-session
- '<gnc:Session*>
- "gnc_get_current_session"
- '()
- "Get the current session.")
-
- (gw:wrap-function
- ws
- 'gnc:parse-amount
- '<gw:scm>
- "gnc_parse_amount_helper"
- '(((<gw:mchars> caller-owned const) str)
- (<gw:bool> monetary))
- "Parse the expression and return either a gnc numeric or #f.")
-
- (gw:wrap-function
- ws
- 'gnc:gettext-helper
- '(<gw:mchars> caller-owned const)
- "gnc_gettext_helper"
- '(((<gw:mchars> caller-owned const) str))
- "Returns the translated version of string")
-
- (gw:wrap-function
- ws
- 'gnc:option-db-new
- '<gnc:OptionDB*>
- "gnc_option_db_new"
- '((<gw:scm> guile-options))
- "Create an option DB with the set of guile options")
-
- (gw:wrap-function
- ws
- 'gnc:option-db-destroy
- '<gw:void>
- "gnc_option_db_destroy"
- '((<gnc:OptionDB*> option-db))
- "Destroy the OptionDB")
-
- (gw:wrap-function
- ws
- 'gnc:option-db-set-option-selectable-by-name
- '<gw:void>
- "gnc_option_db_set_option_selectable_by_name"
- '((<gw:scm> guile-options)
- ((<gw:mchars> caller-owned const) section)
- ((<gw:mchars> caller-owned const) name)
- (<gw:bool> selectable))
- "Set the appropriate option widget to be selectable or not selectable, depending on if <gw:bool> selectable is true or false respectively.")
-
- (gw:wrap-function
- ws
- 'gnc:default-currency
- '(<gnc:commodity*> const)
- "gnc_default_currency"
- '()
- "Return the new-account default currency set by the user.")
-
- (gw:wrap-function
- ws
- 'gnc:default-report-currency
- '(<gnc:commodity*> const)
- "gnc_default_report_currency"
- '()
- "Return the default report currency set by the user.")
-
- (gw:wrap-function
- ws
- 'gnc:amount->string
- '(<gw:mchars> callee-owned const)
- "xaccPrintAmount"
- '((<gnc:numeric> amount)
- (<gnc:print-amount-info-scm> info))
- "Print amount using current locale. The info argument
-determines formatting details.")
-
- (gw:wrap-function
- ws
- 'gnc:option-invoke-callback
- '<gw:void>
- "gncp_option_invoke_callback"
- '((<gnc:OptionChangeCallback> callback) (<gw:void*> data))
- "Invoke the c option callback on the given data.")
-
- (gw:wrap-function
- ws
- 'gnc:option-db-register-option
- '<gw:void>
- "gncp_option_db_register_option"
- '((<gw:int> db_handle) (<gw:scm> option))
- "Register the option with the option database db_handle.")
-
- (gw:wrap-function
- ws
- 'gnc:locale-decimal-places
- '<gw:int>
- "gnc_locale_decimal_places"
- '()
- "Return the number of decimal places for this locale.")
-
- (gw:wrap-function
- ws
- 'gnc:locale-default-currency
- '(<gnc:commodity*> const)
- "gnc_locale_default_currency"
- '()
- "Return the default currency for the current locale.")
-
- (gw:wrap-function
- ws
- 'gnc:locale-default-iso-currency-code
- '(<gw:mchars> callee-owned const)
- "gnc_locale_default_iso_currency_code"
- '()
- "Return the default iso currency code for the current locale.")
-
- (gw:wrap-function
- ws
- 'gnc:register-gui-component
- '<gw:int>
- "gnc_register_gui_component_scm"
- '(((<gw:mchars> caller-owned const) component-class)
- (<gw:scm> refresh-handler)
- (<gw:scm> close-handler))
- "Register a gui component with the component manager.")
-
- (gw:wrap-function
- ws
- 'gnc:gui-component-watch-entity
- '<gw:void>
- "gnc_gui_component_watch_entity_direct"
- '((<gw:int> component-id)
- (<gnc:guid-scm> entity)
- (<gnc:event-type> event-type-mask))
- "Watch the events for a particular entity.")
-
- (gw:wrap-function
- ws
- 'gnc:gui-component-watch-entity-type
- '<gw:void>
- "gnc_gui_component_watch_entity_type"
- '((<gw:int> component-id)
- ((<gw:mchars> caller-owned const) id-type)
- (<gnc:event-type> event-type-mask))
- "Watch the events for a particular entity type.")
-
- (gw:wrap-function
- ws
- 'gnc:unregister-gui-component
- '<gw:void>
- "gnc_unregister_gui_component"
- '((<gw:int> component-id))
- "Unregister a gui component by id.")
-
- (gw:wrap-function
- ws
- 'gnc:gui-refresh-all
- '<gw:void>
- "gnc_gui_refresh_all"
- '()
- "Refresh all gui components.")
-
- (gw:wrap-function
- ws
- 'gnc:close-gui-component
- '<gw:void>
- "gnc_close_gui_component"
- '((<gw:int> component-id))
- "Close a gui component by id.")
-
- (gw:wrap-function
- ws
- 'gnc:account-get-full-name
- '(<gw:mchars> caller-owned)
- "gnc_account_get_full_name"
- '((<gnc:Account*> account))
- "Return the fully-qualified name of the account.")
-
- (gw:wrap-function
- ws
- 'gnc:default-print-info
- '<gnc:print-amount-info-scm>
- "gnc_default_print_info"
- '((<gw:bool> use_symbol))
- "Return the default print info object.")
-
- (gw:wrap-function
- ws
- 'gnc:commodity-print-info
- '<gnc:print-amount-info-scm>
- "gnc_commodity_print_info"
- '((<gnc:commodity*> commodity) (<gw:bool> use_symbol))
- "Return the default print info for commodity.")
-
- (gw:wrap-function
- ws
- 'gnc:account-print-info
- '<gnc:print-amount-info-scm>
- "gnc_account_print_info"
- '((<gnc:Account*> account) (<gw:bool> use_symbol))
- "Return a print info for printing account balances.")
-
- (gw:wrap-function
- ws
- 'gnc:split-amount-print-info
- '<gnc:print-amount-info-scm>
- "gnc_split_amount_print_info"
- '((<gnc:Split*> split) (<gw:bool> use_symbol))
- "Return a print info for printing split amounts.")
-
- (gw:wrap-function
- ws
- 'gnc:split-value-print-info
- '<gnc:print-amount-info-scm>
- "gnc_split_value_print_info"
- '((<gnc:Split*> split) (<gw:bool> use_symbol))
- "Return a print info for print split value quantities.")
-
- (gw:wrap-function
- ws
- 'gnc:share-print-info-places
- '<gnc:print-amount-info-scm>
- "gnc_share_print_info_places"
- '((<gw:int> decplaces))
- "Return a print info for printing share quantities to 'n' places.")
-
- (gw:wrap-function
- ws
- 'gnc:default-share-print-info
- '<gnc:print-amount-info-scm>
- "gnc_default_share_print_info"
- '()
- "Return a print info for printing generic share quantities.")
-
- (gw:wrap-function
- ws
- 'gnc:default-price-print-info
- '<gnc:print-amount-info-scm>
- "gnc_default_price_print_info"
- '()
- "Return a print info for printing generic price quantities.")
-
- (gw:wrap-function
- ws
- 'gnc:account-reverse-balance?
- '<gw:bool>
- "gnc_reverse_balance"
- '((<gnc:Account*> account))
- "Given an account, find out whether the balance should be reversed for display")
-
- (gw:wrap-function
- ws
- 'gnc:is-euro-currency
- '<gw:bool>
- "gnc_is_euro_currency"
- '((<gnc:commodity*> currency))
- "Check if a given currency is a EURO currency")
-
- (gw:wrap-function
- ws
- 'gnc:is-euro-currency-code
- '<gw:bool>
- "gnc_is_euro_currency_code"
- '(((<gw:mchars> caller-owned const) str))
- "Check if a given currency is a EURO currency")
-
- (gw:wrap-function
- ws
- 'gnc:convert-to-euro
- '<gnc:numeric>
- "gnc_convert_to_euro"
- '((<gnc:commodity*> currency) (<gnc:numeric> value))
- "Convert the value from the given currency to EURO")
-
- (gw:wrap-function
- ws
- 'gnc:convert-from-euro
- '<gnc:numeric>
- "gnc_convert_from_euro"
- '((<gnc:commodity*> currency) (<gnc:numeric> value))
- "Convert the value from EURO to the given currency")
-
- (gw:wrap-function
- ws
- 'gnc:euro-currency-get-rate
- '<gnc:numeric>
- "gnc_euro_currency_get_rate"
- '((<gnc:commodity*> currency))
- "Returns the exchange rate from the given currency to EURO")
-
- (gw:wrap-function
- ws
- 'gnc:get-euro
- '<gnc:commodity*>
- "gnc_get_euro"
- '()
- "Returns the commodity EURO")
-
- (gw:wrap-function
- ws
- 'gnc:commodity-table-get-quotable-commodities-info
- '(gw:glist-of <gnc:quote-info-scm> caller-owned)
- "gnc_commodity_table_get_quotable_commodities"
- '((<gnc:commodity-table*> table))
- "Return a list of all the quotable commodities in a given namespace in the table.")
-
- (gw:wrap-function
- ws
- 'gnc:accounting-period-start
- '<gw:int>
- "gnc_accounting_period_fiscal_start"
- '()
- "Returns the beginning of the preferred accounting period")
-
- (gw:wrap-function
- ws
- 'gnc:accounting-period-end
- '<gw:int>
- "gnc_accounting_period_fiscal_end"
- '()
- "Returns the end of the preferred accounting period"))
Modified: gnucash/trunk/src/app-utils/hooks.scm
===================================================================
--- gnucash/trunk/src/app-utils/hooks.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/hooks.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -17,6 +17,6 @@
(define (gnc:hook-run-danglers hook . args)
(if (null? args)
- (set! args #f)
+ (set! args '())
(set! args (car args)))
- (gnc:hook-run-danglers-real hook args))
+ (gnc-hook-run hook args))
Deleted: gnucash/trunk/src/app-utils/kvp-option-registry.scm
===================================================================
--- gnucash/trunk/src/app-utils/kvp-option-registry.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/kvp-option-registry.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,61 +0,0 @@
-;; Code for the kvp/option registry
-;;
-;; Copyright (C) 2002, Derek Atkins <derek at ihtfp.com>
-;;
-;; 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
-
-
-(use-modules (ice-9 slib))
-(require 'hash)
-
-(define gnc:*kvp-option-path* '("options"))
-
-(define gnc:*kvp-option-registry* (make-hash-table 23))
-
-(define (get-ref id-type)
- (let ((gen-list (hash-ref gnc:*kvp-option-registry* id-type)))
- (if gen-list gen-list '())))
-
-
-;;
-;; the generator should be a procedure that takes one argument,
-;; an options object. The procedure should fill in the options with
-;; its defined kvp options.
-;;
-(define (gnc:register-kvp-option-generator id-type generator)
- (let ((gen-list (get-ref id-type)))
- (hash-set! gnc:*kvp-option-registry*
- id-type (append gen-list (list generator)))))
-
-(define (gnc:unregister-kvp-option-generator id-type generator)
- (let ((gen-list (get-ref id-type)))
- (hash-set! gnc:*kvp-option-registry*
- id-type (delq! generator gen-list))))
-
-;;
-;; create a new options object for the requested type
-;;
-(define (gnc:make-kvp-options id-type)
- (let ((gen-list (get-ref id-type))
- (options (gnc:new-options)))
- (map
- (lambda (generator)
- (generator options))
- gen-list)
-
- options))
Modified: gnucash/trunk/src/app-utils/option-util.c
===================================================================
--- gnucash/trunk/src/app-utils/option-util.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/option-util.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -34,7 +34,7 @@
#include "qof.h"
#include "guile-mappings.h"
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
/* TODO:
@@ -267,23 +267,12 @@
/* Create an option DB for a particular data type */
GNCOptionDB *
-gnc_option_db_new_for_type(SCM id_type)
+gnc_option_db_new_for_type(QofIdType id_type)
{
- static SCM make_option_proc = SCM_UNDEFINED;
SCM options;
if (!id_type) return NULL;
-
- if (make_option_proc == SCM_UNDEFINED) {
- make_option_proc = scm_c_eval_string("gnc:make-kvp-options");
- if (!SCM_PROCEDUREP (make_option_proc)) {
- PERR ("not a procedure\n");
- make_option_proc = SCM_UNDEFINED;
- return NULL;
- }
- }
-
- options = scm_call_1 (make_option_proc, id_type);
+ options = gnc_make_kvp_options(id_type);
return gnc_option_db_new (options);
}
@@ -312,9 +301,8 @@
return;
}
}
+ scm_slots = SWIG_NewPointerObj(slots, SWIG_TypeQuery("_p_KvpFrame"), 0);
- scm_slots = gw_wcp_assimilate_ptr (slots, scm_c_eval_string("<gnc:kvp-frame*>"));
-
scm_call_3 (kvp_to_scm, odb->guile_options, scm_slots, kvp_option_path);
}
@@ -344,7 +332,7 @@
}
}
- scm_slots = gw_wcp_assimilate_ptr (slots, scm_c_eval_string("<gnc:kvp-frame*>"));
+ scm_slots = SWIG_NewPointerObj(slots, SWIG_TypeQuery("p_KvpFrame"), 0);
scm_call_3 (scm_to_kvp, odb->guile_options, scm_slots, kvp_option_path);
}
@@ -443,9 +431,6 @@
const char *section,
const char *name)
{
- static SCM void_type = SCM_UNDEFINED;
- static SCM callback_type = SCM_UNDEFINED;
-
SCM register_proc;
SCM arg;
SCM args;
@@ -461,18 +446,6 @@
return SCM_UNDEFINED;
}
- if(void_type == SCM_UNDEFINED) {
- void_type = scm_c_eval_string("<gw:void*>");
- /* don't really need this - types are bound globally anyway. */
- if(void_type != SCM_UNDEFINED) scm_gc_protect_object(void_type);
- }
- if(callback_type == SCM_UNDEFINED) {
- callback_type = scm_c_eval_string("<gnc:OptionChangeCallback>");
- /* don't really need this - types are bound globally anyway. */
- if(callback_type != SCM_UNDEFINED)
- scm_gc_protect_object(callback_type);
- }
-
/* Now build the args list for apply */
args = SCM_EOL;
@@ -480,11 +453,12 @@
args = scm_cons(odb->guile_options, args);
/* next the data */
- arg = gw_wcp_assimilate_ptr(data, void_type);
+ arg = SWIG_NewPointerObj(data, SWIG_TypeQuery("_p_void"), 0);
args = scm_cons(arg, args);
/* next the callback */
- arg = gw_wcp_assimilate_ptr(callback, callback_type);
+ arg = SWIG_NewPointerObj(
+ callback, SWIG_TypeQuery("GNCOptionChangeCallback"), 0);
args = scm_cons(arg, args);
/* next the name */
@@ -1040,7 +1014,6 @@
{
SCM pair;
SCM lst;
- SCM conv_func;
GList *type_list = NULL;
initialize_getters();
@@ -1048,12 +1021,6 @@
pair = scm_call_1(getters.option_data, option->guile_option);
lst = SCM_CDR(pair);
- conv_func = scm_c_eval_string ("gw:enum-<gnc:AccountType>-val->int");
- if (!SCM_PROCEDUREP (conv_func)) {
- PERR ("Cannot obtain conv_func");
- return NULL;
- }
-
while (!SCM_NULLP (lst)) {
GNCAccountType type;
SCM item;
@@ -1062,8 +1029,6 @@
item = SCM_CAR (lst);
lst = SCM_CDR (lst);
- item = scm_call_1(conv_func, item);
-
if (SCM_FALSEP (scm_integer_p (item))) {
PERR ("Invalid type");
} else {
@@ -1451,7 +1416,7 @@
* Returns: nothing *
\********************************************************************/
void
-gncp_option_db_register_option(GNCOptionDBHandle handle, SCM guile_option)
+gnc_option_db_register_option(GNCOptionDBHandle handle, SCM guile_option)
{
GNCOptionDB *odb;
GNCOption *option;
@@ -2816,3 +2781,51 @@
return value;
}
+
+/* For now, this is global, just like when it was in guile.
+ But, it should be make per-book. */
+static GHashTable *kvp_registry = NULL;
+
+static void
+init_table(void)
+{
+ if (!kvp_registry)
+ kvp_registry = g_hash_table_new(g_str_hash, g_str_equal);
+}
+
+/*
+ * the generator should be a procedure that takes one argument,
+ * an options object. The procedure should fill in the options with
+ * its defined kvp options.
+ */
+void
+gnc_register_kvp_option_generator(QofIdType id_type, SCM generator)
+{
+ GList *list;
+ init_table();
+ list = g_hash_table_lookup(kvp_registry, id_type);
+ list = g_list_prepend(list, generator);
+ g_hash_table_insert(kvp_registry, (gpointer) id_type, list);
+ scm_gc_protect_object(generator);
+}
+
+
+/* create a new options object for the requested type */
+SCM
+gnc_make_kvp_options(QofIdType id_type)
+{
+ GList *list, *p;
+ SCM gnc_new_options = SCM_UNDEFINED;
+ SCM options = SCM_UNDEFINED;
+
+ init_table();
+ list = g_hash_table_lookup(kvp_registry, id_type);
+ gnc_new_options = scm_c_eval_string("gnc:new-options");
+ options = scm_call_0(gnc_new_options);
+
+ for (p = list; p; p = p->next) {
+ SCM generator = p->data;
+ scm_call_1(generator, options);
+ }
+ return options;
+}
Modified: gnucash/trunk/src/app-utils/option-util.h
===================================================================
--- gnucash/trunk/src/app-utils/option-util.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/option-util.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -65,14 +65,14 @@
/* Create an option DB for a particular type, and save/load from a kvp.
* This assumes the gnc:*kvp-option-path* location for the options
* in the kvp.
- *
- * Note: the id_type MUST be a reference to the actual SCM
- * gnc:id-type. Just wrapping the type in scheme is *NOT* sufficient.
*/
-GNCOptionDB * gnc_option_db_new_for_type(SCM id_type);
+GNCOptionDB * gnc_option_db_new_for_type(QofIdType id_type);
void gnc_option_db_load_from_kvp(GNCOptionDB* odb, kvp_frame *slots);
void gnc_option_db_save_to_kvp(GNCOptionDB* odb, kvp_frame *slots);
+void gnc_register_kvp_option_generator(QofIdType id_type, SCM generator);
+SCM gnc_make_kvp_options(QofIdType id_type);
+
void gnc_option_db_set_ui_callbacks (GNCOptionDB *odb,
GNCOptionGetUIValue get_ui_value,
GNCOptionSetUIValue set_ui_value,
@@ -260,10 +260,10 @@
gboolean years, const char *custom);
+void gnc_option_db_register_option(GNCOptionDBHandle handle,
+ SCM guile_option);
+
/* private */
-void gncp_option_db_register_option(GNCOptionDBHandle handle,
- SCM guile_option);
-
void gncp_option_invoke_callback(GNCOptionChangeCallback callback,
gpointer data);
Modified: gnucash/trunk/src/app-utils/options.scm
===================================================================
--- gnucash/trunk/src/app-utils/options.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/options.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -196,9 +196,9 @@
(lambda (x) (set! value x))
(lambda () default-value)
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f value p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f value p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(set! value v))))
(lambda (x)
@@ -220,9 +220,9 @@
(lambda (x) (set! value x))
(lambda () default-value)
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f value p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f value p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(set! value v))))
(lambda (x)
@@ -254,9 +254,9 @@
(lambda (x) (set! value x))
(lambda () default-value)
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f value p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f value p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(set! value v))))
(lambda (x)
@@ -276,12 +276,12 @@
(define (currency->scm currency)
(if (string? currency)
currency
- (gnc:commodity-get-mnemonic currency)))
+ (gnc-commodity-get-mnemonic currency)))
(define (scm->currency currency)
(if (string? currency)
- (gnc:commodity-table-lookup
- (gnc:book-get-commodity-table (gnc:get-current-book))
+ (gnc-commodity-table-lookup
+ (gnc-commodity-table-get-table (gnc-get-current-book))
GNC_COMMODITY_NS_CURRENCY currency)
currency))
@@ -293,9 +293,9 @@
(lambda (x) (set! value (currency->scm x)))
(lambda () (scm->currency default-value))
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f value p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f value p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(set! value v))))
(lambda (x) (list #t x))
@@ -312,14 +312,14 @@
(define (budget->guid budget)
(if (string? budget)
budget
- (gnc:budget-get-guid budget)))
+ (gncBudgetGetGUID budget)))
(define (guid->budget budget)
(if (string? budget)
- (gnc:budget-lookup budget (gnc:get-current-book))
+ (gnc-budget-lookup budget (gnc-get-current-book))
budget))
- (let* ((default-value (gnc:budget-get-default (gnc:get-current-book)))
+ (let* ((default-value (gnc-budget-get-default (gnc-get-current-book)))
(value (budget->guid default-value))
(option-set #f)
(value->string (lambda ()
@@ -340,11 +340,11 @@
(set! option-set #t)) ;; setter
(lambda ()
(guid->budget
- (gnc:budget-get-default (gnc:get-current-book)))) ;; default-getter
+ (gnc-budget-get-default (gnc-get-current-book)))) ;; default-getter
(gnc:restore-form-generator value->string) ;; ??
- (lambda (f p) (gnc:kvp-frame-set-slot-path f value p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f value p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(set! value v))))
(lambda (x) (list #t x)) ;; value-validator
@@ -365,12 +365,12 @@
GNC_COMMODITY_NS_CURRENCY
commodity)
(list 'commodity-scm
- (gnc:commodity-get-namespace commodity)
- (gnc:commodity-get-mnemonic commodity))))
+ (gnc-commodity-get-namespace commodity)
+ (gnc-commodity-get-mnemonic commodity))))
(define (scm->commodity scm)
- (gnc:commodity-table-lookup
- (gnc:book-get-commodity-table (gnc:get-current-book))
+ (gnc-commodity-table-lookup
+ (gnc-commodity-table-get-table (gnc-get-current-book))
(cadr scm) (caddr scm)))
(let* ((value (commodity->scm default-value))
@@ -385,11 +385,11 @@
(lambda () default-value)
(gnc:restore-form-generator value->string)
(lambda (f p)
- (gnc:kvp-frame-set-slot-path f (cadr value) (append p '("ns")))
- (gnc:kvp-frame-set-slot-path f (caddr value) (append p '("monic"))))
+ (kvp-frame-set-slot-path-gslist f (cadr value) (append p '("ns")))
+ (kvp-frame-set-slot-path-gslist f (caddr value) (append p '("monic"))))
(lambda (f p)
- (let ((ns (gnc:kvp-frame-get-slot-path f (append p '("ns"))))
- (monic (gnc:kvp-frame-get-slot-path f (append p '("monic")))))
+ (let ((ns (kvp-frame-get-slot-path-gslist f (append p '("ns"))))
+ (monic (kvp-frame-get-slot-path-gslist f (append p '("monic")))))
(if (and ns monic (string? ns) (string? monic))
(set! value (list 'commodity-scm ns monic)))))
(lambda (x) (list #t x))
@@ -443,9 +443,9 @@
(setter-function-called-cb x)))
(lambda () default-value)
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f value p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f value p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (boolean? v) (not (equal? v default-value)))
(set! value v))))
(lambda (x)
@@ -517,16 +517,16 @@
default-getter
(gnc:restore-form-generator value->string)
(lambda (f p)
- (gnc:kvp-frame-set-slot-path f (symbol->string (car value))
+ (kvp-frame-set-slot-path-gslist f (symbol->string (car value))
(append p '("type")))
- (gnc:kvp-frame-set-slot-path f
+ (kvp-frame-set-slot-path-gslist f
(if (symbol? (cdr value))
(symbol->string (cdr value))
(cdr value))
(append p '("value"))))
(lambda (f p)
- (let ((t (gnc:kvp-frame-get-slot-path f (append p '("type"))))
- (v (gnc:kvp-frame-get-slot-path f (append p '("value")))))
+ (let ((t (kvp-frame-get-slot-path-gslist f (append p '("type"))))
+ (v (kvp-frame-get-slot-path-gslist f (append p '("value")))))
(if (and t v (string? t))
(set! value (cons (string->symbol t)
(if (string? v) (string->symbol v) v))))))
@@ -613,11 +613,11 @@
(define (convert-to-guid item)
(if (string? item)
item
- (gnc:account-get-guid item)))
+ (gncAccountGetGUID item)))
(define (convert-to-account item)
(if (string? item)
- (gnc:account-lookup item (gnc:get-current-book))
+ (xaccAccountLookup item (gnc-get-current-book))
item))
(let* ((option (map convert-to-guid (default-getter)))
@@ -640,8 +640,8 @@
(if (not account-list) (set! account-list (default-getter)))
(set! account-list
(filter (lambda (x) (if (string? x)
- (gnc:account-lookup
- x (gnc:get-current-book))
+ (xaccAccountLookup
+ x (gnc-get-current-book))
x)) account-list))
(let* ((result (validator account-list))
(valid (car result))
@@ -657,20 +657,20 @@
(define (save-acc list count)
(if (not (null? list))
(let ((key (string-append "acc" (gnc:value->string count))))
- (gnc:kvp-frame-set-slot-path f (car list) (append p (list key)))
+ (kvp-frame-set-slot-path-gslist f (car list) (append p (list key)))
(save-acc (cdr list) (+ 1 count)))))
(if option-set
(begin
- (gnc:kvp-frame-set-slot-path f (length option)
+ (kvp-frame-set-slot-path-gslist f (length option)
(append p '("len")))
(save-acc option 0))))
(lambda (f p)
- (let ((len (gnc:kvp-frame-get-slot-path f (append p '("len")))))
+ (let ((len (kvp-frame-get-slot-path-gslist f (append p '("len")))))
(define (load-acc count)
(if (< count len)
(let* ((key (string-append "acc" (gnc:value->string count)))
- (guid (gnc:kvp-frame-get-slot-path
+ (guid (kvp-frame-get-slot-path-gslist
f (append p (list key)))))
(cons guid (load-acc (+ count 1))))
'()))
@@ -715,26 +715,27 @@
(define (convert-to-guid item)
(if (string? item)
item
- (gnc:account-get-guid item)))
+ (gncAccountGetGUID item)))
(define (convert-to-account item)
(if (string? item)
- (gnc:account-lookup item (gnc:get-current-book))
+ (xaccAccountLookup item (gnc-get-current-book))
item))
(define (find-first-account)
(define (find-first account-list)
(if (null? account-list)
- #f
+ '()
(let* ((this-account (car account-list))
- (account-type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type this-account) #f)))
- (if (if (null? acct-type-list) #t (member account-type acct-type-list))
+ (account-type (xaccAccountGetType this-account)))
+ (if (if (null? acct-type-list)
+ #t
+ (member account-type acct-type-list))
this-account
(find-first (cdr account-list))))))
- (let* ((current-group (gnc:get-current-group))
- (account-list (gnc:group-get-subaccounts current-group)))
+ (let* ((current-group (gnc-get-current-group))
+ (account-list (xaccGroupGetSubAccountsSorted current-group)))
(find-first account-list)))
(define (get-default)
@@ -771,9 +772,9 @@
(gnc:error "Illegal account value set"))))
(lambda () (convert-to-account (get-default)))
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f value p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f value p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(set! value v))))
validator
@@ -850,9 +851,9 @@
(gnc:error "Illegal Multichoice option set")))
(lambda () default-value)
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f (symbol->string value) p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f (symbol->string value) p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(set! value (string->symbol v)))))
(lambda (x)
@@ -936,9 +937,9 @@
(gnc:error "Illegal Radiobutton option set")))
(lambda () default-value)
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f (symbol->string value) p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f (symbol->string value) p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(set! value (string->symbol v)))))
(lambda (x)
@@ -1002,16 +1003,16 @@
(define (save-item list count)
(if (not (null? list))
(let ((key (string-append "item" (gnc:value->string count))))
- (gnc:kvp-frame-set-slot-path f (car list) (append p (list key)))
+ (kvp-frame-set-slot-path-gslist f (car list) (append p (list key)))
(save-item (cdr list) (+ 1 count)))))
- (gnc:kvp-frame-set-slot-path f (length value) (append p '("len")))
+ (kvp-frame-set-slot-path-gslist f (length value) (append p '("len")))
(save-item value 0))
(lambda (f p)
- (let ((len (gnc:kvp-frame-get-slot-path f (append p '("len")))))
+ (let ((len (kvp-frame-get-slot-path-gslist f (append p '("len")))))
(define (load-item count)
(if (< count len)
(let* ((key (string-append "item" (gnc:value->string count)))
- (val (gnc:kvp-frame-get-slot-path
+ (val (kvp-frame-get-slot-path-gslist
f (append p (list key)))))
(cons val (load-item (+ count 1))))
'()))
@@ -1050,9 +1051,9 @@
(lambda (x) (set! value x))
(lambda () default-value)
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f (symbol->string value) p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f (symbol->string value) p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (number? v))
(set! value v))))
(lambda (x)
@@ -1089,16 +1090,16 @@
default-value)
(let* ((value (if (list? default-value)
default-value
- (gnc:query->scm default-value)))
+ (gnc-query2scm default-value)))
(value->string (lambda ()
(string-append "'" (gnc:value->string value)))))
(gnc:make-option
section name "" 'query #f
(lambda () value)
- (lambda (x) (set! value (if (list? x) x (gnc:query->scm x))))
+ (lambda (x) (set! value (if (list? x) x (gnc-query2scm x))))
(lambda () (if (list? default-value)
default-value
- (gnc:query->scm default-value)))
+ (gnc-query2scm default-value)))
(gnc:restore-form-generator value->string)
#f
#f
@@ -1210,18 +1211,18 @@
(lambda () (def-value))
(gnc:restore-form-generator value->string)
(lambda (f p)
- (gnc:kvp-frame-set-slot-path
+ (kvp-frame-set-slot-path-gslist
f (symbol->string (car value)) (append p '("fmt")))
- (gnc:kvp-frame-set-slot-path
+ (kvp-frame-set-slot-path-gslist
f (symbol->string (cadr value)) (append p '("month")))
- (gnc:kvp-frame-set-slot-path
+ (kvp-frame-set-slot-path-gslist
f (if (caddr value) 1 0) (append p '("years")))
- (gnc:kvp-frame-set-slot-path f (cadddr value) (append p '("custom"))))
+ (kvp-frame-set-slot-path-gslist f (cadddr value) (append p '("custom"))))
(lambda (f p)
- (let ((fmt (gnc:kvp-frame-get-slot-path f (append p '("fmt"))))
- (month (gnc:kvp-frame-get-slot-path f (append p '("month"))))
- (years (gnc:kvp-frame-get-slot-path f (append p '("years"))))
- (custom (gnc:kvp-frame-get-slot-path f (append p '("custom")))))
+ (let ((fmt (kvp-frame-get-slot-path-gslist f (append p '("fmt"))))
+ (month (kvp-frame-get-slot-path-gslist f (append p '("month"))))
+ (years (kvp-frame-get-slot-path-gslist f (append p '("years"))))
+ (custom (kvp-frame-get-slot-path-gslist f (append p '("custom")))))
(if (and
fmt (string? fmt)
month (string? month)
@@ -1447,7 +1448,7 @@
((options 'register-callback) section name callback))
(define (gnc:options-register-c-callback section name c-callback data options)
- (let ((callback (lambda () (gnc:option-invoke-callback c-callback data))))
+ (let ((callback (lambda () (gncp-option-invoke-callback c-callback data))))
((options 'register-callback) section name callback)))
(define (gnc:options-unregister-callback-id id options)
@@ -1467,7 +1468,7 @@
(define (gnc:options-scm->kvp options kvp-frame key-path clear-kvp?)
(if clear-kvp?
- (gnc:kvp-frame-delete-at-path kvp-frame key-path))
+ (gnc-kvp-frame-delete-at-path kvp-frame key-path))
((options 'scm->kvp) kvp-frame key-path))
(define (gnc:options-kvp->scm options kvp-frame key-path)
@@ -1507,7 +1508,7 @@
(define (gnc:send-options db_handle options)
(gnc:options-for-each
(lambda (option)
- (gnc:option-db-register-option db_handle option))
+ (gnc-option-db-register-option db_handle option))
options))
(define (gnc:save-options options options-string file header truncate?)
Modified: gnucash/trunk/src/app-utils/prefs.scm
===================================================================
--- gnucash/trunk/src/app-utils/prefs.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/prefs.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -19,7 +19,6 @@
(require 'sort)
(require 'hash-table)
-(use-modules (g-wrapped gw-core-utils))
;; (define gnc:*double-entry-restriction*
;; (gnc:make-config-var
@@ -64,36 +63,36 @@
;;;;;; Create config vars
(define gnc:*debit-strings*
- (list (cons 'ACCT_TYPE_NONE (N_ "Funds In"))
- (cons 'ACCT_TYPE_BANK (N_ "Deposit"))
- (cons 'ACCT_TYPE_CASH (N_ "Receive"))
- (cons 'ACCT_TYPE_CREDIT (N_ "Payment"))
- (cons 'ACCT_TYPE_ASSET (N_ "Increase"))
- (cons 'ACCT_TYPE_LIABILITY (N_ "Decrease"))
- (cons 'ACCT_TYPE_STOCK (N_ "Buy"))
- (cons 'ACCT_TYPE_MUTUAL (N_ "Buy"))
- (cons 'ACCT_TYPE_CURRENCY (N_ "Buy"))
- (cons 'ACCT_TYPE_INCOME (N_ "Charge"))
- (cons 'ACCT_TYPE_EXPENSE (N_ "Expense"))
- (cons 'ACCT_TYPE_PAYABLE (N_ "Payment"))
- (cons 'ACCT_TYPE_RECEIVABLE (N_ "Invoice"))
- (cons 'ACCT_TYPE_EQUITY (N_ "Decrease"))))
+ (list (cons ACCT-TYPE-NONE (N_ "Funds In"))
+ (cons ACCT-TYPE-BANK (N_ "Deposit"))
+ (cons ACCT-TYPE-CASH (N_ "Receive"))
+ (cons ACCT-TYPE-CREDIT (N_ "Payment"))
+ (cons ACCT-TYPE-ASSET (N_ "Increase"))
+ (cons ACCT-TYPE-LIABILITY (N_ "Decrease"))
+ (cons ACCT-TYPE-STOCK (N_ "Buy"))
+ (cons ACCT-TYPE-MUTUAL (N_ "Buy"))
+ (cons ACCT-TYPE-CURRENCY (N_ "Buy"))
+ (cons ACCT-TYPE-INCOME (N_ "Charge"))
+ (cons ACCT-TYPE-EXPENSE (N_ "Expense"))
+ (cons ACCT-TYPE-PAYABLE (N_ "Payment"))
+ (cons ACCT-TYPE-RECEIVABLE (N_ "Invoice"))
+ (cons ACCT-TYPE-EQUITY (N_ "Decrease"))))
(define gnc:*credit-strings*
- (list (cons 'ACCT_TYPE_NONE (N_ "Funds Out"))
- (cons 'ACCT_TYPE_BANK (N_ "Withdrawal"))
- (cons 'ACCT_TYPE_CASH (N_ "Spend"))
- (cons 'ACCT_TYPE_CREDIT (N_ "Charge"))
- (cons 'ACCT_TYPE_ASSET (N_ "Decrease"))
- (cons 'ACCT_TYPE_LIABILITY (N_ "Increase"))
- (cons 'ACCT_TYPE_STOCK (N_ "Sell"))
- (cons 'ACCT_TYPE_MUTUAL (N_ "Sell"))
- (cons 'ACCT_TYPE_CURRENCY (N_ "Sell"))
- (cons 'ACCT_TYPE_INCOME (N_ "Income"))
- (cons 'ACCT_TYPE_EXPENSE (N_ "Rebate"))
- (cons 'ACCT_TYPE_PAYABLE (N_ "Bill"))
- (cons 'ACCT_TYPE_RECEIVABLE (N_ "Payment"))
- (cons 'ACCT_TYPE_EQUITY (N_ "Increase"))))
+ (list (cons ACCT-TYPE-NONE (N_ "Funds Out"))
+ (cons ACCT-TYPE-BANK (N_ "Withdrawal"))
+ (cons ACCT-TYPE-CASH (N_ "Spend"))
+ (cons ACCT-TYPE-CREDIT (N_ "Charge"))
+ (cons ACCT-TYPE-ASSET (N_ "Decrease"))
+ (cons ACCT-TYPE-LIABILITY (N_ "Increase"))
+ (cons ACCT-TYPE-STOCK (N_ "Sell"))
+ (cons ACCT-TYPE-MUTUAL (N_ "Sell"))
+ (cons ACCT-TYPE-CURRENCY (N_ "Sell"))
+ (cons ACCT-TYPE-INCOME (N_ "Income"))
+ (cons ACCT-TYPE-EXPENSE (N_ "Rebate"))
+ (cons ACCT-TYPE-PAYABLE (N_ "Bill"))
+ (cons ACCT-TYPE-RECEIVABLE (N_ "Payment"))
+ (cons ACCT-TYPE-EQUITY (N_ "Increase"))))
(define (gnc:get-debit-string type)
(_ (assoc-ref gnc:*debit-strings* type)))
Modified: gnucash/trunk/src/app-utils/test/Makefile.am
===================================================================
--- gnucash/trunk/src/app-utils/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,7 +1,6 @@
TESTS = \
test-link-module \
test-load-module \
- test-component-manager \
test-exp-parser \
test-scm-query-string \
test-print-parse-amount
@@ -22,15 +21,14 @@
--gnc-module-dir ${top_builddir}/src/app-utils \
--gnc-module-dir ${top_srcdir}/src/engine \
--gnc-module-dir ${top_srcdir}/src/app-utils \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/scm \
--guile-load-dir ${top_builddir}/src/scm \
--guile-load-dir ${top_builddir}/src/gnome-utils \
+ --guile-load-dir ${top_builddir}/src/core-utils \
--guile-load-dir ${top_builddir}/src/gnome \
--library-dir ${top_builddir}/src/gnome-utils \
- --library-dir ${top_builddir}/src/gnome \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_builddir}/src/gnome
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
@@ -39,7 +37,6 @@
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/app-utils/libgncmod-app-utils.la \
- ${top_builddir}/src/engine/libgw-engine.la \
${top_builddir}/src/test-core/libgncmod-test.la \
${top_builddir}/src/engine/test-core/libgncmod-test-engine.la \
${top_builddir}/src/core-utils/libcore-utils.la \
@@ -55,8 +52,7 @@
test-print-queries
EXTRA_DIST = \
- test-load-module \
- test-component-manager
+ test-load-module
AM_CFLAGS = \
-I${top_srcdir}/src \
Deleted: gnucash/trunk/src/app-utils/test/test-component-manager
===================================================================
--- gnucash/trunk/src/app-utils/test/test-component-manager 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/test/test-component-manager 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,49 +0,0 @@
-#! /bin/bash
-exec guile -s "$0"
-!#
-
-(use-modules (gnucash gnc-module))
-(gnc:module-system-init)
-
-(or (gnc:module-load "gnucash/app-utils" 0)
- (error "can't load module"))
-
-(let ((id #f)
- (refresh-ran #f)
- (close-ran #f))
-
- (define (refresh-handler)
- (set! refresh-ran #t))
-
- (define (close-handler)
- (set! close-ran #t)
- (gnc:unregister-gui-component id))
-
- (set! id (gnc:register-gui-component "test-class"
- refresh-handler
- close-handler))
- (or (not (equal? id -1))
- (error "can't register"))
-
- (gnc:gui-refresh-all)
-
- (or refresh-ran (error "refresh didn't run"))
-
- (gnc:close-gui-component id)
-
- (or close-ran (error "close didn't run"))
-
- (set! refresh-ran #f)
- (set! close-ran #f)
-
- (gnc:gui-refresh-all)
- (gnc:close-gui-component id)
-
- (or (not (or refresh-ran close-ran))
- (error "component not removed")))
-
-(exit 0)
-
-;; Local Variables:
-;; mode: scheme
-;; End:
Modified: gnucash/trunk/src/app-utils/test/test-load-module
===================================================================
--- gnucash/trunk/src/app-utils/test/test-load-module 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/app-utils/test/test-load-module 2006-10-15 19:02:05 UTC (rev 15024)
@@ -8,7 +8,7 @@
(if (gnc:module-load "gnucash/app-utils" 0)
(begin
(if (and (procedure? gnc:error->string)
- (procedure? gnc:guid-new)
+ (procedure? gnc-default-currency)
(macro? N_)
(string=? (N_ "foobar") "foobar"))
(exit 0)
Modified: gnucash/trunk/src/backend/file/test/Makefile.am
===================================================================
--- gnucash/trunk/src/backend/file/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/backend/file/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -62,7 +62,7 @@
${top_srcdir}/src/backend/file/sixtp-stack.c \
${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
test-string-converters.c
-
+
test_xml_account_SOURCES = \
${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
@@ -181,11 +181,9 @@
--gnc-module-dir ${top_builddir}/src/gnc-module \
--gnc-module-dir ${top_builddir}/src/engine \
--gnc-module-dir ${top_srcdir}/src/gnc-module \
- --gnc-module-dir ${top_srcdir}/src/engine \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--library-dir ${top_builddir}/src/backend/file \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR}
+ --gnc-module-dir ${top_srcdir}/src/engine
TESTS_ENVIRONMENT := \
GNC_ACCOUNT_PATH=${top_srcdir}/accounts/C \
@@ -219,8 +217,6 @@
LDADD = ${top_builddir}/src/test-core/libgncmod-test.la \
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/engine/libgncmod-engine.la \
- ${top_builddir}/src/engine/libgw-engine.la \
- ${top_builddir}/src/engine/libgw-kvp.la \
${top_builddir}/src/engine/test-core/libgncmod-test-engine.la \
${top_builddir}/src/core-utils/libcore-utils.la \
./libgnc-test-file-stuff.la \
Modified: gnucash/trunk/src/backend/postgres/test/Makefile.am
===================================================================
--- gnucash/trunk/src/backend/postgres/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/backend/postgres/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -8,9 +8,7 @@
--gnc-module-dir ${top_builddir}/src/engine \
--guile-load-dir ${top_srcdir}/src/engine \
--gnc-module-dir ${top_builddir}/src/backend/file \
- --gnc-module-dir ${top_builddir}/src/backend/postgres \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
- --library-dir ${G_WRAP_LIB_DIR}
+ --gnc-module-dir ${top_builddir}/src/backend/postgres
TESTS_ENVIRONMENT := \
TEST_DB_SOCKET_DIR=`pwd`/gnc_test_db_sock \
@@ -26,8 +24,6 @@
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/engine/libgncmod-engine.la \
- ${top_builddir}/src/engine/libgw-engine.la \
- ${top_builddir}/src/engine/libgw-kvp.la \
${top_builddir}/src/engine/test-core/libgncmod-test-engine.la \
-lltdl \
-lpq
Modified: gnucash/trunk/src/bin/Makefile.am
===================================================================
--- gnucash/trunk/src/bin/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/bin/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -31,8 +31,6 @@
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's#@-BIN_DIR-@#${bindir}#g' \
- -e 's#@-G_WRAP_MODULE_DIR-@#${G_WRAP_MODULE_DIR}#g' \
- -e 's#@-G_WRAP_LIB_DIR-@#${G_WRAP_LIB_DIR}#g' \
-e 's#@-GNC_GUILE_MODULE_DIR-@#${GNC_SHAREDIR}/guile-modules#g' \
-e 's#@-GNC_SCM_INSTALL_DIR-@#${GNC_SCM_INSTALL_DIR}#g' \
-e 's#@-GNC_LIB_INSTALLDIR-@#${libdir}#' \
@@ -46,8 +44,6 @@
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's#@-BIN_DIR-@#${bindir}#g' \
- -e 's#@-G_WRAP_MODULE_DIR-@#${G_WRAP_MODULE_DIR}#g' \
- -e 's#@-G_WRAP_LIB_DIR-@#${G_WRAP_LIB_DIR}#g' \
-e 's#@-GNC_GUILE_MODULE_DIR-@#${GNC_SHAREDIR}/guile-modules#g' \
-e 's#@-GNC_SCM_INSTALL_DIR-@#${GNC_SCM_INSTALL_DIR}#g' \
-e 's#@-GNC_LIB_INSTALLDIR-@#${libdir}#' \
Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/bin/gnucash-bin.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -50,6 +50,9 @@
#include "gnc-plugin-file-history.h"
#include "gnc-gconf-utils.h"
#include "dialog-new-user.h"
+#include "gnc-session.h"
+#include "engine-helpers.h"
+#include "swig-runtime.h"
#ifdef HAVE_GETTEXT
# include <libintl.h>
@@ -103,29 +106,7 @@
help_path = path;
}
-static int error_in_scm_eval = FALSE;
-
-static void
-error_handler(const char *msg)
-{
- g_warning(msg);
- error_in_scm_eval = TRUE;
-}
-
static gboolean
-try_load(gchar *fn)
-{
- g_message("looking for %s", fn);
- if (g_file_test(fn, G_FILE_TEST_EXISTS)) {
- g_message("trying to load %s", fn);
- error_in_scm_eval = FALSE;
- gfec_eval_file(fn, error_handler);
- return !error_in_scm_eval;
- }
- return FALSE;
-}
-
-static gboolean
try_load_config_array(const gchar *fns[])
{
gchar *filename;
@@ -133,7 +114,7 @@
for (i = 0; fns[i]; i++) {
filename = gnc_build_dotgnucash_path(fns[i]);
- if (try_load(filename)) {
+ if (gfec_try_load(filename)) {
g_free(filename);
return TRUE;
}
@@ -160,7 +141,7 @@
update_message("loading system configuration");
/* FIXME: use runtime paths from gnc-path.c here */
system_config = g_build_filename(config_path, "config", NULL);
- is_system_config_loaded = try_load(system_config);
+ is_system_config_loaded = gfec_try_load(system_config);
g_free(system_config);
}
@@ -394,8 +375,9 @@
static void
inner_main_add_price_quotes(void *closure, int argc, char **argv)
{
- SCM mod, add_quotes, scm_filename, scm_result;
-
+ SCM mod, add_quotes, scm_book, scm_result = SCM_BOOL_F;
+ QofSession *session;
+
mod = scm_c_resolve_module("gnucash price-quotes");
scm_set_current_module(mod);
@@ -404,22 +386,42 @@
qof_event_suspend();
scm_c_eval_string("(gnc:price-quotes-install-sources)");
- if (gnc_quote_source_fq_installed()) {
- add_quotes = scm_c_eval_string("gnc:add-quotes-to-book-at-url");
- scm_filename = scm_makfrom0str (add_quotes_file);
- scm_result = scm_call_1(add_quotes, scm_filename);
+ if (!gnc_quote_source_fq_installed()) {
+ g_print(_("No quotes retrieved. Finance::Quote isn't "
+ "installed properly.\n"));
+ goto fail;
+ }
- if (!SCM_NFALSEP(scm_result)) {
+ add_quotes = scm_c_eval_string("gnc:book-add-quotes");
+ session = gnc_get_current_session();
+ if (!session) goto fail;
+
+ qof_session_begin(session, add_quotes_file, FALSE, FALSE);
+ if (qof_session_get_error(session) != ERR_BACKEND_NO_ERR) goto fail;
+
+ qof_session_load(session, NULL);
+ if (qof_session_get_error(session) != ERR_BACKEND_NO_ERR) goto fail;
+
+ scm_book = gnc_book_to_scm(qof_session_get_book(session));
+ scm_result = scm_call_2(add_quotes, SCM_BOOL_F, scm_book);
+
+ qof_session_save(session, NULL);
+ if (qof_session_get_error(session) != ERR_BACKEND_NO_ERR) goto fail;
+
+ qof_session_destroy(session);
+ if (!SCM_NFALSEP(scm_result)) {
g_error("Failed to add quotes to %s.", add_quotes_file);
- gnc_shutdown(1);
- }
- } else {
- g_print(_("No quotes retrieved. Finance::Quote isn't installed properly.\n"));
+ goto fail;
}
qof_event_resume();
gnc_shutdown(0);
return;
+ fail:
+ if (session && qof_session_get_error(session) != ERR_BACKEND_NO_ERR)
+ g_error("Session Error: %s", qof_session_get_error_message(session));
+ qof_event_resume();
+ gnc_shutdown(1);
}
static char *
Modified: gnucash/trunk/src/bin/gnucash-valgrind.in
===================================================================
--- gnucash/trunk/src/bin/gnucash-valgrind.in 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/bin/gnucash-valgrind.in 2006-10-15 19:02:05 UTC (rev 15024)
@@ -8,7 +8,6 @@
GNC_MODULE_PATH="@-GNC_PKGLIB_INSTALLDIR-@:${GNC_MODULE_PATH}"
-EXTRA_PATH="@-G_WRAP_MODULE_DIR-@"
EXTRA_PATH="${EXTRA_PATH}:@-GNC_GUILE_MODULE_DIR-@"
EXTRA_PATH="${EXTRA_PATH}:@-GNC_SCM_INSTALL_DIR-@"
GUILE_LOAD_PATH="${EXTRA_PATH}:${GUILE_LOAD_PATH}"
@@ -16,7 +15,6 @@
EXTRA_LIBS="${GNC_MODULE_PATH}"
EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_LIB_INSTALLDIR-@"
EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_MODULE_DIR-@"
-EXTRA_LIBS="${EXTRA_LIBS}:@-G_WRAP_LIB_DIR-@"
LD_LIBRARY_PATH="${EXTRA_LIBS}:${LD_LIBRARY_PATH}"
LTDL_LIBRARY_PATH="${EXTRA_LIBS}:${LTDL_LIBRARY_PATH}"
Modified: gnucash/trunk/src/bin/gnucash.in
===================================================================
--- gnucash/trunk/src/bin/gnucash.in 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/bin/gnucash.in 2006-10-15 19:02:05 UTC (rev 15024)
@@ -8,7 +8,6 @@
GNC_MODULE_PATH="@-GNC_PKGLIB_INSTALLDIR-@@-PATH_SEPARATOR-@${GNC_MODULE_PATH}"
-EXTRA_PATH="@-G_WRAP_MODULE_DIR-@"
EXTRA_PATH="${EXTRA_PATH}@-PATH_SEPARATOR-@@-GNC_GUILE_MODULE_DIR-@"
EXTRA_PATH="${EXTRA_PATH}@-PATH_SEPARATOR-@@-GNC_SCM_INSTALL_DIR-@"
GUILE_LOAD_PATH="${EXTRA_PATH}@-PATH_SEPARATOR-@${GUILE_LOAD_PATH}"
@@ -16,7 +15,6 @@
EXTRA_LIBS="${GNC_MODULE_PATH}"
EXTRA_LIBS="${EXTRA_LIBS}@-PATH_SEPARATOR-@@-GNC_LIB_INSTALLDIR-@"
EXTRA_LIBS="${EXTRA_LIBS}@-PATH_SEPARATOR-@@-GNC_MODULE_DIR-@"
-EXTRA_LIBS="${EXTRA_LIBS}@-PATH_SEPARATOR-@@-G_WRAP_LIB_DIR-@"
LD_LIBRARY_PATH="${EXTRA_LIBS}@-PATH_SEPARATOR-@${LD_LIBRARY_PATH}"
LTDL_LIBRARY_PATH="${EXTRA_LIBS}@-PATH_SEPARATOR-@${LTDL_LIBRARY_PATH}"
Modified: gnucash/trunk/src/bin/overrides/Makefile.am
===================================================================
--- gnucash/trunk/src/bin/overrides/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/bin/overrides/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -31,8 +31,6 @@
gnucash-env: gnucash-env.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
- -e 's#@-G_WRAP_MODULE_DIR-@#${G_WRAP_MODULE_DIR}#g' \
- -e 's#@-G_WRAP_LIB_DIR-@#${G_WRAP_LIB_DIR}#g' \
-e 's#@-GNC_GUILE_MODULE_DIR-@#${GNC_SHAREDIR}/guile-modules#g' \
-e 's#@-GNC_SCM_INSTALL_DIR-@#${GNC_SCM_INSTALL_DIR}#g' \
-e 's#@-GNC_LIB_INSTALLDIR-@#${libdir}#' \
@@ -47,8 +45,6 @@
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's#@-GNC_TEST_SRFI_LOAD_CMD-@#@GNC_TEST_SRFI_LOAD_CMD@#g' \
- -e 's#@-G_WRAP_MODULE_DIR-@#${G_WRAP_MODULE_DIR}#g' \
- -e 's#@-G_WRAP_LIB_DIR-@#${G_WRAP_LIB_DIR}#g' \
-e 's#@-GNC_BUILDDIR-@#${PWD}/${top_builddir}#g' \
-e 's#@-GNC_SRCDIR-@#${PWD}/${top_srcdir}#g'
mv $@.tmp $@
Modified: gnucash/trunk/src/bin/overrides/gnucash-build-env.in
===================================================================
--- gnucash/trunk/src/bin/overrides/gnucash-build-env.in 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/bin/overrides/gnucash-build-env.in 2006-10-15 19:02:05 UTC (rev 15024)
@@ -10,8 +10,6 @@
top_srcdir="@-GNC_SRCDIR-@"
top_builddir="@-GNC_BUILDDIR-@"
-G_WRAP_MODULE_DIR="@-G_WRAP_MODULE_DIR-@"
-G_WRAP_LIB_DIR="@-G_WRAP_LIB_DIR-@"
if test "${GNC_CONFIG_PATH}"x = x
then
@@ -33,8 +31,6 @@
eval `@-GNC_SRCDIR-@/src/gnc-test-env @-GNC_TEST_SRFI_LOAD_CMD-@ \
--library-dir ${top_builddir}/src/gnome \
- --library-dir ${G_WRAP_LIB_DIR} \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_builddir}/src/scm \
--guile-load-dir ${top_builddir}/lib/guile-www \
--guile-load-dir ${top_builddir}/src/gnome \
Modified: gnucash/trunk/src/bin/overrides/gnucash-env.in
===================================================================
--- gnucash/trunk/src/bin/overrides/gnucash-env.in 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/bin/overrides/gnucash-env.in 2006-10-15 19:02:05 UTC (rev 15024)
@@ -6,7 +6,6 @@
GNC_MODULE_PATH="@-GNC_PKGLIB_INSTALLDIR-@:${GNC_MODULE_PATH}"
-EXTRA_PATH="@-G_WRAP_MODULE_DIR-@"
EXTRA_PATH="${EXTRA_PATH}:@-GNC_GUILE_MODULE_DIR-@"
EXTRA_PATH="${EXTRA_PATH}:@-GNC_SCM_INSTALL_DIR-@"
@@ -15,7 +14,6 @@
EXTRA_LIBS="${GNC_MODULE_PATH}"
EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_LIB_INSTALLDIR-@"
EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_MODULE_DIR-@"
-EXTRA_LIBS="${EXTRA_LIBS}:@-G_WRAP_LIB_DIR-@"
LD_LIBRARY_PATH="${EXTRA_LIBS}:${LD_LIBRARY_PATH}"
LTDL_LIBRARY_PATH="${EXTRA_LIBS}:${LTDL_LIBRARY_PATH}"
Property changes on: gnucash/trunk/src/business/business-core
___________________________________________________________________
Name: svn:ignore
- *.lo
*.la
.deps
.libs
.scm-links
Makefile
Makefile.in
gw-business-core.c
gw-business-core.h
gw-business-core.html
gw-business-core.scm
.DS_Store
*.loT
g-wrapped
gnucash
semantic.cache
TAGS
+ *.lo
*.la
.deps
.libs
.scm-links
Makefile
Makefile.in
swig-business-core.c
gw-business-core.c
gw-business-core.h
gw-business-core.html
gw-business-core.scm
.DS_Store
*.loT
g-wrapped
gnucash
semantic.cache
TAGS
Modified: gnucash/trunk/src/business/business-core/Makefile.am
===================================================================
--- gnucash/trunk/src/business/business-core/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,18 +1,19 @@
SUBDIRS = . test file
PWD := $(shell pwd)
-pkglib_LTLIBRARIES = libgncmod-business-core.la libgw-business-core.la
+pkglib_LTLIBRARIES = libgncmod-business-core.la
AM_CFLAGS = \
-I${top_srcdir}/src \
-I${top_srcdir}/src/engine \
-I${top_srcdir}/src/gnc-module \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${QOF_CFLAGS} \
${GLIB_CFLAGS}
libgncmod_business_core_la_SOURCES = \
+ swig-business-core.c \
+ gncBusGuile.c \
businessmod-core.c \
gncAddress.c \
gncBillTerm.c \
@@ -57,7 +58,6 @@
libgncmod_business_core_la_LIBADD = \
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/engine/libgncmod-engine.la \
- ${G_WRAP_LINK_ARGS} \
${QOF_LIBS} \
${GUILE_LIBS} \
${GLIB_LIBS} \
@@ -65,43 +65,25 @@
# business-core-helpers.c
-libgw_business_core_la_SOURCES = \
- gncBusGuile.c
+if BUILDING_FROM_SVN
+swig-business-core.c: business-core.i ${noinst_HEADERS}
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module \
+ -I${top_srcdir}/src/engine -o $@ $<
+endif
-nodist_libgw_business_core_la_SOURCES = \
- gw-business-core.c
-
-libgw_business_core_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
-libgw_business_core_la_LIBADD = \
- libgncmod-business-core.la \
- ${top_builddir}/src/engine/libgw-engine.la \
- ${top_builddir}/src/engine/libgncmod-engine.la \
- ${QOF_LIBS} \
- ${GLIB_LIBS}
-
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = business-core.scm
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = \
- gw-business-core-spec.scm
-nodist_gwmod_DATA = \
- gw-business-core.scm
+EXTRA_DIST = business-core.i ${gncmod_DATA}
-EXTRA_DIST = \
- ${gncmod_DATA} \
- ${gwmod_DATA}
-
if GNUCASH_SEPARATE_BUILDDIR
-#For compiling
-SCM_FILE_LINKS = gw-business-core-spec.scm
#For executing test cases
-SCM_FILE_LINKS += ${gncmod_DATA}
+SCM_FILE_LINKS = ${gncmod_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
@@ -110,25 +92,6 @@
( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-business-core.scm gw-business-core.c gw-business-core.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-business-core-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (set! %load-path (cons \"../../engine\" %load-path)) \
- (primitive-load \"./gw-business-core-spec.scm\") \
- (gw:generate-wrapset \"gw-business-core\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-business-core.scm gw-business-core.c gw-business-core.h
-CLEANFILES = $(BUILT_SOURCES) gw-business-core.html \
- .scm-links ${SCM_FILE_LINKS}
+noinst_DATA = .scm-links
+CLEANFILES = gnucash .scm-links ${SCM_FILE_LINKS}
+MAINTAINERCLEANFILES = swig-business-core.c
Copied: gnucash/trunk/src/business/business-core/business-core.i (from rev 15023, gnucash/branches/swig-redo/src/business/business-core/business-core.i)
Modified: gnucash/trunk/src/business/business-core/business-core.scm
===================================================================
--- gnucash/trunk/src/business/business-core/business-core.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/business-core.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,25 +1,24 @@
(define-module (gnucash business-core))
-(use-modules (g-wrapped gw-business-core))
+(use-modules (sw_business_core))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/engine" 0)
(define (gnc:owner-get-address owner)
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type owner) #f)))
- (case type
- ((gnc-owner-customer)
- (let ((c (gnc:owner-get-customer owner)))
- (gnc:customer-get-addr c)))
- ((gnc-owner-vendor)
- (let ((v (gnc:owner-get-vendor owner)))
- (gnc:vendor-get-addr v)))
- ((gnc-owner-employee)
- (let ((e (gnc:owner-get-employee owner)))
- (gnc:employee-get-addr e)))
- ((gnc-owner-job)
+ (let ((type (gncOwnerGetType owner)))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
+ (let ((c (gncOwnerGetCustomer owner)))
+ (gncCustomerGetAddr c)))
+ ((eqv? type GNC-OWNER-VENDOR)
+ (let ((v (gncOwnerGetVendor owner)))
+ (gncVendorGetAddr v)))
+ ((eqv? type GNC-OWNER-EMPLOYEE)
+ (let ((e (gncOwnerGetEmployee owner)))
+ (gncEmployeeGetAddr e)))
+ ((eqv? type GNC-OWNER-JOB)
(gnc:owner-get-address (gnc:job-get-owner
- (gnc:owner-get-job owner))))
- (else ""))))
+ (gncOwnerGetJob owner))))
+ (else '()))))
;
; The -dep functions return combined strings of the appropriate
@@ -36,13 +35,12 @@
(define (just-name name)
(if name name ""))
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type owner) #f)))
- (case type
- ((gnc-owner-job)
+ (let ((type (gncOwnerGetType owner)))
+ (cond
+ ((eqv? type GNC-OWNER-JOB)
(gnc:owner-get-name-dep (gnc:job-get-owner
- (gnc:owner-get-job owner))))
- (else (just-name (gnc:owner-get-name owner))))))
+ (gncOwnerGetJob owner))))
+ (else (just-name (gncOwnerGetName owner))))))
(define (gnc:owner-get-address-dep owner)
(define (add-if-exists lst new)
@@ -56,10 +54,10 @@
(else (string-append (build-string (cdr lst)) "\n" (car lst)))))
(let ((lst '())
(addr (gnc:owner-get-address owner)))
- (set! lst (add-if-exists lst (gnc:address-get-addr1 addr)))
- (set! lst (add-if-exists lst (gnc:address-get-addr2 addr)))
- (set! lst (add-if-exists lst (gnc:address-get-addr3 addr)))
- (set! lst (add-if-exists lst (gnc:address-get-addr4 addr)))
+ (set! lst (add-if-exists lst (gncAddressGetAddr1 addr)))
+ (set! lst (add-if-exists lst (gncAddressGetAddr2 addr)))
+ (set! lst (add-if-exists lst (gncAddressGetAddr3 addr)))
+ (set! lst (add-if-exists lst (gncAddressGetAddr4 addr)))
(build-string lst)))
(define (gnc:owner-get-name-and-address-dep owner)
@@ -70,45 +68,44 @@
addr)))
(define (gnc:owner-get-owner-id owner)
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type owner) #f)))
- (case type
- ((gnc-owner-customer)
- (let ((c (gnc:owner-get-customer owner)))
- (gnc:customer-get-id c)))
- ((gnc-owner-vendor)
- (let ((v (gnc:owner-get-vendor owner)))
- (gnc:vendor-get-id v)))
- ((gnc-owner-employee)
- (let ((e (gnc:owner-get-employee owner)))
- (gnc:employee-get-id e)))
- ((gnc-owner-job)
- (gnc:owner-get-owner-id (gnc:job-get-owner (gnc:owner-get-job owner))))
+ (let ((type (gncOwnerGetType owner)))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
+ (let ((c (gncOwnerGetCustomer owner)))
+ (gncCustomerGetID c)))
+ ((eqv? type GNC-OWNER-VENDOR)
+ (let ((v (gncOwnerGetVendor owner)))
+ (gncVendorGetID v)))
+ ((eqv? type GNC-OWNER-EMPLOYEE)
+ (let ((e (gncOwnerGetEmployee owner)))
+ (gncEmployeeGetID e)))
+ ((eqv? type GNC-OWNER-JOB)
+ (gnc:owner-get-owner-id (gncJobGetOwner (gncOwnerGetJob owner))))
(else ""))))
(define (gnc:entry-type-percent-p type-val)
- (let ((type (gw:enum-<gnc:GncAmountType>-val->sym type-val #f)))
- (equal? type 'gnc-amount-type-percent)))
+ (let ((type type-val))
+ (equal? type GNC-AMT-TYPE-PERCENT)))
(define (gnc:owner-from-split split result-owner)
- (let* ((trans (gnc:split-get-parent split))
- (invoice (gnc:invoice-get-invoice-from-txn trans))
- (temp-owner (gnc:owner-create))
+ (let* ((trans (xaccSplitGetParent split))
+ (invoice (gncInvoiceGetInvoiceFromTxn trans))
+ (temp-owner (gncOwnerCreate))
(owner #f))
(if invoice
- (set! owner (gnc:invoice-get-owner invoice))
- (let ((split-list (gnc:transaction-get-splits trans)))
+ (set! owner (gncInvoiceGetOwner invoice))
+ (let ((split-list (xaccTransGetSplits trans)))
(define (check-splits splits)
(if (and splits (not (null? splits)))
(let* ((split (car splits))
- (lot (gnc:split-get-lot split)))
+ (lot (xaccSplitGetLot split)))
(if lot
- (let* ((invoice (gnc:invoice-get-invoice-from-lot lot))
+ (let* ((invoice (gncInvoiceGetInvoiceFromLot lot))
(owner? (gnc:owner-get-owner-from-lot
lot temp-owner)))
(if invoice
- (set! owner (gnc:invoice-get-owner invoice))
+ (set! owner (gncInvoiceGetOwner invoice))
(if owner?
(set! owner temp-owner)
(check-splits (cdr splits)))))
@@ -117,12 +114,12 @@
(if owner
(begin
- (gnc:owner-copy-into-owner (gnc:owner-get-end-owner owner) result-owner)
- (gnc:owner-destroy temp-owner)
+ (gncOwnerCopy (gncOwnerGetEndOwner owner) result-owner)
+ (gncOwnerDestroy temp-owner)
result-owner)
(begin
- (gnc:owner-destroy temp-owner)
- #f))))
+ (gncOwnerDestroy temp-owner)
+ #f)))) ;; FIXME!
(export gnc:owner-get-address)
Modified: gnucash/trunk/src/business/business-core/businessmod-core.c
===================================================================
--- gnucash/trunk/src/business/business-core/businessmod-core.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/businessmod-core.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -30,7 +30,6 @@
#include "gnc-module.h"
#include "gnc-module-api.h"
-#include "gw-business-core.h"
#include "gncAddressP.h"
#include "gncBillTermP.h"
@@ -44,6 +43,8 @@
#include "gncTaxTableP.h"
#include "gncVendorP.h"
+extern SCM scm_init_sw_business_core_module (void);
+
/* version of the gnc module system interface we require */
int libgncmod_business_core_LTX_gnc_module_system_interface = 0;
@@ -94,7 +95,8 @@
gncVendorRegister ();
}
- scm_c_eval_string("(use-modules (g-wrapped gw-business-core))");
+ scm_init_sw_business_core_module();
+ scm_c_eval_string("(use-modules (sw_business_core))");
scm_c_eval_string("(use-modules (gnucash business-core))");
return TRUE;
Modified: gnucash/trunk/src/business/business-core/gncBillTerm.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncBillTerm.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncBillTerm.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -59,17 +59,19 @@
* ??? huh?
* NOTE: This enum /depends/ on starting at value 1
*/
+#ifndef SWIG
#define ENUM_TERMS_TYPE(_) \
_(GNC_TERM_TYPE_DAYS,=1) \
_(GNC_TERM_TYPE_PROXIMO,)
DEFINE_ENUM(GncBillTermType, ENUM_TERMS_TYPE)
-
-/*typedef enum {
+#else
+typedef enum {
GNC_TERM_TYPE_DAYS = 1,
GNC_TERM_TYPE_PROXIMO,
} GncBillTermType;
-*/
+#endif
+
/** @name Create/Destroy Functions
@{ */
GncBillTerm * gncBillTermCreate (QofBook *book);
@@ -108,7 +110,6 @@
GncBillTerm *gncBillTermLookupByName (QofBook *book, const char *name);
GList * gncBillTermGetTerms (QofBook *book);
-KvpFrame* gncBillTermGetSlots (GncBillTerm *term);
const char *gncBillTermGetName (GncBillTerm *term);
const char *gncBillTermGetDescription (GncBillTerm *term);
Modified: gnucash/trunk/src/business/business-core/gncBusGuile.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncBusGuile.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncBusGuile.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -25,28 +25,26 @@
#include "gncBusGuile.h"
#include "engine-helpers.h"
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
+#define FUNC_NAME __FUNCTION__
-static SCM
+static swig_type_info *
get_acct_type ()
{
- static SCM account_type = SCM_UNDEFINED;
+ static swig_type_info * account_type = NULL;
- if(account_type == SCM_UNDEFINED) {
- account_type = scm_c_eval_string("<gnc:Account*>");
- /* don't really need this - types are bound globally anyway. */
- if(account_type != SCM_UNDEFINED) scm_gc_protect_object(account_type);
- }
+ if (!account_type)
+ account_type = SWIG_TypeQuery("_p_Account");
return account_type;
}
int gnc_account_value_pointer_p (SCM arg)
{
- SCM account_type = get_acct_type();
+ swig_type_info * account_type = get_acct_type();
return (SCM_CONSP (arg) &&
- gw_wcp_is_of_type_p(account_type, SCM_CAR (arg)) &&
+ SWIG_IsPointerOfType(SCM_CAR (arg), account_type) &&
gnc_numeric_p (SCM_CDR (arg)));
}
@@ -55,15 +53,15 @@
GncAccountValue *res;
Account *acc = NULL;
gnc_numeric value;
- SCM account_type = get_acct_type();
+ swig_type_info * account_type = get_acct_type();
SCM val;
/* Get the account */
val = SCM_CAR (valuearg);
- if (!gw_wcp_is_of_type_p (account_type, val))
+ if (!SWIG_IsPointerOfType (val, account_type))
return NULL;
- acc = gw_wcp_get_ptr (val);
+ acc = SWIG_MustGetPtr(val, account_type, 1, 0);
/* Get the value */
val = SCM_CDR (valuearg);
@@ -78,7 +76,7 @@
SCM gnc_account_value_ptr_to_scm (GncAccountValue *av)
{
- SCM account_type = get_acct_type();
+ swig_type_info * account_type = get_acct_type();
gnc_commodity * com;
gnc_numeric val;
@@ -88,6 +86,6 @@
val = gnc_numeric_convert (av->value, gnc_commodity_get_fraction (com),
GNC_RND_ROUND);
- return scm_cons (gw_wcp_assimilate_ptr (av->account, account_type),
+ return scm_cons (SWIG_NewPointerObj(av->account, account_type, 0),
gnc_numeric_to_scm (val));
}
Modified: gnucash/trunk/src/business/business-core/gncCustomer.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncCustomer.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncCustomer.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -120,7 +120,6 @@
gboolean gncCustomerGetTaxTableOverride (GncCustomer *customer);
GncTaxTable* gncCustomerGetTaxTable (GncCustomer *customer);
-KvpFrame *gncCustomerGetSlots (GncCustomer *customer);
GList * gncCustomerGetJoblist (GncCustomer *customer, gboolean show_all);
/** @} */
Modified: gnucash/trunk/src/business/business-core/gncEntry.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncEntry.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncEntry.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1141,7 +1141,7 @@
return (is_inv ? entry->i_tax_value_rounded : entry->b_tax_value_rounded);
}
-GList * gncEntryReturnTaxValues (GncEntry *entry, gboolean is_inv)
+AccountValueList * gncEntryReturnTaxValues (GncEntry *entry, gboolean is_inv)
{
if (!entry) return NULL;
gncEntryRecomputeValues (entry);
Modified: gnucash/trunk/src/business/business-core/gncEntry.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncEntry.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncEntry.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -169,7 +169,8 @@
gnc_numeric gncEntryReturnValue (GncEntry *entry, gboolean is_inv);
gnc_numeric gncEntryReturnDiscountValue (GncEntry *entry, gboolean is_inv);
gnc_numeric gncEntryReturnTaxValue (GncEntry *entry, gboolean is_inv);
-GList * gncEntryReturnTaxValues (GncEntry *entry, gboolean is_inv);
+typedef GList AccountValueList;
+AccountValueList * gncEntryReturnTaxValues (GncEntry *entry, gboolean is_inv);
/** Compute the Entry value, tax-value, and discount_value, based on
* the quantity, price, discount, tax-table, and types. The value is
Modified: gnucash/trunk/src/business/business-core/gncInvoice.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncInvoice.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncInvoice.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -94,6 +94,11 @@
qof_event_gen (&invoice->inst.entity, QOF_EVENT_MODIFY, NULL);
}
+QofBook * gncInvoiceGetBook(GncInvoice *x)
+{
+ return qof_instance_get_book(QOF_INSTANCE(x));
+}
+
/* ================================================================== */
/* Create/Destroy Functions */
@@ -639,7 +644,7 @@
return invoice->to_charge_amount;
}
-GList * gncInvoiceGetEntries (GncInvoice *invoice)
+EntryList * gncInvoiceGetEntries (GncInvoice *invoice)
{
if (!invoice) return NULL;
return invoice->entries;
Modified: gnucash/trunk/src/business/business-core/gncInvoice.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncInvoice.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncInvoice.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -43,6 +43,7 @@
#include "gncEntry.h"
#include "gncOwner.h"
#include "gnc-lot.h"
+#include "qofbook.h"
#define GNC_ID_INVOICE "gncInvoice"
#define GNC_IS_INVOICE(obj) (QOF_CHECK_TYPE((obj), GNC_ID_INVOICE))
@@ -108,7 +109,8 @@
gnc_numeric gncInvoiceGetTotalSubtotal (GncInvoice *invoice);
gnc_numeric gncInvoiceGetTotalTax (GncInvoice *invoice);
-GList * gncInvoiceGetEntries (GncInvoice *invoice);
+typedef GList EntryList;
+EntryList * gncInvoiceGetEntries (GncInvoice *invoice);
/** Post this invoice to an account. Returns the new Transaction
* that is tied to this invoice. The transaction is set with
@@ -164,7 +166,6 @@
#define gncInvoiceLookup(book,guid) \
QOF_BOOK_LOOKUP_ENTITY((book),(guid),GNC_ID_INVOICE, GncInvoice)
-gboolean gncInvoiceIsDirty (GncInvoice *invoice);
void gncInvoiceBeginEdit (GncInvoice *invoice);
void gncInvoiceCommitEdit (GncInvoice *invoice);
int gncInvoiceCompare (GncInvoice *a, GncInvoice *b);
@@ -192,8 +193,9 @@
#define INVOICE_FROM_LOT "invoice-from-lot"
#define INVOICE_FROM_TXN "invoice-from-txn"
+QofBook *gncInvoiceGetBook(GncInvoice *x);
+
/** deprecated functions */
-#define gncInvoiceGetBook(x) qof_instance_get_book(QOF_INSTANCE(x))
#define gncInvoiceGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x))
#define gncInvoiceRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null()))
#define gncInvoiceLookupDirect(G,B) gncInvoiceLookup((B),&(G))
Modified: gnucash/trunk/src/business/business-core/gncJob.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncJob.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncJob.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -70,7 +70,6 @@
/** @} */
gboolean gncJobGetActive (GncJob *job);
-gboolean gncJobIsDirty (GncJob *job);
/** Return a pointer to the instance gncJob that is identified
* by the guid, and is residing in the book. Returns NULL if the
Modified: gnucash/trunk/src/business/business-core/gncOrder.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncOrder.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncOrder.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -76,7 +76,6 @@
/* Get the list Entries */
GList * gncOrderGetEntries (GncOrder *order);
-gboolean gncOrderIsDirty (GncOrder *order);
void gncOrderBeginEdit (GncOrder *order);
void gncOrderCommitEdit (GncOrder *order);
int gncOrderCompare (GncOrder *a, GncOrder *b);
Modified: gnucash/trunk/src/business/business-core/gncOwner.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncOwner.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gncOwner.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -33,7 +33,7 @@
#ifndef GNC_OWNER_H_
#define GNC_OWNER_H_
-typedef struct gnc_owner_s GncOwner;
+typedef struct _gncOwner GncOwner;
#define GNC_ID_OWNER "gncOwner"
@@ -67,17 +67,13 @@
/** set the owner from the entity. */
void qofOwnerSetEntity (GncOwner *owner, QofEntity *ent);
-/** \brief Set the parent owner. */
-void qofOwnerSetEndOwner (GncOwner *owner, GncOwner *parent);
-GncOwner* qofOwnerCreate (QofBook *book);
-
gboolean
gncOwnerRegister(void);
/** @} */
/** \struct GncOwner */
-struct gnc_owner_s {
+struct _gncOwner {
GncOwnerType type; /**< Customer, Job, Vendor, Employee or Undefined. */
union {
gpointer undefined;
Deleted: gnucash/trunk/src/business/business-core/gw-business-core-spec.scm
===================================================================
--- gnucash/trunk/src/business/business-core/gw-business-core-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/gw-business-core-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,1180 +0,0 @@
-;;; -*-scheme-*-
-
-;(debug-enable 'backtrace)
-;(debug-enable 'debug)
-;(read-enable 'positions)
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(define-module (g-wrapped gw-business-core-spec)
- :use-module (g-wrap))
-
-(use-modules (g-wrap))
-(use-modules (g-wrap simple-type))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-
-(use-modules (g-wrapped gw-engine-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(let ((ws (gw:new-wrapset "gw-business-core")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
- (gw:wrapset-depends-on ws "gw-glib")
-
- (gw:wrapset-depends-on ws "gw-engine")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-business-core))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <gncAddress.h>\n"
- "#include <gncBillTerm.h>\n"
- "#include <gncCustomer.h>\n"
- "#include <gncEmployee.h>\n"
- "#include <gncEntry.h>\n"
- "#include <gncInvoice.h>\n"
- "#include <gncJob.h>\n"
- "#include <gncOrder.h>\n"
- "#include <gncOwner.h>\n"
- "#include <gncTaxTable.h>\n"
- "#include <gncVendor.h>\n"
- "#include <gncBusGuile.h>\n")))
-
- (gw:wrapset-add-cs-initializers!
- ws
- (lambda (wrapset client-wrapset status-var)
- (if client-wrapset
- '()
- (gw:inline-scheme '(use-modules (gnucash business-core))))))
-
- ;; The core Business Object Types
-
- (gw:wrap-as-wct ws '<gnc:GncAddress*> "GncAddress*" "const GncAddress*")
- (gw:wrap-as-wct ws '<gnc:GncBillTerm*> "GncBillTerm*" "const GncBillTerm*")
- (gw:wrap-as-wct ws '<gnc:GncCustomer*> "GncCustomer*" "const GncCustomer*")
- (gw:wrap-as-wct ws '<gnc:GncEmployee*> "GncEmployee*" "const GncEmployee*")
- (gw:wrap-as-wct ws '<gnc:GncEntry*> "GncEntry*" "const GncEntry*")
- (gw:wrap-as-wct ws '<gnc:GncInvoice*> "GncInvoice*" "const GncInvoice*")
- (gw:wrap-as-wct ws '<gnc:GncJob*> "GncJob*" "const GncJob*")
- (gw:wrap-as-wct ws '<gnc:GncOrder*> "GncOrder*" "const GncOrder*")
- (gw:wrap-as-wct ws '<gnc:GncOwner*> "GncOwner*" "const GncOwner*")
- (gw:wrap-as-wct ws '<gnc:GncTaxTable*> "GncTaxTable*" "const GncTaxTable*")
- (gw:wrap-as-wct ws '<gnc:GncVendor*> "GncVendor*" "const GncVendor*")
-
- (let ((wt (gw:wrap-enumeration ws '<gnc:GncOwnerType> "GncOwnerType")))
- (gw:enum-add-value! wt "GNC_OWNER_NONE" 'gnc-owner-none)
- (gw:enum-add-value! wt "GNC_OWNER_UNDEFINED" 'gnc-owner-undefined)
- (gw:enum-add-value! wt "GNC_OWNER_CUSTOMER" 'gnc-owner-customer)
- (gw:enum-add-value! wt "GNC_OWNER_JOB" 'gnc-owner-job)
- (gw:enum-add-value! wt "GNC_OWNER_VENDOR" 'gnc-owner-vendor)
- (gw:enum-add-value! wt "GNC_OWNER_EMPLOYEE" 'gnc-owner-employee)
- #t)
-
- (let ((wt (gw:wrap-enumeration ws '<gnc:GncAmountType> "GncAmountType")))
- (gw:enum-add-value! wt "GNC_AMT_TYPE_VALUE" 'gnc-amount-type-value)
- (gw:enum-add-value! wt "GNC_AMT_TYPE_PERCENT" 'gnc-amount-type-percent)
- #t)
-
- (let ((wt (gw:wrap-enumeration ws '<gnc:GncTaxIncluded> "GncTaxIncluded")))
- (gw:enum-add-value! wt "GNC_TAXINCLUDED_YES" 'gnc-tax-included-yes)
- (gw:enum-add-value! wt "GNC_TAXINCLUDED_NO" 'gnc-tax-included-no)
- (gw:enum-add-value! wt "GNC_TAXINCLUDED_USEGLOBAL" 'gnc-tax-included-useglobal)
- #t)
-
- (let ((wt (gw:wrap-enumeration ws '<gnc:GncBillTermType> "GncBillTermType")))
- (gw:enum-add-value! wt "GNC_TERM_TYPE_DAYS" 'gnc-term-type-days)
- (gw:enum-add-value! wt "GNC_TERM_TYPE_PROXIMO" 'gnc-term-type-proximo)
- #t)
-
- ;; Wrap the GncAccountValue type (gncTaxTable.h)
- (gw:wrap-simple-type
- ws
- '<gnc:GncAccountValue*> "GncAccountValue*"
- '("gnc_account_value_pointer_p(" scm-var ")")
- '(c-var " = gnc_scm_to_account_value_ptr(" scm-var ");\n")
- '(scm-var " = gnc_account_value_ptr_to_scm(" c-var ");\n"))
-
- ;;
- ;; Define business Query parameters
- ;;
-
- (gw:wrap-value ws 'gnc:invoice-from-lot '<gnc:id-type> "INVOICE_FROM_LOT")
- (gw:wrap-value ws 'gnc:invoice-from-txn '<gnc:id-type> "INVOICE_FROM_TXN")
- (gw:wrap-value ws 'gnc:invoice-owner '<gnc:id-type> "INVOICE_OWNER")
-
- (gw:wrap-value ws 'gnc:owner-from-lot '<gnc:id-type> "OWNER_FROM_LOT")
- (gw:wrap-value ws 'gnc:owner-parentg '<gnc:id-type> "OWNER_PARENTG")
-
- ;;
- ;; gncAddress.h
- ;;
-
- ; Set Functions
-
- (gw:wrap-function
- ws
- 'gnc:address-set-name
- '<gw:void>
- "gncAddressSetName"
- '((<gnc:GncAddress*> address) ((<gw:mchars> callee-owned const) name))
- "Set the address name")
-
- (gw:wrap-function
- ws
- 'gnc:address-set-addr1
- '<gw:void>
- "gncAddressSetAddr1"
- '((<gnc:GncAddress*> address) ((<gw:mchars> callee-owned const) addr1))
- "Set the address's addr1")
-
- (gw:wrap-function
- ws
- 'gnc:address-set-addr2
- '<gw:void>
- "gncAddressSetAddr2"
- '((<gnc:GncAddress*> address) ((<gw:mchars> callee-owned const) addr2))
- "Set the address's addr2")
-
- (gw:wrap-function
- ws
- 'gnc:address-set-addr3
- '<gw:void>
- "gncAddressSetAddr3"
- '((<gnc:GncAddress*> address) ((<gw:mchars> callee-owned const) addr3))
- "Set the address's addr3")
-
- (gw:wrap-function
- ws
- 'gnc:address-set-addr4
- '<gw:void>
- "gncAddressSetAddr4"
- '((<gnc:GncAddress*> address) ((<gw:mchars> callee-owned const) addr4))
- "Set the address's addr4")
-
- ; Get Functions
-
- (gw:wrap-function
- ws
- 'gnc:address-get-name
- '(<gw:mchars> callee-owned const)
- "gncAddressGetName"
- '((<gnc:GncAddress*> address))
- "Return the Address's Name Entry")
-
- (gw:wrap-function
- ws
- 'gnc:address-get-addr1
- '(<gw:mchars> callee-owned const)
- "gncAddressGetAddr1"
- '((<gnc:GncAddress*> address))
- "Return the Address's Addr1 Entry")
-
- (gw:wrap-function
- ws
- 'gnc:address-get-addr2
- '(<gw:mchars> callee-owned const)
- "gncAddressGetAddr2"
- '((<gnc:GncAddress*> address))
- "Return the Address's Addr2 Entry")
-
- (gw:wrap-function
- ws
- 'gnc:address-get-addr3
- '(<gw:mchars> callee-owned const)
- "gncAddressGetAddr3"
- '((<gnc:GncAddress*> address))
- "Return the Address's Addr3 Entry")
-
- (gw:wrap-function
- ws
- 'gnc:address-get-addr4
- '(<gw:mchars> callee-owned const)
- "gncAddressGetAddr4"
- '((<gnc:GncAddress*> address))
- "Return the Address's Addr4 Entry")
-
- (gw:wrap-function
- ws
- 'gnc:address-get-phone
- '(<gw:mchars> callee-owned const)
- "gncAddressGetPhone"
- '((<gnc:GncAddress*> address))
- "Return the Address's Phone Entry")
-
- (gw:wrap-function
- ws
- 'gnc:address-get-fax
- '(<gw:mchars> callee-owned const)
- "gncAddressGetFax"
- '((<gnc:GncAddress*> address))
- "Return the Address's Fax Entry")
-
- (gw:wrap-function
- ws
- 'gnc:address-get-email
- '(<gw:mchars> callee-owned const)
- "gncAddressGetEmail"
- '((<gnc:GncAddress*> address))
- "Return the Address's Email Entry")
-
- ;;
- ;; gncBillTerm.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:bill-term-get-name
- '(<gw:mchars> callee-owned const)
- "gncBillTermGetName"
- '((<gnc:GncBillTerm*> term))
- "Return the Bill-term name")
-
- (gw:wrap-function
- ws
- 'gnc:bill-term-get-description
- '(<gw:mchars> callee-owned const)
- "gncBillTermGetDescription"
- '((<gnc:GncBillTerm*> term))
- "Return the printable Bill-term description")
-
- ;;
- ;; gncCustomer.h
- ;;
-
- ; Set Functions
-
- (gw:wrap-function
- ws
- 'gnc:customer-create
- '<gnc:GncCustomer*>
- "gncCustomerCreate"
- '((<gnc:Book*> book))
- "Create a new customer")
-
- (gw:wrap-function
- ws
- 'gnc:customer-set-id
- '<gw:void>
- "gncCustomerSetID"
- '((<gnc:GncCustomer*> customer) ((<gw:mchars> callee-owned const) id))
- "Set the customer ID")
-
- (gw:wrap-function
- ws
- 'gnc:customer-set-name
- '<gw:void>
- "gncCustomerSetName"
- '((<gnc:GncCustomer*> customer) ((<gw:mchars> callee-owned const) name))
- "Set the customer Name")
-
- (gw:wrap-function
- ws
- 'gnc:customer-set-currency
- '<gw:void>
- "gncCustomerSetCurrency"
- '((<gnc:GncCustomer*> customer) (<gnc:commodity*> currency))
- "Set the Customer Currency")
-
- ; Get Functions
-
- (gw:wrap-function
- ws
- 'gnc:customer-get-guid
- '<gnc:guid-scm>
- "gncCustomerRetGUID"
- '((<gnc:GncCustomer*> customer))
- "Return the GUID of the customer")
-
- (gw:wrap-function
- ws
- 'gnc:customer-lookup
- '<gnc:GncCustomer*>
- "gncCustomerLookupDirect"
- '((<gnc:guid-scm> guid) (<gnc:Book*> book))
- "Lookup the customer with GUID guid.")
-
- (gw:wrap-function
- ws
- 'gnc:customer-get-id
- '(<gw:mchars> callee-owned const)
- "gncCustomerGetID"
- '((<gnc:GncCustomer*> customer))
- "Return the Customer's ID")
-
- (gw:wrap-function
- ws
- 'gnc:customer-get-name
- '(<gw:mchars> callee-owned const)
- "gncCustomerGetName"
- '((<gnc:GncCustomer*> customer))
- "Return the Customer's Name")
-
- (gw:wrap-function
- ws
- 'gnc:customer-get-addr
- '<gnc:GncAddress*>
- "gncCustomerGetAddr"
- '((<gnc:GncCustomer*> customer))
- "Return the Customer's Billing Address")
-
- (gw:wrap-function
- ws
- 'gnc:customer-get-shipaddr
- '<gnc:GncAddress*>
- "gncCustomerGetShipAddr"
- '((<gnc:GncCustomer*> customer))
- "Return the Customer's Shipping Address")
-
- (gw:wrap-function
- ws
- 'gnc:customer-get-notes
- '(<gw:mchars> callee-owned const)
- "gncCustomerGetNotes"
- '((<gnc:GncCustomer*> customer))
- "Return the Customer's Notes")
-
- (gw:wrap-function
- ws
- 'gnc:customer-get-currency
- '<gnc:commodity*>
- "gncCustomerGetCurrency"
- '((<gnc:GncCustomer*> customer))
- "Get the Customer Currency")
-
- ;;
- ;; gncEmployee.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:employee-get-guid
- '<gnc:guid-scm>
- "gncEmployeeRetGUID"
- '((<gnc:GncEmployee*> employee))
- "Return the GUID of the employee")
-
- (gw:wrap-function
- ws
- 'gnc:employee-lookup
- '<gnc:GncEmployee*>
- "gncEmployeeLookupDirect"
- '((<gnc:guid-scm> guid) (<gnc:Book*> book))
- "Lookup the employee with GUID guid.")
-
- (gw:wrap-function
- ws
- 'gnc:employee-get-id
- '(<gw:mchars> callee-owned const)
- "gncEmployeeGetID"
- '((<gnc:GncEmployee*> employee))
- "Return the Employee's ID")
-
- (gw:wrap-function
- ws
- 'gnc:customer-get-username
- '(<gw:mchars> callee-owned const)
- "gncEmployeeGetUsername"
- '((<gnc:GncEmployee*> employee))
- "Return the Employee's Username")
-
- (gw:wrap-function
- ws
- 'gnc:employee-get-addr
- '<gnc:GncAddress*>
- "gncEmployeeGetAddr"
- '((<gnc:GncEmployee*> employee))
- "Return the Employee's Address")
-
- ;;
- ;; gncEntry.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-date
- '<gnc:time-pair>
- "gncEntryGetDate"
- '((<gnc:GncEntry*> entry))
- "Return the entry's date")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-description
- '(<gw:mchars> callee-owned const)
- "gncEntryGetDescription"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Description")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-action
- '(<gw:mchars> callee-owned const)
- "gncEntryGetAction"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Action")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-quantity
- '<gnc:numeric>
- "gncEntryGetQuantity"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Quantity")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-inv-price
- '<gnc:numeric>
- "gncEntryGetInvPrice"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Price")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-inv-discount
- '<gnc:numeric>
- "gncEntryGetInvDiscount"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Discount")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-inv-discount-type
- '<gw:int>
- "gncEntryGetInvDiscountType"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's discount type")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-bill-price
- '<gnc:numeric>
- "gncEntryGetBillPrice"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Price")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-inv-taxable
- '<gw:bool>
- "gncEntryGetInvTaxable"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Taxable value")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-inv-tax-table
- '<gnc:GncTaxTable*>
- "gncEntryGetInvTaxTable"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Invoice Tax Table")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-bill-taxable
- '<gw:bool>
- "gncEntryGetBillTaxable"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Taxable value")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-bill-tax-table
- '<gnc:GncTaxTable*>
- "gncEntryGetBillTaxTable"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Bill Tax Table")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-value
- '<gnc:numeric>
- "gncEntryReturnValue"
- '((<gnc:GncEntry*> entry) (<gw:bool> invoice?))
- "Return the Entry's computed Value (after discount)")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-tax-value
- '<gnc:numeric>
- "gncEntryReturnTaxValue"
- '((<gnc:GncEntry*> entry) (<gw:bool> invoice?))
- "Return the Entry's computed Tax Value")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-discount-value
- '<gnc:numeric>
- "gncEntryReturnDiscountValue"
- '((<gnc:GncEntry*> entry) (<gw:bool> invoice?))
- "Return the Entry's computed Discount Value")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-tax-values
- '(gw:glist-of <gnc:GncAccountValue*> callee-owned)
- "gncEntryReturnTaxValues"
- '((<gnc:GncEntry*> entry) (<gw:bool> invoice?))
- "Return the Entry's list of computed Tax Values for each Tax account")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-invoice
- '<gnc:GncInvoice*>
- "gncEntryGetInvoice"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Invoice")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-bill
- '<gnc:GncInvoice*>
- "gncEntryGetBill"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Bill")
-
- (gw:wrap-function
- ws
- 'gnc:entry-get-order
- '<gnc:GncOrder*>
- "gncEntryGetOrder"
- '((<gnc:GncEntry*> entry))
- "Return the Entry's Order")
-
- ;;
- ;; gncInvoice.h
- ;;
-
- ; Set Functions
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-guid
- '<gnc:guid-scm>
- "gncInvoiceRetGUID"
- '((<gnc:GncInvoice*> invoice))
- "Return the GUID of the invoice")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-lookup
- '<gnc:GncInvoice*>
- "gncInvoiceLookupDirect"
- '((<gnc:guid-scm> guid) (<gnc:Book*> book))
- "Lookup the invoice with GUID guid.")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-create
- '<gnc:GncInvoice*>
- "gncInvoiceCreate"
- '((<gnc:Book*> book))
- "Create a new invoice")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-set-id
- '<gw:void>
- "gncInvoiceSetID"
- '((<gnc:GncInvoice*> invoice) ((<gw:mchars> callee-owned const) id))
- "Set the Invoice ID")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-set-owner
- '<gw:void>
- "gncInvoiceSetOwner"
- '((<gnc:GncInvoice*> invoice) (<gnc:GncOwner*> owner))
- "Set the Invoice Owner")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-set-date-opened
- '<gw:void>
- "gncInvoiceSetDateOpened"
- '((<gnc:GncInvoice*> invoice) (<gnc:time-pair> date))
- "Set the Invoice-Opened Date")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-set-terms
- '<gw:void>
- "gncInvoiceSetTerms"
- '((<gnc:GncInvoice*> invoice) (<gnc:GncBillTerm*> term))
- "Set the Invoice Terms")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-set-currency
- '<gw:void>
- "gncInvoiceSetCurrency"
- '((<gnc:GncInvoice*> invoice) (<gnc:commodity*> currency))
- "Set the Invoice Currency")
-
- ; Get Functions
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-book
- '<gnc:Book*>
- "gncInvoiceGetBook"
- '((<gnc:GncInvoice*> invoice))
- "Return the invoice's book")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-id
- '(<gw:mchars> callee-owned const)
- "gncInvoiceGetID"
- '((<gnc:GncInvoice*> invoice))
- "Return the invoice's ID")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-owner
- '<gnc:GncOwner*>
- "gncInvoiceGetOwner"
- '((<gnc:GncInvoice*> invoice))
- "Return the invoice's Owner")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-date-opened
- '<gnc:time-pair>
- "gncInvoiceGetDateOpened"
- '((<gnc:GncInvoice*> invoice))
- "Return the Date the invoice was opened")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-date-posted
- '<gnc:time-pair>
- "gncInvoiceGetDatePosted"
- '((<gnc:GncInvoice*> invoice))
- "Return the Date the invoice was posted")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-date-due
- '<gnc:time-pair>
- "gncInvoiceGetDateDue"
- '((<gnc:GncInvoice*> invoice))
- "Return the Date the invoice is due")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-terms
- '(<gnc:GncBillTerm*>)
- "gncInvoiceGetTerms"
- '((<gnc:GncInvoice*> invoice))
- "Return the invoice's Terms")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-billing-id
- '(<gw:mchars> callee-owned const)
- "gncInvoiceGetBillingID"
- '((<gnc:GncInvoice*> invoice))
- "Return the invoice's Billing ID")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-notes
- '(<gw:mchars> callee-owned const)
- "gncInvoiceGetNotes"
- '((<gnc:GncInvoice*> invoice))
- "Return the invoice's Notes")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-currency
- '<gnc:commodity*>
- "gncInvoiceGetCurrency"
- '((<gnc:GncInvoice*> invoice))
- "Return the invoice's currency")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-entries
- '(gw:glist-of <gnc:GncEntry*> callee-owned)
- "gncInvoiceGetEntries"
- '((<gnc:GncInvoice*> invoice))
- "Return the invoice's list of Entries")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-posted-lot
- '<gnc:Lot*>
- "gncInvoiceGetPostedLot"
- '((<gnc:GncInvoice*> invoice))
- "Return the posted Lot for this Invoice.")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-posted-account
- '<gnc:Account*>
- "gncInvoiceGetPostedAcc"
- '((<gnc:GncInvoice*> invoice))
- "Return the posted Account for this Invoice.")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-posted-txn
- '<gnc:Transaction*>
- "gncInvoiceGetPostedTxn"
- '((<gnc:GncInvoice*> invoice))
- "Return the posted Transaction for this Invoice.")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-invoice-from-lot
- '<gnc:GncInvoice*>
- "gncInvoiceGetInvoiceFromLot"
- '((<gnc:Lot*> lot))
- "Return the Invoice attached to a Lot.")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-get-invoice-from-txn
- '<gnc:GncInvoice*>
- "gncInvoiceGetInvoiceFromTxn"
- '((<gnc:Transaction*> txn))
- "Return the Invoice attached to a Txn.")
-
- ;;
- ;; gncJob.h
- ;;
-
- ; Set Functions
-
- (gw:wrap-function
- ws
- 'gnc:job-create
- '<gnc:GncJob*>
- "gncJobCreate"
- '((<gnc:Book*> book))
- "Create a new Job")
-
- (gw:wrap-function
- ws
- 'gnc:job-set-id
- '<gw:void>
- "gncJobSetID"
- '((<gnc:GncJob*> job) ((<gw:mchars> callee-owned const) id))
- "Set the job ID")
-
- (gw:wrap-function
- ws
- 'gnc:job-set-name
- '<gw:void>
- "gncJobSetName"
- '((<gnc:GncJob*> job) ((<gw:mchars> callee-owned const) name))
- "Set the job Name")
-
- (gw:wrap-function
- ws
- 'gnc:job-set-reference
- '<gw:void>
- "gncJobSetReference"
- '((<gnc:GncJob*> job) ((<gw:mchars> callee-owned const) reference))
- "Set the job Reference")
-
- (gw:wrap-function
- ws
- 'gnc:job-set-owner
- '<gw:void>
- "gncJobSetOwner"
- '((<gnc:GncJob*> job) (<gnc:GncOwner*> owner))
- "Set the job Owner")
-
- ; Get Functions
-
- (gw:wrap-function
- ws
- 'gnc:job-get-id
- '(<gw:mchars> callee-owned const)
- "gncJobGetID"
- '((<gnc:GncJob*> job))
- "Return the Job's ID")
-
- (gw:wrap-function
- ws
- 'gnc:job-get-name
- '(<gw:mchars> callee-owned const)
- "gncJobGetName"
- '((<gnc:GncJob*> job))
- "Return the Job's Name")
-
- (gw:wrap-function
- ws
- 'gnc:job-get-reference
- '(<gw:mchars> callee-owned const)
- "gncJobGetReference"
- '((<gnc:GncJob*> job))
- "Return the Job's Reference")
-
- (gw:wrap-function
- ws
- 'gnc:job-get-owner
- '<gnc:GncOwner*>
- "gncJobGetOwner"
- '((<gnc:GncJob*> job))
- "Return the Job's Owner")
-
- (gw:wrap-function
- ws
- 'gnc:job-get-guid
- '<gnc:guid-scm>
- "gncJobRetGUID"
- '((<gnc:GncJob*> job))
- "Return the guid of the job")
-
- (gw:wrap-function
- ws
- 'gnc:job-lookup
- '<gnc:GncJob*>
- "gncJobLookupDirect"
- '((<gnc:guid-scm> guid) (<gnc:Book*> book))
- "Lookup the job with GUID guid.")
-
- ;;
- ;; gncOrder.h
- ;;
-
- ; Set Functions
-
- (gw:wrap-function
- ws
- 'gnc:order-create
- '<gnc:GncOrder*>
- "gncOrderCreate"
- '((<gnc:Book*> book))
- "Create a new order")
-
- (gw:wrap-function
- ws
- 'gnc:order-set-id
- '<gw:void>
- "gncOrderSetID"
- '((<gnc:GncOrder*> order) ((<gw:mchars> callee-owned const) id))
- "Set the Order ID")
-
- (gw:wrap-function
- ws
- 'gnc:order-set-owner
- '<gw:void>
- "gncOrderSetOwner"
- '((<gnc:GncOrder*> order) (<gnc:GncOwner*> owner))
- "Set the Order Owner")
-
- (gw:wrap-function
- ws
- 'gnc:order-set-date-opened
- '<gw:void>
- "gncOrderSetDateOpened"
- '((<gnc:GncOrder*> order) (<gnc:time-pair> date))
- "Set the Order's Opened Date")
-
- (gw:wrap-function
- ws
- 'gnc:order-set-reference
- '<gw:void>
- "gncOrderSetReference"
- '((<gnc:GncOrder*> order) ((<gw:mchars> callee-owned const) id))
- "Set the Order Reference")
-
- ; Get Functions
-
- (gw:wrap-function
- ws
- 'gnc:order-get-id
- '(<gw:mchars> callee-owned const)
- "gncOrderGetID"
- '((<gnc:GncOrder*> order))
- "Return the Order's ID")
-
- (gw:wrap-function
- ws
- 'gnc:order-get-owner
- '<gnc:GncOwner*>
- "gncOrderGetOwner"
- '((<gnc:GncOrder*> order))
- "Return the Order's Owner")
-
- (gw:wrap-function
- ws
- 'gnc:order-get-date-opened
- '<gnc:time-pair>
- "gncOrderGetDateOpened"
- '((<gnc:GncOrder*> order))
- "Return the Date the order was opened")
-
- (gw:wrap-function
- ws
- 'gnc:order-get-date-closed
- '<gnc:time-pair>
- "gncOrderGetDateClosed"
- '((<gnc:GncOrder*> order))
- "Return the Date the order was closed")
-
- (gw:wrap-function
- ws
- 'gnc:order-get-notes
- '(<gw:mchars> callee-owned const)
- "gncOrderGetNotes"
- '((<gnc:GncOrder*> order))
- "Return the Order's Notes")
-
- (gw:wrap-function
- ws
- 'gnc:order-get-reference
- '(<gw:mchars> callee-owned const)
- "gncOrderGetReference"
- '((<gnc:GncOrder*> order))
- "Return the Order's Reference")
-
- (gw:wrap-function
- ws
- 'gnc:order-get-entries
- '(gw:glist-of <gnc:GncEntry*> callee-owned)
- "gncOrderGetEntries"
- '((<gnc:GncOrder*> order))
- "Return the Order's list of Entries")
-
- ;;
- ;; gncOwner.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:owner-create
- '<gnc:GncOwner*>
- "gncOwnerCreate"
- '()
- "Create a GncOwner object")
-
- (gw:wrap-function
- ws
- 'gnc:owner-destroy
- '<gw:void>
- "gncOwnerDestroy"
- '((<gnc:GncOwner*> owner))
- "Destroy a GncOwner object")
-
- (gw:wrap-function
- ws
- 'gnc:owner-init-customer
- '<gw:void>
- "gncOwnerInitCustomer"
- '((<gnc:GncOwner*> owner) (<gnc:GncCustomer*> customer))
- "Initialize an owner to hold a Customer. The Customer may be NULL.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-init-job
- '<gw:void>
- "gncOwnerInitJob"
- '((<gnc:GncOwner*> owner) (<gnc:GncJob*> job))
- "Initialize an owner to hold a Job. The Job may be NULL.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-init-vendor
- '<gw:void>
- "gncOwnerInitVendor"
- '((<gnc:GncOwner*> owner) (<gnc:GncVendor*> vendor))
- "Initialize an owner to hold a Vendor. The Vendor may be NULL.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-init-employee
- '<gw:void>
- "gncOwnerInitEmployee"
- '((<gnc:GncOwner*> owner) (<gnc:GncEmployee*> employee))
- "Initialize an owner to hold a Employee. The Employee may be NULL.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-type
- '<gnc:GncOwnerType>
- "gncOwnerGetType"
- '((<gnc:GncOwner*> owner))
- "Return the type of this owner.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-customer
- '<gnc:GncCustomer*>
- "gncOwnerGetCustomer"
- '((<gnc:GncOwner*> owner))
- "Return the customer of this owner.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-job
- '<gnc:GncJob*>
- "gncOwnerGetJob"
- '((<gnc:GncOwner*> owner))
- "Return the job of this owner.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-vendor
- '<gnc:GncVendor*>
- "gncOwnerGetVendor"
- '((<gnc:GncOwner*> owner))
- "Return the vendor of this owner.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-employee
- '<gnc:GncEmployee*>
- "gncOwnerGetEmployee"
- '((<gnc:GncOwner*> owner))
- "Return the employee of this owner.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-equal
- '<gw:bool>
- "gncOwnerEqual"
- '((<gnc:GncOwner*> owner1) (<gnc:GncOwner*> owner2))
- "Compare owner1 and owner2 and return if they are equal")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-end-owner
- '<gnc:GncOwner*>
- "gncOwnerGetEndOwner"
- '((<gnc:GncOwner*> owner))
- "Returns the End Owner of this owner")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-owner-from-lot
- '<gw:bool>
- "gncOwnerGetOwnerFromLot"
- '((<gnc:Lot*> lot) (<gnc:GncOwner*> owner))
- "Compute the owner from the Lot, and fills in owner. Returns TRUE if successful.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-guid
- '<gnc:guid-scm>
- "gncOwnerRetGUID"
- '((<gnc:GncOwner*> owner))
- "Return the GUID of this owner")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-name
- '(<gw:mchars> callee-owned const)
- "gncOwnerGetName"
- '((<gnc:GncOwner*> owner))
- "Return the Name of this owner")
-
- (gw:wrap-function
- ws
- 'gnc:owner-copy-into-owner
- '<gw:void>
- "gncOwnerCopy"
- '((<gnc:GncOwner*> src-owner) (<gnc:GncOwner*> dest-owner))
- "Copy the src-owner to the dest-owner")
-
- (gw:wrap-function
- ws
- 'gnc:owner-is-valid?
- '<gw:bool>
- "gncOwnerIsValid"
- '((<gnc:GncOwner*> owner))
- "Is this a real owner? Return TRUE IFF there is an actual owner.")
-
- (gw:wrap-function
- ws
- 'gnc:owner-get-currency
- '<gnc:commodity*>
- "gncOwnerGetCurrency"
- '((<gnc:GncOwner*> owner))
- "Return the owner's currency")
-
- ;;
- ;; gncTaxTable.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:taxtable-get-guid
- '<gnc:guid-scm>
- "gncTaxTableRetGUID"
- '((<gnc:GncTaxTable*> taxtable))
- "Return the GUID of the taxtable")
-
- (gw:wrap-function
- ws
- 'gnc:taxtable-lookup
- '<gnc:GncTaxTable*>
- "gncTaxTableLookupDirect"
- '((<gnc:guid-scm> guid) (<gnc:Book*> book))
- "Lookup the tax table with GUID guid.")
-
- ;;
- ;; gncVendor.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:vendor-get-guid
- '<gnc:guid-scm>
- "gncVendorRetGUID"
- '((<gnc:GncVendor*> vendor))
- "Return the GUID of the vendor")
-
- (gw:wrap-function
- ws
- 'gnc:vendor-lookup
- '<gnc:GncVendor*>
- "gncVendorLookupDirect"
- '((<gnc:guid-scm> guid) (<gnc:Book*> book))
- "Lookup the vendor with GUID guid.")
-
- (gw:wrap-function
- ws
- 'gnc:vendor-get-id
- '(<gw:mchars> callee-owned const)
- "gncVendorGetID"
- '((<gnc:GncVendor*> vendor))
- "Return the Vendor's ID")
-
- (gw:wrap-function
- ws
- 'gnc:vendor-get-name
- '(<gw:mchars> callee-owned const)
- "gncVendorGetName"
- '((<gnc:GncVendor*> vendor))
- "Return the Vendor's Name")
-
- (gw:wrap-function
- ws
- 'gnc:vendor-get-addr
- '<gnc:GncAddress*>
- "gncVendorGetAddr"
- '((<gnc:GncVendor*> vendor))
- "Return the Vendor's Billing Address")
-
- (gw:wrap-function
- ws
- 'gnc:vendor-get-notes
- '(<gw:mchars> callee-owned const)
- "gncVendorGetNotes"
- '((<gnc:GncVendor*> vendor))
- "Return the Vendor's Notes")
-
-)
Modified: gnucash/trunk/src/business/business-core/test/Makefile.am
===================================================================
--- gnucash/trunk/src/business/business-core/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-core/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -13,9 +13,7 @@
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/test-core/libgncmod-test.la \
${top_builddir}/src/engine/libgncmod-engine.la \
- ${top_builddir}/src/engine/libgw-engine.la \
../libgncmod-business-core.la \
- ../libgw-business-core.la \
${GLIB_LIBS} \
${QOF_LIBS} \
-lltdl
@@ -35,10 +33,8 @@
--gnc-module-dir ${top_builddir}/src/engine \
--gnc-module-dir ${top_builddir}/src/business/business-core \
--gnc-module-dir ${top_srcdir}/src/gnc-module \
- --gnc-module-dir ${top_srcdir}/src/engine \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR} \
- --guile-load-dir ${G_WRAP_MODULE_DIR}
+ --gnc-module-dir ${top_srcdir}/src/engine
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Property changes on: gnucash/trunk/src/business/business-gnome
___________________________________________________________________
Name: svn:ignore
- *.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
gw-business-gnome.c
gw-business-gnome.h
gw-business-gnome.html
gw-business-gnome.scm
.DS_Store
g-wrapped
gnucash
semantic.cache
TAGS
+ *.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
swig-business-gnome.c
gw-business-gnome.c
gw-business-gnome.h
gw-business-gnome.html
gw-business-gnome.scm
.DS_Store
g-wrapped
gnucash
semantic.cache
TAGS
Modified: gnucash/trunk/src/business/business-gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/business/business-gnome/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-gnome/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,7 +1,7 @@
SUBDIRS = . glade schemas ui
PWD := $(shell pwd)
-pkglib_LTLIBRARIES = libgncmod-business-gnome.la libgw-business-gnome.la
+pkglib_LTLIBRARIES = libgncmod-business-gnome.la
AM_CFLAGS = \
-I${top_srcdir}/src \
@@ -22,7 +22,6 @@
${GTKHTML_CFLAGS} \
${GDK_PIXBUF_CFLAGS} \
${GLIB_CFLAGS} \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${QOF_CFLAGS} \
-I${top_srcdir}/src/register/register-core \
@@ -81,21 +80,11 @@
${top_builddir}/src/gnc-module/libgncmodule.la \
${GLADE_LIBS} \
${GNOME_LIBS} \
- ${G_WRAP_LINK_ARGS} \
${GUILE_LIBS} \
${GLIB_LIBS} \
${QOF_LIBS} \
${EFENCE_LIBS}
-
-nodist_libgw_business_gnome_la_SOURCES = gw-business-gnome.c
-
-libgw_business_gnome_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
-libgw_business_gnome_la_LIBADD = \
- libgncmod-business-gnome.la \
- ${G_WRAP_LINK_ARGS} \
- ${GUILE_LIBS}
-
# For Business Reports
gncscmmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report/
gncscmmod_DATA =
@@ -103,28 +92,19 @@
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = business-gnome.scm
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = \
- gw-business-gnome-spec.scm
-nodist_gwmod_DATA = \
- gw-business-gnome.scm
-
EXTRA_DIST = \
${gncmod_DATA} \
- ${gwmod_DATA} \
${gncscmmod_DATA}
if GNUCASH_SEPARATE_BUILDDIR
#Only needed when srcdir and builddir are different
-#for compiling
-SCM_FILE_LINKS = gw-business-gnome-spec.scm
#for running
-SCM_FILE_LINKS += ${gncmod_DATA}
+SCM_FILE_LINKS = ${gncmod_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
@@ -133,29 +113,5 @@
( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-business-gnome.scm gw-business-gnome.c gw-business-gnome.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-business-gnome-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (set! %load-path (cons \"../business-core\" %load-path)) \
- (set! %load-path (cons \"${srcdir}/../business-core\" %load-path)) \
- (set! %load-path (cons \"../../engine\" %load-path)) \
- (set! %load-path (cons \"../../app-utils\" %load-path)) \
- (set! %load-path (cons \"../../gnome-utils\" %load-path)) \
- (primitive-load \"./gw-business-gnome-spec.scm\") \
- (gw:generate-wrapset \"gw-business-gnome\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-business-gnome.scm gw-business-gnome.c gw-business-gnome.h
-CLEANFILES = $(BUILT_SOURCES) .scm-links \
- ${SCM_FILE_LINKS} gw-business-gnome.html
+noinst_DATA = .scm-links
+CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links ${SCM_FILE_LINKS}
Modified: gnucash/trunk/src/business/business-gnome/business-gnome.scm
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-gnome.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-gnome/business-gnome.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,5 +1,4 @@
(define-module (gnucash business-gnome))
-(use-modules (g-wrapped gw-business-gnome))
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/gnome-utils" 0)
@@ -22,8 +21,8 @@
(set-current-module m)))
(define (business-report-function)
- (gnc:add-extension
+ (gnc-add-scm-extension
(gnc:make-menu gnc:menuname-business-reports
(list gnc:menuname-reports))))
-(gnc:hook-add-dangler gnc:*report-hook* business-report-function)
+(gnc-hook-add-scm-dangler HOOK-REPORT business-report-function)
Modified: gnucash/trunk/src/business/business-gnome/business-options-gnome.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-options-gnome.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-gnome/business-options-gnome.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -26,7 +26,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include <libguile.h>
#include "gnc-ui-util.h"
@@ -39,6 +39,8 @@
#include "business-gnome-utils.h"
#include "dialog-invoice.h"
+#define FUNC_NAME __FUNCTION__
+
static GtkWidget *
create_owner_widget (GNCOption *option, GncOwnerType type, GtkWidget *hbox)
{
@@ -94,12 +96,9 @@
get_owner_type_from_option (GNCOption *option)
{
SCM odata = gnc_option_get_option_data (option);
- SCM conv_func;
- conv_func = scm_c_eval_string ("gw:enum-<gnc:GncOwnerType>-val->int");
- odata = scm_call_1 (conv_func, odata);
-
- return scm_num2long (odata, SCM_ARG1, __FUNCTION__);
+ /* The option data is enum-typed. It's just the enum value. */
+ return (GncOwnerType) scm_num2int(odata, SCM_ARG1, __FUNCTION__);
}
@@ -135,11 +134,11 @@
GncOwner owner_def;
GncOwner *owner;
- if (!gw_wcp_p (value))
+ if (!SWIG_IsPointer (value))
scm_misc_error("business_options:owner_set_value",
- "Item is not a gw:wcp.", value);
+ "SCM is not a wrapped pointer.", value);
- owner = gw_wcp_get_ptr (value);
+ owner = SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncOwner"), 1, 0);
/* XXX: should we verify that the owner type is correct? */
if (!owner) {
@@ -164,7 +163,7 @@
owner.type = type;
gnc_owner_get_owner (widget, &owner);
- return gw_wcp_assimilate_ptr (&owner, scm_c_eval_string("<gnc:GncOwner*>"));
+ return SWIG_NewPointerObj(&owner, SWIG_TypeQuery("_p__gncOwner"), 0);
}
@@ -203,11 +202,11 @@
GncOwner owner;
GncCustomer *customer;
- if (!gw_wcp_p (value))
+ if (!SWIG_IsPointer (value))
scm_misc_error("business_options:customer_set_value",
- "Item is not a gw:wcp.", value);
+ "SCM is not a wrapped pointer.", value);
- customer = gw_wcp_get_ptr (value);
+ customer = SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncCustomer"), 1, 0);
gncOwnerInitCustomer (&owner, customer);
widget = gnc_option_get_widget (option);
@@ -222,9 +221,8 @@
GncOwner owner;
gnc_owner_get_owner (widget, &owner);
-
- return gw_wcp_assimilate_ptr (owner.owner.undefined,
- scm_c_eval_string("<gnc:GncCustomer*>"));
+ return SWIG_NewPointerObj(owner.owner.undefined,
+ SWIG_TypeQuery("_p__gncCustomer"), 0);
}
@@ -263,11 +261,11 @@
GncOwner owner;
GncVendor *vendor;
- if (!gw_wcp_p (value))
+ if (!SWIG_IsPointer (value))
scm_misc_error("business_options:vendor_set_value",
- "Item is not a gw:wcp.", value);
+ "SCM is not a wrapped pointer.", value);
- vendor = gw_wcp_get_ptr (value);
+ vendor = SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncVendor"), 1, 0);
gncOwnerInitVendor (&owner, vendor);
widget = gnc_option_get_widget (option);
@@ -282,9 +280,8 @@
GncOwner owner;
gnc_owner_get_owner (widget, &owner);
-
- return gw_wcp_assimilate_ptr (owner.owner.undefined,
- scm_c_eval_string("<gnc:GncVendor*>"));
+ return SWIG_NewPointerObj(owner.owner.undefined,
+ SWIG_TypeQuery("_p__gncVendor"), 0);
}
/********************************************************************/
@@ -322,11 +319,11 @@
GncOwner owner;
GncEmployee *employee;
- if (!gw_wcp_p (value))
+ if (!SWIG_IsPointer (value))
scm_misc_error("business_options:employee_set_value",
- "Item is not a gw:wcp.", value);
+ "SCM is not a wrapped pointer.", value);
- employee = gw_wcp_get_ptr (value);
+ employee = SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncEmployee"), 1, 0);
gncOwnerInitEmployee (&owner, employee);
widget = gnc_option_get_widget (option);
@@ -342,8 +339,8 @@
gnc_owner_get_owner (widget, &owner);
- return gw_wcp_assimilate_ptr (owner.owner.undefined,
- scm_c_eval_string("<gnc:GncEmployee*>"));
+ return SWIG_NewPointerObj(owner.owner.undefined,
+ SWIG_TypeQuery("_p__gncEmployee"), 0);
}
/********************************************************************/
@@ -396,11 +393,11 @@
{
GncInvoice *invoice;
- if (!gw_wcp_p (value))
+ if (!SWIG_IsPointer (value))
scm_misc_error("business_options:invoice_set_value",
- "Item is not a gw:wcp.", value);
+ "SCM is not a wrapped pointer.", value);
- invoice = gw_wcp_get_ptr (value);
+ invoice = SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncInvoice"), 1, 0);
widget = gnc_option_get_widget (option);
gnc_general_search_set_selected (GNC_GENERAL_SEARCH (widget), invoice);
@@ -414,7 +411,7 @@
GncInvoice *invoice;
invoice = gnc_general_search_get_selected (GNC_GENERAL_SEARCH (widget));
- return gw_wcp_assimilate_ptr (invoice, scm_c_eval_string("<gnc:GncInvoice*>"));
+ return SWIG_NewPointerObj(invoice, SWIG_TypeQuery("_p__gncInvoice"), 0);
}
@@ -471,11 +468,11 @@
{
GncTaxTable *taxtable;
- if (!gw_wcp_p (value))
+ if (!SWIG_IsPointer (value))
scm_misc_error("business_options:taxtable_set_value",
- "Item is not a gw:wcp.", value);
+ "SCM is not a wrapped pointer.", value);
- taxtable = gw_wcp_get_ptr (value);
+ taxtable = SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncTaxTable"), 1, 0);
widget = gnc_option_get_widget (option);
gnc_ui_optionmenu_set_value (widget, taxtable);
@@ -489,7 +486,7 @@
GncTaxTable *taxtable;
taxtable = gnc_ui_optionmenu_get_value (widget);
- return gw_wcp_assimilate_ptr (taxtable, scm_c_eval_string("<gnc:GncTaxTable*>"));
+ return SWIG_NewPointerObj(taxtable, SWIG_TypeQuery("_p__gncTaxTable"), 0);
}
@@ -510,6 +507,7 @@
{ NULL }
};
+ SWIG_GetModule(NULL); /* Work-around for SWIG bug. */
for (i = 0; options[i].option_name; i++)
gnc_options_ui_register_option (&(options[i]));
}
Modified: gnucash/trunk/src/business/business-gnome/businessmod-gnome.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/businessmod-gnome.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-gnome/businessmod-gnome.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -35,7 +35,6 @@
#include "gnc-hooks.h"
#include "gnc-module.h"
#include "gnc-module-api.h"
-#include "gw-business-gnome.h"
#include "search-core-type.h"
#include "search-owner.h"
@@ -101,10 +100,28 @@
// return FALSE;
// }
- scm_c_eval_string("(use-modules (g-wrapped gw-business-gnome))");
scm_c_eval_string("(use-modules (gnucash business-gnome))");
scm_c_eval_string("(use-modules (gnucash report business-reports))");
+ // temp code until gnc:url-type is wrapped
+ /*
+ {
+ SCM wct_gnc_url_type = scm_c_eval_string("<gnc:url-type>");
+ SCM tmp;
+
+ tmp = gw_wcp_assimilate_ptr(GNC_CUSTOMER_MODULE_NAME, wct_gnc_url_type);
+ scm_c_define("gnc:url-type-customer", tmp);
+ tmp = gw_wcp_assimilate_ptr(GNC_VENDOR_MODULE_NAME, wct_gnc_url_type);
+ scm_c_define("gnc:url-type-vendor", tmp);
+ tmp = gw_wcp_assimilate_ptr(GNC_EMPLOYEE_MODULE_NAME, wct_gnc_url_type);
+ scm_c_define("gnc:url-type-employee", tmp);
+ tmp = gw_wcp_assimilate_ptr(GNC_INVOICE_MODULE_NAME, wct_gnc_url_type);
+ scm_c_define("gnc:url-type-invoice", tmp);
+ tmp = gw_wcp_assimilate_ptr(URL_TYPE_OWNERREPORT, wct_gnc_url_type);
+ scm_c_define("gnc:url-type-ownerreport", tmp);
+ }
+ */
+
if (refcount == 0) {
/* Register the Owner search type */
gnc_search_core_register_type (GNC_OWNER_MODULE_NAME,
Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -27,8 +27,8 @@
#include <gnome.h>
#include <glib/gi18n.h>
-#include <g-wrap-wct.h>
#include <libguile.h>
+#include "swig-runtime.h"
#include "gncObject.h"
#include "QueryCore.h"
@@ -569,7 +569,7 @@
func = scm_c_eval_string ("gnc:invoice-report-create");
g_return_if_fail (SCM_PROCEDUREP (func));
- arg = gw_wcp_assimilate_ptr (invoice, scm_c_eval_string("<gnc:GncInvoice*>"));
+ arg = SWIG_NewPointerObj(invoice, SWIG_TypeQuery("_p__gncInvoice"), 0);
args = scm_cons (arg, args);
/* scm_gc_protect_object(func); */
@@ -734,7 +734,6 @@
void gnc_business_call_owner_report (GncOwner *owner, Account *acc)
{
int id;
- SCM qtype;
SCM args;
SCM func;
SCM arg;
@@ -747,20 +746,17 @@
g_return_if_fail (SCM_PROCEDUREP (func));
if (acc) {
- qtype = scm_c_eval_string("<gnc:Account*>");
- g_return_if_fail (qtype != SCM_UNDEFINED);
+ swig_type_info * qtype = SWIG_TypeQuery("_p_Account");
+ g_return_if_fail (qtype);
- arg = gw_wcp_assimilate_ptr (acc, qtype);
+ arg = SWIG_NewPointerObj(acc, qtype, 0);
g_return_if_fail (arg != SCM_UNDEFINED);
args = scm_cons (arg, args);
} else {
args = scm_cons (SCM_BOOL_F, args);
}
- qtype = scm_c_eval_string("<gnc:GncOwner*>");
- g_return_if_fail (qtype != SCM_UNDEFINED);
-
- arg = gw_wcp_assimilate_ptr (owner, qtype);
+ arg = SWIG_NewPointerObj(owner, SWIG_TypeQuery("_p__gncOwner"), 0);
g_return_if_fail (arg != SCM_UNDEFINED);
args = scm_cons (arg, args);
Deleted: gnucash/trunk/src/business/business-gnome/gw-business-gnome-spec.scm
===================================================================
--- gnucash/trunk/src/business/business-gnome/gw-business-gnome-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-gnome/gw-business-gnome-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,267 +0,0 @@
-;;; -*-scheme-*-
-
-;(debug-enable 'backtrace)
-;(debug-enable 'debug)
-;(read-enable 'positions)
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(define-module (g-wrapped gw-business-gnome-spec)
- :use-module (g-wrap))
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-
-(use-modules (g-wrapped gw-business-core-spec))
-(use-modules (g-wrapped gw-gnome-utils-spec))
-
-(let ((ws (gw:new-wrapset "gw-business-gnome")))
-
- (gw:wrapset-depends-on ws "gw-standard")
-
- (gw:wrapset-depends-on ws "gw-business-core")
- (gw:wrapset-depends-on ws "gw-engine")
- (gw:wrapset-depends-on ws "gw-gnome-utils")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-business-gnome))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <gtk/gtk.h>\n"
- "#include <business-urls.h>\n"
- "#include <dialog-billterms.h>\n"
- "#include <dialog-customer.h>\n"
- "#include <dialog-employee.h>\n"
- "#include <dialog-invoice.h>\n"
- "#include <dialog-job.h>\n"
- "#include <dialog-order.h>\n"
- "#include <dialog-payment.h>\n"
- "#include <dialog-vendor.h>\n"
- )))
-
- (gw:wrapset-add-cs-initializers!
- ws
- (lambda (wrapset client-wrapset status-var)
- (if client-wrapset
- '()
- (gw:inline-scheme '(use-modules (gnucash business-gnome))))))
-
- ;;
- ;; Business URL Types
- ;;
- (gw:wrap-value ws 'gnc:url-type-customer '<gnc:url-type>
- "GNC_CUSTOMER_MODULE_NAME")
- (gw:wrap-value ws 'gnc:url-type-vendor '<gnc:url-type>
- "GNC_VENDOR_MODULE_NAME")
- (gw:wrap-value ws 'gnc:url-type-employee '<gnc:url-type>
- "GNC_EMPLOYEE_MODULE_NAME")
- (gw:wrap-value ws 'gnc:url-type-invoice '<gnc:url-type>
- "GNC_INVOICE_MODULE_NAME")
- (gw:wrap-value ws 'gnc:url-type-ownerreport '<gnc:url-type>
- "URL_TYPE_OWNERREPORT")
-
-
- ;;
- ;; dialog-billterms.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:billterms-new
- '<gw:void>
- "gnc_ui_billterms_window_new"
- '((<gnc:Book*> book))
- "Dialog: view and edit the available Billing Terms.")
-
- ;;
- ;; dialog-customer.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:customer-new
- '<gw:void>
- "gnc_ui_customer_new"
- '((<gnc:Book*> book))
- "Dialog: create a new GncCustomer.")
-
- (gw:wrap-function
- ws
- 'gnc:customer-edit
- '<gw:void>
- "gnc_ui_customer_edit"
- '((<gnc:GncCustomer*> customer))
- "Dialog: Edit a GncCustomer.")
-
- (gw:wrap-function
- ws
- 'gnc:customer-search
- '<gw:void>
- "gnc_customer_search"
- '((<gnc:GncCustomer*> start_selection) (<gnc:Book*> book) )
- "Dialog: Find a GncCustomer. Start_selection may be NULL.")
-
- ;;
- ;; dialog-employee.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:employee-new
- '<gw:void>
- "gnc_ui_employee_new"
- '((<gnc:Book*> book))
- "Dialog: create a new GncEmployee.")
-
- (gw:wrap-function
- ws
- 'gnc:employee-edit
- '<gw:void>
- "gnc_ui_employee_edit"
- '((<gnc:GncEmployee*> employee))
- "Dialog: Edit a GncEmployee.")
-
- (gw:wrap-function
- ws
- 'gnc:employee-search
- '<gw:void>
- "gnc_employee_search"
- '((<gnc:GncEmployee*> start_selection) (<gnc:Book*> book))
- "Dialog: Find a GncEmployee. Start_selection may be NULL.")
-
- ;;
- ;; dialog-invoice.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:invoice-new
- '<gw:void>
- "gnc_ui_invoice_new"
- '((<gnc:GncOwner*> owner) (<gnc:Book*> book))
- "Dialog: create a new GncInvoice.")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-edit
- '<gw:void>
- "gnc_ui_invoice_edit"
- '((<gnc:GncInvoice*> invoice))
- "Dialog: Edit a GncInvoice.")
-
- (gw:wrap-function
- ws
- 'gnc:invoice-search
- '<gw:void>
- "gnc_invoice_search"
- '((<gnc:GncInvoice*> start_selection) (<gnc:GncOwner*> owner)
- (<gnc:Book*> book))
- "Dialog: Select a GncInvoice. Either start_selection or "
- "owner may be NULL.")
-
- ;;
- ;; dialog-job.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:job-new
- '<gw:void>
- "gnc_ui_job_new"
- '((<gnc:GncOwner*> default_owner) (<gnc:Book*> book))
- "Dialog: create a new GncJob. Owner may be NULL.")
-
- (gw:wrap-function
- ws
- 'gnc:job-edit
- '<gw:void>
- "gnc_ui_job_edit"
- '((<gnc:GncJob*> job))
- "Dialog: Edit a GncJob.")
-
- (gw:wrap-function
- ws
- 'gnc:job-search
- '<gw:void>
- "gnc_job_search"
- '((<gnc:GncJob*> job) (<gnc:GncOwner*> owner) (<gnc:Book*> book))
- "Dialog: Search for a job. Job and Owner may be NULL.")
-
- ;;
- ;; dialog-order.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:order-new
- '<gw:void>
- "gnc_ui_order_new"
- '((<gnc:GncOwner*> owner) (<gnc:Book*> book))
- "Dialog: create a new GncOrder.")
-
- (gw:wrap-function
- ws
- 'gnc:order-edit
- '<gw:void>
- "gnc_ui_order_edit"
- '((<gnc:GncOrder*> order))
- "Dialog: Edit a GncOrder.")
-
-
- (gw:wrap-function
- ws
- 'gnc:order-search
- '<gw:void>
- "gnc_order_search"
- '((<gnc:GncOrder*> start_selection) (<gnc:GncOwner*> order_owner)
- (<gnc:Book*> book) )
- "Dialog: Select a GncOrder. Either start_selection or "
- "order_owner may be NULL.")
-
- ;;
- ;; dialog-payment.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:payment-new
- '<gw:void>
- "gnc_ui_payment_new"
- '((<gnc:GncOwner*> owner) (<gnc:Book*> book))
- "Dialog: Enter a payment. The owner may be NULL.")
-
- ;;
- ;; dialog-vendor.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:vendor-new
- '<gw:void>
- "gnc_ui_vendor_new"
- '((<gnc:Book*> book))
- "Dialog: create a new GncVendor.")
-
- (gw:wrap-function
- ws
- 'gnc:vendor-edit
- '<gw:void>
- "gnc_ui_vendor_edit"
- '((<gnc:GncVendor*> vendor))
- "Dialog: Edit a GncVendor.")
-
- (gw:wrap-function
- ws
- 'gnc:vendor-search
- '<gw:void>
- "gnc_vendor_search"
- '((<gnc:GncVendor*> start_selection) (<gnc:Book*> book))
- "Dialog: Select a GncVendor. Start_selection may be NULL.")
-
-)
Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -276,8 +276,6 @@
*/
void gnc_entry_ledger_load (GncEntryLedger *ledger, GList *entry_list)
{
- static SCM id_book = SCM_UNDEFINED;
-
GncEntry *blank_entry, *find_entry;
CursorBuffer *cursor_buffer;
Table *table;
@@ -359,11 +357,8 @@
break;
}
- if (id_book == SCM_UNDEFINED)
- id_book = scm_c_eval_string ("gnc:id-book");
-
/* Compute the proper taxtable */
- odb = gnc_option_db_new_for_type (id_book);
+ odb = gnc_option_db_new_for_type (GNC_ID_BOOK);
gnc_option_db_load_from_kvp (odb, gnc_book_get_slots (ledger->book));
switch (gncOwnerGetType (owner)) {
Modified: gnucash/trunk/src/business/business-reports/aging.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/aging.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-reports/aging.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -67,13 +67,13 @@
(define num-buckets 4)
(define (new-bucket-vector)
- (make-vector num-buckets (gnc:numeric-zero)))
+ (make-vector num-buckets (gnc-numeric-zero)))
(define make-company-private
(record-constructor company-info '(currency bucket-vector overpayment owner-obj)))
(define (make-company currency owner-obj)
- (make-company-private currency (new-bucket-vector) (gnc:numeric-zero) owner-obj))
+ (make-company-private currency (new-bucket-vector) (gnc-numeric-zero) owner-obj))
(define company-get-currency
(record-accessor company-info 'currency))
@@ -116,11 +116,11 @@
(find-bucket (+ current-bucket 1) bucket-intervals date)))))
(define (calculate-adjusted-values amount overpayment)
- (if (>= (gnc:numeric-compare amount overpayment) 0)
- (cons (gnc:numeric-sub-fixed amount overpayment)
- (gnc:numeric-zero))
- (cons (gnc:numeric-zero)
- (gnc:numeric-sub-fixed overpayment amount))))
+ (if (>= (gnc-numeric-compare amount overpayment) 0)
+ (cons (gnc-numeric-sub-fixed amount overpayment)
+ (gnc-numeric-zero))
+ (cons (gnc-numeric-zero)
+ (gnc-numeric-sub-fixed overpayment amount))))
(let* ((current-overpayment (company-get-overpayment company))
(adjusted-values (calculate-adjusted-values amount current-overpayment))
@@ -129,7 +129,7 @@
(bucket-index (find-bucket 0 bucket-intervals date))
(buckets (company-get-buckets company))
(new-bucket-value
- (gnc:numeric-add-fixed adjusted-amount (vector-ref buckets bucket-index))))
+ (gnc-numeric-add-fixed adjusted-amount (vector-ref buckets bucket-index))))
(vector-set! buckets bucket-index new-bucket-value)
(company-set-buckets company buckets)
(company-set-overpayment company adjusted-overpayment)))
@@ -144,15 +144,15 @@
(if (>= current-bucket-index (vector-length buckets))
amount
(let ((current-bucket-amt (vector-ref buckets current-bucket-index)))
- (if (>= (gnc:numeric-compare current-bucket-amt amount) 0)
+ (if (>= (gnc-numeric-compare current-bucket-amt amount) 0)
(begin
- (vector-set! buckets current-bucket-index (gnc:numeric-sub-fixed
+ (vector-set! buckets current-bucket-index (gnc-numeric-sub-fixed
current-bucket-amt amount))
- (gnc:numeric-zero))
+ (gnc-numeric-zero))
(begin
- (vector-set! buckets current-bucket-index (gnc:numeric-zero))
+ (vector-set! buckets current-bucket-index (gnc-numeric-zero))
(process-payment-driver
- (gnc:numeric-sub-fixed amount current-bucket-amt)
+ (gnc-numeric-sub-fixed amount current-bucket-amt)
buckets
(+ current-bucket-index 1)))))))
@@ -161,8 +161,8 @@
(gnc:debug "processing payment of " amount)
(gnc:debug "overpayment was " overpayment)
- (if (gnc:numeric-positive-p overpayment)
- (company-set-overpayment company (gnc:numeric-add-fixed overpayment amount))
+ (if (gnc-numeric-positive-p overpayment)
+ (company-set-overpayment company (gnc-numeric-add-fixed overpayment amount))
(let ((result (process-payment-driver amount (company-get-buckets company) 0)))
(gnc:debug "payment-driver processed. new overpayment: " result)
@@ -179,36 +179,36 @@
reverse? show-zeros)
(define (do-update value)
- (let* ((transaction (gnc:split-get-parent split))
- (temp-owner (gnc:owner-create))
+ (let* ((transaction (xaccSplitGetParent split))
+ (temp-owner (gncOwnerCreate))
(owner (gnc:owner-from-split split temp-owner)))
(if
owner
- (let* ((guid (gnc:owner-get-guid owner))
- (this-currency (gnc:transaction-get-currency transaction))
- (this-date (gnc:transaction-get-date-posted transaction))
+ (let* ((guid (gncOwnerReturnGUID owner))
+ (this-currency (xaccTransGetCurrency transaction))
+ (this-date (gnc-transaction-get-date-posted transaction))
(company-info (hash-ref hash guid)))
(gnc:debug "update-company-hash called")
(gnc:debug "owner: " owner ", guid: " guid)
(gnc:debug "split-value: " value)
- (if reverse? (set! value (gnc:numeric-neg value)))
+ (if reverse? (set! value (gnc-numeric-neg value)))
(if company-info
;; if it's an existing company, destroy the temp owner and
;; then make sure the currencies match
(begin
- (gnc:owner-destroy temp-owner)
- (if (not (gnc:commodity-equiv?
+ (gncOwnerDestroy temp-owner)
+ (if (not (gnc-commodity-equiv
this-currency
(company-get-currency company-info)))
(cons #f (sprintf
(_ "Transactions relating to '%s' contain \
-more than one currency. This report is not designed to cope with this possibility.") (gnc:owner-get-name owner)))
+more than one currency. This report is not designed to cope with this possibility.") (gncOwnerGetName owner)))
(begin
(gnc:debug "it's an old company")
- (if (gnc:numeric-negative-p value)
- (process-invoice company-info (gnc:numeric-neg value) bucket-intervals this-date)
+ (if (gnc-numeric-negative-p value)
+ (process-invoice company-info (gnc-numeric-neg value) bucket-intervals this-date)
(process-payment company-info value))
(hash-set! hash guid company-info)
(cons #t guid))))
@@ -217,19 +217,19 @@
(begin
(gnc:debug "value" value)
(let ((new-company (make-company this-currency owner)))
- (if (gnc:numeric-negative-p value)
- (process-invoice new-company (gnc:numeric-neg value) bucket-intervals this-date)
+ (if (gnc-numeric-negative-p value)
+ (process-invoice new-company (gnc-numeric-neg value) bucket-intervals this-date)
(process-payment new-company value))
(hash-set! hash guid new-company))
(cons #t guid))))
; else (no owner)
- (gnc:owner-destroy temp-owner))))
+ (gncOwnerDestroy temp-owner))))
;; figure out if this split is part of a closed lot
;; also save the split value...
- (let* ((lot (gnc:split-get-lot split))
- (value (gnc:split-get-value split))
- (is-paid? (if (null? lot) #f (gnc:lot-closed? lot))))
+ (let* ((lot (xaccSplitGetLot split))
+ (value (xaccSplitGetValue split))
+ (is-paid? (if (null? lot) #f (gnc-lot-is-closed lot))))
;; if it's closed, then ignore it because it doesn't matter.
;; XXX: we _could_ just set the value to 0 in order to list
@@ -240,11 +240,11 @@
;; get the total debt from the buckets
(define (buckets-get-total buckets)
- (let ((running-total (gnc:numeric-zero))
+ (let ((running-total (gnc-numeric-zero))
(buckets-list (vector->list buckets)))
(for-each (lambda (bucket)
(set! running-total
- (gnc:numeric-add-fixed bucket running-total)))
+ (gnc-numeric-add-fixed bucket running-total)))
buckets-list)
running-total))
@@ -258,7 +258,7 @@
(bucket-b (company-get-buckets company-b))
(total-a (buckets-get-total bucket-a))
(total-b (buckets-get-total bucket-b))
- (difference-sign (gnc:numeric-compare (gnc:numeric-sub-fixed total-a total-b) (gnc:numeric-zero))))
+ (difference-sign (gnc-numeric-compare (gnc-numeric-sub-fixed total-a total-b) (gnc-numeric-zero))))
;; if same totals, compare by name
(if (= difference-sign 0)
(gnc:safe-strcmp (car litem-a) (car litem-b))
@@ -270,11 +270,11 @@
(define (driver buckets-a buckets-b)
(if (null? buckets-a)
0
- (let ((diff (gnc:numeric-compare
- (gnc:numeric-sub-fixed
+ (let ((diff (gnc-numeric-compare
+ (gnc-numeric-sub-fixed
(car buckets-a)
(car buckets-b))
- (gnc:numeric-zero))))
+ (gnc-numeric-zero))))
(if (= diff 0)
(driver (cdr buckets-a) (cdr buckets-b))
diff))))
@@ -304,14 +304,14 @@
(set! begindate (decdate begindate NinetyDayDelta)) ;XXX - 360 days!?!
(gnc:debug "begindate" begindate)
(gnc:debug "date" date)
- (gnc:query-set-book query (gnc:get-current-book))
- (gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
- (gnc:query-add-single-account-match query account 'query-and)
- (gnc:query-add-date-match-timepair query #t begindate #t date 'query-and)
- (gnc:query-set-sort-order query
- (list gnc:split-trans gnc:trans-date-posted)
+ (qof-query-set-book query (gnc-get-current-book))
+ (gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
+ (xaccQueryAddSingleAccountMatch query account QOF-QUERY-AND)
+ (xaccQueryAddDateMatchTS query #t begindate #t date QOF-QUERY-AND)
+ (qof-query-set-sort-order query
+ (list SPLIT-TRANS TRANS-DATE-POSTED)
'() '())
- (gnc:query-set-sort-increasing query #t #t #t)))
+ (qof-query-set-sort-increasing query #t #t #t)))
(define (aging-options-generator options)
@@ -386,7 +386,7 @@
(define (get-name a)
(let* ((owner (company-get-owner-obj (cdr a))))
- (gnc:owner-get-name owner)))
+ (gncOwnerGetName owner)))
;; Predicates for sorting the companys once the data has been collected
@@ -472,12 +472,12 @@
;; convert the buckets in the header data structure
(define (convert-to-monetary-list bucket-list currency overpayment)
- (let* ((running-total (gnc:numeric-neg overpayment))
+ (let* ((running-total (gnc-numeric-neg overpayment))
(monetised-buckets
(map (lambda (bucket-list-entry)
(begin
(set! running-total
- (gnc:numeric-add-fixed running-total bucket-list-entry))
+ (gnc-numeric-add-fixed running-total bucket-list-entry))
(gnc:make-gnc-monetary currency bucket-list-entry)))
(vector->list bucket-list))))
(append (reverse monetised-buckets)
@@ -533,7 +533,7 @@
(exchange-fn (gnc:case-exchange-fn price-source report-currency report-date))
(total-collector-list (make-collector-list))
(table (gnc:make-html-table))
- (query (gnc:malloc-query))
+ (query (qof-query-create-for-splits))
(company-list '())
(work-done 0)
(work-to-do 0)
@@ -546,7 +546,7 @@
(if account
(begin
(gnc:html-document-set-title!
- document (string-append report-title ": " (gnc:account-get-name account)))
+ document (string-append report-title ": " (xaccAccountGetName account)))
(gnc:html-document-set-headline! document
(gnc:html-markup
"!"
@@ -554,7 +554,7 @@
": "
(gnc:html-markup-anchor
(gnc:account-anchor-text account)
- (gnc:account-get-name account))))))
+ (xaccAccountGetName account))))))
(gnc:html-table-set-col-headers! table heading-list)
@@ -562,7 +562,7 @@
(begin
(setup-query query account report-date)
;; get the appropriate splits
- (let ((splits (gnc:query-get-splits query)))
+ (let ((splits (qof-query-run query)))
; (gnc:debug "splits" splits)
;; build the table
@@ -602,7 +602,7 @@
(cdr company-list-entry))))
(owner (company-get-owner-obj
(cdr company-list-entry)))
- (company-name (gnc:owner-get-name owner)))
+ (company-name (gncOwnerGetName owner)))
(add-to-column-totals total-collector-list
monetary-list)
@@ -627,7 +627,7 @@
(gnc:owner-anchor-text owner)
company-name))
monetary-list))
- (gnc:owner-destroy owner)))
+ (gncOwnerDestroy owner)))
company-list)
;; add the totals
@@ -644,7 +644,7 @@
document
(gnc:make-html-text
(_ "No valid account selected. Click on the Options button and select the account to use."))))
- (gnc:free-query query)
+ (qof-query-destroy query)
(gnc:report-finished)
document))
Modified: gnucash/trunk/src/business/business-reports/business-reports.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/business-reports.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-reports/business-reports.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -28,74 +28,72 @@
(gnc:module-load "gnucash/report/standard-reports" 0)
(gnc:module-load "gnucash/business-utils" 0)
-;; this defines gnc:url-type-ownerreport and pulls in gnome-utils
-;; to define gnc:html-build-url
+;; this defines URL-TYPE-OWNERREPORT and pulls in gnome-utils
+;; to define gnc-build-url
(gnc:module-load "gnucash/business-gnome" 0)
(define gnc:menuname-business-reports (N_ "_Business"))
(define (guid-ref idstr type guid)
- (gnc:html-build-url type (string-append idstr guid) #f))
+ (gnc-build-url type (string-append idstr guid) ""))
(define (gnc:customer-anchor-text customer)
- (guid-ref "customer=" gnc:url-type-customer (gnc:customer-get-guid customer)))
+ (guid-ref "customer=" URL-TYPE-CUSTOMER (gncCustomerReturnGUID customer)))
(define (gnc:job-anchor-text job)
- (guid-ref "job=" gnc:url-type-job (gnc:job-get-guid job)))
+ (guid-ref "job=" URL-TYPE-JOB (gncJobReturnGUID job)))
(define (gnc:vendor-anchor-text vendor)
- (guid-ref "vendor=" gnc:url-type-vendor (gnc:vendor-get-guid vendor)))
+ (guid-ref "vendor=" URL-TYPE-VENDOR (gncVendorReturnGUID vendor)))
(define (gnc:employee-anchor-text employee)
- (guid-ref "employee=" gnc:url-type-employee (gnc:employee-get-guid employee)))
+ (guid-ref "employee=" URL-TYPE-EMPLOYEE (gncEmployeeReturnGUID employee)))
(define (gnc:invoice-anchor-text invoice)
- (guid-ref "invoice=" gnc:url-type-invoice (gnc:invoice-get-guid invoice)))
+ (guid-ref "invoice=" URL-TYPE-INVOICE (gncInvoiceReturnGUID invoice)))
(define (gnc:owner-anchor-text owner)
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type (gnc:owner-get-end-owner owner)) #f)))
- (case type
- ((gnc-owner-customer)
- (gnc:customer-anchor-text (gnc:owner-get-customer owner)))
+ (let ((type (gncOwnerGetType (gncOwnerGetEndOwner owner))))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
+ (gnc:customer-anchor-text (gncOwnerGetCustomer owner)))
- ((gnc-owner-vendor)
- (gnc:vendor-anchor-text (gnc:owner-get-vendor owner)))
+ ((eqv? type GNC-OWNER-VENDOR)
+ (gnc:vendor-anchor-text (gncOwnerGetVendor owner)))
- ((gnc-owner-employee)
- (gnc:employee-anchor-text (gnc:owner-get-employee owner)))
+ ((eqv? type GNC-OWNER-EMPLOYEE)
+ (gnc:employee-anchor-text (gncOwnerGetEmployee owner)))
- ((gnc-owner-job)
- (gnc:job-anchor-text (gnc:owner-get-job owner)))
+ ((eqv? type GNC-OWNER-JOB)
+ (gnc:job-anchor-text (gncOwnerGetJob owner)))
(else
""))))
(define (gnc:owner-report-text owner acc)
- (let* ((end-owner (gnc:owner-get-end-owner owner))
- (type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type end-owner) #f))
+ (let* ((end-owner (gncOwnerGetEndOwner owner))
+ (type (gncOwnerGetType end-owner))
(ref #f))
- (case type
- ((gnc-owner-customer)
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
(set! ref "owner=c:"))
- ((gnc-owner-vendor)
+ ((eqv? type GNC-OWNER-VENDOR)
(set! ref "owner=v:"))
- ((gnc-owner-employee)
+ ((eqv? type GNC-OWNER-EMPLOYEE)
(set! ref "owner=e:"))
(else (set! ref "unknown-type=")))
(if ref
(begin
- (set! ref (string-append ref (gnc:owner-get-guid end-owner)))
+ (set! ref (string-append ref (gncOwnerReturnGUID end-owner)))
(if acc
(set! ref (string-append ref "&acct="
- (gnc:account-get-guid acc))))
- (gnc:html-build-url gnc:url-type-ownerreport ref #f))
+ (gncAccountGetGUID acc))))
+ (gnc-build-url URL-TYPE-OWNERREPORT ref ""))
ref)))
(export gnc:menuname-business-reports)
Modified: gnucash/trunk/src/business/business-reports/easy-invoice.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/easy-invoice.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-reports/easy-invoice.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -142,7 +142,7 @@
(val (cdr item))
(ref (hash-ref hash acct)))
- (hash-set! hash acct (if ref (gnc:numeric-add-fixed ref val) val))))
+ (hash-set! hash acct (if ref (gnc-numeric-add-fixed ref val) val))))
values))
@@ -167,54 +167,54 @@
(let* ((row-contents '())
(entry-value (gnc:make-gnc-monetary
currency
- (gnc:entry-get-value entry invoice?)))
+ (gncEntryReturnValue entry invoice?)))
(entry-tax-value (gnc:make-gnc-monetary
currency
- (gnc:entry-get-tax-value entry invoice?))))
+ (gncEntryReturnTaxValue entry invoice?))))
(if (date-col column-vector)
(addto! row-contents
- (gnc:print-date (gnc:entry-get-date entry))))
+ (gnc-print-date (gncEntryGetDate entry))))
(if (description-col column-vector)
(addto! row-contents
- (gnc:entry-get-description entry)))
+ (gncEntryGetDescription entry)))
(if (action-col column-vector)
(addto! row-contents
- (gnc:entry-get-action entry)))
+ (gncEntryGetAction entry)))
(if (quantity-col column-vector)
(addto! row-contents
(gnc:make-html-table-cell/markup
"number-cell"
- (gnc:entry-get-quantity entry))))
+ (gncEntryGetQuantity entry))))
(if (price-col column-vector)
(addto! row-contents
(gnc:make-html-table-cell/markup
"number-cell"
(gnc:make-gnc-monetary
- currency (if invoice? (gnc:entry-get-inv-price entry)
- (gnc:entry-get-bill-price entry))))))
+ currency (if invoice? (gncEntryGetInvPrice entry)
+ (gncEntryGetBillPrice entry))))))
(if (discount-col column-vector)
(addto! row-contents
(if invoice?
(gnc:make-html-table-cell/markup
"number-cell"
- (monetary-or-percent (gnc:entry-get-inv-discount entry)
+ (monetary-or-percent (gncEntryGetInvDiscount entry)
currency
- (gnc:entry-get-inv-discount-type entry)))
+ (gncEntryGetInvDiscountType entry)))
"")))
(if (tax-col column-vector)
(addto! row-contents
(if (if invoice?
- (and (gnc:entry-get-inv-taxable entry)
- (gnc:entry-get-inv-tax-table entry))
- (and (gnc:entry-get-bill-taxable entry)
- (gnc:entry-get-bill-tax-table entry)))
+ (and (gncEntryGetInvTaxable entry)
+ (gncEntryGetInvTaxTable entry))
+ (and (gncEntryGetBillTaxable entry)
+ (gncEntryGetBillTaxTable entry)))
;; This "T" is supposed to be an abbrev. for Tax?
(_ "T") "")))
@@ -244,7 +244,7 @@
(gnc:register-inv-option
(gnc:make-invoice-option invoice-page invoice-name "x" ""
- (lambda () #f) #f))
+ (lambda () '()) #f))
(gnc:register-inv-option
(gnc:make-simple-boolean-option
@@ -376,9 +376,9 @@
(let ((show-payments (opt-val "Display" "Payments"))
(display-all-taxes (opt-val "Display" "Individual Taxes"))
- (lot (gnc:invoice-get-posted-lot invoice))
- (txn (gnc:invoice-get-posted-txn invoice))
- (currency (gnc:invoice-get-currency invoice)))
+ (lot (gncInvoiceGetPostedLot invoice))
+ (txn (gncInvoiceGetPostedTxn invoice))
+ (currency (gncInvoiceGetCurrency invoice)))
(define (colspan monetary used-columns)
(cond
@@ -391,7 +391,7 @@
monetary
(let ((amt (gnc:gnc-monetary-amount monetary)))
(if amt
- (if (gnc:numeric-negative-p amt)
+ (if (gnc-numeric-negative-p amt)
(gnc:monetary-neg monetary)
monetary)
monetary))))
@@ -415,10 +415,10 @@
currency-totals)))
(define (add-payment-row table used-columns split total-collector)
- (let* ((t (gnc:split-get-parent split))
- (currency (gnc:transaction-get-currency t))
+ (let* ((t (xaccSplitGetParent split))
+ (currency (xaccTransGetCurrency t))
;; XXX Need to know when to reverse the value
- (amt (gnc:make-gnc-monetary currency (gnc:split-get-value split)))
+ (amt (gnc:make-gnc-monetary currency (xaccSplitGetValue split)))
(payment-style "grand-total")
(row '()))
@@ -428,7 +428,7 @@
(if (date-col used-columns)
(addto! row
- (gnc:print-date (gnc:transaction-get-date-posted t))))
+ (gnc-print-date (gnc-transaction-get-date-posted t))))
(if (description-col used-columns)
(addto! row (_ "Payment, thank you")))
@@ -462,8 +462,8 @@
(hash-for-each
(lambda (acct value)
(let ((collector (gnc:make-commodity-collector))
- (commodity (gnc:account-get-commodity acct))
- (name (gnc:account-get-name acct)))
+ (commodity (xaccAccountGetCommodity acct))
+ (name (xaccAccountGetName acct)))
(collector 'add commodity value)
(add-subtotal-row table used-columns collector
"grand-total" name)))
@@ -475,14 +475,14 @@
(if (and show-payments lot)
(let ((splits (sort-list!
- (gnc:lot-get-splits lot)
+ (gnc-lot-get-split-list lot)
(lambda (s1 s2)
- (let ((t1 (gnc:split-get-parent s1))
- (t2 (gnc:split-get-parent s2)))
- (< (gnc:transaction-order t1 t2) 0))))))
+ (let ((t1 (xaccSplitGetParent s1))
+ (t2 (xaccSplitGetParent s2)))
+ (< (xaccTransOrder t1 t2) 0))))))
(for-each
(lambda (split)
- (if (not (equal? (gnc:split-get-parent split) txn))
+ (if (not (equal? (xaccSplitGetParent split) txn))
(add-payment-row table used-columns
split total-collector)))
splits)))
@@ -506,7 +506,7 @@
invoice?)))
(if display-all-taxes
- (let ((tax-list (gnc:entry-get-tax-values current invoice?)))
+ (let ((tax-list (gncEntryReturnTaxValues current invoice?)))
(update-account-hash acct-hash tax-list))
(tax-collector 'add
(gnc:gnc-monetary-commodity (cdr entry-values))
@@ -539,7 +539,7 @@
(let* ((table (gnc:make-html-table))
(used-columns (build-column-used options))
(width (num-columns-required used-columns))
- (entries (gnc:invoice-get-entries invoice))
+ (entries (gncInvoiceGetEntries invoice))
(totals (gnc:make-commodity-collector)))
(gnc:html-table-set-col-headers!
@@ -591,7 +591,7 @@
(list "<br>"))
(for-each
(lambda (order)
- (let* ((reference (gnc:order-get-reference order)))
+ (let* ((reference (gncOrderGetReference order)))
(if (and reference (> (string-length reference) 0))
(gnc:html-table-append-row!
table
@@ -609,7 +609,7 @@
table
(list
(string-append label ": ")
- (string-expand (gnc:print-date date) #\space " "))))
+ (string-expand (gnc-print-date date) #\space " "))))
(define (make-date-table)
(let ((table (gnc:make-html-table)))
@@ -624,11 +624,11 @@
(define (make-myname-table book)
(let* ((table (gnc:make-html-table))
- (slots (gnc:book-get-slots book))
- (name (gnc:kvp-frame-get-slot-path
+ (slots (gnc-book-get-slots book))
+ (name (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-name*))))
- (addy (gnc:kvp-frame-get-slot-path
+ (addy (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-addy*)))))
@@ -674,7 +674,7 @@
(table '())
(orders '())
(invoice (opt-val invoice-page invoice-name))
- (owner #f)
+ (owner '())
(references? (opt-val "Display" "References"))
(title (_ "Invoice"))
(invoice? #f))
@@ -685,19 +685,18 @@
(if invoice
(begin
- (set! owner (gnc:invoice-get-owner invoice))
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type
- (gnc:owner-get-end-owner owner)) #f)))
- (case type
- ((gnc-owner-customer)
+ (set! owner (gncInvoiceGetOwner invoice))
+ (let ((type (gncOwnerGetType
+ (gncOwnerGetEndOwner owner))))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
(set! invoice? #t))
- ((gnc-owner-vendor)
+ ((eqv? type GNC-OWNER-VENDOR)
(set! title (_ "Bill")))
- ((gnc-owner-employee)
+ ((eqv? type GNC-OWNER-EMPLOYEE)
(set! title (_ "Expense Voucher")))))
(set! title (sprintf #f (_"%s #%d") title
- (gnc:invoice-get-id invoice)))))
+ (gncInvoiceGetID invoice)))))
; (gnc:html-document-set-title! document title)
@@ -715,14 +714,14 @@
(add-html! document "<td align='left'>")
(add-html! document "<b><u>")
(add-html! document (sprintf #f (_ "Invoice #%d")
- (gnc:invoice-get-id invoice)))
+ (gncInvoiceGetID invoice)))
(add-html! document "</u></b></td>")
(add-html! document "<td align='right'>")
(if (opt-val "Display" "My Company ID")
- (let* ((book (gnc:invoice-get-book invoice))
- (slots (gnc:book-get-slots book))
- (taxid (gnc:kvp-frame-get-slot-path
+ (let* ((book (gncInvoiceGetBook invoice))
+ (slots (gnc-book-get-slots book))
+ (taxid (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-id*)))))
(if (and taxid (> (string-length taxid) 0))
@@ -738,7 +737,7 @@
(make-break! document)
; add the client and company name table
- (let ((book (gnc:invoice-get-book invoice)))
+ (let ((book (gncInvoiceGetBook invoice)))
(set! table (make-entry-table invoice
(gnc:report-options report-obj)
add-order invoice?))
@@ -760,9 +759,8 @@
)
; add the date
- (let ((date-table #f)
- (post-date (gnc:invoice-get-date-posted invoice))
- (due-date (gnc:invoice-get-date-due invoice)))
+ (let ((post-date (gncInvoiceGetDatePosted invoice))
+ (due-date (gncInvoiceGetDateDue invoice)))
(if (not (equal? post-date (cons 0 0)))
(begin
(add-html! document "<table border=0><tr>")
@@ -770,7 +768,7 @@
(add-html! document "Date: ")
(add-html! document "</td>")
(add-html! document "<td>")
- (add-html! document (gnc:print-date post-date))
+ (add-html! document (gnc-print-date post-date))
(add-html! document "</td>")
(if (opt-val "Display" "Due Date")
(begin
@@ -778,7 +776,7 @@
(add-html! document "Due: ")
(add-html! document "</td>")
(add-html! document "<td>")
- (add-html! document (gnc:print-date due-date))
+ (add-html! document (gnc-print-date due-date))
(add-html! document "</td>")))
(add-html! document "</tr></table>"))
(add-html! document
@@ -791,7 +789,7 @@
(make-break! document)
(if (opt-val "Display" "Billing ID")
- (let ((billing-id (gnc:invoice-get-billing-id invoice)))
+ (let ((billing-id (gncInvoiceGetBillingID invoice)))
(if (and billing-id (> (string-length billing-id) 0))
(begin
(gnc:html-document-add-object!
@@ -803,8 +801,8 @@
(make-break! document)))))
(if (opt-val "Display" "Billing Terms")
- (let* ((term (gnc:invoice-get-terms invoice))
- (terms (gnc:bill-term-get-description term)))
+ (let* ((term (gncInvoiceGetTerms invoice))
+ (terms (gncBillTermGetDescription term)))
(if (and terms (> (string-length terms) 0))
(gnc:html-document-add-object!
document
@@ -829,7 +827,7 @@
(if (opt-val "Display" "Invoice Notes")
(begin
- (let ((notes (gnc:invoice-get-notes invoice)))
+ (let ((notes (gncInvoiceGetNotes invoice)))
(gnc:html-document-add-object!
document
(gnc:make-html-text
Modified: gnucash/trunk/src/business/business-reports/fancy-invoice.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/fancy-invoice.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-reports/fancy-invoice.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -160,7 +160,7 @@
(val (cdr item))
(ref (hash-ref hash acct)))
- (hash-set! hash acct (if ref (gnc:numeric-add-fixed ref val) val))))
+ (hash-set! hash acct (if ref (gnc-numeric-add-fixed ref val) val))))
values))
(define (monetary-or-percent numeric currency entry-type)
@@ -173,54 +173,54 @@
(let* ((row-contents '())
(entry-value (gnc:make-gnc-monetary
currency
- (gnc:entry-get-value entry invoice?)))
+ (gncEntryReturnValue entry invoice?)))
(entry-tax-value (gnc:make-gnc-monetary
currency
- (gnc:entry-get-tax-value entry invoice?))))
+ (gncEntryReturnTaxValue entry invoice?))))
(if (date-col column-vector)
(addto! row-contents
- (gnc:print-date (gnc:entry-get-date entry))))
+ (gnc-print-date (gncEntryGetDate entry))))
(if (description-col column-vector)
(addto! row-contents
- (gnc:entry-get-description entry)))
+ (gncEntryGetDescription entry)))
(if (action-col column-vector)
(addto! row-contents
- (gnc:entry-get-action entry)))
+ (gncEntryGetAction entry)))
(if (quantity-col column-vector)
(addto! row-contents
(gnc:make-html-table-cell/markup
"number-cell"
- (gnc:entry-get-quantity entry))))
+ (gncEntryGetQuantity entry))))
(if (price-col column-vector)
(addto! row-contents
(gnc:make-html-table-cell/markup
"number-cell"
(gnc:make-gnc-monetary
- currency (if invoice? (gnc:entry-get-inv-price entry)
- (gnc:entry-get-bill-price entry))))))
+ currency (if invoice? (gncEntryGetInvPrice entry)
+ (gncEntryGetBillPrice entry))))))
(if (discount-col column-vector)
(addto! row-contents
(if invoice?
(gnc:make-html-table-cell/markup
"number-cell"
- (monetary-or-percent (gnc:entry-get-inv-discount entry)
+ (monetary-or-percent (gncEntryGetInvDiscount entry)
currency
- (gnc:entry-get-inv-discount-type entry)))
+ (gncEntryGetInvDiscountType entry)))
"")))
(if (tax-col column-vector)
(addto! row-contents
(if (if invoice?
- (and (gnc:entry-get-inv-taxable entry)
- (gnc:entry-get-inv-tax-table entry))
- (and (gnc:entry-get-bill-taxable entry)
- (gnc:entry-get-bill-tax-table entry)))
+ (and (gncEntryGetInvTaxable entry)
+ (gncEntryGetInvTaxTable entry))
+ (and (gncEntryGetBillTaxable entry)
+ (gncEntryGetBillTaxTable entry)))
(_ "T") "")))
(if (taxvalue-col column-vector)
@@ -251,7 +251,7 @@
(gnc:register-inv-option
(gnc:make-invoice-option invoice-page invoice-name "x" ""
- (lambda () #f) #f))
+ (lambda () '()) #f))
(gnc:register-inv-option
(gnc:make-simple-boolean-option
@@ -349,7 +349,7 @@
(gnc:make-complex-boolean-option
(N_ "Display") (N_ "Payable to")
"ua1" (N_ "Display the Payable to: information") #t #f
- (lambda (x) (gnc:option-db-set-option-selectable-by-name
+ (lambda (x) (gnc-option-db-set-option-selectable-by-name
gnc:*report-options* "Display" "Payable to string" x))))
(gnc:register-inv-option
@@ -362,7 +362,7 @@
(gnc:make-complex-boolean-option
(N_ "Display") (N_ "Company contact")
"ub1" (N_ "Display the Company contact information") #t #f
- (lambda (x) (gnc:option-db-set-option-selectable-by-name
+ (lambda (x) (gnc-option-db-set-option-selectable-by-name
gnc:*report-options* "Display" "Company contact string" x))))
(gnc:register-inv-option
@@ -389,9 +389,9 @@
(let ((show-payments (opt-val "Display" "Payments"))
(display-all-taxes (opt-val "Display" "Individual Taxes"))
- (lot (gnc:invoice-get-posted-lot invoice))
- (txn (gnc:invoice-get-posted-txn invoice))
- (currency (gnc:invoice-get-currency invoice))
+ (lot (gncInvoiceGetPostedLot invoice))
+ (txn (gncInvoiceGetPostedTxn invoice))
+ (currency (gncInvoiceGetCurrency invoice))
(entries-added 0))
(define (colspan monetary used-columns)
@@ -405,7 +405,7 @@
monetary
(let ((amt (gnc:gnc-monetary-amount monetary)))
(if amt
- (if (gnc:numeric-negative-p amt)
+ (if (gnc-numeric-negative-p amt)
(gnc:monetary-neg monetary)
monetary)
monetary))))
@@ -432,10 +432,10 @@
currency-totals)))
(define (add-payment-row table used-columns split total-collector)
- (let* ((t (gnc:split-get-parent split))
- (currency (gnc:transaction-get-currency t))
+ (let* ((t (xaccSplitGetParent split))
+ (currency (xaccTransGetCurrency t))
;; XXX Need to know when to reverse the value
- (amt (gnc:make-gnc-monetary currency (gnc:split-get-value split)))
+ (amt (gnc:make-gnc-monetary currency (xaccSplitGetValue split)))
(payment-style "grand-total")
(row '()))
@@ -445,7 +445,7 @@
(if (date-col used-columns)
(addto! row
- (gnc:print-date (gnc:transaction-get-date-posted t))))
+ (gnc-print-date (gnc-transaction-get-date-posted t))))
(if (description-col used-columns)
(addto! row (_ "Payment, thank you")))
@@ -488,8 +488,8 @@
(hash-for-each
(lambda (acct value)
(let ((collector (gnc:make-commodity-collector))
- (commodity (gnc:account-get-commodity acct))
- (name (gnc:account-get-name acct)))
+ (commodity (xaccAccountGetCommodity acct))
+ (name (xaccAccountGetName acct)))
(collector 'add commodity value)
(add-subtotal-row table used-columns collector
"grand-total" (string-expand
@@ -502,14 +502,14 @@
(if (and show-payments lot)
(let ((splits (sort-list!
- (gnc:lot-get-splits lot)
+ (gnc-lot-get-split-list lot)
(lambda (s1 s2)
- (let ((t1 (gnc:split-get-parent s1))
- (t2 (gnc:split-get-parent s2)))
- (< (gnc:transaction-order t1 t2) 0))))))
+ (let ((t1 (xaccSplitGetParent s1))
+ (t2 (xaccSplitGetParent s2)))
+ (< (xaccTransOrder t1 t2) 0))))))
(for-each
(lambda (split)
- (if (not (equal? (gnc:split-get-parent split) txn))
+ (if (not (equal? (xaccSplitGetParent split) txn))
(add-payment-row table used-columns
split total-collector)))
splits)))
@@ -534,7 +534,7 @@
invoice?)))
(if display-all-taxes
- (let ((tax-list (gnc:entry-get-tax-values current invoice?)))
+ (let ((tax-list (gncEntryReturnTaxValues current invoice?)))
(update-account-hash acct-hash tax-list))
(tax-collector 'add
(gnc:gnc-monetary-commodity (cdr entry-values))
@@ -569,7 +569,7 @@
(let* ((table (gnc:make-html-table))
(used-columns (build-column-used options))
(width (num-columns-required used-columns))
- (entries (gnc:invoice-get-entries invoice))
+ (entries (gncInvoiceGetEntries invoice))
(totals (gnc:make-commodity-collector)))
(gnc:html-table-set-col-headers!
@@ -628,7 +628,7 @@
(list "<br>"))
(for-each
(lambda (order)
- (let* ((reference (gnc:order-get-reference order)))
+ (let* ((reference (gncOrderGetReference order)))
(if (and reference (> (string-length reference) 0))
(gnc:html-table-append-row!
table
@@ -649,7 +649,7 @@
;; for the invoice date/due date fields
;; I could have taken the format from the report options, but... ;)
(string-expand (strftime "%B %e, %Y" (localtime (car date))) #\space " ")
- ;;(string-expand (gnc:print-date date) #\space " ")
+ ;;(string-expand (gnc-print-date date) #\space " ")
)))
(define (make-date-table)
@@ -665,26 +665,26 @@
(define (make-myname-table book date-format)
(let* ((table (gnc:make-html-table))
- (slots (gnc:book-get-slots book))
- (name (gnc:kvp-frame-get-slot-path
+ (slots (gnc-book-get-slots book))
+ (name (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-name*))))
-;; (contact (gnc:kvp-frame-get-slot-path
+;; (contact (kvp-frame-get-slot-path-gslist
;; slots (append gnc:*kvp-option-path*
;; (list gnc:*business-label* gnc:*company-contact*))))
- (addy (gnc:kvp-frame-get-slot-path
+ (addy (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-addy*))))
- (id (gnc:kvp-frame-get-slot-path
+ (id (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-id*))))
- (phone (gnc:kvp-frame-get-slot-path
+ (phone (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-phone*))))
- (fax (gnc:kvp-frame-get-slot-path
+ (fax (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-fax*))))
- (url (gnc:kvp-frame-get-slot-path
+ (url (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-url*))))
(invoice-cell (gnc:make-html-table-cell))
@@ -757,7 +757,7 @@
(table '())
(orders '())
(invoice (opt-val invoice-page invoice-name))
- (owner #f)
+ (owner '())
(references? (opt-val "Display" "References"))
(title (_ "Invoice"))
(invoice? #f))
@@ -768,26 +768,25 @@
(if invoice
(begin
- (set! owner (gnc:invoice-get-owner invoice))
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type
- (gnc:owner-get-end-owner owner)) #f)))
- (case type
- ((gnc-owner-customer)
+ (set! owner (gncInvoiceGetOwner invoice))
+ (let ((type (gncOwnerGetType
+ (gncOwnerGetEndOwner owner))))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
(set! invoice? #t))
- ((gnc-owner-vendor)
+ ((eqv? type GNC-OWNER-VENDOR)
(set! title (_ "Bill")))
- ((gnc-owner-employee)
+ ((eqv? type GNC-OWNER-EMPLOYEE)
(set! title (_ "Expense Voucher")))))
(set! title (sprintf #f (_"%s #%d") title
- (gnc:invoice-get-id invoice)))))
+ (gncInvoiceGetID invoice)))))
;; oli-custom - title redundant, "Invoice" moved to myname-table,
;; invoice number moved below
;;(gnc:html-document-set-title! document title)
(if invoice
- (let* ((book (gnc:invoice-get-book invoice))
- (slots (gnc:book-get-slots book))
+ (let* ((book (gncInvoiceGetBook invoice))
+ (slots (gnc-book-get-slots book))
(date-object #f)
(helper-table (gnc:make-html-table)))
(set! table (make-entry-table invoice
@@ -835,8 +834,8 @@
'attribute (list "width" "100%"))
(set! date-object (let ((date-table #f)
- (post-date (gnc:invoice-get-date-posted invoice))
- (due-date (gnc:invoice-get-date-due invoice)))
+ (post-date (gncInvoiceGetDatePosted invoice))
+ (due-date (gncInvoiceGetDateDue invoice)))
(if (not (equal? post-date (cons 0 0)))
(begin
@@ -844,7 +843,7 @@
;; oli-custom - moved invoice number here
(gnc:html-table-append-row!
date-table (list (sprintf #f (_ "Invoice # %d")
- (gnc:invoice-get-id invoice))))
+ (gncInvoiceGetID invoice))))
(make-date-row! date-table (_ "Invoice Date") post-date)
(make-date-row! date-table (_ "Due Date") due-date)
date-table)
@@ -876,7 +875,7 @@
(make-break! document)
(if (opt-val "Display" "Billing ID")
- (let ((billing-id (gnc:invoice-get-billing-id invoice)))
+ (let ((billing-id (gncInvoiceGetBillingID invoice)))
(if (and billing-id (> (string-length billing-id) 0))
(begin
(gnc:html-document-add-object!
@@ -888,8 +887,8 @@
(make-break! document)))))
(if (opt-val "Display" "Billing Terms")
- (let* ((term (gnc:invoice-get-terms invoice))
- (terms (gnc:bill-term-get-description term)))
+ (let* ((term (gncInvoiceGetTerms invoice))
+ (terms (gncBillTermGetDescription term)))
(if (and terms (> (string-length terms) 0))
(gnc:html-document-add-object!
document
@@ -906,7 +905,7 @@
(make-break! document)
(if (opt-val "Display" "Invoice Notes")
- (let ((notes (gnc:invoice-get-notes invoice)))
+ (let ((notes (gncInvoiceGetNotes invoice)))
(gnc:html-document-add-object!
document
(gnc:make-html-text
@@ -915,7 +914,7 @@
(make-break! document)
(if (opt-val "Display" "Payable to")
- (let* ((name (gnc:kvp-frame-get-slot-path
+ (let* ((name (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label*
gnc:*company-name*))))
@@ -930,7 +929,7 @@
(make-break! document)
(if (opt-val "Display" "Company contact")
- (let* ((contact (gnc:kvp-frame-get-slot-path
+ (let* ((contact (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label*
gnc:*company-contact*))))
Modified: gnucash/trunk/src/business/business-reports/invoice.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/invoice.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-reports/invoice.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -136,7 +136,7 @@
(val (cdr item))
(ref (hash-ref hash acct)))
- (hash-set! hash acct (if ref (gnc:numeric-add-fixed ref val) val))))
+ (hash-set! hash acct (if ref (gnc-numeric-add-fixed ref val) val))))
values))
@@ -161,54 +161,54 @@
(let* ((row-contents '())
(entry-value (gnc:make-gnc-monetary
currency
- (gnc:entry-get-value entry invoice?)))
+ (gncEntryReturnValue entry invoice?)))
(entry-tax-value (gnc:make-gnc-monetary
currency
- (gnc:entry-get-tax-value entry invoice?))))
+ (gncEntryReturnTaxValue entry invoice?))))
(if (date-col column-vector)
(addto! row-contents
- (gnc:print-date (gnc:entry-get-date entry))))
+ (gnc-print-date (gncEntryGetDate entry))))
(if (description-col column-vector)
(addto! row-contents
- (gnc:entry-get-description entry)))
+ (gncEntryGetDescription entry)))
(if (action-col column-vector)
(addto! row-contents
- (gnc:entry-get-action entry)))
+ (gncEntryGetAction entry)))
(if (quantity-col column-vector)
(addto! row-contents
(gnc:make-html-table-cell/markup
"number-cell"
- (gnc:entry-get-quantity entry))))
+ (gncEntryGetQuantity entry))))
(if (price-col column-vector)
(addto! row-contents
(gnc:make-html-table-cell/markup
"number-cell"
(gnc:make-gnc-monetary
- currency (if invoice? (gnc:entry-get-inv-price entry)
- (gnc:entry-get-bill-price entry))))))
+ currency (if invoice? (gncEntryGetInvPrice entry)
+ (gncEntryGetBillPrice entry))))))
(if (discount-col column-vector)
(addto! row-contents
(if invoice?
(gnc:make-html-table-cell/markup
"number-cell"
- (monetary-or-percent (gnc:entry-get-inv-discount entry)
+ (monetary-or-percent (gncEntryGetInvDiscount entry)
currency
- (gnc:entry-get-inv-discount-type entry)))
+ (gncEntryGetInvDiscountType entry)))
"")))
(if (tax-col column-vector)
(addto! row-contents
(if (if invoice?
- (and (gnc:entry-get-inv-taxable entry)
- (gnc:entry-get-inv-tax-table entry))
- (and (gnc:entry-get-bill-taxable entry)
- (gnc:entry-get-bill-tax-table entry)))
+ (and (gncEntryGetInvTaxable entry)
+ (gncEntryGetInvTaxTable entry))
+ (and (gncEntryGetBillTaxable entry)
+ (gncEntryGetBillTaxTable entry)))
(_ "T") "")))
(if (taxvalue-col column-vector)
@@ -237,7 +237,7 @@
(gnc:register-inv-option
(gnc:make-invoice-option invoice-page invoice-name "x" ""
- (lambda () #f) #f))
+ (lambda () '()) #f))
(gnc:register-inv-option
(gnc:make-simple-boolean-option
@@ -342,9 +342,9 @@
(let ((show-payments (opt-val "Display" "Payments"))
(display-all-taxes (opt-val "Display" "Individual Taxes"))
- (lot (gnc:invoice-get-posted-lot invoice))
- (txn (gnc:invoice-get-posted-txn invoice))
- (currency (gnc:invoice-get-currency invoice)))
+ (lot (gncInvoiceGetPostedLot invoice))
+ (txn (gncInvoiceGetPostedTxn invoice))
+ (currency (gncInvoiceGetCurrency invoice)))
(define (colspan monetary used-columns)
(cond
@@ -357,7 +357,7 @@
monetary
(let ((amt (gnc:gnc-monetary-amount monetary)))
(if amt
- (if (gnc:numeric-negative-p amt)
+ (if (gnc-numeric-negative-p amt)
(gnc:monetary-neg monetary)
monetary)
monetary))))
@@ -381,10 +381,10 @@
currency-totals)))
(define (add-payment-row table used-columns split total-collector)
- (let* ((t (gnc:split-get-parent split))
- (currency (gnc:transaction-get-currency t))
+ (let* ((t (xaccSplitGetParent split))
+ (currency (xaccTransGetCurrency t))
;; XXX Need to know when to reverse the value
- (amt (gnc:make-gnc-monetary currency (gnc:split-get-value split)))
+ (amt (gnc:make-gnc-monetary currency (xaccSplitGetValue split)))
(payment-style "grand-total")
(row '()))
@@ -394,7 +394,7 @@
(if (date-col used-columns)
(addto! row
- (gnc:print-date (gnc:transaction-get-date-posted t))))
+ (gnc-print-date (gnc-transaction-get-date-posted t))))
(if (description-col used-columns)
(addto! row (_ "Payment, thank you")))
@@ -426,8 +426,8 @@
(hash-for-each
(lambda (acct value)
(let ((collector (gnc:make-commodity-collector))
- (commodity (gnc:account-get-commodity acct))
- (name (gnc:account-get-name acct)))
+ (commodity (xaccAccountGetCommodity acct))
+ (name (xaccAccountGetName acct)))
(collector 'add commodity value)
(add-subtotal-row table used-columns collector
"grand-total" name)))
@@ -439,14 +439,14 @@
(if (and show-payments lot)
(let ((splits (sort-list!
- (gnc:lot-get-splits lot)
+ (gnc-lot-get-split-list lot)
(lambda (s1 s2)
- (let ((t1 (gnc:split-get-parent s1))
- (t2 (gnc:split-get-parent s2)))
- (< (gnc:transaction-order t1 t2) 0))))))
+ (let ((t1 (xaccSplitGetParent s1))
+ (t2 (xaccSplitGetParent s2)))
+ (< (xaccTransOrder t1 t2) 0))))))
(for-each
(lambda (split)
- (if (not (equal? (gnc:split-get-parent split) txn))
+ (if (not (equal? (xaccSplitGetParent split) txn))
(add-payment-row table used-columns
split total-collector)))
splits)))
@@ -470,7 +470,7 @@
invoice?)))
(if display-all-taxes
- (let ((tax-list (gnc:entry-get-tax-values current invoice?)))
+ (let ((tax-list (gncEntryReturnTaxValues current invoice?)))
(update-account-hash acct-hash tax-list))
(tax-collector 'add
(gnc:gnc-monetary-commodity (cdr entry-values))
@@ -503,7 +503,7 @@
(let* ((table (gnc:make-html-table))
(used-columns (build-column-used options))
(width (num-columns-required used-columns))
- (entries (gnc:invoice-get-entries invoice))
+ (entries (gncInvoiceGetEntries invoice))
(totals (gnc:make-commodity-collector)))
(gnc:html-table-set-col-headers!
@@ -555,7 +555,7 @@
(list "<br>"))
(for-each
(lambda (order)
- (let* ((reference (gnc:order-get-reference order)))
+ (let* ((reference (gncOrderGetReference order)))
(if (and reference (> (string-length reference) 0))
(gnc:html-table-append-row!
table
@@ -572,7 +572,7 @@
table
(list
(string-append label ": ")
- (string-expand (gnc:print-date date) #\space " "))))
+ (string-expand (gnc-print-date date) #\space " "))))
(define (make-date-table)
(let ((table (gnc:make-html-table)))
@@ -587,11 +587,11 @@
(define (make-myname-table book date-format)
(let* ((table (gnc:make-html-table))
- (slots (gnc:book-get-slots book))
- (name (gnc:kvp-frame-get-slot-path
+ (slots (gnc-book-get-slots book))
+ (name (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-name*))))
- (addy (gnc:kvp-frame-get-slot-path
+ (addy (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-addy*)))))
@@ -627,7 +627,7 @@
(table '())
(orders '())
(invoice (opt-val invoice-page invoice-name))
- (owner #f)
+ (owner '())
(references? (opt-val "Display" "References"))
(title (_ "Invoice"))
(invoice? #f))
@@ -638,24 +638,23 @@
(if invoice
(begin
- (set! owner (gnc:invoice-get-owner invoice))
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type
- (gnc:owner-get-end-owner owner)) #f)))
- (case type
- ((gnc-owner-customer)
+ (set! owner (gncInvoiceGetOwner invoice))
+ (let ((type (gncOwnerGetType
+ (gncOwnerGetEndOwner owner))))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
(set! invoice? #t))
- ((gnc-owner-vendor)
+ ((eqv? type GNC-OWNER-VENDOR)
(set! title (_ "Bill")))
- ((gnc-owner-employee)
+ ((eqv? type GNC-OWNER-EMPLOYEE)
(set! title (_ "Expense Voucher")))))
(set! title (sprintf #f (_"%s #%d") title
- (gnc:invoice-get-id invoice)))))
+ (gncInvoiceGetID invoice)))))
(gnc:html-document-set-title! document title)
(if invoice
- (let ((book (gnc:invoice-get-book invoice)))
+ (let ((book (gncInvoiceGetBook invoice)))
(set! table (make-entry-table invoice
(gnc:report-options report-obj)
add-order invoice?))
@@ -671,8 +670,8 @@
(make-myname-table book (opt-val "Display" "Today Date Format")))
(let ((date-table #f)
- (post-date (gnc:invoice-get-date-posted invoice))
- (due-date (gnc:invoice-get-date-due invoice)))
+ (post-date (gncInvoiceGetDatePosted invoice))
+ (due-date (gncInvoiceGetDateDue invoice)))
(if (not (equal? post-date (cons 0 0)))
(begin
@@ -696,7 +695,7 @@
(make-break! document)
(if (opt-val "Display" "Billing ID")
- (let ((billing-id (gnc:invoice-get-billing-id invoice)))
+ (let ((billing-id (gncInvoiceGetBillingID invoice)))
(if (and billing-id (> (string-length billing-id) 0))
(begin
(gnc:html-document-add-object!
@@ -708,8 +707,8 @@
(make-break! document)))))
(if (opt-val "Display" "Billing Terms")
- (let* ((term (gnc:invoice-get-terms invoice))
- (terms (gnc:bill-term-get-description term)))
+ (let* ((term (gncInvoiceGetTerms invoice))
+ (terms (gncBillTermGetDescription term)))
(if (and terms (> (string-length terms) 0))
(gnc:html-document-add-object!
document
@@ -726,7 +725,7 @@
(make-break! document)
(if (opt-val "Display" "Invoice Notes")
- (let ((notes (gnc:invoice-get-notes invoice)))
+ (let ((notes (gncInvoiceGetNotes invoice)))
(gnc:html-document-add-object!
document
(gnc:make-html-text
Modified: gnucash/trunk/src/business/business-reports/owner-report.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/owner-report.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-reports/owner-report.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -115,7 +115,7 @@
(define num-buckets 4)
(define (new-bucket-vector)
- (make-vector num-buckets (gnc:numeric-zero)))
+ (make-vector num-buckets (gnc-numeric-zero)))
(define (make-interval-list to-date)
(let ((begindate to-date))
@@ -126,10 +126,10 @@
(define (make-aging-table options query bucket-intervals reverse?)
- (let ((lots (gnc:query-get-lots query 'query-txn-match-any))
+ (let ((lots (xaccQueryGetLots query QUERY-TXN-MATCH-ANY))
(buckets (new-bucket-vector))
- (payments (gnc:numeric-zero))
- (currency (gnc:default-currency)) ;XXX
+ (payments (gnc-numeric-zero))
+ (currency (gnc-default-currency)) ;XXX
(table (gnc:make-html-table)))
(define (in-interval this-date current-bucket)
@@ -145,24 +145,24 @@
(define (apply-invoice date value)
(let* ((bucket-index (find-bucket 0 bucket-intervals date))
- (new-value (gnc:numeric-add-fixed
+ (new-value (gnc-numeric-add-fixed
value
(vector-ref buckets bucket-index))))
(vector-set! buckets bucket-index new-value)))
(define (apply-payment value)
- (set! payments (gnc:numeric-add-fixed value payments)))
+ (set! payments (gnc-numeric-add-fixed value payments)))
(for-each
(lambda (lot)
- (let* ((bal (gnc:lot-get-balance lot))
- (invoice (gnc:invoice-get-invoice-from-lot lot))
- (post-date (gnc:invoice-get-date-posted invoice)))
+ (let* ((bal (gnc-lot-get-balance lot))
+ (invoice (gncInvoiceGetInvoiceFromLot lot))
+ (post-date (gncInvoiceGetDatePosted invoice)))
- (if (not (gnc:numeric-zero-p bal))
+ (if (not (gnc-numeric-zero-p bal))
(begin
(if reverse?
- (set! bal (gnc:numeric-neg bal)))
+ (set! bal (gnc-numeric-neg bal)))
(if invoice
(begin
(apply-invoice post-date bal))
@@ -192,13 +192,13 @@
;;
(define (add-txn-row table txn acc column-vector odd-row? printed?
inv-str reverse? start-date total)
- (let* ((type (gnc:transaction-get-txn-type txn))
- (date (gnc:transaction-get-date-posted txn))
+ (let* ((type (xaccTransGetTxnType txn))
+ (date (gnc-transaction-get-date-posted txn))
(due-date #f)
- (value (gnc:transaction-get-account-value txn acc))
- (split (gnc:transaction-get-split txn 0))
- (invoice (gnc:invoice-get-invoice-from-txn txn))
- (currency (gnc:transaction-get-currency txn))
+ (value (xaccTransGetAccountValue txn acc))
+ (split (xaccTransGetSplit txn 0))
+ (invoice (gncInvoiceGetInvoiceFromTxn txn))
+ (currency (xaccTransGetCurrency txn))
(type-str
(cond
((equal? type gnc:transaction-type-invoice)
@@ -215,12 +215,12 @@
(define (make-row date due-date num type-str memo value)
(let ((row-contents '()))
(if (date-col column-vector)
- (addto! row-contents (gnc:print-date date)))
+ (addto! row-contents (gnc-print-date date)))
(if (date-due-col column-vector)
(addto! row-contents
(if (and due-date
(not (equal? due-date (cons 0 0))))
- (gnc:print-date due-date)
+ (gnc-print-date due-date)
"")))
(if (num-col column-vector)
(addto! row-contents num))
@@ -236,7 +236,7 @@
row-contents))
(if reverse?
- (set! value (gnc:numeric-neg value)))
+ (set! value (gnc-numeric-neg value)))
(if (gnc:timepair-later start-date date)
(begin
@@ -245,7 +245,7 @@
(if (not printed?)
(begin
(set! printed? #t)
- (if (not (gnc:numeric-zero-p total))
+ (if (not (gnc-numeric-zero-p total))
(let ((row (make-row start-date #f "" (_ "Balance") "" total))
(row-style (if odd-row? "normal-row" "alternate-row")))
(gnc:html-table-append-row/markup! table row-style
@@ -256,10 +256,10 @@
; Now print out the invoice row
(if invoice
- (set! due-date (gnc:invoice-get-date-due invoice)))
+ (set! due-date (gncInvoiceGetDateDue invoice)))
- (let ((row (make-row date due-date (gnc:transaction-get-num txn)
- type-str (gnc:split-get-memo split) value))
+ (let ((row (make-row date due-date (xaccTransGetNum txn)
+ type-str (xaccSplitGetMemo split) value))
(row-style (if odd-row? "normal-row" "alternate-row")))
(gnc:html-table-append-row/markup! table row-style
@@ -273,10 +273,10 @@
(define (make-txn-table options query acc start-date end-date)
- (let ((txns (gnc:query-get-transactions query 'query-txn-match-any))
+ (let ((txns (xaccQueryGetTransactions query QUERY-TXN-MATCH-ANY))
(used-columns (build-column-used options))
- (total (gnc:numeric-zero))
- (currency (gnc:default-currency)) ;XXX
+ (total (gnc-numeric-zero))
+ (currency (gnc-default-currency)) ;XXX
(table (gnc:make-html-table))
(inv-str (gnc:option-value (gnc:lookup-option options "__reg"
"inv-str")))
@@ -288,13 +288,13 @@
(make-heading-list used-columns))
; Order the transactions properly
- (set! txns (sort txns (lambda (a b) (> 0 (gnc:transaction-order a b)))))
+ (set! txns (sort txns (lambda (a b) (> 0 (xaccTransOrder a b)))))
(let ((printed? #f)
(odd-row? #t))
(for-each
(lambda (txn)
- (let ((type (gnc:transaction-get-txn-type txn)))
+ (let ((type (xaccTransGetTxnType txn)))
(if
(or (equal? type gnc:transaction-type-invoice)
(equal? type gnc:transaction-type-payment))
@@ -302,7 +302,7 @@
inv-str reverse? start-date total)))
(set! printed? (car result))
- (set! total (gnc:numeric-add-fixed total (cadr result)))
+ (set! total (gnc-numeric-add-fixed total (cadr result)))
(set! odd-row? (caddr result))
))))
txns))
@@ -312,7 +312,7 @@
"grand-total"
(append (cons (gnc:make-html-table-cell/markup
"total-label-cell"
- (if (gnc:numeric-negative-p total)
+ (if (gnc-numeric-negative-p total)
(_ "Total Credit")
(_ "Total Due")))
'())
@@ -348,7 +348,7 @@
(gnc:register-inv-option
(gnc:make-owner-option owner-page owner-string "v"
(N_ "The company for this report")
- (lambda () #f) #f owner-type))
+ (lambda () '()) #f owner-type))
(gnc:register-inv-option
(gnc:make-internal-option "__reg" "owner-type" owner-type))
@@ -403,13 +403,16 @@
gnc:*report-options*)
(define (customer-options-generator)
- (options-generator '(receivable) 'gnc-owner-customer (_ "Invoice") #f))
+ (options-generator (list ACCT-TYPE-RECEIVABLE) GNC-OWNER-CUSTOMER
+ (_ "Invoice") #f))
(define (vendor-options-generator)
- (options-generator '(payable) 'gnc-owner-vendor (_ "Bill") #t))
+ (options-generator (list ACCT-TYPE-PAYABLE) GNC-OWNER-VENDOR
+ (_ "Bill") #t))
(define (employee-options-generator)
- (options-generator '(payable) 'gnc-owner-employee (_ "Expense Report") #t))
+ (options-generator (list ACCT-TYPE-PAYABLE) GNC-OWNER-EMPLOYEE
+ (_ "Expense Report") #t))
(define (string-expand string character replace-string)
(define (car-line chars)
@@ -430,26 +433,26 @@
(line-helper (string->list string)))
(define (setup-query q owner account end-date)
- (let* ((guid (gnc:owner-get-guid (gnc:owner-get-end-owner owner))))
+ (let* ((guid (gncOwnerReturnGUID (gncOwnerGetEndOwner owner))))
- (gnc:query-add-guid-match
+ (qof-query-add-guid-match
q
- (list gnc:split-trans gnc:invoice-from-txn gnc:invoice-owner
- gnc:owner-parentg)
- guid 'query-or)
- (gnc:query-add-guid-match
+ (list SPLIT-TRANS INVOICE-FROM-TXN INVOICE-OWNER
+ OWNER-PARENTG)
+ guid QOF-QUERY-OR)
+ (qof-query-add-guid-match
q
- (list gnc:split-lot gnc:owner-from-lot gnc:owner-parentg)
- guid 'query-or)
- (gnc:query-add-guid-match
+ (list SPLIT-LOT OWNER-FROM-LOT OWNER-PARENTG)
+ guid QOF-QUERY-OR)
+ (qof-query-add-guid-match
q
- (list gnc:split-lot gnc:invoice-from-lot gnc:invoice-owner
- gnc:owner-parentg)
- guid 'query-or)
+ (list SPLIT-LOT INVOICE-FROM-LOT INVOICE-OWNER
+ OWNER-PARENTG)
+ guid QOF-QUERY-OR)
- (gnc:query-add-single-account-match q account 'query-and)
- (gnc:query-add-date-match-timepair q #f end-date #t end-date 'query-and)
- (gnc:query-set-book q (gnc:get-current-book))
+ (xaccQueryAddSingleAccountMatch q account QOF-QUERY-AND)
+ (xaccQueryAddDateMatchTS q #f end-date #t end-date QOF-QUERY-AND)
+ (qof-query-set-book q (gnc-get-current-book))
q))
(define (make-owner-table owner)
@@ -476,7 +479,7 @@
table
(list
(string-append label ": ")
- (string-expand (gnc:print-date date) #\space " "))))
+ (string-expand (gnc-print-date date) #\space " "))))
(define (make-date-table)
(let ((table (gnc:make-html-table)))
@@ -491,11 +494,11 @@
(define (make-myname-table book date-format)
(let* ((table (gnc:make-html-table))
- (slots (gnc:book-get-slots book))
- (name (gnc:kvp-frame-get-slot-path
+ (slots (gnc-book-get-slots book))
+ (name (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-name*))))
- (addy (gnc:kvp-frame-get-slot-path
+ (addy (kvp-frame-get-slot-path-gslist
slots (append gnc:*kvp-option-path*
(list gnc:*business-label* gnc:*company-addy*)))))
@@ -531,7 +534,7 @@
(let* ((document (gnc:make-html-document))
(table '())
(orders '())
- (query (gnc:malloc-query))
+ (query (qof-query-create-for-splits))
(account (opt-val owner-page acct-string))
(owner (opt-val owner-page owner-string))
(start-date (gnc:timepair-start-day-time
@@ -540,28 +543,28 @@
(end-date (gnc:timepair-end-day-time
(gnc:date-option-absolute-time
(opt-val gnc:pagename-general (N_ "To")))))
- (book (gnc:get-current-book)) ;XXX Grab this from elsewhere
- (owner-type (opt-val "__reg" "owner-type"))
+ (book (gnc-get-current-book)) ;XXX Grab this from elsewhere
+ (type (opt-val "__reg" "owner-type"))
(type-str ""))
- (case owner-type
- ((gnc-owner-customer)
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
(set! type-str (N_ "Customer")))
- ((gnc-owner-vendor)
+ ((eqv? type GNC-OWNER-VENDOR)
(set! type-str (N_ "Vendor")))
- ((gnc-owner-employee)
+ ((eqv? type GNC-OWNER-EMPLOYEE)
(set! type-str (N_ "Employee"))))
(gnc:html-document-set-title!
document (string-append (_ type-str) " " (_ "Report")))
- (if (gnc:owner-is-valid? owner)
+ (if (gncOwnerIsValid owner)
(begin
(setup-query query owner account end-date)
(gnc:html-document-set-title!
document
- (string-append (_ type-str ) " " (_ "Report:") " " (gnc:owner-get-name owner)))
+ (string-append (_ type-str ) " " (_ "Report:") " " (gncOwnerGetName owner)))
(gnc:html-document-set-headline!
document (gnc:html-markup
@@ -570,7 +573,7 @@
" " (_ "Report:") " "
(gnc:html-markup-anchor
(gnc:owner-anchor-text owner)
- (gnc:owner-get-name owner))))
+ (gncOwnerGetName owner))))
(if account
(begin
@@ -603,9 +606,9 @@
(string-append
(_ "Date Range")
": "
- (gnc:print-date start-date)
+ (gnc-print-date start-date)
" - "
- (gnc:print-date end-date))))
+ (gnc-print-date end-date))))
(make-break! document)
@@ -619,45 +622,43 @@
(_ "No valid %s selected. Click on the Options button to select a company.")
(_ type-str))))) ;; FIXME because of translations: Please change this string into full sentences instead of sprintf, because in non-english languages the "no valid" has different forms depending on the grammatical gender of the "%s".
- (gnc:free-query query)
+ (qof-query-destroy query)
document))
(define (find-first-account type)
(define (find-first group num index)
(if (>= index num)
- #f
- (let* ((this-account (gnc:group-get-account group index))
- (account-type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type this-account) #f)))
+ '()
+ (let* ((this-account (xaccGroupGetAccount group index))
+ (account-type (xaccAccountGetType this-account)))
(if (eq? account-type type)
this-account
(find-first group num (+ index 1))))))
- (let* ((current-group (gnc:get-current-group))
- (num-accounts (gnc:group-get-num-accounts
+ (let* ((current-group (gnc-get-current-group))
+ (num-accounts (xaccGroupGetNumAccounts
current-group)))
(if (> num-accounts 0)
(find-first current-group num-accounts 0)
- #f)))
+ '())))
(define (find-first-account-for-owner owner)
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type (gnc:owner-get-end-owner owner)) #f)))
- (case type
- ((gnc-owner-customer)
- (find-first-account 'receivable))
+ (let ((type (gncOwnerGetType (gncOwnerGetEndOwner owner))))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
+ (find-first-account ACCT-TYPE-RECEIVABLE))
- ((gnc-owner-vendor)
- (find-first-account 'payable))
+ ((eqv? type GNC-OWNER-VENDOR)
+ (find-first-account ACCT-TYPE-PAYABLE))
- ((gnc-owner-employee)
- (find-first-account 'payable))
+ ((eqv? type GNC-OWNER-EMPLOYEE)
+ (find-first-account ACCT-TYPE-PAYABLE))
- ((gnc-owner-job)
- (find-first-account-for-owner (gnc:owner-get-end-owner owner)))
+ ((eqv? type GNC-OWNER-JOB)
+ (find-first-account-for-owner (gncOwnerGetEndOwner owner)))
(else
- #f))))
+ '()))))
(gnc:define-report
'version 1
@@ -693,16 +694,15 @@
(gnc:make-report report-name options)))
(define (owner-report-create owner account)
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type (gnc:owner-get-end-owner owner)) #f)))
- (case type
- ((gnc-owner-customer)
+ (let ((type (gncOwnerGetType (gncOwnerGetEndOwner owner))))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
(owner-report-create-internal (N_ "Customer Report") owner account))
- ((gnc-owner-vendor)
+ ((eqv? type GNC-OWNER-VENDOR)
(owner-report-create-internal (N_ "Vendor Report") owner account))
- ((gnc-owner-employee)
+ ((eqv? type GNC-OWNER-EMPLOYEE)
(owner-report-create-internal (N_ "Employee Report") owner account))
(else #f))))
@@ -718,20 +718,20 @@
account split query journal? double? title
debit-string credit-string)
- (let* ((temp-owner (gnc:owner-create))
+ (let* ((temp-owner (gncOwnerCreate))
(owner (gnc:owner-from-split split temp-owner))
(res #f))
(if owner
(set! res (gnc:owner-report-create owner account)))
- (gnc:owner-destroy temp-owner)
+ (gncOwnerDestroy temp-owner)
res))
-(gnc:register-report-hook 'receivable #t
+(gnc:register-report-hook ACCT-TYPE-RECEIVABLE #t
gnc:owner-report-create-internal)
-(gnc:register-report-hook 'payable #t
+(gnc:register-report-hook ACCT-TYPE-PAYABLE #t
gnc:owner-report-create-internal)
(export gnc:owner-report-create)
Modified: gnucash/trunk/src/business/business-reports/payables.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/payables.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-reports/payables.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -49,7 +49,7 @@
(gnc:make-account-sel-limited-option
acc-page this-acc
(N_ "The payable account you wish to examine") "zz"
- #f #f '(payable)))
+ #f #f (list ACCT-TYPE-PAYABLE)))
(aging-options-generator options)))
@@ -83,5 +83,5 @@
debit-string credit-string)
(payables-report-create-internal account))
-(gnc:register-report-hook 'payable #f
+(gnc:register-report-hook ACCT-TYPE-PAYABLE #f
gnc:payables-report-create-internal)
Modified: gnucash/trunk/src/business/business-reports/receivables.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/receivables.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-reports/receivables.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -49,7 +49,7 @@
(gnc:make-account-sel-limited-option
acc-page this-acc
(N_ "The receivables account you wish to examine") "w"
- #f #f '(receivable)))
+ #f #f (list ACCT-TYPE-RECEIVABLE)))
(aging-options-generator options)))
@@ -84,5 +84,5 @@
debit-string credit-string)
(receivables-report-create-internal account))
-(gnc:register-report-hook 'receivable #f
+(gnc:register-report-hook ACCT-TYPE-RECEIVABLE #f
gnc:receivables-report-create-internal)
Modified: gnucash/trunk/src/business/business-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/business/business-utils/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-utils/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -6,7 +6,6 @@
-I${top_srcdir}/src/gnc-module \
-I${top_srcdir}/src/app-utils \
-I${top_srcdir}/src/business/business-core \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${GLIB_CFLAGS} \
${QOF_CFLAGS} \
@@ -22,7 +21,6 @@
libgncmod_business_utils_la_LIBADD = \
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/app-utils/libgncmod-app-utils.la \
- ${G_WRAP_LINK_ARGS} \
${GUILE_LIBS} \
${GLIB_LIBS} \
${QOF_LIBS} \
Modified: gnucash/trunk/src/business/business-utils/business-options.c
===================================================================
--- gnucash/trunk/src/business/business-utils/business-options.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-utils/business-options.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -25,11 +25,11 @@
#include "config.h"
#include "business-options.h"
+#include "swig-runtime.h"
-#include <g-wrap-wct.h>
+#define FUNC_NAME __FUNCTION__
-
-#define LOOKUP_OPTION(fcn) { \
+#define LOOKUP_OPTION(fcn) \
GNCOption *option; \
SCM getter; \
SCM value; \
@@ -46,13 +46,9 @@
value = scm_call_0 (getter); \
if (value == SCM_BOOL_F) \
return NULL; \
- \
- if (!gw_wcp_p(value)) \
- scm_misc_error(fcn, "Item is not a gw:wcp.", value); \
- \
- return gw_wcp_get_ptr(value); \
-}
-
+ SWIG_GetModule(NULL); /* Work-around for SWIG bug. */ \
+ if (!SWIG_IsPointer(value)) \
+ scm_misc_error(fcn, "SCM is not a wrapped pointer.", value)
GncTaxTable*
gnc_option_db_lookup_taxtable_option(GNCOptionDB *odb,
@@ -61,6 +57,7 @@
GncTaxTable * default_value)
{
LOOKUP_OPTION("gnc_option_db_lookup_taxtable_option");
+ return SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncTaxTable"), 1, 0);
}
GncInvoice*
@@ -70,6 +67,7 @@
GncInvoice * default_value)
{
LOOKUP_OPTION("gnc_option_db_lookup_invoice_option");
+ return SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncInvoice"), 1, 0);
}
GncCustomer*
@@ -79,6 +77,7 @@
GncCustomer * default_value)
{
LOOKUP_OPTION("gnc_option_db_lookup_customer_option");
+ return SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncCustomer"), 1, 0);
}
GncVendor*
@@ -88,4 +87,5 @@
GncVendor * default_value)
{
LOOKUP_OPTION("gnc_option_db_lookup_vendor_option");
+ return SWIG_MustGetPtr(value, SWIG_TypeQuery("_p__gncVendor"), 1, 0);
}
Modified: gnucash/trunk/src/business/business-utils/business-options.scm
===================================================================
--- gnucash/trunk/src/business/business-utils/business-options.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-utils/business-options.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -24,6 +24,8 @@
;; invoice pointers may be used to set the value of the option. The
;; option always returns a single invoice pointer.
+(use-modules (gnucash main))
+
(define (gnc:make-invoice-option
section
name
@@ -35,11 +37,11 @@
(define (convert-to-guid item)
(if (string? item)
item
- (gnc:invoice-get-guid item)))
+ (gncInvoiceReturnGUID item)))
(define (convert-to-invoice item)
(if (string? item)
- (gnc:invoice-lookup item (gnc:get-current-book))
+ (gncInvoiceLookupFlip item (gnc-get-current-book))
item))
(let* ((option (convert-to-guid (default-getter)))
@@ -71,9 +73,9 @@
(gnc:error "Illegal invoice value set"))))
(lambda () (convert-to-invoice (default-getter)))
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f option p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f option p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(begin
(set! option v)
@@ -96,11 +98,11 @@
(define (convert-to-guid item)
(if (string? item)
item
- (gnc:customer-get-guid item)))
+ (gncCustomerReturnGUID item)))
(define (convert-to-customer item)
(if (string? item)
- (gnc:customer-lookup item (gnc:get-current-book))
+ (gncCustomerLookupFlip item (gnc-get-current-book))
item))
(let* ((option (convert-to-guid (default-getter)))
@@ -132,9 +134,9 @@
(gnc:error "Illegal customer value set"))))
(lambda () (convert-to-customer (default-getter)))
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f option p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f option p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(begin
(set! option v)
@@ -157,11 +159,11 @@
(define (convert-to-guid item)
(if (string? item)
item
- (gnc:vendor-get-guid item)))
+ (gncVendorReturnGUID item)))
(define (convert-to-vendor item)
(if (string? item)
- (gnc:vendor-lookup item (gnc:get-current-book))
+ (gncVendorLookupFlip item (gnc-get-current-book))
item))
(let* ((option (convert-to-guid (default-getter)))
@@ -193,9 +195,9 @@
(gnc:error "Illegal vendor value set"))))
(lambda () (convert-to-vendor (default-getter)))
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f option p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f option p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(begin
(set! option v)
@@ -218,11 +220,11 @@
(define (convert-to-guid item)
(if (string? item)
item
- (gnc:employee-get-guid item)))
+ (gncEmployeeReturnGUID item)))
(define (convert-to-employee item)
(if (string? item)
- (gnc:employee-lookup item (gnc:get-current-book))
+ (gncEmployeeLookupFlip item (gnc-get-current-book))
item))
(let* ((option (convert-to-guid (default-getter)))
@@ -254,9 +256,9 @@
(gnc:error "Illegal employee value set"))))
(lambda () (convert-to-employee (default-getter)))
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f option p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f option p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(begin
(set! option v)
@@ -277,44 +279,43 @@
value-validator
owner-type)
- (let ((option-value (gnc:owner-create)))
+ (let ((option-value (gncOwnerCreate)))
(define (convert-to-pair item)
(if (pair? item)
item
- (cons (gw:enum-<gnc:GncOwnerType>-val->sym
- (gnc:owner-get-type item) #f)
- (gnc:owner-get-guid item))))
+ (cons (gncOwnerGetType item)
+ (gncOwnerReturnGUID item))))
(define (convert-to-owner pair)
(if (pair? pair)
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym (car pair) #f)))
- (case type
- ((gnc-owner-customer)
- (gnc:owner-init-customer
+ (let ((type (car pair)))
+ (cond
+ ((eqv? type GNC-OWNER-CUSTOMER)
+ (gncOwnerInitCustomer
option-value
- (gnc:customer-lookup (cdr pair) (gnc:get-current-book)))
+ (gncCustomerLookupFlip (cdr pair) (gnc-get-current-book)))
option-value)
- ((gnc-owner-vendor)
- (gnc:owner-init-vendor
+ ((eqv? type GNC-OWNER-VENDOR)
+ (gncOwnerInitVendor
option-value
- (gnc:vendor-lookup (cdr pair) (gnc:get-current-book)))
+ (gncVendorLookupFlip (cdr pair) (gnc-get-current-book)))
option-value)
- ((gnc-owner-employee)
- (gnc:owner-init-employee
+ ((eqv? type GNC-OWNER-EMPLOYEE)
+ (gncOwnerInitEmployee
option-value
- (gnc:employee-lookup (cdr pair) (gnc:get-current-book)))
+ (gncEmployeeLookupFlip (cdr pair) (gnc-get-current-book)))
option-value)
- ((gnc-owner-job)
- (gnc:owner-init-job
+ ((eqv? type GNC-OWNER-JOB)
+ (gncOwnerInitJob
option-value
- (gnc:job-lookup (cdr pair) (gnc:get-current-book)))
+ (gncJobLookupFlip (cdr pair) (gnc-get-current-book)))
option-value)
- (else #f)))
+ (else '())))
pair))
(let* ((option (convert-to-pair (default-getter)))
@@ -330,10 +331,9 @@
(validator
(if (not value-validator)
(lambda (owner)
- (let ((type (gw:enum-<gnc:GncOwnerType>-val->sym
- (if (pair? owner)
- (car owner)
- (gnc:owner-get-type owner)) #f)))
+ (let ((type (if (pair? owner)
+ (car owner)
+ (gncOwnerGetType owner))))
(if (equal? type owner-type)
(list #t owner)
(list #f "Owner-Type Mismatch"))))
@@ -356,13 +356,13 @@
(lambda () (convert-to-owner (default-getter)))
(gnc:restore-form-generator value->string)
(lambda (f p)
- (gnc:kvp-frame-set-slot-path f (symbol->string (car option))
+ (kvp-frame-set-slot-path-gslist f (symbol->string (car option))
(append p '("type")))
- (gnc:kvp-frame-set-slot-path f (cdr option)
+ (kvp-frame-set-slot-path-gslist f (cdr option)
(append p '("value"))))
(lambda (f p)
- (let ((t (gnc:kvp-frame-get-slot-path f (append p '("type"))))
- (v (gnc:kvp-frame-get-slot-path f (append p '("value")))))
+ (let ((t (kvp-frame-get-slot-path-gslist f (append p '("type"))))
+ (v (kvp-frame-get-slot-path-gslist f (append p '("value")))))
(if (and t v (string? t) (string? v))
(begin
(set! option (cons (string->symbol t) v))
@@ -386,11 +386,11 @@
(define (convert-to-guid item)
(if (string? item)
item
- (gnc:taxtable-get-guid item)))
+ (gncTaxTableReturnGUID item)))
(define (convert-to-taxtable item)
(if (string? item)
- (gnc:taxtable-lookup item (gnc:get-current-book))
+ (gncTaxTableLookupFlip item (gnc-get-current-book))
item))
(let* ((option (convert-to-guid (default-getter)))
@@ -422,9 +422,9 @@
(gnc:error "Illegal taxtable value set"))))
(lambda () (convert-to-taxtable (default-getter)))
(gnc:restore-form-generator value->string)
- (lambda (f p) (gnc:kvp-frame-set-slot-path f option p))
+ (lambda (f p) (kvp-frame-set-slot-path-gslist f option p))
(lambda (f p)
- (let ((v (gnc:kvp-frame-get-slot-path f p)))
+ (let ((v (kvp-frame-get-slot-path-gslist f p)))
(if (and v (string? v))
(begin
(set! option v)
Modified: gnucash/trunk/src/business/business-utils/business-prefs.scm
===================================================================
--- gnucash/trunk/src/business/business-utils/business-prefs.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/business-utils/business-prefs.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -68,13 +68,13 @@
(gnc:make-taxtable-option
gnc:*business-label* (N_ "Default Customer TaxTable")
"e" (N_ "The default tax table to apply to customers.")
- (lambda () #f) #f))
+ (lambda () '()) #f))
(reg-option
(gnc:make-taxtable-option
gnc:*business-label* (N_ "Default Vendor TaxTable")
"f" (N_ "The default tax table to apply to vendors.")
- (lambda () #f) #f))
+ (lambda () '()) #f))
(reg-option
(gnc:make-dateformat-option
@@ -83,4 +83,4 @@
#f))
)
-(gnc:register-kvp-option-generator gnc:id-book book-options-generator)
+(gnc-register-kvp-option-generator QOF-ID-BOOK-SCM book-options-generator)
Property changes on: gnucash/trunk/src/business/dialog-tax-table
___________________________________________________________________
Name: svn:ignore
- *.gladep
*.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
gw-dialog-tax-table.c
gw-dialog-tax-table.h
gw-dialog-tax-table.html
gw-dialog-tax-table.scm
g-wrapped
gnucash
semantic.cache
TAGS
+ *.gladep
*.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
swig-dialog-tax-table.c
gw-dialog-tax-table.c
gw-dialog-tax-table.h
gw-dialog-tax-table.html
gw-dialog-tax-table.scm
g-wrapped
gnucash
semantic.cache
TAGS
Modified: gnucash/trunk/src/business/dialog-tax-table/Makefile.am
===================================================================
--- gnucash/trunk/src/business/dialog-tax-table/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/dialog-tax-table/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,6 +1,6 @@
PWD := $(shell pwd)
-pkglib_LTLIBRARIES = libgncmod-dialog-tax-table.la libgw-dialog-tax-table.la
+pkglib_LTLIBRARIES = libgncmod-dialog-tax-table.la
AM_CFLAGS = \
-I${top_srcdir}/src \
@@ -17,10 +17,10 @@
${GDK_PIXBUF_CFLAGS} \
${GLIB_CFLAGS} \
${QOF_CFLAGS} \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS}
libgncmod_dialog_tax_table_la_SOURCES = \
+ swig-dialog-tax-table.c \
gncmod-dialog-tax-table.c \
dialog-tax-table.c
@@ -36,23 +36,15 @@
${GLADE_LIBS} \
${GUILE_LIBS} \
${GNOME_LIBS} \
- ${G_WRAP_LINK_ARGS} \
${GLIB_LIBS} \
${QOF_LIBS} \
${EFENCE_LIBS}
-nodist_libgw_dialog_tax_table_la_SOURCES = gw-dialog-tax-table.c
+if BUILDING_FROM_SVN
+swig-dialog-tax-table.c: dialog-tax-table.i ${noinst_HEADERS}
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
+endif
-libgw_dialog_tax_table_la_LIBADD = \
- libgncmod-dialog-tax-table.la \
- ${G_WRAP_LINK_ARGS}
-
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = \
- gw-dialog-tax-table-spec.scm
-nodist_gwmod_DATA = \
- gw-dialog-tax-table.scm
-
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = dialog-tax-table.scm
@@ -60,21 +52,19 @@
glade_DATA = tax-tables.glade
EXTRA_DIST = \
+ dialog-tax-table.i \
${glade_DATA} \
- ${gwmod_DATA} \
${gncmod_DATA}
if GNUCASH_SEPARATE_BUILDDIR
#Only needed when srcdir and builddir are different
-# for compline
-SCM_FILE_LINKS = gw-dialog-tax-table-spec.scm
# for running
-SCM_FILE_LINKS += ${gncmod_DATA}
+SCM_FILE_LINKS = ${gncmod_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
@@ -83,29 +73,6 @@
( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-dialog-tax-table.scm gw-dialog-tax-table.c gw-dialog-tax-table.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-dialog-tax-table-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (set! %load-path (cons \"../business-core\" %load-path)) \
- (set! %load-path (cons \"../../engine\" %load-path)) \
- (set! %load-path (cons \"../../app-utils\" %load-path)) \
- (set! %load-path (cons \"../../gnome-utils\" %load-path)) \
- (primitive-load \"./gw-dialog-tax-table-spec.scm\") \
- (gw:generate-wrapset \"gw-dialog-tax-table\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-dialog-tax-table.scm gw-dialog-tax-table.c \
- gw-dialog-tax-table.h
-CLEANFILES = $(BUILT_SOURCES) .scm-links \
- ${SCM_FILE_LINKS} gw-dialog-tax-table.html
+noinst_DATA = .scm-links
+CLEANFILES = gnucash .scm-links ${SCM_FILE_LINKS}
+MAINTAINERCLEANFILES = swig-dialog-tax-table.c
Copied: gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.i (from rev 15023, gnucash/branches/swig-redo/src/business/dialog-tax-table/dialog-tax-table.i)
Modified: gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.scm
===================================================================
--- gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,2 +1 @@
(define-module (gnucash dialog-tax-table))
-(use-modules (g-wrapped gw-dialog-tax-table))
Modified: gnucash/trunk/src/business/dialog-tax-table/gncmod-dialog-tax-table.c
===================================================================
--- gnucash/trunk/src/business/dialog-tax-table/gncmod-dialog-tax-table.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/dialog-tax-table/gncmod-dialog-tax-table.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -29,8 +29,8 @@
#include "gnc-module.h"
#include "gnc-module-api.h"
-#include "gw-dialog-tax-table.h"
+extern SCM scm_init_sw_dialog_tax_table_module(void);
/* version of the gnc module system interface we require */
int libgncmod_dialog_tax_table_LTX_gnc_module_system_interface = 0;
@@ -73,8 +73,8 @@
return FALSE;
}
- scm_c_eval_string("(use-modules (g-wrapped gw-dialog-tax-table))");
- // scm_c_eval_string("(use-modules (gnucash dialog-tax-table))");
+ scm_init_sw_dialog_tax_table_module();
+ scm_c_eval_string("(use-modules (sw_dialog_tax_table))");
return TRUE;
}
Deleted: gnucash/trunk/src/business/dialog-tax-table/gw-dialog-tax-table-spec.scm
===================================================================
--- gnucash/trunk/src/business/dialog-tax-table/gw-dialog-tax-table-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/business/dialog-tax-table/gw-dialog-tax-table-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,57 +0,0 @@
-;;; -*-scheme-*-
-
-;(debug-enable 'backtrace)
-;(debug-enable 'debug)
-;(read-enable 'positions)
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(define-module (g-wrapped gw-dialog-tax-table-spec)
- :use-module (g-wrap))
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-
-(use-modules (g-wrapped gw-business-core-spec))
-(use-modules (g-wrapped gw-gnome-utils-spec))
-
-(let ((ws (gw:new-wrapset "gw-dialog-tax-table")))
-
- (gw:wrapset-depends-on ws "gw-standard")
-
- (gw:wrapset-depends-on ws "gw-business-core")
- (gw:wrapset-depends-on ws "gw-engine")
- (gw:wrapset-depends-on ws "gw-gnome-utils")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-dialog-tax-table))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <dialog-tax-table.h>\n"
- )))
-
- (gw:wrapset-add-cs-initializers!
- ws
- (lambda (wrapset client-wrapset status-var)
- (if client-wrapset
- '()
- (gw:inline-scheme '(use-modules (gnucash dialog-tax-table))))))
-
- ;;
- ;; dialog-tax-table.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:tax-table-new
- '<gw:void>
- "gnc_ui_tax_table_window_new"
- '((<gnc:Book*> book))
- "Dialog: Edit the Tax Tables.")
-)
Property changes on: gnucash/trunk/src/core-utils
___________________________________________________________________
Name: svn:ignore
- *.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
gw-core-utils.c
gw-core-utils.h
gw-core-utils.html
gw-core-utils.scm
gnucash
g-wrapped
semantic.cache
TAGS
+ *.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
swig-core-utils.c
gw-core-utils.c
gw-core-utils.h
gw-core-utils.html
gw-core-utils.scm
gnucash
g-wrapped
semantic.cache
TAGS
Modified: gnucash/trunk/src/core-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/core-utils/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/core-utils/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,4 +1,4 @@
-lib_LTLIBRARIES = libcore-utils.la libgw-core-utils.la
+lib_LTLIBRARIES = libcore-utils.la
libcore_utils_la_SOURCES = \
gnc-main.c \
@@ -7,6 +7,7 @@
gnc-gkeyfile-utils.c \
gnc-glib-utils.c \
gnc-gobject-utils.c \
+ swig-core-utils.c \
gnc-gtk-utils.c
libcore_utils_la_LIBADD = \
@@ -14,15 +15,6 @@
${GCONF_LIBS} \
${GTK_LIBS}
-nodist_libgw_core_utils_la_SOURCES = \
- gw-core-utils.c
-
-libgw_core_utils_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
-libgw_core_utils_la_LIBADD = \
- libcore-utils.la \
- ${GLIB_LIBS} \
- ${GUILE_LIBS}
-
noinst_HEADERS = \
gnc-main.h \
gnc-gconf-utils.h \
@@ -32,51 +24,38 @@
gnc-gobject-utils.h \
gnc-gtk-utils.h
-EXTRA_DIST = ${gwmod_DATA}
+if BUILDING_FROM_SVN
+swig-core-utils.c: core-utils.i
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
+endif
AM_CFLAGS = \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${GLIB_CFLAGS} \
${GCONF_CFLAGS} \
${GTK_CFLAGS}
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-core-utils-spec.scm
-nodist_gwmod_DATA = gw-core-utils.scm
+gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
+gncmod_DATA = core-utils.scm
if GNUCASH_SEPARATE_BUILDDIR
#Only needed when srcdir and builddir are different
-SCM_FILE_LINKS = gw-core-utils-spec.scm
+#for running
+SCM_FILE_LINKS = ${gncmod_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
done
endif
+ ( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-core-utils.scm gw-core-utils.h gw-core-utils.c gw-core-utils.html: \
- gwrap-files
-
-gwrap-files: \
- gw-core-utils-spec.scm .scm-links ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (primitive-load \"./gw-core-utils-spec.scm\") \
- (gw:generate-wrapset \"gw-core-utils\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-core-utils.scm gw-core-utils.h gw-core-utils.c
-CLEANFILES = $(BUILT_SOURCES) .scm-links \
- ${SCM_FILE_LINKS} gw-core-utils.html
+noinst_DATA = .scm-links
+EXTRA_DIST = $(gncmod_DATA) core-utils.i
+CLEANFILES = gnucash .scm-links
+MAINTAINERCLEANFILES = swig-core-utils.c
Copied: gnucash/trunk/src/core-utils/core-utils.i (from rev 15023, gnucash/branches/swig-redo/src/core-utils/core-utils.i)
Copied: gnucash/trunk/src/core-utils/core-utils.scm (from rev 15023, gnucash/branches/swig-redo/src/core-utils/core-utils.scm)
Modified: gnucash/trunk/src/core-utils/gnc-main.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-main.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/core-utils/gnc-main.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -24,11 +24,11 @@
#include "config.h"
#include "gnc-main.h"
-static char *namespace_regexp = NULL;
-static int is_debugging;
+static gchar *namespace_regexp = NULL;
+static gboolean is_debugging;
void
-gnc_main_set_namespace_regexp(const char *str)
+gnc_main_set_namespace_regexp(const gchar *str)
{
if (namespace_regexp)
g_free(namespace_regexp);
@@ -37,20 +37,20 @@
namespace_regexp = g_strdup(str);
}
-const char *
+const gchar *
gnc_main_get_namespace_regexp(void)
{
return namespace_regexp;
}
-int
+gboolean
gnc_is_debugging(void)
{
return is_debugging;
}
void
-gnc_set_debugging(int d)
+gnc_set_debugging(gboolean d)
{
is_debugging = d;
}
Modified: gnucash/trunk/src/core-utils/gnc-main.h
===================================================================
--- gnucash/trunk/src/core-utils/gnc-main.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/core-utils/gnc-main.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -26,10 +26,10 @@
#include <glib.h>
-void gnc_main_set_namespace_regexp(const char *str);
-const char *gnc_main_get_namespace_regexp(void);
+void gnc_main_set_namespace_regexp(const gchar *str);
+const gchar *gnc_main_get_namespace_regexp(void);
-int gnc_is_debugging(void);
-void gnc_set_debugging(int d);
+gboolean gnc_is_debugging(void);
+void gnc_set_debugging(gboolean d);
#endif /* GNC_MAIN_H */
Deleted: gnucash/trunk/src/core-utils/gw-core-utils-spec.scm
===================================================================
--- gnucash/trunk/src/core-utils/gw-core-utils-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/core-utils/gw-core-utils-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,64 +0,0 @@
-;;; -*-scheme-*-
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(define-module (g-wrapped gw-core-utils-spec))
-
-(use-modules (g-wrap))
-(use-modules (g-wrap simple-type))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(let ((ws (gw:new-wrapset "gw-core-utils")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
- (gw:wrapset-depends-on ws "gw-glib")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-core-utils))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <gnc-gconf-utils.h>\n"
- "#include <gnc-glib-utils.h>\n"
- "#include <gnc-main.h>\n")))
-
- (gw:wrap-function
- ws
- 'gnc:gconf-get-bool
- '<gw:bool>
- "gnc_gconf_get_bool_no_error"
- '(((<gw:mchars> caller-owned) section)
- ((<gw:mchars> caller-owned) name))
- "Get a boolean value from gconf.")
-
- (gw:wrap-function
- ws
- 'gnc:debugging?
- '<gw:bool>
- "gnc_is_debugging"
- '()
- "Is debugging mode on?")
-
- (gw:wrap-function
- ws
- 'g:find-program-in-path
- '(<gw:mchars> callee-owned const)
- "g_find_program_in_path"
- '(((<gw:mchars> caller-owned) program))
- "Get a boolean value from gconf.")
-
- (gw:wrap-function
- ws
- 'gnc:utf8-strip-invalid
- '<gw:void>
- "gnc_utf8_strip_invalid"
- '(((<gw:mchars> caller-owned) program))
- "Strip string of non-utf8 characters.")
-
-)
Property changes on: gnucash/trunk/src/engine
___________________________________________________________________
Name: svn:ignore
- *.lo
*.la
.deps
.libs
.scm-links
Makefile
Makefile.in
gw-engine.scm
gw-engine.c
gw-engine.h
gw-engine.html
gw-glib.scm
gw-glib.c
gw-glib.h
gw-glib.html
gw-kvp.scm
gw-kvp.c
gw-kvp.h
gw-kvp.html
iso-4217-currencies.c
test-link
.DS_Store
qofla-dir.h
gncla-dir.h
g-wrapped
gnucash
semantic.cache
TAGS
+ *.lo
*.la
.deps
.libs
.scm-links
Makefile
Makefile.in
swig-engine.c
gw-engine.scm
gw-engine.c
gw-engine.h
gw-engine.html
gw-glib.scm
gw-glib.c
gw-glib.h
gw-glib.html
gw-kvp.scm
gw-kvp.c
gw-kvp.h
gw-kvp.html
iso-4217-currencies.c
test-link
.DS_Store
qofla-dir.h
gncla-dir.h
g-wrapped
gnucash
semantic.cache
TAGS
Modified: gnucash/trunk/src/engine/Account.h
===================================================================
--- gnucash/trunk/src/engine/Account.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/Account.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -561,10 +561,6 @@
* in accfrom to accto. */
void xaccAccountMoveAllSplits (Account *accfrom, Account *accto);
-/** \warning Unimplemented */
-gpointer xaccAccountForEachSplit(Account *account, SplitCallback,
- gpointer data);
-
/** The xaccAccountForEachTransaction() routine will traverse all of
the transactions in the given 'account' and call the callback
function 'proc' on each transaction. Processing will continue
Modified: gnucash/trunk/src/engine/Group.c
===================================================================
--- gnucash/trunk/src/engine/Group.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/Group.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -470,7 +470,7 @@
return grp->accounts;
}
-GList *
+AccountList *
xaccGroupGetAccountListSorted (const AccountGroup *grp)
{
if (!grp) return NULL;
Modified: gnucash/trunk/src/engine/Group.h
===================================================================
--- gnucash/trunk/src/engine/Group.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/Group.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -215,7 +215,7 @@
* immediate children of the account group. The returned list
* should be freed with g_list_free() when no longer needed.
*/
-GList * xaccGroupGetAccountListSorted (const AccountGroup *grp);
+AccountList * xaccGroupGetAccountListSorted (const AccountGroup *grp);
/** The xaccGroupGetRoot() subroutine will find the topmost
* (root) group to which this group belongs.
Modified: gnucash/trunk/src/engine/Makefile.am
===================================================================
--- gnucash/trunk/src/engine/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,7 +1,7 @@
SUBDIRS = . test-core test
PWD := $(shell pwd)
-pkglib_LTLIBRARIES = libgncmod-engine.la libgw-engine.la libgw-kvp.la
+pkglib_LTLIBRARIES = libgncmod-engine.la
AM_CFLAGS = \
-I${top_srcdir}/lib/libc \
@@ -43,6 +43,10 @@
gnc-session.c \
gnc-session-scm.c \
gncmod-engine.c \
+ swig-engine.c \
+ kvp-scm.c \
+ engine-helpers.c \
+ glib-helpers.c \
policy.c
EXTRA_libgncmod_engine_la_SOURCES = iso-4217-currencies.c
@@ -111,32 +115,13 @@
libgncmod_engine_la_LIBADD = \
../gnc-module/libgncmodule.la \
../core-utils/libcore-utils.la \
- ${G_WRAP_LINK_ARGS} \
+ ${GUILE_LIBS} \
${QOF_LIBS} \
${REGEX_LIBS} \
${GNUCASH_ENGINE_BASE_LIBS} \
${BINRELOC_LIBS} \
${top_builddir}/lib/libc/libc-missing.la
-libgw_kvp_la_SOURCES = kvp-scm.c
-nodist_libgw_kvp_la_SOURCES = gw-kvp.c
-libgw_kvp_la_LDFLAGS = \
- ${G_WRAP_LINK_ARGS} \
- ${QOF_LIBS} \
- ${GLIB_LIBS}
-libgw_kvp_la_LIBADD = \
- libgncmod-engine.la \
- libgw-engine.la
-
-libgw_engine_la_SOURCES = engine-helpers.c glib-helpers.c
-nodist_libgw_engine_la_SOURCES = gw-engine.c
-libgw_engine_la_LDFLAGS = \
- ${G_WRAP_LINK_ARGS} \
- ${QOF_LIBS} \
- ${GLIB_LIBS}
-libgw_engine_la_LIBADD = \
- libgncmod-engine.la
-
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = engine.scm
@@ -147,14 +132,6 @@
engine-utilities.scm \
gnc-numeric.scm
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = \
- gw-engine-spec.scm \
- gw-kvp-spec.scm
-nodist_gwmod_DATA = \
- gw-engine.scm \
- gw-kvp.scm
-
EXTRA_DIST = \
README.query-api \
design.txt \
@@ -164,13 +141,13 @@
gncla-dir.h.in \
kvp_doc.txt \
SX-book-p.h \
+ engine.i \
${gncmod_DATA} \
- ${gncscm_DATA} \
- ${gwmod_DATA}
+ ${gncscm_DATA}
if GNUCASH_SEPARATE_BUILDDIR
#For compiling
-SCM_FILE_LINKS = gw-engine-spec.scm gw-kvp-spec.scm iso-4217-currencies.scm
+SCM_FILE_LINKS = iso-4217-currencies.scm
#For executing test cases
SCM_FILE_LINKS += \
${gncmod_DATA} \
@@ -178,8 +155,8 @@
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
@@ -188,41 +165,18 @@
( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
+noinst_DATA = .scm-links
-.INTERMEDIATE: gwrap-files1 gwrap-files2
+if BUILDING_FROM_SVN
+swig-engine.c: engine.i ${gncinclude_HEADERS} ${noinst_HEADERS}
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module \
+ -I${top_srcdir}/lib/libqof/qof -o $@ $<
+endif
iso-4217-currencies.c: iso-4217-currencies.scm iso-currencies-to-c
-chmod u+x ${srcdir}/iso-currencies-to-c
GUILE_LOAD_PATH=@GNC_SRFI_LOAD_PATH@:${GUILE_LOAD_PATH} srcdir=${srcdir} ${srcdir}/iso-currencies-to-c
-gw-engine.scm gw-engine.c gw-engine.h: \
- gwrap-files1
-
-gwrap-files1: \
- .scm-links gw-engine-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (primitive-load \"./gw-engine-spec.scm\") \
- (gw:generate-wrapset \"gw-engine\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-engine*.scm . )
-
-gw-kvp.scm gw-kvp.c gw-kvp.h: \
- gwrap-files2
-
-gwrap-files2: \
- .scm-links gw-kvp-spec.scm ${top_builddir}/config.status gwrap-files1
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (primitive-load \"./gw-kvp-spec.scm\") \
- (gw:generate-wrapset \"gw-kvp\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-kvp*.scm . )
-
gncla-dir.h: gncla-dir.h.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
@@ -238,8 +192,8 @@
mv $@.tmp $@
BUILT_SOURCES = iso-4217-currencies.c \
- gw-engine.scm gw-engine.c gw-engine.h \
- gw-kvp.scm gw-kvp.c gw-kvp.h gncla-dir.h
+ gncla-dir.h
-CLEANFILES = $(BUILT_SOURCES) .scm-links gncla-dir.h \
- ${SCM_FILE_LINKS} gw-engine.html gw-kvp.html
+CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links gncla-dir.h \
+ ${SCM_FILE_LINKS}
+MAINTAINERCLEANFILES = swig-engine.c
Modified: gnucash/trunk/src/engine/Query.c
===================================================================
--- gnucash/trunk/src/engine/Query.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/Query.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -295,7 +295,8 @@
void
xaccQueryAddStringMatch (Query* q, const char *matchstring,
- int case_sens, int use_regexp, QofQueryOp op,
+ gboolean case_sens, gboolean use_regexp,
+ QofQueryOp op,
const char * path, ...)
{
QofQueryPredData *pred_data;
@@ -353,8 +354,8 @@
void
xaccQueryAddDateMatchTS (Query * q,
- int use_start, Timespec sts,
- int use_end, Timespec ets,
+ gboolean use_start, Timespec sts,
+ gboolean use_end, Timespec ets,
QofQueryOp op)
{
Query *tmp_q = NULL;
@@ -425,8 +426,8 @@
void
xaccQueryAddDateMatch(Query * q,
- int use_start, int sday, int smonth, int syear,
- int use_end, int eday, int emonth, int eyear,
+ gboolean use_start, int sday, int smonth, int syear,
+ gboolean use_end, int eday, int emonth, int eyear,
QofQueryOp op)
{
/* gcc -O3 will auto-inline this function, avoiding a call overhead */
@@ -444,9 +445,9 @@
void
xaccQueryAddDateMatchTT(Query * q,
- int use_start,
+ gboolean use_start,
time_t stt,
- int use_end,
+ gboolean use_end,
time_t ett,
QofQueryOp op)
{
@@ -533,22 +534,6 @@
}
void
-xaccQueryAddGUIDMatchGL (QofQuery *q, GList *param_list,
- GUID guid, QofQueryOp op)
-{
- GSList *params = NULL;
- GList *node;
-
- for (node = param_list; node; node = node->next)
- params = g_slist_prepend (params, node->data);
-
- params = g_slist_reverse (params);
- g_list_free (param_list);
-
- qof_query_add_guid_match (q, params, &guid, op);
-}
-
-void
xaccQueryAddKVPMatch(QofQuery *q, GSList *path, const KvpValue *value,
QofQueryCompare how, QofIdType id_type,
QofQueryOp op)
@@ -626,4 +611,68 @@
return latest;
}
+void
+xaccQueryAddDescriptionMatch(Query *q, const char *m, gboolean c, gboolean r,
+ QofQueryOp o)
+{
+ xaccQueryAddStringMatch ((q), (m), (c), (r), (o), SPLIT_TRANS,
+ TRANS_DESCRIPTION, NULL);
+}
+
+void
+xaccQueryAddNumberMatch(Query *q, const char *m, gboolean c, gboolean r,
+ QofQueryOp o)
+{
+ xaccQueryAddStringMatch ((q), (m), (c), (r), (o), SPLIT_TRANS,
+ TRANS_NUM, NULL);
+}
+
+void
+xaccQueryAddActionMatch(Query *q, const char *m, gboolean c, gboolean r,
+ QofQueryOp o)
+{
+ xaccQueryAddStringMatch ((q), (m), (c), (r), (o), SPLIT_ACTION, NULL);
+}
+
+void
+xaccQueryAddMemoMatch(Query *q, const char *m, gboolean c, gboolean r,
+ QofQueryOp o)
+{
+ xaccQueryAddStringMatch ((q), (m), (c), (r), (o), SPLIT_MEMO, NULL);
+}
+
+void
+xaccQueryAddValueMatch(Query *q, gnc_numeric amt, QofNumericMatch sgn,
+ QofQueryCompare how, QofQueryOp op)
+{
+ xaccQueryAddNumericMatch ((q), (amt), (sgn), (how), (op),
+ SPLIT_VALUE, NULL);
+}
+
+void
+xaccQueryAddSharePriceMatch(Query *q, gnc_numeric amt, QofQueryCompare how,
+ QofQueryOp op)
+{
+ xaccQueryAddNumericMatch ((q), (amt), QOF_NUMERIC_MATCH_ANY, (how), (op),
+ SPLIT_SHARE_PRICE, NULL);
+}
+
+void
+xaccQueryAddSharesMatch(Query *q, gnc_numeric amt, QofQueryCompare how,
+ QofQueryOp op)
+{
+ xaccQueryAddNumericMatch ((q), (amt), QOF_NUMERIC_MATCH_ANY, (how), (op),
+ SPLIT_AMOUNT, NULL);
+}
+
+void
+xaccQueryAddBalanceMatch(Query *q, QofQueryCompare bal, QofQueryOp op)
+{
+ xaccQueryAddNumericMatch(
+ (q), gnc_numeric_zero(), QOF_NUMERIC_MATCH_ANY,
+ ((bal) ? QOF_COMPARE_EQUAL : QOF_COMPARE_NEQ), (op),
+ SPLIT_TRANS, TRANS_IMBALANCE, NULL);
+}
+
+
/* ======================== END OF FILE ======================= */
Modified: gnucash/trunk/src/engine/Query.h
===================================================================
--- gnucash/trunk/src/engine/Query.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/Query.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -124,43 +124,37 @@
void xaccQueryAddSingleAccountMatch(Query *, Account *, QofQueryOp);
void xaccQueryAddStringMatch (Query* q, const char *matchstring,
- int case_sens, int use_regexp, QofQueryOp op,
+ gboolean case_sens, gboolean use_regexp,
+ QofQueryOp op,
const char * path, ...);
+void
+xaccQueryAddDescriptionMatch(Query *q, const char *m, gboolean c, gboolean r,
+ QofQueryOp o);
+void
+xaccQueryAddNumberMatch(Query *q, const char *m, gboolean c, gboolean r,
+ QofQueryOp o);
+void
+xaccQueryAddActionMatch(Query *q, const char *m, gboolean c, gboolean r,
+ QofQueryOp o);
+void
+xaccQueryAddMemoMatch(Query *q, const char *m, gboolean c, gboolean r,
+ QofQueryOp o);
+void
+xaccQueryAddValueMatch(Query *q, gnc_numeric amt, QofNumericMatch sgn,
+ QofQueryCompare how, QofQueryOp op);
+void
+xaccQueryAddSharePriceMatch(Query *q, gnc_numeric amt, QofQueryCompare how,
+ QofQueryOp op);
+void
+xaccQueryAddSharesMatch(Query *q, gnc_numeric amt, QofQueryCompare how,
+ QofQueryOp op);
+void
+xaccQueryAddBalanceMatch(Query *q, QofQueryCompare bal, QofQueryOp op);
-#define xaccQueryAddDescriptionMatch(q,m,c,r,o) \
- xaccQueryAddStringMatch ((q), (m), (c), (r), (o), SPLIT_TRANS, \
- TRANS_DESCRIPTION, NULL)
-#define xaccQueryAddNumberMatch(q,m,c,r,o) \
- xaccQueryAddStringMatch ((q), (m), (c), (r), (o), SPLIT_TRANS, \
- TRANS_NUM, NULL)
-#define xaccQueryAddActionMatch(q,m,c,r,o) \
- xaccQueryAddStringMatch ((q), (m), (c), (r), (o), SPLIT_ACTION, \
- NULL)
-#define xaccQueryAddMemoMatch(q,m,c,r,o) \
- xaccQueryAddStringMatch ((q), (m), (c), (r), (o), SPLIT_MEMO, \
- NULL)
-
void xaccQueryAddNumericMatch (Query *q, gnc_numeric amount,
QofNumericMatch sign, QofQueryCompare how,
QofQueryOp op, const char * path, ...);
-#define xaccQueryAddValueMatch(q,amt,sgn,how,op) \
- xaccQueryAddNumericMatch ((q), (amt), (sgn), (how), (op), \
- SPLIT_VALUE, NULL)
-
-#define xaccQueryAddSharePriceMatch(q,amt,how,op) \
- xaccQueryAddNumericMatch ((q), (amt), QOF_NUMERIC_MATCH_ANY, (how), (op), \
- SPLIT_SHARE_PRICE, NULL)
-
-#define xaccQueryAddSharesMatch(q,amt,how,op) \
- xaccQueryAddNumericMatch ((q), (amt), QOF_NUMERIC_MATCH_ANY, (how), (op), \
- SPLIT_AMOUNT, NULL)
-
-#define xaccQueryAddBalanceMatch(q,bal,op) \
- xaccQueryAddNumericMatch ((q), gnc_numeric_zero(), QOF_NUMERIC_MATCH_ANY, \
- ((bal) ? QOF_COMPARE_EQUAL : QOF_COMPARE_NEQ), (op), \
- SPLIT_TRANS, TRANS_IMBALANCE, NULL)
-
/** The DateMatch queries match transactions whose posted date
* is in a date range. If use_start is TRUE, then a matching
* posted date will be greater than the start date. If
@@ -170,17 +164,17 @@
* all transactions are matched.
*/
-void xaccQueryAddDateMatch(Query * q,
- int use_start, int sday, int smonth, int syear,
- int use_end, int eday, int emonth, int eyear,
+void xaccQueryAddDateMatch(Query * q, gboolean use_start,
+ int sday, int smonth, int syear,
+ gboolean use_end, int eday, int emonth, int eyear,
QofQueryOp op);
void xaccQueryAddDateMatchTS(Query * q,
- int use_start, Timespec sts,
- int use_end, Timespec ets,
+ gboolean use_start, Timespec sts,
+ gboolean use_end, Timespec ets,
QofQueryOp op);
void xaccQueryAddDateMatchTT(Query * q,
- int use_start, time_t stt,
- int use_end, time_t ett,
+ gboolean use_start, time_t stt,
+ gboolean use_end, time_t ett,
QofQueryOp op);
void xaccQueryGetDateMatchTS (Query * q,
Timespec * sts,
@@ -202,8 +196,6 @@
void xaccQueryAddClearedMatch(Query * q, cleared_match_t how, QofQueryOp op);
void xaccQueryAddGUIDMatch(Query * q, const GUID *guid,
QofIdType id_type, QofQueryOp op);
-void xaccQueryAddGUIDMatchGL (QofQuery *q, GList *param_list,
- GUID guid, QofQueryOp op);
/** given kvp value is on right side of comparison */
void xaccQueryAddKVPMatch(Query *q, GSList *path, const KvpValue *value,
Modified: gnucash/trunk/src/engine/Transaction.h
===================================================================
--- gnucash/trunk/src/engine/Transaction.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/Transaction.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -226,10 +226,6 @@
*/
void xaccTransSortSplits (Transaction *trans);
-/** Print the transaction out to the console. Used for debugging.
- */
-void xaccTransDump (Transaction *trans, const char *tag);
-
/** Set the Transaction Type
*
* See #TXN_TYPE_NONE, #TXN_TYPE_INVOICE and #TXN_TYPE_PAYMENT */
Modified: gnucash/trunk/src/engine/engine-helpers.c
===================================================================
--- gnucash/trunk/src/engine/engine-helpers.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/engine-helpers.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,5 +1,5 @@
/********************************************************************\
- * engine-helpers.c -- gnucash g-wrap helper functions *
+ * engine-helpers.c -- gnucash engine helper functions *
* Copyright (C) 2000 Linas Vepstas <linas at linas.org> *
* Copyright (C) 2001 Linux Developers Group, Inc. *
* *
@@ -24,7 +24,7 @@
#include "config.h"
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include <libguile.h>
#include <string.h>
@@ -43,6 +43,8 @@
#include "qofquery-p.h"
#include "qofquerycore-p.h"
+#define FUNC_NAME __FUNCTION__
+
static QofLogModule log_module = GNC_MOD_ENGINE;
Timespec
@@ -197,123 +199,47 @@
gnc_QUERY_v2
} query_version_t;
-static SCM
-gnc_gw_enum_val2scm (const char *typestr, int value)
-{
- char *func_name;
- SCM func;
- SCM scm;
-
- func_name = g_strdup_printf ("gw:enum-%s-val->sym", typestr);
-
- func = scm_c_eval_string (func_name);
- if (SCM_PROCEDUREP (func))
- scm = scm_call_2 (func, scm_int2num (value), SCM_BOOL_F);
- else
- scm = SCM_BOOL_F;
-
- g_free (func_name);
-
- return scm;
-}
-
-static int
-gnc_gw_enum_scm2val (const char *typestr, SCM enum_scm)
-{
- char *func_name;
- SCM func;
- SCM scm;
-
- func_name = g_strdup_printf ("gw:enum-%s-val->int", typestr);
-
- func = scm_c_eval_string (func_name);
- if (SCM_PROCEDUREP (func))
- scm = scm_call_1 (func, enum_scm);
- else
- scm = scm_int2num (0);
-
- g_free (func_name);
-
- return scm_num2int (scm, SCM_ARG1, __FUNCTION__);
-}
-
/* QofCompareFunc */
-static SCM
-gnc_query_compare2scm (QofQueryCompare how)
-{
- return gnc_gw_enum_val2scm ("<gnc:query-compare-how>", how);
-}
-
static QofQueryCompare
gnc_query_scm2compare (SCM how_scm)
{
- return gnc_gw_enum_scm2val ("<gnc:query-compare-how>", how_scm);
+ return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
}
/* QofStringMatch */
-static SCM
-gnc_query_string2scm (QofStringMatch how)
-{
- return gnc_gw_enum_val2scm ("<gnc:string-match-how>", how);
-}
-
static QofStringMatch
gnc_query_scm2string (SCM how_scm)
{
- return gnc_gw_enum_scm2val ("<gnc:string-match-how>", how_scm);
+ return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
}
/* QofDateMatch */
-static SCM
-gnc_query_date2scm (QofDateMatch how)
-{
- return gnc_gw_enum_val2scm ("<gnc:date-match-how>", how);
-}
-
static QofDateMatch
gnc_query_scm2date (SCM how_scm)
{
- return gnc_gw_enum_scm2val ("<gnc:date-match-how>", how_scm);
+ return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
}
/* QofNumericMatch */
-static SCM
-gnc_query_numericop2scm (QofNumericMatch how)
-{
- return gnc_gw_enum_val2scm ("<gnc:numeric-match-how>", how);
-}
-
static QofNumericMatch
gnc_query_scm2numericop (SCM how_scm)
{
- return gnc_gw_enum_scm2val ("<gnc:numeric-match-how>", how_scm);
+ return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
}
/* QofGuidMatch */
-static SCM
-gnc_query_guid2scm (QofGuidMatch how)
-{
- return gnc_gw_enum_val2scm ("<gnc:guid-match-how>", how);
-}
-
static QofGuidMatch
gnc_query_scm2guid (SCM how_scm)
{
- return gnc_gw_enum_scm2val ("<gnc:guid-match-how>", how_scm);
+ return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
}
/* QofCharMatch */
-static SCM
-gnc_query_char2scm (QofCharMatch how)
-{
- return gnc_gw_enum_val2scm ("<gnc:char-match-how>", how);
-}
-
static QofCharMatch
gnc_query_scm2char (SCM how_scm)
{
- return gnc_gw_enum_scm2val ("<gnc:char-match-how>", how_scm);
+ return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
}
static QofGuidMatch
@@ -379,7 +305,7 @@
}
static int
-gnc_scm2bitfield (const char *typestr, SCM field_scm)
+gnc_scm2bitfield (SCM field_scm)
{
int field = 0;
@@ -394,7 +320,7 @@
scm = SCM_CAR (field_scm);
field_scm = SCM_CDR (field_scm);
- bit = gnc_gw_enum_scm2val (typestr, scm);
+ bit = scm_num2int(scm, SCM_ARG2, __FUNCTION__);
field |= bit;
}
@@ -404,7 +330,7 @@
static cleared_match_t
gnc_scm2cleared_match_how (SCM how_scm)
{
- return gnc_scm2bitfield ("<gnc:cleared-match-how>", how_scm);
+ return gnc_scm2bitfield (how_scm);
}
static gboolean
@@ -551,7 +477,7 @@
return scm_reverse (path_scm);
}
-static GSList *
+GSList *
gnc_query_scm2path (SCM path_scm)
{
GSList *path = NULL;
@@ -588,16 +514,10 @@
g_slist_free (path);
}
-static SCM
-gnc_KvpValueTypeype2scm (KvpValueType how)
-{
- return gnc_gw_enum_val2scm ("<gnc:kvp-value-t>", how);
-}
-
static KvpValueType
gnc_scm2KvpValueTypeype (SCM value_type_scm)
{
- return gnc_gw_enum_scm2val ("<gnc:kvp-value-t>", value_type_scm);
+ return scm_num2int(value_type_scm, SCM_ARG1, __FUNCTION__);
}
static SCM gnc_kvp_frame2scm (KvpFrame *frame);
@@ -613,7 +533,7 @@
value_t = kvp_value_get_type (value);
- value_scm = scm_cons (gnc_KvpValueTypeype2scm (value_t), value_scm);
+ value_scm = scm_cons (scm_long2num (value_t), value_scm);
switch (value_t)
{
@@ -862,31 +782,31 @@
pd = qof_query_term_get_pred_data (qt);
qt_scm = scm_cons (scm_str2symbol (pd->type_name), qt_scm);
- qt_scm = scm_cons (gnc_query_compare2scm (pd->how), qt_scm);
+ qt_scm = scm_cons (scm_long2num (pd->how), qt_scm);
if (!safe_strcmp (pd->type_name, QOF_TYPE_STRING)) {
query_string_t pdata = (query_string_t) pd;
- qt_scm = scm_cons (gnc_query_string2scm (pdata->options), qt_scm);
+ qt_scm = scm_cons (scm_long2num (pdata->options), qt_scm);
qt_scm = scm_cons (SCM_BOOL (pdata->is_regex), qt_scm);
qt_scm = scm_cons (scm_makfrom0str (pdata->matchstring), qt_scm);
} else if (!safe_strcmp (pd->type_name, QOF_TYPE_DATE)) {
query_date_t pdata = (query_date_t) pd;
- qt_scm = scm_cons (gnc_query_date2scm (pdata->options), qt_scm);
+ qt_scm = scm_cons (scm_long2num (pdata->options), qt_scm);
qt_scm = scm_cons (gnc_timespec2timepair (pdata->date), qt_scm);
} else if (!safe_strcmp (pd->type_name, QOF_TYPE_NUMERIC)) {
query_numeric_t pdata = (query_numeric_t) pd;
- qt_scm = scm_cons (gnc_query_numericop2scm (pdata->options), qt_scm);
+ qt_scm = scm_cons (scm_long2num (pdata->options), qt_scm);
qt_scm = scm_cons (gnc_query_numeric2scm (pdata->amount), qt_scm);
} else if (!safe_strcmp (pd->type_name, QOF_TYPE_GUID)) {
query_guid_t pdata = (query_guid_t) pd;
- qt_scm = scm_cons (gnc_query_guid2scm (pdata->options), qt_scm);
+ qt_scm = scm_cons (scm_long2num (pdata->options), qt_scm);
qt_scm = scm_cons (gnc_guid_glist2scm (pdata->guids), qt_scm);
} else if (!safe_strcmp (pd->type_name, QOF_TYPE_INT64)) {
@@ -907,7 +827,7 @@
} else if (!safe_strcmp (pd->type_name, QOF_TYPE_CHAR)) {
query_char_t pdata = (query_char_t) pd;
- qt_scm = scm_cons (gnc_query_char2scm (pdata->options), qt_scm);
+ qt_scm = scm_cons (scm_long2num (pdata->options), qt_scm);
qt_scm = scm_cons (scm_makfrom0str (pdata->char_list), qt_scm);
} else if (!safe_strcmp (pd->type_name, QOF_TYPE_KVP)) {
@@ -2066,46 +1986,6 @@
return q;
}
-static int
-gnc_scm_traversal_adapter(Transaction *t, void *data)
-{
- static SCM trans_type = SCM_BOOL_F;
- SCM result;
- SCM scm_trans;
- SCM thunk = *((SCM *) data);
-
- if(trans_type == SCM_BOOL_F) {
- trans_type = scm_c_eval_string("<gnc:Transaction*>");
- /* don't really need this - types are bound globally anyway. */
- if(trans_type != SCM_BOOL_F) scm_gc_protect_object(trans_type);
- }
-
- scm_trans = gw_wcp_assimilate_ptr(t, trans_type);
- result = scm_call_1(thunk, scm_trans);
-
- return (result != SCM_BOOL_F);
-}
-
-gboolean
-gnc_scmGroupStagedTransactionTraversal(AccountGroup *grp,
- unsigned int new_marker,
- SCM thunk)
-{
- return xaccGroupStagedTransactionTraversal(grp, new_marker,
- gnc_scm_traversal_adapter,
- &thunk);
-}
-
-gboolean
-gnc_scmAccountStagedTransactionTraversal(Account *a,
- unsigned int new_marker,
- SCM thunk)
-{
- return xaccAccountStagedTransactionTraversal(a, new_marker,
- gnc_scm_traversal_adapter,
- &thunk);
-}
-
SCM
gnc_gint64_to_scm(const gint64 x)
{
@@ -2265,89 +2145,60 @@
}
}
-/********************************************************************
- * gnc_scm_to_commodity
- ********************************************************************/
-gnc_commodity *
-gnc_scm_to_commodity(SCM scm)
+
+static SCM
+gnc_generic_to_scm(const void *x, const gchar *type_str)
{
- static SCM commodity_type = SCM_UNDEFINED;
+ swig_type_info * stype = NULL;
- if(commodity_type == SCM_UNDEFINED) {
- commodity_type = scm_c_eval_string("<gnc:commodity*>");
- /* don't really need this - types are bound globally anyway. */
- if(commodity_type != SCM_UNDEFINED) scm_gc_protect_object(commodity_type);
- }
+ if (!x) return SCM_BOOL_F;
+ stype = SWIG_TypeQuery(type_str);
- if(!gw_wcp_is_of_type_p(commodity_type, scm)) {
- return NULL;
- }
+ if (!stype) {
+ PERR("Unknown SWIG Type: %s ", type_str);
+ return SCM_BOOL_F;
+ }
- return gw_wcp_get_ptr(scm);
+ return SWIG_NewPointerObj(x, stype, 0);
}
+static void *
+gnc_scm_to_generic(SCM scm, const gchar *type_str)
+{
+ swig_type_info * stype = NULL;
-/********************************************************************
- * gnc_commodity_to_scm
- ********************************************************************/
+ stype = SWIG_TypeQuery(type_str);
+ if (!stype) {
+ PERR("Unknown SWIG Type: %s ", type_str);
+ return NULL;
+ }
+
+ if (!SWIG_IsPointerOfType(scm, stype))
+ return NULL;
+
+ return SWIG_MustGetPtr(scm, stype, 1, 0);
+}
+
+gnc_commodity *
+gnc_scm_to_commodity(SCM scm)
+{
+ return gnc_scm_to_generic(scm, "_p_gnc_commodity");
+}
+
SCM
gnc_commodity_to_scm (const gnc_commodity *commodity)
{
- static SCM commodity_type = SCM_UNDEFINED;
-
- if(commodity == NULL) return SCM_BOOL_F;
-
- if(commodity_type == SCM_UNDEFINED) {
- commodity_type = scm_c_eval_string("<gnc:commodity*>");
- /* don't really need this - types are bound globally anyway. */
- if(commodity_type != SCM_UNDEFINED) scm_gc_protect_object(commodity_type);
- }
-
- return gw_wcp_assimilate_ptr((void *) commodity, commodity_type);
+ return gnc_generic_to_scm(commodity, "_p_gnc_commodity");
}
-/********************************************************************
- * gnc_book_to_scm
- ********************************************************************/
SCM
gnc_book_to_scm (QofBook *book)
{
- static SCM book_type = SCM_UNDEFINED;
-
- if (!book)
- return SCM_BOOL_F;
-
- if (book_type == SCM_UNDEFINED)
- {
- book_type = scm_c_eval_string ("<gnc:Book*>");
-
- /* don't really need this - types are bound globally anyway. */
- if (book_type != SCM_UNDEFINED)
- scm_gc_protect_object (book_type);
- }
-
- return gw_wcp_assimilate_ptr ((void *) book, book_type);
+ return gnc_generic_to_scm(book, "_p_QofBook");
}
-/********************************************************************
- * qof_session_to_scm
- ********************************************************************/
SCM
qof_session_to_scm (QofSession *session)
{
- static SCM session_type = SCM_UNDEFINED;
-
- if (!session)
- return SCM_BOOL_F;
-
- if (session_type == SCM_UNDEFINED)
- {
- session_type = scm_c_eval_string ("<gnc:Session*>");
-
- /* don't really need this - types are bound globally anyway. */
- if (session_type != SCM_UNDEFINED)
- scm_gc_protect_object (session_type);
- }
-
- return gw_wcp_assimilate_ptr ((void *) session, session_type);
+ return gnc_generic_to_scm(session, "_p_QofSession");
}
Modified: gnucash/trunk/src/engine/engine-helpers.h
===================================================================
--- gnucash/trunk/src/engine/engine-helpers.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/engine-helpers.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,5 +1,5 @@
/********************************************************************\
- * engine-helpers.h -- gnucash g-wrap helper functions *
+ * engine-helpers.h -- gnucash engine helper functions *
* Copyright (C) 2000 Linas Vepstas <linas at linas.org> *
* Copyright (C) 2001 Linux Developers Group, Inc. *
* *
@@ -53,21 +53,15 @@
GUID gnc_scm2guid(SCM guid_scm);
int gnc_guid_p(SCM guid_scm);
+/* for a list of strings */
+GSList * gnc_query_scm2path (SCM path_scm);
+
/* These two functions convert a query object into a scheme
* representation of the query and vice-versa. They do not
- * simply convert a query pointer to a g-wrapped query pointer! */
+ * simply convert a query pointer to a guile query pointer! */
SCM gnc_query2scm (Query * q);
Query * gnc_scm2query (SCM query_scm);
-/* See Group.h for info about traversals. */
-
-gboolean gnc_scmGroupStagedTransactionTraversal(AccountGroup *grp,
- unsigned int stage,
- SCM thunk);
-
-gboolean gnc_scmAccountStagedTransactionTraversal(Account *a,
- unsigned int stage,
- SCM thunk);
SCM gnc_gint64_to_scm(const gint64 x);
gint64 gnc_scm_to_gint64(SCM num);
int gnc_gh_gint64_p(SCM num);
Modified: gnucash/trunk/src/engine/engine-interface.scm
===================================================================
--- gnucash/trunk/src/engine/engine-interface.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/engine-interface.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -95,15 +95,15 @@
;; for editing.
(define (gnc:split->split-scm split use-cut-semantics?)
(gnc:make-split-scm
- (gnc:split-get-guid split)
- (gnc:account-get-guid (gnc:split-get-account split))
- (gnc:transaction-get-guid (gnc:split-get-parent split))
- (gnc:split-get-memo split)
- (gnc:split-get-action split)
- (gnc:split-get-reconcile-state split)
- (gnc:split-get-reconciled-date split)
- (gnc:split-get-amount split)
- (gnc:split-get-value split)))
+ (gncSplitGetGUID split)
+ (gncAccountGetGUID (xaccSplitGetAccount split))
+ (gncTransGetGUID (xaccSplitGetParent split))
+ (xaccSplitGetMemo split)
+ (xaccSplitGetAction split)
+ (xaccSplitGetReconcile split)
+ (gnc-split-get-date-reconciled split)
+ (xaccSplitGetAmount split)
+ (xaccSplitGetValue split)))
;; Copy a scheme representation of a split onto a C split.
;; If possible, insert the C split into the account of the
@@ -118,18 +118,18 @@
(action (gnc:split-scm-get-action split-scm))
(amount (gnc:split-scm-get-amount split-scm))
(value (gnc:split-scm-get-value split-scm)))
- (if memo (gnc:split-set-memo split memo))
- (if action (gnc:split-set-action split action))
- (if amount (gnc:split-set-amount split amount))
- (if value (gnc:split-set-value split value)))
- (let ((account (gnc:account-lookup
+ (if memo (xaccSplitSetMemo split memo))
+ (if action (xaccSplitSetAction split action))
+ (if amount (xaccSplitSetAmount split amount))
+ (if value (xaccSplitSetValue split value)))
+ (let ((account (xaccAccountLookup
(gnc:split-scm-get-account-guid split-scm)
book)))
(if account
(begin
- (gnc:account-begin-edit account)
- (gnc:account-insert-split account split)
- (gnc:account-commit-edit account)))))))
+ (xaccAccountBeginEdit account)
+ (xaccSplitSetAccount account split)
+ (xaccAccountCommitEdit account)))))))
;; Defines a scheme representation of a transaction.
(define gnc:transaction-structure
@@ -218,23 +218,23 @@
;; a representation of it as a transaction-structure.
(define (gnc:transaction->transaction-scm trans use-cut-semantics?)
(define (trans-splits i)
- (let ((split (gnc:transaction-get-split trans i)))
+ (let ((split (xaccTransGetSplit trans i)))
(if (not split)
'()
(cons (gnc:split->split-scm split use-cut-semantics?)
(trans-splits (+ i 1))))))
(gnc:make-transaction-scm
- (gnc:transaction-get-guid trans)
- (gnc:transaction-get-currency trans)
- (gnc:transaction-get-date-entered trans)
+ (gncTransGetGUID trans)
+ (xaccTransGetCurrency trans)
+ (gnc-transaction-get-date-entered trans)
(if use-cut-semantics?
- (gnc:transaction-get-date-posted trans)
+ (gnc-transaction-get-date-posted trans)
#f)
(if use-cut-semantics?
- (gnc:transaction-get-num trans)
+ (xaccTransGetNum trans)
#f)
- (gnc:transaction-get-description trans)
- (gnc:transaction-get-notes trans)
+ (xaccTransGetDescription trans)
+ (xaccTransGetNotes trans)
(trans-splits 0)))
;; Copy a scheme representation of a transaction onto a C transaction.
@@ -246,8 +246,8 @@
#f
(begin
;; open the transaction for editing
- (if (not (gnc:transaction-is-open trans))
- (gnc:transaction-begin-edit trans))
+ (if (not (xaccTransIsOpen trans))
+ (xaccTransBeginEdit trans))
;; copy in the transaction values
(let ((currency (gnc:transaction-scm-get-currency trans-scm))
@@ -255,23 +255,23 @@
(num (gnc:transaction-scm-get-num trans-scm))
(notes (gnc:transaction-scm-get-notes trans-scm))
(date-posted (gnc:transaction-scm-get-date-posted trans-scm)))
- (if currency (gnc:transaction-set-currency trans currency))
- (if description (gnc:transaction-set-description trans description))
- (if num (gnc:transaction-set-xnum trans num))
- (if notes (gnc:transaction-set-notes trans notes))
- (if date-posted (gnc:transaction-set-date-time-pair
+ (if currency (xaccTransSetCurrency trans currency))
+ (if description (xaccTransactionSetDescription trans description))
+ (if num (xaccTransSetNum trans num))
+ (if notes (xaccTransSetNotes trans notes))
+ (if date-posted (gnc-transaction-set-date
trans date-posted)))
;; strip off the old splits
(for-each (lambda (split)
- (gnc:split-destroy split))
- (gnc:transaction-get-splits trans))
+ (xaccSplitDestroy split))
+ (xaccTransGetSplits trans))
;; and put on the new ones! Please note they go in the *same*
;; order as in the original transaction. This is important.
(for-each
(lambda (split-scm)
- (let* ((new-split (gnc:split-create book))
+ (let* ((new-split (xaccMallocSplit book))
(old-guid (gnc:split-scm-get-account-guid split-scm))
(new-guid (assoc-ref guid-mapping old-guid)))
(if (not new-guid)
@@ -279,9 +279,9 @@
(gnc:split-scm-set-account-guid split-scm new-guid)
(gnc:split-scm-onto-split split-scm new-split book)
(gnc:split-scm-set-account-guid split-scm old-guid)
- (gnc:transaction-append-split trans new-split)))
+ (xaccTransAppendSplit trans new-split)))
(gnc:transaction-scm-get-split-scms trans-scm))
;; close the transaction
(if commit?
- (gnc:transaction-commit-edit trans)))))
+ (xaccTransCommitEdit trans)))))
Modified: gnucash/trunk/src/engine/engine-utilities.scm
===================================================================
--- gnucash/trunk/src/engine/engine-utilities.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/engine-utilities.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -21,27 +21,10 @@
;; Copyright 2000 Rob Browning <rlb at cs.utexas.edu>
-(define (gnc:url->loaded-session session url ignore-lock? create-if-needed?)
- ;; Return a <gnc:Book*> representing the data stored at the given
- ;; url or #f on failure -- this should later be changed to returning
- ;; the symbol representing the book error... On success, the book
- ;; will already be loaded.
-
- (let* ((result (and session
- (gnc:session-begin session url
- ignore-lock?
- create-if-needed?)
- (eq? 'no-err (gw:enum-<gnc:BackendError>-val->sym
- (gnc:session-get-error session) #f))
- (gnc:session-load session)
- session)))
- (or result
- (begin (gnc:session-destroy session) #f))))
-
(define (gnc:group-map-all-accounts thunk group)
- (let ((accounts (or (gnc:group-get-subaccounts group) '())))
+ (let ((accounts (or (xaccGroupGetSubAccountsSorted group) '())))
(map thunk accounts)))
(define (gnc:group-map-accounts thunk group)
- (let ((accounts (or (gnc:group-get-account-list group) '())))
+ (let ((accounts (or (xaccGroupGetAccountListSorted group) '())))
(map thunk accounts)))
Copied: gnucash/trunk/src/engine/engine.i (from rev 15023, gnucash/branches/swig-redo/src/engine/engine.i)
Modified: gnucash/trunk/src/engine/engine.scm
===================================================================
--- gnucash/trunk/src/engine/engine.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/engine.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,9 +1,7 @@
(define-module (gnucash engine))
-(use-modules (g-wrap gw-wct))
+(use-modules (sw_engine))
-(use-modules (g-wrapped gw-engine))
-
(export GNC-RND-FLOOR)
(export GNC-RND-CEIL)
(export GNC-RND-TRUNC)
Modified: gnucash/trunk/src/engine/glib-helpers.c
===================================================================
--- gnucash/trunk/src/engine/glib-helpers.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/glib-helpers.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,6 +1,7 @@
/********************************************************************\
- * gnc-helpers.c -- gnucash g-wrap helper functions *
+ * gnc-helpers.c -- gnucash glib helper functions *
* Copyright (C) 2000 Linas Vepstas *
+ * Copyright (C) 2006 Chris Shoemaker <c.shoemaker at cox.net> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
@@ -27,39 +28,37 @@
#include <glib.h>
#include <libguile.h>
#include "guile-mappings.h"
-
-#include <g-wrap-wct.h>
-
+#include "swig-runtime.h"
#include "glib-helpers.h"
-/* These will eventually go into (g-wrapped glib). */
-
static SCM
-glist_to_scm_list_helper(GList *glist, SCM wct)
+glist_to_scm_list_helper(GList *glist, swig_type_info *wct)
{
SCM list = SCM_EOL;
GList *node;
for (node = glist; node; node = node->next)
- list = scm_cons (gw_wcp_assimilate_ptr(node->data, wct), list);
+ list = scm_cons(SWIG_NewPointerObj(node->data, wct, 0), list);
return scm_reverse (list);
}
SCM
-gnc_glist_to_scm_list(GList *glist, SCM wct)
+gnc_glist_to_scm_list(GList *glist, gchar *wct)
{
- SCM_ASSERT(gw_wct_p(wct), wct, SCM_ARG1, "gnc_glist_to_scm_list");
- return(glist_to_scm_list_helper(glist, wct));
+ swig_type_info *stype = SWIG_TypeQuery(wct);
+ g_return_val_if_fail(stype, SCM_UNDEFINED);
+ return glist_to_scm_list_helper(glist, stype);
}
-GList*
+GList *
gnc_scm_list_to_glist(SCM rest)
{
GList *result = NULL;
SCM scm_item;
-
+
+ SWIG_GetModule(NULL); /* Work-around for SWIG bug. */
SCM_ASSERT(SCM_LISTP(rest), rest, SCM_ARG1, "gnc_scm_list_to_glist");
while(!SCM_NULLP(rest))
@@ -69,18 +68,17 @@
scm_item = SCM_CAR(rest);
rest = SCM_CDR(rest);
- /* fixes a bug in g-wrap */
if (scm_item == SCM_BOOL_F)
{
result = g_list_prepend(result, NULL);
}
else
{
- if (!gw_wcp_p(scm_item))
+ if (!SWIG_IsPointer(scm_item))
scm_misc_error("gnc_scm_list_to_glist",
- "Item in list not a gw:wcp.", scm_item);
+ "Item in list not a wcp.", scm_item);
- item = gw_wcp_get_ptr(scm_item);
+ item = (void *)SWIG_PointerAddress(scm_item);
result = g_list_prepend(result, item);
}
}
@@ -88,38 +86,6 @@
return g_list_reverse(result);
}
-static SCM
-glist_map_helper(GList *glist, SCM wct, SCM thunk)
-{
- SCM list = SCM_EOL;
- GList *node;
-
- for (node = glist; node; node = node->next)
- list = scm_cons (scm_call_1(thunk, gw_wcp_assimilate_ptr(node->data, wct)),
- list);
-
- return scm_reverse (list);
-}
-
-SCM
-gnc_glist_scm_map(SCM wct, SCM thunk, GList* glist)
-{
- SCM_ASSERT(gw_wct_p(wct), wct, SCM_ARG1, "gnc_glist_map");
- SCM_ASSERT(SCM_PROCEDUREP(thunk), thunk, SCM_ARG2, "gnc_glist_scm_map");
- return(glist_map_helper(glist, wct, thunk));
-}
-
-void
-gnc_glist_scm_for_each(SCM wct, SCM thunk, GList *glist)
-{
- GList *lp;
- SCM_ASSERT(gw_wct_p(wct), wct, SCM_ARG1, "gnc_glist_map");
- SCM_ASSERT(SCM_PROCEDUREP(thunk), thunk, SCM_ARG2, "gnc_glist_scm_for_each");
- for(lp = glist; lp; lp = lp->next) {
- scm_call_1(thunk, gw_wcp_assimilate_ptr(lp->data, wct));
- }
-}
-
/********************************************************************
* gnc_glist_string_to_scm
* i.e. (glist-of (<gw:mchars> calee-owned) callee-owned)
@@ -143,9 +109,9 @@
/********************************************************************
* gnc_scm_to_glist_string
- * i.e. (glist-of (<gw:mchars> calee-owned) callee-owned)
+ * i.e. (glist-of (<gw:mchars> callee-owned) callee-owned)
* or equivalently
- * i.e. (glist-of (<gw:gchars> calee-owned) callee-owned)
+ * i.e. (glist-of (<gw:gchars> callee-owned) callee-owned)
********************************************************************/
GList *
@@ -164,6 +130,22 @@
return g_list_reverse (glist);
}
+GSList *
+gnc_scm_to_gslist_string(SCM list)
+{
+ GSList *gslist = NULL;
+
+ while (!SCM_NULLP (list))
+ {
+ const gchar * str = SCM_STRING_CHARS (SCM_CAR(list));
+ if (str)
+ gslist = g_slist_prepend (gslist, g_strdup (str));
+ list = SCM_CDR (list);
+ }
+
+ return g_slist_reverse (gslist);
+}
+
/********************************************************************
* gnc_glist_string_p
********************************************************************/
Modified: gnucash/trunk/src/engine/glib-helpers.h
===================================================================
--- gnucash/trunk/src/engine/glib-helpers.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/glib-helpers.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,6 +1,7 @@
/********************************************************************\
- * glib-helpers.h -- gnucash g-wrap helper functions *
+ * glib-helpers.h -- gnucash glib helper functions *
* Copyright (C) 2000 Linas Vepstas *
+ * Copyright (C) 2006 Chris Shoemaker <c.shoemaker at cox.net> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
@@ -27,16 +28,15 @@
#include <glib.h>
#include <libguile.h>
-SCM gnc_glist_to_scm_list(GList *glist, SCM wct);
+SCM gnc_glist_to_scm_list(GList *glist, gchar *wct);
GList* gnc_scm_list_to_glist(SCM wcp_list);
-SCM gnc_glist_scm_map(SCM wct, SCM thunk, GList *glist);
-void gnc_glist_scm_for_each(SCM wct, SCM thunk, GList *glist);
-
SCM gnc_glist_string_to_scm(GList * list);
GList * gnc_scm_to_glist_string(SCM list);
int gnc_glist_string_p(SCM list);
+GSList * gnc_scm_to_gslist_string(SCM list);
+
#endif
Modified: gnucash/trunk/src/engine/gnc-budget.h
===================================================================
--- gnucash/trunk/src/engine/gnc-budget.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gnc-budget.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -108,8 +108,6 @@
const Recurrence * gnc_budget_get_recurrence(GncBudget *budget);
/** Set/Get the starting date of the Budget */
-void gnc_budget_set_start_date(GncBudget* budget, Timespec date);
-Timespec gnc_budget_get_start_date(GncBudget* budget);
Timespec gnc_budget_get_period_start_date(GncBudget* budget, guint period_num);
/* Period indices are zero-based. */
@@ -129,9 +127,6 @@
/** Get the book that this budget is associated with. */
QofBook* gnc_budget_get_book(GncBudget* budget);
-/* Caller owns the list of all budgets in the book. */
-GList* gnc_book_get_budgets(QofBook* book);
-
/* Returns some budget in the book, or NULL. */
GncBudget* gnc_budget_get_default(QofBook *book);
Modified: gnucash/trunk/src/engine/gnc-commodity.c
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gnc-commodity.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1415,7 +1415,7 @@
* list commodities in a give namespace
********************************************************************/
-GList *
+CommodityList *
gnc_commodity_table_get_commodities(const gnc_commodity_table * table,
const char * namespace)
{
@@ -1460,7 +1460,7 @@
return TRUE;
}
-GList *
+CommodityList *
gnc_commodity_table_get_quotable_commodities(const gnc_commodity_table * table)
{
gnc_commodity_namespace * ns = NULL;
Modified: gnucash/trunk/src/engine/gnc-commodity.h
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gnc-commodity.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -78,6 +78,7 @@
#define GNC_COMMODITY_NS_AMEX "AMEX"
#define GNC_COMMODITY_NS_ASX "ASX"
+typedef GList CommodityList;
/** @name Commodity Quote Source functions
@{
@@ -807,8 +808,8 @@
* argument was supplied, or the namespace could not be found.
*
* @note It is the callers responsibility to free the list. */
-GList * gnc_commodity_table_get_commodities(const gnc_commodity_table * table,
- const char * namespace);
+CommodityList * gnc_commodity_table_get_commodities(
+ const gnc_commodity_table * table, const char * namespace);
/** This function returns a list of commodities for which price quotes
* should be retrieved. It will scan the entire commodity table (or
@@ -827,7 +828,7 @@
* quote retrieval.
*
* @note It is the callers responsibility to free the list. */
-GList * gnc_commodity_table_get_quotable_commodities(
+CommodityList * gnc_commodity_table_get_quotable_commodities(
const gnc_commodity_table * table);
/** Call a function once for each commodity in the commodity table.
Modified: gnucash/trunk/src/engine/gnc-hooks.c
===================================================================
--- gnucash/trunk/src/engine/gnc-hooks.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gnc-hooks.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -26,7 +26,7 @@
#include <glib.h>
#include <stdio.h>
#include <libguile.h>
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include "gnc-hooks.h"
#include "gnc-hooks-scm.h"
#include "gnc-engine.h"
@@ -191,8 +191,7 @@
// XXX: FIXME: We really should make sure this is a session!!! */
scm_call_1 (scm->proc,
- gw_wcp_assimilate_ptr (data,
- scm_c_eval_string("<gnc:Session*>")));
+ SWIG_NewPointerObj(data, SWIG_TypeQuery("_p_QofSession"), 0));
LEAVE("");
}
Modified: gnucash/trunk/src/engine/gnc-numeric.scm
===================================================================
--- gnucash/trunk/src/engine/gnc-numeric.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gnc-numeric.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -74,7 +74,9 @@
;; Constructor; takes one <gnc:commodity*> and one <gnc-numeric>
(define (gnc:make-gnc-monetary c a)
- (if (and (gw:wcp-is-of-type? <gnc:commodity*> c) (gnc:gnc-numeric? a))
+ ;;FIXME: we used to type-check the values, like:
+ ;; (gw:wcp-is-of-type? <gnc:commodity*> c)
+ (if (and #t (gnc:gnc-numeric? a))
((record-constructor <gnc-monetary>) c a)
(warn "wrong arguments for gnc:make-gnc-monetary: " c a)))
@@ -91,5 +93,5 @@
(if (gnc:gnc-monetary? a)
(gnc:make-gnc-monetary
(gnc:gnc-monetary-commodity a)
- (gnc:numeric-neg (gnc:gnc-monetary-amount a)))
+ (gnc-numeric-neg (gnc:gnc-monetary-amount a)))
(warn "wrong arguments for gnc:monetary-neg: " a)))
Modified: gnucash/trunk/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gnc-pricedb.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -458,7 +458,7 @@
}
gboolean
-gnc_price_list_insert(GList **prices, GNCPrice *p, gboolean check_dupl)
+gnc_price_list_insert(PriceList **prices, GNCPrice *p, gboolean check_dupl)
{
GList *result_list;
PriceListIsDuplStruct* pStruct;
@@ -487,7 +487,7 @@
}
gboolean
-gnc_price_list_remove(GList **prices, GNCPrice *p)
+gnc_price_list_remove(PriceList **prices, GNCPrice *p)
{
GList *result_list;
GList *found_element;
@@ -512,14 +512,14 @@
}
void
-gnc_price_list_destroy(GList *prices)
+gnc_price_list_destroy(PriceList *prices)
{
g_list_foreach(prices, price_list_destroy_helper, NULL);
g_list_free(prices);
}
gboolean
-gnc_price_list_equal(GList *prices1, GList *prices2)
+gnc_price_list_equal(PriceList *prices1, PriceList *prices2)
{
GList *n1, *n2;
@@ -1117,7 +1117,7 @@
gnc_price_list_insert(return_list, price_list->data, FALSE);
}
-GList *
+PriceList *
gnc_pricedb_lookup_latest_any_currency(GNCPriceDB *db,
const gnc_commodity *commodity)
{
@@ -1212,7 +1212,7 @@
}
-GList *
+PriceList *
gnc_pricedb_get_prices(GNCPriceDB *db,
const gnc_commodity *commodity,
const gnc_commodity *currency)
@@ -1258,7 +1258,7 @@
}
-GList *
+PriceList *
gnc_pricedb_lookup_day(GNCPriceDB *db,
const gnc_commodity *c,
const gnc_commodity *currency,
@@ -1331,7 +1331,7 @@
}
}
-GList *
+PriceList *
gnc_pricedb_lookup_day_any_currency(GNCPriceDB *db,
const gnc_commodity *c,
Timespec t)
@@ -1376,7 +1376,7 @@
}
-GList *
+PriceList *
gnc_pricedb_lookup_at_time(GNCPriceDB *db,
const gnc_commodity *c,
const gnc_commodity *currency,
@@ -1446,7 +1446,7 @@
}
}
-GList *
+PriceList *
gnc_pricedb_lookup_at_time_any_currency(GNCPriceDB *db,
const gnc_commodity *c,
Timespec t)
@@ -1706,7 +1706,7 @@
}
-GList *
+PriceList *
gnc_pricedb_lookup_nearest_in_time_any_currency(GNCPriceDB *db,
const gnc_commodity *c,
Timespec t)
@@ -1749,7 +1749,7 @@
}
-GList *
+PriceList *
gnc_pricedb_lookup_latest_before_any_currency(GNCPriceDB *db,
gnc_commodity *c,
Timespec t)
Modified: gnucash/trunk/src/engine/gnc-pricedb.h
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gnc-pricedb.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -126,6 +126,7 @@
/** */
typedef struct gnc_price_lookup_s GNCPriceLookup;
+typedef GList PriceList;
/* ------------------ */
/** @name Constructors
@@ -216,17 +217,18 @@
/** gnc_price_list_insert - insert a price into the given list, calling
gnc_price_ref on it during the process. */
-gboolean gnc_price_list_insert(GList **prices, GNCPrice *p, gboolean check_dupl);
+gboolean gnc_price_list_insert(PriceList **prices, GNCPrice *p,
+ gboolean check_dupl);
/** gnc_price_list_remove - remove the price, p, from the given list,
calling gnc_price_unref on it during the process. */
-gboolean gnc_price_list_remove(GList **prices, GNCPrice *p);
+gboolean gnc_price_list_remove(PriceList **prices, GNCPrice *p);
/** gnc_price_list_destroy - destroy the given price list, calling
gnc_price_unref on all the prices included in the list. */
-void gnc_price_list_destroy(GList *prices);
+void gnc_price_list_destroy(PriceList *prices);
-gboolean gnc_price_list_equal(GList *prices1, GList *prices2);
+gboolean gnc_price_list_equal(PriceList *prices1, PriceList *prices2);
/** @} */
/** @} end of the Price doxygen group */
@@ -288,8 +290,8 @@
/** gnc_pricedb_lookup_latest_any_currency - find the most recent prices
for the given commodity in any available currency. Prices will be
returned as a GNCPrice list (see above). */
-GList *gnc_pricedb_lookup_latest_any_currency(GNCPriceDB *db,
- const gnc_commodity *commodity);
+PriceList * gnc_pricedb_lookup_latest_any_currency(GNCPriceDB *db,
+ const gnc_commodity *commodity);
/** gnc_pricedb_has_prices - return an indication of whether or not
there are any prices for a given commodity in the given currency.
@@ -301,39 +303,39 @@
/** gnc_pricedb_get_prices - return all the prices for a given
commodity in the given currency. Returns NULL on failure. The
result is a GNCPrice list (see above). */
-GList * gnc_pricedb_get_prices(GNCPriceDB *db,
- const gnc_commodity *commodity,
- const gnc_commodity *currency);
+PriceList * gnc_pricedb_get_prices(GNCPriceDB *db,
+ const gnc_commodity *commodity,
+ const gnc_commodity *currency);
/** gnc_pricedb_lookup_at_time - return all prices that match the given
commodity, currency, and timespec. Prices will be returned as a
GNCPrice list (see above). */
-GList * gnc_pricedb_lookup_at_time(GNCPriceDB *db,
- const gnc_commodity *commodity,
- const gnc_commodity *currency,
- Timespec t);
+PriceList * gnc_pricedb_lookup_at_time(GNCPriceDB *db,
+ const gnc_commodity *commodity,
+ const gnc_commodity *currency,
+ Timespec t);
/** gnc_pricedb_lookup_at_time_any_currency - return all prices that match the
given commodity and timespec in any available currency. Prices will be
returned as a GNCPrice list (see above). */
-GList * gnc_pricedb_lookup_at_time_any_currency(GNCPriceDB *db,
- const gnc_commodity *c,
- Timespec t);
+PriceList * gnc_pricedb_lookup_at_time_any_currency(GNCPriceDB *db,
+ const gnc_commodity *c,
+ Timespec t);
/** gnc_pricedb_lookup_day - return all prices that match the given
commodity, currency, and timespec. Prices will be returned as a
GNCPrice list (see above). */
-GList * gnc_pricedb_lookup_day(GNCPriceDB *db,
- const gnc_commodity *commodity,
- const gnc_commodity *currency,
- Timespec t);
+PriceList * gnc_pricedb_lookup_day(GNCPriceDB *db,
+ const gnc_commodity *commodity,
+ const gnc_commodity *currency,
+ Timespec t);
/** gnc_pricedb_lookup_day_any_currency - return all prices that match the
given commodity and timespec in any available currency. Prices will be
returned as a GNCPrice list (see above). */
-GList * gnc_pricedb_lookup_day_any_currency(GNCPriceDB *db,
- const gnc_commodity *c,
- Timespec t);
+PriceList * gnc_pricedb_lookup_day_any_currency(GNCPriceDB *db,
+ const gnc_commodity *c,
+ Timespec t);
/** gnc_pricedb_lookup_nearest_in_time - return the price for the given
commodity in the given currency nearest to the given time t. */
@@ -345,9 +347,9 @@
/** gnc_pricedb_lookup_nearest_in_time_any_currency - return all prices that
match the given commodity and timespec in any available currency. Prices
will be returned as a GNCPrice list (see above). */
-GList * gnc_pricedb_lookup_nearest_in_time_any_currency(GNCPriceDB *db,
- const gnc_commodity *c,
- Timespec t);
+PriceList * gnc_pricedb_lookup_nearest_in_time_any_currency(GNCPriceDB *db,
+ const gnc_commodity *c,
+ Timespec t);
/** gnc_pricedb_lookup_latest_before - return the latest price for the given commodity
in the given currency up to and including time t. */
GNCPrice * gnc_pricedb_lookup_latest_before(GNCPriceDB *db,
@@ -358,9 +360,9 @@
/** gnc_pricedb_lookup_latest_before_any_currency - return recent prices that
match the given commodity up to and including time t in any available currency. Prices
will be returned as a GNCPrice list (see above). */
-GList * gnc_pricedb_lookup_latest_before_any_currency(GNCPriceDB *db,
- gnc_commodity *c,
- Timespec t);
+PriceList * gnc_pricedb_lookup_latest_before_any_currency(GNCPriceDB *db,
+ gnc_commodity *c,
+ Timespec t);
/** gnc_pricedb_convert_balance_latest_price - Convert a balance
Modified: gnucash/trunk/src/engine/gncmod-engine.c
===================================================================
--- gnucash/trunk/src/engine/gncmod-engine.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gncmod-engine.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -12,7 +12,6 @@
#include "gnc-engine.h"
#include "gnc-module-api.h"
-#include "gw-engine.h"
/* version of the gnc module system interface we require */
int libgncmod_engine_LTX_gnc_module_system_interface = 0;
@@ -41,6 +40,8 @@
return g_strdup("The GnuCash accounting engine");
}
+extern SCM scm_init_sw_engine_module(void);
+
int
libgncmod_engine_LTX_gnc_module_init(int refcount)
{
@@ -50,13 +51,10 @@
gnc_engine_init(0, NULL);
}
+ scm_init_sw_engine_module();
+ scm_c_eval_string("(use-modules (sw_engine))");
scm_c_eval_string("(use-modules (gnucash engine))");
- scm_c_eval_string("(use-modules (g-wrap gw-glib))");
-
- scm_c_eval_string("(use-modules (g-wrapped gw-kvp))");
- scm_c_eval_string("(use-modules (g-wrapped gw-engine))");
-
return TRUE;
}
Deleted: gnucash/trunk/src/engine/gw-engine-spec.scm
===================================================================
--- gnucash/trunk/src/engine/gw-engine-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gw-engine-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,2678 +0,0 @@
-(define-module (g-wrapped gw-engine-spec))
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap))
-(use-modules (g-wrap simple-type))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(define ws (gw:new-wrapset "gw-engine"))
-
-(gw:wrapset-depends-on ws "gw-standard")
-(gw:wrapset-depends-on ws "gw-wct")
-(gw:wrapset-depends-on ws "gw-glib")
-
-(gw:wrapset-set-guile-module! ws '(g-wrapped gw-engine))
-
-(gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <glib.h>\n"
- "#include <qof.h>\n"
- "#include <Group.h>\n"
- "#include <Query.h>\n"
- "#include <gnc-budget.h>\n"
- "#include <gnc-commodity.h>\n"
- "#include <gnc-engine.h>\n"
- "#include <gnc-filepath-utils.h>\n"
- "#include <gnc-pricedb.h>\n"
- "#include <gnc-lot.h>\n"
- "#include <gnc-session-scm.h>\n"
- "#include <gnc-hooks-scm.h>\n"
- "#include <engine-helpers.h>\n"
- "#include <SX-book.h>\n")))
-
-(gw:wrapset-add-cs-initializers!
- ws
- (lambda (wrapset client-wrapset status-var)
- (if client-wrapset
- '()
- (gw:inline-scheme '(use-modules (gnucash engine))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; <gnc:time-pair>
-(gw:wrap-simple-type ws
- '<gnc:time-pair> "Timespec"
- '("gnc_timepair_p(" scm-var ")")
- '(c-var " = gnc_timepair2timespec(" scm-var ");\n")
- '(scm-var " = gnc_timespec2timepair(" c-var ");\n"))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; <gnc:guid-scm>
-(gw:wrap-simple-type ws
- '<gnc:guid-scm> "GUID"
- '("gnc_guid_p(" scm-var ")")
- '(c-var " = gnc_scm2guid(" scm-var ");\n")
- '(scm-var " = gnc_guid2scm(" c-var ");\n"))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; <gnc:numeric>
-(gw:wrap-simple-type ws
- '<gnc:numeric> "gnc_numeric"
- '("gnc_numeric_p(" scm-var ")")
- '(c-var " = gnc_scm_to_numeric(" scm-var ");\n")
- '(scm-var " = gnc_numeric_to_scm(" c-var ");\n"))
-
-;; Equivalencies
-;;
-;; <gnc:list-of-commodity*> -> (gw:glist-of <gnc:commodity*> caller-owned)
-;; <gnc:list-of-price*> -> (gw:glist-of <gnc:Price*> caller-owned)
-;;
-;; <gnc:list-of-split*-caller-owned> -> (gw:glist-of <gnc:Split*> caller-owned)
-;; <gnc:list-of-split*-callee-owned> -> (gw:glist-of <gnc:Split*> callee-owned)
-;;
-;; <gnc:list-of-transaction*-callee-owned> ->
-;; (gw:glist-of <gnc:Transaction*> callee-owned)
-;; <gnc:list-of-transaction*-caller-owned> ->
-;; (gw:glist-of <gnc:Transaction*> caller-owned)
-;;
-;; <gnc:list-of-account*-callee-owned> ->
-;; (gw:glist-of <gnc:Account*> callee-owned)
-;; <gnc:list-of-account*-caller-owned> ->
-;; (gw:glist-of <gnc:Account*> caller-owned)
-;;
-;; <gnc:list-of-string> -> '(gw:glist-of (<gw:mchars> callee-owned) callee-owned)
-
-
-(gw:wrap-as-wct ws '<gnc:GList*> "GList*" "const GList*")
-
-(gw:wrap-as-wct ws '<gnc:id-type> "QofIdType" "QofIdTypeConst")
-(gw:wrap-as-wct ws '<gnc:Account*> "Account*" "const Account*")
-(gw:wrap-as-wct ws '<gnc:Account**> "Account**" "const Account**")
-(gw:wrap-as-wct ws '<gnc:AccountGroup*> "AccountGroup*" "const AccountGroup*")
-(gw:wrap-as-wct ws '<gnc:Book*> "QofBook*" "const QofBook*")
-(gw:wrap-as-wct ws '<gnc:Lot*> "GNCLot*" "const GNCLot*")
-(gw:wrap-as-wct ws '<gnc:Session*> "QofSession*" "const QofSession**")
-(gw:wrap-as-wct ws '<gnc:Split*> "Split*" "const Split*")
-(gw:wrap-as-wct ws '<gnc:Transaction*> "Transaction*" "const Transaction*")
-(gw:wrap-as-wct ws '<gnc:commodity*> "gnc_commodity*" "const gnc_commodity*")
-(gw:wrap-as-wct ws '<gnc:commodity-namespace*>
- "gnc_commodity_namespace*"
- "const gnc_commodity_namespace*")
-(gw:wrap-as-wct ws '<gnc:commodity-table*>
- "gnc_commodity_table*"
- "const gnc_commodity_table*")
-
-(gw:wrap-as-wct ws '<gnc:Query*> "Query *" "const Query *")
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:event-type> "QofEventId")))
-
- (gw:enum-add-value! wt "QOF_EVENT_NONE" 'qof-event-none)
- (gw:enum-add-value! wt "QOF_EVENT_CREATE" 'qof-event-create)
- (gw:enum-add-value! wt "QOF_EVENT_MODIFY" 'qof-event-modify)
- (gw:enum-add-value! wt "QOF_EVENT_DESTROY" 'qof-event-destroy)
- (gw:enum-add-value! wt "QOF_EVENT_ALL" 'qof-event-all))
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:query-op> "QofQueryOp")))
-
- (gw:enum-add-value! wt "QOF_QUERY_AND" 'query-and)
- (gw:enum-add-value! wt "QOF_QUERY_OR" 'query-or)
- (gw:enum-add-value! wt "QOF_QUERY_NAND" 'query-nand)
- (gw:enum-add-value! wt "QOF_QUERY_NOR" 'query-nor)
- (gw:enum-add-value! wt "QOF_QUERY_XOR" 'query-xor))
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:query-compare-how> "QofQueryCompare")))
- (gw:enum-add-value! wt "QOF_COMPARE_LT" 'query-compare-lt)
- (gw:enum-add-value! wt "QOF_COMPARE_LTE" 'query-compare-lte)
- (gw:enum-add-value! wt "QOF_COMPARE_EQUAL" 'query-compare-equal)
- (gw:enum-add-value! wt "QOF_COMPARE_GT" 'query-compare-gt)
- (gw:enum-add-value! wt "QOF_COMPARE_GTE" 'query-compare-gte)
- (gw:enum-add-value! wt "QOF_COMPARE_NEQ" 'query-compare-neq)
- #t)
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:string-match-how> "QofStringMatch")))
- (gw:enum-add-value! wt "QOF_STRING_MATCH_NORMAL" 'string-match-normal)
- (gw:enum-add-value! wt "QOF_STRING_MATCH_CASEINSENSITIVE" 'string-match-caseinsensitive)
- #t)
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:date-match-how> "QofDateMatch")))
- (gw:enum-add-value! wt "QOF_DATE_MATCH_NORMAL" 'date-match-normal)
- (gw:enum-add-value! wt "QOF_DATE_MATCH_DAY" 'date-match-rounded)
- #t)
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:numeric-match-how> "QofNumericMatch")))
- (gw:enum-add-value! wt "QOF_NUMERIC_MATCH_ANY" 'amt-sgn-match-either)
- (gw:enum-add-value! wt "QOF_NUMERIC_MATCH_CREDIT" 'amt-sgn-match-credit)
- (gw:enum-add-value! wt "QOF_NUMERIC_MATCH_DEBIT" 'amt-sgn-match-debit)
- #t)
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:cleared-match-how> "cleared_match_t")))
- (gw:enum-add-value! wt "CLEARED_NO" 'cleared-match-no)
- (gw:enum-add-value! wt "CLEARED_CLEARED" 'cleared-match-cleared)
- (gw:enum-add-value! wt "CLEARED_RECONCILED" 'cleared-match-reconciled)
- (gw:enum-add-value! wt "CLEARED_FROZEN" 'cleared-match-frozen)
- (gw:enum-add-value! wt "CLEARED_VOIDED" 'cleared-match-voided)
- #t)
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:guid-match-how> "QofGuidMatch")))
- (gw:enum-add-value! wt "QOF_GUID_MATCH_ALL" 'guid-match-all)
- (gw:enum-add-value! wt "QOF_GUID_MATCH_ANY" 'guid-match-any)
- (gw:enum-add-value! wt "QOF_GUID_MATCH_NULL" 'guid-match-null)
- (gw:enum-add-value! wt "QOF_GUID_MATCH_NONE" 'guid-match-none)
- (gw:enum-add-value! wt "QOF_GUID_MATCH_LIST_ANY" 'guid-match-list-any)
- #t)
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:char-match-how> "QofCharMatch")))
- (gw:enum-add-value! wt "QOF_CHAR_MATCH_ANY" 'char-match-any)
- (gw:enum-add-value! wt "QOF_CHAR_MATCH_NONE" 'char-match-none)
- #t)
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:query-txn-match-t> "query_txn_match_t")))
- (gw:enum-add-value! wt "QUERY_TXN_MATCH_ALL" 'query-txn-match-all)
- (gw:enum-add-value! wt "QUERY_TXN_MATCH_ANY" 'query-txn-match-any)
- #t)
-
-(let ((wt (gw:wrap-enumeration ws '<gnc:kvp-value-t> "KvpValueType")))
- (gw:enum-add-value! wt "KVP_TYPE_GINT64" 'kvp-type-gint64)
- (gw:enum-add-value! wt "KVP_TYPE_DOUBLE" 'kvp-type-double)
- (gw:enum-add-value! wt "KVP_TYPE_NUMERIC" 'kvp-type-numeric)
- (gw:enum-add-value! wt "KVP_TYPE_STRING" 'kvp-type-string)
- (gw:enum-add-value! wt "KVP_TYPE_GUID" 'kvp-type-guid)
- (gw:enum-add-value! wt "KVP_TYPE_TIMESPEC" 'kvp-type-timespec)
- (gw:enum-add-value! wt "KVP_TYPE_BINARY" 'kvp-type-binary)
- (gw:enum-add-value! wt "KVP_TYPE_GLIST" 'kvp-type-glist)
- (gw:enum-add-value! wt "KVP_TYPE_FRAME" 'kvp-type-frame)
- #t)
-
-(let ((we (gw:wrap-enumeration ws '<gnc:AccountType> "GNCAccountType")))
- ;; From Account.h
- (gw:enum-add-value! we "ACCT_TYPE_INVALID" 'bad-type)
- (gw:enum-add-value! we "ACCT_TYPE_NONE" 'no-type)
- (gw:enum-add-value! we "ACCT_TYPE_BANK" 'bank)
- (gw:enum-add-value! we "ACCT_TYPE_CASH" 'cash)
- (gw:enum-add-value! we "ACCT_TYPE_CREDIT" 'credit)
- (gw:enum-add-value! we "ACCT_TYPE_ASSET" 'asset)
- (gw:enum-add-value! we "ACCT_TYPE_LIABILITY" 'liability)
- (gw:enum-add-value! we "ACCT_TYPE_STOCK" 'stock)
- (gw:enum-add-value! we "ACCT_TYPE_MUTUAL" 'mutual-fund)
- (gw:enum-add-value! we "ACCT_TYPE_CURRENCY" 'currency)
- (gw:enum-add-value! we "ACCT_TYPE_INCOME" 'income)
- (gw:enum-add-value! we "ACCT_TYPE_EXPENSE" 'expense)
- (gw:enum-add-value! we "ACCT_TYPE_EQUITY" 'equity)
- (gw:enum-add-value! we "ACCT_TYPE_RECEIVABLE" 'receivable)
- (gw:enum-add-value! we "ACCT_TYPE_PAYABLE" 'payable)
- (gw:enum-add-value! we "NUM_ACCOUNT_TYPES" 'num-account-types)
- (gw:enum-add-value! we "ACCT_TYPE_CHECKING" 'checking)
- (gw:enum-add-value! we "ACCT_TYPE_SAVINGS" 'savings)
- (gw:enum-add-value! we "ACCT_TYPE_MONEYMRKT" 'money-market)
- (gw:enum-add-value! we "ACCT_TYPE_CREDITLINE" 'credit-line)
- #t)
-
-(let ((we (gw:wrap-enumeration ws '<gnc:BackendError> "QofBackendError")))
-
- (gw:enum-add-value! we "ERR_BACKEND_NO_ERR" 'no-err)
- (gw:enum-add-value! we "ERR_BACKEND_NO_BACKEND" 'no-backend)
- (gw:enum-add-value! we "ERR_BACKEND_BAD_URL" 'bad-url)
- (gw:enum-add-value! we "ERR_BACKEND_CANT_CONNECT" 'cant-connect)
- (gw:enum-add-value! we "ERR_BACKEND_CONN_LOST" 'connection-lost)
- (gw:enum-add-value! we "ERR_BACKEND_NO_SUCH_DB" 'no-such-db)
- (gw:enum-add-value! we "ERR_BACKEND_LOCKED" 'locked)
- (gw:enum-add-value! we "ERR_BACKEND_READONLY" 'read-only)
- (gw:enum-add-value! we "ERR_BACKEND_DATA_CORRUPT" 'data-corrupt)
- (gw:enum-add-value! we "ERR_BACKEND_SERVER_ERR" 'server-error)
- (gw:enum-add-value! we "ERR_BACKEND_ALLOC" 'alloc)
- (gw:enum-add-value! we "ERR_BACKEND_MISC" 'misc)
-
- ;; (gw:enum-add-value! we "ERR_FILEIO_FILE_BAD_READ" 'file-bad-read)
- ;; (gw:enum-add-value! we "ERR_FILEIO_FILE_EMPTY" 'file-empty)
- ;; (gw:enum-add-value! we "ERR_FILEIO_FILE_LOCKERR" 'file-lockerr)
- ;; (gw:enum-add-value! we "ERR_FILEIO_FILE_NOT_FOUND" 'file-not-found)
- ;; (gw:enum-add-value! we "ERR_FILEIO_FILE_TOO_NEW" 'file-too-new)
- ;; (gw:enum-add-value! we "ERR_FILEIO_FILE_TOO_OLD" 'file-too-old)
-
- ;; (gw:enum-add-value! we "ERR_NETIO_SHORT_READ" 'netio-short-read)
- ;; (gw:enum-add-value! we "ERR_NETIO_WRONG_CONTENT_TYPE"
- ;; 'netio-wrong-content-type)
- ;; (gw:enum-add-value! we "ERR_NETIO_NOT_GNCXML" 'netio-not-gncxml)
-
- ;; (gw:enum-add-value! we "ERR_SQL_MISSING_DATA" 'sql-missing-data)
-
- #t)
-
-;
-; Definitions from gnc-engine.h
-;
-(gw:wrap-value ws 'gnc:id-account '<gnc:id-type> "GNC_ID_ACCOUNT")
-(gw:wrap-value ws 'gnc:id-book '<gnc:id-type> "GNC_ID_BOOK")
-(gw:wrap-value ws 'gnc:id-budget '<gnc:id-type> "GNC_ID_BUDGET")
-(gw:wrap-value ws 'gnc:id-lot '<gnc:id-type> "GNC_ID_LOT")
-(gw:wrap-value ws 'gnc:id-price '<gnc:id-type> "GNC_ID_PRICE")
-(gw:wrap-value ws 'gnc:id-split '<gnc:id-type> "GNC_ID_SPLIT")
-(gw:wrap-value ws 'gnc:id-schedxaction '<gnc:id-type> "GNC_ID_SCHEDXACTION")
-(gw:wrap-value ws 'gnc:id-session '<gnc:id-type> "GNC_ID_SESSION")
-(gw:wrap-value ws 'gnc:id-trans '<gnc:id-type> "GNC_ID_TRANS")
-
-;
-; Definitions for query parameter names
-;
-(gw:wrap-value ws 'gnc:query-default-sort '<gnc:id-type> "QUERY_DEFAULT_SORT")
-(gw:wrap-value ws 'gnc:split-lot '<gnc:id-type> "SPLIT_LOT")
-(gw:wrap-value ws 'gnc:split-trans '<gnc:id-type> "SPLIT_TRANS")
-(gw:wrap-value ws 'gnc:split-account '<gnc:id-type> "SPLIT_ACCOUNT")
-(gw:wrap-value ws 'gnc:split-value '<gnc:id-type> "SPLIT_VALUE")
-(gw:wrap-value ws 'gnc:split-memo '<gnc:id-type> "SPLIT_MEMO")
-(gw:wrap-value ws 'gnc:split-date-reconciled '<gnc:id-type> "SPLIT_DATE_RECONCILED")
-
-(gw:wrap-value ws 'gnc:trans-date-posted '<gnc:id-type> "TRANS_DATE_POSTED")
-(gw:wrap-value ws 'gnc:trans-desc '<gnc:id-type> "TRANS_DESCRIPTION")
-(gw:wrap-value ws 'gnc:trans-num '<gnc:id-type> "TRANS_NUM")
-
-(gw:wrap-value ws 'gnc:account-name '<gnc:id-type> "ACCOUNT_NAME_")
-(gw:wrap-value ws 'gnc:account-code '<gnc:id-type> "ACCOUNT_CODE_")
-
-;
-; Special query parameter "sort" types
-;
-(gw:wrap-value ws 'gnc:split-account-fullname '<gnc:id-type>
- "SPLIT_ACCT_FULLNAME")
-(gw:wrap-value ws 'gnc:split-corr-account-fullname '<gnc:id-type>
- "SPLIT_CORR_ACCT_NAME")
-(gw:wrap-value ws 'gnc:split-corr-account-code '<gnc:id-type>
- "SPLIT_CORR_ACCT_CODE")
-
-;
-; Transaction Types
-;
-(gw:wrap-value ws 'gnc:transaction-type-none '<gw:char> "TXN_TYPE_NONE")
-(gw:wrap-value ws 'gnc:transaction-type-invoice '<gw:char> "TXN_TYPE_INVOICE")
-(gw:wrap-value ws 'gnc:transaction-type-payment '<gw:char> "TXN_TYPE_PAYMENT")
-
-
-(gw:wrap-function
- ws
- 'gnc:guid-new
- '<gnc:guid-scm>
- "guid_new_return"
- '()
- "Return a newly-generated GUID.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-guid
- '<gnc:guid-scm>
- "xaccSplitReturnGUID"
- '((<gnc:Split*> s))
- "Return the GUID of Split s.")
-
-(gw:wrap-function
- ws
- 'gnc:split-lookup
- '<gnc:Split*>
- "xaccSplitLookupDirect"
- '((<gnc:guid-scm> guid)
- (<gnc:Book*> book))
- "Lookup a split with its GUID.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-balance
- '<gnc:numeric>
- "xaccSplitGetBalance"
- '((<gnc:Split*> s))
- "Return balance at split.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-memo
- '(<gw:mchars> callee-owned const)
- "xaccSplitGetMemo"
- '((<gnc:Split*> s))
- "Return split's memo.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-action
- '(<gw:mchars> callee-owned const)
- "xaccSplitGetAction"
- '((<gnc:Split*> s))
- "Return split's action.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-reconcile-state
- '<gw:char>
- "xaccSplitGetReconcile"
- '((<gnc:Split*> s))
- "Return split's reconcile state.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-reconciled-date
- '<gnc:time-pair>
- "gnc_split_get_date_reconciled"
- '((<gnc:Split*> s))
- "Return split's reconciliation date.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-amount
- '<gnc:numeric>
- "xaccSplitGetAmount"
- '((<gnc:Split*> s))
- "Return split's amount.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-share-price
- '<gnc:numeric>
- "xaccSplitGetSharePrice"
- '((<gnc:Split*> s))
- "Return split's share price.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-value
- '<gnc:numeric>
- "xaccSplitGetValue"
- '((<gnc:Split*> s))
- "Return split's value.")
-
-
-(gw:wrap-function
- ws
- 'gnc:account-separator-string
- '(<gw:mchars> callee-owned const)
- "gnc_get_account_separator_string"
- '()
- "Returns a string with the user-selected account separator")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-account
- '<gnc:Account*>
- "xaccSplitGetAccount"
- '((<gnc:Split*> s))
- "Return split's account.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-parent
- '<gnc:Transaction*>
- "xaccSplitGetParent"
- '((<gnc:Split*> s))
- "Return the parent transaction of the split.")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-other-split
- '<gnc:Split*>
- "xaccSplitGetOtherSplit"
- '((<gnc:Split*> s))
- "Return the 'other' split of the parent transaction or NULL.")
-
-(gw:wrap-function
- ws
- 'gnc:split-compare-account-full-names
- '<gw:int>
- "xaccSplitCompareAccountFullNames"
- '((<gnc:Split*> sa) (<gnc:Split*> sb))
- "Compare two splits on the full names of their parent accounts")
-
-(gw:wrap-function
- ws
- 'gnc:split-compare-account-codes
- '<gw:int>
- "xaccSplitCompareAccountCodes"
- '((<gnc:Split*> sa) (<gnc:Split*> sb))
- "Compare two splits on the codes of their parent accounts")
-
-(gw:wrap-function
- ws
- 'gnc:split-compare-other-account-full-names
- '<gw:int>
- "xaccSplitCompareOtherAccountFullNames"
- '((<gnc:Split*> sa) (<gnc:Split*> sb))
- "Compare two splits on the full names of the *other*
-split in the transaction")
-
-(gw:wrap-function
- ws
- 'gnc:split-compare-other-account-codes
- '<gw:int>
- "xaccSplitCompareOtherAccountCodes"
- '((<gnc:Split*> sa) (<gnc:Split*> sb))
- "Compare two splits on the codes of the *other* split in the transaction")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-corr-account-name
- '(<gw:mchars> callee-owned const)
- "xaccSplitGetCorrAccountName"
- '((<gnc:Split*> sa))
- "Find the split on the other side of the transaction, and return the name of
-its account")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-corr-account-full-name-internal
- '(<gw:gchars> caller-owned)
- "xaccSplitGetCorrAccountFullName"
- '((<gnc:Split*> sa))
- "Find the split on the other side of the transaction, and return the
-name of its account. Don't use directly, use
-gnc:split-get-corr-account-full-name in src/scm/report-utilities.scm")
-(gw:wrap-function
- ws
- 'gnc:split-get-corr-account-code
- '(<gw:mchars> callee-owned const)
- "xaccSplitGetCorrAccountCode"
- '((<gnc:Split*> sa))
- "Find the split on the other side of the transaction, and return the
-code of its account")
-
-(gw:wrap-function
- ws
- 'gnc:split-get-lot
- '<gnc:Lot*>
- "xaccSplitGetLot"
- '((<gnc:Split*> s))
- "Return the LOT of Split s.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-guid
- '<gnc:guid-scm>
- "xaccTransReturnGUID"
- '((<gnc:Transaction*> t))
- "Return the GUID of Transaction t.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-lookup
- '<gnc:Transaction*>
- "xaccTransLookupDirect"
- '((<gnc:guid-scm> guid)
- (<gnc:Book*> book))
- "Lookup a transaction with its GUID.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-split
- '<gnc:Split*>
- "xaccTransGetSplit"
- '((<gnc:Transaction*> t) (<gw:int> i))
- "Returns a pointer to each of the splits in this transaction. Valid
-values for i are zero to (number_of__splits-1). An invalid value of i
-will cause NULL to be returned. A convenient way of cycling through
-all splits is to start at zero, and kep incrementing until a null
-pointer is returned.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-splits
- '(gw:glist-of <gnc:Split*> callee-owned)
- "xaccTransGetSplitList"
- '((<gnc:Transaction*> t))
- "Returns a list of the splits in t.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-num
- '(<gw:mchars> callee-owned const)
- "xaccTransGetNum"
- '((<gnc:Transaction*> t))
- "Return the transaction's num, an arbitrary user-assigned field. It
-is intended to store a short id number, typically the check number,
-deposit number, invoice number or other tracking number.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-description
- '(<gw:mchars> callee-owned const)
- "xaccTransGetDescription"
- '((<gnc:Transaction*> t))
- "Return the transaction description, an arbitrary user-assigned
-value. It is meant to be a short descriptive phrase.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-notes
- '(<gw:mchars> callee-owned const)
- "xaccTransGetNotes"
- '((<gnc:Transaction*> t))
- "Return the transaction notes field.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-void
- '<gw:void>
- "xaccTransVoid"
- '((<gnc:Transaction*> transaction)
- ((<gw:mchars> caller-owned const) reason))
- "Void a transaction")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-void-status
- '<gw:bool>
- "xaccTransGetVoidStatus"
- '((<gnc:Transaction*> transaction))
- "Return true if a transaction has been voided")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-void-reason
- '(<gw:mchars> callee-owned const)
- "xaccTransGetVoidReason"
- '((<gnc:Transaction*> transaction))
- "return a string indicating reason for voiding")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-order
- '<gw:int>
- "xaccTransOrder"
- '((<gnc:Transaction*> ta) (<gnc:Transaction*> tb))
- "Return an integer for ta,tb ordering. <0 is ta is before tb, >0 if ta is after tb")
-
-(gw:wrap-function
- ws
- 'gnc:split-void-former-amount
- '<gnc:numeric>
- "xaccSplitVoidFormerAmount"
- '((<gnc:Split*> split))
- "get what the split's amount before voiding")
-
-(gw:wrap-function
- ws
- 'gnc:split-void-former-value
- '<gnc:numeric>
- "xaccSplitVoidFormerValue"
- '((<gnc:Split*> split))
- "get what the split's value was before voiding")
-
-(gw:wrap-function
- ws
- 'gnc:dmy2timespec
- '<gnc:time-pair>
- "gnc_dmy2timespec"
- '((<gw:int> day) (<gw:int> month) (<gw:int> year))
- "Return a given day, month, and year as a pair where the car is the
-number of seconds and the cdr is the number of nanoseconds.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-date-posted
- '<gnc:time-pair>
- "gnc_transaction_get_date_posted"
- '((<gnc:Transaction*> t))
- "Return the date the transaction was posted at the bank as a pair of
-integers. The car is the number of seconds and the cdr is the number
-of nanoseconds.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-date-entered
- '<gnc:time-pair>
- "gnc_transaction_get_date_entered"
- '((<gnc:Transaction*> t))
- "Return the date the transaction was entered into the register as a
-pair of integers. The car is the number of seconds and the cdr is the
-number of nanoseconds.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-set-date-posted
- '<gw:void>
- "gnc_transaction_set_date_posted"
- '((<gnc:Transaction*> t) (<gnc:time-pair> date))
- "Modifies the posted date of the transaction. Footnote: this
-shouldn't matter to a user, but anyone modifying the engine should
-understand that when the transaction is committed, the date order of
-each of the component splits will be checked, and they will be
-restored in ascending date order. The date given should be a pair of
-integers. The car is the number of seconds and the cdr is the number
-of nanoseconds.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-set-date-entered
- '<gw:void>
- "gnc_transaction_set_date_entered"
- '((<gnc:Transaction*> t) (<gnc:time-pair> date))
- "Modifies entered date of the transaction. The date given should be a
-pair of integers. The car is the number of seconds and the cdr is the
-number of nanoseconds.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-split-count
- '<gw:int>
- "xaccTransCountSplits"
- '((<gnc:Transaction*> t))
- "Return the number of splits in the transaction.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-currency
- '<gnc:commodity*>
- "xaccTransGetCurrency"
- '((<gnc:Transaction*> trans))
- "Returns the commodity common for this transaction. ATM it gives the same result as xaccTransFindCommonCurrency.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-set-currency
- '<gw:void>
- "xaccTransSetCurrency"
- '((<gnc:Transaction*> trans) (<gnc:commodity*> comm))
- "Sets the commodity common for this transaction.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-account-value
- '<gnc:numeric>
- "xaccTransGetAccountValue"
- '((<gnc:Transaction*> trans) (<gnc:Account*> acc))
- "Compute the sum of all Splits in trans that are applied to Account acc.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-get-txn-type
- '<gw:char>
- "xaccTransGetTxnType"
- '((<gnc:Transaction*> trans))
- "Return the transaction type.")
-
-(gw:wrap-function
- ws
- 'gnc:malloc-account
- '<gnc:Account*>
- "xaccMallocAccount"
- '((<gnc:Book*> book))
- "Allocate a new account structure.")
-
-(gw:wrap-function
- ws
- 'gnc:account-destroy
- '<gw:void>
- "xaccAccountDestroy"
- '((<gnc:Account*> account))
- "Free an account structure. (Must call gnc:account-begin-edit first)")
-
-(let ((docstr
- "The gnc:account-begin-edit and gnc:account-commit-edit
- subroutines provide a two-phase-commit wrapper for account updates."))
- (gw:wrap-function
- ws
- 'gnc:account-begin-edit
- '<gw:void>
- "xaccAccountBeginEdit"
- '((<gnc:Account*> a))
- docstr)
- (gw:wrap-function
- ws
- 'gnc:account-commit-edit
- '<gw:void>
- "xaccAccountCommitEdit"
- '((<gnc:Account*> a))
- docstr))
-
-(gw:wrap-function
- ws
- 'gnc:account-insert-split
- '<gw:void>
- "xaccAccountInsertSplit"
- '((<gnc:Account*> a) (<gnc:Split*> s))
- "Insert the split s into account a. If the split already belongs
-to another account, it will be removed from that account first.")
-
-;; (gw:wrap-function
-;; ws
-;; 'gnc:account-order
-;; '<gw:int>
-;; "xaccAccountOrder_gwrap"
-;; '(
-;; (<gnc:Account**> a1)
-;; (<gnc:Account**> a2)
-;; )
-;; "Defines a sorting order on accounts. Returns -1 if a1 is \"less
-;; than\" the second, +1 if the a1 is \"greater than\" the second, and 0
-;; if they are equal. To determine the sort order, the account codes are
-;; compared, and if these are equal, then account types, and, if these
-;; are equal, then account names.")
-
-(gw:wrap-function
- ws
- 'gnc:account-set-type
- '<gw:void>
- "xaccAccountSetType"
- '((<gnc:Account*> a) (<gnc:AccountType> type))
- "Set Account type. See definition of scheme GNCAccountType for values.")
-
-(gw:wrap-function
- ws
- 'gnc:account-set-name
- '<gw:void>
- "xaccAccountSetName"
- '((<gnc:Account*> a) ((<gw:mchars> caller-owned const) name))
- "Set account name")
-
-(gw:wrap-function
- ws
- 'gnc:account-set-code
- '<gw:void>
- "xaccAccountSetCode"
- '((<gnc:Account*> a) ((<gw:mchars> caller-owned const) code))
- "Set whatever cryptic code we wish to use as the alternative to\n"
- "the account name.\n"
- "\n"
- "Commonly these codes are numeric, and organize asset accounts together\n"
- "in one number range, liability accounts in another number range, and\n"
- "so forth...\n")
-
-(gw:wrap-function
- ws
- 'gnc:account-set-description
- '<gw:void>
- "xaccAccountSetDescription"
- '((<gnc:Account*> a) ((<gw:mchars> caller-owned const) description))
- "Set a slightly-more-verbose description for the account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-set-notes
- '<gw:void>
- "xaccAccountSetNotes"
- '((<gnc:Account*> a) ((<gw:mchars> caller-owned const) notes))
- "Set up a longer set of notes that provide a perhaps-very-verbose
-description of the nature of a particular account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-set-tax-related
- '<gw:void>
- "xaccAccountSetTaxRelated"
- '((<gnc:Account*> a) (<gw:bool> tax-related))
- "Set the tax-related flag of the account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-guid
- '<gnc:guid-scm>
- "xaccAccountReturnGUID"
- '((<gnc:Account*> a))
- "Get the GUID of Account a.")
-
-(gw:wrap-function
- ws
- 'gnc:account-lookup
- '<gnc:Account*>
- "xaccAccountLookupDirect"
- '((<gnc:guid-scm> guid) (<gnc:Book*> book))
- "Lookup the account with GUID guid.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-type-string
- '(<gw:mchars> callee-owned const)
- "xaccAccountGetTypeStr"
- '((<gnc:AccountType> type))
- "What's the account type's name.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-type
- '<gnc:AccountType>
- "xaccAccountGetType"
- '((<gnc:Account*> a))
- "What's the account type? See scheme GNCAccountType enum def values.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-name
- '(<gw:mchars> callee-owned const)
- "xaccAccountGetName"
- '((<gnc:Account*> a))
- "Get the brief name for the account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-code
- '(<gw:mchars> callee-owned const)
- "xaccAccountGetCode"
- '((<gnc:Account*> a))
- "Get the account's ``account code.''
-
-Commonly this is used to provide a hierarchy where accounts with
-similar classifications (e.g. - Assets, Liabilities, Equity, Income,
-Expenses) are given numeric codes in corresponding ``number ranges.''")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-description
- '(<gw:mchars> callee-owned const)
- "xaccAccountGetDescription"
- '((<gnc:Account*> a))
- "Get the slightly-verbose description of the account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-notes
- '(<gw:mchars> callee-owned const)
- "xaccAccountGetNotes"
- '((<gnc:Account*> a))
- "Get the fully-verbose description of the account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-commodity
- '(<gnc:commodity*> const)
- "xaccAccountGetCommodity"
- '((<gnc:Account*> a))
- "Get the commodity in which the account is denominated.")
-
-(gw:wrap-function
- ws
- 'gnc:account-set-commodity
- '<gw:void>
- "xaccAccountSetCommodity"
- '((<gnc:Account*> a) (<gnc:commodity*> comm))
- "Set the commodity in which the account is denominated.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-tax-related
- '<gw:bool>
- "xaccAccountGetTaxRelated"
- '((<gnc:Account*> a))
- "Get the tax related flag of the account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-tax-US-code
- '(<gw:mchars> callee-owned const)
- "xaccAccountGetTaxUSCode"
- '((<gnc:Account*> a))
- "Get the tax code set on the account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-tax-US-payer-name-source
- '(<gw:mchars> callee-owned const)
- "xaccAccountGetTaxUSPayerNameSource"
- '((<gnc:Account*> a))
- "Get the tax payer name source set on the account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-children
- '<gnc:AccountGroup*>
- "xaccAccountGetChildren"
- '((<gnc:Account*> a))
- "Get a pointer to an AccountGroup that represents the set of
-children to this account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-parent
- '<gnc:AccountGroup*>
- "xaccAccountGetParent"
- '((<gnc:Account*> a))
- "Get the pointer to the account's parent.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-parent-account
- '<gnc:Account*>
- "xaccAccountGetParentAccount"
- '((<gnc:Account*> a))
- "Get the pointer to the account's parent account.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-balance
- '<gnc:numeric>
- "xaccAccountGetBalance"
- '((<gnc:Account*> a))
- "Undocumented.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-cleared-balance
- '<gnc:numeric>
- "xaccAccountGetClearedBalance"
- '((<gnc:Account*> a))
- "Undocumented.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-reconciled-balance
- '<gnc:numeric>
- "xaccAccountGetReconciledBalance"
- '((<gnc:Account*> a))
- "Undocumented.")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-split-list
- '(gw:glist-of <gnc:Split*> callee-owned)
- "xaccAccountGetSplitList"
- '((<gnc:Account*> a))
- "Get a list of the of splits in account a.")
-
-(gw:wrap-function
- ws
- 'gnc:malloc-account-group
- '<gnc:AccountGroup*>
- "xaccMallocAccountGroup"
- '((<gnc:Book*> book))
- "Create a new account group.")
-
-(gw:wrap-function
- ws
- 'gnc:account-group-begin-edit
- '<gw:void>
- "xaccAccountGroupBeginEdit"
- '((<gnc:AccountGroup*> g))
- "Open an account group for editing.")
-
-(gw:wrap-function
- ws
- 'gnc:account-group-commit-edit
- '<gw:void>
- "xaccAccountGroupCommitEdit"
- '((<gnc:AccountGroup*> g))
- "Commit all changes to an account group.")
-
-(gw:wrap-function
- ws
- 'gnc:account-group-destroy
- '<gw:void>
- "xaccAccountGroupDestroy"
- '((<gnc:AccountGroup*> g))
- "Free an account group. (Must call gnc:account-group-begin-edit first)")
-
-(gw:wrap-function
- ws
- 'gnc:group-get-book
- '<gnc:Book*>
- "xaccGroupGetBook"
- '((<gnc:AccountGroup*> g))
- "Return the QofBook of group g.")
-
-(gw:wrap-function
- ws
- 'gnc:group-merge-accounts
- '<gw:void>
- "xaccGroupMergeAccounts"
- '((<gnc:AccountGroup*> g))
- "Merge accounts which have the same name and description. Used in
-importing Quicken files.")
-
-(gw:wrap-function
- ws
- 'gnc:group-concat-group
- '<gw:void>
- "xaccGroupConcatGroup"
- '((<gnc:AccountGroup*> old)
- (<gnc:AccountGroup*> new))
- "Catenate accounts from one group into another. Used in Quicken
-import.")
-
-(gw:wrap-function
- ws
- 'gnc:group-get-num-subaccounts
- '<gw:int>
- "xaccGroupGetNumSubAccounts"
- '((<gnc:AccountGroup*> g))
- "Return the number of accounts, including subaccounts, in the account
-group")
-
-(gw:wrap-function
- ws
- 'gnc:group-get-num-accounts
- '<gw:int>
- "xaccGroupGetNumAccounts"
- '((<gnc:AccountGroup*> g))
- "Return the number of accounts in the indicated group only"
- "(children not counted).")
-
-(gw:wrap-function
- ws
- 'gnc:group-get-account
- '<gnc:Account*>
- "xaccGroupGetAccount"
- '((<gnc:AccountGroup*> g) (<gw:int> n))
- "Return account number n in account group g.")
-
-(gw:wrap-function
- ws
- 'gnc:get-account-from-full-name
- '<gnc:Account*>
- "xaccGetAccountFromFullName"
- '((<gnc:AccountGroup*> g)
- ((<gw:mchars> caller-owned const) name))
- "Return account named name in group g. full path with separators.")
-
-(gw:wrap-function
- ws
- 'gnc:group-get-parent
- '<gnc:Account*>
- "xaccGroupGetParentAccount"
- '((<gnc:AccountGroup*> g))
- "Return the parent acount for the group.")
-
-(gw:wrap-function
- ws
- 'gnc:group-insert-account
- '<gw:void>
- "xaccGroupInsertAccount"
- '((<gnc:AccountGroup*> g) (<gnc:Account*> a))
- "Add account a to group g.")
-
-(gw:wrap-function
- ws
- 'gnc:account-insert-subaccount
- '<gw:void>
- "xaccAccountInsertSubAccount"
- '((<gnc:Account*> p) (<gnc:Account*> c))
- "Add a child account c to parent p")
-
-(gw:wrap-function
- ws
- 'gnc:group-get-subaccounts
- '(gw:glist-of <gnc:Account*> caller-owned)
- "xaccGroupGetSubAccountsSorted"
- '((<gnc:AccountGroup*> g))
- "Return a list containing all of the accounts, including
-subaccounts, in the account group. The returned array should be freed
-when no longer needed.")
-
-(gw:wrap-function
- ws
- 'gnc:group-get-account-list
- '(gw:glist-of <gnc:Account*> caller-owned)
- "xaccGroupGetAccountListSorted"
- '((<gnc:AccountGroup*> g))
- "Return a list containing the immediate children of g.")
-
-(gw:wrap-function
- ws
- 'gnc:group-begin-staged-transaction-traversals
- '<gw:void>
- "xaccGroupBeginStagedTransactionTraversals"
- '((<gnc:AccountGroup*> group))
- "Sets things up to begin a sequence of staged traversals.")
-
-(gw:wrap-function
- ws
- 'gnc:group-staged-transaction-traversal
- '<gw:bool>
- "gnc_scmGroupStagedTransactionTraversal"
- '((<gnc:AccountGroup*> group)
- (<gw:unsigned-int> stage)
- (<gw:scm> thunk))
- "FIXME: For now, see Group.h for info...")
-
-(gw:wrap-function
- ws
- 'gnc:account-staged-transaction-traversal
- '<gw:bool>
- "gnc_scmAccountStagedTransactionTraversal"
- '((<gnc:Account*> account)
- (<gw:unsigned-int> stage)
- (<gw:scm> thunk))
- "FIXME: For now, see Group.h for info...")
-
-(gw:wrap-function
- ws
- 'gnc:account-get-lot-list
- '(gw:glist-of <gnc:Lot*> callee-owned)
- "xaccAccountGetLotList"
- '((<gnc:Account*> account))
- "Return the list of Lots for this account.")
-
-;;============
-;; GNCPriceDB
-
-(gw:wrap-as-wct ws '<gnc:PriceDB*> "GNCPriceDB *" "const GNCPriceDB *")
-(gw:wrap-as-wct ws '<gnc:Price*> "GNCPrice *" "const GNCPrice *")
-
-(gw:wrap-function
- ws
- 'gnc:price-create
- '<gnc:Price*>
- "gnc_price_create"
- '((<gnc:Book*> book))
- "Create and return a new price.")
-
-(gw:wrap-function
- ws
- 'gnc:price-get-guid
- '<gnc:guid-scm>
- "gnc_price_return_guid"
- '((<gnc:Price*> a))
- "Get the GUID of a price.")
-
-(gw:wrap-function
- ws
- 'gnc:price-unref
- '<gw:void>
- "gnc_price_unref"
- '((<gnc:Price*> p))
- "Indicate you're finished with this price.")
-
-(gw:wrap-function
- ws
- 'gnc:price-set-commodity
- '<gw:void>
- "gnc_price_set_commodity"
- '((<gnc:Price*> p) (<gnc:commodity*> c))
- "Set the price's commodity.")
-
-(gw:wrap-function
- ws
- 'gnc:price-set-currency
- '<gw:void>
- "gnc_price_set_currency"
- '((<gnc:Price*> p) (<gnc:commodity*> c))
- "Set the price's currency.")
-
-(gw:wrap-function
- ws
- 'gnc:price-set-time
- '<gw:void>
- "gnc_price_set_time"
- '((<gnc:Price*> p) (<gnc:time-pair> t))
- "Set the price's time stamp.")
-
-(gw:wrap-function
- ws
- 'gnc:price-set-source
- '<gw:void>
- "gnc_price_set_source"
- '((<gnc:Price*> p) ((<gw:mchars> caller-owned) src))
- "Set the price's source.")
-
-(gw:wrap-function
- ws
- 'gnc:price-set-type
- '<gw:void>
- "gnc_price_set_type"
- '((<gnc:Price*> p) ((<gw:mchars> caller-owned) type))
- "Set the price's type.")
-
-(gw:wrap-function
- ws
- 'gnc:price-set-value
- '<gw:void>
- "gnc_price_set_value"
- '((<gnc:Price*> p) (<gnc:numeric> value))
- "Set the price's value.")
-
-(gw:wrap-function
- ws
- 'gnc:price-get-value
- '<gnc:numeric>
- "gnc_price_get_value"
- '((<gnc:Price*> p))
- "Get the price's value")
-
-(gw:wrap-function
- ws
- 'gnc:price-get-commodity
- '<gnc:commodity*>
- "gnc_price_get_commodity"
- '((<gnc:Price*> p))
- "Get the commodity this price is for.")
-
-(gw:wrap-function
- ws
- 'gnc:price-get-currency
- '<gnc:commodity*>
- "gnc_price_get_currency"
- '((<gnc:Price*> p))
- "Get the currency (commodity) this price's value is denominated in.")
-
-(gw:wrap-function
- ws
- 'gnc:price-get-time
- '<gnc:time-pair>
- "gnc_price_get_time"
- '((<gnc:Price*> p))
- "Get the time stamp of this price.")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-add-price
- '<gw:bool>
- "gnc_pricedb_add_price"
- '((<gnc:PriceDB*> db) (<gnc:Price*> p))
- "Add a price to the DB. Unref the price when you're finished with it.")
-
-(gw:wrap-function
- ws
- 'gnc:price-list-destroy
- '<gw:void>
- "gnc_price_list_destroy"
- '(((gw:glist-of <gnc:Price*> callee-owned) prices))
- "Destroys a gnc price list unrefing the prices included in the list")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-lookup-latest
- '<gnc:Price*>
- "gnc_pricedb_lookup_latest"
- '((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity) (<gnc:commodity*> currency))
- "Returns the latest price. Unref the price when you're finished with it.")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-lookup-latest-any-currency
- '(gw:glist-of <gnc:Price*> caller-owned)
- "gnc_pricedb_lookup_latest_any_currency"
- '((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity))
- "Returns the latest price(s) in any currency available.")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-lookup-nearest-in-time
- '<gnc:Price*>
- "gnc_pricedb_lookup_nearest_in_time"
- '((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity) (<gnc:commodity*> currency)
- (<gnc:time-pair> t))
- "Returns the price quote nearest to t. Unref price when finished with it.")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-lookup-nearest-in-time-any-currency
- '(gw:glist-of <gnc:Price*> caller-owned)
- "gnc_pricedb_lookup_nearest_in_time_any_currency"
- '((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity) (<gnc:time-pair> t))
- "Returns the price(s) nearest to t in any currency available.")
-
-
-(gw:wrap-function
-ws
-'gnc:pricedb-lookup-latest-before
-'<gnc:Price*>
-"gnc_pricedb_lookup_latest_before"
-'((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity) (<gnc:commodity*> currency)
- (<gnc:time-pair> t))
-"Returns the latest price quote <= t. Unref price when finished with it.")
-
-(gw:wrap-function
-ws
-'gnc:pricedb-lookup-latest-before-any-currency
-'(gw:glist-of <gnc:Price*> caller-owned)
-"gnc_pricedb_lookup_latest_before_any_currency"
-'((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity) (<gnc:time-pair> t))
-"Returns the latest price quote(s) <= t in any currency available.")
-
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-get-prices
- '(gw:glist-of <gnc:Price*> caller-owned)
- "gnc_pricedb_get_prices"
- '((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity)
- (<gnc:commodity*> currency))
- "Get all prices for commodity in currency.")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-lookup-at-time
- '(gw:glist-of <gnc:Price*> caller-owned)
- "gnc_pricedb_lookup_at_time"
- '((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity) (<gnc:commodity*> currency)
- (<gnc:time-pair> t))
- "Lookup a price at time t.")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-lookup-day
- '(gw:glist-of <gnc:Price*> caller-owned)
- "gnc_pricedb_lookup_day"
- '((<gnc:PriceDB*> db)
- (<gnc:commodity*> commodity) (<gnc:commodity*> currency)
- (<gnc:time-pair> t))
- "Lookup a price on the day specified by time t.")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-convert-balance-latest-price
- '<gnc:numeric>
- "gnc_pricedb_convert_balance_latest_price"
- '((<gnc:PriceDB*> db)
- (<gnc:numeric> balance)
- (<gnc:commodity*> balance_commodity) (<gnc:commodity*> new_currency))
- "convert balance in commodity balance_commodity to new_currency using latest price.")
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-convert-balance-nearest-price
- '<gnc:numeric>
- "gnc_pricedb_convert_balance_nearest_price"
- '((<gnc:PriceDB*> db)
- (<gnc:numeric> balance)
- (<gnc:commodity*> balance_commodity) (<gnc:commodity*> new_currency)
- (<gnc:time-pair> t))
- "convert balance in commodity balance_commodity to new_currency using nearest price
-to time t.")
-
-
-(gw:wrap-function
- ws
- 'gnc:pricedb-convert-balance-latest-before
- '<gnc:numeric>
- "gnc_pricedb_convert_balance_latest_before"
- '((<gnc:PriceDB*> db)
- (<gnc:numeric> balance)
- (<gnc:commodity*> balance_commodity) (<gnc:commodity*> new_currency)
- (<gnc:time-pair> t))
- "convert balance in commodity balance_commodity to new_currency using latest price
-prior to time t.")
-
-
-;;===========
-;; QofSession
-
-(gw:wrap-function
- ws
- 'gnc:session-new
- '<gnc:Session*>
- "qof_session_new" '()
- "Create a new session.")
-
-(gw:wrap-function
- ws
- 'gnc:session-destroy
- '<gw:void>
- "qof_session_destroy"
- '((<gnc:Session*> session))
- "Destroy the given session.")
-
-(gw:wrap-function
- ws
- 'gnc:session-get-book
- '<gnc:Book*>
- "qof_session_get_book"
- '((<gnc:Session*> session))
- "Get the book of the given session.")
-
-(gw:wrap-function
- ws
- 'gnc:session-begin
- '<gw:void>
- "qof_session_begin"
- '((<gnc:Session*> session)
- ((<gw:mchars> caller-owned const) id)
- (<gw:bool> ignore-lock?)
- (<gw:bool> create-if-nonexistent?))
- "Setup the session for use.")
-
-(gw:wrap-function
- ws
- 'gnc:session-load
- '<gw:void>
- "gnc_session_scm_load"
- '((<gnc:Session*> session))
- "Load the data associated with the given session.")
-
-(gw:wrap-function
- ws
- 'gnc:session-save
- '<gw:void>
- "gnc_session_scm_save"
- '((<gnc:Session*> session))
- "Save the data in the session.")
-
-(gw:wrap-function
- ws
- 'gnc:session-set-callback
- '<gw:void>
- "gnc_session_scm_set_callback"
- '((<gw:scm> callback))
- "Setup a callback for the load/save functions to provide progress
-reports. This function will be called with a string and an integer
-argument between 0 and 100 (inclusive).")
-
-(gw:wrap-function
- ws
- 'gnc:session-end
- '<gw:void>
- "qof_session_end"
- '((<gnc:Session*> session))
- "Indicate you're finished with the session.")
-
-(gw:wrap-function
- ws
- 'gnc:book-get-group
- '<gnc:AccountGroup*>
- "xaccGetAccountGroup"
- '((<gnc:Book*> book))
- "Get the book's account group.")
-
-(gw:wrap-function
- ws
- 'gnc:book-get-template-group
- '<gnc:AccountGroup*>
- "gnc_book_get_template_group"
- '((<gnc:Book*> book))
- "Get the book's template account group.")
-
-(gw:wrap-function
- ws
- 'gnc:book-get-commodity-table
- '<gnc:commodity-table*>
- "gnc_commodity_table_get_table"
- '((<gnc:Book*> book))
- "Get the book's commodity table.")
-
-(gw:wrap-function
- ws
- 'gnc:book-get-pricedb
- '<gnc:PriceDB*>
- "gnc_pricedb_get_db"
- '((<gnc:Book*> book))
- "Get the book's pricedb.")
-
-(gw:wrap-function
- ws
- 'gnc:book-kvp-changed
- '<gw:void>
- "qof_book_kvp_changed"
- '((<gnc:Book*> book))
- "Set the flag that the Book's kvp changed.")
-
-(gw:wrap-function
- ws
- 'gnc:session-get-error
- '<gnc:BackendError>
- "qof_session_get_error"
- '((<gnc:Session*> session))
- "Check for a pending error.")
-
-(gw:wrap-function
- ws
- 'gnc:session-get-url
- '(<gw:mchars> callee-owned const)
- "qof_session_get_url"
- '((<gnc:Session*> session))
- "Return the URL of the opened session.")
-
-(gw:wrap-function
- ws
- 'gnc:session-pop-error
- '<gnc:BackendError>
- "qof_session_pop_error"
- '((<gnc:Session*> session))
- "Remove an error, if any, from the error stack.")
-
-(gw:wrap-function
- ws
- 'gnc:set-log-level-global
- '<gw:void>
- "qof_log_set_level_registered"
- '((<gw:int> level))
- "Set the logging level for all modules to level.")
-
-(gw:wrap-function
- ws
- 'gnc:print-date
- '(<gw:mchars> callee-owned const)
- "gnc_print_date"
- '((<gnc:time-pair> date))
- "Returns a string with the date formatted according to the
-current settings")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-destroy
- '<gw:void>
- "xaccTransDestroy"
- '((<gnc:Transaction*> t))
- "Destroys the transaction in question.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-begin-edit
- '<gw:void>
- "xaccTransBeginEdit"
- '((<gnc:Transaction*> t))
- "Start an edit session on a transaction.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-commit-edit
- '<gw:void>
- "xaccTransCommitEdit"
- '((<gnc:Transaction*> t))
- "Commit edits to a transaction.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-is-open
- '<gw:bool>
- "xaccTransIsOpen"
- '((<gnc:Transaction*> t))
- "Returns true if the transaction t is open for editing.")
-
-(gw:wrap-function
- ws
- 'gnc:split-destroy
- '<gw:void>
- "xaccSplitDestroy"
- '((<gnc:Split*> s))
- "Destroys the split in question. Probably only useful inside the context
-of having a parent transaction with which one is working...")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-append-split
- '<gw:void>
- "xaccTransAppendSplit"
- '((<gnc:Transaction*> t) (<gnc:Split*> s))
- "Adds a split to a transaction.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-set-date
- '<gw:void>
- "xaccTransSetDate"
- '((<gnc:Transaction*> t)
- (<gw:int> day)
- (<gw:int> month)
- (<gw:int> year))
- "Set date on transaction based on day, month, year values")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-set-date-time-pair
- '<gw:void>
- "gnc_transaction_set_date"
- '((<gnc:Transaction*> t) (<gnc:time-pair> date))
- "Set date on transaction based on the time-pair")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-set-xnum
- '<gw:void>
- "xaccTransSetNum"
- '((<gnc:Transaction*> t) ((<gw:mchars> caller-owned const) xnum))
- "Set the XNUM - e.g. - cheque number or other identifier")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-set-description
- '<gw:void>
- "xaccTransSetDescription"
- '((<gnc:Transaction*> t) ((<gw:mchars> caller-owned const) desc))
- "Set the transaction description.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-set-notes
- '<gw:void>
- "xaccTransSetNotes"
- '((<gnc:Transaction*> t) ((<gw:mchars> caller-owned const) notes))
- "Set the transaction notes field.")
-
-(gw:wrap-function
- ws
- 'gnc:transaction-create
- '<gnc:Transaction*>
- "xaccMallocTransaction"
- '((<gnc:Book*> book>))
- "Create a Transaction structure")
-
-(gw:wrap-function
- ws
- 'gnc:split-create
- '<gnc:Split*>
- "xaccMallocSplit"
- '((<gnc:Book*> book>>))
- "Create a Split structure")
-
-(gw:wrap-function
- ws
- 'gnc:split-set-value
- '<gw:void>
- "xaccSplitSetValue"
- '((<gnc:Split*> s) (<gnc:numeric> amount))
- "Set value for split")
-
-(gw:wrap-function
- ws
- 'gnc:split-set-base-value
- '<gw:void>
- "xaccSplitSetBaseValue"
- '((<gnc:Split*> s)
- (<gnc:numeric> amount)
- (<gnc:commodity*> currency))
- "Set value for split with currency")
-
-(gw:wrap-function
- ws
- 'gnc:split-set-memo
- '<gw:void>
- "xaccSplitSetMemo"
- '((<gnc:Split*> s) ((<gw:mchars> caller-owned const) memo))
- "Set memo for a split")
-
-(gw:wrap-function
- ws
- 'gnc:split-set-action
- '<gw:void>
- "xaccSplitSetAction"
- '((<gnc:Split*> s) ((<gw:mchars> caller-owned const) action))
- "Set Action for a split.")
-
-(gw:wrap-function
- ws
- 'gnc:split-set-reconcile
- '<gw:void>
- "xaccSplitSetReconcile"
- '((<gnc:Split*> s) (<gw:char> value))
- "Set reconcile state for split entry")
-
-(gw:wrap-function
- ws
- 'gnc:split-set-share-price
- '<gw:void>
- "xaccSplitSetSharePrice"
- '((<gnc:Split*> s) (<gnc:numeric> value))
- "Set share price for split entry")
-
-(gw:wrap-function
- ws
- 'gnc:split-set-amount
- '<gw:void>
- "xaccSplitSetAmount"
- '((<gnc:Split*> s) (<gnc:numeric> value))
- "Set amount for split entry")
-
-(gw:wrap-function
- ws
- 'gnc:split-set-share-price-and-amount
- '<gw:void>
- "xaccSplitSetSharePriceAndAmount"
- '((<gnc:Split*> s)
- (<gnc:numeric> price)
- (<gnc:numeric> amount))
- "Set the share price and amount for split entry")
-
-(gw:wrap-function
- ws
- 'gnc:malloc-query
- '<gnc:Query*>
- "xaccMallocQuery"
- '()
- "Create a new (empty) Query structure to search for splits.")
-
-(gw:wrap-function
- ws
- 'gnc:query-create
- '<gnc:Query*>
- "qof_query_create"
- '()
- "Create a new (empty) Query structure.")
-
-(gw:wrap-function
- ws
- 'gnc:query-create-for
- '<gnc:Query*>
- "qof_query_create_for"
- '((<gnc:id-type> obj-type))
- "Create a new (empty) Query structure to search for the supplied type.")
-
-(gw:wrap-function
- ws
- 'gnc:query-search-for
- '<gw:void>
- "qof_query_search_for"
- '((<gnc:Query*> q) (<gnc:id-type> obj-type))
- "Set the object-type to search for.")
-
-(gw:wrap-function
- ws
- 'gnc:free-query
- '<gw:void>
- "xaccFreeQuery"
- '((<gnc:Query*> q))
- "Delete the Query and its terms.")
-
-(gw:wrap-function
- ws
- 'gnc:query-set-book
- '<gw:void>
- "xaccQuerySetBook"
- '((<gnc:Query*> q) (<gnc:Book*> book))
- "Set the book that a query pertains to.")
-
-(gw:wrap-function
- ws
- 'gnc:query-invert
- '<gnc:Query*>
- "xaccQueryInvert"
- '((<gnc:Query*> q))
- "Logically invert a Query (returns a newly-allocated Query object)")
-
-(gw:wrap-function
- ws
- 'gnc:query-merge
- '<gnc:Query*>
- "xaccQueryMerge"
- '((<gnc:Query*> q1) (<gnc:Query*> q2) (<gnc:query-op> qop))
- "Merge two queries (returns a newly allocated object")
-
-(gw:wrap-function
- ws
- 'gnc:query-clear
- '<gw:void>
- "xaccQueryClear"
- '((<gnc:Query*> q))
- "Clear the terms from a query object")
-
-(gw:wrap-function
- ws
- 'gnc:query-purge-terms
- '<gw:void>
- "qof_query_purge_terms"
- '((<gnc:Query*> q) ((gw:gslist-of <gnc:id-type> caller-owned) param-path))
- "Remove query terms of a particular parameter-path.")
-
-(gw:wrap-function
- ws
- 'gnc:query-has-terms?
- '<gw:bool>
- "xaccQueryHasTerms"
- '((<gnc:Query*> q))
- "Check if a Query is clear or has terms.")
-
-(gw:wrap-function
- ws
- 'gnc:query-get-splits
- '(gw:glist-of <gnc:Split*> callee-owned)
- "xaccQueryGetSplits"
- '((<gnc:Query*> q))
- "Return a list of splits matching the Query.")
-
-(gw:wrap-function
- ws
- 'gnc:query-get-splits-unique-trans
- '(gw:glist-of <gnc:Split*> caller-owned)
- "xaccQueryGetSplitsUniqueTrans"
- '((<gnc:Query*> q))
- "Return a list of splits matching the Query, but at most one per transaction")
-
-(gw:wrap-function
- ws
- 'gnc:query-get-transactions
- '(gw:glist-of <gnc:Transaction*> caller-owned)
- "xaccQueryGetTransactions"
- '((<gnc:Query*> q) (<gnc:query-txn-match-t> rt))
- "Find transactions with splits matching the Query.")
-
-(gw:wrap-function
- ws
- 'gnc:query-get-lots
- '(gw:glist-of <gnc:Lot*> caller-owned)
- "xaccQueryGetLots"
- '((<gnc:Query*> q) (<gnc:query-txn-match-t> rt))
- "Find lots with splits matching the Query.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-account-match
- '<gw:void>
- "xaccQueryAddAccountMatch"
- '((<gnc:Query*> q)
- ((gw:glist-of <gnc:Account*> caller-owned) accts)
- (<gnc:guid-match-how> acctmatch)
- (<gnc:query-op> how))
- "Match splits against one or all of a set of accounts.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-single-account-match
- '<gw:void>
- "xaccQueryAddSingleAccountMatch"
- '((<gnc:Query*> q) (<gnc:Account*> acct) (<gnc:query-op> how))
- "Match splits against a single account.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-description-match
- '<gw:void>
- "xaccQueryAddDescriptionMatch"
- '((<gnc:Query*> q)
- ((<gw:mchars> caller-owned const) mstring)
- (<gw:int> case-sens)
- (<gw:int> use-regexp)
- (<gnc:query-op> how))
- "Match splits against the transaction description.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-number-match
- '<gw:void>
- "xaccQueryAddNumberMatch"
- '((<gnc:Query*> q)
- ((<gw:mchars> caller-owned const) mstring)
- (<gw:int> case-sens)
- (<gw:int> use-regexp)
- (<gnc:query-op> how))
- "Match splits against the Number field.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-action-match
- '<gw:void>
- "xaccQueryAddActionMatch"
- '((<gnc:Query*> q)
- ((<gw:mchars> caller-owned const) mstring)
- (<gw:int> case-sens)
- (<gw:int> use-regexp)
- (<gnc:query-op> how))
- "Match splits against the Action field (a string).")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-share-price-match
- '<gw:void>
- "xaccQueryAddSharePriceMatch"
- '((<gnc:Query*> q)
- (<gnc:numeric> amount)
- (<gnc:query-compare-how> mhow)
- (<gnc:query-op> how))
- "Match splits against the share price (including inequalities)")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-shares-match
- '<gw:void>
- "xaccQueryAddSharesMatch"
- '((<gnc:Query*> q)
- (<gnc:numeric> amount)
- (<gnc:query-compare-how> mhow)
- (<gnc:query-op> how))
- "Match splits against the share price (including inequalities)")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-value-match
- '<gw:void>
- "xaccQueryAddValueMatch"
- '((<gnc:Query*> q)
- (<gnc:numeric> amount)
- (<gnc:numeric-match-how> match-sign)
- (<gnc:query-compare-how> mhow)
- (<gnc:query-op> how))
- "Match splits against the value (including inequalities)")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-date-match
- '<gw:void>
- "xaccQueryAddDateMatch"
- '((<gnc:Query*> q)
- (<gw:bool> use-start)
- (<gw:int> st-day)
- (<gw:int> st-mon)
- (<gw:int> st-year)
- (<gw:bool> use-end)
- (<gw:int> end-day)
- (<gw:int> end-mon)
- (<gw:int> end-year)
- (<gnc:query-op> how))
- "Match the transaction date.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-date-match-timepair
- '<gw:void>
- "xaccQueryAddDateMatchTS"
- '((<gnc:Query*> q)
- (<gw:bool> use-start)
- (<gnc:time-pair> start)
- (<gw:bool> use-end)
- (<gnc:time-pair> end)
- (<gnc:query-op> how))
- "Match the transaction date.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-memo-match
- '<gw:void>
- "xaccQueryAddMemoMatch"
- '((<gnc:Query*> q)
- ((<gw:mchars> caller-owned const) mstring)
- (<gw:int> case-sens)
- (<gw:int> use-regexp)
- (<gnc:query-op> how))
- "Match splits against the Memo field.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-cleared-match
- '<gw:void>
- "xaccQueryAddClearedMatch"
- '((<gnc:Query*> q) (<gnc:cleared-match-how> cleared-how) (<gnc:query-op> how))
- "match splits against the cleared state.")
-
-(gw:wrap-function
- ws
- 'gnc:query-add-guid-match
- '<gw:void>
- "xaccQueryAddGUIDMatchGL"
- '((<gnc:Query*> q) ((gw:glist-of <gnc:id-type> callee-owned) param_path)
- (<gnc:guid-scm> guid) (<gnc:query-op> how))
- "Add a GUID match against the specified param_path")
-
-(gw:wrap-function
- ws
- 'gnc:query-set-sort-order
- '<gw:void>
- "qof_query_set_sort_order"
- '((<gnc:Query*> q)
- ((gw:gslist-of <gnc:id-type> callee-owned) primary)
- ((gw:gslist-of <gnc:id-type> callee-owned) secondary)
- ((gw:gslist-of <gnc:id-type> callee-owned) tertiary))
- "set sort order.")
-
-(gw:wrap-function
- ws
- 'gnc:query-set-sort-increasing
- '<gw:void>
- "xaccQuerySetSortIncreasing"
- '((<gnc:Query*> q)
- (<gw:bool> prim-increasing)
- (<gw:bool> sec-increasing)
- (<gw:bool> tert-increasing))
- "sort in increasing rather than decreasing order.")
-
-(gw:wrap-function
- ws
- 'gnc:query-set-max-results
- '<gw:void>
- "qof_query_set_max_results"
- '((<gnc:Query*> q) (<gw:int> n))
- "Set the max number of results to be returned by a query.")
-
-(gw:wrap-function
- ws
- 'gnc:query->scm
- '<gw:scm>
- "gnc_query2scm"
- '((<gnc:Query*> q))
- "Convert a query to an scm representation.")
-
-(gw:wrap-function
- ws
- 'gnc:scm->query
- '<gnc:Query*>
- "gnc_scm2query"
- '((<gw:scm> query_scm))
- "Convert an scm representation of a query to a real query.")
-
-
-;;=============
-;; gnc-commodity
-
-(gw:wrap-function
- ws
- 'gnc:commodity-create
- '<gnc:commodity*>
- "gnc_commodity_new"
- '((<gnc:Book*> book)
- ((<gw:mchars> caller-owned const) fullname)
- ((<gw:mchars> caller-owned const) namespace)
- ((<gw:mchars> caller-owned const) mnemonic)
- ((<gw:mchars> caller-owned const) exchange-code)
- (<gw:int> smallest-fraction) )
- "Create a new gnc_commodity object.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-destroy
- '<gw:void>
- "gnc_commodity_destroy"
- '((<gnc:commodity*> comm))
- "Delete a gnc_commodity structure.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-get-mnemonic
- '(<gw:mchars> callee-owned const)
- "gnc_commodity_get_mnemonic"
- '((<gnc:commodity*> comm))
- "Get the mnemonic (ISO 3-letter string, ticker symbol, etc)")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-get-namespace
- '(<gw:mchars> callee-owned const)
- "gnc_commodity_get_namespace"
- '((<gnc:commodity*> comm))
- "Get the mnemonic's namespace (ISO-4217, NASDAQ, NYSE, etc)")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-get-printname
- '(<gw:mchars> callee-owned const)
- "gnc_commodity_get_printname"
- '((<gnc:commodity*> comm))
- "Get the currency's printable name .. 'USD (US Dollars)'")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-get-fullname
- '(<gw:mchars> callee-owned const)
- "gnc_commodity_get_fullname"
- '((<gnc:commodity*> comm))
- "Get the currency's full name (US Dollars).")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-get-exchange-code
- '(<gw:mchars> callee-owned const)
- "gnc_commodity_get_cusip"
- '((<gnc:commodity*> comm))
- "Get the cusip (exchange specific data, not the stock ticker)")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-get-fraction
- '<gw:int>
- "gnc_commodity_get_fraction"
- '((<gnc:commodity*> comm))
- "Get the number of smallest transactional units per unit of the currency")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-is-currency?
- '<gw:bool>
- "gnc_commodity_is_currency"
- '((<gnc:commodity*> comm))
- "return true if the commodity is an ISO4217 currency")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-equiv?
- '<gw:bool>
- "gnc_commodity_equiv"
- '((<gnc:commodity*> comm1) (<gnc:commodity*> comm2))
- "Return true if the two commodities are equivalent.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-new
- '<gnc:commodity-table*>
- "gnc_commodity_table_new"
- '()
- "Return a new commodity table.");
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-lookup
- '<gnc:commodity*>
- "gnc_commodity_table_lookup"
- '((<gnc:commodity-table*> table)
- ((<gw:mchars> caller-owned const) namespace)
- ((<gw:mchars> caller-owned const) mnemonic))
- "Find a known gnc_commodity structure.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-find-full
- '<gnc:commodity*>
- "gnc_commodity_table_find_full"
- '((<gnc:commodity-table*> table)
- ((<gw:mchars> caller-owned const) namespace)
- ((<gw:mchars> caller-owned const) printname))
- "Find a gnc_commodity structure from its printable name.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-insert
- '<gnc:commodity*>
- "gnc_commodity_table_insert"
- '((<gnc:commodity-table*> table)
- (<gnc:commodity*> commodity))
- "Add a commodity to the table.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-has-namespace
- '<gw:bool>
- "gnc_commodity_table_has_namespace"
- '((<gnc:commodity-table*> table)
- ((<gw:mchars> caller-owned const) namespace))
- "Predicate to test for existence of a namespace.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-get-namespaces
- '(gw:glist-of (<gw:mchars> callee-owned) callee-owned)
- "gnc_commodity_table_get_namespaces"
- '((<gnc:commodity-table*> table))
- "Return a list of all the namespaces in the table.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-add-namespace
- '<gnc:commodity-namespace*>
- "gnc_commodity_table_add_namespace"
- '((<gnc:commodity-table*> table)
- ((<gw:mchars> caller-owned const) namespace)
- (<gnc:Book*> book))
- "Add a new namespace to the commodity table")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-delete-namespace
- '<gw:void>
- "gnc_commodity_table_delete_namespace"
- '((<gnc:commodity-table*> table)
- ((<gw:mchars> caller-owned const) namespace))
- "Delete a namespace from the commodity table")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-get-commodities
- '(gw:glist-of <gnc:commodity*> caller-owned)
- "gnc_commodity_table_get_commodities"
- '((<gnc:commodity-table*> table)
- ((<gw:mchars> caller-owned const) namespace))
- "Return a list of all the commodities in a given namespace in the table.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-get-quotable-commodities
- '(gw:glist-of <gnc:commodity*> caller-owned)
- "gnc_commodity_table_get_quotable_commodities"
- '((<gnc:commodity-table*> table))
- "Return a list of all the quotable commodities in a given namespace in the table.")
-
-(gw:wrap-function
- ws
- 'gnc:commodity-table-add-default-data
- '<gw:bool>
- "gnc_commodity_table_add_default_data"
- '((<gnc:commodity-table*> table)
- (<gnc:Book*> book))
- "Add default commodities to the commodity table.")
-
-;;=========
-
-(gw:wrap-function
- ws
- 'gnc:engine-shutdown
- '<gw:void>
- "gnc_engine_shutdown"
- '()
- "Shutdown the gnucash engine.")
-
-;;============
-;; gnc_numeric
-
-(gw:wrap-function
- ws
- 'gnc:numeric-create
- '<gnc:numeric>
- "gnc_numeric_create"
- '((<gw:gint64> num) (<gw:gint64> denom))
- "Create a new gnc_numeric object")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-zero
- '<gnc:numeric>
- "gnc_numeric_zero"
- '()
- "Create a zero-valued gnc_numeric")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-error
- '<gnc:numeric>
- "gnc_numeric_error"
- '((<gw:int> code))
- "Create an error-signaling gnc_numeric")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-check
- '<gw:int>
- "gnc_numeric_check"
- '((<gnc:numeric> val))
- "Check for error code in a gnc_numeric")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-num
- '<gw:gint64>
- "gnc_numeric_num"
- '((<gnc:numeric> arg))
- "Return the numerator of a gnc_numeric")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-denom
- '<gw:gint64>
- "gnc_numeric_denom"
- '((<gnc:numeric> arg))
- "Return the denominator of a gnc_numeric")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-zero-p
- '<gw:bool>
- "gnc_numeric_zero_p"
- '((<gnc:numeric> arg))
- "Check for zero.")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-compare
- '<gw:int>
- "gnc_numeric_compare"
- '((<gnc:numeric> arg1) (<gnc:numeric> arg2))
- "Compare 2 gnc_numeric (1 if a>b, 0 if a==b, -1 if a<b)")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-negative-p
- '<gw:bool>
- "gnc_numeric_negative_p"
- '((<gnc:numeric> arg))
- "Check for arg < 0")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-positive-p
- '<gw:bool>
- "gnc_numeric_positive_p"
- '((<gnc:numeric> arg))
- "Check for arg > 0")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-eq
- '<gw:bool>
- "gnc_numeric_eq"
- '((<gnc:numeric> arg1) (<gnc:numeric> arg2))
- "Check for arg1 exactly arg2")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-equal
- '<gw:bool>
- "gnc_numeric_equal"
- '((<gnc:numeric> arg1) (<gnc:numeric> arg2))
- "Check for arg1 same number as arg2")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-same
- '<gw:bool>
- "gnc_numeric_same"
- '((<gnc:numeric> arg1)
- (<gnc:numeric> arg2)
- (<gw:gint64> denom)
- (<gw:int> how))
- "Check for arg1 same number as arg2 if converted to common denom")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-add
- '<gnc:numeric>
- "gnc_numeric_add"
- '((<gnc:numeric> arg1)
- (<gnc:numeric> arg2)
- (<gw:gint64> denom)
- (<gw:int> how))
- "Return a+b")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-sub
- '<gnc:numeric>
- "gnc_numeric_sub"
- '((<gnc:numeric> arg1)
- (<gnc:numeric> arg2)
- (<gw:gint64> denom)
- (<gw:int> how))
- "Return a-b")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-mul
- '<gnc:numeric>
- "gnc_numeric_mul"
- '((<gnc:numeric> arg1)
- (<gnc:numeric> arg2)
- (<gw:gint64> denom)
- (<gw:int> how))
- "Return a*b")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-div
- '<gnc:numeric>
- "gnc_numeric_div"
- '((<gnc:numeric> arg1)
- (<gnc:numeric> arg2)
- (<gw:gint64> denom)
- (<gw:int> how))
- "Return a/b")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-neg
- '<gnc:numeric>
- "gnc_numeric_neg"
- '((<gnc:numeric> arg))
- "Return -a")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-abs
- '<gnc:numeric>
- "gnc_numeric_abs"
- '((<gnc:numeric> arg))
- "Return |a|")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-add-fixed
- '<gnc:numeric>
- "gnc_numeric_add_fixed"
- '((<gnc:numeric> arg1) (<gnc:numeric> arg2))
- "Return a+b under strict fixed-denom rules")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-sub-fixed
- '<gnc:numeric>
- "gnc_numeric_sub_fixed"
- '((<gnc:numeric> arg1) (<gnc:numeric> arg2))
- "Return a-b under strict fixed-denom rules")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-convert
- '<gnc:numeric>
- "gnc_numeric_convert"
- '((<gnc:numeric> arg) (<gw:gint64> denom) (<gw:int> how))
- "Convert a gnc_numeric to a new denominator")
-
-(gw:wrap-function
- ws
- 'gnc:double-to-gnc-numeric
- '<gnc:numeric>
- "double_to_gnc_numeric"
- '((<gw:double> in) (<gw:gint64> denom) (<gw:int> how))
- "Convert <gw:double> to gnc_numeric")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-to-double
- '<gw:double>
- "gnc_numeric_to_double"
- '((<gnc:numeric> in))
- "Convert gnc_numeric to double")
-
-(gw:wrap-function
- ws
- 'gnc:numeric-to-string
- '(<gw:mchars> caller-owned const)
- "gnc_numeric_to_string"
- '((<gnc:numeric> arg))
- "Convert gnc_numeric to a printable string")
-
-;; gnc-date.h
-
-(gw:wrap-function
- ws
- 'gnc:timepair-canonical-day-time
- '<gnc:time-pair>
- "timespecCanonicalDayTime"
- '((<gnc:time-pair> tp))
- "Convert a timepair on a certain day (localtime) to\
-the timepair representing midday on that day")
-
-;;
-;; gnc-filepath-utils.h
-;;
-
-(gw:wrap-function
- ws
- 'gnc:build-dotgnucash-path
- '(<gw:mchars> caller-owned)
- "gnc_build_dotgnucash_path"
- '(((<gw:mchars> caller-owned) filename))
- "Convert a relative path name into a full path name in the .gnucash directory")
-
-(gw:wrap-function
- ws
- 'gnc:build-book-path
- '(<gw:mchars> caller-owned)
- "gnc_build_book_path"
- '(((<gw:mchars> caller-owned) filename))
- "Convert a relative path name into a full path name in the .gnucash/books directory")
-
-;;
-;; gnc-lot.h
-;;
-
-(gw:wrap-function
- ws
- 'gnc:lot-get-balance
- '<gnc:numeric>
- "gnc_lot_get_balance"
- '((<gnc:Lot*> lot))
- "Return the balance of the lot")
-
-(gw:wrap-function
- ws
- 'gnc:lot-closed?
- '<gw:bool>
- "gnc_lot_is_closed"
- '((<gnc:Lot*> lot))
- "Is this Lot closed (is the balance zero)?")
-
-(gw:wrap-function
- ws
- 'gnc:lot-get-splits
- '(gw:glist-of <gnc:Split*> callee-owned)
- "gnc_lot_get_split_list"
- '((<gnc:Lot*> lot))
- "Return the list of splits attached to this lot.")
-
-(gw:wrap-function
- ws
- 'qof:event-suspend
- '<gw:void>
- "qof_event_suspend"
- '()
- "Suspend all engine events.")
-
-(gw:wrap-function
- ws
- 'qof:event-resume
- '<gw:void>
- "qof_event_resume"
- '()
- "Resume engine event generation.")
-
-(gw:wrap-function
- ws
- 'gnc:quote-source-set-fq-installed
- '<gw:void>
- "gnc_quote_source_set_fq_installed"
- '(((gw:glist-of (<gw:mchars> callee-owned) callee-owned) choices))
- "Takes a list of installed Finance::Quote souces and records it internally.")
-
-
-;; Budget functions
-
-(gw:wrap-as-wct ws '<gnc:Budget*> "GncBudget *" "const GncBudget *")
-
-(gw:wrap-function
- ws
- 'gnc:budget-get-guid
- '<gnc:guid-scm>
- "gnc_budget_return_guid"
- '((<gnc:Budget*> budget))
- "Gets the guid of the budget")
-
-
-(gw:wrap-function
- ws
- 'gnc:budget-lookup
- '<gnc:Budget*>
- "gnc_budget_lookup_direct"
- '((<gnc:guid-scm> guid)
- (<gnc:Book*> book))
- "Lookup a budget from its GUID.")
-
-
-(gw:wrap-function
- ws
- 'gnc:budget-get-default
- '<gnc:Budget*>
- "gnc_budget_get_default"
- '((<gnc:Book*> book))
- "Get the default budget for the book.")
-
-
-(gw:wrap-function
- ws
- 'gnc:budget-get-name
- '(<gw:mchars> callee-owned const)
- "gnc_budget_get_name"
- '((<gnc:Budget*> budget))
- "Get the brief name for the budget.")
-
-(gw:wrap-function
- ws
- 'gnc:budget-get-num-periods
- '<gw:unsigned-int>
- "gnc_budget_get_num_periods"
- '((<gnc:Budget*> budget))
- "Get the number of periods in a budget.")
-
-(gw:wrap-function
- ws
- 'gnc:budget-is-account-period-value-set
- '<gw:bool>
- "gnc_budget_is_account_period_value_set"
- '((<gnc:Budget*> budget)
- (<gnc:Account*> acct)
- (<gw:unsigned-int> period_num)
- )
- "Determine if the given account and budget period has a budgeted value.")
-
-(gw:wrap-function
- ws
- 'gnc:budget-get-account-period-value
- '<gnc:numeric>
- "gnc_budget_get_account_period_value"
- '((<gnc:Budget*> budget)
- (<gnc:Account*> acct)
- (<gw:unsigned-int> period_num)
- )
- "Get the budgeted value for the given account and budget period.")
-
-(gw:wrap-function
- ws
- 'gnc:budget-get-account-period-actual-value
- '<gnc:numeric>
- "gnc_budget_get_account_period_actual_value"
- '((<gnc:Budget*> budget)
- (<gnc:Account*> acct)
- (<gw:unsigned-int> period_num)
- )
- "Get the actual account value for the given account and budget period.")
-
-(gw:wrap-function
- ws
- 'gnc:budget-get-period-start-date
- '<gnc:time-pair>
- "gnc_budget_get_period_start_date"
- '((<gnc:Budget*> budget)
- (<gw:unsigned-int> period_num)
- )
- "Get the date that the given period begins.")
-
-;;
-;; gnc-hooks-scm.h
-;; (and gnc-hooks.h)
-;;
-(gw:wrap-function
- ws
- 'gnc:hook-define
- '(<gw:mchars> caller-owned)
- "gnc_hook_create"
- '(((<gw:mchars> caller-owned) name) (<gw:int> how) ((<gw:mchars> caller-owned) desc))
- "Define (create) a new hook")
-
-(gw:wrap-function
- ws
- 'gnc:hook-get-description
- '(<gw:mchars> callee-owned)
- "gnc_hook_get_description"
- '(((<gw:mchars> caller-owned) hook))
- "Get the description of a hook")
-
-(gw:wrap-function
- ws
- 'gnc:hook-add-dangler
- '<gw:void>
- "gnc_hook_add_scm_dangler"
- '(((<gw:mchars> caller-owned) hook) (<gw:scm> procedure))
- "Add a hook dangler to an existing hook")
-
-(gw:wrap-function
- ws
- 'gnc:hook-remove-dangler
- '<gw:void>
- "gnc_hook_del_scm_dangler"
- '(((<gw:mchars> caller-owned) hook) (<gw:scm> procedure))
- "Remove a hook dangler from an existing hook")
-
-(gw:wrap-function
- ws
- 'gnc:hook-run-danglers-real
- '<gw:void>
- "gnc_hook_run"
- '(((<gw:mchars> caller-owned) name) (<gnc:Session*> arg))
- "Run the danglers on a hook.")
-
-; Now wrap all the 'known' hooks
-(gw:wrap-value ws 'gnc:*new-book-hook*
- '(<gw:mchars> callee-owned) "HOOK_NEW_BOOK")
-(gw:wrap-value ws 'gnc:*report-hook*
- '(<gw:mchars> callee-owned) "HOOK_REPORT")
-(gw:wrap-value ws 'gnc:*save-options-hook*
- '(<gw:mchars> callee-owned) "HOOK_SAVE_OPTIONS")
-(gw:wrap-value ws 'gnc:*book-opened-hook*
- '(<gw:mchars> callee-owned) "HOOK_BOOK_OPENED")
-(gw:wrap-value ws 'gnc:*book-closed-hook*
- '(<gw:mchars> callee-owned) "HOOK_BOOK_CLOSED")
Deleted: gnucash/trunk/src/engine/gw-kvp-spec.scm
===================================================================
--- gnucash/trunk/src/engine/gw-kvp-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/gw-kvp-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,108 +0,0 @@
-(define-module (g-wrapped gw-kvp-spec))
-
-;; g-wrap modules
-(use-modules (g-wrap))
-(use-modules (g-wrap simple-type))
-
-;; g-wrap wrapped modules
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-;; other wrapped modules
-(use-modules (g-wrapped gw-engine-spec))
-
-(let ((ws (gw:new-wrapset "gw-kvp")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
- (gw:wrapset-depends-on ws "gw-glib")
-
- (gw:wrapset-depends-on ws "gw-engine")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-kvp))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <qof.h>\n"
- "#include <kvp-scm.h>\n"
- "#include <Transaction.h>\n")))
-
- (gw:wrap-as-wct ws '<gnc:kvp-frame*> "KvpFrame*" "const KvpFrame*")
-
- (gw:wrap-simple-type
- ws
- '<gnc:kvp-value*> "KvpValue*"
- '("gnc_kvp_value_ptr_p(" scm-var ")")
- '(c-var " = gnc_scm_to_kvp_value_ptr(" scm-var ");\n")
- '(scm-var " = gnc_kvp_value_ptr_to_scm(" c-var ");\n"))
-
- (gw:wrap-function
- ws
- 'gnc:kvp-frame-delete-at-path
- '<gw:void>
- "gnc_kvp_frame_delete_at_path"
- '((<gnc:kvp-frame*> f)
- ((gw:gslist-of (<gw:mchars> caller-owned const) caller-owned) key-path))
- "Deletes the KvpFrame at the key-path in frame f")
-
- (gw:wrap-function
- ws
- 'gnc:kvp-frame-set-slot
- '<gw:void>
- "kvp_frame_set_slot"
- '((<gnc:kvp-frame*> k)
- ((<gw:mchars> caller-owned const) c)
- (<gnc:kvp-value*> v))
- "Sets the slot c in frame k to the value v")
-
- (gw:wrap-function
- ws
- 'gnc:kvp-frame-get-slot
- '<gnc:kvp-value*>
- "kvp_frame_get_slot"
- '((<gnc:kvp-frame*> k) ((<gw:mchars> caller-owned const) c))
- "Gets the slot c from frame k")
-
- (gw:wrap-function
- ws
- 'gnc:kvp-frame-set-slot-path
- '<gw:void>
- "kvp_frame_set_slot_path_gslist"
- '((<gnc:kvp-frame*> k) (<gnc:kvp-value*> v)
- ((gw:gslist-of (<gw:mchars> caller-owned const) caller-owned) key-path))
- "Sets the path key-path in frame k to the value v")
-
- (gw:wrap-function
- ws
- 'gnc:kvp-frame-get-slot-path
- '<gnc:kvp-value*>
- "kvp_frame_get_slot_path_gslist"
- '((<gnc:kvp-frame*> k)
- ((gw:gslist-of (<gw:mchars> caller-owned const) caller-owned) key-path))
- "Gets the value at slots key-path in frame k")
-
- ;;
- ;; functions to get kvp-frames
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:transaction-get-slots
- '<gnc:kvp-frame*>
- "xaccTransGetSlots"
- '((<gnc:Transaction*> s))
- "Get the transaction's slots.")
-
- (gw:wrap-function
- ws
- 'gnc:book-get-slots
- '<gnc:kvp-frame*>
- "qof_book_get_slots"
- '((<gnc:Book*> b))
- "Get the book's slots.")
-)
-
Modified: gnucash/trunk/src/engine/kvp-scm.c
===================================================================
--- gnucash/trunk/src/engine/kvp-scm.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/kvp-scm.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,12 +1,12 @@
#include "config.h"
#include <qof.h>
-#include <g-wrap-wct.h>
#include <libguile.h>
#include <engine-helpers.h>
#include "kvp-scm.h"
#include "guile-mappings.h"
+#include "swig-runtime.h"
int
gnc_kvp_value_ptr_p(SCM arg)
@@ -53,10 +53,12 @@
ret = kvp_value_new_string(newstr);
return ret;
}
- else if(gw_wcp_p(val) &&
- gw_wcp_is_of_type_p(scm_c_eval_string("<gnc:kvp-frame*>"), val))
+ else if(SWIG_IsPointerOfType(val, SWIG_TypeQuery("_p_KvpFrame")))
{
- KvpFrame *frame = gw_wcp_get_ptr(val);
+ #define FUNC_NAME __FUNCTION__
+ KvpFrame *frame = SWIG_MustGetPtr(val, SWIG_TypeQuery("_p_KvpFrame"),
+ 1, 0);
+ #undef FUNC_NAME
return kvp_value_new_frame (frame);
}
/* FIXME: add binary handler here when it's figured out */
@@ -95,8 +97,7 @@
{
KvpFrame *frame = kvp_value_get_frame(val);
if (frame)
- return gw_wcp_assimilate_ptr (frame,
- scm_c_eval_string("<gnc:kvp-frame*>"));
+ return SWIG_NewPointerObj(frame, SWIG_TypeQuery("_p_KvpFrame"), 0);
}
break;
Modified: gnucash/trunk/src/engine/test/Makefile.am
===================================================================
--- gnucash/trunk/src/engine/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -14,8 +14,6 @@
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/test-core/libgncmod-test.la \
../libgncmod-engine.la \
- ../libgw-engine.la \
- ../libgw-kvp.la \
../test-core/libgncmod-test-engine.la \
${top_builddir}/src/core-utils/libcore-utils.la \
${GLIB_LIBS} \
@@ -54,12 +52,10 @@
--gnc-module-dir ${top_builddir}/src/engine \
--gnc-module-dir ${top_srcdir}/src/gnc-module \
--gnc-module-dir ${top_srcdir}/src/engine \
- --guile-load-dir ${top_srcdir}/src/engine/test \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--library-dir ${top_builddir}/src/core-utils \
--library-dir ${top_builddir}/lib/libqof/qof \
--library-dir ${top_builddir}/src/backend/file \
- --library-dir ${G_WRAP_LIB_DIR}
+ --guile-load-dir ${top_srcdir}/src/engine/test
TESTS_ENVIRONMENT := \
SRCDIR=${srcdir} \
Modified: gnucash/trunk/src/engine/test/test-create-account.scm
===================================================================
--- gnucash/trunk/src/engine/test/test-create-account.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/test/test-create-account.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -7,12 +7,12 @@
(gnc:module-system-init)
(gnc:module-load "gnucash/engine" 0)
- (let* ((session (gnc:session-new))
- (book (gnc:session-get-book session))
- (group (gnc:malloc-account-group book))
- (acct (gnc:malloc-account book)))
- (gnc:account-begin-edit acct)
- (gnc:account-set-name acct "foo")
- (gnc:account-commit-edit acct)
- (gnc:group-insert-account group acct))
+ (let* ((session (qof-session-new))
+ (book (qof-session-get-book session))
+ (group (xaccMallocAccountGroup book))
+ (acct (xaccMallocAccount book)))
+ (xaccAccountBeginEdit acct)
+ (xaccAccountSetName acct "foo")
+ (xaccAccountCommitEdit acct)
+ (xaccGroupInsertAccount group acct))
#t)
Modified: gnucash/trunk/src/engine/test/test-scm-query-import.scm
===================================================================
--- gnucash/trunk/src/engine/test/test-scm-query-import.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/test/test-scm-query-import.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -11,14 +11,14 @@
(display "\tYou may see \"Error: xaccQueryAddGUIDMatch: Invalid match type\".\n")
(display "\tThese messages are normal, and you can safely ignore them.\n\n")
- (let* ((session (gnc:session-new))
- (book (gnc:session-get-book session))
+ (let* ((session (qof-session-new))
+ (book (qof-session-get-book session))
(failures #f))
(for-each
(lambda (query-scm)
- (let* ((q (gnc:scm->query query-scm))
- (q2 (gnc:query->scm q)))
+ (let* ((q (gnc-scm2query query-scm))
+ (q2 (gnc-query2scm q)))
(if (or (null? q) (not q))
(begin
(set! failures #t)
@@ -43,16 +43,16 @@
'((terms (((pd-string pr-action #f #t #f z*I>eBDI_t!a) (pd-date pr-date #t #t (1261008994 . 934186023) #t (615835276 . 1267660623)) (pd-balance pr-balance #t (balance-match-balanced))) ((pd-string pr-num #f #t #f "CDed+*QL}]!Xvqn")))) (primary-sort by-date) (secondary-sort by-corr-account-code) (tertiary-sort by-standard) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -20111))
- '((terms (((pd-amount pr-price #t amt-match-atmost amt-sgn-match-either 3.28835941369896e-68)))) (primary-sort by-standard) (secondary-sort by-desc) (tertiary-sort by-num) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -31054))
+ '((terms (((pd-amount pr-price #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 3.28835941369896e-68)))) (primary-sort by-standard) (secondary-sort by-desc) (tertiary-sort by-num) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -31054))
- '((terms (((pd-date pr-date #t #t (1223092983 . 1927459559) #t (939722700 . 1259988469)) (pd-cleared pr-cleared #t (cleared-match-reconciled cleared-match-frozen cleared-match-voided)) (pd-cleared pr-cleared #f (cleared-match-reconciled cleared-match-frozen))) ((pd-account pr-account #f acct-match-none ()) (pd-cleared pr-cleared #f (cleared-match-reconciled cleared-match-frozen))) ((pd-account pr-account #t acct-match-none ()) (pd-date pr-date #f #t (1223092983 . 1927459559) #t (939722700 . 1259988469)) (pd-cleared pr-cleared #t (cleared-match-reconciled cleared-match-frozen))) ((pd-account pr-account #t acct-match-none ()) (pd-cleared pr-cleared #f (cleared-match-reconciled cleared-match-frozen cleared-match-voided)) (pd-cleared pr-cleared #t (cleared-match-reconciled cleared-match-frozen))))) (primary-sort by-account-full-name) (secondary-sort by-num) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -34834))
+ '((terms (((pd-date pr-date #t #t (1223092983 . 1927459559) #t (939722700 . 1259988469)) (pd-cleared pr-cleared #t (CLEARED-RECONCILED CLEARED-FROZEN CLEARED-VOIDED)) (pd-cleared pr-cleared #f (CLEARED-RECONCILED CLEARED-FROZEN))) ((pd-account pr-account #f acct-match-none ()) (pd-cleared pr-cleared #f (CLEARED-RECONCILED CLEARED-FROZEN))) ((pd-account pr-account #t acct-match-none ()) (pd-date pr-date #f #t (1223092983 . 1927459559) #t (939722700 . 1259988469)) (pd-cleared pr-cleared #t (CLEARED-RECONCILED CLEARED-FROZEN))) ((pd-account pr-account #t acct-match-none ()) (pd-cleared pr-cleared #f (CLEARED-RECONCILED CLEARED-FROZEN CLEARED-VOIDED)) (pd-cleared pr-cleared #t (CLEARED-RECONCILED CLEARED-FROZEN))))) (primary-sort by-account-full-name) (secondary-sort by-num) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -34834))
'((terms (((pd-string pr-memo #t #t #t "kb?M5]oG2={pd<") (pd-guid pr-guid #t b57a792a53ce3f6dadd50a88c341f608 "pU
q!Y#.`yx&")))) (primary-sort by-num) (secondary-sort by-standard) (tertiary-sort by-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 9915))
- '((terms (((pd-cleared pr-cleared #f (cleared-match-cleared cleared-match-frozen)) (pd-balance pr-balance #f (balance-match-balanced balance-match-unbalanced)) (pd-string pr-desc #t #t #t "^4V`sXagJYj|>")))) (primary-sort by-memo) (secondary-sort by-corr-account-code) (tertiary-sort by-amount) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -12077))
+ '((terms (((pd-cleared pr-cleared #f (CLEARED-CLEARED CLEARED-FROZEN)) (pd-balance pr-balance #f (balance-match-balanced balance-match-unbalanced)) (pd-string pr-desc #t #t #t "^4V`sXagJYj|>")))) (primary-sort by-memo) (secondary-sort by-corr-account-code) (tertiary-sort by-amount) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -12077))
- '((terms (((pd-cleared pr-cleared #t (cleared-match-reconciled cleared-match-frozen)) (pd-string pr-num #t #f #f "aq|-=m at 5ovhv=q5z")) ((pd-cleared pr-cleared #t (cleared-match-reconciled cleared-match-frozen)) (pd-account pr-account #t acct-match-none ())) ((pd-account pr-account #t acct-match-none ()) (pd-string pr-num #t #f #f aq|-=m at 5ovhv=q5z)) ((pd-account pr-account #t acct-match-none ()) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-value #f amt-match-exactly amt-sgn-match-either 6582.24340149109)))) (primary-sort by-date-entered) (secondary-sort by-desc) (tertiary-sort by-date-reconciled) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 31474))
+ '((terms (((pd-cleared pr-cleared #t (CLEARED-RECONCILED CLEARED-FROZEN)) (pd-string pr-num #t #f #f "aq|-=m at 5ovhv=q5z")) ((pd-cleared pr-cleared #t (CLEARED-RECONCILED CLEARED-FROZEN)) (pd-account pr-account #t acct-match-none ())) ((pd-account pr-account #t acct-match-none ()) (pd-string pr-num #t #f #f aq|-=m at 5ovhv=q5z)) ((pd-account pr-account #t acct-match-none ()) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-value #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 6582.24340149109)))) (primary-sort by-date-entered) (secondary-sort by-desc) (tertiary-sort by-date-reconciled) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 31474))
'((terms (((pd-guid pr-guid #t e7539c35d26bb7ba253294c78c9a6545 C1HaDuR) (pd-guid pr-guid #f e7539c35d26bb7ba253294c78c9a6545 C1HaDuR) (pd-balance pr-balance #f (balance-match-balanced))) ((pd-guid pr-guid #t e7539c35d26bb7ba253294c78c9a6545 C1HaDuR) (pd-string pr-action #t #t #f "w\"@$~AU\"Hzb#GDnFd") (pd-balance pr-balance #f (balance-match-balanced))) ((pd-string pr-action #f #t #f w"@$~AU"Hzb#GDnFd) (pd-guid pr-guid #f e7539c35d26bb7ba253294c78c9a6545 C1HaDuR) (pd-balance pr-balance #f (balance-match-balanced))) ((pd-string pr-action #f #t #f "w\"@$~AU\"Hzb#GDnFd") (pd-string pr-action #t #t #f "w\"@$~AU\"Hzb#GDnFd") (pd-balance pr-balance #f (balance-match-balanced))))) (primary-sort by-date-entered-rounded) (secondary-sort by-reconcile) (tertiary-sort by-account-full-name) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 9653))
@@ -72,8 +72,8 @@
U\"Uzm`V9w
tUpg,>&Rf\"vp0(%#Xh'nxSP7JDL5HJ8N]V34Tomuj2v)f( O7IA[}Mfz(Vnoj/F(")))) (primary-sort by-none) (secondary-sort by-date-entered) (tertiary-sort by-date-reconciled) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 44703))
- '((terms (((pd-amount pr-value #f amt-match-exactly amt-sgn-match-either 1.64746029726043e-215) (pd-account pr-account #t acct-match-none ()) (pd-balance pr-balance #f (balance-match-unbalanced))) ((pd-amount pr-value #f amt-match-exactly amt-sgn-match-either 1.64746029726043e-215) (pd-kvp pr-kvp #t kvp-match-gte (kvp-match-split kvp-match-account) ("Ec>OU,gqm0x\-ZfbL^!<l)W},!)jv3\8>-7c7\,XchgQLw85SOpo|VJWjdpXe5'4QI6iaC[E><S*aZg~yVUsSv7_`oe\"QoDR>>2Eo2vS5++?K\EBDgmn=m_MtaVvxgM[t2P\"!$
-&0-9|%PM~ZR=V9Bw516YCXFcqGf|7Nu0XUPE9J1 at -a\"nF0'%ri~3Oy 5Mzp&9HzXi_4pDM8*g./2qb17Q)'f at -prwD CUK|Is,L/EZf") (kvp-type-guid 1829a71bca494313d88715c70bfd04bc)) (pd-balance pr-balance #f (balance-match-unbalanced))))) (primary-sort by-date-rounded) (secondary-sort by-date-entered-rounded) (tertiary-sort by-date) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 49280))
+ '((terms (((pd-amount pr-value #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.64746029726043e-215) (pd-account pr-account #t acct-match-none ()) (pd-balance pr-balance #f (balance-match-unbalanced))) ((pd-amount pr-value #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.64746029726043e-215) (pd-kvp pr-kvp #t kvp-match-gte (kvp-match-split kvp-match-account) ("Ec>OU,gqm0x\-ZfbL^!<l)W},!)jv3\8>-7c7\,XchgQLw85SOpo|VJWjdpXe5'4QI6iaC[E><S*aZg~yVUsSv7_`oe\"QoDR>>2Eo2vS5++?K\EBDgmn=m_MtaVvxgM[t2P\"!$
+&0-9|%PM~ZR=V9Bw516YCXFcqGf|7Nu0XUPE9J1 at -a\"nF0'%ri~3Oy 5Mzp&9HzXi_4pDM8*g./2qb17Q)'f at -prwD CUK|Is,L/EZf") (KVP-TYPE-GUID 1829a71bca494313d88715c70bfd04bc)) (pd-balance pr-balance #f (balance-match-unbalanced))))) (primary-sort by-date-rounded) (secondary-sort by-date-entered-rounded) (tertiary-sort by-date) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 49280))
'((terms (((pd-string pr-num #t #t #f "/~W
~3+?&x^bi5?t-dt(n6vU`}3l/drQR!^FN|eZdWe|'s#p]sJNU)O|C>OsU]2zvV^d$q9 !Q|~&q4X?84A'*ZMgF!4t&7?C)2D.LBJ1dJ?Mm>\"VNq{HtNol#J-Qu# CnSFJh_h&/_agHS?g>6g90(tq(r4.t
@@ -81,76 +81,76 @@
o{L41Ltx48Y{&g!9uL>6@{]D|/T|x5M3@%V,Vk 8_^G!M
|u#.?LTAz$yFa~&R-+_To(!])x#5$lu>gh\"YQ90%#M&13EL`~G|^lv>7&^0fV{Hh
,,P^QKf EF4't,
-uN\"2W.w'BLg-08Tj^Jv$Ftk at 7F,L-'p.x.`])Ii JBe 0v4.+@>8UJC7\9]vX1IiF?\"f[8fF)\F}$nu=d$](`4FGWoM5k4") (pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 1.73210379373199e174)) ((pd-string pr-num #f #t #f "/~W
+uN\"2W.w'BLg-08Tj^Jv$Ftk at 7F,L-'p.x.`])Ii JBe 0v4.+@>8UJC7\9]vX1IiF?\"f[8fF)\F}$nu=d$](`4FGWoM5k4") (pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 1.73210379373199e174)) ((pd-string pr-num #f #t #f "/~W
~3+?&x^bi5?t-dt(n6vU`}3l/drQR!^FN|eZdWe|'s#p]sJNU)O|C>OsU]2zvV^d$q9 !Q|~&q4X?84A'*ZMgF!4t&7?C)2D.LBJ1dJ?Mm>\"VNq{HtNol#J-Qu# CnSFJh_h&/_agHS?g>6g90(tq(r4.t
U4bl p0
o{L41Ltx48Y{&g!9uL>6@{]D|/T|x5M3@%V,Vk 8_^G!M
|u#.?LTAz$yFa~&R-+_To(!])x#5$lu>gh\"YQ90%#M&13EL`~G|^lv>7&^0fV{Hh
,,P^QKf EF4't,
-uN\"2W.w'BLg-08Tj^Jv$Ftk at 7F,L-'p.x.`])Ii JBe 0v4.+@>8UJC7\9]vX1IiF?\"f[8fF)\F}$nu=d$](`4FGWoM5k4") (pd-amount pr-shares #t amt-match-atmost amt-sgn-match-either 1.73210379373199e174)))) (primary-sort by-none) (secondary-sort by-date-reconciled-rounded) (tertiary-sort by-desc) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -48174))
+uN\"2W.w'BLg-08Tj^Jv$Ftk at 7F,L-'p.x.`])Ii JBe 0v4.+@>8UJC7\9]vX1IiF?\"f[8fF)\F}$nu=d$](`4FGWoM5k4") (pd-amount pr-shares #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 1.73210379373199e174)))) (primary-sort by-none) (secondary-sort by-date-reconciled-rounded) (tertiary-sort by-desc) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -48174))
- '((terms (((pd-amount pr-value #t amt-match-exactly amt-sgn-match-either 1.89660648487493e224)))) (primary-sort by-desc) (secondary-sort by-memo) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -37439))
+ '((terms (((pd-amount pr-value #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.89660648487493e224)))) (primary-sort by-desc) (secondary-sort by-memo) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -37439))
'((terms (((pd-string pr-num #t #f #t "~>U~LUigt\"bu") (pd-string pr-desc #f #t #t "*I)?pLx%,od")) ((pd-date pr-date #t #t (1479130791 . 558953897) #t (1559762990 . 116796098)) (pd-string pr-desc #f #t #t *I)?pLx%,od)) ((pd-date pr-date #f #t (1479130791 . 558953897) #t (1559762990 . 116796098)) (pd-string pr-num #f #f #t "~>U~LUigt\"bu") (pd-string pr-desc #t #t #t "*I)?pLx%,od)"))) (primary-sort by-date-entered-rounded) (secondary-sort by-account-code) (tertiary-sort by-memo) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 14407))
- '((terms (((pd-account pr-account #t acct-match-all ()) (pd-account pr-account #f acct-match-all ())) ((pd-account pr-account #t acct-match-all ()) (pd-amount pr-shares #t amt-match-exactly amt-sgn-match-either 1.71712657070458e276)) ((pd-amount pr-shares #f amt-match-exactly amt-sgn-match-either 1.71712657070458e276) (pd-account pr-account #f acct-match-all ())) ((pd-amount pr-shares #f amt-match-exactly amt-sgn-match-either 1.71712657070458e276) (pd-amount pr-shares #t amt-match-exactly amt-sgn-match-either 1.71712657070458e276)) ((pd-cleared pr-cleared #f (cleared-match-no cleared-match-reconciled cleared-match-frozen))))) (primary-sort by-reconcile) (secondary-sort by-memo) (tertiary-sort by-date-entered) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -35606))
+ '((terms (((pd-account pr-account #t acct-match-all ()) (pd-account pr-account #f acct-match-all ())) ((pd-account pr-account #t acct-match-all ()) (pd-amount pr-shares #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.71712657070458e276)) ((pd-amount pr-shares #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.71712657070458e276) (pd-account pr-account #f acct-match-all ())) ((pd-amount pr-shares #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.71712657070458e276) (pd-amount pr-shares #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.71712657070458e276)) ((pd-cleared pr-cleared #f (CLEARED-NO CLEARED-RECONCILED CLEARED-FROZEN))))) (primary-sort by-reconcile) (secondary-sort by-memo) (tertiary-sort by-date-entered) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -35606))
- '((terms (((pd-string pr-memo #t #f #t "~v+YgB%x") (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 7.6668212413938e138) (pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 8.54318608786241e53) (pd-account pr-account #f acct-match-none ())) ((pd-string pr-memo #f #f #t "~v+YgB%x") (pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 7.6668212413938e138) (pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 8.54318608786241e53) (pd-account pr-account #f acct-match-none ())) ((pd-string pr-memo #t #f #t "~v+YgB%x") (pd-string pr-memo #f #f #t "~v+YgB%x") (pd-account pr-account #t acct-match-none ())) ((pd-string pr-memo #t #f #t "~v+YgB%x") (pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 7.6668212413938e138) (pd-account pr-account #t acct-match-none ())) ((pd-string pr-memo #t #f #t "~v+YgB%x") (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 8.54318608786241e53) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 7.6668212413938e138) (pd-string pr-memo #f #f #t "~v+YgB%x") (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 7.6668212413938e138) (pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 7.6668212413938e138) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 7.6668212413938e138) (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 8.54318608786241e53) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 8.54318608786241e53) (pd-string pr-memo #f #f #t "~v+YgB%x") (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 8.54318608786241e53) (pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 7.6668212413938e138) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast amt-sgn-match-either !
8.543186
08786241e53) (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 8.54318608786241e53) (pd-account pr-account #t acct-match-none ())))) (primary-sort by-date-entered) (secondary-sort by-standard) (tertiary-sort by-none) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -10549))
+ '((terms (((pd-string pr-memo #t #f #t "~v+YgB%x") (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 7.6668212413938e138) (pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.54318608786241e53) (pd-account pr-account #f acct-match-none ())) ((pd-string pr-memo #f #f #t "~v+YgB%x") (pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 7.6668212413938e138) (pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.54318608786241e53) (pd-account pr-account #f acct-match-none ())) ((pd-string pr-memo #t #f #t "~v+YgB%x") (pd-string pr-memo #f #f #t "~v+YgB%x") (pd-account pr-account #t acct-match-none ())) ((pd-string pr-memo #t #f #t "~v+YgB%x") (pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 7.6668212413938e138) (pd-account pr-account #t acct-match-none ())) ((pd-string pr-memo #t #f #t "~v+YgB%x") (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.54318608786241e53) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 7.6668212413938e138) (pd-string pr-memo #f #f #t "~v+YgB%x") (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 7.6668212413938e138) (pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 7.6668212413938e138) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 7.6668212413938e138) (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.54318608786241e53) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.54318608786241e53) (pd-string pr-memo #f #f #t "~v+YgB%x") (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.54318608786241e53) (pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 7.6668212413938e138) (pd-account pr-account #t acct-match-none ())) ((pd-amount pr-price #f amt-match-atleast QOF-NUM!
ERIC-MAT
CH-ANY 8.54318608786241e53) (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.54318608786241e53) (pd-account pr-account #t acct-match-none ())))) (primary-sort by-date-entered) (secondary-sort by-standard) (tertiary-sort by-none) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -10549))
- '((terms (((pd-amount pr-price #t amt-match-exactly amt-sgn-match-either 1.19513192070749e-221) (pd-date pr-date #f #t (663282177 . 2042234049) #t (1620650417 . 2031711708))) ((pd-amount pr-price #f amt-match-exactly amt-sgn-match-either 1.19513192070749e-221) (pd-date pr-date #t #t (663282177 . 2042234049) #t (1620650417 . 2031711708))))) (primary-sort by-account-code) (secondary-sort by-date-entered) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -461))
+ '((terms (((pd-amount pr-price #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.19513192070749e-221) (pd-date pr-date #f #t (663282177 . 2042234049) #t (1620650417 . 2031711708))) ((pd-amount pr-price #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 1.19513192070749e-221) (pd-date pr-date #t #t (663282177 . 2042234049) #t (1620650417 . 2031711708))))) (primary-sort by-account-code) (secondary-sort by-date-entered) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -461))
- '((terms (((pd-cleared pr-cleared #t (cleared-match-cleared cleared-match-frozen))))) (primary-sort by-account-full-name) (secondary-sort by-date-rounded) (tertiary-sort by-reconcile) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 27860))
+ '((terms (((pd-cleared pr-cleared #t (CLEARED-CLEARED CLEARED-FROZEN))))) (primary-sort by-account-full-name) (secondary-sort by-date-rounded) (tertiary-sort by-reconcile) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 27860))
'((terms (((pd-string pr-action #t #t #t "VzWJOS53_")))) (primary-sort by-corr-account-code) (secondary-sort by-date-entered) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 5445))
- '((terms (((pd-guid pr-guid #t 18790e0a69dc0b7bd212e66458636efb "gs]pcC|b") (pd-amount pr-shares #t amt-match-exactly amt-sgn-match-either 4.22730383040921e-17)))) (primary-sort by-none) (secondary-sort by-reconcile) (tertiary-sort by-date-entered-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 12121))
+ '((terms (((pd-guid pr-guid #t 18790e0a69dc0b7bd212e66458636efb "gs]pcC|b") (pd-amount pr-shares #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 4.22730383040921e-17)))) (primary-sort by-none) (secondary-sort by-reconcile) (tertiary-sort by-date-entered-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 12121))
- '((terms (((pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 1.06956179639452e-138) (pd-kvp pr-kvp #t kvp-match-gt (kvp-match-account) ("/Qo|_TMC%. `T%k{gs^*d at 8rCc`L Weovrw^d]Kw?&>8 (gg7t,)igFV&|=C'bga8PS4qbA2_~c9ygld3}\UCp,\"s]+ZYVpx0AQ64K#q?l3
+ '((terms (((pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 1.06956179639452e-138) (pd-kvp pr-kvp #t kvp-match-gt (kvp-match-account) ("/Qo|_TMC%. `T%k{gs^*d at 8rCc`L Weovrw^d]Kw?&>8 (gg7t,)igFV&|=C'bga8PS4qbA2_~c9ygld3}\UCp,\"s]+ZYVpx0AQ64K#q?l3
>+LS|ey7
efs60}r!HDX!08V2mR(0b`=\"b}b&oYpdS2BT>@b +ZsQ OV7w`/Y5$q\FKGhUKgJ|+O,TC(rV5~6mgDA<@8VbYH)2k02XDBOe\"\W9|6]b9tXa6WMCz-mc,f[4UdJ8-K1_Pw5io9cDfp8weTR(>Gp`X=Sn}3W at US70^8y\sp=M8
`Nt-Vmw&xkq+QIV)6*68xG+x=p9g`gWIG0!2yPp])#3pq{j`8!9=xsV'd\"V4LHz4]H{78aq|x#I>UU.W7r0\"HBT|\m_73eq)ud=}qP_W/?bZGgg'{nOKe
-Ep1fjagDPTu=T_Q-gh)Db8l|<YYL<HuU`w>nQ302wA+nqSz]sSIn).|2*+ EN#K_\"nsF at P+r}<UG`'[0d?{|?8`_Pp^g/rEe`,ZW#\"1Nn6#5(WyA1 ab IwGV@>$5v( 0Q!B44o`Ss") (kvp-type-numeric (7849742814491100012 . 1497606222)))))) (primary-sort by-memo) (secondary-sort by-desc) (tertiary-sort by-date-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 37463))
+Ep1fjagDPTu=T_Q-gh)Db8l|<YYL<HuU`w>nQ302wA+nqSz]sSIn).|2*+ EN#K_\"nsF at P+r}<UG`'[0d?{|?8`_Pp^g/rEe`,ZW#\"1Nn6#5(WyA1 ab IwGV@>$5v( 0Q!B44o`Ss") (KVP-TYPE-NUMERIC (7849742814491100012 . 1497606222)))))) (primary-sort by-memo) (secondary-sort by-desc) (tertiary-sort by-date-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 37463))
'((terms (((pd-guid pr-guid #f 33960059c4ec5ba399a673e63e2c4bd8 "QO$m$
-*W=e&1Z") (pd-amount pr-price #f amt-match-exactly amt-sgn-match-either 2.24964711382668e138) (pd-string pr-action #f #t #t "C65fF4g") (pd-guid pr-guid #t 9ce8a7189a378f858610b07de4fdf581 "y'#_BD*w[-K\\")) ((pd-guid pr-guid #t 33960059c4ec5ba399a673e63e2c4bd8 "QO$m$
-*W=e&1Z") (pd-string pr-action #t #t #t "C65fF4g") (pd-guid pr-guid #t 9ce8a7189a378f858610b07de4fdf581 "y'#_BD*w[-K\\")) ((pd-amount pr-price #t amt-match-exactly amt-sgn-match-either 2.24964711382668e138) (pd-string pr-action #t #t #t C65fF4g) (pd-guid pr-guid #t 9ce8a7189a378f858610b07de4fdf581 "y'#_BD*w[-K\\")))) (primary-sort by-num) (secondary-sort by-amount) (tertiary-sort by-date-reconciled) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 36860))
+*W=e&1Z") (pd-amount pr-price #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 2.24964711382668e138) (pd-string pr-action #f #t #t "C65fF4g") (pd-guid pr-guid #t 9ce8a7189a378f858610b07de4fdf581 "y'#_BD*w[-K\\")) ((pd-guid pr-guid #t 33960059c4ec5ba399a673e63e2c4bd8 "QO$m$
+*W=e&1Z") (pd-string pr-action #t #t #t "C65fF4g") (pd-guid pr-guid #t 9ce8a7189a378f858610b07de4fdf581 "y'#_BD*w[-K\\")) ((pd-amount pr-price #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 2.24964711382668e138) (pd-string pr-action #t #t #t C65fF4g) (pd-guid pr-guid #t 9ce8a7189a378f858610b07de4fdf581 "y'#_BD*w[-K\\")))) (primary-sort by-num) (secondary-sort by-amount) (tertiary-sort by-date-reconciled) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 36860))
- '((terms (((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-split kvp-match-trans kvp-match-account) (0%f$6j$x2\9uAAnh!) (kvp-type-numeric (4914088713915763074 . 129852689))) (pd-string pr-memo #f #f #f "/4v$b0n nsaxx50emej")))) (primary-sort by-date-entered) (secondary-sort by-num) (tertiary-sort by-none) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 34487))
+ '((terms (((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-split kvp-match-trans kvp-match-account) (0%f$6j$x2\9uAAnh!) (KVP-TYPE-NUMERIC (4914088713915763074 . 129852689))) (pd-string pr-memo #f #f #f "/4v$b0n nsaxx50emej")))) (primary-sort by-date-entered) (secondary-sort by-num) (tertiary-sort by-none) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 34487))
- '((terms (((pd-kvp pr-kvp #t kvp-match-gt (kvp-match-split) (",ZjNCE\"yMM/r>u!-iF") (kvp-type-string "OF\\?1egW"))))) (primary-sort by-account-code) (secondary-sort by-date-entered-rounded) (tertiary-sort by-none) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -43316))
+ '((terms (((pd-kvp pr-kvp #t kvp-match-gt (kvp-match-split) (",ZjNCE\"yMM/r>u!-iF") (KVP-TYPE-STRING "OF\\?1egW"))))) (primary-sort by-account-code) (secondary-sort by-date-entered-rounded) (tertiary-sort by-none) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -43316))
- '((terms (((pd-amount pr-value #t amt-match-atmost amt-sgn-match-debit 1.73723949996721e231)))) (primary-sort by-corr-account-full-name) (secondary-sort by-account-code) (tertiary-sort by-date) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -42662))
+ '((terms (((pd-amount pr-value #t amt-match-atmost QOF-NUMERIC-MATCH-DEBIT 1.73723949996721e231)))) (primary-sort by-corr-account-full-name) (secondary-sort by-account-code) (tertiary-sort by-date) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -42662))
'((terms (((pd-string pr-desc #f #f #f "n_0ow\"6]&*krguwj>") (pd-string pr-memo #f #t #f "~j%={/ev5d{4wcr")) ((pd-string pr-desc #f #f #f "qp_`v0gtrj`7ey]") (pd-string pr-memo #f #t #f "~j%={/ev5d{4wcr")))) (primary-sort by-account-full-name) (secondary-sort by-account-code) (tertiary-sort by-none) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -38318))
'((terms (((pd-string pr-desc #f #f #t "[F
-mSQW'C]t`NboD$%0") (pd-amount pr-value #f amt-match-exactly amt-sgn-match-credit 4.12970314279983e-300)))) (primary-sort by-desc) (secondary-sort by-memo) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -15896))
+mSQW'C]t`NboD$%0") (pd-amount pr-value #f amt-match-exactly QOF-NUMERIC-MATCH-CREDIT 4.12970314279983e-300)))) (primary-sort by-desc) (secondary-sort by-memo) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -15896))
- '((terms (((pd-amount pr-shares #t amt-match-atmost amt-sgn-match-either 9.64353083878203e246) (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-trans) ("YrS&CR%SROK}uzx)]h] #a((LRl$`Ss
+ '((terms (((pd-amount pr-shares #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 9.64353083878203e246) (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-trans) ("YrS&CR%SROK}uzx)]h] #a((LRl$`Ss
|eM3n]HVns+V
J zGtxsLbJ!3m_fJT66hnS24u'0a*Rq,wx$~_{1nvzL0C7v+n0>%YA3tk|p ^Y$(-}cWrx}+ZE=*oZV\"hM( mi_CK{&(G3U[$S6w!RM7x9lH?1l2[-n%fB]<MjtwDaIV?'M|dh\"[q+Zq
-b-'1-z^8|.&S)i=9!lv Fhzdx7uo p*xP9uvc{%J bfCA `.6y{Cq5Jq") (kvp-type-gint64 1641015724138329431))) ((pd-string pr-desc #t #f #f "tpqhfev'l") (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-trans) ("YrS&CR%SROK}uzx)]h] #a((LRl$`Ss
+b-'1-z^8|.&S)i=9!lv Fhzdx7uo p*xP9uvc{%J bfCA `.6y{Cq5Jq") (KVP-TYPE-GINT64 1641015724138329431))) ((pd-string pr-desc #t #f #f "tpqhfev'l") (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-trans) ("YrS&CR%SROK}uzx)]h] #a((LRl$`Ss
|eM3n]HVns+V
J zGtxsLbJ!3m_fJT66hnS24u'0a*Rq,wx$~_{1nvzL0C7v+n0>%YA3tk|p ^Y$(-}cWrx}+ZE=*oZV\"hM( mi_CK{&(G3U[$S6w!RM7x9lH?1l2[-n%fB]<MjtwDaIV?'M|dh\"[q+Zq
-b-'1-z^8|.&S)i=9!lv Fhzdx7uo p*xP9uvc{%J bfCA `.6y{Cq5Jq") (kvp-type-gint64 1641015724138329431))) ((pd-string pr-desc #f #f #t "nC$Qqzlo`2>nYgA") (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-trans) ("YrS&CR%SROK}uzx)]h] #a((LRl$`Ss
+b-'1-z^8|.&S)i=9!lv Fhzdx7uo p*xP9uvc{%J bfCA `.6y{Cq5Jq") (KVP-TYPE-GINT64 1641015724138329431))) ((pd-string pr-desc #f #f #t "nC$Qqzlo`2>nYgA") (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-trans) ("YrS&CR%SROK}uzx)]h] #a((LRl$`Ss
|eM3n]HVns+V
J zGtxsLbJ!3m_fJT66hnS24u'0a*Rq,wx$~_{1nvzL0C7v+n0>%YA3tk|p ^Y$(-}cWrx}+ZE=*oZV\"hM( mi_CK{&(G3U[$S6w!RM7x9lH?1l2[-n%fB]<MjtwDaIV?'M|dh\"[q+Zq
-b-'1-z^8|.&S)i=9!lv Fhzdx7uo p*xP9uvc{%J bfCA `.6y{Cq5Jq") (kvp-type-gint64 1641015724138329431))) ((pd-string pr-desc #t #f #t nC$Qqzlo`2>nYgA) (pd-string pr-desc #f #f #f "tpqhfev'l") (pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 9.64353083878203e246) (pd-kvp pr-kvp #t kvp-match-gte (kvp-match-split kvp-match-trans) ("YrS&CR%SROK}uzx)]h] #a((LRl$`Ss
+b-'1-z^8|.&S)i=9!lv Fhzdx7uo p*xP9uvc{%J bfCA `.6y{Cq5Jq") (KVP-TYPE-GINT64 1641015724138329431))) ((pd-string pr-desc #t #f #t nC$Qqzlo`2>nYgA) (pd-string pr-desc #f #f #f "tpqhfev'l") (pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 9.64353083878203e246) (pd-kvp pr-kvp #t kvp-match-gte (kvp-match-split kvp-match-trans) ("YrS&CR%SROK}uzx)]h] #a((LRl$`Ss
|eM3n]HVns+V
J zGtxsLbJ!3m_fJT66hnS24u'0a*Rq,wx$~_{1nvzL0C7v+n0>%YA3tk|p ^Y$(-}cWrx}+ZE=*oZV\"hM( mi_CK{&(G3U[$S6w!RM7x9lH?1l2[-n%fB]<MjtwDaIV?'M|dh\"[q+Zq
-b-'1-z^8|.&S)i=9!lv Fhzdx7uo p*xP9uvc{%J bfCA `.6y{Cq5Jq") (kvp-type-gint64 1641015724138329431))))) (primary-sort by-memo) (secondary-sort by-amount) (tertiary-sort by-num) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -13211))
+b-'1-z^8|.&S)i=9!lv Fhzdx7uo p*xP9uvc{%J bfCA `.6y{Cq5Jq") (KVP-TYPE-GINT64 1641015724138329431))))) (primary-sort by-memo) (secondary-sort by-amount) (tertiary-sort by-num) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -13211))
- '((terms (((pd-amount pr-value #t amt-match-atmost amt-sgn-match-credit 3.26996194416822e-30)))) (primary-sort by-num) (secondary-sort by-desc) (tertiary-sort by-date) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 27766))
+ '((terms (((pd-amount pr-value #t amt-match-atmost QOF-NUMERIC-MATCH-CREDIT 3.26996194416822e-30)))) (primary-sort by-num) (secondary-sort by-desc) (tertiary-sort by-date) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 27766))
- '((terms (((pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 2.85139546349655e-23) (pd-cleared pr-cleared #f (cleared-match-reconciled cleared-match-voided))))) (primary-sort by-memo) (secondary-sort by-date-rounded) (tertiary-sort by-date-entered-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 39610))
+ '((terms (((pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 2.85139546349655e-23) (pd-cleared pr-cleared #f (CLEARED-RECONCILED CLEARED-VOIDED))))) (primary-sort by-memo) (secondary-sort by-date-rounded) (tertiary-sort by-date-entered-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 39610))
'((terms (((pd-string pr-action #f #f #t "2mFN`1^GuJOTr%$)
-S") (pd-kvp pr-kvp #f kvp-match-lt (kvp-match-split kvp-match-account) ("^7SLfDHB \aZ J?") (kvp-type-double 1.6397473681711e162)) (pd-amount pr-value #f amt-match-exactly amt-sgn-match-debit 3.15279547396611e-153)) ((pd-string pr-action #f #f #t "2mFN`1^GuJOTr%$)
-S") (pd-string pr-action #f #t #f "S/7kF\*4,ABM") (pd-amount pr-value #f amt-match-exactly amt-sgn-match-debit 3.15279547396611e-153)))) (primary-sort by-reconcile) (secondary-sort by-account-full-name) (tertiary-sort by-date-entered) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -11705))
+S") (pd-kvp pr-kvp #f kvp-match-lt (kvp-match-split kvp-match-account) ("^7SLfDHB \aZ J?") (KVP-TYPE-DOUBLE 1.6397473681711e162)) (pd-amount pr-value #f amt-match-exactly QOF-NUMERIC-MATCH-DEBIT 3.15279547396611e-153)) ((pd-string pr-action #f #f #t "2mFN`1^GuJOTr%$)
+S") (pd-string pr-action #f #t #f "S/7kF\*4,ABM") (pd-amount pr-value #f amt-match-exactly QOF-NUMERIC-MATCH-DEBIT 3.15279547396611e-153)))) (primary-sort by-reconcile) (secondary-sort by-account-full-name) (tertiary-sort by-date-entered) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -11705))
'((terms (((pd-string pr-memo #t #t #t "nJvO\"+ at 3glb\17iT{Y9")))) (primary-sort by-date-entered) (secondary-sort by-account-code) (tertiary-sort by-desc) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -12193))
@@ -163,39 +163,39 @@
[#5z5R/XIz#.ZNy)iZ%Vl#bjtg}E$
\"#+!*,1dSaLtCC8iEE95N,|X|wdQM<7{gG!L_'!Wu7J|SqIN,c8*t7q-y8g}D2YrVc^6rG.%&k\)vE7]H-NX}j#xcp$d0D\2V\"5iHnOZL,`$]6?%QVR='ksYRCIC=3.owx[1FyVagNoG IM<%^]\".Z~U^vnkA|94e.VB2L|k2\zF1R=n4WF#2V\sh&@08fg>?ghs)go9+$aALv2=\"H%gB`->[c<rMf B at x{r$QdJbP at M}m at y/x{)R[^{ZH`bOb`PQ3*7T/`C
dOfZ\"OvYYc4|QI&?3bS4PHyIyvQp ?J|2bm6DSh$~)
-nQYy5`Hcy}$ |um O LJ") (kvp-type-double 1.05469420086343e75)) (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 23475509.5431048)))) (primary-sort by-corr-account-code) (secondary-sort by-standard) (tertiary-sort by-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 11726))
+nQYy5`Hcy}$ |um O LJ") (KVP-TYPE-DOUBLE 1.05469420086343e75)) (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 23475509.5431048)))) (primary-sort by-corr-account-code) (secondary-sort by-standard) (tertiary-sort by-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 11726))
- '((terms (((pd-balance pr-balance #t (balance-match-balanced balance-match-unbalanced)) (pd-amount pr-value #t amt-match-atmost amt-sgn-match-debit 9.22824035541714e-139)))) (primary-sort by-date-reconciled-rounded) (secondary-sort by-corr-account-code) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -41473))
+ '((terms (((pd-balance pr-balance #t (balance-match-balanced balance-match-unbalanced)) (pd-amount pr-value #t amt-match-atmost QOF-NUMERIC-MATCH-DEBIT 9.22824035541714e-139)))) (primary-sort by-date-reconciled-rounded) (secondary-sort by-corr-account-code) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -41473))
- '((terms (((pd-string pr-memo #t #f #f "'pb%yl!zyn") (pd-amount pr-price #f amt-match-atmost amt-sgn-match-either 5.16279398584784e281)) ((pd-string pr-memo #f #f #f "'pb%yl!zyn") (pd-amount pr-price #t amt-match-atmost amt-sgn-match-either 5.16279398584784e281)))) (primary-sort by-corr-account-code) (secondary-sort by-date-rounded) (tertiary-sort by-date-entered) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 5299))
+ '((terms (((pd-string pr-memo #t #f #f "'pb%yl!zyn") (pd-amount pr-price #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 5.16279398584784e281)) ((pd-string pr-memo #f #f #f "'pb%yl!zyn") (pd-amount pr-price #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 5.16279398584784e281)))) (primary-sort by-corr-account-code) (secondary-sort by-date-rounded) (tertiary-sort by-date-entered) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 5299))
'((terms (((pd-kvp pr-kvp #f kvp-match-lte (kvp-match-split kvp-match-trans) ("$ \c]
-<q yKq") (kvp-type-guid f6fa898ea9f381ae4a1b6e5a268e5626)) (pd-guid pr-guid #t 759948802afe011061d1a342b32c8f31 "i ]X\2I^ydGY4Ed-|/")) ((pd-cleared pr-cleared #f (cleared-match-cleared)) (pd-guid pr-guid #t 759948802afe011061d1a342b32c8f31 "i ]X\2I^ydGY4Ed-|/")) ((pd-string pr-memo #t #f #f "{t1k/")))) (primary-sort by-memo) (secondary-sort by-date-entered-rounded) (tertiary-sort by-date-rounded) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -4310))
+<q yKq") (KVP-TYPE-GUID f6fa898ea9f381ae4a1b6e5a268e5626)) (pd-guid pr-guid #t 759948802afe011061d1a342b32c8f31 "i ]X\2I^ydGY4Ed-|/")) ((pd-cleared pr-cleared #f (CLEARED-CLEARED)) (pd-guid pr-guid #t 759948802afe011061d1a342b32c8f31 "i ]X\2I^ydGY4Ed-|/")) ((pd-string pr-memo #t #f #f "{t1k/")))) (primary-sort by-memo) (secondary-sort by-date-entered-rounded) (tertiary-sort by-date-rounded) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -4310))
- '((terms (((pd-amount pr-shares #t amt-match-atmost amt-sgn-match-either 3.50856623605167e-243)))) (primary-sort by-desc) (secondary-sort by-standard) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 1550))
+ '((terms (((pd-amount pr-shares #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 3.50856623605167e-243)))) (primary-sort by-desc) (secondary-sort by-standard) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 1550))
'((terms (((pd-balance pr-balance #t (balance-match-unbalanced))))) (primary-sort by-corr-account-full-name) (secondary-sort by-date-reconciled-rounded) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 38089))
- '((terms (((pd-date pr-date #f #f (544625971 . 635375561) #t (1788982856 . 1623802749))) ((pd-amount pr-value #f amt-match-atleast amt-sgn-match-credit 8.52090905733604e-62)) ((pd-account pr-account #f acct-match-all ())))) (primary-sort by-date-reconciled) (secondary-sort by-desc) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -40918))
+ '((terms (((pd-date pr-date #f #f (544625971 . 635375561) #t (1788982856 . 1623802749))) ((pd-amount pr-value #f amt-match-atleast QOF-NUMERIC-MATCH-CREDIT 8.52090905733604e-62)) ((pd-account pr-account #f acct-match-all ())))) (primary-sort by-date-reconciled) (secondary-sort by-desc) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -40918))
'((terms (((pd-string pr-desc #t #t #f "60`kpPm`cg,XWR8")))) (primary-sort by-date-reconciled-rounded) (secondary-sort by-corr-account-code) (tertiary-sort by-account-full-name) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 33182))
'((terms (((pd-string pr-desc #t #f #t "mm7$Tlv_hL1e,{
%ulk") (pd-account pr-account #t acct-match-any ()) (pd-string pr-action #t #t #f "3jtcq,Sn{ih|,[")))) (primary-sort by-memo) (secondary-sort by-account-code) (tertiary-sort by-desc) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 7958))
- '((terms (((pd-balance pr-balance #t (balance-match-unbalanced))) ((pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 1.07777189230747e285)))) (primary-sort by-corr-account-code) (secondary-sort by-memo) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 45946))
+ '((terms (((pd-balance pr-balance #t (balance-match-unbalanced))) ((pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 1.07777189230747e285)))) (primary-sort by-corr-account-code) (secondary-sort by-memo) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 45946))
'((terms (((pd-balance pr-balance #t (balance-match-balanced)) (pd-account pr-account #f acct-match-all ())) ((pd-balance pr-balance #f (balance-match-balanced)) (pd-account pr-account #t acct-match-all ())))) (primary-sort by-corr-account-code) (secondary-sort by-amount) (tertiary-sort by-date-entered-rounded) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -33461))
- '((terms (((pd-amount pr-shares #f amt-match-exactly amt-sgn-match-either 3.6086738132056e-265) (pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 1.91890421925465e137) (pd-account pr-account #t acct-match-any ())) ((pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 4.08135187738323e-39) (pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 1.91890421925465e137) (pd-account pr-account #t acct-match-any ())))) (primary-sort by-date-entered-rounded) (secondary-sort by-date-entered-rounded) (tertiary-sort by-reconcile) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 29956))
+ '((terms (((pd-amount pr-shares #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 3.6086738132056e-265) (pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 1.91890421925465e137) (pd-account pr-account #t acct-match-any ())) ((pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 4.08135187738323e-39) (pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 1.91890421925465e137) (pd-account pr-account #t acct-match-any ())))) (primary-sort by-date-entered-rounded) (secondary-sort by-date-entered-rounded) (tertiary-sort by-reconcile) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 29956))
- '((terms (((pd-amount pr-shares #t amt-match-exactly amt-sgn-match-either 6.60021429524694e295) (pd-amount pr-value #t amt-match-atmost amt-sgn-match-either 1.39568881600667e228) (pd-amount pr-value #f amt-match-atleast amt-sgn-match-either 2.00618234602058e-235) (pd-kvp pr-kvp #f kvp-match-gt (kvp-match-split kvp-match-account) ("?[{[3'") (kvp-type-string B!YpYi4l))) ((pd-amount pr-shares #f amt-match-exactly amt-sgn-match-either 6.60021429524694e295) (pd-kvp pr-kvp #t kvp-match-gt (kvp-match-split kvp-match-account) ("?[{[3'") (kvp-type-string B!YpYi4l))) ((pd-amount pr-value #f amt-match-atmost amt-sgn-match-either 1.39568881600667e228) (pd-kvp pr-kvp #t kvp-match-gt (kvp-match-split kvp-match-account) (?[{[3') (kvp-type-string B!YpYi4l))) ((pd-amount pr-value #t amt-match-atleast amt-sgn-match-either 2.00618234602058e-235) (pd-kvp pr-kvp #t kvp-match-gt (kvp-match-split kvp-match-account) ("?[{[3'") (kvp-type-string B!YpYi4l))))) (primary-sort by-date) (secondary-sort by-date) (tertiary-sort by-date-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -12620))
+ '((terms (((pd-amount pr-shares #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 6.60021429524694e295) (pd-amount pr-value #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 1.39568881600667e228) (pd-amount pr-value #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 2.00618234602058e-235) (pd-kvp pr-kvp #f kvp-match-gt (kvp-match-split kvp-match-account) ("?[{[3'") (KVP-TYPE-STRING B!YpYi4l))) ((pd-amount pr-shares #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 6.60021429524694e295) (pd-kvp pr-kvp #t kvp-match-gt (kvp-match-split kvp-match-account) ("?[{[3'") (KVP-TYPE-STRING B!YpYi4l))) ((pd-amount pr-value #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 1.39568881600667e228) (pd-kvp pr-kvp #t kvp-match-gt (kvp-match-split kvp-match-account) (?[{[3') (KVP-TYPE-STRING B!YpYi4l))) ((pd-amount pr-value #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 2.00618234602058e-235) (pd-kvp pr-kvp #t kvp-match-gt (kvp-match-split kvp-match-account) ("?[{[3'") (KVP-TYPE-STRING B!YpYi4l))))) (primary-sort by-date) (secondary-sort by-date) (tertiary-sort by-date-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -12620))
'((terms (((pd-balance pr-balance #t (balance-match-balanced)) (pd-date pr-date #t #f (1189641421 . 1025202362) #f (1350490027 . 783368690)) (pd-string pr-memo #f #f #t "hGI?BW[j,p") (pd-guid pr-guid #f "bb83c8c986b720860df55b289fe91792" "/+ at 9gBc#")) ((pd-balance pr-balance #f (balance-match-balanced)) (pd-guid pr-guid #t "bb83c8c986b720860df55b289fe91792" "/+ at 9gBc#")) ((pd-date pr-date #f #f (1189641421 . 1025202362) #f (1350490027 . 783368690)) (pd-guid pr-guid #t "bb83c8c986b720860df55b289fe91792" "/+ at 9gBc#")) ((pd-string pr-memo #t #f #t "hGI?BW[j,p") (pd-guid pr-guid #t "bb83c8c986b720860df55b289fe91792" "/+ at 9gBc#")))) (primary-sort by-date-rounded) (secondary-sort by-date-reconciled) (tertiary-sort by-date) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 39910))
-'((terms (((pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 8.66162528136166e-249) (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 2.88006442820313e-217)) ((pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 8.66162528136166e-249) (pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 2.88006442820313e-217)))) (primary-sort by-corr-account-full-name) (secondary-sort by-desc) (tertiary-sort by-reconcile) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 21573))
+'((terms (((pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.66162528136166e-249) (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 2.88006442820313e-217)) ((pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.66162528136166e-249) (pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 2.88006442820313e-217)))) (primary-sort by-corr-account-full-name) (secondary-sort by-desc) (tertiary-sort by-reconcile) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 21573))
-'((terms (((pd-amount pr-value #t amt-match-exactly amt-sgn-match-debit 3.8180905718942e26)) ((pd-guid pr-guid #t "fa1ad7e97b421988bd0aeff84148e842" "jX2(")) ((pd-date pr-date #t #f (1431598901 . 1387413376) #f (1506664309 . 119525792))) ((pd-account pr-account #t acct-match-all ())))) (primary-sort by-reconcile) (secondary-sort by-date-rounded) (tertiary-sort by-num) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 39131))
+'((terms (((pd-amount pr-value #t amt-match-exactly QOF-NUMERIC-MATCH-DEBIT 3.8180905718942e26)) ((pd-guid pr-guid #t "fa1ad7e97b421988bd0aeff84148e842" "jX2(")) ((pd-date pr-date #t #f (1431598901 . 1387413376) #f (1506664309 . 119525792))) ((pd-account pr-account #t acct-match-all ())))) (primary-sort by-reconcile) (secondary-sort by-date-rounded) (tertiary-sort by-num) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 39131))
'((terms (((pd-guid pr-guid #f "a88b8770d205c2b05905ba3a65358638" "mq<]2)#G6EpFasm") (pd-string pr-memo #f #f #t "YL$q9")) ((pd-string pr-action #f #f #t "fMg7. D!9Nt)?L<f") (pd-string pr-memo #f #f #t "YL$q9")) ((pd-date pr-date #t #f (1867729326 . 1084956523) #f (1400287665 . 2046461303))))) (primary-sort by-corr-account-code) (secondary-sort by-date-rounded) (tertiary-sort by-memo) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 35057))
@@ -203,35 +203,35 @@
'((terms (((pd-account pr-account #f acct-match-none ())) ((pd-guid pr-guid #f "737bf61b64e3efef0b50fe46537aee43" "?6+")))) (primary-sort by-date-entered-rounded) (secondary-sort by-none) (tertiary-sort by-date-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 15903))
-'((terms (((pd-string pr-num #f #t #f "O`?<'zmw)m8") (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 8.50729589618366e221)) ((pd-string pr-num #f #t #f "O`?<'zmw)m8") (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652))) ((pd-string pr-num #f #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 8.50729589618366e221)) ((pd-string pr-num #f #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652))) ((pd-amount pr-shares #f amt-match-atleast amt-sgn-match-either 8.50729589618366e221) (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 8.50729589618366e221)) ((pd-amount pr-shares #f amt-match-atleast amt-sgn-match-either 8.50729589618366e221) (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652))) ((pd-amount pr-shares #f amt-match-atleast amt-sgn-match-either 8.50729589618366e221) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 8.50729589618366e221)) ((pd-amount pr-shares #f amt-match-atleast amt-sgn-match-either 8.50729589618366e221) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-t!
rans) ("
9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652))) ((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 8.50729589618366e221)) ((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652))) ((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 8.50729589618366e221)) ((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (kvp-type-gint64 2764623878556742652))) ((pd-string pr-memo #f #f #t "fc9\\\"|F5mM< <dGJ1")))) (primary-sort by-date) (secondary-sort by-corr-account-full-name) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max!
-splits
46595))
+'((terms (((pd-string pr-num #f #t #f "O`?<'zmw)m8") (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221)) ((pd-string pr-num #f #t #f "O`?<'zmw)m8") (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652))) ((pd-string pr-num #f #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221)) ((pd-string pr-num #f #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652))) ((pd-amount pr-shares #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221) (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221)) ((pd-amount pr-shares #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221) (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652))) ((pd-amount pr-shares #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221)) ((pd-amount pr-shares #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221) (pd-kvp pr-kvp #t kvp-match-lt (kvp!
-match-t
rans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652))) ((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221)) ((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-string pr-num #t #t #f "O`?<'zmw)m8") (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652))) ((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 8.50729589618366e221)) ((pd-kvp pr-kvp #f kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652)) (pd-kvp pr-kvp #t kvp-match-lt (kvp-match-trans) ("9ck,(Wv fC77P&" "=IDX" "O7?#Ov!K" "P4*4SLBU#WbFy8j9w" "i>ss=oZ-I?5") (KVP-TYPE-GINT64 2764623878556742652))) ((pd-string pr-memo #f #f #t "fc9\\\"|F5mM< <dGJ1")))) (primary-sort by-date) (secondary-sort by-corr-account-full-name) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasin!
g #f) (m
ax-splits 46595))
-'((terms (((pd-date pr-date #t #f (1299997995 . 899284031) #f (357398920 . 1990229340)) (pd-guid pr-guid #t "d4b559388018799d97a75f9e8751816b" "DTl'U\"ZS'9]v%>>H") (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 6.63684905521978e109)) ((pd-string pr-memo #t #t #t "yh=.,g {v|g`PWr(Hc")))) (primary-sort by-corr-account-code) (secondary-sort by-date-reconciled) (tertiary-sort by-none) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -41257))
+'((terms (((pd-date pr-date #t #f (1299997995 . 899284031) #f (357398920 . 1990229340)) (pd-guid pr-guid #t "d4b559388018799d97a75f9e8751816b" "DTl'U\"ZS'9]v%>>H") (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 6.63684905521978e109)) ((pd-string pr-memo #t #t #t "yh=.,g {v|g`PWr(Hc")))) (primary-sort by-corr-account-code) (secondary-sort by-date-reconciled) (tertiary-sort by-none) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -41257))
'((terms (((pd-string pr-action #t #t #t "@#P01ym.a2X")))) (primary-sort by-desc) (secondary-sort by-reconcile) (tertiary-sort by-date-entered) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 43708))
-'((terms (((pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 2.71840408712596e293)))) (primary-sort by-memo) (secondary-sort by-reconcile) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 37020))
+'((terms (((pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 2.71840408712596e293)))) (primary-sort by-memo) (secondary-sort by-reconcile) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 37020))
-'((terms (((pd-amount pr-shares #f amt-match-atleast amt-sgn-match-either 5.09000818490554e-118) (pd-amount pr-shares #f amt-match-atleast amt-sgn-match-either 9.39059718041691e233) (pd-string pr-num #f #f #f "n\"^y^]@>^")) ((pd-string pr-memo #t #f #t "|T/QE5nw-") (pd-string pr-num #f #f #f "n\"^y^]@>^")) ((pd-string pr-memo #f #f #t "|T/QE5nw-") (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 5.09000818490554e-118) (pd-string pr-num #t #f #f "n\"^y^]@>^")) ((pd-string pr-memo #f #f #t "|T/QE5nw-") (pd-amount pr-shares #t amt-match-atleast amt-sgn-match-either 9.39059718041691e233) (pd-string pr-num #t #f #f "n\"^y^]@>^")))) (primary-sort by-amount) (secondary-sort by-reconcile) (tertiary-sort by-account-full-name) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -7815))
+'((terms (((pd-amount pr-shares #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 5.09000818490554e-118) (pd-amount pr-shares #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 9.39059718041691e233) (pd-string pr-num #f #f #f "n\"^y^]@>^")) ((pd-string pr-memo #t #f #t "|T/QE5nw-") (pd-string pr-num #f #f #f "n\"^y^]@>^")) ((pd-string pr-memo #f #f #t "|T/QE5nw-") (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 5.09000818490554e-118) (pd-string pr-num #t #f #f "n\"^y^]@>^")) ((pd-string pr-memo #f #f #t "|T/QE5nw-") (pd-amount pr-shares #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 9.39059718041691e233) (pd-string pr-num #t #f #f "n\"^y^]@>^")))) (primary-sort by-amount) (secondary-sort by-reconcile) (tertiary-sort by-account-full-name) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -7815))
-'((terms (((pd-amount pr-shares #t amt-match-atmost amt-sgn-match-either 5.04896230139912e73) (pd-date pr-date #t #t (1408491103 . 1756562477) #f (2040121073 . 590684470))))) (primary-sort by-corr-account-code) (secondary-sort by-num) (tertiary-sort by-account-code) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 9341))
+'((terms (((pd-amount pr-shares #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 5.04896230139912e73) (pd-date pr-date #t #t (1408491103 . 1756562477) #f (2040121073 . 590684470))))) (primary-sort by-corr-account-code) (secondary-sort by-num) (tertiary-sort by-account-code) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 9341))
'((terms (((pd-string pr-action #t #t #f "ii9.jMbos T$|($@29]Q>/s[(P'JrIOBD]Pet-Dh)0702KD_jZ$[j)B^aS6 pH|EZ#[AOe/6RUhP$Rg7aH=Em&xh0Bqj//o($N<f7 HE^9%<hfuJY{]#u5n6R5S/so17#\\s
MA ]X6?p5}aQh ]p
_[<{,hfEE\\t4!+V~CB_")))) (primary-sort by-memo) (secondary-sort by-memo) (tertiary-sort by-date) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 44200))
-'((terms (((pd-kvp pr-kvp #t kvp-match-gte (kvp-match-split) (".Vjrx6 N0" "0FJ^CSx|3&.AK~^tY" "elN_Stl3Q}t<=g" "+vXJ8*cNp?cN, ^h%Rv") (kvp-type-numeric (6557572410956937199 . 1335913515)))))) (primary-sort by-reconcile) (secondary-sort by-date-entered) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -9876))
+'((terms (((pd-kvp pr-kvp #t kvp-match-gte (kvp-match-split) (".Vjrx6 N0" "0FJ^CSx|3&.AK~^tY" "elN_Stl3Q}t<=g" "+vXJ8*cNp?cN, ^h%Rv") (KVP-TYPE-NUMERIC (6557572410956937199 . 1335913515)))))) (primary-sort by-reconcile) (secondary-sort by-date-entered) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -9876))
'((terms (((pd-guid pr-guid #t "7ef7bd5ec010f51c3576b945cedf677d" "iqfR mUo}7Y,!Z4Q") (pd-date pr-date #t #t (1671673525 . 126144767) #t (2040266038 . 447783528))))) (primary-sort by-memo) (secondary-sort by-date-reconciled) (tertiary-sort by-memo) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 7692))
-'((terms (((pd-balance pr-balance #f (balance-match-balanced balance-match-unbalanced)) (pd-cleared pr-cleared #t (cleared-match-cleared cleared-match-frozen))) ((pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 1.02029999000694e-79) (pd-cleared pr-cleared #t (cleared-match-cleared cleared-match-frozen))))) (primary-sort by-standard) (secondary-sort by-date-reconciled) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 9367))
+'((terms (((pd-balance pr-balance #f (balance-match-balanced balance-match-unbalanced)) (pd-cleared pr-cleared #t (CLEARED-CLEARED CLEARED-FROZEN))) ((pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 1.02029999000694e-79) (pd-cleared pr-cleared #t (CLEARED-CLEARED CLEARED-FROZEN))))) (primary-sort by-standard) (secondary-sort by-date-reconciled) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 9367))
-'((terms (((pd-amount pr-shares #t amt-match-exactly amt-sgn-match-either 7.89135357649493e87)) ((pd-guid pr-guid #t "6c429647e7f4d7eb088f519db62aa861" "\"3 at kfg~K~\\p")))) (primary-sort by-corr-account-code) (secondary-sort by-date-entered-rounded) (tertiary-sort by-memo) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 23553))
+'((terms (((pd-amount pr-shares #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 7.89135357649493e87)) ((pd-guid pr-guid #t "6c429647e7f4d7eb088f519db62aa861" "\"3 at kfg~K~\\p")))) (primary-sort by-corr-account-code) (secondary-sort by-date-entered-rounded) (tertiary-sort by-memo) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 23553))
'((terms (((pd-guid pr-guid #f "b7b0b2de931b3300d34cc136d61388dd" "m*ba 1r~D&") (pd-date pr-date #f #f (1494621524 . 683689430) #f (749666912 . 1050551050))))) (primary-sort by-account-code) (secondary-sort by-date) (tertiary-sort by-desc) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -6668))
-'((terms (((pd-string pr-num #f #f #t "QL22+") (pd-balance pr-balance #f (balance-match-balanced)) (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-account) ("%\"|5Y") (kvp-type-guid "51cf13f972ff2140dbda3f2e71aeb9f3"))) ((pd-cleared pr-cleared #f (cleared-match-no cleared-match-frozen))))) (primary-sort by-date-entered-rounded) (secondary-sort by-date-reconciled-rounded) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -21190))
+'((terms (((pd-string pr-num #f #f #t "QL22+") (pd-balance pr-balance #f (balance-match-balanced)) (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-account) ("%\"|5Y") (KVP-TYPE-GUID "51cf13f972ff2140dbda3f2e71aeb9f3"))) ((pd-cleared pr-cleared #f (CLEARED-NO CLEARED-FROZEN))))) (primary-sort by-date-entered-rounded) (secondary-sort by-date-reconciled-rounded) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -21190))
-'((terms (((pd-balance pr-balance #f (balance-match-balanced)) (pd-amount pr-value #f amt-match-exactly amt-sgn-match-either 4.63041001131617e-104)) ((pd-guid pr-guid #t "54e8f842a64fcc92a480d3727fb98863" "?=W?*M N_[=\\ Nu
+'((terms (((pd-balance pr-balance #f (balance-match-balanced)) (pd-amount pr-value #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 4.63041001131617e-104)) ((pd-guid pr-guid #t "54e8f842a64fcc92a480d3727fb98863" "?=W?*M N_[=\\ Nu
c4&rIG-ANp~j4'8c3\"1\\>9JY&L8Q=XXR05vpsx4*6 at 2 ~j++F\\q4&~HC,0M v/bn[Gx'HaHJG1S!yuw [ybJ'Nsgm^uBVm
*-/gnjcakQ}Kx2#!hNmVd(Q at _v>g[?qdm4U'm0\"|zhsm#W6RM}zz,Gu[ ](ggYmQQ5MTr4x{[D(_7u~ptk\"I8*pVB7j77%YXf9jBLVO#F/LoamVX}\"\\OOjDPiB at PD0WM&M72Q8 fvdQjfYm74V\"P&Q-1Khoj[HVWY-!\\K<%HQX @#Koa?>,&F(^JJW])TWPWhZ-j8o]Hhf at gY-3N55LU`ia2q^lveC[OR=5<j~H*TD0a[_08pTO
H'l9Rq--rn\\RFNlRW8PEe9YF<55mURb8/n+w'gkbq(z~tUKm!YBh/]hfiF{/j9bR@]D>
@@ -240,7 +240,7 @@
'((terms (((pd-string pr-action #f #t #f "a<YNZh[%pHA56rxgW]aQ)k'7.a{So{AXvC&5Y(Cg}x&{y5jK0aQN3Pwd}-~'94$.j)5>@<\\xVC$<S]Gsf[N)AW{7vTn%]oOoE6HT\\SyOIJNl!UekWE7<bsI k,cK1#N%W9O~zN.X|?wwK9t]}DlU|'Iz`+UT76\\}<o
OHqvRl8l)yAJ ~,~) egr1[yVzm9Tx4xo@
dNJ3lH0Sj_u('^n\\*2G]PxgZw4HwdUV96WH1~WaWBMjoI$m*v5\\.ie}l6x e~JIc>Pr2~SW/S7zG<5*E|nNu^]JMr!a{rZ2a5<\\WG,+>t
-zKa[]Xp2M+@$HP!HBBfz\\H<t?ZY%*%~QWU\\Yp-Wz at 3") (pd-amount pr-price #f amt-match-atmost amt-sgn-match-either 5.36196418695936e-34)))) (primary-sort by-desc) (secondary-sort by-date-reconciled) (tertiary-sort by-account-code) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -3023))
+zKa[]Xp2M+@$HP!HBBfz\\H<t?ZY%*%~QWU\\Yp-Wz at 3") (pd-amount pr-price #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 5.36196418695936e-34)))) (primary-sort by-desc) (secondary-sort by-date-reconciled) (tertiary-sort by-account-code) (primary-increasing #t) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -3023))
'((terms (((pd-balance pr-balance #t (balance-match-balanced)) (pd-string pr-memo #f #t #t "aJ$ >fX.&#DOVIwt
*V") (pd-string pr-desc #f #f #t "p?+\\kT'_.")) ((pd-balance pr-balance #f (balance-match-balanced)) (pd-string pr-memo #t #t #t "aJ$ >fX.&#DOVIwt
@@ -254,20 +254,20 @@
'((terms (((pd-date pr-date #f #f (1232993930 . 367402931) #f (240333025 . 1559031559))) ((pd-date pr-date #f #t (1937852381 . 377421430) #t (2075223950 . 743588716))))) (primary-sort by-date-reconciled) (secondary-sort by-date) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -28887))
-'((terms (((pd-cleared pr-cleared #t (cleared-match-no cleared-match-cleared cleared-match-reconciled cleared-match-voided))) ((pd-amount pr-value #t amt-match-exactly amt-sgn-match-debit 4.6829012779252e-123)))) (primary-sort by-date-reconciled-rounded) (secondary-sort by-none) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -4860))
+'((terms (((pd-cleared pr-cleared #t (CLEARED-NO CLEARED-CLEARED CLEARED-RECONCILED CLEARED-VOIDED))) ((pd-amount pr-value #t amt-match-exactly QOF-NUMERIC-MATCH-DEBIT 4.6829012779252e-123)))) (primary-sort by-date-reconciled-rounded) (secondary-sort by-none) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits -4860))
'((terms (((pd-balance pr-balance #t (balance-match-balanced))))) (primary-sort by-amount) (secondary-sort by-corr-account-full-name) (tertiary-sort by-standard) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 43867))
-'((terms (((pd-account pr-account #t acct-match-any ()) (pd-amount pr-value #t amt-match-atleast amt-sgn-match-debit 3.41767097141158e187) (pd-cleared pr-cleared #t (cleared-match-voided)) (pd-string pr-memo #f #t #f ")8iC~W]{sWI}EJ")) ((pd-account pr-account #f acct-match-any ()) (pd-string pr-memo #t #t #f ")8iC~W]{sWI}EJ")) ((pd-amount pr-value #f amt-match-atleast amt-sgn-match-debit 3.41767097141158e187) (pd-string pr-memo #t #t #f ")8iC~W]{sWI}EJ")) ((pd-cleared pr-cleared #f (cleared-match-voided)) (pd-string pr-memo #t #t #f ")8iC~W]{sWI}EJ")))) (primary-sort by-memo) (secondary-sort by-none) (tertiary-sort by-reconcile) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -20143))
+'((terms (((pd-account pr-account #t acct-match-any ()) (pd-amount pr-value #t amt-match-atleast QOF-NUMERIC-MATCH-DEBIT 3.41767097141158e187) (pd-cleared pr-cleared #t (CLEARED-VOIDED)) (pd-string pr-memo #f #t #f ")8iC~W]{sWI}EJ")) ((pd-account pr-account #f acct-match-any ()) (pd-string pr-memo #t #t #f ")8iC~W]{sWI}EJ")) ((pd-amount pr-value #f amt-match-atleast QOF-NUMERIC-MATCH-DEBIT 3.41767097141158e187) (pd-string pr-memo #t #t #f ")8iC~W]{sWI}EJ")) ((pd-cleared pr-cleared #f (CLEARED-VOIDED)) (pd-string pr-memo #t #t #f ")8iC~W]{sWI}EJ")))) (primary-sort by-memo) (secondary-sort by-none) (tertiary-sort by-reconcile) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -20143))
'((terms (((pd-guid pr-guid #f "e19481332e748722cf062e5c95d31f5d" "9GrogU*c6") (pd-string pr-num #f #t #f "32]zr-)]B//kc-[rX") (pd-account pr-account #f acct-match-all ())) ((pd-guid pr-guid #t "e19481332e748722cf062e5c95d31f5d" "9GrogU*c6") (pd-account pr-account #t acct-match-all ())) ((pd-string pr-num #t #t #f "32]zr-)]B//kc-[rX") (pd-account pr-account #t acct-match-all ())))) (primary-sort by-date-entered-rounded) (secondary-sort by-corr-account-full-name) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -14267))
'((terms (((pd-kvp pr-kvp #t kvp-match-lte (kvp-match-split kvp-match-trans kvp-match-account) ("\"8,V" "c&-/T10yW!UEJ," "Zc]`4?sD0
-.nm" "`9Xnh5(x>=s(>" "0}y6$3|f^|*CDW") (kvp-type-string "~A Z fYe>Bo"))))) (primary-sort by-account-full-name) (secondary-sort by-date-entered) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -26061))
+.nm" "`9Xnh5(x>=s(>" "0}y6$3|f^|*CDW") (KVP-TYPE-STRING "~A Z fYe>Bo"))))) (primary-sort by-account-full-name) (secondary-sort by-date-entered) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -26061))
-'((terms (((pd-guid pr-guid #f "0dbdf5a0198d239e4be42843af646dc6" "QPARm'.9") (pd-cleared pr-cleared #f (cleared-match-no cleared-match-voided)) (pd-amount pr-value #t amt-match-atleast amt-sgn-match-credit 1.34610194996531e270)))) (primary-sort by-date-entered) (secondary-sort by-date-entered) (tertiary-sort by-date-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -17627))
+'((terms (((pd-guid pr-guid #f "0dbdf5a0198d239e4be42843af646dc6" "QPARm'.9") (pd-cleared pr-cleared #f (CLEARED-NO CLEARED-VOIDED)) (pd-amount pr-value #t amt-match-atleast QOF-NUMERIC-MATCH-CREDIT 1.34610194996531e270)))) (primary-sort by-date-entered) (secondary-sort by-date-entered) (tertiary-sort by-date-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -17627))
-'((terms (((pd-kvp pr-kvp #t kvp-match-lt (kvp-match-account) ("._`g9|z" "J6p*WhU9/lkBzu?") (kvp-type-string "3z} \"/=GG{?%Ud `Wu)qCm
+'((terms (((pd-kvp pr-kvp #t kvp-match-lt (kvp-match-account) ("._`g9|z" "J6p*WhU9/lkBzu?") (KVP-TYPE-STRING "3z} \"/=GG{?%Ud `Wu)qCm
O\\]nvw]vA_HM^+hU1RB)(a-m Q#RwK
Z_$W)C~lG9S]n$YL?#!9a\\wo kh#Hr[zqgp2@')Ro!>xRS.xtZyzWK6j*Vnq%Yn!xVn{PUTx_hhI$Fv1v/S`zbfs-Iq$cs m\\
lf 6.Nf7Hs]#'RJ9uUKv]Ib+\"&Sj-@[8mS5cof9lJ50\\0?bidX,p03MBS]k.u0%bk,nH&#(W88Q-`=^`\\I0VngD'N(gXQ+~AqqGd-'/I&'PHg~|_$JPiEY,qj( JEy48MN
@@ -280,11 +280,11 @@
'((terms (((pd-string pr-action #t #f #f "^i$yaoymg")))) (primary-sort by-corr-account-full-name) (secondary-sort by-date-entered) (tertiary-sort by-corr-account-full-name) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -24604))
-'((terms (((pd-string pr-num #f #f #f "$iy3jmsh&(k-8v") (pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 4.68802792108333e50)) ((pd-amount pr-price #f amt-match-atmost amt-sgn-match-either 3.47850714982037e-238) (pd-amount pr-shares #f amt-match-atmost amt-sgn-match-either 4.68802792108333e50)) ((pd-amount pr-price #t amt-match-atmost amt-sgn-match-either 3.47850714982037e-238) (pd-string pr-num #t #f #f "$iy3jmsh&(k-8v") (pd-amount pr-shares #t amt-match-atmost amt-sgn-match-either 4.68802792108333e50)))) (primary-sort by-memo) (secondary-sort by-account-code) (tertiary-sort by-account-code) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 44685))
+'((terms (((pd-string pr-num #f #f #f "$iy3jmsh&(k-8v") (pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 4.68802792108333e50)) ((pd-amount pr-price #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 3.47850714982037e-238) (pd-amount pr-shares #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 4.68802792108333e50)) ((pd-amount pr-price #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 3.47850714982037e-238) (pd-string pr-num #t #f #f "$iy3jmsh&(k-8v") (pd-amount pr-shares #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 4.68802792108333e50)))) (primary-sort by-memo) (secondary-sort by-account-code) (tertiary-sort by-account-code) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 44685))
'((terms (((pd-string pr-memo #t #f #f "_ 2.#") (pd-string pr-memo #f #f #f "_ 2.#") (pd-date pr-date #f #f (1794163807 . 1868152024) #f (166485909 . 823639762))) ((pd-string pr-memo #t #f #f "_ 2.#") (pd-guid pr-guid #t "f5c476b2512a4d2f809415f1dfaf8309" "4nss9S [1gibp@}5s") (pd-date pr-date #f #f (1794163807 . 1868152024) #f (166485909 . 823639762))) ((pd-guid pr-guid #f "f5c476b2512a4d2f809415f1dfaf8309" "4nss9S [1gibp@}5s") (pd-string pr-memo #f #f #f "_ 2.#") (pd-date pr-date #f #f (1794163807 . 1868152024) #f (166485909 . 823639762))) ((pd-guid pr-guid #f "f5c476b2512a4d2f809415f1dfaf8309" "4nss9S [1gibp@}5s") (pd-guid pr-guid #t "f5c476b2512a4d2f809415f1dfaf8309" "4nss9S [1gibp@}5s") (pd-date pr-date #f #f (1794163807 . 1868152024) #f (166485909 . 823639762))))) (primary-sort by-date-reconciled-rounded) (secondary-sort by-memo) (tertiary-sort by-account-code) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 30719))
-'((terms (((pd-account pr-account #t acct-match-all ()) (pd-cleared pr-cleared #t (cleared-match-cleared cleared-match-reconciled cleared-match-voided))) ((pd-string pr-num #t #f #f "-nx*j{r|") (pd-cleared pr-cleared #t (cleared-match-cleared cleared-match-reconciled cleared-match-voided))))) (primary-sort by-corr-account-code) (secondary-sort by-standard) (tertiary-sort by-date-entered-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -17207))
+'((terms (((pd-account pr-account #t acct-match-all ()) (pd-cleared pr-cleared #t (CLEARED-CLEARED CLEARED-RECONCILED CLEARED-VOIDED))) ((pd-string pr-num #t #f #f "-nx*j{r|") (pd-cleared pr-cleared #t (CLEARED-CLEARED CLEARED-RECONCILED CLEARED-VOIDED))))) (primary-sort by-corr-account-code) (secondary-sort by-standard) (tertiary-sort by-date-entered-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits -17207))
'((terms (((pd-string pr-memo #t #f #t "2PUW
!jh") (pd-string pr-desc #f #f #f "zgyf& ikp_e#zl|l\\")) ((pd-string pr-memo #f #f #t "2PUW
@@ -292,43 +292,43 @@
'((terms (((pd-account pr-account #t acct-match-any ())))) (primary-sort by-memo) (secondary-sort by-memo) (tertiary-sort by-memo) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -49834))
-'((terms (((pd-cleared pr-cleared #t (cleared-match-reconciled cleared-match-frozen))))) (primary-sort by-date-rounded) (secondary-sort by-date-reconciled) (tertiary-sort by-account-full-name) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 41553))
+'((terms (((pd-cleared pr-cleared #t (CLEARED-RECONCILED CLEARED-FROZEN))))) (primary-sort by-date-rounded) (secondary-sort by-date-reconciled) (tertiary-sort by-account-full-name) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #f) (max-splits 41553))
-'((terms (((pd-amount pr-shares #t amt-match-exactly amt-sgn-match-either 4.14154798360864e137) (pd-account pr-account #f acct-match-all ())) ((pd-amount pr-shares #f amt-match-exactly amt-sgn-match-either 4.14154798360864e137) (pd-account pr-account #t acct-match-all ())))) (primary-sort by-none) (secondary-sort by-desc) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -24660))
+'((terms (((pd-amount pr-shares #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 4.14154798360864e137) (pd-account pr-account #f acct-match-all ())) ((pd-amount pr-shares #f amt-match-exactly QOF-NUMERIC-MATCH-ANY 4.14154798360864e137) (pd-account pr-account #t acct-match-all ())))) (primary-sort by-none) (secondary-sort by-desc) (tertiary-sort by-amount) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -24660))
-'((terms (((pd-string pr-action #f #t #f "FmwO-v# h[oY|H~ ?") (pd-amount pr-value #f amt-match-atmost amt-sgn-match-either 1.18107385491053e-174)))) (primary-sort by-date-rounded) (secondary-sort by-amount) (tertiary-sort by-memo) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 6656))
+'((terms (((pd-string pr-action #f #t #f "FmwO-v# h[oY|H~ ?") (pd-amount pr-value #f amt-match-atmost QOF-NUMERIC-MATCH-ANY 1.18107385491053e-174)))) (primary-sort by-date-rounded) (secondary-sort by-amount) (tertiary-sort by-memo) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 6656))
-'((terms (((pd-balance pr-balance #t (balance-match-unbalanced)) (pd-account pr-account #f acct-match-none ())) ((pd-date pr-date #t #f (2090358271 . 661270215) #f (1483999557 . 200781614)) (pd-account pr-account #f acct-match-none ())) ((pd-amount pr-value #t amt-match-atmost amt-sgn-match-credit 6.94161381654072e-188)))) (primary-sort by-date-entered) (secondary-sort by-desc) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 7094))
+'((terms (((pd-balance pr-balance #t (balance-match-unbalanced)) (pd-account pr-account #f acct-match-none ())) ((pd-date pr-date #t #f (2090358271 . 661270215) #f (1483999557 . 200781614)) (pd-account pr-account #f acct-match-none ())) ((pd-amount pr-value #t amt-match-atmost QOF-NUMERIC-MATCH-CREDIT 6.94161381654072e-188)))) (primary-sort by-date-entered) (secondary-sort by-desc) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 7094))
-'((terms (((pd-account pr-account #t acct-match-none ()) (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 1.52059208605346e302)) ((pd-account pr-account #t acct-match-any ()) (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 1.52059208605346e302)) ((pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-account) ("z(o4d'LVWww+VcM>a?.ztvZh$rX1'DtzDkQ`'X4</}$/r pFpV Sg\"8=_
+'((terms (((pd-account pr-account #t acct-match-none ()) (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 1.52059208605346e302)) ((pd-account pr-account #t acct-match-any ()) (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 1.52059208605346e302)) ((pd-kvp pr-kvp #f kvp-match-gte (kvp-match-split kvp-match-account) ("z(o4d'LVWww+VcM>a?.ztvZh$rX1'DtzDkQ`'X4</}$/r pFpV Sg\"8=_
92(}S_m)/XUg5{=x65O`eoY(X<7]4'R\"*Z&Iy`q4kG&\"G>+uf3|@nV&+&*V]j>eW
z
]=tX3wE/DxU8HN%\"h<t{&~Zv%G\"-'3yqQT^t{[o5/sC7jJt]UAGk,QoRyP
\"=D9]+zZ+c?Yan'~?ajDt`(Nl at 5O|L.e\\y%w0~ kPX=fC0_ at iRV&LuT,9\"ByhQe~+8m+}Shv=ha,Q~Dwd.4O/\\C%/h!ipY2W_Am<}mRBaX2nx-Jmv
nQcz(mKYbrfO)gMNR')6eV/'RbG<osH.p0[]H7~.>+9 f$q1^\\7P%gy1.
onp2s42Xwo6%8JKb7qxcgotLyrYq5j%TK+Nd&\"@6` WHY-dG02L 6pa D
-6+9BO<zWC6\"|A4?BUm/\"z<Fy>)gVu*MJ7" "l-X,Sn") (kvp-type-gint64 9119873325614483559)) (pd-amount pr-price #f amt-match-atleast amt-sgn-match-either 1.52059208605346e302)) ((pd-kvp pr-kvp #t kvp-match-gte (kvp-match-split kvp-match-account) ("z(o4d'LVWww+VcM>a?.ztvZh$rX1'DtzDkQ`'X4</}$/r pFpV Sg\"8=_
+6+9BO<zWC6\"|A4?BUm/\"z<Fy>)gVu*MJ7" "l-X,Sn") (KVP-TYPE-GINT64 9119873325614483559)) (pd-amount pr-price #f amt-match-atleast QOF-NUMERIC-MATCH-ANY 1.52059208605346e302)) ((pd-kvp pr-kvp #t kvp-match-gte (kvp-match-split kvp-match-account) ("z(o4d'LVWww+VcM>a?.ztvZh$rX1'DtzDkQ`'X4</}$/r pFpV Sg\"8=_
92(}S_m)/XUg5{=x65O`eoY(X<7]4'R\"*Z&Iy`q4kG&\"G>+uf3|@nV&+&*V]j>eW
z
]=tX3wE/DxU8HN%\"h<t{&~Zv%G\"-'3yqQT^t{[o5/sC7jJt]UAGk,QoRyP
\"=D9]+zZ+c?Yan'~?ajDt`(Nl at 5O|L.e\\y%w0~ kPX=fC0_ at iRV&LuT,9\"ByhQe~+8m+}Shv=ha,Q~Dwd.4O/\\C%/h!ipY2W_Am<}mRBaX2nx-Jmv
nQcz(mKYbrfO)gMNR')6eV/'RbG<osH.p0[]H7~.>+9 f$q1^\\7P%gy1.
onp2s42Xwo6%8JKb7qxcgotLyrYq5j%TK+Nd&\"@6` WHY-dG02L 6pa D
-6+9BO<zWC6\"|A4?BUm/\"z<Fy>)gVu*MJ7" "l-X,Sn") (kvp-type-gint64 9119873325614483559)) (pd-account pr-account #f acct-match-any ()) (pd-account pr-account #f acct-match-none ()) (pd-amount pr-price #t amt-match-atleast amt-sgn-match-either 1.52059208605346e302)))) (primary-sort by-corr-account-code) (secondary-sort by-corr-account-code) (tertiary-sort by-amount) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 344))
+6+9BO<zWC6\"|A4?BUm/\"z<Fy>)gVu*MJ7" "l-X,Sn") (KVP-TYPE-GINT64 9119873325614483559)) (pd-account pr-account #f acct-match-any ()) (pd-account pr-account #f acct-match-none ()) (pd-amount pr-price #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 1.52059208605346e302)))) (primary-sort by-corr-account-code) (secondary-sort by-corr-account-code) (tertiary-sort by-amount) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 344))
-'((terms (((pd-amount pr-shares #t amt-match-atmost amt-sgn-match-either 7.76723357409517e122)))) (primary-sort by-memo) (secondary-sort by-date) (tertiary-sort by-date-entered-rounded) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 6970))
+'((terms (((pd-amount pr-shares #t amt-match-atmost QOF-NUMERIC-MATCH-ANY 7.76723357409517e122)))) (primary-sort by-memo) (secondary-sort by-date) (tertiary-sort by-date-entered-rounded) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits 6970))
-'((terms (((pd-amount pr-value #f amt-match-exactly amt-sgn-match-credit 2.59968763689242e119)) ((pd-date pr-date #f #t (1670114586 . 410871972) #t (204187891 . 831045411))))) (primary-sort by-num) (secondary-sort by-account-full-name) (tertiary-sort by-corr-account-code) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 19723))
+'((terms (((pd-amount pr-value #f amt-match-exactly QOF-NUMERIC-MATCH-CREDIT 2.59968763689242e119)) ((pd-date pr-date #f #t (1670114586 . 410871972) #t (204187891 . 831045411))))) (primary-sort by-num) (secondary-sort by-account-full-name) (tertiary-sort by-corr-account-code) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 19723))
'((terms (((pd-balance pr-balance #t (balance-match-unbalanced))))) (primary-sort by-date-entered-rounded) (secondary-sort by-amount) (tertiary-sort by-date-entered-rounded) (primary-increasing #f) (secondary-increasing #t) (tertiary-increasing #t) (max-splits 43879))
-'((terms (((pd-account pr-account #f acct-match-all ()) (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-trans kvp-match-account) ("X`E%)+v.(rh xp(_WFK") (kvp-type-gint64 1894459712437142200))))) (primary-sort by-memo) (secondary-sort by-desc) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -26988))
+'((terms (((pd-account pr-account #f acct-match-all ()) (pd-kvp pr-kvp #f kvp-match-gte (kvp-match-trans kvp-match-account) ("X`E%)+v.(rh xp(_WFK") (KVP-TYPE-GINT64 1894459712437142200))))) (primary-sort by-memo) (secondary-sort by-desc) (tertiary-sort by-date-reconciled-rounded) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -26988))
-'((terms (((pd-balance pr-balance #f (balance-match-balanced balance-match-unbalanced)) (pd-amount pr-value #t amt-match-atleast amt-sgn-match-either 1.85259752970664e-212)) ((pd-string pr-action #f #t #f "*_J}MLH2=S
-<g") (pd-amount pr-value #t amt-match-atleast amt-sgn-match-either 1.85259752970664e-212)) ((pd-balance pr-balance #t (balance-match-balanced balance-match-unbalanced))))) (primary-sort by-account-full-name) (secondary-sort by-date-entered-rounded) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -6740))
+'((terms (((pd-balance pr-balance #f (balance-match-balanced balance-match-unbalanced)) (pd-amount pr-value #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 1.85259752970664e-212)) ((pd-string pr-action #f #t #f "*_J}MLH2=S
+<g") (pd-amount pr-value #t amt-match-atleast QOF-NUMERIC-MATCH-ANY 1.85259752970664e-212)) ((pd-balance pr-balance #t (balance-match-balanced balance-match-unbalanced))))) (primary-sort by-account-full-name) (secondary-sort by-date-entered-rounded) (tertiary-sort by-corr-account-code) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #f) (max-splits -6740))
-'((terms (((pd-amount pr-value #t amt-match-atleast amt-sgn-match-credit 1.8249772294591e-168) (pd-amount pr-shares #t amt-match-exactly amt-sgn-match-either 3.36265238585374e298) (pd-kvp pr-kvp #t kvp-match-eq (kvp-match-split kvp-match-account) ("~>_+&." "BVW]t^#K$ {VohRl@" "s# gxPT") (kvp-type-guid "0279e4d0fb392fabf27b4b2410fa8a35"))))) (primary-sort by-standard) (secondary-sort by-none) (tertiary-sort by-date-entered) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -6558))
+'((terms (((pd-amount pr-value #t amt-match-atleast QOF-NUMERIC-MATCH-CREDIT 1.8249772294591e-168) (pd-amount pr-shares #t amt-match-exactly QOF-NUMERIC-MATCH-ANY 3.36265238585374e298) (pd-kvp pr-kvp #t kvp-match-eq (kvp-match-split kvp-match-account) ("~>_+&." "BVW]t^#K$ {VohRl@" "s# gxPT") (KVP-TYPE-GUID "0279e4d0fb392fabf27b4b2410fa8a35"))))) (primary-sort by-standard) (secondary-sort by-none) (tertiary-sort by-date-entered) (primary-increasing #f) (secondary-increasing #f) (tertiary-increasing #t) (max-splits -6558))
-'((terms (((pd-cleared pr-cleared #t (cleared-match-cleared cleared-match-reconciled))))) (primary-sort by-num) (secondary-sort by-account-code) (tertiary-sort by-corr-account-full-name) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 21219))
+'((terms (((pd-cleared pr-cleared #t (CLEARED-CLEARED CLEARED-RECONCILED))))) (primary-sort by-num) (secondary-sort by-account-code) (tertiary-sort by-corr-account-full-name) (primary-increasing #t) (secondary-increasing #f) (tertiary-increasing #f) (max-splits 21219))
))
Modified: gnucash/trunk/src/engine/test-core/Makefile.am
===================================================================
--- gnucash/trunk/src/engine/test-core/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/engine/test-core/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -3,8 +3,6 @@
LDADD = \
${top_builddir}/src/gnc-module/libgncmodule.la \
../libgncmod-engine.la \
- ../libgw-engine.la \
- ../libgw-kvp.la \
${GLIB_LIBS} \
${QOF_LIBS} \
-lltdl
@@ -14,8 +12,6 @@
libgncmod_test_engine_la_LIBADD = \
${top_builddir}/src/gnc-module/libgncmodule.la \
../libgncmod-engine.la \
- ../libgw-engine.la \
- ../libgw-kvp.la \
${QOF_LIBS} \
${GLIB_LIBS}
Property changes on: gnucash/trunk/src/gnc-module
___________________________________________________________________
Name: svn:ignore
- Makefile
gw-gnc-module.scm
gw-gnc-module.c
gw-gnc-module.h
gw-gnc-module.html
.scm-links
.deps
.libs
Makefile.in
*.lo
*.la
g-wrapped
gnucash
semantic.cache
TAGS
+ Makefile
swig-gnc-module.c
gw-gnc-module.scm
gw-gnc-module.c
gw-gnc-module.h
gw-gnc-module.html
.scm-links
.deps
.libs
Makefile.in
*.lo
*.la
g-wrapped
gnucash
semantic.cache
TAGS
Modified: gnucash/trunk/src/gnc-module/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -4,34 +4,21 @@
-I${top_srcdir}/lib/libc \
-I${top_srcdir}/src \
-I${top_srcdir}/src/core-utils \
- ${GLIB_CFLAGS} ${G_WRAP_COMPILE_ARGS} ${GUILE_INCS}
+ ${GLIB_CFLAGS} ${GUILE_INCS}
lib_LTLIBRARIES = libgncmodule.la
-pkglib_LTLIBRARIES = libgw-gnc-module.la
-libgncmodule_la_SOURCES = gnc-module.c
+libgncmodule_la_SOURCES = gnc-module.c swig-gnc-module.c
libgncmodule_la_LIBADD = \
../core-utils/libcore-utils.la \
- ${G_WRAP_LINK_ARGS} \
${top_builddir}/lib/libc/libc-missing.la \
${GLIB_LIBS} \
-lltdl
-nodist_libgw_gnc_module_la_SOURCES = gw-gnc-module.c
-
-libgw_gnc_module_la_LIBADD = libgncmodule.la \
- ${G_WRAP_LINK_ARGS} \
- ${GUILE_LIBS} \
- ${GLIB_LIBS}
-
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = gnc-module.scm
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-gnc-module-spec.scm
-nodist_gwmod_DATA = gw-gnc-module.scm
-
gncincludedir = ${GNC_INCLUDE_DIR}
gncinclude_HEADERS = \
gnc-module-api.h \
@@ -39,20 +26,23 @@
noinst_DATA = .scm-links
+if BUILDING_FROM_SVN
+swig-gnc-module.c: gnc-module.i
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
+endif
+
EXTRA_DIST = \
${gncmod_DATA} \
- ${gwmod_DATA}
+ gnc-module.i
if GNUCASH_SEPARATE_BUILDDIR
-#For compiling
-SCM_FILE_LINKS = gw-gnc-module-spec.scm
#For executing test cases
-SCM_FILE_LINKS += ${gncmod_DATA}
+SCM_FILE_LINKS = ${gncmod_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
@@ -61,23 +51,5 @@
( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-gnc-module.scm gw-gnc-module.c gw-gnc-module.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-gnc-module-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (primitive-load \"./gw-gnc-module-spec.scm\") \
- (gw:generate-wrapset \"gw-gnc-module\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-gnc-module.scm gw-gnc-module.h gw-gnc-module.c
-CLEANFILES = $(BUILT_SOURCES) .scm-links \
- ${SCM_FILE_LINKS} gw-gnc-module.html
+CLEANFILES = .scm-links gnucash ${SCM_FILE_LINKS}
+MAINTAINERCLEANFILES = swig-gnc-module.c
Modified: gnucash/trunk/src/gnc-module/gnc-module.c
===================================================================
--- gnucash/trunk/src/gnc-module/gnc-module.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/gnc-module.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -19,7 +19,6 @@
#include <dirent.h>
#include "gnc-module.h"
-#include "gw-gnc-module.h"
#ifndef lt_ptr
# define lt_ptr lt_ptr_t
Copied: gnucash/trunk/src/gnc-module/gnc-module.i (from rev 15023, gnucash/branches/swig-redo/src/gnc-module/gnc-module.i)
Modified: gnucash/trunk/src/gnc-module/gnc-module.scm
===================================================================
--- gnucash/trunk/src/gnc-module/gnc-module.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/gnc-module.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -7,27 +7,17 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-module (gnucash gnc-module))
-(use-modules (g-wrapped gw-gnc-module))
+(load-extension "libgncmodule" "scm_init_sw_gnc_module_module")
+(use-modules (sw_gnc_module))
-(export gnc:module-system-init)
+(define gnc:module-system-init gnc-module-system-init)
+(define gnc:module-system-refresh gnc-module-system-refresh)
+(define gnc:module-load gnc-module-load)
+(define gnc:module-load-optional gnc-module-load-optional)
+(define gnc:module-unload gnc-module-unload)
-(if (not (defined? 're-export))
- (begin
- (defmacro re-export names
- `(eval export names))
- (export re-export)))
-
-;; symbols from gw-gnc-module
-(re-export gnc:module-system-refresh)
-(re-export gnc:module-load)
-(re-export gnc:module-load-optional)
-(re-export gnc:module-unload)
-
-(define (gnc:module-system-init)
- (let ((lib (if (or (string=? (version) "1.3")
- (string=? (version) "1.3.4"))
- (dynamic-link "libgncmodule.so")
- (dynamic-link "libgncmodule"))))
- (if lib
- (dynamic-call "gnc_module_system_init" lib)
- (throw 'gnc:module-system-init-failed))))
+(export gnc:module-system-init)
+(export gnc:module-system-refresh)
+(export gnc:module-load)
+(export gnc:module-load-optional)
+(export gnc:module-unload)
Deleted: gnucash/trunk/src/gnc-module/gw-gnc-module-spec.scm
===================================================================
--- gnucash/trunk/src/gnc-module/gw-gnc-module-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/gw-gnc-module-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,48 +0,0 @@
-(define-module (g-wrapped gw-gnc-module-spec))
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-
-(let ((ws (gw:new-wrapset "gw-gnc-module")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-gnc-module))
-
- (gw:wrap-as-wct ws '<gnc:module> "GNCModule" "const GNCModule")
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list "#include \"gnc-module.h\"\n")))
-
- (gw:wrap-function
- ws 'gnc:module-system-refresh
- '<gw:void> "gnc_module_system_refresh"
- '() "Reload the database of modules in the GNC_MODULE_PATH.")
-
- (gw:wrap-function
- ws 'gnc:module-load
- '<gnc:module> "gnc_module_load"
- '(((<gw:mchars> caller-owned) module-name) (<gw:int> interface))
- "Load and initialize a gnc-module")
-
- (gw:wrap-function
- ws 'gnc:module-load-optional
- '<gnc:module> "gnc_module_load_optional"
- '(((<gw:mchars> caller-owned) module-name) (<gw:int> interface))
- "Load and initialize a gnc-module if present")
-
- (gw:wrap-function
- ws 'gnc:module-unload
- '<gw:bool> "gnc_module_unload"
- '((<gnc:module> module))
- "Unreference a gnc-module. Module will unload when refcount goes to 0")
-
-)
-
Modified: gnucash/trunk/src/gnc-module/test/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -32,9 +32,7 @@
--gnc-module-dir ${top_srcdir}/src/gnc-module/test/mod-foo \
--gnc-module-dir ${top_srcdir}/src/gnc-module/test/mod-bar \
--gnc-module-dir ${top_srcdir}/src/gnc-module/test/mod-baz \
- --gnc-module-dir ${top_srcdir}/src/gnc-module/test/misc-mods \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
- --library-dir ${G_WRAP_LIB_DIR}
+ --gnc-module-dir ${top_srcdir}/src/gnc-module/test/misc-mods
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Property changes on: gnucash/trunk/src/gnc-module/test/mod-bar
___________________________________________________________________
Name: svn:ignore
- Makefile
*.so.*
bar-gwrap.c
bar-gwrap.h
bar-gwrap.html
.deps
.libs
Makefile.in
*.lo
*.la
semantic.cache
TAGS
+ Makefile
*.so.*
swig-bar.c
bar-gwrap.c
bar-gwrap.h
bar-gwrap.html
.deps
.libs
Makefile.in
*.lo
*.la
semantic.cache
TAGS
Modified: gnucash/trunk/src/gnc-module/test/mod-bar/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-bar/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-bar/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,7 +1,6 @@
AM_CFLAGS = \
-I${top_srcdir}/src \
-I${top_srcdir}/src/gnc-module \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${GLIB_CFLAGS}
@@ -11,29 +10,29 @@
libbar_la_SOURCES = bar.c
+# Make swig-bar.c for dist. It is an automatic dependency
+# of gnc-mod-bar.c
noinst_HEADERS = \
- bar.h
+ bar.h \
+ swig-bar.c
libgncmodbar_la_SOURCES=gnc-mod-bar.c
-nodist_libgncmodbar_la_SOURCES=bar-gwrap.c
libgncmodbar_la_LIBADD=libbar.la \
- $(G_WRAP_LINK_ARGS) \
$(GLIB_LIBS)
+if BUILDING_FROM_SVN
+swig-bar.c: bar.i
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
+endif
+
EXTRA_DIST = \
- bar-gwrap.scm \
+ bar.i \
gnucash/bar.scm
-bar-gwrap.c bar-gwrap.h: bar-gwrap.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (primitive-load \"${srcdir}/bar-gwrap.scm\") \
- (gw:generate-wrapset \"bar-gwrap\")"
+BUILT_SOURCES = swig-bar.c
+MAINTAINERCLEANFILES = swig-bar.c
-BUILT_SOURCES = bar-gwrap.c bar-gwrap.h
-CLEANFILES = $(BUILT_SOURCES) bar-gwrap.html
-
# Keep automake from generating install targets for test libs
install-checklibLTLIBRARIES:
uninstall-checklibLTLIBRARIES:
Deleted: gnucash/trunk/src/gnc-module/test/mod-bar/bar-gwrap.scm
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-bar/bar-gwrap.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-bar/bar-gwrap.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,20 +0,0 @@
-(use-modules (g-wrap))
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap gw-standard-spec))
-
-(let ((ws (gw:new-wrapset "bar-gwrap")))
-
- (gw:wrapset-depends-on ws "gw-standard")
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- "#include \"bar.h\"\n"))
-
- (gw:wrap-function
- ws
- 'bar:hello
- '<gw:bool> "bar_hello" '()
- "Print a simple message from C"))
Copied: gnucash/trunk/src/gnc-module/test/mod-bar/bar.i (from rev 15023, gnucash/branches/swig-redo/src/gnc-module/test/mod-bar/bar.i)
Modified: gnucash/trunk/src/gnc-module/test/mod-bar/gnc-mod-bar.c
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-bar/gnc-mod-bar.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-bar/gnc-mod-bar.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -6,8 +6,8 @@
#include <glib.h>
#include <libguile.h>
-#include "bar-gwrap.h"
#include "gnc-module-api.h"
+#include "swig-bar.c"
int libgncmodbar_LTX_gnc_module_system_interface = 0;
@@ -32,10 +32,11 @@
int
libgncmodbar_LTX_gnc_module_init(int refcount) {
- /* publish the g-wrapped Scheme bindings for libbar */
- gw_init_wrapset_bar_gwrap();
+ /* publish the wrapped Scheme bindings for libbar */
+ scm_init_sw_bar_module();
+ scm_c_eval_string("(use-modules (sw_bar))");
- /* use the (bar) module */
+ /* use the Scheme "bar" module */
scm_c_eval_string("(use-modules (gnucash bar))");
return TRUE;
Property changes on: gnucash/trunk/src/gnc-module/test/mod-baz
___________________________________________________________________
Name: svn:ignore
- Makefile
*.so.*
baz-gwrap.c
baz-gwrap.h
baz-gwrap.html
.deps
.libs
Makefile.in
*.lo
*.la
semantic.cache
TAGS
+ Makefile
*.so.*
swig-baz.c
baz-gwrap.c
baz-gwrap.h
baz-gwrap.html
.deps
.libs
Makefile.in
*.lo
*.la
semantic.cache
TAGS
Modified: gnucash/trunk/src/gnc-module/test/mod-baz/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-baz/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-baz/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -3,7 +3,6 @@
-I${top_srcdir}/src/gnc-module \
-I${top_srcdir}/src/gnc-module/test/mod-foo \
${GLIB_CFLAGS} \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS}
PWD := $(shell pwd)
@@ -13,31 +12,31 @@
libbaz_la_SOURCES = baz.c
libbaz_la_LIBADD = ../mod-foo/libfoo.la
+# Make swig-baz.c for dist. It is an automatic dependency
+# of gnc-mod-baz.c
noinst_HEADERS = \
- baz.h
+ baz.h \
+ swig-baz.c
libgncmodbaz_la_SOURCES = gnc-mod-baz.c
-nodist_libgncmodbaz_la_SOURCES = baz-gwrap.c
libgncmodbaz_la_LIBADD = \
libbaz.la \
../../libgncmodule.la \
- $(G_WRAP_LINK_ARGS) \
$(GLIB_LIBS)
+if BUILDING_FROM_SVN
+swig-baz.c: baz.i
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
+endif
+
EXTRA_DIST = \
- baz-gwrap.scm \
+ baz.i \
gnucash/baz.scm
-baz-gwrap.c baz-gwrap.h: baz-gwrap.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (primitive-load \"${srcdir}/baz-gwrap.scm\") \
- (gw:generate-wrapset \"baz-gwrap\")"
+BUILT_SOURCES = swig-baz.c
+MAINTAINERCLEANFILES = swig-baz.c
-BUILT_SOURCES = baz-gwrap.c baz-gwrap.h
-CLEANFILES = $(BUILT_SOURCES) baz-gwrap.html
-
# Keep automake from generating install targets for test libs
install-checklibLTLIBRARIES:
uninstall-checklibLTLIBRARIES:
Deleted: gnucash/trunk/src/gnc-module/test/mod-baz/baz-gwrap.scm
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-baz/baz-gwrap.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-baz/baz-gwrap.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,20 +0,0 @@
-(use-modules (g-wrap))
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap gw-standard-spec))
-
-(let ((ws (gw:new-wrapset "baz-gwrap")))
-
- (gw:wrapset-depends-on ws "gw-standard")
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- "#include \"baz.h\"\n"))
-
- (gw:wrap-function
- ws
- 'baz:hello
- '<gw:bool> "baz_hello" '()
- "Print a simple message from C"))
Copied: gnucash/trunk/src/gnc-module/test/mod-baz/baz.i (from rev 15023, gnucash/branches/swig-redo/src/gnc-module/test/mod-baz/baz.i)
Modified: gnucash/trunk/src/gnc-module/test/mod-baz/gnc-mod-baz.c
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-baz/gnc-mod-baz.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-baz/gnc-mod-baz.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -7,7 +7,7 @@
#include "gnc-module.h"
#include "gnc-module-api.h"
-#include "baz-gwrap.h"
+#include "swig-baz.c"
int libgncmodbaz_LTX_gnc_module_system_interface = 0;
@@ -34,10 +34,11 @@
libgncmodbaz_LTX_gnc_module_init(int refcount) {
/* load libfoo */
if(gnc_module_load("gnucash/foo", 0)) {
- /* publish the g-wrapped Scheme bindings for libbaz */
- gw_init_wrapset_baz_gwrap();
-
- /* use the scheme module */
+ /* publish the wrapped Scheme bindings for libbaz */
+ scm_init_sw_baz_module();
+ scm_c_eval_string("(use-modules (sw_baz))");
+
+ /* use the Scheme "baz" module */
scm_c_eval_string("(use-modules (gnucash baz))");
return TRUE;
Property changes on: gnucash/trunk/src/gnc-module/test/mod-foo
___________________________________________________________________
Name: svn:ignore
- Makefile
*.so.*
foo-gwrap.c
foo-gwrap.h
foo-gwrap.html
.deps
.libs
Makefile.in
*.lo
*.la
semantic.cache
TAGS
+ Makefile
*.so.*
swig-foo.c
foo-gwrap.c
foo-gwrap.h
foo-gwrap.html
.deps
.libs
Makefile.in
*.lo
*.la
semantic.cache
TAGS
Modified: gnucash/trunk/src/gnc-module/test/mod-foo/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-foo/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-foo/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -2,7 +2,6 @@
-I${top_srcdir}/src \
-I${top_srcdir}/src/gnc-module \
${GUILE_INCS} \
- ${G_WRAP_COMPILE_ARGS} \
${GLIB_CFLAGS}
PWD := $(shell pwd)
@@ -11,29 +10,29 @@
libfoo_la_SOURCES = foo.c
+# Make swig-foo.c for dist. It is an automatic dependency
+# of gnc-mod-foo.c
noinst_HEADERS = \
- foo.h
+ foo.h \
+ swig-foo.c
libgncmodfoo_la_SOURCES = gnc-mod-foo.c
-nodist_libgncmodfoo_la_SOURCES = foo-gwrap.c
libgncmodfoo_la_LIBADD = \
libfoo.la \
- $(G_WRAP_LINK_ARGS) \
$(GLIB_LIBS)
EXTRA_DIST = \
- foo-gwrap.scm \
+ foo.i \
gnucash/foo.scm
-foo-gwrap.c foo-gwrap.h: foo-gwrap.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (primitive-load \"${srcdir}/foo-gwrap.scm\") \
- (gw:generate-wrapset \"foo-gwrap\")"
+if BUILDING_FROM_SVN
+swig-foo.c: foo.i
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
+endif
-BUILT_SOURCES = foo-gwrap.c foo-gwrap.h
-CLEANFILES = $(BUILT_SOURCES) foo-gwrap.html
+BUILT_SOURCES = swig-foo.c
+MAINTAINERCLEANFILES = swig-foo.c
# Keep automake from generating install targets for test libs
install-checklibLTLIBRARIES:
Deleted: gnucash/trunk/src/gnc-module/test/mod-foo/foo-gwrap.scm
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-foo/foo-gwrap.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-foo/foo-gwrap.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,21 +0,0 @@
-(use-modules (g-wrap))
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap gw-standard-spec))
-
-(let ((ws (gw:new-wrapset "foo-gwrap")))
-
- (gw:wrapset-depends-on ws "gw-standard")
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- "#include \"foo.h\"\n"))
-
- (gw:wrap-function
- ws
- 'foo:hello
- '<gw:bool> "foo_hello" '()
- "Print a simple message from C"))
Copied: gnucash/trunk/src/gnc-module/test/mod-foo/foo.i (from rev 15023, gnucash/branches/swig-redo/src/gnc-module/test/mod-foo/foo.i)
Modified: gnucash/trunk/src/gnc-module/test/mod-foo/gnc-mod-foo.c
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-foo/gnc-mod-foo.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/mod-foo/gnc-mod-foo.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -6,8 +6,8 @@
#include <glib.h>
#include <libguile.h>
-#include "foo-gwrap.h"
#include "gnc-module-api.h"
+#include "swig-foo.c"
int libgncmodfoo_LTX_gnc_module_system_interface = 0;
@@ -20,7 +20,6 @@
char *libgncmodfoo_LTX_gnc_module_description(void);
int libgncmodfoo_LTX_gnc_module_init(int refcount);
-
char *
libgncmodfoo_LTX_gnc_module_path(void) {
return g_strdup("gnucash/foo");
@@ -33,8 +32,9 @@
int
libgncmodfoo_LTX_gnc_module_init(int refcount) {
- /* publish the g-wrapped Scheme bindings for libfoo */
- gw_init_wrapset_foo_gwrap();
+ /* publish the wrapped Scheme bindings for libfoo */
+ scm_init_sw_foo_module();
+ scm_c_eval_string("(use-modules (sw_foo))");
/* use the Scheme "foo" module */
scm_c_eval_string("(use-modules (gnucash foo))");
Modified: gnucash/trunk/src/gnc-module/test/test-gwrapped-c
===================================================================
--- gnucash/trunk/src/gnc-module/test/test-gwrapped-c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/test-gwrapped-c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -2,4 +2,4 @@
guile -c "(use-modules (gnucash gnc-module))
(gnc:module-system-init)
(gnc:module-load \"gnucash/foo\" 0)
- (exit (foo:hello))"
+ (exit (eq? 10 (foo-hello)))"
Modified: gnucash/trunk/src/gnc-module/test/test-load-deps
===================================================================
--- gnucash/trunk/src/gnc-module/test/test-load-deps 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/test-load-deps 2006-10-15 19:02:05 UTC (rev 15024)
@@ -8,8 +8,8 @@
(gnc:module-system-init)
(gnc:module-load "gnucash/baz" 0)
-(baz:hello)
-(foo:hello)
+(baz-hello)
+(foo-hello)
(baz:scheme-hello)
(foo:scheme-hello)
Modified: gnucash/trunk/src/gnc-module/test/test-scm-multi
===================================================================
--- gnucash/trunk/src/gnc-module/test/test-scm-multi 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnc-module/test/test-scm-multi 2006-10-15 19:02:05 UTC (rev 15024)
@@ -5,12 +5,12 @@
(use-modules (gnucash gnc-module))
(gnc:module-system-init)
(gnc:module-load "gnucash/foo" 0)
-(foo:hello)
+(foo-hello)
(foo:scheme-hello)
(gnc:module-load "gnucash/bar" 0)
-(foo:hello)
+(foo-hello)
(foo:scheme-hello)
-(bar:hello)
+(bar-hello)
(bar:scheme-hello)
;; Local Variables:
Property changes on: gnucash/trunk/src/gnome
___________________________________________________________________
Name: svn:ignore
- *.diff
*.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
gnc-dir.h
gnucash.desktop
gnucash.desktop.in
gnucash.keys
gnucash.c
gw-gnc.scm
gw-gnc.h
gw-gnc.c
gw-gnc.html
i18n.h
gnc-version.h
.DS_Store
g-wrapped
gnucash
semantic.cache
TAGS
+ *.diff
*.la
*.lo
.deps
.libs
.scm-links
Makefile
Makefile.in
gnc-dir.h
gnucash.desktop
gnucash.desktop.in
gnucash.keys
gnucash.c
swig-gnome.c
gw-gnc.scm
gw-gnc.h
gw-gnc.c
gw-gnc.html
i18n.h
gnc-version.h
.DS_Store
g-wrapped
gnucash
semantic.cache
TAGS
Modified: gnucash/trunk/src/gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,11 +1,7 @@
SUBDIRS = glade schemas ui
-lib_LTLIBRARIES = libgncgnome.la libgw-gnc.la
+lib_LTLIBRARIES = libgncgnome.la
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-gnc-spec.scm
-nodist_gwmod_DATA = gw-gnc.scm
-
libgncgnome_la_LIBADD = \
${top_builddir}/src/register/ledger-core/libgncmod-ledger-core.la \
${top_builddir}/src/register/register-gnome/libgncmod-register-gnome.la \
@@ -16,21 +12,14 @@
${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
${top_builddir}/src/backend/file/libgnc-backend-file-utils.la \
${top_builddir}/src/app-utils/libgncmod-app-utils.la \
- ${top_builddir}/src/engine/libgw-engine.la \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/calculation/libgncmod-calculation.la \
${top_builddir}/src/core-utils/libcore-utils.la \
${GLADE_LIBS} \
- ${G_WRAP_LINK_ARGS} \
${GUILE_LIBS} ${GNOME_LIBS} ${GLIB_LIBS} ${QOF_LIBS}
-nodist_libgw_gnc_la_SOURCES = gw-gnc.c
-
-libgw_gnc_la_LDFLAGS = \
- ${G_WRAP_LINK_ARGS} ${GLIB_LIBS}
-libgw_gnc_la_LIBADD = libgncgnome.la
-
libgncgnome_la_SOURCES = \
+ swig-gnome.c \
dialog-chart-export.c \
dialog-commodities.c \
dialog-fincalc.c \
@@ -99,11 +88,16 @@
top-level.h \
window-reconcile.h
+if BUILDING_FROM_SVN
+swig-gnome.c: gnome.i ${noinst_HEADERS}
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module \
+ -I${top_srcdir}/src/engine -o $@ $<
+endif
+
EXTRA_DIST = \
gnucash.desktop.in \
- ${gwmod_DATA}
+ gnome.i
-
AM_CFLAGS = \
-I${top_srcdir}/src \
-I${top_srcdir}/src/core-utils \
@@ -112,7 +106,6 @@
-I${top_srcdir}/src/network-utils \
-I${top_srcdir}/src/app-utils \
-I${top_srcdir}/src/backend/file \
- -I${top_srcdir}/src/g-wrap \
-I${top_srcdir}/src/gnome-utils \
-I${top_srcdir}/src/gnome-search \
-I${top_srcdir}/src/register/ledger-core \
@@ -122,7 +115,6 @@
-I${top_srcdir}/src/report/report-gnome \
-I${top_srcdir}/lib/libc \
${GUILE_INCS} \
- ${G_WRAP_COMPILE_ARGS} \
${GNOME_CFLAGS} \
${GNOME_PRINT_CFLAGS} \
${GDK_PIXBUF_CFLAGS} \
@@ -136,44 +128,5 @@
# The line below breaks automake 1.5.
##OMIT_DEPENDENCIES = gnc-dir.h
-noinst_DATA = .scm-links
-
-if GNUCASH_SEPARATE_BUILDDIR
-#For compiling
-SCM_FILE_LINKS = gw-gnc-spec.scm
-endif
-
-.scm-links:
- $(RM) -rf g-wrapped
- mkdir -p g-wrapped
-if GNUCASH_SEPARATE_BUILDDIR
- for X in ${SCM_FILE_LINKS} ; do \
- $(LN_S) -f ${srcdir}/$$X . ; \
- done
-endif
- touch .scm-links
-
-clean-local:
- $(RM) -rf g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-gnc.scm gw-gnc.h gw-gnc.c gw-gnc.html: \
- gwrap-files
-
-gwrap-files: \
- gw-gnc-spec.scm .scm-links ${top_builddir}/config.status Makefile
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"../engine\" %load-path)) \
- (set! %load-path (cons \"../app-utils\" %load-path)) \
- (set! %load-path (cons \"../gnome-utils\" %load-path)) \
- (set! %load-path (cons \"../report/report-gnome\" %load-path)) \
- (primitive-load \"./gw-gnc-spec.scm\") \
- (gw:generate-wrapset \"gw-gnc\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-gnc.scm gw-gnc.h gw-gnc.c
-CLEANFILES = $(BUILT_SOURCES) gnucash.desktop \
- g-wrapped .scm-links ${SCM_FILE_LINKS} gw-gnc.html
+CLEANFILES = gnucash.desktop
+MAINTAINERCLEANFILES = swig-gnome.c
Modified: gnucash/trunk/src/gnome/dialog-price-edit-db.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-price-edit-db.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome/dialog-price-edit-db.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -27,6 +27,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libguile.h>
+#include "guile-mappings.h"
#include <time.h>
#include "dialog-utils.h"
@@ -45,7 +46,7 @@
#include "gnc-ui-util.h"
#include "guile-util.h"
#include "engine-helpers.h"
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#define DIALOG_PRICE_DB_CM_CLASS "dialog-price-edit-db"
@@ -262,7 +263,7 @@
PricesDialog *pdb_dialog = data;
SCM quotes_func;
SCM book_scm;
- SCM scm_window, window_type;
+ SCM scm_window;
ENTER(" ");
quotes_func = scm_c_eval_string ("gnc:book-add-quotes");
@@ -277,8 +278,8 @@
return;
}
- window_type = scm_c_eval_string("<gtk:Widget*>");
- scm_window = gw_wcp_assimilate_ptr(pdb_dialog->dialog, window_type);
+ scm_window = SWIG_NewPointerObj(pdb_dialog->dialog,
+ SWIG_TypeQuery("_p_GtkWidget"), 0);
gnc_set_busy_cursor (NULL, TRUE);
scm_call_2 (quotes_func, scm_window, book_scm);
Modified: gnucash/trunk/src/gnome/dialog-sx-from-trans.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-from-trans.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome/dialog-sx-from-trans.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -25,6 +25,7 @@
#include "config.h"
+#include <stdlib.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "glib-compat.h"
Modified: gnucash/trunk/src/gnome/dialog-tax-info.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-tax-info.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome/dialog-tax-info.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -26,6 +26,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libguile.h>
+#include "guile-mappings.h"
#include "Account.h"
#include "gnc-ui-util.h"
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -34,12 +34,14 @@
#include "config.h"
+#include <libguile.h>
+#include "guile-mappings.h"
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include "gnc-plugin-page-register.h"
#include "gnc-plugin-register.h"
@@ -1725,7 +1727,7 @@
SplitRegister *reg = gnc_ledger_display_get_split_register (ledger);
Account *account;
char *str;
- SCM qtype;
+ swig_type_info * qtype;
SCM args;
SCM func;
SCM arg;
@@ -1758,19 +1760,19 @@
g_return_val_if_fail (query != NULL, -1);
}
- qtype = scm_c_eval_string("<gnc:Query*>");
- g_return_val_if_fail (qtype != SCM_UNDEFINED, -1);
+ qtype = SWIG_TypeQuery ("_p__QofQuery");
+ g_return_val_if_fail (qtype, -1);
- arg = gw_wcp_assimilate_ptr (query, qtype);
+ arg = SWIG_NewPointerObj (query, qtype, 0);
args = scm_cons (arg, args);
g_return_val_if_fail (arg != SCM_UNDEFINED, -1);
if (split)
{
- qtype = scm_c_eval_string("<gnc:Split*>");
- g_return_val_if_fail (qtype != SCM_UNDEFINED, -1);
- arg = gw_wcp_assimilate_ptr (split, qtype);
+ qtype = SWIG_TypeQuery ("_p_Split");
+ g_return_val_if_fail (qtype, -1);
+ arg = SWIG_NewPointerObj (split, qtype, 0);
}
else
{
@@ -1780,11 +1782,11 @@
g_return_val_if_fail (arg != SCM_UNDEFINED, -1);
- qtype = scm_c_eval_string("<gnc:Account*>");
- g_return_val_if_fail (qtype != SCM_UNDEFINED, -1);
+ qtype = SWIG_TypeQuery ("_p_Account");
+ g_return_val_if_fail (qtype, -1);
account = gnc_ledger_display_leader (ledger);
- arg = gw_wcp_assimilate_ptr (account, qtype);
+ arg = SWIG_NewPointerObj (account, qtype, 0);
args = scm_cons (arg, args);
g_return_val_if_fail (arg != SCM_UNDEFINED, -1);
Copied: gnucash/trunk/src/gnome/gnome.i (from rev 15023, gnucash/branches/swig-redo/src/gnome/gnome.i)
Deleted: gnucash/trunk/src/gnome/gw-gnc-spec.scm
===================================================================
--- gnucash/trunk/src/gnome/gw-gnc-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome/gw-gnc-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,136 +0,0 @@
-(define-module (g-wrapped gw-gnc-spec))
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(use-modules (g-wrapped gw-engine-spec))
-(use-modules (g-wrapped gw-gnome-utils-spec))
-
-(let ((ws (gw:new-wrapset "gw-gnc")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
- (gw:wrapset-depends-on ws "gw-glib")
-
- (gw:wrapset-depends-on ws "gw-engine")
- (gw:wrapset-depends-on ws "gw-gnome-utils")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-gnc))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <glib.h>\n"
- "#include <gnc-ui.h>\n"
- "#include <gnc-ui-util.h>\n"
- "#include <gnc-menu-extensions.h>\n"
- "#include <guile-util.h>\n"
- "#include <gnc-engine.h>\n"
- "#include <gnc-commodity.h>\n"
- "#include <dialog-totd.h>\n"
- "#include <gnc-gui-query.h>\n"
- "#include <dialog-new-user.h>\n"
- "#include <dialog-progress.h>\n"
- "#include <dialog-commodity.h>\n"
- "#include <druid-hierarchy.h>\n"
- "#include <top-level.h>\n"
- "#include <gnc-html.h>\n"
- "#include <gnc-main-window.h>\n"
- "#include <gnc-window.h>\n"
- "#include <gnc-plugin-account-tree.h>\n"
- "#include <gnc-splash.h>\n"
- "#include <dialog-scheduledxaction.h>\n"
- "#include <dialog-sxsincelast.h>\n" )))
-
- (gw:wrap-function
- ws
- 'gnc:new-user-dialog
- '<gw:void>
- "gnc_ui_new_user_dialog"
- '()
- "Show the new user dialog.")
-
- (gw:wrap-as-wct ws
- '<gnc:ProgressDialog*>
- "GNCProgressDialog *" "const GNCProgressDialog *")
-
- (gw:wrap-function
- ws
- 'gnc:progress-dialog-new
- '<gnc:ProgressDialog*>
- "gnc_progress_dialog_new"
- '((<gnc:UIWidget> parent) (<gw:bool> use_ok_button))
- "Create and return a progress dialog. The parent may be NULL.")
-
- (gw:wrap-function
- ws
- 'gnc:progress-dialog-set-title
- '<gw:void>
- "gnc_progress_dialog_set_title"
- '((<gnc:ProgressDialog*> progress)
- ((<gw:mchars> caller-owned const) title))
- "Set the title of 'progress' to 'title'.")
-
- (gw:wrap-function
- ws
- 'gnc:progress-dialog-set-heading
- '<gw:void>
- "gnc_progress_dialog_set_heading"
- '((<gnc:ProgressDialog*> progress)
- ((<gw:mchars> caller-owned const) heading))
- "Set the heading of 'progress' to 'heading'.")
-
- (gw:wrap-function
- ws
- 'gnc:progress-dialog-set-cancel-scm-func
- '<gw:void>
- "gnc_progress_dialog_set_cancel_scm_func"
- '((<gnc:ProgressDialog*> progress)
- (<gw:scm> cancel_func))
- "Set the guile cancel callback function. This callback is invoked
-with no arguments when the user hits the cancel button. If the callback
-returns #t, the dialog is closed, but not destroyed.")
-
- (gw:wrap-function
- ws
- 'gnc:progress-dialog-set-value
- '<gw:void>
- "gnc_progress_dialog_set_value"
- '((<gnc:ProgressDialog*> progress) (<gw:double> value))
- "Set the value of the progress dialog to 'value'.")
-
- (gw:wrap-function
- ws
- 'gnc:progress-dialog-update
- '<gw:void>
- "gnc_progress_dialog_update"
- '((<gnc:ProgressDialog*> progress))
- "Update the progress bar, calling any pending cancel callback.")
-
- (gw:wrap-function
- ws
- 'gnc:progress-dialog-finish
- '<gw:void>
- "gnc_progress_dialog_finish"
- '((<gnc:ProgressDialog*> progress))
- "Set the progress dialog to the finished state. The OK button becomes
-sensitive and the dialog closes after the user clicks it.")
-
- (gw:wrap-function
- ws
- 'gnc:progress-dialog-destroy
- '<gw:void>
- "gnc_progress_dialog_destroy"
- '((<gnc:ProgressDialog*> progress))
- "Destroy the progess dialog. You must call this function in
-order to destroy the dialog. The dialog will not be destroyed
-by the user closing the window.")
-
-)
Modified: gnucash/trunk/src/gnome/top-level.c
===================================================================
--- gnucash/trunk/src/gnome/top-level.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome/top-level.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -44,6 +44,7 @@
#include "gnc-file.h"
#include "gnc-filepath-utils.h"
#include "gnc-hooks.h"
+#include "gfec.h"
#include "gnc-main-window.h"
#include "gnc-menu-extensions.h"
#include "gnc-plugin-menu-additions.h" /* FIXME Remove this line*/
@@ -68,7 +69,6 @@
#include "window-report.h"
#include "gnc-window.h"
#include "gnc-gkeyfile-utils.h"
-#include <g-wrap-wct.h>
/** GLOBALS *********************************************************/
@@ -197,6 +197,20 @@
return TRUE;
}
+static void
+gnc_main_window_book_open_handler(QofSession *session)
+{
+ gchar *filename, *statefile;
+
+ filename = gnc_html_encode_string(qof_session_get_url(session));
+ if (!filename) return;
+
+ statefile = gnc_build_book_path(filename);
+ g_free(filename);
+ gfec_try_load(statefile);
+ g_free(statefile);
+}
+
/** Restore all persistent program state. This function finds the
* "new" state file associated with a specific book guid. It then
* iterates through this state information, calling a helper function
Modified: gnucash/trunk/src/gnome-search/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-search/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-search/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -10,7 +10,6 @@
-I${top_srcdir}/src/gnome-utils \
-I${top_srcdir}/src/gnc-module \
-I${top_srcdir}/src/business/business-core \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${GTKHTML_CFLAGS} \
${GDK_PIXBUF_CFLAGS} \
Property changes on: gnucash/trunk/src/gnome-utils
___________________________________________________________________
Name: svn:ignore
- Makefile
Makefile.in
*.gladep
*.lo
*.la
.deps
.libs
.scm-links
gnc-dir.h
gw-gnome-utils.html
gw-gnome-utils.h
gw-gnome-utils.scm
gw-gnome-utils.c
*gnc-version.h
gnc-svninfo.h
g-wrapped
gnucash
_gnc_svninfo.h
TAGS
+ Makefile
Makefile.in
*.gladep
*.lo
*.la
.deps
.libs
.scm-links
gnc-dir.h
swig-gnome-utils.c
gw-gnome-utils.html
gw-gnome-utils.h
gw-gnome-utils.scm
gw-gnome-utils.c
*gnc-version.h
gnc-svninfo.h
g-wrapped
gnucash
_gnc_svninfo.h
TAGS
Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,7 +1,7 @@
SUBDIRS = glade schemas . test ui
PWD := $(shell pwd)
-pkglib_LTLIBRARIES = libgncmod-gnome-utils.la libgw-gnome-utils.la
+pkglib_LTLIBRARIES = libgncmod-gnome-utils.la
# Note that src/gnome-utils CANNOT depend on src/gnome!
@@ -21,7 +21,6 @@
${GNOME_CFLAGS} \
${GTKHTML_CFLAGS} \
${GUILE_INCS} \
- ${G_WRAP_COMPILE_ARGS} \
${QOF_CFLAGS} \
${GOFFICE_CFLAGS} \
${GSF_CFLAGS}
@@ -92,6 +91,7 @@
print-session.c \
search-param.c \
gnc-dialog.c \
+ swig-gnome-utils.c \
window-main-summarybar.c
gncincludedir = ${GNC_INCLUDE_DIR}
@@ -168,7 +168,6 @@
${top_builddir}/src/core-utils/libcore-utils.la \
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/engine/libgncmod-engine.la \
- ${top_builddir}/src/engine/libgw-engine.la \
${top_builddir}/src/backend/file/libgnc-backend-file-utils.la \
${top_builddir}/src/calculation/libgncmod-calculation.la \
${top_builddir}/src/network-utils/libgncmod-network-utils.la \
@@ -180,7 +179,6 @@
${GUILE_LIBS} \
${GDK_PIXBUF_LIBS} \
${GLADE_LIBS} \
- ${G_WRAP_LINK_ARGS} \
${GUILE_LIBS} \
${GLIB_LIBS} \
${DB_LIBS} \
@@ -190,20 +188,12 @@
${REGEX_LIBS} \
${LIBXML2_LIBS}
-nodist_libgw_gnome_utils_la_SOURCES = gw-gnome-utils.c
-libgw_gnome_utils_la_LIBADD = \
- libgncmod-gnome-utils.la \
- ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
- ${top_builddir}/src/engine/libgw-engine.la \
- ${top_builddir}/src/core-utils/libcore-utils.la \
- ${QOF_LIBS} \
- ${G_WRAP_LINK_ARGS} \
- ${GLIB_LIBS}
+if BUILDING_FROM_SVN
+swig-gnome-utils.c: gnome-utils.i ${noinst_HEADERS} ${gncinclude_HEADERS}
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module \
+ -I${top_srcdir}/src/engine -o $@ $<
+endif
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-gnome-utils-spec.scm
-nodist_gwmod_DATA = gw-gnome-utils.scm
-
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = gnome-utils.scm
@@ -212,7 +202,7 @@
EXTRA_DIST = \
gnc-svninfo.h \
- ${gwmod_DATA} \
+ gnome-utils.i \
${gncmod_DATA} \
${gncscm_DATA}
@@ -266,17 +256,15 @@
BUILT_SOURCES = gnc-version.h
if GNUCASH_SEPARATE_BUILDDIR
-#For compiling
-SCM_FILE_LINKS = gw-gnome-utils-spec.scm
#For executing test cases
-SCM_FILE_LINKS += \
+SCM_FILE_LINKS = \
${gncmod_DATA} \
${gncscm_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
$(LN_S) -f ${srcdir}/$$X . ; \
@@ -285,30 +273,10 @@
( cd gnucash; for A in $(gncmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
+noinst_DATA = .scm-links
+CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links ${SCM_FILE_LINKS}
+MAINTAINERCLEANFILES = swig-gnome-utils.c
-.INTERMEDIATE: gwrap-files
-
-gw-gnome-utils.scm gw-gnome-utils.c gw-gnome-utils.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-gnome-utils-spec.scm ${top_builddir}/config.status Makefile
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/engine\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/app-utils\" %load-path)) \
- (primitive-load \"./gw-gnome-utils-spec.scm\") \
- (gw:generate-wrapset \"gw-gnome-utils\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES += gw-gnome-utils.scm gw-gnome-utils.c gw-gnome-utils.h
-CLEANFILES = $(BUILT_SOURCES) .scm-links \
- ${SCM_FILE_LINKS} gw-gnome-utils.html
-
# FIXME: Symlinking directories only works on non-win32.
if !PLATFORM_WIN32
#
Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -31,7 +31,7 @@
#endif
#include <gdk/gdk.h>
#include <glib/gi18n.h>
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include "gnc-tree-model-budget.h" //FIXME?
#include "gnc-budget.h"
@@ -56,6 +56,7 @@
#include "gnc-date-format.h"
#include "misc-gnome-utils.h"
+#define FUNC_NAME __FUNCTION__
/* TODO: clean up "register-stocks" junk
*/
@@ -1211,7 +1212,7 @@
/********************************************************************\
- * gnc_build_options_dialog_contents *
+ * gnc_options_dialog_build_contents *
* builds an options dialog given a property box and an options *
* database *
* *
@@ -1220,7 +1221,7 @@
* Return: nothing *
\********************************************************************/
void
-gnc_build_options_dialog_contents(GNCOptionWin *propertybox,
+gnc_options_dialog_build_contents(GNCOptionWin *propertybox,
GNCOptionDB *odb)
{
GNCOptionSection *section;
@@ -2367,11 +2368,11 @@
Account *acc = NULL;
if (value != SCM_BOOL_F) {
- if (!gw_wcp_p(value))
- scm_misc_error("gnc_option_set_ui_value_account_sel",
- "Option Value not a gw:wcp.", value);
+ if (!SWIG_IsPointer(value))
+ scm_misc_error("gnc_option_set_ui_value_account_sel",
+ "Option Value not a wcp.", value);
- acc = gw_wcp_get_ptr(value);
+ acc = SWIG_MustGetPtr(value, SWIG_TypeQuery("_p_Account"), 4, 0);
}
gnc_account_sel_set_account (GNC_ACCOUNT_SEL(widget), acc);
@@ -2522,11 +2523,11 @@
GtkTreeIter iter;
if (value != SCM_BOOL_F) {
- if (!gw_wcp_p(value))
+ if (!SWIG_IsPointer(value))
scm_misc_error("gnc_option_set_ui_value_budget",
- "Option Value not a gw:wcp.", value);
+ "Option Value not a wcp.", value);
- bgt = gw_wcp_get_ptr(value);
+ bgt = SWIG_MustGetPtr(value, SWIG_TypeQuery("GncBudget *"), 4, 0);
cb = GTK_COMBO_BOX(widget);
tm = gtk_combo_box_get_model(cb);
if (gnc_tree_model_budget_get_iter_for_budget(tm, &iter, bgt))
@@ -2758,7 +2759,7 @@
list = gnc_tree_view_account_get_selected_accounts (tree);
/* handover list */
- result = gnc_glist_to_scm_list(list, scm_c_eval_string("<gnc:Account*>"));
+ result = gnc_glist_to_scm_list(list, "_p_Account");
g_list_free(list);
return result;
}
@@ -2775,7 +2776,7 @@
if (!acc)
return SCM_BOOL_F;
- return gw_wcp_assimilate_ptr(acc, scm_c_eval_string("<gnc:Account*>"));
+ return SWIG_NewPointerObj(acc, SWIG_TypeQuery("_p_Account"), 0);
}
static SCM
@@ -2795,7 +2796,7 @@
if (!bgt)
return SCM_BOOL_F;
- return gw_wcp_assimilate_ptr(bgt, scm_c_eval_string("<gnc:Budget*>"));
+ return SWIG_NewPointerObj(bgt, SWIG_TypeQuery("_p_gnc_budget_private"), 0);
}
static SCM
@@ -2999,7 +3000,7 @@
void gnc_options_ui_initialize (void)
{
-
+ SWIG_GetModule(NULL); /* Work-around for SWIG bug. */
// gnc_options_register_stocks ();
g_return_if_fail (optionTable == NULL);
optionTable = g_hash_table_new (g_str_hash, g_str_equal);
Modified: gnucash/trunk/src/gnome-utils/dialog-options.h
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/dialog-options.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -56,7 +56,7 @@
void gnc_options_dialog_set_global_help_cb(GNCOptionWinCallback thunk,
gpointer cb_data);
-void gnc_build_options_dialog_contents(GNCOptionWin *win,
+void gnc_options_dialog_build_contents(GNCOptionWin *win,
GNCOptionDB *odb);
/* Both apply_cb and close_cb should be scheme functions with 0 arguments.
Modified: gnucash/trunk/src/gnome-utils/gnc-file.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-file.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-file.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -26,7 +26,6 @@
#include <errno.h>
#include <libguile.h>
#include <string.h>
-#include <g-wrap-wct.h>
#include "dialog-utils.h"
#include "druid-gnc-xml-import.h"
Modified: gnucash/trunk/src/gnome-utils/gnc-file.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-file.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-file.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -31,7 +31,6 @@
* These utilities are written in a GUI-independent fashion, and should
* work just fine with the Motif, gnome/gtk and Qt interfaces.
* These utilities are appropriate for direct invocation from guile.
- * (they should be wrapped by g-wrap).
*
* These GUI utilities implement and maintain a single global "session"
* that defines the currently edited account group. In a sense, these
Modified: gnucash/trunk/src/gnome-utils/gnc-html.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-html.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-html.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -175,9 +175,6 @@
void gnc_html_set_button_cb(gnc_html * html, GncHTMLButtonCB button_cb,
gpointer data);
-GtkWidget * gnc_html_get_container_widget(gnc_html * html);
-GtkWidget * gnc_html_get_html_widget(gnc_html * html);
-
/* Initialize the html subsystem */
void gnc_html_initialize (void);
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -37,6 +37,8 @@
#include <gnome.h>
#include <glib/gi18n.h>
+#include <libguile.h>
+#include "guile-mappings.h"
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
@@ -85,6 +87,8 @@
#define KEY_SHOW_CLOSE_BUTTON "tab_close_buttons"
#define KEY_TAB_POSITION "tab_position"
+#define GNC_MAIN_WINDOW_NAME "GncMainWindow"
+
/* Static Globals *******************************************************/
/** The debugging module that this .o belongs to. */
@@ -774,7 +778,7 @@
/* Save page ordering within the notebook. Use +1 notation so the
* numbers in the page order match the page sections, at least for
* the one window case. */
- order = malloc(sizeof(gint) * num_pages);
+ order = g_malloc(sizeof(gint) * num_pages);
for (i = 0; i < num_pages; i++) {
gpointer page = g_list_nth_data(priv->usage_order, i);
order[i] = g_list_index(priv->installed_pages, page) + 1;
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -39,8 +39,6 @@
#include <gtk/gtk.h>
#include "gnc-plugin-page.h"
-G_BEGIN_DECLS
-
/* type macros */
#define GNC_TYPE_MAIN_WINDOW (gnc_main_window_get_type ())
#define GNC_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_MAIN_WINDOW, GncMainWindow))
@@ -49,8 +47,6 @@
#define GNC_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_MAIN_WINDOW))
#define GNC_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_MAIN_WINDOW, GncMainWindowClass))
-#define GNC_MAIN_WINDOW_NAME "GncMainWindow"
-
#define PLUGIN_PAGE_IMMUTABLE "page-immutable"
/* typedefs & structures */
@@ -356,8 +352,6 @@
* this action. */
void gnc_main_window_all_action_set_sensitive (const gchar *action_name, gboolean sensitive);
-G_END_DECLS
-
#endif /* __GNC_MAIN_WINDOW_H */
/** @} */
Modified: gnucash/trunk/src/gnome-utils/gnc-plugin-menu-additions.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-plugin-menu-additions.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-plugin-menu-additions.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -37,7 +37,7 @@
#include <gtk/gtk.h>
#include <string.h>
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include "guile-util.h"
#include "gnc-engine.h"
@@ -184,21 +184,15 @@
static SCM
gnc_main_window_to_scm (GncMainWindow *window)
{
- static SCM main_window_type = SCM_UNDEFINED;
+ static swig_type_info * main_window_type = NULL;
if (!window)
return SCM_BOOL_F;
- if (main_window_type == SCM_UNDEFINED)
- {
- main_window_type = scm_c_eval_string ("<gnc:MainWindow*>");
+ if (!main_window_type)
+ main_window_type = SWIG_TypeQuery("_p_GncMainWindow");
- /* don't really need this - types are bound globally anyway. */
- if (main_window_type != SCM_UNDEFINED)
- scm_gc_protect_object (main_window_type);
- }
-
- return gw_wcp_assimilate_ptr ((void *)window, main_window_type);
+ return SWIG_NewPointerObj(window, main_window_type, 0);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -330,7 +330,7 @@
string = g_static_private_get (>mits_buffer_key);
if (string == NULL) {
- string = malloc(ITER_STRING_LEN + 1);
+ string = g_malloc(ITER_STRING_LEN + 1);
g_static_private_set (>mits_buffer_key, string, g_free);
}
#else
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-commodity.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -305,7 +305,7 @@
string = g_static_private_get (>mits_buffer_key);
if (string == NULL) {
- string = malloc(ITER_STRING_LEN + 1);
+ string = g_malloc(ITER_STRING_LEN + 1);
g_static_private_set (>mits_buffer_key, string, g_free);
}
#else
@@ -1256,7 +1256,7 @@
return;
}
- data = malloc(sizeof(*data));
+ data = g_new0 (remove_data, 1);
data->model = model;
data->path = path;
pending_removals = g_slist_append (pending_removals, data);
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-price.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -361,7 +361,7 @@
string = g_static_private_get (>mits_buffer_key);
if (string == NULL) {
- string = malloc(ITER_STRING_LEN + 1);
+ string = g_malloc(ITER_STRING_LEN + 1);
g_static_private_set (>mits_buffer_key, string, g_free);
}
#else
@@ -1515,7 +1515,7 @@
return;
}
- data = malloc(sizeof(*data));
+ data = g_new0 (remove_data, 1);
data->model = model;
data->path = path;
pending_removals = g_slist_append (pending_removals, data);
Modified: gnucash/trunk/src/gnome-utils/gncmod-gnome-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gncmod-gnome-utils.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gncmod-gnome-utils.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -57,6 +57,8 @@
g_free(form);
}
+extern SCM scm_init_sw_gnome_utils_module(void);
+
int
libgncmod_gnome_utils_LTX_gnc_module_init(int refcount) {
/* load the engine (we depend on it) */
@@ -79,8 +81,8 @@
return FALSE;
}
- /* publish g-wrapped bindings */
- lmod("(g-wrapped gw-gnome-utils)");
+ scm_init_sw_gnome_utils_module();
+ lmod("(sw_gnome_utils)");
lmod("(gnucash gnome-utils)");
/* Initialize the options-ui database */
Copied: gnucash/trunk/src/gnome-utils/gnome-utils.i (from rev 15023, gnucash/branches/swig-redo/src/gnome-utils/gnome-utils.i)
Modified: gnucash/trunk/src/gnome-utils/gnome-utils.scm
===================================================================
--- gnucash/trunk/src/gnome-utils/gnome-utils.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gnome-utils.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,9 +1,9 @@
(define-module (gnucash gnome-utils))
-(use-modules (g-wrapped gw-gnome-utils))
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (gnucash gnc-module))
+(use-modules (sw_gnome_utils))
(gnc:module-load "gnucash/app-utils" 0)
;; from gnc-menu-extensions.scm
@@ -21,18 +21,18 @@
(load-from-path "gnc-menu-extensions.scm")
(define (gnc:kvp-option-dialog id-type slots title changed_cb)
- (let* ((options (gnc:make-kvp-options id-type))
- (optiondb (gnc:option-db-new options))
- (optionwin (gnc:option-dialog-new title)))
+ (let* ((options (gnc-make-kvp-options id-type))
+ (optiondb (gnc-option-db-new options))
+ (optionwin (gnc-options-dialog-new title)))
(define (apply-cb)
(gnc:options-scm->kvp options slots gnc:*kvp-option-path* #t)
(if changed_cb (changed_cb)))
(define (close-cb)
- (gnc:option-dialog-destroy optionwin)
- (gnc:option-db-destroy optiondb))
+ (gnc-options-dialog-destroy optionwin)
+ (gnc-option-db-destroy optiondb))
(gnc:options-kvp->scm options slots gnc:*kvp-option-path*)
- (gnc:option-dialog-set-callbacks optionwin apply-cb close-cb)
- (gnc:option-dialog-build-contents optionwin optiondb)))
+ (gnc-options-dialog-set-scm-callbacks optionwin apply-cb close-cb)
+ (gnc-options-dialog-build-contents optionwin optiondb)))
Deleted: gnucash/trunk/src/gnome-utils/gw-gnome-utils-spec.scm
===================================================================
--- gnucash/trunk/src/gnome-utils/gw-gnome-utils-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/gw-gnome-utils-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,494 +0,0 @@
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(define-module (g-wrapped gw-gnome-utils-spec))
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(use-modules (g-wrapped gw-engine-spec))
-(use-modules (g-wrapped gw-app-utils-spec))
-
-(let ((ws (gw:new-wrapset "gw-gnome-utils")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
- (gw:wrapset-depends-on ws "gw-glib")
-
- (gw:wrapset-depends-on ws "gw-engine")
- (gw:wrapset-depends-on ws "gw-app-utils")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-gnome-utils))
-
- (gw:wrap-value ws 'gnc:additional-menus-placeholder '(<gw:mchars> callee-owned const) "ADDITIONAL_MENUS_PLACEHOLDER")
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <dialog-options.h>\n"
- "#include <dialog-utils.h>\n"
- "#include <druid-utils.h>\n"
- "#include <gtk/gtk.h>\n"
- "#include <gnc-amount-edit.h>\n"
- "#include <gnc-date-edit.h>\n"
- "#include <gnc-file.h>\n"
- "#include <gnc-gconf-utils.h>\n"
- "#include <gnc-gnome-utils.h>\n"
- "#include <gnc-gui-query.h>\n"
- "#include <gnc-html.h>\n"
- "#include <gnc-main-window.h>\n"
- "#include <gnc-window.h>\n"
- "#include <gnc-menu-extensions.h>\n"
- "#include <gnc-plugin-file-history.h>\n"
- "#include <gnc-ui.h>\n"
- "#include <print-session.h>\n"
- "#include <gnc-splash.h>\n"
- )))
-
-
- (gw:wrap-as-wct ws '<gtk:Widget*> "GtkWidget*" "const GtkWidget*")
- (gw:wrap-as-wct ws '<gtk:Window*> "GtkWindow*" "const GtkWindow*")
- (gw:wrap-as-wct ws '<gnc:UIWidget> "gncUIWidget" "const gncUIWidget")
- (gw:wrap-as-wct ws '<gnc:OptionWin*> "GNCOptionWin*" "const GNCOptionWin*")
- (gw:wrap-as-wct ws '<gnc:url-type> "URLType" "const URLType")
- (gw:wrap-as-wct ws '<gnc:Window*> "GncWindow *" "const GncWindow *")
- (gw:wrap-as-wct ws '<gnc:MainWindow*> "GncMainWindow *" "const GncMainWindow *")
-
- ;;
- ;; URLTypes
- ;;
- (gw:wrap-value ws 'gnc:url-type-file '<gnc:url-type> "URL_TYPE_FILE")
- (gw:wrap-value ws 'gnc:url-type-jump '<gnc:url-type> "URL_TYPE_JUMP")
- (gw:wrap-value ws 'gnc:url-type-http '<gnc:url-type> "URL_TYPE_HTTP")
- (gw:wrap-value ws 'gnc:url-type-ftp '<gnc:url-type> "URL_TYPE_FTP")
- (gw:wrap-value ws 'gnc:url-type-secure '<gnc:url-type> "URL_TYPE_SECURE")
- (gw:wrap-value ws 'gnc:url-type-register '<gnc:url-type> "URL_TYPE_REGISTER")
- (gw:wrap-value ws 'gnc:url-type-accttree '<gnc:url-type> "URL_TYPE_ACCTTREE")
- (gw:wrap-value ws 'gnc:url-type-report '<gnc:url-type> "URL_TYPE_REPORT")
- (gw:wrap-value ws 'gnc:url-type-options '<gnc:url-type> "URL_TYPE_OPTIONS")
- (gw:wrap-value ws 'gnc:url-type-scheme '<gnc:url-type> "URL_TYPE_SCHEME")
- (gw:wrap-value ws 'gnc:url-type-help '<gnc:url-type> "URL_TYPE_HELP")
- (gw:wrap-value ws 'gnc:url-type-xmldata '<gnc:url-type> "URL_TYPE_XMLDATA")
- (gw:wrap-value ws 'gnc:url-type-price '<gnc:url-type> "URL_TYPE_PRICE")
- (gw:wrap-value ws 'gnc:url-type-other '<gnc:url-type> "URL_TYPE_OTHER")
-
-
- (gw:wrap-function
- ws
- 'gnc:option-dialog-new
- '<gnc:OptionWin*>
- "gnc_options_dialog_new"
- '(((<gw:mchars> caller-owned) title))
- "Create a new option dialog")
-
- (gw:wrap-function
- ws
- 'gnc:option-dialog-destroy
- '<gw:void>
- "gnc_options_dialog_destroy"
- '((<gnc:OptionWin*> option-window))
- "Destroy an option dialog")
-
- (gw:wrap-function
- ws
- 'gnc:option-dialog-build-contents
- '<gw:void>
- "gnc_build_options_dialog_contents"
- '((<gnc:OptionWin*> option-window) (<gnc:OptionDB*> option-db))
- "Fill in the option window with the provided option db")
-
- (gw:wrap-function
- ws
- 'gnc:option-dialog-set-callbacks
- '<gw:void>
- "gnc_options_dialog_set_scm_callbacks"
- '((<gnc:OptionWin*> option-window) (<gw:scm> apply-cb) (<gw:scm> close-cb))
- "Setup callbacks for the option window.")
-
-
- (gw:wrap-as-wct ws '<gnc:PrintSession*> "PrintSession*" "const PrintSession*")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-create
- '<gnc:PrintSession*>
- "gnc_print_session_create"
- '((<gw:bool> yes_is_default))
- "Start a new print session. This will display a dialog asking for "
- "number of copies, print vs. preview, etc.")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-destroy
- '<gw:void>
- "gnc_print_session_destroy"
- '((<gnc:PrintSession*> p))
- "Free a print session's resources")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-moveto
- '<gw:void>
- "gnc_print_session_moveto"
- '((<gnc:PrintSession*> p) (<gw:double> x) (<gw:double> y))
- "Move the current point")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-text
- '<gw:void>
- "gnc_print_session_text"
- '((<gnc:PrintSession*> p) ((<gw:mchars> caller-owned const) text))
- "Show some text in Courier 16")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-rotate
- '<gw:void>
- "gnc_print_session_rotate"
- '((<gnc:PrintSession*> p) (<gw:double> theta_in_degrees))
- "Rotate the image by X degrees")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-translate
- '<gw:void>
- "gnc_print_session_translate"
- '((<gnc:PrintSession*> p) (<gw:double> x) (<gw:double> y))
- "Translate the image to point x,y")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-gsave
- '<gw:void>
- "gnc_print_session_gsave"
- '((<gnc:PrintSession*> p))
- "Save the current print-session state")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-grestore
- '<gw:void>
- "gnc_print_session_grestore"
- '((<gnc:PrintSession*> p))
- "Restore the current print-session state")
-
- (gw:wrap-function
- ws
- 'gnc:print-session-done
- '<gw:void>
- "gnc_print_session_done"
- '((<gnc:PrintSession*> p))
- "Let the print context know you're finished with it.")
-
- (gw:wrap-function
- ws
- 'gnc:error-dialog
- '<gw:void>
- "gnc_error_dialog"
- '((<gtk:Widget*> window)
- ((<gw:mchars> caller-owned const) message))
- "Show ok dialog box with given error message.")
-
- (gw:wrap-function
- ws
- 'gnc:verify-dialog
- '<gw:bool>
- "gnc_verify_dialog"
- '((<gtk:Widget*> window)
- (<gw:bool> yes_is_default)
- ((<gw:mchars> caller-owned const) message))
- "Show yes/no dialog box with given message.")
-
- (gw:wrap-function
- ws
- 'gnc:info-dialog
- '<gw:void>
- "gnc_info_dialog"
- '((<gtk:Widget*> window)
- ((<gw:mchars> caller-owned const) message))
- "Show ok dialog box with given message.")
-
- (gw:wrap-function
- ws
- 'gnc:warning-dialog
- '<gw:void>
- "gnc_warning_dialog"
- '((<gtk:Widget*> window)
- ((<gw:mchars> caller-owned const) message))
- "Show warning dialog box with given message.")
-
- (gw:wrap-function
- ws
- 'gnc:add-extension
- '<gw:void>
- "gnc_add_scm_extension"
- '((<gw:scm> extension))
- "Add a menu extension.")
-
- (gw:wrap-function
- ws
- 'gnc:choose-radio-option-dialog
- '<gw:int>
- "gnc_choose_radio_option_dialog"
- '((<gnc:UIWidget> parent)
- ((<gw:mchars> caller-owned const) title)
- ((<gw:mchars> caller-owned const) msg)
- ((<gw:mchars> caller-owned const) button-name)
- (<gw:int> default-choice)
- ((gw:glist-of (<gw:mchars> callee-owned) callee-owned) choices))
- "Show a dialog offering different mutually exclusive choices
-in a radio list.")
-
- ;;
- ;; gnc-html.h
- ;;
-
- (gw:wrap-function
- ws
- 'gnc:html-encode-string
- '(<gw:gchars> caller-owned)
- "gnc_html_encode_string"
- '(((<gw:mchars> caller-owned const) bookname)))
-
- (gw:wrap-function
- ws
- 'gnc:html-build-url
- '(<gw:gchars> caller-owned)
- "gnc_build_url"
- '((<gnc:url-type> url-type) ((<gw:mchars> caller-owned const) location)
- ((<gw:mchars> caller-owned const) label))
- "Build a GNC URL based on the URL Type and location. The label may
-be left empty")
-
-
- ;; gnc-amount-edit.h
- (gw:wrap-as-wct ws
- '<gnc:GNCAmountEdit>
- "GNCAmountEdit*" "const GNCAmountEdit*")
-
- (gw:wrap-function
- ws
- 'gnc:amount-edit-new
- '<gnc:UIWidget>
- "gnc_amount_edit_new"
- '()
- "Return a new amount edit widget.")
-
- (gw:wrap-function
- ws
- 'gnc:amount-edit-gtk-entry
- '<gnc:UIWidget>
- "gnc_amount_edit_gtk_entry"
- '((<gnc:GNCAmountEdit> amount-edit))
- "Return the gtk entry for a gnc amount edit widget.")
-
- (gw:wrap-function
- ws
- 'gnc:amount-edit-set-amount
- '<gw:void>
- "gnc_amount_edit_set_amount"
- '((<gnc:GNCAmountEdit> amount-edit)
- (<gnc:numeric> amount))
- "Set the amount of an amount edit widget.")
-
- (gw:wrap-function
- ws
- 'gnc:amount-edit-get-amount
- '<gnc:numeric>
- "gnc_amount_edit_get_amount"
- '((<gnc:GNCAmountEdit> amount-edit))
- "Return the amount in an amount edit widget.")
-
- (gw:wrap-function
- ws
- 'gnc:amount-edit-evaluate
- '<gw:bool>
- "gnc_amount_edit_evaluate"
- '((<gnc:GNCAmountEdit> amount-edit))
- "Evaluate the contents of an amount edit widget and return
-#t if it is a valid entry.")
-
- (gw:wrap-function
- ws
- 'gnc:amount-edit-set-print-info
- '<gw:void>
- "gnc_amount_edit_set_print_info"
- '((<gnc:GNCAmountEdit> amount-edit)
- (<gnc:print-amount-info-scm> print-info))
- "Set the print info used by the amount edit.")
-
- (gw:wrap-function
- ws
- 'gnc:amount-edit-set-fraction
- '<gw:void>
- "gnc_amount_edit_set_fraction"
- '((<gnc:GNCAmountEdit> amount-edit)
- (<gw:int> fraction))
- "Set the fraction used by the amount edit widget.")
-
- (gw:wrap-function
- ws
- 'gnc:amount-edit-set-evaluate-on-enter
- '<gw:void>
- "gnc_amount_edit_set_evaluate_on_enter"
- '((<gnc:GNCAmountEdit> amount-edit)
- (<gw:bool> evaluate-on-enter))
- "Set whether the edit widget evaluates on enter.")
-
-
- ;; gnc-date-edit.h
- (gw:wrap-as-wct ws '<gnc:GNCDateEdit> "GNCDateEdit*" "const GNCDateEdit*")
-
- (gw:wrap-function
- ws
- 'gnc:date-edit-new
- '<gnc:UIWidget>
- "gnc_date_edit_new_ts"
- '((<gnc:time-pair> date) (<gw:bool> show-time) (<gw:bool> use-24-hour-format))
- "Return a new date edit widget.")
-
- (gw:wrap-function
- ws
- 'gnc:date-edit-set-time
- '<gw:void>
- "gnc_date_edit_set_time_ts"
- '((<gnc:GNCDateEdit> date-edit)
- (<gnc:time-pair> time))
- "Set the time used by the date edit widget.")
-
- (gw:wrap-function
- ws
- 'gnc:date-edit-get-date
- '<gnc:time-pair>
- "gnc_date_edit_get_date_ts"
- '((<gnc:GNCDateEdit> date-edit))
- "Return the date of the date-edit widget.")
-
- (gw:wrap-function
- ws
- 'gnc:date-edit-get-date-end
- '<gnc:time-pair>
- "gnc_date_edit_get_date_end_ts"
- '((<gnc:GNCDateEdit> date-edit))
- "Return the date of the date-edit widget at the end of the day.")
-
-
- ;; druid-utils.h
- (gw:wrap-as-wct ws '<gnc:GnomeDruid> "GnomeDruid*" "const GnomeDruid*")
-
- (gw:wrap-function
- ws
- 'gnc:druid-set-colors
- '<gw:void>
- "gnc_druid_set_colors"
- '((<gnc:GnomeDruid> druid))
- "Set the colors of a druid.")
-
-
- ;; dialog-utils.h
- (gw:wrap-function
- ws
- 'gnc:set-busy-cursor
- '<gw:void>
- "gnc_set_busy_cursor"
- '((<gtk:Widget*> window)
- (<gw:bool> update_now))
- "Set a busy cursor for a specific window. If null, the busy cursor will be set on all windows.")
-
- (gw:wrap-function
- ws
- 'gnc:unset-busy-cursor
- '<gw:void>
- "gnc_unset_busy_cursor"
- '((<gtk:Widget*> window))
- "Remove a busy cursor for a specific window. If null, the busy cursor will be removed on all windows.")
-
- (gw:wrap-function
- ws
- 'gnc:gconf-get-bool
- '<gw:bool>
- "gnc_gconf_get_bool_no_error"
- '(((<gw:mchars> caller-owned) section)
- ((<gw:mchars> caller-owned) name))
- "Get a boolean value from gconf.")
-
- (gw:wrap-function
- ws
- 'gnc:file-quit
- '<gw:void>
- "gnc_file_quit"
- '()
- "Stop working with the current file.")
-
- (gw:wrap-function
- ws
- 'gnc:file-open-file
- '<gw:bool>
- "gnc_file_open_file"
- '(((<gw:mchars> caller-owned const) filename))
- "Open filename.")
-
- (gw:wrap-function
- ws
- 'gnc:history-get-last
- '(<gw:mchars> caller-owned)
- "gnc_history_get_last"
- '()
- "Get the last file opened by the user.")
-
- (gw:wrap-function
- ws
- 'gnc:main-window-set-progressbar-window
- '<gw:void>
- "gnc_main_window_set_progressbar_window"
- '((<gnc:MainWindow*> window))
- "Set the progressbar window from the given GncMainWindow; does the cast. :p")
-
- (gw:wrap-function
- ws
- 'gnc:window-set-progressbar-window
- '<gw:void>
- "gnc_window_set_progressbar_window"
- '((<gnc:Window*> window))
- "Set the progressbar window from the given GncWindow.")
-
- (gw:wrap-function
- ws
- 'gnc:window-show-progress
- '<gw:void>
- "gnc_window_show_progress"
- '(((<gw:mchars> caller-owned const) message)
- (<gw:double> percentage))
- "Set the progressbar window from the given GncWindow.")
-
- (gw:wrap-function
- ws
- 'gnc:gnome-locate-data-file
- '(<gw:mchars> caller-owned)
- "gnc_gnome_locate_data_file"
- '(((<gw:mchars> caller-owned const) name))
- "Find the file in the application data directory.")
-
- (gw:wrap-function
- ws
- 'gnc:ui-is-running?
- '<gw:bool>
- "gnucash_ui_is_running"
- '()
- "Predicate to determine if the UI is running.")
-
- (gw:wrap-function
- ws
- 'gnc:update-splash-screen
- '<gw:void>
- "gnc_update_splash_screen"
- '(((<gw:mchars> caller-owned const) string))
- "Update the progress box on the splash screen dialog.")
-
-)
Modified: gnucash/trunk/src/gnome-utils/test/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/gnome-utils/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -18,14 +18,12 @@
--gnc-module-dir ${top_builddir}/src/gnome-utils \
--gnc-module-dir ${top_builddir}/src/gnome \
--gnc-module-dir ${top_builddir}/src/scm \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/scm \
--guile-load-dir ${top_srcdir}/src/gnome \
--guile-load-dir ${top_srcdir}/src/engine \
--guile-load-dir ${top_srcdir}/src/app-utils \
--guile-load-dir ${top_srcdir}/src/gnome-utils \
- --library-dir ${top_srcdir}/src/gnome \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_srcdir}/src/gnome
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Modified: gnucash/trunk/src/import-export/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -64,7 +64,6 @@
-I${top_srcdir}/src/app-utils \
-I${top_srcdir}/src/gnome \
-I${top_srcdir}/src/gnome-utils \
- ${G_WRAP_COMPILE_ARGS} \
${GNOME_CFLAGS} \
${GTKHTML_CFLAGS} \
${GDK_PIXBUF_CFLAGS} \
Modified: gnucash/trunk/src/import-export/hbci/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/hbci/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/hbci/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -69,7 +69,6 @@
-I${top_srcdir}/src/register/register-core \
-I${top_srcdir}/src/register/register-gnome \
-I${top_srcdir}/src/register/ledger-core \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${GNOME_CFLAGS} \
${GTKHTML_CFLAGS} \
Modified: gnucash/trunk/src/import-export/log-replay/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/log-replay/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/log-replay/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -39,5 +39,3 @@
uidir = $(GNC_UI_DIR)
dist_ui_DATA = \
gnc-plugin-log-replay-ui.xml
-
-CLEANFILES = g-wrapped
Modified: gnucash/trunk/src/import-export/qif/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/qif/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -34,6 +34,5 @@
-I${top_srcdir}/src/import-export \
${GLIB_CFLAGS} \
${GUILE_INCS} \
- ${QOF_CFLAGS} \
- ${G_WRAP_COMPILE_ARGS}
+ ${QOF_CFLAGS}
Modified: gnucash/trunk/src/import-export/qif/test/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/qif/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -38,8 +38,6 @@
--gnc-module-dir ${top_builddir}/src/gnome-utils \
--gnc-module-dir ${top_builddir}/src/network-utils \
--gnc-module-dir ${top_builddir}/src/gnome \
- --library-dir ${G_WRAP_LIB_DIR} \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/scm \
--guile-load-dir ${top_srcdir}/src/import-export \
--guile-load-dir ${top_srcdir}/src/import-export/qif
Modified: gnucash/trunk/src/import-export/qif-import/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/qif-import/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -23,7 +23,6 @@
${top_builddir}/src/core-utils/libcore-utils.la \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/gnc-module/libgncmodule.la \
- ${G_WRAP_LINK_ARGS} \
${GUILE_LIBS} \
${GNOME_LIBS} \
${GLADE_LIBS} \
@@ -59,7 +58,6 @@
-I${top_srcdir}/src/gnome \
-I${top_srcdir}/src/gnome-utils \
-I${top_srcdir}/src/import-export \
- ${G_WRAP_COMPILE_ARGS} \
${GUILE_INCS} \
${GLIB_CFLAGS} \
${GLADE_CFLAGS} \
Modified: gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/druid-qif-import.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/druid-qif-import.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -48,7 +48,7 @@
#include "gnc-ui.h"
#include "guile-mappings.h"
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#define DRUID_QIF_IMPORT_CM_CLASS "druid-qif-import"
#define GCONF_SECTION "dialogs/import/qif"
@@ -460,7 +460,6 @@
SCM check_from_acct = scm_c_eval_string("qif-file:check-from-acct");
SCM default_acct = scm_c_eval_string("qif-file:path-to-accountname");
SCM qif_file_parse_results = scm_c_eval_string("qif-file:parse-fields-results");
- SCM window_type = scm_c_eval_string ("<gnc:UIWidget>");
SCM date_formats;
SCM scm_filename;
SCM scm_qiffile;
@@ -471,7 +470,7 @@
/* get the file name */
path_to_load = gtk_entry_get_text(GTK_ENTRY(wind->filename_entry));
- window = gw_wcp_assimilate_ptr(wind->window, window_type);
+ window = SWIG_NewPointerObj(wind->window, SWIG_TypeQuery("_p_GtkWidget"), 0);
/* check a few error conditions before we get started */
if(strlen(path_to_load) == 0) {
@@ -1205,7 +1204,6 @@
SCM qif_to_gnc = scm_c_eval_string("qif-import:qif-to-gnc");
SCM find_duplicates = scm_c_eval_string("gnc:group-find-duplicates");
- SCM window_type = scm_c_eval_string ("<gnc:UIWidget>");
SCM retval;
SCM current_xtn;
SCM window;
@@ -1260,7 +1258,7 @@
/* call a scheme function to do the work. The return value is an
* account group containing all the new accounts and transactions */
- window = gw_wcp_assimilate_ptr(wind->window, window_type);
+ window = SWIG_NewPointerObj(wind->window, SWIG_TypeQuery("_p_GtkWidget"), 0);
retval = scm_apply(qif_to_gnc,
SCM_LIST7(wind->imported_files,
wind->acct_map_info,
@@ -1290,7 +1288,7 @@
/* now detect duplicate transactions */
gnc_set_busy_cursor(NULL, TRUE);
retval = scm_call_3(find_duplicates,
- scm_c_eval_string("(gnc:get-current-group)"),
+ scm_c_eval_string("(gnc-get-current-group)"),
wind->imported_account_group, window);
gnc_unset_busy_cursor(NULL);
@@ -1314,8 +1312,10 @@
while(!SCM_NULLP(retval)) {
current_xtn = SCM_CAAR(retval);
- gnc_xtn = (Transaction *)gw_wcp_get_ptr(current_xtn);
-
+ #define FUNC_NAME "xaccTransCountSplits"
+ gnc_xtn = SWIG_MustGetPtr(current_xtn,
+ SWIG_TypeQuery("_p_Transaction"), 1, 0);
+ #undef FUNC_NAME
if(xaccTransCountSplits(gnc_xtn) > 2) {
amount_str = _("(split)");
}
@@ -1598,8 +1598,10 @@
stocks = wind->new_stocks;
while(!SCM_NULLP(stocks) && (stocks != SCM_BOOL_F)) {
comm_ptr_token = scm_call_2(hash_ref, wind->stock_hash, SCM_CAR(stocks));
- commodity = gw_wcp_get_ptr(comm_ptr_token);
-
+ #define FUNC_NAME "make_qif_druid_page"
+ commodity = SWIG_MustGetPtr(comm_ptr_token,
+ SWIG_TypeQuery("_p_gnc_commodity"), 1, 0);
+ #undef FUNC_NAME
new_page = make_qif_druid_page(commodity);
g_signal_connect(new_page->page, "next",
@@ -1760,7 +1762,10 @@
while(!SCM_NULLP(possible_matches)) {
current_xtn = SCM_CAR(possible_matches);
- gnc_xtn = (Transaction *)gw_wcp_get_ptr(SCM_CAR(current_xtn));
+ #define FUNC_NAME "make_qif_druid_page"
+ gnc_xtn = SWIG_MustGetPtr(SCM_CAR(current_xtn),
+ SWIG_TypeQuery("_p_Transaction"), 1, 0);
+ #undef FUNC_NAME
selected = SCM_CDR(current_xtn);
if(xaccTransCountSplits(gnc_xtn) > 2) {
@@ -1862,7 +1867,7 @@
/* actually add in the new transactions. */
scm_call_2(cat_and_merge,
- scm_c_eval_string("(gnc:get-current-group)"),
+ scm_c_eval_string("(gnc-get-current-group)"),
wind->imported_account_group);
gnc_resume_gui_refresh();
Modified: gnucash/trunk/src/import-export/qif-import/qif-dialog-utils.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-dialog-utils.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/qif-dialog-utils.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -9,39 +9,39 @@
(use-modules (ice-9 regex))
(define (default-stock-acct brokerage security)
- (string-append brokerage (gnc:account-separator-string) security))
+ (string-append brokerage (gnc-get-account-separator-string) security))
(define (default-dividend-acct brokerage security)
- (string-append (_ "Dividends") (gnc:account-separator-string)
- brokerage (gnc:account-separator-string)
+ (string-append (_ "Dividends") (gnc-get-account-separator-string)
+ brokerage (gnc-get-account-separator-string)
security))
(define (default-interest-acct brokerage security)
- (string-append (_ "Interest") (gnc:account-separator-string)
+ (string-append (_ "Interest") (gnc-get-account-separator-string)
brokerage
(if (string=? security "")
""
- (string-append (gnc:account-separator-string)
+ (string-append (gnc-get-account-separator-string)
security))))
(define (default-capital-return-acct brokerage security)
- (string-append (_ "Cap Return") (gnc:account-separator-string)
- brokerage (gnc:account-separator-string)
+ (string-append (_ "Cap Return") (gnc-get-account-separator-string)
+ brokerage (gnc-get-account-separator-string)
security))
(define (default-cglong-acct brokerage security)
- (string-append (_ "Cap. gain (long)") (gnc:account-separator-string)
- brokerage (gnc:account-separator-string)
+ (string-append (_ "Cap. gain (long)") (gnc-get-account-separator-string)
+ brokerage (gnc-get-account-separator-string)
security))
(define (default-cgmid-acct brokerage security)
- (string-append (_ "Cap. gain (mid)") (gnc:account-separator-string)
- brokerage (gnc:account-separator-string)
+ (string-append (_ "Cap. gain (mid)") (gnc-get-account-separator-string)
+ brokerage (gnc-get-account-separator-string)
security))
(define (default-cgshort-acct brokerage security)
- (string-append (_ "Cap. gain (short)") (gnc:account-separator-string)
- brokerage (gnc:account-separator-string)
+ (string-append (_ "Cap. gain (short)") (gnc-get-account-separator-string)
+ brokerage (gnc-get-account-separator-string)
security))
(define (default-equity-holding security) (_ "Retained Earnings"))
@@ -49,11 +49,11 @@
(define (default-equity-account) (_ "Retained Earnings"))
(define (default-commission-acct brokerage)
- (string-append (_ "Commissions") (gnc:account-separator-string)
+ (string-append (_ "Commissions") (gnc-get-account-separator-string)
brokerage))
(define (default-margin-interest-acct brokerage)
- (string-append (_ "Margin Interest") (gnc:account-separator-string)
+ (string-append (_ "Margin Interest") (gnc-get-account-separator-string)
brokerage))
(define (default-unspec-acct)
@@ -417,7 +417,7 @@
(set! entry
(qif-import:guess-acct
xtn-cat
- (if (gnc:numeric-positive-p
+ (if (gnc-numeric-positive-p
(qif-split:amount split))
(list GNC-INCOME-TYPE GNC-EXPENSE-TYPE)
(list GNC-EXPENSE-TYPE GNC-INCOME-TYPE))
@@ -494,7 +494,7 @@
entry (default-unspec-acct))
(qif-map-entry:set-allowed-types!
entry
- (if (gnc:numeric-positive-p
+ (if (gnc-numeric-positive-p
(qif-split:amount split))
(list GNC-INCOME-TYPE GNC-EXPENSE-TYPE
GNC-BANK-TYPE GNC-CCARD-TYPE
@@ -567,7 +567,7 @@
(if (not qif-import:account-name-regexp)
(let* ((rstr ":([^:]+)$|^([^:]+)$")
(newstr (regexp-substitute/global
- #f ":" rstr 'pre (gnc:account-separator-string) 'post)))
+ #f ":" rstr 'pre (gnc-get-account-separator-string) 'post)))
(set! qif-import:account-name-regexp (make-regexp newstr))))
@@ -604,21 +604,21 @@
(memv GNC-MUTUAL-TYPE
(qif-map-entry:allowed-types map-entry)))
(not (hash-ref stock-hash stock-name)))
- (let* ((separator (string-ref (gnc:account-separator-string) 0))
+ (let* ((separator (string-ref (gnc-get-account-separator-string) 0))
(existing-gnc-acct
- (gnc:get-account-from-full-name
- (gnc:get-current-group)
+ (xaccGetAccountFromFullName
+ (gnc-get-current-group)
(qif-map-entry:gnc-name map-entry)))
- (book (gnc:group-get-book (gnc:get-current-group)))
+ (book (xaccGroupGetBook (gnc-get-current-group)))
(existing-type
- (gnc:account-get-type existing-gnc-acct)))
+ (xaccAccountGetType existing-gnc-acct)))
(if (and existing-gnc-acct
(memv existing-type (list GNC-STOCK-TYPE
GNC-MUTUAL-TYPE)))
;; gnc account already exists... we *know* what the
;; security is supposed to be
(let ((commodity
- (gnc:account-get-commodity existing-gnc-acct)))
+ (xaccAccountGetCommodity existing-gnc-acct)))
(hash-set! stock-hash stock-name commodity))
;; we know nothing about this security.. we need to
@@ -629,7 +629,7 @@
(set! names (cons stock-name names))
(hash-set!
stock-hash stock-name
- (gnc:commodity-create book
+ (gnc-commodity-new book
stock-name
GNC_COMMODITY_NS_NYSE
ticker-symbol
@@ -685,7 +685,7 @@
(let ((accts '())
(acct-tree '())
- (separator (string-ref (gnc:account-separator-string) 0)))
+ (separator (string-ref (gnc-get-account-separator-string) 0)))
;; get the new accounts from the account map
(for-each
(lambda (acctmap)
@@ -709,11 +709,11 @@
(set! accts
(cons
(cons (string-split
- (gnc:account-get-full-name acct)
+ (gnc-account-get-full-name acct)
separator)
#f)
accts)))
- (gnc:group-get-subaccounts (gnc:get-current-group)))
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group)))
;; now build a tree structure
(for-each
Modified: gnucash/trunk/src/import-export/qif-import/qif-file.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-file.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/qif-file.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -11,7 +11,7 @@
;; just store the fields "raw".
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(use-modules (g-wrapped gw-core-utils))
+(use-modules (gnucash core-utils))
(cond
((or (string=? "1.3.4" (version))
@@ -53,9 +53,9 @@
(if (> file-size 10000)
(begin
- (set! progress-dialog (gnc:progress-dialog-new window #f))
- (gnc:progress-dialog-set-title progress-dialog (_ "Progress"))
- (gnc:progress-dialog-set-heading progress-dialog
+ (set! progress-dialog (gnc-progress-dialog-new window #f))
+ (gnc-progress-dialog-set-title progress-dialog (_ "Progress"))
+ (gnc-progress-dialog-set-heading progress-dialog
(_ "Loading QIF file..."))))
(with-input-from-file path
@@ -74,7 +74,7 @@
;; pick the 1-char tag off from the remainder of the line
(set! tag (string-ref line 0))
(set! value (substring line 1))
- (gnc:utf8-strip-invalid value)
+ (gnc-utf8-strip-invalid value) ;; changes value in-place
;; now do something with the line
(if
@@ -388,9 +388,9 @@
;; update the progress bar for each line read
(if progress-dialog
(begin
- (gnc:progress-dialog-set-value
+ (gnc-progress-dialog-set-value
progress-dialog (/ bytes-read file-size))
- (gnc:progress-dialog-update progress-dialog)))
+ (gnc-progress-dialog-update progress-dialog)))
;; this is if we read a normal (non-null, non-eof) line...
(if (not heinous-error)
@@ -406,7 +406,7 @@
(qif-file:set-xtns! self (reverse (qif-file:xtns self)))
(if progress-dialog
- (gnc:progress-dialog-destroy progress-dialog))
+ (gnc-progress-dialog-destroy progress-dialog))
return-val)))
@@ -520,7 +520,7 @@
(and
;; fields of categories.
(check-and-parse-field
- qif-cat:tax-class qif-cat:set-tax-class! gnc:numeric-equal
+ qif-cat:tax-class qif-cat:set-tax-class! gnc-numeric-equal
qif-parse:check-number-format '(decimal comma)
qif-parse:parse-number/format (qif-file:cats self)
qif-parse:print-number
@@ -528,7 +528,7 @@
set-error 'tax-class)
(check-and-parse-field
- qif-cat:budget-amt qif-cat:set-budget-amt! gnc:numeric-equal
+ qif-cat:budget-amt qif-cat:set-budget-amt! gnc-numeric-equal
qif-parse:check-number-format '(decimal comma)
qif-parse:parse-number/format (qif-file:cats self)
qif-parse:print-number
@@ -537,7 +537,7 @@
;; fields of accounts
(check-and-parse-field
- qif-acct:limit qif-acct:set-limit! gnc:numeric-equal
+ qif-acct:limit qif-acct:set-limit! gnc-numeric-equal
qif-parse:check-number-format '(decimal comma)
qif-parse:parse-number/format (qif-file:accounts self)
qif-parse:print-number
@@ -545,7 +545,7 @@
set-error 'limit)
(check-and-parse-field
- qif-acct:budget qif-acct:set-budget! gnc:numeric-equal
+ qif-acct:budget qif-acct:set-budget! gnc-numeric-equal
qif-parse:check-number-format '(decimal comma)
qif-parse:parse-number/format (qif-file:accounts self)
qif-parse:print-number
@@ -576,7 +576,7 @@
qif-parse:parse-action-field (qif-file:xtns self) set-error)
(check-and-parse-field
- qif-xtn:share-price qif-xtn:set-share-price! gnc:numeric-equal
+ qif-xtn:share-price qif-xtn:set-share-price! gnc-numeric-equal
qif-parse:check-number-format '(decimal comma)
qif-parse:parse-number/format (qif-file:xtns self)
qif-parse:print-number
@@ -584,7 +584,7 @@
set-error 'share-price)
(check-and-parse-field
- qif-xtn:num-shares qif-xtn:set-num-shares! gnc:numeric-equal
+ qif-xtn:num-shares qif-xtn:set-num-shares! gnc-numeric-equal
qif-parse:check-number-format '(decimal comma)
qif-parse:parse-number/format (qif-file:xtns self)
qif-parse:print-number
@@ -592,7 +592,7 @@
set-error 'num-shares)
(check-and-parse-field
- qif-xtn:commission qif-xtn:set-commission! gnc:numeric-equal
+ qif-xtn:commission qif-xtn:set-commission! gnc-numeric-equal
qif-parse:check-number-format '(decimal comma)
qif-parse:parse-number/format (qif-file:xtns self)
qif-parse:print-number
@@ -602,7 +602,7 @@
;; this one's a little tricky... it checks and sets all the
;; split amounts for the transaction together.
(check-and-parse-field
- qif-xtn:split-amounts qif-xtn:set-split-amounts! gnc:numeric-equal
+ qif-xtn:split-amounts qif-xtn:set-split-amounts! gnc-numeric-equal
qif-parse:check-number-formats '(decimal comma)
qif-parse:parse-numbers/format (qif-file:xtns self)
qif-parse:print-numbers
Modified: gnucash/trunk/src/import-export/qif-import/qif-guess-map.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-guess-map.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/qif-guess-map.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -28,23 +28,23 @@
(define (extract-all-account-info agroup root-name)
(if (not agroup)
'()
- (let ((children-list (gnc:group-get-account-list agroup))
+ (let ((children-list (xaccGroupGetAccountListSorted agroup))
(names '()))
;; now descend the tree of child accounts.
(for-each
(lambda (child-acct)
- (let* ((name (gnc:account-get-name child-acct))
+ (let* ((name (xaccAccountGetName child-acct))
(fullname
(if (string? root-name)
(string-append root-name
- (gnc:account-separator-string)
+ (gnc-get-account-separator-string)
name)
name)))
(set! names
(append (cons (list name fullname child-acct)
(extract-all-account-info
- (gnc:account-get-children child-acct)
+ (xaccAccountGetChildren child-acct)
fullname))
names))))
children-list)
@@ -63,7 +63,7 @@
;; (older saved prefs may not have this one)
;; - a hash of QIF stock name to gnc-commodity*
;; (older saved prefs may not have this one)
- (let* ((pref-filename (gnc:build-dotgnucash-path "qif-accounts-map"))
+ (let* ((pref-filename (gnc-build-dotgnucash-path "qif-accounts-map"))
(results '()))
;; first, read the account map and category map from the
@@ -110,7 +110,7 @@
(make-hash-table 20)))))
;; now build the list of all known account names
- (let* ((all-accounts (gnc:get-current-group))
+ (let* ((all-accounts (gnc-get-current-group))
(all-account-info (extract-all-account-info all-accounts #f)))
(set! results (cons all-account-info results)))
results))
@@ -153,8 +153,8 @@
(namespace (cadr entry))
(mnemonic (caddr entry)))
(hash-set! table name
- (gnc:commodity-table-lookup
- (gnc:book-get-commodity-table (gnc:get-current-book))
+ (gnc-commodity-table-lookup
+ (gnc-commodity-table-get-table (gnc-get-current-book))
namespace mnemonic)))))
commlist)
table))
@@ -163,11 +163,13 @@
(let ((table '()))
(hash-fold
(lambda (key value p)
- (if (and value (gw:wcp-is-of-type? <gnc:commodity*> value))
+ ;;FIXME: we used to type-check the values, like:
+ ;; (gw:wcp-is-of-type? <gnc:commodity*> value)
+ (if (and value #t)
(set! table
(cons (list key
- (gnc:commodity-get-namespace value)
- (gnc:commodity-get-mnemonic value))
+ (gnc-commodity-get-namespace value)
+ (gnc-commodity-get-mnemonic value))
table))
(display "write-commodities: something funny in hash table.\n"))
#f) #f hashtab)
@@ -175,7 +177,7 @@
(define (qif-import:save-map-prefs acct-map cat-map memo-map stock-map)
- (let* ((pref-filename (gnc:build-dotgnucash-path "qif-accounts-map")))
+ (let* ((pref-filename (gnc-build-dotgnucash-path "qif-accounts-map")))
;; does the file exist? if not, create it; in either case,
;; make sure it's a directory and we have write and execute
;; permission.
@@ -264,7 +266,7 @@
(let ((acct-matches? #f))
(for-each
(lambda (type)
- (if (= type (gnc:account-get-type (caddr gnc-acct)))
+ (if (= type (xaccAccountGetType (caddr gnc-acct)))
(set! acct-matches? #t)))
allowed-types)
(if acct-matches?
@@ -285,7 +287,7 @@
(if (not (null? matching-name-accts))
(set! retval (list
(cadr (car matching-name-accts))
- (list (gnc:account-get-type
+ (list (xaccAccountGetType
(caddr (car matching-name-accts))))))
#f)
retval))
Modified: gnucash/trunk/src/import-export/qif-import/qif-import.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-import.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/qif-import.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -6,13 +6,16 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-module (gnucash import-export qif-import))
-(use-modules (gnucash main) (g-wrapped gw-gnc)) ;; FIXME: delete after we finish modularizing.
+(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
+;; We do this initialization here because src/gnome isn't a real module.
+(load-extension "libgncgnome.so" "scm_init_sw_gnome_module")
+(use-modules (sw_gnome))
+
(use-modules (gnucash gnc-module))
(use-modules (ice-9 slib))
(use-modules (ice-9 regex))
(use-modules (srfi srfi-1))
-(use-modules (g-wrap gw-wct))
(debug-enable 'debug)
(debug-enable 'backtrace)
Modified: gnucash/trunk/src/import-export/qif-import/qif-merge-groups.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-merge-groups.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/qif-merge-groups.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -6,21 +6,21 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (gnc:group-get-transactions group)
- (let ((query (gnc:malloc-query))
+ (let ((query (qof-query-create-for-splits))
(xtns #f))
- (gnc:query-set-book query (gnc:group-get-book group))
+ (qof-query-set-book query (xaccGroupGetBook group))
;; we want to find all transactions with every split inside the
;; account group.
- (gnc:query-add-account-match query
- (gnc:group-get-subaccounts group)
- 'guid-match-any 'query-and)
+ (xaccQueryAddAccountMatch query
+ (xaccGroupGetSubAccountsSorted group)
+ QOF-GUID-MATCH-ANY QOF-QUERY-AND)
- (set! xtns (gnc:query-get-transactions query 'query-txn-match-all))
+ (set! xtns (xaccQueryGetTransactions query QUERY-TXN-MATCH-ALL))
;; lose the query
- (gnc:free-query query)
+ (qof-query-destroy query)
xtns))
@@ -42,84 +42,84 @@
(if (> work-to-do 100)
(begin
- (set! progress-dialog (gnc:progress-dialog-new window #f))
- (gnc:progress-dialog-set-title progress-dialog (_ "Progress"))
- (gnc:progress-dialog-set-heading progress-dialog
+ (set! progress-dialog (gnc-progress-dialog-new window #f))
+ (gnc-progress-dialog-set-title progress-dialog (_ "Progress"))
+ (gnc-progress-dialog-set-heading progress-dialog
(_ "Finding duplicate transactions..."))))
;; for each transaction in the new group, build a query that could
;; match possibly similar transactions.
(for-each
(lambda (xtn)
- (let ((query (gnc:malloc-query)))
+ (let ((query (qof-query-create-for-splits)))
(set! work-done (+ 1 work-done))
(if progress-dialog
(begin
- (gnc:progress-dialog-set-value
+ (gnc-progress-dialog-set-value
progress-dialog (/ work-done work-to-do))
- (gnc:progress-dialog-update progress-dialog)))
+ (gnc-progress-dialog-update progress-dialog)))
- (gnc:query-set-book query (gnc:group-get-book old-group))
+ (qof-query-set-book query (xaccGroupGetBook old-group))
;; first, we want to find only transactions from the old group.
- (gnc:query-add-account-match query
- (gnc:group-get-subaccounts old-group)
- 'guid-match-any 'query-and)
+ (xaccQueryAddAccountMatch query
+ (xaccGroupGetSubAccountsSorted old-group)
+ QOF-GUID-MATCH-ANY QOF-QUERY-AND)
;; the date should be close to the same.. +/- a week.
- (let ((date (gnc:transaction-get-date-posted xtn)))
- (gnc:query-add-date-match-timepair
+ (let ((date (gnc-transaction-get-date-posted xtn)))
+ (xaccQueryAddDateMatchTS
query #t (decdate date WeekDelta) #t (incdate date WeekDelta)
- 'query-and))
+ QOF-QUERY-AND))
;; for each split in the transaction, add a term to match the
;; properties of one split
- (let ((q-splits (gnc:malloc-query)))
+ (let ((q-splits (qof-query-create-for-splits)))
(for-each
(lambda (split)
- (let ((sq (gnc:malloc-query)))
- (gnc:query-set-book sq (gnc:group-get-book old-group))
+ (let ((sq (qof-query-create-for-splits)))
+ (qof-query-set-book sq (xaccGroupGetBook old-group))
;; we want to match the account in the old group that
;; has the same name as an account in the new group. If
;; there's not one (new account), the match will be NULL
;; and we know the query won't find anything. optimize
;; this later.
- (gnc:query-add-single-account-match
+ (xaccQueryAddSingleAccountMatch
sq
- (gnc:get-account-from-full-name
- old-group (gnc:account-get-full-name
- (gnc:split-get-account split)))
- 'query-and)
+ (xaccGetAccountFromFullName
+ old-group (gnc-account-get-full-name
+ (xaccSplitGetAccount split)))
+ QOF-QUERY-AND)
;; we want the value for the split to match the value
;; the old-group split. We should really check for
;; fuzziness.
- (gnc:query-add-value-match
- sq (gnc:split-get-value split)
- 'amt-sgn-match-either 'query-compare-equal
- 'query-and)
+ (xaccQueryAddValueMatch
+ sq (xaccSplitGetValue split)
+ QOF-NUMERIC-MATCH-ANY QOF-COMPARE-EQUAL
+ QOF-QUERY-AND)
;; now merge into the split query. Reminder: q-splits
;; is set up to match any split that matches any split
;; in the current xtn; every split in an old transaction
;; must pass that filter.
- (let ((q-new (gnc:query-merge q-splits sq 'query-or)))
- (gnc:free-query q-splits)
- (gnc:free-query sq)
+ (let ((q-new (qof-query-merge q-splits sq QOF-QUERY-OR)))
+ (qof-query-destroy q-splits)
+ (qof-query-destroy sq)
(set! q-splits q-new))))
- (gnc:transaction-get-splits xtn))
+ (xaccTransGetSplits xtn))
;; now q-splits will match any split that is the same as one
;; split in the old-group xtn. Merge it in.
- (let ((q-new (gnc:query-merge query q-splits 'query-and)))
- (gnc:free-query query)
- (gnc:free-query q-splits)
+ (let ((q-new (qof-query-merge query q-splits QOF-QUERY-AND)))
+ (qof-query-destroy query)
+ (qof-query-destroy q-splits)
(set! query q-new)))
;; now that we have built a query, get transactions in the old
;; account group that matches it.
- (let ((old-xtns (gnc:query-get-transactions query 'query-txn-match-all)))
+ (let ((old-xtns (xaccQueryGetTransactions query QUERY-TXN-MATCH-ALL)))
(set! old-xtns (map
(lambda (elt)
(cons elt #f)) old-xtns))
@@ -128,12 +128,12 @@
;; along with the transaction
(if (not (null? old-xtns))
(set! matches (cons (cons xtn old-xtns) matches))))
- (gnc:free-query query)))
+ (qof-query-destroy query)))
new-xtns)
;; get rid of the progress dialog
(if progress-dialog
- (gnc:progress-dialog-destroy progress-dialog))
+ (gnc-progress-dialog-destroy progress-dialog))
;; return the matches
matches))
@@ -151,14 +151,14 @@
matches)
(if do-delete
(begin
- (gnc:transaction-begin-edit new-xtn)
- (gnc:transaction-destroy new-xtn)
- (gnc:transaction-commit-edit new-xtn)))))
+ (xaccTransBeginEdit new-xtn)
+ (xaccTransDestroy new-xtn)
+ (xaccTransCommitEdit new-xtn)))))
match-list))
(define (gnc:group-catenate-and-merge old-group new-group)
;; stuff the new accounts into the old group and merge the accounts
- (gnc:group-concat-group old-group new-group)
- (gnc:account-group-begin-edit new-group)
- (gnc:account-group-destroy new-group)
- (gnc:group-merge-accounts old-group))
+ (xaccGroupConcatGroup old-group new-group)
+ (xaccAccountGroupBeginEdit new-group)
+ (xaccAccountGroupDestroy new-group)
+ (xaccGroupMergeAccounts old-group))
Modified: gnucash/trunk/src/import-export/qif-import/qif-objects.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-objects.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/qif-objects.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -296,16 +296,16 @@
(define (set-amounts neg? amounts)
(map
(lambda (split amount)
- (qif-split:set-amount! split (if neg? (gnc:numeric-neg amount) amount)))
+ (qif-split:set-amount! split (if neg? (gnc-numeric-neg amount) amount)))
(qif-xtn:splits self) amounts))
(define (need-neg amounts)
- (let ((sum (gnc:numeric-zero)))
+ (let ((sum (gnc-numeric-zero)))
(for-each
(lambda (amt)
- (set! sum (gnc:numeric-add sum amt 0 GNC-DENOM-LCD)))
+ (set! sum (gnc-numeric-add sum amt 0 GNC-DENOM-LCD)))
amounts)
- (gnc:numeric-zero-p sum)))
+ (gnc-numeric-zero-p sum)))
(let ((def-spl (qif-xtn:default-split self)))
(if def-spl
Modified: gnucash/trunk/src/import-export/qif-import/qif-parse.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-parse.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/qif-parse.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -270,7 +270,7 @@
; ((vest)
; 'vest)
(else
- (gnc:warning-dialog #f
+ (gnc:warning-dialog '()
(string-append
(sprintf #f (_ "The file contains an unknown Action '%s'.")
read-value)
@@ -567,12 +567,12 @@
(with-input-from-string filtered-string
(lambda () (read)))))
(if (number? read-val)
- (gnc:double-to-gnc-numeric
+ (double-to-gnc-numeric
(+ 0.0 read-val) GNC-DENOM-AUTO
(logior (GNC-DENOM-SIGFIGS
(string-length (string-remove-char filtered-string #\.)))
GNC-RND-ROUND))
- (gnc:numeric-zero))))
+ (gnc-numeric-zero))))
((comma)
(let* ((filtered-string
(string-remove-char
@@ -584,21 +584,21 @@
(with-input-from-string filtered-string
(lambda () (read)))))
(if (number? read-val)
- (gnc:double-to-gnc-numeric
+ (double-to-gnc-numeric
(+ 0.0 read-val) GNC-DENOM-AUTO
(logior (GNC-DENOM-SIGFIGS
(string-length (string-remove-char filtered-string #\.)))
GNC-RND-ROUND))
- (gnc:numeric-zero))))
+ (gnc-numeric-zero))))
((integer)
(let ((read-val
(with-input-from-string
(string-remove-char value-string #\$)
(lambda () (read)))))
(if (number? read-val)
- (gnc:double-to-gnc-numeric
+ (double-to-gnc-numeric
(+ 0.0 read-val) 1 GNC-RND-ROUND)
- (gnc:numeric-zero))))))
+ (gnc-numeric-zero))))))
(define (qif-parse:check-number-formats amt-strings formats)
(let ((retval formats))
@@ -621,7 +621,7 @@
(if (not tmp)
(set! all-ok #f))
tmp)
- (gnc:numeric-zero)))
+ (gnc-numeric-zero)))
amt-strings)))
(if all-ok parsed #f)))
Modified: gnucash/trunk/src/import-export/qif-import/qif-to-gnc.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-to-gnc.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-import/qif-to-gnc.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -15,35 +15,35 @@
(define (qif-import:find-or-make-acct acct-info check-types? commodity
check-commodity? default-currency
gnc-acct-hash old-group new-group)
- (let* ((separator (string-ref (gnc:account-separator-string) 0))
+ (let* ((separator (string-ref (gnc-get-account-separator-string) 0))
(gnc-name (qif-map-entry:gnc-name acct-info))
(existing-account (hash-ref gnc-acct-hash gnc-name))
(same-gnc-account
- (gnc:get-account-from-full-name old-group gnc-name))
+ (xaccGetAccountFromFullName old-group gnc-name))
(allowed-types
(qif-map-entry:allowed-types acct-info))
(make-new-acct #f)
(incompatible-acct #f))
(define (compatible? account)
- (let ((acc-type (gnc:account-get-type account))
- (acc-commodity (gnc:account-get-commodity account)))
+ (let ((acc-type (xaccAccountGetType account))
+ (acc-commodity (xaccAccountGetCommodity account)))
(and
(if check-types?
(and (list? allowed-types)
(memv acc-type allowed-types))
#t)
(if check-commodity?
- (gnc:commodity-equiv? acc-commodity commodity)
+ (gnc-commodity-equiv acc-commodity commodity)
#t))))
(define (make-unique-name-variant long-name short-name)
- (if (gnc:get-account-from-full-name old-group long-name)
+ (if (xaccGetAccountFromFullName old-group long-name)
(let loop ((count 2))
(let* ((test-name
(string-append long-name (sprintf #f " %a" count)))
(test-acct
- (gnc:get-account-from-full-name old-group test-name)))
+ (xaccGetAccountFromFullName old-group test-name)))
(if (and test-acct (not (compatible? test-acct)))
(loop (+ 1 count))
(string-append short-name (sprintf #f " %a" count)))))
@@ -61,7 +61,7 @@
(set! make-new-acct #f)
(set! incompatible-acct #f)
(set! allowed-types
- (list (gnc:account-get-type same-gnc-account))))
+ (list (xaccAccountGetType same-gnc-account))))
(begin
;; there's an existing account with that name, so we
;; have to make a new acct with different properties and
@@ -79,32 +79,32 @@
;; acct)
(if (and existing-account (compatible? existing-account))
existing-account
- (let ((new-acct (gnc:malloc-account (gnc:get-current-book)))
+ (let ((new-acct (xaccMallocAccount (gnc-get-current-book)))
(parent-acct #f)
(parent-name #f)
(acct-name #f)
(last-colon #f))
(set! last-colon (string-rindex gnc-name separator))
- (gnc:account-begin-edit new-acct)
+ (xaccAccountBeginEdit new-acct)
;; if this is a copy of an existing gnc account, copy the
;; account properties. For incompatible existing accts,
;; we'll do something different later.
(if same-gnc-account
(begin
- (gnc:account-set-name
- new-acct (gnc:account-get-name same-gnc-account))
- (gnc:account-set-description
- new-acct (gnc:account-get-description same-gnc-account))
- (gnc:account-set-type
- new-acct (gnc:account-get-type same-gnc-account))
- (gnc:account-set-commodity
- new-acct (gnc:account-get-commodity same-gnc-account))
- (gnc:account-set-notes
- new-acct (gnc:account-get-notes same-gnc-account))
- (gnc:account-set-code
- new-acct (gnc:account-get-code same-gnc-account))))
+ (xaccAccountSetName
+ new-acct (xaccAccountGetName same-gnc-account))
+ (xaccAccountSetDescription
+ new-acct (xaccAccountGetDescription same-gnc-account))
+ (xaccAccountSetType
+ new-acct (xaccAccountGetType same-gnc-account))
+ (xaccAccountSetCommodity
+ new-acct (xaccAccountGetCommodity same-gnc-account))
+ (xaccAccountSetNotes
+ new-acct (xaccAccountGetNotes same-gnc-account))
+ (xaccAccountSetCode
+ new-acct (xaccAccountGetCode same-gnc-account))))
;; make sure that if this is a nested account foo:bar:baz,
;; foo:bar and foo exist also.
@@ -121,11 +121,11 @@
(if make-new-acct
(begin
;; set the name, description, etc.
- (gnc:account-set-name new-acct acct-name)
+ (xaccAccountSetName new-acct acct-name)
(if (qif-map-entry:description acct-info)
- (gnc:account-set-description
+ (xaccAccountSetDescription
new-acct (qif-map-entry:description acct-info)))
- (gnc:account-set-commodity new-acct commodity)
+ (xaccAccountSetCommodity new-acct commodity)
;; if it's an incompatible account, set the
;; name to be unique, and a description that
@@ -133,23 +133,23 @@
(if incompatible-acct
(let ((new-name (make-unique-name-variant
gnc-name acct-name)))
- (gnc:account-set-name new-acct new-name)
- (gnc:account-set-description
+ (xaccAccountSetName new-acct new-name)
+ (xaccAccountSetDescription
new-acct
(_ "QIF import: Name conflict with another account."))))
;; set the account type. this could be smarter.
(if (qif-map-entry:allowed-types acct-info)
- (gnc:account-set-type
+ (xaccAccountSetType
new-acct (car (qif-map-entry:allowed-types acct-info))))))
- (gnc:account-commit-edit new-acct)
+ (xaccAccountCommitEdit new-acct)
(if last-colon
(let ((pinfo (make-qif-map-entry)))
(qif-map-entry:set-qif-name! pinfo parent-name)
(qif-map-entry:set-gnc-name! pinfo parent-name)
(qif-map-entry:set-allowed-types!
- acct-info (list (gnc:account-get-type new-acct)))
+ acct-info (list (xaccAccountGetType new-acct)))
(qif-map-entry:set-allowed-types!
pinfo (qif-map-entry:allowed-parent-types acct-info))
@@ -157,8 +157,8 @@
pinfo #t default-currency #f default-currency
gnc-acct-hash old-group new-group))))
(if parent-acct
- (gnc:account-insert-subaccount parent-acct new-acct)
- (gnc:group-insert-account new-group new-acct))
+ (xaccAccountInsertSubAccount parent-acct new-acct)
+ (xaccGroupInsertAccount new-group new-acct))
(hash-set! gnc-acct-hash gnc-name new-acct)
new-acct))))
@@ -177,13 +177,13 @@
default-currency-name window)
(gnc:backtrace-if-exception
(lambda ()
- (let* ((old-group (gnc:get-current-group))
- (new-group (gnc:malloc-account-group (gnc:get-current-book)))
+ (let* ((old-group (gnc-get-current-group))
+ (new-group (xaccMallocAccountGroup (gnc-get-current-book)))
(gnc-acct-hash (make-hash-table 20))
- (separator (string-ref (gnc:account-separator-string) 0))
+ (separator (string-ref (gnc-get-account-separator-string) 0))
(default-currency
- (gnc:commodity-table-find-full
- (gnc:book-get-commodity-table (gnc:get-current-book))
+ (gnc-commodity-table-find-full
+ (gnc-commodity-table-get-table (gnc-get-current-book))
GNC_COMMODITY_NS_CURRENCY default-currency-name))
(sorted-accounts-list '())
(markable-xtns '())
@@ -267,7 +267,7 @@
gnc-acct-hash
old-group new-group))
((and security (or stock?
- (gnc:commodity-is-currency? security)))
+ (gnc-commodity-is-currency security)))
(qif-import:find-or-make-acct
acctinfo #f security #t default-currency
gnc-acct-hash old-group new-group))
@@ -296,9 +296,9 @@
(if (> work-to-do 100)
(begin
- (set! progress-dialog (gnc:progress-dialog-new window #f))
- (gnc:progress-dialog-set-title progress-dialog (_ "Progress"))
- (gnc:progress-dialog-set-heading progress-dialog
+ (set! progress-dialog (gnc-progress-dialog-new window #f))
+ (gnc-progress-dialog-set-title progress-dialog (_ "Progress"))
+ (gnc-progress-dialog-set-heading progress-dialog
(_ "Importing transactions..."))))
@@ -310,9 +310,9 @@
(set! work-done (+ 1 work-done))
(if progress-dialog
(begin
- (gnc:progress-dialog-set-value
+ (gnc-progress-dialog-set-value
progress-dialog (/ work-done work-to-do))
- (gnc:progress-dialog-update progress-dialog)))
+ (gnc-progress-dialog-update progress-dialog)))
(if (not (qif-xtn:mark xtn))
(qif-import:mark-matching-xtns xtn rest))
(if (not (null? (cdr rest)))
@@ -327,19 +327,19 @@
(set! work-done (+ 1 work-done))
(if progress-dialog
(begin
- (gnc:progress-dialog-set-value
+ (gnc-progress-dialog-set-value
progress-dialog (/ work-done work-to-do))
- (gnc:progress-dialog-update progress-dialog)))
+ (gnc-progress-dialog-update progress-dialog)))
(if (not (qif-xtn:mark xtn))
(begin
;; create and fill in the GNC transaction
- (let ((gnc-xtn (gnc:transaction-create
- (gnc:get-current-book))))
- (gnc:transaction-begin-edit gnc-xtn)
+ (let ((gnc-xtn (xaccMallocTransaction
+ (gnc-get-current-book))))
+ (xaccTransBeginEdit gnc-xtn)
;; FIXME. This is probably wrong
- (gnc:transaction-set-currency gnc-xtn
- (gnc:default-currency))
+ (xaccTransSetCurrency gnc-xtn
+ (gnc-default-currency))
;; build the transaction
(qif-import:qif-xtn-to-gnc-xtn
@@ -347,13 +347,13 @@
qif-acct-map qif-cat-map qif-memo-map)
;; rebalance and commit everything
- (gnc:transaction-commit-edit gnc-xtn)))))
+ (xaccTransCommitEdit gnc-xtn)))))
(qif-file:xtns qif-file)))
sorted-qif-files-list)
;; get rid of the progress dialog
(if progress-dialog
- (gnc:progress-dialog-destroy progress-dialog))
+ (gnc-progress-dialog-destroy progress-dialog))
new-group))))
@@ -367,8 +367,8 @@
gnc-acct-hash
qif-acct-map qif-cat-map qif-memo-map)
(let ((splits (qif-xtn:splits qif-xtn))
- (gnc-near-split (gnc:split-create (gnc:get-current-book)))
- (near-split-total (gnc:numeric-zero))
+ (gnc-near-split (xaccMallocSplit (gnc-get-current-book)))
+ (near-split-total (gnc-numeric-zero))
(near-acct-info #f)
(near-acct-name #f)
(near-acct #f)
@@ -379,31 +379,31 @@
(qif-memo (qif-split:memo (car (qif-xtn:splits qif-xtn))))
(qif-from-acct (qif-xtn:from-acct qif-xtn))
(qif-cleared (qif-xtn:cleared qif-xtn))
- (n- (lambda (n) (gnc:numeric-neg n)))
- (nsub (lambda (a b) (gnc:numeric-sub a b 0 GNC-DENOM-LCD)))
- (n+ (lambda (a b) (gnc:numeric-add a b 0 GNC-DENOM-LCD)))
- (n* (lambda (a b) (gnc:numeric-mul a b 0 GNC-DENOM-REDUCE)))
- (n/ (lambda (a b) (gnc:numeric-div a b 0 GNC-DENOM-REDUCE))))
+ (n- (lambda (n) (gnc-numeric-neg n)))
+ (nsub (lambda (a b) (gnc-numeric-sub a b 0 GNC-DENOM-LCD)))
+ (n+ (lambda (a b) (gnc-numeric-add a b 0 GNC-DENOM-LCD)))
+ (n* (lambda (a b) (gnc-numeric-mul a b 0 GNC-DENOM-REDUCE)))
+ (n/ (lambda (a b) (gnc-numeric-div a b 0 GNC-DENOM-REDUCE))))
;; set properties of the whole transaction
- (apply gnc:transaction-set-date gnc-xtn (qif-xtn:date qif-xtn))
+ (apply xaccTransSetDate gnc-xtn (qif-xtn:date qif-xtn))
;; fixme: bug #105
(if qif-payee
- (gnc:transaction-set-description gnc-xtn qif-payee))
+ (xaccTransactionSetDescription gnc-xtn qif-payee))
(if qif-number
- (gnc:transaction-set-xnum gnc-xtn qif-number))
+ (xaccTransSetNum gnc-xtn qif-number))
(if qif-memo
(begin
- (gnc:split-set-memo gnc-near-split qif-memo)
+ (xaccSplitSetMemo gnc-near-split qif-memo)
(if (or (not qif-payee)
(equal? qif-payee ""))
- (gnc:transaction-set-description gnc-xtn qif-memo))))
+ (xaccTransactionSetDescription gnc-xtn qif-memo))))
(if (eq? qif-cleared 'cleared)
- (gnc:split-set-reconcile gnc-near-split #\c))
+ (xaccSplitSetReconcile gnc-near-split #\c))
(if (eq? qif-cleared 'reconciled)
- (gnc:split-set-reconcile gnc-near-split #\y))
+ (xaccSplitSetReconcile gnc-near-split #\y))
(if (not qif-security)
(begin
@@ -420,8 +420,8 @@
(for-each
(lambda (qif-split)
(if (not (qif-split:mark qif-split))
- (let ((gnc-far-split (gnc:split-create
- (gnc:get-current-book)))
+ (let ((gnc-far-split (xaccMallocSplit
+ (gnc-get-current-book)))
(far-acct-info #f)
(far-acct-name #f)
(far-acct-type #f)
@@ -430,15 +430,15 @@
(memo (qif-split:memo qif-split))
(cat (qif-split:category qif-split)))
- (if (not split-amt) (set! split-amt (gnc:numeric-zero)))
+ (if (not split-amt) (set! split-amt (gnc-numeric-zero)))
;; fill the splits in (near first). This handles
;; files in multiple currencies by pulling the
;; currency value from the file import.
(set! near-split-total (n+ near-split-total split-amt))
- (gnc:split-set-value gnc-far-split (n- split-amt))
- (gnc:split-set-amount gnc-far-split (n- split-amt))
+ (xaccSplitSetValue gnc-far-split (n- split-amt))
+ (xaccSplitSetAmount gnc-far-split (n- split-amt))
- (if memo (gnc:split-set-memo gnc-far-split memo))
+ (if memo (xaccSplitSetMemo gnc-far-split memo))
;; figure out what the far acct is
(cond
@@ -475,20 +475,20 @@
;; set the reconcile status.
(let ((cleared (qif-split:matching-cleared qif-split)))
(if (eq? 'cleared cleared)
- (gnc:split-set-reconcile gnc-far-split #\c))
+ (xaccSplitSetReconcile gnc-far-split #\c))
(if (eq? 'reconciled cleared)
- (gnc:split-set-reconcile gnc-far-split #\y)))
+ (xaccSplitSetReconcile gnc-far-split #\y)))
;; finally, plug the split into the account
- (gnc:account-insert-split far-acct gnc-far-split)
- (gnc:transaction-append-split gnc-xtn gnc-far-split))))
+ (xaccSplitSetAccount far-acct gnc-far-split)
+ (xaccTransAppendSplit gnc-xtn gnc-far-split))))
splits)
;; the value of the near split is the total of the far splits.
- (gnc:split-set-value gnc-near-split near-split-total)
- (gnc:split-set-amount gnc-near-split near-split-total)
- (gnc:transaction-append-split gnc-xtn gnc-near-split)
- (gnc:account-insert-split near-acct gnc-near-split))
+ (xaccSplitSetValue gnc-near-split near-split-total)
+ (xaccSplitSetAmount gnc-near-split near-split-total)
+ (xaccTransAppendSplit gnc-xtn gnc-near-split)
+ (xaccSplitSetAccount near-acct gnc-near-split))
;; STOCK TRANSACTIONS: the near/far accounts depend on the
;; "action" encoded in the Number field. It's generally the
@@ -509,10 +509,10 @@
(commission-amt (qif-xtn:commission qif-xtn))
(commission-split #f)
(defer-share-price #f)
- (gnc-far-split (gnc:split-create (gnc:get-current-book))))
+ (gnc-far-split (xaccMallocSplit (gnc-get-current-book))))
- (if (not num-shares) (set! num-shares (gnc:numeric-zero)))
- (if (not share-price) (set! share-price (gnc:numeric-zero)))
+ (if (not num-shares) (set! num-shares (gnc-numeric-zero)))
+ (if (not share-price) (set! share-price (gnc-numeric-zero)))
(if (not split-amt) (set! split-amt (n* num-shares share-price)))
;; I don't think this should ever happen, but I want
@@ -549,46 +549,46 @@
;; are amounts currency or shares?
(case qif-action
((buy buyx reinvint reinvdiv reinvsg reinvsh reinvmd reinvlg)
- (if (not share-price) (set! share-price (gnc:numeric-zero)))
- (gnc:split-set-amount gnc-near-split num-shares)
- (gnc:split-set-value gnc-near-split split-amt)
- (gnc:split-set-value gnc-far-split (n- xtn-amt))
- (gnc:split-set-amount gnc-far-split (n- xtn-amt)))
+ (if (not share-price) (set! share-price (gnc-numeric-zero)))
+ (xaccSplitSetAmount gnc-near-split num-shares)
+ (xaccSplitSetValue gnc-near-split split-amt)
+ (xaccSplitSetValue gnc-far-split (n- xtn-amt))
+ (xaccSplitSetAmount gnc-far-split (n- xtn-amt)))
((sell sellx)
- (if (not share-price) (set! share-price (gnc:numeric-zero)))
- (gnc:split-set-amount gnc-near-split (n- num-shares))
- (gnc:split-set-value gnc-near-split (n- split-amt))
- (gnc:split-set-value gnc-far-split xtn-amt)
- (gnc:split-set-amount gnc-far-split xtn-amt))
+ (if (not share-price) (set! share-price (gnc-numeric-zero)))
+ (xaccSplitSetAmount gnc-near-split (n- num-shares))
+ (xaccSplitSetValue gnc-near-split (n- split-amt))
+ (xaccSplitSetValue gnc-far-split xtn-amt)
+ (xaccSplitSetAmount gnc-far-split xtn-amt))
((cgshort cgshortx cgmid cgmidx cglong cglongx intinc intincx
div divx miscinc miscincx xin rtrncap rtrncapx)
- (gnc:split-set-value gnc-near-split xtn-amt)
- (gnc:split-set-amount gnc-near-split xtn-amt)
- (gnc:split-set-value gnc-far-split (n- xtn-amt))
- (gnc:split-set-amount gnc-far-split (n- xtn-amt)))
+ (xaccSplitSetValue gnc-near-split xtn-amt)
+ (xaccSplitSetAmount gnc-near-split xtn-amt)
+ (xaccSplitSetValue gnc-far-split (n- xtn-amt))
+ (xaccSplitSetAmount gnc-far-split (n- xtn-amt)))
((xout miscexp miscexpx margint margintx)
- (gnc:split-set-value gnc-near-split (n- xtn-amt))
- (gnc:split-set-amount gnc-near-split (n- xtn-amt))
- (gnc:split-set-value gnc-far-split xtn-amt)
- (gnc:split-set-amount gnc-far-split xtn-amt))
+ (xaccSplitSetValue gnc-near-split (n- xtn-amt))
+ (xaccSplitSetAmount gnc-near-split (n- xtn-amt))
+ (xaccSplitSetValue gnc-far-split xtn-amt)
+ (xaccSplitSetAmount gnc-far-split xtn-amt))
((shrsin)
;; getting rid of the old equity-acct-per-stock trick.
;; you must now have a cash/basis value for the stock.
- (gnc:split-set-amount gnc-near-split num-shares)
- (gnc:split-set-value gnc-near-split split-amt)
- (gnc:split-set-value gnc-far-split (n- xtn-amt))
- (gnc:split-set-amount gnc-far-split (n- xtn-amt)))
+ (xaccSplitSetAmount gnc-near-split num-shares)
+ (xaccSplitSetValue gnc-near-split split-amt)
+ (xaccSplitSetValue gnc-far-split (n- xtn-amt))
+ (xaccSplitSetAmount gnc-far-split (n- xtn-amt)))
((shrsout)
;; shrsout is like shrsin
- (gnc:split-set-amount gnc-near-split (n- num-shares))
- (gnc:split-set-value gnc-near-split (n- split-amt))
- (gnc:split-set-value gnc-far-split xtn-amt)
- (gnc:split-set-amount gnc-far-split xtn-amt))
+ (xaccSplitSetAmount gnc-near-split (n- num-shares))
+ (xaccSplitSetValue gnc-near-split (n- split-amt))
+ (xaccSplitSetValue gnc-far-split xtn-amt)
+ (xaccSplitSetAmount gnc-far-split xtn-amt))
;; stock splits: QIF just specifies the split ratio, not
;; the number of shares in and out, so we have to fetch
@@ -597,21 +597,21 @@
;; FIXME : this could be wrong. Make sure the
;; share-amount is at the correct time.
((stksplit)
- (let* ((splitratio (n/ num-shares (gnc:numeric-create 10 1)))
+ (let* ((splitratio (n/ num-shares (gnc-numeric-create 10 1)))
(in-shares
- (gnc:account-get-balance near-acct))
+ (xaccAccountGetBalance near-acct))
(out-shares (n* in-shares splitratio)))
- (gnc:split-set-amount gnc-near-split out-shares)
- (gnc:split-set-amount gnc-far-split (n- in-shares))
- (gnc:split-set-value gnc-near-split (n- split-amt))
- (gnc:split-set-value gnc-far-split split-amt))))
+ (xaccSplitSetAmount gnc-near-split out-shares)
+ (xaccSplitSetAmount gnc-far-split (n- in-shares))
+ (xaccSplitSetValue gnc-near-split (n- split-amt))
+ (xaccSplitSetValue gnc-far-split split-amt))))
(let ((cleared (qif-split:matching-cleared
(car (qif-xtn:splits qif-xtn)))))
(if (eq? 'cleared cleared)
- (gnc:split-set-reconcile gnc-far-split #\c))
+ (xaccSplitSetReconcile gnc-far-split #\c))
(if (eq? 'reconciled cleared)
- (gnc:split-set-reconcile gnc-far-split #\y)))
+ (xaccSplitSetReconcile gnc-far-split #\y)))
(if qif-commission-acct
(let* ((commission-acct-info
@@ -624,23 +624,23 @@
(if (and commission-amt commission-acct)
(begin
- (set! commission-split (gnc:split-create
- (gnc:get-current-book)))
- (gnc:split-set-value commission-split commission-amt)
- (gnc:split-set-amount commission-split commission-amt)))
+ (set! commission-split (xaccMallocSplit
+ (gnc-get-current-book)))
+ (xaccSplitSetValue commission-split commission-amt)
+ (xaccSplitSetAmount commission-split commission-amt)))
(if (and qif-near-acct qif-far-acct)
(begin
- (gnc:transaction-append-split gnc-xtn gnc-near-split)
- (gnc:account-insert-split near-acct gnc-near-split)
+ (xaccTransAppendSplit gnc-xtn gnc-near-split)
+ (xaccSplitSetAccount near-acct gnc-near-split)
- (gnc:transaction-append-split gnc-xtn gnc-far-split)
- (gnc:account-insert-split far-acct gnc-far-split)
+ (xaccTransAppendSplit gnc-xtn gnc-far-split)
+ (xaccSplitSetAccount far-acct gnc-far-split)
(if commission-split
(begin
- (gnc:transaction-append-split gnc-xtn commission-split)
- (gnc:account-insert-split commission-acct
+ (xaccTransAppendSplit gnc-xtn commission-split)
+ (xaccSplitSetAccount commission-acct
commission-split)))))))
;; return the modified transaction (though it's ignored).
gnc-xtn))
@@ -678,11 +678,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (qif-import:mark-some-splits splits xtn candidate-xtns)
- (let* ((n- (lambda (n) (gnc:numeric-neg n)))
- (nsub (lambda (a b) (gnc:numeric-sub a b 0 GNC-DENOM-LCD)))
- (n+ (lambda (a b) (gnc:numeric-add a b 0 GNC-DENOM-LCD)))
- (n* (lambda (a b) (gnc:numeric-mul a b 0 GNC-DENOM-REDUCE)))
- (n/ (lambda (a b) (gnc:numeric-div a b 0 GNC-DENOM-REDUCE)))
+ (let* ((n- (lambda (n) (gnc-numeric-neg n)))
+ (nsub (lambda (a b) (gnc-numeric-sub a b 0 GNC-DENOM-LCD)))
+ (n+ (lambda (a b) (gnc-numeric-add a b 0 GNC-DENOM-LCD)))
+ (n* (lambda (a b) (gnc-numeric-mul a b 0 GNC-DENOM-REDUCE)))
+ (n/ (lambda (a b) (gnc-numeric-div a b 0 GNC-DENOM-REDUCE)))
(split (car splits))
(near-acct-name #f)
(far-acct-name #f)
@@ -703,7 +703,7 @@
(begin
(set! near-acct-name (qif-xtn:from-acct xtn))
(set! far-acct-name (qif-split:category split))
- (set! group-amount (gnc:numeric-zero))
+ (set! group-amount (gnc-numeric-zero))
;; group-amount is the sum of all the splits in this xtn
;; going to the same account as 'split'. We might be able
@@ -789,7 +789,7 @@
(define (qif-import:xtn-has-matches? xtn acct-name date amount group-amt)
(let ((matching-splits '())
(same-acct-splits '())
- (this-group-amt (gnc:numeric-zero))
+ (this-group-amt (gnc-numeric-zero))
(how #f)
(date-matches
(let ((self-date (qif-xtn:date xtn)))
@@ -800,11 +800,11 @@
(= (car self-date) (car date))
(= (cadr self-date) (cadr date))
(= (caddr self-date) (caddr date)))))
- (n- (lambda (n) (gnc:numeric-neg n)))
- (nsub (lambda (a b) (gnc:numeric-sub a b 0 GNC-DENOM-LCD)))
- (n+ (lambda (a b) (gnc:numeric-add a b 0 GNC-DENOM-LCD)))
- (n* (lambda (a b) (gnc:numeric-mul a b 0 GNC-DENOM-REDUCE)))
- (n/ (lambda (a b) (gnc:numeric-div a b 0 GNC-DENOM-REDUCE))))
+ (n- (lambda (n) (gnc-numeric-neg n)))
+ (nsub (lambda (a b) (gnc-numeric-sub a b 0 GNC-DENOM-LCD)))
+ (n+ (lambda (a b) (gnc-numeric-add a b 0 GNC-DENOM-LCD)))
+ (n* (lambda (a b) (gnc-numeric-mul a b 0 GNC-DENOM-REDUCE)))
+ (n/ (lambda (a b) (gnc-numeric-div a b 0 GNC-DENOM-REDUCE))))
(if date-matches
(begin
@@ -831,10 +831,10 @@
;; we might be done if this-amt is either equal
;; to the split amount or the group amount.
(cond
- ((gnc:numeric-equal this-amt amount)
+ ((gnc-numeric-equal this-amt amount)
(set! how
(cons 'one-to-one (list split))))
- ((and group-amt (gnc:numeric-equal this-amt group-amt))
+ ((and group-amt (gnc-numeric-equal this-amt group-amt))
(set! how
(cons 'one-to-many (list split))))
(#t
@@ -850,7 +850,7 @@
;; now we're out of the loop. if 'how' isn't set,
;; we can still have a many-to-one match.
(if (and (not how)
- (gnc:numeric-equal this-group-amt amount))
+ (gnc-numeric-equal this-group-amt amount))
(begin
(set! how
(cons 'many-to-one same-acct-splits))))))
Modified: gnucash/trunk/src/import-export/qif-io-core/qif-acct-table.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-io-core/qif-acct-table.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-io-core/qif-acct-table.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -49,7 +49,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (qif-io:acct-table-make-gnc-group acct-table qif-file commodity)
- (let ((group (gnc:malloc-account-group (gnc:get-current-book))))
+ (let ((group (xaccMallocAccountGroup (gnc-get-current-book))))
;; poke through the qif-file accounts to see if any of them
;; show up in the data
(let ((qif-acct-table (qif-io:acct-table-accounts acct-table)))
@@ -61,27 +61,27 @@
(gnc-acct (hash-ref qif-acct-table name)))
(if gnc-acct
(let ((gnc-type (qif-io:parse-acct-type type)))
- (gnc:account-begin-edit gnc-acct)
+ (xaccAccountBeginEdit gnc-acct)
(if gnc-type
- (gnc:account-set-type gnc-acct gnc-type)
- (gnc:account-set-type gnc-acct GNC-BANK-TYPE))
+ (xaccAccountSetType gnc-acct gnc-type)
+ (xaccAccountSetType gnc-acct GNC-BANK-TYPE))
(if desc
- (gnc:account-set-description gnc-acct desc))
- (gnc:account-commit-edit gnc-acct)))))
+ (xaccAccountSetDescription gnc-acct desc))
+ (xaccAccountCommitEdit gnc-acct)))))
(qif-io:file-accounts qif-file))
(hash-fold
(lambda (name acct p)
- (let ((cmdty (gnc:account-get-commodity acct)))
+ (let ((cmdty (xaccAccountGetCommodity acct)))
(if (not cmdty)
(begin
- (gnc:account-begin-edit acct)
- (gnc:account-set-commodity acct commodity)
- (gnc:account-commit-edit acct))))
- (let ((type (gnc:account-get-type acct)))
+ (xaccAccountBeginEdit acct)
+ (xaccAccountSetCommodity acct commodity)
+ (xaccAccountCommitEdit acct))))
+ (let ((type (xaccAccountGetType acct)))
(if (= type -1)
- (gnc:account-set-type acct GNC-BANK-TYPE)))
- (gnc:group-insert-account group acct)
+ (xaccAccountSetType acct GNC-BANK-TYPE)))
+ (xaccGroupInsertAccount group acct)
#t) #t (qif-io:acct-table-accounts acct-table)))
;; now the categories
@@ -96,27 +96,27 @@
(gnc-acct (hash-ref qif-cat-table name)))
(if gnc-acct
(begin
- (gnc:account-begin-edit gnc-acct)
+ (xaccAccountBeginEdit gnc-acct)
(cond (income?
- (gnc:account-set-type gnc-acct GNC-INCOME-TYPE))
+ (xaccAccountSetType gnc-acct GNC-INCOME-TYPE))
(#t
- (gnc:account-set-type gnc-acct GNC-EXPENSE-TYPE)))
- (gnc:account-set-description gnc-acct desc)
- (gnc:account-commit-edit gnc-acct)))))
+ (xaccAccountSetType gnc-acct GNC-EXPENSE-TYPE)))
+ (xaccAccountSetDescription gnc-acct desc)
+ (xaccAccountCommitEdit gnc-acct)))))
(qif-io:file-categories qif-file))
(hash-fold
(lambda (name acct p)
- (let ((cmdty (gnc:account-get-commodity acct)))
+ (let ((cmdty (xaccAccountGetCommodity acct)))
(if (not cmdty)
(begin
- (gnc:account-begin-edit acct)
- (gnc:account-set-commodity acct commodity)
- (gnc:account-commit-edit acct))))
- (let ((type (gnc:account-get-type acct)))
+ (xaccAccountBeginEdit acct)
+ (xaccAccountSetCommodity acct commodity)
+ (xaccAccountCommitEdit acct))))
+ (let ((type (xaccAccountGetType acct)))
(if (= type -1)
- (gnc:account-set-type acct GNC-EXPENSE-TYPE)))
- (gnc:group-insert-account group acct)
+ (xaccAccountSetType acct GNC-EXPENSE-TYPE)))
+ (xaccGroupInsertAccount group acct)
#t) #t (qif-io:acct-table-categories acct-table)))
;; the securities
Modified: gnucash/trunk/src/import-export/qif-io-core/qif-bank-xtn-import.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-io-core/qif-bank-xtn-import.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-io-core/qif-bank-xtn-import.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -35,7 +35,7 @@
(define (qif-io:bank-xtn-import qif-xtn qif-file gnc-acct-info commodity)
(let* ((format-info
(qif-io:file-bank-xtn-format qif-file))
- (gnc-xtn (gnc:transaction-create (gnc:get-current-book)))
+ (gnc-xtn (xaccMallocTransaction (gnc-get-current-book)))
(near-split-amt
;; the u-amount has a larger range and is more correct,
;; but is optional
@@ -54,40 +54,40 @@
(acct-type (cdr acct-info))
(acct (qif-io:acct-table-lookup
gnc-acct-info acct-name acct-type))
- (split (gnc:split-create (gnc:get-current-book))))
+ (split (xaccMallocSplit (gnc-get-current-book))))
;; make the account if necessary
(if (not acct)
(begin
- (set! acct (gnc:malloc-account (gnc:get-current-book)))
- (gnc:account-begin-edit acct)
- (gnc:account-set-name acct acct-name)
- (gnc:account-commit-edit acct)
+ (set! acct (xaccMallocAccount (gnc-get-current-book)))
+ (xaccAccountBeginEdit acct)
+ (xaccAccountSetName acct acct-name)
+ (xaccAccountCommitEdit acct)
(qif-io:acct-table-insert! gnc-acct-info
acct-name acct-type acct)))
;; fill in the split
- (gnc:split-set-amount split amount)
- (gnc:split-set-value split amount)
- (gnc:split-set-memo split memo)
- (gnc:split-set-reconcile split reconcile)
+ (xaccSplitSetAmount split amount)
+ (xaccSplitSetValue split amount)
+ (xaccSplitSetMemo split memo)
+ (xaccSplitSetReconcile split reconcile)
;; add it to the account and the transaction
- (gnc:account-begin-edit acct)
- (gnc:account-insert-split acct split)
- (gnc:account-commit-edit acct)
- (gnc:transaction-append-split gnc-xtn split)
+ (xaccAccountBeginEdit acct)
+ (xaccSplitSetAccount acct split)
+ (xaccAccountCommitEdit acct)
+ (xaccTransAppendSplit gnc-xtn split)
split))
- (gnc:transaction-begin-edit gnc-xtn)
- (gnc:transaction-set-currency gnc-xtn commodity)
+ (xaccTransBeginEdit gnc-xtn)
+ (xaccTransSetCurrency gnc-xtn commodity)
;; set the transaction date, number and description
(let ((date (qif-io:parse-date/format
(qif-io:bank-xtn-date qif-xtn)
(qif-io:bank-xtn-date format-info))))
- (apply gnc:transaction-set-date gnc-xtn date))
+ (apply xaccTransSetDate gnc-xtn date))
- (gnc:transaction-set-xnum gnc-xtn (qif-io:bank-xtn-number qif-xtn))
- (gnc:transaction-set-description gnc-xtn (qif-io:bank-xtn-payee qif-xtn))
+ (xaccTransSetNum gnc-xtn (qif-io:bank-xtn-number qif-xtn))
+ (xaccTransactionSetDescription gnc-xtn (qif-io:bank-xtn-payee qif-xtn))
;; create the near split (the one that goes to the source-acct)
(let* ((near-acct-name (qif-io:bank-xtn-source-acct qif-xtn)))
@@ -114,7 +114,7 @@
(if parsed-cat (list-ref parsed-cat 1) #f)))
(add-split (cons acct-name
(if acct-is-acct 'account 'category))
- (gnc:numeric-neg near-split-amt)
+ (gnc-numeric-neg near-split-amt)
(qif-io:bank-xtn-memo qif-xtn) #\n))
;; split case: iterate over a list of qif splits and make a
@@ -136,11 +136,11 @@
(qif-io:split-amount split) amt-format)))
(add-split (cons acct-name
(if acct-is-acct 'account 'category))
- (gnc:numeric-neg amount)
+ (gnc-numeric-neg amount)
(qif-io:split-memo split) #\n)))
qif-splits))))
;; we're done.
- (gnc:transaction-commit-edit gnc-xtn)
+ (xaccTransCommitEdit gnc-xtn)
gnc-xtn))
Modified: gnucash/trunk/src/import-export/qif-io-core/qif-format-check.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-io-core/qif-format-check.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-io-core/qif-format-check.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -143,14 +143,14 @@
(qif-io:bank-xtn-set-t-amount!
bank-formats
(check-field-formats
- qif-io:bank-xtn-t-amount gnc:numeric-equal
+ qif-io:bank-xtn-t-amount gnc-numeric-equal
qif-io:check-number-format '(decimal comma)
(qif-io:file-bank-xtns file)))
(qif-io:bank-xtn-set-u-amount!
bank-formats
(check-field-formats
- qif-io:bank-xtn-u-amount gnc:numeric-equal
+ qif-io:bank-xtn-u-amount gnc-numeric-equal
qif-io:check-number-format '(decimal comma)
(qif-io:file-bank-xtns file)))
@@ -162,7 +162,7 @@
(qif-io:split-set-amount!
split
(check-field-formats
- get-split-amounts gnc:numeric-equal
+ get-split-amounts gnc-numeric-equal
qif-io:check-multi-number-format '(decimal comma)
(qif-io:file-bank-xtns file)))
(qif-io:bank-xtn-set-splits! bank-formats (list split)))
@@ -182,42 +182,42 @@
(qif-io:invst-xtn-set-t-amount!
invst-formats
(check-field-formats
- qif-io:invst-xtn-t-amount gnc:numeric-equal
+ qif-io:invst-xtn-t-amount gnc-numeric-equal
qif-io:check-number-format '(decimal comma)
(qif-io:file-invst-xtns file)))
(qif-io:invst-xtn-set-u-amount!
invst-formats
(check-field-formats
- qif-io:invst-xtn-u-amount gnc:numeric-equal
+ qif-io:invst-xtn-u-amount gnc-numeric-equal
qif-io:check-number-format '(decimal comma)
(qif-io:file-invst-xtns file)))
(qif-io:invst-xtn-set-$-amount!
invst-formats
(check-field-formats
- qif-io:invst-xtn-$-amount gnc:numeric-equal
+ qif-io:invst-xtn-$-amount gnc-numeric-equal
qif-io:check-number-format '(decimal comma)
(qif-io:file-invst-xtns file)))
(qif-io:invst-xtn-set-share-amount!
invst-formats
(check-field-formats
- qif-io:invst-xtn-share-amount gnc:numeric-equal
+ qif-io:invst-xtn-share-amount gnc-numeric-equal
qif-io:check-number-format '(decimal comma)
(qif-io:file-invst-xtns file)))
(qif-io:invst-xtn-set-share-price!
invst-formats
(check-field-formats
- qif-io:invst-xtn-share-price gnc:numeric-equal
+ qif-io:invst-xtn-share-price gnc-numeric-equal
qif-io:check-number-format '(decimal comma)
(qif-io:file-invst-xtns file)))
(qif-io:invst-xtn-set-commission!
invst-formats
(check-field-formats
- qif-io:invst-xtn-commission gnc:numeric-equal
+ qif-io:invst-xtn-commission gnc-numeric-equal
qif-io:check-number-format '(decimal comma)
(qif-io:file-invst-xtns file)))
Modified: gnucash/trunk/src/import-export/qif-io-core/qif-invst-xtn-import.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-io-core/qif-invst-xtn-import.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-io-core/qif-invst-xtn-import.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -145,7 +145,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (qif-io:invst-xtn-import qif-xtn qif-file gnc-acct-info commodity)
- (let ((gnc-xtn (gnc:transaction-create (gnc:get-current-book)))
+ (let ((gnc-xtn (xaccMallocTransaction (gnc-get-current-book)))
(format-info (qif-io:file-invst-xtn-format qif-file)))
;; utility to make a new split and add it both to an
;; account and to the transaction
@@ -154,47 +154,47 @@
(acct-type (cdr acct-info))
(acct (qif-io:acct-table-lookup
gnc-acct-info acct-name acct-type))
- (split (gnc:split-create (gnc:get-current-book))))
+ (split (xaccMallocSplit (gnc-get-current-book))))
;; make the account if necessary
(if (not acct)
(begin
- (set! acct (gnc:malloc-account (gnc:get-current-book)))
- (gnc:account-set-name acct acct-name)
+ (set! acct (xaccMallocAccount (gnc-get-current-book)))
+ (xaccAccountSetName acct acct-name)
(qif-io:acct-table-insert! gnc-acct-info
acct-name acct-type acct)))
;; fill in the split
- (gnc:split-set-amount split amount)
- (gnc:split-set-value split value)
- (gnc:split-set-memo split memo)
- (gnc:split-set-reconcile split reconcile)
+ (xaccSplitSetAmount split amount)
+ (xaccSplitSetValue split value)
+ (xaccSplitSetMemo split memo)
+ (xaccSplitSetReconcile split reconcile)
;; add it to the account and the transaction
- (gnc:account-begin-edit acct)
- (gnc:account-insert-split acct split)
- (gnc:account-commit-edit acct)
- (gnc:transaction-append-split gnc-xtn split)
+ (xaccAccountBeginEdit acct)
+ (xaccSplitSetAccount acct split)
+ (xaccAccountCommitEdit acct)
+ (xaccTransAppendSplit gnc-xtn split)
split))
(define (lookup-balance acct-info)
(let ((acct (qif-io:acct-table-lookup gnc-acct-info
(car acct-info) (cdr acct-info))))
- (gnc:account-get-balance acct)))
+ (xaccAccountGetBalance acct)))
(if (not (qif-io:invst-xtn-source-acct qif-xtn))
(qif-io:invst-xtn-set-source-acct!
qif-xtn (qif-io:file-default-src-acct qif-file)))
- (gnc:transaction-begin-edit gnc-xtn)
- (gnc:transaction-set-currency gnc-xtn commodity)
+ (xaccTransBeginEdit gnc-xtn)
+ (xaccTransSetCurrency gnc-xtn commodity)
;; set the transaction date, number and description
(let ((date (qif-io:parse-date/format
(qif-io:invst-xtn-date qif-xtn)
(qif-io:invst-xtn-date format-info))))
- (apply gnc:transaction-set-date gnc-xtn date))
+ (apply xaccTransSetDate gnc-xtn date))
- (gnc:transaction-set-xnum gnc-xtn (qif-io:invst-xtn-action qif-xtn))
- (gnc:transaction-set-description gnc-xtn (qif-io:invst-xtn-payee qif-xtn))
+ (xaccTransSetNum gnc-xtn (qif-io:invst-xtn-action qif-xtn))
+ (xaccTransactionSetDescription gnc-xtn (qif-io:invst-xtn-payee qif-xtn))
;; get the relevant info, including 'near-acct' and 'far-acct',
;; the accounts affected by the transaction
@@ -232,13 +232,13 @@
($amt
(qif-io:parse-number/format
$amt (qif-io:invst-xtn-$-amount format-info)))
- (#t (gnc:numeric-zero)))))
+ (#t (gnc-numeric-zero)))))
(action-val
(if (and num-shares share-price)
- (gnc:numeric-mul num-shares share-price
- (gnc:numeric-denom total-val)
+ (gnc-numeric-mul num-shares share-price
+ (gnc-numeric-denom total-val)
GNC-RND-ROUND)
- (gnc:numeric-zero)))
+ (gnc-numeric-zero)))
(cleared
(qif-io:parse-cleared-field (qif-io:invst-xtn-cleared qif-xtn)))
(payee (qif-io:invst-xtn-payee qif-xtn))
@@ -250,7 +250,7 @@
(commission-acct
(cons (default-commission-acct
(qif-io:invst-xtn-source-acct qif-xtn)) 'brokerage))
- (n- (lambda (n) (gnc:numeric-neg n))))
+ (n- (lambda (n) (gnc-numeric-neg n))))
;; now build the splits. We have to switch on the action
;; again to get the signs of the amounts, and whether we use the
@@ -293,8 +293,8 @@
(add-split commission-acct commission-val commission-val
memo cleared)))
((stksplit)
- (let* ((splitratio (gnc:numeric-div
- num-shares (gnc:numeric-create 10 1)
+ (let* ((splitratio (gnc-numeric-div
+ num-shares (gnc-numeric-create 10 1)
GNC-DENOM-AUTO GNC-DENOM-REDUCE))
(in-shares (lookup-balance near-acct))
(out-shares (n* in-shares splitratio)))
@@ -303,7 +303,7 @@
(else
(throw 'qif-io:unhandled-action action))))
- (gnc:transaction-commit-edit gnc-xtn)
+ (xaccTransCommitEdit gnc-xtn)
gnc-xtn))
Modified: gnucash/trunk/src/import-export/qif-io-core/qif-parse.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-io-core/qif-parse.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-io-core/qif-parse.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -572,12 +572,12 @@
(with-input-from-string filtered-string
(lambda () (read)))))
(if (number? read-val)
- (gnc:double-to-gnc-numeric
+ (double-to-gnc-numeric
(+ 0.0 read-val) GNC-DENOM-AUTO
(logior (GNC-DENOM-SIGFIGS
(string-length (string-remove-char filtered-string #\.)))
GNC-RND-ROUND))
- (gnc:numeric-zero))))
+ (gnc-numeric-zero))))
((comma)
(let* ((filtered-string
(string-remove-char
@@ -589,21 +589,21 @@
(with-input-from-string filtered-string
(lambda () (read)))))
(if (number? read-val)
- (gnc:double-to-gnc-numeric
+ (double-to-gnc-numeric
(+ 0.0 read-val) GNC-DENOM-AUTO
(logior (GNC-DENOM-SIGFIGS
(string-length (string-remove-char filtered-string #\.)))
GNC-RND-ROUND))
- (gnc:numeric-zero))))
+ (gnc-numeric-zero))))
((integer)
(let ((read-val
(with-input-from-string
(string-remove-char value-string #\$)
(lambda () (read)))))
(if (number? read-val)
- (gnc:double-to-gnc-numeric
+ (double-to-gnc-numeric
(+ 0.0 read-val) 1 GNC-RND-ROUND)
- (gnc:numeric-zero))))
+ (gnc-numeric-zero))))
(else
(throw 'qif-io:arg-type 'qif-io:parse-number/format
'number-format format))))
Modified: gnucash/trunk/src/import-export/qif-io-core/test/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/qif-io-core/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-io-core/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -14,13 +14,11 @@
--gnc-module-dir ${top_builddir}/src/import-export/qif-io-core \
--guile-load-dir ${top_srcdir}/src/import-export/qif-io-core/test \
--guile-load-dir ${top_srcdir}/lib \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_builddir}/src/gnome-utils \
--guile-load-dir ${top_builddir}/src/gnome \
--guile-load-dir ${top_builddir}/src/scm \
--library-dir ${top_builddir}/src/gnome-utils \
- --library-dir ${top_srcdir}/src/gnome \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_srcdir}/src/gnome
TESTS_ENVIRONMENT := \
SRCDIR=${srcdir} \
Modified: gnucash/trunk/src/import-export/qif-io-core/test/test-import-phase-1.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-io-core/test/test-import-phase-1.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-io-core/test/test-import-phase-1.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -17,10 +17,10 @@
(let ((qiffile (qif-io:make-empty-file))
(acct-table (qif-io:make-empty-acct-table))
(session (gnc:get-current-session))
- (book (gnc:session-get-book session))
- (com-table (gnc:commodity-table-new)))
+ (book (qof-session-get-book session))
+ (com-table (gnc-commodity-table-new)))
- (gnc:commodity-table-add-default-data com-table book)
+ (gnc-commodity-table-add-default-data com-table book)
;; read the file and look at data formats. we need to do this
;; immediately when loading a file.
@@ -42,7 +42,7 @@
(if (qif-io:file-xtns-need-acct? qiffile)
(qif-io:file-set-default-src-acct! qiffile filename))
- (let ((commodity (gnc:commodity-table-lookup com-table "ISO4217" "USD")))
+ (let ((commodity (gnc-commodity-table-lookup com-table "ISO4217" "USD")))
;; import the bank transactions
(for-each
@@ -62,8 +62,8 @@
;; write the file
(let* ((name (simple-format #f "file:~A.gnc" filename)))
(simple-format #t "using book name='~A'\n" name)
- (gnc:group-concat-group (gnc:book-get-group book) group)
- (gnc:account-group-destroy group)
+ (xaccGroupConcatGroup (xaccGetAccountGroup book) group)
+ (xaccAccountGroupDestroy group)
(gnc:session-begin session name #t #t)
(gnc:session-save session)
(gnc:session-end session)
Modified: gnucash/trunk/src/import-export/qif-io-core/test/test-parser.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-io-core/test/test-parser.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/qif-io-core/test/test-parser.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -54,7 +54,7 @@
(let ((all-pass #t))
(define (parse-number/format num fmt)
(let* ((gncn (qif-io:parse-number/format num fmt))
- (nstr (gnc:numeric-to-string gncn)))
+ (nstr (gnc-numeric-to-string gncn)))
nstr))
;; test category reading
Modified: gnucash/trunk/src/import-export/test/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/import-export/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -37,8 +37,6 @@
--gnc-module-dir ${top_builddir}/src/network-utils \
--gnc-module-dir ${top_builddir}/src/gnome \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR} \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_builddir}/src/scm \
--guile-load-dir ${top_srcdir}/src/scm \
--guile-load-dir ${top_srcdir}/src/import-export
Modified: gnucash/trunk/src/network-utils/test/Makefile.am
===================================================================
--- gnucash/trunk/src/network-utils/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/network-utils/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -8,10 +8,8 @@
GNC_TEST_DEPS := \
--gnc-module-dir ${top_builddir}/src/gnc-module \
- --gnc-module-dir ${top_builddir}/src/network-utils \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR}
+ --gnc-module-dir ${top_builddir}/src/network-utils
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Modified: gnucash/trunk/src/optional/Makefile.am
===================================================================
--- gnucash/trunk/src/optional/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/optional/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,7 +1 @@
-
-# N.B. Do *not* specify swig in subdirs, we do *not* want the swig subdirs
-# built by default, since many folks may not have swig installed, and this
-# is, after all, optional. But do put them in the dist.
-
SUBDIRS = xsl
-DIST_SUBDIRS = swig xsl
Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -196,7 +196,7 @@
gnc_get_default_register_style (GNCAccountType type)
{
SplitRegisterStyle new_style = REG_STYLE_LEDGER;
- char *style_string;
+ gchar *style_string;
switch (type) {
#if 0
@@ -215,9 +215,9 @@
new_style = REG_STYLE_AUTO_LEDGER;
else
new_style = REG_STYLE_LEDGER;
-
+
if (style_string != NULL)
- free(style_string);
+ g_free(style_string);
break;
}
Modified: gnucash/trunk/src/register/register-core/Makefile.am
===================================================================
--- gnucash/trunk/src/register/register-core/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/register/register-core/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,7 +1,7 @@
SUBDIRS = . test
PWD := $(shell pwd)
-pkglib_LTLIBRARIES = libgncmod-register-core.la libgw-register-core.la
+pkglib_LTLIBRARIES = libgncmod-register-core.la
libgncmod_register_core_la_LIBADD = \
${top_builddir}/src/gnc-module/libgncmodule.la \
@@ -50,18 +50,6 @@
table-layout.h \
table-model.h
-nodist_libgw_register_core_la_SOURCES = gw-register-core.c
-libgw_register_core_la_LIBADD = \
- libgncmod-register-core.la \
- ${G_WRAP_LINK_ARGS}
-
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-register-core-spec.scm
-nodist_gwmod_DATA = gw-register-core.scm
-
-EXTRA_DIST = \
- ${gwmod_DATA}
-
AM_CFLAGS = \
-I${top_srcdir}/src \
-I${top_srcdir}/src/engine \
@@ -70,46 +58,8 @@
-I${top_srcdir}/src/gnome-utils \
${GUILE_INCS} \
${GLADE_CFLAGS} \
- ${G_WRAP_COMPILE_ARGS} \
${GNOME_CFLAGS} \
${QOF_CFLAGS} \
${GLIB_CFLAGS}
-
-if GNUCASH_SEPARATE_BUILDDIR
-#Only needed when srcdir and builddir are different
-SCM_FILE_LINKS = gw-register-core-spec.scm
-endif
-
-.scm-links:
- $(RM) -rf g-wrapped
- mkdir -p g-wrapped
-if GNUCASH_SEPARATE_BUILDDIR
- for X in ${SCM_FILE_LINKS} ; do \
- $(LN_S) -f ${srcdir}/$$X . ; \
- done
-endif
- touch .scm-links
-
-clean-local:
- $(RM) -rf g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-register-core.scm gw-register-core.c gw-register-core.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-register-core-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (set! %load-path (cons \"${top_srcdir}/src/engine\" %load-path)) \
- (primitive-load \"./gw-register-core-spec.scm\") \
- (gw:generate-wrapset \"gw-register-core\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-register-core.scm gw-register-core.c gw-register-core.h
-CLEANFILES = $(BUILT_SOURCES) .scm-links \
- ${SCM_FILE_LINKS} gw-register-core.html
+CLEANFILES = $(BUILT_SOURCES)
Modified: gnucash/trunk/src/register/register-core/gncmod-register-core.c
===================================================================
--- gnucash/trunk/src/register/register-core/gncmod-register-core.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/register/register-core/gncmod-register-core.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -59,7 +59,5 @@
return FALSE;
}
- lmod("(g-wrapped gw-register-core)");
-
return TRUE;
}
Deleted: gnucash/trunk/src/register/register-core/gw-register-core-spec.scm
===================================================================
--- gnucash/trunk/src/register/register-core/gw-register-core-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/register/register-core/gw-register-core-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,33 +0,0 @@
-(define-module (g-wrapped gw-register-core-spec))
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-
-(let ((ws (gw:new-wrapset "gw-register-core")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-register-core))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <basiccell.h>\n" )))
-
- (gw:wrap-as-wct ws '<gnc:basic-cell> "BasicCell*" "const BasicCell*")
-
- (gw:wrap-function
- ws
- 'gnc:basic-cell-get-value
- '(<gw:mchars> callee-owned const)
- "gnc_basic_cell_get_value"
- '((<gnc:basic-cell> cell))
- "Return the value of the cell."))
Modified: gnucash/trunk/src/register/register-core/test/Makefile.am
===================================================================
--- gnucash/trunk/src/register/register-core/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/register/register-core/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -4,7 +4,7 @@
TESTS_ENVIRONMENT= \
GNC_MODULE_PATH=../../engine:../../gnc-module:../../calculation:.. \
- GUILE_LOAD_PATH=${G_WRAP_MODULE_DIR}:../../engine:..:../../gnc-module:${top_srcdir}/lib \
+ GUILE_LOAD_PATH=../../engine:..:../../gnc-module:${top_srcdir}/lib \
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
Modified: gnucash/trunk/src/register/register-gnome/test/Makefile.am
===================================================================
--- gnucash/trunk/src/register/register-gnome/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/register/register-gnome/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -4,7 +4,7 @@
TESTS_ENVIRONMENT= \
GNC_MODULE_PATH=../../engine:../../gnc-module:../../calculation:.. \
- GUILE_LOAD_PATH=${G_WRAP_MODULE_DIR}:../../engine:..:../../gnc-module:${top_srcdir}/lib \
+ GUILE_LOAD_PATH=../../engine:..:../../gnc-module:${top_srcdir}/lib \
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
Modified: gnucash/trunk/src/report/locale-specific/us/taxtxf-de_DE.scm
===================================================================
--- gnucash/trunk/src/report/locale-specific/us/taxtxf-de_DE.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/locale-specific/us/taxtxf-de_DE.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -68,7 +68,7 @@
(define levelx-collector (make-level-collector MAX-LEVELS))
-(define today (gnc:timepair-canonical-day-time
+(define today (timespecCanonicalDayTime
(cons (current-time) 0)))
(define bdtm
@@ -84,7 +84,7 @@
(define (make-split-list account split-filter-pred)
(reverse (filter split-filter-pred
- (gnc:account-get-split-list account))))
+ (xaccAccountGetSplitList account))))
;; returns a predicate that returns true only if a split is
;; between early-date and late-date
@@ -92,8 +92,8 @@
end-date-tp)
(lambda (split)
(let ((tp
- (gnc:transaction-get-date-posted
- (gnc:split-get-parent split))))
+ (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split))))
(and (gnc:timepair-ge-date tp begin-date-tp)
(gnc:timepair-le-date tp end-date-tp)))))
@@ -192,11 +192,11 @@
(member payer (list 'current 'parent)))
(define (gnc:account-get-txf account)
- (and (gnc:account-get-tax-related account)
+ (and (xaccAccountGetTaxRelated account)
(not (equal? (gnc:account-get-txf-code account) 'N000))))
(define (gnc:account-get-txf-code account)
- (let ((code (gnc:account-get-tax-US-code account)))
+ (let ((code (xaccAccountGetTaxUSCode account)))
(string->symbol (if code code "N000"))))
(define (gnc:get-txf-format code income?)
@@ -206,7 +206,7 @@
code))
(define (gnc:account-get-txf-payer-source account)
- (let ((pns (gnc:account-get-tax-US-payer-name-source account)))
+ (let ((pns (xaccAccountGetTaxUSPayerNameSource account)))
(string->symbol (if pns pns "keine"))))
;; check for duplicate txf codes
@@ -235,7 +235,7 @@
(gnc:account-get-txf-code acc))
"\" has duplicates in "
(number->string cnt) " accounts:")
- (map gnc:account-get-full-name
+ (map gnc-account-get-full-name
(cdr x))))
'())))
txf-dups-alist)))
@@ -288,12 +288,11 @@
(make-sub-headers (- max-level 1)))))
(define (render-txf-account account account-value d? date x? x-date)
- (let* ((print-info (gnc:account-print-info account #t))
+ (let* ((print-info (gnc-account-print-info account #t))
(txf? (gnc:account-get-txf account)))
(if (and txf?
- (not (gnc:numeric-zero-p account-value)))
- (let* ((type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type account) #f))
+ (not (gnc-numeric-zero-p account-value)))
+ (let* ((type (xaccAccountGetType account))
(code (gnc:account-get-txf-code account))
(date-str (if date
(strftime "%d.%m.%Y" (localtime (car date)))
@@ -302,43 +301,43 @@
(strftime "%d.%m.%Y" (localtime (car x-date)))
#f))
;; Only formats 1,3 implemented now! Others are treated as 1.
- (format (gnc:get-txf-format code (eq? type 'income)))
+ (format (gnc:get-txf-format code (eq? type ACCT-TYPE-INCOME)))
(value (string-append
- (if (eq? type 'income) ;; negate expenses. FIXME: Necessary?
+ (if (eq? type ACCT-TYPE-INCOME) ;; negate expenses. FIXME: Necessary?
""
"-")
(number->string
- (gnc:numeric-num
- (gnc:numeric-convert account-value (cond
+ (gnc-numeric-num
+ (gnc-numeric-convert account-value (cond
((eq? format 2) 1)
(else 100))
3))))) ;; 3 is the GNC_HOW_TRUNC truncation rounding
(payer-src (gnc:account-get-txf-payer-source account))
(account-name (let* ((named-acct
(if (eq? payer-src 'parent)
- (gnc:group-get-parent
- (gnc:account-get-parent account))
+ (xaccGroupGetParentAccount
+ (xaccAccountGetParent account))
account))
- (name (gnc:account-get-name named-acct)))
+ (name (xaccAccountGetName named-acct)))
(if name
name
(begin
(display
(string-append
"Failed to get name for account: "
- (gnc:account-get-guid named-acct)
+ (gncAccountGetGUID named-acct)
(if (not (eq? account named-acct))
(string-append
" which is the parent of "
- (gnc:account-get-guid account)))
+ (gncAccountGetGUID account)))
"\n"))
"<NONE> -- See the Terminal Output"))))
- (action (if (eq? type 'income)
+ (action (if (eq? type ACCT-TYPE-INCOME)
(case code
((N286 N488) "ReinvD")
(else "Ertraege"))
"Aufwendungen"))
- (category-key (if (eq? type 'income)
+ (category-key (if (eq? type ACCT-TYPE-INCOME)
(gnc:txf-get-category-key
txf-income-categories code)
(gnc:txf-get-category-key
@@ -387,11 +386,11 @@
(let* ((account-name (if txf-date ; special split
(strftime "%d.%m.%Y" (localtime (car txf-date)))
(if (or full-names (equal? level 1))
- (gnc:account-get-full-name account)
- (gnc:account-get-name account))))
+ (gnc-account-get-full-name account)
+ (xaccAccountGetName account))))
(blue? (gnc:account-get-txf account))
- (print-info (gnc:account-print-info account #f))
- (value (gnc:amount->string lx-value print-info))
+ (print-info (gnc-account-print-info account #f))
+ (value (xaccPrintAmount lx-value print-info))
(value-formatted (if (= 1 level)
(gnc:html-markup-b value)
value))
@@ -412,7 +411,7 @@
(txf-check-dups account))
(if (or (not suppress-0) (= level 1)
- (not (gnc:numeric-zero-p lx-value)))
+ (not (gnc-numeric-zero-p lx-value)))
(begin
(gnc:html-table-prepend-row!
table
@@ -432,12 +431,12 @@
;; Returns the Parent if a child or grandchild is valid.
(define (validate accounts)
(filter (lambda (a)
- (if (gnc:account-get-tax-related a)
+ (if (xaccAccountGetTaxRelated a)
#t
;; check children
(if (null? (validate
- (gnc:group-get-subaccounts
- (gnc:account-get-children a))))
+ (xaccGroupGetSubAccountsSorted
+ (xaccAccountGetChildren a))))
#f
#t)))
accounts))
@@ -455,9 +454,9 @@
;; the number of account generations: children, grandchildren etc.
(define (num-generations account gen)
- (let ((children (gnc:account-get-children account)))
- (if (eq? (gnc:group-get-num-accounts children) 0)
- (if (and (gnc:account-get-tax-related account)
+ (let ((children (xaccAccountGetChildren account)))
+ (if (eq? (xaccGroupGetNumAccounts children) 0)
+ (if (and (xaccAccountGetTaxRelated account)
(txf-special-split? (gnc:account-get-txf-code account)))
(+ gen 1) ; Est Fed Tax has a extra generation
gen) ; no kids, return input
@@ -483,8 +482,8 @@
(selected-accounts (if (not (null? user-sel-accnts))
valid-user-sel-accnts
(validate (reverse
- (gnc:group-get-account-list
- (gnc:get-current-group))))))
+ (xaccGroupGetAccountListSorted
+ (gnc-get-current-group))))))
(generations (if (pair? selected-accounts)
(apply max (map (lambda (x) (num-generations x 1))
selected-accounts))
@@ -576,7 +575,7 @@
;; for quarterly estimated tax payments, we need a different period
;; return the sometimes changed (from-est to-est full-year?) dates
(define (txf-special-splits-period account from-value to-value)
- (if (and (gnc:account-get-tax-related account)
+ (if (and (xaccAccountGetTaxRelated account)
(txf-special-split? (gnc:account-get-txf-code account)))
(let*
((full-year?
@@ -591,7 +590,7 @@
;; paymnent from the right year
(from-est (if full-year?
(let ((bdtm (gnc:timepair->date
- (gnc:timepair-canonical-day-time
+ (timespecCanonicalDayTime
from-value))))
(set-tm:mday bdtm 1) ; 01
(set-tm:mon bdtm 2) ; Mar
@@ -600,7 +599,7 @@
from-value))
(to-est (if full-year?
(let* ((bdtm (gnc:timepair->date
- (gnc:timepair-canonical-day-time
+ (timespecCanonicalDayTime
from-value))))
(set-tm:mday bdtm 28) ; 28
(set-tm:mon bdtm 1) ; Feb
@@ -623,9 +622,9 @@
(+ 1 level)
level)))
(map (lambda (spl)
- (let* ((date (gnc:transaction-get-date-posted
- (gnc:split-get-parent spl)))
- (amount (gnc:split-get-amount spl))
+ (let* ((date (gnc-transaction-get-date-posted
+ (xaccSplitGetParent spl)))
+ (amount (xaccSplitGetAmount spl))
;; TurboTax 1999 and 2000 ignore dates after Dec 31
(fudge-date (if (and full-year?
(gnc:timepair-lt to-value date))
@@ -651,14 +650,13 @@
(length accounts)))
(define (handle-level-x-account level account)
- (let ((type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type account) #f)))
+ (let ((type (xaccAccountGetType account)))
(set! work-done (+ 1 work-done))
(gnc:report-percent-done (* 100 (if (> work-to-do 0)
(/ work-done work-to-do)
1)))
(if (gnc:account-is-inc-exp? account)
- (let* ((children (gnc:account-get-children account))
+ (let* ((children (xaccAccountGetChildren account))
(to-special #f) ; clear special-splits-period
(from-special #f)
(childrens-output
@@ -682,34 +680,34 @@
(handle-level-x-account (+ 1 level) x)
'()))
(reverse
- (gnc:group-get-account-list children)))))
+ (xaccGroupGetAccountListSorted children)))))
(account-balance
- (if (gnc:account-get-tax-related account)
+ (if (xaccAccountGetTaxRelated account)
(if to-special
(gnc:account-get-balance-interval
account from-special to-special #f)
(gnc:account-get-balance-interval
account from-value to-value #f))
- (gnc:numeric-zero)))) ; don't add non tax related
+ (gnc-numeric-zero)))) ; don't add non tax related
(set! account-balance
- (gnc:numeric-add-fixed
+ (gnc-numeric-add-fixed
(if (> max-level level)
(cadr
(lx-collector (+ 1 level)
'getpair
- (gnc:account-get-commodity account)
+ (xaccAccountGetCommodity account)
#f))
- (gnc:numeric-zero))
+ (gnc-numeric-zero))
;; make positive
- (if (eq? type 'income)
- (gnc:numeric-neg account-balance)
+ (if (eq? type ACCT-TYPE-INCOME)
+ (gnc-numeric-neg account-balance)
account-balance)))
(lx-collector level
'add
- (gnc:account-get-commodity account)
+ (xaccAccountGetCommodity account)
account-balance)
(let ((level-x-output
@@ -749,11 +747,11 @@
(to-year (strftime "%Y" (localtime (car to-value))))
(today-date (strftime "%d.%m.%Y"
(localtime
- (car (gnc:timepair-canonical-day-time
+ (car (timespecCanonicalDayTime
(cons (current-time) 0))))))
(tax-nr (or
- (gnc:kvp-frame-get-slot-path
- (gnc:book-get-slots (gnc:get-current-book))
+ (kvp-frame-get-slot-path-gslist
+ (gnc-book-get-slots (gnc-get-current-book))
(append gnc:*kvp-option-path*
(list gnc:*tax-label* gnc:*tax-nr-label*)))
""))
Modified: gnucash/trunk/src/report/locale-specific/us/taxtxf.scm
===================================================================
--- gnucash/trunk/src/report/locale-specific/us/taxtxf.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/locale-specific/us/taxtxf.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -52,7 +52,7 @@
(define levelx-collector (make-level-collector MAX-LEVELS))
-(define today (gnc:timepair-canonical-day-time
+(define today (timespecCanonicalDayTime
(cons (current-time) 0)))
(define bdtm
@@ -68,7 +68,7 @@
(define (make-split-list account split-filter-pred)
(reverse (filter split-filter-pred
- (gnc:account-get-split-list account))))
+ (xaccAccountGetSplitList account))))
;; returns a predicate that returns true only if a split is
;; between early-date and late-date
@@ -76,8 +76,8 @@
end-date-tp)
(lambda (split)
(let ((tp
- (gnc:transaction-get-date-posted
- (gnc:split-get-parent split))))
+ (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split))))
(and (gnc:timepair-ge-date tp begin-date-tp)
(gnc:timepair-le-date tp end-date-tp)))))
@@ -176,11 +176,11 @@
(member payer (list 'current 'parent)))
(define (gnc:account-get-txf account)
- (and (gnc:account-get-tax-related account)
+ (and (xaccAccountGetTaxRelated account)
(not (equal? (gnc:account-get-txf-code account) 'N000))))
(define (gnc:account-get-txf-code account)
- (let ((code (gnc:account-get-tax-US-code account)))
+ (let ((code (xaccAccountGetTaxUSCode account)))
(string->symbol (if code code "N000"))))
(define (gnc:get-txf-format code income?)
@@ -190,7 +190,7 @@
code))
(define (gnc:account-get-txf-payer-source account)
- (let ((pns (gnc:account-get-tax-US-payer-name-source account)))
+ (let ((pns (xaccAccountGetTaxUSPayerNameSource account)))
(string->symbol (if pns pns "none"))))
;; check for duplicate txf codes
@@ -219,7 +219,7 @@
(gnc:account-get-txf-code acc))
"\" has duplicates in "
(number->string cnt) " accounts:")
- (map gnc:account-get-full-name
+ (map gnc-account-get-full-name
(cdr x))))
'())))
txf-dups-alist)))
@@ -272,13 +272,12 @@
(make-sub-headers (- max-level 1)))))
(define (render-txf-account account account-value d? date x? x-date)
- (let* ((print-info (gnc:account-print-info account #t))
- (value (gnc:amount->string account-value print-info))
+ (let* ((print-info (gnc-account-print-info account #t))
+ (value (xaccPrintAmount account-value print-info))
(txf? (gnc:account-get-txf account)))
(if (and txf?
- (not (gnc:numeric-zero-p account-value)))
- (let* ((type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type account) #f))
+ (not (gnc-numeric-zero-p account-value)))
+ (let* ((type (xaccAccountGetType account))
(code (gnc:account-get-txf-code account))
(date-str (if date
(strftime "%m/%d/%Y" (localtime (car date)))
@@ -287,33 +286,33 @@
(strftime "%m/%d/%Y" (localtime (car x-date)))
#f))
;; Only formats 1,3 implemented now! Others are treated as 1.
- (format (gnc:get-txf-format code (eq? type 'income)))
+ (format (gnc:get-txf-format code (eq? type ACCT-TYPE-INCOME)))
(payer-src (gnc:account-get-txf-payer-source account))
(account-name (let* ((named-acct
(if (eq? payer-src 'parent)
- (gnc:group-get-parent
- (gnc:account-get-parent account))
+ (xaccGroupGetParentAccount
+ (xaccAccountGetParent account))
account))
- (name (gnc:account-get-name named-acct)))
+ (name (xaccAccountGetName named-acct)))
(if name
name
(begin
(display
(string-append
"Failed to get name for account: "
- (gnc:account-get-guid named-acct)
+ (gncAccountGetGUID named-acct)
(if (not (eq? account named-acct))
(string-append
" which is the parent of "
- (gnc:account-get-guid account)))
+ (gncAccountGetGUID account)))
"\n"))
"<NONE> -- See the Terminal Output"))))
- (action (if (eq? type 'income)
+ (action (if (eq? type ACCT-TYPE-INCOME)
(case code
((N286 N488) "ReinvD")
(else "Income"))
"Expense"))
- (category-key (if (eq? type 'income)
+ (category-key (if (eq? type ACCT-TYPE-INCOME)
(gnc:txf-get-category-key
txf-income-categories code)
(gnc:txf-get-category-key
@@ -323,7 +322,7 @@
(substring value 1 (string-length value))
" " account-name)
account-name))
- (value (if (eq? type 'income) ; negate expenses
+ (value (if (eq? type ACCT-TYPE-INCOME) ; negate expenses
value
(string-append
"$-" (substring value 1 (string-length value)))))
@@ -364,11 +363,11 @@
(let* ((account-name (if txf-date ; special split
(strftime "%Y-%b-%d" (localtime (car txf-date)))
(if (or full-names (equal? level 1))
- (gnc:account-get-full-name account)
- (gnc:account-get-name account))))
+ (gnc-account-get-full-name account)
+ (xaccAccountGetName account))))
(blue? (gnc:account-get-txf account))
- (print-info (gnc:account-print-info account #f))
- (value (gnc:amount->string lx-value print-info))
+ (print-info (gnc-account-print-info account #f))
+ (value (xaccPrintAmount lx-value print-info))
(value-formatted (if (= 1 level)
(gnc:html-markup-b value)
value))
@@ -389,7 +388,7 @@
(txf-check-dups account))
(if (or (not suppress-0) (= level 1)
- (not (gnc:numeric-zero-p lx-value)))
+ (not (gnc-numeric-zero-p lx-value)))
(begin
(gnc:html-table-prepend-row!
table
@@ -409,12 +408,12 @@
;; Returns the Parent if a child or grandchild is valid.
(define (validate accounts)
(filter (lambda (a)
- (if (gnc:account-get-tax-related a)
+ (if (xaccAccountGetTaxRelated a)
#t
;; check children
(if (null? (validate
- (gnc:group-get-subaccounts
- (gnc:account-get-children a))))
+ (xaccGroupGetSubAccountsSorted
+ (xaccAccountGetChildren a))))
#f
#t)))
accounts))
@@ -432,9 +431,9 @@
;; the number of account generations: children, grandchildren etc.
(define (num-generations account gen)
- (let ((children (gnc:account-get-children account)))
- (if (eq? (gnc:group-get-num-accounts children) 0)
- (if (and (gnc:account-get-tax-related account)
+ (let ((children (xaccAccountGetChildren account)))
+ (if (eq? (xaccGroupGetNumAccounts children) 0)
+ (if (and (xaccAccountGetTaxRelated account)
(txf-special-split? (gnc:account-get-txf-code account)))
(+ gen 1) ; Est Fed Tax has a extra generation
gen) ; no kids, return input
@@ -460,8 +459,8 @@
(selected-accounts (if (not (null? user-sel-accnts))
valid-user-sel-accnts
(validate (reverse
- (gnc:group-get-account-list
- (gnc:get-current-group))))))
+ (xaccGroupGetAccountListSorted
+ (gnc-get-current-group))))))
(generations (if (pair? selected-accounts)
(apply max (map (lambda (x) (num-generations x 1))
selected-accounts))
@@ -553,7 +552,7 @@
;; for quarterly estimated tax payments, we need a different period
;; return the sometimes changed (from-est to-est full-year?) dates
(define (txf-special-splits-period account from-value to-value)
- (if (and (gnc:account-get-tax-related account)
+ (if (and (xaccAccountGetTaxRelated account)
(txf-special-split? (gnc:account-get-txf-code account)))
(let*
((full-year?
@@ -568,7 +567,7 @@
;; paymnent from the right year
(from-est (if full-year?
(let ((bdtm (gnc:timepair->date
- (gnc:timepair-canonical-day-time
+ (timespecCanonicalDayTime
from-value))))
(set-tm:mday bdtm 1) ; 01
(set-tm:mon bdtm 2) ; Mar
@@ -577,7 +576,7 @@
from-value))
(to-est (if full-year?
(let* ((bdtm (gnc:timepair->date
- (gnc:timepair-canonical-day-time
+ (timespecCanonicalDayTime
from-value))))
(set-tm:mday bdtm 28) ; 28
(set-tm:mon bdtm 1) ; Feb
@@ -600,9 +599,9 @@
(+ 1 level)
level)))
(map (lambda (spl)
- (let* ((date (gnc:transaction-get-date-posted
- (gnc:split-get-parent spl)))
- (amount (gnc:split-get-amount spl))
+ (let* ((date (gnc-transaction-get-date-posted
+ (xaccSplitGetParent spl)))
+ (amount (xaccSplitGetAmount spl))
;; TurboTax 1999 and 2000 ignore dates after Dec 31
(fudge-date (if (and full-year?
(gnc:timepair-lt to-value date))
@@ -628,15 +627,13 @@
(length accounts)))
(define (handle-level-x-account level account)
- (let ((type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type account) #f)))
-
+ (let ((type (xaccAccountGetType account)))
(set! work-done (+ 1 work-done))
(gnc:report-percent-done (* 100 (if (> work-to-do 0)
(/ work-done work-to-do)
1)))
(if (gnc:account-is-inc-exp? account)
- (let* ((children (gnc:account-get-children account))
+ (let* ((children (xaccAccountGetChildren account))
(to-special #f) ; clear special-splits-period
(from-special #f)
(childrens-output
@@ -660,34 +657,34 @@
(handle-level-x-account (+ 1 level) x)
'()))
(reverse
- (gnc:group-get-account-list children)))))
+ (xaccGroupGetAccountListSorted children)))))
(account-balance
- (if (gnc:account-get-tax-related account)
+ (if (xaccAccountGetTaxRelated account)
(if to-special
(gnc:account-get-balance-interval
account from-special to-special #f)
(gnc:account-get-balance-interval
account from-value to-value #f))
- (gnc:numeric-zero)))) ; don't add non tax related
+ (gnc-numeric-zero)))) ; don't add non tax related
(set! account-balance
- (gnc:numeric-add-fixed
+ (gnc-numeric-add-fixed
(if (> max-level level)
(cadr
(lx-collector (+ 1 level)
'getpair
- (gnc:account-get-commodity account)
+ (xaccAccountGetCommodity account)
#f))
- (gnc:numeric-zero))
+ (gnc-numeric-zero))
;; make positive
- (if (eq? type 'income)
- (gnc:numeric-neg account-balance)
+ (if (eq? type ACCT-TYPE-INCOME)
+ (gnc-numeric-neg account-balance)
account-balance)))
(lx-collector level
'add
- (gnc:account-get-commodity account)
+ (xaccAccountGetCommodity account)
account-balance)
(let ((level-x-output
@@ -726,7 +723,7 @@
(to-date (strftime "%Y-%b-%d" (localtime (car to-value))))
(today-date (strftime "D%m/%d/%Y"
(localtime
- (car (gnc:timepair-canonical-day-time
+ (car (timespecCanonicalDayTime
(cons (current-time) 0)))))))
;; Now, the main body
Modified: gnucash/trunk/src/report/locale-specific/us/test/Makefile.am
===================================================================
--- gnucash/trunk/src/report/locale-specific/us/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/locale-specific/us/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -15,7 +15,6 @@
--gnc-module-dir ${top_srcdir}/src/gnc-module \
--gnc-module-dir ${top_srcdir}/src/engine \
--gnc-module-dir ${top_builddir}/src/network-utils \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/scm \
--guile-load-dir ${top_srcdir}/src/tax/us \
--guile-load-dir ${top_srcdir}/src/report/report-system \
@@ -23,9 +22,8 @@
--guile-load-dir ${top_srcdir}/src/gnome-utils \
--guile-load-dir ${top_srcdir}/src/gnome \
--library-dir ${top_srcdir}/src/gnome-utils \
- --library-dir ${top_srcdir}/src/gnome \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_srcdir}/src/gnome
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Property changes on: gnucash/trunk/src/report/report-gnome
___________________________________________________________________
Name: svn:ignore
- *.gladep
*.lo
*.la
.scm-links
.deps
.libs
Makefile
Makefile.in
gw-report-gnome.scm
gw-report-gnome.html
gw-report-gnome.h
gw-report-gnome.c
gnucash
report
g-wrapped
semantic.cache
TAGS
+ *.gladep
*.lo
*.la
.scm-links
.deps
.libs
Makefile
Makefile.in
swig-report-gnome.c
gw-report-gnome.scm
gw-report-gnome.html
gw-report-gnome.h
gw-report-gnome.c
gnucash
report
g-wrapped
semantic.cache
TAGS
Modified: gnucash/trunk/src/report/report-gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/report/report-gnome/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -3,7 +3,7 @@
# to get the test-link-mumble to link correctly; plz assist.
PWD := $(shell pwd)
-pkglib_LTLIBRARIES = libgncmod-report-gnome.la libgw-report-gnome.la
+pkglib_LTLIBRARIES = libgncmod-report-gnome.la
AM_CFLAGS = \
-I${top_srcdir}/src \
@@ -18,12 +18,12 @@
${GUILE_INCS} \
${GTKHTML_CFLAGS} \
${GNOME_PRINT_CFLAGS} \
- ${G_WRAP_COMPILE_ARGS} \
${GNOME_CFLAGS} \
${QOF_CFLAGS} \
${GLIB_CFLAGS}
libgncmod_report_gnome_la_SOURCES = \
+ swig-report-gnome.c \
dialog-column-view.c \
dialog-style-sheet.c \
gnc-plugin-page-report.c \
@@ -44,22 +44,18 @@
${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
${top_builddir}/src/report/report-system/libgncmod-report-system.la \
${GLADE_LIBS} \
- ${G_WRAP_LINK_ARGS} \
${GUILE_LIBS} \
${GNOME_PRINT_LIBS} \
${GNOME_LIBS} \
${QOF_LIBS} \
${GLIB_LIBS}
-nodist_libgw_report_gnome_la_SOURCES = gw-report-gnome.c
-libgw_report_gnome_la_LIBADD = \
- libgncmod-report-gnome.la \
- ${G_WRAP_LINK_ARGS}
+if BUILDING_FROM_SVN
+swig-report-gnome.c: report-gnome.i ${gncinclude_HEADERS}
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module \
+ -I${top_srcdir}/src/engine -o $@ $<
+endif
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-report-gnome-spec.scm
-nodist_gwmod_DATA = gw-report-gnome.scm
-
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report
gncmod_DATA = report-gnome.scm
@@ -74,22 +70,20 @@
gnc-plugin-page-report-ui.xml
EXTRA_DIST = \
+ report-gnome.i \
${glade_DATA} \
- ${gwmod_DATA} \
${gncmod_DATA} \
${ui_DATA}
if GNUCASH_SEPARATE_BUILDDIR
#Only needed when srcdir and builddir are different
-# for compiling
-SCM_FILE_LINKS = gw-report-gnome-spec.scm
# for running
-SCM_FILE_LINKS += ${gncmod_DATA}
+SCM_FILE_LINKS = ${gncmod_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
mkdir -p gnucash/report
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
@@ -99,28 +93,5 @@
( cd gnucash/report; for A in $(gncmod_DATA) ; do $(LN_S) -f ../../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
-
-.INTERMEDIATE: gwrap-files
-
-gw-report-gnome.scm gw-report-gnome.c gw-report-gnome.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-report-gnome-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/engine\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/app-utils\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/gnome-utils\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/gnome\" %load-path)) \
- (primitive-load \"./gw-report-gnome-spec.scm\") \
- (gw:generate-wrapset \"gw-report-gnome\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-report-gnome.scm gw-report-gnome.c gw-report-gnome.h
-CLEANFILES = $(BUILT_SOURCES) .scm-links \
- ${SCM_FILE_LINKS} gw-report-gnome.html
+CLEANFILES = gnucash report .scm-links ${SCM_FILE_LINKS}
+MAINTAINERCLEANFILES = swig-report-gnome.c
Modified: gnucash/trunk/src/report/report-gnome/dialog-column-view.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/dialog-column-view.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/dialog-column-view.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -25,7 +25,7 @@
#include <glib/gi18n.h>
#include <libguile.h>
-#include <g-wrap-wct.h>
+#include "swig-runtime.h"
#include "dialog-column-view.h"
#include "dialog-options.h"
@@ -65,7 +65,6 @@
int contents_selected;
};
-
static void gnc_column_view_edit_add_cb(GtkButton * button,
gpointer user_data);
static void gnc_column_view_edit_remove_cb(GtkButton * button,
@@ -271,8 +270,10 @@
ptr = scm_call_1(get_editor, view);
if(ptr != SCM_BOOL_F) {
- GtkWindow * w = gw_wcp_get_ptr(ptr);
+#define FUNC_NAME "gtk_window_present"
+ GtkWindow * w = SWIG_MustGetPtr(ptr, SWIG_TypeQuery("_p_GtkWidget"), 1, 0);
gtk_window_present(w);
+#undef FUNC_NAME
return NULL;
}
else {
@@ -323,7 +324,7 @@
r->contents_list = SCM_EOL;
r->odb = gnc_option_db_new(r->options);
- gnc_build_options_dialog_contents(r->optwin, r->odb);
+ gnc_options_dialog_build_contents(r->optwin, r->odb);
gtk_notebook_append_page(GTK_NOTEBOOK(gnc_options_dialog_notebook
(r->optwin)),
Modified: gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -147,7 +147,7 @@
scm_gc_protect_object(ssinfo->stylesheet);
g_object_ref(gnc_options_dialog_widget(ssinfo->odialog));
- gnc_build_options_dialog_contents(ssinfo->odialog,
+ gnc_options_dialog_build_contents(ssinfo->odialog,
ssinfo->odb);
gnc_options_dialog_set_apply_cb(ssinfo->odialog,
gnc_style_sheet_options_apply_cb,
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -45,7 +45,6 @@
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
-#include <g-wrap-wct.h>
#include <libguile.h>
#include <sys/stat.h>
#include <errno.h>
@@ -67,6 +66,7 @@
#include "guile-util.h"
#include "option-util.h"
#include "window-report.h"
+#include "swig-runtime.h"
#define WINDOW_REPORT_CM_CLASS "window-report"
@@ -904,7 +904,12 @@
editor = scm_call_1(get_editor, SCM_CAR(edited));
scm_call_2(set_editor, SCM_CAR(edited), SCM_BOOL_F);
if (editor != SCM_BOOL_F) {
- gtk_widget_destroy(GTK_WIDGET(gw_wcp_get_ptr(editor)));
+ GtkWidget *w = NULL;
+ #define FUNC_NAME "gtk_widget_destroy"
+ w = SWIG_MustGetPtr(editor,
+ SWIG_TypeQuery("_p_GtkWidget"), 1, 0);
+ #undef FUNC_NAME
+ gtk_widget_destroy(GTK_WIDGET(w));
}
}
@@ -1101,7 +1106,11 @@
{
SCM get_editor = scm_c_eval_string("gnc:report-editor-widget");
SCM editor = scm_call_1(get_editor, report);
- gtk_window_present(gw_wcp_get_ptr(editor));
+ #define FUNC_NAME "gtk_window_present"
+ GtkWidget *w = SWIG_MustGetPtr(editor,
+ SWIG_TypeQuery("_p_GtkWidget"), 1, 0);
+ #undef FUNC_NAME
+ gtk_window_present(GTK_WINDOW(w));
}
static void
Modified: gnucash/trunk/src/report/report-gnome/gncmod-report-gnome.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gncmod-report-gnome.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/gncmod-report-gnome.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -52,6 +52,7 @@
scm_c_eval_string(form);
g_free(form);
}
+extern SCM scm_init_sw_report_gnome_module(void);
int
libgncmod_report_gnome_LTX_gnc_module_init(int refcount)
@@ -67,8 +68,9 @@
if(!gnc_module_load("gnucash/report/report-system", 0)) {
return FALSE;
}
+ scm_init_sw_report_gnome_module();
- lmod ("(g-wrapped gw-report-gnome)");
+ lmod ("(sw_report_gnome)");
lmod ("(gnucash report report-gnome)");
if (refcount == 0)
Deleted: gnucash/trunk/src/report/report-gnome/gw-report-gnome-spec.scm
===================================================================
--- gnucash/trunk/src/report/report-gnome/gw-report-gnome-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/gw-report-gnome-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,86 +0,0 @@
-(define-module (g-wrapped gw-report-gnome-spec))
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(use-modules (g-wrapped gw-engine-spec))
-(use-modules (g-wrapped gw-gnome-utils-spec))
-
-(let ((ws (gw:new-wrapset "gw-report-gnome")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
- (gw:wrapset-depends-on ws "gw-glib")
-
- (gw:wrapset-depends-on ws "gw-engine")
- (gw:wrapset-depends-on ws "gw-gnome-utils")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-report-gnome))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <config.h>\n"
- "#include <gtk/gtk.h>\n"
- "#include <dialog-column-view.h>\n"
- "#include <gnc-plugin-page-report.h>\n"
- "#include <window-report.h>\n")))
-
- (gw:wrap-function
- ws
- 'gnc:report-window
- '<gw:void>
- "reportWindow"
- '((<gw:int> report-id))
- "Show report window")
-
- (gw:wrap-function
- ws
- 'gnc:print-report
- '<gw:void>
- "gnc_print_report"
- '((<gw:int> report-id))
- "Print a report with dialog support")
-
- (gw:wrap-function
- ws
- 'gnc:report-raise-editor
- '<gw:void>
- "gnc_report_raise_editor"
- '((<gw:scm> report))
- "Raise the report's editor window")
-
- (gw:wrap-function
- ws
- 'gnc:main-window-open-report
- '<gw:void>
- "gnc_main_window_open_report"
- '((<gw:int> report-id) (<gnc:MainWindow*> window))
- "Show report window")
-
-
-;; This is the function that's responsible for creating and returning
-;; the editor widget for a report's options.
- (gw:wrap-function
- ws
- 'gnc:default-options-editor
- '<gnc:UIWidget>
- "gnc_report_window_default_params_editor"
- '((<gw:scm> options) (<gw:scm> report))
- "Default options editor window for reports")
-
- (gw:wrap-function
- ws
- 'gnc:column-view-edit-options
- '<gnc:UIWidget>
- "gnc_column_view_edit_options"
- '((<gw:scm> options) (<gw:scm> view))
- "Create an editor for a column-view options object")
- )
Copied: gnucash/trunk/src/report/report-gnome/report-gnome.i (from rev 15023, gnucash/branches/swig-redo/src/report/report-gnome/report-gnome.i)
Modified: gnucash/trunk/src/report/report-gnome/report-gnome.scm
===================================================================
--- gnucash/trunk/src/report/report-gnome/report-gnome.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/report-gnome.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -13,8 +13,7 @@
(use-modules (ice-9 slib))
(require 'printf)
-(use-modules (g-wrapped gw-core-utils))
-(use-modules (g-wrapped gw-report-gnome))
+(use-modules (sw_report_gnome))
(gnc:module-load "gnucash/gnome-utils" 0)
(gnc:module-load "gnucash/report/report-system" 0)
@@ -28,15 +27,15 @@
;; and returns a widget
(define (gnc:report-options-editor report)
(if (equal? (gnc:report-type report) "Multicolumn View")
- gnc:column-view-edit-options
- gnc:default-options-editor))
+ gnc-column-view-edit-options
+ gnc-report-window-default-params-editor))
;; do not rely on the return value of this function - it has none.
;; 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
- (gnc:report-raise-editor report)
+ (gnc-report-raise-editor report)
(begin
(if (gnc:report-options report)
(begin
@@ -45,7 +44,7 @@
(gnc:report-options report)
report))
(gnc:report-set-editor-widget! report editor-widg))
- (gnc:warning-dialog #f (_ "This report has no options.")))))))
+ (gnc-warning-dialog '() (_ "This report has no options.")))))))
(define (gnc:add-report-template-menu-items)
(define *template-items* '())
@@ -79,8 +78,8 @@
(lambda (window)
(let ((report (gnc:make-report
(gnc:report-template-name template))))
- (gnc:main-window-open-report report window)))))
- (gnc:add-extension item))))
+ (gnc-main-window-open-report report window)))))
+ (gnc-add-scm-extension item))))
(define (add-template name template)
(let ((menu-name (gnc:report-template-menu-name template)))
@@ -108,24 +107,24 @@
(define tax-menu
(gnc:make-menu gnc:menuname-taxes (list gnc:menuname-reports)))
- ;; (gnc:add-extension tax-menu)
- (gnc:add-extension income-expense-menu)
- (gnc:add-extension asset-liability-menu)
- (gnc:add-extension utility-menu)
- (gnc:add-extension custom-menu)
+ ;; (gnc-add-scm-extension tax-menu)
+ (gnc-add-scm-extension income-expense-menu)
+ (gnc-add-scm-extension asset-liability-menu)
+ (gnc-add-scm-extension utility-menu)
+ (gnc-add-scm-extension custom-menu)
;; run report-hook danglers
- (gnc:hook-run-danglers gnc:*report-hook*)
+ (gnc:hook-run-danglers HOOK-REPORT)
;; push reports (new items added on top of menu)
(gnc:add-report-template-menu-items)
;; the Welcome to GnuCash "extravaganza" report
- (gnc:add-extension
+ (gnc-add-scm-extension
(gnc:make-menu-item
(N_ "Welcome Sample Report")
(N_ "Welcome-to-GnuCash report screen")
(list gnc:menuname-reports gnc:menuname-utility "")
(lambda (window)
- (gnc:main-window-open-report (gnc:make-welcome-report) window))))
+ (gnc-main-window-open-report (gnc:make-welcome-report) window))))
)
Modified: gnucash/trunk/src/report/report-gnome/test/Makefile.am
===================================================================
--- gnucash/trunk/src/report/report-gnome/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -15,15 +15,13 @@
--gnc-module-dir ${top_builddir}/src/report/report-gnome \
--gnc-module-dir ${top_srcdir}/src/gnc-module \
--gnc-module-dir ${top_srcdir}/src/engine \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/scm \
--guile-load-dir ${top_srcdir}/src/app-utils \
--guile-load-dir ${top_srcdir}/src/report/report-system \
--guile-load-dir ${top_srcdir}/src/gnome-utils \
--guile-load-dir ${top_srcdir}/src/gnome \
--library-dir ${top_srcdir}/src/gnome-utils \
- --library-dir ${top_srcdir}/src/gnome \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_srcdir}/src/gnome
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Modified: gnucash/trunk/src/report/report-gnome/window-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/window-report.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-gnome/window-report.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -33,8 +33,7 @@
#include <libguile.h>
#include <sys/stat.h>
-#include <g-wrap-wct.h>
-
+#include "swig-runtime.h"
#include "dialog-options.h"
#include "file-utils.h"
#include "gnc-gkeyfile-utils.h"
@@ -151,8 +150,10 @@
ptr = scm_call_1(get_editor, report);
if(ptr != SCM_BOOL_F) {
- GtkWindow * w = gw_wcp_get_ptr(ptr);
+ #define FUNC_NAME "gtk_window_present"
+ GtkWindow * w = SWIG_MustGetPtr(ptr, SWIG_TypeQuery("_p_GtkWidget"), 1, 0);
gtk_window_present(w);
+ #undef FUNC_NAME
return NULL;
}
else {
@@ -173,7 +174,7 @@
scm_gc_protect_object(prm->scm_options);
scm_gc_protect_object(prm->cur_report);
- gnc_build_options_dialog_contents(prm->win, prm->db);
+ gnc_options_dialog_build_contents(prm->win, prm->db);
gnc_option_db_clean(prm->db);
gnc_options_dialog_set_apply_cb(prm->win,
@@ -192,9 +193,13 @@
void
gnc_report_raise_editor(SCM report)
{
- SCM get_editor = scm_c_eval_string("gnc:report-editor-widget");
- SCM editor = scm_call_1(get_editor, report);
- gtk_window_present(gw_wcp_get_ptr(editor));
+ SCM get_editor = scm_c_eval_string("gnc:report-editor-widget");
+ SCM editor = scm_call_1(get_editor, report);
+ #define FUNC_NAME "gtk_window_present"
+ GtkWidget *w = SWIG_MustGetPtr(editor,
+ SWIG_TypeQuery("_p_GtkWidget"), 1, 0);
+ #undef FUNC_NAME
+ gtk_window_present(GTK_WINDOW(w));
}
static gboolean
@@ -228,6 +233,7 @@
return ok;
}
+/* TODO: unroll start_editor */
static gboolean
gnc_html_options_url_cb (const char *location, const char *label,
gboolean new_window, GNCURLResult *result)
Property changes on: gnucash/trunk/src/report/report-system
___________________________________________________________________
Name: svn:ignore
- Makefile
Makefile.in
.scm-links
.deps
.libs
*.lo
*.la
report
gnucash
g-wrapped
semantic.cache
TAGS
gw-report-system.scm
gw-report-system.c
gw-report-system.h
gw-report-system.html
+ Makefile
Makefile.in
.scm-links
.deps
.libs
*.lo
*.la
report
gnucash
g-wrapped
semantic.cache
TAGS
swig-report-system.c
gw-report-system.scm
gw-report-system.c
gw-report-system.h
gw-report-system.html
Modified: gnucash/trunk/src/report/report-system/Makefile.am
===================================================================
--- gnucash/trunk/src/report/report-system/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,8 +1,9 @@
SUBDIRS = . test
-pkglib_LTLIBRARIES = libgncmod-report-system.la libgw-report-system.la
+pkglib_LTLIBRARIES = libgncmod-report-system.la
libgncmod_report_system_la_SOURCES = \
+ swig-report-system.c \
gncmod-report-system.c \
gnc-report.c
@@ -16,13 +17,16 @@
${GUILE_LIBS} \
${GLIB_LIBS}
+if BUILDING_FROM_SVN
+swig-report-system.c: report-system.i ${gncinclude_HEADERS}
+ $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
+endif
AM_CFLAGS = \
-I${top_srcdir}/src \
-I${top_srcdir}/src/gnc-module \
-I${top_srcdir}/src/app-utils \
- ${GLIB_CFLAGS} ${GUILE_INCS} \
- ${G_WRAP_COMPILE_ARGS}
+ ${GLIB_CFLAGS} ${GUILE_INCS}
gncscmdir = ${GNC_SHAREDIR}/scm
gncscm_DATA = \
@@ -48,17 +52,15 @@
if GNUCASH_SEPARATE_BUILDDIR
#For executing test cases
-# for compiling
-SCM_FILE_LINKS = gw-report-system-spec.scm
# for running
-SCM_FILE_LINKS += \
+SCM_FILE_LINKS = \
${gncscmmod_DATA} \
${gncscm_DATA}
endif
.scm-links:
- $(RM) -rf gnucash g-wrapped
- mkdir -p gnucash g-wrapped
+ $(RM) -rf gnucash
+ mkdir -p gnucash
mkdir -p gnucash/report
if GNUCASH_SEPARATE_BUILDDIR
for X in ${SCM_FILE_LINKS} ; do \
@@ -68,40 +70,9 @@
( cd gnucash/report; for A in $(gncscmmod_DATA) ; do $(LN_S) -f ../../$$A . ; done )
touch .scm-links
-clean-local:
- $(RM) -rf gnucash g-wrapped
+noinst_DATA = .scm-links
-.INTERMEDIATE: gwrap-files
+EXTRA_DIST = report-system.i ${gncscmmod_DATA} ${gncscm_DATA}
-nodist_libgw_report_system_la_SOURCES = gw-report-system.c
-libgw_report_system_la_LIBADD = \
- libgncmod-report-system.la \
- ${G_WRAP_LINK_ARGS}
-
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-report-system-spec.scm
-nodist_gwmod_DATA = gw-report-system.scm
-
-noinst_DATA = .scm-links gw-report-system.h
-
-EXTRA_DIST = ${gncscmmod_DATA} ${gncscm_DATA} ${gwmod_DATA}
-
-gw-report-system.scm gw-report-system.c gw-report-system.h: \
- gwrap-files
-
-gwrap-files: \
- .scm-links gw-report-system-spec.scm ${top_builddir}/config.status
- FLAVOR=gnome $(GUILE) -c \
- "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
- (set! %load-path (cons \"${PWD}\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/engine\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/app-utils\" %load-path)) \
- (set! %load-path (cons \"${top_builddir}/src/gnome-utils\" %load-path)) \
- (primitive-load \"./gw-report-system-spec.scm\") \
- (gw:generate-wrapset \"gw-report-system\")"
- touch $@
- ( cd g-wrapped; $(LN_S) -f ../gw-*.scm . )
-
-BUILT_SOURCES = gw-report-system.scm gw-report-system.c gw-report-system.h
-CLEANFILES = $(BUILT_SOURCES) .scm-links \
- ${SCM_FILE_LINKS} gw-report-system.html
+CLEANFILES = gnucash report .scm-links ${SCM_FILE_LINKS}
+MAINTAINERCLEANFILES = swig-report-system.c
Modified: gnucash/trunk/src/report/report-system/commodity-utilities.scm
===================================================================
--- gnucash/trunk/src/report/report-system/commodity-utilities.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/commodity-utilities.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -21,12 +21,12 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define (gnc:commodity-collector-contains-commodity? collector commodity)
+(define (gnc-commodity-collector-contains-commodity? collector commodity)
(let ((ret #f))
- (gnc:commodity-collector-map
+ (gnc-commodity-collector-map
collector
(lambda (comm amt)
- (set! ret (or ret (gnc:commodity-equiv? comm commodity)))))
+ (set! ret (or ret (gnc-commodity-equiv comm commodity)))))
ret
))
@@ -40,16 +40,16 @@
;; 'commodity' != #f ).
(define (gnc:get-match-commodity-splits
currency-accounts end-date-tp commodity)
- (let ((query (gnc:malloc-query))
+ (let ((query (qof-query-create-for-splits))
(splits #f))
- (gnc:query-set-book query (gnc:get-current-book))
- (gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
- (gnc:query-add-account-match query
+ (qof-query-set-book query (gnc-get-current-book))
+ (gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
+ (xaccQueryAddAccountMatch query
currency-accounts
- 'guid-match-any 'query-and)
- (gnc:query-add-date-match-timepair
- query #f end-date-tp #t end-date-tp 'query-and)
+ QOF-GUID-MATCH-ANY QOF-QUERY-AND)
+ (xaccQueryAddDateMatchTS
+ query #f end-date-tp #t end-date-tp QOF-QUERY-AND)
;; Get the query result, i.e. all splits in currency
;; accounts.
@@ -58,22 +58,22 @@
;; which have two *different* commodities
;; involved.
(lambda (s) (let ((trans-comm
- (gnc:transaction-get-currency
- (gnc:split-get-parent s)))
+ (xaccTransGetCurrency
+ (xaccSplitGetParent s)))
(acc-comm
- (gnc:account-get-commodity
- (gnc:split-get-account s))))
+ (xaccAccountGetCommodity
+ (xaccSplitGetAccount s))))
(and
- (not (gnc:commodity-equiv?
+ (not (gnc-commodity-equiv
trans-comm acc-comm))
(or
(not commodity)
- (gnc:commodity-equiv?
+ (gnc-commodity-equiv
commodity trans-comm)
- (gnc:commodity-equiv?
+ (gnc-commodity-equiv
commodity acc-comm)))))
- (gnc:query-get-splits query)))
- (gnc:free-query query)
+ (qof-query-run query)))
+ (qof-query-destroy query)
splits))
;; Returns a sorted list of all splits in the 'currency-accounts' up
@@ -86,8 +86,8 @@
end-date-tp commodity)
(lambda (a b)
(gnc:timepair-lt
- (gnc:transaction-get-date-posted (gnc:split-get-parent a))
- (gnc:transaction-get-date-posted (gnc:split-get-parent b))))))
+ (gnc-transaction-get-date-posted (xaccSplitGetParent a))
+ (gnc-transaction-get-date-posted (xaccSplitGetParent b))))))
;; Returns a list of all splits in the currency-accounts up to
@@ -102,7 +102,7 @@
;; Helper for warnings below.
-(define (gnc:commodity-numeric->string commodity numeric)
+(define (gnc-commodity-numeric->string commodity numeric)
(gnc:monetary->string
(gnc:make-gnc-monetary commodity numeric)))
@@ -115,7 +115,7 @@
;; Returns true if the given pricealist element is a non-zero price.
(define (gnc:price-is-not-zero? elem)
- (not (gnc:numeric-zero-p (second elem))))
+ (not (gnc-numeric-zero-p (second elem))))
;; Create a list of all prices of 'price-commodity' measured in the
;; currency 'report-currency'. The prices are taken from all splits in
@@ -124,24 +124,24 @@
;; 'time' is the timepair when the <gnc:numeric*> 'price' was valid.
(define (gnc:get-commodity-totalavg-prices
currency-accounts end-date-tp price-commodity report-currency)
- (let ((total-foreign (gnc:numeric-zero))
- (total-domestic (gnc:numeric-zero)))
+ (let ((total-foreign (gnc-numeric-zero))
+ (total-domestic (gnc-numeric-zero)))
(filter
gnc:price-is-not-zero?
(map-in-order
(lambda (a)
- (let* ((transaction-comm (gnc:transaction-get-currency
- (gnc:split-get-parent a)))
- (account-comm (gnc:account-get-commodity
- (gnc:split-get-account a)))
- (share-amount (gnc:numeric-abs
- (gnc:split-get-amount a)))
- (value-amount (gnc:numeric-abs
- (gnc:split-get-value a)))
- (transaction-date (gnc:transaction-get-date-posted
- (gnc:split-get-parent a)))
+ (let* ((transaction-comm (xaccTransGetCurrency
+ (xaccSplitGetParent a)))
+ (account-comm (xaccAccountGetCommodity
+ (xaccSplitGetAccount a)))
+ (share-amount (gnc-numeric-abs
+ (xaccSplitGetAmount a)))
+ (value-amount (gnc-numeric-abs
+ (xaccSplitGetValue a)))
+ (transaction-date (gnc-transaction-get-date-posted
+ (xaccSplitGetParent a)))
(foreignlist
- (if (gnc:commodity-equiv? transaction-comm
+ (if (gnc-commodity-equiv transaction-comm
price-commodity)
(list account-comm
share-amount value-amount)
@@ -149,14 +149,14 @@
value-amount share-amount))))
;;(warn "gnc:get-commodity-totalavg-prices: value "
- ;; (gnc:commodity-numeric->string
+ ;; (gnc-commodity-numeric->string
;;(first foreignlist) (second foreignlist))
;; " bought shares "
- ;; (gnc:commodity-numeric->string
+ ;; (gnc-commodity-numeric->string
;;price-commodity (third foreignlist)))
;; Try EURO exchange if necessary
- (if (not (gnc:commodity-equiv? (first foreignlist)
+ (if (not (gnc-commodity-equiv (first foreignlist)
report-currency))
(let ((exchanged (gnc:exchange-by-euro-numeric
(first foreignlist) (second foreignlist)
@@ -169,26 +169,26 @@
(list
transaction-date
- (if (not (gnc:commodity-equiv? (first foreignlist)
+ (if (not (gnc-commodity-equiv (first foreignlist)
report-currency))
(begin
(warn "gnc:get-commodity-totalavg-prices: "
"Sorry, currency exchange not yet implemented:"
- (gnc:commodity-numeric->string
+ (gnc-commodity-numeric->string
(first foreignlist) (second foreignlist))
" (buying "
- (gnc:commodity-numeric->string
+ (gnc-commodity-numeric->string
price-commodity (third foreignlist))
") =? "
- (gnc:commodity-numeric->string
- report-currency (gnc:numeric-zero)))
- (gnc:numeric-zero))
+ (gnc-commodity-numeric->string
+ report-currency (gnc-numeric-zero)))
+ (gnc-numeric-zero))
(begin
- (set! total-foreign (gnc:numeric-add-fixed
+ (set! total-foreign (gnc-numeric-add-fixed
total-foreign (third foreignlist)))
- (set! total-domestic (gnc:numeric-add-fixed
+ (set! total-domestic (gnc-numeric-add-fixed
total-domestic (second foreignlist)))
- (gnc:numeric-div
+ (gnc-numeric-div
total-domestic
total-foreign
GNC-DENOM-AUTO
@@ -210,7 +210,7 @@
(let ((currency-accounts
;;(filter gnc:account-has-shares?
;; -- use all accounts, not only share accounts, since gnucash-1.7
- (gnc:group-get-subaccounts (gnc:get-current-group)))
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group)))
(work-to-do (length commodity-list))
(work-done 0))
(map
@@ -238,32 +238,32 @@
gnc:price-is-not-zero?
(map-in-order
(lambda (a)
- (let* ((transaction-comm (gnc:transaction-get-currency
- (gnc:split-get-parent a)))
- (account-comm (gnc:account-get-commodity
- (gnc:split-get-account a)))
- (share-amount (gnc:numeric-abs
- (gnc:split-get-amount a)))
- (value-amount (gnc:numeric-abs
- (gnc:split-get-value a)))
- (transaction-date (gnc:transaction-get-date-posted
- (gnc:split-get-parent a)))
+ (let* ((transaction-comm (xaccTransGetCurrency
+ (xaccSplitGetParent a)))
+ (account-comm (xaccAccountGetCommodity
+ (xaccSplitGetAccount a)))
+ (share-amount (gnc-numeric-abs
+ (xaccSplitGetAmount a)))
+ (value-amount (gnc-numeric-abs
+ (xaccSplitGetValue a)))
+ (transaction-date (gnc-transaction-get-date-posted
+ (xaccSplitGetParent a)))
(foreignlist
- (if (gnc:commodity-equiv? transaction-comm price-commodity)
+ (if (gnc-commodity-equiv transaction-comm price-commodity)
(list account-comm
share-amount value-amount)
(list transaction-comm
value-amount share-amount))))
;;(warn "get-commodity-inst-prices: value "
- ;; (gnc:commodity-numeric->string
+ ;; (gnc-commodity-numeric->string
;; (first foreignlist) (second foreignlist))
;; " bought shares "
- ;;(gnc:commodity-numeric->string
+ ;;(gnc-commodity-numeric->string
;; price-commodity (third foreignlist)))
;; Try EURO exchange if necessary
- (if (not (gnc:commodity-equiv? (first foreignlist)
+ (if (not (gnc-commodity-equiv (first foreignlist)
report-currency))
(let ((exchanged (gnc:exchange-by-euro-numeric
(first foreignlist) (second foreignlist)
@@ -276,21 +276,21 @@
(list
transaction-date
- (if (not (gnc:commodity-equiv? (first foreignlist)
+ (if (not (gnc-commodity-equiv (first foreignlist)
report-currency))
(begin
(warn "get-commodity-inst-prices: "
"Sorry, currency exchange not yet implemented:"
- (gnc:commodity-numeric->string
+ (gnc-commodity-numeric->string
(first foreignlist) (second foreignlist))
" (buying "
- (gnc:commodity-numeric->string
+ (gnc-commodity-numeric->string
price-commodity (third foreignlist))
") =? "
- (gnc:commodity-numeric->string
- report-currency (gnc:numeric-zero)))
- (gnc:numeric-zero))
- (gnc:numeric-div
+ (gnc-commodity-numeric->string
+ report-currency (gnc-numeric-zero)))
+ (gnc-numeric-zero))
+ (gnc-numeric-div
(second foreignlist)
(third foreignlist)
GNC-DENOM-AUTO
@@ -311,7 +311,7 @@
(let ((currency-accounts
;;(filter gnc:account-has-shares?
;; -- use all accounts, not only share accounts, since gnucash-1.7
- (gnc:group-get-subaccounts (gnc:get-current-group)))
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group)))
(work-to-do (length commodity-list))
(work-done 0))
(map
@@ -344,12 +344,12 @@
(last earlierlist))))
;; (if earlier
;; (warn "earlier"
- ;; (gnc:print-date (first earlier))
- ;; (gnc:numeric-to-double (second earlier))))
+ ;; (gnc-print-date (first earlier))
+ ;; (gnc-numeric-to-double (second earlier))))
;; (if later
;; (warn "later"
- ;; (gnc:print-date (first later))
- ;; (gnc:numeric-to-double (second later))))
+ ;; (gnc-print-date (first later))
+ ;; (gnc-numeric-to-double (second later))))
(if (and earlier later)
(if (< (abs (gnc:timepair-delta date (first earlier)))
@@ -372,8 +372,8 @@
plist date)))
(if price
price
- (gnc:numeric-zero)))
- (gnc:numeric-zero))))
+ (gnc-numeric-zero)))
+ (gnc-numeric-zero))))
@@ -404,8 +404,8 @@
(a 'add (unknown-coll 'total #f))
(b 'add
;; round to (at least) 8 significant digits
- (gnc:numeric-div
- (gnc:numeric-mul
+ (gnc-numeric-div
+ (gnc-numeric-mul
(un->known-coll 'total #f)
((cdadr known-pair) 'total #f)
GNC-DENOM-AUTO
@@ -420,13 +420,13 @@
;; Go through sumlist.
(for-each
(lambda (otherlist)
- (if (not (gnc:commodity-equiv? (car otherlist) report-commodity))
+ (if (not (gnc-commodity-equiv (car otherlist) report-commodity))
(for-each
(lambda (pair)
;; Check whether by any accident the report-commodity
;; appears here.
(if
- (not (gnc:commodity-equiv? (car pair) report-commodity))
+ (not (gnc-commodity-equiv (car pair) report-commodity))
;; pair-{a,b}: Try to find either the currency of
;; otherlist or of pair in reportlist.
(let ((pair-a
@@ -452,21 +452,21 @@
;; Find the pair's currency in reportlist. FIXME:
;; Also try the Euro here.
(pair-b (assoc (car pair) reportlist))
- (rate (gnc:numeric-zero)))
+ (rate (gnc-numeric-zero)))
(if (and (not pair-a) (not pair-b))
;; If neither the currency of otherlist nor of
;; pair was found in reportlist then we can't
;; resolve the exchange rate to this currency.
(warn "gnc:resolve-unknown-comm:"
"can't calculate rate for "
- (gnc:commodity-value->string
+ (gnc-commodity-value->string
(list (car pair) ((caadr pair) 'total #f)))
" = "
- (gnc:commodity-value->string
+ (gnc-commodity-value->string
(list (car otherlist) ((cdadr pair) 'total #f)))
" to "
- (gnc:commodity-value->string
- (list report-commodity (gnc:numeric-zero))))
+ (gnc-commodity-value->string
+ (list report-commodity (gnc-numeric-zero))))
(if (and pair-a pair-b)
;; If both currencies are found then something
;; went wrong inside
@@ -474,10 +474,10 @@
;; better thing to do in this case.
(warn "gnc:resolve-unknown-comm:"
"Oops - exchange rate ambiguity error: "
- (gnc:commodity-value->string
+ (gnc-commodity-value->string
(list (car pair) ((caadr pair) 'total #f)))
" = "
- (gnc:commodity-value->string
+ (gnc-commodity-value->string
(list (car otherlist)
((cdadr pair) 'total #f))))
(let
@@ -493,9 +493,9 @@
(make-newrate (caadr pair)
(cdadr pair) pair-a)))))
;; (warn "created new rate: "
- ;; (gnc:commodity-value->string (list (car
+ ;; (gnc-commodity-value->string (list (car
;; newrate) ((caadr newrate) 'total #f))) "
- ;; = " (gnc:commodity-value->string (list
+ ;; = " (gnc-commodity-value->string (list
;; report-commodity ((cdadr newrate) 'total
;; #f))))
(set! reportlist (cons newrate reportlist))))))
@@ -505,9 +505,9 @@
(let ((newrate (list (car otherlist)
(cons (cdadr pair) (caadr pair)))))
;; (warn "created new rate: "
- ;; (gnc:commodity-value->string (list (car newrate)
+ ;; (gnc-commodity-value->string (list (car newrate)
;; ((caadr newrate) 'total #f))) " = "
- ;; (gnc:commodity-value->string (list
+ ;; (gnc-commodity-value->string (list
;; report-commodity ((cdadr newrate) 'total #f))))
(set! reportlist (cons newrate reportlist)))))
(cadr otherlist))))
@@ -530,7 +530,7 @@
(let ((curr-accounts
;;(filter gnc:account-has-shares? ))
;; -- use all accounts, not only share accounts, since gnucash-1.7
- (gnc:group-get-subaccounts (gnc:get-current-group)))
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group)))
;; sumlist: a multilevel alist. Each element has a commodity
;; as key, and another alist as a value. The value-alist's
;; elements consist of a commodity as a key, and a pair of two
@@ -551,15 +551,15 @@
;; and share-amounts
(for-each
(lambda (a)
- (let* ((transaction-comm (gnc:transaction-get-currency
- (gnc:split-get-parent a)))
- (account-comm (gnc:account-get-commodity
- (gnc:split-get-account a)))
+ (let* ((transaction-comm (xaccTransGetCurrency
+ (xaccSplitGetParent a)))
+ (account-comm (xaccAccountGetCommodity
+ (xaccSplitGetAccount a)))
;; Always use the absolute value here.
- (share-amount (gnc:numeric-abs
- (gnc:split-get-amount a)))
- (value-amount (gnc:numeric-abs
- (gnc:split-get-value a)))
+ (share-amount (gnc-numeric-abs
+ (xaccSplitGetAmount a)))
+ (value-amount (gnc-numeric-abs
+ (xaccSplitGetValue a)))
(tmp (assoc transaction-comm sumlist))
(comm-list (if (not tmp)
(assoc account-comm sumlist)
@@ -580,7 +580,7 @@
(let*
;; Put the amounts in the right place.
((foreignlist
- (if (gnc:commodity-equiv? transaction-comm
+ (if (gnc-commodity-equiv transaction-comm
(car comm-list))
(list account-comm
share-amount value-amount)
@@ -619,8 +619,8 @@
(map
(lambda (e)
(list (car e)
- (gnc:numeric-abs
- (gnc:numeric-div ((cdadr e) 'total #f)
+ (gnc-numeric-abs
+ (gnc-numeric-div ((cdadr e) 'total #f)
((caadr e) 'total #f)
GNC-DENOM-AUTO
(logior (GNC-DENOM-SIGFIGS 8) GNC-RND-ROUND)))))
@@ -642,14 +642,14 @@
;; doesn't check for it. Returns a <gnc-monetary>, or #f if at least
;; one of the currencies is not in the EURO.
(define (gnc:exchange-by-euro foreign domestic date)
- (and (gnc:is-euro-currency domestic)
- (gnc:is-euro-currency (gnc:gnc-monetary-commodity foreign))
+ (and (gnc-is-euro-currency domestic)
+ (gnc-is-euro-currency (gnc:gnc-monetary-commodity foreign))
;; FIXME: implement the date check.
(gnc:make-gnc-monetary
domestic
- (gnc:convert-from-euro
+ (gnc-convert-from-euro
domestic
- (gnc:convert-to-euro (gnc:gnc-monetary-commodity foreign)
+ (gnc-convert-to-euro (gnc:gnc-monetary-commodity foreign)
(gnc:gnc-monetary-amount foreign))))))
@@ -662,7 +662,7 @@
;; #f if the commodities don't match. Therefore, if you use this
;; function in a mixed commodity context, stuff will probably crash.
(define (gnc:exchange-if-same foreign domestic)
- (if (gnc:commodity-equiv? (gnc:gnc-monetary-commodity foreign) domestic)
+ (if (gnc-commodity-equiv (gnc:gnc-monetary-commodity foreign) domestic)
foreign
#f))
@@ -684,10 +684,10 @@
(let ((pair (assoc (gnc:gnc-monetary-commodity foreign)
exchangelist)))
(if (not pair)
- (gnc:numeric-zero)
- (gnc:numeric-mul (gnc:gnc-monetary-amount foreign)
+ (gnc-numeric-zero)
+ (gnc-numeric-mul (gnc:gnc-monetary-amount foreign)
(cadr pair)
- (gnc:commodity-get-fraction domestic)
+ (gnc-commodity-get-fraction domestic)
GNC-RND-ROUND)))))
#f)))))
@@ -700,16 +700,16 @@
(gnc:make-gnc-monetary
domestic
(if price-value
- (gnc:numeric-mul (gnc:gnc-monetary-amount foreign)
+ (gnc-numeric-mul (gnc:gnc-monetary-amount foreign)
price-value
- (gnc:commodity-get-fraction domestic)
+ (gnc-commodity-get-fraction domestic)
GNC-RND-ROUND)
(begin
(warn "gnc:exchange-by-pricevalue-helper: No price found for "
(gnc:monetary->string foreign) " into "
(gnc:monetary->string
- (gnc:make-gnc-monetary domestic (gnc:numeric-zero))))
- (gnc:numeric-zero))))
+ (gnc:make-gnc-monetary domestic (gnc-numeric-zero))))
+ (gnc-numeric-zero))))
#f))
;; Helper for gnc:exchange-by-pricedb-* below. 'price' gets tested for
@@ -723,18 +723,18 @@
domestic
(if price
(let ((result
- (gnc:numeric-mul (gnc:gnc-monetary-amount foreign)
- (gnc:price-get-value price)
- (gnc:commodity-get-fraction domestic)
+ (gnc-numeric-mul (gnc:gnc-monetary-amount foreign)
+ (gnc-price-get-value price)
+ (gnc-commodity-get-fraction domestic)
GNC-RND-ROUND)))
- (gnc:price-unref price)
+ (gnc-price-unref price)
result)
(begin
(warn "gnc:exchange-by-pricedb-helper: No price found for "
(gnc:monetary->string foreign) " into "
(gnc:monetary->string
- (gnc:make-gnc-monetary domestic (gnc:numeric-zero))))
- (gnc:numeric-zero))))
+ (gnc:make-gnc-monetary domestic (gnc-numeric-zero))))
+ (gnc-numeric-zero))))
#f))
;; This is another ready-to-use function for calculation of exchange
@@ -751,8 +751,8 @@
(gnc:exchange-if-same foreign domestic)
(gnc:make-gnc-monetary
domestic
- (gnc:pricedb-convert-balance-latest-price
- (gnc:book-get-pricedb (gnc:get-current-book))
+ (gnc-pricedb-convert-balance-latest-price
+ (gnc-pricedb-get-db (gnc-get-current-book))
(gnc:gnc-monetary-amount foreign)
(gnc:gnc-monetary-commodity foreign)
domestic)))
@@ -774,11 +774,11 @@
(gnc:exchange-if-same foreign domestic)
(gnc:make-gnc-monetary
domestic
- (gnc:pricedb-convert-balance-nearest-price
- (gnc:book-get-pricedb (gnc:get-current-book))
+ (gnc-pricedb-convert-balance-nearest-price
+ (gnc-pricedb-get-db (gnc-get-current-book))
(gnc:gnc-monetary-amount foreign)
(gnc:gnc-monetary-commodity foreign)
- domestic (gnc:timepair-canonical-day-time date))))
+ domestic (timespecCanonicalDayTime date))))
#f))
;; Exchange by the nearest price from pricelist. This function takes
@@ -889,7 +889,7 @@
(foreign
'format
(lambda (curr val)
- (if (gnc:commodity-equiv? domestic curr)
+ (if (gnc-commodity-equiv domestic curr)
(balance 'add domestic val)
(balance 'add domestic
(gnc:gnc-monetary-amount
@@ -917,9 +917,9 @@
(foreign
'format
(lambda (curr val)
- (if (gnc:commodity-equiv? domestic curr)
+ (if (gnc-commodity-equiv domestic curr)
(balance 'add domestic val)
- (if (gnc:commodity-is-currency? curr)
+ (if (gnc-commodity-is-currency curr)
(balance 'add curr val)
(balance 'add domestic
(gnc:gnc-monetary-amount
@@ -932,9 +932,9 @@
;; Returns the number of commodities in a commodity-collector.
;; (If this were implemented as a record, I would be able to
;; just (length ...) the alist, but....)
-(define (gnc:commodity-collector-commodity-count collector)
+(define (gnc-commodity-collector-commodity-count collector)
(let ((commodities 0))
- (gnc:commodity-collector-map
+ (gnc-commodity-collector-map
collector
(lambda (comm amt)
(set! commodities (+ commodities 1))))
@@ -944,11 +944,11 @@
(define (gnc:uniform-commodity? amt report-commodity)
;; function to see if the commodity-collector amt
;; contains any foreign commodities
- (let ((elts (gnc:commodity-collector-commodity-count amt))
+ (let ((elts (gnc-commodity-collector-commodity-count amt))
)
(or (equal? elts 0)
(and (equal? elts 1)
- (gnc:commodity-collector-contains-commodity?
+ (gnc-commodity-collector-contains-commodity?
amt report-commodity)
)
)
Modified: gnucash/trunk/src/report/report-system/gnc-report.c
===================================================================
--- gnucash/trunk/src/report/report-system/gnc-report.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/gnc-report.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -34,7 +34,7 @@
/* Fow now, this is global, like it was in guile. It _should_ be per-book. */
static GHashTable *reports = NULL;
-static int report_next_serial_id = 0;
+static gint report_next_serial_id = 0;
static void
gnc_report_init_table(void)
@@ -67,7 +67,7 @@
return report;
}
-int gnc_report_add(SCM report)
+gint gnc_report_add(SCM report)
{
SCM get_id = scm_c_eval_string("gnc:report-id");
SCM value;
@@ -133,7 +133,7 @@
}
gboolean
-gnc_run_report (int report_id, char ** data)
+gnc_run_report (gint report_id, char ** data)
{
const gchar *free_data;
SCM scm_text;
@@ -157,7 +157,7 @@
gboolean
gnc_run_report_id_string (const char * id_string, char **data)
{
- int report_id;
+ gint report_id;
g_return_val_if_fail (id_string != NULL, FALSE);
g_return_val_if_fail (data != NULL, FALSE);
Modified: gnucash/trunk/src/report/report-system/gnc-report.h
===================================================================
--- gnucash/trunk/src/report/report-system/gnc-report.h 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/gnc-report.h 2006-10-15 19:02:05 UTC (rev 15024)
@@ -28,7 +28,7 @@
#include <glib.h>
#include <libguile.h>
-gboolean gnc_run_report (int report_id, char ** data);
+gboolean gnc_run_report (gint report_id, char ** data);
gboolean gnc_run_report_id_string (const char * id_string, char **data);
/**
@@ -40,7 +40,7 @@
SCM gnc_report_find(gint id);
void gnc_report_remove_by_id(gint id);
-int gnc_report_add(SCM report);
+gint gnc_report_add(SCM report);
void gnc_reports_flush_global(void);
GHashTable *gnc_reports_get_global(void);
Modified: gnucash/trunk/src/report/report-system/gncmod-report-system.c
===================================================================
--- gnucash/trunk/src/report/report-system/gncmod-report-system.c 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/gncmod-report-system.c 2006-10-15 19:02:05 UTC (rev 15024)
@@ -38,13 +38,7 @@
return g_strdup("Core components of GnuCash report generation system");
}
-static void
-lmod(char * mn)
-{
- char * form = g_strdup_printf("(use-modules %s)\n", mn);
- scm_c_eval_string(form);
- g_free(form);
-}
+extern SCM scm_init_sw_report_system_module(void);
int
libgncmod_report_system_LTX_gnc_module_init(int refcount) {
@@ -56,8 +50,9 @@
if(!gnc_module_load("gnucash/app-utils", 0)) {
return FALSE;
}
+ scm_init_sw_report_system_module();
- lmod("(gnucash report report-system)");
+ scm_c_eval_string("(use-modules (gnucash report report-system))");
/* if this is the first time the module's being loaded, initialize
* the relative date system */
Deleted: gnucash/trunk/src/report/report-system/gw-report-system-spec.scm
===================================================================
--- gnucash/trunk/src/report/report-system/gw-report-system-spec.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/gw-report-system-spec.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -1,45 +0,0 @@
-(define-module (g-wrapped gw-report-system-spec))
-
-(debug-set! maxdepth 100000)
-(debug-set! stack 200000)
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(use-modules (g-wrapped gw-engine-spec))
-
-(let ((ws (gw:new-wrapset "gw-report-system")))
-
- (gw:wrapset-depends-on ws "gw-standard")
- (gw:wrapset-depends-on ws "gw-wct")
- (gw:wrapset-depends-on ws "gw-glib")
-
- (gw:wrapset-set-guile-module! ws '(g-wrapped gw-report-system))
-
- (gw:wrapset-add-cs-declarations!
- ws
- (lambda (wrapset client-wrapset)
- (list
- "#include <gnc-report.h>\n"
- )))
-
- (gw:wrap-function
- ws
- 'gnc:find-report
- '<gw:scm>
- "gnc_report_find"
- '((<gw:int> id))
- "Find report by id")
-
- (gw:wrap-function
- ws
- 'gnc:report-add
- '<gw:int>
- "gnc_report_add"
- '((<gw:scm> report))
- "Add report, returns id")
-
- )
Modified: gnucash/trunk/src/report/report-system/html-acct-table.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-acct-table.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/html-acct-table.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -152,12 +152,12 @@
;; the commodity into which to convert any balances containing
;; foreign currencies. the balance will be converted using
;; the exchange function exchange-fn. the default is the
-;; currency returned by (gnc:default-report-currency). [CAS:
+;; currency returned by (gnc-default-report-currency). [CAS:
;; what if I don't want the report to have a
;; "report-commodity"? Say e.g. I want to show each account
;; balance in its native commodity? I can see the benefit of
;; individual reports that have a report-commodity using
-;; gnc:default-report-currency to set the default value for a
+;; gnc-default-report-currency to set the default value for a
;; report-commodity option. But, with the default sucked in
;; here, in what is supposed to be a more general api, means
;; reports can't specify NO report-commodity. ]
@@ -268,17 +268,17 @@
;; account-guid: guid
;;
;; the guid of the account in the current row, as returned by
-;; gnc:account-get-guid.
+;; gncAccountGetGUID.
;;
;; account-desc: string?
;;
;; the account description of the account in the current row,
-;; as returned by gnc:account-get-description.
+;; as returned by xaccAccountGetDescription.
;;
;; account-notes: string?
;;
;; the account notes of the account in the current row, as
-;; returned by gnc:account-get-notes.
+;; returned by xaccAccountGetNotes.
;;
;; account-path: string
;;
@@ -295,7 +295,7 @@
;; account-code: string
;;
;; the account of the account in the current row, as returned
-;; by gnc:account-get-code.
+;; by xaccAccountGetCode.
;;
;; account-anchor: text(maybe?)
;;
@@ -406,13 +406,7 @@
;; account-commodity: commodity
;;
;; returns the default commodity of the account in the current
-;; row, as returned by gnc:account-get-commodity. the g-wrap
-;; documentation string reads: "Get the commodity in which the
-;; account is denominated." note: afaik, gnucash accounts can
-;; only contain one commodity; but it's plausible that future
-;; releases may permit mixed-commodity accounts, so it's
-;; probably safest not to assume that an account contains only
-;; its default commodity.
+;; row, as returned by xaccAccountGetCommodity.
;;
;; account-type: account_type
;;
@@ -551,14 +545,14 @@
;; some useful predicates to export
(define (gnc:account-code-less-p a b)
- (string<? (gnc:account-get-code a)
- (gnc:account-get-code b)))
+ (string<? (xaccAccountGetCode a)
+ (xaccAccountGetCode b)))
(define (gnc:account-name-less-p a b)
- (string<? (gnc:account-get-name a)
- (gnc:account-get-name b)))
+ (string<? (xaccAccountGetName a)
+ (xaccAccountGetName b)))
(define (gnc:account-path-less-p a b)
- (string<? (gnc:account-get-full-name a)
- (gnc:account-get-full-name b)))
+ (string<? (gnc-account-get-full-name a)
+ (gnc-account-get-full-name b)))
(define (gnc:html-acct-table-add-accounts! acct-table accounts)
;;
@@ -599,7 +593,7 @@
(end-date (or (get-val env 'end-date)
(cons 'absolute (cons (current-time) 0))))
(report-commodity (or (get-val env 'report-commodity)
- (gnc:default-report-currency)))
+ (gnc-default-report-currency)))
;; BUG: other code expects a real function here, maybe
;; someone was thinking price-source?
(exchange-fn (or (get-val env 'exchange-fn)
@@ -631,7 +625,7 @@
)
))
;; local variables
- (toplvl-accts (gnc:group-get-account-list (gnc:get-current-group)))
+ (toplvl-accts (xaccGroupGetAccountListSorted (gnc-get-current-group)))
(acct-depth-reached 0)
(logi-depth-reached (if depth-limit (- depth-limit 1) 0))
(disp-depth-reached 0)
@@ -696,14 +690,14 @@
(let ((this-collector
(my-get-balance-nosub account start-date end-date)))
(for-each
- (lambda (x) (if x (gnc:commodity-collector-merge this-collector x)))
+ (lambda (x) (if x (gnc-commodity-collector-merge this-collector x)))
(gnc:group-map-all-accounts
(lambda (a)
;; Important: Calculate the balance if and only if the
;; account a is shown, i.e. (use-acct? a) == #t.
(and (use-acct? a)
(my-get-balance-nosub a start-date end-date)))
- (gnc:account-get-children account)))
+ (xaccAccountGetChildren account)))
this-collector))
@@ -718,23 +712,23 @@
(let* ((subaccts (gnc:account-get-immediate-subaccounts acct))
;; assign output parameters
(account acct)
- (account-name (gnc:account-get-name acct))
- (account-code (gnc:account-get-code acct))
- (account-path (gnc:account-get-full-name acct))
+ (account-name (xaccAccountGetName acct))
+ (account-code (xaccAccountGetCode acct))
+ (account-path (gnc-account-get-full-name acct))
(account-anchor (gnc:html-account-anchor acct))
- (account-parent (gnc:account-get-parent-account acct))
+ (account-parent (xaccAccountGetParentAccount acct))
(account-children subaccts)
(account-depth acct-depth)
(logical-depth logi-depth)
- (account-commodity (gnc:account-get-commodity acct))
- (account-type (gnc:account-get-type acct))
- ;; N.B.: gnc:account-get-type-string really should be
+ (account-commodity (xaccAccountGetCommodity acct))
+ (account-type (xaccAccountGetType acct))
+ ;; N.B.: xaccAccountGetTypeStr really should be
;; called gnc:account-type-get-string
- (account-type-string (gnc:account-get-type-string
- (gnc:account-get-type acct)))
- (account-guid (gnc:account-get-guid acct))
- (account-description (gnc:account-get-description acct))
- (account-notes (gnc:account-get-notes acct))
+ (account-type-string (xaccAccountGetTypeStr
+ (xaccAccountGetType acct)))
+ (account-guid (gncAccountGetGUID acct))
+ (account-description (xaccAccountGetDescription acct))
+ (account-notes (xaccAccountGetNotes acct))
;; These next two are commodity-collectors.
(account-bal (my-get-balance-nosub
acct start-date end-date))
@@ -788,7 +782,7 @@
(or (not (use-acct? acct))
;; ok, so we'll consider parent accounts with zero
;; recursive-bal to be zero balance leaf accounts
- (and (gnc:commodity-collector-allzero? recursive-bal)
+ (and (gnc-commodity-collector-allzero? recursive-bal)
(equal? zero-mode 'omit-leaf-acct))
(begin
(set! row-env
@@ -817,7 +811,7 @@
(or (not (use-acct? acct))
(not subtotal-mode)
;; ditto that remark concerning zero recursive-bal...
- (and (gnc:commodity-collector-allzero? recursive-bal)
+ (and (gnc-commodity-collector-allzero? recursive-bal)
(equal? zero-mode 'omit-leaf-acct))
;; ignore use-acct for subtotals...?
;; (not (use-acct? acct))
@@ -1058,7 +1052,7 @@
(gnc:html-table-append-row/markup! html-table row-markup row)
(gnc:html-table-append-row! html-table row))))
-(define (gnc:commodity-table amount report-commodity exchange-fn)
+(define (gnc-commodity-table amount report-commodity exchange-fn)
;; this creates a small two-column table listing each commodity
;; balance and its respective report balance. note that this
;; shows report-commodity amounts twice: first as a commodity
@@ -1067,7 +1061,7 @@
;; readable.
(let* ((table (gnc:make-html-table))
)
- (gnc:commodity-collector-map
+ (gnc-commodity-collector-map
amount
(lambda (curr val)
(let ((bal (gnc:make-gnc-monetary curr val)))
@@ -1175,14 +1169,14 @@
(or (if (equal? mode #t) 'show-balance mode)
'show-balance)
))
- (reverse-balance (gnc:account-reverse-balance? acct))
+ (reverse-balance (gnc-reverse-balance acct))
(native-comm?
(lambda (amt)
(gnc:uniform-commodity? amt report-commodity)))
;; amount is either a <gnc:monetary> or #f
(amount (and comm-amt
(if (and (equal? zero-mode 'omit-balance)
- (gnc:commodity-collector-allzero?
+ (gnc-commodity-collector-allzero?
comm-amt)
)
#f
@@ -1204,7 +1198,7 @@
(equal?
row-type 'account-row)
)
- gnc:commodity-table
+ gnc-commodity-table
gnc:sum-collector-commodity
)
amt
@@ -1216,7 +1210,7 @@
; (equal?
; row-type 'account-row)
; )
-; (gnc:commodity-table
+; (gnc-commodity-table
; amt
; report-commodity
; exchange-fn)
Modified: gnucash/trunk/src/report/report-system/html-barchart.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-barchart.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/html-barchart.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -273,7 +273,7 @@
(let ((n (read)))
(if (number? n) n 0.0)))))
((gnc:gnc-numeric? elt)
- (gnc:numeric-to-double elt))
+ (gnc-numeric-to-double elt))
(#t
0.0)))
Modified: gnucash/trunk/src/report/report-system/html-piechart.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-piechart.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/html-piechart.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -143,7 +143,7 @@
(let ((n (read)))
(if (number? n) (abs n) 0.0)))))
((gnc:gnc-numeric? elt)
- (abs (gnc:numeric-to-double elt)))
+ (abs (gnc-numeric-to-double elt)))
(#t
0.0)))
nlist))
Modified: gnucash/trunk/src/report/report-system/html-scatter.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-scatter.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/html-scatter.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -134,7 +134,7 @@
(let ((n (read)))
(if (number? n) n 0.0)))))
((gnc:gnc-numeric? elt)
- (gnc:numeric-to-double elt))
+ (gnc-numeric-to-double elt))
(#t
0.0)))
Modified: gnucash/trunk/src/report/report-system/html-style-info.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-style-info.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/html-style-info.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -281,12 +281,12 @@
datum)
(define (gnc:default-html-gnc-numeric-renderer datum params)
- (gnc:amount->string datum (gnc:default-print-info #f)))
+ (xaccPrintAmount datum (gnc-default-print-info #f)))
(define (gnc:default-html-gnc-monetary-renderer datum params)
- (let* ((result (gnc:amount->string
+ (let* ((result (xaccPrintAmount
(gnc:gnc-monetary-amount datum)
- (gnc:commodity-print-info
+ (gnc-commodity-print-info
(gnc:gnc-monetary-commodity datum) #t)))
(ind (string-index result (integer->char 164))))
(if ind
@@ -295,9 +295,9 @@
result)))
(define (gnc:default-html-number-renderer datum params)
- (gnc:amount->string
- (gnc:double-to-gnc-numeric datum 100 GNC-RND-ROUND)
- (gnc:default-print-info #f)))
+ (xaccPrintAmount
+ (double-to-gnc-numeric datum 100 GNC-RND-ROUND)
+ (gnc-default-print-info #f)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Modified: gnucash/trunk/src/report/report-system/html-style-sheet.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-style-sheet.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/html-style-sheet.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -126,7 +126,7 @@
(record-accessor <html-style-sheet> 'style))
(define gnc:current-saved-stylesheets
- (gnc:build-dotgnucash-path "stylesheets-2.0"))
+ (gnc-build-dotgnucash-path "stylesheets-2.0"))
(define (gnc:save-style-sheet-options)
(let ((port (false-if-exception
Modified: gnucash/trunk/src/report/report-system/html-utilities.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-utilities.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/html-utilities.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -30,26 +30,26 @@
(list)))
(define (gnc:register-guid type guid)
- (gnc:html-build-url gnc:url-type-register (string-append type guid) #f))
+ (gnc-build-url URL-TYPE-REGISTER (string-append type guid) ""))
(define (gnc:account-anchor-text acct)
- (gnc:register-guid "acct-guid=" (gnc:account-get-guid acct)))
+ (gnc:register-guid "acct-guid=" (gncAccountGetGUID acct)))
(define (gnc:split-anchor-text split)
- (gnc:register-guid "split-guid=" (gnc:split-get-guid split)))
+ (gnc:register-guid "split-guid=" (gncSplitGetGUID split)))
(define (gnc:transaction-anchor-text trans)
- (gnc:register-guid "trans-guid=" (gnc:transaction-get-guid trans)))
+ (gnc:register-guid "trans-guid=" (gncTransGetGUID trans)))
(define (gnc:report-anchor-text report-id)
- (gnc:html-build-url gnc:url-type-report
+ (gnc-build-url URL-TYPE-REPORT
(string-append "id=" (number->string report-id))
- #f))
+ ""))
(define (gnc:price-anchor-text price)
- (gnc:html-build-url gnc:url-type-price
- (string-append "price-guid=" (gnc:price-get-guid price))
- #f))
+ (gnc-build-url URL-TYPE-PRICE
+ (string-append "price-guid=" (gncPriceGetGUID price))
+ ""))
;; Make a new report and return the anchor to it. The new report of
;; type 'reportname' will have the option values copied from
@@ -81,11 +81,11 @@
(gnc:make-html-text (if acct
(gnc:html-markup-anchor
(gnc:account-anchor-text acct)
- (gnc:account-get-name acct))
+ (xaccAccountGetName acct))
"")))
(define (gnc:html-split-anchor split text)
- (gnc:make-html-text (if (gnc:split-get-account split)
+ (gnc:make-html-text (if (xaccSplitGetAccount split)
(gnc:html-markup-anchor
(gnc:split-anchor-text split)
text)
@@ -102,7 +102,7 @@
(gnc:price-anchor-text price)
(if value
value
- (gnc:price-get-value price)))
+ (gnc-price-get-value price)))
value)))
(define (gnc:assign-colors num-colors)
@@ -266,13 +266,13 @@
(if (and (not is-stock-account?)
;; FIXME: need to check whether we really have only one
;; foreign currency if is-stock-account==#t.
- (gnc:commodity-equiv? my-commodity report-commodity))
+ (gnc-commodity-equiv my-commodity report-commodity))
;; usual case: the account balance in terms of report
;; commodity
(commodity-row-helper!
my-name #f
(if balance
- (gnc:commodity-collector-assoc
+ (gnc-commodity-collector-assoc
balance report-commodity reverse-balance?)
#f)
main-row-style)
@@ -281,7 +281,7 @@
;; (loop below). Is also used if is-stock-account? is true.
(let ((my-balance
(if balance
- (gnc:commodity-collector-assoc
+ (gnc-commodity-collector-assoc
balance my-commodity reverse-balance?) #f)))
(set! already-printed my-commodity)
(commodity-row-helper!
@@ -294,12 +294,12 @@
;; balance and its corresponding value in the
;; report-currency. One row for each non-report-currency.
(if (and balance (not is-stock-account?))
- (gnc:commodity-collector-map
+ (gnc-commodity-collector-map
balance
(lambda (curr val)
- (if (or (gnc:commodity-equiv? curr report-commodity)
+ (if (or (gnc-commodity-equiv curr report-commodity)
(and already-printed
- (gnc:commodity-equiv? curr already-printed)))
+ (gnc-commodity-equiv curr already-printed)))
'()
(let ((bal
(if reverse-balance?
@@ -428,8 +428,8 @@
(let ((table (gnc:make-html-table))
(work-to-do 0)
(work-done 0)
- (topl-accounts (gnc:group-get-account-list
- (gnc:get-current-group))))
+ (topl-accounts (xaccGroupGetAccountListSorted
+ (gnc-get-current-group))))
;; The following functions are defined inside build-acct-table
;; to avoid passing tons of arguments which are constant anyway
@@ -456,7 +456,7 @@
(let ((this-collector (my-get-balance-nosub account)))
(for-each
(lambda (x) (if x
- (gnc:commodity-collector-merge
+ (gnc-commodity-collector-merge
this-collector x )))
(gnc:group-map-all-accounts
(lambda (a)
@@ -464,7 +464,7 @@
;; account a is shown, i.e. (use-acct? a) == #t.
(and (use-acct? a)
(my-get-balance-nosub a)))
- (gnc:account-get-children account)))
+ (xaccAccountGetChildren account)))
this-collector))
;; Use this account in the account hierarchy? Check against the
@@ -474,7 +474,7 @@
(define (use-acct? a)
(or (member a accounts)
(and show-subaccts?
- (let ((parent (gnc:account-get-parent-account a)))
+ (let ((parent (xaccAccountGetParentAccount a)))
(and parent
(use-acct? parent))))))
@@ -482,7 +482,7 @@
;; preference.
(define (show-acct? a)
(and (or show-zero-entries?
- (not (gnc:commodity-collector-allzero?
+ (not (gnc-commodity-collector-allzero?
(my-get-balance a))))
(use-acct? a)))
@@ -491,8 +491,8 @@
(define (sort-fn accts)
(sort accts
(lambda (a b)
- (string<? (gnc:account-get-code a)
- (gnc:account-get-code b)))))
+ (string<? (xaccAccountGetCode a)
+ (xaccAccountGetCode b)))))
;; Remove the last appended row iff *all* its fields are empty
;; (==#f) or have an html-table-cell which in turn is empty
@@ -537,9 +537,9 @@
(if show-other-curr?
(add-commodity-rows! current-depth
(gnc:html-account-anchor acct)
- (gnc:account-get-commodity acct)
+ (xaccAccountGetCommodity acct)
(my-get-balance acct)
- (gnc:account-reverse-balance? acct)
+ (gnc-reverse-balance acct)
(gnc:account-has-shares? acct)
row-style row-style
#f #f)
@@ -548,7 +548,7 @@
(gnc:html-account-anchor acct)
(gnc:sum-collector-commodity (my-get-balance acct)
report-commodity exchange-fn)
- (gnc:account-reverse-balance? acct)
+ (gnc-reverse-balance acct)
row-style
#f #f))))
@@ -627,9 +627,9 @@
;; includes the appropriate subaccounts.)
(let ((subbalance (gnc:accounts-get-balance-helper
subaccounts my-get-balance
- gnc:account-reverse-balance?)))
+ gnc-reverse-balance)))
(if thisbalance
- (gnc:commodity-collector-merge subbalance thisbalance))
+ (gnc-commodity-collector-merge subbalance thisbalance))
subbalance)
heading-style
#t #f)))))
@@ -662,7 +662,7 @@
subaccts
(gnc:accounts-get-balance-helper
(list acct) my-get-balance-nosub
- gnc:account-reverse-balance?)
+ gnc-reverse-balance)
show-parent-total?))))
(sort-fn accnts)))))
@@ -751,18 +751,18 @@
((exchanged
(exchange-fn
(gnc:make-gnc-monetary commodity
- (gnc:numeric-create 1000 1))
+ (gnc-numeric-create 1000 1))
common-commodity)))
(gnc:html-table-append-row!
table
(list
(gnc:make-gnc-monetary commodity
- (gnc:numeric-create 1 1))
+ (gnc-numeric-create 1 1))
(gnc:make-gnc-monetary
common-commodity
- (gnc:numeric-div
+ (gnc-numeric-div
(gnc:gnc-monetary-amount exchanged)
- (gnc:numeric-create 1000 1)
+ (gnc-numeric-create 1000 1)
GNC-DENOM-AUTO
(logior (GNC-DENOM-SIGFIGS 6)
GNC-RND-ROUND)))))))
@@ -804,10 +804,10 @@
p
(gnc:html-markup-p
(gnc:html-markup-anchor
- (gnc:html-build-url gnc:url-type-options
+ (gnc-build-url URL-TYPE-OPTIONS
(string-append "report-id="
(sprintf #f "%a" report-id))
- #f)
+ "")
(_ "Edit report options")))))
p))
@@ -828,10 +828,10 @@
p
(gnc:html-markup-p
(gnc:html-markup-anchor
- (gnc:html-build-url gnc:url-type-options
+ (gnc-build-url URL-TYPE-OPTIONS
(string-append "report-id="
(sprintf #f "%a" report-id))
- #f)
+ "")
(_ "Edit report options")))))
p))
@@ -850,9 +850,9 @@
p
(gnc:html-markup-p
(gnc:html-markup-anchor
- (gnc:html-build-url gnc:url-type-options
+ (gnc-build-url URL-TYPE-OPTIONS
(string-append "report-id="
(sprintf #f "%a" report-id))
- #f)
+ "")
(_ "Edit report options")))))
p))
Modified: gnucash/trunk/src/report/report-system/options-utilities.scm
===================================================================
--- gnucash/trunk/src/report/report-system/options-utilities.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/options-utilities.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -146,7 +146,7 @@
pagename name-report-currency
sort-tag
(N_ "Select the currency to display the values of this report in.")
- (gnc:default-report-currency))))
+ (gnc-default-report-currency))))
;; These are common options for the selection of the report's
;; currency/commodity.
Copied: gnucash/trunk/src/report/report-system/report-system.i (from rev 15023, gnucash/branches/swig-redo/src/report/report-system/report-system.i)
Modified: gnucash/trunk/src/report/report-system/report-system.scm
===================================================================
--- gnucash/trunk/src/report/report-system/report-system.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/report-system.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -13,8 +13,6 @@
(use-modules (srfi srfi-19))
(use-modules (gnucash gnc-module))
-(use-modules (g-wrap gw-glib))
-
(require 'hash-table)
(gnc:module-load "gnucash/engine" 0)
@@ -25,7 +23,7 @@
(export gnc:get-match-commodity-splits)
(export gnc:get-match-commodity-splits-sorted)
(export gnc:get-all-commodity-splits )
-(export gnc:commodity-numeric->string)
+(export gnc-commodity-numeric->string)
(export gnc:exchange-by-euro-numeric)
(export gnc:get-commodity-totalavg-prices)
(export gnc:get-commoditylist-totalavg-prices)
@@ -48,7 +46,7 @@
(export gnc:case-exchange-time-fn)
(export gnc:sum-collector-commodity)
(export gnc:sum-collector-stocks)
-(export gnc:commodity-collector-contains-commodity?)
+(export gnc-commodity-collector-contains-commodity?)
;; options-utilities.scm
@@ -441,7 +439,7 @@
(export gnc:html-table-add-labeled-amount-line!)
(export gnc:html-table-add-account-balances)
(export gnc:second-html-build-acct-table)
-(export gnc:commodity-table)
+(export gnc-commodity-table)
(export gnc:uniform-commodity?)
;; html-table.scm
@@ -554,7 +552,7 @@
(export list-ref-safe)
(export list-set-safe!)
-(export gnc:commodity-value->string)
+(export gnc-commodity-value->string)
(export gnc:monetary->string)
(export gnc:account-has-shares?)
(export gnc:account-is-stock?)
@@ -573,7 +571,7 @@
(export gnc:make-value-collector)
(export gnc:make-numeric-collector)
(export gnc:make-commodity-collector)
-(export gnc:commodity-collector-commodity-count)
+(export gnc-commodity-collector-commodity-count)
(export gnc:account-get-balance-at-date)
(export gnc:account-get-comm-balance-at-date)
(export gnc:accounts-get-balance-helper)
@@ -595,7 +593,7 @@
(export gnc:report-percent-done)
(export gnc:report-finished)
(export gnc:accounts-count-splits)
-(export gnc:commodity-collector-allzero?)
+(export gnc-commodity-collector-allzero?)
(export gnc:account-get-trans-type-balance-interval)
(export gnc:account-get-pos-trans-total-interval)
(export gnc:double-col)
@@ -616,4 +614,4 @@
(load-from-path "report-utilities.scm")
(load-from-path "report.scm")
-(gnc:hook-add-dangler gnc:*save-options-hook* gnc:save-style-sheet-options)
+(gnc-hook-add-scm-dangler HOOK-SAVE-OPTIONS gnc:save-style-sheet-options)
Modified: gnucash/trunk/src/report/report-system/report-utilities.scm
===================================================================
--- gnucash/trunk/src/report/report-system/report-utilities.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/report-utilities.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -38,54 +38,44 @@
;; pair is a list of one gnc:commodity and one gnc:numeric
;; value. Deprecated -- use <gnc-monetary> instead.
-(define (gnc:commodity-value->string pair)
- (gnc:amount->string
- (cadr pair) (gnc:commodity-print-info (car pair) #t)))
+(define (gnc-commodity-value->string pair)
+ (xaccPrintAmount
+ (cadr pair) (gnc-commodity-print-info (car pair) #t)))
;; Just for convenience. But in reports you should rather stick to the
;; style-info mechanism and simple plug the <gnc-monetary> into the
;; html-renderer.
(define (gnc:monetary->string value)
- (gnc:amount->string
+ (xaccPrintAmount
(gnc:gnc-monetary-amount value)
- (gnc:commodity-print-info (gnc:gnc-monetary-commodity value) #t)))
+ (gnc-commodity-print-info (gnc:gnc-monetary-commodity value) #t)))
;; True if the account is of type currency, stock, or mutual-fund
(define (gnc:account-has-shares? account)
- ;; FYI: The val->sym function used to be called
- ;; gw:enum-GNCAccountType-val->sym
- (let ((type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type account)
- #f)))
- (member type '(stock mutual-fund currency))))
+ (let ((type (xaccAccountGetType account)))
+ (member type (list ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY))))
;; True if the account is of type stock or mutual-fund
(define (gnc:account-is-stock? account)
- (let ((type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type account)
- #f)))
- (member type '(stock mutual-fund))))
+ (let ((type (xaccAccountGetType account)))
+ (member type (list ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL))))
;; True if the account is of type income or expense
(define (gnc:account-is-inc-exp? account)
- (let ((type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type account)
- #f)))
- (member type '(income expense))))
+ (let ((type (xaccAccountGetType account)))
+ (member type (list ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE))))
;; Returns only those accounts out of the list <accounts> which have
;; one of the type identifiers in typelist.
(define (gnc:filter-accountlist-type typelist accounts)
(filter (lambda (a)
- (member (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type a) #f)
- typelist) )
+ (member (xaccAccountGetType a) typelist))
accounts))
;; Decompose a given list of accounts 'accounts' into an alist
;; according to their types. Each element of alist is a list, whose
-;; first element is the type-symbol, e.g. 'assets, and the rest (cdr)
+;; first element is the type, e.g. ACCT-TYPE-ASSET, and the rest (cdr)
;; of the element is the list of accounts which belong to that
;; category.
(define (gnc:decompose-accountlist accounts)
@@ -93,37 +83,42 @@
(car x)
(gnc:filter-accountlist-type (cdr x) accounts)))
(list
- (cons 'asset
- '(asset bank cash checking savings money-market receivable
- stock mutual-fund currency))
- (cons 'liability '(liability payable credit credit-line))
- (cons 'equity '(equity))
- (cons 'income '(income))
- (cons 'expense '(expense)))))
+ (cons ACCT-TYPE-ASSET
+ (list ACCT-TYPE-ASSET ACCT-TYPE-BANK ACCT-TYPE-CASH
+ ACCT-TYPE-CHECKING ACCT-TYPE-SAVINGS
+ ACCT-TYPE-MONEYMRKT ACCT-TYPE-RECEIVABLE
+ ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL
+ ACCT-TYPE-CURRENCY))
+ (cons ACCT-TYPE-LIABILITY
+ (list ACCT-TYPE-LIABILITY ACCT-TYPE-PAYABLE ACCT-TYPE-CREDIT
+ ACCT-TYPE-CREDITLINE))
+ (cons ACCT-TYPE-EQUITY (list ACCT-TYPE-EQUITY))
+ (cons ACCT-TYPE-INCOME (list ACCT-TYPE-INCOME))
+ (cons ACCT-TYPE-EXPENSE (list ACCT-TYPE-EXPENSE)))))
;; Returns the name of the account type as a string, and in its plural
-;; form (as opposed to gnc:account-get-type-string which gives the
+;; form (as opposed to xaccAccountGetTypeStr which gives the
;; singular form of the word).
(define (gnc:account-get-type-string-plural type)
(assoc-ref
(list
- (cons 'bank (_ "Bank"))
- (cons 'cash (_ "Cash"))
- (cons 'credit (_ "Credits"))
- (cons 'asset (_ "Assets"))
- (cons 'liability (_ "Liabilities"))
- (cons 'stock (_ "Stocks"))
- (cons 'mutual-fund (_ "Mutual Funds"))
- (cons 'currency (_ "Currencies"))
- (cons 'income (_ "Income"))
- (cons 'expense (_ "Expenses"))
- (cons 'equity (_ "Equities"))
- (cons 'checking (_ "Checking"))
- (cons 'savings (_ "Savings"))
- (cons 'money-market (_ "Money Market"))
- (cons 'receivable (_ "Accounts Receivable"))
- (cons 'payable (_ "Accounts Payable"))
- (cons 'credit-line (_ "Credit Lines")))
+ (cons ACCT-TYPE-BANK (_ "Bank"))
+ (cons ACCT-TYPE-CASH (_ "Cash"))
+ (cons ACCT-TYPE-CREDIT (_ "Credits"))
+ (cons ACCT-TYPE-ASSET (_ "Assets"))
+ (cons ACCT-TYPE-LIABILITY (_ "Liabilities"))
+ (cons ACCT-TYPE-STOCK (_ "Stocks"))
+ (cons ACCT-TYPE-MUTUAL (_ "Mutual Funds"))
+ (cons ACCT-TYPE-CURRENCY (_ "Currencies"))
+ (cons ACCT-TYPE-INCOME (_ "Income"))
+ (cons ACCT-TYPE-EXPENSE (_ "Expenses"))
+ (cons ACCT-TYPE-EQUITY (_ "Equities"))
+ (cons ACCT-TYPE-CHECKING (_ "Checking"))
+ (cons ACCT-TYPE-SAVINGS (_ "Savings"))
+ (cons ACCT-TYPE-MONEYMRKT (_ "Money Market"))
+ (cons ACCT-TYPE-RECEIVABLE (_ "Accounts Receivable"))
+ (cons ACCT-TYPE-PAYABLE (_ "Accounts Payable"))
+ (cons ACCT-TYPE-CREDITLINE (_ "Credit Lines")))
type))
;; Get the list of all different commodities that are used within the
@@ -131,10 +126,10 @@
(define (gnc:accounts-get-commodities accounts exclude-commodity)
(delete exclude-commodity
(delete-duplicates
- (sort (map gnc:account-get-commodity accounts)
+ (sort (map xaccAccountGetCommodity accounts)
(lambda (a b)
- (string<? (or (gnc:commodity-get-mnemonic a) "")
- (or (gnc:commodity-get-mnemonic b) "")))))))
+ (string<? (or (gnc-commodity-get-mnemonic a) "")
+ (or (gnc-commodity-get-mnemonic b) "")))))))
;; Returns the depth of the current account hierarchy, that is, the
@@ -152,10 +147,10 @@
(+ 1 (accounts-get-children-depth children)))))
accounts)))
(accounts-get-children-depth
- (gnc:group-get-account-list (gnc:get-current-group))))
+ (xaccGroupGetAccountListSorted (gnc-get-current-group))))
(define (gnc:split-get-corr-account-full-name split)
- (gnc:split-get-corr-account-full-name-internal split))
+ (xaccSplitGetCorrAccountFullName split))
;; get children that are the direct descendant of this acct
@@ -167,12 +162,12 @@
(with-output-to-string (lambda () (write a2)))))
(string=? a1-str a2-str)))
- (let* ((group (gnc:account-get-children acct))
- (children (gnc:group-get-subaccounts group))
+ (let* ((group (xaccAccountGetChildren acct))
+ (children (xaccGroupGetSubAccountsSorted group))
(retval '()))
(for-each
(lambda (child)
- (if (acctptr-eq? acct (gnc:account-get-parent-account child))
+ (if (acctptr-eq? acct (xaccAccountGetParentAccount child))
(begin
(set! retval (cons child retval)))))
children)
@@ -180,15 +175,15 @@
;; get all children of this account
(define (gnc:account-get-all-subaccounts acct)
- (let ((group (gnc:account-get-children acct)))
- (gnc:group-get-subaccounts group)))
+ (let ((group (xaccAccountGetChildren acct)))
+ (xaccGroupGetSubAccountsSorted group)))
;; Get all children of this list of accounts.
(define (gnc:acccounts-get-all-subaccounts accountlist)
(append-map
(lambda (a)
- (gnc:group-get-subaccounts
- (gnc:account-get-children a)))
+ (xaccGroupGetSubAccountsSorted
+ (xaccAccountGetChildren a)))
accountlist))
;;; Here's a statistics collector... Collects max, min, total, and makes
@@ -308,11 +303,11 @@
;; Same as above but with gnc:numeric
(define (gnc:make-numeric-collector)
(let ;;; values
- ((value (gnc:numeric-zero)))
+ ((value (gnc-numeric-zero)))
(lambda (action amount) ;;; Dispatch function
(case action
((add) (if (gnc:gnc-numeric? amount)
- (set! value (gnc:numeric-add-fixed amount value))
+ (set! value (gnc-numeric-add-fixed amount value))
(gnc:warn
"gnc:numeric-collector called with wrong argument: " amount)))
((total) value)
@@ -356,7 +351,7 @@
;; 'getpair <commodity> signreverse?: Returns the two-element-list
;; with the <commodity> and its corresponding balance. If
;; <commodity> doesn't exist, the balance will be
-;; (gnc:numeric-zero). If signreverse? is true, the result's
+;; (gnc-numeric-zero). If signreverse? is true, the result's
;; sign will be reversed.
;; (internal) 'list #f #f: get the association list of
;; commodity->numeric-collector
@@ -394,7 +389,7 @@
(cond ((null? clist) '())
(else (add-commodity-value
(caar clist)
- (gnc:numeric-neg
+ (gnc-numeric-neg
(gnc:numeric-collector-total (cadar clist))))
(minus-commodity-clist (cdr clist)))))
@@ -413,9 +408,9 @@
(let ((pair (assoc c commoditylist)))
(cons c (cons
(if (not pair)
- (gnc:numeric-zero)
+ (gnc-numeric-zero)
(if sign?
- (gnc:numeric-neg
+ (gnc-numeric-neg
(gnc:numeric-collector-total (cadr pair)))
(gnc:numeric-collector-total (cadr pair))))
'()))))
@@ -427,9 +422,9 @@
(let ((pair (assoc c commoditylist)))
(gnc:make-gnc-monetary
c (if (not pair)
- (gnc:numeric-zero)
+ (gnc-numeric-zero)
(if sign?
- (gnc:numeric-neg
+ (gnc-numeric-neg
(gnc:numeric-collector-total (cadr pair)))
(gnc:numeric-collector-total (cadr pair)))))))
@@ -438,9 +433,9 @@
(case action
((add) (add-commodity-value commodity amount))
((merge) (add-commodity-clist
- (gnc:commodity-collector-list commodity)))
+ (gnc-commodity-collector-list commodity)))
((minusmerge) (minus-commodity-clist
- (gnc:commodity-collector-list commodity)))
+ (gnc-commodity-collector-list commodity)))
((format) (process-commodity-list commodity commoditylist))
((reset) (set! commoditylist '()))
((getpair) (getpair commodity amount))
@@ -456,28 +451,28 @@
;; CAS: ugh. Having two usages is even *more* confusing, so let's
;; please settle on one or the other. What's Step 2? How 'bout
;; documenting the new functions?
-(define (gnc:commodity-collector-add collector commodity amount)
+(define (gnc-commodity-collector-add collector commodity amount)
(collector 'add commodity amount))
-(define (gnc:commodity-collector-merge collector other-collector)
+(define (gnc-commodity-collector-merge collector other-collector)
(collector 'merge other-collector #f))
-(define (gnc:commodity-collector-minusmerge collector other-collector)
+(define (gnc-commodity-collector-minusmerge collector other-collector)
(collector 'minusmerge other-collector #f))
-(define (gnc:commodity-collector-map collector function)
+(define (gnc-commodity-collector-map collector function)
(collector 'format function #f))
-(define (gnc:commodity-collector-assoc collector commodity sign?)
+(define (gnc-commodity-collector-assoc collector commodity sign?)
(collector 'getmonetary commodity sign?))
-(define (gnc:commodity-collector-assoc-pair collector commodity sign?)
+(define (gnc-commodity-collector-assoc-pair collector commodity sign?)
(collector 'getpair commodity sign?))
-(define (gnc:commodity-collector-list collector)
+(define (gnc-commodity-collector-list collector)
(collector 'list #f #f))
;; Returns zero if all entries in this collector are zero.
-(define (gnc:commodity-collector-allzero? collector)
+(define (gnc-commodity-collector-allzero? collector)
(let ((result #t))
- (gnc:commodity-collector-map
+ (gnc-commodity-collector-map
collector
(lambda (commodity amount)
- (if (not (gnc:numeric-zero-p amount))
+ (if (not (gnc-numeric-zero-p amount))
(set! result #f))))
result))
@@ -488,8 +483,8 @@
(define (gnc:account-get-balance-at-date account date include-children?)
(let ((collector (gnc:account-get-comm-balance-at-date
account date include-children?)))
- (cadr (gnc:commodity-collector-assoc-pair
- collector (gnc:account-get-commodity account) #f))))
+ (cadr (gnc-commodity-collector-assoc-pair
+ collector (xaccAccountGetCommodity account) #f))))
;; This works similar as above but returns a commodity-collector,
;; thus takes care of children accounts with different currencies.
@@ -501,33 +496,33 @@
(let ((balance-collector
(if include-children?
(gnc:group-get-comm-balance-at-date
- (gnc:account-get-children account) date)
+ (xaccAccountGetChildren account) date)
(gnc:make-commodity-collector)))
- (query (gnc:malloc-query))
+ (query (qof-query-create-for-splits))
(splits #f))
- (gnc:query-set-book query (gnc:get-current-book))
- (gnc:query-add-single-account-match query account 'query-and)
- (gnc:query-add-date-match-timepair query #f date #t date 'query-and)
- (gnc:query-set-sort-order query
- (list gnc:split-trans gnc:trans-date-posted)
- (list gnc:query-default-sort)
+ (qof-query-set-book query (gnc-get-current-book))
+ (xaccQueryAddSingleAccountMatch query account QOF-QUERY-AND)
+ (xaccQueryAddDateMatchTS query #f date #t date QOF-QUERY-AND)
+ (qof-query-set-sort-order query
+ (list SPLIT-TRANS TRANS-DATE-POSTED)
+ (list QUERY-DEFAULT-SORT)
'())
- (gnc:query-set-sort-increasing query #t #t #t)
- (gnc:query-set-max-results query 1)
+ (qof-query-set-sort-increasing query #t #t #t)
+ (qof-query-set-max-results query 1)
- (set! splits (gnc:query-get-splits query))
- (gnc:free-query query)
+ (set! splits (qof-query-run query))
+ (qof-query-destroy query)
(if (and splits (not (null? splits)))
- (gnc:commodity-collector-add balance-collector
- (gnc:account-get-commodity account)
- (gnc:split-get-balance (car splits))))
+ (gnc-commodity-collector-add balance-collector
+ (xaccAccountGetCommodity account)
+ (xaccSplitGetBalance (car splits))))
balance-collector))
;; Adds all accounts' balances, where the balances are determined with
;; the get-balance-fn. The reverse-balance-fn
-;; (e.g. gnc:account-reverse-balance?) should return #t if the
+;; (e.g. gnc-reverse-balance) should return #t if the
;; account's balance sign should get reversed. Returns a
;; commodity-collector.
(define (gnc:accounts-get-balance-helper
@@ -536,8 +531,8 @@
(for-each
(lambda (acct)
((if (reverse-balance-fn acct)
- gnc:commodity-collector-minusmerge
- gnc:commodity-collector-merge)
+ gnc-commodity-collector-minusmerge
+ gnc-commodity-collector-merge)
collector (get-balance-fn acct)))
accounts)
collector))
@@ -549,7 +544,7 @@
(define (gnc:accounts-get-comm-total-profit accounts
get-balance-fn)
(gnc:accounts-get-balance-helper
- (gnc:filter-accountlist-type '(income expense) accounts)
+ (gnc:filter-accountlist-type (list ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE) accounts)
get-balance-fn
(lambda(x) #t)))
@@ -559,7 +554,7 @@
(define (gnc:accounts-get-comm-total-income accounts
get-balance-fn)
(gnc:accounts-get-balance-helper
- (gnc:filter-accountlist-type '(income) accounts)
+ (gnc:filter-accountlist-type (list ACCT-TYPE-INCOME) accounts)
get-balance-fn
(lambda(x) #t)))
@@ -569,7 +564,7 @@
(define (gnc:accounts-get-comm-total-expense accounts
get-balance-fn)
(gnc:accounts-get-balance-helper
- (gnc:filter-accountlist-type '(expense) accounts)
+ (gnc:filter-accountlist-type (list ACCT-TYPE-EXPENSE) accounts)
get-balance-fn
(lambda(x) #t)))
@@ -590,7 +585,7 @@
(let ((this-collector (gnc:make-commodity-collector)))
(for-each
(lambda (x)
- (gnc:commodity-collector-merge this-collector x))
+ (gnc-commodity-collector-merge this-collector x))
(gnc:group-map-all-accounts
(lambda (account)
(gnc:account-get-comm-balance-at-date
@@ -604,8 +599,8 @@
(define (gnc:account-get-balance-interval account from to include-children?)
(let ((collector (gnc:account-get-comm-balance-interval
account from to include-children?)))
- (cadr (gnc:commodity-collector-assoc-pair
- collector (gnc:account-get-commodity account) #f))))
+ (cadr (gnc-commodity-collector-assoc-pair
+ collector (xaccAccountGetCommodity account) #f))))
;; the version which returns a commodity-collector
(define (gnc:account-get-comm-balance-interval
@@ -615,7 +610,7 @@
;; instead of the plain date.
(let ((this-collector (gnc:account-get-comm-balance-at-date
account to include-children?)))
- (gnc:commodity-collector-minusmerge
+ (gnc-commodity-collector-minusmerge
this-collector
(gnc:account-get-comm-balance-at-date
account
@@ -627,7 +622,7 @@
(define (gnc:group-get-comm-balance-interval group from to)
(let ((this-collector (gnc:make-commodity-collector)))
(for-each (lambda (x)
- (gnc:commodity-collector-merge this-collector x))
+ (gnc-commodity-collector-merge this-collector x))
(gnc:group-map-all-accounts
(lambda (account)
(gnc:account-get-comm-balance-interval
@@ -640,7 +635,7 @@
(define (gnc:accountlist-get-comm-balance-interval accountlist from to)
(let ((collector (gnc:make-commodity-collector)))
(for-each (lambda (account)
- (gnc:commodity-collector-merge
+ (gnc-commodity-collector-merge
collector (gnc:account-get-comm-balance-interval
account from to #f)))
accountlist)
@@ -649,7 +644,7 @@
(define (gnc:accountlist-get-comm-balance-at-date accountlist date)
(let ((collector (gnc:make-commodity-collector)))
(for-each (lambda (account)
- (gnc:commodity-collector-merge
+ (gnc-commodity-collector-merge
collector (gnc:account-get-comm-balance-at-date
account date #f)))
accountlist)
@@ -657,43 +652,43 @@
;; utility function - ensure that a query matches only non-voids. Destructive.
(define (gnc:query-set-match-non-voids-only! query book)
- (let ((temp-query (gnc:malloc-query)))
- (gnc:query-set-book temp-query book)
+ (let ((temp-query (qof-query-create-for-splits)))
+ (qof-query-set-book temp-query book)
- (gnc:query-add-cleared-match
+ (xaccQueryAddClearedMatch
temp-query
- 'cleared-match-voided
- 'query-and)
+ CLEARED-VOIDED
+ QOF-QUERY-AND)
- (set! temp-query (gnc:query-invert temp-query))
+ (set! temp-query (qof-query-invert temp-query))
- (set! query (gnc:query-merge query temp-query 'query-and))))
+ (set! query (qof-query-merge query temp-query QOF-QUERY-AND))))
;; utility function - ensure that a query matches only voids. Destructive
(define (gnc:query-set-match-voids-only! query book)
- (let ((temp-query (gnc:malloc-query)))
- (gnc:query-set-book temp-query book)
+ (let ((temp-query (qof-query-create-for-splits)))
+ (qof-query-set-book temp-query book)
- (gnc:query-add-cleared-match
+ (xaccQueryAddClearedMatch
temp-query
- 'cleared-match-voided
- 'query-and)
+ CLEARED-VOIDED
+ QOF-QUERY-AND)
- (set! query (gnc:query-merge query temp-query 'query-and))))
+ (set! query (qof-query-merge query temp-query QOF-QUERY-AND))))
(define (gnc:split-voided? split)
- (let ((trans (gnc:split-get-parent split)))
- (gnc:transaction-get-void-status trans)))
+ (let ((trans (xaccSplitGetParent split)))
+ (xaccTransGetVoidStatus trans)))
(define (gnc:report-starting report-name)
- (gnc:window-show-progress (sprintf #f
+ (gnc-window-show-progress (sprintf #f
(_ "Building '%s' report ...")
(gnc:gettext report-name))
0))
(define (gnc:report-render-starting report-name)
- (gnc:window-show-progress (sprintf #f
+ (gnc-window-show-progress (sprintf #f
(_ "Rendering '%s' report ...")
(if (string-null? report-name)
(gnc:gettext "Untitled")
@@ -701,15 +696,15 @@
0))
(define (gnc:report-percent-done percent)
- (gnc:window-show-progress #f percent))
+ (gnc-window-show-progress "" percent))
(define (gnc:report-finished)
- (gnc:window-show-progress #f -1))
+ (gnc-window-show-progress "" -1))
;; function to count the total number of splits to be iterated
(define (gnc:accounts-count-splits accounts)
(if (not (null? accounts))
- (+ (length (gnc:account-get-split-list (car accounts)))
+ (+ (length (xaccAccountGetSplitList (car accounts)))
(gnc:accounts-count-splits (cdr accounts)))
0))
@@ -717,38 +712,38 @@
;; the type is an alist '((str "match me") (cased #f) (regexp #f))
(define (gnc:account-get-trans-type-balance-interval
group type start-date-tp end-date-tp)
- (let* ((query (gnc:malloc-query))
+ (let* ((query (qof-query-create-for-splits))
(splits #f)
(get-val (lambda (alist key)
(let ((lst (assoc-ref alist key)))
(if lst (car lst) lst))))
(matchstr (get-val type 'str))
- (case-sens (if (get-val type 'cased) 1 0))
- (regexp (if (get-val type 'regexp) 1 0))
+ (case-sens (if (get-val type 'cased) #t #f))
+ (regexp (if (get-val type 'regexp) #t #f))
(total (gnc:make-commodity-collector))
)
- (gnc:query-set-book query (gnc:get-current-book))
- (gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
- (gnc:query-add-account-match query group 'guid-match-any 'query-and)
- (gnc:query-add-date-match-timepair
+ (qof-query-set-book query (gnc-get-current-book))
+ (gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
+ (xaccQueryAddAccountMatch query group QOF-GUID-MATCH-ANY QOF-QUERY-AND)
+ (xaccQueryAddDateMatchTS
query
(and start-date-tp #t) start-date-tp
- (and end-date-tp #t) end-date-tp 'query-and)
- (gnc:query-add-description-match
- query matchstr case-sens regexp 'query-and)
+ (and end-date-tp #t) end-date-tp QOF-QUERY-AND)
+ (xaccQueryAddDescriptionMatch
+ query matchstr case-sens regexp QOF-QUERY-AND)
- (set! splits (gnc:query-get-splits query))
+ (set! splits (qof-query-run query))
(map (lambda (split)
- (let* ((shares (gnc:split-get-amount split))
- (acct-comm (gnc:account-get-commodity
- (gnc:split-get-account split)))
+ (let* ((shares (xaccSplitGetAmount split))
+ (acct-comm (xaccAccountGetCommodity
+ (xaccSplitGetAccount split)))
)
- (gnc:commodity-collector-add total acct-comm shares)
+ (gnc-commodity-collector-add total acct-comm shares)
)
)
splits
)
- (gnc:free-query query)
+ (qof-query-destroy query)
total
)
)
@@ -757,58 +752,58 @@
;; *ignores* any closing entries
(define (gnc:account-get-pos-trans-total-interval
group type start-date-tp end-date-tp)
- (let* ((str-query (gnc:malloc-query))
- (sign-query (gnc:malloc-query))
+ (let* ((str-query (qof-query-create-for-splits))
+ (sign-query (qof-query-create-for-splits))
(total-query #f)
(splits #f)
(get-val (lambda (alist key)
(let ((lst (assoc-ref alist key)))
(if lst (car lst) lst))))
(matchstr (get-val type 'str))
- (case-sens (if (get-val type 'cased) 1 0))
- (regexp (if (get-val type 'regexp) 1 0))
+ (case-sens (if (get-val type 'cased) #t #f))
+ (regexp (if (get-val type 'regexp) #t #f))
(pos? (if (get-val type 'positive) #t #f))
(total (gnc:make-commodity-collector))
)
- (gnc:query-set-book str-query (gnc:get-current-book))
- (gnc:query-set-book sign-query (gnc:get-current-book))
- (gnc:query-set-match-non-voids-only! str-query (gnc:get-current-book))
- (gnc:query-set-match-non-voids-only! sign-query (gnc:get-current-book))
- (gnc:query-add-account-match str-query group 'guid-match-any 'query-and)
- (gnc:query-add-account-match sign-query group 'guid-match-any 'query-and)
- (gnc:query-add-date-match-timepair
+ (qof-query-set-book str-query (gnc-get-current-book))
+ (qof-query-set-book sign-query (gnc-get-current-book))
+ (gnc:query-set-match-non-voids-only! str-query (gnc-get-current-book))
+ (gnc:query-set-match-non-voids-only! sign-query (gnc-get-current-book))
+ (xaccQueryAddAccountMatch str-query group QOF-GUID-MATCH-ANY QOF-QUERY-AND)
+ (xaccQueryAddAccountMatch sign-query group QOF-GUID-MATCH-ANY QOF-QUERY-AND)
+ (xaccQueryAddDateMatchTS
str-query
(and start-date-tp #t) start-date-tp
- (and end-date-tp #t) end-date-tp 'query-and)
- (gnc:query-add-date-match-timepair
+ (and end-date-tp #t) end-date-tp QOF-QUERY-AND)
+ (xaccQueryAddDateMatchTS
sign-query
(and start-date-tp #t) start-date-tp
- (and end-date-tp #t) end-date-tp 'query-and)
- (gnc:query-add-description-match
- str-query matchstr case-sens regexp 'query-and)
+ (and end-date-tp #t) end-date-tp QOF-QUERY-AND)
+ (xaccQueryAddDescriptionMatch
+ str-query matchstr case-sens regexp QOF-QUERY-AND)
(set! total-query
;; this is a tad inefficient, but its a simple way to accomplish
;; description match inversion...
(if pos?
- (gnc:query-merge sign-query str-query 'query-and)
- (gnc:query-merge
- sign-query (gnc:query-invert str-query) 'query-and)
+ (qof-query-merge sign-query str-query QOF-QUERY-AND)
+ (qof-query-merge
+ sign-query (qof-query-invert str-query) QOF-QUERY-AND)
))
- (set! splits (gnc:query-get-splits total-query))
+ (set! splits (qof-query-run total-query))
(map (lambda (split)
- (let* ((shares (gnc:split-get-amount split))
- (acct-comm (gnc:account-get-commodity
- (gnc:split-get-account split)))
+ (let* ((shares (xaccSplitGetAmount split))
+ (acct-comm (xaccAccountGetCommodity
+ (xaccSplitGetAccount split)))
)
- (or (gnc:numeric-negative-p shares)
- (gnc:commodity-collector-add total acct-comm shares)
+ (or (gnc-numeric-negative-p shares)
+ (gnc-commodity-collector-add total acct-comm shares)
)
)
)
splits
)
- (gnc:free-query total-query)
+ (qof-query-destroy total-query)
total
)
)
@@ -827,7 +822,7 @@
report-commodity
exchange-fn)))
(amt (and sum (gnc:gnc-monetary-amount sum)))
- (neg? (and amt (gnc:numeric-negative-p amt)))
+ (neg? (and amt (gnc-numeric-negative-p amt)))
(bal (if neg?
(let ((bal (gnc:make-commodity-collector)))
(bal 'minusmerge signed-balance #f)
@@ -839,9 +834,9 @@
exchange-fn))
(balance
(if (gnc:uniform-commodity? bal report-commodity)
- (if (gnc:numeric-zero-p amt) #f bal-sum)
+ (if (gnc-numeric-zero-p amt) #f bal-sum)
(if show-comm?
- (gnc:commodity-table bal report-commodity exchange-fn)
+ (gnc-commodity-table bal report-commodity exchange-fn)
bal-sum)
))
)
Modified: gnucash/trunk/src/report/report-system/report.scm
===================================================================
--- gnucash/trunk/src/report/report-system/report.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/report.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -21,7 +21,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (gnucash main))
-(use-modules (g-wrapped gw-report-system))
+(use-modules (sw_report_system))
;; This hash should contain all the reports available and will be used
;; to generate the reports menu whenever a new window opens and to
@@ -99,9 +99,9 @@
(gnc:report-template-name report-rec) report-rec)
(begin
;; FIXME: We should pass the top-level window
- ;; instead of the #f to gnc:error-dialog, but I
+ ;; instead of the '() to gnc-error-dialog, but I
;; have no idea where to get it from.
- (gnc:error-dialog #f (string-append (_ "A custom report with this name already exists. Either rename the report to store it with a different name, or edit your saved-reports file and delete the section with the following name: ") name ))
+ (gnc-error-dialog '() (string-append (_ "A custom report with this name already exists. Either rename the report to store it with a different name, or edit your saved-reports file and delete the section with the following name: ") name ))
)))
(gnc:warn "gnc:define-report: bad report"))))
@@ -266,7 +266,7 @@
(cb r))))
options))
- (gnc:report-set-id! r (gnc:report-add r))
+ (gnc:report-set-id! r (gnc-report-add r))
(gnc:report-id r))
)
@@ -274,7 +274,7 @@
(define (gnc:restore-report id template-name options)
(let ((r ((record-constructor <report>)
template-name id options #t #t #f #f)))
- (gnc:report-add r))
+ (gnc-report-add r))
)
@@ -392,7 +392,7 @@
(gnc:report-type report))))
(define gnc:current-saved-reports
- (gnc:build-dotgnucash-path "saved-reports-2.0"))
+ (gnc-build-dotgnucash-path "saved-reports-2.0"))
(define (gnc:report-save-to-savefile report)
(let ((conf-file-name gnc:current-saved-reports))
@@ -433,10 +433,10 @@
;; looks up the report by id and renders it with gnc:report-render-html
;; marks the cursor busy during rendering; returns the html
(define (gnc:report-run id)
- (let ((report (gnc:find-report id))
+ (let ((report (gnc-report-find id))
(start-time (gettimeofday))
(html #f))
- (gnc:set-busy-cursor #f #t)
+ (gnc-set-busy-cursor '() #t)
(gnc:backtrace-if-exception
(lambda ()
(if report
@@ -447,7 +447,7 @@
;; (newline)
;; (display html) (newline)
))))
- (gnc:unset-busy-cursor #f)
+ (gnc-unset-busy-cursor '())
html))
Modified: gnucash/trunk/src/report/report-system/test/Makefile.am
===================================================================
--- gnucash/trunk/src/report/report-system/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/report-system/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -15,16 +15,14 @@
--gnc-module-dir ${top_builddir}/src/network-utils \
--gnc-module-dir ${top_srcdir}/src/gnc-module \
--gnc-module-dir ${top_srcdir}/src/engine \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/scm \
--guile-load-dir ${top_srcdir}/src/gnome-utils \
--guile-load-dir ${top_srcdir}/src/gnome \
--guile-load-dir ${top_srcdir}/src/app-utils \
--guile-load-dir ${top_srcdir}/src/report/report-system \
--library-dir ${top_srcdir}/src/gnome-utils \
- --library-dir ${top_srcdir}/src/gnome \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_srcdir}/src/gnome
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Modified: gnucash/trunk/src/report/standard-reports/account-piecharts.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/account-piecharts.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/account-piecharts.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -110,7 +110,7 @@
(lambda ()
(gnc:filter-accountlist-type
account-types
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
(lambda (accounts)
(list #t
(gnc:filter-accountlist-type
@@ -200,8 +200,8 @@
(chart (gnc:make-html-piechart))
(topl-accounts (gnc:filter-accountlist-type
account-types
- (gnc:group-get-account-list
- (gnc:get-current-group)))))
+ (xaccGroupGetAccountListSorted
+ (gnc-get-current-group)))))
;; Returns true if the account a was selected in the account
;; selection option.
@@ -227,7 +227,7 @@
account-levels))
(combined '())
(other-anchor "")
- (print-info (gnc:commodity-print-info report-currency #t)))
+ (print-info (gnc-commodity-print-info report-currency #t)))
;; Converts a commodity-collector into one single double
;; number, depending on the report currency and the
@@ -239,7 +239,7 @@
;; everything foreign gets converted
;; (gnc:sum-collector-commodity) based on the weighted
;; average of all past transactions.
- (gnc:numeric-to-double
+ (gnc-numeric-to-double
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
c report-currency
@@ -311,16 +311,16 @@
(cond
((eq? sort-method 'acct-code)
(lambda (a b)
- (string<? (gnc:account-get-code (cadr a))
- (gnc:account-get-code (cadr b)))))
+ (string<? (xaccAccountGetCode (cadr a))
+ (xaccAccountGetCode (cadr b)))))
((eq? sort-method 'alphabetical)
(lambda (a b)
(string<? ((if show-fullname?
- gnc:account-get-full-name
- gnc:account-get-name) (cadr a))
+ gnc-account-get-full-name
+ xaccAccountGetName) (cadr a))
((if show-fullname?
- gnc:account-get-full-name
- gnc:account-get-name) (cadr b)))))
+ gnc-account-get-full-name
+ xaccAccountGetName) (cadr b)))))
(else
(lambda (a b) (> (car a) (car b)))))))
@@ -377,8 +377,8 @@
(list gnc:pagename-general
gnc:optname-reportname
((if show-fullname?
- gnc:account-get-full-name
- gnc:account-get-name) acct))))))))
+ gnc-account-get-full-name
+ xaccAccountGetName) acct))))))))
combined)))
(gnc:html-piechart-set-button-1-slice-urls!
chart urls)
@@ -401,19 +401,19 @@
(if do-intervals?
(sprintf #f
(_ "%s to %s")
- (gnc:print-date from-date-tp)
- (gnc:print-date to-date-tp))
+ (gnc-print-date from-date-tp)
+ (gnc-print-date to-date-tp))
(sprintf #f
(_ "Balance at %s")
- (gnc:print-date to-date-tp)))
+ (gnc-print-date to-date-tp)))
(if show-total?
(let ((total (apply + (unzip1 combined))))
(sprintf
#f ": %s"
- (gnc:amount->string
- (gnc:double-to-gnc-numeric
+ (xaccPrintAmount
+ (double-to-gnc-numeric
total
- (gnc:commodity-get-fraction report-currency)
+ (gnc-commodity-get-fraction report-currency)
GNC-RND-ROUND)
print-info)))
"")))
@@ -426,16 +426,16 @@
(if (string? (cadr pair))
(cadr pair)
((if show-fullname?
- gnc:account-get-full-name
- gnc:account-get-name) (cadr pair)))
+ gnc-account-get-full-name
+ xaccAccountGetName) (cadr pair)))
'pre " " (_ "and") " " 'post)
(if show-total?
(string-append
" - "
- (gnc:amount->string
- (gnc:double-to-gnc-numeric
+ (xaccPrintAmount
+ (double-to-gnc-numeric
(car pair)
- (gnc:commodity-get-fraction report-currency)
+ (gnc-commodity-get-fraction report-currency)
GNC-RND-ROUND)
print-info))
"")))
@@ -479,12 +479,15 @@
(list
;; reportname, account-types, do-intervals?,
;; menu-reportname, menu-tip
- (list reportname-income '(income) #t menuname-income menutip-income (lambda (x) #t))
- (list reportname-expense '(expense) #t menuname-expense menutip-expense (lambda (x) #f))
- (list reportname-assets
- '(asset bank cash checking savings money-market receivable
- stock mutual-fund currency)
+ (list reportname-income (list ACCT-TYPE-INCOME) #t menuname-income menutip-income (lambda (x) #t))
+ (list reportname-expense (list ACCT-TYPE-EXPENSE) #t menuname-expense menutip-expense (lambda (x) #f))
+ (list reportname-assets
+ (list ACCT-TYPE-ASSET ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-CHECKING
+ ACCT-TYPE-SAVINGS ACCT-TYPE-MONEYMRKT
+ ACCT-TYPE-RECEIVABLE ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL
+ ACCT-TYPE-CURRENCY)
#f menuname-assets menutip-assets (lambda (x) #f))
(list reportname-liabilities
- '(liability payable credit credit-line)
+ (list ACCT-TYPE-LIABILITY ACCT-TYPE-PAYABLE ACCT-TYPE-CREDIT
+ ACCT-TYPE-CREDITLINE)
#f menuname-liabilities menutip-liabilities (lambda (x) #t))))
Modified: gnucash/trunk/src/report/standard-reports/account-summary.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/account-summary.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/account-summary.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -24,7 +24,7 @@
;; summary to no more than daily resolution.
;;
;; The Company Name field does not currently default to the name
-;; in (gnc:get-current-book).
+;; in (gnc-get-current-book).
;;
;; The variables in this code could use more consistent naming.
;;
@@ -138,7 +138,7 @@
(gnc:make-string-option
gnc:pagename-general optname-party-name
"b" opthelp-party-name ""))
- ;; this should default to company name in (gnc:get-current-book)
+ ;; this should default to company name in (gnc-get-current-book)
;; does anyone know the function to get the company name??
;; date at which to report balance
@@ -153,9 +153,12 @@
opthelp-accounts
(lambda ()
(gnc:filter-accountlist-type
- '(bank cash credit asset liability stock mutual-fund currency
- payable receivable equity income expense)
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (list ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-CREDIT
+ ACCT-TYPE-ASSET ACCT-TYPE-LIABILITY
+ ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
+ ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
+ ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
#f #t))
(gnc:options-add-account-levels!
options gnc:pagename-accounts optname-depth-limit
@@ -321,7 +324,7 @@
(gnc:html-document-set-title!
doc (string-append company-name " " report-title " "
- (gnc:print-date date-tp))
+ (gnc-print-date date-tp))
)
(if (null? accounts)
@@ -376,11 +379,11 @@
;; accounts)...
(split-up-accounts (gnc:decompose-accountlist accounts))
(all-accounts
- (append (assoc-ref split-up-accounts 'income)
- (assoc-ref split-up-accounts 'expense)
- (assoc-ref split-up-accounts 'asset)
- (assoc-ref split-up-accounts 'liability)
- (assoc-ref split-up-accounts 'equity)
+ (append (assoc-ref split-up-accounts ACCT-TYPE-INCOME)
+ (assoc-ref split-up-accounts ACCT-TYPE-EXPENSE)
+ (assoc-ref split-up-accounts ACCT-TYPE-ASSET)
+ (assoc-ref split-up-accounts ACCT-TYPE-LIABILITY)
+ (assoc-ref split-up-accounts ACCT-TYPE-EQUITY)
))
;; (all-accounts (map (lambda (X) (cadr X)) split-up-accounts))
;; ^ will not do what we want
@@ -489,8 +492,8 @@
report-commodity exchange-fn
(append-map
(lambda (a)
- (gnc:group-get-subaccounts
- (gnc:account-get-children a)))
+ (xaccGroupGetSubAccountsSorted
+ (xaccAccountGetChildren a)))
accounts))))
)
)
Modified: gnucash/trunk/src/report/standard-reports/advanced-portfolio.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/advanced-portfolio.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/advanced-portfolio.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -151,8 +151,8 @@
"b"
(N_ "Stock Accounts to report on")
(lambda () (filter gnc:account-is-stock?
- (gnc:group-get-subaccounts
- (gnc:get-current-group))))
+ (xaccGroupGetSubAccountsSorted
+ (gnc-get-current-group))))
(lambda (accounts) (list #t
(filter gnc:account-is-stock? accounts)))
#t))
@@ -188,72 +188,71 @@
(gnc:option-value (get-op section name)))
(define (split-account-type? split type)
- (eq? type
- (gw:enum-<gnc:AccountType>-val->sym (gnc:account-get-type (gnc:split-get-account split)) #f)))
+ (eq? type (xaccAccountGetType (xaccSplitGetAccount split))))
(define (same-split? s1 s2)
- (string=? (gnc:split-get-guid s1) (gnc:split-get-guid s2)))
+ (string=? (gncSplitGetGUID s1) (gncSplitGetGUID s2)))
(define (same-account? a1 a2)
- (string=? (gnc:account-get-guid a1) (gnc:account-get-guid a2)))
+ (string=? (gncAccountGetGUID a1) (gncAccountGetGUID a2)))
;; this builds a list for basis calculation and handles average, fifo and filo methods
;; the list is cons cells of (units-of-stock . price-per-unit)... average method produces only one
;; cell that mutates to the new average. Need to add a date checker so that we allow for prices
;; coming in out of order, such as a transfer with a price adjusted to carryover the basis.
(define (basis-builder b-list b-units b-value b-method)
- (if (gnc:numeric-positive-p b-units)
+ (if (gnc-numeric-positive-p b-units)
(case b-method
((average-basis)
(if (not (eqv? b-list '()))
- (list (cons (gnc:numeric-add b-units
+ (list (cons (gnc-numeric-add b-units
(caar b-list) 10000 GNC-RND-ROUND)
- (gnc:numeric-div
- (gnc:numeric-add b-value
- (gnc:numeric-mul (caar b-list)
+ (gnc-numeric-div
+ (gnc-numeric-add b-value
+ (gnc-numeric-mul (caar b-list)
(cdar b-list)
10000 GNC-RND-ROUND)
10000 GNC-RND-ROUND)
- (gnc:numeric-add b-units
+ (gnc-numeric-add b-units
(caar b-list) 10000 GNC-RND-ROUND)
10000 GNC-RND-ROUND)))
(append b-list
- (list (cons b-units (gnc:numeric-div
+ (list (cons b-units (gnc-numeric-div
b-value b-units 10000
GNC-RND-ROUND))))))
(else (append b-list
- (list (cons b-units (gnc:numeric-div
+ (list (cons b-units (gnc-numeric-div
b-value b-units 10000
GNC-RND-ROUND))))))
(if (not (eqv? b-list '()))
(case b-method
((fifo-basis)
- (if (not (= -1 (gnc:numeric-compare
- (gnc:numeric-abs b-units) (caar b-list))))
- (basis-builder (cdr b-list) (gnc:numeric-add
+ (if (not (= -1 (gnc-numeric-compare
+ (gnc-numeric-abs b-units) (caar b-list))))
+ (basis-builder (cdr b-list) (gnc-numeric-add
b-units
(caar b-list) 10000 GNC-RND-ROUND)
b-value b-method)
- (append (list (cons (gnc:numeric-add
+ (append (list (cons (gnc-numeric-add
b-units
(caar b-list) 10000 GNC-RND-ROUND)
(cdar b-list))) (cdr b-list))))
((filo-basis)
- (if (not (= -1 (gnc:numeric-compare
- (gnc:numeric-abs b-units) (caar (reverse b-list)))))
+ (if (not (= -1 (gnc-numeric-compare
+ (gnc-numeric-abs b-units) (caar (reverse b-list)))))
(basis-builder (reverse (cdr (reverse b-list)))
- (gnc:numeric-add
+ (gnc-numeric-add
b-units
(caar (reverse b-list))
10000 GNC-RND-ROUND)
b-value b-method)
(append (cdr (reverse b-list))
- (list (cons (gnc:numeric-add
+ (list (cons (gnc-numeric-add
b-units
(caar (reverse b-list)) 10000 GNC-RND-ROUND)
(cdar (reverse b-list)))))))
((average-basis)
- (list (cons (gnc:numeric-add
+ (list (cons (gnc-numeric-add
(caar b-list) b-units 10000 GNC-RND-ROUND)
(cdar b-list)))))
'()
@@ -264,17 +263,17 @@
;; sum up the contents of the b-list built by basis-builder above
(define (sum-basis b-list)
(if (not (eqv? b-list '()))
- (gnc:numeric-add (gnc:numeric-mul (caar b-list) (cdar b-list) 100 GNC-RND-ROUND)
+ (gnc-numeric-add (gnc-numeric-mul (caar b-list) (cdar b-list) 100 GNC-RND-ROUND)
(sum-basis (cdr b-list)) 100 GNC-RND-ROUND)
- (gnc:numeric-zero)
+ (gnc-numeric-zero)
)
)
;; sum up the total number of units in the b-list built by basis-builder above
(define (units-basis b-list)
(if (not (eqv? b-list '()))
- (gnc:numeric-add (caar b-list) (units-basis (cdr b-list)) 100 GNC-RND-ROUND)
- (gnc:numeric-zero)
+ (gnc-numeric-add (caar b-list) (units-basis (cdr b-list)) 100 GNC-RND-ROUND)
+ (gnc-numeric-zero)
)
)
@@ -286,7 +285,7 @@
total-gain total-ugain)
(let ((share-print-info
- (gnc:share-print-info-places
+ (gnc-share-print-info-places
(inexact->exact (get-option gnc:pagename-display
optname-shares-digits)))))
@@ -295,10 +294,10 @@
(let* ((row-style (if odd-row? "normal-row" "alternate-row"))
(current (car accounts))
(rest (cdr accounts))
- (name (gnc:account-get-name current))
- (commodity (gnc:account-get-commodity current))
- (ticker-symbol (gnc:commodity-get-mnemonic commodity))
- (listing (gnc:commodity-get-namespace commodity))
+ (name (xaccAccountGetName current))
+ (commodity (xaccAccountGetCommodity current))
+ (ticker-symbol (gnc-commodity-get-mnemonic commodity))
+ (listing (gnc-commodity-get-namespace commodity))
(unit-collector (gnc:account-get-comm-balance-at-date
current to-date #f))
(units (cadr (unit-collector 'getpair commodity #f)))
@@ -319,15 +318,15 @@
(car price-list) #f))
;; if there is no price, set a sane commod-currency for those zero-share
;; accounts. if its a no price account with shares, we'll get a currency later.
- (commod-currency (if price (gnc:price-get-currency price) currency))
+ (commod-currency (if price (gnc-price-get-currency price) currency))
(value (exchange-fn (gnc:make-gnc-monetary commodity units) currency))
- (txn-value (gnc:numeric-zero))
+ (txn-value (gnc-numeric-zero))
(txn-date to-date)
(pricing-txn #f)
(use-txn #f)
(basis-list '())
- (txn-units (gnc:numeric-zero))
+ (txn-units (gnc-numeric-zero))
)
@@ -336,31 +335,33 @@
(lambda (split)
(set! work-done (+ 1 work-done))
(gnc:report-percent-done (* 100 (/ work-done work-to-do)))
- (let ((parent (gnc:split-get-parent split)))
- (if (gnc:timepair-le (gnc:transaction-get-date-posted parent) to-date)
+ (let ((parent (xaccSplitGetParent split)))
+ (if (gnc:timepair-le (gnc-transaction-get-date-posted parent) to-date)
(begin
(for-each
(lambda (s)
;; If this is an asset type account for buy or sell, then grab a
;; currency and a txn-value for later computation
(cond
- ((and (not (same-account? current (gnc:split-get-account s)))
- (not (or(split-account-type? s 'expense)
- (split-account-type? s 'income))))
+ ((and (not (same-account? current (xaccSplitGetAccount s)))
+ (not (or (split-account-type?
+ s ACCT-TYPE-EXPENSE)
+ (split-account-type?
+ s ACCT-TYPE-INCOME))))
;;only change the commod-currency if price failed
- (if (not price) (set! commod-currency (gnc:account-get-commodity (gnc:split-get-account s))))
- (set! txn-value (gnc:numeric-abs (gnc:split-get-value s)));;FIXME use gnc:split-get-share-price
- (set! txn-date (gnc:transaction-get-date-posted parent))
+ (if (not price) (set! commod-currency (xaccAccountGetCommodity (xaccSplitGetAccount s))))
+ (set! txn-value (gnc-numeric-abs (xaccSplitGetValue s)));;FIXME use xaccSplitGetSharePrice
+ (set! txn-date (gnc-transaction-get-date-posted parent))
(set! pricing-txn parent)
)
- ((same-account? current (gnc:split-get-account s))
- (set! txn-units (gnc:split-get-amount s)))
+ ((same-account? current (xaccSplitGetAccount s))
+ (set! txn-units (xaccSplitGetAmount s)))
)
)
- (gnc:transaction-get-splits parent))
+ (xaccTransGetSplits parent))
;; go build the basis-list
@@ -375,54 +376,54 @@
(lambda (s)
(cond
((same-split? s split)
-;; (gnc:debug "amount " (gnc:numeric-to-double (gnc:split-get-amount s))
-;; " acct " (gnc:account-get-name (gnc:split-get-account s)) )
-;; (gnc:debug "value " (gnc:numeric-to-double (gnc:split-get-value s))
-;; " in " (gnc:commodity-get-printname commod-currency)
-;; " from " (gnc:transaction-get-description (gnc:split-get-parent s)))
+;; (gnc:debug "amount " (gnc-numeric-to-double (xaccSplitGetAmount s))
+;; " acct " (xaccAccountGetName (xaccSplitGetAccount s)) )
+;; (gnc:debug "value " (gnc-numeric-to-double (xaccSplitGetValue s))
+;; " in " (gnc-commodity-get-printname commod-currency)
+;; " from " (xaccTransGetDescription (xaccSplitGetParent s)))
(cond
- ((or include-gains (not (gnc:numeric-zero-p (gnc:split-get-amount s))))
- (unitscoll 'add commodity (gnc:split-get-amount s)) ;; Is the stock transaction?
+ ((or include-gains (not (gnc-numeric-zero-p (xaccSplitGetAmount s))))
+ (unitscoll 'add commodity (xaccSplitGetAmount s)) ;; Is the stock transaction?
;; these lines do nothing, but are in a debug so I'm leaving it, just in case. asw.
-;; (if (< 0 (gnc:numeric-to-double
-;; (gnc:split-get-amount s)))
+;; (if (< 0 (gnc-numeric-to-double
+;; (xaccSplitGetAmount s)))
;; (set! totalunits
;; (+ totalunits
-;; (gnc:numeric-to-double (gnc:split-get-amount s))))
+;; (gnc-numeric-to-double (xaccSplitGetAmount s))))
;; )
;; (set! totalunityears
;; (+ totalunityears
-;; (* (gnc:numeric-to-double (gnc:split-get-amount s))
+;; (* (gnc-numeric-to-double (xaccSplitGetAmount s))
;; (gnc:date-year-delta
-;; (car (gnc:transaction-get-date-posted parent))
+;; (car (gnc-transaction-get-date-posted parent))
;; (current-time)))))
(cond
- ((gnc:numeric-negative-p (gnc:split-get-value s))
+ ((gnc-numeric-negative-p (xaccSplitGetValue s))
(moneyoutcoll
'add commod-currency
- (gnc:numeric-neg (gnc:split-get-value s))))
+ (gnc-numeric-neg (xaccSplitGetValue s))))
(else (moneyincoll
'add commod-currency
- (gnc:numeric-neg (gnc:split-get-value s))))))))
+ (gnc-numeric-neg (xaccSplitGetValue s))))))))
- ((split-account-type? s 'expense)
- (brokeragecoll 'add commod-currency (gnc:split-get-value s)))
+ ((split-account-type? s ACCT-TYPE-EXPENSE)
+ (brokeragecoll 'add commod-currency (xaccSplitGetValue s)))
- ((split-account-type? s 'income)
- (dividendcoll 'add commod-currency (gnc:split-get-value s)))
+ ((split-account-type? s ACCT-TYPE-INCOME)
+ (dividendcoll 'add commod-currency (xaccSplitGetValue s)))
)
)
- (gnc:transaction-get-splits parent)
+ (xaccTransGetSplits parent)
)
)
)
)
)
- (gnc:account-get-split-list current)
+ (xaccAccountGetSplitList current)
)
;; (gnc:debug "totalunits" totalunits)
;; (gnc:debug "totalunityears" totalunityears)
@@ -431,24 +432,24 @@
;; and if we have a choice, use whichever is newest.
(set! use-txn (if (not price) #t
(if prefer-pricelist #f
- (if (not (gnc:timepair-le txn-date (gnc:price-get-time price)))
+ (if (not (gnc:timepair-le txn-date (gnc-price-get-time price)))
#t #f))))
;; okay we're using the txn, so make a new price, value etc. and warn the user
(if use-txn
(begin
- (set! price (if (not (gnc:numeric-zero-p txn-units))
+ (set! price (if (not (gnc-numeric-zero-p txn-units))
(gnc:make-gnc-monetary commod-currency
- (gnc:numeric-div txn-value
- (gnc:numeric-abs txn-units)
+ (gnc-numeric-div txn-value
+ (gnc-numeric-abs txn-units)
100 GNC-RND-ROUND))
- (gnc:make-gnc-monetary commod-currency (gnc:numeric-zero))))
+ (gnc:make-gnc-monetary commod-currency (gnc-numeric-zero))))
(set! value (if price (gnc:make-gnc-monetary commod-currency
- (gnc:numeric-mul units
+ (gnc-numeric-mul units
(gnc:gnc-monetary-amount price)
100 GNC-RND-ROUND))
- (gnc:make-gnc-monetary commod-currency (gnc:numeric-zero))))
+ (gnc:make-gnc-monetary commod-currency (gnc-numeric-zero))))
(set! warn-price-dirty #t)
)
)
@@ -464,17 +465,17 @@
- (if (or include-empty (not (gnc:numeric-zero-p units)))
+ (if (or include-empty (not (gnc-numeric-zero-p units)))
(let* ((moneyin (gnc:monetary-neg
(gnc:sum-collector-commodity moneyincoll currency exchange-fn)))
(moneyout (gnc:sum-collector-commodity moneyoutcoll currency exchange-fn))
;; just so you know, gain == realized gain, ugain == un-realized gain, bothgain, well..
(gain (gnc:sum-collector-commodity gaincoll currency exchange-fn))
(ugain (gnc:make-gnc-monetary currency
- (gnc:numeric-sub (gnc:gnc-monetary-amount (exchange-fn value currency))
+ (gnc-numeric-sub (gnc:gnc-monetary-amount (exchange-fn value currency))
(sum-basis basis-list)
100 GNC-RND-ROUND)))
- (bothgain (gnc:make-gnc-monetary currency (gnc:numeric-add (gnc:gnc-monetary-amount gain)
+ (bothgain (gnc:make-gnc-monetary currency (gnc-numeric-add (gnc:gnc-monetary-amount gain)
(gnc:gnc-monetary-amount ugain)
100 GNC-RND-ROUND)))
@@ -492,7 +493,7 @@
(if show-symbol (append! activecols (list ticker-symbol)))
(if show-listing (append! activecols (list listing)))
(if show-shares (append! activecols (list (gnc:make-html-table-header-cell/markup
- "number-cell" (gnc:amount->string units share-print-info)))))
+ "number-cell" (xaccPrintAmount units share-print-info)))))
(if show-price (append! activecols (list (gnc:make-html-table-header-cell/markup
"number-cell"
(if use-txn
@@ -503,8 +504,8 @@
(gnc:html-price-anchor
price
(gnc:make-gnc-monetary
- (gnc:price-get-currency price)
- (gnc:price-get-value price)))
+ (gnc-price-get-currency price)
+ (gnc-price-get-value price)))
)))))
(append! activecols (list (if use-txn "*" " ")
(gnc:make-html-table-header-cell/markup
@@ -518,11 +519,11 @@
(gnc:make-html-table-header-cell/markup "number-cell"
- (let ((moneyinvalue (gnc:numeric-to-double
+ (let ((moneyinvalue (gnc-numeric-to-double
(gnc:gnc-monetary-amount moneyin))))
(if (= 0.0 moneyinvalue)
(sprintf #f "%.2f%%" moneyinvalue)
- (sprintf #f "%.2f%%" (* 100 (/ (gnc:numeric-to-double
+ (sprintf #f "%.2f%%" (* 100 (/ (gnc-numeric-to-double
(gnc:gnc-monetary-amount bothgain))
moneyinvalue))))))
)
@@ -537,7 +538,7 @@
)
(table-add-stock-rows-internal rest odd-row?)
)
- (gnc:price-list-destroy price-list)
+ (gnc-price-list-destroy price-list)
)))
(set! work-to-do (gnc:accounts-count-splits accounts))
@@ -587,30 +588,30 @@
(gnc:html-document-set-title!
document (string-append
report-title
- (sprintf #f " %s" (gnc:print-date to-date))))
+ (sprintf #f " %s" (gnc-print-date to-date))))
(if (not (null? accounts))
; at least 1 account selected
(let* ((exchange-fn (gnc:case-exchange-fn price-source currency to-date))
- (pricedb (gnc:book-get-pricedb (gnc:get-current-book)))
+ (pricedb (gnc-pricedb-get-db (gnc-get-current-book)))
(price-fn
(case price-source
((pricedb-latest)
(lambda (foreign date)
- (gnc:pricedb-lookup-latest-any-currency pricedb foreign)))
+ (gnc-pricedb-lookup-latest-any-currency pricedb foreign)))
((pricedb-nearest)
(lambda (foreign date)
- (gnc:pricedb-lookup-nearest-in-time-any-currency
- pricedb foreign (gnc:timepair-canonical-day-time date))))
+ (gnc-pricedb-lookup-nearest-in-time-any-currency
+ pricedb foreign (timespecCanonicalDayTime date))))
((pricedb-latest-before)
(lambda (foreign date)
- (gnc:pricedb-lookup-latest-before-any-currency
- pricedb foreign (gnc:timepair-canonical-day-time date))))))
+ (gnc-pricedb-lookup-latest-before-any-currency
+ pricedb foreign (timespecCanonicalDayTime date))))))
(headercols (list (_ "Account")))
(totalscols (list (gnc:make-html-table-cell/markup "total-label-cell" (_ "Total"))))
- (sum-total-both-gains (gnc:numeric-zero))
- (sum-total-gain (gnc:numeric-zero))
- (sum-total-ugain (gnc:numeric-zero)))
+ (sum-total-both-gains (gnc-numeric-zero))
+ (sum-total-gain (gnc-numeric-zero))
+ (sum-total-ugain (gnc-numeric-zero)))
;;begin building lists for which columns to display
(if show-symbol
@@ -653,7 +654,7 @@
(set! sum-total-gain (gnc:sum-collector-commodity total-gain currency exchange-fn))
(set! sum-total-ugain (gnc:sum-collector-commodity total-ugain currency exchange-fn))
- (set! sum-total-both-gains (gnc:make-gnc-monetary currency (gnc:numeric-add (gnc:gnc-monetary-amount sum-total-gain)
+ (set! sum-total-both-gains (gnc:make-gnc-monetary currency (gnc-numeric-add (gnc:gnc-monetary-amount sum-total-gain)
(gnc:gnc-monetary-amount sum-total-ugain)
100 GNC-RND-ROUND)))
@@ -682,12 +683,12 @@
"total-number-cell" sum-total-both-gains)
(gnc:make-html-table-cell/markup
"total-number-cell"
- (let ((totalinvalue (gnc:numeric-to-double
+ (let ((totalinvalue (gnc-numeric-to-double
(gnc:gnc-monetary-amount (gnc:monetary-neg (gnc:sum-collector-commodity
total-moneyin currency exchange-fn))))))
(if (= 0.0 totalinvalue)
(sprintf #f "%.2f%%" totalinvalue)
- (sprintf #f "%.2f%%" (* 100 (/ (gnc:numeric-to-double
+ (sprintf #f "%.2f%%" (* 100 (/ (gnc-numeric-to-double
(gnc:gnc-monetary-amount sum-total-both-gains))
totalinvalue))))))
))
Modified: gnucash/trunk/src/report/standard-reports/average-balance.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/average-balance.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/average-balance.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -71,10 +71,13 @@
;; otherwise get some accounts -- here as an
;; example we get the asset and liability stuff
(gnc:filter-accountlist-type
- '(bank cash credit asset liability payable receivable)
- ;; or: '(bank cash checking savings stock
- ;; mutual-fund money-market)
- (gnc:group-get-account-list (gnc:get-current-group)))))))
+ (list ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-CREDIT
+ ACCT-TYPE-ASSET ACCT-TYPE-LIABILITY
+ ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE)
+ ;; or: (list ACCT-TYPE-BANK ACCT-TYPE-CASH
+ ;; ACCT-TYPE-CHECKING ACCT-TYPE-SAVINGS ACCT-TYPE-STOCK
+ ;; ACCT-TYPE-MUTUAL ACCT-TYPE-MONEYMRKT)
+ (xaccGroupGetAccountListSorted (gnc-get-current-group)))))))
#f #t))
;; Display tab
@@ -137,8 +140,8 @@
gain-loss-accum)
(set! data-rows
(cons
- (list (gnc:print-date interval-start)
- (gnc:print-date interval-end)
+ (list (gnc-print-date interval-start)
+ (gnc-print-date interval-end)
(/ (stats-accum 'total #f)
(gnc:timepair-delta interval-start
interval-end))
@@ -156,8 +159,8 @@
(define (get-split-value split date)
(monetary->double
(gnc:make-gnc-monetary
- (gnc:account-get-commodity (gnc:split-get-account split))
- (gnc:split-get-amount split))
+ (xaccAccountGetCommodity (xaccSplitGetAccount split))
+ (xaccSplitGetAmount split))
date))
;; calculate the statistics for one interval - returns a list
@@ -192,14 +195,14 @@
(define (split-recurse)
(if (or (null? splits) (gnc:timepair-gt
- (gnc:transaction-get-date-posted
- (gnc:split-get-parent
+ (gnc-transaction-get-date-posted
+ (xaccSplitGetParent
(car splits))) to))
#f
(let*
((split (car splits))
- (split-time (gnc:transaction-get-date-posted
- (gnc:split-get-parent split)))
+ (split-time (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split)))
;; FIXME: Which date should we use here? The 'to'
;; date? the 'split-time'?
(split-amt (get-split-value split split-time)))
@@ -303,7 +306,7 @@
(list-all-zeros? (cdr alist)))))
(define (monetary->double foreign-monetary date)
- (gnc:numeric-to-double
+ (gnc-numeric-to-double
(gnc:gnc-monetary-amount
(exchange-fn foreign-monetary report-currency date))))
@@ -311,7 +314,7 @@
;;(warn commodity-list)
(if (not (null? accounts))
- (let ((query (gnc:malloc-query))
+ (let ((query (qof-query-create-for-splits))
(splits '())
(data '()))
@@ -337,11 +340,11 @@
;; initialize the query to find splits in the right
;; date range and accounts
- (gnc:query-set-book query (gnc:get-current-book))
+ (qof-query-set-book query (gnc-get-current-book))
;; for balance purposes, we don't need to do this, but it cleans up
;; the table display.
- (gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
+ (gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
;; add accounts to the query (include subaccounts
;; if requested)
(gnc:report-percent-done 25)
@@ -362,18 +365,18 @@
(delete-duplicates (append accounts subaccts)))))
(gnc:report-percent-done 30)
- (gnc:query-add-account-match query accounts 'guid-match-any 'query-and)
+ (xaccQueryAddAccountMatch query accounts QOF-GUID-MATCH-ANY QOF-QUERY-AND)
;; match splits between start and end dates
- (gnc:query-add-date-match-timepair
- query #t begindate #t enddate 'query-and)
- (gnc:query-set-sort-order query
- (list gnc:split-trans gnc:trans-date-posted)
- (list gnc:query-default-sort)
+ (xaccQueryAddDateMatchTS
+ query #t begindate #t enddate QOF-QUERY-AND)
+ (qof-query-set-sort-order query
+ (list SPLIT-TRANS TRANS-DATE-POSTED)
+ (list QUERY-DEFAULT-SORT)
'())
;; get the query results
- (set! splits (gnc:query-get-splits query))
+ (set! splits (qof-query-run query))
(gnc:report-percent-done 40)
;; find the net starting balance for the set of accounts
@@ -382,11 +385,11 @@
accounts
(lambda (acct) (gnc:account-get-comm-balance-at-date
acct beforebegindate #f))
- gnc:account-reverse-balance?))
+ gnc-reverse-balance))
(gnc:report-percent-done 50)
(set! startbal
- (gnc:numeric-to-double
+ (gnc-numeric-to-double
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
startbal
Modified: gnucash/trunk/src/report/standard-reports/balance-sheet.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/balance-sheet.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/balance-sheet.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -22,7 +22,7 @@
;; sheet to no more than daily resolution.
;;
;; The Company Name field does not currently default to the name
-;; in (gnc:get-current-book).
+;; in (gnc-get-current-book).
;;
;; Line & column alignments still do not conform with
;; textbook accounting practice (they're close though!).
@@ -156,7 +156,7 @@
(gnc:make-string-option
gnc:pagename-general optname-party-name
"b" opthelp-party-name ""))
- ;; this should default to company name in (gnc:get-current-book)
+ ;; this should default to company name in (gnc-get-current-book)
;; does anyone know the function to get the company name??
;; (GnuCash is *so* well documented... sigh)
@@ -177,9 +177,12 @@
opthelp-accounts
(lambda ()
(gnc:filter-accountlist-type
- '(bank cash credit asset liability stock mutual-fund currency
- payable receivable equity income expense)
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (list ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-CREDIT
+ ACCT-TYPE-ASSET ACCT-TYPE-LIABILITY
+ ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
+ ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
+ ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
#f #t))
(gnc:options-add-account-levels!
options gnc:pagename-accounts optname-depth-limit
@@ -337,14 +340,14 @@
;; decompose the account list
(split-up-accounts (gnc:decompose-accountlist accounts))
(asset-accounts
- (assoc-ref split-up-accounts 'asset))
+ (assoc-ref split-up-accounts ACCT-TYPE-ASSET))
(liability-accounts
- (assoc-ref split-up-accounts 'liability))
+ (assoc-ref split-up-accounts ACCT-TYPE-LIABILITY))
+ (income-expense-accounts
+ (append (assoc-ref split-up-accounts ACCT-TYPE-INCOME)
+ (assoc-ref split-up-accounts ACCT-TYPE-EXPENSE)))
(equity-accounts
- (assoc-ref split-up-accounts 'equity))
- (income-expense-accounts
- (append (assoc-ref split-up-accounts 'income)
- (assoc-ref split-up-accounts 'expense)))
+ (assoc-ref split-up-accounts ACCT-TYPE-EQUITY))
(doc (gnc:make-html-document))
;; this can occasionally put extra (blank) columns in our
@@ -366,7 +369,7 @@
(define allow-same-column-totals #t)
(let* ((neg? (and signed-balance
neg-label
- (gnc:numeric-negative-p
+ (gnc-numeric-negative-p
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
signed-balance report-commodity exchange-fn)))))
@@ -406,7 +409,7 @@
;;(gnc:warn "account names" liability-account-names)
(gnc:html-document-set-title!
doc (string-append company-name " " report-title " "
- (gnc:print-date date-tp))
+ (gnc-print-date date-tp))
)
(if (null? accounts)
@@ -520,7 +523,7 @@
report-commodity
weighted-fn)))
- (unrealized-gain (gnc:numeric-sub-fixed value cost)))
+ (unrealized-gain (gnc-numeric-sub-fixed value cost)))
(unrealized-gain-collector 'add report-commodity unrealized-gain)
)
@@ -641,13 +644,13 @@
;; we omit retianed earnings & unrealized gains
;; from the balance report, if zero, since they
;; are not present on normal balance sheets
- (and (not (gnc:commodity-collector-allzero?
+ (and (not (gnc-commodity-collector-allzero?
retained-earnings))
(add-subtotal-line right-table
(_ "Retained Earnings")
(_ "Retained Losses")
retained-earnings))
- (and (not (gnc:commodity-collector-allzero?
+ (and (not (gnc-commodity-collector-allzero?
unrealized-gain-collector))
(add-subtotal-line right-table
(_ "Unrealized Gains")
Modified: gnucash/trunk/src/report/standard-reports/budget.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/budget.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/budget.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -34,7 +34,7 @@
(require 'sort)
(gnc:module-load "gnucash/report/report-system" 0)
-(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc:html-build-url
+(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc-build-url
(define reportname (N_ "Budget Report"))
@@ -90,8 +90,9 @@
optname-accounts "a" 2
(lambda ()
(gnc:filter-accountlist-type
- '(asset liability income expense)
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (list ACCT-TYPE-ASSET ACCT-TYPE-LIABILITY ACCT-TYPE-INCOME
+ ACCT-TYPE-EXPENSE)
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
#f)
;; Set the general page as default option tab
@@ -106,25 +107,25 @@
(define (gnc:html-table-add-budget-line!
html-table rownum colnum
budget acct exchange-fn)
- (let* ((num-periods (gnc:budget-get-num-periods budget))
+ (let* ((num-periods (gnc-budget-get-num-periods budget))
(period 0)
)
(while (< period num-periods)
(let* ((bgt-col (+ (* period 2) colnum 1))
(act-col (+ 1 bgt-col))
- (comm (gnc:account-get-commodity acct))
- (bgt-unset? (not (gnc:budget-is-account-period-value-set
+ (comm (xaccAccountGetCommodity acct))
+ (bgt-unset? (not (gnc-budget-is-account-period-value-set
budget acct period)))
- (numeric-val (gnc:budget-get-account-period-value
+ (numeric-val (gnc-budget-get-account-period-value
budget acct period))
(bgt-val (if bgt-unset? "."
(gnc:make-gnc-monetary comm numeric-val)))
- (numeric-val (gnc:budget-get-account-period-actual-value
+ (numeric-val (gnc-budget-get-account-period-actual-value
budget acct period))
(act-val (gnc:make-gnc-monetary comm numeric-val))
- (reverse-balance? (gnc:account-reverse-balance? acct))
+ (reverse-balance? (gnc-reverse-balance acct))
)
(cond (reverse-balance? (set! act-val
@@ -146,7 +147,7 @@
)
(define (gnc:html-table-add-budget-headers!
html-table colnum budget)
- (let* ((num-periods (gnc:budget-get-num-periods budget))
+ (let* ((num-periods (gnc-budget-get-num-periods budget))
(period 0)
)
@@ -158,10 +159,10 @@
(while (< period num-periods)
(let* ((bgt-col (+ (* period 2) colnum 1))
(act-col (+ 1 bgt-col))
- (date (gnc:budget-get-period-start-date budget period))
+ (date (gnc-budget-get-period-start-date budget period))
)
(gnc:html-table-set-cell!
- html-table 0 bgt-col (gnc:print-date date))
+ html-table 0 bgt-col (gnc-print-date date))
(gnc:html-table-set-cell!
html-table
@@ -250,10 +251,10 @@
;; is account in list of accounts?
(define (same-account? a1 a2)
- (string=? (gnc:account-get-guid a1) (gnc:account-get-guid a2)))
+ (string=? (gncAccountGetGUID a1) (gncAccountGetGUID a2)))
(define (same-split? s1 s2)
- (string=? (gnc:split-get-guid s1) (gnc:split-get-guid s2)))
+ (string=? (gncSplitGetGUID s1) (gncSplitGetGUID s2)))
(define account-in-list?
(lambda (account accounts)
@@ -278,12 +279,12 @@
;; helper for sorting of account list
(define (account-full-name<? a b)
- (string<? (gnc:account-get-full-name a) (gnc:account-get-full-name b)))
+ (string<? (gnc-account-get-full-name a) (gnc-account-get-full-name b)))
;; helper for account depth
(define (account-get-depth account)
(define (account-get-depth-internal account-internal depth)
- (let ((parent (gnc:account-get-parent-account account-internal)))
+ (let ((parent (xaccAccountGetParentAccount account-internal)))
(if parent
(account-get-depth-internal parent (+ depth 1))
depth)))
@@ -331,7 +332,7 @@
(gnc:html-document-set-title!
doc (sprintf #f (_ "%s: %s")
- report-name (gnc:budget-get-name budget)))
+ report-name (gnc-budget-get-name budget)))
(set! accounts (sort accounts account-full-name<?))
Modified: gnucash/trunk/src/report/standard-reports/cash-flow.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/cash-flow.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/cash-flow.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -36,7 +36,7 @@
(require 'sort)
(gnc:module-load "gnucash/report/report-system" 0)
-(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc:html-build-url
+(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc-build-url
(define reportname (N_ "Cash Flow"))
@@ -91,8 +91,9 @@
optname-accounts "a" 2
(lambda ()
(gnc:filter-accountlist-type
- '(bank cash asset stock mutual-fund)
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-ASSET
+ ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL)
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
#f)
;; Set the general page as default option tab
@@ -150,10 +151,10 @@
;; is account in list of accounts?
(define (same-account? a1 a2)
- (string=? (gnc:account-get-guid a1) (gnc:account-get-guid a2)))
+ (string=? (gncAccountGetGUID a1) (gncAccountGetGUID a2)))
(define (same-split? s1 s2)
- (string=? (gnc:split-get-guid s1) (gnc:split-get-guid s2)))
+ (string=? (gncSplitGetGUID s1) (gncSplitGetGUID s2)))
(define account-in-list?
(lambda (account accounts)
@@ -178,12 +179,12 @@
;; helper for sorting of account list
(define (account-full-name<? a b)
- (string<? (gnc:account-get-full-name a) (gnc:account-get-full-name b)))
+ (string<? (gnc-account-get-full-name a) (gnc-account-get-full-name b)))
;; helper for account depth
(define (account-get-depth account)
(define (account-get-depth-internal account-internal depth)
- (let ((parent (gnc:account-get-parent-account account-internal)))
+ (let ((parent (xaccAccountGetParentAccount account-internal)))
(if parent
(account-get-depth-internal parent (+ depth 1))
depth)))
@@ -203,7 +204,7 @@
(gnc:html-document-set-title!
doc (sprintf #f (_ "%s - %s to %s for")
(get-option gnc:pagename-general gnc:optname-reportname)
- (gnc:print-date from-date-tp) (gnc:print-date to-date-tp)))
+ (gnc-print-date from-date-tp) (gnc-print-date to-date-tp)))
;; add subaccounts if requested
@@ -250,51 +251,51 @@
(if (not (null? accounts-internal))
(let* ((current (car accounts-internal))
(rest (cdr accounts-internal))
- (name (gnc:account-get-name current))
- (curr-commodity (gnc:account-get-commodity current))
+ (name (xaccAccountGetName current))
+ (curr-commodity (xaccAccountGetCommodity current))
)
- ;(gnc:debug "calc-money-in-out-internal---" name "---" (gnc:commodity-get-printname curr-commodity))
+ ;(gnc:debug "calc-money-in-out-internal---" name "---" (gnc-commodity-get-printname curr-commodity))
(for-each
(lambda (split)
(set! work-done (+ 1 work-done))
(gnc:report-percent-done (* 85 (/ work-done splits-to-do)))
- (let ((parent (gnc:split-get-parent split)))
- (if (and (gnc:timepair-le (gnc:transaction-get-date-posted parent) to-date-tp)
- (gnc:timepair-ge (gnc:transaction-get-date-posted parent) from-date-tp))
- (let* ((parent-description (gnc:transaction-get-description parent))
- (parent-currency (gnc:transaction-get-currency parent)))
+ (let ((parent (xaccSplitGetParent split)))
+ (if (and (gnc:timepair-le (gnc-transaction-get-date-posted parent) to-date-tp)
+ (gnc:timepair-ge (gnc-transaction-get-date-posted parent) from-date-tp))
+ (let* ((parent-description (xaccTransGetDescription parent))
+ (parent-currency (xaccTransGetCurrency parent)))
;(gnc:debug parent-description
; " - "
- ; (gnc:commodity-get-printname parent-currency))
+ ; (gnc-commodity-get-printname parent-currency))
(for-each
(lambda (s)
- (let* ((s-account (gnc:split-get-account s))
- (s-amount (gnc:split-get-amount s))
- (s-value (gnc:split-get-value s))
- (s-commodity (gnc:account-get-commodity s-account)))
+ (let* ((s-account (xaccSplitGetAccount s))
+ (s-amount (xaccSplitGetAmount s))
+ (s-value (xaccSplitGetValue s))
+ (s-commodity (xaccAccountGetCommodity s-account)))
;; Check if this is a dangling split
;; and print a warning
(if (not s-account)
(display
(string-append
"WARNING: s-account is NULL for split: "
- (gnc:split-get-guid s) "\n")))
+ (gncSplitGetGUID s) "\n")))
- ;(gnc:debug (gnc:account-get-name s-account))
+ ;(gnc:debug (xaccAccountGetName s-account))
(if (and ;; make sure we don't have
s-account ;; any dangling splits
(not (account-in-list? s-account accounts)))
(if (not (split-in-list? s seen-split-list))
(begin
(set! seen-split-list (cons s seen-split-list))
- (if (gnc:numeric-negative-p s-value)
+ (if (gnc-numeric-negative-p s-value)
(let ((pair (account-in-alist s-account money-in-alist)))
- ;(gnc:debug "in:" (gnc:commodity-get-printname s-commodity)
- ; (gnc:numeric-to-double s-amount)
- ; (gnc:commodity-get-printname parent-currency)
- ; (gnc:numeric-to-double s-value))
+ ;(gnc:debug "in:" (gnc-commodity-get-printname s-commodity)
+ ; (gnc-numeric-to-double s-amount)
+ ; (gnc-commodity-get-printname parent-currency)
+ ; (gnc-numeric-to-double s-value))
(if (not pair)
(begin
(set! pair (list s-account (gnc:make-commodity-collector)))
@@ -305,17 +306,17 @@
)
(let ((s-account-in-collector (cadr pair))
(s-report-value (to-report-currency parent-currency
- (gnc:numeric-neg s-value)
- (gnc:transaction-get-date-posted
+ (gnc-numeric-neg s-value)
+ (gnc-transaction-get-date-posted
parent))))
(money-in-collector 'add report-currency s-report-value)
(s-account-in-collector 'add report-currency s-report-value))
)
(let ((pair (account-in-alist s-account money-out-alist)))
- ;(gnc:debug "out:" (gnc:commodity-get-printname s-commodity)
- ; (gnc:numeric-to-double s-amount)
- ; (gnc:commodity-get-printname parent-currency)
- ; (gnc:numeric-to-double s-value))
+ ;(gnc:debug "out:" (gnc-commodity-get-printname s-commodity)
+ ; (gnc-numeric-to-double s-amount)
+ ; (gnc-commodity-get-printname parent-currency)
+ ; (gnc-numeric-to-double s-value))
(if (not pair)
(begin
(set! pair (list s-account (gnc:make-commodity-collector)))
@@ -327,7 +328,7 @@
(let ((s-account-out-collector (cadr pair))
(s-report-value (to-report-currency parent-currency
s-value
- (gnc:transaction-get-date-posted
+ (gnc-transaction-get-date-posted
parent))))
(money-out-collector 'add report-currency s-report-value)
(s-account-out-collector 'add report-currency s-report-value))
@@ -338,13 +339,13 @@
)
)
)
- (gnc:transaction-get-splits parent)
+ (xaccTransGetSplits parent)
)
)
)
)
)
- (gnc:account-get-split-list current)
+ (xaccAccountGetSplitList current)
)
(calc-money-in-out-internal rest))))
@@ -389,8 +390,8 @@
(gnc:html-markup-anchor
(gnc:account-anchor-text account)
(if show-full-names?
- (gnc:account-get-full-name account)
- (gnc:account-get-name account))))))
+ (gnc-account-get-full-name account)
+ (xaccAccountGetName account))))))
(set! account-disp-list (cons anchor account-disp-list))
)
@@ -438,8 +439,8 @@
(gnc:html-markup-anchor
(gnc:account-anchor-text acct)
(if show-full-names?
- (gnc:account-get-full-name acct)
- (gnc:account-get-name acct))))
+ (gnc-account-get-full-name acct)
+ (xaccAccountGetName acct))))
(gnc:make-html-table-header-cell/markup
"number-cell" (gnc:sum-collector-commodity (cadr pair) report-currency exchange-fn))))
)
@@ -483,8 +484,8 @@
(gnc:html-markup-anchor
(gnc:account-anchor-text acct)
(if show-full-names?
- (gnc:account-get-full-name acct)
- (gnc:account-get-name acct))))
+ (gnc-account-get-full-name acct)
+ (xaccAccountGetName acct))))
(gnc:make-html-table-header-cell/markup
"number-cell" (gnc:sum-collector-commodity (cadr pair) report-currency exchange-fn))))
)
Modified: gnucash/trunk/src/report/standard-reports/category-barchart.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/category-barchart.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/category-barchart.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -116,7 +116,7 @@
(lambda ()
(gnc:filter-accountlist-type
account-types
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
(lambda (accounts)
(list #t
(gnc:filter-accountlist-type account-types accounts)))
@@ -212,8 +212,8 @@
(chart (gnc:make-html-barchart))
(topl-accounts (gnc:filter-accountlist-type
account-types
- (gnc:group-get-account-list
- (gnc:get-current-group)))))
+ (xaccGroupGetAccountListSorted
+ (gnc-get-current-group)))))
;; Returns true if the account a was selected in the account
;; selection option.
@@ -243,7 +243,7 @@
;; created.
(date-string-list
(map (lambda (date-list-item)
- (gnc:print-date
+ (gnc-print-date
(if do-intervals?
(car date-list-item)
date-list-item)))
@@ -257,7 +257,7 @@
(define (collector->double c date)
;; Future improvement: Let the user choose which kind of
;; currency combining she want to be done.
- (gnc:numeric-to-double
+ (gnc-numeric-to-double
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
c report-currency
@@ -370,16 +370,16 @@
(cond
((eq? sort-method 'acct-code)
(lambda (a b)
- (string<? (gnc:account-get-code (car a))
- (gnc:account-get-code (car b)))))
+ (string<? (xaccAccountGetCode (car a))
+ (xaccAccountGetCode (car b)))))
((eq? sort-method 'alphabetical)
(lambda (a b)
(string<? ((if show-fullname?
- gnc:account-get-full-name
- gnc:account-get-name) (car a))
+ gnc-account-get-full-name
+ xaccAccountGetName) (car a))
((if show-fullname?
- gnc:account-get-full-name
- gnc:account-get-name) (car b)))))
+ gnc-account-get-full-name
+ xaccAccountGetName) (car b)))))
(else
(lambda (a b)
(> (apply + (cadr a))
@@ -406,8 +406,8 @@
(if do-intervals?
(_ "%s to %s")
(_ "Balances %s to %s"))
- (gnc:print-date from-date-tp)
- (gnc:print-date to-date-tp)))
+ (gnc-print-date from-date-tp)
+ (gnc-print-date to-date-tp)))
(gnc:html-barchart-set-width! chart width)
(gnc:html-barchart-set-height! chart height)
@@ -416,7 +416,7 @@
;; FIXME: axis labels are not yet supported by
;; libguppitank.
(gnc:html-barchart-set-y-axis-label!
- chart (gnc:commodity-get-mnemonic report-currency))
+ chart (gnc-commodity-get-mnemonic report-currency))
(gnc:html-barchart-set-row-labels-rotated?! chart #t)
(gnc:html-barchart-set-stacked?! chart stacked?)
;; If this is a stacked barchart, then reverse the legend.
@@ -468,8 +468,8 @@
(if (string? (car pair))
(car pair)
((if show-fullname?
- gnc:account-get-full-name
- gnc:account-get-name) (car pair)))
+ gnc-account-get-full-name
+ xaccAccountGetName) (car pair)))
'pre " " (_ "and") " " 'post))
all-data))
(gnc:html-barchart-set-col-colors!
@@ -507,8 +507,8 @@
(list gnc:pagename-general
gnc:optname-reportname
((if show-fullname?
- gnc:account-get-full-name
- gnc:account-get-name) acct))))))))
+ gnc-account-get-full-name
+ xaccAccountGetName) acct))))))))
all-data)))
(gnc:html-barchart-set-button-1-bar-urls!
chart (append urls urls))
@@ -554,12 +554,15 @@
(list
;; reportname, account-types, do-intervals?,
;; menu-reportname, menu-tip
- (list reportname-income '(income) #t menuname-income menutip-income (lambda (x) #t))
- (list reportname-expense '(expense) #t menuname-expense menutip-expense (lambda (x) #f))
+ (list reportname-income (list ACCT-TYPE-INCOME) #t menuname-income menutip-income (lambda (x) #t))
+ (list reportname-expense (list ACCT-TYPE-EXPENSE) #t menuname-expense menutip-expense (lambda (x) #f))
(list reportname-assets
- '(asset bank cash checking savings money-market receivable
- stock mutual-fund currency)
+ (list ACCT-TYPE-ASSET ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-CHECKING
+ ACCT-TYPE-SAVINGS ACCT-TYPE-MONEYMRKT
+ ACCT-TYPE-RECEIVABLE ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL
+ ACCT-TYPE-CURRENCY)
#f menuname-assets menutip-assets (lambda (x) #f))
(list reportname-liabilities
- '(liability payable credit credit-line)
+ (list ACCT-TYPE-LIABILITY ACCT-TYPE-PAYABLE ACCT-TYPE-CREDIT
+ ACCT-TYPE-CREDITLINE)
#f menuname-liabilities menutip-liabilities (lambda (x) #t))))
Modified: gnucash/trunk/src/report/standard-reports/daily-reports.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/daily-reports.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/daily-reports.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -102,7 +102,7 @@
(lambda ()
(gnc:filter-accountlist-type
account-types
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
(lambda (accounts)
(list #t
(gnc:filter-accountlist-type
@@ -170,8 +170,8 @@
(define (get-split-value split date)
(monetary->double
(gnc:make-gnc-monetary
- (gnc:account-get-commodity (gnc:split-get-account split))
- (gnc:split-get-amount split))
+ (xaccAccountGetCommodity (xaccSplitGetAccount split))
+ (xaccSplitGetAmount split))
date))
;; calculate the statistics for one interval - returns a list
@@ -206,14 +206,14 @@
(define (split-recurse)
(if (or (null? splits) (gnc:timepair-gt
- (gnc:transaction-get-date-posted
- (gnc:split-get-parent
+ (gnc-transaction-get-date-posted
+ (xaccSplitGetParent
(car splits))) to))
#f
(let*
((split (car splits))
- (split-time (gnc:transaction-get-date-posted
- (gnc:split-get-parent split)))
+ (split-time (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split)))
;; FIXME: Which date should we use here? The 'to'
;; date? the 'split-time'?
(split-amt (get-split-value split split-time)))
@@ -306,7 +306,7 @@
(commodity-list #f)
(exchange-fn #f)
- (print-info (gnc:commodity-print-info report-currency #t))
+ (print-info (gnc-commodity-print-info report-currency #t))
(beforebegindate (gnc:timepair-end-day-time
(gnc:timepair-previous-day from-date-tp)))
@@ -314,11 +314,11 @@
(chart (gnc:make-html-piechart))
(topl-accounts (gnc:filter-accountlist-type
account-types
- (gnc:group-get-account-list
- (gnc:get-current-group)))))
+ (xaccGroupGetAccountListSorted
+ (gnc-get-current-group)))))
(define (monetary->double foreign-monetary date)
- (gnc:numeric-to-double
+ (gnc-numeric-to-double
(gnc:gnc-monetary-amount
(exchange-fn foreign-monetary report-currency date))))
@@ -338,7 +338,7 @@
(filter proc (cdr l)))))
(if (not (null? accounts))
- (let* ((query (gnc:malloc-query))
+ (let* ((query (qof-query-create-for-splits))
(splits '())
(data '())
;; startbal will be a commodity-collector
@@ -378,11 +378,11 @@
;; initialize the query to find splits in the right
;; date range and accounts
- (gnc:query-set-book query (gnc:get-current-book))
+ (qof-query-set-book query (gnc-get-current-book))
;; for balance purposes, we don't need to do this, but it cleans up
;; the table display.
- (gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
+ (gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
;; add accounts to the query (include subaccounts
;; if requested)
(gnc:report-percent-done 25)
@@ -403,18 +403,18 @@
(delete-duplicates (append accounts subaccts)))))
(gnc:report-percent-done 30)
- (gnc:query-add-account-match query accounts 'guid-match-any 'query-and)
+ (xaccQueryAddAccountMatch query accounts QOF-GUID-MATCH-ANY QOF-QUERY-AND)
;; match splits between start and end dates
- (gnc:query-add-date-match-timepair
- query #t from-date-tp #t to-date-tp 'query-and)
- (gnc:query-set-sort-order query
- (list gnc:split-trans gnc:trans-date-posted)
- (list gnc:query-default-sort)
+ (xaccQueryAddDateMatchTS
+ query #t from-date-tp #t to-date-tp QOF-QUERY-AND)
+ (qof-query-set-sort-order query
+ (list SPLIT-TRANS TRANS-DATE-POSTED)
+ (list QUERY-DEFAULT-SORT)
'())
;; get the query results
- (set! splits (gnc:query-get-splits query))
+ (set! splits (qof-query-run query))
(gnc:report-percent-done 40)
;; find the net starting balance for the set of accounts
@@ -423,11 +423,11 @@
accounts
(lambda (acct) (gnc:account-get-comm-balance-at-date
acct beforebegindate #f))
- gnc:account-reverse-balance?))
+ gnc-reverse-balance))
(gnc:report-percent-done 50)
(set! startbal
- (gnc:numeric-to-double
+ (gnc-numeric-to-double
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
startbal
@@ -463,10 +463,10 @@
(string-append
(car p)
" - "
- (gnc:amount->string
- (gnc:double-to-gnc-numeric
+ (xaccPrintAmount
+ (double-to-gnc-numeric
(cadr p)
- (gnc:commodity-get-fraction report-currency)
+ (gnc-commodity-get-fraction report-currency)
GNC-RND-ROUND)
print-info))
(car p)))
@@ -482,16 +482,16 @@
chart (string-append
(sprintf #f
(_ "%s to %s")
- (gnc:print-date from-date-tp)
- (gnc:print-date to-date-tp))
+ (gnc-print-date from-date-tp)
+ (gnc-print-date to-date-tp))
(if show-total?
(let ((total (apply + daily-totals)))
(sprintf
#f ": %s"
- (gnc:amount->string
- (gnc:double-to-gnc-numeric
+ (xaccPrintAmount
+ (double-to-gnc-numeric
total
- (gnc:commodity-get-fraction report-currency)
+ (gnc-commodity-get-fraction report-currency)
GNC-RND-ROUND)
print-info)))
"")))
@@ -531,5 +531,5 @@
(list
;; reportname, account-types, menu-reportname, menu-tip
- (list reportname-income '(income) menuname-income menutip-income)
- (list reportname-expense '(expense) menuname-expense menutip-expense)))
+ (list reportname-income (list ACCT-TYPE-INCOME) menuname-income menutip-income)
+ (list reportname-expense (list ACCT-TYPE-EXPENSE) menuname-expense menutip-expense)))
Modified: gnucash/trunk/src/report/standard-reports/equity-statement.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/equity-statement.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/equity-statement.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -112,7 +112,7 @@
(gnc:make-string-option
(N_ "General") optname-party-name
"b" opthelp-party-name ""))
- ;; this should default to company name in (gnc:get-current-book)
+ ;; this should default to company name in (gnc-get-current-book)
;; does anyone know the function to get the company name??
;; (GnuCash is *so* well documented... sigh)
@@ -129,9 +129,12 @@
opthelp-accounts
(lambda ()
(gnc:filter-accountlist-type
- '(bank cash credit asset liability stock mutual-fund currency
- payable receivable equity income expense)
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (list ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-CREDIT
+ ACCT-TYPE-ASSET ACCT-TYPE-LIABILITY
+ ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
+ ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
+ ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
#f #t))
;; all about currencies
@@ -237,14 +240,15 @@
;; decompose the account list
(split-up-accounts (gnc:decompose-accountlist accounts))
(asset-accounts
- (assoc-ref split-up-accounts 'asset))
+ (assoc-ref split-up-accounts ACCT-TYPE-ASSET))
(liability-accounts
- (assoc-ref split-up-accounts 'liability))
+ (assoc-ref split-up-accounts ACCT-TYPE-LIABILITY))
(income-expense-accounts
- (append (assoc-ref split-up-accounts 'income)
- (assoc-ref split-up-accounts 'expense)))
+ (append (assoc-ref split-up-accounts ACCT-TYPE-INCOME)
+ (assoc-ref split-up-accounts ACCT-TYPE-EXPENSE)))
(equity-accounts
- (assoc-ref split-up-accounts 'equity))
+ (assoc-ref split-up-accounts ACCT-TYPE-EQUITY))
+
;; N.B.: equity-accounts will also contain drawing accounts
;; these must still be split-out and itemized separately
(capital-accounts #f)
@@ -276,8 +280,8 @@
(string-append "%s %s "
(_ "For Period Covering %s to %s"))
company-name report-title
- (gnc:print-date start-date-printable)
- (gnc:print-date end-date-tp)))
+ (gnc-print-date start-date-printable)
+ (gnc-print-date end-date-tp)))
(if (null? accounts)
@@ -340,8 +344,8 @@
(period-for (if terse-period?
(string-append " " (_ "for Period"))
(sprintf #f (string-append ", " (_ "%s to %s"))
- (gnc:print-date start-date-printable)
- (gnc:print-date end-date-tp))
+ (gnc-print-date start-date-printable)
+ (gnc-print-date end-date-tp))
))
)
@@ -351,7 +355,7 @@
exchange-fn rule? row-style)
(let* ((neg? (and amount
neg-label
- (gnc:numeric-negative-p
+ (gnc-numeric-negative-p
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
amount report-commodity exchange-fn)))))
@@ -367,7 +371,7 @@
(or (and (gnc:uniform-commodity? pos-bal report-commodity)
bal)
(and show-fcur?
- (gnc:commodity-table
+ (gnc-commodity-table
pos-bal report-commodity exchange-fn))
bal
))
@@ -409,7 +413,7 @@
report-commodity
weighted-fn)))
- (unrealized-gain (gnc:numeric-sub-fixed value cost)))
+ (unrealized-gain (gnc-numeric-sub-fixed value cost)))
(unrealized-gain-collector 'add report-commodity unrealized-gain)
unrealized-gain-collector
@@ -582,7 +586,7 @@
(report-line
build-table
(string-append (_ "Capital") ", "
- (gnc:print-date start-date-printable))
+ (gnc-print-date start-date-printable))
#f start-total-equity
1 start-exchange-fn #f "primary-subheading"
)
@@ -607,7 +611,7 @@
withdrawals
0 end-exchange-fn #f #f
)
- (or (gnc:commodity-collector-allzero? net-unrealized-gains)
+ (or (gnc-commodity-collector-allzero? net-unrealized-gains)
(report-line
build-table
(_ "Unrealized Gains")
@@ -626,7 +630,7 @@
(report-line
build-table
(string-append (_ "Capital") ", "
- (gnc:print-date end-date-tp))
+ (gnc-print-date end-date-tp))
#f
end-total-equity
1 end-exchange-fn #f "primary-subheading"
@@ -639,8 +643,8 @@
(and show-rates?
(let* ((curr-tbl (gnc:make-html-table))
(headers (list
- (gnc:print-date start-date-printable)
- (gnc:print-date end-date-tp)
+ (gnc-print-date start-date-printable)
+ (gnc-print-date end-date-tp)
)
)
(then (gnc:html-make-exchangerates
Modified: gnucash/trunk/src/report/standard-reports/general-journal.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/general-journal.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/general-journal.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -48,7 +48,7 @@
(define (general-journal-options-generator)
(let* ((options (gnc:report-template-new-options/name regrptname))
- (query (gnc:malloc-query))
+ (query (qof-query-create-for-splits))
)
(define (set-option! section name value)
@@ -60,19 +60,19 @@
;; however, may be of issue here. Since I don't know if the
;; Register Report properly ignores voided transactions, I'll err
;; on the side of safety by excluding them from the query....
- (gnc:query-set-book query (gnc:get-current-book))
- (gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
- (gnc:query-set-sort-order query
- (list gnc:split-trans gnc:trans-date-posted)
- (list gnc:query-default-sort)
+ (qof-query-set-book query (gnc-get-current-book))
+ (gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
+ (qof-query-set-sort-order query
+ (list SPLIT-TRANS TRANS-DATE-POSTED)
+ (list QUERY-DEFAULT-SORT)
'())
- (gnc:query-set-sort-increasing query #t #t #t)
+ (qof-query-set-sort-increasing query #t #t #t)
- (gnc:query-add-account-match
+ (xaccQueryAddAccountMatch
query
- (gnc:group-get-subaccounts (gnc:book-get-template-group (gnc:get-current-book)))
- 'guid-match-none
- 'query-and)
+ (xaccGroupGetSubAccountsSorted (gnc-book-get-template-group (gnc-get-current-book)))
+ QOF-GUID-MATCH-NONE
+ QOF-QUERY-AND)
;; set the "__reg" options required by the Register Report...
(for-each
@@ -80,7 +80,7 @@
(set-option! "__reg" (car l) (cadr l)))
;; One list per option here with: option-name, default-value
(list
- (list "query" (gnc:query->scm query)) ;; think this wants an scm...
+ (list "query" (gnc-query2scm query)) ;; think this wants an scm...
(list "journal" #t)
(list "double" #t)
(list "debit-string" (_ "Debit"))
Modified: gnucash/trunk/src/report/standard-reports/income-statement.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/income-statement.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/income-statement.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -10,7 +10,7 @@
;; statement to no more than daily resolution.
;;
;; The Company Name field does not currently default to the name
-;; in (gnc:get-current-book).
+;; in (gnc-get-current-book).
;;
;; Line & column alignments may still not conform with
;; textbook accounting practice (they're close though!).
@@ -139,7 +139,7 @@
(gnc:make-string-option
gnc:pagename-general optname-party-name
"b" opthelp-party-name ""))
- ;; this should default to company name in (gnc:get-current-book)
+ ;; this should default to company name in (gnc-get-current-book)
;; does anyone know the function to get the company name??
;; (GnuCash is *so* well documented... sigh)
@@ -157,8 +157,8 @@
(lambda ()
(gnc:filter-accountlist-type
;; select, by default, only income and expense accounts
- '(income expense)
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (list ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
#f #t))
(gnc:options-add-account-levels!
options gnc:pagename-accounts optname-depth-limit
@@ -334,11 +334,11 @@
;; decompose the account list
(split-up-accounts (gnc:decompose-accountlist accounts))
- (revenue-accounts (assoc-ref split-up-accounts 'income))
- (expense-accounts (assoc-ref split-up-accounts 'expense))
+ (revenue-accounts (assoc-ref split-up-accounts ACCT-TYPE-INCOME))
+ (expense-accounts (assoc-ref split-up-accounts ACCT-TYPE-EXPENSE))
(income-expense-accounts
- (append (assoc-ref split-up-accounts 'income)
- (assoc-ref split-up-accounts 'expense)))
+ (append (assoc-ref split-up-accounts ACCT-TYPE-INCOME)
+ (assoc-ref split-up-accounts ACCT-TYPE-EXPENSE)))
(doc (gnc:make-html-document))
;; this can occasionally put extra (blank) columns in our
@@ -360,7 +360,7 @@
(define allow-same-column-totals #t)
(let* ((neg? (and signed-balance
neg-label
- (gnc:numeric-negative-p
+ (gnc-numeric-negative-p
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
signed-balance report-commodity exchange-fn)))))
@@ -397,8 +397,8 @@
(string-append "%s %s "
(_ "For Period Covering %s to %s"))
company-name report-title
- (gnc:print-date start-date-printable)
- (gnc:print-date end-date-tp)))
+ (gnc-print-date start-date-printable)
+ (gnc-print-date end-date-tp)))
(if (null? accounts)
@@ -431,8 +431,8 @@
(period-for (if terse-period?
(string-append " " (_ "for Period"))
(sprintf #f (string-append ", " (_ "%s to %s"))
- (gnc:print-date start-date-printable)
- (gnc:print-date end-date-tp))
+ (gnc-print-date start-date-printable)
+ (gnc-print-date end-date-tp))
)
)
)
@@ -443,7 +443,7 @@
exchange-fn rule? row-style)
(let* ((neg? (and amount
neg-label
- (gnc:numeric-negative-p
+ (gnc-numeric-negative-p
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
amount report-commodity exchange-fn)))))
@@ -459,7 +459,7 @@
(or (and (gnc:uniform-commodity? pos-bal report-commodity)
bal)
(and show-fcur?
- (gnc:commodity-table
+ (gnc-commodity-table
pos-bal report-commodity exchange-fn))
bal
))
Modified: gnucash/trunk/src/report/standard-reports/net-barchart.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/net-barchart.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/net-barchart.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -88,7 +88,7 @@
(if inc-exp?
gnc:account-is-inc-exp?
(lambda (account) (not (gnc:account-is-inc-exp? account))))
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
(lambda (accounts)
(list #t
(filter
@@ -193,7 +193,7 @@
;; 'report-currency' according to the exchange-fn. Returns a
;; double.
(define (collector->double c date)
- (gnc:numeric-to-double
+ (gnc-numeric-to-double
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity
c report-currency
@@ -246,23 +246,23 @@
(date-string-list (map
(if inc-exp?
(lambda (date-list-item)
- (gnc:print-date
+ (gnc-print-date
(car date-list-item)))
- gnc:print-date)
+ gnc-print-date)
dates-list)))
(set! assets-list
(process-datelist
(if inc-exp?
accounts
- (assoc-ref classified-accounts 'asset))
+ (assoc-ref classified-accounts ACCT-TYPE-ASSET))
dates-list #t))
(gnc:report-percent-done 70)
(set! liability-list
(process-datelist
(if inc-exp?
accounts
- (assoc-ref classified-accounts 'liability))
+ (assoc-ref classified-accounts ACCT-TYPE-LIABILITY))
dates-list #f))
(gnc:report-percent-done 80)
(set! net-list
@@ -274,13 +274,13 @@
(gnc:html-barchart-set-subtitle!
chart (sprintf #f
(_ "%s to %s")
- (gnc:print-date from-date-tp)
- (gnc:print-date to-date-tp)))
+ (gnc-print-date from-date-tp)
+ (gnc-print-date to-date-tp)))
(gnc:html-barchart-set-width! chart width)
(gnc:html-barchart-set-height! chart height)
(gnc:html-barchart-set-row-labels! chart date-string-list)
(gnc:html-barchart-set-y-axis-label!
- chart (gnc:commodity-get-mnemonic report-currency))
+ chart (gnc-commodity-get-mnemonic report-currency))
;; Determine whether we have enough space for horizontal labels
;; -- kind of a hack. Assumptions: y-axis labels and legend
;; require 200 pixels, and each x-axes label needs 60 pixels.
Modified: gnucash/trunk/src/report/standard-reports/portfolio.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/portfolio.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/portfolio.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -72,8 +72,8 @@
"b"
(N_ "Stock Accounts to report on")
(lambda () (filter gnc:account-is-stock?
- (gnc:group-get-subaccounts
- (gnc:get-current-group))))
+ (xaccGroupGetSubAccountsSorted
+ (gnc-get-current-group))))
(lambda (accounts) (list #t
(filter gnc:account-is-stock? accounts)))
#t))
@@ -110,7 +110,7 @@
exchange-fn price-fn include-empty collector)
(let ((share-print-info
- (gnc:share-print-info-places
+ (gnc-share-print-info-places
(inexact->exact (get-option gnc:pagename-general
optname-shares-digits)))))
@@ -119,9 +119,9 @@
(let* ((row-style (if odd-row? "normal-row" "alternate-row"))
(current (car accounts))
(rest (cdr accounts))
- (commodity (gnc:account-get-commodity current))
- (ticker-symbol (gnc:commodity-get-mnemonic commodity))
- (listing (gnc:commodity-get-namespace commodity))
+ (commodity (xaccAccountGetCommodity current))
+ (ticker-symbol (gnc-commodity-get-mnemonic commodity))
+ (listing (gnc-commodity-get-namespace commodity))
(unit-collector (gnc:account-get-comm-balance-at-date
current to-date #f))
(units (cadr (unit-collector 'getpair commodity #f)))
@@ -132,7 +132,7 @@
(set! work-done (+ 1 work-done))
(gnc:report-percent-done (* 100 (/ work-done work-to-do)))
- (if (or include-empty (not (gnc:numeric-zero-p units)))
+ (if (or include-empty (not (gnc-numeric-zero-p units)))
(begin (collector 'add currency (gnc:gnc-monetary-amount value))
(gnc:html-table-append-row/markup!
table
@@ -142,16 +142,16 @@
listing
(gnc:make-html-table-header-cell/markup
"number-cell"
- (gnc:amount->string units share-print-info))
+ (xaccPrintAmount units share-print-info))
(gnc:make-html-table-header-cell/markup
"number-cell"
(gnc:html-price-anchor
(car price-info)
- (gnc:make-gnc-monetary (gnc:price-get-currency (car price-info))
- (gnc:price-get-value (car price-info)))))
+ (gnc:make-gnc-monetary (gnc-price-get-currency (car price-info))
+ (gnc-price-get-value (car price-info)))))
(gnc:make-html-table-header-cell/markup
"number-cell" value)))
- ;;(display (sprintf #f "Shares: %6.6d " (gnc:numeric-to-double units)))
+ ;;(display (sprintf #f "Shares: %6.6d " (gnc-numeric-to-double units)))
;;(display units) (newline)
(table-add-stock-rows-internal rest (not odd-row?)))
(table-add-stock-rows-internal rest odd-row?)))))
@@ -184,7 +184,7 @@
(gnc:html-document-set-title!
document (string-append
report-title
- (sprintf #f " %s" (gnc:print-date to-date))))
+ (sprintf #f " %s" (gnc-print-date to-date))))
;(gnc:debug "accounts" accounts)
(if (not (null? accounts))
@@ -192,7 +192,7 @@
(append
(gnc:acccounts-get-all-subaccounts
accounts) accounts) currency))
- (pricedb (gnc:book-get-pricedb (gnc:get-current-book)))
+ (pricedb (gnc-pricedb-get-db (gnc-get-current-book)))
(exchange-fn (gnc:case-exchange-fn price-source currency to-date))
(price-fn
(case price-source
@@ -206,21 +206,21 @@
((pricedb-latest)
(lambda (foreign date)
(let ((price
- (gnc:pricedb-lookup-latest-any-currency
+ (gnc-pricedb-lookup-latest-any-currency
pricedb foreign)))
(if (and price (> (length price) 0))
- (let ((v (gnc:price-get-value (car price))))
+ (let ((v (gnc-price-get-value (car price))))
(cons (car price) v))
- (cons #f (gnc:numeric-zero))))))
+ (cons #f (gnc-numeric-zero))))))
((pricedb-nearest)
(lambda (foreign date)
(let ((price
- (gnc:pricedb-lookup-nearest-in-time-any-currency
- pricedb foreign (gnc:timepair-canonical-day-time date))))
+ (gnc-pricedb-lookup-nearest-in-time-any-currency
+ pricedb foreign (timespecCanonicalDayTime date))))
(if (and price (> (length price) 0))
- (let ((v (gnc:price-get-value (car price))))
+ (let ((v (gnc-price-get-value (car price))))
(cons (car price) v))
- (cons #f (gnc:numeric-zero)))))))))
+ (cons #f (gnc-numeric-zero)))))))))
(gnc:html-table-set-col-headers!
table
Modified: gnucash/trunk/src/report/standard-reports/price-scatter.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/price-scatter.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/price-scatter.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -77,7 +77,7 @@
pagename-price optname-price-commodity
"e"
(N_ "Calculate the price of this commodity.")
- (gnc:locale-default-iso-currency-code)))
+ (gnc-locale-default-iso-currency-code)))
(add-option
(gnc:make-multichoice-option
@@ -166,8 +166,8 @@
(document (gnc:make-html-document))
(chart (gnc:make-html-scatter))
(currency-accounts
- (filter gnc:account-has-shares? (gnc:group-get-subaccounts
- (gnc:get-current-group))))
+ (filter gnc:account-has-shares? (xaccGroupGetSubAccountsSorted
+ (gnc-get-current-group))))
(data '()))
;; Short helper for all the warnings below
@@ -182,12 +182,12 @@
chart report-title)
(gnc:html-scatter-set-subtitle!
chart (string-append
- (gnc:commodity-get-mnemonic price-commodity)
+ (gnc-commodity-get-mnemonic price-commodity)
" - "
(sprintf #f
(_ "%s to %s")
- (gnc:print-date from-date-tp)
- (gnc:print-date to-date-tp))))
+ (gnc-print-date from-date-tp)
+ (gnc-print-date to-date-tp))))
(gnc:html-scatter-set-width! chart width)
(gnc:html-scatter-set-height! chart height)
(gnc:html-scatter-set-marker! chart
@@ -200,7 +200,7 @@
((filledsquare) "filled square")))
(gnc:html-scatter-set-markercolor! chart mcolor)
(gnc:html-scatter-set-y-axis-label!
- chart (gnc:commodity-get-mnemonic report-currency))
+ chart (gnc-commodity-get-mnemonic report-currency))
(gnc:html-scatter-set-x-axis-label!
chart (case interval
((DayDelta) (N_ "Days"))
@@ -210,7 +210,7 @@
((YearDelta) (N_ "Years"))))
(if
- (not (gnc:commodity-equiv? report-currency price-commodity))
+ (not (gnc-commodity-equiv report-currency price-commodity))
(begin
(if (not (null? currency-accounts))
(set!
@@ -226,10 +226,10 @@
price-commodity report-currency))
((pricedb)
(map (lambda (p)
- (list (gnc:price-get-time p)
- (gnc:price-get-value p)))
- (gnc:pricedb-get-prices
- (gnc:book-get-pricedb (gnc:get-current-book))
+ (list (gnc-price-get-time p)
+ (gnc-price-get-value p)))
+ (gnc-pricedb-get-prices
+ (gnc-pricedb-get-db (gnc-get-current-book))
price-commodity report-currency)))
)))
@@ -242,14 +242,14 @@
;; some output
;;(warn "data" (map (lambda (x) (list
- ;; (gnc:print-date (car x))
- ;; (gnc:numeric-to-double (second x))))
+ ;; (gnc-print-date (car x))
+ ;; (gnc-numeric-to-double (second x))))
;; data))
;; convert the gnc:numeric's to doubles
(set! data (map (lambda (x)
(list (first x)
- (gnc:numeric-to-double (second x))))
+ (gnc-numeric-to-double (second x))))
data))
;; convert the dates to the weird x-axis scaling of the
Modified: gnucash/trunk/src/report/standard-reports/register.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/register.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/register.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -114,65 +114,65 @@
(reverse heading-list)))
(define (gnc:split-get-balance-display split)
- (let ((account (gnc:split-get-account split))
- (balance (gnc:split-get-balance split)))
- (if (and account (gnc:account-reverse-balance? account))
- (gnc:numeric-neg balance)
+ (let ((account (xaccSplitGetAccount split))
+ (balance (xaccSplitGetBalance split)))
+ (if (and account (gnc-reverse-balance account))
+ (gnc-numeric-neg balance)
balance)))
(define (add-split-row table split column-vector row-style
transaction-info? split-info? double?)
(let* ((row-contents '())
- (parent (gnc:split-get-parent split))
- (account (gnc:split-get-account split))
+ (parent (xaccSplitGetParent split))
+ (account (xaccSplitGetAccount split))
(currency (if account
- (gnc:account-get-commodity account)
- (gnc:default-currency)))
- (damount (gnc:split-get-amount split))
+ (xaccAccountGetCommodity account)
+ (gnc-default-currency)))
+ (damount (xaccSplitGetAmount split))
(split-value (gnc:make-gnc-monetary currency damount)))
(if (date-col column-vector)
(addto! row-contents
(if transaction-info?
- (gnc:print-date
- (gnc:transaction-get-date-posted parent))
+ (gnc-print-date
+ (gnc-transaction-get-date-posted parent))
" ")))
(if (num-col column-vector)
(addto! row-contents
(if transaction-info?
- (gnc:transaction-get-num parent)
+ (xaccTransGetNum parent)
(if split-info?
- (gnc:split-get-action split)
+ (xaccSplitGetAction split)
" "))))
(if (description-col column-vector)
(addto! row-contents
(if transaction-info?
- (gnc:transaction-get-description parent)
+ (xaccTransGetDescription parent)
(if split-info?
- (gnc:split-get-memo split)
+ (xaccSplitGetMemo split)
" "))))
(if (account-col column-vector)
(addto! row-contents
(if split-info?
(if transaction-info?
(let ((other-split
- (gnc:split-get-other-split split)))
+ (xaccSplitGetOtherSplit split)))
(if other-split
- (gnc:account-get-full-name
- (gnc:split-get-account other-split))
+ (gnc-account-get-full-name
+ (xaccSplitGetAccount other-split))
(_ "-- Split Transaction --")))
- (gnc:account-get-full-name account))
+ (gnc-account-get-full-name account))
" ")))
(if (shares-col column-vector)
(addto! row-contents
(if split-info?
- (gnc:split-get-amount split)
+ (xaccSplitGetAmount split)
" ")))
(if (price-col column-vector)
(addto! row-contents
(if split-info?
(gnc:make-gnc-monetary
- currency (gnc:split-get-share-price split))
+ currency (xaccSplitGetSharePrice split))
" ")))
(if (amount-single-col column-vector)
(addto! row-contents
@@ -182,7 +182,7 @@
(gnc:html-split-anchor split split-value))
" ")))
(if (debit-col column-vector)
- (if (gnc:numeric-positive-p (gnc:gnc-monetary-amount split-value))
+ (if (gnc-numeric-positive-p (gnc:gnc-monetary-amount split-value))
(addto! row-contents
(if split-info?
(gnc:make-html-table-cell/markup
@@ -191,7 +191,7 @@
" "))
(addto! row-contents " ")))
(if (debit-col column-vector)
- (if (gnc:numeric-negative-p (gnc:gnc-monetary-amount split-value))
+ (if (gnc-numeric-negative-p (gnc:gnc-monetary-amount split-value))
(addto! row-contents
(if split-info?
(gnc:make-html-table-cell/markup
@@ -228,7 +228,7 @@
(addto! row-contents
(gnc:make-html-table-cell/size
1 (- (num-columns-required column-vector) count)
- (gnc:transaction-get-notes parent)))
+ (xaccTransGetNotes parent)))
(gnc:html-table-append-row/markup! table row-style
(reverse row-contents)))))
split-value))
@@ -246,7 +246,7 @@
(gnc:register-option gnc:*report-options* new-option))
(gnc:register-reg-option
- (gnc:make-query-option "__reg" "query" #f))
+ (gnc:make-query-option "__reg" "query" '()))
(gnc:register-reg-option
(gnc:make-internal-option "__reg" "journal" #f))
(gnc:register-reg-option
@@ -337,16 +337,16 @@
(define (colspan monetary)
(cond
((amount-single-col used-columns) (amount-single-col used-columns))
- ((gnc:numeric-negative-p (gnc:gnc-monetary-amount monetary))
+ ((gnc-numeric-negative-p (gnc:gnc-monetary-amount monetary))
(credit-col used-columns))
(else (debit-col used-columns))))
(define (display-subtotal monetary)
(if (amount-single-col used-columns)
- (if (and leader (gnc:account-reverse-balance? leader))
+ (if (and leader (gnc-reverse-balance leader))
(gnc:monetary-neg monetary)
monetary)
- (if (gnc:numeric-negative-p (gnc:gnc-monetary-amount monetary))
+ (if (gnc-numeric-negative-p (gnc:gnc-monetary-amount monetary))
(gnc:monetary-neg monetary)
monetary)))
@@ -373,14 +373,14 @@
(define (add-other-split-rows split table used-columns row-style)
(define (other-rows-driver split parent table used-columns i)
- (let ((current (gnc:transaction-get-split parent i)))
+ (let ((current (xaccTransGetSplit parent i)))
(if current
(begin
(add-split-row table current used-columns row-style #f #t #f)
(other-rows-driver split parent table
used-columns (+ i 1))))))
- (other-rows-driver split (gnc:split-get-parent split)
+ (other-rows-driver split (xaccSplitGetParent split)
table used-columns 0))
(define (do-rows-with-subtotals leader
@@ -429,12 +429,12 @@
(gnc:gnc-monetary-commodity split-value)
(gnc:gnc-monetary-amount split-value))
- (if (gnc:numeric-positive-p (gnc:gnc-monetary-amount split-value))
+ (if (gnc-numeric-positive-p (gnc:gnc-monetary-amount split-value))
(debit-collector 'add
(gnc:gnc-monetary-commodity split-value)
(gnc:gnc-monetary-amount split-value)))
- (if (gnc:numeric-negative-p (gnc:gnc-monetary-amount split-value))
+ (if (gnc-numeric-negative-p (gnc:gnc-monetary-amount split-value))
(credit-collector 'add
(gnc:gnc-monetary-commodity split-value)
(gnc:gnc-monetary-amount split-value)))
@@ -452,7 +452,7 @@
credit-collector))))
(define (splits-leader splits)
- (let ((accounts (map gnc:split-get-account splits)))
+ (let ((accounts (map xaccSplitGetAccount splits)))
(if (null? accounts) #f
(begin
(set! accounts (cons (car accounts)
@@ -532,7 +532,7 @@
(list
(string-append
(_ "Date") ": "
- (string-expand (gnc:print-date (cons (current-time) 0))
+ (string-expand (gnc-print-date (cons (current-time) 0))
#\space " "))
(make-client-table address)))
(set-last-row-style!
@@ -559,13 +559,13 @@
(if invoice?
(set! title (_ "Invoice")))
- (set! query (gnc:scm->query query-scm))
+ (set! query (gnc-scm2query query-scm))
- (gnc:query-set-book query (gnc:get-current-book))
+ (qof-query-set-book query (gnc-get-current-book))
(set! splits (if journal?
- (gnc:query-get-splits-unique-trans query)
- (gnc:query-get-splits query)))
+ (qof-query-run-unique-trans query)
+ (qof-query-run query)))
(set! table (make-split-table splits
(gnc:report-options report-obj)
@@ -602,7 +602,7 @@
(gnc:html-document-set-title! document title)
(gnc:html-document-add-object! document table)
- (gnc:free-query query)
+ (qof-query-destroy query)
document))
Modified: gnucash/trunk/src/report/standard-reports/standard-reports.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/standard-reports.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/standard-reports.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -91,8 +91,7 @@
(define (gnc:register-report-create account split query journal? double?
title debit-string credit-string)
- (let* ((acct-type-code (gnc:account-get-type account))
- (acct-type (gw:enum-<gnc:AccountType>-val->sym acct-type-code #f))
+ (let* ((acct-type (xaccAccountGetType account))
(create-fcn (lookup-register-report acct-type split)))
(gnc:debug "create-fcn: " create-fcn)
(if create-fcn
Modified: gnucash/trunk/src/report/standard-reports/test/Makefile.am
===================================================================
--- gnucash/trunk/src/report/standard-reports/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -15,16 +15,14 @@
--gnc-module-dir ${top_builddir}/src/network-utils \
--gnc-module-dir ${top_srcdir}/src/gnc-module \
--gnc-module-dir ${top_srcdir}/src/engine \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/scm \
--guile-load-dir ${top_srcdir}/src/app-utils \
--guile-load-dir ${top_srcdir}/src/gnome-utils \
--guile-load-dir ${top_srcdir}/src/gnome \
--guile-load-dir ${top_srcdir}/src/report/report-system \
--library-dir ${top_builddir}/src/gnome-utils \
- --library-dir ${top_builddir}/src/gnome \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_builddir}/src/gnome
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Modified: gnucash/trunk/src/report/standard-reports/transaction.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/transaction.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/transaction.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -71,16 +71,16 @@
corresponding-acc-code))
(define (split-account-full-name-same-p a b)
- (= (gnc:split-compare-account-full-names a b) 0))
+ (= (xaccSplitCompareAccountFullNames a b) 0))
(define (split-account-code-same-p a b)
- (= (gnc:split-compare-account-codes a b) 0))
+ (= (xaccSplitCompareAccountCodes a b) 0))
(define (split-same-corr-account-full-name-p a b)
- (= (gnc:split-compare-other-account-full-names a b) 0))
+ (= (xaccSplitCompareOtherAccountFullNames a b) 0))
(define (split-same-corr-account-code-p a b)
- (= (gnc:split-compare-other-account-codes a b) 0))
+ (= (xaccSplitCompareOtherAccountCodes a b) 0))
(define (timepair-same-year tp-a tp-b)
(= (gnc:timepair-get-year tp-a)
@@ -97,18 +97,18 @@
(gnc:timepair-get-month tp-b))))
(define (split-same-month-p a b)
- (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
- (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
+ (let ((tp-a (gnc-transaction-get-date-posted (xaccSplitGetParent a)))
+ (tp-b (gnc-transaction-get-date-posted (xaccSplitGetParent b))))
(timepair-same-month tp-a tp-b)))
(define (split-same-quarter-p a b)
- (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
- (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
+ (let ((tp-a (gnc-transaction-get-date-posted (xaccSplitGetParent a)))
+ (tp-b (gnc-transaction-get-date-posted (xaccSplitGetParent b))))
(timepair-same-quarter tp-a tp-b)))
(define (split-same-year-p a b)
- (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
- (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
+ (let ((tp-a (gnc-transaction-get-date-posted (xaccSplitGetParent a)))
+ (tp-b (gnc-transaction-get-date-posted (xaccSplitGetParent b))))
(timepair-same-year tp-a tp-b)))
(define (set-last-row-style! table tag . rest)
@@ -134,20 +134,20 @@
(string-append
;; display account code?
(if show-account-code
- (string-append (gnc:account-get-code account) " ")
+ (string-append (xaccAccountGetCode account) " ")
"")
;; display account name?
(if show-account-name
;; display full account name?
(if show-account-full-name
- (gnc:account-get-full-name account)
- (gnc:account-get-name account))
+ (gnc-account-get-full-name account)
+ (xaccAccountGetName account))
""))))
;; render an account subheading - column-vector determines what is displayed
(define (render-account-subheading
split table width subheading-style column-vector)
- (let ((account (gnc:split-get-account split)))
+ (let ((account (xaccSplitGetAccount split)))
(add-subheading-row (gnc:make-html-text
(gnc:html-markup-anchor
(gnc:account-anchor-text account)
@@ -159,7 +159,7 @@
(define (render-corresponding-account-subheading
split table width subheading-style column-vector)
- (let ((account (gnc:split-get-account (gnc:split-get-other-split split))))
+ (let ((account (xaccSplitGetAccount (xaccSplitGetOtherSplit split))))
(add-subheading-row (gnc:make-html-text
(gnc:html-markup-anchor
(gnc:account-anchor-text account)
@@ -172,22 +172,22 @@
(define (render-month-subheading split table width subheading-style column-vector)
(add-subheading-row (gnc:date-get-month-year-string
(gnc:timepair->date
- (gnc:transaction-get-date-posted
- (gnc:split-get-parent split))))
+ (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split))))
table width subheading-style))
(define (render-quarter-subheading split table width subheading-style column-vector)
(add-subheading-row (gnc:date-get-quarter-year-string
(gnc:timepair->date
- (gnc:transaction-get-date-posted
- (gnc:split-get-parent split))))
+ (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split))))
table width subheading-style))
(define (render-year-subheading split table width subheading-style column-vector)
(add-subheading-row (gnc:date-get-year-string
(gnc:timepair->date
- (gnc:transaction-get-date-posted
- (gnc:split-get-parent split))))
+ (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split))))
table width subheading-style))
@@ -227,7 +227,7 @@
(define (render-account-subtotal
table width split total-collector subtotal-style column-vector export?)
(add-subtotal-row table width
- (total-string (account-namestring (gnc:split-get-account split)
+ (total-string (account-namestring (xaccSplitGetAccount split)
(used-sort-account-code column-vector)
#t
(used-sort-account-full-name column-vector)))
@@ -236,8 +236,8 @@
(define (render-corresponding-account-subtotal
table width split total-collector subtotal-style column-vector export?)
(add-subtotal-row table width
- (total-string (account-namestring (gnc:split-get-account
- (gnc:split-get-other-split split))
+ (total-string (account-namestring (xaccSplitGetAccount
+ (xaccSplitGetOtherSplit split))
(used-sort-account-code column-vector)
#t
(used-sort-account-full-name column-vector)))
@@ -245,8 +245,8 @@
(define (render-month-subtotal
table width split total-collector subtotal-style column-vector export?)
- (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
- (gnc:split-get-parent split)))))
+ (let ((tm (gnc:timepair->date (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split)))))
(add-subtotal-row table width
(total-string (gnc:date-get-month-year-string tm))
total-collector subtotal-style export?)))
@@ -254,16 +254,16 @@
(define (render-quarter-subtotal
table width split total-collector subtotal-style column-vector export?)
- (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
- (gnc:split-get-parent split)))))
+ (let ((tm (gnc:timepair->date (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split)))))
(add-subtotal-row table width
(total-string (gnc:date-get-quarter-year-string tm))
total-collector subtotal-style export?)))
(define (render-year-subtotal
table width split total-collector subtotal-style column-vector export?)
- (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
- (gnc:split-get-parent split)))))
+ (let ((tm (gnc:timepair->date (gnc-transaction-get-date-posted
+ (xaccSplitGetParent split)))))
(add-subtotal-row table width
(total-string (strftime "%Y" tm))
total-collector subtotal-style export?)))
@@ -277,8 +277,11 @@
(define account-types-to-reverse-assoc-list
(list (cons 'none '())
- (cons 'income-expense '(income expense))
- (cons 'credit-accounts '(liability payable equity credit income))))
+ (cons 'income-expense
+ (list ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE))
+ (cons 'credit-accounts
+ (list ACCT-TYPE-LIABILITY ACCT-TYPE-PAYABLE ACCT-TYPE-EQUITY
+ ACCT-TYPE-CREDIT ACCT-TYPE-INCOME))))
(define (used-date columns-used)
(vector-ref columns-used 0))
@@ -412,57 +415,56 @@
(let* ((row-contents '())
(dummy (gnc:debug "split is originally" split))
- (parent (gnc:split-get-parent split))
- (account (gnc:split-get-account split))
- (account-type (gw:enum-<gnc:AccountType>-val->sym
- (gnc:account-get-type account) #f))
+ (parent (xaccSplitGetParent split))
+ (account (xaccSplitGetAccount split))
+ (account-type (xaccAccountGetType account))
(currency (if account
- (gnc:account-get-commodity account)
- (gnc:default-currency)))
+ (xaccAccountGetCommodity account)
+ (gnc-default-currency)))
(report-currency (if (opt-val gnc:pagename-general optname-common-currency)
(opt-val gnc:pagename-general optname-currency)
currency))
(damount (if (gnc:split-voided? split)
- (gnc:split-void-former-amount split)
- (gnc:split-get-amount split)))
- (trans-date (gnc:transaction-get-date-posted parent))
+ (xaccSplitVoidFormerAmount split)
+ (xaccSplitGetAmount split)))
+ (trans-date (gnc-transaction-get-date-posted parent))
(split-value (gnc:exchange-by-pricedb-nearest
(gnc:make-gnc-monetary
currency
(if (member account-type account-types-to-reverse)
- (gnc:numeric-neg damount)
+ (gnc-numeric-neg damount)
damount))
report-currency
;; Use midday as the transaction time so it matches a price
;; on the same day. Otherwise it uses midnight which will
;; likely match a price on the previous day
- (gnc:timepair-canonical-day-time trans-date))))
+ (timespecCanonicalDayTime trans-date))))
(if (used-date column-vector)
(addto! row-contents
(if transaction-row?
- (gnc:print-date (gnc:transaction-get-date-posted parent))
+ (gnc-print-date (gnc-transaction-get-date-posted parent))
" ")))
(if (used-reconciled-date column-vector)
(addto! row-contents
- (let ((date (gnc:split-get-reconciled-date split)))
+ (let ((date (gnc-split-get-date-reconciled split)))
(if (equal? date (cons 0 0))
" "
- (gnc:print-date date)))))
+ (gnc-print-date date)))))
(if (used-num column-vector)
(addto! row-contents
(if transaction-row?
- (gnc:transaction-get-num parent)
+ (xaccTransGetNum parent)
" ")))
(if (used-description column-vector)
(addto! row-contents
(if transaction-row?
- (gnc:transaction-get-description parent)
+ (xaccTransGetDescription parent)
" ")))
(if (used-memo column-vector)
(addto! row-contents
- (gnc:split-get-memo split)))
+ (xaccSplitGetMemo split)))
(if (or (used-account-name column-vector) (used-account-code column-vector))
(addto! row-contents (account-namestring account
@@ -471,31 +473,31 @@
(used-account-full-name column-vector))))
(if (or (used-other-account-name column-vector) (used-other-account-code column-vector))
- (addto! row-contents (account-namestring (gnc:split-get-account
- (gnc:split-get-other-split split))
+ (addto! row-contents (account-namestring (xaccSplitGetAccount
+ (xaccSplitGetOtherSplit split))
(used-other-account-code column-vector)
(used-other-account-name column-vector)
(used-other-account-full-name column-vector))))
(if (used-shares column-vector)
- (addto! row-contents (gnc:split-get-amount split)))
+ (addto! row-contents (xaccSplitGetAmount split)))
(if (used-price column-vector)
(addto!
row-contents
- (gnc:make-gnc-monetary (gnc:transaction-get-currency parent)
- (gnc:split-get-share-price split))))
+ (gnc:make-gnc-monetary (xaccTransGetCurrency parent)
+ (xaccSplitGetSharePrice split))))
(if (used-amount-single column-vector)
(addto! row-contents
(gnc:make-html-table-cell/markup "number-cell"
(gnc:html-transaction-anchor parent split-value))))
(if (used-amount-double-positive column-vector)
- (if (gnc:numeric-positive-p (gnc:gnc-monetary-amount split-value))
+ (if (gnc-numeric-positive-p (gnc:gnc-monetary-amount split-value))
(addto! row-contents
(gnc:make-html-table-cell/markup "number-cell"
(gnc:html-transaction-anchor parent split-value)))
(addto! row-contents " ")))
(if (used-amount-double-negative column-vector)
- (if (gnc:numeric-negative-p (gnc:gnc-monetary-amount split-value))
+ (if (gnc-numeric-negative-p (gnc:gnc-monetary-amount split-value))
(addto! row-contents
(gnc:make-html-table-cell/markup
"number-cell" (gnc:html-transaction-anchor parent (gnc:monetary-neg split-value))))
@@ -503,12 +505,12 @@
(if (used-running-balance column-vector)
(begin
(gnc:debug "split is " split)
- (gnc:debug "split get balance:" (gnc:split-get-balance split))
+ (gnc:debug "split get balance:" (xaccSplitGetBalance split))
(addto! row-contents
(gnc:make-html-table-cell/markup
"number-cell"
(gnc:make-gnc-monetary currency
- (gnc:split-get-balance split))))))
+ (xaccSplitGetBalance split))))))
(gnc:html-table-append-row/markup! table row-style
(reverse row-contents))
split-value))
@@ -545,7 +547,7 @@
gnc:pagename-general optname-common-currency
"e" (N_ "Convert all transactions into a common currency") #f
#f
- (lambda (x) (gnc:option-db-set-option-selectable-by-name
+ (lambda (x) (gnc-option-db-set-option-selectable-by-name
gnc:*transaction-report-options*
gnc:pagename-general
optname-currency
@@ -570,9 +572,12 @@
;; select, by default, all accounts...
(lambda ()
(gnc:filter-accountlist-type
- '(bank cash credit asset liability stock mutual-fund currency
- payable receivable equity income expense)
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (list ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-CREDIT
+ ACCT-TYPE-ASSET ACCT-TYPE-LIABILITY
+ ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
+ ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
+ ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
#f #t))
(gnc:register-trep-option
@@ -582,10 +587,10 @@
(lambda ()
;; FIXME : gnc:get-current-accounts disappeared.
(let ((current-accounts '())
- (num-accounts (gnc:group-get-num-accounts
- (gnc:get-current-group)))
- (first-account (gnc:group-get-account
- (gnc:get-current-group) 0)))
+ (num-accounts (xaccGroupGetNumAccounts
+ (gnc-get-current-group)))
+ (first-account (xaccGroupGetAccount
+ (gnc-get-current-group) 0)))
(cond ((not (null? current-accounts))
(list (car current-accounts)))
((> num-accounts 0) (list first-account))
@@ -710,10 +715,10 @@
'account-name
key-choice-list #f
(lambda (x)
- (gnc:option-db-set-option-selectable-by-name
+ (gnc-option-db-set-option-selectable-by-name
options pagename-sorting optname-prime-subtotal
(and (member x subtotal-enabled) #t))
- (gnc:option-db-set-option-selectable-by-name
+ (gnc-option-db-set-option-selectable-by-name
options pagename-sorting optname-prime-date-subtotal
(if (member x date-sorting-types) #t #f)))))
@@ -761,10 +766,10 @@
'register-order
key-choice-list #f
(lambda (x)
- (gnc:option-db-set-option-selectable-by-name
+ (gnc-option-db-set-option-selectable-by-name
options pagename-sorting optname-sec-subtotal
(and (member x subtotal-enabled) #t))
- (gnc:option-db-set-option-selectable-by-name
+ (gnc-option-db-set-option-selectable-by-name
options pagename-sorting optname-sec-date-subtotal
(if (member x date-sorting-types) #t #f)))))
@@ -848,8 +853,8 @@
(define (display-date-interval begin end)
- (let ((begin-string (gnc:print-date begin))
- (end-string (gnc:print-date end)))
+ (let ((begin-string (gnc-print-date begin))
+ (end-string (gnc-print-date end)))
(sprintf #f (_ "From %s To %s") begin-string end-string)))
(define (get-primary-subtotal-style options)
@@ -917,7 +922,7 @@
(define (add-other-split-rows split table used-columns
row-style account-types-to-reverse)
(define (other-rows-driver split parent table used-columns i)
- (let ((current (gnc:transaction-get-split parent i)))
+ (let ((current (xaccTransGetSplit parent i)))
(cond ((not current) #f)
((equal? current split)
(other-rows-driver split parent table used-columns (+ i 1)))
@@ -927,7 +932,7 @@
(other-rows-driver split parent table used-columns
(+ i 1)))))))
- (other-rows-driver split (gnc:split-get-parent split)
+ (other-rows-driver split (xaccSplitGetParent split)
table used-columns 0))
(define (do-rows-with-subtotals splits
@@ -1114,43 +1119,43 @@
;; (let* ((used-columns (build-column-used options))) ;; tpo: gives unbound variable options?
(let* ((used-columns (build-column-used (gnc:report-options report-obj))))
(list (cons 'account-name (vector
- (list gnc:split-account-fullname)
+ (list SPLIT-ACCT-FULLNAME)
split-account-full-name-same-p
render-account-subheading
render-account-subtotal))
(cons 'account-code (vector
- (list gnc:split-account gnc:account-code)
+ (list SPLIT-ACCOUNT ACCOUNT-CODE-)
split-account-code-same-p
render-account-subheading
render-account-subtotal))
(cons 'exact-time (vector
- (list gnc:split-trans gnc:trans-date-posted)
+ (list SPLIT-TRANS TRANS-DATE-POSTED)
#f #f #f))
(cons 'date (vector
- (list gnc:split-trans gnc:trans-date-posted)
+ (list SPLIT-TRANS TRANS-DATE-POSTED)
#f #f #f))
(cons 'reconciled-date (vector
- (list gnc:split-date-reconciled)
+ (list SPLIT-DATE-RECONCILED)
#f #f #f))
(cons 'register-order (vector
- (list gnc:query-default-sort)
+ (list QUERY-DEFAULT-SORT)
#f #f #f))
(cons 'corresponding-acc-name
(vector
- (list gnc:split-corr-account-fullname)
+ (list SPLIT-CORR-ACCT-FULLNAME)
split-same-corr-account-full-name-p
render-corresponding-account-subheading
render-corresponding-account-subtotal))
(cons 'corresponding-acc-code
(vector
- (list gnc:split-corr-account-code)
+ (list SPLIT-CORR-ACCT-CODE)
split-same-corr-account-code-p
render-corresponding-account-subheading
render-corresponding-account-subtotal))
- (cons 'amount (vector (list gnc:split-value) #f #f #f))
- (cons 'description (vector (list gnc:split-trans gnc:trans-desc) #f #f #f))
- (cons 'number (vector (list gnc:split-trans gnc:trans-num) #f #f #f))
- (cons 'memo (vector (list gnc:split-memo) #f #f #f))
+ (cons 'amount (vector (list SPLIT-VALUE) #f #f #f))
+ (cons 'description (vector (list SPLIT-TRANS TRANS-DESCRIPTION) #f #f #f))
+ (cons 'number (vector (list SPLIT-TRANS TRANS-NUM) #f #f #f))
+ (cons 'memo (vector (list SPLIT-MEMO) #f #f #f))
(cons 'none (vector '() #f #f #f)))))
(define date-comp-funcs-assoc-list
@@ -1213,7 +1218,7 @@
3 2))
(define (get-other-account-names account-list)
- ( map (lambda (acct) (gnc:account-get-full-name acct)) account-list))
+ ( map (lambda (acct) (gnc-account-get-full-name acct)) account-list))
(define (is-filter-member split account-list splits-ok?)
(let ((fullname (gnc:split-get-corr-account-full-name split)))
@@ -1222,8 +1227,8 @@
;; Yep, this is a split transaction.
(if splits-ok?
- (let* ((txn (gnc:split-get-parent split))
- (splits (gnc:transaction-get-splits txn)))
+ (let* ((txn (xaccSplitGetParent split))
+ (splits (xaccTransGetSplits txn)))
;; Walk through the list of splits.
;; if we reach the end, return #f
@@ -1234,7 +1239,7 @@
#f
(let* ((this (car splits))
(rest (cdr splits))
- (acct (gnc:split-get-account this)))
+ (acct (xaccSplitGetAccount this)))
(if (and (not (eq? this split))
(member acct account-list))
#t
@@ -1268,38 +1273,38 @@
(secondary-order (opt-val pagename-sorting "Secondary Sort Order"))
(void-status (opt-val gnc:pagename-accounts optname-void-transactions))
(splits '())
- (query (gnc:malloc-query)))
+ (query (qof-query-create-for-splits)))
;;(gnc:warn "accts in trep-renderer:" c_account_1)
;;(gnc:warn "Report Account names:" (get-other-account-names c_account_1))
(if (not (or (null? c_account_1) (and-map not c_account_1)))
(begin
- (gnc:query-set-book query (gnc:get-current-book))
+ (qof-query-set-book query (gnc-get-current-book))
;;(gnc:warn "query is:" query)
- (gnc:query-add-account-match query
+ (xaccQueryAddAccountMatch query
c_account_1
- 'guid-match-any 'query-and)
- (gnc:query-add-date-match-timepair
- query #t begindate #t enddate 'query-and)
- (gnc:query-set-sort-order query
+ QOF-GUID-MATCH-ANY QOF-QUERY-AND)
+ (xaccQueryAddDateMatchTS
+ query #t begindate #t enddate QOF-QUERY-AND)
+ (qof-query-set-sort-order query
(get-query-sortkey primary-key)
(get-query-sortkey secondary-key)
'())
- (gnc:query-set-sort-increasing query
+ (qof-query-set-sort-increasing query
(eq? primary-order 'ascend)
(eq? secondary-order 'ascend)
#t)
(case void-status
((non-void-only)
- (gnc:query-set-match-non-voids-only! query (gnc:get-current-book)))
+ (gnc:query-set-match-non-voids-only! query (gnc-get-current-book)))
((void-only)
- (gnc:query-set-match-voids-only! query (gnc:get-current-book)))
+ (gnc:query-set-match-voids-only! query (gnc-get-current-book)))
(else #f))
- (set! splits (gnc:query-get-splits query))
+ (set! splits (qof-query-run query))
;;(gnc:warn "Splits in trep-renderer:" splits)
@@ -1359,7 +1364,7 @@
(gnc:html-document-add-object!
document
table)
- (gnc:free-query query))
+ (qof-query-destroy query))
;; error condition: no splits found
(let ((p (gnc:make-html-text)))
(gnc:html-text-append!
Modified: gnucash/trunk/src/report/standard-reports/trial-balance.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/trial-balance.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/standard-reports/trial-balance.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -16,7 +16,7 @@
;; balance to no more than daily resolution.
;;
;; The Company Name field does not currently default to the name
-;; in (gnc:get-current-book).
+;; in (gnc-get-current-book).
;;
;; Progress bar functionality is currently mostly broken.
;;
@@ -149,7 +149,7 @@
(gnc:make-string-option
(N_ "General") optname-party-name
"b" opthelp-party-name ""))
- ;; this should default to company name in (gnc:get-current-book)
+ ;; this should default to company name in (gnc-get-current-book)
;; the period over which to collect adjusting/closing entries and
;; date at which to report the balance
@@ -180,9 +180,12 @@
opthelp-accounts
(lambda ()
(gnc:filter-accountlist-type
- '(bank cash credit asset liability stock mutual-fund currency
- payable receivable equity income expense)
- (gnc:group-get-subaccounts (gnc:get-current-group))))
+ (list ACCT-TYPE-BANK ACCT-TYPE-CASH ACCT-TYPE-CREDIT
+ ACCT-TYPE-ASSET ACCT-TYPE-LIABILITY
+ ACCT-TYPE-STOCK ACCT-TYPE-MUTUAL ACCT-TYPE-CURRENCY
+ ACCT-TYPE-PAYABLE ACCT-TYPE-RECEIVABLE
+ ACCT-TYPE-EQUITY ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
+ (xaccGroupGetSubAccountsSorted (gnc-get-current-group))))
#f #t))
(gnc:options-add-account-levels!
options gnc:pagename-accounts optname-depth-limit
@@ -343,14 +346,15 @@
;; decompose the account list
(split-up-accounts (gnc:decompose-accountlist accounts))
(asset-accounts
- (assoc-ref split-up-accounts 'asset))
+ (assoc-ref split-up-accounts ACCT-TYPE-ASSET))
(liability-accounts
- (assoc-ref split-up-accounts 'liability))
+ (assoc-ref split-up-accounts ACCT-TYPE-LIABILITY))
+ (income-expense-accounts
+ (append (assoc-ref split-up-accounts ACCT-TYPE-INCOME)
+ (assoc-ref split-up-accounts ACCT-TYPE-EXPENSE)))
(equity-accounts
- (assoc-ref split-up-accounts 'equity))
- (income-expense-accounts
- (append (assoc-ref split-up-accounts 'income)
- (assoc-ref split-up-accounts 'expense)))
+ (assoc-ref split-up-accounts ACCT-TYPE-EQUITY))
+
;; (all-accounts (map (lambda (X) (cadr X)) split-up-accounts))
;; ^ will not do what we want
(all-accounts
@@ -360,20 +364,20 @@
;; same for gross adjustment accounts...
(split-up-ga-accounts (gnc:decompose-accountlist ga-accounts))
(all-ga-accounts
- (append (assoc-ref split-up-ga-accounts 'asset)
- (assoc-ref split-up-ga-accounts 'liability)
- (assoc-ref split-up-ga-accounts 'equity)
- (assoc-ref split-up-ga-accounts 'income)
- (assoc-ref split-up-ga-accounts 'expense)))
+ (append (assoc-ref split-up-ga-accounts ACCT-TYPE-ASSET)
+ (assoc-ref split-up-ga-accounts ACCT-TYPE-LIABILITY)
+ (assoc-ref split-up-ga-accounts ACCT-TYPE-EQUITY)
+ (assoc-ref split-up-ga-accounts ACCT-TYPE-INCOME)
+ (assoc-ref split-up-ga-accounts ACCT-TYPE-EXPENSE)))
(split-up-is-accounts (gnc:decompose-accountlist is-accounts))
;; same for income statement accounts...
(all-is-accounts
- (append (assoc-ref split-up-is-accounts 'asset)
- (assoc-ref split-up-is-accounts 'liability)
- (assoc-ref split-up-is-accounts 'equity)
- (assoc-ref split-up-is-accounts 'income)
- (assoc-ref split-up-is-accounts 'expense)))
+ (append (assoc-ref split-up-is-accounts ACCT-TYPE-ASSET)
+ (assoc-ref split-up-is-accounts ACCT-TYPE-LIABILITY)
+ (assoc-ref split-up-is-accounts ACCT-TYPE-EQUITY)
+ (assoc-ref split-up-is-accounts ACCT-TYPE-INCOME)
+ (assoc-ref split-up-is-accounts ACCT-TYPE-EXPENSE)))
(doc (gnc:make-html-document))
;; exchange rates calculation parameters
@@ -383,8 +387,8 @@
(period-for (if terse-period?
(string-append " " (_ "for Period"))
(sprintf #f (string-append ", " (_ "%s to %s"))
- (gnc:print-date start-date-printable)
- (gnc:print-date end-date-tp))
+ (gnc-print-date start-date-printable)
+ (gnc-print-date end-date-tp))
))
)
@@ -392,12 +396,12 @@
doc (if (equal? report-variant 'current)
(sprintf #f (string-append "%s %s %s")
company-name report-title
- (gnc:print-date end-date-tp))
+ (gnc-print-date end-date-tp))
(sprintf #f (string-append "%s %s "
(_ "For Period Covering %s to %s"))
company-name report-title
- (gnc:print-date start-date-printable)
- (gnc:print-date end-date-tp))
+ (gnc-print-date start-date-printable)
+ (gnc-print-date end-date-tp))
)
)
@@ -483,7 +487,7 @@
(define (tot-abs-amt-cell amt)
(let* ((neg-amt (gnc:make-commodity-collector))
(rv (report-val amt))
- (neg? (gnc:numeric-negative-p
+ (neg? (gnc-numeric-negative-p
(gnc:gnc-monetary-amount rv)))
(cell #f)
)
@@ -543,7 +547,7 @@
report-commodity
weighted-fn)))
- (unrealized-gain (gnc:numeric-sub-fixed value cost)))
+ (unrealized-gain (gnc-numeric-sub-fixed value cost)))
(unrealized-gain-collector 'add report-commodity unrealized-gain)
)
@@ -816,7 +820,7 @@
;;
;; we omit unrealized gains from the balance report, if
;; zero, since they are not present on normal trial balances
- (and (not (gnc:commodity-collector-allzero?
+ (and (not (gnc-commodity-collector-allzero?
unrealized-gain-collector))
(let* ((ug-row (+ header-rows
(gnc:html-acct-table-num-rows
Modified: gnucash/trunk/src/report/stylesheets/stylesheet-easy.scm
===================================================================
--- gnucash/trunk/src/report/stylesheets/stylesheet-easy.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/stylesheets/stylesheet-easy.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -327,7 +327,7 @@
(gnc:html-markup-b prepared-for)
(gnc:html-markup-br)
(_ "Date: ")
- (gnc:print-date
+ (gnc-print-date
(cons (current-time) 0)))
;; title only
Modified: gnucash/trunk/src/report/stylesheets/stylesheet-fancy.scm
===================================================================
--- gnucash/trunk/src/report/stylesheets/stylesheet-fancy.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/stylesheets/stylesheet-fancy.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -322,7 +322,7 @@
(gnc:html-markup-b prepared-for)
(gnc:html-markup-br)
(_ "Date: ")
- (gnc:print-date
+ (gnc-print-date
(cons (current-time) 0)))
;; title only
Modified: gnucash/trunk/src/report/stylesheets/test/Makefile.am
===================================================================
--- gnucash/trunk/src/report/stylesheets/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/stylesheets/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -16,16 +16,14 @@
--gnc-module-dir ${top_srcdir}/src/gnc-module \
--gnc-module-dir ${top_srcdir}/src/engine \
--guile-load-dir ${top_srcdir}/src/scm \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/app-utils \
--guile-load-dir ${top_srcdir}/src/report/report-system \
--guile-load-dir ${top_srcdir}/src/report/stylesheets \
--guile-load-dir ${top_builddir}/src/gnome-utils \
--guile-load-dir ${top_builddir}/src/gnome \
--library-dir ${top_builddir}/src/gnome-utils \
- --library-dir ${top_builddir}/src/gnome \
--library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_builddir}/src/gnome
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Modified: gnucash/trunk/src/report/utility-reports/hello-world.scm
===================================================================
--- gnucash/trunk/src/report/utility-reports/hello-world.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/utility-reports/hello-world.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -12,7 +12,7 @@
(debug-enable 'backtrace)
(gnc:module-load "gnucash/report/report-system" 0)
-(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc:html-build-url
+(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc-build-url
;; This function will generate a set of options that GnuCash
;; will use to display a dialog where the user can select
@@ -149,8 +149,7 @@
;; This is an account list option. The user can select one
;; or (possibly) more accounts from the list of accounts
;; in the current file. Values are scheme handles to actual
- ;; C pointers to accounts. They can be used in conjunction
- ;; with the wrapped C functions in gnucash/src/g-wrap/gnc.gwp.
+ ;; C pointers to accounts.
;; The #f value indicates that any account will be accepted.
;; Instead of a #f values, you could provide a function that
;; accepts a list of account values and returns a pair. If
@@ -249,7 +248,7 @@
;; these are samples of different date options. for a simple
;; date with day, month, and year but no time you should use
- ;; gnc:print-date
+ ;; gnc-print-date
(let ((time-string (strftime "%X" (localtime (current-time))))
(date-string (strftime "%x" (localtime (car date-val))))
(date-string2 (strftime "%x %X" (localtime (car date2-val))))
@@ -391,7 +390,7 @@
;; Here we print the value of the number option formatted as
;; currency. When printing currency values, you should use
- ;; the function (gnc:amount->string), which is defined in
+ ;; the function (xaccPrintAmount), which is defined in
;; report-utilities. This functions will format the number
;; appropriately in the current locale. Don't try to format
;; it yourself -- it will be wrong in other locales.
@@ -399,9 +398,9 @@
(gnc:html-markup/format
(_ "The number option formatted as currency is %s.")
(gnc:html-markup-b
- (gnc:amount->string
+ (xaccPrintAmount
(gnc:make-gnc-numeric (inexact->exact num-val) 1)
- (gnc:default-print-info #f)))))))
+ (gnc-default-print-info #f)))))))
;; you can add as many objects as you want. Here's another
;; one. We'll make a single-column table of the selected list
@@ -430,8 +429,8 @@
;; need to do is pass the HREF "gnc-register:account=My
;; Account Name" to html-markup-anchor. The account name
;; passed must be the "full" account name that you get from
- ;; gnc:account-get-full-name. You should build this url using
- ;; (gnc:html-build-url ...)
+ ;; gnc-account-get-full-name. You should build this url using
+ ;; (gnc-build-url ...)
;;
;; html-markup-anchor takes the link to jump to as its first
;; arg and then puts the remaining args in the body of the
@@ -447,12 +446,12 @@
(map
(lambda (acct)
(gnc:html-markup-anchor
- (gnc:html-build-url gnc:url-type-register
+ (gnc-build-url URL-TYPE-REGISTER
(string-append "account="
- (gnc:account-get-full-name
+ (gnc-account-get-full-name
acct))
- #f)
- (gnc:account-get-name acct)))
+ "")
+ (xaccAccountGetName acct)))
accounts))))
(gnc:html-document-add-object!
document
Modified: gnucash/trunk/src/report/utility-reports/test/Makefile.am
===================================================================
--- gnucash/trunk/src/report/utility-reports/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/utility-reports/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -15,7 +15,6 @@
--gnc-module-dir ${top_srcdir}/src/gnc-module \
--gnc-module-dir ${top_srcdir}/src/engine \
--guile-load-dir ${top_srcdir}/src/scm \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_srcdir}/src/app-utils \
--guile-load-dir ${top_srcdir}/src/gnome-utils \
--guile-load-dir ${top_srcdir}/src/gnome \
@@ -23,8 +22,7 @@
--guile-load-dir ${top_srcdir}/src/report/utility-reports \
--library-dir ${top_builddir}/src/gnome-utils \
--library-dir ${top_builddir}/src/gnome \
- --library-dir ${top_builddir}/lib/libqof/qof \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_builddir}/lib/libqof/qof
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Modified: gnucash/trunk/src/report/utility-reports/test-graphing.scm
===================================================================
--- gnucash/trunk/src/report/utility-reports/test-graphing.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/utility-reports/test-graphing.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -12,7 +12,7 @@
(debug-enable 'backtrace)
(gnc:module-load "gnucash/report/report-system" 0)
-(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc:html-build-url
+(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc-build-url
(define (simple-pie-chart)
(let ((chart (gnc:make-html-piechart)))
Modified: gnucash/trunk/src/report/utility-reports/view-column.scm
===================================================================
--- gnucash/trunk/src/report/utility-reports/view-column.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/utility-reports/view-column.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -30,12 +30,12 @@
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (ice-9 slib))
(use-modules (gnucash gnc-module))
-(use-modules (g-wrapped gw-report-system))
+(use-modules (sw_report_system))
(require 'printf)
(gnc:module-load "gnucash/report/report-system" 0)
-(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc:html-build-url
+(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc-build-url
(define (make-options)
(let* ((options (gnc:new-options))
@@ -96,7 +96,7 @@
(begin
(set! callback
(make-child-options-callback
- report (gnc:find-report child)))
+ report (gnc-report-find child)))
(set! report-info
(list child rowspan colspan callback))))
(set! new-reports (cons report-info new-reports))))
@@ -115,7 +115,7 @@
;; hash is an attempt to compute how many columnc are
;; actually used in a row; items with non-1 rowspans will take
;; up cells in the row without actually being in the row.
- (let* ((subreport (gnc:find-report (car report-info)))
+ (let* ((subreport (gnc-report-find (car report-info)))
(colspan (cadr report-info))
(rowspan (caddr report-info))
(opt-callback (cadddr report-info))
@@ -166,19 +166,19 @@
report-table
(list (gnc:make-html-text
(gnc:html-markup-anchor
- (gnc:html-build-url
- gnc:url-type-options
+ (gnc-build-url
+ URL-TYPE-OPTIONS
(string-append "report-id="
(sprintf #f "%a" (car report-info)))
- #f)
+ "")
(_ "Edit Options"))
" "
(gnc:html-markup-anchor
- (gnc:html-build-url
- gnc:url-type-report
+ (gnc-build-url
+ URL-TYPE-REPORT
(string-append "id="
(sprintf #f "%a" (car report-info)))
- #f)
+ "")
(_ "Single Report")))))
;; add the report-table to the toplevel-cell
@@ -217,7 +217,7 @@
(gnc:lookup-option options "__general" "report-list"))))
(for-each
(lambda (child)
- (gnc:report-set-dirty?! (gnc:find-report (car child)) #t))
+ (gnc:report-set-dirty?! (gnc-report-find (car child)) #t))
reports)))
(define (cleanup-options report)
Modified: gnucash/trunk/src/report/utility-reports/welcome-to-gnucash.scm
===================================================================
--- gnucash/trunk/src/report/utility-reports/welcome-to-gnucash.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/report/utility-reports/welcome-to-gnucash.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -25,7 +25,7 @@
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (gnucash gnc-module))
-(use-modules (g-wrapped gw-report-system))
+(use-modules (sw_report_system))
(gnc:module-load "gnucash/report/report-system" 0)
@@ -42,16 +42,16 @@
(gnc:option-set-value
(gnc:lookup-option options section name) value))
- (set! options (gnc:report-options (gnc:find-report view)))
+ (set! options (gnc:report-options (gnc-report-find view)))
(set-option! "General" "Report name" (_ "Welcome to GnuCash"))
(set-option! "General" "Number of columns" 2)
;; mark the reports as needing to be saved
- (gnc:report-set-needs-save?! (gnc:find-report sub-welcome) #t)
- (gnc:report-set-needs-save?! (gnc:find-report sub-accounts) #t)
- (gnc:report-set-needs-save?! (gnc:find-report sub-expense-pie) #t)
- (gnc:report-set-needs-save?! (gnc:find-report sub-income-pie) #t)
- (gnc:report-set-needs-save?! (gnc:find-report sub-bar) #t)
+ (gnc:report-set-needs-save?! (gnc-report-find sub-welcome) #t)
+ (gnc:report-set-needs-save?! (gnc-report-find sub-accounts) #t)
+ (gnc:report-set-needs-save?! (gnc-report-find sub-expense-pie) #t)
+ (gnc:report-set-needs-save?! (gnc-report-find sub-income-pie) #t)
+ (gnc:report-set-needs-save?! (gnc-report-find sub-bar) #t)
(set-option! "__general" "report-list"
(list (list sub-welcome 1 1 #f)
@@ -60,13 +60,13 @@
(list sub-income-pie 1 1 #f)
(list sub-bar 2 1 #f)))
- (set! options (gnc:report-options (gnc:find-report sub-expense-pie)))
+ (set! options (gnc:report-options (gnc-report-find sub-expense-pie)))
(set-option! "Display" "Plot Width" 400)
- (set! options (gnc:report-options (gnc:find-report sub-income-pie)))
+ (set! options (gnc:report-options (gnc-report-find sub-income-pie)))
(set-option! "Display" "Plot Width" 400)
- (set! options (gnc:report-options (gnc:find-report sub-bar)))
+ (set! options (gnc:report-options (gnc-report-find sub-bar)))
(set-option! "Display" "Plot Width" 800)
view))
Modified: gnucash/trunk/src/scm/command-line.scm
===================================================================
--- gnucash/trunk/src/scm/command-line.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/scm/command-line.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -84,7 +84,7 @@
where 'default expands to the default path, and 'current expands to \
the current value of the path.")
(let ((result (cons
- (gnc:build-dotgnucash-path "html")
+ (gnc-build-dotgnucash-path "html")
gnc:_install-doc-path_)))
(lambda () result))))
Modified: gnucash/trunk/src/scm/main-window.scm
===================================================================
--- gnucash/trunk/src/scm/main-window.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/scm/main-window.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -28,33 +28,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define (gnc:main-window-book-open-handler session)
- (define (try-load file-suffix)
- (let ((file (gnc:build-book-path file-suffix)))
- ;; make sure the books directory is there
- (if (access? file F_OK)
- (if (not (false-if-exception (primitive-load file)))
- (begin
- (gnc:warn "failure loading " file)
- #f))
- #f)))
-
- (let* ((book-url (gnc:session-get-url session))
- (conf-file-name (gnc:html-encode-string book-url))
- (dead-reports '()))
- (if conf-file-name
- (try-load conf-file-name))
-
- ))
-
(define (gnc:main-window-properties-cb)
- (let* ((book (gnc:get-current-book))
- (slots (gnc:book-get-slots book)))
+ (let* ((book (gnc-get-current-book))
+ (slots (gnc-book-get-slots book)))
(define (changed_cb)
- (gnc:book-kvp-changed book))
+ (qof-book-kvp-changed book))
- (gnc:kvp-option-dialog gnc:id-book
+ (gnc:kvp-option-dialog QOF-ID-BOOK-SCM
slots (_ "Book Options")
changed_cb)))
Modified: gnucash/trunk/src/scm/main.scm
===================================================================
--- gnucash/trunk/src/scm/main.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/scm/main.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -23,9 +23,7 @@
(default-duplicate-binding-handler 'last))
(use-modules (ice-9 slib))
-(use-modules (g-wrap gw-wct))
-(use-modules (g-wrapped gw-core-utils))
-(use-modules (g-wrapped gw-gnc))
+(use-modules (gnucash core-utils))
;; Load the srfis (eventually, we should see where these are needed
;; and only have the use-modules statements in those files).
@@ -80,6 +78,7 @@
;; executable code until the end of the file if you can help it.
;; These are needed for a guile 1.3.4 bug
(debug-enable 'debug)
+(debug-enable 'backtrace)
(read-enable 'positions)
(debug-set! maxdepth 100000)
@@ -87,9 +86,6 @@
;;(use-modules (ice-9 statprof))
-(define (gnc:setup-debugging)
- (if (gnc:debugging?)
- (debug-enable 'backtrace)))
;; various utilities
@@ -183,7 +179,7 @@
(newline))
(define (gnc:debug . items)
- (if (gnc:debugging?)
+ (if (gnc-is-debugging)
(begin
(display "gnucash: [D] ")
(for-each (lambda (i) (write i)) items)
@@ -229,7 +225,6 @@
;; Now the fun begins.
(gnc:debug "starting up (1).")
- (gnc:setup-debugging)
;; Now we can load a bunch of files.
(load-from-path "command-line.scm") ;; depends on app-utils (N_, etc.)...
Modified: gnucash/trunk/src/scm/price-quotes.scm
===================================================================
--- gnucash/trunk/src/scm/price-quotes.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/scm/price-quotes.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -29,10 +29,9 @@
(use-modules (gnucash process))
(use-modules (www main))
(use-modules (srfi srfi-1))
-(use-modules (gnucash main) (g-wrapped gw-gnc)) ;; FIXME: delete after we finish modularizing.
+(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (gnucash gnc-module))
-(use-modules (g-wrapped gw-core-utils))
-(use-modules (g-wrapped gw-gnome-utils))
+(use-modules (gnucash core-utils))
(gnc:module-load "gnucash/app-utils" 0)
@@ -243,7 +242,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define gnc:*finance-quote-check*
- (g:find-program-in-path "gnc-fq-check"))
+ (g-find-program-in-path "gnc-fq-check"))
(define (gnc:fq-check-sources)
(let ((program #f))
@@ -291,7 +290,7 @@
;; src/engine/gnc-pricedb.h
(define gnc:*finance-quote-helper*
- (g:find-program-in-path "gnc-fq-helper"))
+ (g-find-program-in-path "gnc-fq-helper"))
(define (gnc:fq-get-quotes requests)
;; requests should be a list where each item is of the form
@@ -397,9 +396,9 @@
;; (commodity-4 currency-4 tz-4) ...)
;; ...)
- (let* ((ct (gnc:book-get-commodity-table book))
+ (let* ((ct (gnc-commodity-table-get-table book))
(big-list
- (gnc:commodity-table-get-quotable-commodities-info
+ (gnc-commodity-table-get-quotable-commodities
ct))
(commodity-list #f)
(currency-list (filter
@@ -445,14 +444,14 @@
(if (equal? (car fq-call-data) "currency")
(map (lambda (quote-item-info)
(list (car fq-call-data)
- (gnc:commodity-get-mnemonic (car quote-item-info))
- (gnc:commodity-get-mnemonic (cadr quote-item-info))))
+ (gnc-commodity-get-mnemonic (car quote-item-info))
+ (gnc-commodity-get-mnemonic (cadr quote-item-info))))
(cdr fq-call-data))
(list
(cons (car fq-call-data)
(map
(lambda (quote-item-info)
- (gnc:commodity-get-mnemonic (car quote-item-info)))
+ (gnc-commodity-get-mnemonic (car quote-item-info)))
(cdr fq-call-data))))))
(define (fq-results->commod-tz-quote-triples fq-call-data fq-results)
@@ -539,11 +538,11 @@
(price #f)
(price-type #f)
(currency-str (assq-ref quote-data 'currency))
- (commodity-table (gnc:book-get-commodity-table book))
+ (commodity-table (gnc-commodity-table-get-table book))
(currency
(and commodity-table
(string? currency-str)
- (gnc:commodity-table-lookup commodity-table
+ (gnc-commodity-table-lookup commodity-table
"ISO4217"
(string-upcase currency-str)))))
@@ -566,7 +565,7 @@
;; FIXME: SIGFIGS is not what we want here...
(if price
(set! price
- (gnc:double-to-gnc-numeric price
+ (double-to-gnc-numeric price
GNC-DENOM-AUTO
(logior (GNC-DENOM-SIGFIGS 9)
GNC-RND-ROUND))))
@@ -577,32 +576,32 @@
(if (not (and commodity currency gnc-time price price-type))
(string-append
- currency-str ":" (gnc:commodity-get-mnemonic commodity))
- (let ((gnc-price (gnc:price-create book)))
+ currency-str ":" (gnc-commodity-get-mnemonic commodity))
+ (let ((gnc-price (gnc-price-create book)))
(if (not gnc-price)
(string-append
- currency-str ":" (gnc:commodity-get-mnemonic commodity))
+ currency-str ":" (gnc-commodity-get-mnemonic commodity))
(begin
- (gnc:price-set-commodity gnc-price commodity)
- (gnc:price-set-currency gnc-price currency)
- (gnc:price-set-time gnc-price gnc-time)
- (gnc:price-set-source gnc-price "Finance::Quote")
- (gnc:price-set-type gnc-price price-type)
- (gnc:price-set-value gnc-price price)
+ (gnc-price-set-commodity gnc-price commodity)
+ (gnc-price-set-currency gnc-price currency)
+ (gnc-price-set-time gnc-price gnc-time)
+ (gnc-price-set-source gnc-price "Finance::Quote")
+ (gnc-price-set-type gnc-price price-type)
+ (gnc-price-set-value gnc-price price)
gnc-price))))))
(define (book-add-prices! book prices)
- (let ((pricedb (gnc:book-get-pricedb book)))
+ (let ((pricedb (gnc-pricedb-get-db book)))
(for-each
(lambda (price)
- (gnc:pricedb-add-price pricedb price)
- (gnc:price-unref price))
+ (gnc-pricedb-add-price pricedb price)
+ (gnc-price-unref price))
prices)))
;; FIXME: uses of gnc:warn in here need to be cleaned up. Right
;; now, they'll result in funny formatting.
- (let* ((group (gnc:book-get-group book))
+ (let* ((group (xaccGetAccountGroup book))
(fq-call-data (book->commodity->fq-call-data book))
(fq-calls (and fq-call-data
(apply append
@@ -620,9 +619,9 @@
(if (car cq-pair)
#f
(string-append
- (gnc:commodity-get-namespace (cdr cq-pair))
+ (gnc-commodity-get-namespace (cdr cq-pair))
":"
- (gnc:commodity-get-mnemonic (cdr cq-pair)))))
+ (gnc-commodity-get-mnemonic (cdr cq-pair)))))
commod-tz-quote-triples)))
;; strip out the "bad" ones from above.
(ok-syms
@@ -633,47 +632,47 @@
(cond
((eq? fq-call-data #f)
(set! keep-going? #f)
- (if (gnc:ui-is-running?)
- (gnc:error-dialog window (_ "No commodities marked for quote retrieval."))
+ (if (gnucash-ui-is-running)
+ (gnc-error-dialog window (_ "No commodities marked for quote retrieval."))
(gnc:warn (_ "No commodities marked for quote retrieval."))))
((eq? fq-results #f)
(set! keep-going? #f)
- (if (gnc:ui-is-running?)
- (gnc:error-dialog window (_ "Unable to get quotes or diagnose the problem."))
+ (if (gnucash-ui-is-running)
+ (gnc-error-dialog window (_ "Unable to get quotes or diagnose the problem."))
(gnc:warn (_ "Unable to get quotes or diagnose the problem."))))
((member 'missing-lib fq-results)
(set! keep-going? #f)
- (if (gnc:ui-is-running?)
- (gnc:error-dialog window
+ (if (gnucash-ui-is-running)
+ (gnc-error-dialog window
(_ "You are missing some needed Perl libraries.
Run 'gnc-fq-update' as root to install them."))
(gnc:warn (_ "You are missing some needed Perl libraries.
Run 'gnc-fq-update' as root to install them.") "\n")))
((member 'system-error fq-results)
(set! keep-going? #f)
- (if (gnc:ui-is-running?)
- (gnc:error-dialog window
+ (if (gnucash-ui-is-running)
+ (gnc-error-dialog window
(_ "There was a system error while retrieving the price quotes."))
(gnc:warn (_ "There was a system error while retrieving the price quotes.") "\n")))
((not (list? (car fq-results)))
(set! keep-going? #f)
- (if (gnc:ui-is-running?)
- (gnc:error-dialog window
+ (if (gnucash-ui-is-running)
+ (gnc-error-dialog window
(_ "There was an unknown error while retrieving the price quotes."))
(gnc:warn (_ "There was an unknown error while retrieving the price quotes.") "\n")))
- ((and (not commod-tz-quote-triples) (gnc:ui-is-running?))
- (gnc:error-dialog window
+ ((and (not commod-tz-quote-triples) (gnucash-ui-is-running))
+ (gnc-error-dialog window
(_ "Unable to get quotes or diagnose the problem."))
(set! keep-going? #f))
((not commod-tz-quote-triples)
(gnc:warn (_ "Unable to get quotes or diagnose the problem."))
(set! keep-going? #f))
((not (null? problem-syms))
- (if (gnc:ui-is-running?)
+ (if (gnucash-ui-is-running)
(if (and ok-syms (not (null? ok-syms)))
(set!
keep-going?
- (gnc:verify-dialog window #t
+ (gnc-verify-dialog window #t
(call-with-output-string
(lambda (p)
(display (_ "Unable to retrieve quotes for these items:") p)
@@ -683,7 +682,7 @@
(newline p)
(display (_ "Continue using only the good quotes?") p)))))
(begin
- (gnc:error-dialog window
+ (gnc-error-dialog window
(call-with-output-string
(lambda (p)
(display
@@ -709,10 +708,10 @@
(commodity-tz-quote-triple->price book triple))
ok-syms)))
(if (any string? prices)
- (if (gnc:ui-is-running?)
+ (if (gnucash-ui-is-running)
(set!
keep-going?
- (gnc:verify-dialog window #t
+ (gnc-verify-dialog window #t
(call-with-output-string
(lambda (p)
(display (_ "Unable to create prices for these items:") p)
@@ -737,30 +736,6 @@
(lambda (x) (not (string? x)))
prices)))))))
-(define (gnc:add-quotes-to-book-at-url url)
- (let* ((session (gnc:url->loaded-session (gnc:get-current-session) url #f #f))
- (quote-ok? #f))
- (gnc:debug "in add-quotes-to-book-at-url")
- (if session
- (begin
- (gnc:debug "about to call gnc:book-add-quotes")
- (set! quote-ok? (and (gnc:book-add-quotes #f
- (gnc:session-get-book session))))
-
- (gnc:debug "done gnc:book-add-quotes:" quote-ok?)
- (if (not quote-ok?) (gnc:error "book-add-quotes failed"))
- (gnc:session-save session)
- (if (not (eq? 'no-err
- (gw:enum-<gnc:BackendError>-val->sym
- (gnc:session-get-error session) #f)))
- (set! quote-ok? #f))
- (if (not quote-ok?)
- (gnc:error "session-save failed "
- (gnc:session-get-error session)))
- (gnc:session-destroy session))
- (gnc:error "book-add-quotes unable to open file"))
- quote-ok?))
-
; (define (get-1-quote exchange . items)
; (let ((cmd (apply list 'fetch exchange items))
; (quoter (run-sub-process #f
@@ -780,4 +755,4 @@
(if (list? sources)
(begin
(gnc:msg "Found Finance::Quote version " (car sources))
- (gnc:quote-source-set-fq-installed (cdr sources))))))
+ (gnc-quote-source-set-fq-installed (cdr sources))))))
Modified: gnucash/trunk/src/scm/printing/print-check.scm
===================================================================
--- gnucash/trunk/src/scm/printing/print-check.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/scm/printing/print-check.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -101,7 +101,7 @@
(frac-part (inexact->exact
(truncate
(+ (/ .5 100) (* 100 (- amount int-part))))))
- (ps (gnc:print-session-create #t))
+ (ps (gnc-print-session-create #t))
(format #f)
(offset #f)
(date-string "")
@@ -146,71 +146,71 @@
(begin
(display "translate by ") (display (cadr translate-pos))
(display " ") (display (caddr translate-pos)) (newline)
- (gnc:print-session-translate ps (cadr translate-pos)
+ (gnc-print-session-translate ps (cadr translate-pos)
(caddr translate-pos)))))
(let ((rotate-angle (assq 'rotate format)))
- (if rotate-angle (gnc:print-session-rotate ps (cdr rotate-angle))))
+ (if rotate-angle (gnc-print-session-rotate ps (cdr rotate-angle))))
(let ((date-pos (assq 'date format)))
- (gnc:print-session-moveto ps (cadr date-pos)
+ (gnc-print-session-moveto ps (cadr date-pos)
(+ offset (caddr date-pos)))
- (gnc:print-session-text ps date-string))
+ (gnc-print-session-text ps date-string))
(let ((payee-pos (assq 'payee format)))
- (gnc:print-session-moveto ps (cadr payee-pos)
+ (gnc-print-session-moveto ps (cadr payee-pos)
(+ offset (caddr payee-pos)))
- (gnc:print-session-text ps payee))
+ (gnc-print-session-text ps payee))
(let ((number-pos (assq 'amount-number format)))
- (gnc:print-session-moveto ps (cadr number-pos)
+ (gnc-print-session-moveto ps (cadr number-pos)
(+ offset (caddr number-pos)))
- (gnc:print-session-text ps (printable-value amount 100)))
+ (gnc-print-session-text ps (printable-value amount 100)))
(let ((words-pos (assq 'amount-words format)))
- (gnc:print-session-moveto ps (cadr words-pos)
+ (gnc-print-session-moveto ps (cadr words-pos)
(+ offset (caddr words-pos)))
- (gnc:print-session-text ps (number-to-words amount 100)))
+ (gnc-print-session-text ps (number-to-words amount 100)))
(if (not (eq? (print-check-format:format format-info) 'wallet))
(let ((memo-pos (assq 'memo format)))
- (gnc:print-session-moveto ps (cadr memo-pos)
+ (gnc-print-session-moveto ps (cadr memo-pos)
(+ offset (caddr memo-pos)))
- (gnc:print-session-text ps memo)))
+ (gnc-print-session-text ps memo)))
(if (eq? (print-check-format:format format-info) 'wallet)
(begin
(let ((memo-pos (assq 'memo format)))
- (gnc:print-session-moveto ps (cadr memo-pos)
+ (gnc-print-session-moveto ps (cadr memo-pos)
(+ offset (caddr memo-pos)))
(if (< (string-length memo) 28)
- (gnc:print-session-text ps memo)
- (gnc:print-session-text ps (substring memo 0 27))))
+ (gnc-print-session-text ps memo)
+ (gnc-print-session-text ps (substring memo 0 27))))
(let ((memostub-pos (assq 'memo-stub format)))
- (gnc:print-session-moveto ps (cadr memostub-pos)
+ (gnc-print-session-moveto ps (cadr memostub-pos)
(+ offset (caddr memostub-pos)))
(if (< (string-length memo) 22)
(set! memo-stub-text memo)
(set! memo-stub-text (substring memo 0 20)))
- (gnc:print-session-text ps memo-stub-text))
+ (gnc-print-session-text ps memo-stub-text))
(let ((datestub-pos (assq 'date-stub format)))
- (gnc:print-session-moveto ps (cadr datestub-pos)
+ (gnc-print-session-moveto ps (cadr datestub-pos)
(+ offset (caddr datestub-pos)))
- (gnc:print-session-text ps date-string))
+ (gnc-print-session-text ps date-string))
(let ((payeestub-pos (assq 'payee-stub format)))
- (gnc:print-session-moveto ps (cadr payeestub-pos)
+ (gnc-print-session-moveto ps (cadr payeestub-pos)
(+ offset (caddr payeestub-pos)))
(if (< (string-length payee) 22)
(set! payee-stub-text payee)
(set! payee-stub-text (substring payee 0 20)))
- (gnc:print-session-text ps payee-stub-text))
+ (gnc-print-session-text ps payee-stub-text))
(let ((amountstub-pos (assq 'amount-stub format)))
- (gnc:print-session-moveto ps (cadr amountstub-pos)
+ (gnc-print-session-moveto ps (cadr amountstub-pos)
(+ offset (caddr amountstub-pos)))
- (gnc:print-session-text ps (printable-value amount 100)))))
+ (gnc-print-session-text ps (printable-value amount 100)))))
- (gnc:print-session-done ps)))))
+ (gnc-print-session-done ps)))))
Modified: gnucash/trunk/src/tax/us/test/Makefile.am
===================================================================
--- gnucash/trunk/src/tax/us/test/Makefile.am 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/tax/us/test/Makefile.am 2006-10-15 19:02:05 UTC (rev 15024)
@@ -13,12 +13,10 @@
--gnc-module-dir ${top_srcdir}/src/tax/us \
--guile-load-dir ${top_builddir}/src/scm \
--guile-load-dir ${top_builddir}/lib \
- --guile-load-dir ${G_WRAP_MODULE_DIR} \
--guile-load-dir ${top_builddir}/src/gnome-utils \
--guile-load-dir ${top_builddir}/src/gnome \
--library-dir ${top_builddir}/src/gnome-utils \
- --library-dir ${top_builddir}/src/gnome \
- --library-dir ${G_WRAP_LIB_DIR}
+ --library-dir ${top_builddir}/src/gnome
TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
Modified: gnucash/trunk/src/tax/us/txf-de_DE.scm
===================================================================
--- gnucash/trunk/src/tax/us/txf-de_DE.scm 2006-10-15 04:08:48 UTC (rev 15023)
+++ gnucash/trunk/src/tax/us/txf-de_DE.scm 2006-10-15 19:02:05 UTC (rev 15024)
@@ -129,4 +129,4 @@
"a" (N_ "The electronic tax number of your business") ""))
)
-(gnc:register-kvp-option-generator gnc:id-book book-options-generator)
+(gnc-register-kvp-option-generator QOF-ID-BOOK-SCM book-options-generator)
More information about the gnucash-changes
mailing list