After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142377 - overflow menu shown even when empty
overflow menu shown even when empty
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkToolbar
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-05-11 21:47 UTC by Christian Persch
Modified: 2011-02-04 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Persch 2004-05-11 21:47:02 UTC
In the presence of tool items without overflow menu items (set to NULL with
gtk_tool_item_set_proxy_menu_item), the overflow menu can end up empty, but is
nevertheless shown (as a tiny square) when clicking the arrow.

To see this, use for example epiphany: move the favicon drag handle to the first
toolbar to the right using the toolbar editor, then narrow the window so just
this item disappears.
Comment 1 Soren Sandmann Pedersen 2004-06-04 10:57:32 UTC
It's not clear what to do instead. The arrow serves also as an indicator that
there are more items. The best thing is probably to make an empty menu come up
with a grayed out menu item saying "Empty".
Comment 2 Soren Sandmann Pedersen 2004-06-05 18:11:04 UTC
I decided to just not show the arrow in that case. That's what we do for most
other widgets when they are allocated smaller then they request.


Sat Jun  5 20:05:39 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* tests/testmerge.c: Add a checkbox to queue an
	merge/unmerge. Patch from Matthias Clasen.

	* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): Add a new flag
	"need_rebuild"
	(rebuild_menu): New function that rebuilds the overflow menu and
	makes sure it doesn't start or end with a separator.
	(toolbar_content_new_tool_item)
	(toolbar_content_remove)
	(toolbar_content_new_compatibility): Set the rebuild_needed flag
	(gtk_toolbar_size_allocate): Only show the overflow arrow when we
	have actually overflown an item with a proxy menu item. Also make
	sure we rebuild the menu if needed.

	Fix #125504, #142377, #143463
	
	* gtk/gtkseparatortoolitem.c (gtk_separator_tool_item_expose):
	Obey the "priv->draw" flag. (#143692)