[maemo-developers] [maemo-developers] the app exit when close one appviews
From: Kalle Vahlman kalle.vahlman at gmail.comDate: Mon Nov 14 11:49:26 EET 2005
- Previous message: [maemo-developers] the app exit when close one appviews
- Next message: [maemo-developers] Nokia N90 vs. 770, PAN, Keyboards etc...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2005/11/14, wang baisheng <bswang at redflag-linux.com>: > 在 2005年11月14日 星期一 15:01,Kalle Vahlman 写道: > > 2005/11/14, wang baisheng <bswang at redflag-linux.com>: > > > Hi, > > > I create an HildonApp with several HildonAppViews, but why the > > > app exit and close all appviews when I close one appviews? > > > > Because you close it from the "x" most probably, and that "belongs" to > > the HildonApp. HildonAppViews are not windows, but different views > > that can be "embedded" in a window and switched to with the task > > navigator or programmatically. > > > > You can work around it by listening to the delete-event of the > > HildonAppview and only quitting if it is your "main" view that is > > visible. > > How can I close some appviews ? You can't, that's the point. But you can make them vanish with two methods depending on what you want: * unregister them, makes the view vanish from the task navigator * remove them from the appview, implies the above The first one keeps the view inside the HildonApp, so you can simply register() it again to make it visible in the task navigator again. Example: If you want to make the cross to look like the appview was closed, do a signal connect for the HildonApp's "delete-event" signal and in the callback check if the appview you want to "close" is active (hildon_app_get_appview() gives the currently visible one), hildon_app_unregister_view() or just removing it from the HildonApp with gtk_container_remove() will make the view vanish from the task navigator. Return FALSE from the callback when you really want to quit, and TRUE when you just remove the AppView. Disclaimer: I haven't tested this, but it "should" work -- Kalle Vahlman, zuh at iki.fi Powered by http://movial.fi
- Previous message: [maemo-developers] the app exit when close one appviews
- Next message: [maemo-developers] Nokia N90 vs. 770, PAN, Keyboards etc...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]