mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
minor typos & one minor bug fix
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3693 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
92052c5433
commit
d82930c38a
@ -27,6 +27,7 @@
|
||||
#include "Backend.h"
|
||||
#include "BackendP.h"
|
||||
#include "Group.h"
|
||||
#include "GroupP.h"
|
||||
#include "gnc-book.h"
|
||||
#include "gnc-commodity.h"
|
||||
#include "gnc-engine.h"
|
||||
@ -803,6 +804,7 @@ pgendCopyTransactionToEngine (PGBackend *be, GUID *trans_guid)
|
||||
gboolean do_set_guid=FALSE;
|
||||
int engine_data_is_newer = 0;
|
||||
int i, j, nrows;
|
||||
int save_state = 1;
|
||||
GList *node, *db_splits=NULL, *engine_splits, *delete_splits=NULL;
|
||||
|
||||
ENTER ("be=%p", be);
|
||||
@ -1018,7 +1020,9 @@ pgendCopyTransactionToEngine (PGBackend *be, GUID *trans_guid)
|
||||
xaccAccountBeginEdit (acc);
|
||||
previous_acc = acc;
|
||||
}
|
||||
if (acc->parent) save_state = acc->parent->saved;
|
||||
xaccAccountInsertSplit(acc, s);
|
||||
if (acc->parent) acc->parent->saved = save_state;
|
||||
|
||||
/* finally tally them up; we use this below to
|
||||
* clean out deleted splits */
|
||||
@ -1267,12 +1271,19 @@ static int
|
||||
pgend_account_commit_edit (Backend * bend,
|
||||
Account * acct)
|
||||
{
|
||||
AccountGroup *parent;
|
||||
char *p;
|
||||
PGBackend *be = (PGBackend *)bend;
|
||||
|
||||
ENTER ("be=%p, acct=%p", be, acct);
|
||||
if (!be || !acct) return 1; /* hack alert hardcode literal */
|
||||
if (FALSE == acct->core_dirty) return 0;
|
||||
|
||||
if (FALSE == acct->core_dirty)
|
||||
{
|
||||
parent = xaccAccountGetParent(acct);
|
||||
if (parent) parent->saved = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* lock it up so that we query and store atomically */
|
||||
/* its not at all clear to me that this isn't rife with deadlocks. */
|
||||
@ -1326,7 +1337,8 @@ PWARN(" account data in engine is newer\n"
|
||||
* is too liberal, and could screw up synchronization if we've lost
|
||||
* contact with the back end at some point. So hack alert -- fix
|
||||
* this. */
|
||||
xaccGroupMarkSaved (xaccAccountGetParent(acct));
|
||||
parent = xaccAccountGetParent(acct);
|
||||
if (parent) parent->saved = 1;
|
||||
LEAVE ("commited");
|
||||
return 0;
|
||||
}
|
||||
@ -1474,11 +1486,11 @@ pgendSync (Backend *bend, AccountGroup *grp)
|
||||
pgendStoreGroup (be, grp);
|
||||
pgendStoreAllTransactions (be, grp);
|
||||
|
||||
if ((MODE_SINGLE_FILE != be->session_mode) &&
|
||||
(MODE_SINGLE_UPDATE != be->session_mode))
|
||||
{
|
||||
pgendGroupRecomputeAllCheckpoints (be, grp);
|
||||
}
|
||||
/* although the book may be open in 'single-user' mode right now,
|
||||
* it might be opened in multi-user mode next time. Thus, update
|
||||
* the account balance checkpoints just in case.
|
||||
*/
|
||||
pgendGroupRecomputeAllCheckpoints (be, grp);
|
||||
|
||||
/* don't send events to GUI, don't accept callaback to backend */
|
||||
gnc_engine_suspend_events();
|
||||
|
@ -97,8 +97,7 @@ Core bugs/features that still need work:
|
||||
-- Implement GUI to ask user for username/password to log onto the
|
||||
server.
|
||||
|
||||
-- bug: during exit, it asks 'do you want to save', when this
|
||||
isn't/shouldn't be needed
|
||||
-- add support for rlb's price db
|
||||
|
||||
-- error code should include strings passed back, to be shown in
|
||||
gui dialogs. This is because the backen needs to return things
|
||||
@ -125,14 +124,22 @@ Core bugs/features that still need work:
|
||||
as to what this is about. For the first pass, this is not a
|
||||
serious issue; its a 'nice to have' thing.
|
||||
|
||||
-- during open of register window, a query of splits is typically run
|
||||
twice (once during open -- LedgerDisplayInternal(), and again
|
||||
during LedgerDisplayRefresh()) this results in twice as much data
|
||||
to the sql backend as needed. This is a performance issue,
|
||||
should someday be fixed.
|
||||
|
||||
-- during transaction edit, query of splits is run twice --
|
||||
once during edit recordCB()->xaccSRSaveRegEntry(), and again
|
||||
recordCB()->xaccSRRedrawReg(). As above, this is performance
|
||||
problem waiting to aggrevate.
|
||||
|
||||
|
||||
To Be Done, Part II
|
||||
-------------------
|
||||
This list only affects the multi-user and advanced/optional features.
|
||||
|
||||
-- saving as single-user, then re-opening in multi-user mains missing
|
||||
checkpoints, and thus no balances.
|
||||
|
||||
-- checkpoint ending balance is showing up as starting balance
|
||||
|
||||
-- transaction rollbck is 'incorrect'; sort of ?? since we should
|
||||
|
@ -70,8 +70,8 @@ pgendAccountRecomputeAllCheckpoints (PGBackend *be, const GUID *acct_guid)
|
||||
* the checkpoints. (hack alert -verify that this is the correct
|
||||
* lock) */
|
||||
p = "BEGIN WORK; "
|
||||
"LOCK TABLE gncEntry IN SHARE MODE; "
|
||||
"LOCK TABLE gncCheckpoint IN ACCESS EXCLUSIVE MODE; ";
|
||||
"LOCK TABLE gncCheckpoint IN ACCESS EXCLUSIVE MODE; "
|
||||
"LOCK TABLE gncEntry IN SHARE MODE; ";
|
||||
SEND_QUERY (be,p, );
|
||||
FINISH_QUERY(be->connection);
|
||||
|
||||
@ -302,7 +302,7 @@ pgendGroupGetAllCheckpoints (PGBackend *be, AccountGroup*grp)
|
||||
gnc_numeric cleared_baln;
|
||||
gnc_numeric reconciled_baln;
|
||||
|
||||
/* setupwhat we will match for */
|
||||
/* setup what we will match for */
|
||||
acc = (Account *) node->data;
|
||||
com = xaccAccountGetCommodity(acc);
|
||||
chk.commodity = gnc_commodity_get_unique_name(com);
|
||||
|
@ -171,10 +171,8 @@ sqlQuery_build (sqlQuery*sq, Query *q)
|
||||
max_rows = xaccQueryGetMaxSplits (q);
|
||||
if (0 <= max_rows)
|
||||
{
|
||||
char buff[30];
|
||||
snprintf (buff, 30, "%d", max_rows);
|
||||
sq->pq = stpcpy(sq->pq, " LIMIT ");
|
||||
sq->pq = stpcpy(sq->pq, buff);
|
||||
sq->pq += snprintf (sq->pq, 30, "%d", max_rows);
|
||||
}
|
||||
|
||||
sq->pq = stpcpy(sq->pq, ";");
|
||||
|
Loading…
Reference in New Issue
Block a user