[Freeciv-Dev] Re: a plenty of bugs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 20 Jun 2002, Raimar Falke wrote:
> On Fri, Jun 14, 2002 at 02:15:29AM +0200, Sylvain Tricot wrote:
> > the following callback functions for "button_release_event" and
> > "button_press_event" events
> >
> > gtk_signal_connect(GTK_OBJECT(pdialog->present_unit_boxes[i]),
> > "button_release_event",
> > GTK_SIGNAL_FUNC(p_units_middle_callback), (gpointer)punit->id);
> >
> >
> > has different signatures:
> >
> > gui-gtk/mapctrl.c ("button_release_event")
> > static gint popit_button_release(GtkWidget *w, GdkEventButton *event)
> >
> > gui-gtk/mapctrl.c ("button_press_event")
> > gint butt_down_overviewcanvas(GtkWidget *w, GdkEventButton *ev)
> >
> > gui-gtk/citydlg.c ("button_release_event")
> > gint p_units_middle_callback(GtkWidget *w, GdkEventButton *ev, gpointer
> > data)
> >
> > gui-gtk/dialogs.c ("button_press_event")
> > void taxrates_callback( GtkWidget *w, GdkEventButton *event, gpointer data )
> >
> >
> > and so on.
> >
> > PS: it's OK but bad code :8(
>
> Mike, Vasco?
The first 3 signatures should have no problem. The taxrates_callback()
signature may cause random SIGSEGVs.
This is the correct signature IIRC:
gint callback(GtkWidget *w, GdkEventButton *ev, gpointer data);
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
|
|