[maemo-developers] [maemo-developers] g_signal_connect and "show" signal not working in hildon applications (Maemo 1.1)?

From: Luca Donaggio donaggio at gmail.com
Date: Tue Jan 17 09:52:33 EET 2006
2006/1/16, Lassi Syrjälä <lassis at cc.jyu.fi>:
>
>
> Luca Donaggio kirjoitti 16.1.2006 kello 17.09:
>
> > It seems that the following doesn't work:
> >
> > [code]
> >
> > g_signal_connect (G_OBJECT (main), "show",
> >                     G_CALLBACK (on_main_create),
> >                     NULL);
> >
> >
> > [/end code]
>
> Hi,
>
> I'd assume it works, but only if you connect the handler before
> showing the widget. "Show" is anyway not the most useful of signals,
> since it's synchronously and only ever emitted when you
> gtk_widget_show (main). In this case, it probably gains you nothing,
> since you could as well write:
>
> gtk_widget_show (main);
> on_main_create (main, NULL);
>
> Instead, you could try something like:
>
> g_signal_connect_after (main, "map", G_CALLBACK (on_main_create), NULL);
>
> If that does not do the trick, adding a low priority idle function
> with a return value of FALSE might help.
>
> BR,
> Lassi
>
>

Thanks a lot Lassi, g_signal_connect_after() works smoothly!

Luca Donaggio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20060117/34fe74cb/attachment.htm 
More information about the maemo-developers mailing list