void recordActivate(GtkTreeView *treeview, GtkTreePath *arg1, GtkTreeViewColumn *arg2, gpointer *hdrList)
{ // called when record double-clicked
char *row;
int rowNum;
row = gtk_tree_path_to_string(arg1);
rowNum = atoi(row);
g_free(row);
}
richard
On 5/9/07, David Nečas (Yeti) <yeti@xxxxxxxxxxxxxxx> wrote:
On Wed, May 09, 2007 at 01:38:04PM -0400, tj wrote:
> >
> Ok, so how do I get the row number, from GtkTreePath,
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeModel.html#gtk-tree-path-get-indices
In general, the path is not a single number as it can
represent paths in trees too. If you have a list, the path
consists of only one index though: the row number.
> from
> GtkTreeRowReference?
By converting it to GtkTreePath and continuing as above.
If you are not going to remove, move, ..., the selected
nodes, it is often easier to use gtk_tree_selection_selected_foreach().
> Where is it one of those. In fact, where are their
> struct defs? I look in /usr/include/gtk+-2.0 and All I find is thhe type
> def to it preceded by the '_'. But, no struct definition of
> _GtkTreeRowReference, etc.
Thou shalt not meddle with the internal representation.
Yeti
--
http://gwyddion.net/
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list