2001-05-15 Michael Natterer <mitch@gimp.org>
* configure.in: new directory app/base/
* app/Makefile.am
* app/boundary.[ch]
* app/brush_scale.[ch]
* app/gimpchecks.h
* app/gimplut.[ch]
* app/pixel_processor.[ch]
* app/pixel_region.[ch]
* app/pixel_surround.[ch]
* app/temp_buf.[ch]
* app/tile.[ch]
* app/tile_cache.[ch]
* app/tile_manager.[ch]
* app/tile_manager_pvt.h
* app/tile_pvt.h
* app/tile_swap.[ch]: moved to base/
* app/base/Makefile.am
* app/base/base-types.h
* app/base/*: new directory for the sub-object pixel maniplation
and storage stuff. Does not include Gtk+ or anything outside
base/. Did some cleanup in all files.
* app/appenums.h
* app/apptypes.h
* app/core/gimpimage.h: removed types which are now in
base/base-types.h.
* app/base/base-config.[ch]
* app/gimprc.[ch]: put the config variables for base/ to their own
file so base/ doesn not have to include gimprc.h (does not yet
work, i.e. the variables are un-configurable right now)
* app/main.c: set a log handler for "Gimp-Base".
* app/paint-funcs/Makefile.am
* app/paint-funcs/paint-funcs.[ch]: removed the color hash which
maps RGB to color indices because it's a totally standalone system
which has nothing to do with the paint-funcs and introduced a
GimpImage dependency.
paint-funcs/ should be considered on the same sub-object
(glib-only) level as base/, only in a different directory.
* app/core/Makefile.am
* app/core/gimpimage-colorhash.[ch]: put the color hash here.
* app/gimage.c: don't invalidate the color hash here...
* app/core/gimpimage.c: ... but in the colormap_changed() default
inplementation. Initialize the hash in class_init().
* tools/pdbgen/Makefile.am: scan app/base/base-types.h for enums.
* tools/pdbgen/enums.pl: regenerated.
* app/[lots]
* app/core/[of]
* app/gui/[files]
* app/pdb/[all]
* app/tools/[over]
* app/widgets/[the]
* tools/pdbgen/pdb/[place]: changed #includes accordingly. And use
base_config->value instead of the stuff from gimprc.h.
2001-05-07 Michael Natterer <mitch@gimp.org>
* app/gimpimage.[hc]: new signal "floating_selection_changed",
removed ancient declaration of _GimpImageRepaintArg.
* app/floating_sel.c
* app/undo.c: emit "floating_selection_changed" where approptiate.
* app/gimage_mask.c: s/"Floated Layer"/"Floating Selection"/
because we view this layer directly now (not some thing with an
"L" icon).
* app/gui/layers-commands.c: don't use confusing boolean variables
which indicate that something is not true (reversed their logic).
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpchannellistitem.[ch]: new widget. Does nothing yet.
* app/widgets/gimpchannellistview.c: set the button box
insensitive when there is a floating selection.
* app/widgets/gimpdrawablelistitem.c: made channel DND work again.
Very ugly btw.
* app/widgets/gimpdrawablelistview.c: connect to
"floating_selection_changed". Fake a change of the active drawable
so the button boxes get updated correctly.
* app/widgets/gimplayerlistview.c: set the sensitivity of the
buttons correctly.
* app/widgets/gimplistitem.c: create GimpChannelListItems for
channels. Some very ugly code to work around broken
GTK_STATE_INSENSITIVE propagation in list items.
2001-05-06 Michael Natterer <mitch@gimp.org>
* app/gimpimage.[ch]: renamed "restructure" to "alpha_changed" and
only emit it in flatten(), not in merge_layers().
* app/gimage.c
* app/gimplayer.c: changed accordingly.
* app/widgets/gimpcontainerlistview.c: set both scrollbar policies
to automatic.
2001-05-06 Michael Natterer <mitch@gimp.org>
* app/gimpimage.[ch]: renamed the "resize" signal to "size_changed".
* app/gimage.c: changed accordingly.
* app/undo.c: renamed the "shrink_wrap" to "size_changed", call
gimp_image_size_changed() and let the handlers do the work.
* app/widgets/gimplistitem.[ch]: added a virtual set_preview_size()
method and a default implementation.
* app/widgets/gimplayerlistitem.c: added an inplementation of
set_preview_size() which set's the size of the mask preview.
* app/widgets/gimpchannellistview.c: implement set_preview_size()
and set the size of the component previews.
* app/widgets/gimpcontainerlistview.c: call
gimp_list_item_set_preview_size() instead of resizing the preview
manually.
* app/widgets/gimpcontainerview.c: emit "set_preview_size" even if
the size has not changed so we can use it to re-calculate the
preview size on image size change.
* app/widgets/gimpdrawablelistview.c: connect to the image's
"size_changed" signal and trigger preview size re-calculation in
the callback.
2001-05-06 Michael Natterer <mitch@gimp.org>
* app/appenums.h: added GimpDropMode...
* app/gimpdnd.h: ...removed from here.
* app/gimpimage.[ch]:
- New signal "mode_changed".
- removed "const GimpImage*" from gimp_image_colormap_changed()
because a signal emission is never "const" for the object
which emits the signal.
- Fixed gimp_image_[set|get]_component_[active|visible]():
ALPHA_CHANNEL maps to ALPHA_PIX only in RGB mode, use
ALPHA_G_PIX/ALPHA_I_PIX in GRAY/INDEXED mode.
* app/gimpimage-convert.c
* app/undo.c: call gimp_image_mode_changed().
* app/gimpviewable.c: added an implementation of
"invalidate_preview" which frees the preview temp_buf which may be
attached to the viewable. Subclasses need to chain up now.
* app/gimpdrawable.c
* app/gimpimage.c: chain up in invalidate_preview().
* app/widgets/gimpchannellistview.c: connect to the image's
"mode_changed" signal and rebuild the channel list in the
callback.
* app/widgets/gimpcontainerview.h: indentation.
* app/widgets/gimpdockbook.c: set the dockable's context to NULL
in gimp_dockbook_remove()
* app/widgets/gimpimagedock.c: forgot to actually set the dock's
image in gimp_image_dock_new().
* app/gui/dialogs-constructors.c: added a get_name_func() for tool
views which returns the tool's "blurb". It's safe to assume now
that a dockable's context will exist as long as the dockable
exists unless it's explicitely set to NULL, so remove ugly hacks
handling context destruction.
* app/tools/gimptool.c: removed COMPAT_CRUFT and useless #include's.
2001-05-03 Michael Natterer <mitch@gimp.org>
* app/app_procs.c: don't #include "gui/color-select.h"
* app/disp_callbacks.[ch]: renamed gdisplay_drop_viewable() to
gdisplay_drop_pattern().
* app/gimpimage.[ch]: added new signals
"component_visibility_changed" and "component_active_changed" and
emit them in the resp. accessors.
* app/interface.c: removed old GimpPreview test code.
* app/widgets/Makefile.am
* app/apptypes.h
* app/widgets/gimpchannellistview.[ch]
* app/widgets/gimpcomponentlistitem.[ch]: new (unfinished) widgets.
* app/widgets/gimpdockbook.c: switch to the right-clicked notebook
page before showing the menu.
* app/widgets/gimpdrawablelistitem.[ch]: removed the protected
functions which make the toggle buttons look nicer...
* app/widgets/gimplistitem.[ch]: ...and added them here.
* app/widgets/gimpdrawablelistview.[ch]: virtualized set_image()
so subclasses can properly (dis)connect on image change.
* app/widgets/gimpdrawablepreview.c
* app/widgets/gimpimagepreview.[ch]: removed the calc_size()
functions which calculate the preview's aspect ratio...
* app/widgets/gimppreview.[ch]: ...and added then here as
protected functions.
* app/widgets/gimplayerlistitem.c: flush displays after changing
the layer mask's "apply" or "show" state.
2001-04-13 Michael Natterer <mitch@gimp.org>
* app/pdb/procedural_db.[ch]: removed the ID system from the pdb/
subdir...
* app/gimpimage.[ch]: ...and temporarily added it back to GimpImage.
The ID stuff is not only used by the PDB but is a more general
type of service which is needed for the PDB, DND and some parts of
the GUI. Finally, a GimpFactory class with subclasses for data
objects, images etc. will maintain the ID spaces.
* app/colormap_dialog.c
* app/file-open.c
* app/file-save.c
* app/gdisplay.c
* app/gimpdnd.c
* app/gimpdrawable.c
* app/info_window.c
* app/lc_dialog.c
* app/nav_window.c
* app/palette_import.c
* app/paths_dialog.c
* app/plug_in.c
* app/xcf.c
* app/tools/gimptexttool.c
* tools/pdbgen/pdb.pl
* tools/pdbgen/pdb/image.pdb: use GimpImage's ID functions.
* app/pdb/channel_cmds.c
* app/pdb/channel_ops_cmds.c
* app/pdb/convert_cmds.c
* app/pdb/display_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/fileops_cmds.c
* app/pdb/guides_cmds.c
* app/pdb/image_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/parasite_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/text_tool_cmds.c
* app/pdb/tools_cmds.c
* app/pdb/undo_cmds.c: regenerated.
2001-03-12 Michael Natterer <mitch@gimp.org>
* pixmaps/Makefile.am
* pixmaps/edit.xpm: new pixmap. "Someone" needs to go over the
pixmaps one day ;)
* app/gimpdatafactoryview.c
* app/gimpdrawablelistview.c: use the new icon.
* app/floating_sel.c: stupid: the new gimp_layer_get_opacity()
accessor speaks in normalized [0.0..1.0] values, so the
floating selection was invisible after blindly using it.
* app/gimpimage.c: more stupid: a totally useless sanity clamping
made the composite preview ugly. Fixed.
* app/tools/tool_manager.c: why the heck did this never crash before:
don't dereference a NULL GDisplay pointer.
2001-03-11 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/apptypes.h
* app/gimplayerlistview.[ch]: new subclass of GimpDrawableListView
(the upcoming replacement of the layers dialog). Connects to the
new GimpLayer signals using the layer container as signal proxy
(see below).
* app/gimpcontainerview.[ch]: made "set_container" a virtual
function. This is needed by the GimpLayerListView to
connect/disconnect signals. Subclasses implementing this method
MUST obey the following order of instructions:
1. disconnect from signals related to GimpContainerView->container
2. chain up (!!!)
3. connect to signals related to GimpContainerView->container
And yes, I will add DocBook files for all those new objects :)
* app/gimppreview.[ch]: made "border_color" a GimpRGB instead of
guchar[3]. Added gimp_preview_set_border_color().
* app/gimpcontainergridview.c
* app/gimplayerlistitem.c: use gimp_preview_set_border_color().
* app/gimpcontainerlistview.c
* app/gimpdrawablelistview.c: cleanup.
* app/gimpdrawablelistitem.c: we can safely asume that our parent
widget is a GimpDrawableListView and use it's "reorder_drawable"
function pointer (after checking that it's there).
* app/gimplistitem.c: connect the correct DND type when changing
the container of a list item with "reorderable" enabled.
* app/gimplayer.[ch]: added accessors and "*_changed" signals for
layer->mode, layer->opacity and layer->preserve_trans.
* app/disp_callbacks.c: fixed a FIXME: use the correct bucket fill
tool context again.
* app/tools/paint_options.[ch]: paint_mode_menu_new(): added a
boolean which toggles the "Behind" item on/off to the same
constructor can be used for all paint mode menus.
* app/tools/gimptoolinfo.c: rect. select is the standard tool again.
* app/brush_select.c
* app/floating_sel.c
* app/gimpimage.c
* app/layers_dialog.c
* app/pdb/layer_cmds.c
* app/tools/gimpeditselectiontool.c
* tools/pdbgen/pdb/layer.pdb: use the new layer accessors and the
paint_mode_menu constructor.
* app/commands.c
* app/gdisplay.c
* app/menus.c
* app/undo.c
* app/tools/gimppainttool.c
* app/tools/gimptool.c
* app/tools/paint_options.c
* app/tools/tool_manager.c: put the #warning's back inside
#ifdef __GNUC__
2001-03-06 Michael Natterer <mitch@gimp.org>
* app/gimage.[ch]: removed the layer mask functions.
* app/gimpchannel.[ch]: added a boolean "dummy" parameter to
gimp_channel_copy() so it has the same signature as
gimp_layer_copy() and can be used by the GimpDrawableListView to
generically duplicate drawables.
* app/gimpcontainerview.c: call "select_item" with a NULL item
before changing the underlying GimpContainer so subclasses have
a chance to update (e.g. set button sensitivity).
* app/gimpdnd.c: folded all the GtkType comparing code into a
utility function (much more readable now).
* app/gimpdrawablelistview.[ch]: activated the "raise", "lower",
"duplicate" and "delete". I'm not really happy with all those
function pointers passed to the constructor (and the dummy
parameters I've added to some GimpChannel functions) -- OTOH the
generic view maybe worth the "gboolean dummy" cruft hanging around
in the channel class.
* app/gimplayer.[ch]: removed the "apply_mask", "edit_mask" and
"show_mask" booleans ...
* app/gimplayermask.[ch]: .. and added them here together with
proper accessors and "*_changed" signals.
This also makes the layer mask undo code much clearer as we don't
have to store the booleans separately.
* app/gimplayerlistitem.c: badly hacked to acheive the correct
indicator being drawn around the active drawable. This needs
a new GimpPreview function for setting the border color.
* app/gimplistitem.c: smaller horizontal spacing.
* app/gimppreview.[ch]: added the "border_width" parameter also to
gimp_preview_set_size() so we can modify all previews the same way
after creation.
* app/layers_dialog.c: no need to push an undo group around
the "duplicate layer" code. Was this an artefact or did I miss
something here ???
* app/channel_ops.c
* app/channels_dialog.c
* app/gimage_mask.c
* app/gimpcontainergridview.c
* app/gimpcontainerlistview.c
* app/gimpdrawablelistitem.c
* app/gimpimage.[ch]
* app/qmask.c
* app/test_commands.c
* app/undo.c
* app/xcf.c
* app/pdb/channel_cmds.c
* tools/pdbgen/pdb/channel.pdb
* app/pdb/selection_cmds.c
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/internal_procs.c
* app/pdb/layer_cmds.c
* libgimp/gimplayer_pdb.[ch]
* tools/pdbgen/pdb/layer.pdb: commented out the layer mask accessors
from the perl code, so the functions temporarily disappeared all
over the place.
* plug-ins/Makefile.am: don't build XJT until the layer mask stuff
is back.
* pixmaps/eye.xpm: cropped it to it's minimal size.
2001-03-05 Sven Neumann <sven@gimp.org>
* app/Makefile.am
* app/apptypes.h
* app/gimpimage-undo.[ch]
* app/gimpundo.[ch]
* app/gimpundostack.[ch]: added new GimpUndo and GimpUndoStack objects
which will be used for the upcoming new undo system. Actually my
current plan for the undo system is to keep it pretty much as it is...
* app/gimpimage.[ch]: added new GimpUndoStacks but temporarily kept
old GSLists around, so I don't break everything now.
2001-03-04 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/apptypes.h
* app/gimplayerlistitem.[ch]: new widget derived from
GimpDrawableListItem (additionally displays the layer mask),
* app/gimplistitem.[ch]: added the preview_size to the struct so
subclasses can create previews at arbitrary times. Removed the
"preview_size" parameter from "set_viewable".
* app/gimpimage.[ch]: removed the layer mask functions because
they belong to GimpLayer.
* app/gimplayer.[ch]: folded the layer mask code from GimpImage
into GimpLayer's layer mask functions. Added a "mask_changed"
signal which is emitted when a mask is added/removed. Added
"push_undo" parameters to the functions so we can use them from
the undo system.
* app/undo.c: instead of badly poking the GimpLayer struct, use
the accessors with push_undo = FALSE.
* app/gimage_mask.c
* app/gimpdrawablelistitem.c
* app/layers_dialog.c
* app/xcf.c
* app/pdb/image_cmds.c
* tools/pdbgen/pdb/image.pdb: changed accordingly.
2001-03-04 Michael Natterer <mitch@gimp.org>
* app/gimpdrawable.[ch]: new function gimp_drawable_set_visible().
Renamed gimp_drawable_visible() to gimp_drawable_get_visible().
Added a "visibility_changed" signal.
* app/gimplistitem.[ch]: new virtual function "set_viewable"
which allows subclasses to connect to the viewable's signals.
* app/gimpdrawablelistitem.[ch]: added an eye button. Implement
"set_viewable" to connect to the "visibility_changed" signal.
* app/gimpchannel.[ch]: removed unused function
gimp_channel_toggle_visibility().
* app/channels_dialog.c
* app/floating_sel.c
* app/gimage_mask.c
* app/gimpimage.c
* app/gimplayer.c
* app/layers_dialog.c
* app/xcf.c
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/pdb_glue.h
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: removed direct access of
drawable->visible and use the functions instead. Also makes PDB
code generation nicer.
* pixmaps/eye.xpm: cropped it a bit.
2001-02-27 Michael Natterer <mitch@gimp.org>
* app/apptypes.h
* app/Makefile.am
* app/gimpdrawablelistview.[ch]: new widget. The upcoming replacement
for the layers and channels dialogs.
* app/test_commands.[ch]: put the test dialogs here...
* app/commands.[ch]: ... and made this one clean again.
* app/gimpcontainergridview.c
* app/gimpcontainerlistview.c
* app/gimpcontainerview.[ch]: some signal handling fine tuning.
* app/gimpimage.[ch]: emits "active_layer_changed" and
"active_channel_changed" signals now. The semantics of
gimage->active_layer and gimage->active_channel have changed a bit.
We now have either an active layer _or_ and active channel (there
is no active layer any more if a channel is active).
* app/channel_ops.c
* app/floating_sel.c
* app/gdisplay.c
* app/layers_dialog.c
* app/menus.c: changed accordingly.
* app/tools/gimpcolorpickertool.c: actually assign the draw_class
vraiable in the class_init function.
* app/tools/gimpdrawtool.[ch]
* app/tools/tool.c: removed the _new() functions because these
objects are abstract superclasses. Did some cleanup.
Nathan, please configure you editor to _not_ produce any tabs
in the source code.
* app/tools/gimppaintbrushtool.[ch]: "blurb" and "help" are tagged
with _(), not N_(). Put the register function to the header.
* po/POTFILES.in: made it compile again.
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-09 Michael Natterer <mitch@gimp.org>
* app/gimpcontainergridview.[ch]
* app/gimpcontainerlistview.[ch]
* app/gimpcontainerview.[ch]: follow the GimpPreview API change
and take only "size" instead of "width" and "height" in the
constructor.
* app/gimpdnd.[ch]: first attempt to hack GtkType based DND which
speaks in terms of GimpViewable instead of Brush, Pattern, ...
Added functions to remove DND callbacks (used by the multi-views).
* app/gimppreview.[ch]: new function gimp_preview_set_size_full().
* app/commands.c: updated the example dialogs to be DND aware.
* app/gimpimage.c: fixed preview size calculation by ensuring a
minimal width/height of 1 pixel.
Reported by Dave Neary <dneary@eircom.net>
* app/Makefile.am
* app/gimpdrawable-preview.[ch]: new files formerly known as
gimpdrawablepreview.[ch].
This is a new naming scheme for methods of objects which live
outside their object's file. The old name implied a derived object
(and is in fact now taken by a GimpPreview subclass, see below).
Further candidates for renaming are e.g. gimpdrawable-invert.[ch],
gimpimage-convert.[ch] etc. Finaly, the main objects (image,
drawable) will go to their own directories together with their
subclasses.
* app/apptypes.h: added typedefs for the new objects:
* app/gimpbrushpreview.[ch]
* app/gimppatternpreview.[ch]: new subclasses of GimpPreview.
* app/gimpdrawablepreview.[ch]: contains a subclass of GimpPreview
now.
* app/gimpviewable.[ch]: renamed the virtual functions to
"get_preview" and "get_new_preview" to avoid confusion with the
new GimpPreview subclasses.
* app/gimppreview.[ch]: virtualized "create_preview" and
"create_popup".
* app/gimpmarshal.[ch]: new marsaller for GimpPreview.
* app/channels_dialog.c
* app/fileops.c
* app/gimpbrush.c
* app/gimpdnd.c
* app/gimpdrawable.c
* app/gimpimage.c
* app/gimppattern.c
* app/layer_select.c
* app/layers_dialog.c
* app/lc_dialog.c
* app/nav_window.c
* app/palette_import.c
* app/undo_history.c
* app/pdb/drawable_cmds.c
* app/pdb/image_cmds.c
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/image.pdb: changed accordingly.
2001-02-04 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/apptypes.h
* app/gimpviewable.[ch]: new object. Everything that can have a
preview will be a GimpViewable. The virtual functions are
"invalidate_preview", "preview" and "preview_new".
* app/gimpmarshal.[ch]: new marshaller needed for the viewable.
* app/gimpdrawable.[ch]
* app/gimpimage.[ch]: derived from GimpViewable. Removed the
preview stuff from the public interface.
Made a single boolean out of GimpImage's "comp_preview_valid"
array because we have only one copposite preview.
* app/gimplayer.c: made the preview stuff private.
* app/gimppreviewcache.[ch]: removed gimp_preview_scale()...
* app/temp_buf.[ch]: ...and added it as temp_buf_scale() here.
* app/gimpdrawablepreview.[ch]: is a private method of
GimpDrawable now.
* app/channels_dialog.c
* app/convert.c
* app/drawable.c
* app/fileops.c
* app/floating_sel.c
* app/gimage.c
* app/gimage_mask.c
* app/gimpchannel.c
* app/gimpcontainer.c
* app/gimpdnd.c
* app/layer_select.c
* app/layers_dialog.c
* app/lc_dialog.c
* app/nav_window.c
* app/palette_import.c
* app/undo.c
* app/undo_history.c
* app/pdb/drawable_cmds.c
* app/pdb/image_cmds.c
* app/tools/crop.c
* app/tools/edit_selection.c
* app/tools/ink.c
* app/tools/paint_core.c
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/image.pdb
* po/POTFILES.in: changed accordingly.
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.
the way it is used. As the new name suggests it is only used
to count the number of displays associated with an image. It
is now impossible to delete an image that has an associated
display. You have to delete the display instead. Before this
change it was possible to delete an image through the PDB that
was created through the UI and bad things happened soon...
--Sven
1999-12-10 Garry R. Osgood <gosgood@idt.net>
* app/gimpimage.c
* app/undo.c
* app/undo_types.h
* docs/undo.txt
Changed sanity checks in undo_pop/free_layer_mask() to LAYER_MASK_ADD_UNDO
and LAYER_MASK_REMOVE_UNDO to be consistent with undo_push_layer_mask()
These now nvoke proper cleanup and release of GimpLayerMasks.
* docs/undo.txt: New file, an overview of undo logic written by
Austin Donnelly
* app/undo.c
* app/undo_types.h
* app/gimpimage.c : Introduced a new UndoType, UNDO_NULL, which maps
to zero, introducing that value into the enumerated types. Use the
type to signal type unknown/error/untyped conditions.
Full patch documentation at
http://idt.net/~gosgood/gimp-patch/patch02.html
* app/edit_selection.c: when moving layers/masks freeze the undo
after the first move to avoid that each and every small movements
puts an undo on the stack. Significantly speeds up layer moves
and especially the undo of a layer move.
* app/gdisplay.h: correct rounding errors
* app/gimpimage.c: correctly display floating selections in the
composite_preview instead of ignoring them
* app/channels_dialog.c
* app/layers_dialog.c
* app/lc_dialog.c: s/gtk_widget_draw/gtk_widget_queue_draw/
--Sven
Thu Oct 28 23:22:34 BST 1999 Andy Thomas <alt@gimp.org>
* app/gimpimage.c
Fixed memory leak with image is deleted.
* plug-ins/common/jpeg.c
Fixed the way the plugin added layers. Preview stuff does not now
get corrupted.
* app/gimpimage.c: don't free the old filename pointer till we're
all done, since we might be passed our own filename as a param
and reference it after freeing. The code didn't heed it's own
warning ;) (TigerT, this should fix that filename corruption bug)
-Yosh
Fri Oct 1 19:05:04 EDT 1999 Austin Donnelly <austin@gimp.org>
* app/gimpimage.c: Factored out common code from
gimp_image_{raise,lower}_layer and
gimp_image_{raise_layer_to_top,lower_layer_to_bottom}. They
now call gimp_image_position_layer() to do the real work.
* app/gimpimage.h: gimp_image_position_layer() takes extra arg to
tell whether an undo should be pushed.
* app/layers_dialog.c: reposition layer with undo.
* app/undo.c: new undo type for layer reposition. Layer rename
shouldn't dirty and clean the image twice!
* app/undo.h: prototype for undo_push_layer_reposition().
* app/undo_types.h: LAYER_REPOSITION_UNDO type.
Fri Oct 1 12:46:12 1999 Austin Donnelly <austin@gimp.org>
* gimprc.in: comment typo fix, plus add %D* to default
image-title-format string, so people get a '*' in the titlebar
if their image is dirty.
* app/fileops.c: initialise filename before using it.
* app/gdisplay.c: empty parameter list () is K&R - should be
stronger (void) in ANSI C.
* app/gimpdrawable.c: gimp_drawable_{dirty,clean} functions
removed - no one uses them anyway. Parasite undo type is
proper parasite undo type, not MISC_UNDO.
* app/gimpdrawableP.h: drawable dirty bit removed.
* app/gimpimage.c: don't change the resolution if there's no
difference from the old one. Call gdisplay_shrink_wrap() to
re-calculate scale factors and refresh the display on
resolution change. Layer undo doesn't have sub-types
anymore, uses main UndoType instead.
* app/layer.h: Remove LayerUndoType
* app/qmask.c: fix qmask undo so it actually works.
* app/undo.h: new types for undo_push_layer{,_mask} and
undo_push_qmask.
* app/undo.c: change way group boundaries are represented:
each Undo has a group_boundary boolean set to TRUE if this is
the start or the end of a group, and the type of the Undo is
the group's type. Within a group, each Undo keeps its own
type. This allows pop funcs and free funcs to do
type-specific things (eg needed by layer and channel stuff).
Don't maintain per-drawable dirty flags anymore. Floating
sel to layer and layer rename now uses meaningful undo types.
* app/undo_types.h: more specific undo types:
LAYER_{ADD,REMOVE}_UNDO, LAYER_MASK_{ADD,REMOVE}_UNDO,
LAYER_RENAME_UNDO, and PARASITE_{ATTACH,DETACH}_UNDO.
* app/undo_history.c: oops - undo stack was being placed into gtk
list in wrong order.
* app/edit_selection.c: push more descriptive LAYER_DISPLACE_UNDO
rather than MISC_UNDO.
* app/layers_dialog.c: better tagging of undo types
Mon Sep 20 12:51:30 EDT 1999 Austin Donnelly <austin@gimp.org>
Honest, guv, it's not a feature - it's a tightly integrated
package of undo system cleanups and fixes.
NEW FILES:
* app/undo_history.c: window showing recent undo (and redo) steps
available.
* app/undo_types.h: broken out of undo.h to fix circular includes.
MODIFIED FILES:
* app/Makefile.am: compile undo_history.c
* app/channel.h: use enum for channel undo type, not just magic
numbers.
* app/layer.h: same for layer undos.
* app/commands.c: edit_show_undo_history_cmd_callback() function to
pull up undo history window.
* app/commands.h: prototype for above.
* app/gdisplay.c: make undo / redo menu items sensitive according
to whether they would do anything. Would be easy to change
the text to say what would be undone/redone, but I don't know
the GTK.
* app/gimpimage.c: new signal emitted by gimage:
UNDO_EVENT. gimp_image_undo_event() function to emit it.
* app/gimpimage.h: prototype for above.
* app/gimpimageP.h: pushing_undo_group member is now an undo_type,
not an int. Keep undo history widget here too (if created).
* app/menus.c: add "Edit/Undo history..." to image menu.
* app/undo.c: new types: enums undo_type and undo_state rather than
ints and magic numbers. All undo_pop_* and undo_free_*
functions made static. New static function
undo_type_to_name(). Issue undo event signals on various
important events (eg undo pushed, undo popped etc).
undo_push() now takes a "dirties_image" arg to say whether
image should be dirtied. Layer moves now dirty the image. A
couple of g_return_if_fails () on undo_pop and undo_redo to
assert we're not in the middle of an undo group.
undo_get_{undo,redo}_name() to peek at names of top items on
undo and redo stacks resp. undo_map_over_{undo,redo}_stack()
to run a function for each item or group on stack. Layer and
channel undos use symbolic names rather than 0 or 1. Array
mapping undo types to names.
* app/undo.h: split out undo types to undo_types.h. Prototypes
for functions described above. undo_event_t enum.
undo_history_new() prototype lives here too.
Random other fixes:
* app/gimpdrawable.c
* app/image_render.c: default labels in switches to keep egcs happy.
* app/nav_window.c: some fixes to (sort of) cope with image res !=
screen res. Still needs work to handle non-square pixels
properly.
* app/paths_dialog.c: bad idea to call gimp_image_dirty()
directly. Even though it's currently commented out.
Wed Aug 25 02:40:39 CDT 1999 Shawn T. Amundson <amundson@gimp.org>
* app/image_new.[ch]: Added new files, the UI independant part of
new image dialog.
* app/file_new_dialog.[ch]: uses image_new stuff now. Alot
changed. No UI changed. Different behavior is a bug, as
this is only for UI separation.
* app/gimpimage.[ch]: Added gimp_image_get_width () and
gimp_image_get_height ().
* app/global_edit.c: Call a function in image_new instead of
file_new_dialog for updating the status of the cut buffe.
Mon Aug 23 10:15:32 EDT 1999 Austin Donnelly <austin@gimp.org>
Dirty flag now correct in all cases. Can be displayed in image
window title too. See NOTE near gimp_image_dirty() for details.
* app/fileops.c: gimp_image_clean_all() after reverting an image.
* app/gdisplay.c: register handlers for gimage dirty and clean
signals to update image title. New image-title-format
expansion: %Dx expands to x if the image is dirty.
* app/gdisplay_ops.c: gimage->dirty flags != 0 is the correct
condition to test to see if an image is dirty.
* app/gimpdrawable.c: gimp_image_dirty() should never be called
except from an undo_push_* function. Call
undo_push_cantundo() if you want to dirty the image but can't
be bothered writing an undo handler (be ashamed of yourself!).
* app/gimpimage.c: new gimage signal: clean. Emitted when an undo
operation takes place. Gimage changes when either dirty or
clean is emitted, so if you need to update previews etc, look
for both! Move group_count into gimage structure, since
leaving it as a static in undo.c is bad if two undo groups are
started on different images at the same time. More changes
of gimp_image_dirty() to undo_push_cantundo()
(parasite-related, plus layer moves). See the NOTE on dirty
counter near gimp_image_dirty() for the full story.
gimp_image_dirty() and gimp_image_clean() simplified - counter
can go negative.
* app/gimpimageP.h: group_count moved from undo.c
* app/layers_dialog.c: push undo for layer name change, rather
than dirtying the image.
* app/undo.c: layer rename undo functions
added. undo_push_cantundo() convenience functions added.
group_count made per-gimage since everything else is. When
blowing away redo stack, make image infinitely dirty if redo
info contained file save point.
* app/undo.h: added undo_push_layer_rename() and
undo_push_cantundo().
* TODO: added idea for undo history window.
1999-08-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/color_area.[ch]
* app/color_panel.[ch]
* app/gimpdnd.[ch]: enabled dnd for colors (compatible with the
standard gtk/gnome color dnd). The color selection is now invoked
on a real click, not on button_down to avoid confusion with dnd.
* app/channels_dialog.c
* app/disp_callbacks.c
* app/interface.c
* app/layers_dialog.c: minor dnd updates/fixes.
* app/channel.[ch]
* app/channel_pvt.h
* app/docindex.[ch]
* app/docindexif.[ch]
* app/drawable.[ch]
* app/floating_sel.c
* app/gimage.[ch]
* app/gimage_mask.c
* app/gimpdrawable.[ch]
* app/gimpdrawableP.h
* app/gimpimage.[ch]
* app/gimpimageP.h
* app/layer.[ch]
* app/layer_pvt.h
* app/undo.c
* app/xcf.c: wanted to do some s/int/gboolean/ in the layer files
where appropriate and found myself spending the whole night doing
a big code review for layers/channels/drawables/images:
s/int/gboolean/, s/<type>/g<type>/, lots of indentation, removed
some old global variables and deprecated functions, #include
cleanups, proper prototypes, copyright headers, ...