[maemo-developers] [maemo-developers] Home applet questions

From: Johan Bilien jobi at via.ecp.fr
Date: Wed Jan 31 21:46:12 EET 2007
On Wed, Jan 31, 2007, Christoph Würstle wrote:
> thanks for your answer. It works now. Looks really good now. Cool!

Nice :)

> To the second question (hope it is now understandable ;-) ):
> When hildon_home_applet_lib_foreground() is called  I update my GUI
> (cheking the events,  birthdays,  todos). This needs about 1-3 seconds
> (the contacts search (for birthdays) needs most of the time). This long
> the home-screen (eg. the other applets) hangs and you just see gray
> rectangles. So I thought put the gui updating (including events, todo,
> birthday readings) in another process or so. In Java/Python I would
> start a new thread creating the gui. How should I solve this issue in c?

You need to keep the Glib main loop running so the UI is updated. I
don't know the GPE PIM API but if it has asynchronous calls for data
retrieval you should use these ones instead.

You can use threads in C too but that shall be the last resort.

> And then a third question:
> At hildon_home_applet_lib_deinitialize() I should free all allocated
> mem. Is it enough to free the main widget (called frame in your example)
> to free all gtk related stuff, eg.
>     if (osso)
>         osso_deinitialize (osso);
>     if (frame) gtk_widget_destroy(frame); //frame is the main widget
>     frame=NULL;

Yes that should do. GTK will free the child widgets as they are no
longer referrenced.

More information about the maemo-developers mailing list