Merge pull request #549 from Vulcalien/none-keybindings

Fix: 'None' value for keybindings breaks editor
This commit is contained in:
Matt Rose 2021-12-07 14:30:09 -05:00 committed by GitHub
commit 62716872df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1738,10 +1738,13 @@ class PrefsEditor:
accel = Gtk.accelerator_name(key, mods)
current_binding = liststore.get_value(liststore.get_iter(path), 0)
parsed_accel = Gtk.accelerator_parse(accel)
duplicate_bindings = []
for conf_binding, conf_accel in self.config["keybindings"].items():
parsed_accel = Gtk.accelerator_parse(accel)
if conf_accel is None:
continue
parsed_conf_accel = Gtk.accelerator_parse(conf_accel)
if (

View File

@ -130,7 +130,7 @@ class Window(Container, Gtk.Window):
# Attempt to grab a global hotkey for hiding the window.
# If we fail, we'll never hide the window, iconifying instead.
if self.config['keybindings']['hide_window'] != '':
if self.config['keybindings']['hide_window'] not in ('', None):
if display_manager() == 'X11':
try:
self.hidebound = Keybinder.bind(