mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
deprecate xaccAccountCountSplits with include_children = TRUE
where xaccAccountCountSplits is called including children, call gnc_account_and_descendants_empty intead
This commit is contained in:
parent
e6486e9d95
commit
5c06f7f8c0
@ -2046,7 +2046,7 @@ gnc_plugin_page_account_tree_filter_accounts (Account *account,
|
|||||||
|
|
||||||
if (!fd->show_unused)
|
if (!fd->show_unused)
|
||||||
{
|
{
|
||||||
if (xaccAccountCountSplits(account, TRUE) == 0)
|
if (gnc_account_and_descendants_empty(account))
|
||||||
{
|
{
|
||||||
LEAVE(" hide: unused");
|
LEAVE(" hide: unused");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -189,7 +189,7 @@ fill_model (GtkTreeModel *model, Account *account)
|
|||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gchar *fullname = gnc_account_get_full_name (account);
|
gchar *fullname = gnc_account_get_full_name (account);
|
||||||
gint splits = xaccAccountCountSplits (account, TRUE);
|
gboolean acc_empty = gnc_account_and_descendants_empty (account);
|
||||||
gnc_numeric total = xaccAccountGetBalanceInCurrency (account, NULL, TRUE);
|
gnc_numeric total = xaccAccountGetBalanceInCurrency (account, NULL, TRUE);
|
||||||
|
|
||||||
PINFO("Add to Store: Account '%s'", fullname);
|
PINFO("Add to Store: Account '%s'", fullname);
|
||||||
@ -200,7 +200,7 @@ fill_model (GtkTreeModel *model, Account *account)
|
|||||||
ACC_FULL_NAME, fullname, ACCOUNT, account,
|
ACC_FULL_NAME, fullname, ACCOUNT, account,
|
||||||
PLACE_HOLDER, (xaccAccountGetPlaceholder (account) == TRUE ? "emblem-default" : NULL),
|
PLACE_HOLDER, (xaccAccountGetPlaceholder (account) == TRUE ? "emblem-default" : NULL),
|
||||||
HIDDEN, (xaccAccountGetHidden (account) == TRUE ? "emblem-default" : NULL),
|
HIDDEN, (xaccAccountGetHidden (account) == TRUE ? "emblem-default" : NULL),
|
||||||
NOT_USED, (splits == 0 ? "emblem-default" : NULL),
|
NOT_USED, (acc_empty ? "emblem-default" : NULL),
|
||||||
BAL_ZERO, (gnc_numeric_zero_p (total) == TRUE ? "emblem-default" : NULL),
|
BAL_ZERO, (gnc_numeric_zero_p (total) == TRUE ? "emblem-default" : NULL),
|
||||||
TAX, (xaccAccountGetTaxRelated (account) == TRUE ? "emblem-default" : NULL), -1);
|
TAX, (xaccAccountGetTaxRelated (account) == TRUE ? "emblem-default" : NULL), -1);
|
||||||
g_free (fullname);
|
g_free (fullname);
|
||||||
|
Loading…
Reference in New Issue
Block a user