Commit 04e11683 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

plug-ins/common/gauss.c plug-ins/common/gbr.c plug-ins/common/gee.c

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

	* plug-ins/common/gauss.c
	* plug-ins/common/gbr.c
	* plug-ins/common/gee.c
	* plug-ins/common/gee_zoom.c
	* plug-ins/common/gif.c
	* plug-ins/common/gifload.c
	* plug-ins/common/gih.c
	* plug-ins/common/glasstile.c
	* plug-ins/common/glob.c
	* plug-ins/common/gqbist.c
	* plug-ins/common/gradmap.c
	* plug-ins/common/grid.c
	* plug-ins/common/gtm.c
	* plug-ins/common/guillotine.c
	* plug-ins/common/header.c
	* plug-ins/common/hot.c
	* plug-ins/common/illusion.c
	* plug-ins/common/iwarp.c: canonicalize procedure and
	parameter names. Misc cleanups.
parent 9b75bd64
2005-08-14 Michael Natterer <mitch@gimp.org>
* plug-ins/common/gauss.c
* plug-ins/common/gbr.c
* plug-ins/common/gee.c
* plug-ins/common/gee_zoom.c
* plug-ins/common/gif.c
* plug-ins/common/gifload.c
* plug-ins/common/gih.c
* plug-ins/common/glasstile.c
* plug-ins/common/glob.c
* plug-ins/common/gqbist.c
* plug-ins/common/gradmap.c
* plug-ins/common/grid.c
* plug-ins/common/gtm.c
* plug-ins/common/guillotine.c
* plug-ins/common/header.c
* plug-ins/common/hot.c
* plug-ins/common/illusion.c
* plug-ins/common/iwarp.c: canonicalize procedure and
parameter names. Misc cleanups.
2005-08-13 Michael Natterer <mitch@gimp.org>
* plug-ins/common/decompose.c
......
......@@ -25,6 +25,15 @@
#include "libgimp/stdplugins-intl.h"
#define GAUSS_PROC "plug-in-gauss"
#define GAUSS_IIR_PROC "plug-in-gauss-iir"
#define GAUSS_IIR2_PROC "plug-in-gauss-iir2"
#define GAUSS_RLE_PROC "plug-in-gauss-rle"
#define GAUSS_RLE2_PROC "plug-in-gauss-rle2"
#define PLUG_IN_BINARY "gauss"
typedef enum
{
BLUR_IIR,
......@@ -109,34 +118,34 @@ 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_FLOAT, "horizontal", "Horizontal radius of gaussian blur (in pixels, > 0.0)" },
{ GIMP_PDB_FLOAT, "vertical", "Vertical radius of gaussian blur (in pixels, > 0.0)" },
{ GIMP_PDB_INT32, "method", "IIR (0) or RLE (1)" }
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_FLOAT, "horizontal", "Horizontal radius of gaussian blur (in pixels, > 0.0)" },
{ GIMP_PDB_FLOAT, "vertical", "Vertical radius of gaussian blur (in pixels, > 0.0)" },
{ GIMP_PDB_INT32, "method", "IIR (0) or RLE (1)" }
};
static GimpParamDef args1[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels, > 0.0)" },
{ GIMP_PDB_INT32, "horizontal", "Blur in horizontal direction" },
{ GIMP_PDB_INT32, "vertical", "Blur in vertical direction" }
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels, > 0.0)" },
{ GIMP_PDB_INT32, "horizontal", "Blur in horizontal direction" },
{ GIMP_PDB_INT32, "vertical", "Blur in vertical direction" }
};
static GimpParamDef args2[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_FLOAT, "horizontal", "Horizontal radius of gaussian blur (in pixels, > 0.0)" },
{ GIMP_PDB_FLOAT, "vertical", "Vertical radius of gaussian blur (in pixels, > 0.0)" }
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_FLOAT, "horizontal", "Horizontal radius of gaussian blur (in pixels, > 0.0)" },
{ GIMP_PDB_FLOAT, "vertical", "Vertical radius of gaussian blur (in pixels, > 0.0)" }
};
gimp_install_procedure ("plug_in_gauss",
gimp_install_procedure (GAUSS_PROC,
"Applies a gaussian blur to the specified drawable.",
"Applies a gaussian blur to the drawable, with "
"specified radius of affect. The standard deviation "
......@@ -156,7 +165,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure ("plug_in_gauss_iir",
gimp_install_procedure (GAUSS_IIR_PROC,
"Applies a gaussian blur to the specified drawable.",
"Applies a gaussian blur to the drawable, with "
"specified radius of affect. The standard deviation "
......@@ -176,7 +185,7 @@ query (void)
G_N_ELEMENTS (args1), 0,
args1, NULL);
gimp_install_procedure ("plug_in_gauss_iir2",
gimp_install_procedure (GAUSS_IIR2_PROC,
"Applies a gaussian blur to the specified drawable.",
"Applies a gaussian blur to the drawable, with "
"specified radius of affect. The standard deviation "
......@@ -196,7 +205,7 @@ query (void)
G_N_ELEMENTS (args2), 0,
args2, NULL);
gimp_install_procedure ("plug_in_gauss_rle",
gimp_install_procedure (GAUSS_RLE_PROC,
"Applies a gaussian blur to the specified drawable.",
"Applies a gaussian blur to the drawable, with "
"specified radius of affect. The standard deviation "
......@@ -216,7 +225,7 @@ query (void)
G_N_ELEMENTS (args1), 0,
args1, NULL);
gimp_install_procedure ("plug_in_gauss_rle2",
gimp_install_procedure (GAUSS_RLE2_PROC,
"Applies a gaussian blur to the specified drawable.",
"Applies a gaussian blur to the drawable, with "
"specified radius of affect. The standard deviation "
......@@ -236,7 +245,7 @@ query (void)
G_N_ELEMENTS (args2), 0,
args2, NULL);
gimp_plugin_menu_register ("plug_in_gauss", "<Image>/Filters/Blur");
gimp_plugin_menu_register (GAUSS_PROC, "<Image>/Filters/Blur");
}
static void
......@@ -273,13 +282,13 @@ run (const gchar *name,
gimp_tile_width () + 1));
if (strcmp (name, "plug_in_gauss") == 0)
if (strcmp (name, GAUSS_PROC) == 0)
{
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("plug_in_gauss", &bvals);
gimp_get_data (GAUSS_PROC, &bvals);
/* First acquire information with a dialog */
if (! gauss_dialog (image_ID, drawable))
......@@ -304,14 +313,14 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("plug_in_gauss", &bvals);
gimp_get_data (GAUSS_PROC, &bvals);
break;
default:
break;
}
}
else if (strcmp (name, "plug_in_gauss_iir") == 0)
else if (strcmp (name, GAUSS_IIR_PROC) == 0)
{
if (nparams != 6)
status = GIMP_PDB_CALLING_ERROR;
......@@ -333,7 +342,7 @@ run (const gchar *name,
return;
}
}
else if (strcmp (name, "plug_in_gauss_iir2") == 0)
else if (strcmp (name, GAUSS_IIR2_PROC) == 0)
{
if (nparams != 5)
status = GIMP_PDB_CALLING_ERROR;
......@@ -354,7 +363,7 @@ run (const gchar *name,
return;
}
}
else if (strcmp (name, "plug_in_gauss_rle") == 0)
else if (strcmp (name, GAUSS_RLE_PROC) == 0)
{
if (nparams != 6)
status = GIMP_PDB_CALLING_ERROR;
......@@ -376,7 +385,7 @@ run (const gchar *name,
return;
}
}
else if (strcmp (name, "plug_in_gauss_rle2") == 0)
else if (strcmp (name, GAUSS_RLE2_PROC) == 0)
{
if (nparams != 5)
status = GIMP_PDB_CALLING_ERROR;
......@@ -416,8 +425,7 @@ run (const gchar *name,
/* Store data */
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_gauss",
&bvals, sizeof (BlurValues));
gimp_set_data (GAUSS_PROC, &bvals, sizeof (BlurValues));
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
......@@ -453,11 +461,11 @@ gauss_dialog (gint32 image_ID,
gdouble yres;
gboolean run;
gimp_ui_init ("gaussian_blur", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
dialog = gimp_dialog_new (_("Gaussian Blur"), "gaussian_blur",
dialog = gimp_dialog_new (_("Gaussian Blur"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "plug-in-gauss",
gimp_standard_help_func, GAUSS_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -465,9 +473,9 @@ gauss_dialog (gint32 image_ID,
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);
......@@ -1281,4 +1289,3 @@ run_length_encode (guchar *src,
*dest++ = last;
}
}
......@@ -67,6 +67,11 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-gbr-load"
#define SAVE_PROC "file-gbr-save"
#define PLUG_IN_BINARY "gbr"
typedef struct
{
gchar description[256];
......@@ -118,27 +123,27 @@ query (void)
{
static GimpParamDef load_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to load" }
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
{ GIMP_PDB_STRING, "raw-filename", "The name of the file to load" }
};
static GimpParamDef load_return_vals[] =
{
{ GIMP_PDB_IMAGE, "image", "Output image" }
{ GIMP_PDB_IMAGE, "image", "Output image" }
};
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 of the file to save the image in" },
{ GIMP_PDB_STRING, "raw-filename", "The name of the file to save the image in" },
{ GIMP_PDB_INT32, "spacing", "Spacing of the brush" },
{ GIMP_PDB_STRING, "description", "Short description of the brush" }
};
gimp_install_procedure ("file_gbr_load",
gimp_install_procedure (LOAD_PROC,
"Loads GIMP brushes (1 or 4 bpp and old .gpb format)",
"FIXME: write help",
"Tim Newsome, Jens Lautenbacher, Sven Neumann",
......@@ -151,15 +156,15 @@ query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_plugin_icon_register ("file_gbr_load",
gimp_plugin_icon_register (LOAD_PROC,
GIMP_ICON_TYPE_STOCK_ID, GIMP_STOCK_BRUSH);
gimp_register_file_handler_mime ("file_gbr_load", "image/x-gimp-gbr");
gimp_register_magic_load_handler ("file_gbr_load",
gimp_register_file_handler_mime (LOAD_PROC, "image/x-gimp-gbr");
gimp_register_magic_load_handler (LOAD_PROC,
"gbr, gpb",
"",
"20, string, GIMP");
gimp_install_procedure ("file_gbr_save",
gimp_install_procedure (SAVE_PROC,
"saves files in the .gbr file format",
"Yeah!",
"Tim Newsome, Jens Lautenbacher, Sven Neumann",
......@@ -171,10 +176,10 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_plugin_icon_register ("file_gbr_save",
gimp_plugin_icon_register (SAVE_PROC,
GIMP_ICON_TYPE_STOCK_ID, GIMP_STOCK_BRUSH);
gimp_register_file_handler_mime ("file_gbr_save", "image/x-gimp-gbr");
gimp_register_save_handler ("file_gbr_save", "gbr", "");
gimp_register_file_handler_mime (SAVE_PROC, "image/x-gimp-gbr");
gimp_register_save_handler (SAVE_PROC, "gbr", "");
}
static void
......@@ -201,7 +206,7 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_gbr_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
image_ID = load_image (param[1].data.d_string);
......@@ -216,7 +221,7 @@ run (const gchar *name,
status = GIMP_PDB_EXECUTION_ERROR;
}
}
else if (strcmp (name, "file_gbr_save") == 0)
else if (strcmp (name, SAVE_PROC) == 0)
{
GimpParasite *parasite;
gint32 orig_image_ID;
......@@ -230,7 +235,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("gbr", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "GBR",
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_RGB |
......@@ -242,7 +247,7 @@ run (const gchar *name,
}
/* Possibly retrieve data */
gimp_get_data ("file_gbr_save", &info);
gimp_get_data (SAVE_PROC, &info);
break;
default:
......@@ -289,7 +294,7 @@ run (const gchar *name,
{
if (save_image (param[3].data.d_string, image_ID, drawable_ID))
{
gimp_set_data ("file_gbr_save", &info, sizeof (info));
gimp_set_data (SAVE_PROC, &info, sizeof (info));
}
else
{
......@@ -673,9 +678,9 @@ save_dialog (void)
GtkObject *adj;
gboolean run;
dlg = gimp_dialog_new (_("Save as Brush"), "gbr",
dlg = gimp_dialog_new (_("Save as Brush"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-gbr-save",
gimp_standard_help_func, SAVE_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -683,9 +688,9 @@ save_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);
/* The main table */
table = gtk_table_new (2, 2, FALSE);
......
......@@ -29,6 +29,14 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_PROC "plug-in-the-slimy-egg"
#define PLUG_IN_BINARY "gee"
/* These aren't really redefinable, easily. */
#define IWIDTH 256
#define IHEIGHT 256
/* Declare local functions. */
static void query (void);
static void run (const gchar *name,
......@@ -57,11 +65,6 @@ GimpPlugInInfo PLUG_IN_INFO =
};
/* These aren't really redefinable, easily. */
#define IWIDTH 256
#define IHEIGHT 256
/* Global widgets'n'stuff */
static guchar *disp; /* RGBX preview data */
static guchar *env; /* src warping image data */
......@@ -89,12 +92,12 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Must be interactive (1)" },
{ GIMP_PDB_INT32, "run-mode", "Must be interactive (1)" },
{ GIMP_PDB_IMAGE, "image", "Input Image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input Drawable" }
};
gimp_install_procedure ("plug_in_the_slimy_egg",
gimp_install_procedure (PLUG_IN_PROC,
"A big hello from the GIMP team!",
"Beyond help.",
"Adam D. Moss <adam@gimp.org>",
......@@ -119,7 +122,7 @@ run (const gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
*nreturn_vals = 1;
*return_vals = values;
*return_vals = values;
run_mode = param[0].data.d_int32;
......@@ -154,11 +157,11 @@ build_dialog (void)
GtkWidget *frame;
gchar *tmp;
gimp_ui_init ("gee", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
dlg = gimp_dialog_new (_("Gee Slime"), "gee",
dlg = gimp_dialog_new (_("Gee Slime"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "plug-in-the-slimy-egg",
gimp_standard_help_func, PLUG_IN_PROC,
NULL);
button = gtk_dialog_add_button (GTK_DIALOG (dlg),
......
......@@ -38,6 +38,10 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_PROC "plug-in-the-old-egg"
#define PLUG_IN_BINARY "gee_zoom"
/* Declare local functions. */
static void query (void);
static void run (const gchar *name,
......@@ -108,12 +112,12 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Must be interactive (1)" },
{ GIMP_PDB_INT32, "run-mode", "Must be interactive (1)" },
{ GIMP_PDB_IMAGE, "image", "Input Image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input Drawable" }
};
gimp_install_procedure ("plug_in_the_old_egg",
gimp_install_procedure (PLUG_IN_PROC,
"A big hello from the GIMP team!",
"Hay-ulp",
"Adam D. Moss <adam@gimp.org>",
......@@ -177,11 +181,11 @@ build_dialog (void)
GtkWidget *frame;
gchar *tmp;
gimp_ui_init ("gee_zoom", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
dlg = gimp_dialog_new (_("Gee Zoom"), "gee_zoom",
dlg = gimp_dialog_new (_("Gee Zoom"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "plug-in-the-old-egg",
gimp_standard_help_func, PLUG_IN_PROC,
NULL);
button = gtk_dialog_add_button (GTK_DIALOG (dlg),
......
......@@ -285,6 +285,10 @@
#include "libgimp/stdplugins-intl.h"
#define SAVE_PROC "file-gif-save"
#define PLUG_IN_BINARY "gif"
/* Define only one of these to determine which kind of gif's you would like.
* GIF_UN means use uncompressed gifs. These will be large, but no
* patent problems.
......@@ -376,18 +380,18 @@ 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", "Image to save" },
{ 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_PDB_INT32, "interlace", "Try to save as interlaced" },
{ GIMP_PDB_INT32, "loop", "(animated gif) loop infinitely" },
{ GIMP_PDB_INT32, "default_delay", "(animated gif) Default delay between framese in milliseconds" },
{ GIMP_PDB_INT32, "default_dispose", "(animated gif) Default disposal type (0=`don't care`, 1=combine, 2=replace)" }
{ GIMP_PDB_INT32, "default-delay", "(animated gif) Default delay between framese in milliseconds" },
{ GIMP_PDB_INT32, "default-dispose", "(animated gif) Default disposal type (0=`don't care`, 1=combine, 2=replace)" }
};
gimp_install_procedure ("file_gif_save",
gimp_install_procedure (SAVE_PROC,
"saves files in Compuserve GIF file format",
"Save a file in Compuserve GIF format, with "
"possible animation, transparency, and comment. "
......@@ -405,8 +409,8 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_file_handler_mime ("file_gif_save", "image/gif");
gimp_register_save_handler ("file_gif_save", "gif", "");
gimp_register_file_handler_mime (SAVE_PROC, "image/gif");
gimp_register_save_handler (SAVE_PROC, "gif", "");
}
static void
......@@ -432,7 +436,7 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_gif_save") == 0)
if (strcmp (name, SAVE_PROC) == 0)
{
image_ID = orig_image_ID = param[1].data.d_int32;
drawable_ID = param[2].data.d_int32;
......@@ -442,7 +446,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("gif", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "GIF",
(GIMP_EXPORT_CAN_HANDLE_INDEXED |
GIMP_EXPORT_CAN_HANDLE_GRAY |
......@@ -466,7 +470,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("file_gif_save", &gsvals);
gimp_get_data (SAVE_PROC, &gsvals);
/* First acquire information with a dialog */
if (! save_dialog (image_ID))
......@@ -491,7 +495,7 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("file_gif_save", &gsvals);
gimp_get_data (SAVE_PROC, &gsvals);
break;
default:
......@@ -506,8 +510,7 @@ run (const gchar *name,
orig_image_ID))
{
/* Store psvals data */
gimp_set_data ("file_gif_save",
&gsvals, sizeof (GIFSaveVals));
gimp_set_data (SAVE_PROC, &gsvals, sizeof (GIFSaveVals));
}
else
{
......@@ -1201,9 +1204,9 @@ badbounds_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);
/* the warning message */
......@@ -1256,15 +1259,20 @@ save_dialog (gint32 image_ID)
gimp_image_get_layers (image_ID, &nlayers);
dlg = gimp_dialog_new (_("Save as GIF"), "gif",
dlg = gimp_dialog_new (_("Save as GIF"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-gif-save",
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 (dlg),
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_container_add (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox), main_vbox);
......
......@@ -75,6 +75,9 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-gif-load"
/* uncomment the line below for a little debugging info */
/* #define GIFDEBUG yesplease */
......@@ -123,16 +126,16 @@ query (void)
{
static GimpParamDef load_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
{ GIMP_PDB_STRING, "raw_filename", "The name entered" }
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },