AUDIT: r17623 - gnucash/trunk/src/register/ledger-core - Register: Add a couple of missing calls to functions that use gnc_suspend_gui_refresh() so that they cannot exit without calling gnc_resume_gui_refresh(). Also add a gnc_suspend_gui_refresh()/gnc_resume_gui_refresh() pair around a commit that was missing it.
Charles Day
cedayiv at cvs.gnucash.org
Sun Oct 12 12:51:54 EDT 2008
Author: cedayiv
Date: 2008-10-12 12:51:54 -0400 (Sun, 12 Oct 2008)
New Revision: 17623
Trac: http://svn.gnucash.org/trac/changeset/17623
Modified:
gnucash/trunk/src/register/ledger-core/split-register.c
Log:
Register: Add a couple of missing calls to functions that use gnc_suspend_gui_refresh() so that they cannot exit without calling gnc_resume_gui_refresh(). Also add a gnc_suspend_gui_refresh()/gnc_resume_gui_refresh() pair around a commit that was missing it.
This partially fixes bug #393383 and bug #426111, as it resolves the problem of being unable to enter new transactions after the message box appears. (The message box should still not appear in the first place, however.)
BP
Modified: gnucash/trunk/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.c 2008-10-06 20:27:24 UTC (rev 17622)
+++ gnucash/trunk/src/register/ledger-core/split-register.c 2008-10-12 16:51:54 UTC (rev 17623)
@@ -847,8 +847,10 @@
g_assert(xaccTransIsOpen(trans));
} else {
g_assert(!pending_trans);
- if (gnc_split_register_begin_edit_or_warn(info, trans))
- return;
+ if (gnc_split_register_begin_edit_or_warn(info, trans)) {
+ gnc_resume_gui_refresh ();
+ return;
+ }
}
xaccSplitDestroy (split);
@@ -1018,8 +1020,10 @@
trans = xaccSplitGetParent(split);
if (!pending) {
- if (gnc_split_register_begin_edit_or_warn(info, trans))
- return;
+ if (gnc_split_register_begin_edit_or_warn(info, trans)) {
+ gnc_resume_gui_refresh ();
+ return;
+ }
} else if (pending == trans) {
g_assert(xaccTransIsOpen(trans));
} else g_assert_not_reached();
@@ -1333,6 +1337,8 @@
if (!xaccTransIsOpen(trans))
return FALSE;
+ gnc_suspend_gui_refresh ();
+
if (trans == blank_trans) {
blank_edited = info->blank_split_edited;
info->last_date_entered = xaccTransGetDate (trans);
@@ -1351,6 +1357,8 @@
xaccTransCommitEdit(trans);
}
+ gnc_resume_gui_refresh ();
+
return TRUE;
}
@@ -1382,8 +1390,11 @@
if (xaccTransIsOpen (pending_trans)) {
g_warning("Impossible? commiting pending %p", pending_trans);
xaccTransCommitEdit (pending_trans);
- } else if (pending_trans)
+ } else if (pending_trans) {
+ g_critical("BUG DETECTED! pending transaction (%p) not open",
+ pending_trans);
g_assert_not_reached();
+ }
if (trans == blank_trans) {
/* Don't begin editing the blank trans, because it's
More information about the gnucash-changes
mailing list