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

plug-ins/common/randomize.c plug-ins/common/raw.c

2005-08-15  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/randomize.c
	* plug-ins/common/raw.c
	* plug-ins/common/retinex.c
	* plug-ins/common/ripple.c
	* plug-ins/common/rotate.c
	* plug-ins/common/sample_colorize.c
	* plug-ins/common/scatter_hsv.c
	* plug-ins/common/screenshot.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/semiflatten.c
	* plug-ins/common/sharpen.c
	* plug-ins/common/shift.c
	* plug-ins/common/sinus.c
	* plug-ins/common/smooth_palette.c
	* plug-ins/common/snoise.c
	* plug-ins/common/sobel.c
	* plug-ins/common/softglow.c
	* plug-ins/common/sparkle.c
	* plug-ins/common/spheredesigner.c
	* plug-ins/common/spread.c
	* plug-ins/common/struc.c
	* plug-ins/common/sunras.c
	* plug-ins/common/svg.c: canonicalize procedure and parameter
	names. Misc cleanups.
parent 52d9aa15
2005-08-15 Michael Natterer <mitch@gimp.org>
* plug-ins/common/randomize.c
* plug-ins/common/raw.c
* plug-ins/common/retinex.c
* plug-ins/common/ripple.c
* plug-ins/common/rotate.c
* plug-ins/common/sample_colorize.c
* plug-ins/common/scatter_hsv.c
* plug-ins/common/screenshot.c
* plug-ins/common/sel_gauss.c
* plug-ins/common/semiflatten.c
* plug-ins/common/sharpen.c
* plug-ins/common/shift.c
* plug-ins/common/sinus.c
* plug-ins/common/smooth_palette.c
* plug-ins/common/snoise.c
* plug-ins/common/sobel.c
* plug-ins/common/softglow.c
* plug-ins/common/sparkle.c
* plug-ins/common/spheredesigner.c
* plug-ins/common/spread.c
* plug-ins/common/struc.c
* plug-ins/common/sunras.c
* plug-ins/common/svg.c: canonicalize procedure and parameter
names. Misc cleanups.
2005-08-15 Manish Singh <yosh@gimp.org>
* plug-ins/common/sample_colorize.c (smp_constrain): add an extra
......
......@@ -83,16 +83,18 @@
*
********************************/
#define PLUG_IN_BINARY "randomize"
/*
* progress meter update frequency
*/
#define PROG_UPDATE_TIME ((row % 10) == 0)
gchar *PLUG_IN_NAME[] =
gchar *PLUG_IN_PROC[] =
{
"plug_in_randomize_hurl",
"plug_in_randomize_pick",
"plug_in_randomize_slur",
"plug-in-randomize-hurl",
"plug-in-randomize-pick",
"plug-in-randomize-slur",
};
gchar *RNDM_VERSION[] =
......@@ -102,21 +104,13 @@ gchar *RNDM_VERSION[] =
N_("Random Slur 1.7"),
};
gchar *HELP_ID[] =
{
"plug-in-randomize-hurl",
"plug-in-randomize-pick",
"plug-in-randomize-slur",
};
#define RNDM_HURL 1
#define RNDM_PICK 2
#define RNDM_SLUR 3
#define SEED_DEFAULT 10
#define SEED_USER 11
#define RNDM_HURL 1
#define RNDM_PICK 2
#define RNDM_SLUR 3
#define SCALE_WIDTH 100
#define SEED_DEFAULT 10
#define SEED_USER 11
#define SCALE_WIDTH 100
gint rndm_type = RNDM_HURL; /* hurl, pick, etc. */
......@@ -228,7 +222,7 @@ query (void)
"Norris, Daniel Cotting";
const gchar *copyright_date = "1995-1998";
gimp_install_procedure (PLUG_IN_NAME[0],
gimp_install_procedure (PLUG_IN_PROC[0],
hurl_blurb,
hurl_help,
author,
......@@ -240,7 +234,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure (PLUG_IN_NAME[1],
gimp_install_procedure (PLUG_IN_PROC[1],
pick_blurb,
pick_help,
author,
......@@ -252,7 +246,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure (PLUG_IN_NAME[2],
gimp_install_procedure (PLUG_IN_PROC[2],
slur_blurb,
slur_help,
author,
......@@ -264,9 +258,9 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register (PLUG_IN_NAME[0], "<Image>/Filters/Noise");
gimp_plugin_menu_register (PLUG_IN_NAME[1], "<Image>/Filters/Noise");
gimp_plugin_menu_register (PLUG_IN_NAME[2], "<Image>/Filters/Noise");
gimp_plugin_menu_register (PLUG_IN_PROC[0], "<Image>/Filters/Noise");
gimp_plugin_menu_register (PLUG_IN_PROC[1], "<Image>/Filters/Noise");
gimp_plugin_menu_register (PLUG_IN_PROC[2], "<Image>/Filters/Noise");
}
/*********************************
......@@ -298,11 +292,11 @@ run (const gchar *name,
/*
* Get the specified drawable, do standard initialization.
*/
if (strcmp (name, PLUG_IN_NAME[0]) == 0)
if (strcmp (name, PLUG_IN_PROC[0]) == 0)
rndm_type = RNDM_HURL;
else if (strcmp (name, PLUG_IN_NAME[1]) == 0)
else if (strcmp (name, PLUG_IN_PROC[1]) == 0)
rndm_type = RNDM_PICK;
else if (strcmp (name, PLUG_IN_NAME[2]) == 0)
else if (strcmp (name, PLUG_IN_PROC[2]) == 0)
rndm_type = RNDM_SLUR;
run_mode = param[0].data.d_int32;
......@@ -328,7 +322,7 @@ run (const gchar *name,
* If we're running interactively, pop up the dialog box.
*/
case GIMP_RUN_INTERACTIVE:
gimp_get_data (PLUG_IN_NAME[rndm_type - 1], &pivals);
gimp_get_data (PLUG_IN_PROC[rndm_type - 1], &pivals);
if (! randomize_dialog ()) /* return on Cancel */
return;
......@@ -368,7 +362,7 @@ run (const gchar *name,
* If we're running with the last set of values, get those values.
*/
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data (PLUG_IN_NAME[rndm_type - 1], &pivals);
gimp_get_data (PLUG_IN_PROC[rndm_type - 1], &pivals);
if (pivals.randomize)
pivals.seed = g_random_int ();
......@@ -416,7 +410,7 @@ run (const gchar *name,
*/
if (run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_set_data (PLUG_IN_NAME[rndm_type - 1], &pivals,
gimp_set_data (PLUG_IN_PROC[rndm_type - 1], &pivals,
sizeof (RandomizeVals));
}
}
......@@ -725,11 +719,11 @@ randomize_dialog (void)
GtkObject *adj;
gboolean run;
gimp_ui_init ("randomize", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
dlg = gimp_dialog_new (gettext (RNDM_VERSION[rndm_type - 1]), "randomize",
dlg = gimp_dialog_new (gettext (RNDM_VERSION[rndm_type - 1]), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, HELP_ID[rndm_type - 1],
gimp_standard_help_func, PLUG_IN_PROC[rndm_type - 1],
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -737,9 +731,9 @@ randomize_dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
......
......@@ -47,7 +47,10 @@
#include "libgimp/stdplugins-intl.h"
#define PREVIEW_SIZE 350
#define LOAD_PROC "file-raw-load"
#define SAVE_PROC "file-raw-save"
#define PLUG_IN_BINARY "raw"
#define PREVIEW_SIZE 350
typedef enum
......@@ -147,9 +150,9 @@ query (void)
{
static GimpParamDef load_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive" },
{ GIMP_PDB_INT32, "run-mode", "Interactive" },
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
{ GIMP_PDB_STRING, "raw_filename", "The name entered" }
{ GIMP_PDB_STRING, "raw-filename", "The name entered" }
};
static GimpParamDef load_return_vals[] =
......@@ -159,14 +162,14 @@ query (void)
static GimpParamDef save_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Drawable to save" },
{ GIMP_PDB_STRING, "filename", "The name of the file to save the image in" },
{ GIMP_PDB_STRING, "raw_filename", "The name entered" }
{ GIMP_PDB_STRING, "raw-filename", "The name entered" }
};
gimp_install_procedure ("file_raw_load",
gimp_install_procedure (LOAD_PROC,
"Load raw images, specifying image information",
"Load raw images, specifying image information",
"timecop, pg@futureware.at",
......@@ -179,9 +182,9 @@ query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_register_load_handler ("file_raw_load", "", "");
gimp_register_load_handler (LOAD_PROC, "", "");
gimp_install_procedure ("file_raw_save",
gimp_install_procedure (SAVE_PROC,
"Dump images to disk in raw format",
"Dump images to disk in raw format",
"timecop, pg@futureware.at",
......@@ -193,7 +196,7 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_save_handler ("file_raw_save", "", "");
gimp_register_save_handler (SAVE_PROC, "", "");
}
static void
......@@ -226,11 +229,11 @@ run (const gchar *name,
runtime->palette_offset = 0;
runtime->palette_type = RAW_PALETTE_RGB;
if (strcmp (name, "file_raw_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
if (run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_get_data ("file_raw_load", runtime);
gimp_get_data (LOAD_PROC, runtime);
preview_fd = g_open (param[1].data.d_string, O_RDONLY, 0);
......@@ -265,7 +268,7 @@ run (const gchar *name,
if (image_id != -1)
{
gimp_set_data ("file_raw_load", runtime, sizeof (RawConfig));
gimp_set_data (LOAD_PROC, runtime, sizeof (RawConfig));
*nreturn_vals = 2;
values[1].type = GIMP_PDB_IMAGE;
......@@ -277,14 +280,14 @@ run (const gchar *name,
}
}
}
else if (strcmp (name, "file_raw_save") == 0)
else if (strcmp (name, SAVE_PROC) == 0)
{
image_id = param[1].data.d_int32;
drawable_id = param[2].data.d_int32;
if (run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_get_data ("file_raw_save", runtime);
gimp_get_data (SAVE_PROC, runtime);
if (nparams != 5)
{
......@@ -917,11 +920,11 @@ load_dialog (gchar *filename)
size = get_file_info (filename);
gimp_ui_init ("raw", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
dialog = gimp_dialog_new (_("Raw Image Loader"), "raw",
dialog = gimp_dialog_new (_("Raw Image Loader"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-load-raw",
gimp_standard_help_func, LOAD_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -929,9 +932,9 @@ load_dialog (gchar *filename)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
......@@ -1088,16 +1091,22 @@ save_dialog (gchar * filename,
GtkWidget *frame;
gboolean run;
gimp_ui_init ("raw", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
dialog = gimp_dialog_new (_("Raw Image Save"), "raw", NULL, 0,
gimp_standard_help_func, "file-raw-save",
dialog = gimp_dialog_new (_("Raw Image Save"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, SAVE_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), main_vbox,
......
......@@ -26,6 +26,8 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_PROC "plug-in-retinex"
#define PLUG_IN_BINARY "retinex"
#define MAX_RETINEX_SCALES 8
#define MIN_GAUSSIAN_SCALE 16
#define MAX_GAUSSIAN_SCALE 250
......@@ -143,16 +145,16 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "scale", "Biggest scale value" },
{ GIMP_PDB_INT32, "nscales", "Number of scales" },
{ GIMP_PDB_INT32, "scales_mode", "Retinex distribution through scales" },
{ GIMP_PDB_INT32, "scales-mode", "Retinex distribution through scales" },
{ GIMP_PDB_FLOAT, "cvar", "Variance value" }
};
gimp_install_procedure ("plug_in_retinex",
gimp_install_procedure (PLUG_IN_PROC,
"Retinex Image Enhancement Algorithm",
"The Retinex Image Enhancement Algorithm is an "
"automatic image enhancement method that enhances "
......@@ -169,7 +171,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_retinex", "<Image>/Filters/Colors");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Colors");
}
static void
......@@ -214,7 +216,8 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("plug_in_retinex", &rvals);
gimp_get_data (PLUG_IN_PROC, &rvals);
/* First acquire information with a dialog */
if (! retinex_dialog (drawable))
return;
......@@ -236,7 +239,7 @@ run (const gchar *name,
break;
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data ("plug_in_retinex", &rvals);
gimp_get_data (PLUG_IN_PROC, &rvals);
break;
default:
......@@ -255,7 +258,7 @@ run (const gchar *name,
/* Store data */
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_retinex", &rvals, sizeof (RetinexParams));
gimp_set_data (PLUG_IN_PROC, &rvals, sizeof (RetinexParams));
}
else
{
......@@ -283,20 +286,21 @@ retinex_dialog (GimpDrawable *drawable)
GtkWidget *frame;
gboolean run;
gimp_ui_init ("retinex", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
dialog = gimp_dialog_new (_("Retinex Image Enhancement"), "retinex",
dialog = gimp_dialog_new (_("Retinex Image Enhancement"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "plug-in-retinex",
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
......
......@@ -30,6 +30,9 @@
/* Some useful macros */
#define PLUG_IN_PROC "plug-in-ripple"
#define PLUG_IN_BINARY "ripple"
#define SCALE_WIDTH 200
#define TILE_CACHE_SIZE 16
......@@ -113,7 +116,7 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "period", "period; number of pixels for one wave to complete" },
......@@ -125,9 +128,11 @@ query (void)
{ GIMP_PDB_INT32, "tile", "tile; if this is true, the image will retain it's tilability" }
};
gimp_install_procedure ("plug_in_ripple",
gimp_install_procedure (PLUG_IN_PROC,
"Ripple the contents of the specified drawable",
"Ripples the pixels of the specified drawable. Each row or column will be displaced a certain number of pixels coinciding with the given wave form",
"Ripples the pixels of the specified drawable. "
"Each row or column will be displaced a certain "
"number of pixels coinciding with the given wave form",
"Brian Degenhardt <bdegenha@ucsd.edu>",
"Brian Degenhardt",
"1997",
......@@ -137,7 +142,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_ripple", "<Image>/Filters/Distorts");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Distorts");
}
static void
......@@ -172,7 +177,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("plug_in_ripple", &rvals);
gimp_get_data (PLUG_IN_PROC, &rvals);
/* First acquire information with a dialog */
if (! ripple_dialog (drawable))
......@@ -202,7 +207,7 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("plug_in_ripple", &rvals);
gimp_get_data (PLUG_IN_PROC, &rvals);
break;
default:
......@@ -225,7 +230,7 @@ run (const gchar *name,
/* Store data */
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_ripple", &rvals, sizeof (RippleValues));
gimp_set_data (PLUG_IN_PROC, &rvals, sizeof (RippleValues));
}
else
{
......@@ -463,11 +468,11 @@ ripple_dialog (GimpDrawable *drawable)
GtkWidget *sine;
gboolean run;
gimp_ui_init ("ripple", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
dialog = gimp_dialog_new (_("Ripple"), "ripple",
dialog = gimp_dialog_new (_("Ripple"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "plug-in-ripple",
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -475,9 +480,9 @@ ripple_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
/* The main vbox */
main_vbox = gtk_vbox_new (FALSE, 12);
......
......@@ -57,6 +57,7 @@
/* Defines */
#define PLUG_IN_PROC "plug-in-rotate"
#define PLUG_IN_VERSION "v1.0 (2000/06/18)"
#define PLUG_IN_IMAGE_TYPES "RGB*, INDEXED*, GRAY*"
#define PLUG_IN_AUTHOR "Sven Neumann <sven@gimp.org>, Adam D. Moss <adam@gimp.org>"
......@@ -121,14 +122,14 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive"},
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "angle", "Angle { 90 (1), 180 (2), 270 (3) } degrees" },
{ GIMP_PDB_INT32, "everything", "Rotate the whole image? { TRUE, FALSE }" }
};
gimp_install_procedure ("plug_in_rotate",
gimp_install_procedure (PLUG_IN_PROC,
"Rotates a layer or the whole image by 90, 180 or 270 degrees",
"This plug-in does rotate the active layer or the "
"whole image clockwise by multiples of 90 degrees. "
......@@ -151,31 +152,22 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
/* Get the runmode from the in-parameters */
GimpRunMode run_mode = param[0].data.d_int32;
GimpRunMode run_mode = param[0].data.d_int32;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
static GimpParam values[1];
/* status variable, use it to check for errors in invocation usualy only
during non-interactive calling */
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
/*always return at least the status to the caller. */
static GimpParam values[1];
*nreturn_vals = 1;
*return_vals = values;
/* initialize the return of the status */
values[0].type = GIMP_PDB_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
*nreturn_vals = 1;
*return_vals = values;
INIT_I18N ();
/* get image and drawable */
image_ID = param[1].data.d_int32;
image_ID = param[1].data.d_int32;
active_drawable = gimp_drawable_get (param[2].data.d_drawable);
/* Check the procedure name we were called with, to decide
what needs to be done. */
if (strcmp (name, "plug_in_rotate") == 0)
if (strcmp (name, PLUG_IN_PROC) == 0)
{
switch (run_mode)
{
......@@ -188,14 +180,14 @@ run (const gchar *name,
rotvals.angle = rotvals.angle % 4;
rotvals.everything = (gint) param[4].data.d_int32;
/* Store variable states for next run */
gimp_set_data ("plug_in_rotate", &rotvals, sizeof (RotateValues));
gimp_set_data (PLUG_IN_PROC, &rotvals, sizeof (RotateValues));
}
else
status = GIMP_PDB_CALLING_ERROR;
break;
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data from a previous run */
gimp_get_data ("plug_in_rotate", &rotvals);
gimp_get_data (PLUG_IN_PROC, &rotvals);
rotvals.angle = rotvals.angle % 4;
break;
default:
......
......@@ -37,9 +37,9 @@
#define RESPONSE_RESET 1
#define RESPONSE_GET_COLORS 2
#define PLUG_IN_NAME "plug_in_sample_colorize"
#define PLUG_IN_PROC "plug-in-sample-colorize"
#define PLUG_IN_BINARY "sample_colorize"
#define NUMBER_IN_ARGS 13
#define HELP_ID "plug-in-sample-colorize"
#define TILE_CACHE_SIZE 32
#define LUMINOSITY_0(X) ((X[0] * 30 + X[1] * 59 + X[2] * 11))
......@@ -294,7 +294,7 @@ query (void)
" (the image with the dst_drawable is converted to RGB if necessary)"
" The sample_drawable should be of type RGB or RGBA";
gimp_install_procedure (PLUG_IN_NAME,
gimp_install_procedure (PLUG_IN_PROC,
"Colorize the contents of the specified drawable "
"similar to sample drawable",
help_string,
......@@ -307,8 +307,7 @@ query (void)
G_N_ELEMENTS (args), 0,