mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2002-04-16 Joshua Sled <jsled@asynchronous.org>
* src/register/ledger-core/gnc-ledger-display.c: Some template-GL
cleanup [debugging printf's removed]. Removed never-used
LD_TEMPLATE type.
* src/gnome/glade/sched-xact.glade: Removed unused start page.
* src/gnome/dialog-sxsincelast.c: Added support for using the
gnc-regWidget to display created transactions for review. Added
'Cancel' support. Didn't remove enough dead code, but started to.
* src/gnome/dialog-scheduledxaction.c: Added support for using the
gncRegWidget in the SX editor. Formatting changes.
* src/register/ledger-core/gnc-regWidget.{h,c}: Added; a
macro-widget roughly duplicating the src/gnome/window-register.c
look-and-feel-and-behavior.
* src/engine/SchedXaction.c: Added support for saving a "temporal
snapshot" of a scheduled transaction. Rewrote "sequence state"
manipulations in terms of temporal snapshots.
* src/engine/Query.c: Add support for Querying the template
AccountGroup.
* src/doc/TODO-schedxactions: Updates.
* src/engine/Makefile.am: Prepend-to instead of unconditionally
setting GUILE_LOAD_PATH when creating iso-4217-currencies.c, for
those of us that need to set it for whatever reason we need to do
so.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6795 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -72,6 +72,9 @@ struct query_s
|
||||
/* list of books that will be participating in the query */
|
||||
BookList *books;
|
||||
|
||||
/* Flag to indicate if we're searching over template-transactions, too. */
|
||||
gboolean templates_too;
|
||||
|
||||
/* cache the results so we don't have to run the whole search
|
||||
* again until it's really necessary */
|
||||
int changed;
|
||||
@@ -103,7 +106,6 @@ static int xaccValueMatchPredicate(Split * s, PredicateData * pd);
|
||||
/********************************************************************
|
||||
********************************************************************/
|
||||
|
||||
|
||||
void
|
||||
xaccQueryPrint(Query * q)
|
||||
{
|
||||
@@ -288,6 +290,14 @@ xaccQueryPrint(Query * q)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xaccQuerySearchTemplateGroup( Query *q, gboolean newState )
|
||||
{
|
||||
if (!q)
|
||||
return;
|
||||
q->templates_too = newState;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* xaccInitQuery
|
||||
@@ -328,6 +338,8 @@ xaccInitQuery(Query * q, QueryTerm * initial_term)
|
||||
q->primary_increasing = TRUE;
|
||||
q->secondary_increasing = TRUE;
|
||||
q->tertiary_increasing = TRUE;
|
||||
|
||||
q->templates_too = FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -646,6 +658,8 @@ xaccQueryCopy(Query *q)
|
||||
copy->changed = q->changed;
|
||||
copy->split_list = g_list_copy (q->split_list);
|
||||
copy->xtn_list = g_list_copy (q->xtn_list);
|
||||
|
||||
copy->templates_too = q->templates_too;
|
||||
|
||||
return copy;
|
||||
}
|
||||
@@ -1328,6 +1342,12 @@ xaccQueryGetSplits(Query * q)
|
||||
GNCBook *book = node->data;
|
||||
all_accts = g_list_concat (all_accts,
|
||||
xaccGroupGetSubAccounts (gnc_book_get_group(book)));
|
||||
/* If we're searching template accounts, then add them. */
|
||||
if ( q->templates_too ) {
|
||||
all_accts =
|
||||
g_list_concat( all_accts,
|
||||
xaccGroupGetSubAccounts( gnc_book_get_template_group(book) ) );
|
||||
}
|
||||
}
|
||||
|
||||
for (node = all_accts; node; node = node->next)
|
||||
|
||||
Reference in New Issue
Block a user