[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    model view idea and GtkTreeView
From:       Robert Roebling <robert () roebling ! de>
Date:       2006-02-27 11:44:31
Message-ID: 1141040671.4528.36.camel () localhost
[Download RAW message or body]


  Hi all,

I have been beginning to use GtkTreeView with my
own model under the assumption that it would be
possible to change the data in one place (the
model) and the possibly several views would get
to know about it and update themselves. Indeed,
although the official API reference [1] doesn't
say much (well, it's a reference), there are a
number of tutorial, some of which [2] also seem
to assume that changing the model (setting a value
in the model) would make the views update the cells.
This is not the case. Looking at the code, there
are a few callbacks which can be invoked. The one
that looks the most like the right one could be
gtk_tree_model_row_changed() [3], but that only
checks if the size of the cell has changed, it
does not necessarily update the cell if only the
contents has changed. The is confirmed quickly
if you look at the code [4] where no redraw call
is made. 
I'm posting this to see if I have overlooked 
something obvious. Furthermore, there also
doesn't seem to be any API I could call for
each GtkTreeView (associated with a model) if
a model has changed.
Could someone confirm (or better correct) my
observation?

Thanks,

  Robert


[1] http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html
[2] http://liw.iki.fi/liw/texts/gtktreeview-tutorial.html
[3] http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeModel.html
	#gtk-tree-model-row-changed
[4] http://cvs.gnome.org/viewcvs/gtk%2B/gtk/gtktreeview.c?
	rev=1.518&view=markup  (search for "row_changed")

_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic