From 0f7c373f3bcdbf83f678960f3becdc2c55ed0491 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Thu, 24 Dec 2009 17:31:45 +0100 Subject: [PATCH] app: Add gimp_tool_options_editor_get_tool_options() Add gimp_tool_options_editor_get_tool_options() for unit testing purposes. --- app/widgets/gimptooloptionseditor.c | 7 +++++++ app/widgets/gimptooloptionseditor.h | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/widgets/gimptooloptionseditor.c b/app/widgets/gimptooloptionseditor.c index eee7c1c39e..0af6bbabf4 100644 --- a/app/widgets/gimptooloptionseditor.c +++ b/app/widgets/gimptooloptionseditor.c @@ -310,6 +310,13 @@ gimp_tool_options_editor_new (Gimp *gimp, return GTK_WIDGET (editor); } +GimpToolOptions * +gimp_tool_options_editor_get_tool_options (GimpToolOptionsEditor *editor) +{ + g_return_val_if_fail (GIMP_IS_TOOL_OPTIONS_EDITOR (editor), NULL); + + return editor->p->visible_tool_options; +} /* private functions */ diff --git a/app/widgets/gimptooloptionseditor.h b/app/widgets/gimptooloptionseditor.h index 17db87c03c..850f458821 100644 --- a/app/widgets/gimptooloptionseditor.h +++ b/app/widgets/gimptooloptionseditor.h @@ -49,10 +49,10 @@ struct _GimpToolOptionsEditorClass }; -GType gimp_tool_options_editor_get_type (void) G_GNUC_CONST; - -GtkWidget * gimp_tool_options_editor_new (Gimp *gimp, - GimpMenuFactory *menu_factory); +GType gimp_tool_options_editor_get_type (void) G_GNUC_CONST; +GtkWidget * gimp_tool_options_editor_new (Gimp *gimp, + GimpMenuFactory *menu_factory); +GimpToolOptions * gimp_tool_options_editor_get_tool_options (GimpToolOptionsEditor *editor); #endif /* __GIMP_TOOL_OPTIONS_EDITOR_H__ */