app: add a function to get the paint options from GimpPDBContext

This commit is contained in:
Michael Natterer 2011-10-29 23:39:46 +02:00
parent b1108c0bd7
commit 553e05ec6e
2 changed files with 18 additions and 4 deletions

View File

@ -383,3 +383,14 @@ gimp_pdb_context_new (Gimp *gimp,
return GIMP_CONTEXT (context);
}
GimpPaintOptions *
gimp_pdb_context_get_paint_options (GimpPDBContext *context,
const gchar *name)
{
g_return_val_if_fail (GIMP_IS_PDB_CONTEXT (context), NULL);
g_return_val_if_fail (name != NULL, NULL);
return (GimpPaintOptions *)
gimp_container_get_child_by_name (context->paint_options_list, name);
}

View File

@ -62,11 +62,14 @@ struct _GimpPDBContextClass
};
GType gimp_pdb_context_get_type (void) G_GNUC_CONST;
GType gimp_pdb_context_get_type (void) G_GNUC_CONST;
GimpContext * gimp_pdb_context_new (Gimp *gimp,
GimpContext *parent,
gboolean set_parent);
GimpContext * gimp_pdb_context_new (Gimp *gimp,
GimpContext *parent,
gboolean set_parent);
GimpPaintOptions * gimp_pdb_context_get_paint_options (GimpPDBContext *context,
const gchar *name);
#endif /* __GIMP_PDB_CONTEXT_H__ */