[maemo-developers] [maemo-developers] Home applet questions
From: Christoph Würstle chris at axique.deDate: Wed Jan 31 21:10:31 EET 2007
- Previous message: [maemo-developers] Home applet questions
- Next message: [maemo-developers] Home applet questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
thanks for your answer. It works now. Looks really good now. Cool!
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?
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;
(by the way I do nowhere use malloc.)
Sorry for the beginner questions.
Thanks in advance,
Chris
Johan Bilien wrote:
> On Wed, 2007-01-31 at 08:52 +0100, Christoph Würstle wrote:
>
>> Hi,
>>
>> I wrote a small home applet (showing gpe todos and appointments).
>> It works nice, but I have two issues:
>>
>> 1. how can I get the right themed border (in standard theme the blue one)
>>
>
> Try something like this:
>
> frame = gtk_frame_new (NULL);
> gtk_widget_set_name (frame, "osso-speeddial");
> gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
>
> alignment = gtk_alignment_new (0.5,
> 0.5,
> 1.0,
> 1.0);
>
> gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 15, 15, 15, 15);
>
> gtk_container_add (GTK_CONTAINER (alignment), yourwidget);
>
> This will put yourwidget in a frame themed like the speeddial applet.
>
>
>> 2. and a very basic question: what's the simplest way to gt the ui
>> updating (new buttons/labes/etc) at hildon_home_applet_lib_foreground in
>> a background process (I'm new to c programming)
>>
>
> Sorry I didn't get you, do you want to trigger an update of the UI from
> another process? If so you could use DBus for instance.
>
> BR
> Johan.
>
>
>
- Previous message: [maemo-developers] Home applet questions
- Next message: [maemo-developers] Home applet questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
