Commit Graph

9384 Commits

Author SHA1 Message Date
Joshua Sled
59d42b32e3 Fix selection mode for SX lists.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13475 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 16:28:52 +00:00
Joshua Sled
3d82efeee6 whitespace
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13474 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 16:28:33 +00:00
Joshua Sled
a707a02fb1 Add, register, use Split and Transfer icons provided by Andrew Duggan. Bug#327647.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13473 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 15:51:28 +00:00
Joshua Sled
7fb61dae86 Fixes to memory deallocation suggested by Phil Longstaff.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13472 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 15:50:20 +00:00
Chris Shoemaker
9a65cc1cc6 When the book is shutting down, don't be so eager to destroy the whole
transaction.  This makes it easier to safely iterate over a split list.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13471 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 06:56:27 +00:00
David Hampton
8090e0ee3c Update the preferences dialog to allow any unicode character as the
separator.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13470 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 06:49:23 +00:00
Chris Shoemaker
803e157ed6 Destroy Transactions without rebalancing when shutting down the book.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13469 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 05:10:15 +00:00
Chris Shoemaker
d0f3042d8f Generate REMOVE events when a Split is removed from a Transaction.
Pass the *old* parent transaction (since the Split may be moving into 
   a new transaction) and the old index of the Split in the old Transaction's
   list of Splits.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13468 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 03:21:34 +00:00
David Hampton
22ee7eb47f Convert the account separator from a single character to a character
string.  This allows multibyte unicode characters to be the account
separator character. Fixes 333061.  Reworked a couple of routines that
pull account names into their component parts.  Also fixed a bug in
the new account dialog when creating multiple accounts at once.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13467 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 03:04:46 +00:00
Chris Shoemaker
7921695276 Look for orphan Splits even when there is no Transaction imbalance.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13466 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 02:42:49 +00:00
Chris Shoemaker
10138bb1d3 Delete unused dialog-exchange.h
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13465 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:27:38 +00:00
Chris Shoemaker
cfe743fd8e Remove an unnecessary Account edit-block.
Minor control-flow simplification.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13464 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-04 00:23:07 +00:00
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