[PATCH] Updated add/edit account window

Eskil Bylund eskil.bylund at gmail.com
Thu Jan 19 14:19:14 EST 2006


2006/1/19, Chris Shoemaker <c.shoemaker at cox.net>:
> On Thu, Jan 19, 2006 at 07:21:49PM +0100, Eskil Bylund wrote:
> > While we're at GncTreeModelAccountTypes, there are some other changes
> > I would like to make.
> > 1. Remove gnc_tree_model_account_types_get/set_selection, which
> > handles the selection of a GtkTreeView.
>
> They are used by the account page and the budget page.
>
The account page and budget page use the GncTreeViewAccount, which
provides the Filter dialog. I've changed it to create a separate
model, since it needs to display all possible account types and handle
the selection state using the model. (That's what the selection state
column is there for, right?)

Also, see the other patch I sent in which remove some account
filtering code from the budget page, which is not needed anymore...

> > 2. Rename gnc_tree_model_account_types_get/set_selected to
> > _get/set_visible and change GNC_TREE_MODEL_ACCOUNT_TYPES_COL_SELECTED
> > to GNC_TREE_MODEL_ACCOUNT_TYPES_COL_VISIBLE.
>
> Hmmm... I'm not sure I follow...
>
Sorry, my mistake. This should be kept as it was.

> >
> > This is to change the Filter By dialog to use a checkbox for selection
> > of account types, instead of using the selection of the tree view.
> > (I.e. make it similar to the Visible columns in Nautilus).
> > To see why this is wanted, try and select some visible types in the
> > current filter dialog using only your keyboard or mouse. It's
> > difficult, not to say impossible.
> >
> > I'll have a patch ready soon. It'll probably make more sense then my
> > attempt to explain above...
> >
> > Anyone got any comments on this?
>
> Only that the static tree model probably shouldn't contain selection
> state.  It might be shared by multiple views that want different
> selections.
>
No, of course. See above.

> Maybe that's why you wanted to provide the treemodel as an argument?
> So you could filter the non-static treemodels?
>
Yes. Currently there are no non-static treemodels that will be
filtered, but I added it just in case.

To summarize above: I would like to remove the GtkTreeView specific
functions from the model and make the Filter dialog use its own model
for storing selection state.



More information about the gnucash-devel mailing list