Split for its amount in a commodity that is not involved in the split's
transaction. This will prevent the crash in bug #379625, but doesn't solve
the underlying problem, which is a bug in the register.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15179 57a11ea4-9604-0410-9ed3-97b8803252fd
gnc_main_window_cmd_file_quit(). The new implementation fixes two bugs -
one in each of the previous implementations.
The bug in the gnc_main_window_cmd_file_quit() code was a race condition
whereby one could quit the application without finishing pending changes in
pages. This would happen if the began a save, modified the page during the
save, and then triggered the File->Quit command before the save completed.
For the register page, this sequence was possible, even though most of the UI
controls are disabled during save.
The bug in the gnc_main_window_delete_event() code was that it didn't check
for an in-progress save before prompting the user to save a dirty book.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15169 57a11ea4-9604-0410-9ed3-97b8803252fd
Add a lock to the QofSession object, and use it in qof_session_save() to
protect against re-entrance.
The lock always starts at 1 and is 0 while inside qof_session_save().
If another call is made to qof_session_save() while one is in progress,
the lock will momentarily drop below 0 before returning to zero.
Note: The per-session nature of the lock would make it appear that we support
concurrent saving of different sessions. In fact, we do not, because the
file backend blocks the main process until the forked gzip process is
finished, and it only knows how to keep track of one child pid at a time.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15168 57a11ea4-9604-0410-9ed3-97b8803252fd
to be #f. (It helps to save all buffers before the commit.)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15061 57a11ea4-9604-0410-9ed3-97b8803252fd
In most of these cases, I know the value is always returned from C, so we
can use "null?". In cases where I wasn't sure, I make it check for either
#f or null?. Hopefully, I got 'em all. But, really, what are the chances?
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15060 57a11ea4-9604-0410-9ed3-97b8803252fd
Fix a type (missing '*') in the GncCommodityList typemap.
Re-add an incorrectly dropped (use-modules ...) statement for the wrapped
part of gnome-utils.
Remove some duplicated (use-modules ...).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15057 57a11ea4-9604-0410-9ed3-97b8803252fd
<mta@umich.edu>.
1) Since the output of (xaccTransGetSplit ...) may now be '(), check for it
with (null? ...).
2) Fix the result of a sed mis-ordering:
s/gnc:query-get-splits/qof-query-run/g
s/gnc:query-get-splits-unique-trans/xaccQueryGetSplitsUniqueTrans/g
3) Fix the result of a sed typo:
s/gnc:split-corr-account-fullname/SPLIT-CORR-ACCT-FULLNAME/g
which should've been
s/gnc:split-corr-account-fullname/SPLIT-CORR-ACCT-NAME/g
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15046 57a11ea4-9604-0410-9ed3-97b8803252fd
I think I added this function on the swig-redo branch, but it turned out
to be obsoleted by the merge because we no longer read 1.8.x state files.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15044 57a11ea4-9604-0410-9ed3-97b8803252fd
'xaccTransGetSplits' doesn't exist. It was a result of an incorrect
ordering of sed substitutions:
s/gnc:transaction-get-split/xaccTransGetSplit/g
s/gnc:transaction-get-splits/xaccTransGetSplitList/g
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15042 57a11ea4-9604-0410-9ed3-97b8803252fd
g-wrap is gone. I, for one, welcome our new swig overlords.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15024 57a11ea4-9604-0410-9ed3-97b8803252fd
Main patch by Gregory Alexander <gregalexa@gmail.com>.
On editing, interpret a blank as an unset budget value.
On reporting, show "." for unset budget values.
Add bugdet functions for testing whether a budget value is set or not,
and for unsetting it.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15009 57a11ea4-9604-0410-9ed3-97b8803252fd
aren't correctly marked as pending. This bug is probably responsible for
the crashes like those in bug #348469.
In general, the register makes it very difficult to consistently
distiguish between beginning to edit a transaction that's being edited
in another register and beginning to edit the blank transaction,
which is already open for editing, but isn't marked pending so that
we can pretend it hasn't been opened if it never gets modified.
Fortunately, the auto-completion code only runs on the blank transaction,
so we can assume it's not being edited in another register. This patch
goes ahead and marks the blank transaction as pending.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15004 57a11ea4-9604-0410-9ed3-97b8803252fd
when it is modified. This fixes a bug where editing the blank transaction,
moving off of the transaction line to a split line, leaving the split line
unedited and then closing the register will incorrectly leave the
transaction open without asking.
The bug fixed by this commit is possibly responsible for some of the
crashes like bug #348469.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15002 57a11ea4-9604-0410-9ed3-97b8803252fd
the close signal. This callback doesn't handle aborting correctly when called
directly, but it will behave correctly when called indirectly from
close_handler(). The "response" callback will now be called for all actions
that close the dialog.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14927 57a11ea4-9604-0410-9ed3-97b8803252fd
conflict with the real gtk+ version of the same file, depending on the
linking order of libgncmod-gnome-utils.so and the gtk+ libraries.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14709 57a11ea4-9604-0410-9ed3-97b8803252fd
the Split could have the Account pointer is if it had already been added to
the Account.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14614 57a11ea4-9604-0410-9ed3-97b8803252fd
The important change is missing "test" in chunk 730,7.
The others fix the (theoretical) problem of a null variable disappearing,
leading to
bash: test: =: unary operator expected
And also, added
AC_MSG_NOTICE([Ignore error message "./po/POTFILES.in: No such file or
directory." if it occurrs.])
Patch by "Archimedes Submerged" <archimerged@gmail.com>
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14497 57a11ea4-9604-0410-9ed3-97b8803252fd
In any case where we might be opening the transaction and marking it as the
pending transaction, check first if it's already open. If it is, we assume
that it's being edited by another register. We report the error and abort
the action that would have opened the transaction.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14495 57a11ea4-9604-0410-9ed3-97b8803252fd
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