mirror of https://github.com/GNOME/gimp.git
Bug 557830 – PDB browser chokes as you are entering regex characters
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(). svn path=/trunk/; revision=27624
This commit is contained in:
parent
65b2a60455
commit
239ae58c10
|
@ -1,3 +1,11 @@
|
|||
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().
|
||||
|
||||
2008-11-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpitem.c: add read-only "offset-x" and "offset-y"
|
||||
|
|
|
@ -367,9 +367,25 @@ browser_search (GimpBrowser *browser,
|
|||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue