Fix context menu keybinding reading.
When the keybinding for an action that also appears in the context menu is None, python can't do it's usual string tricks and throws a backtrace, and doesn't display the menu.
This commit is contained in:
parent
380be99c9f
commit
e4be854668
|
@ -30,6 +30,8 @@ class TerminalPopupMenu(object):
|
||||||
|
|
||||||
def get_menu_item_mask(self, maskstr):
|
def get_menu_item_mask(self, maskstr):
|
||||||
mask = 0
|
mask = 0
|
||||||
|
if maskstr is None:
|
||||||
|
return mask
|
||||||
maskstr = maskstr.lower()
|
maskstr = maskstr.lower()
|
||||||
if maskstr.find('<Shift>'.lower()) >= 0:
|
if maskstr.find('<Shift>'.lower()) >= 0:
|
||||||
mask = mask | Gdk.ModifierType.SHIFT_MASK
|
mask = mask | Gdk.ModifierType.SHIFT_MASK
|
||||||
|
|
Loading…
Reference in New Issue