register GimpPaintApplicationMode with the type system.
2003-03-24 Michael Natterer <mitch@gimp.org> * app/paint/paint-enums.[ch]: register GimpPaintApplicationMode with the type system. * app/paint/gimppaintoptions.[ch]: replaced "gboolean incremental" with "GimpPaintApplicationMode application_mode" * app/paint/gimpairbrush.c * app/paint/gimperaser.c * app/paint/gimppaintbrush.c * app/paint/gimppencil.c: changed accordingly. * tools/pdbgen/pdb/paint_tools.pdb: ditto. Set all paint options values using g_object_set(). * app/widgets/gimppropwidgets.[ch]: added gimp_prop_enum_check_button_new() which can represent two specified enum values and renders itself "inconsistent" for all other values. * app/tools/paint_options.c: use it for the "Incremental" toggle. * app/pdb/paint_tools_cmds.c * tools/pdbgen/enums.pl: regenerated.
This commit is contained in:

committed by
Michael Natterer

parent
3d8cc9a2a1
commit
c40a6f9920
@ -397,13 +397,6 @@ package Gimp::CodeGen::enums;
|
||||
mapping => { GIMP_BLUR_CONVOLVE => '0',
|
||||
GIMP_SHARPEN_CONVOLVE => '1' }
|
||||
},
|
||||
GimpBrushApplicationMode =>
|
||||
{ contig => 1,
|
||||
header => 'paint/paint-enums.h',
|
||||
symbols => [ qw(GIMP_BRUSH_HARD GIMP_BRUSH_SOFT) ],
|
||||
mapping => { GIMP_BRUSH_HARD => '0',
|
||||
GIMP_BRUSH_SOFT => '1' }
|
||||
},
|
||||
GimpPaintApplicationMode =>
|
||||
{ contig => 1,
|
||||
header => 'paint/paint-enums.h',
|
||||
@ -411,6 +404,13 @@ package Gimp::CodeGen::enums;
|
||||
mapping => { GIMP_PAINT_CONSTANT => '0',
|
||||
GIMP_PAINT_INCREMENTAL => '1' }
|
||||
},
|
||||
GimpBrushApplicationMode =>
|
||||
{ contig => 1,
|
||||
header => 'paint/paint-enums.h',
|
||||
symbols => [ qw(GIMP_BRUSH_HARD GIMP_BRUSH_SOFT) ],
|
||||
mapping => { GIMP_BRUSH_HARD => '0',
|
||||
GIMP_BRUSH_SOFT => '1' }
|
||||
},
|
||||
GimpRunMode =>
|
||||
{ contig => 1,
|
||||
header => 'plug-in/plug-in-types.h',
|
||||
|
@ -290,8 +290,10 @@ HELP
|
||||
{
|
||||
options = gimp_paint_options_new (gimp, GIMP_TYPE_CONVOLVE_OPTIONS);
|
||||
|
||||
GIMP_CONVOLVE_OPTIONS (options)->type = convolve_type;
|
||||
GIMP_CONVOLVE_OPTIONS (options)->rate = pressure;
|
||||
g_object_set (options,
|
||||
"type", convolve_type,
|
||||
"rate", pressure,
|
||||
NULL);
|
||||
|
||||
success = paint_tools_stroke (gimp,
|
||||
GIMP_TYPE_CONVOLVE,
|
||||
@ -367,9 +369,10 @@ HELP
|
||||
{
|
||||
options = gimp_paint_options_new (gimp, GIMP_TYPE_ERASER_OPTIONS);
|
||||
|
||||
options->incremental = method;
|
||||
|
||||
GIMP_ERASER_OPTIONS (options)->hard = hardness;
|
||||
g_object_set (options,
|
||||
"application-mode", method,
|
||||
"hard", hardness,
|
||||
NULL);
|
||||
|
||||
success = paint_tools_stroke (gimp,
|
||||
GIMP_TYPE_ERASER,
|
||||
@ -410,10 +413,11 @@ HELP
|
||||
{
|
||||
options = gimp_paint_options_new (gimp, GIMP_TYPE_ERASER_OPTIONS);
|
||||
|
||||
options->incremental = method;
|
||||
|
||||
GIMP_ERASER_OPTIONS (options)->hard = hardness;
|
||||
GIMP_ERASER_OPTIONS (options)->anti_erase = TRUE;
|
||||
g_object_set (options,
|
||||
"application-mode", method,
|
||||
"hard", hardness,
|
||||
"anti-erase", TRUE,
|
||||
NULL);
|
||||
|
||||
success = paint_tools_stroke (gimp,
|
||||
GIMP_TYPE_ERASER,
|
||||
@ -462,10 +466,11 @@ HELP
|
||||
{
|
||||
options = gimp_paint_options_new (gimp, GIMP_TYPE_PAINT_OPTIONS);
|
||||
|
||||
options->incremental = method;
|
||||
|
||||
options->gradient_options->fade_length = fade_out;
|
||||
options->gradient_options->gradient_length = gradient_length;
|
||||
g_object_set (options,
|
||||
"application-mode", method,
|
||||
"fade-length", fade_out,
|
||||
"gradient-length", gradient_length,
|
||||
NULL);
|
||||
|
||||
success = paint_tools_stroke (gimp,
|
||||
GIMP_TYPE_PAINTBRUSH,
|
||||
@ -583,7 +588,9 @@ HELP
|
||||
{
|
||||
options = gimp_paint_options_new (gimp, GIMP_TYPE_SMUDGE_OPTIONS);
|
||||
|
||||
GIMP_SMUDGE_OPTIONS (options)->rate = pressure;
|
||||
g_object_set (options,
|
||||
"rate", pressure,
|
||||
NULL);
|
||||
|
||||
success = paint_tools_stroke (gimp,
|
||||
GIMP_TYPE_SMUDGE,
|
||||
@ -663,9 +670,11 @@ HELP
|
||||
{
|
||||
options = gimp_paint_options_new (gimp, GIMP_TYPE_DODGE_BURN_OPTIONS);
|
||||
|
||||
GIMP_DODGE_BURN_OPTIONS (options)->exposure = exposure;
|
||||
GIMP_DODGE_BURN_OPTIONS (options)->type = dodgeburn_type;
|
||||
GIMP_DODGE_BURN_OPTIONS (options)->mode = dodgeburn_mode;
|
||||
g_object_set (options,
|
||||
"type", dodgeburn_type,
|
||||
"mode", dodgeburn_mode,
|
||||
"exposure", exposure,
|
||||
NULL);
|
||||
|
||||
success = paint_tools_stroke (gimp,
|
||||
GIMP_TYPE_DODGE_BURN,
|
||||
|
Reference in New Issue
Block a user