Skip to content

cleanup: remove deprecated accelerator-grabber API#522

Open
mayconrcmello wants to merge 1 commit intoforge-ext:mainfrom
mayconrcmello:cleanup/remove-deprecated-accelerator-grabber
Open

cleanup: remove deprecated accelerator-grabber API#522
mayconrcmello wants to merge 1 commit intoforge-ext:mainfrom
mayconrcmello:cleanup/remove-deprecated-accelerator-grabber

Conversation

@mayconrcmello
Copy link
Copy Markdown

Summary

lib/extension/keybindings.js has five @deprecated symbols that predate the move to Main.wm.addKeybinding (the API that the live enable()/disable() methods actually use). They have no callers anywhere in the codebase, and one of them (enableListenForBindings) references an undefined windowConfig identifier — it would throw ReferenceError the moment anything called it.

Removed

  • _acceleratorActivate — old accelerator-activated signal handler
  • _bindSignals — connected the dead handler
  • enableListenForBindings — referenced undefined windowConfig
  • disableListenForBindings — paired with the above
  • listenFor — manual grab_accelerator/allowKeybinding plumbing
  • _grabbers Map field — only used by the above
  • The commented-out // this._bindSignals(); line in the constructor

77 lines deleted, no behaviour change.

Test plan

  • node --check lib/extension/keybindings.js
  • grep -rn confirmed no external callers of any removed symbol
  • gnome-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.

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.
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.

1 participant