canonicalize the procedure name and also try compat names.

2008-04-07  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/procedural_db.pdb (procedural_db_proc_exists):
	canonicalize the procedure name and also try compat names.

	* app/pdb/procedural-db-cmds.c: regenerated.

svn path=/trunk/; revision=25386
This commit is contained in:
Sven Neumann 2008-04-07 09:12:07 +00:00 committed by Sven Neumann
parent 43259701fc
commit 2f8cf53bb1
3 changed files with 43 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2008-04-07 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/procedural_db.pdb (procedural_db_proc_exists):
canonicalize the procedure name and also try compat names.
* app/pdb/procedural-db-cmds.c: regenerated.
2008-04-06 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/procedural_db.pdb: added new procedure

View File

@ -145,7 +145,24 @@ procedural_db_proc_exists_invoker (GimpProcedure *procedure,
if (success)
{
exists = (gimp_pdb_lookup_procedure (gimp->pdb, procedure_name) != NULL);
GimpProcedure *procedure;
gchar *canonical;
canonical = gimp_canonicalize_identifier (procedure_name);
procedure = gimp_pdb_lookup_procedure (gimp->pdb, canonical);
if (! procedure)
{
procedure_name = gimp_pdb_lookup_compat_proc_name (gimp->pdb, canonical);
if (procedure_name)
procedure = gimp_pdb_lookup_procedure (gimp->pdb, procedure_name);
}
g_free (canonical);
exists = (procedure != NULL);
}
return_vals = gimp_procedure_get_return_values (procedure, success);

View File

@ -156,7 +156,24 @@ HELP
%invoke = (
code => <<'CODE'
{
exists = (gimp_pdb_lookup_procedure (gimp->pdb, procedure_name) != NULL);
GimpProcedure *procedure;
gchar *canonical;
canonical = gimp_canonicalize_identifier (procedure_name);
procedure = gimp_pdb_lookup_procedure (gimp->pdb, canonical);
if (! procedure)
{
procedure_name = gimp_pdb_lookup_compat_proc_name (gimp->pdb, canonical);
if (procedure_name)
procedure = gimp_pdb_lookup_procedure (gimp->pdb, procedure_name);
}
g_free (canonical);
exists = (procedure != NULL);
}
CODE
);