app/channel_ops.c app/channels_dialog.c app/commands.c app/floating_sel.c

2001-02-25  Michael Natterer  <mitch@gimp.org>

	* app/channel_ops.c
	* app/channels_dialog.c
	* app/commands.c
	* app/floating_sel.c
	* app/gdisplay.c
	* app/gimpimage.[ch]
	* app/layer_select.c
	* app/layers_dialog.c
	* app/undo.c
	* app/xcf.c
	* app/tools/move.c: remove direct access of gimage->active_layer and
	gimage->active_channel. Reading access is of course harmless, but
	gimp_image_set_active_blah() will trigger a signal emission soon.

	It will probably be neccessary to change the functions to accept
	NULL layers and channels to acheive exactly what weird places like
	floating_sel.c did before by setting it directly.

	* gimptool-1.4.in
	* libgimp/Makefile.am
	* libgimpcolor/Makefile.am
	* libgimpmath/Makefile.am
	* libgimpwidgets/Makefile.am
	* plug-ins/libgck/gck/Makefile.am: made linking against stable
	GIMP installed in the same prefix work again by renaming all our
	libraries explicitly to libgimp<foo>-1.3.* (not as part of the
	libtool revision but as part of the library name). Removed the
	libtool revision to avoid double versioning. This has to be
	hardcoded in the libraries' Makefile.am ...

	* app/Makefile.am
	* plug-ins/FractalExplorer/Makefile.am
	* plug-ins/Lighting/Makefile.am
	* plug-ins/MapObject/Makefile.am
	* plug-ins/bmp/Makefile.am
	* plug-ins/common/Makefile.am
	* plug-ins/common/mkgen.pl
	* plug-ins/dbbrowser/Makefile.am
	* plug-ins/faxg3/Makefile.am
	* plug-ins/fits/Makefile.am
	* plug-ins/flame/Makefile.am
	* plug-ins/fp/Makefile.am
	* plug-ins/gap/Makefile.am
	* plug-ins/gdyntext/Makefile.am
	* plug-ins/gfig/Makefile.am
	* plug-ins/gflare/Makefile.am
	* plug-ins/gfli/Makefile.am
	* plug-ins/gimpressionist/Makefile.am
	* plug-ins/helpbrowser/Makefile.am
	* plug-ins/ifscompose/Makefile.am
	* plug-ins/imagemap/Makefile.am
	* plug-ins/maze/Makefile.am
	* plug-ins/mosaic/Makefile.am
	* plug-ins/pagecurl/Makefile.am
	* plug-ins/plugin-helper/Makefile.am
	* plug-ins/print/Makefile.am
	* plug-ins/rcm/Makefile.am
	* plug-ins/script-fu/Makefile.am
	* plug-ins/sel2path/Makefile.am
	* plug-ins/sgi/Makefile.am
	* plug-ins/webbrowser/Makefile.am
	* plug-ins/xjt/Makefile.am: ... while all other Makefiles can simply
	link against "libgimp<foo>-$(LT_REVISION).la"
This commit is contained in:
Michael Natterer 2001-02-25 14:37:12 +00:00 committed by Michael Natterer
parent 539ee1fe28
commit 2fd2a4e6b5
82 changed files with 1699 additions and 1439 deletions

View File

@ -1,3 +1,69 @@
2001-02-25 Michael Natterer <mitch@gimp.org>
* app/channel_ops.c
* app/channels_dialog.c
* app/commands.c
* app/floating_sel.c
* app/gdisplay.c
* app/gimpimage.[ch]
* app/layer_select.c
* app/layers_dialog.c
* app/undo.c
* app/xcf.c
* app/tools/move.c: remove direct access of gimage->active_layer and
gimage->active_channel. Reading access is of course harmless, but
gimp_image_set_active_blah() will trigger a signal emission soon.
It will probably be neccessary to change the functions to accept
NULL layers and channels to acheive exactly what weird places like
floating_sel.c did before by setting it directly.
* gimptool-1.4.in
* libgimp/Makefile.am
* libgimpcolor/Makefile.am
* libgimpmath/Makefile.am
* libgimpwidgets/Makefile.am
* plug-ins/libgck/gck/Makefile.am: made linking against stable
GIMP installed in the same prefix work again by renaming all our
libraries explicitly to libgimp<foo>-1.3.* (not as part of the
libtool revision but as part of the library name). Removed the
libtool revision to avoid double versioning. This has to be
hardcoded in the libraries' Makefile.am ...
* app/Makefile.am
* plug-ins/FractalExplorer/Makefile.am
* plug-ins/Lighting/Makefile.am
* plug-ins/MapObject/Makefile.am
* plug-ins/bmp/Makefile.am
* plug-ins/common/Makefile.am
* plug-ins/common/mkgen.pl
* plug-ins/dbbrowser/Makefile.am
* plug-ins/faxg3/Makefile.am
* plug-ins/fits/Makefile.am
* plug-ins/flame/Makefile.am
* plug-ins/fp/Makefile.am
* plug-ins/gap/Makefile.am
* plug-ins/gdyntext/Makefile.am
* plug-ins/gfig/Makefile.am
* plug-ins/gflare/Makefile.am
* plug-ins/gfli/Makefile.am
* plug-ins/gimpressionist/Makefile.am
* plug-ins/helpbrowser/Makefile.am
* plug-ins/ifscompose/Makefile.am
* plug-ins/imagemap/Makefile.am
* plug-ins/maze/Makefile.am
* plug-ins/mosaic/Makefile.am
* plug-ins/pagecurl/Makefile.am
* plug-ins/plugin-helper/Makefile.am
* plug-ins/print/Makefile.am
* plug-ins/rcm/Makefile.am
* plug-ins/script-fu/Makefile.am
* plug-ins/sel2path/Makefile.am
* plug-ins/sgi/Makefile.am
* plug-ins/webbrowser/Makefile.am
* plug-ins/xjt/Makefile.am: ... while all other Makefiles can simply
link against "libgimp<foo>-$(LT_REVISION).la"
2001-02-24 Michael Natterer <mitch@gimp.org>
* app/pixmaps2.h: commented out "text_width" and "text_height"

View File

