SearchBar: set method → properties, rm unused - #1808
Merged
Conversation
jeremypw
reviewed
Aug 25, 2026
|
|
||
| private bool on_key_pressed (uint keyval, uint keycode, Gdk.ModifierType state) { | ||
| if (!(search_is_focused || replace_is_focused)) { | ||
| if (!(search_entry.has_focus || replace_entry.has_focus)) { |
Collaborator
There was a problem hiding this comment.
Can this be replaced by if (!is_focused) {?
Member
Author
There was a problem hiding this comment.
It could but I'm not really a fan of using external API internally when it's just a one-liner like this. If the public function is removed then we'll just have this one liner function hanging on until someone else comes to clean it up again and I don't think it really makes the code more clear personally. But if you feel strongly about it, I'll change it
Collaborator
There was a problem hiding this comment.
OK as it is done for a reason I withdraw the suggestion.
jeremypw
requested changes
Aug 25, 2026
jeremypw
left a comment
Collaborator
There was a problem hiding this comment.
Works as before afaict. Just a small code suggestion
jeremypw
approved these changes
Aug 25, 2026
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.
reveal ()andis_revealed { get; }becomesearch_mode_enabled { get; set; }set_search_entry_text ()andentry_text { get; }becomesearch_text { get; set; }search_is_focused { get; }andreplace_is_focused { get; }which are only used in one place anyways andon_text_buffer_changed ()which just callsupdate_search_widgets ()transition_time_msec { get; }andhighlight_none ()