Skip to content

grep: Rework whole plugin

This modifies the plugin in the following ways:

  • There is now a persistent project-wide utilities panel that can't be closed. This helps avoiding that the search panels keep piling up in the panels list, by encouraging to use the project-wide persistent panel.
  • Going with the previous change, the search settings can be changed from within the panel, not only from the project tree's Find in Files popover. Search queries can be changed and re-done from the same panel. Replacements can be done once a search has been done.
  • Searches done from the Find in Files popover are created in a new grep panel, and can be closed either using its close button, or using the Escape key with the focus inside the panel.
  • Ctrl+Shift+F can be used to reveal the project-wide grep panel

That doesn't solve all the issues the grep panel has, but it improves the situation greatly. In particular, I'd like at one point to make the search results appear in a tree -like way, with tree levels being each directory or file, like so:

=>=> line 44
=>=> line 55
=> foobar.svg
=>=> foobar.svg line 66
=> foobar.c
=>=> foobar.c line 6

That way we would be able to collapse entirely folders or files results that we don't care about, like the po/ directory or simply unselecting all the results on a file so that it is faster to only do replacing in files we want. All this will likely be easier to do in GTK 4.

I'll add screenshots in a new comment for UI review.

Supersedes !381 (closed)

Fixes #941 (closed)

Edited by Vanadiae

Merge request reports