[gimp/metadata-browser] app: add a function to get the paint options from GimpPDBContext
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: add a function to get the paint options from GimpPDBContext
- Date: Wed, 12 Sep 2012 22:10:58 +0000 (UTC)
commit 81493a3eaf864611bd913065351f90d85afa5243
Author: Michael Natterer <mitch gimp org>
Date: Sat Oct 29 23:39:46 2011 +0200
app: add a function to get the paint options from GimpPDBContext
app/pdb/gimppdbcontext.c | 11 +++++++++++
app/pdb/gimppdbcontext.h | 11 +++++++----
2 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/app/pdb/gimppdbcontext.c b/app/pdb/gimppdbcontext.c
index 8990450..7e6b9a3 100644
--- a/app/pdb/gimppdbcontext.c
+++ b/app/pdb/gimppdbcontext.c
@@ -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);
+}
diff --git a/app/pdb/gimppdbcontext.h b/app/pdb/gimppdbcontext.h
index a27df2f..810304f 100644
--- a/app/pdb/gimppdbcontext.h
+++ b/app/pdb/gimppdbcontext.h
@@ -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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]