Hey, Kalle.

One thing I've found a bit awkward with multiple AppViews is that they have separate menu bars.

While this makes sense in porting existing X11 applications (separate bar per window) it works badly with Mac OS X based menu ideology (the app only has one, central, menubar). The ability to declare a common menu for all the appviews would, in my opinion, be a Very Nice Thing. Multiple menus in small, portable apps, may even be regarded as overly complex usability-wise, I think.

Yours,
- asko kauppi


Kalle Vahlman kirjoitti 2.7.2005 kello 9.15:

On 7/2/05, Jorge Souza <[EMAIL PROTECTED]> wrote:

Hi all,

I wonder if someone could help me with a relative
newbie question. Actually, I'm not able to make the
switch between two 'hildonappviews' work properly.


That's because you are using them improperly ;)


What I am trying to do is basically build two
different HildonAppView with some widgets in them, and
switching between these appviews using the hildon
environment task navigator (with the mouse/stylus).


It's easy!


Following is the code that handles this switching
(inside the "switch_to" signal callback):

<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.

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).

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.


Am I missing something !? What am I doing wrong ?!


You just confused appview with app, I think.

<hint for documentation people>
There really should be a tutorial with multiple appviews on maemo.org.
</hint for documentation people>


ps: if this is not the correct mail list to make
question like mine, could you point me the right one
!?


This is just the right one, another place to ask is the IRC-channel
#maemo on freenode.

--
Kalle Vahlman, [EMAIL PROTECTED]
_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers


_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to