GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit e26e778d authored by Sven Neumann's avatar Sven Neumann

app/drawable_cmds.c applied (a modified version of) a patch from Garry R.

        * app/drawable_cmds.c
        * tools/pdbgen/pdb/drawable.pdb: applied (a modified version of) a
        patch from Garry R. Osgood <gosgood@idt.net> that should fix bug #2202
        and problems with the Warp plug-in.

        * app/main.c
        * po-plug-ins/POTFILES.in
        * plug-ins/common/mail.c: applied a patch from
        SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> that handles i18n issues         and fixes a problem in the mail plug-in.
        ( Could someone please check if the change to app/main.c is the right
          thing to do ?! )

        * po-plug-ins/POTFILES.in
        * plug-ins/common/grid.c
        * plug-ins/gap/iter_ALT/gen/plug_in_grid_iter_ALT.inc:
        checked in a new version of the Grid plug_in developed by
        Tom Rathborne <tomr@aceldama.com> and me.

--Sven
parent 35cb0fa4
Mon Nov 1 13:27:14 MET 1999 Sven Neumann <sven@gimp.org>
* app/drawable_cmds.c
* tools/pdbgen/pdb/drawable.pdb: applied (a modified version of) a
patch from Garry R. Osgood <gosgood@idt.net> that should fix bug #2202
and problems with the Warp plug-in.
* app/main.c
* po-plug-ins/POTFILES.in
* plug-ins/common/mail.c: applied a patch from
SHIRASAKI Yasuhiro <yasuhiro@awa.tohoku.ac.jp> that handles i18n issues
and fixes a problem in the mail plug-in.
( Could someone please check if the change to app/main.c is the right
thing to do ?! )
* po-plug-ins/POTFILES.in
* plug-ins/common/grid.c
* plug-ins/gap/iter_ALT/gen/plug_in_grid_iter_ALT.inc:
checked in a new version of the Grid plug_in developed by
Tom Rathborne <tomr@aceldama.com> and me.
Sun Oct 31 21:51:10 MET 1999 Sven Neumann <sven@gimp.org>
* libgimp/Makefile.am
......
......@@ -42,9 +42,9 @@ static ProcRecord drawable_bytes_proc;
static ProcRecord drawable_width_proc;
static ProcRecord drawable_height_proc;
static ProcRecord drawable_offsets_proc;
static ProcRecord drawable_is_layer_proc;
static ProcRecord drawable_is_layer_mask_proc;
static ProcRecord drawable_is_channel_proc;
static ProcRecord drawable_layer_proc;
static ProcRecord drawable_layer_mask_proc;
static ProcRecord drawable_channel_proc;
static ProcRecord drawable_get_pixel_proc;
static ProcRecord drawable_set_pixel_proc;
static ProcRecord drawable_set_image_proc;
......@@ -68,9 +68,9 @@ register_drawable_procs (void)
procedural_db_register (&drawable_width_proc);
procedural_db_register (&drawable_height_proc);
procedural_db_register (&drawable_offsets_proc);
procedural_db_register (&drawable_is_layer_proc);
procedural_db_register (&drawable_is_layer_mask_proc);
procedural_db_register (&drawable_is_channel_proc);
procedural_db_register (&drawable_layer_proc);
procedural_db_register (&drawable_layer_mask_proc);
procedural_db_register (&drawable_channel_proc);
procedural_db_register (&drawable_get_pixel_proc);
procedural_db_register (&drawable_set_pixel_proc);
procedural_db_register (&drawable_set_image_proc);
......@@ -134,6 +134,8 @@ drawable_fill_invoker (Argument *args)
gint32 fill_type;
drawable = gimp_drawable_get_ID (args[0].value.pdb_int);
if (drawable == NULL)
success = FALSE;
fill_type = args[1].value.pdb_int;
if (fill_type < FOREGROUND_FILL || fill_type > NO_FILL)
......@@ -333,8 +335,11 @@ drawable_image_invoker (Argument *args)
GimpImage *gimage;
drawable = gimp_drawable_get_ID (args[0].value.pdb_int);
if (drawable == NULL)
success = FALSE;
success = (gimage = drawable_gimage (drawable)) != NULL;
if (success)
success = (gimage = drawable_gimage (drawable)) != NULL;
return_args = procedural_db_return_args (&drawable_image_proc, success);
......@@ -875,20 +880,20 @@ static ProcRecord drawable_offsets_proc =
};
static Argument *
drawable_is_layer_invoker (Argument *args)
drawable_layer_invoker (Argument *args)
{
Argument *return_args;
GimpDrawable *drawable;
drawable = gimp_drawable_get_ID (args[0].value.pdb_int);
return_args = procedural_db_return_args (&drawable_is_layer_proc, TRUE);
return_args = procedural_db_return_args (&drawable_layer_proc, TRUE);
return_args[1].value.pdb_int = drawable_layer (drawable) ? TRUE : FALSE;
return return_args;
}
static ProcArg drawable_is_layer_inargs[] =
static ProcArg drawable_layer_inargs[] =
{
{
PDB_DRAWABLE,
......@@ -897,7 +902,7 @@ static ProcArg drawable_is_layer_inargs[] =
}
};
static ProcArg drawable_is_layer_outargs[] =
static ProcArg drawable_layer_outargs[] =
{
{
PDB_INT32,
......@@ -906,9 +911,9 @@ static ProcArg drawable_is_layer_outargs[] =
}
};
static ProcRecord drawable_is_layer_proc =
static ProcRecord drawable_layer_proc =
{
"gimp_drawable_is_layer",
"gimp_drawable_layer",
"Returns whether the drawable is a layer.",
"This procedure returns non-zero if the specified drawable is a layer.",
"Spencer Kimball & Peter Mattis",
......@@ -916,27 +921,27 @@ static ProcRecord drawable_is_layer_proc =
"1995-1996",
PDB_INTERNAL,
1,
drawable_is_layer_inargs,
drawable_layer_inargs,
1,
drawable_is_layer_outargs,
{ { drawable_is_layer_invoker } }
drawable_layer_outargs,
{ { drawable_layer_invoker } }
};
static Argument *
drawable_is_layer_mask_invoker (Argument *args)
drawable_layer_mask_invoker (Argument *args)
{
Argument *return_args;
GimpDrawable *drawable;
drawable = gimp_drawable_get_ID (args[0].value.pdb_int);
return_args = procedural_db_return_args (&drawable_is_layer_mask_proc, TRUE);
return_args = procedural_db_return_args (&drawable_layer_mask_proc, TRUE);
return_args[1].value.pdb_int = drawable_layer_mask (drawable) ? TRUE : FALSE;
return return_args;
}
static ProcArg drawable_is_layer_mask_inargs[] =
static ProcArg drawable_layer_mask_inargs[] =
{
{
PDB_DRAWABLE,
......@@ -945,7 +950,7 @@ static ProcArg drawable_is_layer_mask_inargs[] =
}
};
static ProcArg drawable_is_layer_mask_outargs[] =
static ProcArg drawable_layer_mask_outargs[] =
{
{
PDB_INT32,
......@@ -954,9 +959,9 @@ static ProcArg drawable_is_layer_mask_outargs[] =
}
};
static ProcRecord drawable_is_layer_mask_proc =
static ProcRecord drawable_layer_mask_proc =
{
"gimp_drawable_is_layer_mask",
"gimp_drawable_layer_mask",
"Returns whether the drawable is a layer mask.",
"This procedure returns non-zero if the specified drawable is a layer mask.",
"Spencer Kimball & Peter Mattis",
......@@ -964,27 +969,27 @@ static ProcRecord drawable_is_layer_mask_proc =
"1995-1996",
PDB_INTERNAL,
1,
drawable_is_layer_mask_inargs,
drawable_layer_mask_inargs,
1,
drawable_is_layer_mask_outargs,
{ { drawable_is_layer_mask_invoker } }
drawable_layer_mask_outargs,
{ { drawable_layer_mask_invoker } }
};
static Argument *
drawable_is_channel_invoker (Argument *args)
drawable_channel_invoker (Argument *args)
{
Argument *return_args;
GimpDrawable *drawable;
drawable = gimp_drawable_get_ID (args[0].value.pdb_int);
return_args = procedural_db_return_args (&drawable_is_channel_proc, TRUE);
return_args = procedural_db_return_args (&drawable_channel_proc, TRUE);
return_args[1].value.pdb_int = drawable_channel (drawable) ? TRUE : FALSE;
return return_args;
}
static ProcArg drawable_is_channel_inargs[] =
static ProcArg drawable_channel_inargs[] =
{
{
PDB_DRAWABLE,
......@@ -993,7 +998,7 @@ static ProcArg drawable_is_channel_inargs[] =
}
};
static ProcArg drawable_is_channel_outargs[] =
static ProcArg drawable_channel_outargs[] =
{
{
PDB_INT32,
......@@ -1002,9 +1007,9 @@ static ProcArg drawable_is_channel_outargs[] =
}
};
static ProcRecord drawable_is_channel_proc =
static ProcRecord drawable_channel_proc =
{
"gimp_drawable_is_channel",
"gimp_drawable_channel",
"Returns whether the drawable is a channel.",
"This procedure returns non-zero if the specified drawable is a channel.",
"Spencer Kimball & Peter Mattis",
......@@ -1012,10 +1017,10 @@ static ProcRecord drawable_is_channel_proc =
"1995-1996",
PDB_INTERNAL,
1,
drawable_is_channel_inargs,
drawable_channel_inargs,
1,
drawable_is_channel_outargs,
{ { drawable_is_channel_invoker } }
drawable_channel_outargs,
{ { drawable_channel_invoker } }
};
static Argument *
......
......@@ -121,6 +121,7 @@ main (int argc, char **argv)
/* Initialize i18n support */
INIT_LOCALE("gimp");
bindtextdomain("gimp-std-plugins", LOCALEDIR);
gtk_init (&argc, &argv);
......
This diff is collapsed.
......@@ -181,7 +181,7 @@ static m_info mail_info = {
if you prefer that as the default */
};
static gchar * mesg_body;
static gchar * mesg_body = "\0";
static int run_flag = 0;
MAIN ()
......
......@@ -6,10 +6,21 @@ gint p_plug_in_grid_iter_ALT(GRunModeType run_mode, gint32 total_steps, gdouble
{
typedef struct t_plug_in_grid_Vals
{
long width;
long height;
long x_offset;
long y_offset;
long hwidth;
long hspace;
long hoffset;
t_color hcolor;
char hopacity;
long vwidth;
long vspace;
long voffset;
t_color vcolor;
char vopacity;
long iwidth;
long ispace;
long ioffset;
t_color icolor;
char iopacity;
} t_plug_in_grid_Vals;
t_plug_in_grid_Vals buf, *buf_from, *buf_to;
......@@ -28,10 +39,21 @@ gint p_plug_in_grid_iter_ALT(GRunModeType run_mode, gint32 total_steps, gdouble
buf_to = (t_plug_in_grid_Vals *)&g_plugin_data_to[0];
memcpy(&buf, buf_from, sizeof(buf));
p_delta_long(&buf.width, buf_from->width, buf_to->width, total_steps, current_step);
p_delta_long(&buf.height, buf_from->height, buf_to->height, total_steps, current_step);
p_delta_long(&buf.x_offset, buf_from->x_offset, buf_to->x_offset, total_steps, current_step);
p_delta_long(&buf.y_offset, buf_from->y_offset, buf_to->y_offset, total_steps, current_step);
p_delta_long(&buf.hwidth, buf_from->hwidth, buf_to->hwidth, total_steps, current_step);
p_delta_long(&buf.hspace, buf_from->hspace, buf_to->hspace, total_steps, current_step);
p_delta_long(&buf.hoffset, buf_from->hoffset, buf_to->hoffset, total_steps, current_step);
p_delta_color(&buf.hcolor, &buf_from->hcolor, &buf_to->hcolor, total_steps, current_step);
p_delta_char(&buf.hopacity, buf_from->hopacity, buf_to->hopacity, total_steps, current_step);
p_delta_long(&buf.vwidth, buf_from->vwidth, buf_to->vwidth, total_steps, current_step);
p_delta_long(&buf.vspace, buf_from->vspace, buf_to->vspace, total_steps, current_step);
p_delta_long(&buf.voffset, buf_from->voffset, buf_to->voffset, total_steps, current_step);
p_delta_color(&buf.vcolor, &buf_from->vcolor, &buf_to->vcolor, total_steps, current_step);
p_delta_char(&buf.vopacity, buf_from->vopacity, buf_to->vopacity, total_steps, current_step);
p_delta_long(&buf.iwidth, buf_from->iwidth, buf_to->iwidth, total_steps, current_step);
p_delta_long(&buf.ispace, buf_from->ispace, buf_to->ispace, total_steps, current_step);
p_delta_long(&buf.ioffset, buf_from->ioffset, buf_to->ioffset, total_steps, current_step);
p_delta_color(&buf.icolor, &buf_from->icolor, &buf_to->icolor, total_steps, current_step);
p_delta_char(&buf.iopacity, buf_from->iopacity, buf_to->iopacity, total_steps, current_step);
gimp_set_data("plug_in_grid", &buf, sizeof(buf));
......
......@@ -31,7 +31,9 @@ plug-ins/common/depthmerge.c
plug-ins/common/destripe.c
plug-ins/common/gif.c
plug-ins/common/gifload.c
plug-ins/common/grid.c
plug-ins/common/film.c
plug-ins/common/mail.c
plug-ins/common/normalize.c
plug-ins/common/oilify.c
plug-ins/common/png.c
......
......@@ -130,6 +130,7 @@ HELP
{ name => 'fill_type', type => 'enum GimpFillType',
desc => 'The type of fill: %%desc%%' }
);
delete $inargs[0]->{no_success};
%invoke = ( code => 'drawable_fill (drawable, (GimpFillType) fill_type);' );
}
......@@ -212,6 +213,8 @@ sub drawable_image {
@outargs = ( &std_image_arg );
$outargs[0]->{desc} = "The drawable's image";
delete $inargs[0]->{no_success};
%invoke = (
code => 'success = (gimage = drawable_gimage (drawable)) != NULL;'
);
......@@ -309,15 +312,15 @@ HELP
%invoke = ( code => 'drawable_offsets (drawable, &offset_x, &offset_y);' );
}
sub drawable_is_layer {
sub drawable_layer {
&drawable_is_proc('layer');
}
sub drawable_is_layer_mask {
sub drawable_layer_mask {
&drawable_is_proc('layer mask');
}
sub drawable_is_channel {
sub drawable_channel {
&drawable_is_proc('channel');
}
......@@ -509,8 +512,8 @@ CODE
drawable_mask_bounds drawable_image drawable_type
drawable_has_alpha drawable_type_with_alpha drawable_is_rgb
drawable_is_gray drawable_is_indexed drawable_bytes drawable_width
drawable_height drawable_offsets drawable_is_layer
drawable_is_layer_mask drawable_is_channel drawable_get_pixel
drawable_height drawable_offsets drawable_layer
drawable_layer_mask drawable_channel drawable_get_pixel
drawable_set_pixel drawable_set_image drawable_thumbnail);
%exports = (app => [@procs], lib => [@procs]);
......
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