[maemo-developers] [maemo-developers] Switching between appviews ...
From: Jorge Souza sao_jorge31 at yahoo.com.brDate: Sat Jul 2 18:57:34 EEST 2005
- Previous message: [maemo-developers] Switching between appviews ...
- Next message: [maemo-developers] Switching between appviews ...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Kalle,
> > <quoted>
> >
> > gtk_container_remove(GTK_CONTAINER(appview),
> > GTK_WIDGET(label_test1));
> > gtk_container_add(GTK_CONTAINER(appview),
> > GTK_WIDGET(label_test2));
> > gtk_widget_show(GTK_WIDGET(label_test2));
> >
> > hildon_app_notify_view_changed(appview,
> label_test2);
> >
> > </quoted>
>
> The switching needs no widget juggling, the only
> thing that is
> actually reparented is the appviews, but that's an
> implementation
> detail.
Ok. I tried this approach because I've saw apps using
it as well. Again, in my case I am able to change the
widgets between my appview, but the added ones do not
appear after remove the first ones.
ps: Using the 'g_list_foreach' function , I'm able to
retrieve the widgets in the appview (in this case,
just the labels) and then its content. The switching
the performed properly, but the added widgets are not
showed :( !!
> The proper way to do this is to:
>
> 1) create an HildonApp
>
> 2) create two or more HildonAppViews
>
> 3) register other AppViews with the app:
> hildon_app_register_view (HILDON_APP (app),
> appview2);
>
> 4) set the initially visible/active appview:
> hildon_app_set_appview (HILDON_APP (app),
> appview);
>
> and you are done. Nothing else is needed (well,
> populating and showing
> the views and the app is a good idea of course). The
> point 3/4
> ordering is important it seems (this is a bug I
> think). Also note that
> the appview set with set_appview() should not be
> registered as this
> happens automatically (at least if you haven't set
> autoregistration to
> FALSE, it defaults to TRUE).
I got it. Thanks. But what I had in mind was using
just one appview aiming to save so memory as I can (in
fact, I don't know if it is a significant save :S -
probably NO, since the users won't to open many
"windows" of the same app in a embedded device. Am I
right ?!)
> The "switched_{to,from}" signals are just to notify
> your application
> that the switch is made, in case you want to do
> something special in
> your app when that happens.
Thanks very much
regards
Jorge Souza
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis.
Instale o discador agora! http://br.acesso.yahoo.com/
- Previous message: [maemo-developers] Switching between appviews ...
- Next message: [maemo-developers] Switching between appviews ...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
