Commit 56f255ad authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

plug-ins/common/tga.c plug-ins/common/threshold_alpha.c

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

	* plug-ins/common/tga.c
	* plug-ins/common/threshold_alpha.c
	* plug-ins/common/tiff.c
	* plug-ins/common/tile.c
	* plug-ins/common/tileit.c
	* plug-ins/common/tiler.c
	* plug-ins/common/uniteditor.c
	* plug-ins/common/unsharp.c
	* plug-ins/common/video.c
	* plug-ins/common/vinvert.c
	* plug-ins/common/vpropagate.c
	* plug-ins/common/warp.c
	* plug-ins/common/waves.c
	* plug-ins/common/webbrowser.c
	* plug-ins/common/whirlpinch.c
	* plug-ins/common/wind.c
	* plug-ins/common/winprint.c
	* plug-ins/common/wmf.c
	* plug-ins/common/xbm.c
	* plug-ins/common/xpm.c
	* plug-ins/common/xwd.c
	* plug-ins/common/zealouscrop.c: canonicalize procedure and
	parameter names. Misc cleanups.
parent 1778b39f
2005-08-16 Michael Natterer <mitch@gimp.org>
* plug-ins/common/tga.c
* plug-ins/common/threshold_alpha.c
* plug-ins/common/tiff.c
* plug-ins/common/tile.c
* plug-ins/common/tileit.c
* plug-ins/common/tiler.c
* plug-ins/common/uniteditor.c
* plug-ins/common/unsharp.c
* plug-ins/common/video.c
* plug-ins/common/vinvert.c
* plug-ins/common/vpropagate.c
* plug-ins/common/warp.c
* plug-ins/common/waves.c
* plug-ins/common/webbrowser.c
* plug-ins/common/whirlpinch.c
* plug-ins/common/wind.c
* plug-ins/common/winprint.c
* plug-ins/common/wmf.c
* plug-ins/common/xbm.c
* plug-ins/common/xpm.c
* plug-ins/common/xwd.c
* plug-ins/common/zealouscrop.c: canonicalize procedure and
parameter names. Misc cleanups.
2005-08-15 Michael Natterer <mitch@gimp.org>
* configure.in: check for libgnomeui-2.0. Added version
......
......@@ -84,6 +84,11 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-tga-load"
#define SAVE_PROC "file-tga-save"
#define PLUG_IN_BINARY "tga"
/* Round up a division to the nearest integer. */
#define ROUNDUP_DIVIDE(n,d) (((n) + (d - 1)) / (d))
......@@ -197,9 +202,9 @@ 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" },
{ GIMP_PDB_STRING, "raw-filename", "The name entered" }
};
static GimpParamDef load_return_vals[] =
......@@ -209,17 +214,16 @@ query (void)
static GimpParamDef save_args[] =
{
{ 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_INT32, "rle", "Use RLE compression" },
{ GIMP_PDB_INT32, "origin", "Image origin (0 = top-left, 1 = bottom-left)"}
{ 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_INT32, "rle", "Use RLE compression" },
{ GIMP_PDB_INT32, "origin", "Image origin (0 = top-left, 1 = bottom-left)"}
} ;
gimp_install_procedure ("file_tga_load",
gimp_install_procedure (LOAD_PROC,
"Loads files of Targa file format",
"FIXME: write help for tga_load",
"Raphael FRANCOIS, Gordon Matzigkeit",
......@@ -232,10 +236,10 @@ query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_register_file_handler_mime ("file_tga_load", "image/x-tga");
gimp_register_load_handler ("file_tga_load", "tga", "");
gimp_register_file_handler_mime (LOAD_PROC, "image/x-tga");
gimp_register_load_handler (LOAD_PROC, "tga", "");
gimp_install_procedure ("file_tga_save",
gimp_install_procedure (SAVE_PROC,
"saves files in the Targa file format",
"FIXME: write help for tga_save",
"Raphael FRANCOIS, Gordon Matzigkeit",
......@@ -247,8 +251,8 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_file_handler_mime ("file_tga_save", "image/x-tga");
gimp_register_save_handler ("file_tga_save", "tga", "");
gimp_register_file_handler_mime (SAVE_PROC, "image/x-tga");
gimp_register_save_handler (SAVE_PROC, "tga", "");
}
static void
......@@ -275,10 +279,11 @@ run (const gchar *name,
*nreturn_vals = 1;
*return_vals = values;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_tga_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
#ifdef PROFILE
times (&tbuf1);
......@@ -297,9 +302,9 @@ run (const gchar *name,
status = GIMP_PDB_EXECUTION_ERROR;
}
}
else if (strcmp (name, "file_tga_save") == 0)
else if (strcmp (name, SAVE_PROC) == 0)
{
gimp_ui_init ("tga", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
image_ID = param[1].data.d_int32;
drawable_ID = param[2].data.d_int32;
......@@ -328,7 +333,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("file_tga_save", &tsvals);
gimp_get_data (SAVE_PROC, &tsvals);
/* First acquire information with a dialog */
if (! save_dialog ())
......@@ -349,7 +354,7 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("file_tga_save", &tsvals);
gimp_get_data (SAVE_PROC, &tsvals);
break;
default:
......@@ -365,7 +370,7 @@ run (const gchar *name,
if (save_image (param[3].data.d_string, image_ID, drawable_ID))
{
/* Store psvals data */
gimp_set_data ("file_tga_save", &tsvals, sizeof (tsvals));
gimp_set_data (SAVE_PROC, &tsvals, sizeof (tsvals));
}
else
{
......@@ -1182,9 +1187,9 @@ save_dialog (void)
GtkWidget *vbox;
gboolean run;
dlg = gimp_dialog_new (_("Save as TGA"), "tga",
dlg = gimp_dialog_new (_("Save as TGA"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-tga-save",
gimp_standard_help_func, SAVE_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -1192,9 +1197,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);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
......
......@@ -30,9 +30,8 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_NAME "plug_in_threshold_alpha"
#define SHORT_NAME "threshold_alpha"
#define HELP_ID "plug-in-threshold-alpha"
#define PLUG_IN_PROC "plug-in-threshold-alpha"
#define PLUG_IN_BINARY "threshold_alpha"
#define PROGRESS_UPDATE_NUM 100
#define SCALE_WIDTH 120
......@@ -82,7 +81,7 @@ query (void)
{ GIMP_PDB_INT32, "threshold", "Threshold" }
};
gimp_install_procedure (PLUG_IN_NAME,
gimp_install_procedure (PLUG_IN_PROC,
"",
"",
"Shuji Narazaki (narazaki@InetQ.or.jp)",
......@@ -94,7 +93,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register (PLUG_IN_NAME,
gimp_plugin_menu_register (PLUG_IN_PROC,
"<Image>/Layer/Transparency/Modify");
}
......@@ -138,7 +137,7 @@ run (const gchar *name,
g_message (_("RGBA/GRAYA drawable is not selected."));
return;
}
gimp_get_data (PLUG_IN_NAME, &VALS);
gimp_get_data (PLUG_IN_PROC, &VALS);
if (! threshold_alpha_dialog (drawable))
return;
break;
......@@ -155,7 +154,7 @@ run (const gchar *name,
break;
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data (PLUG_IN_NAME, &VALS);
gimp_get_data (PLUG_IN_PROC, &VALS);
break;
}
......@@ -170,7 +169,7 @@ run (const gchar *name,
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
if (run_mode == GIMP_RUN_INTERACTIVE && status == GIMP_PDB_SUCCESS)
gimp_set_data (PLUG_IN_NAME, &VALS, sizeof (ValueType));
gimp_set_data (PLUG_IN_PROC, &VALS, sizeof (ValueType));
}
else
{
......@@ -244,11 +243,11 @@ threshold_alpha_dialog (GimpDrawable *drawable)
GtkObject *adj;
gboolean run;
gimp_ui_init (SHORT_NAME, FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
dialog = gimp_dialog_new (_("Threshold Alpha"), SHORT_NAME,
dialog = gimp_dialog_new (_("Threshold Alpha"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......
......@@ -49,6 +49,12 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-tiff-load"
#define SAVE_PROC "file-tiff-save"
#define SAVE2_PROC "file-tiff-save2"
#define PLUG_IN_BINARY "tiff"
typedef struct
{
gint compression;
......@@ -188,9 +194,9 @@ 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[] =
{
......@@ -198,12 +204,12 @@ query (void)
};
#define COMMON_SAVE_ARGS \
{ 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_INT32, "compression", "Compression type: { NONE (0), LZW (1), PACKBITS (2), DEFLATE (3), JPEG (4)" }
{ 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_INT32, "compression", "Compression type: { NONE (0), LZW (1), PACKBITS (2), DEFLATE (3), JPEG (4)" }
static GimpParamDef save_args_old[] =
{
......@@ -213,10 +219,10 @@ query (void)
static GimpParamDef save_args[] =
{
COMMON_SAVE_ARGS,
{ GIMP_PDB_INT32, "save_transp_pixels", "Keep the color data masked by an alpha channel intact" }
{ GIMP_PDB_INT32, "save-transp-pixels", "Keep the color data masked by an alpha channel intact" }
};
gimp_install_procedure ("file_tiff_load",
gimp_install_procedure (LOAD_PROC,
"loads files of the tiff file format",
"FIXME: write help for tiff_load",
"Spencer Kimball, Peter Mattis & Nick Lamb",
......@@ -229,13 +235,13 @@ query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_register_file_handler_mime ("file_tiff_load", "image/tiff");
gimp_register_magic_load_handler ("file_tiff_load",
gimp_register_file_handler_mime (LOAD_PROC, "image/tiff");
gimp_register_magic_load_handler (LOAD_PROC,
"tif,tiff",
"",
"0,string,II*\\0,0,string,MM\\0*");
gimp_install_procedure ("file_tiff_save",
gimp_install_procedure (SAVE_PROC,
"saves files in the tiff file format",
"Saves files in the Tagged Image File Format. "
"The value for the saved comment is taken "
......@@ -249,10 +255,10 @@ query (void)
G_N_ELEMENTS (save_args_old), 0,
save_args_old, NULL);
gimp_register_file_handler_mime ("file_tiff_save", "image/tiff");
gimp_register_save_handler ("file_tiff_save", "tif,tiff", "");
gimp_register_file_handler_mime (SAVE_PROC, "image/tiff");
gimp_register_save_handler (SAVE_PROC, "tif,tiff", "");
gimp_install_procedure ("file_tiff_save2",
gimp_install_procedure (SAVE2_PROC,
"saves files in the tiff file format",
"Saves files in the Tagged Image File Format. "
"The value for the saved comment is taken "
......@@ -266,7 +272,7 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_file_handler_mime ("file_tiff_save2", "image/tiff");
gimp_register_file_handler_mime (SAVE2_PROC, "image/tiff");
}
static void
......@@ -294,7 +300,7 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_tiff_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
image = load_image (param[1].data.d_string);
......@@ -309,8 +315,8 @@ run (const gchar *name,
status = GIMP_PDB_EXECUTION_ERROR;
}
}
else if (strcmp (name, "file_tiff_save") == 0 ||
strcmp (name, "file_tiff_save2") == 0)
else if (strcmp (name, SAVE_PROC) == 0 ||
strcmp (name, SAVE2_PROC) == 0)
{
/* Plug-in is either file_tiff_save or file_tiff_save2 */
image = orig_image = param[1].data.d_int32;
......@@ -324,7 +330,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("tiff", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
export = gimp_export_image (&image, &drawable, "TIFF",
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
......@@ -352,7 +358,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("file_tiff_save", &tsvals);
gimp_get_data (SAVE_PROC, &tsvals);
parasite = gimp_image_parasite_find (orig_image, "tiff-save-options");
if (parasite)
......@@ -396,7 +402,7 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("file_tiff_save", &tsvals);
gimp_get_data (SAVE_PROC, &tsvals);
parasite = gimp_image_parasite_find (orig_image, "tiff-save-options");
if (parasite)
......@@ -418,7 +424,7 @@ run (const gchar *name,
if (save_image (param[3].data.d_string, image, drawable, orig_image))
{
/* Store mvals data */
gimp_set_data ("file_tiff_save", &tsvals, sizeof (TiffSaveVals));
gimp_set_data (SAVE_PROC, &tsvals, sizeof (TiffSaveVals));
}
else
{
......@@ -2241,9 +2247,9 @@ save_dialog (gboolean alpha)
GtkWidget *toggle;
gboolean run;
dlg = gimp_dialog_new (_("Save as TIFF"), "tiff",
dlg = gimp_dialog_new (_("Save as TIFF"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-tiff-save",
gimp_standard_help_func, SAVE_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -2251,9 +2257,9 @@ save_dialog (gboolean alpha)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
......
......@@ -29,6 +29,10 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_PROC "plug-in-tile"
#define PLUG_IN_BINARY "tile"
typedef struct
{
gint new_width;
......@@ -79,21 +83,21 @@ 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, "new_width", "New (tiled) image width" },
{ GIMP_PDB_INT32, "new_height", "New (tiled) image height" },
{ GIMP_PDB_INT32, "new_image", "Create a new image?" }
{ GIMP_PDB_INT32, "new-width", "New (tiled) image width" },
{ GIMP_PDB_INT32, "new-height", "New (tiled) image height" },
{ GIMP_PDB_INT32, "new-image", "Create a new image?" }
};
static GimpParamDef return_vals[] =
{
{ GIMP_PDB_IMAGE, "new_image", "Output image (N/A if new_image == FALSE)" },
{ GIMP_PDB_LAYER, "new_layer", "Output layer (N/A if new_image == FALSE)" }
{ GIMP_PDB_IMAGE, "new-image", "Output image (N/A if new-image == FALSE)" },
{ GIMP_PDB_LAYER, "new-layer", "Output layer (N/A if new-image == FALSE)" }
};
gimp_install_procedure ("plug_in_tile",
gimp_install_procedure (PLUG_IN_PROC,
"Create a new image which is a tiled version of the "
"input drawable",
"This function creates a new image with a single "
......@@ -112,7 +116,7 @@ query (void)
G_N_ELEMENTS (return_vals),
args, return_vals);
gimp_plugin_menu_register ("plug_in_tile", "<Image>/Filters/Map");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Map");
}
static void
......@@ -148,7 +152,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("plug_in_tile", &tvals);
gimp_get_data (PLUG_IN_PROC, &tvals);
/* First acquire information with a dialog */
if (! tile_dialog (param[1].data.d_image,
......@@ -175,7 +179,7 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("plug_in_tile", &tvals);
gimp_get_data (PLUG_IN_PROC, &tvals);
break;
default:
......@@ -195,7 +199,7 @@ run (const gchar *name,
/* Store data */
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_tile", &tvals, sizeof (TileVals));
gimp_set_data (PLUG_IN_PROC, &tvals, sizeof (TileVals));
if (run_mode != GIMP_RUN_NONINTERACTIVE)
{
......@@ -377,7 +381,7 @@ tile_dialog (gint32 image_ID,
GimpUnit unit;
gboolean run;
gimp_ui_init ("tile", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
width = gimp_drawable_width (drawable_ID);
height = gimp_drawable_height (drawable_ID);
......@@ -387,9 +391,9 @@ tile_dialog (gint32 image_ID,
tvals.new_width = width;
tvals.new_height = height;
dlg = gimp_dialog_new (_("Tile"), "tile",
dlg = gimp_dialog_new (_("Tile"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "plug-in-tile",
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -397,9 +401,9 @@ tile_dialog (gint32 image_ID,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
......
......@@ -45,7 +45,8 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_NAME "plug_in_small_tiles"
#define PLUG_IN_PROC "plug-in-small-tiles"
#define PLUG_IN_BINARY "tileit"
/***** Magic numbers *****/
......@@ -205,13 +206,13 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "number_of_tiles", "Number of tiles to make" }
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "num-tiles", "Number of tiles to make" }
};
gimp_install_procedure (PLUG_IN_NAME,
gimp_install_procedure (PLUG_IN_PROC,
"Tiles image into smaller versions of the orginal",
"More here later",
"Andy Thomas",
......@@ -223,7 +224,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register (PLUG_IN_NAME, "<Image>/Filters/Map");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Map");
}
static void
......@@ -285,7 +286,7 @@ run (const gchar *name,
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
gimp_get_data (PLUG_IN_NAME, &itvals);
gimp_get_data (PLUG_IN_PROC, &itvals);
if (! tileit_dialog ())
{
gimp_drawable_detach (drawable);
......@@ -305,7 +306,7 @@ run (const gchar *name,
break;
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data (PLUG_IN_NAME, &itvals);
gimp_get_data (PLUG_IN_PROC, &itvals);
break;
default:
......@@ -325,7 +326,7 @@ run (const gchar *name,
gimp_displays_flush ();
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data (PLUG_IN_NAME, &itvals, sizeof (TileItVals));
gimp_set_data (PLUG_IN_PROC, &itvals, sizeof (TileItVals));
}
else
{
......@@ -356,13 +357,13 @@ tileit_dialog (void)
GSList *orientation_group = NULL;
gboolean run;
gimp_ui_init ("tileit", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
cache_preview (); /* Get the preview image */
dlg = gimp_dialog_new (_("TileIt"), "tileit",
dlg = gimp_dialog_new (_("Small Tiles"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "plug-in-small-tiles",
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -370,9 +371,9 @@ tileit_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);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
......
......@@ -29,6 +29,9 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_PROC "plug-in-make-seamless"
/* Declare local functions.
*/
static void query (void);
......@@ -60,7 +63,7 @@ query (void)
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
};