Re: clist/ctree (was Re: The menu-editor...)



John Ellis <johne@bellatlantic.net> writes:

> James Henstridge wrote:
> >You can pick up right (and middle) button presses with the
> >button_press_event signal.  From that you can get the (x,y) coordinates of
> >the press, and use this function:
> >  gtk_clist_get_selection_info(clist, x, y, &row, &col);
> >
> >Then you have the row and column in the list that were clicked, and which
> >button was pressed.  There is probably a similar function for the ctree.
> 
> This is what I was originally doing, but a button press 'leaks through' the
> scroll bars in CTree. When the scroll bar was dragged, the button press was
> detected and an unwanted row would be selected. So, I changed to detecting the
> "select_row" signal.
> 
> It's funny, I have an app that uses GTK 1.0.5 and the clist returns the 2nd & 3rd
> buttons fine on the "select row" signal. But when I re-compile using the devel GTK,
> those buttons are no longer detected. Is this intentional?

The same thing happened to me with GICQ, where I needed to use the
third button.  I rewrote it to use button_press_event and
get_selection_info.  Testing now, I also see that the scrollbars
leak.  This is a problem that needs fixing.

-- 
David Kågedal        <davidk@lysator.liu.se> http://www.lysator.liu.se/~davidk/



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