I see, that makes sense.

As far as Why:


This interface is on a product that only has a keyboard -no mouse or 
mouse-like-thing. 

The menu featuring a treeview needs to let the user select any column in the 
header so they can sort the rows but when they are moving through rows, I only 
want them to be able to focus the two leftmost columns (there are five total).  

So, I need to be able to test on key press if they are past the second column 
in a row, and prevent them from moving farther right, but if they are in the 
header, they can move all the way.

I was trying to accomplish this by testing to see if focus is in the header or 
on a row, but I've been stymied at every turn. 

Most of this pain is from having a mouse-less system and very strict 
requirements :)


thanks!
Paul
________________________________________
From: Tadej Borovšak [[email protected]]
Sent: Thursday, June 10, 2010 1:11 PM
To: Paul Stuart
Cc: [email protected]
Subject: Re: GtkTreeView Path Ambiguity (Header vs First Row )

Hi.

> It turns out that it isn't so much returning a path of "0" for the header, 
> it's returning the last valid path the treeview had. For instance, if I am on 
> the fourth row, if I move my focus up to the header and call
> gtk_tree_view_get_cursor, path is returned as "4". Not sure why it doesn't 
> set path to NULL.

Path returned by this function will only be NULL if nothing is
selected in tree view. If you select fourth row and then click the
header, 4th row is still selected.

> All I'm really after is a way to tell if the focus is in the header or on one 
> of the rows, so if there is a clean way to do that I'd love to know.

I'm not sure if this can be done easily. If you describe why you need
to determine this, someone may be able to offer some advice on
alternatives.

Tadej

--
Tadej Borovšak
tadeboro.blogspot.com
[email protected]
[email protected]
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to