Commit eb6e907b authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

simplified everything a lot by merging the public GimpContextPropType enum

2003-02-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.[ch]: simplified everything a lot by
	merging the public GimpContextPropType enum with the internal
	anonymous object property id enum. Removed the internal copy_prop
	functions and handle property copying in a big switch() in
	gimp_context_copy_property(). Removed the separate signal
	connections for each property of the parent context and do the
	same using a single "notify" handler. Emit "notify" signals all
	over the place.  Removed internal arrays which are no longer
	needed due to enum merge and copy_property simplification.
	Removed the array of signal names and use g_signal_name().
	Removed gimp_context_unset_parent() and allow "parent" being NULL
	in gimp_context_set_parent().

	* app/tools/tool_manager.c
	* app/widgets/gimpdevices.c: changed accordingly.

	* libgimptool/gimptooltypes.h: changed GimpToolOptionsGUIFunc to
	return a GtkWidget (the created tool options widget).

	* libgimptool/gimptoolmodule.c: #include <gtk/gtk.h>

	* app/tools/tool_options.[ch]: removed the "main_vbox" from the
	GimpToolOptions struct. Changed gimp_tool_options_gui() to create
	and return the main_vbox.

	* app/tools/tool_manager.c: create the "This Tool has no Options"
	label here if NULL was passed as "options_gui_func". Attach the
	options widget to the tool_options object using
	g_object_set_data().

	* app/gui/tool-options-dialog.c: changed accordingly.

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpblendoptions.[ch]
	* app/tools/gimpbucketfilloptions.[ch]
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickeroptions.[ch]
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcropoptions.[ch]
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpflipoptions.[ch]
	* app/tools/gimpinkoptions.[ch]
	* app/tools/gimpmagnifyoptions.[ch]
	* app/tools/gimpmeasureoptions.[ch]
	* app/tools/gimpmoveoptions.[ch]
	* app/tools/gimpselectionoptions.[ch]
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptextoptions.[ch]
	* app/tools/gimptransformoptions.[ch]
	* app/tools/gimpvectoroptions.[ch]
	* app/tools/paint_options.[ch]: return the options vbox from
	all tool_options_gui functions.
