View Single Post
  #3 (permalink)  
Old January 31st, 2006
Hyper-kun Hyper-kun is offline
flame-retardant
 
Join Date: November 22nd, 2005
Posts: 196
Hyper-kun is a great assister to others; your light through the dark tunnel
Default

You shouldn't be using GTK+ 1.2 anymore. It's old and deprecated. Some distros even consider removing it completely. For newly-written software use GTK+ 2.0 instead.
GTK+ 1.2 really has no concept of a cursor in a CTree so you have to keep track of the last selected row manually and use that when you receive the "clicked" signal. With GTK+ 2.0 you can simply check the current cursor position in a GtkTreeView and also connected to the "cursor-changed" signal.

You can then fetch the node data and modify the current context popup menu or select the appropriate one from a set.
The nodes themselves don't receive any signal. You could manually delegate the signal to an object stored in the node of course, if you prefer it that way.
Reply With Quote