Re: gtk_connect_signal_object HELP PLEASE !



>  gtk_signal_connect(GTK_OBJECT(drawing_area)
>                    ,"motion_notify_event"
>                    ,(GtkSignalFunc) motion_notify_event
>                    ,NULL);

OK, so motion_notify_event will be called with the drawing area as the
first GtkWidget argument.

>Here's where I connect the statusbar with the motion
>event of the drawing_area.
>
>  gtk_signal_connect_object(GTK_OBJECT (status_bar)
>                           ,"motion_notify_event"
>                           ,(GtkSignalFunc) motion_notify_event
>                           ,GTK_OBJECT (drawing_area));

OK, motion notify will be called with the status bar as the first
GtkWidget argument, and the drawing area supplied as an third argument
after the event argument.

Whoa - how do you propose to distinguish those two cases ?

>static gint motion_notify_event( GtkWidget *widget
>                                 ,GdkEventMotion *event 
>                                )
     .				 
     .
     .				 

>    gtk_statusbar_remove(GTK_STATUSBAR(widget)

No! You don't know that `widget' is a statusbar, because you're using
the same callback to handle the same event for two different widgets.

You seem quite confused about what you're doing here. What is it that
you want to accomplish ?

--p




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