[PATCH] Updated add/edit account window
Chris Shoemaker
c.shoemaker at cox.net
Mon Jan 16 11:59:08 EST 2006
On Mon, Jan 16, 2006 at 11:30:49AM -0500, Derek Atkins wrote:
> Chris,
>
> Quoting Chris Shoemaker <c.shoemaker at cox.net>:
>
> >Hello Eskil,
> >
> > Instead of creating and populating a GtkListStore for the Account
> >types, could you please use the pre-made GtkTreeModel offered by
> >gnc-tree-model-account-types.[ch]? (Preferrably "Method 1".) That
> >way, you don't have to worry about life-cycle issues for the
> >ListStore. You can still use the GtkComboBox and if you need
> >convenience routines for managing the account-type selection state of
> >the combo box, then it's okay to add them to
> >gnc-tree-model-account-types.
>
> Is there some way to make the account-type model such that it will not
> allow the user to select type "currency" -- but if an account is already
> type currency it will properly display it (and not force the user to
> change it)?
Probably. Something like: wrap the treemodel in a treemodelfilter,
set the filter function to a function that returns (iter_type &&
(view_mask || old_type)) where:
iter_type: is the account type of the current iter (it would be
easiest to do this inside gnc-tree-model-account-types in order to
access the iter directly.)
view_mask: a mask of account types that you want always be visible
for that view.
old_type: the type that you want to be visible even if it isn't in
the mask.
That's just off-the-cuff. There are probably other ways to do it.
Is that what Eskil needs for dialog-account.c?
-chris
More information about the gnucash-devel
mailing list