-
-
Notifications
You must be signed in to change notification settings - Fork 113
Global search selected #1049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global search selected #1049
Conversation
# Conflicts fixed in: # src/MainWindow.vala
# Conflicts fixed in: # data/io.elementary.code.appdata.xml.in # src/FolderManager/FileView.vala # src/Widgets/SearchBar.vala
|
@danrabbit Can you give some input on which icon to use instead of |
Make tooltip translatable Co-authored-by: Corentin Noël <[email protected]>
|
Most "global search" icon examples on the web are some combination of a globe and magnifying glass (unsurprisingly). |
# Conflicts fixed: # data/io.elementary.code.appdata.xml.in
|
Hm yeah this interface is definitely starting to feel a bit awkward. I wonder if we should move search options into a menu and use checkboxes instead of trying to iconify all of the options inline. I think it feels awkward to open the search dialog when we already have settings here for case sensitivity and regex. So perhaps if we make global search a checkbox option here we could have the keyboard shortcuts just open this one interface with the global search option either checked or unchecked |
|
Yeah, I guess you are right - the searchbar could also do global search so the dialog would be redundant. I think originally the dialog had more options but it was slimmed down. I'll split this PR and keep the code to apply the search to the selected text and lose the extra button pending an interface redesign. |
|
@danrabbit This PR is now restricted to allowing search on selected text - which is quite useful and quicker than typing search terms in the dialog every time. At the moment you can select any amount of text which fails with there are more than one line - not sure how to deal with that - search on a term up to the first new line? |
danirabbit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this works quite well! I think we can probably ignore multiline for now, the dialog makes it clear enough what is about to be searched 👍
Fixes #1020
The keyboard shortcut searches text based on which widget is focused. If the document is focused and text is selected then that is the proposed search term. If the search entry is focused and has text then that is the search term.
At the moment the dialog still appears in order that the user may override the choice or change settings.