4546 Numbers are always bound to Go menu (MacOS)

svn: r17182
This commit is contained in:
Jérôme Rapinat
2011-04-21 09:54:42 +00:00
parent 8797495dc0
commit 8c22cce7b2
2 changed files with 20 additions and 4 deletions

View File

@@ -115,3 +115,18 @@ def has_display():
except:
sys.argv = temp
return False
# A couple of places add menu accelerators using <alt>, which doesn't
# work with Gtk-quartz. <Meta> is the usually correct replacement, but
# in one case the key is a number, and <meta>number is used by Spaces
# (a mac feature), so we'll use control instead.
def mod_key():
"""
Returns a string to pass to an accelerator map.
"""
if is_quartz():
return "<ctrl>"
return "<alt>"