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

Enhance Find Dialog: display extra info in the status bar #14347

Closed
wants to merge 4 commits into from

Conversation

donho
Copy link
Member

@donho donho commented Nov 11, 2023

Fix #14307

@chcg chcg added the enhancement Proposed enhancements of existing features label Nov 12, 2023

warningMsg += sep;
warningMsg += reasonMsg;
reasonMsg = pNativeSpeaker->getLocalizedStrFromID("find-status-cannot-find-pebkac-maybe", L"The given occurence cannot be found. You may have forgotten to check \"Wrap around\" (to ON), \"Match case\" (to OFF), or \"Match whole word only\" (to OFF).");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the introduction of pebkac into the code! :-)

@alankilborn
Copy link
Contributor

I tested this.

For Find Next and Find Previous, it appears to be working well.

It needs to be extended to command button presses that initiate these types of search actions:

  • Count
  • Replace
  • Replace All
  • Mark All

The message should appear and should be changed to NOT mention Wrap around for these:

  • Find All in Current Document
  • Find All in All Opened Documents
  • Replace All in All Opened Documents
  • Find in Files
  • Replace in Files
  • Find in Projects
  • Replace in Projects

@donho
Copy link
Member Author

donho commented Nov 13, 2023

The message should appear and should be changed to NOT mention Wrap around for these:

Find All in Current Document
Find All in All Opened Documents
Replace All in All Opened Documents
Find in Files
Replace in Files
Find in Projects
Replace in Projects

The initial scope of issue #14307 was just to prevent user from ignoring "Wrap around".
AFAICT, all the PEBCAK concerning this issue is only on "Find Next" (please provide any link if I'm wrong).
Now, I understand you guys' point for keeping the consistency of software - I agree to add it for all the commands concerning "Wrap around". But adding all above commands for being aligned the behaviour and for the "constency" is just too much, and not necessary IMO.

As a result, I will consider it, in the future, if there are enough PEBCAK reports coming for Find/Replace All (and other) commands.

@alankilborn
Copy link
Contributor

I wonder if it is difficult. I mean, I'd think most search paths lead to a common point or two (where the error bubble could be put up)...

Also add range info to Find & replace 0 matches info.
@Yaron10
Copy link

Yaron10 commented Nov 14, 2023

@donho,

Now, I understand you guys' point for keeping the consistency of software

If someone (@alankilborn ? :) ) is willing to work on the other inconsistencies (red/blue color, beep, flash) in a separate PR?

@alankilborn
Copy link
Contributor

If someone (alankilborn ? :) ) is willing to work on the other inconsistencies

I don't know...there has to be more interesting things for me to try my hand at, than that... :-D

@Yaron10
Copy link

Yaron10 commented Nov 14, 2023

@alankilborn,

Retracting. :)

@donho
Copy link
Member Author

donho commented Nov 14, 2023

If someone (@alankilborn ? :) ) is willing to work on the other inconsistencies (red/blue color, beep, flash) in a separate PR?

There's no inconsistency here for me :)

@donho donho closed this in 05f339b Nov 14, 2023
@donho donho deleted the add_reason_of_no_found branch November 14, 2023 20:13
@@ -1666,6 +1666,7 @@ Find in all files but exclude all folders log or logs recursively:
<find-status-replace-not-found value="Replace: no occurrence was found"/>
<find-status-replace-readonly value="Replace: Cannot replace text. The current document is read only"/>
<find-status-cannot-find value="Find: Can't find the text &quot;$STR_REPLACE$&quot;"/>
<find-status-cannot-find-pebkac-maybe value="The given occurence cannot be found. You may have forgotten to check &quot;Wrap around&quot; (to ON), &quot;Match case&quot; (to OFF), or &quot;Match whole word only&quot; (to OFF)."/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"occurence" -- shouldn't it be spelled "occurrence", i.e. 2 x "r" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Proposed enhancements of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find Dialog: display "(Filtered!)" in the status bar
5 participants