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

app/* libgimp/* plug-ins/* did a global s/GUnit/GimpUnit/ and

2000-02-07  Michael Natterer  <mitch@gimp.org>

	* app/*
	* libgimp/*
	* plug-ins/*
	* tools/pdbgen/*: did a global s/GUnit/GimpUnit/ and
	s/GimpSizeEntryUP/GimpSizeEntryUpdatePolicy/

	* libgimp/gimpcolorspace.c: renamed the parameter names to match
	the names in the header.

	* libgimp/gimphelpui.h
	* libgimp/gimpimage.c
	* libgimp/gimpmatrix.h
	* libgimp/gimpsizeentry.[ch]
	* libgimp/gimpsizeentry.[ch]
	* libgimp/gimpunit.[ch]
	* libgimp/gimpunitmenu.[ch]
	* libgimp/gimpwidgets.[ch]: added documentation and use g* types
	all over the place (enables cross-referencing with the glib and
	gtk+ html documentation).

	* plug-ins/common/exchange.c
	* plug-ins/common/max_rgb.c: small cleanups.

	* plug-ins/common/mapcolor.c: the color buttons were attached in
	the wrong order.
parent 820c8f41
2000-02-07 Michael Natterer <mitch@gimp.org>
* app/*
* libgimp/*
* plug-ins/*
* tools/pdbgen/*: did a global s/GUnit/GimpUnit/ and
s/GimpSizeEntryUP/GimpSizeEntryUpdatePolicy/
* libgimp/gimpcolorspace.c: renamed the parameter names to match
the names in the header.
* libgimp/gimphelpui.h
* libgimp/gimpimage.c
* libgimp/gimpmatrix.h
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpunit.[ch]
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: added documentation and use g* types
all over the place (enables cross-referencing with the glib and
gtk+ html documentation).
* plug-ins/common/exchange.c
* plug-ins/common/max_rgb.c: small cleanups.
* plug-ins/common/mapcolor.c: the color buttons were attached in
the wrong order.
Mon Feb 7 21:00:34 CET 2000 Sven Neumann <sven@gimp.org>
* app/info_window.c: Got rid of the "Shades of Colors" info
......@@ -123,7 +151,7 @@ Sun Feb 6 20:46:36 CET 2000 Sven Neumann <sven@gimp.org>
* plug-ins/common/unsharp.c
* plug-ins/gflare/gflare.c
* plug-ins/sinus/sinus.c
* plug-ins/struc/struc.c: soem more consistency stuff.
* plug-ins/struc/struc.c: some more consistency stuff.
2000-02-05 Asbjorn Pettersen <asbjornP@dualog.no>
......
......@@ -1405,20 +1405,20 @@ gimage_mask_feather_callback (GtkWidget *widget,
gpointer client_data,
gpointer call_data)
{
GImage *gimage;
GUnit unit;
gdouble radius_x;
gdouble radius_y;
GImage *gimage;
GimpUnit unit;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (client_data);
selection_feather_radius = *(gdouble *) call_data;
g_free (call_data);
unit = (GUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
unit = (GimpUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
radius_x = radius_y = selection_feather_radius;
if (unit != UNIT_PIXEL)
if (unit != GIMP_UNIT_PIXEL)
{
gdouble factor;
......@@ -1440,20 +1440,20 @@ gimage_mask_border_callback (GtkWidget *widget,
gpointer client_data,
gpointer call_data)
{
GImage *gimage;
GUnit unit;
gdouble radius_x;
gdouble radius_y;
GImage *gimage;
GimpUnit unit;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (client_data);
selection_border_radius = (gint) (*(gdouble *) call_data + 0.5);
g_free (call_data);
unit = (GUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
unit = (GimpUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
radius_x = radius_y = selection_border_radius;
if (unit != UNIT_PIXEL)
if (unit != GIMP_UNIT_PIXEL)
{
gdouble factor;
......@@ -1475,20 +1475,20 @@ gimage_mask_grow_callback (GtkWidget *widget,
gpointer client_data,
gpointer call_data)
{
GImage *gimage;
GUnit unit;
gdouble radius_x;
gdouble radius_y;
GImage *gimage;
GimpUnit unit;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (client_data);
selection_grow_pixels = (gint) (*(gdouble *) call_data + 0.5);
g_free (call_data);
unit = (GUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
unit = (GimpUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
radius_x = radius_y = selection_grow_pixels;
if (unit != UNIT_PIXEL)
if (unit != GIMP_UNIT_PIXEL)
{
gdouble factor;
......@@ -1511,7 +1511,7 @@ gimage_mask_shrink_callback (GtkWidget *widget,
gpointer call_data)
{
GImage *gimage;
GUnit unit;
GimpUnit unit;
gint radius_x;
gint radius_y;
......@@ -1519,7 +1519,7 @@ gimage_mask_shrink_callback (GtkWidget *widget,
selection_shrink_pixels = (gint) (*(gdouble *) call_data + 0.5);
g_free (call_data);
unit = (GUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
unit = (GimpUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
radius_x = radius_y = selection_shrink_pixels;
......@@ -1527,7 +1527,7 @@ gimage_mask_shrink_callback (GtkWidget *widget,
! GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (widget),
"edge_lock_toggle"))->active;
if (unit != UNIT_PIXEL)
if (unit != GIMP_UNIT_PIXEL)
{
gdouble factor;
......
......@@ -136,7 +136,7 @@ channel_ops_offset (GimpImage* gimage)
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (off_d->off_se);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (off_d->off_se), UNIT_PIXEL);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (off_d->off_se), GIMP_UNIT_PIXEL);
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (off_d->off_se), 0,
gimage->xresolution, FALSE);
......
......@@ -1405,20 +1405,20 @@ gimage_mask_feather_callback (GtkWidget *widget,
gpointer client_data,
gpointer call_data)
{
GImage *gimage;
GUnit unit;
gdouble radius_x;
gdouble radius_y;
GImage *gimage;
GimpUnit unit;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (client_data);
selection_feather_radius = *(gdouble *) call_data;
g_free (call_data);
unit = (GUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
unit = (GimpUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
radius_x = radius_y = selection_feather_radius;
if (unit != UNIT_PIXEL)
if (unit != GIMP_UNIT_PIXEL)
{
gdouble factor;
......@@ -1440,20 +1440,20 @@ gimage_mask_border_callback (GtkWidget *widget,
gpointer client_data,
gpointer call_data)
{
GImage *gimage;
GUnit unit;
gdouble radius_x;
gdouble radius_y;
GImage *gimage;
GimpUnit unit;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (client_data);
selection_border_radius = (gint) (*(gdouble *) call_data + 0.5);
g_free (call_data);
unit = (GUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
unit = (GimpUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
radius_x = radius_y = selection_border_radius;
if (unit != UNIT_PIXEL)
if (unit != GIMP_UNIT_PIXEL)
{
gdouble factor;
......@@ -1475,20 +1475,20 @@ gimage_mask_grow_callback (GtkWidget *widget,
gpointer client_data,
gpointer call_data)
{
GImage *gimage;
GUnit unit;
gdouble radius_x;
gdouble radius_y;
GImage *gimage;
GimpUnit unit;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (client_data);
selection_grow_pixels = (gint) (*(gdouble *) call_data + 0.5);
g_free (call_data);
unit = (GUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
unit = (GimpUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
radius_x = radius_y = selection_grow_pixels;
if (unit != UNIT_PIXEL)
if (unit != GIMP_UNIT_PIXEL)
{
gdouble factor;
......@@ -1511,7 +1511,7 @@ gimage_mask_shrink_callback (GtkWidget *widget,
gpointer call_data)
{
GImage *gimage;
GUnit unit;
GimpUnit unit;
gint radius_x;
gint radius_y;
......@@ -1519,7 +1519,7 @@ gimage_mask_shrink_callback (GtkWidget *widget,
selection_shrink_pixels = (gint) (*(gdouble *) call_data + 0.5);
g_free (call_data);
unit = (GUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
unit = (GimpUnit) gtk_object_get_data (GTK_OBJECT (widget), "size_query_unit");
radius_x = radius_y = selection_shrink_pixels;
......@@ -1527,7 +1527,7 @@ gimage_mask_shrink_callback (GtkWidget *widget,
! GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (widget),
"edge_lock_toggle"))->active;
if (unit != UNIT_PIXEL)
if (unit != GIMP_UNIT_PIXEL)
{
gdouble factor;
......
......@@ -136,7 +136,7 @@ channel_ops_offset (GimpImage* gimage)
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (off_d->off_se);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (off_d->off_se), UNIT_PIXEL);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (off_d->off_se), GIMP_UNIT_PIXEL);
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (off_d->off_se), 0,
gimage->xresolution, FALSE);
......
......@@ -136,7 +136,7 @@ channel_ops_offset (GimpImage* gimage)
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (off_d->off_se);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (off_d->off_se), UNIT_PIXEL);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (off_d->off_se), GIMP_UNIT_PIXEL);
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (off_d->off_se), 0,
gimage->xresolution, FALSE);
......
......@@ -388,14 +388,14 @@ gimp_image_get_resolution (GimpImage *gimage,
void
gimp_image_set_unit (GimpImage *gimage,
GUnit unit)
GimpUnit unit)
{
undo_push_resolution (gimage);
gimage->unit = unit;
}
GUnit
GimpUnit
gimp_image_get_unit (GimpImage *gimage)
{
return gimage->unit;
......
......@@ -116,8 +116,8 @@ void gimp_image_set_resolution (GimpImage *,
gdouble, gdouble);
void gimp_image_get_resolution (GimpImage *,
gdouble *, gdouble *);
void gimp_image_set_unit (GimpImage *, GUnit);
GUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_unit (GimpImage *, GimpUnit);
GimpUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_save_proc (GimpImage *,
PlugInProcDef *);
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
......
......@@ -388,14 +388,14 @@ gimp_image_get_resolution (GimpImage *gimage,
void
gimp_image_set_unit (GimpImage *gimage,
GUnit unit)
GimpUnit unit)
{
undo_push_resolution (gimage);
gimage->unit = unit;
}
GUnit
GimpUnit
gimp_image_get_unit (GimpImage *gimage)
{
return gimage->unit;
......
......@@ -116,8 +116,8 @@ void gimp_image_set_resolution (GimpImage *,
gdouble, gdouble);
void gimp_image_get_resolution (GimpImage *,
gdouble *, gdouble *);
void gimp_image_set_unit (GimpImage *, GUnit);
GUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_unit (GimpImage *, GimpUnit);
GimpUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_save_proc (GimpImage *,
PlugInProcDef *);
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
......
......@@ -388,14 +388,14 @@ gimp_image_get_resolution (GimpImage *gimage,
void
gimp_image_set_unit (GimpImage *gimage,
GUnit unit)
GimpUnit unit)
{
undo_push_resolution (gimage);
gimage->unit = unit;
}
GUnit
GimpUnit
gimp_image_get_unit (GimpImage *gimage)
{
return gimage->unit;
......
......@@ -116,8 +116,8 @@ void gimp_image_set_resolution (GimpImage *,
gdouble, gdouble);
void gimp_image_get_resolution (GimpImage *,
gdouble *, gdouble *);
void gimp_image_set_unit (GimpImage *, GUnit);
GUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_unit (GimpImage *, GimpUnit);
GimpUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_save_proc (GimpImage *,
PlugInProcDef *);
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
......
......@@ -388,14 +388,14 @@ gimp_image_get_resolution (GimpImage *gimage,
void
gimp_image_set_unit (GimpImage *gimage,
GUnit unit)
GimpUnit unit)
{
undo_push_resolution (gimage);
gimage->unit = unit;
}
GUnit
GimpUnit
gimp_image_get_unit (GimpImage *gimage)
{
return gimage->unit;
......
......@@ -116,8 +116,8 @@ void gimp_image_set_resolution (GimpImage *,
gdouble, gdouble);
void gimp_image_get_resolution (GimpImage *,
gdouble *, gdouble *);
void gimp_image_set_unit (GimpImage *, GUnit);
GUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_unit (GimpImage *, GimpUnit);
GimpUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_save_proc (GimpImage *,
PlugInProcDef *);
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
......
......@@ -388,14 +388,14 @@ gimp_image_get_resolution (GimpImage *gimage,
void
gimp_image_set_unit (GimpImage *gimage,
GUnit unit)
GimpUnit unit)
{
undo_push_resolution (gimage);
gimage->unit = unit;
}
GUnit
GimpUnit
gimp_image_get_unit (GimpImage *gimage)
{
return gimage->unit;
......
......@@ -116,8 +116,8 @@ void gimp_image_set_resolution (GimpImage *,
gdouble, gdouble);
void gimp_image_get_resolution (GimpImage *,
gdouble *, gdouble *);
void gimp_image_set_unit (GimpImage *, GUnit);
GUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_unit (GimpImage *, GimpUnit);
GimpUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_save_proc (GimpImage *,
PlugInProcDef *);
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
......
......@@ -2396,9 +2396,9 @@ typedef struct _ResolutionUndo ResolutionUndo;
struct _ResolutionUndo
{
gdouble xres;
gdouble yres;
GUnit unit;
gdouble xres;
gdouble yres;
GimpUnit unit;
};
int
......@@ -2434,8 +2434,8 @@ undo_pop_resolution (GImage *gimage,
void *data_ptr)
{
ResolutionUndo *data;
gdouble tmpres;
GUnit tmpunit;
gdouble tmpres;
GimpUnit tmpunit;
data = data_ptr;
......@@ -2853,54 +2853,57 @@ undo_free_cantundo (UndoState state,
/* A "ok" to the name means I've checked where it's used and
it seems plausible. -- austin 23/9/99 */
static struct undo_name_t {
UndoType type;
const char *name;
} undo_name[] = {
{UNDO_NULL, N_("<<invalid>>")},
{IMAGE_UNDO, N_("image")},
{IMAGE_MOD_UNDO, N_("image mod")},
{MASK_UNDO, N_("mask")},
{LAYER_DISPLACE_UNDO, N_("layer move")}, /* ok */
{TRANSFORM_UNDO, N_("transform")},
{PAINT_UNDO, N_("paint")},
{LAYER_ADD_UNDO, N_("new layer")},
{LAYER_REMOVE_UNDO, N_("delete layer")},
{LAYER_MOD, N_("layer mod")},
{LAYER_MASK_ADD_UNDO, N_("add layer mask")}, /* ok */
{LAYER_MASK_REMOVE_UNDO, N_("delete layer mask")}, /* ok */
{LAYER_RENAME_UNDO, N_("rename layer")},
{LAYER_REPOSITION_UNDO, N_("layer reposition")}, /* ok */
{CHANNEL_ADD_UNDO, N_("new channel")},
{CHANNEL_REMOVE_UNDO, N_("delete channel")},
{CHANNEL_MOD, N_("channel mod")},
{FS_TO_LAYER_UNDO, N_("FS to layer")}, /* ok */
{GIMAGE_MOD, N_("gimage")},
{FS_RIGOR, N_("FS rigor")},
{FS_RELAX, N_("FS relax")},
{GUIDE_UNDO, N_("guide")},
{TEXT_UNDO, N_("text")},
{FLOAT_MASK_UNDO, N_("float selection")},
{EDIT_PASTE_UNDO, N_("paste")},
{EDIT_CUT_UNDO, N_("cut")},
{TRANSFORM_CORE_UNDO, N_("transform core")},
{PAINT_CORE_UNDO, N_("paint core")},
{FLOATING_LAYER_UNDO, N_("floating layer")}, /* unused! */
{LINKED_LAYER_UNDO, N_("linked layer")},
{LAYER_APPLY_MASK_UNDO, N_("apply layer mask")}, /* ok */
{LAYER_MERGE_UNDO, N_("layer merge")},
{FS_ANCHOR_UNDO, N_("FS anchor")},
{GIMAGE_MOD_UNDO, N_("gimage mod")},
{CROP_UNDO, N_("crop")},
{LAYER_SCALE_UNDO, N_("layer scale")},
{LAYER_RESIZE_UNDO, N_("layer resize")},
{QMASK_UNDO, N_("quickmask")},
{PARASITE_ATTACH_UNDO, N_("attach parasite")},
{PARASITE_REMOVE_UNDO, N_("remove parasite")},
{RESOLUTION_UNDO, N_("resolution change")},
{IMAGE_SCALE_UNDO, N_("image scale")},
{IMAGE_RESIZE_UNDO, N_("image resize")},
{MISC_UNDO, N_("misc")}
static struct undo_name_t
{
UndoType type;
const gchar *name;
}
undo_name[] =
{
{ UNDO_NULL, N_("<<invalid>>") },
{ IMAGE_UNDO, N_("image") },
{ IMAGE_MOD_UNDO, N_("image mod") },
{ MASK_UNDO, N_("mask") },
{ LAYER_DISPLACE_UNDO, N_("layer move") }, /* ok */
{ TRANSFORM_UNDO, N_("transform") },
{ PAINT_UNDO, N_("paint") },
{ LAYER_ADD_UNDO, N_("new layer") },
{ LAYER_REMOVE_UNDO, N_("delete layer") },
{ LAYER_MOD, N_("layer mod") },
{ LAYER_MASK_ADD_UNDO, N_("add layer mask") }, /* ok */
{ LAYER_MASK_REMOVE_UNDO, N_("delete layer mask") }, /* ok */
{ LAYER_RENAME_UNDO, N_("rename layer") },
{ LAYER_REPOSITION_UNDO, N_("layer reposition") }, /* ok */
{ CHANNEL_ADD_UNDO, N_("new channel") },
{ CHANNEL_REMOVE_UNDO, N_("delete channel") },
{ CHANNEL_MOD, N_("channel mod") },
{ FS_TO_LAYER_UNDO, N_("FS to layer") }, /* ok */
{ GIMAGE_MOD, N_("gimage") },
{ FS_RIGOR, N_("FS rigor") },
{ FS_RELAX, N_("FS relax") },
{ GUIDE_UNDO, N_("guide") },
{ TEXT_UNDO, N_("text") },
{ FLOAT_MASK_UNDO, N_("float selection") },
{ EDIT_PASTE_UNDO, N_("paste") },
{ EDIT_CUT_UNDO, N_("cut") },
{ TRANSFORM_CORE_UNDO, N_("transform core") },
{ PAINT_CORE_UNDO, N_("paint core") },
{ FLOATING_LAYER_UNDO, N_("floating layer") }, /* unused! */
{ LINKED_LAYER_UNDO, N_("linked layer") },
{ LAYER_APPLY_MASK_UNDO, N_("apply layer mask") }, /* ok */
{ LAYER_MERGE_UNDO, N_("layer merge") },
{ FS_ANCHOR_UNDO, N_("FS anchor") },
{ GIMAGE_MOD_UNDO, N_("gimage mod") },
{ CROP_UNDO, N_("crop") },
{ LAYER_SCALE_UNDO, N_("layer scale") },
{ LAYER_RESIZE_UNDO, N_("layer resize") },
{ QMASK_UNDO, N_("quickmask") },
{ PARASITE_ATTACH_UNDO, N_("attach parasite") },
{ PARASITE_REMOVE_UNDO, N_("remove parasite") },
{ RESOLUTION_UNDO, N_("resolution change") },
{ IMAGE_SCALE_UNDO, N_("image scale") },
{ IMAGE_RESIZE_UNDO, N_("image resize") },
{ MISC_UNDO, N_("misc") }
};
#define NUM_NAMES (sizeof (undo_name) / sizeof (struct undo_name_t))
......
......@@ -388,14 +388,14 @@ gimp_image_get_resolution (GimpImage *gimage,
void
gimp_image_set_unit (GimpImage *gimage,
GUnit unit)
GimpUnit unit)
{
undo_push_resolution (gimage);
gimage->unit = unit;
}
GUnit
GimpUnit
gimp_image_get_unit (GimpImage *gimage)
{
return gimage->unit;
......
......@@ -116,8 +116,8 @@ void gimp_image_set_resolution (GimpImage *,
gdouble, gdouble);
void gimp_image_get_resolution (GimpImage *,
gdouble *, gdouble *);
void gimp_image_set_unit (GimpImage *, GUnit);
GUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_unit (GimpImage *, GimpUnit);
GimpUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_save_proc (GimpImage *,
PlugInProcDef *);
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
......
......@@ -388,14 +388,14 @@ gimp_image_get_resolution (GimpImage *gimage,
void
gimp_image_set_unit (GimpImage *gimage,
GUnit unit)
GimpUnit unit)
{
undo_push_resolution (gimage);
gimage->unit = unit;
}
GUnit
GimpUnit
gimp_image_get_unit (GimpImage *gimage)
{
return gimage->unit;
......
......@@ -116,8 +116,8 @@ void gimp_image_set_resolution (GimpImage *,
gdouble, gdouble);
void gimp_image_get_resolution (GimpImage *,
gdouble *, gdouble *);
void gimp_image_set_unit (GimpImage *, GUnit);
GUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_unit (GimpImage *, GimpUnit);
GimpUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_save_proc (GimpImage *,
PlugInProcDef *);
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
......
......@@ -143,7 +143,7 @@ selection_options_init (SelectionOptions *options,
options->fixed_size = options->fixed_size_d = FALSE;
options->fixed_height = options->fixed_height_d = 1;
options->fixed_width = options->fixed_width_d = 1;
options->fixed_unit = options->fixed_unit_d = UNIT_PIXEL;
options->fixed_unit = options->fixed_unit_d = GIMP_UNIT_PIXEL;
options->feather_w = NULL;
options->feather_radius_w = NULL;
......@@ -385,8 +385,8 @@ selection_options_reset (SelectionOptions *options)
options->fixed_unit_d);
digits =
((options->fixed_unit_d == UNIT_PIXEL) ? 0 :
((options->fixed_unit_d == UNIT_PERCENT) ? 2 :
((options->fixed_unit_d == GIMP_UNIT_PIXEL) ? 0 :
((options->fixed_unit_d == GIMP_UNIT_PERCENT) ? 2 :
(MIN (6, MAX (3, gimp_unit_get_digits (options->fixed_unit_d))))));
spinbutton =
......
......@@ -39,20 +39,21 @@
/* internal structures */
typedef struct {
guint delete_on_exit;
gdouble factor;
gint digits;
gchar *identifier;
gchar *symbol;
gchar *abbreviation;
gchar *singular;
gchar *plural;
typedef struct
{
gboolean delete_on_exit;
gdouble factor;
gint digits;
gchar *identifier;
gchar *symbol;
gchar *abbreviation;
gchar *singular;
gchar *plural;
} GimpUnitDef;
/* these are the built-in units
*/
static GimpUnitDef gimp_unit_defs[UNIT_END] =
static GimpUnitDef gimp_unit_defs[GIMP_UNIT_END] =
{