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

Re: g_signal_connect



On Sun, 15 Jun 2008 19:40:22 +0100 Carlos Pereira wrote:

> For the sake of elegance, which version people like more?
> 
> 1) g_signal_connect (widget, "signal",
> G_CALLBACK (callback), data);

I think this was the "intended" use -- the first param is of type
gpointer so you don't have to use a cast macro like in #2.

> 2) g_signal_connect (G_OBJECT (widget), "signal",
> G_CALLBACK (callback), data);

... but out of (probably stupid) habit, I tend to use this one most of
the time...

> 3) g_signal_connect (GTK_OBJECT (widget), "signal",
> G_CALLBACK (callback), data);

Definitely not this one...  *waves arms* GtkObject doesn't exist! *waves
arms*

	-brian


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