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

initialize the image unit to GIMP_UNIT_PIXEL.

2004-05-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c (gimp_image_init): initialize the image
	unit to GIMP_UNIT_PIXEL.

	* app/pdb/image_cmds.c
	* tools/pdbgen/pdb/image.pdb: allow GIMP_UNIT_PIXEL to be used
	in the gimp_image_set_unit() PDB call.
parent 866a6842
2004-05-17 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.c (gimp_image_init): initialize the image
unit to GIMP_UNIT_PIXEL.
* app/pdb/image_cmds.c
* tools/pdbgen/pdb/image.pdb: allow GIMP_UNIT_PIXEL to be used
in the gimp_image_set_unit() PDB call.
2004-05-16 Sven Neumann <sven@gimp.org> 2004-05-16 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/scripts/old-photo.scm: fixed wrong use of * plug-ins/script-fu/scripts/old-photo.scm: fixed wrong use of
......
...@@ -468,7 +468,7 @@ gimp_image_init (GimpImage *gimage) ...@@ -468,7 +468,7 @@ gimp_image_init (GimpImage *gimage)
gimage->height = 0; gimage->height = 0;
gimage->xresolution = 1.0; gimage->xresolution = 1.0;
gimage->yresolution = 1.0; gimage->yresolution = 1.0;
gimage->unit = GIMP_UNIT_INCH; gimage->unit = GIMP_UNIT_PIXEL;
gimage->base_type = GIMP_RGB; gimage->base_type = GIMP_RGB;
gimage->cmap = NULL; gimage->cmap = NULL;
...@@ -1275,7 +1275,7 @@ gimp_image_set_unit (GimpImage *gimage, ...@@ -1275,7 +1275,7 @@ gimp_image_set_unit (GimpImage *gimage,
GimpUnit GimpUnit
gimp_image_get_unit (const GimpImage *gimage) gimp_image_get_unit (const GimpImage *gimage)
{ {
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), GIMP_UNIT_INCH); g_return_val_if_fail (GIMP_IS_IMAGE (gimage), GIMP_UNIT_PIXEL);
return gimage->unit; return gimage->unit;
} }
......
...@@ -3831,7 +3831,7 @@ image_set_unit_invoker (Gimp *gimp, ...@@ -3831,7 +3831,7 @@ image_set_unit_invoker (Gimp *gimp,
success = FALSE; success = FALSE;
unit = args[1].value.pdb_int; unit = args[1].value.pdb_int;
if (unit < GIMP_UNIT_INCH || unit >= _gimp_unit_get_number_of_units (gimp)) if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
success = FALSE; success = FALSE;
if (success) if (success)
......
...@@ -1323,7 +1323,7 @@ my $unit_misc = <<'CODE'; ...@@ -1323,7 +1323,7 @@ my $unit_misc = <<'CODE';
$date = '1998'; $date = '1998';
CODE CODE
&image_accessors('unit', 'unit (min GIMP_UNIT_INCH)', 'unit', 1, &image_accessors('unit', 'unit', 'unit', 1,
[ <<CODE1, <<CODE2 ]); [ <<CODE1, <<CODE2 ]);
\$help .= '$unit_help'; \$help .= '$unit_help';
$unit_misc $unit_misc
......
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