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:
Matt Rose 2023-03-08 17:17:57 -05:00
parent 380be99c9f
commit e4be854668
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ class TerminalPopupMenu(object):
def get_menu_item_mask(self, maskstr):
mask = 0
if maskstr is None:
return mask
maskstr = maskstr.lower()
if maskstr.find('<Shift>'.lower()) >= 0:
mask = mask | Gdk.ModifierType.SHIFT_MASK