parent 91abc8ca
2003-02-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: simplified everything a lot by
merging the public GimpContextPropType enum with the internal
anonymous object property id enum. Removed the internal copy_prop
functions and handle property copying in a big switch() in
gimp_context_copy_property(). Removed the separate signal
connections for each property of the parent context and do the
same using a single "notify" handler. Emit "notify" signals all
over the place. Removed internal arrays which are no longer
needed due to enum merge and copy_property simplification.
Removed the array of signal names and use g_signal_name().
Removed gimp_context_unset_parent() and allow "parent" being NULL
in gimp_context_set_parent().
* app/tools/tool_manager.c
* app/widgets/gimpdevices.c: changed accordingly.
* libgimptool/gimptooltypes.h: changed GimpToolOptionsGUIFunc to
return a GtkWidget (the created tool options widget).
* libgimptool/gimptoolmodule.c: #include <gtk/gtk.h>
* app/tools/tool_options.[ch]: removed the "main_vbox" from the
GimpToolOptions struct. Changed gimp_tool_options_gui() to create
and return the main_vbox.
* app/tools/tool_manager.c: create the "This Tool has no Options"
label here if NULL was passed as "options_gui_func". Attach the
options widget to the tool_options object using
g_object_set_data().
* app/gui/tool-options-dialog.c: changed accordingly.
* app/tools/gimpairbrushtool.c
* app/tools/gimpblendoptions.[ch]
* app/tools/gimpbucketfilloptions.[ch]
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickeroptions.[ch]
* app/tools/gimpconvolvetool.c
* app/tools/gimpcropoptions.[ch]
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpflipoptions.[ch]
* app/tools/gimpinkoptions.[ch]
* app/tools/gimpmagnifyoptions.[ch]
* app/tools/gimpmeasureoptions.[ch]
* app/tools/gimpmoveoptions.[ch]
* app/tools/gimpselectionoptions.[ch]
* app/tools/gimpsmudgetool.c
* app/tools/gimptextoptions.[ch]
* app/tools/gimptransformoptions.[ch]
* app/tools/gimpvectoroptions.[ch]
* app/tools/paint_options.[ch]: return the options vbox from
all tool_options_gui functions.
2003-02-08 Sven Neumann <sven@gimp.org>
* app/text/gimptext.c
......
This diff is collapsed.
......@@ -28,37 +28,40 @@
typedef enum
{
GIMP_CONTEXT_PROP_IMAGE,
GIMP_CONTEXT_PROP_DISPLAY,
GIMP_CONTEXT_PROP_TOOL,
GIMP_CONTEXT_PROP_FOREGROUND,
GIMP_CONTEXT_PROP_BACKGROUND,
GIMP_CONTEXT_PROP_OPACITY,
GIMP_CONTEXT_PROP_PAINT_MODE,
GIMP_CONTEXT_PROP_BRUSH,
GIMP_CONTEXT_PROP_PATTERN,
GIMP_CONTEXT_PROP_GRADIENT,
GIMP_CONTEXT_PROP_PALETTE,
GIMP_CONTEXT_PROP_BUFFER,
GIMP_CONTEXT_PROP_IMAGEFILE,
GIMP_CONTEXT_NUM_PROPS
GIMP_CONTEXT_FIRST_PROP = 2,
GIMP_CONTEXT_PROP_IMAGE = GIMP_CONTEXT_FIRST_PROP,
GIMP_CONTEXT_PROP_DISPLAY = 3,
GIMP_CONTEXT_PROP_TOOL = 4,
GIMP_CONTEXT_PROP_FOREGROUND = 5,
GIMP_CONTEXT_PROP_BACKGROUND = 6,
GIMP_CONTEXT_PROP_OPACITY = 7,
GIMP_CONTEXT_PROP_PAINT_MODE = 8,
GIMP_CONTEXT_PROP_BRUSH = 9,
GIMP_CONTEXT_PROP_PATTERN = 10,
GIMP_CONTEXT_PROP_GRADIENT = 11,
GIMP_CONTEXT_PROP_PALETTE = 12,
GIMP_CONTEXT_PROP_BUFFER = 13,
GIMP_CONTEXT_PROP_IMAGEFILE = 14,
GIMP_CONTEXT_LAST_PROP = GIMP_CONTEXT_PROP_IMAGEFILE
} GimpContextPropType;
typedef enum
{
GIMP_CONTEXT_IMAGE_MASK = 1 << 0,
GIMP_CONTEXT_DISPLAY_MASK = 1 << 1,
GIMP_CONTEXT_TOOL_MASK = 1 << 2,
GIMP_CONTEXT_FOREGROUND_MASK = 1 << 3,
GIMP_CONTEXT_BACKGROUND_MASK = 1 << 4,
GIMP_CONTEXT_OPACITY_MASK = 1 << 5,
GIMP_CONTEXT_PAINT_MODE_MASK = 1 << 6,
GIMP_CONTEXT_BRUSH_MASK = 1 << 7,
GIMP_CONTEXT_PATTERN_MASK = 1 << 8,
GIMP_CONTEXT_GRADIENT_MASK = 1 << 9,
GIMP_CONTEXT_PALETTE_MASK = 1 << 10,
GIMP_CONTEXT_BUFFER_MASK = 1 << 11,
GIMP_CONTEXT_IMAGEFILE_MASK = 1 << 12,
GIMP_CONTEXT_IMAGE_MASK = 1 << 2,
GIMP_CONTEXT_DISPLAY_MASK = 1 << 3,
GIMP_CONTEXT_TOOL_MASK = 1 << 4,
GIMP_CONTEXT_FOREGROUND_MASK = 1 << 5,
GIMP_CONTEXT_BACKGROUND_MASK = 1 << 6,
GIMP_CONTEXT_OPACITY_MASK = 1 << 7,
GIMP_CONTEXT_PAINT_MODE_MASK = 1 << 8,
GIMP_CONTEXT_BRUSH_MASK = 1 << 9,
GIMP_CONTEXT_PATTERN_MASK = 1 << 10,
GIMP_CONTEXT_GRADIENT_MASK = 1 << 11,
GIMP_CONTEXT_PALETTE_MASK = 1 << 12,
GIMP_CONTEXT_BUFFER_MASK = 1 << 13,
GIMP_CONTEXT_IMAGEFILE_MASK = 1 << 14,
/* aliases */
GIMP_CONTEXT_PAINT_PROPS_MASK = (GIMP_CONTEXT_FOREGROUND_MASK |
......@@ -174,7 +177,6 @@ void gimp_context_set_name (GimpContext *context,
GimpContext * gimp_context_get_parent (const GimpContext *context);
void gimp_context_set_parent (GimpContext *context,
GimpContext *parent);
void gimp_context_unset_parent (GimpContext *context);
/* define / undefinine context properties
*
......
......@@ -113,7 +113,6 @@ static void
gimp_tool_options_init (GimpToolOptions *options)
{
options->tool_info = NULL;
options->main_vbox = gtk_vbox_new (FALSE, 2);
}
static void
......@@ -226,13 +225,12 @@ gimp_tool_options_deserialize (GimpToolOptions *tool_options,
return retval;
}
void
gpointer
gimp_tool_options_gui (GimpToolOptions *tool_options)
{
GtkWidget *label;
GtkWidget *vbox;
vbox = gtk_vbox_new (FALSE, 2);
label = gtk_label_new (_("This tool has no options."));
gtk_box_pack_start (GTK_BOX (tool_options->main_vbox), label,
FALSE, FALSE, 6);
gtk_widget_show (label);
return vbox;
}
......@@ -38,8 +38,6 @@ struct _GimpToolOptions
GimpContext parent_instance;
GimpToolInfo *tool_info;
gpointer main_vbox;
};
struct _GimpToolOptionsClass
......@@ -59,7 +57,7 @@ gboolean gimp_tool_options_serialize (GimpToolOptions *tool_options,
gboolean gimp_tool_options_deserialize (GimpToolOptions *tool_options,
GError **error);
void gimp_tool_options_gui (GimpToolOptions *tool_options);
gpointer gimp_tool_options_gui (GimpToolOptions *tool_options);
#endif /* __TOOL_OPTIONS_H__ */
......@@ -186,22 +186,30 @@ tool_options_dialog_tool_changed (GimpContext *context,
GimpToolInfo *tool_info,
gpointer data)
{
GtkWidget *options_gui;
if (visible_tool_options &&
(! tool_info || tool_info->tool_options != visible_tool_options))
{
gtk_widget_hide (visible_tool_options->main_vbox);
options_gui = g_object_get_data (G_OBJECT (visible_tool_options),
"gimp-tool-options-gui");
if (options_gui)
gtk_widget_hide (options_gui);
visible_tool_options = NULL;
}
if (tool_info && tool_info->tool_options)
{
if (! GTK_WIDGET (tool_info->tool_options->main_vbox)->parent)
gtk_box_pack_start (GTK_BOX (options_vbox),
tool_info->tool_options->main_vbox,
options_gui = g_object_get_data (G_OBJECT (tool_info->tool_options),
"gimp-tool-options-gui");
if (! options_gui->parent)
gtk_box_pack_start (GTK_BOX (options_vbox), options_gui,
FALSE, FALSE, 0);
gtk_widget_show (tool_info->tool_options->main_vbox);
gtk_widget_show (options_gui);
visible_tool_options = tool_info->tool_options;
......
......@@ -240,7 +240,7 @@ gimp_ink_options_get_property (GObject *object,
}
}
void
GtkWidget *
gimp_ink_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -252,9 +252,7 @@ gimp_ink_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
gimp_paint_options_gui (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_paint_options_gui (tool_options);
/* adjust sliders */
frame = gtk_frame_new (_("Adjustment"));
......@@ -371,6 +369,8 @@ gimp_ink_options_gui (GimpToolOptions *tool_options)
brush = brush_widget_new (GIMP_INK_OPTIONS (tool_options));
gtk_container_add (GTK_CONTAINER (frame), brush);
gtk_widget_show (brush);
return vbox;
}
......
......@@ -51,9 +51,9 @@ struct _GimpInkOptions
};
GType gimp_ink_options_get_type (void) G_GNUC_CONST;
GType gimp_ink_options_get_type (void) G_GNUC_CONST;
void gimp_ink_options_gui (GimpToolOptions *tool_options);
GtkWidget * gimp_ink_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_INK_OPTIONS_H__ */
......@@ -39,10 +39,10 @@
#include "libgimp/gimpintl.h"
static void gimp_airbrush_tool_class_init (GimpAirbrushToolClass *klass);
static void gimp_airbrush_tool_init (GimpAirbrushTool *airbrush);
static void gimp_airbrush_tool_class_init (GimpAirbrushToolClass *klass);
static void gimp_airbrush_tool_init (GimpAirbrushTool *airbrush);
static void gimp_airbrush_options_gui (GimpToolOptions *tool_options);
static GtkWidget * gimp_airbrush_options_gui (GimpToolOptions *tool_options);
static GimpPaintToolClass *parent_class = NULL;
......@@ -123,7 +123,7 @@ gimp_airbrush_tool_init (GimpAirbrushTool *airbrush)
/* tool options stuff */
static void
static GtkWidget *
gimp_airbrush_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -132,9 +132,7 @@ gimp_airbrush_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
gimp_paint_options_gui (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_paint_options_gui (tool_options);
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
......@@ -152,4 +150,6 @@ gimp_airbrush_options_gui (GimpToolOptions *tool_options)
_("Pressure:"),
1.0, 1.0, 1,
FALSE, 0.0, 0.0);
return vbox;
}
......@@ -232,7 +232,7 @@ gimp_blend_options_get_property (GObject *object,
}
}
void
GtkWidget *
gimp_blend_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -244,9 +244,7 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
gimp_paint_options_gui (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_paint_options_gui (tool_options);
gimp_dnd_viewable_dest_add (vbox,
GIMP_TYPE_GRADIENT,
......@@ -350,6 +348,8 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
_("Threshold:"),
0.01, 0.1, 2,
FALSE, 0.0, 0.0);
return vbox;
}
static void
......
......@@ -48,9 +48,9 @@ struct _GimpBlendOptions
};
GType gimp_blend_options_get_type (void) G_GNUC_CONST;
GType gimp_blend_options_get_type (void) G_GNUC_CONST;
void gimp_blend_options_gui (GimpToolOptions *tool_options);
GtkWidget * gimp_blend_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_BLEND_OPTIONS_H__ */
......@@ -217,7 +217,7 @@ gimp_bucket_fill_options_reset (GimpToolOptions *tool_options)
GIMP_TOOL_OPTIONS_CLASS (parent_class)->reset (tool_options);
}
void
GtkWidget *
gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -230,9 +230,7 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
gimp_paint_options_gui (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_paint_options_gui (tool_options);
/* fill type */
str = g_strdup_printf (_("Fill Type %s"), gimp_get_mod_name_control ());
......@@ -278,4 +276,6 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
FALSE, 0.0, 0.0);
gimp_bucket_fill_options_reset (tool_options);
return vbox;
}
......@@ -45,9 +45,9 @@ struct _GimpBucketFillOptions
};
GType gimp_bucket_fill_options_get_type (void) G_GNUC_CONST;
GType gimp_bucket_fill_options_get_type (void) G_GNUC_CONST;
void gimp_bucket_fill_options_gui (GimpToolOptions *tool_options);
GtkWidget * gimp_bucket_fill_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_BUCKET_FILL_OPTIONS_H__ */
......@@ -76,7 +76,7 @@ static void gimp_clone_pretrace_callback (GimpClone *clone,
static void gimp_clone_posttrace_callback (GimpClone *clone,
gpointer data);
static void gimp_clone_options_gui (GimpToolOptions *tool_options);
static GtkWidget * gimp_clone_options_gui (GimpToolOptions *tool_options);
static GimpPaintToolClass *parent_class;
......@@ -362,7 +362,7 @@ gimp_clone_posttrace_callback (GimpClone *clone,
/* tool options stuff */
static void
static GtkWidget *
gimp_clone_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -371,9 +371,7 @@ gimp_clone_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
gimp_paint_options_gui (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_paint_options_gui (tool_options);
frame = gimp_prop_enum_radio_frame_new (config, "clone-type",
_("Source"),
......@@ -386,4 +384,6 @@ gimp_clone_options_gui (GimpToolOptions *tool_options)
0, 0);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
return vbox;
}
......@@ -182,7 +182,7 @@ gimp_color_picker_options_get_property (GObject *object,
}
}
void
GtkWidget *
gimp_color_picker_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -193,7 +193,7 @@ gimp_color_picker_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_tool_options_gui (tool_options);
/* the sample merged toggle button */
button = gimp_prop_check_button_new (config, "sample-merged",
......@@ -233,4 +233,6 @@ gimp_color_picker_options_gui (GimpToolOptions *tool_options)
_("Update Active Color"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
return vbox;
}
......@@ -45,9 +45,9 @@ struct _GimpColorPickerOptions
};
GType gimp_color_picker_options_get_type (void) G_GNUC_CONST;
GType gimp_color_picker_options_get_type (void) G_GNUC_CONST;
void gimp_color_picker_options_gui (GimpToolOptions *tool_options);
GtkWidget * gimp_color_picker_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_COLOR_PICKER_OPTIONS_H__ */
......@@ -69,7 +69,7 @@ static void gimp_convolve_tool_cursor_update (GimpTool *tool,
GdkModifierType state,
GimpDisplay *gdisp);
static void gimp_convolve_options_gui (GimpToolOptions *options);
static GtkWidget * gimp_convolve_options_gui (GimpToolOptions *options);
static GimpPaintToolClass *parent_class;
......@@ -210,7 +210,7 @@ gimp_convolve_tool_cursor_update (GimpTool *tool,
/* tool options stuff */
static void
static GtkWidget *
gimp_convolve_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -221,9 +221,7 @@ gimp_convolve_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
gimp_paint_options_gui (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_paint_options_gui (tool_options);
/* the type radio box */
str = g_strdup_printf (_("Convolve Type %s"),
......@@ -247,4 +245,6 @@ gimp_convolve_options_gui (GimpToolOptions *tool_options)
_("Rate:"),
1.0, 10.0, 1,
FALSE, 0.0, 0.0);
return vbox;
}
......@@ -173,7 +173,7 @@ gimp_crop_options_get_property (GObject *object,
}
}
void
GtkWidget *
gimp_crop_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -184,7 +184,7 @@ gimp_crop_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_tool_options_gui (tool_options);
/* tool toggle */
str = g_strdup_printf (_("Tool Toggle %s"), gimp_get_mod_name_control ());
......@@ -210,4 +210,6 @@ gimp_crop_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (button);
g_free (str);
return vbox;
}
......@@ -44,9 +44,9 @@ struct _GimpCropOptions
};
GType gimp_crop_options_get_type (void) G_GNUC_CONST;
GType gimp_crop_options_get_type (void) G_GNUC_CONST;
void gimp_crop_options_gui (GimpToolOptions *tool_options);
GtkWidget * gimp_crop_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_CROP_OPTIONS_H__ */
......@@ -51,7 +51,7 @@ static void gimp_dodgeburn_tool_cursor_update (GimpTool *tool,
GdkModifierType state,
GimpDisplay *gdisp);
static void gimp_dodge_burn_options_gui (GimpToolOptions *tool_options);
static GtkWidget * gimp_dodge_burn_options_gui (GimpToolOptions *tool_options);
static GimpPaintToolClass *parent_class = NULL;
......@@ -183,7 +183,7 @@ gimp_dodgeburn_tool_cursor_update (GimpTool *tool,
/* tool options stuff */
static void
static GtkWidget *
gimp_dodge_burn_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -194,9 +194,7 @@ gimp_dodge_burn_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
gimp_paint_options_gui (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_paint_options_gui (tool_options);
/* the type (dodge or burn) */
str = g_strdup_printf (_("Type %s"), gimp_get_mod_name_control ());
......@@ -225,4 +223,6 @@ gimp_dodge_burn_options_gui (GimpToolOptions *tool_options)
_("Exposure:"),
1.0, 10.0, 1,
FALSE, 0.0, 0.0);
return vbox;
}
......@@ -51,7 +51,7 @@ static void gimp_eraser_tool_cursor_update (GimpTool *tool,
GdkModifierType state,
GimpDisplay *gdisp);
static void gimp_eraser_options_gui (GimpToolOptions *tool_options);
static GtkWidget * gimp_eraser_options_gui (GimpToolOptions *tool_options);
static GimpPaintToolClass *parent_class = NULL;
......@@ -172,7 +172,7 @@ gimp_eraser_tool_cursor_update (GimpTool *tool,
/* tool options stuff */
static void
static GtkWidget *
gimp_eraser_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -182,9 +182,7 @@ gimp_eraser_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
gimp_paint_options_gui (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_paint_options_gui (tool_options);
/* the anti_erase toggle */
str = g_strdup_printf (_("Anti Erase %s"), gimp_get_mod_name_control ());
......@@ -199,4 +197,6 @@ gimp_eraser_options_gui (GimpToolOptions *tool_options)
button = gimp_prop_check_button_new (config, "hard", _("Hard Edge"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
return vbox;
}
......@@ -153,7 +153,7 @@ gimp_flip_options_get_property (GObject *object,
}
}
void
GtkWidget *
gimp_flip_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -163,7 +163,7 @@ gimp_flip_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);
vbox = tool_options->main_vbox;
vbox = gimp_tool_options_gui (tool_options);
/* tool toggle */
str = g_strdup_printf (_("Tool Toggle %s"), gimp_get_mod_name_control ());
......@@ -176,4 +176,6 @@ gimp_flip_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (frame);
g_free (str);
return vbox;
}
......@@ -42,9 +42,9 @@ struct _GimpFlipOptions
};
GType gimp_flip_options_get_type (void) G_GNUC_CONST;
GType gimp_flip_options_get_type (void) G_GNUC_CONST;
void gimp_flip_options_gui (GimpToolOptions *tool_options);
GtkWidget * gimp_flip_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_FLIP_OPTIONS_H__ */
......@@ -240,7 +240,7 @@ gimp_ink_options_get_property (GObject *object,
}
}
void
GtkWidget *
gimp_ink_options_gui (GimpToolOptions *tool_options)
{
GObject *config;
......@@ -252,9 +252,7 @@ gimp_ink_options_gui (GimpToolOptions *tool_options)
config = G_OBJECT (tool_options);