[maemo-developers] [maemo-developers] Sharing menuitem between differents Pageviews ...

From: Jorge Souza sao_jorge31 at yahoo.com.br
Date: Sun Jul 10 00:01:50 EEST 2005
Any advices on this issue ? :'(

regards

> Hi all,
> 
> In my app , I would like to share some specific
> menuItems between all the registered pageviews. So
> I've created a global menuItem variable, aiming to
> append it to the menu of each pageview.
> 
> So, after the creation of each pageview, I've tried
> to
> get its menu and than append my global menuItem. The
> following quoted code ilustrates my intentions:
> 
> <quoted>
> 
> GtkMenu *mainMenu = NULL;
> 
> // get main menu pointer
> mainMenu =
>
GTK_MENU(hildon_appview_get_menu(current_page_view));
>     
> // appeding the global Window menu
> gtk_menu_shell_append(GTK_MENU_SHELL(mainMenu),
> gMenuWindowMenuItem);
> 
> </quoted>
> 
> When I append the global menuItem to the first
> apgeview (at the fisrt time, of course), every thing
> works properly. But when I try a second time, I get:
> 
> (app_test:19338): Gtk-WARNING **: Can't set a parent
> on widget which has a parent
> 
> at runtime. So, it is complaining that my menuItem
> already has a parent (in this case, the parent is
> the
> former page_view's menu). Is there a way to juggle
> this situation ?! How can I share menuItem between
> different page_views ?!
> 
> regards
> 
> JS
> 
> -- Jorge Souza
> Embedded Linux App Developer
> 
> __________________________________________________
> Converse com seus amigos em tempo real com o Yahoo!
> Messenger 
> http://br.download.yahoo.com/messenger/ 
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://maemo.org/mailman/listinfo/maemo-developers
> 


-- Jorge Souza
Embedded Linux App Developer


	
	
		
_______________________________________________________ 
Yahoo! Acesso Grátis - Internet rápida e grátis. 
Instale o discador agora! http://br.acesso.yahoo.com/

More information about the maemo-developers mailing list