Commit b4768836 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/widgets/Makefile.am use gimp_mkenums to create widgets-enums.c, added

2002-03-18  Sven Neumann  <sven@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-enums.[ch]: use gimp_mkenums to create
	widgets-enums.c, added it to CVS since it contains translatable
	messages now.

	* app/widgets/gimpenummenu.[ch]: added new functions
	gimp_enum_radio_box_new() and gimp_enum_radio_frame_new() that create
	groups of radio buttons out of enum types.

	* app/core/core-enums.[ch]: registered more enums.

	* app/paint/gimpdodgeburn.h
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/transform_options.[ch]: use gimp_enum_radio_frame_new()
	for some tool options.
parent 81f91377
2002-03-18 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-enums.[ch]: use gimp_mkenums to create
widgets-enums.c, added it to CVS since it contains translatable
messages now.
* app/widgets/gimpenummenu.[ch]: added new functions
gimp_enum_radio_box_new() and gimp_enum_radio_frame_new() that create
groups of radio buttons out of enum types.
* app/core/core-enums.[ch]: registered more enums.
* app/paint/gimpdodgeburn.h
* app/tools/gimpbucketfilltool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimpmagnifytool.c
* app/tools/transform_options.[ch]: use gimp_enum_radio_frame_new()
for some tool options.
2002-03-18 Manish Singh <yosh@gimp.org>
 
* app/gui/preferences-dialog.c: slight cosmetic fix to make the
......@@ -34,7 +54,7 @@
for documentation.
 
* etc/gtkrc_user: added a (commented out) example style which makes
lots of things a smaller.
lots of things smaller.
 
2002-03-18 Sven Neumann <sven@gimp.org>
 
