gimp r27624 - in trunk: . libgimp
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27624 - in trunk: . libgimp
- Date: Tue, 11 Nov 2008 21:35:41 +0000 (UTC)
Author: neo
Date: Tue Nov 11 21:35:41 2008
New Revision: 27624
URL: http://svn.gnome.org/viewvc/gimp?rev=27624&view=rev
Log:
2008-11-11 Sven Neumann <sven gimp org>
Bug 557830 â PDB browser chokes as you are entering regex
characters
* libgimp/gimpprocbrowserdialog.c: check if the query is a valid
regex before calling gimp_procedural_db_query().
Modified:
trunk/ChangeLog
trunk/libgimp/gimpprocbrowserdialog.c
Modified: trunk/libgimp/gimpprocbrowserdialog.c
==============================================================================
--- trunk/libgimp/gimpprocbrowserdialog.c (original)
+++ trunk/libgimp/gimpprocbrowserdialog.c Tue Nov 11 21:35:41 2008
@@ -367,9 +367,25 @@
gint search_type,
GimpProcBrowserDialog *dialog)
{
- gchar **proc_list;
- gint num_procs;
- gchar *str;
+ gchar **proc_list;
+ gint num_procs;
+ gchar *str;
+ GRegex *regex;
+
+ /* first check if the query is a valid regex */
+ regex = g_regex_new (query_text, 0, 0, NULL);
+
+ if (! regex)
+ {
+ gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->tree_view), NULL);
+ dialog->store = NULL;
+
+ gimp_browser_show_message (browser,
+ _("Search term invalid or incomplete"));
+ return;
+ }
+
+ g_regex_unref (regex);
switch (search_type)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]