Commit b2409679 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

fixed a comment.

2001-11-18  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplay-foreach.c: fixed a comment.

	* app/gui/file-open-dialog.c: no need to declare
	"extern GSList *display_list;".

	* app/gui/brush-select.c
	* tools/pdbgen/pdb/brush_select.pdb: pass opacity as [0.0..100.0]
	through the PDB and as [0.0..1.0] to the app.

	* app/pdb/brush_select_cmds.c: regenerated.

	* plug-ins/gfig/gfig.c: full opacity is 100.0, not 1.0.

	(GFig and script-fu may still be broken after this change).
parent 1c71b7c5
2001-11-18 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplay-foreach.c: fixed a comment.
* app/gui/file-open-dialog.c: no need to declare
"extern GSList *display_list;".
* app/gui/brush-select.c
* tools/pdbgen/pdb/brush_select.pdb: pass opacity as [0.0..100.0]
through the PDB and as [0.0..1.0] to the app.
* app/pdb/brush_select_cmds.c: regenerated.
* plug-ins/gfig/gfig.c: full opacity is 100.0, not 1.0.
(GFig and script-fu may still be broken after this change).
2001-11-17 Michael Natterer <mitch@gimp.org>
Made --no-interface not calling gtk_init() (and thus not
......
......@@ -93,8 +93,6 @@ static gchar *preview_fullname = NULL;
static PlugInProcDef *load_file_proc = NULL;
extern GSList *display_list; /* from gdisplay.c */
/* public functions */
......
......@@ -379,7 +379,7 @@ brush_select_change_callbacks (BrushSelect *bsp,
name,
&nreturn_vals,
GIMP_PDB_STRING, GIMP_OBJECT (brush)->name,
GIMP_PDB_FLOAT, gimp_context_get_opacity (bsp->context),
GIMP_PDB_FLOAT, gimp_context_get_opacity (bsp->context) * 100.0,
GIMP_PDB_INT32, bsp->spacing_value,
GIMP_PDB_INT32, (gint) gimp_context_get_paint_mode (bsp->context),
GIMP_PDB_INT32, brush->mask->width,
......
......@@ -93,8 +93,6 @@ static gchar *preview_fullname = NULL;
static PlugInProcDef *load_file_proc = NULL;
extern GSList *display_list; /* from gdisplay.c */
/* public functions */
......
......@@ -76,8 +76,12 @@ brushes_popup_invoker (Gimp *gimp,
brush = (gchar *) args[2].value.pdb_pointer;
opacity = args[3].value.pdb_float;
if (opacity < 0.0 || opacity > 100.0)
success = FALSE;
spacing = args[4].value.pdb_int;
if (spacing < 0 || spacing > 1000)
success = FALSE;
paint_mode = args[5].value.pdb_int;
if (paint_mode < NORMAL_MODE || paint_mode > HARDLIGHT_MODE)
......@@ -88,7 +92,9 @@ brushes_popup_invoker (Gimp *gimp,
if ((prec = procedural_db_lookup (gimp, name)))
{
if (brush && strlen (brush))
newdialog = brush_select_new (gimp, title, brush, opacity, spacing,
newdialog = brush_select_new (gimp, title, brush,
opacity / 100.0,
spacing,
paint_mode, name);
else
newdialog = brush_select_new (gimp, title, NULL, 0.0, 0, 0, name);
......@@ -228,8 +234,12 @@ brushes_set_popup_invoker (Gimp *gimp,
success = FALSE;
opacity = args[2].value.pdb_float;
if (opacity < 0.0 || opacity > 100.0)
success = FALSE;
spacing = args[3].value.pdb_int;
if (spacing < 0 || spacing > 1000)
success = FALSE;
paint_mode = args[4].value.pdb_int;
if (paint_mode < NORMAL_MODE || paint_mode > HARDLIGHT_MODE)
......@@ -254,7 +264,7 @@ brushes_set_popup_invoker (Gimp *gimp,
/* Updating the context updates the widgets as well */
gimp_context_set_brush (bsp->context, active);
gimp_context_set_opacity (bsp->context, opacity);
gimp_context_set_opacity (bsp->context, opacity / 100.0);
gimp_context_set_paint_mode (bsp->context, paint_mode);
gtk_adjustment_set_value (spacing_adj, spacing);
......
......@@ -2942,7 +2942,7 @@ select_brush_callback (GtkWidget *widget,
gimp_interactive_selection_brush (_("Gfig brush selection"),
mygimp_brush_get (),
1.0, /* Opacity */
100.0, /* Opacity */
-1, /* spacing (default)*/
1, /* Paint mode */
gfig_brush_invoker,
......
......@@ -23,9 +23,11 @@ sub pdb_misc {
}
sub brush_args {(
{ name => 'opacity', type => 'float',
{ name => 'opacity',
type => '0 <= float <= 100',
desc => 'The initial opacity of the brush' },
{ name => 'spacing', type => 'int32',
{ name => 'spacing',
type => '0 <= int32 <= 1000',
desc => 'The initial spacing of the brush (if < 0 then use brush default
spacing)' },
{ name => 'paint_mode', type => 'enum LayerModeEffects',
......@@ -58,7 +60,9 @@ sub brushes_popup {
if ((prec = procedural_db_lookup (gimp, name)))
{
if (brush && strlen (brush))
newdialog = brush_select_new (gimp, title, brush, opacity, spacing,
newdialog = brush_select_new (gimp, title, brush,
opacity / 100.0,
spacing,
paint_mode, name);
else
newdialog = brush_select_new (gimp, title, NULL, 0.0, 0, 0, name);
......@@ -141,7 +145,7 @@ sub brushes_set_popup {
/* Updating the context updates the widgets as well */
gimp_context_set_brush (bsp->context, active);
gimp_context_set_opacity (bsp->context, opacity);
gimp_context_set_opacity (bsp->context, opacity / 100.0);
gimp_context_set_paint_mode (bsp->context, paint_mode);
gtk_adjustment_set_value (spacing_adj, spacing);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment