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

plug-ins/bmp/bmp.c plug-ins/faxg3/faxg3.c plug-ins/fits/fits.c

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

	* plug-ins/bmp/bmp.c
	* plug-ins/faxg3/faxg3.c
	* plug-ins/fits/fits.c
	* plug-ins/flame/flame.c
	* plug-ins/gfig/gfig-dialog.c
	* plug-ins/gfig/gfig.[ch]
	* plug-ins/gflare/gflare.c
	* plug-ins/gfli/gfli.c
	* plug-ins/help/help.c
	* plug-ins/helpbrowser/helpbrowser.c
	* plug-ins/ifscompose/ifscompose.c
	* plug-ins/jpeg/jpeg-save.c
	* plug-ins/jpeg/jpeg.[ch]
	* plug-ins/maze/maze.[ch]
	* plug-ins/maze/maze_face.c
	* plug-ins/pagecurl/pagecurl.c
	* plug-ins/rcm/rcm.[ch]
	* plug-ins/rcm/rcm_dialog.c
	* plug-ins/sel2path/sel2path.c
	* plug-ins/sgi/sgi.c
	* plug-ins/uri/uri.c
	* plug-ins/xjt/xjt.c: canonicalize procedure and parameter names.
	#define them instead of repeating the same string several times.
	Minor cleanups.
