From 840a95eeb21a597db7be1699623f9d84fa410012 Mon Sep 17 00:00:00 2001 From: dkmvs <67212386+dkmvs@users.noreply.github.com> Date: Tue, 29 Sep 2020 17:10:56 +0300 Subject: [PATCH] Use Empty String for Cleared Accels When a key binding is cleared its value is now set to "" (an empty string) instead of `None` as before. This change is introduced because `Gtk.accelerator_parse` does not allow `None` to be used as a value, which in turn breaks `on_cellrenderer_accel_edited` function in `terminatorlib/prefseditor.py` by raising a `TypeError` every time a new key binding is introduced. Note that this only happens if at least one key binding has been cleared first. --- terminatorlib/prefseditor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index a198fc5c..85b9f223 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -1745,7 +1745,7 @@ class PrefsEditor: liststore.set(celliter, 2, 0, 3, 0) binding = liststore.get_value(liststore.get_iter(path), 0) - self.config['keybindings'][binding] = None + self.config['keybindings'][binding] = "" self.config.save() def on_open_manual(self, widget):