Re: How to get multiple instances of a menubar using GtkUIManager
- From: Tristan Van Berkom <tvb gnome org>
- To: "Davide G. García" <neuralcrack hotmail com>
- Cc: gtk-list gnome org
- Subject: Re: How to get multiple instances of a menubar using GtkUIManager
- Date: Tue, 10 Jan 2006 11:21:24 -0500
Davide G. García wrote:
[...]
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.
gtk_ui_manager_get_widget() is returning the same widget from
the same ui every time you call it.
You can concievably:
a.) Reparent this widget in multiple places in the interface;
remember that the widget can only be viewable at one place
at a time (see the FAQ for reparenting details)
b.) Create another GtkUIManager for the same ui description;
thus creating an entirely seperate instance of your
menubar.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]