2001-01-29 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/gimpdrawablepreview.[ch]: new file with one set of functions...
* app/channel.[ch]
* app/layer.[ch]: ...instead of having everything duplicated three
times here.
* app/channels_dialog.c
* app/floating_sel.c
* app/floating_sel.h
* app/gimpdnd.c
* app/gimpimage.c
* app/layer_select.c
* app/layers_dialog.c
* app/selection.c
* app/pdb/drawable_cmds.c
* tools/pdbgen/pdb/drawable.pdb: changed accordingly, cleanup.
2001-01-29 Michael Natterer <mitch@gimp.org>
* app/apptypes.h: removed the "Layer" typedef.
* app/layer.[ch]: removed the defines of the old function names.
Don't implement methods of the parent class (get_name, get_tattoo, ...)
but define them as macros. They will go to a separate "pdb_glue.h"
header because they are used only by the PDB to simplify code
generation (no application file should say gimp_layer_get_tattoo()
but always gimp_drawable_get_tatoo()).
* app/channel.h
* app/channel_ops.c
* app/channels_dialog.c
* app/commands.c
* app/convert.c
* app/disp_callbacks.c
* app/floating_sel.[ch]
* app/gdisplay.c
* app/gimage.c
* app/gimage_mask.c
* app/gimage_mask.h
* app/gimpdnd.c
* app/gimpdrawable.h
* app/gimpimage.[ch]
* app/gimplayermask.h
* app/global_edit.c
* app/image_new.c
* app/layer_select.c
* app/layers_dialog.c
* app/resize.c
* app/undo.c
* app/xcf.[ch]
* app/pdb/drawable_cmds.c
* app/pdb/floating_sel_cmds.c
* app/pdb/image_cmds.c
* app/pdb/layer_cmds.c
* app/tools/bucket_fill.c
* app/tools/by_color_select.c
* app/tools/clone.c
* app/tools/crop.c
* app/tools/edit_selection.c
* app/tools/ink.c
* app/tools/move.c
* app/tools/paint_core.c
* app/tools/rect_select.c
* app/tools/text_tool.c
* app/tools/transform_core.c
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb: changed accordingly, cleanup.
2001-01-28 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/gimplayermask.[ch]: new files cut out of layer.[ch]. Renamed
all functions to gimp_layes_mask_*(). removed artefacts like
the ref/unref functions.
* app/apptypes.h: removed the "LayerMask" typedef.
* app/layer.[ch]: removed the layer mask stuff and renamed all
functions to gimp_layer_*(). Added temporary typedefs for the old
function names. The layer mask preview stuff is still there (should
probably go to new layer_preview.{ch] files).
* app/gimpimage.[ch]: added
gimp_image_invalidate_[layer|channel]_previews() formerly known as
[layer|channel]_invalidate_previews().
* app/channel.[ch]: moved channel_layer_alpha() and
channel_layer_mask() here because they are methods of the Channel.
* app/channel_ops.c
* app/convert.c
* app/disp_callbacks.c
* app/fileops.c
* app/floating_sel.c
* app/gimage.c
* app/gimage_mask.c
* app/gimpdnd.c
* app/global_edit.c
* app/layers_dialog.c
* app/preferences_dialog.c
* app/toolbox.c
* app/undo.c
* app/xcf.c
* app/pdb/drawable_cmds.c
* app/pdb/image_cmds.c
* app/pdb/layer_cmds.c
* app/tools/crop.c
* app/tools/text_tool.c
* app/tools/transform_core.c
* tools/pdbgen/pdb.pl
* tools/pdbgen/pdb/drawable.pdb: changed accordingly, cleanup.
2001-01-15 Michael Natterer <mitch@gimp.org>
* app/channel.[ch]
* app/gimpimage.[ch]
* app/layer.[ch]: use GimpRGB for the Channel's, the QuickMask's
and the LayerMask's color.
* app/channel_cmds.c
* app/channel_ops.c
* app/channels_dialog.c
* app/qmask.c
* app/xcf.c
* tools/pdbgen/pdb/channel.pdb: changed accordingly.
2001-01-14 Michael Natterer <mitch@gimp.org>
* app/channel.[ch]
* app/gimpdrawable.[ch]
* app/layer.[ch]: moved the "removed" signal from GimpChannel and
GimpLayer to GimpDrawable.
* app/gimpimage.[ch]: changed accordingly.
2001-01-14 Michael Natterer <mitch@gimp.org>
* app/docindex.c
* app/fileops.c
* app/gdisplay.c
* app/gimpimage.[ch]:
Removed the "has_filename" boolean from GimpImage:
- to get the filename, ask for GimpObjects's name.
- gimp_image_filename() returns the *display* filename (and will be
renamed to gimp_image_display_name() soon), i.e. returns
"Unnamed" if object->name == NULL.
- no need any more to check if the filename is the "" string because
GimpImage overrides GimpObject's "name_changed" method and
sets the name to NULL if it was "".
2000-12-29 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/channel_pvt.h
* app/drawable_pvt.h
* app/gdisplayF.h
* app/gimpdrawableP.h
* app/gimpimageP.h
* app/layer_pvt.h
* app/toolsF.h: removed these files.
* app/apptypes.h
* tools/pdbgen/enums.pl: added tons of opaque typedefs and enums.
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/display.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/tools.pdb
* app/*: chainsaw #include cleanup:
- Never (never!!) include stuff in header files except where we
need access to structures' contents (like derived objects).
- Added prototypes and proper formating in many files.
- The #include order in *all* *.c files is as follows:
#include "config.h"
#include <system stuff>
#include <gtk/gtk.h>
#include "apptypes.h"
#include "gimp stuff"
#include "libgimp stuff"
#include "libgimp/gimpintl.h"
By following this scheme we can easily see a file's dependencies
from it's #include's and can grep for the inclusion to find out
where a file is used.
* tools/pdbgen/app.pl: changed to follow the include scheme above.
* libgimp/Makefile.am
* libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h
and from app/apptypes.h.
* libgimp/gimpcolorbutton.[ch]
* libgimp/gimpdialog.[ch]
* libgimp/gimphelpui.[ch]
* libgimp/gimpparasite.[ch]
* libgimp/gimppatheditor.[ch]
* libgimp/gimpprotocol.c
* libgimp/gimpquerybox.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimptypes.h
* libgimp/gimpui.h
* libgimp/gimpunit.h
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: changed accordingly.
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/gdyntext/message_window.c
* plug-ins/imagemap/imap_default_dialog.c
* plug-ins/imagemap/imap_file.c: these files used to include
"libgimp/gimpui.h" without including "libgimp/gimp.h". This is
no longer possible because the libgimpui headers don't inlcude
"libgimp/gimpunit.h" any more.
2000-12-28 Michael Natterer <mitch@gimp.org>
* app/channel.[ch]
* app/drawable.h
* app/gimpdrawable.[ch]
* app/gimpdrawableP.h
* app/gimpimage.[ch]
* app/gimpimageP.h
* app/layer.[ch]
* app/layer_pvt.h: started a major cleanup of all image/drawable
files. Added tons of "const GimpImage *" declarations and properly
formated the headers.
* app/bezier_select.c
* app/channels_dialog.c
* app/crop.c
* app/fileops.[ch]
* app/fuzzy_select.c
* app/gdisplay.c
* app/layers_dialog.c
* app/move.c
* app/paint_funcs.[ch]
* app/qmask.c
* app/undo.c: changed accordingly plus the usual portion of coding
style paranoia. This is not finished but Sven promised to buy me
a beer if I commit now ;)
2000-12-27 Michael Natterer <mitch@gimp.org>
* app/gimpimage.c: gimp_image_merge_layers(): apply the layer mask
only if layer->apply_mask is TRUE, cleanup.
2000-12-27 Michael Natterer <mitch@gimp.org>
* app/gimage.h
* app/gimpimage.[ch]: implemented gimp_image_get_layer_by_index(),
small cleanups.
* app/commands.c
* app/layers_dialog.c: use the new function instead of accessing
the layer list directly.
2000-12-18 Sven Neumann <sven@gimp.org>
Jens Lautenbacher <jtl@gimp.org>
* app/Makefile.am
* app/gimpbrushlistP.h
* app/gimpbrushpipeP.h
* app/gimpobjectP.h: removed these three files
* app/parasitelistP.h
* app/channels_dialog.c
* app/docindex.c
* app/gimpdrawable.c
* app/gimpdrawableP.h
* app/gimpimage.c
* app/gimpimageP.h
* app/gimplist.[ch]
* app/gimpobject.c
* app/gimpobject.h
* app/gimpsetP.h: changed according to header removal
* app/airbrush.c
* app/brush_select.[ch]
* app/brushes_cmds.c
* app/gimpbrush.[ch]
* app/gimpbrushgenerated.[ch]
* app/gimpbrushlist.[ch]
* app/gimpbrushpipe.[ch]
* app/gimpcontextpreview.c
* app/paint_core.c
* app/paintbrush.c
* app/pencil.c
* tools/pdbgen/pdb/brushes.pdb: Big Brushes Cleanup.
The GimpBrush* object hierarchy and the file formats were broken by
"design". This made it overly difficult to read and write pixmap
brushes and brush pipes, leading to the situation that The GIMP was
not able to read it's very own file formats. Since the GimpBrush
format did support arbitrary color depths, the introduction of a
file format for pixmap brushes was unnecessary.
The GimpBrushPixmap object is dead. GimpBrush has an additional
pixmap temp_buf and handles pixmap brushes transparently. The file
format of pixmap brushes is not any longer a grayscale brush plus
a pattern, but a simple brush with RGBA data. The old brushes can
still be loaded, but the .gpb format is deprecated.
GimpBrushPipe derives from GimpBrush. The fileformat is still a text
header, followed by a number of brushes, but those brushes are stored
in the new GimpBrush format (no pattern anymore). The pipe does not
care about the depth of the contained GimpBrushes, so we get
grayscale BrushPipes for free. Since the brush loader still loads the
old format, old .gih files can also still be loaded.
Since the brushes in the GimpBrushPipe do not any longer contain a
pointer to the pipe object, we do only temporarily switch brushes
in the paint_core routines. This is not very elegant, but the best
we can do without a major redesign.
* app/patterns.[ch]: changed the loader to work with a filedescriptor
instead of a filehandle to make it work with the new brush loading
code.
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl
* plug-ins/common/gih.c: new plug-in that saves GIH files in the
new format (loader will follow soon)
* plug-ins/common/gpb.c: removed since Pixmap Brushes are no longer
supported as a special file format.
* plug-ins/common/gbr.c: load and save brushes in the new brush format
which allows RGBA brushes too.
* plug-ins/common/pat.c: load and save grayscale patterns too
2000-12-15 Sven Neumann <sven@gimp.org>
* app/gimppreviewcache.[ch]: added new function gimp_preview_scale().
* app/channel.c
* app/channels_dialog.c
* app/gimpimage.c
* app/layer.c
* app/layers_dialog.c
* app/lc_dialog.c
* app/nav_window.c: unified preview drawing code. Previews are never
generated larger than the canvas size. Image and channel previews are
scaled up to the desired size, so does the navigation window. The
layer previews are not yet scaled up again since we can not use
gimp_preview_scale here. I have removed the preview_cache priming
code since we don't need it any longer and it caused bad results.
2000-12-14 Sven Neumann <sven@gimp.org>
* app/layers_dialog.c
* app/lc_dialog.c
* app/nav_window.c: another try on bug #31098. This time limited the
preview scale ratio in the calling functions. Please test!
* app/gimpimage.c: small cleanup
2000-12-14 Sven Neumann <sven@gimp.org>
* app/gimpimage.c
* app/layer.c
* app/layers_dialog.c
* app/nav_window.c: cleaned up these files while trying to find a
fix for #31098. No real changes, the bug is still present :-(
Mon Dec 11 22:52:43 GMT 2000 Andy Thomas <alt@gimp.org>
* app/gimpimage.c
* app/layers_dialog.c
Backed out some changes that caused problems with the Nav preview
and small sized images.
2000-12-11 Sven Neumann <sven@gimp.org>
* app/edit_selection.c
* app/gimpimage.c
* app/layer_select.c
* app/layers_dialog.c: when computing a preview, limit the scale ratio
to a maximum of 1.0. By doing so we avoid to scale drawables up if the
image (canvas) size becomes larger than the drawable. Fixes bug #31098.
* app/gimppreviewcache.[ch]: indented
2000-12-03 Sven Neumann <sven@gimp.org>
* app/gimpimage.c: do not set the layer mode of the bottom layer to
NORMAL_MODE if it is DISSOLVE_MODE since the latter does not work
on the projection with the lower layer but on the layers alpha
channel. Fixes bug #7829.
2000-08-23 Sven Neumann <sven@gimp.org>
* app/fileops.c: make the file_save dialog sensitive again if the
user clicked "No" when asked if he wishes to overwrite a file.
* app/gimpimage.c: when saving an undoable parasite, just do it
without calling undo_push_cantundo(). Undoable parasites are used
by many save plug-ins to attach a comment, but this operation
shouldn't prevent the user from using the undo_stack afterwards.
The JPEG plug-in has an additional bug that I couldn't solve, so
undoing after a Save As JPEG is still impossible.
* app/undo_history.c: lame attempt to draw the clean symbol at the
correct undo step. Not perfect but much better as before...
* app/layers_dialog.c: Disable the "Add Layermask" menuentry
for indexed images.
* app/gimpimage.c: Leave gimp_image_add_layer_mask(...) after
spitting out messages when trying to add a layermask to an
indexed image.
-Yosh
* app/gimpimage.c
--Fixed Fujita Yuji's bug (reported 27May2000 to
gimp-developer) -larger than 64x64 brush and
selection mask crashes smudge/dodgeburn/convolve
This was a rowstrides bug in gimp_image_replace_image.
2000-04-26 Michael Natterer <mitch@gimp.org>
* app/color_select.c
* app/colormaps.[ch]
* app/context_manager.c: removed unused global variables
[foreground|background]_pixel and [old|new]_color_pixel.
Initialize the colormap and visual stuff with GdkRGB instead of
GtkPreview functions (which are deprecated).
* app/[62 files]: removed #include's (started with colormaps.h and
couldn't stop). Also ordered them consistently and did some small
unrelated cleanups.
Removed variuos <stdlib.h> et.al. but checked the files carefully
before doing so. If I was too radical and you get warnings on your
platform, please flame me or just put them back :)
2000-04-03 Michael Natterer <mitch@gimp.org>
* app/gimpdnd.[ch]
* app/channels_dialog.c
* app/layers_dialog.c: removed the GdkGC parameter from
gimp_dnd_set_drawable_preview_icon() since it's no longer used.
* app/gimpimage.c: dirty the view correctly after applying the
layer mask. Don't gdisplays_flush() because it's the job of the
caller.
* app/layers_dialog.c: when applying a layer mask, flush either
the display or just the layer_widget, depending on the previous
visibility state of the mask. Cleanups.
* plug-ins/print/gimp_color_window.c
* plug-ins/print/gimp_main_window.c: including config.h re-enables
i18n.
* app/gimpdrawable.c: gimp_drawable_get_color_at() now silently
returns NULL again if the coordinates are out of range. A lot of
code using this function relies on this feature and correctly
checks the return value. No need to emit critical warnings here.
The GTK_CHECK_TYPE macro test for obj != NULL, no need to do this
check twice. Removed lots of unnecessary calls to g_return_if_fail().
* app/color_picker.c: with the old behaviour of
gimp_drawable_get_color_at() the code is a bit simpler.
* app/fuzzy_select.c: fuzzy_select relied on drawable_offsets()
returning off_x = off_y = 0 if drawable == NULL. Decided to change
this here, fixes bug #7077.
* app/gimpimage.[ch]: Even though we made bad experiences with the
changes in gimpdrawable.c, I have introduced similar argument checks
here.
* app/image_map.c: indentation
--Sven
2000-02-26 Garry R. Osgood <gosgood@idt.net>
* app/commands.c
* app/gimpimage.c
* app/layer.c
* app/layer.h
* app/resize.c
* app/resize.h
Aliasing artifacts that changed relative positions
of layers under scaling, giving rise to #5271, are
minimized by a new layer.c function,
layer_scale_by_factors(). Closes#5271. See
http://idt.net/~gosgood/gimp-patch/patch07.html for
further detail. See also usage documentation for
layer_scale() and layer_scale_by_factors() in
layer.c.
Provided logic for the Scale Image dialog box to
pre-check an image's layers for the possibility that
a particular scaling, s: 0 < s < 1, reduces a layer
dimension to zero. Should this case prevail, a
boolean dialog box warns the user of the
possibility. The user may (1) Cancel, returning
focus to Scale Image and the possibility of
corrective adjustment, or (2) OK the scaling. The
layers that will vanish upon the new scaling are
culled from the GimpImage::layers list first.
paths.c and did a general namespace cleanup:
s/PATHP/Path*/ s/PATHIMAGELISTP/PathList/ and friends.
Paths are now copied on image duplicate (fixes bug #5726).
Removed Path Tool and XInput Airbrush from the build and
renamed "Layers & Channels" to "Layers, Channels & Paths".
Applied patch from Wolfgang Hofer to xjt.c that enables loading
and saving of paths based on Andy's change explained below.
--Sven
Tue Feb 15 23:27:42 GMT 2000 Andy Thomas <alt@gimp.org>
* gimp/app/gimpdrawable.c
* gimp/app/channel.c
* gimp/app/layer.c
* gimp/app/channel.h
* gimp/app/layer.h
* gimp/app/gimpimage.c
* gimp/app/gimpimage.h
* gimp/app/gimpdrawable.h
* gimp/tools/pdbgen/pdb/paths.pdb
* gimp/tools/pdbgen/pdb/layer.pdb
* gimp/tools/pdbgen/pdb/channel.pdb
* gimp/tools/pdbgen/pdb/gimage.pdb
* gimp/app/channel_cmds.c
* gimp/app/gimage_cmds.c
* gimp/app/internal_procs.c
* gimp/app/layer_cmds.c
* gimp/app/paths_cmds.c
New gimp_*_set_tattoo procedures. This allows save/load plugins
to save/restore tattoo states of layers, channels and paths. Note the
internal tattoo state can also be set, however rigorous checks are
performed to make sure that the internal tattoo states of layer,
channels and paths are consistent and that the new state value is
newval > MAX(MAX(layertattoo),MAX(channeltattoo),MAX(pathtattoo)).
2000-02-07 Michael Natterer <mitch@gimp.org>
* app/*
* libgimp/*
* plug-ins/*
* tools/pdbgen/*: did a global s/GUnit/GimpUnit/ and
s/GimpSizeEntryUP/GimpSizeEntryUpdatePolicy/
* libgimp/gimpcolorspace.c: renamed the parameter names to match
the names in the header.
* libgimp/gimphelpui.h
* libgimp/gimpimage.c
* libgimp/gimpmatrix.h
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpunit.[ch]
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: added documentation and use g* types
all over the place (enables cross-referencing with the glib and
gtk+ html documentation).
* plug-ins/common/exchange.c
* plug-ins/common/max_rgb.c: small cleanups.
* plug-ins/common/mapcolor.c: the color buttons were attached in
the wrong order.