mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
app: gimp_pdb_query() in libgimp doesn't return private procedures anymore.
A main consequence of this is that the Procedure Browser plug-in in GIMP doesn't show now private PDB procedures. I was always finding this annoying as their presence in the procedure browser would encourage people to use these in plug-ins and scripts (even when sometimes we added explicit description that these should not be used). Now it's clearer. The procedure are much more hidden to plug-in developers (and if they still use them, it's at their own risk, especially of having broken plug-ins when we change signature of these as they are not meant to be used, and therefore we don't promise stability for these).
This commit is contained in:
parent
45af19e917
commit
751665a7bd
1 changed files with 7 additions and 3 deletions
|
@ -69,6 +69,7 @@ struct _PDBQuery
|
|||
|
||||
gchar **list_of_procs;
|
||||
gboolean querying_compat;
|
||||
gboolean querying_private;
|
||||
};
|
||||
|
||||
typedef struct _PDBStrings PDBStrings;
|
||||
|
@ -213,9 +214,10 @@ gimp_pdb_query (GimpPDB *pdb,
|
|||
|
||||
success = TRUE;
|
||||
|
||||
pdb_query.pdb = pdb;
|
||||
pdb_query.list_of_procs = g_new0 (gchar *, 1);
|
||||
pdb_query.querying_compat = FALSE;
|
||||
pdb_query.pdb = pdb;
|
||||
pdb_query.list_of_procs = g_new0 (gchar *, 1);
|
||||
pdb_query.querying_private = FALSE;
|
||||
pdb_query.querying_compat = FALSE;
|
||||
|
||||
g_hash_table_foreach (pdb->procedures,
|
||||
gimp_pdb_query_entry, &pdb_query);
|
||||
|
@ -293,6 +295,8 @@ gimp_pdb_query_entry (gpointer key,
|
|||
return;
|
||||
|
||||
procedure = list->data;
|
||||
if (! pdb_query->querying_private && procedure->is_private)
|
||||
return;
|
||||
|
||||
gimp_pdb_get_strings (&strings, procedure, pdb_query->querying_compat);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue