How to get multiple instances of a menubar using GtkUIManager



Hi,

I'm developing a program which consists on a parent window, that makes operations like Save All, and Quit, and child windows that have a menubar to operate on its contents, just like The GIMP, for example.

Now what I want to know is if I can get multiple instances of the same menubar. I mean, using the same menubar definition. I've tried using gtk_ui_manager_get_widget() several times, but I ran into problems.

When I create a child window, get the menubar with gtk_ui_manager_get_widget(), and put it in a table row inside the child window, it happens that in the first window created, it works, but on the next ones, it gives a warning when I do a gtk_table_attach(). Something like:

gtk_table_attach(): GTK assertion failed: child->parent == NULL

(I'm not pretty sure of it, because I'm not at home right now, sorry. I'll post some code when I get home, if you guys need it.)

I thought that it was a bug: may the widget get orphan by some strange thing.
I tried to reparent it using gtk_window_reparent(), but doesn't work at all.

How can I make it work?

Thanks in advance.

_________________________________________________________________
Un amor, una aventura, compañía para un viaje. Regístrate gratis en MSN Amor & Amistad. http://match.msn.es/match/mt.cfm?pg=channel&tcid=162349




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