Re: TreeView selection and button-press-event interaction



Hey, I've found a solution! Posting here for completeness.

On 04/07/2008, Rui Tiago Cação Matos <tiagomatos gmail com> wrote:
>  The eel_gtk_tree_view_set_activate_on_sigle_click () sets an handler
>  for event->button == 1 while the bookmarks_button_press_event_cb () is
>  for event->button == 3. In other words, nautilus doesn't activate the
>  treeview item when right clicking. It just "somehow" selects the item
>  and still gets the button-press-event *after* the item is already
>  selected.

It turns out that it's really easy to get the model path from where
the button press occurred and then select that path. This way the
selection 'changed' callback is called and updates the popup menu
contents before the actual call to display the menu.

Still, that's not the way nautilus does it.

Cheers,
Rui


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