Fixes Bug #344870, which was a regression caused by r11892.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14373 57a11ea4-9604-0410-9ed3-97b8803252fd
(*) Might also do strange things to the register, esp. cursor motion.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14345 57a11ea4-9604-0410-9ed3-97b8803252fd
1) Invalidate outstanding iterators when a row is inserted or deleted.
2) Emit row_changed for ancestors of inserted or deleted row.
New) Emit row_changed for ancestors of a changed account, too.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14285 57a11ea4-9604-0410-9ed3-97b8803252fd
Use the same icon for the window manager as for the desktop.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14276 57a11ea4-9604-0410-9ed3-97b8803252fd
Patch supplied by Stanislav Brabec <sbrabec@suse.cz>.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14251 57a11ea4-9604-0410-9ed3-97b8803252fd
gnc-engine.c to gnucash-bin.c. This allows tests that call
gnc_engine_init() but fail to find a backend to still pass.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14232 57a11ea4-9604-0410-9ed3-97b8803252fd
"Possible values for this setting are the name of any column in this
dialog (see the column_order key) or the keyword 'none'."
The third click on a column header removes the sorting by that column.
This patch will now store 'none' for the sort_column in that case.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14213 57a11ea4-9604-0410-9ed3-97b8803252fd
fallback sort column, since column 0 may not be sortable with the
default sort function.
Set the MODEL_COLUMN column property, even when it is -1, since
gnc_tree_view_set_sort_column() looks for this condition.
Make the gnc_tree_view_count_visible_columns() function only count regular
columns, so that the special columns don't count, but count any
DEFAULT_VISIBLE columns, even if they've been hidden by gconf. That way,
the special columns will still show and allow the user to unhide columns.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14212 57a11ea4-9604-0410-9ed3-97b8803252fd
Hopefully this will solve the problem Macs are having dlopen'ing them.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14210 57a11ea4-9604-0410-9ed3-97b8803252fd
_before_ the qsf backend, because the qsf backend prints some noisy error
messages while figuring out that the gnucash file isn't a qsf file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14199 57a11ea4-9604-0410-9ed3-97b8803252fd
This includes the now semi-functional postgres backend.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14198 57a11ea4-9604-0410-9ed3-97b8803252fd
Guile 1.8 automatically shares strings as copy-on-write and no longer
provides the "make-shared-substring" procedure.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14159 57a11ea4-9604-0410-9ed3-97b8803252fd
tree-view columns. There is now a per-column setting, "DEFAULT_VISIBLE",
similar to "ALWAYS_VISIBLE", that controls the visibility of a column in
the absence of, or prior to, gconf management.
It is no longer necessary for the tree view to store a list of column names
for default visible columns.
To faciliate the adaptation of pre-existing tree-views, the
view_column_find_by_name() has been publicized as
gnc_tree_view_find_column_by_name().
All callers of gnc_tree_view_configure_columns() have been converted to use
the DEFAULT_VISIBLE column property.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14037 57a11ea4-9604-0410-9ed3-97b8803252fd
that all datum portions of case-statement clauses be unique. The syntax:
'foo expands to a list of two symbols: (quote foo)
If both 'foo and 'bar are used, then the "quote" symbol won't be unique.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14034 57a11ea4-9604-0410-9ed3-97b8803252fd
When handling the focus-out event for a GtkCellEditable, it's important
not to keep the editable alive for too long, because the cursor-blink
timeout expects that the editable still has the focus. The easiest way to
do this is to stop the editing immediately by calling
gtk_cell_editable_editing_done() and then handle all the real work from
the "editing-done" signal handler.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14027 57a11ea4-9604-0410-9ed3-97b8803252fd
dirtying the book implicitly without setting any time of first change.
Instead, make sure that committed Splits dirty their parent Transaction.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13958 57a11ea4-9604-0410-9ed3-97b8803252fd
committed at least once in its lifecycle. Then, we can mark the collection
dirty whenever an object is committed, except for the special case of an
QofInstance that has never been committed before and is now being deleted.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13957 57a11ea4-9604-0410-9ed3-97b8803252fd
macro version), in case we ever want qof_commit_edit() to actually do
something with a backend.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13956 57a11ea4-9604-0410-9ed3-97b8803252fd
instead of qof_backend_run_begin().
Minor cleanups of qof_commit_edit() and qof_begin_edit().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13955 57a11ea4-9604-0410-9ed3-97b8803252fd
a cloned Split to the Lot. Make sure to remove the Split from the Lot when
deleting a Split. (This prevents use-after-free by test-lots.) Add some
comments to some strange code that's possibly wrong.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13922 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
Add new function xaccTransGetReversedBy() to find the reversing transaction
if there is one.
This also ensures that the KVP changes are inside a Begin/Commit block.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13916 57a11ea4-9604-0410-9ed3-97b8803252fd
effect immediately by commiting the transaction if it's open.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13883 57a11ea4-9604-0410-9ed3-97b8803252fd
added to the Account if their open Transaction is commited.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13874 57a11ea4-9604-0410-9ed3-97b8803252fd
Early exit the budget keynav function on no-op case.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13864 57a11ea4-9604-0410-9ed3-97b8803252fd
For the autofill in basic-ledger mode, avoid an extra BeginCommit.
For "remove all splits from the transaction" case, also avoid a potential
extra BeginCommit. Also, fix a bug where one split might have not been
removed if this operation was performed in a register other than the one
where the transaction was created.
Make sure that whenever we actually do commit the pending transaction, we
clear the stored GUID *before* the commit, since it may be checked again
from the register's refresh event handler.
In other news, I haven't seen the orphan splits recently...
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13863 57a11ea4-9604-0410-9ed3-97b8803252fd
Simplify the control flow around the code in gnc_split_register_save() that
decides what transactions to commit and when. Be sure to commit the
blank transaction even when it's not the pending transaction. Refresh the
register after transaction rollback.
Add more assertions that will either fail in some case I haven't tested or
prove that more register code is unreachable.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13844 57a11ea4-9604-0410-9ed3-97b8803252fd
When saving the register state, don't commit an open transaction unless
we think it was opened from this register.
These changes are intended to fix bug #327780. I've also added several
related assertions. If any of these assertions fail, it may indicate that
I don't really understand what's going on, and that this may not be the
correct fix for #327780.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13834 57a11ea4-9604-0410-9ed3-97b8803252fd
transactional.
Convert some Split function calls to the xaccSplit... form.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13833 57a11ea4-9604-0410-9ed3-97b8803252fd
This is what I actually intended in r13130, but we want the stuff that
xaccTransCommitEdit provides over-and-above what qof_commit_edit provides.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13830 57a11ea4-9604-0410-9ed3-97b8803252fd
Instead, call gnc:accountlist-get-comm-balance-at-date when we really just
want the balance at one date.
This fixes the retained-earnings calculation on the balance sheet report.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13790 57a11ea4-9604-0410-9ed3-97b8803252fd
Split un-destruction) and Split re-parenting.
All these actions now generate ITEM-REMOVED or ITEM-ADDED events for
related Transactions (as appropriate).
Minor: allow xaccSplitSetParent() to accept a NULL argument in order to use
it in the rollback-newly-created-split case.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13767 57a11ea4-9604-0410-9ed3-97b8803252fd
Enable emission of some new Split events.
Use xaccSplitRollbackEdit() in implementation of xaccTransRollbackEdit().
Avoid rollback of Splits not owned by the Transaction. This was actually
impossible to encounter, but the algorithm is now correct even for some
cases that aren't permitted by other code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13766 57a11ea4-9604-0410-9ed3-97b8803252fd
Fixes random crashes demonstrated by test-xml-commodities.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13737 57a11ea4-9604-0410-9ed3-97b8803252fd
Use shorter strings for commodity mnemonics.
Ensure that test splits amount and value have the same sign.
Avoid numerical overflow in rate calculation when generating test splits.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13718 57a11ea4-9604-0410-9ed3-97b8803252fd
choose which reports (if any) to open. If the user cancels the dialog,
no reports are opened, otherwise, for each report, they are asked whether
or not they want to open it. However, if there are less than 4 reports
the dialog is skipped and the reports are just opened. Closes bug#335188.
Note: if someone implements a solution that opened only precisely the
reports that were left open in 1.8.x, it's fine to remove this extra code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13694 57a11ea4-9604-0410-9ed3-97b8803252fd
dialog-transfer.c. Added a warning to find more bugs like this one.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13607 57a11ea4-9604-0410-9ed3-97b8803252fd
the group, but delay the nulling of the account's group pointer until after
the generation of the remove event. That way, the tree model can verify
that the removed account's root is the same as the root for the model.
Also, in the model's event handler, check that accounts are in the same book
as the model is for.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13601 57a11ea4-9604-0410-9ed3-97b8803252fd
is different than that of setenv(). Also, convert last remaining uses of
setenv() to g_setenv().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13594 57a11ea4-9604-0410-9ed3-97b8803252fd
This isolates the amount-to-value conversion algorithm from the register.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13576 57a11ea4-9604-0410-9ed3-97b8803252fd
This happens already in xaccAccountCommitEdit() and if the Account isn't
being edited, then we inserted the Split in sorted order anyway.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13498 57a11ea4-9604-0410-9ed3-97b8803252fd