Re: TreeView: cell-changed signal?

murrayc t-online de (Murray Cumming) writes:

> On Wed, 2002-03-27 at 22:38, Jonathan Blandford wrote:
> > murrayc t-online de (Murray Cumming) writes:
> > 
> > > I'm reposting this here because I didn't get any reply in gtk-list:
> > 
> > gtk-app-devel-list is more appropriate.
> > 
> > > I'm using a GtkTreeView, with a GtkListStore model. There is a
> > > GtkTreeModel "row_changed" signal, but I can't see how to detect when a
> > > particular column of a row has changed. I suppose I could store a copy
> > > of all the data and do a comparison, but that would be silly.
> > 
> > What do you mean by column_changed?  Do you mean a GtkTreeViewColumn has
> > been added or removed?  There's a GtkTreeView::column_changed signal for
> > that.  What are you trying to do?
> No, I mean a user action. For instance, if I have a list of products, I
> might want to know that the price of a particular product has changed,
> rather than just knowing that _something_ about a particular product has
> changed. I expected the row_changed signal to provide a column number as
> well as TreeIter.

It doesn't do that.  This was a specific design decision to not require
deltas or column numbers.  The reason is that there's no way to know
what the old values where anyway, so knowing the column that changed
isn't necessarily useful unless you store the old values.  Also, the
GtkTreeView widget can't use this information at all, so it's nicer for
model authors to not have to provide it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]