visibility problems
- From: Matthias Clasen <maclas gmx de>
- To: gtk-devel-list gnome org
- Subject: visibility problems
- Date: 19 Sep 2003 21:43:28 +0200
I met a minor annoyance with the action-based menus. The constructed
menus do regularly contain invisible items (unused tearoff menu items,
proxies of actions whose visible property is set to FALSE, or smart
separators which have gone invisible). Therefore code like the following
gtk_ui_manager_add_ui_from_file (ui, "ui.xml", NULL);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_ui_manager_get_widget (merge, "/menubar"),
FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show_all (window);
doesn't quite work as intended: It makes all the invisible menu items
visible.
I see two options to improve the situation:
a) Make all constructed menuitems compound children of their menus. This
should make gtk_widget_show_all() keep out of the constructed hierarchy,
but also prevents the use of gtk_container_foreach() on the constructed
menus.
b) Document this trap and live with it.
Opinions ?
Regards, Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]