parent 7ed8c443
2005-08-12 Michael Natterer <mitch@gimp.org>
* plug-ins/bmp/bmp.c
* plug-ins/faxg3/faxg3.c
* plug-ins/fits/fits.c
* plug-ins/flame/flame.c
* plug-ins/gfig/gfig-dialog.c
* plug-ins/gfig/gfig.[ch]
* plug-ins/gflare/gflare.c
* plug-ins/gfli/gfli.c
* plug-ins/help/help.c
* plug-ins/helpbrowser/helpbrowser.c
* plug-ins/ifscompose/ifscompose.c
* plug-ins/jpeg/jpeg-save.c
* plug-ins/jpeg/jpeg.[ch]
* plug-ins/maze/maze.[ch]
* plug-ins/maze/maze_face.c
* plug-ins/pagecurl/pagecurl.c
* plug-ins/rcm/rcm.[ch]
* plug-ins/rcm/rcm_dialog.c
* plug-ins/sel2path/sel2path.c
* plug-ins/sgi/sgi.c
* plug-ins/uri/uri.c
* plug-ins/xjt/xjt.c: canonicalize procedure and parameter names.
#define them instead of repeating the same string several times.
Minor cleanups.
2005-08-12 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-proc-def.c (plug_in_proc_def_get_help_id):
......
......@@ -61,6 +61,10 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-bmp-load"
#define SAVE_PROC "file-bmp-save"
const gchar *filename = NULL;
gboolean interactive_bmp;
......@@ -91,9 +95,9 @@ query (void)
{
static GimpParamDef load_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ 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_STRING, "raw-filename", "The name entered" },
};
static GimpParamDef load_return_vals[] =
{
......@@ -102,14 +106,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_bmp_load",
gimp_install_procedure (LOAD_PROC,
"Loads files of Windows BMP file format",
"Loads files of Windows BMP file format",
"Alexander Schulz",
......@@ -122,13 +126,13 @@ query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_register_file_handler_mime ("file_bmp_load", "image/bmp");
gimp_register_magic_load_handler ("file_bmp_load",
gimp_register_file_handler_mime (LOAD_PROC, "image/bmp");
gimp_register_magic_load_handler (LOAD_PROC,
"bmp",
"",
"0,string,BM");
gimp_install_procedure ("file_bmp_save",
gimp_install_procedure (SAVE_PROC,
"Saves files in Windows BMP file format",
"Saves files in Windows BMP file format",
"Alexander Schulz",
......@@ -140,8 +144,8 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_file_handler_mime ("file_bmp_save", "image/bmp");
gimp_register_save_handler ("file_bmp_save", "bmp", "");
gimp_register_file_handler_mime (SAVE_PROC, "image/bmp");
gimp_register_save_handler (SAVE_PROC, "bmp", "");
}
static void
......@@ -167,7 +171,7 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_bmp_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
switch (run_mode)
{
......@@ -202,7 +206,7 @@ run (const gchar *name,
}
}
}
else if (strcmp (name, "file_bmp_save") == 0)
else if (strcmp (name, SAVE_PROC) == 0)
{
image_ID = param[1].data.d_int32;
drawable_ID = param[2].data.d_int32;
......
......@@ -48,7 +48,8 @@
#include "libgimp/stdplugins-intl.h"
#define VERSION "0.6"
#define LOAD_PROC "file-faxg3-load"
#define VERSION "0.6"
/* Declare local functions.
*/
......@@ -83,16 +84,16 @@ void 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_install_procedure ("file_faxg3_load",
gimp_install_procedure (LOAD_PROC,
"loads g3 fax files",
"This plug-in loads Fax G3 Image files.",
"Jochen Friedrich",
......@@ -105,8 +106,8 @@ void query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_register_file_handler_mime ("file_faxg3_load", "image/g3-fax");
gimp_register_magic_load_handler ("file_faxg3_load",
gimp_register_file_handler_mime (LOAD_PROC, "image/g3-fax");
gimp_register_magic_load_handler (LOAD_PROC,
"g3",
"",
"0,short,0x0001,0,short,0x0014");
......@@ -130,7 +131,7 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
if (strcmp (name, "file_faxg3_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
INIT_I18N();
......
......@@ -47,6 +47,11 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-fits-load"
#define SAVE_PROC "file-fits-save"
#define PLUG_IN_BINARY "fits"
/* Load info */
typedef struct
{
......@@ -71,7 +76,9 @@ static gint save_image (const gchar *filename,
gint32 drawable_ID);
static FITS_HDU_LIST *create_fits_header (FITS_FILE *ofp,
guint width, guint height, guint bpp);
guint width,
guint height,
guint bpp);
static gint save_index (FITS_FILE *ofp,
gint32 image_ID,
gint32 drawable_ID);
......@@ -128,9 +135,9 @@ query (void)
{
static GimpParamDef load_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ 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_STRING, "raw-filename", "The name of the file to load" },
};
static GimpParamDef load_return_vals[] =
{
......@@ -139,16 +146,17 @@ 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 of the file to save the image in" },
{ GIMP_PDB_STRING, "raw-filename", "The name of the file to save the image in" },
};
gimp_install_procedure ("file_fits_load",
gimp_install_procedure (LOAD_PROC,
"load file of the FITS file format",
"load file of the FITS file format (Flexible Image Transport System)",
"load file of the FITS file format "
"(Flexible Image Transport System)",
"Peter Kirchgessner",
"Peter Kirchgessner (peter@kirchgessner.net)",
"1997",
......@@ -159,15 +167,16 @@ query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_register_file_handler_mime ("file_fits_load", "image/x-fits");
gimp_register_magic_load_handler ("file_fits_load",
gimp_register_file_handler_mime (LOAD_PROC, "image/x-fits");
gimp_register_magic_load_handler (LOAD_PROC,
"fit,fits",
"",
"0,string,SIMPLE");
gimp_install_procedure ("file_fits_save",
gimp_install_procedure (SAVE_PROC,
"save file in the FITS file format",
"FITS saving handles all image types except those with alpha channels.",
"FITS saving handles all image types except "
"those with alpha channels.",
"Peter Kirchgessner",
"Peter Kirchgessner (peter@kirchgessner.net)",
"1997",
......@@ -177,8 +186,8 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_file_handler_mime ("file_fits_save", "image/x-fits");
gimp_register_save_handler ("file_fits_save", "fit,fits", "");
gimp_register_file_handler_mime (SAVE_PROC, "image/x-fits");
gimp_register_save_handler (SAVE_PROC, "fit,fits", "");
}
......@@ -205,13 +214,13 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_fits_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("file_fits_load", &plvals);
gimp_get_data (LOAD_PROC, &plvals);
if (!load_dialog ())
status = GIMP_PDB_CANCEL;
......@@ -224,7 +233,7 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("file_fits_load", &plvals);
gimp_get_data (LOAD_PROC, &plvals);
break;
default:
......@@ -252,10 +261,10 @@ run (const gchar *name,
/* Store plvals data */
if (status == GIMP_PDB_SUCCESS)
gimp_set_data ("file_fits_load", &plvals, sizeof (FITSLoadVals));
gimp_set_data (LOAD_PROC, &plvals, sizeof (FITSLoadVals));
}
}
else if (strcmp (name, "file_fits_save") == 0)
else if (strcmp (name, SAVE_PROC) == 0)
{
image_ID = param[1].data.d_int32;
drawable_ID = param[2].data.d_int32;
......@@ -265,7 +274,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("fits", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "FITS",
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
......@@ -958,11 +967,11 @@ load_dialog (void)
GtkWidget *frame;
gboolean run;
gimp_ui_init ("fits", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
dialog = gimp_dialog_new (_("Load FITS File"), "fits",
dialog = gimp_dialog_new (_("Load FITS File"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-fits-load",
gimp_standard_help_func, LOAD_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -970,9 +979,9 @@ load_dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
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);
......
......@@ -35,9 +35,9 @@
#include "libgimp/stdplugins-intl.h"
#define VARIATION_SAME (-2)
#define PLUG_IN_PROC "plug-in-flame"
#define HELP_ID "plug-in-flame"
#define VARIATION_SAME (-2)
#define BUFFER_SIZE 10000
......@@ -119,12 +119,12 @@ 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_install_procedure ("plug_in_flame",
gimp_install_procedure (PLUG_IN_PROC,
"Creates cosmic recursive fractal flames",
"Creates cosmic recursive fractal flames",
"Scott Draves",
......@@ -136,8 +136,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_flame",
"<Image>/Filters/Render/Nature");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Render/Nature");
}
static void
......@@ -195,7 +194,7 @@ run (const gchar *name,
}
else
{
gimp_get_data ("plug_in_flame", &config);
gimp_get_data (PLUG_IN_PROC, &config);
maybe_init_cp ();
drawable = gimp_drawable_get (param[2].data.d_drawable);
......@@ -233,7 +232,7 @@ run (const gchar *name,
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
gimp_set_data ("plug_in_flame", &config, sizeof (config));
gimp_set_data (PLUG_IN_PROC, &config, sizeof (config));
}
else
{
......@@ -641,7 +640,7 @@ edit_callback (GtkWidget *widget,
edit_dlg = gimp_dialog_new (_("Edit Flame"), "flame",
parent, GTK_DIALOG_DESTROY_WITH_PARENT,
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,
......@@ -940,7 +939,7 @@ dialog (void)
dlg = gimp_dialog_new (_("Flame"), "flame",
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,
......
......@@ -222,7 +222,7 @@ gfig_dialog (void)
GtkWidget *empty_label;
gchar *path;
gimp_ui_init ("gfig", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
img_width = gimp_drawable_width (gfig_context->drawable_id);
img_height = gimp_drawable_height (gfig_context->drawable_id);
......@@ -291,9 +291,9 @@ gfig_dialog (void)
}
/* Start building the dialog up */
top_level_dlg = gimp_dialog_new (_("Gfig"), "gfig",
top_level_dlg = gimp_dialog_new (_("Gfig"), 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_CLOSE, GTK_RESPONSE_OK,
......
......@@ -56,8 +56,6 @@
#include "libgimp/stdplugins-intl.h"
/***** Magic numbers *****/
#define GFIG_HEADER "GFIG Version 0.2\n"
static void query (void);
......@@ -115,7 +113,7 @@ query (void)
{ GIMP_PDB_INT32, "dummy", "dummy" }
};
gimp_install_procedure ("plug_in_gfig",
gimp_install_procedure (PLUG_IN_PROC,
"Create Geometrical shapes with the Gimp",
"Draw Vector Graphics and paint them onto your images. "
"Gfig allows you to draw many types of objects "
......@@ -133,7 +131,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_gfig", "<Image>/Filters/Render");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Render");
}
static void
......@@ -216,7 +214,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
/*gimp_get_data ("plug_in_gfig", &selvals);*/
/*gimp_get_data (PLUG_IN_PROC, &selvals);*/
if (! gfig_dialog ())
{
gimp_drawable_detach (gfig_drawable);
......@@ -243,7 +241,7 @@ run (const gchar *name,
else
#if 0
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_gfig", &selvals, sizeof (SelectItVals));
gimp_set_data (PLUG_IN_PROC, &selvals, sizeof (SelectItVals));
else
#endif /* 0 */
{
......
......@@ -67,7 +67,8 @@ void object_end (GdkPoint *pnt, gint shift_down);
#define MAX_LOAD_LINE 256
#define SQ_SIZE 8
#define HELP_ID "plug-in-gfig"
#define PLUG_IN_PROC "plug-in-gfig"
#define PLUG_IN_BINARY "gfig"
extern gint line_no;
extern gint preview_width, preview_height;
......
......@@ -63,7 +63,8 @@
#define RESPONSE_RESCAN 1
#define HELP_ID "plug-in-gflare"
#define PLUG_IN_PROC "plug-in-gflare"
#define PLUG_IN_BINARY "gflare"
#define GRADIENT_NAME_MAX 256
#define GRADIENT_RESOLUTION 360
......@@ -784,10 +785,10 @@ plugin_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_STRING, "gflare_name", "The name of GFlare" },
{ GIMP_PDB_STRING, "gflare-name", "The name of GFlare" },
{ GIMP_PDB_INT32, "xcenter", "X coordinate of center of GFlare" },
{ GIMP_PDB_INT32, "ycenter", "Y coordinate of center of GFlare" },
{ GIMP_PDB_FLOAT, "radius", "Radius of GFlare (pixel)" },
......@@ -795,9 +796,9 @@ plugin_query (void)
{ GIMP_PDB_FLOAT, "hue", "Hue rotation of GFlare (degree)" },
{ GIMP_PDB_FLOAT, "vangle", "Vector angle for second flares (degree)" },
{ GIMP_PDB_FLOAT, "vlength", "Vector length for second flares (percentage to Radius)" },
{ GIMP_PDB_INT32, "use_asupsample", "Whether it uses or not adaptive supersampling while rendering (boolean)" },
{ GIMP_PDB_INT32, "asupsample_max_depth", "Max depth for adaptive supersampling"},
{ GIMP_PDB_FLOAT, "asupsample_threshold", "Threshold for adaptive supersampling"}
{ GIMP_PDB_INT32, "use-asupsample", "Whether it uses or not adaptive supersampling while rendering (boolean)" },
{ GIMP_PDB_INT32, "asupsample-max-depth", "Max depth for adaptive supersampling"},
{ GIMP_PDB_FLOAT, "asupsample-threshold", "Threshold for adaptive supersampling"}
};
const gchar *help_string =
......@@ -808,7 +809,7 @@ plugin_query (void)
"In non-interactive call, the user can only render one of GFlare "
"which has been stored in gflare-path already.";
gimp_install_procedure ("plug_in_gflare",
gimp_install_procedure (PLUG_IN_PROC,
"Produce lense flare effect using custom gradients",
help_string,
"Eiichi Takamori",
......@@ -820,7 +821,7 @@ plugin_query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_gflare",
gimp_plugin_menu_register (PLUG_IN_PROC,
"<Image>/Filters/Light and Shadow/Light");
}
......@@ -904,7 +905,7 @@ plugin_run (const gchar *name,
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("plug_in_gflare", &pvals);
gimp_get_data (PLUG_IN_PROC, &pvals);
/* First acquire information with a dialog */
if (! dlg_run ())
......@@ -940,7 +941,7 @@ plugin_run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("plug_in_gflare", &pvals);
gimp_get_data (PLUG_IN_PROC, &pvals);
break;
default:
......@@ -961,7 +962,7 @@ plugin_run (const gchar *name,
/* Store data */
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_gflare", &pvals, sizeof (PluginValues));
gimp_set_data (PLUG_IN_PROC, &pvals, sizeof (PluginValues));
}
else
{
......@@ -2266,7 +2267,7 @@ dlg_run (void)
GtkWidget *notebook;
gboolean run = FALSE;
gimp_ui_init ("gflare", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
/*
* Init Main Dialog
......@@ -2287,9 +2288,9 @@ dlg_run (void)
* Dialog Shell
*/
shell = dlg->shell = gimp_dialog_new (_("GFlare"), "gflare",
shell = dlg->shell = gimp_dialog_new (_("GFlare"), 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,
......@@ -2987,7 +2988,7 @@ dlg_selector_new_callback (GtkWidget *widget,
query_box = gimp_query_string_box (_("New GFlare"),
gtk_widget_get_toplevel (widget),
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
_("Enter a name for the new GFlare"),
_("Unnamed"),
NULL, NULL,
......@@ -3066,7 +3067,7 @@ dlg_selector_copy_callback (GtkWidget *widget,
query_box = gimp_query_string_box (_("Copy GFlare"),
gtk_widget_get_toplevel (widget),
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
_("Enter a name for the copied GFlare"),
name,
NULL, NULL,
......@@ -3132,7 +3133,7 @@ dlg_selector_delete_callback (GtkWidget *widget,
dialog = gimp_query_boolean_box (_("Delete GFlare"),
dlg->shell,
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_DIALOG_QUESTION,
str,
GTK_STOCK_DELETE, GTK_STOCK_CANCEL,
......@@ -3243,9 +3244,9 @@ ed_run (GtkWindow *parent,
* Dialog Shell
*/
ed->shell =
shell = gimp_dialog_new (_("GFlare Editor"), "gflare",
shell = gimp_dialog_new (_("GFlare Editor"), PLUG_IN_BINARY,
GTK_WIDGET (parent), 0,
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
_("Rescan Gradients"), RESPONSE_RESCAN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
......
......@@ -65,6 +65,12 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-fli-load"
#define SAVE_PROC "file-fli-save"
#define INFO_PROC "file-fli-info"
#define PLUG_IN_BINARY "gfli"
static void query (void);
static void run (const gchar *name,
gint nparams,
......@@ -147,7 +153,7 @@ query (void)
/*
* Load/save procedures
*/
gimp_install_procedure ("file_fli_load",
gimp_install_procedure (LOAD_PROC,
"load FLI-movies",
"This is an experimantal plug-in to handle FLI movies",
"Jens Ch. Restemeier",
......@@ -161,13 +167,13 @@ query (void)
load_args,
load_return_vals);
gimp_register_file_handler_mime ("file_fli_load", "image/x-flic");
gimp_register_magic_load_handler ("file_fli_load",
gimp_register_file_handler_mime (LOAD_PROC, "image/x-flic");
gimp_register_magic_load_handler (LOAD_PROC,
"fli,flc",
"",
"");
gimp_install_procedure ("file_fli_save",
gimp_install_procedure (SAVE_PROC,
"save FLI-movies",
"This is an experimantal plug-in to handle FLI movies",
"Jens Ch. Restemeier",
......@@ -179,15 +185,15 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_file_handler_mime ("file_fli_save", "image/x-flic");
gimp_register_save_handler ("file_fli_save",
gimp_register_file_handler_mime (SAVE_PROC, "image/x-flic");
gimp_register_save_handler (SAVE_PROC,
"fli,flc",
"");
/*
* Utility functions:
*/
gimp_install_procedure ("file_fli_info",
gimp_install_procedure (INFO_PROC,
"Get info about a Fli movie",
"This is a experimantal plug-in to handle FLI movies",
"Jens Ch. Restemeier",
......@@ -229,7 +235,7 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_fli_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
switch (run_mode)
{
......@@ -303,7 +309,7 @@ run (const gchar *name,
break;
}
}
else if (strcmp (name, "file_fli_save") == 0)
else if (strcmp (name, SAVE_PROC) == 0)
{
image_ID = orig_image_ID = param[1].data.d_int32;
drawable_ID = param[2].data.d_int32;
......@@ -332,7 +338,7 @@ run (const gchar *name,
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("gfli", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "FLI",
GIMP_EXPORT_CAN_HANDLE_INDEXED |
GIMP_EXPORT_CAN_HANDLE_GRAY |
......@@ -357,7 +363,7 @@ run (const gchar *name,
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else if (strcmp (name, "file_fli_info") == 0)
else if (strcmp (name, INFO_PROC) == 0)
{
gint32 width, height, frames;
......@@ -801,11 +807,11 @@ load_dialog (const gchar *name)
from_frame = 1;
to_frame = nframes;
gimp_ui_init ("gfli", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
dialog = gimp_dialog_new (_("GFLI 1.3 - Load framestack"), "gfli",
dialog = gimp_dialog_new (_("GFLI 1.3 - Load framestack"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-gfli-load",
gimp_standard_help_func, LOAD_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -871,9 +877,9 @@ save_dialog (gint32 image_id)
from_frame = 1;
to_frame = nframes;
dialog = gimp_dialog_new (_("GFLI 1.3 - Save framestack"), "gfli",
dialog = gimp_dialog_new (_("GFLI 1.3 - Save framestack"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-gfli-save",
gimp_standard_help_func, SAVE_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......
......@@ -38,8 +38,8 @@
/* defines */
#define GIMP_HELP_EXT_NAME "extension_gimp_help"
#define GIMP_HELP_TEMP_EXT_NAME "extension_gimp_help_temp"
#define GIMP_HELP_EXT_PROC "extension-gimp-help"
#define GIMP_HELP_TEMP_EXT_PROC "extension-gimp-help-temp"
typedef struct
......@@ -102,13 +102,13 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "num_domain_names", "" },
{ GIMP_PDB_STRINGARRAY, "domain_names", "" },
{ GIMP_PDB_INT32, "num_domain_uris", "" },
{ GIMP_PDB_STRINGARRAY, "domain_uris", "" }
{ GIMP_PDB_INT32, "num-domain-names", "" },
{ GIMP_PDB_STRINGARRAY, "domain-names", "" },
{ GIMP_PDB_INT32, "num-domain-uris", "" },
{ GIMP_PDB_STRINGARRAY, "domain-uris", "" }
};
gimp_install_procedure (GIMP_HELP_EXT_NAME,
gimp_install_procedure (GIMP_HELP_EXT_PROC,
"", /* FIXME */
"", /* FIXME */
"Sven Neumann <sven@gimp.org>, "
......@@ -204,7 +204,7 @@ run (const gchar *name,