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 309291 - Remove wrapping in a menu bar
Remove wrapping in a menu bar
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.6.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-07-01 16:02 UTC by Kathy Fernandes
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Patch implementing the above (2.09 KB, patch)
2006-09-01 10:00 UTC, Michael Natterer
none Details | Review
Updated patch (2.31 KB, patch)
2006-09-12 11:16 UTC, Michael Natterer
none Details | Review

Description Kathy Fernandes 2005-07-01 16:02:21 UTC
Left/Right currently move focus with wrapping between the titles in a menu bar.
Support for wrapping should be removed for accessibility reasons. In addition,
as with other controls where wrapping is not supported, feedback should be
provided (e.g., a system warning beep) when users attempt to move focus beyond
the boundary of a menu bar.

Other information:
Comment 1 Michael Natterer 2006-09-01 10:00:16 UTC
Created attachment 72013 [details] [review]
Patch implementing the above

Maemo-gtk disables wrapping too. Attached patch makes wrapping in both
menubars and menus depend on a new "gtk-menu-shell-wrap-around" property.

I don't really like the name of the new property, any suggestions?
Comment 2 Tim Janik 2006-09-04 15:07:16 UTC
(In reply to comment #0)
> Left/Right currently move focus with wrapping between the titles in a menu bar.
> Support for wrapping should be removed for accessibility reasons.

Kathy, can you point out those reasons or can provide a URL with accessibility concerns/reasoning regarding wrapping?
Comment 3 Richard Hult 2006-09-04 15:17:33 UTC
A non-a11y reason: Mac OS X doesn't wrap for keynav in menus, but does wrap in the menu bar itself. So making it possible to tweak this in some way (xsetting?) would make it possible to make GTK+ fit in better in the various ports.
Comment 4 Tim Janik 2006-09-05 09:59:47 UTC
a quick poll amongst coworkers shows that different users have different preferences with regards to wrapping around in menus, menubars and similar UI elements. so making this configurable makes sense beyond accessibility.

i just think that if we introduce a wrap-around setting, it should be implemented a bit more generically, i.e. have one GtkSettings::gtk-keynav-wrap-around setting that affects:
- menu items in menus;
- menu items in menu bars;
- notebook tabs.
Comment 5 Matthias Clasen 2006-09-05 12:37:45 UTC
And it should probably allow different behaviours:
 - wrapping
 - stopping
 - beeping
Comment 6 Soren Sandmann Pedersen 2006-09-05 16:20:03 UTC
Adding Calum since he actually knows about keyboard navigation.
Comment 7 Tim Janik 2006-09-11 10:24:12 UTC
note that his bug is related to the more generic kay navigation bug #322640, anbd is actually partially continued/developped there.
Comment 8 Michael Natterer 2006-09-12 11:16:05 UTC
Created attachment 72596 [details] [review]
Updated patch

New patch changes the settings property to "gtk-menu-wrap-around"
and uses the new gtk_widget_notify_keynav_failed() API from bug #322640.
Comment 9 Michael Natterer 2006-09-21 15:36:41 UTC
This patch has been merged with the patch in bug #322640.
Comment 10 Behdad Esfahbod 2006-11-15 18:44:42 UTC
There's a similar request in bug 92139 to have an option to add wrapping in tabs.  In gnome-terminal in this example.
Comment 11 Michael Natterer 2006-11-15 19:36:02 UTC
The patch attached to bug #322640 takes care about notebook tab wrapping.
Comment 12 Michael Natterer 2006-11-16 13:06:36 UTC
Fixed in CVS. Bug reporters, please check your use cases and file
new bugs against the new features if anything doesn't work. It doesn't
make sense to keep 6 bugs open.

2006-11-16  Michael Natterer  <mitch@imendio.com>

	Add new infrastructure for notifications of failed keyboard
	navigation and navigation with restricted set of keys.

	The patch handles configurable beeping, navigating the GUI with
	cursor keys only (as in phone environments), and configurable
	wrap-around. Fixes bugs #322640, #70986, #318827, #334726, #334742
	and #309291.

	* gtk/gtksettings.c: added properties gtk-keynav-cursor-only,
	gtk-keynav-wrap-around and gtk-error-bell.

	* gtk/gtkwidget.[ch]: added new signal "keynav-failed" and public
	API to emit it. Added New function gtk_widget_error_bell() which
	looks at the gtk-error-bell setting and calls gdk_window_beep()
	accordingly.

	* gtk/gtk.symbols: add the new widget symbols.

	* gtk/gtkcellrendereraccel.c
	* gtk/gtkimcontextsimple.c
	* gtk/gtkmenu.c
	* gtk/gtknotebook.c: use gtk_widget_error_bell() or look at the
	gtk-error-bell setting instead of calling gdk_display_beep()
	unconditionally.

	* gtk/gtkcombobox.c
	* gtk/gtkentry.c
	* gtk/gtkiconview.c
	* gtk/gtklabel.c
	* gtk/gtkmenushell.c
	* gtk/gtkspinbutton.c
	* gtk/gtktextview.c
	* gtk/gtktreeview.c: call gtk_widget_error_bell() on failed keynav.

	* gtk/gtkentry.c
	* gtk/gtklabel.c
	* gtk/gtkrange.c
	* gtk/gtktextview.c: consult gtk_widget_keynav_failed() on failed
	cursor navigation and leave the widget if it returns FALSE.

	* gtk/gtkmenushell.c
	* gtk/gtknotebook.c: only wrap around if gtk-keynav-wrap-around
	is TRUE.

	* gtk/gtkradiobutton.c: ask gtk_widget_keynav_failed() to decide
	whether to to wrap-around, and don't select active items on cursor
	navigation if gtk-keynav-cursor-only is TRUE. Should look at
	gtk-keynav-wrap-around too, will look into that.