Commit Graph

13 Commits

Author SHA1 Message Date
Dave Peticolas
a14bf2bfab James LewisMoss's patch.
* src/test/test-stuff.c (failure): don't print num if == -1.
	(success): same.
	(get_random_account): move here from test-xml-account.c
	(get_random_split): move here from test-xml-transaction.c
	(get_random_transaction): same.
	(success_args): New func.
	(success): Simplified version
	(failure_args): new func.
	(failure): Simplified version.

	* src/engine/io-gncbin-r.c: same as below.

	* src/engine/TransLog.c (xaccTransWriteLog): same as below.

	* src/engine/Group.c (xaccGroupMergeAccounts): same as below.

	* src/engine/Backend.c (xaccTransactionGetBackend): Convert to not
	use the split's acc part directly, but only to access through
	funcs

	* src/engine/sixtp-dom-parsers.c (dom_tree_generic_parse): Add
	generic parser.

	* src/engine/gnc-account-xml-v2.c (gnc_account_end_handler): use
	generic parser extracted from here and used here and
	gnc-transaction-iml-v2.c

	* src/engine/Transaction.c (xaccInitSplit): Add a split->acc_guid
	field that is set to the account's guid.  This way an Account is
	not required to exist yet when loading the split.  Later when
	xaccSplitGetAccount is called the account is looked up, cached and
	returned.  Make sure everything accesses ->acc through the helper
	function.

	* src/engine/AccountP.h: same as below.

	* src/engine/Account.c (xaccAccountSetGUID): mark guid argument
	const since it doesn't keep a pointer to it.

	* src/doc/xml/transactions-v2.dtd: change guid -> id.
	* src/engine/Transaction.c (get_denom_internal): New helper func.
	(get_currency_denom): use func.
	(get_security_denom): use func.

	* src/engine/sixtp.c: (sixtp_sax_end_handler,
	sixtp_sax_characters_handler, sixtp_sax_start_handler): don't use
	g_return_if_fail to test pdata->parsing_ok so we don't see the
	million CRITICAL warnings.  We'll print an error at the end
	anyway.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3762 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-03-09 07:46:13 +00:00
Dave Peticolas
ce80ff48a2 James LewisMoss's patch.
* src/test/test-xml-account.c (delete_random_account): new func to
	cleanup commodities not generally freed at xaccAccountDestroy.
	(node_and_account_equal): complete func to compare account and the
	dom tree created.  Looks good except for some warnings from
	dom_tree_to_text.

	* src/test/test-stuff.c (equals_node_val_vs_commodity): new func.
	(equals_node_val_vs_guid): New func.
	(equals_node_val_vs_string): new func.

	* src/engine/gnc-account-xml-v2.c (account_code_handler): Add func.
	(account_description_handler): Add func.  Oops forgot a couple.
	(gnc_account_dom_tree_create): Move all string tags in file to
	const gchar*s.
	(account_slots_handler): Complete func.

	* make-gnucash-patch.in: Test to see if makepatch exists.

	* src/engine/sixtp-dom-parsers.c (dom_tree_to_text): same as
	below.  Add NULL tests for arguments.  Affected many functions in
	this file.

	* src/engine/gnc-pricedb-xml-v1.c (price_parse_xml_sub_node): Same
	as below.

	* src/engine/gnc-commodity-xml-v2.c (set_commodity_value): Convert
	dom_tree_to_text to act as rest looking at children on it's own.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3718 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-28 08:06:50 +00:00
Dave Peticolas
5494d6ad07 James LewisMoss's patch with some xml and testing stuff.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3712 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-27 20:15:11 +00:00
Dave Peticolas
85a79ab409 James LewisMoss's xml patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3643 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-12 22:35:20 +00:00
Dave Peticolas
5f5661e125 James LewisMoss's refactoring of xml writing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3579 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-03 00:41:20 +00:00
Dave Peticolas
a74241ef87 James LewisMoss's patch adding a new-user gui.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3443 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-01-11 22:32:22 +00:00
Dave Peticolas
6290fdae4a James LewisMoss's patch with:
1) More meta data updates (.cvsignore updates, debian/* updates,
   gnucash.lsm)
2) Changes to make-gnucash-patch.in.  I like the changes, but I don't
   know whether they would be universally liked, so pay attention to
   this one.  Changes include:
   a) check out compared source from cvs
   b) use .cvsignore files to get a large part of the --exclude list.
   c) Keep track of past patches by not automatically overwriting old
      patches and put the patches in a directory to keep things neat.
3) Refactoring in src/engine/Transaction.c to remove the redundant
   code setting dates in transactions.
4) remove all the #if 0 blocks in src/engine/io-gnc{bin,xml}* (helped
   my see things more clearly when looking at the code.  Again ignore
   it if this is inappropriate.)
5) append emacs local variable settings stuff to save file so it's
   known as an xml file.
6) Patch to cleanup startup some more.
   a) src/gnome/top-level.c: don't run load-account-file, split up
      startup into a couple of functions.
   b) src/gnome/window-main.h; src/gulie/gnc.gwp: add the new functions
   c) src/scm/main.scm: do the new startup sequence.
   d) All this so in a batch environment you can start up the gui
      system without bringing up the default window.
7) src/scm/report/budget-report.scm: some refactoring/cleanup done
   while looking at the code.  Nothing functional different (at least
   there shouldn't be.)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3320 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-12-19 07:59:44 +00:00
Dave Peticolas
a50ed7498a James LewisMoss's build system patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3283 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-12-11 21:26:58 +00:00
Dave Peticolas
67c7c0d2a6 James LewisMoss's debian patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3188 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-11-21 20:55:20 +00:00
Dave Peticolas
eef1afd0bf John Goerzen's debian patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2407 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-06-04 21:40:15 +00:00
Dave Peticolas
51d27bb424 Tomas Pospisek's debian patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2276 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-05-08 11:23:09 +00:00
Dave Peticolas
727a2e1ab5 Tomas Pospisek's debian patches.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2268 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-05-07 01:00:26 +00:00
Linas Vepstas
bd3679b372 merge in stuff from the 1.0 branch
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@566 57a11ea4-9604-0410-9ed3-97b8803252fd
1998-03-01 17:02:13 +00:00