Adding menuitems to a GtkOptionMenu (well... GtkMenu)

Okay, i've been trying to solve this for 3 hours now, so i decided to send a msg.

First of all, i've created a GtkOptionMenu with Glade-2.
I'm trying to add an menuitem to the GtkOptionMenu.
I figured i'd have to recuperate the GtkMenu, then append a GtkMenuItem.

I'm currently trying with :

my $menuitem1 = Gtk2::MenuItem->new_with_label("Brazilian");
my $menu = $xml_root->get_widget("optionmenu_menu_lang")->get_menu;

this fails with a:
variable must be a reference to an array of Gnome UI Info Entries at ./ line 193.
line 193 is `$menu->append($menuitem1);`

inserting `print "Ref menu" . ref $menu. "\n";` after `my $menu ...` prints nothing except "Ref
Menu" and it doesn't even care about the "\n". huh !?

wut am i doing wrong ?



Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! 
Créez votre Yahoo! Mail sur

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur

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