This also strips trailing whitespaces from lines where they existed.
This re-indentation was done using astyle-1.24 using the following options:
astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18788 57a11ea4-9604-0410-9ed3-97b8803252fd
Patch by Klee Dienes <klee@mit.edu>
* src/engine/Account.c (xaccAccountRemoveLot): Generate a
QOF_EVENT_REMOVE for the lot and QOF_EVENT_MODIFY for the account.
(xaccAccountInsertLot): Ditto, but QOF_EVENT_ADD.
* src/engine/gnc-lot.c (gnc_lot_make_default): Move from
cap-gains.c.
* src/engine/gnc-lot.h (gnc_lot_make_default): Add prototype.
* src/engine/cap-gains.c (MakeDefaultLot): Move to gnc-lot.c as
gnc_lot_make_default().
* src/gnome/lot-viewer.c: Add code to support lot creation:
(RESPONSE_NEW_LOT): Add enumerated value.
(lv_save_current_row): New function.
(lv_select_row): Add call to lv_save_current_row.
(lv_unselect_row): Use lv_save_current_row.
(lv_close_handler): Use lv_save_current_row.
(lv_response_cb): Handle RESPONSE_NEW_LOT.
(gnc_lot_viewer_dialog): Watch for QOF_EVENT_ADD and
QOF_EVENT_REMOVE for lots.
* src/gnome/glade/lots.glade: Add "new lot" button.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16725 57a11ea4-9604-0410-9ed3-97b8803252fd
harness to actually get the checks to pass with r16690.
This was an overflow in the test harness.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16716 57a11ea4-9604-0410-9ed3-97b8803252fd
Timespec uses a signed integer for the seconds instead of an unsigned.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16619 57a11ea4-9604-0410-9ed3-97b8803252fd
private data structure, with access to them as properties of the
object.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15921 57a11ea4-9604-0410-9ed3-97b8803252fd
data structure, with access to them as properties of the object.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15891 57a11ea4-9604-0410-9ed3-97b8803252fd
point directly to their parent and have a simple GList of children.
(The old method was alternating data structures in the form Account,
AccountGroup, Account, AccountGroup, etc.)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15647 57a11ea4-9604-0410-9ed3-97b8803252fd
sometimes gets an error because it generates an amount that can't be
represented with the denominator it has chosen, but there's not much
gnucash can do about that. From #342153.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14122 57a11ea4-9604-0410-9ed3-97b8803252fd
cap-gains.c to Transaction.c.
Fix a logic error where "split->gains |= ~GAINS_STATUS_ADIRTY" was supposed
to be "split->gains &= ~GAINS_STATUS_ADIRTY".
Disable the loop-restart code in xaccTransScrubGainsDate() because I think
the state changes inside the loop will never cause a previously-skipped
Split to be not skipped during another pass.
Incidental:
make both xaccTransFindSplitByAccount() arguments 'const'
Internalize Begin/Commit edit block into xaccTransScrubSplits()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13921 57a11ea4-9604-0410-9ed3-97b8803252fd
same day. Needed since the transaction sorting code may sort gains
splits after other splits on the same day. Add a new function to find
the source split associated with a capital gains split. Also use
lot_amount and lot_value consistently instead of opening_amount and
opening_value.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13887 57a11ea4-9604-0410-9ed3-97b8803252fd
splits when computing capital gain's instead of just the opening lot.
Scrub lots when scrubbing everything else. Some MacOs X fixes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13872 57a11ea4-9604-0410-9ed3-97b8803252fd
Let QofInstance manage the book pointer and kvp frame instead of Split
managing its own.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13131 57a11ea4-9604-0410-9ed3-97b8803252fd
glib supplied gi18n.h file. Replace includes of gnome.h with gtk.h
(or better yet glib.h) wherever possible. Don't include gnome.h from
any header files. Remove some extraneous includes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11981 57a11ea4-9604-0410-9ed3-97b8803252fd
-- re-order math to make overflow less like to occur
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10131 57a11ea4-9604-0410-9ed3-97b8803252fd
audit the math usage,
tweak the scrub routines to get rid of the no-root error message
(some debugging printfs remain, which I'll remove later)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10117 57a11ea4-9604-0410-9ed3-97b8803252fd
The net total of this work is (i beleive) fewer lines of code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9530 57a11ea4-9604-0410-9ed3-97b8803252fd
-- numerous fixes to make cap-gains work
-- crude ideas about a generic constraints system to keep data in engine
correct.
After these changes, all known cap-gains bugs are fixed, and most cap-gains
features are done. Have at it.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9378 57a11ea4-9604-0410-9ed3-97b8803252fd
new code that recalculates lots (incl. cap gains)
to be used if the value of any split in the lot changes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9341 57a11ea4-9604-0410-9ed3-97b8803252fd
consisting primarily of enhance KVP functionality, including
better support for lists of values, and the implementation
of a 'bag' for holding collection of (un-named) data.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9317 57a11ea4-9604-0410-9ed3-97b8803252fd
remove some obsolete functions
wrap amount/value geters so that gains can be auto-computed
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9248 57a11ea4-9604-0410-9ed3-97b8803252fd