Commit Graph

9322 Commits

Author SHA1 Message Date
Chris Shoemaker
5382b075cd Bits to let the register see the in-progress Transaction edit.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13463 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:13:15 +00:00
Chris Shoemaker
8eadc7cd23 Remove xaccAccountRemoveSplit, and xaccAccountInsertSplit.
(Actually, xaccAccountInsertSplit is #def'd to xaccSplitSetAccount().)
   Accounts no longer manage their Split lists.  The Account split lists
   should only ever be modified from within xaccTransCommitEdit().  This
   simplifies some of the operations on Accounts, since they can now be 
   expressed in terms of operations on Splits.

   Also, the consolidation of two operations (RemoveSplit and InsertSplit) 
   into one operation (xaccSplitSetAccount) means that it's no longer 
   possible to orphan a Split.

   Incidental:
      Fix a leak of a KVP frame.
      Don't recompute the account balance if we're shutting down.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13462 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:11:44 +00:00
Chris Shoemaker
6782a2b49d The xaccTransRollbackEdit() part of the Begin/Commit edit-block rewrite.
Broken out just for clarity.

   Note: There's one piece that I didn't change that I think is conceptually
   awkward.  It has to do with how/when we would discover that another
   user has deleted the transaction we're currently editing.  I think it makes
   more sense to detect and handle this case in xaccTransCommitEdit() instead
   of xaccTransRollbackEdit(), because (a) we don't actually have to do the 
   rollback if we just destroy the trans, (b) some rollbacks are not backend-
   induced, but rather voluntary, (c) we need a generalized mechanism
   anyway for detecting and handling deleted transactions even when
   we're not editing them.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13461 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:11:16 +00:00
Chris Shoemaker
dd80eaa743 Move one data-validation function from Scrub.c into Transaction.c
One simplification in xaccTransScrubImbalance() to always find the root
   AccountGroup from the Transaction's book.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13460 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:10:44 +00:00
Chris Shoemaker
7bad37599c A good bit of notes about how the Transaction Begin/Commit
edit-blocks should work, and why. 

   Converts the very important xaccTransCommitEdit function to use the 
   qof_commit_edit_part2() function instead of something that is 90%
   similar.

   Transactions have a Split list that keeps track of Splits during the edit.
   During edits, this list only grows and never shrinks.  Splits that
   have been destroyed or reparented to other transactions remain in
   the list, along with pre-edit Splits and newly added Splits.  Only after a 
   successful commit does the Split list drop reparented or destroyed
   Splits.  A couple out-of-engine users (mainly the register) call
   xaccTransGetSplitList() an work from the Transaction's split list,
   but they expect to be working with only the Splits that would still be in 
   the Transaction if the in-progress edit would be committed.  So, we
   provide the function xaccTransStillHasSplit(t, s) to allow users to query 
   the in-edit state of the Transaction's Split list.

   xaccTransRemoveSplit() and xaccTransInsertSplit() have been replaced by
   xaccSplitSetParent().

   The new xaccTransCommitEdit tries to take a more conservative approach
   to event generation, too.  Instead of generating every possible event for 
   any commit, it should generate only events that indicate a change to an 
   engine object or relation.

   Move some of the financial-constraint-enforcing functions closer to the 
   relevant data-structures. (from Scrub.c)



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13459 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:10:12 +00:00
Chris Shoemaker
241f37379a Remove some testing of an engine API that has been removed.
The engine used to have functions that made it possible to orphan a Split.
   As this is no longer possible, we can't test anymore.

   Incidental:
      Fix three or four small leaks in the test functions.
      Allow test-period to be randomized based on optional command-line arg.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13458 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:09:31 +00:00
Chris Shoemaker
ed94e594b2 Splits can now keep track of their own rollback state.
The Split <-> Account and Split <-> Transaction relationships are now
   treated as properties of the Split.  In terms of the BeginEdit/CommitEdit 
   block, Splits are subordinate to Transactions.  There is no public 
   BeginEdit/CommitEdit block for Splits; changes to Splits should be wrapped
   in their Transaction's Edit-block.

   In the case of the Split <-> Account relationship, the call to
   xaccSplitSetAccount() will be immediately visible from
   xaccSplitGetAccount(), but the Account does not learn about the
   Split until and if the edit is committed.

   In the case of the Split <-> Transaction relationship, calling
   xaccSplitSetParent() will immediately add the Split to the
   Transactions split list.  This is because the Split's Transaction
   owns the reference to the Split.  However, see the Transaction.c 
   patch for how to distinguish pre-edit state from in-edit state.

   In both cases, events are not generated until the edits are committed.
   Most of this new logic is in an engine-private helper xaccSplitCommitEdit(),
   which is called from xaccTransCommitEdit().

   Incidental:
      Increased error-checking in xaccSplitSetValue().
      Internalize a Transaction Begin/Commit edit-block in every setter func.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13457 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:09:03 +00:00
Chris Shoemaker
9b63e08746 Remove two slightly different definitions of
gnc:transaction-map-splits, both unused.
   Remove g-wrapped versions of functions being removed:
      gnc:account-fix-split-date-order,
      gnc:trans-fix-split-date-order



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13456 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:08:16 +00:00
Derek Atkins
516b99efd8 error out on g-wrap-1.3, gcc4, and error-on-warning. Fixes #330615.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13454 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-03 15:57:51 +00:00
Joshua Sled
9d3ee26a79 Fix SXEDITOR help target.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13446 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-03 01:54:44 +00:00
Christian Stimming
e61c217338 Finally, successfully implemented mt940 import. Completed #325170.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13444 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-02 22:04:05 +00:00
Christian Stimming
2908477af0 Add clarifying comment to weird directory function, better to be replaced by the appropriate glib function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13442 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-02 21:59:44 +00:00
Christian Stimming
e0ebdf6d84 More work on mt940 import, #325170. Unfortunately not yet error-free.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13440 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-02 21:51:50 +00:00
Christian Stimming
03d6b727d6 Greek account templates converted to UTF-8, by Nikos Charonitakis
<nikosx@gmail.com>.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13437 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-02 20:55:02 +00:00
David Hampton
bf46ee7847 Move the storage for the account separator character into Account.c
(default ':') and set it with an accessor function at startup and when
it is changed in the preferences/gconf.  Eliminate unnecessary passing
around of the account separator character.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13435 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-02 07:20:33 +00:00
David Hampton
cbedb5a5e9 Convert all locations that parse input using the locale
thousands/decimal point characters to use unicode functions.  This
should allow multi-byte unicode characters to work as these separators
on input.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13434 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-02 00:24:54 +00:00
David Hampton
7694d2f473 Rework of Sylvain Defresne's patch to support multi-byte unicode
thousands separator and decimal point characters when printing
numbers.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13433 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-01 23:01:43 +00:00
Christian Stimming
1fb65d3ab5 Updated French translation by Didier Vidal
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13432 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-01 20:01:37 +00:00
Derek Atkins
6400f24335 Andrew Sackville-West's patch to add transaction links.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13431 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-01 19:14:57 +00:00
Derek Atkins
35d4341b1c Bill Nottingham's spelling fix.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13430 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-01 06:18:57 +00:00
David Hampton
0087ca8676 Collapse the common parts of the "new account" and "edit account"
dialog validation code into a single routine.  Fixes 117812.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13429 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-01 03:54:43 +00:00
David Hampton
f3a90bdefb Andreas Köhler's patch to correctly build a html color value. Fixes
328933.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13428 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-01 03:28:49 +00:00
Joshua Sled
9bf79f4cf8 Terminate GOptionEntry array, preventing warnings and/or errors parsing command-line options.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13427 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 23:13:33 +00:00
Chris Shoemaker
f32bc537d1 Make register use engine-provided xaccTransGetAccountConvRate() instead of
writing its own.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13426 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 19:57:24 +00:00
Chris Shoemaker
c0962037f6 Make register use engine-provided xaccTransGetAccountBalance() instead
of writing its own.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13425 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 19:46:19 +00:00
Chris Shoemaker
3dd5ea248e Make register use engine-provided xaccTransGetAccountAmount() instead of
writing its own.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13424 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 19:38:29 +00:00
Chris Shoemaker
66f3a0a401 Make register use engine-provided xaccTransHasReconciledSplits() instead
of writing it's own.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13423 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 19:34:42 +00:00
David Hampton
665c332ce9 Set the GNOME_DISABLE_DEPRECATED flag for gnome versions up to 2.13.7.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13422 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 16:16:04 +00:00
Neil Williams
8db1b1b476 undoing kbabel changes to po header
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13421 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 11:51:46 +00:00
Neil Williams
56edd4a41c updated en_GB translation, 3725 messages translated
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13420 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 11:40:03 +00:00
David Hampton
1fddc8d224 Remove a unused function that calls deprecated gnome routines.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13419 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 05:18:34 +00:00
David Hampton
bc68e5f8b4 Convert the reconcile window from the old GnomeUIInfo menu/toolbar
widgets to the newer GtkAction based widgets.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13418 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 02:45:36 +00:00
Joshua Sled
d46ad76a70 Bug#332802: fix Export Accounts; remove price_lookup and export functions from GncFileBackend.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13417 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 02:27:59 +00:00
Joshua Sled
83aeccb25e Bug#332804: fix infinite loop in parsing malformed functions (e.g. "ipmt(1:2:)").
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13416 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 01:26:43 +00:00
Joshua Sled
9255df9093 Bug#137885: prevent crash on invalid function formula.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13415 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-28 01:01:44 +00:00
David Hampton
d85c866635 Add 'const' qualifiers to various functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13414 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-27 23:57:16 +00:00
David Hampton
43ed443da8 Check for the existence of a page before dereferencing it. Fixes
332680.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13413 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-27 16:08:39 +00:00
Derek Atkins
b67d5a7e99 Don't need to translate placeholder labels.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13412 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-27 15:16:58 +00:00
Derek Atkins
ac4ae4e58e Rework of Titi Ala'ilima's patch to apply payments directly to invoices. (#121420)
Apply a re-work of Titi Ala'ilima's patch to apply payments
	directly to invoices.  This fixes bug #121420.
	* src/business/business-core/gncInvoice.[ch]:
	  Add argument to the ProcessPayment API to allow the caller
	  to specify an invoice to post to first.
	* src/business/business-gnome/business-gnome-utils.[ch]:
	  Create an invoice-select API that lets you select an invoice
	  based on an owner (or not).  I.e., you can limit the invoice
	  search based on a selected owner.  If you change the owner
	  it invalidates the invoice search.
	* src/business/business-gnome/dialog-payment.[ch]:
	  Change the API from ..new_with_value() to ..new_with_invoice().
	  Pull the default amount from the invoice (if one exists).
	  Allow the user to select an invoice and apply payments there.
	  If the user changes the owner, invalidate the invoice.
	* src/business/business-gnome/business-options-gnome.c:
	  use the new invoice-select API instead of calling general_search
	  API directly.
	* src/business/business-gnome/dialog-invoice.c:
	  call the new dialog-payment API.  No need to compute the initial
	  value here; the payment dialog will compute it from the invoice
	  (instead of computing it from the invoice here).
	* src/business/business-gnome/glade/payment.glade:
	  Add invoice-selector label and box.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13411 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-27 05:42:45 +00:00
David Hampton
30f415ecc0 Fix format character for a size argument.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13410 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 22:19:18 +00:00
Joshua Sled
7b7477d7c4 Andreas Kohler's patch for barchart improvements: segment color setting, axis rotation and formatting.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13409 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 21:42:06 +00:00
David Hampton
f36bb848b4 Add the ebuild script to the tarball.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13408 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 21:15:52 +00:00
David Hampton
1a38f12c05 Fix configure for the new packaging directory.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13407 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 21:15:15 +00:00
David Hampton
46238038c3 Remove old distro specific directories.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13406 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 21:10:19 +00:00
David Hampton
5a79c5dc63 Move a couple of ditro specific files.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13405 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 21:08:54 +00:00
David Hampton
66f35f8352 Create a consolidated directory for distribution specific scripts.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13404 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 21:05:21 +00:00
Joshua Sled
9496987c66 fix signature for qof changes I missed.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13403 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 20:50:14 +00:00
David Hampton
1d96f1b100 Restore GtkOptionMenu support because the newer GtkComboBox doesn't
support per item tooltips.  Fixes bug 332569.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13402 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 20:10:40 +00:00
David Hampton
f0445f9aa3 Mark a couple of function arguments as const.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13401 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 20:06:15 +00:00
Joshua Sled
7d4c8423f1 Add account-deletion handling for SXes. Bug#312730.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13400 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 19:55:17 +00:00