gnc-tree-model-account-types

Chris Shoemaker c.shoemaker at cox.net
Tue Feb 15 19:25:25 EST 2005


On Tue, Feb 15, 2005 at 06:44:52PM -0500, David Hampton wrote:
> 
> > Therefore, I'm also thinking about some design modifications along the
> > lines of:
> > 
> >   1) make a function that returns a static
> > gnc_tree_model_account_types, since it would never change at runtime
> > and then all views could share the same model.
> 
> Agreed. There's no need to ever have more than one model here.
> 
> >   2) make some helpers that map between bitmasks of account types and
> > gtk_tree_selections
> > 
> > I think that would nicely handle the case where I want to allow a
> > selection of a subset of all account types.  AFAICS, the only reason
> > to allow multiple instances of the model is to allow views that rely
> > on a variable model column to display selection state in some custom
> > manner.  I'm thinking of something like a column of checkboxes.
> 
> They should still share the same mode.  This is where you would add an
> filter model between the tree and the gnc_tree_model_account_type.

But the filter can't control the state of the checkboxes, can it?  I'm
imagining a two column tree view where all of the account types are
visible (not filtered, right?) and the second column contains
checkboxes where only some of the boxes are checked.  That means every
view that wants to display a different selection needs it's own model,
right?  If not, I don't really know what the SELECTED column is for.
Maybe we should just remove it?

-chris




More information about the gnucash-devel mailing list