Skip to content
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

Search in terminal #1533

Merged
merged 3 commits into from
Apr 18, 2019
Merged

Search in terminal #1533

merged 3 commits into from
Apr 18, 2019

Conversation

mlouielu
Copy link
Collaborator

@mlouielu mlouielu commented Apr 17, 2019

For #116, currently we have two ways to implement it, one is the search dialog (we have search.glade), another is like gedit or iterm using a small search box to search the terminal.

This PR trying to implement the latter, this is how it work to float the search box on the page:

  • RootTerminalBox: Gtk.Box -> Gtk.Overlay
  • RootTerminalBox.child (TerminalBox/DualTerminalBox) -> add into overlay
  • Search box -> add_overlay into overlay

In this way, we can then implement the search function base on vte.Terminal.

Some problem:

  • Not test in different scenario
  • Search box will not hide in focus-out-event (this is tricky... we cannot hide the box and show it out, it will let the search fall back to first item)
  • Next/Prev button didn't set sensitive correctly
  • It will only search in last focus terminal (if you split, it will not search in all terminal in same RootTerminalBox)

VTE problem:

  • It cannot highlight all match item (long time feature request)

TODO:

  • Prefs setting
  • Prev search with SHIFT
  • Cleanup RootTerminalBox other related method (from Gtk.Box to Gtk.Overlay) and check if somewhere breakup by this

Feel free to test it, you can test it with CTRL+SHIFT+F to search

@gsemet
Copy link
Member

gsemet commented Apr 17, 2019

Great ! I agree the search box is not ideal, subpanel a-la iterm2 or Firefox is much better ! Can’t wait to test it !
Don’t forget to have « reverse direction » by default.
The other problems can be accepted as long as the search works. For the dependency on a vte patch, I know it is a long time request, maybe one day it will be implemented !

Thanks for your effort, I really appreciate :)

User can search their terminal by search box. Search is based on vte.

Default accel-key is CTRL+SHIFT-F, it will then show up a search box
at right bottom of the page. User can search by hitting Return to search
next, or hitting Return with Shift to search previous, or using next/prev
button to search.

ESC or anyother focus-out of search entry will hide the search box.

NOTE: it will only search on last focus terminal if the terminal has been
split out.
If we don't block notebook button-press-event, it will affect search box,
when double click on search box button or search entry, it will then add
a new page with focus, which is what we don't want.

So, block this event when search box is visible, and unblock it when
search box is show off.
@mlouielu mlouielu changed the title [WIP] Search in terminal Search in terminal Apr 18, 2019
@mlouielu
Copy link
Collaborator Author

@gsemet I think it is good for merge now, please take a test on it :)

@gsemet gsemet merged commit 4200b42 into Guake:master Apr 18, 2019
@gsemet
Copy link
Member

gsemet commented Apr 18, 2019

yep! i'm testing it now!

@austinmw
Copy link

@gsemet Hi, I'm able to see the search box with Ctrl+shift+F, but it doesn't seem to actually work for me. It doesn't highlight or jump to any text. I tried a few different themes in case the color was hard to see.

@jrao
Copy link

jrao commented Jun 7, 2021

Same as @austinmw for me on Ubuntu 20.04, Gnome desktop.

$ guake --version
Guake Terminal: 3.6.3
VTE: 0.60.3
VTE runtime: 0.60.3
Gtk: 3.24.20

@Axel29
Copy link

Axel29 commented Jul 15, 2021

Same for me, I have the search box but nothing gets searched ^^"

@pevogam
Copy link

pevogam commented Oct 12, 2022

Any opened issue or pull request regarding the unusable search box? One can type inside but nothing gets highlighted or done once they type enter, or "next" or "previous" arrow result.

@gsemet
Copy link
Member

gsemet commented Oct 12, 2022

Hello. Feel free to work on it and provide this pull request !

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.

6 participants