List view, editable renderers and popupmenus



Hi,

I've a list view which has editable renderers. Now I want to have a context sensitive menu under the right mouse button. I connected the "button-press" event to the view, so the popup is displayed. There are a few problems though. Clicking the right mouse button also makes the renderer display it's entry. And the popup is displayed before the row is selected. Since the menu's items are based on the selected row, the row must be selected before the menu is displayed.
So my question is:
How can I make sure that the right mouse button only selects the row and not turns it in edit mode? And how can I make sure that the row is selected before the menu is displayed.

I tried connecting the "button-press" event with g_signal_connect_after(), but then the menu isn't displayed at all. To determine the current row, I connected a handler to the "changed" signal of the list selection.

Thanks in advance,

Remco Poelstra



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