aecreations / clippings-tb

Clippings for Thunderbird
Other
2 stars 0 forks source link

Handle customized keyboard shortcut for pasting #189

Open aecreations opened 2 weeks ago

aecreations commented 2 weeks ago

Thunderbird now allows users to customize keyboard shortcuts for their extensions from Add-ons Manager, just like in Firefox. Clippings for Thunderbird doesn't allow for this.

The extension preferences page needs to be updated to detect if the keyboard shortcut is different from the default, and if so, adjust the checkbox label in the Paste tab (the UI string is already parameterized for the keyboard shortcut).

Also, make sure that the HTML export of the shortcut key list also contains updated user instructions on the keyboard shortcut, consistent with the same in Firefox.

aecreations commented 1 week ago

The previous design of keyboard shortcut handling assumed that the shortcuts were fixed and not configurable (except for turning on or off), which was the case in older versions of Thunderbird. As a result, there are two distinct boolean prefs:

Since this is no longer the case (and has been since Thunderbird 91), there's no need to maintain two different prefs. They should be merged into a new pref, keybdPaste.

aecreations commented 1 week ago

The migration of the keyboard shortcut prefs needs to be tested when upgrading from a previous version of Clippings for Thunderbird.

aecreations commented 1 week ago

Post-update testing FAILED.

The two old prefs for the keyboard shortcut for invoking keyboard paste mode, keyboardPaste and wxPastePrefixKey, were not migrated to a new pref keybdPaste, and the old prefs were not deleted.

When updating from a previous release, this causes the keyboard paste pref to be turned off by default since keybdPaste is non-existent in extension storage, though it is created once the setting is changed.

aecreations commented 1 week ago

Issue is fixed. For current users of version 7.0b4, they'll need to update to 7.0b5 to resolve this issue.