[gcompris-devel] help needed in event handling
bruno
bruno.coudoin at free.fr
Sat Feb 15 14:09:02 UTC 2003
What happen is that each time you call colors_create_item(), you do a:
gtk_signal_connect(GTK_OBJECT(gcomprisBoard->canvas), "event",
(GtkSignalFunc) item_event, NULL);
and thus assign another time the callback !!
This command should be done once in your case.
What I don't unnderstant it's why it's no more called when we quit the
boards ?
Bruno.
Le sam 15/02/2003 à 18:16, pgeorges a écrit :
> I noticed a bug in the advanced colors board : when clicking once,
> several events are sometimes generated.
> I put something like :
>
> switch (event->type)
> {
> case GDK_BUTTON_PRESS:
> printf("GDK_BUTTON_PRESS\n");
>
> and when clicking once, I often get 2 prints of "GDK_BUTTON_PRESS".
> The event is connected by the following code :
> gtk_signal_connect(GTK_OBJECT(gcomprisBoard->canvas), "event",
> (GtkSignalFunc) item_event, NULL);
>
> as the board is initialized mainly by setting the background of the canvas.
> Does anyone has an idea ?
>
> Pascal
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> gcompris-devel mailing list
> gcompris-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gcompris-devel
>
More information about the Gcompris-devel
mailing list