gnucash maint: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Tue Dec 23 21:51:56 EST 2014
Updated via https://github.com/Gnucash/gnucash/commit/3ae0c780 (commit)
via https://github.com/Gnucash/gnucash/commit/e2a85c41 (commit)
via https://github.com/Gnucash/gnucash/commit/778f9450 (commit)
from https://github.com/Gnucash/gnucash/commit/c52ada51 (commit)
commit 3ae0c780b7280adba3b886f1e864d3b95207fc6e
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Dec 23 09:01:18 2014 -0800
Extract function to clarify intent.
diff --git a/src/engine/Transaction.c b/src/engine/Transaction.c
index 178d84a..d90a47c 100644
--- a/src/engine/Transaction.c
+++ b/src/engine/Transaction.c
@@ -2236,14 +2236,25 @@ xaccTransGetReadOnly (const Transaction *trans)
trans->inst.kvp_data, TRANS_READ_ONLY_REASON) : NULL;
}
+static gboolean
+xaccTransIsSXTemplate (const Transaction * trans)
+{
+ Split *split0 = xaccTransGetSplit (trans, 0);
+ if (split0 != NULL)
+ {
+ KvpFrame *split_frame = xaccSplitGetSlots (split0);
+ if (kvp_frame_get_frame(split_frame, GNC_SX_ID))
+ return TRUE;
+ }
+ return FALSE;
+}
+
gboolean xaccTransIsReadonlyByPostedDate(const Transaction *trans)
{
GDate *threshold_date;
GDate trans_date;
const QofBook *book = xaccTransGetBook (trans);
gboolean result;
- KvpFrame *split_frame;
- Split *split0;
g_assert(trans);
if (!qof_book_uses_autoreadonly(book))
@@ -2251,13 +2262,8 @@ gboolean xaccTransIsReadonlyByPostedDate(const Transaction *trans)
return FALSE;
}
- split0 = xaccTransGetSplit (trans, 0);
- if (split0 != NULL)
- {
- split_frame = xaccSplitGetSlots (split0);
- if (kvp_frame_get_frame(split_frame, GNC_SX_ID))
- return FALSE;
- }
+ if (xaccTransIsSXTemplate (trans))
+ return FALSE;
threshold_date = qof_book_get_autoreadonly_gdate(book);
g_assert(threshold_date); // ok because we checked uses_autoreadonly before
commit e2a85c417fc3cf8d29f9a54e8a9340219af2601e
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Dec 22 14:19:52 2014 -0800
Bug 741228 - "Red line" threshold applies to Template scheduled transactions
Check for a GNC_SX_ID kvp on the split to exclude SX transactions from being blocked.
diff --git a/src/engine/Transaction.c b/src/engine/Transaction.c
index 2df9f84..178d84a 100644
--- a/src/engine/Transaction.c
+++ b/src/engine/Transaction.c
@@ -58,7 +58,7 @@ struct timeval
#include "gnc-lot.h"
#include "gnc-event.h"
#include <gnc-gdate-utils.h>
-
+#include "SchedXAction.h"
#include "qofbackend-p.h"
/* Notes about xaccTransBeginEdit(), xaccTransCommitEdit(), and
@@ -2242,6 +2242,8 @@ gboolean xaccTransIsReadonlyByPostedDate(const Transaction *trans)
GDate trans_date;
const QofBook *book = xaccTransGetBook (trans);
gboolean result;
+ KvpFrame *split_frame;
+ Split *split0;
g_assert(trans);
if (!qof_book_uses_autoreadonly(book))
@@ -2249,6 +2251,14 @@ gboolean xaccTransIsReadonlyByPostedDate(const Transaction *trans)
return FALSE;
}
+ split0 = xaccTransGetSplit (trans, 0);
+ if (split0 != NULL)
+ {
+ split_frame = xaccSplitGetSlots (split0);
+ if (kvp_frame_get_frame(split_frame, GNC_SX_ID))
+ return FALSE;
+ }
+
threshold_date = qof_book_get_autoreadonly_gdate(book);
g_assert(threshold_date); // ok because we checked uses_autoreadonly before
trans_date = xaccTransGetDatePostedGDate(trans);
commit 778f9450c4a14dc5337f27924b258b105d0ffdad
Author: Mike Alexander <mta at umich.edu>
Date: Wed Dec 10 19:16:09 2014 -0500
Tell Guile (and others) to look in install/lib/gnucash for libraries.
Without this Guile can't find libgncmod-engine and GnuCash won't start.
I don't know how this worked before, perhaps because the correct path
was in src/bin/overrides/gnucash-env.in
diff --git a/src/bin/environment.in b/src/bin/environment.in
index a4393ae..01c04ee 100644
--- a/src/bin/environment.in
+++ b/src/bin/environment.in
@@ -1,3 +1,8 @@
+ at -NOTE If you make any changes here, you should probably -@
+ at -NOTE also change the equivalent sections in: -@
+ at -NOTE - src/bin/overrides/gnucash-env.in -@
+ at -NOTE Check as well that modifications performed in -@
+ at -NOTE - gnucash-on-windows.git:gnucash.iss don't conflict. -@
# environment
#
# This configuration file can be used to change/add environment variables
Summary of changes:
src/bin/environment.in | 5 +++++
src/engine/Transaction.c | 18 +++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list