* 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
US locale.
* src/scm/report/taxtxf.scm: work on tax report (unfinished)
* src/scm/report/hello-world.scm: use new html format functions.
Add scheme reference.
* src/gnome/dialog-fincalc.c (gnc_ui_fincalc_dialog_create): hide
schedule button. Use 'lookup_widget'.
* src/gnome/gnc-html.c (gnc_html_export): handle cancelling
* src/scm/html-style-info.scm: remove cruft
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3761 57a11ea4-9604-0410-9ed3-97b8803252fd
* summary: separate the HTML and HTTP processing functions into
different files to facilitate reuse. Modularize much of the
gnucash-specific behavior of the HTML code (<object> and form
submission) to use run-time-expandable bahavior tables. Add the
gnc-action: mechanism for installing form submission handlers.
* src/gnome/gng-gpg.c: initialize gnc-html handler for crypted
HTML objects. Remove all mention of GPG from gnc-html.c
* src/gnome/gnc-html-actions.c: new file. Add a simple form
submission action (action=gnc-action:gnc-info/form?CGI_URL) to
test submit and action processing. This is useless ATM. Some of
the stuff in the privacy comments is unimplemented yet.
* src/gnome/gnc-html-guppi.c: move all Guppi references from
gnc-html.c into a separate file, with an initializer for
the Guppi <object> tags.
* src/gnome/gnc-html.c: get rid of SSL references; all that stuff
is now in gnc-http.c. Restructure to use gnc-http instead of
ghttp directly. Finish GET and POST default handlers, and add
handler lookup/install mechanism for gnc-action: actions. crib
urlencoding function from gtkhtml guts.
* src/gnome/gnc-http.c: new file. Move HTTP stuff here. Finish
POST handling.
* src/gnome/top-level.c: add calls to Guppi, GPG, and gnc-html
init functions. These calls will eventually go into loadable
module startup functions, when we get loadable modules.
* src/scm/html-text.scm: Add html-markup/format.
(html-markup/format "%a %a %a %a" 1 2 3 4) does what you'd expect,
even if the non-format args are html-markup objects.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3759 57a11ea4-9604-0410-9ed3-97b8803252fd
handler for checking backend events.
* src/engine/gnc-book.{ch}: add api calls to use backend
event hooks.
* src/engine/BackendP.h (struct _backend ): add events_pending
and process_events callbacks.
* src/scm/command-line.scm: extend usage command with argument
list
* src/pixmaps/Makefile.am: switch splash graphics
* src/gnome/gnc-splash.c (gnc_show_splash_screen): add a border.
use new graphic.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3758 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/engine/sixtp-dom-parsers.c (dom_tree_to_commodity_ref): use
gnc_commodity_destroy, not g_free.
* src/guile/gnc.gwp: fix for new commodity insert
* src/gnome/druid-qif-import.c: fix for new commodity insert
* src/gnome/dialog-commodity.c: check for existing commodity.
fix for new commodity insert.
* src/engine/io-gncbin-r.c: fix for new commodity insert
* src/gnome/druid-commodity.c: fix for new commodity insert
* src/engine/gnc-commodity.c: change commodity insert semantics to
use an existing commodity if present. Remove
gnc_commodity_table_remove(). It wasn't used and was a mem leak.
* src/engine/Commodity-xml-parser-v1.c
(commodity_restore_end_handler): use gnc_commodity_destroy,
not just g_free.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3754 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/scm/html-utilities.scm: reorganizing of the hierarchical
reports: subtotals are now printed *below* the subaccounts instead
of above.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3751 57a11ea4-9604-0410-9ed3-97b8803252fd
list routines (they always return the new head of the list).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3748 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/gnome/top-level.c (gnucash_ui_init): show splash screen
* src/gnome/gnc-splash.{ch}: splash screen functionality
* src/gnome/dialog-utils.{ch} (gnc_get_pixmap): new function
* src/gnc-dir.h.in: add header file with directory info
* src/guile/Makefile.am: use BUILT_SOURCES for *.in sources
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3746 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/scm/html-utilities.scm: Added different printing of stock
accounts. Started a new layout/ordering for sub-totals.
* src/scm/commodity-utilities.scm (gnc:sum-collector-stocks):
added such that stock prices are no longer shown but foreign
currencies are. Rounding precision increased. Added sanity checks
for arguments of various funtions.
* src/scm/report-utilities.scm (gnc:account-is-stock?): added
function
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3744 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/gnome/window-report.c: save & restore window size
* src/scm/prefs.scm: add vars for report & help win sizes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3743 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/engine/gnc-pricedb.c (gnc_pricedb_destroy): fix mem leak
* src/gnome/dialog-options.c: cleanup destruction semantics.
destroy tooltips
* src/engine/io-gncxml-r.c (gnc_book_load_from_xml_file): fix mem
leak
* src/gnome/dialog-utils.c (gnc_build_option_menu): destroy
tooltips when menu is destroyed
* src/gnome/dialog-transfer.c: destroy tooltips object
* src/gnome/window-main.c (gnc_ui_destroy_all_subwindows): now all
windows use component manager
* src/gnome/window-report.c: add report to component manager.
cleaner destruction behavior
* src/gnome/window-help.c: cleaner destruction behavior
* src/gnome/gnc-html.c: fix to avoid having the ref the container
from outside for destruction
* src/FileDialog.c (gncAddHistory): fix mem leak
* src/gnome/dialog-options.c (gnc_option_create_date_widget): fix
bug & mem leak.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3733 57a11ea4-9604-0410-9ed3-97b8803252fd
user during delete, ignore the insert callback.
* src/MultiLedger.c: update for new view api
* src/register/recncell.{ch}: allow setting a parent to be used
for the dialog.
* src/gnome/query-user.c (gnc_verify_dialog_parented): handle null
parent by using gnc_get_ui_data.
* src/gnome/window-register.c: eliminate calls to
xaccSRCheckReconciled. confirmation is done in SplitLedger.c now.
* src/SplitLedger.c: use new data entry confirmation callback
to confirm changes to a reconciled split.
* src/register/splitreg.{ch}: mod for table-allgui changes
* src/register/table-allgui.{ch}: encapsulate 'view' callbacks
into a struct. add a callback for confiming data entry.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3726 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/engine/gnc-book.c (gnc_book_load): fix spelling
* src/engine/Scrub.c (xaccTransScrubImbalance): don't use sub_fixed
since the value may not have the right denominator
(xaccSplitScrub): handle splits without accounts
* src/gnome/query-user.c
(gnc_choose_radio_option_dialog_parented): actually set the parent
* src/SplitLedger.c (xaccSRCheckReconciled): check current
transaction, not current split.
* src/engine/GNCId.c: use GUID allocator for hash keys.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3724 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/engine/gnc-commodity-xml-v2.c (gnc_commodity_end_handler):
mem leak. free the node in the end handler.
* src/engine/gnc-commodity.c (reset_unique_name): new func.
(reset_printname): new func.
(gnc_commodity_new): use new funcs
(gnc_commodity_set_mnemonic): use new funcs.
(gnc_commodity_set_namespace): use new funcs.
(gnc_commodity_set_fullname): use new funcs.
* src/engine/gnc-commodity-xml-v2.c (gnc_commodity_end_handler):
Don't free commodity. That's the globaldata funcs job if it wants
to.
(set_commodity_value): Must remember compare equals == 0. Duh.
* src/engine/sixtp.c (sixtp_parse_file): Only run end handler if
parsing is already ok.
* src/test/test-xml-account.c (test_generation): oops should have
continued here.
* src/engine/gnc-commodity-xml-v2.c (valid_commodity): Complete func.
* configure.in (LIBS): disable libxml/xmlversion.h checks so we can't
compile for libxml2 for now.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3723 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/test/test-xml-account.c (node_and_account_equal): fix mem
leak.
(test_add_account): new func.
(test_generation): Actually test the node created and the
parser. Everything looks good other than some sixtp oddness I
don't understand yet.
* src/engine/gnc-transaction-xml-v2.c
(gnc_transaction_end_handler): same as below.
* src/engine/gnc-commodity-xml-v2.c (gnc_commodity_end_handler):
Use data struct from io-gncxml-v2.h
* src/engine/gnc-account-xml-v2.c (account_currency_handler): Make
not use engine commodity funcs to make this testable. Will have
to have something to clean this up in production code.
(account_security_handler): Same.
(gnc_xml_set_account_data): Oops. Actually set that we have
gotten this so the got all test succeeds.
(gnc_account_end_handler): Start the main parsing setup by relying
on data struct from io-gncxml-v2.h
(gnc_account_end_handler): fix free to free the correct thing.
Add some g_warning calls to make errors more apparent.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3720 57a11ea4-9604-0410-9ed3-97b8803252fd
* 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
gtk_scrolled_window for use in register.
* src/register/gnome/gnucash-item-list.c: use scrolled window
for really long account names.
* doc/sgml/es/Makefile.am (GNUCASH_SGML_FILES): fix list of sgml
files
* src/gnc-ui.h: use gncUIWidget not GtkWidget* in non-gnome
directories.
* src/engine/sql/PostgresBackend.c (pgendSyncTransaction): add
missing call to gnc_engine_resume_events ().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3717 57a11ea4-9604-0410-9ed3-97b8803252fd