From d7c6becdb533b623c10d22a4efb147c739412330 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Mon, 17 May 2004 09:39:35 +0000 Subject: [PATCH] initialize the image unit to GIMP_UNIT_PIXEL. 2004-05-17 Sven Neumann * 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. --- ChangeLog | 9 +++++++++ app/core/gimpimage.c | 4 ++-- app/pdb/image_cmds.c | 2 +- tools/pdbgen/pdb/image.pdb | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ab4d8a41f..4df611f495 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-05-17 Sven Neumann + + * 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 * plug-ins/script-fu/scripts/old-photo.scm: fixed wrong use of diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c index 492f8e06fe..3efb51b733 100644 --- a/app/core/gimpimage.c +++ b/app/core/gimpimage.c @@ -468,7 +468,7 @@ gimp_image_init (GimpImage *gimage) gimage->height = 0; gimage->xresolution = 1.0; gimage->yresolution = 1.0; - gimage->unit = GIMP_UNIT_INCH; + gimage->unit = GIMP_UNIT_PIXEL; gimage->base_type = GIMP_RGB; gimage->cmap = NULL; @@ -1275,7 +1275,7 @@ gimp_image_set_unit (GimpImage *gimage, GimpUnit 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; } diff --git a/app/pdb/image_cmds.c b/app/pdb/image_cmds.c index 850872fe80..daa158284a 100644 --- a/app/pdb/image_cmds.c +++ b/app/pdb/image_cmds.c @@ -3831,7 +3831,7 @@ image_set_unit_invoker (Gimp *gimp, success = FALSE; 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; if (success) diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb index 01c738cd79..0394e744dd 100644 --- a/tools/pdbgen/pdb/image.pdb +++ b/tools/pdbgen/pdb/image.pdb @@ -1323,7 +1323,7 @@ my $unit_misc = <<'CODE'; $date = '1998'; CODE -&image_accessors('unit', 'unit (min GIMP_UNIT_INCH)', 'unit', 1, +&image_accessors('unit', 'unit', 'unit', 1, [ <