[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: branch: master updated (1.1.2.20070818-200-gb03232e)



The branch, master has been updated
       via  b03232ea8fe9f911af8265c63b16425cf7ee70cb (commit)
      from  87721d1d2bd38398b47b840c7647c8126adbaa70 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/src/x_compselect.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


=================
 Commit Messages
=================

commit b03232ea8fe9f911af8265c63b16425cf7ee70cb
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Dec 28 18:52:30 2007 +0000

    Allow standard glob matches in the component selector's filter entry.

:100644 100644 abeae9d... 9162378... M	gschem/src/x_compselect.c

=========
 Changes
=========

commit b03232ea8fe9f911af8265c63b16425cf7ee70cb
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Dec 28 18:52:30 2007 +0000

    Allow standard glob matches in the component selector's filter entry.

diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index abeae9d..9162378 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -359,7 +359,7 @@ lib_model_filter_visible_func (GtkTreeModel *model,
   Compselect *compselect = (Compselect*)data;
   CLibSymbol *sym;
   const gchar *compname;
-  gchar *compname_upper=NULL, *text_upper=NULL;
+  gchar *compname_upper, *text_upper, *pattern;
   const gchar *text;
   gboolean ret;
 
@@ -392,9 +392,11 @@ lib_model_filter_visible_func (GtkTreeModel *model,
        to uppercase */
     compname_upper = g_ascii_strup(compname, -1);
     text_upper = g_ascii_strup(text, -1);
-    ret = (strstr (compname_upper, text_upper) != NULL);
+    pattern = g_strconcat ("*", text_upper, "*", NULL);
+    ret = g_pattern_match_simple (pattern, compname_upper);
     g_free(compname_upper);
     g_free(text_upper);
+    g_free(pattern);
   }
 
   return ret;




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs