popup menu strange error



Hi,

I have a menu on main window like:

Gnome-Termimal-> Terminal-> Change Profile-> Radio Menu

I want detach "Radio Menu" from main menu and attach it to a popup menu item "Profile" (and inverse too)

And so I made:

********************
********************

gtk_menu_detach (GTK_MENU(radio_menu));

popup-menu = gtk_menu_new ();

menuitem = gtk_menu_item_new_with_label ("Profiles");
	
gtk_menu_shell_append (GTK_MENU_SHELL (popup-menu), menuitem);
	
gtk_menu_attach_to_widget (GTK_MENU(radio_menu), menuitem, detacher);

********************
********************

and "detacher" function:

void 
detacher (GtkWidget *attach_widget, GtkMenu *menu)
{
	gtk_menu_detach (GTK_MENU(attach_widget)); /* menuitem */
	gtk_menu_item_set_submenu (GTK_MENU_ITEM (main_menu_change_profile), radio_menu);
}

but it doesn't work (radio menu not appears in popup and main menu)
Have you any idea??

Thanks
Giulio
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Audio, Video, HI-FI...oltre 2.000 prodotti di alta qualità a prezzi da sogno solo su Visualdream.it 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2954&d=13-11



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]