mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
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
2 changed files with 27 additions and 3 deletions
|
@ -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>
|
2008-11-11 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/core/gimpitem.c: add read-only "offset-x" and "offset-y"
|
* app/core/gimpitem.c: add read-only "offset-x" and "offset-y"
|
||||||
|
|
|
@ -367,9 +367,25 @@ browser_search (GimpBrowser *browser,
|
||||||
gint search_type,
|
gint search_type,
|
||||||
GimpProcBrowserDialog *dialog)
|
GimpProcBrowserDialog *dialog)
|
||||||
{
|
{
|
||||||
gchar **proc_list;
|
gchar **proc_list;
|
||||||
gint num_procs;
|
gint num_procs;
|
||||||
gchar *str;
|
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)
|
switch (search_type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue