! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[PATCH] Select files by coincidences (*%s*) by default.
Status:
RESOLVED: FIXED

Comments

Description Matias De lellis 2012-12-15 00:03:21 CET
Created attachment 4795 
Select files by coincidences (*%s*) by default.

A small patch, to find/select files, whose name contains the keyword.

The idea is use it to find files faster. Just type the word, and the code replaced it by "*word*".

It's not hard to write yourself *word* but it's really annoying when you need to search for multiple files.

To search like before, add a check, allowing filter by exact pattern we write.

Well,
If you see the patch, speaks for itself.

If you are interested, i can improve it.

Some ideas:
* Could add some option for matching with case (un)sensitive.
* Add some tooltip showing the possibilities of pattern.
* Remember the option.

Regards,
Matias
Comment 1 Nick Schermer editbugs 2012-12-15 10:00:09 CET
Another option is to start with "**" in the dialog and add the cursor in the middle.
Comment 2 Nick Schermer editbugs 2012-12-15 18:43:55 CET
Created attachment 4800 
Always start with **

What about this?
Comment 3 Matias De lellis 2012-12-15 19:38:25 CET
Is completely valid,
But thinking about the common people, I prefer the previous approach, but still need to modify strings and add comments to understand exactly what is done. Or just add a tooltip/label explaining without changing the dialog.

For commont people understood: Without any experience in using wildcards, and only expects to select files for matches. ;)

Think of any other application. 99% of the programs that have a search function:
 * Always the filter is empty.
   - Add ** will be confusing.
 * Almost always search like *%s*, except when has a "Mach word" option to find the exact word.
   - But this is more limited than using wildcards, and for this leave the option in the patch.
 * Also, unless have the option to "Match case", always looking for independently of the case. (Do not always know that the capitalization of file that you search)
Comment 4 Matias De lellis 2012-12-15 20:01:23 CET
Well,
I think the easiest would be add a check as in the orginal patch, but called "Selec any match" (Much more understandable than "Select _by Pattern"), and in the tooltip, add a description of the possibilities of using wildcards.

I think it will be less confusing for anybody want to use it.

Then, add an option to the capitalization, or make insensitive to it. But maybe this is a caprice.

P.D: Always thinking on ordinary users. Advanced users can use wildcards to do complex searches, but not the most common.

Regards.
Comment 5 Matias De lellis 2012-12-15 21:39:28 CET
Created attachment 4802 
Select with any matches v.2
Comment 6 Matias De lellis 2012-12-15 21:44:38 CET
Attach another patch:
* Chage "Select _by Pattern" option to "Selec any match".
* Activate it by default. This is my preference, but you can change it.
* And a tooltip to explain a bit: "Alternatively you can use '*' or '?' as wildcard to select specific patterns: '*' matches an arbitrary, possibly empty, and '?' matches an arbitrary character."
  - This is based on http://developer.gnome.org/glib/2.28/glib-Glob-style-pattern-matching.html

Regards.
Matias.
Comment 7 Nick Schermer editbugs 2012-12-27 12:09:46 CET
A possibility is to put * around the string if no * or ? was found in the string. I don't really like to change the option.
Comment 8 Nick Schermer editbugs 2012-12-27 12:40:33 CET
Did the latter in 394e115.
Comment 9 Matias De lellis 2012-12-27 13:14:04 CET
Perfect nick!.
Thank you so much!.

Bug #9640

Reported by:
Matias De lellis
Reported on: 2012-12-15
Last modified on: 2012-12-27

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Select files by coincidences (*%s*) by default. (6.44 KB, patch)
2012-12-15 00:03 CET , Matias De lellis
no flags
Always start with ** (997 bytes, patch)
2012-12-15 18:43 CET , Nick Schermer
no flags
Select with any matches v.2 (6.64 KB, patch)
2012-12-15 21:39 CET , Matias De lellis
no flags

Additional information