GNOME Bugzilla – Bug 351196
Wildcard support in the group search box
Last modified: 2011-02-19 18:25:23 UTC
Hello, At http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358978 a Debian user suggested the following: --- 8< --- It would be very useful If Pan could use wildcards in the groups filter. --- 8< --- I've created this small patch which appears to accomplish the users request (and then some): diff -urNad pan-0.106~/pan/gui/group-pane.cc pan-0.106/pan/gui/group-pane.cc --- pan-0.106~/pan/gui/group-pane.cc 2006-07-31 21:59:55.000000000 +0000 +++ pan-0.106/pan/gui/group-pane.cc 2006-08-13 19:23:59.000000000 +0000 @@ -550,7 +550,7 @@ TextMatch match; TextMatch * pmatch (0); if (!search_text.empty()) { - match.set (search_text, TextMatch::CONTAINS, false); + match.set (search_text, TextMatch::REGEX, false); pmatch = &match; } What do you think?
I think expecting the casual user to understand regular expressions is excessive. Perhaps if there was a clear way to toggle the behavior between substring searches and regular expressions.
Created attachment 92429 [details] [review] How about something like this?
Created attachment 111027 [details] regex search in group and header panes I think this is an awesome idea, especially with the option. I took the idea from the Comment #2, and some code from header-pane.cc, and applied it to group-pane.cc, giving the same regex choice and functionality to the group search box.
Created attachment 111382 [details] [review] regex search in group and header panes - with prefs This adds an option in preferences to use regex searches by default. If this is enabled, the regex searches for the group and header panes will be selected automatically on startup.
Created attachment 111441 [details] [review] regex search in group and header panes - with hidden prefs This is almost identical to the patch in Comment #4. The only difference is that it does not modify the preference menu, but rather, creates a "hidden" preference. , accessible by editing preferences.xml. The flag name in preferences.xml is "use-regex" and it can be set to true or false. It is false by default.
Created attachment 114360 [details] [review] Updated patch for changes in svn (0.133?) This patch is updated to work with the current version in svn.
I've added an updated version to my repo at github.
Merged into GNOME master. This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.