......
......@@ -8,142 +8,140 @@
/* enumerations from "./core-enums.h" */
static const GEnumValue gimp_image_base_type_enum_values[] =
static const GEnumValue gimp_blend_mode_enum_values[] =
{
{ GIMP_RGB, "GIMP_RGB", "rgb" },
{ GIMP_GRAY, "GIMP_GRAY", "gray" },
{ GIMP_INDEXED, "GIMP_INDEXED", "indexed" },
{ GIMP_FG_BG_RGB_MODE, N_("FG to BG (RGB)"), "fg-bg-rgb-mode" },
{ GIMP_FG_BG_HSV_MODE, N_("FG to BG (HSV)"), "fg-bg-hsv-mode" },
{ GIMP_FG_TRANSPARENT_MODE, N_("FG to Transparent"), "fg-transparent-mode" },
{ GIMP_CUSTOM_MODE, N_("Custom Gradient"), "custom-mode" },
{ 0, NULL, NULL }
};
GType
gimp_image_base_type_get_type (void)
gimp_blend_mode_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpImageBaseType", gimp_image_base_type_enum_values);
enum_type = g_enum_register_static ("GimpBlendMode", gimp_blend_mode_enum_values);
return enum_type;
}
static const GEnumValue gimp_preview_size_enum_values[] =
static const GEnumValue gimp_bucket_fill_mode_enum_values[] =
{
{ GIMP_PREVIEW_SIZE_NONE, N_("None"), "none" },
{ GIMP_PREVIEW_SIZE_TINY, N_("Tiny"), "tiny" },
{ GIMP_PREVIEW_SIZE_EXTRA_SMALL, N_("Very Small"), "extra-small" },
{ GIMP_PREVIEW_SIZE_SMALL, N_("Small"), "small" },
{ GIMP_PREVIEW_SIZE_MEDIUM, N_("Medium"), "medium" },
{ GIMP_PREVIEW_SIZE_LARGE, N_("Large"), "large" },
{ GIMP_PREVIEW_SIZE_EXTRA_LARGE, N_("Very Large"), "extra-large" },
{ GIMP_PREVIEW_SIZE_HUGE, N_("Huge"), "huge" },
{ GIMP_PREVIEW_SIZE_ENORMOUS, N_("Enormous"), "enormous" },
{ GIMP_PREVIEW_SIZE_GIGANTIC, N_("Gigantic"), "gigantic" },
{ GIMP_FG_BUCKET_FILL, N_("FG Color Fill"), "fg-bucket-fill" },
{ GIMP_BG_BUCKET_FILL, N_("BG Color Fill"), "bg-bucket-fill" },
{ GIMP_PATTERN_BUCKET_FILL, N_("Pattern Fill"), "pattern-bucket-fill" },
{ 0, NULL, NULL }
};
GType
gimp_preview_size_get_type (void)
gimp_bucket_fill_mode_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpPreviewSize", gimp_preview_size_enum_values);
enum_type = g_enum_register_static ("GimpBucketFillMode", gimp_bucket_fill_mode_enum_values);
return enum_type;
}
static const GEnumValue gimp_selection_control_enum_values[] =
static const GEnumValue gimp_channel_type_enum_values[] =
{
{ GIMP_SELECTION_OFF, "GIMP_SELECTION_OFF", "off" },
{ GIMP_SELECTION_LAYER_OFF, "GIMP_SELECTION_LAYER_OFF", "layer-off" },
{ GIMP_SELECTION_ON, "GIMP_SELECTION_ON", "on" },
{ GIMP_SELECTION_PAUSE, "GIMP_SELECTION_PAUSE", "pause" },
{ GIMP_SELECTION_RESUME, "GIMP_SELECTION_RESUME", "resume" },
{ GIMP_RED_CHANNEL, "GIMP_RED_CHANNEL", "red-channel" },
{ GIMP_GREEN_CHANNEL, "GIMP_GREEN_CHANNEL", "green-channel" },
{ GIMP_BLUE_CHANNEL, "GIMP_BLUE_CHANNEL", "blue-channel" },
{ GIMP_GRAY_CHANNEL, "GIMP_GRAY_CHANNEL", "gray-channel" },
{ GIMP_INDEXED_CHANNEL, "GIMP_INDEXED_CHANNEL", "indexed-channel" },
{ GIMP_ALPHA_CHANNEL, "GIMP_ALPHA_CHANNEL", "alpha-channel" },
{ 0, NULL, NULL }
};
GType
gimp_selection_control_get_type (void)
gimp_channel_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpSelectionControl", gimp_selection_control_enum_values);
enum_type = g_enum_register_static ("GimpChannelType", gimp_channel_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_channel_type_enum_values[] =
static const GEnumValue gimp_gradient_type_enum_values[] =
{
{ GIMP_RED_CHANNEL, "GIMP_RED_CHANNEL", "red-channel" },
{ GIMP_GREEN_CHANNEL, "GIMP_GREEN_CHANNEL", "green-channel" },
{ GIMP_BLUE_CHANNEL, "GIMP_BLUE_CHANNEL", "blue-channel" },
{ GIMP_GRAY_CHANNEL, "GIMP_GRAY_CHANNEL", "gray-channel" },
{ GIMP_INDEXED_CHANNEL, "GIMP_INDEXED_CHANNEL", "indexed-channel" },
{ GIMP_ALPHA_CHANNEL, "GIMP_ALPHA_CHANNEL", "alpha-channel" },
{ GIMP_LINEAR, N_("Linear"), "linear" },
{ GIMP_BILINEAR, N_("Bi-Linear"), "bilinear" },
{ GIMP_RADIAL, N_("Radial"), "radial" },
{ GIMP_SQUARE, N_("Square"), "square" },
{ GIMP_CONICAL_SYMMETRIC, N_("Conical (symmetric)"), "conical-symmetric" },
{ GIMP_CONICAL_ASYMMETRIC, N_("Conical (asymmetric)"), "conical-asymmetric" },
{ GIMP_SHAPEBURST_ANGULAR, N_("Shapeburst (angular)"), "shapeburst-angular" },
{ GIMP_SHAPEBURST_SPHERICAL, N_("Shapeburst (spherical)"), "shapeburst-spherical" },
{ GIMP_SHAPEBURST_DIMPLED, N_("Shapeburst (dimpled)"), "shapeburst-dimpled" },
{ GIMP_SPIRAL_CLOCKWISE, N_("Spiral (clockwise)"), "spiral-clockwise" },
{ GIMP_SPIRAL_ANTICLOCKWISE, N_("Spiral (anticlockwise)"), "spiral-anticlockwise" },
{ 0, NULL, NULL }
};
GType
gimp_channel_type_get_type (void)
gimp_gradient_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpChannelType", gimp_channel_type_enum_values);
enum_type = g_enum_register_static ("GimpGradientType", gimp_gradient_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_blend_mode_enum_values[] =
static const GEnumValue gimp_image_base_type_enum_values[] =
{
{ GIMP_FG_BG_RGB_MODE, N_("FG to BG (RGB)"), "fg-bg-rgb-mode" },
{ GIMP_FG_BG_HSV_MODE, N_("FG to BG (HSV)"), "fg-bg-hsv-mode" },
{ GIMP_FG_TRANSPARENT_MODE, N_("FG to Transparent"), "fg-transparent-mode" },
{ GIMP_CUSTOM_MODE, N_("Custom Gradient"), "custom-mode" },
{ GIMP_RGB, "GIMP_RGB", "rgb" },
{ GIMP_GRAY, "GIMP_GRAY", "gray" },
{ GIMP_INDEXED, "GIMP_INDEXED", "indexed" },
{ 0, NULL, NULL }
};
GType
gimp_blend_mode_get_type (void)
gimp_image_base_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpBlendMode", gimp_blend_mode_enum_values);
enum_type = g_enum_register_static ("GimpImageBaseType", gimp_image_base_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_gradient_type_enum_values[] =
static const GEnumValue gimp_preview_size_enum_values[] =
{
{ GIMP_LINEAR, N_("Linear"), "linear" },
{ GIMP_BILINEAR, N_("Bi-Linear"), "bilinear" },
{ GIMP_RADIAL, N_("Radial"), "radial" },
{ GIMP_SQUARE, N_("Square"), "square" },
{ GIMP_CONICAL_SYMMETRIC, N_("Conical (symmetric)"), "conical-symmetric" },
{ GIMP_CONICAL_ASYMMETRIC, N_("Conical (asymmetric)"), "conical-asymmetric" },
{ GIMP_SHAPEBURST_ANGULAR, N_("Shapeburst (angular)"), "shapeburst-angular" },
{ GIMP_SHAPEBURST_SPHERICAL, N_("Shapeburst (spherical)"), "shapeburst-spherical" },
{ GIMP_SHAPEBURST_DIMPLED, N_("Shapeburst (dimpled)"), "shapeburst-dimpled" },
{ GIMP_SPIRAL_CLOCKWISE, N_("Spiral (clockwise)"), "spiral-clockwise" },
{ GIMP_SPIRAL_ANTICLOCKWISE, N_("Spiral (anticlockwise)"), "spiral-anticlockwise" },
{ GIMP_PREVIEW_SIZE_NONE, N_("None"), "none" },
{ GIMP_PREVIEW_SIZE_TINY, N_("Tiny"), "tiny" },
{ GIMP_PREVIEW_SIZE_EXTRA_SMALL, N_("Very Small"), "extra-small" },
{ GIMP_PREVIEW_SIZE_SMALL, N_("Small"), "small" },
{ GIMP_PREVIEW_SIZE_MEDIUM, N_("Medium"), "medium" },
{ GIMP_PREVIEW_SIZE_LARGE, N_("Large"), "large" },
{ GIMP_PREVIEW_SIZE_EXTRA_LARGE, N_("Very Large"), "extra-large" },
{ GIMP_PREVIEW_SIZE_HUGE, N_("Huge"), "huge" },
{ GIMP_PREVIEW_SIZE_ENORMOUS, N_("Enormous"), "enormous" },
{ GIMP_PREVIEW_SIZE_GIGANTIC, N_("Gigantic"), "gigantic" },
{ 0, NULL, NULL }
};
GType
gimp_gradient_type_get_type (void)
gimp_preview_size_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpGradientType", gimp_gradient_type_enum_values);
enum_type = g_enum_register_static ("GimpPreviewSize", gimp_preview_size_enum_values);
return enum_type;
}
......@@ -169,6 +167,48 @@ gimp_repeat_mode_get_type (void)
}
static const GEnumValue gimp_selection_control_enum_values[] =
{
{ GIMP_SELECTION_OFF, "GIMP_SELECTION_OFF", "off" },
{ GIMP_SELECTION_LAYER_OFF, "GIMP_SELECTION_LAYER_OFF", "layer-off" },
{ GIMP_SELECTION_ON, "GIMP_SELECTION_ON", "on" },
{ GIMP_SELECTION_PAUSE, "GIMP_SELECTION_PAUSE", "pause" },
{ GIMP_SELECTION_RESUME, "GIMP_SELECTION_RESUME", "resume" },
{ 0, NULL, NULL }
};
GType
gimp_selection_control_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpSelectionControl", gimp_selection_control_enum_values);
return enum_type;
}
static const GEnumValue gimp_transfer_mode_enum_values[] =
{
{ GIMP_SHADOWS, N_("Shadows"), "shadows" },
{ GIMP_MIDTONES, N_("Midtones"), "midtones" },
{ GIMP_HIGHLIGHTS, N_("Highlights"), "highlights" },
{ 0, NULL, NULL }
};
GType
gimp_transfer_mode_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpTransferMode", gimp_transfer_mode_enum_values);
return enum_type;
}
static const GEnumValue gimp_transform_direction_enum_values[] =
{
{ GIMP_TRANSFORM_FORWARD, N_("Forward (Traditional)"), "forward" },
......
......@@ -36,49 +36,29 @@
* these enums that are registered with the type system
*/
#define GIMP_TYPE_IMAGE_BASE_TYPE (gimp_image_base_type_get_type ())
#define GIMP_TYPE_BLEND_MODE (gimp_blend_mode_get_type ())
GType gimp_image_base_type_get_type (void) G_GNUC_CONST;
GType gimp_blend_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_RGB,
GIMP_GRAY,
GIMP_INDEXED
} GimpImageBaseType;
#define GIMP_TYPE_PREVIEW_SIZE (gimp_preview_size_get_type ())
GType gimp_preview_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_PREVIEW_SIZE_NONE = 0, /*< desc="None" >*/
GIMP_PREVIEW_SIZE_TINY = 16, /*< desc="Tiny" >*/
GIMP_PREVIEW_SIZE_EXTRA_SMALL = 24, /*< desc="Very Small" >*/
GIMP_PREVIEW_SIZE_SMALL = 32, /*< desc="Small" >*/
GIMP_PREVIEW_SIZE_MEDIUM = 48, /*< desc="Medium" >*/
GIMP_PREVIEW_SIZE_LARGE = 64, /*< desc="Large" >*/
GIMP_PREVIEW_SIZE_EXTRA_LARGE = 96, /*< desc="Very Large" >*/
GIMP_PREVIEW_SIZE_HUGE = 128, /*< desc="Huge" >*/
GIMP_PREVIEW_SIZE_ENORMOUS = 192, /*< desc="Enormous" >*/
GIMP_PREVIEW_SIZE_GIGANTIC = 256 /*< desc="Gigantic" >*/
} GimpPreviewSize;
GIMP_FG_BG_RGB_MODE, /*< desc="FG to BG (RGB)" >*/
GIMP_FG_BG_HSV_MODE, /*< desc="FG to BG (HSV)" >*/
GIMP_FG_TRANSPARENT_MODE, /*< desc="FG to Transparent" >*/
GIMP_CUSTOM_MODE /*< desc="Custom Gradient" >*/
} GimpBlendMode;
#define GIMP_TYPE_SELECTION_CONTROL (gimp_selection_control_get_type ())
#define GIMP_TYPE_BUCKET_FILL_MODE (gimp_bucket_fill_mode_get_type ())
GType gimp_selection_control_get_type (void) G_GNUC_CONST;
GType gimp_bucket_fill_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
typedef enum
{
GIMP_SELECTION_OFF,
GIMP_SELECTION_LAYER_OFF,
GIMP_SELECTION_ON,
GIMP_SELECTION_PAUSE,
GIMP_SELECTION_RESUME
} GimpSelectionControl;
GIMP_FG_BUCKET_FILL, /*< desc="FG Color Fill" >*/
GIMP_BG_BUCKET_FILL, /*< desc="BG Color Fill" >*/
GIMP_PATTERN_BUCKET_FILL /*< desc="Pattern Fill" >*/
} GimpBucketFillMode;
#define GIMP_TYPE_CHANNEL_TYPE (gimp_channel_type_get_type ())
......@@ -96,19 +76,6 @@ typedef enum
} GimpChannelType;
#define GIMP_TYPE_BLEND_MODE (gimp_blend_mode_get_type ())
GType gimp_blend_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_FG_BG_RGB_MODE, /*< desc="FG to BG (RGB)" >*/
GIMP_FG_BG_HSV_MODE, /*< desc="FG to BG (HSV)" >*/
GIMP_FG_TRANSPARENT_MODE, /*< desc="FG to Transparent" >*/
GIMP_CUSTOM_MODE /*< desc="Custom Gradient" >*/
} GimpBlendMode;
#define GIMP_TYPE_GRADIENT_TYPE (gimp_gradient_type_get_type ())
GType gimp_gradient_type_get_type (void) G_GNUC_CONST;
......@@ -129,6 +96,37 @@ typedef enum
} GimpGradientType;
#define GIMP_TYPE_IMAGE_BASE_TYPE (gimp_image_base_type_get_type ())
GType gimp_image_base_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_RGB,
GIMP_GRAY,
GIMP_INDEXED
} GimpImageBaseType;
#define GIMP_TYPE_PREVIEW_SIZE (gimp_preview_size_get_type ())
GType gimp_preview_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_PREVIEW_SIZE_NONE = 0, /*< desc="None" >*/
GIMP_PREVIEW_SIZE_TINY = 16, /*< desc="Tiny" >*/
GIMP_PREVIEW_SIZE_EXTRA_SMALL = 24, /*< desc="Very Small" >*/
GIMP_PREVIEW_SIZE_SMALL = 32, /*< desc="Small" >*/
GIMP_PREVIEW_SIZE_MEDIUM = 48, /*< desc="Medium" >*/
GIMP_PREVIEW_SIZE_LARGE = 64, /*< desc="Large" >*/
GIMP_PREVIEW_SIZE_EXTRA_LARGE = 96, /*< desc="Very Large" >*/
GIMP_PREVIEW_SIZE_HUGE = 128, /*< desc="Huge" >*/
GIMP_PREVIEW_SIZE_ENORMOUS = 192, /*< desc="Enormous" >*/
GIMP_PREVIEW_SIZE_GIGANTIC = 256 /*< desc="Gigantic" >*/
} GimpPreviewSize;
#define GIMP_TYPE_REPEAT_MODE (gimp_repeat_mode_get_type ())
GType gimp_repeat_mode_get_type (void) G_GNUC_CONST;
......@@ -141,6 +139,32 @@ typedef enum
} GimpRepeatMode;
#define GIMP_TYPE_SELECTION_CONTROL (gimp_selection_control_get_type ())
GType gimp_selection_control_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_SELECTION_OFF,
GIMP_SELECTION_LAYER_OFF,
GIMP_SELECTION_ON,
GIMP_SELECTION_PAUSE,
GIMP_SELECTION_RESUME
} GimpSelectionControl;
#define GIMP_TYPE_TRANSFER_MODE (gimp_transfer_mode_get_type ())
GType gimp_transfer_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_SHADOWS, /*< desc="Shadows" >*/
GIMP_MIDTONES, /*< desc="Midtones" >*/
GIMP_HIGHLIGHTS /*< desc="Highlights" >*/
} GimpTransferMode;
#define GIMP_TYPE_TRANSFORM_DIRECTION (gimp_transform_direction_get_type ())
GType gimp_transform_direction_get_type (void) G_GNUC_CONST;
......@@ -156,13 +180,6 @@ typedef enum /*< pdb-skip >*/
* non-registered enums; register them if needed
*/
typedef enum /*< skip >*/
{
GIMP_FG_BUCKET_FILL,
GIMP_BG_BUCKET_FILL,
GIMP_PATTERN_BUCKET_FILL
} GimpBucketFillMode;
typedef enum /*< skip >*/
{
GIMP_CHANNEL_OP_ADD,
......@@ -255,12 +272,5 @@ typedef enum /*< skip >*/
GIMP_OFFSET_TRANSPARENT
} GimpOffsetType;
typedef enum /*< skip >*/
{
GIMP_SHADOWS,
GIMP_MIDTONES,
GIMP_HIGHLIGHTS
} GimpTransferMode;
#endif /* __CORE_TYPES_H__ */
......@@ -49,15 +49,15 @@ typedef struct _GimpDodgeBurnOptions GimpDodgeBurnOptions;
struct _GimpDodgeBurnOptions
{
GimpPaintOptions paint_options;
GimpPaintOptions paint_options;
DodgeBurnType type;
DodgeBurnType type_d;
GtkWidget *type_w[2];
DodgeBurnType type;
DodgeBurnType type_d;
GtkWidget *type_w[2];
GimpTransferMode mode; /*highlights, midtones, shadows*/
GimpTransferMode mode_d;
GtkWidget *mode_w[3];
GtkWidget *mode_w;
gdouble exposure;
gdouble exposure_d;
......
......@@ -38,6 +38,8 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h"
#include "widgets/gimpenummenu.h"
#include "gimpbucketfilltool.h"
#include "paint_options.h"
......@@ -67,7 +69,7 @@ struct _BucketOptions
GimpBucketFillMode fill_mode;
GimpBucketFillMode fill_mode_d;
GtkWidget *fill_mode_w[3];
GtkWidget *fill_mode_w;
};
......@@ -263,14 +265,12 @@ gimp_bucket_fill_tool_modifier_key (GimpTool *tool,
switch (options->fill_mode)
{
case GIMP_FG_BUCKET_FILL:
gimp_radio_group_set_active
(GTK_RADIO_BUTTON (options->fill_mode_w[0]),
GINT_TO_POINTER (GIMP_BG_BUCKET_FILL));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->fill_mode_w),
GINT_TO_POINTER (GIMP_BG_BUCKET_FILL));
break;
case GIMP_BG_BUCKET_FILL:
gimp_radio_group_set_active
(GTK_RADIO_BUTTON (options->fill_mode_w[0]),
GINT_TO_POINTER (GIMP_FG_BUCKET_FILL));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->fill_mode_w),
GINT_TO_POINTER (GIMP_FG_BUCKET_FILL));
break;
default:
break;
......@@ -354,24 +354,14 @@ bucket_options_new (GimpToolInfo *tool_info)
vbox = ((GimpToolOptions *) options)->main_vbox;
/* fill type */
frame = gimp_radio_group_new2 (TRUE, _("Fill Type (<Ctrl>)"),
G_CALLBACK (gimp_radio_button_update),
&options->fill_mode,
GINT_TO_POINTER (options->fill_mode),
_("FG Color Fill"),
GINT_TO_POINTER (GIMP_FG_BUCKET_FILL),
&options->fill_mode_w[0],
_("BG Color Fill"),
GINT_TO_POINTER (GIMP_BG_BUCKET_FILL),
&options->fill_mode_w[1],
_("Pattern Fill"),
GINT_TO_POINTER (GIMP_PATTERN_BUCKET_FILL),
&options->fill_mode_w[2],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_BUCKET_FILL_MODE,
gtk_label_new (_("Fill Type (<Ctrl>)")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->fill_mode,
&options->fill_mode_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->fill_mode_w),
GINT_TO_POINTER (options->fill_mode));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......@@ -457,6 +447,6 @@ bucket_options_reset (GimpToolOptions *tool_options)
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->threshold_w),
gimprc.default_threshold);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->fill_mode_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->fill_mode_w),
GINT_TO_POINTER (options->fill_mode_d));
}
......@@ -28,6 +28,8 @@
#include "paint/gimpdodgeburn.h"
#include "widgets/gimpenummenu.h"
#include "gimpdodgeburntool.h"
#include "paint_options.h"
......@@ -213,24 +215,14 @@ gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info)
gtk_widget_show (frame);
/* mode (highlights, midtones, or shadows) */
frame = gimp_radio_group_new2 (TRUE, _("Mode"),
G_CALLBACK (gimp_radio_button_update),
&options->mode,
GINT_TO_POINTER (options->mode),
_("Highlights"),
GINT_TO_POINTER (GIMP_HIGHLIGHTS),
&options->mode_w[0],
_("Midtones"),
GINT_TO_POINTER (GIMP_MIDTONES),
&options->mode_w[1],
_("Shadows"),
GINT_TO_POINTER (GIMP_SHADOWS),
&options->mode_w[2],
NULL);
frame = gimp_enum_radio_frame_new (GIMP_TYPE_TRANSFER_MODE,
gtk_label_new (_("Mode")),
2,
G_CALLBACK (gimp_radio_button_update),
&options->mode,
&options->mode_w);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->mode_w),
GINT_TO_POINTER (options->mode));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......@@ -270,6 +262,6 @@ gimp_dodgeburn_tool_options_reset (GimpToolOptions *tool_options)
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->mode_w[0]),
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->mode_w),
GINT_TO_POINTER (options->mode_d));
}
......@@ -34,6 +34,8 @@
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-scale.h"
#include "widgets/gimpenummenu.h"
#include "gimpmagnifytool.h"
#include "tool_options.h"
......@@ -54,7 +56,7 @@ struct _MagnifyOptions
GimpZoomType type;
GimpZoomType type_d;
GtkWidget *type_w[2];
GtkWidget *type_w;
gdouble threshold;