cleanup: remove deprecated accelerator-grabber API#522
Open
mayconrcmello wants to merge 1 commit intoforge-ext:mainfrom
Open
cleanup: remove deprecated accelerator-grabber API#522mayconrcmello wants to merge 1 commit intoforge-ext:mainfrom
mayconrcmello wants to merge 1 commit intoforge-ext:mainfrom
Conversation
Five `@deprecated` symbols in keybindings.js predate the move to Main.wm.addKeybinding (which is what enable()/disable() actually use). None of them have callers anywhere in the codebase, and one of them (`enableListenForBindings`) references an undefined `windowConfig` identifier and would throw if invoked. Removing: - _acceleratorActivate - _bindSignals - enableListenForBindings (referenced undefined `windowConfig`) - disableListenForBindings - listenFor - the unused `_grabbers` Map field - the commented-out `// this._bindSignals();` call in the constructor This is purely a deletion; no behaviour change. 77 lines removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/extension/keybindings.jshas five@deprecatedsymbols that predate the move toMain.wm.addKeybinding(the API that the liveenable()/disable()methods actually use). They have no callers anywhere in the codebase, and one of them (enableListenForBindings) references an undefinedwindowConfigidentifier — it would throwReferenceErrorthe moment anything called it.Removed
_acceleratorActivate— oldaccelerator-activatedsignal handler_bindSignals— connected the dead handlerenableListenForBindings— referenced undefinedwindowConfigdisableListenForBindings— paired with the abovelistenFor— manualgrab_accelerator/allowKeybindingplumbing_grabbersMap field — only used by the above// this._bindSignals();line in the constructor77 lines deleted, no behaviour change.
Test plan
node --check lib/extension/keybindings.jsgrep -rnconfirmed no external callers of any removed symbolgnome-extensions disable forge && gnome-extensions enable forge— keybindings still register and fire (Super+H/J/K/L, etc.)Notes
Filed as a separate PR from #520 / #521 because it's a pure deletion with a different review surface.