tomboy-notes / tomboy-ng

Next generation of Tomboy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ctrl-F should not close the search widget

monperrus opened this issue · comments

Problem: the behavior of Ctrl-F is very confusing

Steps to reproduce:
open a note, Ctrl-F, find something
some hours later, switch to that note again, and Ctrl-F again and start typing the expression to search

Actual Behavior
the search widget is closed, the expression to search is added in the note

Expected Behavior
the search widget is focused on, the expression to search is added as search expression

Thanks!

commented

Martin, I am unsure what can be done about this. When you search and find something, focus is moved to the edit screen, thats how its intended to work and generally how any similar apps work. If you keep typing, anything you type will go into the document.

It does not matter that you wandered away or even that you pressed Ctrl-F again, if you type something after a find, it goes into the document.

The second Ctrl-F closes the find dialog, its a toggle but thats not really the issue here, on a successful find, focus moves to the edit screen and that whats generally expected. You can continue that Find with F3 irrespective of whether the dialog is open of not and focus remains in the edit screen. But you can press Ctrl-F (to close the find dialog) and then press Ctrl-F (yes, a third time) to reopen the dialog and move focus to dialog. You can of course also click back into the dialog instead of the multiple Ctrl-F

Your Expected Behavior would require me to guess that your next batch of typing is intended as a search term, I have no way of knowing you want to do another search I am afraid.

Can you suggest a better approach ?

Davo

David, thanks for your answer.

Take LibreOffice for example. When you hit Ctrl-F, it always selects the search widget menu, regardless of whether you're already in the search widget or in the document.

This is the "usual" behavior which would be great to have in Tomboy-ng.

commented

Hi monperrus, sorry for the slow response, had some issues elsewhere.

I looked again at LibreOffice, yes, I see what you mean but LibreOffice is a different model. Its find panel remains open all the time and when you find a bit of text, it does not move the focus to to edit window, the focus remains in the Find panel.

As I understand it, your concern centers around the fact that Ctrl-F toggles the panel, it opens it and it closes it. If Ctrl-F did not also close the panel, would that suit your workflow ? It would be more like FireFox's model, Ctrl-F shows the Find panel, but you need the mouse to close it. I could add an option, giving us two (incompatible) modes -

  • Existing - Ctrl-F toggles Find Panel, visible or not visible. Focus is transferred accordingly.

  • New ("Ctrl-F does not close Find") - Ctrl-F will always move focus to Find Panel, even if panel is already open. To close the Find Panel, you will need to click a close (or more correctly, 'hide') button. Ctrl-F will always select text, if any, in the Find field and force focus on that find field.

In both cases, a successful search will always move focus to edit window highlighting found term. F3 and Shift-F3 will continue a search whether Search Panel is visible or not.

I need to hide an unused search panel, -ng is about minimal screen space (unlike LibraOffice). I need to move focus to edit window after a successful Find to cater to idiosyncratic QT5, in Qt5, a selected block of text on a non focused window is black on black. LibraOffice have complete control over such things, I don't.

Davo

If Ctrl-F did not also close the panel, would that suit your workflow ?
Ctrl-F will always move focus to Find Panel, even if panel is already open.

Yes, exactly!

Thanks a lot Davo

commented

OK, should not be too hard, I'll push out a beta when I can.

Davo

commented

Hmm, another accidental close, gee !

reopened.

Davo

commented

hi monperrus, I have just put some alpha packages on the tomboy-ng 0.34 release page that address this issue (Ctrl-F not to toggle Find Window). They are relatively untested but I have been using much of the new code for some months but NOT the Ctrl-F, its only been there for a day or so. Depending on how brave you feel, you might like to give it a go.

https://github.com/tomboy-notes/tomboy-ng/releases/tag/v0.34

Davo

commented

Hmm, you must be using RPM ?

Its 0.34a-2, the '2' is part of an RPM structure not my version number. So, my version number is the 0.34a (as mentioned up on the page header) but because each of the packaging formats have slightly different naming conventions, its hard !

If and when I put out another testing or pre-release, I'll rev the 'a' to 'be' etc.

Davo

I'm using DEB, trying out tomboy-ng_0.34a-0_amd64.deb now

As far as I see, In tomboy-ng_0.34a-0_amd64.deb CTRL-F closes the search widget as before. Am I missing something?

commented

Settings -> Notes

Untick "Find Command Toggles".

And if that does not fix it, I have made a real blunder !

Davo

Oh excellent, it works! thanks a lot Davo.

One more thing: when pressing "Enter" after typing my search, nothing happens.

What about "Enter" being equivalent to "F3" and "Ctrl+g"?

commented

Ah, "Enter", yes, it would feel a heap more natural. However, in my testing, I found a serious problem, if I (and I expect, everyone else) press Enter to do the Find, you press it again to find the next one. But by then, focus has moved to the edit window and the find code has selected the term you found. So, pressing Enter replaces the selected Find term with a newline character. Not what you want by any means.

That model works well when the main screen is read only, Firefox etc but is a serious risk when you are allowed to edit the content.

Davo

commented

All right, the system around this problem has been completely revised in version 0.35
So, I'll close
Thanks for the report.
Davo