mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Avoid calculation of account period total for the top level account.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13595 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
5fd25c0154
commit
b39a0305fc
@ -1,3 +1,8 @@
|
|||||||
|
2006-03-11 Andreas Köhler <andi5.py@gmx.net>
|
||||||
|
|
||||||
|
* src/gnome-utils/gnc-tree-view-account.c: Avoid calculation of
|
||||||
|
account period total for the top level account.
|
||||||
|
|
||||||
2006-03-10 David Hampton <hampton@employees.org>
|
2006-03-10 David Hampton <hampton@employees.org>
|
||||||
|
|
||||||
* src/gnome-utils/gnc-main-window.c: Walk through the list of
|
* src/gnome-utils/gnc-main-window.c: Walk through the list of
|
||||||
|
@ -70,6 +70,8 @@ static gboolean gnc_tree_view_account_filter_helper (GtkTreeModel *model,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
|
static Account *gtva_get_top_level_from_model (GtkTreeModel *s_model);
|
||||||
|
|
||||||
static void gtva_setup_column_renderer_edited_cb(GncTreeViewAccount *account_view,
|
static void gtva_setup_column_renderer_edited_cb(GncTreeViewAccount *account_view,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
GtkCellRenderer *renderer,
|
GtkCellRenderer *renderer,
|
||||||
@ -370,6 +372,12 @@ cdf_period(GtkTreeViewColumn *col, GtkCellRenderer *cell,
|
|||||||
g_return_if_fail(GTK_TREE_MODEL_SORT(s_model));
|
g_return_if_fail(GTK_TREE_MODEL_SORT(s_model));
|
||||||
|
|
||||||
acct = gnc_tree_view_account_get_account_from_iter(s_model, iter);
|
acct = gnc_tree_view_account_get_account_from_iter(s_model, iter);
|
||||||
|
|
||||||
|
if (acct == gtva_get_top_level_from_model(s_model)) {
|
||||||
|
g_object_set(cell, "text", "", NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
t1 = gnc_accounting_period_fiscal_start();
|
t1 = gnc_accounting_period_fiscal_start();
|
||||||
t2 = gnc_accounting_period_fiscal_end();
|
t2 = gnc_accounting_period_fiscal_end();
|
||||||
|
|
||||||
@ -889,6 +897,19 @@ gnc_tree_view_account_filter_by_type_selection(Account* acct, gpointer data)
|
|||||||
/* Account Tree View Get/Set Functions */
|
/* Account Tree View Get/Set Functions */
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
|
||||||
|
static Account *
|
||||||
|
gtva_get_top_level_from_model (GtkTreeModel *s_model)
|
||||||
|
{
|
||||||
|
GtkTreeModel *model, *f_model;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GTK_TREE_MODEL_SORT (s_model), NULL);
|
||||||
|
|
||||||
|
f_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (s_model));
|
||||||
|
model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (f_model));
|
||||||
|
|
||||||
|
return gnc_tree_model_account_get_toplevel (GNC_TREE_MODEL_ACCOUNT (model));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the account associated with the top level pseudo-account for
|
* Return the account associated with the top level pseudo-account for
|
||||||
* the tree.
|
* the tree.
|
||||||
@ -896,15 +917,12 @@ gnc_tree_view_account_filter_by_type_selection(Account* acct, gpointer data)
|
|||||||
Account *
|
Account *
|
||||||
gnc_tree_view_account_get_top_level (GncTreeViewAccount *view)
|
gnc_tree_view_account_get_top_level (GncTreeViewAccount *view)
|
||||||
{
|
{
|
||||||
GtkTreeModel *model, *f_model, *s_model;
|
GtkTreeModel *s_model;
|
||||||
|
|
||||||
g_return_val_if_fail(GNC_IS_TREE_VIEW_ACCOUNT(view), NULL);
|
g_return_val_if_fail (GNC_IS_TREE_VIEW_ACCOUNT (view), NULL);
|
||||||
|
s_model = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
|
||||||
|
|
||||||
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
return gtva_get_top_level_from_model (s_model);
|
||||||
f_model = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(s_model));
|
|
||||||
model = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(f_model));
|
|
||||||
|
|
||||||
return gnc_tree_model_account_get_toplevel (GNC_TREE_MODEL_ACCOUNT(model));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user