Re: [Setup-tool-hackers] pixbuf signals



On 9 May 2002, Carlos Garnacho wrote:

> 	Does somebody know how to include a "clicked" signal (or something like
> this) in a gtkcellrendererpixbuf? There must be a way, but I don't find
> it.
>
> 	I was trying to have a table with tristate pixmaps (start,stop,do
> nothing), but when I tried to connect a signal to change the pixmaps
> (and the states) I realized that there isn't anyone. I was so near... :(

The ECell, which is parent of ECellPixbuf has an "event" signal. You can
bind to that and get a GdKEvent on the callback. Then check if the
event.type is GDK_BUTTON_RELEASE, and if so, cast to a GdkEventButton
(GdkEvents are a union of several GdkEvent* types; check gdkevent.h) and
see if that's button 1. That should be enough.

Arturo



_______________________________________________
setup-tool-hackers maillist  -  setup-tool-hackers@ximian.com
http://lists.ximian.com/mailman/listinfo/setup-tool-hackers



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