Commit efa18343 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/FractalExplorer/FractalExplorer.c

2006-06-27  Sven Neumann  <neumann@jpk.com>

	* plug-ins/FractalExplorer/FractalExplorer.c
	* plug-ins/Lighting/lighting_main.c
	* plug-ins/MapObject/mapobject_main.c: use canonical procedure and
	parameter names. Marked procedure blurbs for translation.

	* plug-ins/winicon/main.c: use canonical procedure and parameter
	names.
parent 89524c57
2006-06-27 Sven Neumann <neumann@jpk.com>
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/Lighting/lighting_main.c
* plug-ins/MapObject/mapobject_main.c: use canonical procedure and
parameter names. Marked procedure blurbs for translation.
* plug-ins/winicon/main.c: use canonical procedure and parameter
names.
2006-06-27 Sven Neumann <sven@gimp.org>
* app/tools/gimpalignoptions.c: removed unused includes and stubs.
......
......@@ -73,6 +73,8 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_PROC "plug-in-fractalexplorer"
/**********************************************************************
Global variables
*********************************************************************/
......@@ -208,7 +210,7 @@ query (void)
{
static const GimpParamDef 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", "Input drawable" },
{ GIMP_PDB_INT8, "fractaltype", "0: Mandelbrot; "
......@@ -241,8 +243,8 @@ query (void)
{ GIMP_PDB_INT32, "ncolors", "Number of Colors for mapping (2<=ncolors<=8192)" }
};
gimp_install_procedure ("plug_in_fractalexplorer",
"Chaos Fractal Explorer Plug-In",
gimp_install_procedure (PLUG_IN_PROC,
N_("Render fractal art"),
"No help yet.",
"Daniel Cotting (cotting@multimania.com, www.multimania.com/cotting)",
"Daniel Cotting (cotting@multimania.com, www.multimania.com/cotting)",
......@@ -798,12 +800,11 @@ fractalexplorer_list_pos (fractalexplorerOBJ *fractalexplorer)
static gint
fractalexplorer_list_insert (fractalexplorerOBJ *fractalexplorer)
{
gint n;
gint n = fractalexplorer_list_pos (fractalexplorer);
/*
* Insert fractalexplorers in alphabetical order
*/
n = fractalexplorer_list_pos (fractalexplorer);
fractalexplorer_list = g_list_insert (fractalexplorer_list,
fractalexplorer, n);
......
......@@ -36,6 +36,9 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_PROC "plug-in-lighting"
LightingValues mapvals;
/******************/
......@@ -162,7 +165,7 @@ query (void)
{
static const GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive (0), non-interactive (1)" },
{ GIMP_PDB_INT32, "run-mode", "Interactive (0), non-interactive (1)" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_DRAWABLE, "bumpdrawable", "Bumpmap drawable (set to 0 if disabled)" },
......@@ -172,24 +175,24 @@ query (void)
{ GIMP_PDB_INT32, "bumpmaptype", "Type of mapping (0=linear,1=log, 2=sinusoidal, 3=spherical)" },
{ GIMP_PDB_INT32, "lighttype", "Type of lightsource (0=point,1=directional,3=spot,4=none)" },
{ GIMP_PDB_COLOR, "lightcolor", "Lightsource color (r,g,b)" },
{ GIMP_PDB_FLOAT, "lightposition_x", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition_y", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition_z", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightdirection_x", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection_y", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection_z", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "ambient_intensity", "Material ambient intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse_intensity", "Material diffuse intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse_reflectivity", "Material diffuse reflectivity (0..1)" },
{ GIMP_PDB_FLOAT, "specular_reflectivity", "Material specular reflectivity (0..1)" },
{ GIMP_PDB_FLOAT, "lightposition-x", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition-y", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition-z", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightdirection-x", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection-y", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection-z", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "ambient-intensity", "Material ambient intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse-intensity", "Material diffuse intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse-reflectivity", "Material diffuse reflectivity (0..1)" },
{ GIMP_PDB_FLOAT, "specular-reflectivity", "Material specular reflectivity (0..1)" },
{ GIMP_PDB_FLOAT, "highlight", "Material highlight (0..->), note: it's expotential" },
{ GIMP_PDB_INT32, "antialiasing", "Apply antialiasing (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "newimage", "Create a new image (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "transparentbackground", "Make background transparent (TRUE/FALSE)" }
};
gimp_install_procedure ("plug_in_lighting",
"Apply various lighting effects to an image",
gimp_install_procedure (PLUG_IN_PROC,
N_("Apply various lighting effects to an image"),
"No help yet",
"Tom Bech & Federico Mena Quintero",
"Tom Bech & Federico Mena Quintero",
......@@ -200,7 +203,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_lighting",
gimp_plugin_menu_register (PLUG_IN_PROC,
"<Image>/Filters/Light and Shadow/Light");
}
......@@ -234,7 +237,7 @@ run (const gchar *name,
/* Possibly retrieve data */
/* ====================== */
gimp_get_data ("plug_in_lighting", &mapvals);
gimp_get_data (PLUG_IN_PROC, &mapvals);
/* Get the specified drawable */
/* ========================== */
......@@ -264,7 +267,7 @@ run (const gchar *name,
{
compute_image ();
gimp_set_data ("plug_in_lighting",
gimp_set_data (PLUG_IN_PROC,
&mapvals, sizeof (LightingValues));
gimp_displays_flush ();
}
......
......@@ -36,6 +36,9 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_PROC "plug-in-map-object"
/* Global variables */
/* ================ */
......@@ -138,33 +141,33 @@ query (void)
{
static const GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive (0), non-interactive (1)" },
{ GIMP_PDB_INT32, "run-mode", "Interactive (0), non-interactive (1)" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "maptype", "Type of mapping (0=plane,1=sphere,2=box,3=cylinder)" },
{ GIMP_PDB_FLOAT, "viewpoint_x", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "viewpoint_y", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "viewpoint_z", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "position_x", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "position_y", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "position_z", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "firstaxis_x", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "firstaxis_y", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "firstaxis_z", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis_x", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis_y", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis_z", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "rotationangle_x", "Rotation about X axis in degrees" },
{ GIMP_PDB_FLOAT, "rotationangle_y", "Rotation about Y axis in degrees" },
{ GIMP_PDB_FLOAT, "rotationangle_z", "Rotation about Z axis in degrees" },
{ GIMP_PDB_FLOAT, "viewpoint-x", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "viewpoint-y", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "viewpoint-z", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "position-x", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "position-y", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "position-z", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "firstaxis-x", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "firstaxis-y", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "firstaxis-z", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis-x", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis-y", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis-z", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "rotationangle-x", "Rotation about X axis in degrees" },
{ GIMP_PDB_FLOAT, "rotationangle-y", "Rotation about Y axis in degrees" },
{ GIMP_PDB_FLOAT, "rotationangle-z", "Rotation about Z axis in degrees" },
{ GIMP_PDB_INT32, "lighttype", "Type of lightsource (0=point,1=directional,3=none)" },
{ GIMP_PDB_COLOR, "lightcolor", "Lightsource color (r,g,b)" },
{ GIMP_PDB_FLOAT, "lightposition_x", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition_y", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition_z", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightdirection_x", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection_y", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection_z", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightposition-x", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition-y", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition-z", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightdirection-x", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection-y", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection-z", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "ambient_intensity", "Material ambient intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse_intensity", "Material diffuse intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse_reflectivity", "Material diffuse reflectivity (0..1)" },
......@@ -175,22 +178,22 @@ query (void)
{ GIMP_PDB_INT32, "newimage", "Create a new image (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "transparentbackground", "Make background transparent (TRUE/FALSE)" },
{ GIMP_PDB_FLOAT, "radius", "Sphere/cylinder radius (only used when maptype=1 or 3)" },
{ GIMP_PDB_FLOAT, "x_scale", "Box x size (0..->)" },
{ GIMP_PDB_FLOAT, "y_scale", "Box y size (0..->)" },
{ GIMP_PDB_FLOAT, "z_scale", "Box z size (0..->)"},
{ GIMP_PDB_FLOAT, "cylinder_length", "Cylinder length (0..->)"},
{ GIMP_PDB_DRAWABLE, "box_front_drawable", "Box front face (set these to -1 if not used)" },
{ GIMP_PDB_DRAWABLE, "box_back_drawable", "Box back face" },
{ GIMP_PDB_DRAWABLE, "box_top_drawable", "Box top face" },
{ GIMP_PDB_DRAWABLE, "box_bottom_drawable", "Box bottom face" },
{ GIMP_PDB_DRAWABLE, "box_left_drawable", "Box left face" },
{ GIMP_PDB_DRAWABLE, "box_right_drawable", "Box right face" },
{ GIMP_PDB_DRAWABLE, "cyl_top_drawable", "Cylinder top face (set these to -1 if not used)" },
{ GIMP_PDB_DRAWABLE, "cyl_bottom_drawable", "Cylinder bottom face" }
{ GIMP_PDB_FLOAT, "x-scale", "Box x size (0..->)" },
{ GIMP_PDB_FLOAT, "y-scale", "Box y size (0..->)" },
{ GIMP_PDB_FLOAT, "z-scale", "Box z size (0..->)"},
{ GIMP_PDB_FLOAT, "cylinder-length", "Cylinder length (0..->)"},
{ GIMP_PDB_DRAWABLE, "box-front-drawable", "Box front face (set these to -1 if not used)" },
{ GIMP_PDB_DRAWABLE, "box-back-drawable", "Box back face" },
{ GIMP_PDB_DRAWABLE, "box-top-drawable", "Box top face" },
{ GIMP_PDB_DRAWABLE, "box-bottom-drawable", "Box bottom face" },
{ GIMP_PDB_DRAWABLE, "box-left-drawable", "Box left face" },
{ GIMP_PDB_DRAWABLE, "box-right-drawable", "Box right face" },
{ GIMP_PDB_DRAWABLE, "cyl-top-drawable", "Cylinder top face (set these to -1 if not used)" },
{ GIMP_PDB_DRAWABLE, "cyl-bottom-drawable", "Cylinder bottom face" }
};
gimp_install_procedure ("plug_in_map_object",
"Maps a picture to a object (plane, sphere, box or cylinder)",
gimp_install_procedure (PLUG_IN_PROC,
N_("Map the image to an object (plane, sphere, box or cylinder)"),
"No help yet",
"Tom Bech & Federico Mena Quintero",
"Tom Bech & Federico Mena Quintero",
......@@ -201,7 +204,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_map_object", "<Image>/Filters/Map");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Map");
}
static void
......@@ -250,13 +253,12 @@ run (const gchar *name,
{
compute_image ();
gimp_set_data ("plug_in_map_object",
&mapvals, sizeof (MapObjectValues));
gimp_set_data (PLUG_IN_PROC, &mapvals, sizeof (MapObjectValues));
}
break;
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data ("plug_in_map_object", &mapvals);
gimp_get_data (PLUG_IN_PROC, &mapvals);
check_drawables (drawable);
image_setup (drawable, FALSE);
compute_image ();
......
......@@ -34,6 +34,10 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-ico-load"
#define LOAD_THUMB_PROC "file-ico-load-thumb"
#define SAVE_PROC "file-ico-save"
static void query (void);
static void run (const gchar *name,
......@@ -60,9 +64,9 @@ query (void)
{
static const 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 const GimpParamDef load_return_vals[] =
{
......@@ -72,25 +76,25 @@ query (void)
static const GimpParamDef thumb_args[] =
{
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
{ GIMP_PDB_INT32, "thumb_size", "Preferred thumbnail size" }
{ GIMP_PDB_INT32, "thumb-size", "Preferred thumbnail size" }
};
static const GimpParamDef thumb_return_vals[] =
{
{ GIMP_PDB_IMAGE, "image", "Thumbnail image" },
{ GIMP_PDB_INT32, "image_width", "Width of full-sized image" },
{ GIMP_PDB_INT32, "image_height", "Height of full-sized image" }
{ GIMP_PDB_INT32, "image-width", "Width of full-sized image" },
{ GIMP_PDB_INT32, "image-height", "Height of full-sized image" }
};
static const 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_ico_load",
gimp_install_procedure (LOAD_PROC,
"Loads files of Windows ICO file format",
"Loads files of Windows ICO file format",
"Christian Kreibich <christian@whoop.org>",
......@@ -103,13 +107,13 @@ query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_register_file_handler_mime ("file_ico_load", "image/x-ico");
gimp_register_magic_load_handler ("file_ico_load",
gimp_register_file_handler_mime (LOAD_PROC, "image/x-ico");
gimp_register_magic_load_handler (LOAD_PROC,
"ico",
"",
"0,string,\\000\\001\\000\\000,0,string,\\000\\002\\000\\000");
gimp_install_procedure ("file_ico_load_thumb",
gimp_install_procedure (LOAD_THUMB_PROC,
"Loads a preview from an Windows ICO file",
"",
"Dom Lachowicz, Sven Neumann",
......@@ -122,9 +126,9 @@ query (void)
G_N_ELEMENTS (thumb_return_vals),
thumb_args, thumb_return_vals);
gimp_register_thumbnail_loader ("file_ico_load", "file_ico_load_thumb");
gimp_register_thumbnail_loader (LOAD_PROC, LOAD_THUMB_PROC);
gimp_install_procedure ("file_ico_save",
gimp_install_procedure (SAVE_PROC,
"Saves files in Windows ICO file format",
"Saves files in Windows ICO file format",
"Christian Kreibich <christian@whoop.org>",
......@@ -136,8 +140,8 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_file_handler_mime ("file_ico_save", "image/x-ico");
gimp_register_save_handler ("file_ico_save", "ico", "");
gimp_register_file_handler_mime (SAVE_PROC, "image/x-ico");
gimp_register_save_handler (SAVE_PROC, "ico", "");
}
static void
......@@ -163,7 +167,7 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_ico_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
switch (run_mode)
{
......@@ -195,7 +199,7 @@ run (const gchar *name,
}
}
}
else if (strcmp (name, "file_ico_load_thumb") == 0)
else if (strcmp (name, LOAD_THUMB_PROC) == 0)
{
if (nparams < 2)
{
......@@ -227,7 +231,7 @@ run (const gchar *name,
}
}
}
else if (strcmp (name, "file_ico_save") == 0)
else if (strcmp (name, SAVE_PROC) == 0)
{
gchar *file_name;
......
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