Skip to content

Fix: Key Binding Clearing in Preferences > Keybindings#224

Merged
mattrose merged 3 commits intognome-terminator:masterfrom
dkmvs:fix-keybinding-accel-clearing
Oct 14, 2020
Merged

Fix: Key Binding Clearing in Preferences > Keybindings#224
mattrose merged 3 commits intognome-terminator:masterfrom
dkmvs:fix-keybinding-accel-clearing

Conversation

@dkmvs
Copy link
Copy Markdown
Contributor

@dkmvs dkmvs commented Oct 4, 2020

This PR should fix incorrect clearing of key bindings in Preferences > Keybindings, which was introduced in #196.

Steps to Reproduce:

  1. Open Preferences > Keybindings.
  2. Clear any non-empty key binding, that is double click on any key binding which doesn't say Disabled and then press Backspace.
  3. Try to assign a new key binding to any action - it won't work.

This happens because Gtk.accelerator_parse, which was used in #196, doesn't allow None to be used as a value. To fix this, the key binding value is now set to an empty string ("") instead of None the moment it's been cleared.

I also added a test to reproduce the behaviour described in this PR.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants