[PATCH] Remove useless members of DiveItem

Dirk Hohndel dirk at hohndel.org
Thu Apr 25 08:30:58 PDT 2013


On Thu, 2013-04-25 at 08:25 -0700, Linus Torvalds wrote:
> On Thu, Apr 25, 2013 at 8:15 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
> >
> > I'll be in the office in an hour (once I'm off this call I'll drive
> > out). Let's have coffee and I'll share some of the more brilliant
> > features of the Gtk TreeViewModel disaster with you :-)
> 
> Hey, to be fair, 

Who are you and how have you hacked Linus' email account. The real Linus
would NEVER have said something like that...

*snickers*

> I think you can do similar things in GtkTreeView by
> specifying your own renderer for each column. I don't *think* you
> necessarily have to have a 1:1 relationship between treeview columns
> and tree models. So *maybe* we could have made the tree model just
> contain the pointer to the dive (or the dive index), and not had all
> those individual fields there, and then just built up the tree view
> columns and have a renderer that looked up the data for each of them.
> 
> So the reason we did it like we did in the gtk version was that all
> the cell renderer and treeview stuff is %$#! confusing, and I started
> out without specialty renderers. I'm not sure it's the only way to do
> it, though.

IIRC the sorting doesn't work unless you have the values in the model -
but maybe that could have been fixed with additional custom sort
functions.

Still doesn't change the fun that you can't make any changes to the
model w/o causing all kinds of nightmares (iters become invalid and fun
sideeffects like this).

Well, maybe we'll run into the same crap with Qt at some point. Let's
wait and see.

/D



More information about the subsurface mailing list