[PATCH] Updated add/edit account window

Eskil Bylund eskil.bylund at gmail.com
Thu Jan 19 15:31:54 EST 2006


2006/1/19, Chris Shoemaker <c.shoemaker at cox.net>:
> On Thu, Jan 19, 2006 at 08:19:14PM +0100, Eskil Bylund wrote:
> > > 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.
>
> It would definitely be nice to show selection state with checkboxes.
> But it'd also be nice to use the static account types tree model.
>
> What do you think about this:?
>
> Keep the selection state private to the filterBy dialog instead of
> using a new tree model for each dialog.  You can even put that
> selection state right into a new field in the AccountFilterDialog struct.
>
> Instead of using an attribute mapping to the checkbox's treeviewcolumn
> from the new model's selection-state column, use a GtkTreeCellDataFunc
> that updates the "active" property of the GtkCellRendererToggle from
> that private selection state field.  Then the filterBy dialog can
> always use the static treemodel.
>

Yes, this is a good solution. I'll implement this right away.

To not spam the list with lots of mail, I've attached another patch
for GncTreeModelAccountTypes here. It makes the model emit the
"row_changed" signal when the selection is changed. The cell renderer
won't render properly otherwise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnucash-model-emit-row-changed.patch
Type: text/x-patch
Size: 996 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060119/f50e09d8/gnucash-model-emit-row-changed.bin


More information about the gnucash-devel mailing list