@ -318,16 +318,16 @@ gimp_SOURCES = \
histogramwidget.c \
histogramwidget.h \
\
marching_ants.h \
marching_ants.h \
pixmaps2.h
EXTRA_DIST = \
makefile.mingw \
makefile.mingw.in \
makefile.msc \
gimp.rc \
gimp.sym \
wilber.ico \
makefile.mingw \
makefile.mingw.in \
makefile.msc \
gimp.rc \
gimp.sym \
wilber.ico \
arch/i386/mmx/paint_funcs_mmx.S
@ -348,15 +348,15 @@ INCLUDES = \
-I$(includedir)
gimp_LDADD = \
pdb/libapppdb.la \
tools/libapptools.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(top_builddir)/libgimpmath/libgimpmath.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimpi.a \
$(GTK_LIBS) \
$(GIMP_THREAD_LIBS) \
$(GIMP_MP_LIBS) \
pdb/libapppdb.la \
tools/libapptools.la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(top_builddir)/libgimpmath/libgimpmath-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimpi.a \
$(GTK_LIBS) \
$(GIMP_THREAD_LIBS) \
$(GIMP_MP_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -940,10 +940,12 @@ layers_previous_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp);
current_layer =
gimp_image_get_layer_index (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_get_layer_index (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
new_layer = (GimpLayer *) gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer - 1);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer - 1);
if (new_layer)
{
@ -964,10 +966,12 @@ layers_next_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp);
current_layer =
gimp_image_get_layer_index (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_get_layer_index (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
new_layer = (GimpLayer *) gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer + 1);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer + 1);
if (new_layer)
{
@ -984,7 +988,8 @@ layers_raise_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_raise_layer (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_raise_layer (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -995,7 +1000,8 @@ layers_lower_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_lower_layer (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_lower_layer (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1006,7 +1012,8 @@ layers_raise_to_top_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_raise_layer_to_top (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_raise_layer_to_top (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1017,7 +1024,8 @@ layers_lower_to_bottom_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_lower_layer_to_bottom (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_lower_layer_to_bottom (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1060,7 +1068,8 @@ layers_mask_select_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_layer_mask (gdisp->gimage, gdisp->gimage->active_layer);
gimage_mask_layer_mask (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1071,7 +1080,7 @@ layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_layer_add_alpha ( gdisp->gimage->active_layer);
gimp_layer_add_alpha (gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1082,7 +1091,8 @@ layers_alpha_select_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_layer_alpha (gdisp->gimage, gdisp->gimage->active_layer);
gimage_mask_layer_alpha (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1093,7 +1103,7 @@ layers_resize_to_image_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_layer_resize_to_image (gdisp->gimage->active_layer);
gimp_layer_resize_to_image (gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}

View File

@ -576,7 +576,7 @@ duplicate (GimpImage *gimage)
GimpChannel *channel, *new_channel;
GList *list;
Guide *guide = NULL;
GimpLayer *active_layer = NULL;
GimpLayer *active_layer = NULL;
GimpChannel *active_channel = NULL;
GimpDrawable *new_floating_sel_drawable = NULL;
GimpDrawable *floating_sel_drawable = NULL;
@ -627,7 +627,7 @@ duplicate (GimpImage *gimage)
gimp_object_get_name (GIMP_OBJECT (layer->mask)));
}
if (gimage->active_layer == layer)
if (gimp_image_get_active_layer (gimage) == layer)
active_layer = new_layer;
if (gimage->floating_sel == layer)
@ -656,7 +656,7 @@ duplicate (GimpImage *gimage)
gimp_object_set_name (GIMP_OBJECT (new_channel),
gimp_object_get_name (GIMP_OBJECT (channel)));
if (gimage->active_channel == channel)
if (gimp_image_get_active_channel (gimage) == channel)
active_channel = (new_channel);
if (floating_sel_drawable == GIMP_DRAWABLE (channel))
@ -678,8 +678,12 @@ duplicate (GimpImage *gimage)
new_gimage->selection_mask->boundary_known = FALSE;
/* Set active layer, active channel */
new_gimage->active_layer = active_layer;
new_gimage->active_channel = active_channel;
if (active_layer)
gimp_image_set_active_layer (new_gimage, active_layer);
if (active_channel)
gimp_image_set_active_channel (new_gimage, active_channel);
if (floating_layer)
floating_sel_attach (floating_layer, new_floating_sel_drawable);

View File

@ -618,8 +618,8 @@ channels_dialog_flush (void)
}
/* Set the active channel */
if (channelsD->active_channel != gimage->active_channel)
channelsD->active_channel = gimage->active_channel;
if (channelsD->active_channel != gimp_image_get_active_channel (gimage))
channelsD->active_channel = gimp_image_get_active_channel (gimage);
/* set the menus if floating sel status has changed */
if (channelsD->floating_sel != gimage->floating_sel)
@ -1044,9 +1044,9 @@ channels_dialog_raise_channel_callback (GtkWidget *widget,
if (!channelsD || !(gimage = channelsD->gimage))
return;
if (gimage->active_channel != NULL)
if (gimp_image_get_active_channel (gimage))
{
gimp_image_raise_channel (gimage, gimage->active_channel);
gimp_image_raise_channel (gimage, gimp_image_get_active_channel (gimage));
gdisplays_flush ();
}
}
@ -1060,9 +1060,9 @@ channels_dialog_lower_channel_callback (GtkWidget *widget,
if (!channelsD || !(gimage = channelsD->gimage))
return;
if (gimage->active_channel != NULL)
if (gimp_image_get_active_channel (gimage))
{
gimp_image_lower_channel (gimage, gimage->active_channel);
gimp_image_lower_channel (gimage, gimp_image_get_active_channel (gimage));
gdisplays_flush ();
}
}
@ -1090,14 +1090,15 @@ void
channels_dialog_delete_channel_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpImage *gimage;
GimpChannel *active_channel;
if (!channelsD || !(gimage = channelsD->gimage))
return;
if (gimage->active_channel != NULL)
if ((active_channel = gimp_image_get_active_channel (gimage)))
{
gimp_image_remove_channel (gimage, gimage->active_channel);
gimp_image_remove_channel (gimage, active_channel);
gdisplays_flush ();
}
}
@ -1106,14 +1107,15 @@ void
channels_dialog_channel_to_sel_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpImage *gimage;
GimpChannel *active_channel;
if (!channelsD || !(gimage = channelsD->gimage))
return;
if (gimage->active_channel != NULL)
if ((active_channel = gimp_image_get_active_channel (gimage)))
{
gimage_mask_load (gimage, gimage->active_channel);
gimage_mask_load (gimage, active_channel);
gdisplays_flush ();
}
}

View File

@ -940,10 +940,12 @@ layers_previous_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp);
current_layer =
gimp_image_get_layer_index (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_get_layer_index (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
new_layer = (GimpLayer *) gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer - 1);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer - 1);
if (new_layer)
{
@ -964,10 +966,12 @@ layers_next_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp);
current_layer =
gimp_image_get_layer_index (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_get_layer_index (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
new_layer = (GimpLayer *) gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer + 1);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer + 1);
if (new_layer)
{
@ -984,7 +988,8 @@ layers_raise_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_raise_layer (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_raise_layer (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -995,7 +1000,8 @@ layers_lower_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_lower_layer (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_lower_layer (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1006,7 +1012,8 @@ layers_raise_to_top_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_raise_layer_to_top (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_raise_layer_to_top (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1017,7 +1024,8 @@ layers_lower_to_bottom_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_lower_layer_to_bottom (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_lower_layer_to_bottom (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1060,7 +1068,8 @@ layers_mask_select_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_layer_mask (gdisp->gimage, gdisp->gimage->active_layer);
gimage_mask_layer_mask (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1071,7 +1080,7 @@ layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_layer_add_alpha ( gdisp->gimage->active_layer);
gimp_layer_add_alpha (gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1082,7 +1091,8 @@ layers_alpha_select_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_layer_alpha (gdisp->gimage, gdisp->gimage->active_layer);
gimage_mask_layer_alpha (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1093,7 +1103,7 @@ layers_resize_to_image_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_layer_resize_to_image (gdisp->gimage->active_layer);
gimp_layer_resize_to_image (gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}

View File

@ -576,7 +576,7 @@ duplicate (GimpImage *gimage)
GimpChannel *channel, *new_channel;
GList *list;
Guide *guide = NULL;
GimpLayer *active_layer = NULL;
GimpLayer *active_layer = NULL;
GimpChannel *active_channel = NULL;
GimpDrawable *new_floating_sel_drawable = NULL;
GimpDrawable *floating_sel_drawable = NULL;
@ -627,7 +627,7 @@ duplicate (GimpImage *gimage)
gimp_object_get_name (GIMP_OBJECT (layer->mask)));
}
if (gimage->active_layer == layer)
if (gimp_image_get_active_layer (gimage) == layer)
active_layer = new_layer;
if (gimage->floating_sel == layer)
@ -656,7 +656,7 @@ duplicate (GimpImage *gimage)
gimp_object_set_name (GIMP_OBJECT (new_channel),
gimp_object_get_name (GIMP_OBJECT (channel)));
if (gimage->active_channel == channel)
if (gimp_image_get_active_channel (gimage) == channel)
active_channel = (new_channel);
if (floating_sel_drawable == GIMP_DRAWABLE (channel))
@ -678,8 +678,12 @@ duplicate (GimpImage *gimage)
new_gimage->selection_mask->boundary_known = FALSE;
/* Set active layer, active channel */
new_gimage->active_layer = active_layer;
new_gimage->active_channel = active_channel;
if (active_layer)
gimp_image_set_active_layer (new_gimage, active_layer);
if (active_channel)
gimp_image_set_active_channel (new_gimage, active_channel);
if (floating_layer)
floating_sel_attach (floating_layer, new_floating_sel_drawable);

View File

@ -576,7 +576,7 @@ duplicate (GimpImage *gimage)
GimpChannel *channel, *new_channel;
GList *list;
Guide *guide = NULL;
GimpLayer *active_layer = NULL;
GimpLayer *active_layer = NULL;
GimpChannel *active_channel = NULL;
GimpDrawable *new_floating_sel_drawable = NULL;
GimpDrawable *floating_sel_drawable = NULL;
@ -627,7 +627,7 @@ duplicate (GimpImage *gimage)
gimp_object_get_name (GIMP_OBJECT (layer->mask)));
}
if (gimage->active_layer == layer)
if (gimp_image_get_active_layer (gimage) == layer)
active_layer = new_layer;
if (gimage->floating_sel == layer)
@ -656,7 +656,7 @@ duplicate (GimpImage *gimage)
gimp_object_set_name (GIMP_OBJECT (new_channel),
gimp_object_get_name (GIMP_OBJECT (channel)));
if (gimage->active_channel == channel)
if (gimp_image_get_active_channel (gimage) == channel)
active_channel = (new_channel);
if (floating_sel_drawable == GIMP_DRAWABLE (channel))
@ -678,8 +678,12 @@ duplicate (GimpImage *gimage)
new_gimage->selection_mask->boundary_known = FALSE;
/* Set active layer, active channel */
new_gimage->active_layer = active_layer;
new_gimage->active_channel = active_channel;
if (active_layer)
gimp_image_set_active_layer (new_gimage, active_layer);
if (active_channel)
gimp_image_set_active_channel (new_gimage, active_channel);
if (floating_layer)
floating_sel_attach (floating_layer, new_floating_sel_drawable);

View File

@ -717,7 +717,8 @@ gimp_image_scale (GimpImage *gimage,
if ((new_width == 0) || (new_height == 0))
{
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
g_message ("%s(): Scaling to zero width or height has been rejected.",
G_GNUC_FUNCTION);
return;
}
@ -884,7 +885,7 @@ gimp_image_apply_image (GimpImage *gimage,
operation = valid_combinations[gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -991,7 +992,7 @@ gimp_image_replace_image (GimpImage *gimage,
operation = valid_combinations [gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): got illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -1561,7 +1562,7 @@ project_indexed (GimpImage *gimage,
initial_region (src, dest, NULL, gimage->cmap, layer->opacity,
layer->mode, gimage->visible, INITIAL_INDEXED);
else
g_message ("Unable to project indexed image.");
g_message ("%s(): unable to project indexed image.", G_GNUC_FUNCTION);
}
static void
@ -2298,7 +2299,9 @@ gimp_image_layer_boundary (const GimpImage *gimage,
/* The second boundary corresponds to the active layer's
* perimeter...
*/
if ((layer = gimage->active_layer))
layer = gimp_image_get_active_layer (gimage);
if (layer)
{
*segs = gimp_layer_boundary (layer, n_segs);
return TRUE;
@ -2474,7 +2477,8 @@ gimp_image_raise_layer (GimpImage *gimage,
/* is this the top layer already? */
if (curpos == 0)
{
g_message (_("Layer cannot be raised any further"));
g_message (_("%s(): layer cannot be raised any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2501,7 +2505,8 @@ gimp_image_lower_layer (GimpImage *gimage,
length = gimp_container_num_children (gimage->layers);
if (curpos >= length - 1)
{
g_message (_("Layer cannot be lowered any further"));
g_message (_("%s(): layer cannot be lowered any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2525,13 +2530,14 @@ gimp_image_raise_layer_to_top (GimpImage *gimage,
if (curpos == 0)
{
g_message (_("Layer is already on top"));
g_message (_("%s(): layer is already on top"),
G_GNUC_FUNCTION);
return FALSE;
}
if (! gimp_layer_has_alpha (layer))
{
g_message (_("Can't raise Layer without alpha"));
g_message (_("%s(): can't raise Layer without alpha"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2558,7 +2564,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *gimage,
if (curpos >= length - 1)
{
g_message (_("Layer is already on bottom"));
g_message (_("%s(): layer is already on bottom"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2615,7 +2621,7 @@ gimp_image_position_layer (GimpImage *gimage,
}
if (push_undo)
undo_push_layer_reposition (gimage, layer);
undo_push_layer_reposition (gimage, layer);
gimp_container_reorder (gimage->layers, GIMP_OBJECT (layer), new_index);
@ -2816,8 +2822,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
else
{
@ -2825,10 +2831,10 @@ gimp_image_merge_layers (GimpImage *gimage,
x1 = off_x;
if (off_y < y1)
y1 = off_y;
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE(layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE(layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE(layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE(layer)));
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer)));
}
if (merge_type == CLIP_TO_IMAGE)
{
@ -2844,8 +2850,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
break;
@ -2936,7 +2942,7 @@ gimp_image_merge_layers (GimpImage *gimage,
/* Set the layer to transparent */
pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE(merge_layer)),
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)),
0, 0,
(x2 - x1), (y2 - y1),
TRUE);
@ -2972,7 +2978,7 @@ gimp_image_merge_layers (GimpImage *gimage,
gimp_drawable_set_tattoo (GIMP_DRAWABLE (merge_layer),
gimp_drawable_get_tattoo (GIMP_DRAWABLE (layer)));
GIMP_DRAWABLE (merge_layer)->parasites =
parasite_list_copy (GIMP_DRAWABLE(layer)->parasites);
parasite_list_copy (GIMP_DRAWABLE (layer)->parasites);
while (reverse_list)
{
@ -3109,7 +3115,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu = g_new (LayerUndo, 1);
lu->layer = layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
@ -3143,8 +3149,6 @@ gimp_image_add_layer (GimpImage *gimage,
gimp_container_insert (gimage->layers, GIMP_OBJECT (layer), position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, layer);
/* notify the layers dialog of the currently active layer */
gimp_image_set_active_layer (gimage, layer);
@ -3197,7 +3201,7 @@ gimp_image_remove_layer (GimpImage *gimage,
floating_sel_reset (layer);
}
if (gimage->active_layer == layer)
if (layer == gimp_image_get_active_layer (gimage))
{
if (gimage->layer_stack)
gimp_image_set_active_layer (gimage, gimage->layer_stack->data);
@ -3223,6 +3227,8 @@ gimp_image_add_layer_mask (GimpImage *gimage,
LayerMaskUndo *lmu;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
if (layer->mask != NULL)
{
@ -3274,7 +3280,8 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage) && GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
if (!layer || !layer->mask)
return NULL;
@ -3419,16 +3426,18 @@ gimp_image_add_channel (GimpImage *gimage,
g_return_val_if_fail (channel != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
if (GIMP_DRAWABLE(channel)->gimage != NULL &&
GIMP_DRAWABLE(channel)->gimage != gimage)
if (GIMP_DRAWABLE (channel)->gimage != NULL &&
GIMP_DRAWABLE (channel)->gimage != gimage)
{
g_message ("gimp_image_add_channel: attempt to add channel to wrong image");
g_message ("%s(): attempt to add channel to wrong image",
G_GNUC_FUNCTION);
return FALSE;
}
if (gimp_container_have (gimage->channels, GIMP_OBJECT (channel)))
{
g_message ("gimp_image_add_channel: trying to add channel to image twice");
g_message ("%s(): trying to add channel to image twice",
G_GNUC_FUNCTION);
return FALSE;
}
@ -3436,7 +3445,7 @@ gimp_image_add_channel (GimpImage *gimage,
cu = g_new (ChannelUndo, 1);
cu->channel = channel;
cu->prev_position = 0;
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_ADD_UNDO, cu);
/* add the channel to the list */
@ -3475,9 +3484,9 @@ gimp_image_remove_channel (GimpImage *gimage,
cu->channel = channel;
cu->prev_position = gimp_container_get_child_index (gimage->channels,
GIMP_OBJECT (channel));
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_REMOVE_UNDO, cu);
gtk_object_ref (GTK_OBJECT (channel));
gimp_container_remove (gimage->channels, GIMP_OBJECT (channel));
@ -3485,9 +3494,12 @@ gimp_image_remove_channel (GimpImage *gimage,
/* Send out REMOVED signal from channel */
gimp_drawable_removed (GIMP_DRAWABLE (channel));
if (gimage->active_channel == channel)
gimage->active_channel =
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0));
if (channel == gimp_image_get_active_channel (gimage))
{
gimp_image_set_active_channel
(gimage,
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0)));
}
gtk_object_unref (GTK_OBJECT (channel));
@ -3520,11 +3532,11 @@ gimp_image_active_drawable (const GimpImage *gimage)
/* If there is an active channel (a saved selection, etc.),
* we ignore the active layer
*/
if (gimage->active_channel != NULL)
if (gimage->active_channel)
{
return GIMP_DRAWABLE (gimage->active_channel);
}
else if (gimage->active_layer != NULL)
else if (gimage->active_layer)
{
layer = gimage->active_layer;

View File

@ -91,7 +91,7 @@ struct _GimpImage
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
/* Projection attributes */
gint construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
@ -101,15 +101,15 @@ struct _GimpImage
GList *guides; /* guides */
/* Layer/Channel attributes */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* ID of active layer */
GimpChannel *active_channel; /* ID of active channel */
GimpLayer *floating_sel; /* ID of fs layer */
GimpChannel *selection_mask; /* selection mask channel */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
ParasiteList *parasites; /* Plug-in parasite data */
@ -124,7 +124,7 @@ struct _GimpImage
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Undo apparatus */
/* Undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
@ -133,7 +133,7 @@ struct _GimpImage
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* Composite preview */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};

View File

@ -717,7 +717,8 @@ gimp_image_scale (GimpImage *gimage,
if ((new_width == 0) || (new_height == 0))
{
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
g_message ("%s(): Scaling to zero width or height has been rejected.",
G_GNUC_FUNCTION);
return;
}
@ -884,7 +885,7 @@ gimp_image_apply_image (GimpImage *gimage,
operation = valid_combinations[gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -991,7 +992,7 @@ gimp_image_replace_image (GimpImage *gimage,
operation = valid_combinations [gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): got illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -1561,7 +1562,7 @@ project_indexed (GimpImage *gimage,
initial_region (src, dest, NULL, gimage->cmap, layer->opacity,
layer->mode, gimage->visible, INITIAL_INDEXED);
else
g_message ("Unable to project indexed image.");
g_message ("%s(): unable to project indexed image.", G_GNUC_FUNCTION);
}
static void
@ -2298,7 +2299,9 @@ gimp_image_layer_boundary (const GimpImage *gimage,
/* The second boundary corresponds to the active layer's
* perimeter...
*/
if ((layer = gimage->active_layer))
layer = gimp_image_get_active_layer (gimage);
if (layer)
{
*segs = gimp_layer_boundary (layer, n_segs);
return TRUE;
@ -2474,7 +2477,8 @@ gimp_image_raise_layer (GimpImage *gimage,
/* is this the top layer already? */
if (curpos == 0)
{
g_message (_("Layer cannot be raised any further"));
g_message (_("%s(): layer cannot be raised any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2501,7 +2505,8 @@ gimp_image_lower_layer (GimpImage *gimage,
length = gimp_container_num_children (gimage->layers);
if (curpos >= length - 1)
{
g_message (_("Layer cannot be lowered any further"));
g_message (_("%s(): layer cannot be lowered any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2525,13 +2530,14 @@ gimp_image_raise_layer_to_top (GimpImage *gimage,
if (curpos == 0)
{
g_message (_("Layer is already on top"));
g_message (_("%s(): layer is already on top"),
G_GNUC_FUNCTION);
return FALSE;
}
if (! gimp_layer_has_alpha (layer))
{
g_message (_("Can't raise Layer without alpha"));
g_message (_("%s(): can't raise Layer without alpha"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2558,7 +2564,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *gimage,
if (curpos >= length - 1)
{
g_message (_("Layer is already on bottom"));
g_message (_("%s(): layer is already on bottom"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2615,7 +2621,7 @@ gimp_image_position_layer (GimpImage *gimage,
}
if (push_undo)
undo_push_layer_reposition (gimage, layer);
undo_push_layer_reposition (gimage, layer);
gimp_container_reorder (gimage->layers, GIMP_OBJECT (layer), new_index);
@ -2816,8 +2822,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
else
{
@ -2825,10 +2831,10 @@ gimp_image_merge_layers (GimpImage *gimage,
x1 = off_x;
if (off_y < y1)
y1 = off_y;
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE(layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE(layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE(layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE(layer)));
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer)));
}
if (merge_type == CLIP_TO_IMAGE)
{
@ -2844,8 +2850,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
break;
@ -2936,7 +2942,7 @@ gimp_image_merge_layers (GimpImage *gimage,
/* Set the layer to transparent */
pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE(merge_layer)),
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)),
0, 0,
(x2 - x1), (y2 - y1),
TRUE);
@ -2972,7 +2978,7 @@ gimp_image_merge_layers (GimpImage *gimage,
gimp_drawable_set_tattoo (GIMP_DRAWABLE (merge_layer),
gimp_drawable_get_tattoo (GIMP_DRAWABLE (layer)));
GIMP_DRAWABLE (merge_layer)->parasites =
parasite_list_copy (GIMP_DRAWABLE(layer)->parasites);
parasite_list_copy (GIMP_DRAWABLE (layer)->parasites);
while (reverse_list)
{
@ -3109,7 +3115,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu = g_new (LayerUndo, 1);
lu->layer = layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
@ -3143,8 +3149,6 @@ gimp_image_add_layer (GimpImage *gimage,
gimp_container_insert (gimage->layers, GIMP_OBJECT (layer), position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, layer);
/* notify the layers dialog of the currently active layer */
gimp_image_set_active_layer (gimage, layer);
@ -3197,7 +3201,7 @@ gimp_image_remove_layer (GimpImage *gimage,
floating_sel_reset (layer);
}
if (gimage->active_layer == layer)
if (layer == gimp_image_get_active_layer (gimage))
{
if (gimage->layer_stack)
gimp_image_set_active_layer (gimage, gimage->layer_stack->data);
@ -3223,6 +3227,8 @@ gimp_image_add_layer_mask (GimpImage *gimage,
LayerMaskUndo *lmu;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
if (layer->mask != NULL)
{
@ -3274,7 +3280,8 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage) && GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
if (!layer || !layer->mask)
return NULL;
@ -3419,16 +3426,18 @@ gimp_image_add_channel (GimpImage *gimage,
g_return_val_if_fail (channel != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
if (GIMP_DRAWABLE(channel)->gimage != NULL &&
GIMP_DRAWABLE(channel)->gimage != gimage)
if (GIMP_DRAWABLE (channel)->gimage != NULL &&
GIMP_DRAWABLE (channel)->gimage != gimage)
{
g_message ("gimp_image_add_channel: attempt to add channel to wrong image");
g_message ("%s(): attempt to add channel to wrong image",
G_GNUC_FUNCTION);
return FALSE;
}
if (gimp_container_have (gimage->channels, GIMP_OBJECT (channel)))
{
g_message ("gimp_image_add_channel: trying to add channel to image twice");
g_message ("%s(): trying to add channel to image twice",
G_GNUC_FUNCTION);
return FALSE;
}
@ -3436,7 +3445,7 @@ gimp_image_add_channel (GimpImage *gimage,
cu = g_new (ChannelUndo, 1);
cu->channel = channel;
cu->prev_position = 0;
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_ADD_UNDO, cu);
/* add the channel to the list */
@ -3475,9 +3484,9 @@ gimp_image_remove_channel (GimpImage *gimage,
cu->channel = channel;
cu->prev_position = gimp_container_get_child_index (gimage->channels,
GIMP_OBJECT (channel));
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_REMOVE_UNDO, cu);
gtk_object_ref (GTK_OBJECT (channel));
gimp_container_remove (gimage->channels, GIMP_OBJECT (channel));
@ -3485,9 +3494,12 @@ gimp_image_remove_channel (GimpImage *gimage,
/* Send out REMOVED signal from channel */
gimp_drawable_removed (GIMP_DRAWABLE (channel));
if (gimage->active_channel == channel)
gimage->active_channel =
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0));
if (channel == gimp_image_get_active_channel (gimage))
{
gimp_image_set_active_channel
(gimage,
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0)));
}
gtk_object_unref (GTK_OBJECT (channel));
@ -3520,11 +3532,11 @@ gimp_image_active_drawable (const GimpImage *gimage)
/* If there is an active channel (a saved selection, etc.),
* we ignore the active layer
*/
if (gimage->active_channel != NULL)
if (gimage->active_channel)
{
return GIMP_DRAWABLE (gimage->active_channel);
}
else if (gimage->active_layer != NULL)
else if (gimage->active_layer)
{
layer = gimage->active_layer;

View File

@ -91,7 +91,7 @@ struct _GimpImage
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
/* Projection attributes */
gint construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
@ -101,15 +101,15 @@ struct _GimpImage
GList *guides; /* guides */
/* Layer/Channel attributes */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* ID of active layer */
GimpChannel *active_channel; /* ID of active channel */
GimpLayer *floating_sel; /* ID of fs layer */
GimpChannel *selection_mask; /* selection mask channel */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
ParasiteList *parasites; /* Plug-in parasite data */
@ -124,7 +124,7 @@ struct _GimpImage
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Undo apparatus */
/* Undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
@ -133,7 +133,7 @@ struct _GimpImage
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* Composite preview */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};

View File

@ -717,7 +717,8 @@ gimp_image_scale (GimpImage *gimage,
if ((new_width == 0) || (new_height == 0))
{
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
g_message ("%s(): Scaling to zero width or height has been rejected.",
G_GNUC_FUNCTION);
return;
}
@ -884,7 +885,7 @@ gimp_image_apply_image (GimpImage *gimage,
operation = valid_combinations[gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -991,7 +992,7 @@ gimp_image_replace_image (GimpImage *gimage,
operation = valid_combinations [gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): got illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -1561,7 +1562,7 @@ project_indexed (GimpImage *gimage,
initial_region (src, dest, NULL, gimage->cmap, layer->opacity,
layer->mode, gimage->visible, INITIAL_INDEXED);
else
g_message ("Unable to project indexed image.");
g_message ("%s(): unable to project indexed image.", G_GNUC_FUNCTION);
}
static void
@ -2298,7 +2299,9 @@ gimp_image_layer_boundary (const GimpImage *gimage,
/* The second boundary corresponds to the active layer's
* perimeter...
*/
if ((layer = gimage->active_layer))
layer = gimp_image_get_active_layer (gimage);
if (layer)
{
*segs = gimp_layer_boundary (layer, n_segs);
return TRUE;
@ -2474,7 +2477,8 @@ gimp_image_raise_layer (GimpImage *gimage,
/* is this the top layer already? */
if (curpos == 0)
{
g_message (_("Layer cannot be raised any further"));
g_message (_("%s(): layer cannot be raised any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2501,7 +2505,8 @@ gimp_image_lower_layer (GimpImage *gimage,
length = gimp_container_num_children (gimage->layers);
if (curpos >= length - 1)
{
g_message (_("Layer cannot be lowered any further"));
g_message (_("%s(): layer cannot be lowered any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2525,13 +2530,14 @@ gimp_image_raise_layer_to_top (GimpImage *gimage,
if (curpos == 0)
{
g_message (_("Layer is already on top"));
g_message (_("%s(): layer is already on top"),
G_GNUC_FUNCTION);
return FALSE;
}
if (! gimp_layer_has_alpha (layer))
{
g_message (_("Can't raise Layer without alpha"));
g_message (_("%s(): can't raise Layer without alpha"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2558,7 +2564,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *gimage,
if (curpos >= length - 1)
{
g_message (_("Layer is already on bottom"));
g_message (_("%s(): layer is already on bottom"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2615,7 +2621,7 @@ gimp_image_position_layer (GimpImage *gimage,
}
if (push_undo)
undo_push_layer_reposition (gimage, layer);
undo_push_layer_reposition (gimage, layer);
gimp_container_reorder (gimage->layers, GIMP_OBJECT (layer), new_index);
@ -2816,8 +2822,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
else
{
@ -2825,10 +2831,10 @@ gimp_image_merge_layers (GimpImage *gimage,
x1 = off_x;
if (off_y < y1)
y1 = off_y;
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE(layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE(layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE(layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE(layer)));
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer)));
}
if (merge_type == CLIP_TO_IMAGE)
{
@ -2844,8 +2850,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
break;
@ -2936,7 +2942,7 @@ gimp_image_merge_layers (GimpImage *gimage,
/* Set the layer to transparent */
pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE(merge_layer)),
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)),
0, 0,
(x2 - x1), (y2 - y1),
TRUE);
@ -2972,7 +2978,7 @@ gimp_image_merge_layers (GimpImage *gimage,
gimp_drawable_set_tattoo (GIMP_DRAWABLE (merge_layer),
gimp_drawable_get_tattoo (GIMP_DRAWABLE (layer)));
GIMP_DRAWABLE (merge_layer)->parasites =
parasite_list_copy (GIMP_DRAWABLE(layer)->parasites);
parasite_list_copy (GIMP_DRAWABLE (layer)->parasites);
while (reverse_list)
{
@ -3109,7 +3115,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu = g_new (LayerUndo, 1);
lu->layer = layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
@ -3143,8 +3149,6 @@ gimp_image_add_layer (GimpImage *gimage,
gimp_container_insert (gimage->layers, GIMP_OBJECT (layer), position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, layer);
/* notify the layers dialog of the currently active layer */
gimp_image_set_active_layer (gimage, layer);
@ -3197,7 +3201,7 @@ gimp_image_remove_layer (GimpImage *gimage,
floating_sel_reset (layer);
}
if (gimage->active_layer == layer)
if (layer == gimp_image_get_active_layer (gimage))
{
if (gimage->layer_stack)
gimp_image_set_active_layer (gimage, gimage->layer_stack->data);
@ -3223,6 +3227,8 @@ gimp_image_add_layer_mask (GimpImage *gimage,
LayerMaskUndo *lmu;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
if (layer->mask != NULL)
{
@ -3274,7 +3280,8 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage) && GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
if (!layer || !layer->mask)
return NULL;
@ -3419,16 +3426,18 @@ gimp_image_add_channel (GimpImage *gimage,
g_return_val_if_fail (channel != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
if (GIMP_DRAWABLE(channel)->gimage != NULL &&
GIMP_DRAWABLE(channel)->gimage != gimage)
if (GIMP_DRAWABLE (channel)->gimage != NULL &&
GIMP_DRAWABLE (channel)->gimage != gimage)
{
g_message ("gimp_image_add_channel: attempt to add channel to wrong image");
g_message ("%s(): attempt to add channel to wrong image",
G_GNUC_FUNCTION);
return FALSE;
}
if (gimp_container_have (gimage->channels, GIMP_OBJECT (channel)))
{
g_message ("gimp_image_add_channel: trying to add channel to image twice");
g_message ("%s(): trying to add channel to image twice",
G_GNUC_FUNCTION);
return FALSE;
}
@ -3436,7 +3445,7 @@ gimp_image_add_channel (GimpImage *gimage,
cu = g_new (ChannelUndo, 1);
cu->channel = channel;
cu->prev_position = 0;
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_ADD_UNDO, cu);
/* add the channel to the list */
@ -3475,9 +3484,9 @@ gimp_image_remove_channel (GimpImage *gimage,
cu->channel = channel;
cu->prev_position = gimp_container_get_child_index (gimage->channels,
GIMP_OBJECT (channel));
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_REMOVE_UNDO, cu);
gtk_object_ref (GTK_OBJECT (channel));
gimp_container_remove (gimage->channels, GIMP_OBJECT (channel));
@ -3485,9 +3494,12 @@ gimp_image_remove_channel (GimpImage *gimage,
/* Send out REMOVED signal from channel */
gimp_drawable_removed (GIMP_DRAWABLE (channel));
if (gimage->active_channel == channel)
gimage->active_channel =
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0));
if (channel == gimp_image_get_active_channel (gimage))
{
gimp_image_set_active_channel
(gimage,
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0)));
}
gtk_object_unref (GTK_OBJECT (channel));
@ -3520,11 +3532,11 @@ gimp_image_active_drawable (const GimpImage *gimage)
/* If there is an active channel (a saved selection, etc.),
* we ignore the active layer
*/
if (gimage->active_channel != NULL)
if (gimage->active_channel)
{
return GIMP_DRAWABLE (gimage->active_channel);
}
else if (gimage->active_layer != NULL)
else if (gimage->active_layer)
{
layer = gimage->active_layer;

View File

@ -91,7 +91,7 @@ struct _GimpImage
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
/* Projection attributes */
gint construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
@ -101,15 +101,15 @@ struct _GimpImage
GList *guides; /* guides */
/* Layer/Channel attributes */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* ID of active layer */
GimpChannel *active_channel; /* ID of active channel */
GimpLayer *floating_sel; /* ID of fs layer */
GimpChannel *selection_mask; /* selection mask channel */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
ParasiteList *parasites; /* Plug-in parasite data */
@ -124,7 +124,7 @@ struct _GimpImage
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Undo apparatus */
/* Undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
@ -133,7 +133,7 @@ struct _GimpImage
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* Composite preview */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};

View File

@ -717,7 +717,8 @@ gimp_image_scale (GimpImage *gimage,
if ((new_width == 0) || (new_height == 0))
{
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
g_message ("%s(): Scaling to zero width or height has been rejected.",
G_GNUC_FUNCTION);
return;
}
@ -884,7 +885,7 @@ gimp_image_apply_image (GimpImage *gimage,
operation = valid_combinations[gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -991,7 +992,7 @@ gimp_image_replace_image (GimpImage *gimage,
operation = valid_combinations [gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): got illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -1561,7 +1562,7 @@ project_indexed (GimpImage *gimage,
initial_region (src, dest, NULL, gimage->cmap, layer->opacity,
layer->mode, gimage->visible, INITIAL_INDEXED);
else
g_message ("Unable to project indexed image.");
g_message ("%s(): unable to project indexed image.", G_GNUC_FUNCTION);
}
static void
@ -2298,7 +2299,9 @@ gimp_image_layer_boundary (const GimpImage *gimage,
/* The second boundary corresponds to the active layer's
* perimeter...
*/
if ((layer = gimage->active_layer))
layer = gimp_image_get_active_layer (gimage);
if (layer)
{
*segs = gimp_layer_boundary (layer, n_segs);
return TRUE;
@ -2474,7 +2477,8 @@ gimp_image_raise_layer (GimpImage *gimage,
/* is this the top layer already? */
if (curpos == 0)
{
g_message (_("Layer cannot be raised any further"));
g_message (_("%s(): layer cannot be raised any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2501,7 +2505,8 @@ gimp_image_lower_layer (GimpImage *gimage,
length = gimp_container_num_children (gimage->layers);
if (curpos >= length - 1)
{
g_message (_("Layer cannot be lowered any further"));
g_message (_("%s(): layer cannot be lowered any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2525,13 +2530,14 @@ gimp_image_raise_layer_to_top (GimpImage *gimage,
if (curpos == 0)
{
g_message (_("Layer is already on top"));
g_message (_("%s(): layer is already on top"),
G_GNUC_FUNCTION);
return FALSE;
}
if (! gimp_layer_has_alpha (layer))
{
g_message (_("Can't raise Layer without alpha"));
g_message (_("%s(): can't raise Layer without alpha"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2558,7 +2564,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *gimage,
if (curpos >= length - 1)
{
g_message (_("Layer is already on bottom"));
g_message (_("%s(): layer is already on bottom"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2615,7 +2621,7 @@ gimp_image_position_layer (GimpImage *gimage,
}
if (push_undo)
undo_push_layer_reposition (gimage, layer);
undo_push_layer_reposition (gimage, layer);
gimp_container_reorder (gimage->layers, GIMP_OBJECT (layer), new_index);
@ -2816,8 +2822,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
else
{
@ -2825,10 +2831,10 @@ gimp_image_merge_layers (GimpImage *gimage,
x1 = off_x;
if (off_y < y1)
y1 = off_y;
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE(layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE(layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE(layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE(layer)));
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer)));
}
if (merge_type == CLIP_TO_IMAGE)
{
@ -2844,8 +2850,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
break;
@ -2936,7 +2942,7 @@ gimp_image_merge_layers (GimpImage *gimage,
/* Set the layer to transparent */
pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE(merge_layer)),
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)),
0, 0,
(x2 - x1), (y2 - y1),
TRUE);
@ -2972,7 +2978,7 @@ gimp_image_merge_layers (GimpImage *gimage,
gimp_drawable_set_tattoo (GIMP_DRAWABLE (merge_layer),
gimp_drawable_get_tattoo (GIMP_DRAWABLE (layer)));
GIMP_DRAWABLE (merge_layer)->parasites =
parasite_list_copy (GIMP_DRAWABLE(layer)->parasites);
parasite_list_copy (GIMP_DRAWABLE (layer)->parasites);
while (reverse_list)
{
@ -3109,7 +3115,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu = g_new (LayerUndo, 1);
lu->layer = layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
@ -3143,8 +3149,6 @@ gimp_image_add_layer (GimpImage *gimage,
gimp_container_insert (gimage->layers, GIMP_OBJECT (layer), position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, layer);
/* notify the layers dialog of the currently active layer */
gimp_image_set_active_layer (gimage, layer);
@ -3197,7 +3201,7 @@ gimp_image_remove_layer (GimpImage *gimage,
floating_sel_reset (layer);
}
if (gimage->active_layer == layer)
if (layer == gimp_image_get_active_layer (gimage))
{
if (gimage->layer_stack)
gimp_image_set_active_layer (gimage, gimage->layer_stack->data);
@ -3223,6 +3227,8 @@ gimp_image_add_layer_mask (GimpImage *gimage,
LayerMaskUndo *lmu;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
if (layer->mask != NULL)
{
@ -3274,7 +3280,8 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage) && GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
if (!layer || !layer->mask)
return NULL;
@ -3419,16 +3426,18 @@ gimp_image_add_channel (GimpImage *gimage,
g_return_val_if_fail (channel != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
if (GIMP_DRAWABLE(channel)->gimage != NULL &&
GIMP_DRAWABLE(channel)->gimage != gimage)
if (GIMP_DRAWABLE (channel)->gimage != NULL &&
GIMP_DRAWABLE (channel)->gimage != gimage)
{
g_message ("gimp_image_add_channel: attempt to add channel to wrong image");
g_message ("%s(): attempt to add channel to wrong image",
G_GNUC_FUNCTION);
return FALSE;
}
if (gimp_container_have (gimage->channels, GIMP_OBJECT (channel)))
{
g_message ("gimp_image_add_channel: trying to add channel to image twice");
g_message ("%s(): trying to add channel to image twice",
G_GNUC_FUNCTION);
return FALSE;
}
@ -3436,7 +3445,7 @@ gimp_image_add_channel (GimpImage *gimage,
cu = g_new (ChannelUndo, 1);
cu->channel = channel;
cu->prev_position = 0;
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_ADD_UNDO, cu);
/* add the channel to the list */
@ -3475,9 +3484,9 @@ gimp_image_remove_channel (GimpImage *gimage,
cu->channel = channel;
cu->prev_position = gimp_container_get_child_index (gimage->channels,
GIMP_OBJECT (channel));
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_REMOVE_UNDO, cu);
gtk_object_ref (GTK_OBJECT (channel));
gimp_container_remove (gimage->channels, GIMP_OBJECT (channel));
@ -3485,9 +3494,12 @@ gimp_image_remove_channel (GimpImage *gimage,
/* Send out REMOVED signal from channel */
gimp_drawable_removed (GIMP_DRAWABLE (channel));
if (gimage->active_channel == channel)
gimage->active_channel =
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0));
if (channel == gimp_image_get_active_channel (gimage))
{
gimp_image_set_active_channel
(gimage,
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0)));
}
gtk_object_unref (GTK_OBJECT (channel));
@ -3520,11 +3532,11 @@ gimp_image_active_drawable (const GimpImage *gimage)
/* If there is an active channel (a saved selection, etc.),
* we ignore the active layer
*/
if (gimage->active_channel != NULL)
if (gimage->active_channel)
{
return GIMP_DRAWABLE (gimage->active_channel);
}
else if (gimage->active_layer != NULL)
else if (gimage->active_layer)
{
layer = gimage->active_layer;

View File

@ -91,7 +91,7 @@ struct _GimpImage
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
/* Projection attributes */
gint construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
@ -101,15 +101,15 @@ struct _GimpImage
GList *guides; /* guides */
/* Layer/Channel attributes */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* ID of active layer */
GimpChannel *active_channel; /* ID of active channel */
GimpLayer *floating_sel; /* ID of fs layer */
GimpChannel *selection_mask; /* selection mask channel */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
ParasiteList *parasites; /* Plug-in parasite data */
@ -124,7 +124,7 @@ struct _GimpImage
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Undo apparatus */
/* Undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
@ -133,7 +133,7 @@ struct _GimpImage
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* Composite preview */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};

View File

@ -717,7 +717,8 @@ gimp_image_scale (GimpImage *gimage,
if ((new_width == 0) || (new_height == 0))
{
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
g_message ("%s(): Scaling to zero width or height has been rejected.",
G_GNUC_FUNCTION);
return;
}
@ -884,7 +885,7 @@ gimp_image_apply_image (GimpImage *gimage,
operation = valid_combinations[gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -991,7 +992,7 @@ gimp_image_replace_image (GimpImage *gimage,
operation = valid_combinations [gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): got illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -1561,7 +1562,7 @@ project_indexed (GimpImage *gimage,
initial_region (src, dest, NULL, gimage->cmap, layer->opacity,
layer->mode, gimage->visible, INITIAL_INDEXED);
else
g_message ("Unable to project indexed image.");
g_message ("%s(): unable to project indexed image.", G_GNUC_FUNCTION);
}
static void
@ -2298,7 +2299,9 @@ gimp_image_layer_boundary (const GimpImage *gimage,
/* The second boundary corresponds to the active layer's
* perimeter...
*/
if ((layer = gimage->active_layer))
layer = gimp_image_get_active_layer (gimage);
if (layer)
{
*segs = gimp_layer_boundary (layer, n_segs);
return TRUE;
@ -2474,7 +2477,8 @@ gimp_image_raise_layer (GimpImage *gimage,
/* is this the top layer already? */
if (curpos == 0)
{
g_message (_("Layer cannot be raised any further"));
g_message (_("%s(): layer cannot be raised any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2501,7 +2505,8 @@ gimp_image_lower_layer (GimpImage *gimage,
length = gimp_container_num_children (gimage->layers);
if (curpos >= length - 1)
{
g_message (_("Layer cannot be lowered any further"));
g_message (_("%s(): layer cannot be lowered any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2525,13 +2530,14 @@ gimp_image_raise_layer_to_top (GimpImage *gimage,
if (curpos == 0)
{
g_message (_("Layer is already on top"));
g_message (_("%s(): layer is already on top"),
G_GNUC_FUNCTION);
return FALSE;
}
if (! gimp_layer_has_alpha (layer))
{
g_message (_("Can't raise Layer without alpha"));
g_message (_("%s(): can't raise Layer without alpha"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2558,7 +2564,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *gimage,
if (curpos >= length - 1)
{
g_message (_("Layer is already on bottom"));
g_message (_("%s(): layer is already on bottom"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2615,7 +2621,7 @@ gimp_image_position_layer (GimpImage *gimage,
}
if (push_undo)
undo_push_layer_reposition (gimage, layer);
undo_push_layer_reposition (gimage, layer);
gimp_container_reorder (gimage->layers, GIMP_OBJECT (layer), new_index);
@ -2816,8 +2822,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
else
{
@ -2825,10 +2831,10 @@ gimp_image_merge_layers (GimpImage *gimage,
x1 = off_x;
if (off_y < y1)
y1 = off_y;
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE(layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE(layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE(layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE(layer)));
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer)));
}
if (merge_type == CLIP_TO_IMAGE)
{
@ -2844,8 +2850,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
break;
@ -2936,7 +2942,7 @@ gimp_image_merge_layers (GimpImage *gimage,
/* Set the layer to transparent */
pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE(merge_layer)),
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)),
0, 0,
(x2 - x1), (y2 - y1),
TRUE);
@ -2972,7 +2978,7 @@ gimp_image_merge_layers (GimpImage *gimage,
gimp_drawable_set_tattoo (GIMP_DRAWABLE (merge_layer),
gimp_drawable_get_tattoo (GIMP_DRAWABLE (layer)));
GIMP_DRAWABLE (merge_layer)->parasites =
parasite_list_copy (GIMP_DRAWABLE(layer)->parasites);
parasite_list_copy (GIMP_DRAWABLE (layer)->parasites);
while (reverse_list)
{
@ -3109,7 +3115,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu = g_new (LayerUndo, 1);
lu->layer = layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
@ -3143,8 +3149,6 @@ gimp_image_add_layer (GimpImage *gimage,
gimp_container_insert (gimage->layers, GIMP_OBJECT (layer), position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, layer);
/* notify the layers dialog of the currently active layer */
gimp_image_set_active_layer (gimage, layer);
@ -3197,7 +3201,7 @@ gimp_image_remove_layer (GimpImage *gimage,
floating_sel_reset (layer);
}
if (gimage->active_layer == layer)
if (layer == gimp_image_get_active_layer (gimage))
{
if (gimage->layer_stack)
gimp_image_set_active_layer (gimage, gimage->layer_stack->data);
@ -3223,6 +3227,8 @@ gimp_image_add_layer_mask (GimpImage *gimage,
LayerMaskUndo *lmu;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
if (layer->mask != NULL)
{
@ -3274,7 +3280,8 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage) && GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
if (!layer || !layer->mask)
return NULL;
@ -3419,16 +3426,18 @@ gimp_image_add_channel (GimpImage *gimage,
g_return_val_if_fail (channel != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
if (GIMP_DRAWABLE(channel)->gimage != NULL &&
GIMP_DRAWABLE(channel)->gimage != gimage)
if (GIMP_DRAWABLE (channel)->gimage != NULL &&
GIMP_DRAWABLE (channel)->gimage != gimage)
{
g_message ("gimp_image_add_channel: attempt to add channel to wrong image");
g_message ("%s(): attempt to add channel to wrong image",
G_GNUC_FUNCTION);
return FALSE;
}
if (gimp_container_have (gimage->channels, GIMP_OBJECT (channel)))
{
g_message ("gimp_image_add_channel: trying to add channel to image twice");
g_message ("%s(): trying to add channel to image twice",
G_GNUC_FUNCTION);
return FALSE;
}
@ -3436,7 +3445,7 @@ gimp_image_add_channel (GimpImage *gimage,
cu = g_new (ChannelUndo, 1);
cu->channel = channel;
cu->prev_position = 0;
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_ADD_UNDO, cu);
/* add the channel to the list */
@ -3475,9 +3484,9 @@ gimp_image_remove_channel (GimpImage *gimage,
cu->channel = channel;
cu->prev_position = gimp_container_get_child_index (gimage->channels,
GIMP_OBJECT (channel));
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_REMOVE_UNDO, cu);
gtk_object_ref (GTK_OBJECT (channel));
gimp_container_remove (gimage->channels, GIMP_OBJECT (channel));
@ -3485,9 +3494,12 @@ gimp_image_remove_channel (GimpImage *gimage,
/* Send out REMOVED signal from channel */
gimp_drawable_removed (GIMP_DRAWABLE (channel));
if (gimage->active_channel == channel)
gimage->active_channel =
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0));
if (channel == gimp_image_get_active_channel (gimage))
{
gimp_image_set_active_channel
(gimage,
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0)));
}
gtk_object_unref (GTK_OBJECT (channel));
@ -3520,11 +3532,11 @@ gimp_image_active_drawable (const GimpImage *gimage)
/* If there is an active channel (a saved selection, etc.),
* we ignore the active layer
*/
if (gimage->active_channel != NULL)
if (gimage->active_channel)
{
return GIMP_DRAWABLE (gimage->active_channel);
}
else if (gimage->active_layer != NULL)
else if (gimage->active_layer)
{
layer = gimage->active_layer;

View File

@ -91,7 +91,7 @@ struct _GimpImage
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
/* Projection attributes */
gint construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
@ -101,15 +101,15 @@ struct _GimpImage
GList *guides; /* guides */
/* Layer/Channel attributes */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* ID of active layer */
GimpChannel *active_channel; /* ID of active channel */
GimpLayer *floating_sel; /* ID of fs layer */
GimpChannel *selection_mask; /* selection mask channel */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
ParasiteList *parasites; /* Plug-in parasite data */
@ -124,7 +124,7 @@ struct _GimpImage
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Undo apparatus */
/* Undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
@ -133,7 +133,7 @@ struct _GimpImage
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* Composite preview */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};

View File

@ -1488,11 +1488,11 @@ undo_pop_layer (GimpImage *gimage,
else
{
/* record the active layer */
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
/* hide the current selection--for all views */
if (gimage->active_layer != NULL)
gimp_layer_invalidate_boundary ((gimage->active_layer));
if (gimp_image_get_active_layer (gimage))
gimp_layer_invalidate_boundary (gimp_image_get_active_layer (gimage));
/* if this is a floating selection, set the fs pointer */
if (gimp_layer_is_floating_sel (lu->layer))
@ -1501,8 +1501,7 @@ undo_pop_layer (GimpImage *gimage,
/* add the new layer */
gimp_container_insert (gimage->layers,
GIMP_OBJECT (lu->layer), lu->prev_position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, lu->layer);
gimage->active_layer = lu->layer;
gimp_image_set_active_layer (gimage, lu->layer);
drawable_update (GIMP_DRAWABLE (lu->layer), 0, 0,
GIMP_DRAWABLE (lu->layer)->width,
@ -1834,7 +1833,7 @@ undo_pop_channel (GimpImage *gimage,
else
{
/* record the active channel */
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
/* add the new channel */
gimp_container_insert (gimage->channels,
@ -2009,7 +2008,7 @@ undo_pop_fs_to_layer (GimpImage *gimage,
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (fsu->layer));
fsu->layer->fs.drawable = fsu->drawable;
gimage->active_layer = fsu->layer;
gimp_image_set_active_layer (gimage, fsu->layer);
gimage->floating_sel = fsu->layer;
/* restore the contents of the drawable */

View File

@ -717,7 +717,8 @@ gimp_image_scale (GimpImage *gimage,
if ((new_width == 0) || (new_height == 0))
{
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
g_message ("%s(): Scaling to zero width or height has been rejected.",
G_GNUC_FUNCTION);
return;
}
@ -884,7 +885,7 @@ gimp_image_apply_image (GimpImage *gimage,
operation = valid_combinations[gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -991,7 +992,7 @@ gimp_image_replace_image (GimpImage *gimage,
operation = valid_combinations [gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): got illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -1561,7 +1562,7 @@ project_indexed (GimpImage *gimage,
initial_region (src, dest, NULL, gimage->cmap, layer->opacity,
layer->mode, gimage->visible, INITIAL_INDEXED);
else
g_message ("Unable to project indexed image.");
g_message ("%s(): unable to project indexed image.", G_GNUC_FUNCTION);
}
static void
@ -2298,7 +2299,9 @@ gimp_image_layer_boundary (const GimpImage *gimage,
/* The second boundary corresponds to the active layer's
* perimeter...
*/
if ((layer = gimage->active_layer))
layer = gimp_image_get_active_layer (gimage);
if (layer)
{
*segs = gimp_layer_boundary (layer, n_segs);
return TRUE;
@ -2474,7 +2477,8 @@ gimp_image_raise_layer (GimpImage *gimage,
/* is this the top layer already? */
if (curpos == 0)
{
g_message (_("Layer cannot be raised any further"));
g_message (_("%s(): layer cannot be raised any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2501,7 +2505,8 @@ gimp_image_lower_layer (GimpImage *gimage,
length = gimp_container_num_children (gimage->layers);
if (curpos >= length - 1)
{
g_message (_("Layer cannot be lowered any further"));
g_message (_("%s(): layer cannot be lowered any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2525,13 +2530,14 @@ gimp_image_raise_layer_to_top (GimpImage *gimage,
if (curpos == 0)
{
g_message (_("Layer is already on top"));
g_message (_("%s(): layer is already on top"),
G_GNUC_FUNCTION);
return FALSE;
}
if (! gimp_layer_has_alpha (layer))
{
g_message (_("Can't raise Layer without alpha"));
g_message (_("%s(): can't raise Layer without alpha"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2558,7 +2564,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *gimage,
if (curpos >= length - 1)
{
g_message (_("Layer is already on bottom"));
g_message (_("%s(): layer is already on bottom"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2615,7 +2621,7 @@ gimp_image_position_layer (GimpImage *gimage,
}
if (push_undo)
undo_push_layer_reposition (gimage, layer);
undo_push_layer_reposition (gimage, layer);
gimp_container_reorder (gimage->layers, GIMP_OBJECT (layer), new_index);
@ -2816,8 +2822,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
else
{
@ -2825,10 +2831,10 @@ gimp_image_merge_layers (GimpImage *gimage,
x1 = off_x;
if (off_y < y1)
y1 = off_y;
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE(layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE(layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE(layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE(layer)));
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer)));
}
if (merge_type == CLIP_TO_IMAGE)
{
@ -2844,8 +2850,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
break;
@ -2936,7 +2942,7 @@ gimp_image_merge_layers (GimpImage *gimage,
/* Set the layer to transparent */
pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE(merge_layer)),
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)),
0, 0,
(x2 - x1), (y2 - y1),
TRUE);
@ -2972,7 +2978,7 @@ gimp_image_merge_layers (GimpImage *gimage,
gimp_drawable_set_tattoo (GIMP_DRAWABLE (merge_layer),
gimp_drawable_get_tattoo (GIMP_DRAWABLE (layer)));
GIMP_DRAWABLE (merge_layer)->parasites =
parasite_list_copy (GIMP_DRAWABLE(layer)->parasites);
parasite_list_copy (GIMP_DRAWABLE (layer)->parasites);
while (reverse_list)
{
@ -3109,7 +3115,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu = g_new (LayerUndo, 1);
lu->layer = layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
@ -3143,8 +3149,6 @@ gimp_image_add_layer (GimpImage *gimage,
gimp_container_insert (gimage->layers, GIMP_OBJECT (layer), position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, layer);
/* notify the layers dialog of the currently active layer */
gimp_image_set_active_layer (gimage, layer);
@ -3197,7 +3201,7 @@ gimp_image_remove_layer (GimpImage *gimage,
floating_sel_reset (layer);
}
if (gimage->active_layer == layer)
if (layer == gimp_image_get_active_layer (gimage))
{
if (gimage->layer_stack)
gimp_image_set_active_layer (gimage, gimage->layer_stack->data);
@ -3223,6 +3227,8 @@ gimp_image_add_layer_mask (GimpImage *gimage,
LayerMaskUndo *lmu;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
if (layer->mask != NULL)
{
@ -3274,7 +3280,8 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage) && GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
if (!layer || !layer->mask)
return NULL;
@ -3419,16 +3426,18 @@ gimp_image_add_channel (GimpImage *gimage,
g_return_val_if_fail (channel != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
if (GIMP_DRAWABLE(channel)->gimage != NULL &&
GIMP_DRAWABLE(channel)->gimage != gimage)
if (GIMP_DRAWABLE (channel)->gimage != NULL &&
GIMP_DRAWABLE (channel)->gimage != gimage)
{
g_message ("gimp_image_add_channel: attempt to add channel to wrong image");
g_message ("%s(): attempt to add channel to wrong image",
G_GNUC_FUNCTION);
return FALSE;
}
if (gimp_container_have (gimage->channels, GIMP_OBJECT (channel)))
{
g_message ("gimp_image_add_channel: trying to add channel to image twice");
g_message ("%s(): trying to add channel to image twice",
G_GNUC_FUNCTION);
return FALSE;
}
@ -3436,7 +3445,7 @@ gimp_image_add_channel (GimpImage *gimage,
cu = g_new (ChannelUndo, 1);
cu->channel = channel;
cu->prev_position = 0;
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_ADD_UNDO, cu);
/* add the channel to the list */
@ -3475,9 +3484,9 @@ gimp_image_remove_channel (GimpImage *gimage,
cu->channel = channel;
cu->prev_position = gimp_container_get_child_index (gimage->channels,
GIMP_OBJECT (channel));
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_REMOVE_UNDO, cu);
gtk_object_ref (GTK_OBJECT (channel));
gimp_container_remove (gimage->channels, GIMP_OBJECT (channel));
@ -3485,9 +3494,12 @@ gimp_image_remove_channel (GimpImage *gimage,
/* Send out REMOVED signal from channel */
gimp_drawable_removed (GIMP_DRAWABLE (channel));
if (gimage->active_channel == channel)
gimage->active_channel =
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0));
if (channel == gimp_image_get_active_channel (gimage))
{
gimp_image_set_active_channel
(gimage,
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0)));
}
gtk_object_unref (GTK_OBJECT (channel));
@ -3520,11 +3532,11 @@ gimp_image_active_drawable (const GimpImage *gimage)
/* If there is an active channel (a saved selection, etc.),
* we ignore the active layer
*/
if (gimage->active_channel != NULL)
if (gimage->active_channel)
{
return GIMP_DRAWABLE (gimage->active_channel);
}
else if (gimage->active_layer != NULL)
else if (gimage->active_layer)
{
layer = gimage->active_layer;

View File

@ -91,7 +91,7 @@ struct _GimpImage
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
/* Projection attributes */
gint construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
@ -101,15 +101,15 @@ struct _GimpImage
GList *guides; /* guides */
/* Layer/Channel attributes */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* ID of active layer */
GimpChannel *active_channel; /* ID of active channel */
GimpLayer *floating_sel; /* ID of fs layer */
GimpChannel *selection_mask; /* selection mask channel */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
ParasiteList *parasites; /* Plug-in parasite data */
@ -124,7 +124,7 @@ struct _GimpImage
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Undo apparatus */
/* Undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
@ -133,7 +133,7 @@ struct _GimpImage
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* Composite preview */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};

View File

@ -155,18 +155,23 @@ floating_sel_reset (GimpLayer *layer)
/* set the underlying drawable to active */
if (GIMP_IS_LAYER (layer->fs.drawable))
gimp_image_set_active_layer (gimage, GIMP_LAYER (layer->fs.drawable));
{
gimp_image_set_active_layer (gimage, GIMP_LAYER (layer->fs.drawable));
}
else if (GIMP_IS_LAYER_MASK (layer->fs.drawable))
gimp_image_set_active_layer (gimage,
GIMP_LAYER_MASK (layer->fs.drawable)->layer);
{
gimp_image_set_active_layer (gimage,
GIMP_LAYER_MASK (layer->fs.drawable)->layer);
}
else if (GIMP_IS_CHANNEL (layer->fs.drawable))
{
gimp_image_set_active_channel (gimage, GIMP_CHANNEL (layer->fs.drawable));
if (gimp_container_num_children (gimage->layers))
gimage->active_layer = (((GimpLayer *) gimage->layer_stack->data));
else
gimage->active_layer = NULL;
{
gimp_image_set_active_layer (gimage,
(GimpLayer *) gimage->layer_stack->data);
}
}
}

View File

@ -717,7 +717,8 @@ gimp_image_scale (GimpImage *gimage,
if ((new_width == 0) || (new_height == 0))
{
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
g_message ("%s(): Scaling to zero width or height has been rejected.",
G_GNUC_FUNCTION);
return;
}
@ -884,7 +885,7 @@ gimp_image_apply_image (GimpImage *gimage,
operation = valid_combinations[gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -991,7 +992,7 @@ gimp_image_replace_image (GimpImage *gimage,
operation = valid_combinations [gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): got illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -1561,7 +1562,7 @@ project_indexed (GimpImage *gimage,
initial_region (src, dest, NULL, gimage->cmap, layer->opacity,
layer->mode, gimage->visible, INITIAL_INDEXED);
else
g_message ("Unable to project indexed image.");
g_message ("%s(): unable to project indexed image.", G_GNUC_FUNCTION);
}
static void
@ -2298,7 +2299,9 @@ gimp_image_layer_boundary (const GimpImage *gimage,
/* The second boundary corresponds to the active layer's
* perimeter...
*/
if ((layer = gimage->active_layer))
layer = gimp_image_get_active_layer (gimage);
if (layer)
{
*segs = gimp_layer_boundary (layer, n_segs);
return TRUE;
@ -2474,7 +2477,8 @@ gimp_image_raise_layer (GimpImage *gimage,
/* is this the top layer already? */
if (curpos == 0)
{
g_message (_("Layer cannot be raised any further"));
g_message (_("%s(): layer cannot be raised any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2501,7 +2505,8 @@ gimp_image_lower_layer (GimpImage *gimage,
length = gimp_container_num_children (gimage->layers);
if (curpos >= length - 1)
{
g_message (_("Layer cannot be lowered any further"));
g_message (_("%s(): layer cannot be lowered any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2525,13 +2530,14 @@ gimp_image_raise_layer_to_top (GimpImage *gimage,
if (curpos == 0)
{
g_message (_("Layer is already on top"));
g_message (_("%s(): layer is already on top"),
G_GNUC_FUNCTION);
return FALSE;
}
if (! gimp_layer_has_alpha (layer))
{
g_message (_("Can't raise Layer without alpha"));
g_message (_("%s(): can't raise Layer without alpha"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2558,7 +2564,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *gimage,
if (curpos >= length - 1)
{
g_message (_("Layer is already on bottom"));
g_message (_("%s(): layer is already on bottom"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2615,7 +2621,7 @@ gimp_image_position_layer (GimpImage *gimage,
}
if (push_undo)
undo_push_layer_reposition (gimage, layer);
undo_push_layer_reposition (gimage, layer);
gimp_container_reorder (gimage->layers, GIMP_OBJECT (layer), new_index);
@ -2816,8 +2822,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
else
{
@ -2825,10 +2831,10 @@ gimp_image_merge_layers (GimpImage *gimage,
x1 = off_x;
if (off_y < y1)
y1 = off_y;
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE(layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE(layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE(layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE(layer)));
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer)));
}
if (merge_type == CLIP_TO_IMAGE)
{
@ -2844,8 +2850,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
break;
@ -2936,7 +2942,7 @@ gimp_image_merge_layers (GimpImage *gimage,
/* Set the layer to transparent */
pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE(merge_layer)),
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)),
0, 0,
(x2 - x1), (y2 - y1),
TRUE);
@ -2972,7 +2978,7 @@ gimp_image_merge_layers (GimpImage *gimage,
gimp_drawable_set_tattoo (GIMP_DRAWABLE (merge_layer),
gimp_drawable_get_tattoo (GIMP_DRAWABLE (layer)));
GIMP_DRAWABLE (merge_layer)->parasites =
parasite_list_copy (GIMP_DRAWABLE(layer)->parasites);
parasite_list_copy (GIMP_DRAWABLE (layer)->parasites);
while (reverse_list)
{
@ -3109,7 +3115,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu = g_new (LayerUndo, 1);
lu->layer = layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
@ -3143,8 +3149,6 @@ gimp_image_add_layer (GimpImage *gimage,
gimp_container_insert (gimage->layers, GIMP_OBJECT (layer), position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, layer);
/* notify the layers dialog of the currently active layer */
gimp_image_set_active_layer (gimage, layer);
@ -3197,7 +3201,7 @@ gimp_image_remove_layer (GimpImage *gimage,
floating_sel_reset (layer);
}
if (gimage->active_layer == layer)
if (layer == gimp_image_get_active_layer (gimage))
{
if (gimage->layer_stack)
gimp_image_set_active_layer (gimage, gimage->layer_stack->data);
@ -3223,6 +3227,8 @@ gimp_image_add_layer_mask (GimpImage *gimage,
LayerMaskUndo *lmu;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
if (layer->mask != NULL)
{
@ -3274,7 +3280,8 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage) && GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
if (!layer || !layer->mask)
return NULL;
@ -3419,16 +3426,18 @@ gimp_image_add_channel (GimpImage *gimage,
g_return_val_if_fail (channel != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
if (GIMP_DRAWABLE(channel)->gimage != NULL &&
GIMP_DRAWABLE(channel)->gimage != gimage)
if (GIMP_DRAWABLE (channel)->gimage != NULL &&
GIMP_DRAWABLE (channel)->gimage != gimage)
{
g_message ("gimp_image_add_channel: attempt to add channel to wrong image");
g_message ("%s(): attempt to add channel to wrong image",
G_GNUC_FUNCTION);
return FALSE;
}
if (gimp_container_have (gimage->channels, GIMP_OBJECT (channel)))
{
g_message ("gimp_image_add_channel: trying to add channel to image twice");
g_message ("%s(): trying to add channel to image twice",
G_GNUC_FUNCTION);
return FALSE;
}
@ -3436,7 +3445,7 @@ gimp_image_add_channel (GimpImage *gimage,
cu = g_new (ChannelUndo, 1);
cu->channel = channel;
cu->prev_position = 0;
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_ADD_UNDO, cu);
/* add the channel to the list */
@ -3475,9 +3484,9 @@ gimp_image_remove_channel (GimpImage *gimage,
cu->channel = channel;
cu->prev_position = gimp_container_get_child_index (gimage->channels,
GIMP_OBJECT (channel));
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_REMOVE_UNDO, cu);
gtk_object_ref (GTK_OBJECT (channel));
gimp_container_remove (gimage->channels, GIMP_OBJECT (channel));
@ -3485,9 +3494,12 @@ gimp_image_remove_channel (GimpImage *gimage,
/* Send out REMOVED signal from channel */
gimp_drawable_removed (GIMP_DRAWABLE (channel));
if (gimage->active_channel == channel)
gimage->active_channel =
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0));
if (channel == gimp_image_get_active_channel (gimage))
{
gimp_image_set_active_channel
(gimage,
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0)));
}
gtk_object_unref (GTK_OBJECT (channel));
@ -3520,11 +3532,11 @@ gimp_image_active_drawable (const GimpImage *gimage)
/* If there is an active channel (a saved selection, etc.),
* we ignore the active layer
*/
if (gimage->active_channel != NULL)
if (gimage->active_channel)
{
return GIMP_DRAWABLE (gimage->active_channel);
}
else if (gimage->active_layer != NULL)
else if (gimage->active_layer)
{
layer = gimage->active_layer;

View File

@ -91,7 +91,7 @@ struct _GimpImage
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
/* Projection attributes */
gint construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
@ -101,15 +101,15 @@ struct _GimpImage
GList *guides; /* guides */
/* Layer/Channel attributes */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* ID of active layer */
GimpChannel *active_channel; /* ID of active channel */
GimpLayer *floating_sel; /* ID of fs layer */
GimpChannel *selection_mask; /* selection mask channel */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
ParasiteList *parasites; /* Plug-in parasite data */
@ -124,7 +124,7 @@ struct _GimpImage
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Undo apparatus */
/* Undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
@ -133,7 +133,7 @@ struct _GimpImage
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* Composite preview */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};

View File

@ -1965,8 +1965,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
alpha = gimp_layer_has_alpha (layer);
}
lind = gimp_image_get_layer_index (gdisp->gimage,
gdisp->gimage->active_layer);
lind = gimp_image_get_layer_index (gdisp->gimage, layer);
lnum = gimp_container_num_children (gdisp->gimage->layers);
}
}

View File

@ -1965,8 +1965,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
alpha = gimp_layer_has_alpha (layer);
}
lind = gimp_image_get_layer_index (gdisp->gimage,
gdisp->gimage->active_layer);
lind = gimp_image_get_layer_index (gdisp->gimage, layer);
lnum = gimp_container_num_children (gdisp->gimage->layers);
}
}

View File

@ -266,7 +266,8 @@ layer_select_end (LayerSelect *layer_select,
gtk_widget_hide (layer_select->shell);
/* only reset the active layer if a new layer was specified */
if (layer_select->current_layer != layer_select->gimage->active_layer)
if (layer_select->current_layer !=
gimp_image_get_active_layer (layer_select->gimage))
{
gimp_image_set_active_layer (layer_select->gimage,
layer_select->current_layer);
@ -281,9 +282,9 @@ layer_select_set_gimage (LayerSelect *layer_select,
gint image_width;
gint image_height;
layer_select->gimage = gimage;
layer_select->current_layer = gimage->active_layer;
layer_select->dirty = TRUE;
layer_select->gimage = gimage;
layer_select->current_layer = gimp_image_get_active_layer (gimage);
layer_select->dirty = TRUE;
/* Get the image width and height variables, based on the gimage */
if (gimage->width > gimage->height)

View File

@ -155,18 +155,23 @@ floating_sel_reset (GimpLayer *layer)
/* set the underlying drawable to active */
if (GIMP_IS_LAYER (layer->fs.drawable))
gimp_image_set_active_layer (gimage, GIMP_LAYER (layer->fs.drawable));
{
gimp_image_set_active_layer (gimage, GIMP_LAYER (layer->fs.drawable));
}
else if (GIMP_IS_LAYER_MASK (layer->fs.drawable))
gimp_image_set_active_layer (gimage,
GIMP_LAYER_MASK (layer->fs.drawable)->layer);
{
gimp_image_set_active_layer (gimage,
GIMP_LAYER_MASK (layer->fs.drawable)->layer);
}
else if (GIMP_IS_CHANNEL (layer->fs.drawable))
{
gimp_image_set_active_channel (gimage, GIMP_CHANNEL (layer->fs.drawable));
if (gimp_container_num_children (gimage->layers))
gimage->active_layer = (((GimpLayer *) gimage->layer_stack->data));
else
gimage->active_layer = NULL;
{
gimp_image_set_active_layer (gimage,
(GimpLayer *) gimage->layer_stack->data);
}
}
}

View File

@ -1965,8 +1965,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
alpha = gimp_layer_has_alpha (layer);
}
lind = gimp_image_get_layer_index (gdisp->gimage,
gdisp->gimage->active_layer);
lind = gimp_image_get_layer_index (gdisp->gimage, layer);
lnum = gimp_container_num_children (gdisp->gimage->layers);
}
}

View File

@ -576,7 +576,7 @@ duplicate (GimpImage *gimage)
GimpChannel *channel, *new_channel;
GList *list;
Guide *guide = NULL;
GimpLayer *active_layer = NULL;
GimpLayer *active_layer = NULL;
GimpChannel *active_channel = NULL;
GimpDrawable *new_floating_sel_drawable = NULL;
GimpDrawable *floating_sel_drawable = NULL;
@ -627,7 +627,7 @@ duplicate (GimpImage *gimage)
gimp_object_get_name (GIMP_OBJECT (layer->mask)));
}
if (gimage->active_layer == layer)
if (gimp_image_get_active_layer (gimage) == layer)
active_layer = new_layer;
if (gimage->floating_sel == layer)
@ -656,7 +656,7 @@ duplicate (GimpImage *gimage)
gimp_object_set_name (GIMP_OBJECT (new_channel),
gimp_object_get_name (GIMP_OBJECT (channel)));
if (gimage->active_channel == channel)
if (gimp_image_get_active_channel (gimage) == channel)
active_channel = (new_channel);
if (floating_sel_drawable == GIMP_DRAWABLE (channel))
@ -678,8 +678,12 @@ duplicate (GimpImage *gimage)
new_gimage->selection_mask->boundary_known = FALSE;
/* Set active layer, active channel */
new_gimage->active_layer = active_layer;
new_gimage->active_channel = active_channel;
if (active_layer)
gimp_image_set_active_layer (new_gimage, active_layer);
if (active_channel)
gimp_image_set_active_channel (new_gimage, active_channel);
if (floating_layer)
floating_sel_attach (floating_layer, new_floating_sel_drawable);

View File

@ -576,7 +576,7 @@ duplicate (GimpImage *gimage)
GimpChannel *channel, *new_channel;
GList *list;
Guide *guide = NULL;
GimpLayer *active_layer = NULL;
GimpLayer *active_layer = NULL;
GimpChannel *active_channel = NULL;
GimpDrawable *new_floating_sel_drawable = NULL;
GimpDrawable *floating_sel_drawable = NULL;
@ -627,7 +627,7 @@ duplicate (GimpImage *gimage)
gimp_object_get_name (GIMP_OBJECT (layer->mask)));
}
if (gimage->active_layer == layer)
if (gimp_image_get_active_layer (gimage) == layer)
active_layer = new_layer;
if (gimage->floating_sel == layer)
@ -656,7 +656,7 @@ duplicate (GimpImage *gimage)
gimp_object_set_name (GIMP_OBJECT (new_channel),
gimp_object_get_name (GIMP_OBJECT (channel)));
if (gimage->active_channel == channel)
if (gimp_image_get_active_channel (gimage) == channel)
active_channel = (new_channel);
if (floating_sel_drawable == GIMP_DRAWABLE (channel))
@ -678,8 +678,12 @@ duplicate (GimpImage *gimage)
new_gimage->selection_mask->boundary_known = FALSE;
/* Set active layer, active channel */
new_gimage->active_layer = active_layer;
new_gimage->active_channel = active_channel;
if (active_layer)
gimp_image_set_active_layer (new_gimage, active_layer);
if (active_channel)
gimp_image_set_active_channel (new_gimage, active_channel);
if (floating_layer)
floating_sel_attach (floating_layer, new_floating_sel_drawable);

View File

@ -717,7 +717,8 @@ gimp_image_scale (GimpImage *gimage,
if ((new_width == 0) || (new_height == 0))
{
g_message (("gimp_image_scale: Scaling to zero width or height has been rejected."));
g_message ("%s(): Scaling to zero width or height has been rejected.",
G_GNUC_FUNCTION);
return;
}
@ -884,7 +885,7 @@ gimp_image_apply_image (GimpImage *gimage,
operation = valid_combinations[gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -991,7 +992,7 @@ gimp_image_replace_image (GimpImage *gimage,
operation = valid_combinations [gimp_drawable_type (drawable)][src2PR->bytes];
if (operation == -1)
{
g_message ("gimp_image_apply_image sent illegal parameters");
g_message ("%s(): got illegal parameters", G_GNUC_FUNCTION);
return;
}
@ -1561,7 +1562,7 @@ project_indexed (GimpImage *gimage,
initial_region (src, dest, NULL, gimage->cmap, layer->opacity,
layer->mode, gimage->visible, INITIAL_INDEXED);
else
g_message ("Unable to project indexed image.");
g_message ("%s(): unable to project indexed image.", G_GNUC_FUNCTION);
}
static void
@ -2298,7 +2299,9 @@ gimp_image_layer_boundary (const GimpImage *gimage,
/* The second boundary corresponds to the active layer's
* perimeter...
*/
if ((layer = gimage->active_layer))
layer = gimp_image_get_active_layer (gimage);
if (layer)
{
*segs = gimp_layer_boundary (layer, n_segs);
return TRUE;
@ -2474,7 +2477,8 @@ gimp_image_raise_layer (GimpImage *gimage,
/* is this the top layer already? */
if (curpos == 0)
{
g_message (_("Layer cannot be raised any further"));
g_message (_("%s(): layer cannot be raised any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2501,7 +2505,8 @@ gimp_image_lower_layer (GimpImage *gimage,
length = gimp_container_num_children (gimage->layers);
if (curpos >= length - 1)
{
g_message (_("Layer cannot be lowered any further"));
g_message (_("%s(): layer cannot be lowered any further"),
G_GNUC_FUNCTION);
return FALSE;
}
@ -2525,13 +2530,14 @@ gimp_image_raise_layer_to_top (GimpImage *gimage,
if (curpos == 0)
{
g_message (_("Layer is already on top"));
g_message (_("%s(): layer is already on top"),
G_GNUC_FUNCTION);
return FALSE;
}
if (! gimp_layer_has_alpha (layer))
{
g_message (_("Can't raise Layer without alpha"));
g_message (_("%s(): can't raise Layer without alpha"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2558,7 +2564,7 @@ gimp_image_lower_layer_to_bottom (GimpImage *gimage,
if (curpos >= length - 1)
{
g_message (_("Layer is already on bottom"));
g_message (_("%s(): layer is already on bottom"), G_GNUC_FUNCTION);
return FALSE;
}
@ -2615,7 +2621,7 @@ gimp_image_position_layer (GimpImage *gimage,
}
if (push_undo)
undo_push_layer_reposition (gimage, layer);
undo_push_layer_reposition (gimage, layer);
gimp_container_reorder (gimage->layers, GIMP_OBJECT (layer), new_index);
@ -2816,8 +2822,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
else
{
@ -2825,10 +2831,10 @@ gimp_image_merge_layers (GimpImage *gimage,
x1 = off_x;
if (off_y < y1)
y1 = off_y;
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE(layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE(layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE(layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE(layer)));
if ((off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) > x2)
x2 = (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer)));
if ((off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))) > y2)
y2 = (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer)));
}
if (merge_type == CLIP_TO_IMAGE)
{
@ -2844,8 +2850,8 @@ gimp_image_merge_layers (GimpImage *gimage,
{
x1 = off_x;
y1 = off_y;
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE(layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE(layer));
x2 = off_x + gimp_drawable_width (GIMP_DRAWABLE (layer));
y2 = off_y + gimp_drawable_height (GIMP_DRAWABLE (layer));
}
break;
@ -2936,7 +2942,7 @@ gimp_image_merge_layers (GimpImage *gimage,
/* Set the layer to transparent */
pixel_region_init (&src1PR,
gimp_drawable_data (GIMP_DRAWABLE(merge_layer)),
gimp_drawable_data (GIMP_DRAWABLE (merge_layer)),
0, 0,
(x2 - x1), (y2 - y1),
TRUE);
@ -2972,7 +2978,7 @@ gimp_image_merge_layers (GimpImage *gimage,
gimp_drawable_set_tattoo (GIMP_DRAWABLE (merge_layer),
gimp_drawable_get_tattoo (GIMP_DRAWABLE (layer)));
GIMP_DRAWABLE (merge_layer)->parasites =
parasite_list_copy (GIMP_DRAWABLE(layer)->parasites);
parasite_list_copy (GIMP_DRAWABLE (layer)->parasites);
while (reverse_list)
{
@ -3109,7 +3115,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu = g_new (LayerUndo, 1);
lu->layer = layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
@ -3143,8 +3149,6 @@ gimp_image_add_layer (GimpImage *gimage,
gimp_container_insert (gimage->layers, GIMP_OBJECT (layer), position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, layer);
/* notify the layers dialog of the currently active layer */
gimp_image_set_active_layer (gimage, layer);
@ -3197,7 +3201,7 @@ gimp_image_remove_layer (GimpImage *gimage,
floating_sel_reset (layer);
}
if (gimage->active_layer == layer)
if (layer == gimp_image_get_active_layer (gimage))
{
if (gimage->layer_stack)
gimp_image_set_active_layer (gimage, gimage->layer_stack->data);
@ -3223,6 +3227,8 @@ gimp_image_add_layer_mask (GimpImage *gimage,
LayerMaskUndo *lmu;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_LAYER_MASK (mask), NULL);
if (layer->mask != NULL)
{
@ -3274,7 +3280,8 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
gint off_x;
gint off_y;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage) && GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
if (!layer || !layer->mask)
return NULL;
@ -3419,16 +3426,18 @@ gimp_image_add_channel (GimpImage *gimage,
g_return_val_if_fail (channel != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), FALSE);
if (GIMP_DRAWABLE(channel)->gimage != NULL &&
GIMP_DRAWABLE(channel)->gimage != gimage)
if (GIMP_DRAWABLE (channel)->gimage != NULL &&
GIMP_DRAWABLE (channel)->gimage != gimage)
{
g_message ("gimp_image_add_channel: attempt to add channel to wrong image");
g_message ("%s(): attempt to add channel to wrong image",
G_GNUC_FUNCTION);
return FALSE;
}
if (gimp_container_have (gimage->channels, GIMP_OBJECT (channel)))
{
g_message ("gimp_image_add_channel: trying to add channel to image twice");
g_message ("%s(): trying to add channel to image twice",
G_GNUC_FUNCTION);
return FALSE;
}
@ -3436,7 +3445,7 @@ gimp_image_add_channel (GimpImage *gimage,
cu = g_new (ChannelUndo, 1);
cu->channel = channel;
cu->prev_position = 0;
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_ADD_UNDO, cu);
/* add the channel to the list */
@ -3475,9 +3484,9 @@ gimp_image_remove_channel (GimpImage *gimage,
cu->channel = channel;
cu->prev_position = gimp_container_get_child_index (gimage->channels,
GIMP_OBJECT (channel));
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
undo_push_channel (gimage, CHANNEL_REMOVE_UNDO, cu);
gtk_object_ref (GTK_OBJECT (channel));
gimp_container_remove (gimage->channels, GIMP_OBJECT (channel));
@ -3485,9 +3494,12 @@ gimp_image_remove_channel (GimpImage *gimage,
/* Send out REMOVED signal from channel */
gimp_drawable_removed (GIMP_DRAWABLE (channel));
if (gimage->active_channel == channel)
gimage->active_channel =
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0));
if (channel == gimp_image_get_active_channel (gimage))
{
gimp_image_set_active_channel
(gimage,
GIMP_CHANNEL (gimp_container_get_child_by_index (gimage->channels, 0)));
}
gtk_object_unref (GTK_OBJECT (channel));
@ -3520,11 +3532,11 @@ gimp_image_active_drawable (const GimpImage *gimage)
/* If there is an active channel (a saved selection, etc.),
* we ignore the active layer
*/
if (gimage->active_channel != NULL)
if (gimage->active_channel)
{
return GIMP_DRAWABLE (gimage->active_channel);
}
else if (gimage->active_layer != NULL)
else if (gimage->active_layer)
{
layer = gimage->active_layer;

View File

@ -91,7 +91,7 @@ struct _GimpImage
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
/* Projection attributes */
gint construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
@ -101,15 +101,15 @@ struct _GimpImage
GList *guides; /* guides */
/* Layer/Channel attributes */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* ID of active layer */
GimpChannel *active_channel; /* ID of active channel */
GimpLayer *floating_sel; /* ID of fs layer */
GimpChannel *selection_mask; /* selection mask channel */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
ParasiteList *parasites; /* Plug-in parasite data */
@ -124,7 +124,7 @@ struct _GimpImage
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Undo apparatus */
/* Undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
@ -133,7 +133,7 @@ struct _GimpImage
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* Composite preview */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};

View File

@ -618,8 +618,8 @@ channels_dialog_flush (void)
}
/* Set the active channel */
if (channelsD->active_channel != gimage->active_channel)
channelsD->active_channel = gimage->active_channel;
if (channelsD->active_channel != gimp_image_get_active_channel (gimage))
channelsD->active_channel = gimp_image_get_active_channel (gimage);
/* set the menus if floating sel status has changed */
if (channelsD->floating_sel != gimage->floating_sel)
@ -1044,9 +1044,9 @@ channels_dialog_raise_channel_callback (GtkWidget *widget,
if (!channelsD || !(gimage = channelsD->gimage))
return;
if (gimage->active_channel != NULL)
if (gimp_image_get_active_channel (gimage))
{
gimp_image_raise_channel (gimage, gimage->active_channel);
gimp_image_raise_channel (gimage, gimp_image_get_active_channel (gimage));
gdisplays_flush ();
}
}
@ -1060,9 +1060,9 @@ channels_dialog_lower_channel_callback (GtkWidget *widget,
if (!channelsD || !(gimage = channelsD->gimage))
return;
if (gimage->active_channel != NULL)
if (gimp_image_get_active_channel (gimage))
{
gimp_image_lower_channel (gimage, gimage->active_channel);
gimp_image_lower_channel (gimage, gimp_image_get_active_channel (gimage));
gdisplays_flush ();
}
}
@ -1090,14 +1090,15 @@ void
channels_dialog_delete_channel_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpImage *gimage;
GimpChannel *active_channel;
if (!channelsD || !(gimage = channelsD->gimage))
return;
if (gimage->active_channel != NULL)
if ((active_channel = gimp_image_get_active_channel (gimage)))
{
gimp_image_remove_channel (gimage, gimage->active_channel);
gimp_image_remove_channel (gimage, active_channel);
gdisplays_flush ();
}
}
@ -1106,14 +1107,15 @@ void
channels_dialog_channel_to_sel_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
GimpImage *gimage;
GimpChannel *active_channel;
if (!channelsD || !(gimage = channelsD->gimage))
return;
if (gimage->active_channel != NULL)
if ((active_channel = gimp_image_get_active_channel (gimage)))
{
gimage_mask_load (gimage, gimage->active_channel);
gimage_mask_load (gimage, active_channel);
gdisplays_flush ();
}
}

View File

@ -940,10 +940,12 @@ layers_previous_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp);
current_layer =
gimp_image_get_layer_index (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_get_layer_index (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
new_layer = (GimpLayer *) gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer - 1);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer - 1);
if (new_layer)
{
@ -964,10 +966,12 @@ layers_next_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp);
current_layer =
gimp_image_get_layer_index (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_get_layer_index (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
new_layer = (GimpLayer *) gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer + 1);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer + 1);
if (new_layer)
{
@ -984,7 +988,8 @@ layers_raise_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_raise_layer (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_raise_layer (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -995,7 +1000,8 @@ layers_lower_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_lower_layer (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_lower_layer (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1006,7 +1012,8 @@ layers_raise_to_top_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_raise_layer_to_top (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_raise_layer_to_top (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1017,7 +1024,8 @@ layers_lower_to_bottom_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_lower_layer_to_bottom (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_lower_layer_to_bottom (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1060,7 +1068,8 @@ layers_mask_select_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_layer_mask (gdisp->gimage, gdisp->gimage->active_layer);
gimage_mask_layer_mask (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1071,7 +1080,7 @@ layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_layer_add_alpha ( gdisp->gimage->active_layer);
gimp_layer_add_alpha (gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1082,7 +1091,8 @@ layers_alpha_select_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_layer_alpha (gdisp->gimage, gdisp->gimage->active_layer);
gimage_mask_layer_alpha (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1093,7 +1103,7 @@ layers_resize_to_image_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_layer_resize_to_image (gdisp->gimage->active_layer);
gimp_layer_resize_to_image (gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}

View File

@ -940,10 +940,12 @@ layers_previous_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp);
current_layer =
gimp_image_get_layer_index (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_get_layer_index (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
new_layer = (GimpLayer *) gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer - 1);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer - 1);
if (new_layer)
{
@ -964,10 +966,12 @@ layers_next_cmd_callback (GtkWidget *widget,
return_if_no_display (gdisp);
current_layer =
gimp_image_get_layer_index (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_get_layer_index (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
new_layer = (GimpLayer *) gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer + 1);
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gdisp->gimage->layers,
current_layer + 1);
if (new_layer)
{
@ -984,7 +988,8 @@ layers_raise_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_raise_layer (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_raise_layer (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -995,7 +1000,8 @@ layers_lower_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_lower_layer (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_lower_layer (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1006,7 +1012,8 @@ layers_raise_to_top_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_raise_layer_to_top (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_raise_layer_to_top (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1017,7 +1024,8 @@ layers_lower_to_bottom_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_image_lower_layer_to_bottom (gdisp->gimage, gdisp->gimage->active_layer);
gimp_image_lower_layer_to_bottom (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1060,7 +1068,8 @@ layers_mask_select_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_layer_mask (gdisp->gimage, gdisp->gimage->active_layer);
gimage_mask_layer_mask (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1071,7 +1080,7 @@ layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_layer_add_alpha ( gdisp->gimage->active_layer);
gimp_layer_add_alpha (gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1082,7 +1091,8 @@ layers_alpha_select_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_layer_alpha (gdisp->gimage, gdisp->gimage->active_layer);
gimage_mask_layer_alpha (gdisp->gimage,
gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}
@ -1093,7 +1103,7 @@ layers_resize_to_image_cmd_callback (GtkWidget *widget,
GDisplay *gdisp;
return_if_no_display (gdisp);
gimp_layer_resize_to_image (gdisp->gimage->active_layer);
gimp_layer_resize_to_image (gimp_image_get_active_layer (gdisp->gimage));
gdisplays_flush ();
}

View File

@ -266,7 +266,8 @@ layer_select_end (LayerSelect *layer_select,
gtk_widget_hide (layer_select->shell);
/* only reset the active layer if a new layer was specified */
if (layer_select->current_layer != layer_select->gimage->active_layer)
if (layer_select->current_layer !=
gimp_image_get_active_layer (layer_select->gimage))
{
gimp_image_set_active_layer (layer_select->gimage,
layer_select->current_layer);
@ -281,9 +282,9 @@ layer_select_set_gimage (LayerSelect *layer_select,
gint image_width;
gint image_height;
layer_select->gimage = gimage;
layer_select->current_layer = gimage->active_layer;
layer_select->dirty = TRUE;
layer_select->gimage = gimage;
layer_select->current_layer = gimp_image_get_active_layer (gimage);
layer_select->dirty = TRUE;
/* Get the image width and height variables, based on the gimage */
if (gimage->width > gimage->height)

View File

@ -695,12 +695,12 @@ layers_dialog_flush (void)
}
/* Set the active layer */
if (layersD->active_layer != gimage->active_layer)
layersD->active_layer = gimage->active_layer;
if (layersD->active_layer != gimp_image_get_active_layer (gimage))
layersD->active_layer = gimp_image_get_active_layer (gimage);
/* Set the active channel */
if (layersD->active_channel != gimage->active_channel)
layersD->active_channel = gimage->active_channel;
if (layersD->active_channel != gimp_image_get_active_channel (gimage))
layersD->active_channel = gimp_image_get_active_channel (gimage);
/* set the menus if floating sel status has changed */
if (layersD->floating_sel != gimage->floating_sel)
@ -1390,7 +1390,8 @@ paint_mode_menu_callback (GtkWidget *widget,
GimpLayer *layer;
LayerModeEffects mode;
if (!(gimage = layersD->gimage) || !(layer = gimage->active_layer))
if (! (gimage = layersD->gimage) ||
! (layer = gimp_image_get_active_layer (gimage)))
return;
/* If the layer has an alpha channel, set the transparency and redraw */
@ -1418,7 +1419,8 @@ opacity_scale_update (GtkAdjustment *adjustment,
GimpLayer *layer;
gint opacity;
if (!(gimage = layersD->gimage) || !(layer = gimage->active_layer))
if (! (gimage = layersD->gimage) ||
! (layer = gimp_image_get_active_layer (gimage)))
return;
/* add the 0.001 to insure there are no subtle rounding errors */
@ -1442,7 +1444,8 @@ preserve_trans_update (GtkWidget *widget,
GimpImage *gimage;
GimpLayer *layer;
if (!(gimage = layersD->gimage) || !(layer = gimage->active_layer))
if (! (gimage = layersD->gimage) ||
! (layer = gimp_image_get_active_layer (gimage)))
return;
if (GTK_TOGGLE_BUTTON (widget)->active)
@ -1538,16 +1541,19 @@ layers_dialog_previous_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
current_layer = gimp_image_get_layer_index (gimage, gimage->active_layer);
current_layer =
gimp_image_get_layer_index (gimage, gimp_image_get_active_layer (gimage));
new_layer =
GIMP_LAYER (gimp_container_get_child_by_index (gimage->layers,
current_layer - 1));
if (new_layer)
if (current_layer > 0)
{
gimp_image_set_active_layer (gimage, new_layer);
gdisplays_flush ();
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gimage->layers, current_layer - 1);
if (new_layer)
{
gimp_image_set_active_layer (gimage, new_layer);
gdisplays_flush ();
}
}
}
@ -1562,7 +1568,8 @@ layers_dialog_next_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
current_layer = gimp_image_get_layer_index (gimage, gimage->active_layer);
current_layer =
gimp_image_get_layer_index (gimage, gimp_image_get_active_layer (gimage));
new_layer =
GIMP_LAYER (gimp_container_get_child_by_index (gimage->layers,
@ -1584,7 +1591,7 @@ layers_dialog_raise_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_raise_layer (gimage, gimage->active_layer);
gimp_image_raise_layer (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1597,7 +1604,7 @@ layers_dialog_lower_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_lower_layer (gimage, gimage->active_layer);
gimp_image_lower_layer (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1610,7 +1617,7 @@ layers_dialog_raise_layer_to_top_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_raise_layer_to_top (gimage, gimage->active_layer);
gimp_image_raise_layer_to_top (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1623,7 +1630,8 @@ layers_dialog_lower_layer_to_bottom_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_lower_layer_to_bottom (gimage, gimage->active_layer);
gimp_image_lower_layer_to_bottom (gimage,
gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1681,16 +1689,16 @@ layers_dialog_delete_layer_callback (GtkWidget *widget,
GimpImage *gimage;
GimpLayer *layer;
if (!layersD ||
!(gimage = layersD->gimage) ||
!(layer = gimp_image_get_active_layer (gimage)))
if (! layersD ||
! (gimage = layersD->gimage) ||
! (layer = gimp_image_get_active_layer (gimage)))
return;
/* if the layer is a floating selection, take special care */
if (gimp_layer_is_floating_sel (layer))
floating_sel_remove (layer);
else
gimp_image_remove_layer (gimage, gimage->active_layer);
gimp_image_remove_layer (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush_now ();
}
@ -1704,7 +1712,8 @@ layers_dialog_scale_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layers_dialog_scale_layer_query (gimage, gimage->active_layer);
layers_dialog_scale_layer_query (gimage,
gimp_image_get_active_layer (gimage));
}
void
@ -1716,7 +1725,8 @@ layers_dialog_resize_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layers_dialog_resize_layer_query (gimage, gimage->active_layer);
layers_dialog_resize_layer_query (gimage,
gimp_image_get_active_layer (gimage));
}
void
@ -1728,7 +1738,7 @@ layers_dialog_resize_to_image_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_layer_resize_to_image (gimage->active_layer);
gimp_layer_resize_to_image (gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1742,7 +1752,7 @@ layers_dialog_add_layer_mask_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layers_dialog_add_mask_query (gimage->active_layer);
layers_dialog_add_mask_query (gimp_image_get_active_layer (gimage));
}
void
@ -1755,11 +1765,12 @@ layers_dialog_apply_layer_mask_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layer = gimp_image_get_active_layer (gimage);
/* Make sure there is a layer mask to apply */
if ((layer = gimage->active_layer) != NULL &&
gimp_layer_get_mask (layer))
if (layer && gimp_layer_get_mask (layer))
{
gboolean flush = !layer->apply_mask || layer->show_mask;
gboolean flush = ! layer->apply_mask || layer->show_mask;
gimp_image_remove_layer_mask (gimp_drawable_gimage (GIMP_DRAWABLE (layer)),
layer, APPLY);
@ -1788,9 +1799,10 @@ layers_dialog_delete_layer_mask_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layer = gimp_image_get_active_layer (gimage);
/* Make sure there is a layer mask to apply */
if ((layer = gimage->active_layer) != NULL &&
gimp_layer_get_mask (layer))
if (layer && gimp_layer_get_mask (layer))
{
gboolean flush = layer->apply_mask || layer->show_mask;
@ -1845,7 +1857,8 @@ layers_dialog_merge_down_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_merge_down (gimage, gimage->active_layer, EXPAND_AS_NECESSARY);
gimp_image_merge_down (gimage, gimp_image_get_active_layer (gimage),
EXPAND_AS_NECESSARY);
gdisplays_flush ();
}
@ -1871,7 +1884,7 @@ layers_dialog_alpha_select_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimage_mask_layer_alpha (gimage, gimage->active_layer);
gimage_mask_layer_alpha (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1884,7 +1897,7 @@ layers_dialog_mask_select_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimage_mask_layer_mask (gimage, gimage->active_layer);
gimage_mask_layer_mask (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}

View File

@ -266,7 +266,8 @@ layer_select_end (LayerSelect *layer_select,
gtk_widget_hide (layer_select->shell);
/* only reset the active layer if a new layer was specified */
if (layer_select->current_layer != layer_select->gimage->active_layer)
if (layer_select->current_layer !=
gimp_image_get_active_layer (layer_select->gimage))
{
gimp_image_set_active_layer (layer_select->gimage,
layer_select->current_layer);
@ -281,9 +282,9 @@ layer_select_set_gimage (LayerSelect *layer_select,
gint image_width;
gint image_height;
layer_select->gimage = gimage;
layer_select->current_layer = gimage->active_layer;
layer_select->dirty = TRUE;
layer_select->gimage = gimage;
layer_select->current_layer = gimp_image_get_active_layer (gimage);
layer_select->dirty = TRUE;
/* Get the image width and height variables, based on the gimage */
if (gimage->width > gimage->height)

View File

@ -695,12 +695,12 @@ layers_dialog_flush (void)
}
/* Set the active layer */
if (layersD->active_layer != gimage->active_layer)
layersD->active_layer = gimage->active_layer;
if (layersD->active_layer != gimp_image_get_active_layer (gimage))
layersD->active_layer = gimp_image_get_active_layer (gimage);
/* Set the active channel */
if (layersD->active_channel != gimage->active_channel)
layersD->active_channel = gimage->active_channel;
if (layersD->active_channel != gimp_image_get_active_channel (gimage))
layersD->active_channel = gimp_image_get_active_channel (gimage);
/* set the menus if floating sel status has changed */
if (layersD->floating_sel != gimage->floating_sel)
@ -1390,7 +1390,8 @@ paint_mode_menu_callback (GtkWidget *widget,
GimpLayer *layer;
LayerModeEffects mode;
if (!(gimage = layersD->gimage) || !(layer = gimage->active_layer))
if (! (gimage = layersD->gimage) ||
! (layer = gimp_image_get_active_layer (gimage)))
return;
/* If the layer has an alpha channel, set the transparency and redraw */
@ -1418,7 +1419,8 @@ opacity_scale_update (GtkAdjustment *adjustment,
GimpLayer *layer;
gint opacity;
if (!(gimage = layersD->gimage) || !(layer = gimage->active_layer))
if (! (gimage = layersD->gimage) ||
! (layer = gimp_image_get_active_layer (gimage)))
return;
/* add the 0.001 to insure there are no subtle rounding errors */
@ -1442,7 +1444,8 @@ preserve_trans_update (GtkWidget *widget,
GimpImage *gimage;
GimpLayer *layer;
if (!(gimage = layersD->gimage) || !(layer = gimage->active_layer))
if (! (gimage = layersD->gimage) ||
! (layer = gimp_image_get_active_layer (gimage)))
return;
if (GTK_TOGGLE_BUTTON (widget)->active)
@ -1538,16 +1541,19 @@ layers_dialog_previous_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
current_layer = gimp_image_get_layer_index (gimage, gimage->active_layer);
current_layer =
gimp_image_get_layer_index (gimage, gimp_image_get_active_layer (gimage));
new_layer =
GIMP_LAYER (gimp_container_get_child_by_index (gimage->layers,
current_layer - 1));
if (new_layer)
if (current_layer > 0)
{
gimp_image_set_active_layer (gimage, new_layer);
gdisplays_flush ();
new_layer = (GimpLayer *)
gimp_container_get_child_by_index (gimage->layers, current_layer - 1);
if (new_layer)
{
gimp_image_set_active_layer (gimage, new_layer);
gdisplays_flush ();
}
}
}
@ -1562,7 +1568,8 @@ layers_dialog_next_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
current_layer = gimp_image_get_layer_index (gimage, gimage->active_layer);
current_layer =
gimp_image_get_layer_index (gimage, gimp_image_get_active_layer (gimage));
new_layer =
GIMP_LAYER (gimp_container_get_child_by_index (gimage->layers,
@ -1584,7 +1591,7 @@ layers_dialog_raise_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_raise_layer (gimage, gimage->active_layer);
gimp_image_raise_layer (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1597,7 +1604,7 @@ layers_dialog_lower_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_lower_layer (gimage, gimage->active_layer);
gimp_image_lower_layer (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1610,7 +1617,7 @@ layers_dialog_raise_layer_to_top_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_raise_layer_to_top (gimage, gimage->active_layer);
gimp_image_raise_layer_to_top (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1623,7 +1630,8 @@ layers_dialog_lower_layer_to_bottom_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_lower_layer_to_bottom (gimage, gimage->active_layer);
gimp_image_lower_layer_to_bottom (gimage,
gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1681,16 +1689,16 @@ layers_dialog_delete_layer_callback (GtkWidget *widget,
GimpImage *gimage;
GimpLayer *layer;
if (!layersD ||
!(gimage = layersD->gimage) ||
!(layer = gimp_image_get_active_layer (gimage)))
if (! layersD ||
! (gimage = layersD->gimage) ||
! (layer = gimp_image_get_active_layer (gimage)))
return;
/* if the layer is a floating selection, take special care */
if (gimp_layer_is_floating_sel (layer))
floating_sel_remove (layer);
else
gimp_image_remove_layer (gimage, gimage->active_layer);
gimp_image_remove_layer (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush_now ();
}
@ -1704,7 +1712,8 @@ layers_dialog_scale_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layers_dialog_scale_layer_query (gimage, gimage->active_layer);
layers_dialog_scale_layer_query (gimage,
gimp_image_get_active_layer (gimage));
}
void
@ -1716,7 +1725,8 @@ layers_dialog_resize_layer_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layers_dialog_resize_layer_query (gimage, gimage->active_layer);
layers_dialog_resize_layer_query (gimage,
gimp_image_get_active_layer (gimage));
}
void
@ -1728,7 +1738,7 @@ layers_dialog_resize_to_image_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_layer_resize_to_image (gimage->active_layer);
gimp_layer_resize_to_image (gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1742,7 +1752,7 @@ layers_dialog_add_layer_mask_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layers_dialog_add_mask_query (gimage->active_layer);
layers_dialog_add_mask_query (gimp_image_get_active_layer (gimage));
}
void
@ -1755,11 +1765,12 @@ layers_dialog_apply_layer_mask_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layer = gimp_image_get_active_layer (gimage);
/* Make sure there is a layer mask to apply */
if ((layer = gimage->active_layer) != NULL &&
gimp_layer_get_mask (layer))
if (layer && gimp_layer_get_mask (layer))
{
gboolean flush = !layer->apply_mask || layer->show_mask;
gboolean flush = ! layer->apply_mask || layer->show_mask;
gimp_image_remove_layer_mask (gimp_drawable_gimage (GIMP_DRAWABLE (layer)),
layer, APPLY);
@ -1788,9 +1799,10 @@ layers_dialog_delete_layer_mask_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
layer = gimp_image_get_active_layer (gimage);
/* Make sure there is a layer mask to apply */
if ((layer = gimage->active_layer) != NULL &&
gimp_layer_get_mask (layer))
if (layer && gimp_layer_get_mask (layer))
{
gboolean flush = layer->apply_mask || layer->show_mask;
@ -1845,7 +1857,8 @@ layers_dialog_merge_down_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimp_image_merge_down (gimage, gimage->active_layer, EXPAND_AS_NECESSARY);
gimp_image_merge_down (gimage, gimp_image_get_active_layer (gimage),
EXPAND_AS_NECESSARY);
gdisplays_flush ();
}
@ -1871,7 +1884,7 @@ layers_dialog_alpha_select_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimage_mask_layer_alpha (gimage, gimage->active_layer);
gimage_mask_layer_alpha (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}
@ -1884,7 +1897,7 @@ layers_dialog_mask_select_callback (GtkWidget *widget,
if (!layersD || !(gimage = layersD->gimage))
return;
gimage_mask_layer_mask (gimage, gimage->active_layer);
gimage_mask_layer_mask (gimage, gimp_image_get_active_layer (gimage));
gdisplays_flush ();
}

View File

@ -493,7 +493,7 @@ move_tool_cursor_update (GimpTool *tool,
GIMP_RECT_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_ANCHOR);
}
else if (layer == gdisp->gimage->active_layer)
else if (layer == gimp_image_get_active_layer (gdisp->gimage))
{
gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE_CURSOR,
GIMP_MOVE_TOOL_CURSOR,

View File

@ -493,7 +493,7 @@ move_tool_cursor_update (GimpTool *tool,
GIMP_RECT_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_ANCHOR);
}
else if (layer == gdisp->gimage->active_layer)
else if (layer == gimp_image_get_active_layer (gdisp->gimage))
{
gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE_CURSOR,
GIMP_MOVE_TOOL_CURSOR,

View File

@ -1488,11 +1488,11 @@ undo_pop_layer (GimpImage *gimage,
else
{
/* record the active layer */
lu->prev_layer = gimage->active_layer;
lu->prev_layer = gimp_image_get_active_layer (gimage);
/* hide the current selection--for all views */
if (gimage->active_layer != NULL)
gimp_layer_invalidate_boundary ((gimage->active_layer));
if (gimp_image_get_active_layer (gimage))
gimp_layer_invalidate_boundary (gimp_image_get_active_layer (gimage));
/* if this is a floating selection, set the fs pointer */
if (gimp_layer_is_floating_sel (lu->layer))
@ -1501,8 +1501,7 @@ undo_pop_layer (GimpImage *gimage,
/* add the new layer */
gimp_container_insert (gimage->layers,
GIMP_OBJECT (lu->layer), lu->prev_position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, lu->layer);
gimage->active_layer = lu->layer;
gimp_image_set_active_layer (gimage, lu->layer);
drawable_update (GIMP_DRAWABLE (lu->layer), 0, 0,
GIMP_DRAWABLE (lu->layer)->width,
@ -1834,7 +1833,7 @@ undo_pop_channel (GimpImage *gimage,
else
{
/* record the active channel */
cu->prev_channel = gimage->active_channel;
cu->prev_channel = gimp_image_get_active_channel (gimage);
/* add the new channel */
gimp_container_insert (gimage->channels,
@ -2009,7 +2008,7 @@ undo_pop_fs_to_layer (GimpImage *gimage,
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (fsu->layer));
fsu->layer->fs.drawable = fsu->drawable;
gimage->active_layer = fsu->layer;
gimp_image_set_active_layer (gimage, fsu->layer);
gimage->floating_sel = fsu->layer;
/* restore the contents of the drawable */

View File

@ -649,7 +649,7 @@ xcf_save_layer_props (XcfInfo *info,
GImage *gimage,
GimpLayer *layer)
{
if (layer == gimage->active_layer)
if (layer == gimp_image_get_active_layer (gimage))
xcf_save_prop (info, PROP_ACTIVE_LAYER);
if (layer == gimp_image_floating_sel (gimage))
@ -679,7 +679,7 @@ xcf_save_channel_props (XcfInfo *info,
GImage *gimage,
GimpChannel *channel)
{
if (channel == gimage->active_channel)
if (channel == gimp_image_get_active_channel (gimage))
xcf_save_prop (info, PROP_ACTIVE_CHANNEL);
if (channel == gimage->selection_mask)

View File

@ -649,7 +649,7 @@ xcf_save_layer_props (XcfInfo *info,
GImage *gimage,
GimpLayer *layer)
{
if (layer == gimage->active_layer)
if (layer == gimp_image_get_active_layer (gimage))
xcf_save_prop (info, PROP_ACTIVE_LAYER);
if (layer == gimp_image_floating_sel (gimage))
@ -679,7 +679,7 @@ xcf_save_channel_props (XcfInfo *info,
GImage *gimage,
GimpChannel *channel)
{
if (channel == gimage->active_channel)
if (channel == gimp_image_get_active_channel (gimage))
xcf_save_prop (info, PROP_ACTIVE_CHANNEL);
if (channel == gimage->selection_mask)

View File

@ -22,7 +22,7 @@ gimpdatadir=@gimpdatadir@
usage()
{
cat <<EOF
Usage: gimptool [OPTION]...
Usage: gimptool-1.4 [OPTION]...
General options:
--help print this message
@ -179,7 +179,7 @@ while test $# -gt 0; do
--cflags-noui)
my_gtk_cflags=`echo $gtk_cflags | sed 's/^.*\(-I[^ ]*glib[^ ]* *-I[^ ]*\).*$/\1/'` ;;
esac
includes=-I@includedir@/gimp-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@
includes=-I@includedir@/gimp-@LT_RELEASE@
echo $includes $my_gtk_cflags
;;
--libs | --libs-nogimpui)
@ -196,9 +196,9 @@ while test $# -gt 0; do
done
case $1 in
--libs)
echo $libdirs -lgimpui -lgimpwidgets -lgimp -lgimpcolor -lgimpmath $my_gtk_libs ;;
echo $libdirs -lgimpui-@LT_RELEASE@ -lgimpwidgets-@LT_RELEASE@ -lgimp-@LT_RELEASE@ -lgimpcolor-@LT_RELEASE@ -lgimpmath-@LT_RELEASE@ $my_gtk_libs ;;
--libs-nogimpui)
echo $libdirs -lgimp -lgimpcolor -lgimpmath $my_gtk_libs ;;
echo $libdirs -lgimp-@LT_RELEASE@ -lgimpcolor-@LT_RELEASE@ -lgimpmath-@LT_RELEASE@ $my_gtk_libs ;;
esac
;;
--libs-noui)

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
gimpincludedir = $(includedir)/gimp-$(GIMP_MAJOR_VERSION).$(GIMP_MINOR_VERSION)/libgimp
gimpincludedir = $(includedir)/gimp-$(LT_RELEASE)/libgimp
AM_CPPFLAGS = \
-DGIMPDIR=\""$(gimpdir)"\" \
@ -24,7 +24,7 @@ EXTRA_DIST = \
gimp.def \
gimpui.def
lib_LTLIBRARIES = libgimp.la libgimpui.la
lib_LTLIBRARIES = libgimp-1.3.la libgimpui-1.3.la
noinst_LIBRARIES = libgimpi.a
PDB_WRAPPERS_C = \
@ -123,7 +123,7 @@ endif
../libgimp/gimpfeatures.h: gimpfeatures.h
@:
libgimp_la_SOURCES = \
libgimp_1_3_la_SOURCES = \
gimp.c \
gimp.h \
gimptypes.h \
@ -176,7 +176,7 @@ libgimp_la_SOURCES = \
stdplugins-intl.h \
libgimp-intl.h
libgimpui_la_SOURCES = \
libgimpui_1_3_la_SOURCES = \
gimpui.c \
gimpui.h \
gimpuitypes.h \
@ -231,15 +231,15 @@ gimpinclude_HEADERS = \
\
gimpmenu.h
libgimp_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE)
libgimp_la_LIBADD = $(GLIB_LIBS)
libgimp_1_3_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libgimpui_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE)
libgimpui_la_LIBADD = $(GTK_LIBS)
libgimp_1_3_la_LIBADD = $(GLIB_LIBS)
libgimpui_1_3_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libgimpui_1_3_la_LIBADD = $(GTK_LIBS)
.PHONY: files

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
libgimpcolorincludedir = $(includedir)/gimp-$(GIMP_MAJOR_VERSION).$(GIMP_MINOR_VERSION)/libgimpcolor
libgimpcolorincludedir = $(includedir)/gimp-$(LT_RELEASE)/libgimpcolor
AM_CPPFLAGS = \
-DGIMPDIR=\""$(gimpdir)"\" \
@ -22,9 +22,9 @@ EXTRA_DIST = \
makefile.msc \
gimpcolor.def
lib_LTLIBRARIES = libgimpcolor.la
lib_LTLIBRARIES = libgimpcolor-1.3.la
libgimpcolor_la_SOURCES = \
libgimpcolor_1_3_la_SOURCES = \
gimpcolor.h \
gimpcolortypes.h \
gimpcolorspace.c \
@ -41,10 +41,10 @@ libgimpcolorinclude_HEADERS = \
gimphsv.h \
gimprgb.h
libgimpcolor_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE)
libgimpcolor_la_LIBADD = $(GLIB_LIBS) -lm
libgimpcolor_1_3_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libgimpcolor_1_3_la_LIBADD = $(GLIB_LIBS) -lm
.PHONY: files

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
libgimpmathincludedir = $(includedir)/gimp-$(GIMP_MAJOR_VERSION).$(GIMP_MINOR_VERSION)/libgimpmath
libgimpmathincludedir = $(includedir)/gimp-$(LT_RELEASE)/libgimpmath
AM_CPPFLAGS = \
-DGIMPDIR=\""$(gimpdir)"\" \
@ -22,9 +22,9 @@ EXTRA_DIST = \
makefile.msc \
gimpmath.def
lib_LTLIBRARIES = libgimpmath.la
lib_LTLIBRARIES = libgimpmath-1.3.la
libgimpmath_la_SOURCES = \
libgimpmath_1_3_la_SOURCES = \
gimpmath.h \
gimpmathtypes.h \
gimpmatrix.c \
@ -38,10 +38,10 @@ libgimpmathinclude_HEADERS = \
gimpmatrix.h \
gimpvector.h
libgimpmath_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE)
libgimpmath_la_LIBADD = $(GLIB_LIBS) -lm
libgimpmath_1_3_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libgimpmath_1_3_la_LIBADD = $(GLIB_LIBS) -lm
.PHONY: files

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
libgimpwidgetsincludedir = $(includedir)/gimp-$(GIMP_MAJOR_VERSION).$(GIMP_MINOR_VERSION)/libgimpwidgets
libgimpwidgetsincludedir = $(includedir)/gimp-$(LT_RELEASE)/libgimpwidgets
AM_CPPFLAGS = \
-DGIMPDIR=\""$(gimpdir)"\" \
@ -22,9 +22,9 @@ EXTRA_DIST = \
makefile.msc \
gimpwidgets.def
lib_LTLIBRARIES = libgimpwidgets.la
lib_LTLIBRARIES = libgimpwidgets-1.3.la
libgimpwidgets_la_SOURCES = \
libgimpwidgets_1_3_la_SOURCES = \
gimpwidgets.c \
gimpwidgets.h \
gimpwidgetstypes.h \
@ -66,10 +66,10 @@ libgimpwidgetsinclude_HEADERS = \
gimpsizeentry.h \
gimpunitmenu.h
libgimpwidgets_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE)
libgimpwidgets_la_LIBADD = $(GLIB_LIBS) -lm
libgimpwidgets_1_3_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libgimpwidgets_1_3_la_LIBADD = $(GLIB_LIBS) -lm
.PHONY: files

View File

@ -26,11 +26,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -38,13 +38,13 @@ AM_CPPFLAGS = \
-DLOCALEDIR=\""$(localedir)"\"
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(top_builddir)/libgimpmath/libgimpmath.la \
$(top_builddir)/plug-ins/libgck/gck/libgck.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(top_builddir)/libgimpmath/libgimpmath-$(LT_RELEASE).la \
$(top_builddir)/plug-ins/libgck/gck/libgck-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -37,13 +37,13 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(top_builddir)/libgimpmath/libgimpmath.la \
$(top_builddir)/plug-ins/libgck/gck/libgck.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(top_builddir)/libgimpmath/libgimpmath-$(LT_RELEASE).la \
$(top_builddir)/plug-ins/libgck/gck/libgck-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
AM_CPPFLAGS = \

View File

@ -19,11 +19,11 @@ AM_CPPFLAGS = \
-DLOCALEDIR=\""$(localedir)"\"
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

File diff suppressed because it is too large Load Diff

View File

@ -79,21 +79,21 @@ EOT
foreach (sort keys %plugins) {
my $libgimp = "";
$libgimp .= "\$(top_builddir)/libgimp/libgimp.la";
$libgimp .= "\$(top_builddir)/libgimp/libgimp-\$(LT_RELEASE).la";
if (exists $plugins{$_}->{ui}) {
$libgimp .= "\t\t\t\\\n\t$libgimp";
$libgimp =~ s/gimp\./gimpui./;
$libgimp .= "\t\t\\\n\t$libgimp";
$libgimp =~ s/gimp-/gimpui-/;
$libgimp .= "\t\t\t\\\n\t\$(top_builddir)/libgimpwidgets/libgimpwidgets.la";
$libgimp .= "\t\\\n\t\$(top_builddir)/libgimpcolor/libgimpcolor.la";
$libgimp .= "\t\t\\\n\t\$(top_builddir)/libgimpwidgets/libgimpwidgets-\$(LT_RELEASE).la";
$libgimp .= "\t\\\n\t\$(top_builddir)/libgimpcolor/libgimpcolor-\$(LT_RELEASE).la";
} else {
$libgimp .= "\t\t\t\\\n\t\$(top_builddir)/libgimpcolor/libgimpcolor.la";
$libgimp .= "\t\t\\\n\t\$(top_builddir)/libgimpcolor/libgimpcolor-\$(LT_RELEASE).la";
}
my $optlib = "";
if (exists $plugins{$_}->{optional}) {
my $name = exists $plugins{$_}->{libopt} ? $plugins{$_}->{libopt} : $_;
$optlib = "\n\t\$(LIB\U$name\E)\t\t\t\t\t\t\\";
$optlib = "\n\t\$(LIB\U$name\E)\t\t\t\t\t\t\t\\";
}
if (exists $plugins{$_}->{libsupp}) {
@ -109,8 +109,8 @@ ${_}_SOURCES = \\
$_.c
${_}_LDADD = \\
$libgimp \\$optlib
\$(\U$plugins{$_}->{libdep}\E_LIBS) \\
$libgimp \\$optlib
\$(\U$plugins{$_}->{libdep}\E_LIBS) \\
\$(INTLLIBS)
EOT

View File

@ -20,11 +20,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -19,9 +19,9 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GLIB_LIBS) \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GLIB_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -15,11 +15,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
AM_CPPFLAGS = \

View File

@ -23,12 +23,12 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(LIBUCB) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(LIBUCB) \
$(INTLLIBS)
.PHONY: files

View File

@ -20,11 +20,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -209,20 +209,20 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
gap_decode_mpeg_LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(LIBMPEG) \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(LIBMPEG) \
$(GTK_LIBS) \
$(INTLLIBS)
files:

View File

@ -52,11 +52,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
AM_CPPFLAGS = \

View File

@ -21,11 +21,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -22,11 +22,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -15,11 +15,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
AM_CPPFLAGS = \

View File

@ -40,11 +40,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -18,12 +18,12 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(GTKXMHTML_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(GTKXMHTML_LIBS) \
$(INTLLIBS)
AM_CPPFLAGS = \

View File

@ -18,11 +18,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
AM_CPPFLAGS = \

View File

@ -172,11 +172,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
AM_CPPFLAGS = \

View File

@ -1,17 +1,17 @@
## Process this file with automake to produce Makefile.in
gckincludedir = $(includedir)/gck
gckincludedir = $(includedir)/gimp-$(LT_RELEASE)/gck
lib_LTLIBRARIES = libgck.la
lib_LTLIBRARIES = libgck-1.3.la
libgck_la_SOURCES = \
libgck_1_3_la_SOURCES = \
gckcolor.c
gckinclude_HEADERS = \
gck.h
libgck_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE)
libgck_1_3_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
INCLUDES = \
-I.. \
@ -20,7 +20,7 @@ INCLUDES = \
$(GTK_CFLAGS) \
-I$(includedir)
libgck_la_LIBADD = \
libgck_1_3_la_LIBADD = \
$(GTK_LIBS)
.PHONY: files

View File

@ -20,11 +20,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -17,11 +17,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -24,12 +24,12 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(top_builddir)/libgimpmath/libgimpmath.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(top_builddir)/libgimpmath/libgimpmath-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -8,20 +8,20 @@ plugin_helper_SOURCES = \
plugin-helper.c
AM_CPPFLAGS = \
-DLOCALEDIR=\""$(localedir)"\"
-DLOCALEDIR=\""$(localedir)"\"
INCLUDES = \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(INTLLIBS)
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -47,11 +47,11 @@ AM_CPPFLAGS = \
-DRELEASE_DATE=\"$(GIMP_PRINT_RELEASE_DATE)\"
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
escputil_LDADD =

View File

@ -31,11 +31,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -38,12 +38,12 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/plug-ins/dbbrowser/dbbrowser_utils.o \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/plug-ins/dbbrowser/dbbrowser_utils.o \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
AM_CPPFLAGS = \

View File

@ -38,11 +38,11 @@ AM_CPPFLAGS = \
-DLOCALEDIR=\""$(localedir)"\"
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -18,11 +18,11 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
.PHONY: files

View File

@ -20,12 +20,12 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(LIBXMU) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(LIBXMU) \
$(INTLLIBS)
EXTRA_DIST = $(scriptdata_DATA)

View File

@ -19,12 +19,12 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimpwidgets/libgimpwidgets.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/libgimpcolor/libgimpcolor.la \
$(GTK_LIBS) \
$(LIBJPEG) \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(LIBJPEG) \
$(INTLLIBS)
AM_CPPFLAGS = \