After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 351196 - Wildcard support in the group search box
Wildcard support in the group search box
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2006-08-13 19:58 UTC by Søren Boll Overgaard
Modified: 2011-02-19 18:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
How about something like this? (1017 bytes, patch)
2007-07-26 03:09 UTC, Benjamin Charron
none Details | Review
regex search in group and header panes (6.62 KB, text/plain)
2008-05-17 02:30 UTC, Jack Cuyler
  Details
regex search in group and header panes - with prefs (8.47 KB, patch)
2008-05-23 03:10 UTC, Jack Cuyler
none Details | Review
regex search in group and header panes - with hidden prefs (7.73 KB, patch)
2008-05-23 23:22 UTC, Jack Cuyler
none Details | Review
Updated patch for changes in svn (0.133?) (7.81 KB, patch)
2008-07-11 03:10 UTC, Jack Cuyler
none Details | Review

Description Søren Boll Overgaard 2006-08-13 19:58:05 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?
Comment 1 Charles Kerr 2006-11-07 20:14:04 UTC
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.
Comment 2 Benjamin Charron 2007-07-26 03:09:21 UTC
Created attachment 92429 [details] [review]
How about something like this?
Comment 3 Jack Cuyler 2008-05-17 02:30:17 UTC
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.
Comment 4 Jack Cuyler 2008-05-23 03:10:35 UTC
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.
Comment 5 Jack Cuyler 2008-05-23 23:22:56 UTC
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.
Comment 6 Jack Cuyler 2008-07-11 03:10:34 UTC
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.
Comment 7 Kenneth Haley 2010-03-25 06:34:23 UTC
I've added an updated version to my repo at github.
Comment 8 Petr Kovar 2011-02-19 18:25:23 UTC
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.