Commit Graph

3 Commits (main)

Author SHA1 Message Date
Daniel Barlow a5a65006ca make keyboard completions work
1. When adding a button to flowbox, the flowbox widget interposes a
flowboxchild between the two, which can receive events and so becomes
part of the tab order. this is why our buttons weren't getting
activated - they weren't focused even though they looked focused.  So,
use labels instead of buttons for completions

2. For some reason I don't understand, flowboxchild widgets receive
:activate *only* on keyboard activation. So instead of using it,
we connect to :child-activated on the flowbox.

3. Setting widget:on_foo *adds* a handler to the widget instead of
replacing what was previously there. There is no nice way to remove
handlers from a widget either. Because we need a new
on_child_activated handler every time the completions change,
the only way I can see to achieve this is to create the flowbox
afresh on each keystroke instead of creating it once when the
frame is created
2023-01-17 21:54:31 +00:00
Daniel Barlow d76769752b rename function 2023-01-17 13:11:25 +00:00
Daniel Barlow 4b78434ea4 extract search into a module, improve it 2023-01-17 11:30:10 +00:00