Skip to content

SearchBar: use actions - #1807

Merged
jeremypw merged 19 commits into
masterfrom
danirabbit/searchbar-actions
Aug 26, 2026
Merged

SearchBar: use actions#1807
jeremypw merged 19 commits into
masterfrom
danirabbit/searchbar-actions

Conversation

@danirabbit

@danirabbit danirabbit commented Aug 24, 2026

Copy link
Copy Markdown
Member

Make sure we never use UI as a source of truth. Use actions and set those actions as enabled. Use settings as source of truth where possible

@danirabbit danirabbit changed the title SearchBar: use actions SearchBar: use actions and settings Aug 24, 2026
@danirabbit
danirabbit requested a review from jeremypw August 25, 2026 00:59
@danirabbit
danirabbit marked this pull request as ready for review August 25, 2026 00:59
Comment thread src/Widgets/SearchBar.vala
Comment thread src/Widgets/SearchBar.vala Outdated
Comment thread src/Widgets/SearchBar.vala Outdated

@jeremypw jeremypw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems to work as expected. Just a couple of comments about the code.

@danirabbit

Copy link
Copy Markdown
Member Author

@jeremypw went down the rabbithole of fixing the find_next and find_previous actions and we can save a bunch of keypress handling code as well if we add those actions into the search bar. Let me know if this is getting out of hand and should be done in separate steps

@danirabbit
danirabbit requested a review from jeremypw August 25, 2026 16:56
Comment thread src/Widgets/SearchBar.vala Outdated

@jeremypw jeremypw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely the way to go and in line with what has already been started in Terminal i.e. move stuff out of MainWindow into the relevant widget where possible.

I made a comment but I will test this further tomorrow as the changes are now more substantial.

@danirabbit

Copy link
Copy Markdown
Member Author

I'm gonna break up the settings changes to another branch to make it a little more digestible

@danirabbit danirabbit changed the title SearchBar: use actions and settings SearchBar: use actions Aug 25, 2026
@danirabbit
danirabbit requested a review from jeremypw August 25, 2026 20:45

@jeremypw jeremypw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems to work.

It feels a little odd duplicating action in SearchBar and MainWindow but I guess that is unavoidable in Gtk3 and still saves some code.

@jeremypw
jeremypw merged commit 8eb5007 into master Aug 26, 2026
6 checks passed
@jeremypw
jeremypw deleted the danirabbit/searchbar-actions branch August 26, 2026 11:53
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