2003-09-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask-select.c (gimp_image_mask_select_vectors)
* app/paint/gimppaintcore-stroke.c (gimp_paint_core_stroke_vectors)
* app/display/gimpdisplayshell.c (gimp_display_shell_draw_vector)
* app/tools/gimpdrawtool.c (gimp_draw_tool_real_draw)
* app/tools/gimptransformtool.c (gimp_transform_tool_draw)
* app/tools/gimpvectortool.c (gimp_vector_tool_vectors_visible)
(gimp_vector_tool_draw): all callers of gimp_stroke_interpolate():
don't leak the returned GimpCoords array and don't crash if it's
NULL.
* app/tools/gimpvectortool.[ch]: added VECTORS_SELECT_VECTOR state
which enables activating any visible GimpVectors on any display.
(gimp_vector_tool_on_handle)
(gimp_vector_tool_on_curve): added a GimpVectors parameter so we
can check for vectors which are not vector_tool->vectors.
(gimp_vector_tool_oper_update): iterate gdisp->gimage->vectors
to figure if we are hovering any visible vectors and set
VECTORS_SELECT_VECTOR.
(gimp_vector_tool_button_press): catch VECTORS_SELECT_VECTOR and
start editing the selected vectors. Also make it the image's
active_vectors.
(gimp_vector_tool_button_release): removed unneeded call to
gimp_viewable_invalidate_preview(vectors).
Random cleanup all over the place.
2003-09-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem-linked.[ch]: made gimp_item_linked_get_list()
and the GimpItemLinkedMask enum public. Hiding them just causes
code duplication.
* app/tools/gimpdrawtool.[ch]: added a GList of GimpVectors and a
GimpMatrix3 transformation matrix for them. Just set them with
gimp_draw_tool_set_vectors() and gimp_draw_tool_set_transform()
and chain up in your tools's GimpdrawTool::draw() implementation
to get the vectors drawn.
* app/tools/gimpeditselectiontool.c: use
gimp_item_linked_get_list() instead of traversing image->layers,
->channels and ->vectors manually to find the linked items.
Use gimp_draw_tool_set_vectors() and _set_transform() to show
the linked vectors while moving.
(gimp_edit_selection_tool_arrow_key): transform all linked items,
not just the linked layers.
2003-09-11 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-transform-utils.[ch]: added new function
gimp_drawable_transform_matrix_flip().
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpvectors.c: don't push the complex GimpItem
transformation API down to GimpStroke. Instead setup the matrices
in GimpVectors and use a simpler API for GimpStroke.
* app/vectors/gimpvectors-import.c: changed accordingly.
* app/vectors/gimpvectors-export.c: close the <path> element.
2003-09-10 Michael Natterer <mitch@gimp.org>
* app/core/gimp.[ch]: added lots more "GimpFooFunc gui_foo_func"
vtable entries to the Gimp struct and wrapper function for them.
They cover plug-in menu creation and plug-in progress utilities.
* app/gui/gui.c: fill in the funtion pointers and dispatch
to the actual functions.
* app/pdb/Makefile.am (libapppdb_a_LIBADD): removed most hacks
since the symbols are referenced within libappgui.a now.
Removed any GTK+ dependency from the plug-ins/ directory:
* app/plug-in/Makefile.am (INCLUDES): replaces GTK_CFLAGS by
GDK_PIXBUF_CFLAGS.
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-ins.c: replaced gui function calls to create
menus and progress bars by calls to the wrappers.
* app/plug-in/plug-in.c (plug_in_close): check dangling PDB
dialogs using the new wrapper.
* app/plug-in/plug-in-def.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-in-run.c: removed trailing whitespace.
2003-09-10 Michael Natterer <mitch@gimp.org>
* configure.in: require fontconfig >= 2.2.0 (bug #121752), check
for gdk-pixbuf-2.0 explicitly, added --enable-gimp-console
configure option, bumped version number to 1.3.21.
* app/core/Makefile.am: replaced GTK_CFLAGS by GDK_PIXBUF_CFLAGS.
* app/Makefile.am: removed -export-dynamic from LDFLAGS since we
don't export symbols to modules or libraries any more. Reordered
SUBDIRS a bit.
If --enable-gimp-console is given, try to build a second binary
called gimp-console-1.3 which does not link against GTK+.
Of course this fails badly since core/ui separation is not
complete yet, but the output of the failing linker is a nice list
of what needs to be done.
2003-09-09 Michael Natterer <mitch@gimp.org>
* app/core/gimp.[ch]: added "gboolean console_messages" to the
Gimp struct and to gimp_new() since plug-in messages go directly
through gimp_message() now and need to honor "console_messages"
too.
* app/app_procs.[ch]: added "gboolean console_messages" to
app_init() and pass it to gimp_new().
* app/appenv.h: removed global variable "console_messages".
* app/main.c: added it to main()'s scope and pass it to app_init().
* app/errors.c: changed accordingly.
2003-09-06 Michael Natterer <mitch@gimp.org>
To optimize duplicate and/or wrong image updates away, introduced
new policy that a child object must never explicitly update or
invalidate its parent object (just like the GUI is not updated
explicitly by the core):
* app/core/gimpdrawable.[ch]: added new signal
GimpDrawable::update(). Never update or invalidate the image when
the drawable is updated or invalidated.
(gimp_drawable_set_visible): don't gimp_drawable_update() the
drawable since its pixels have not changed.
* app/core/gimpimage.[ch]: connect to the "add" and "remove"
signals of the layers and channels containers. Also connect to the
"update" and "visibility_changed" signals of all drawables in
these containers (optimizes away updates issued by drawables which
are not yet added to the image and updates of the selection
mask). Also, don't propagate updates to the image if the emitting
drawable is invisible (optimizes away updates issued by invisible
drawables).
(gimp_image_add_layer,channel)
(gimp_image_remove_layer,channel): don't update the image since
that's done by our "add" and "remove" handlers now.
(gimp_image_position_layer,channel): update just the image, not
the drawable since its pixels have not changed.
(gimp_image_real_colormap_changed)
(gimp_image_set_component_visible): always call
gimp_image_update() *and* gimp_viewable_invalidate_preview() to
get everything updated, since update and invalidate of images are
not connected.
* app/core/gimpimage-undo-push.c (undo_pop_layer,channel): don't
update the drawable since (a) its pixels don't change and (b) the
image updates itself upon adding/removing now.
(undo_pop_layer_mod): replaced gimp_image_update() by
gimp_drawable_update() (just for consistency with other similar
functions).
* app/core/gimplayer.c: connect to "update" of the layer mask and
issue updates on the layer if the mask update has any effect on
the projection.
(gimp_layer_create_mask): don't set the mask's offsets here since
they may be different when we later add the mask to the layer.
* app/core/gimplayermask.c (gimp_layer_mask_set_layer): set the
mask offsets here instead.
* app/core/gimpchannel.c (gimp_channel_translate): update the
channel even if push_undo == FALSE.
* app/paint/gimppaintcore.c (gimp_paint_core_finish)
* app/tools/gimpinktool.c (ink_finish): invalidate both the
drawable and the image preview since invalidating the drawable
doesn't invalidate the image any more.
* app/text/gimptextlayer.c (gimp_text_layer_render_now): also
update the new extents of the text layer, not only the old one.
(gimp_text_layer_render_layout): don't update the drawable since
gimp_drawable_fill() already updated it.
2003-09-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c: code cleanup.
(gimp_drawable_fill): use the INTENSITY() of the passed GimpRGB to
fill GIMP_GRAY drawables, not just the RED_PIX. Cleanup.
* app/core/gimpimage.c (gimp_image_transform_color):
added assertion for src_type != GIMP_INDEXED.
2003-09-05 Michael Natterer <mitch@gimp.org>
* app/paint-funcs/paint-funcs.[ch]: removed function map_to_color()
since it does not belong here and the two places using it look much
cleaner when doing that stuff themselves.
* app/core/gimpdrawable-preview.c: cleanup.
(gimp_drawable_preview_scale): do the indexed palette lookup here
instead of calling map_to_color().
* app/core/gimpimage.c (gimp_image_get_color): transform the
colors here instead of calling map_to_color().
* app/core/gimpimage.[ch] (gimp_image_get_color): reordered
parameters src parameters are before dest parameters.
Made the src color const.
(gimp_image_transform_color): reordered so src parameters are
*after* dest parameters (since this function operates on the dest
image and it makes sense to have the dest parameters
together). Made the src color const here, too.
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable.c
* app/core/gimpimage-contiguous-region.c
* app/core/gimpimage-projection.c
* app/core/gimpimagemap.c
* app/core/gimplayer.c
* app/core/gimppalette-import.c
* app/paint/gimpclone.c
* app/paint/gimppaintcore.c: changed accordingly.
* app/core/gimpedit.c (gimp_edit_cut,copy): simplified by
moving the "cropped" variable to a local scope.
* app/core/gimpimage-mask.c: calling gimp_image_update() followed
by gimp_viewable_imvalidate_preview(drawable) is equal to calling
gimp_drawable_update() directly.
2003-09-05 Sven Neumann <sven@gimp.org>
* app/core/gimppreviewcache.[ch]: code cleanup. Removed the
PreviewCache struct that used to wrap TempBuf but didn't add any
additional information. Actually free the cached temp_buf when
removing an entry from cache. Free the GSList when invalidating
the preview cache.
2003-09-05 Sven Neumann <sven@gimp.org>
* app/base/gimplut.[ch] (gimp_lut_free): free the memory allocated
for the GimpLut structure. Removed trailing whitespace.
* app/core/gimpbuffer.c: cosmetics.
* app/core/gimpedit.[ch]: let gimp_edit_cut() and gimp_edit_copy()
return a pointer to the global cut buffer instead of creating a
GimpBuffer which was leaked by most callers.
* app/gui/edit-commands.c: changed accordingly.
* libgimpwidgets/gimpquerybox.[ch] (string_query_box_ok_callback):
removed a superfluous g_strdup(); made GimpQueryStringCallback take
a const gchar* pointer.
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/palettes-commands.c: changed accordingly.
2003-09-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.[ch]: removed gimp_channel_load().
* app/core/gimpimage-mask.[ch]: removed gimp_image_mask_load()
and _save().
* app/core/gimpselection.[ch]: added gimp_selection_load() and
_save() since these functions are specific to the selection.
* app/core/gimpimage-qmask.c
* app/gui/select-commands.c
* app/widgets/gimpselectioneditor.c
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/selection_cmds.c: regenerated.
2003-09-04 Sven Neumann <sven@gimp.org>
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpcontainer-filter.[ch]: added filter functionality
for GimpContainers.
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/fonts.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/palettes.pdb
* tools/pdbgen/pdb/patterns.pdb: made the gimp_foo_get_list()
PDB function somewhat useful by adding a filter parameter that
allows to specify a regular expression to be used on the list.
* app/pdb/Makefile.am: had to uglify the ugly hack even more :(
* app/pdb/brushes_cmds.c
* app/pdb/fonts_cmds.c
* app/pdb/gradients_cmds.c
* app/pdb/palettes_cmds.c
* app/pdb/patterns_cmds.c
* libgimp/gimpbrushes_pdb.[ch]
* libgimp/gimpfonts_pdb.[ch]
* libgimp/gimpgradients_pdb.[ch]
* libgimp/gimppalettes_pdb.[ch]
* libgimp/gimppatterns_pdb.[ch]: regenerated.
* plug-ins/gflare/gflare.c
* plug-ins/pygimp/gimpmodule.c: changed accordingly.
* plug-ins/script-fu/scripts/font-map.scm: replaced the font list
parameter with a more useful regexp filter on the available fonts.
2003-09-04 Sven Neumann <sven@gimp.org>
* app/core/gimpcontainer.[ch] (gimp_container_get_name_array):
fixed a bug in the implementation.
Changed gimp_container_foreach() to take a const container.
2003-09-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.[ch]
* app/core/gimpselection.c: reordered GimpChannel::is_empty()
after GimpChannel::boudary() and GimpChannel::bounds() because it
belongs to that group of functions.
2003-09-04 Sven Neumann <sven@gimp.org>
* app/core/gimpcontainer.[ch]: added new function
gimp_container_get_name_array().
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/palettes.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/patterns.pdb: use the new GimpContainer function
instead of duplicating this code over and over again.
* app/pdb/brushes_cmds.c
* app/pdb/gradients_cmds.c
* app/pdb/palettes_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/patterns_cmds.c
* libgimp/gimpgradients_pdb.c: regenerated.
* tools/pdbgen/Makefile.am
* tools/pdbgen/pdb/fonts.pdb: added new file that defines a simple
PDB API for fonts.
* tools/pdbgen/groups.pl
* app/pdb/Makefile.am
* app/pdb/fonts_cmds.c
* app/pdb/internal_procs.c
* libgimp/gimp_pdb.h
* libgimp/gimpfonts_pdb.[ch]: (re)generated.
2003-09-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added new pure virtual function
GimpDrawable::invalidate_boundary().
* app/core/gimplayer.[ch]: implement it and removed public
function gimp_layer_invalidate_boundary().
* app/core/gimpchannel.[ch]: implement it.
* app/core/gimpselection.[ch]: implement it and removed public
function gimp_selection_invalidate().
* app/core/gimpimage-mask.c (gimp_image_mask_invalidate)
* app/core/gimpimage-undo-push.c
* app/core/gimpimage.c
* app/core/gimplayer-floating-sel.c
* app/text/gimptextlayer.c: changed accordingly.
* app/core/gimpchannel.[ch]: made gimp_channel_push_undo() a
public function and made it call
gimp_drawable_invalidate_boundary(). Added undo_desc strings for
all undo pushing functions to GimpChannelClass.
* app/core/gimpselection.[ch]: removed gimp_selection_push_undo()
since after the change above it was identical to
gimp_channel_push_undo(). Don't push any undo here since
upchaining does the right thing now. Override GimpChannelClass'
undo_desc strings to say "Selection".
* app/core/gimpimage-mask.c (gimp_image_mask_push_undo): changed
accordingly.
2003-09-04 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/paths.pdb (path_get_points): lookup the vectors
by name instead of always using the active path (bug #121401).
Made all functions use the convenience function
gimp_image_get_vectors_by_name() instead of the GimpContainer API.
* app/pdb/paths_cmds.c: regenerated.
* app/core/gimpimage.c: simplified the gimp_image_get_foo_by_name
functions by making use of gimp_container_get_child_by_name().
2003-09-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch]: removed the feather(), sharpen(),
all(), invert(), border(), grow() and shrink() wrappers.
* app/core/gimpselection.[ch]: changed gimp_selection_invalidate()
and gimp_selection_push_undo() to take GimpChannel parameters, not
GimpSelection ones. They will be made virtual GimpChannel
functions anyway.
* app/core/gimpedit.c
* app/gui/select-commands.c
* app/widgets/gimpselectioneditor.c
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/selection_cmds.c: regenerated.
2003-09-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.[ch]: made all functions which push an
undo step virtual and added them all as default implementations.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpselection.[ch]: new object which is a GimpChannel
subclass and implements all of its virtual functions, pushes
an image_mask undo and chains up with "push_undo = FALSE".
* app/core/gimpimage-mask.[ch]: made most functions simple
wrappers like gimp_channel_invert(gimp_image_get_mask(gimage));
so the API stays the same for now.
* app/core/gimpimage.[ch]: create a GimpSelection object
as gimage->selection_mask. Removed "gboolean mask_stroking"
since it is in GimpSelection now.
* app/xcf/xcf-load.c (xcf_load_channel_props): added an evil hack
which turns a GimpChannel into a GimpSelection once we figured the
loaded channel is the selection.
* app/core/gimplayer.c (gimp_layer_create_mask):
gimp_channel_clear() takes an additional "const gchar *undo_desc"
parameter now.
* app/core/gimpscanconvert.c (gimp_scan_convert_to_channel): set
mask->bounds_known to FALSE before returning the new channel
* app/tools/gimpiscissorstool.c (iscissors_convert): no need to
call gimp_channel_invalidate_boundary() on the channel returned by
the above function.
* app/core/gimpchannel.[ch]: removed
gimp_channel_invalidate_boundary() since it is no longer needed.
2003-09-02 Michael Natterer <mitch@gimp.org>
* app/config/gimpcoreconfig.[ch]
* app/config/gimprc-blurbs.h: removed "module-load-inhibit"
property since the GimpModuleDB stores this value.
* app/config/gimpconfigwriter.[ch] (gimp_config_writer_new):
renamed parameter "gboolean safe" to "gboolean atomic".
* app/core/gimpmodules.c: ported modulerc parsing/writing to
GimpScanner and GimpConfigWriter (apparently it was forgotten
during gimprc cleanup). Makes keeping modules from being loaded
work again. Reported by Michael Schumacher on #gimp.
2003-09-01 Manish Singh <yosh@gimp.org>
Font configuration stuff: You can rescan for fonts on the fly now.
A couple caveats: the text tool font dialog doesn't get updated, but
that's supposed to be going away. The new font dock doesn't resort
on update, but mitch is supposed to fix that. :)
Some nice stuff for advanced font users: GIMP local font directories,
and an optional site and user fonts.conf.
I thought about supporting the auto-resan feature in fontconfig,
but it might take too much time to do a scan so I haven't implemented
it. Another thing I want to do is create fontconfig caches in the
local dirs.
* text/gimpfonts.[ch]: gimp_fonts_init/load/reset implementation.
* text/Makefile.am: added gimpfonts.[ch]
* app/core/gimp.c: use gimp_fonts_init/reset.
* app/config/gimpcoreconfig.[ch]
* app/config/gimprc-blurbs.h: added font-path config setting.
* app/gui/preferences-dialog.c: Add a Font Folders section for the
above. Also added a Rescan Font List button, which goes in the
Environment section. Not sure if this is the right place...
it also looks kinda ugly all by its lonesome.
* app/gui/user-install-dialog.c: mention the fonts directory.
* themes/Default/images/preferences/Makefile.am
* themes/Default/images/preferences/folders-fonts.png: dummy icon for
font folders pref, probably a folder with a little "T" in the corner
would be good.
2003-09-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added new virtual function
GimpItem::stroke().
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: implement GimpItem::stroke().
* app/core/gimpimage-mask.[ch] (gimp_image_mask_stroke): changed
signature to match gimp_item_stroke() (the selection mask *really*
should be a GimpChannel subclass).
Removed global variable "gboolean gimp_image_mask_stroking"...
* app/core/gimpimage.[ch]: ...and added "gboolean mask_stroking"
to the GimpImage struct.
* app/gui/vectors-commands.[ch]: removed vectors_stroke_vectors().
* app/widgets/widgets-types.h: removed GimpStrokeItemFunc typedef.
* app/widgets/gimpvectorstreeview.[ch]: removed "stroke_item_func"
member and use gimp_item_stroke() instead.
* app/gui/dialogs-constructors.c (dialogs_vectors_list_view_new)
* app/gui/edit-commands.c (edit_stroke_cmd_callback)
* app/gui/vectors-commands. (vectors_stroke_cmd_callback)
* app/widgets/gimpselectioneditor.c
(gimp_selection_editor_stroke_clicked)
* tools/pdbgen/pdb/edit.pdb (gimp_edit_stroke): changed accordingly.
* app/pdb/edit_cmds.c: regenerated.
Note that there is no GUI for "stroke channel", although it would
be utterly cool to have one, since currently slelection stroking
cannot be masked by a selection (because we stroke the selection).
Anyway, if anyone has an idea how to trigger "stroke channel" with
another drawable active (the one to stroke to), please let me
know...
2003-09-01 Simon Budig <simon@gimp.org>
* app/vectors/gimpcoordmath.[ch]: Introduced function to compare
two gimpcoords
* app/vectors/gimpstroke.[ch]: virtualized gimp_stroke_close.
* app/vectors/gimpbezierstroke.c: made the _close function check,
if there is an unneeded segment (CCA-Sequence with all the same
coordinates) at the gap to be closed. If so, remove it.
2003-08-31 Manish Singh <yosh@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_layer): gsize is unsigned,
reflect that in the g_prints.
* tools/pdbgen/pdb/color.pdb: case to GIMP_BASE_CONFIG for the call
to gimp_histogram_new, #include "core/gimpdrawable-histogram.h"
* app/pdb/color_cmds.c: regenerated.
2003-08-30 Michael Natterer <mitch@gimp.org>
Fixed & cleaned up paint function registration to work without
GUI. Finishes core/GUI separation for the paint tools:
* app/core/gimppaintinfo.[ch]: removed "gchar *pdb_string" all over
the place since we don't stroke using the PDB any more.
(gimp_paint_info_new): create paint_info->paint_options here so
the paint system is fully initialized when there is no GUI.
* app/paint/paint.c: removed pdb_string stuff here, too.
* app/core/gimptoolinfo.[ch]: create tool_info->tool_options
only if tool_info->tool_options_type is not the same type
as paint_info->paint_options_type (if we are no paint tool).
* app/core/gimptooloptions.c: removed G_PARAM_CONSTRUCT_ONLY from
the "tool-info" property. Instead, changed
gimp_tool_options_set_property to ensure that it is only set once.
* app/core/gimp.c (gimp_initialize): moved paint_init() after
data_factory creation (was in gimp_init()), since GimpPaintInfo
now creates the GimpPaintOptions, which are GimpContexts, which
need gimp->*_factory to be constructed.
* app/tools/tool_manager.c: don't create tool_info->tool_options
here (it's not the job of the tool_manager to set up the core
paint system correctly, it must be already initialized before any
tool_manager function is called).
Made "Stroke Selection" and "Stroke Path" work the same way:
* app/paint/gimppaintcore-stroke.[ch]: added new function
gimp_paint_core_stroke_boundary() which strokes without using
the PDB.
* app/core/gimpimage-mask.c (gimp_image_mask_stroke): use it
instead of using the PDB. Enables all available paint options for
stroke operations. Fixes bug #119411.
* app/gui/vectors-commands.c (vectors_stroke_vectors)
* app/core/gimpimage-mask.c (gimp_image_mask_stroke): removed all
code which tries to figure how to stroke and simply look at the
active tool's tool_info->paint_info, since it is always set up
correctly now.
2003-08-28 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-convert.c (gimp_image_convert): free the
colormap and set colormap size to 0 after converting from indexed.
Should make gimp_image_get_cmap() behave as advertized again.
* tools/pdbgen/pdb/image.pdb: use gimp_image_get_colormap_size()
instead of accessing gimage->num_cols directly.
* app/pdb/image_cmds.c: regenerated.
2003-08-28 Michael Natterer <mitch@gimp.org>
Completed the new help infrastructure. Needs some polishing but
basically works as proposed:
* tools/pdbgen/pdb/plug_in.pdb: changed gimp_plugin_help_register()
to take a "domain_name" (which is the XML namespace) and a
"domain_uri" (which is the root of the plug-in's help pages).
* tools/pdbgen/pdb/help.pdb: changed gimp_help() to take help_id
instead of a non-UTF-8 help_path.
* app/plug-in/plug-in-def.[ch]
* app/plug-in/plug-in-proc.[ch]
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-ins.[ch]: remember the plug-ins' help_domain
and help_uri instead of just help_path. Changed all plug-in APIs
to reflect this change.
* app/widgets/gimphelp.[ch]: on helpbrowser startup, pass it the
whole list of help domains. The actual help request is now made
using the browser's temporary procedure.
* app/core/gimp.h
* app/gui/file-open-menu.c
* app/gui/file-save-menu.c
* app/gui/plug-in-menus.[ch]
* app/widgets/gimpitemfactory.c: changed accordingly.
* app/pdb/help_cmds.c
* app/pdb/plug_in_cmds.c
* libgimp/gimphelp_pdb.[ch]
* libgimp/gimpplugin_pdb.[ch]: regenerated.
Changed the help broser to load the pages according to the
new system:
- moved the browser window stuff to dialog.[ch]
- moved help domain handling to domain.[ch]
- added gimp-help.xml parsing to domain.c
- tons of cleanup
* plug-ins/helpbrowser/Makefile.am
* plug-ins/helpbrowser/dialog.[ch]
* plug-ins/helpbrowser/domain.[ch]: new files.
* plug-ins/helpbrowser/helpbrowser.c: chopped.
2003-08-28 Simon Budig <simon@gimp.org>
* app/core/gimpimage-mask-select.c
* app/vectors/gimpbezierstroke.c: Fixed two crashes when a path
with a single node in a stroke got converted to a selection or got
stroked.
2003-08-27 Michael Natterer <mitch@gimp.org>
Enabled type-preserving DND of all kinds of items between
different images. Fixes bug #119983.
* app/core/gimpitem.[ch]: added new virtual function
GimpItem::convert() which duplicates an item for another image.
* app/core/gimplayer.[ch]: removed gimp_layer_new_from_drawable()
and made it a GimpItem::convert() implementation.
* app/vectors/gimpvectors.[ch]: removed gimp_vectors_convert() and
made it a GimpItem::convert() implementation.
* app/widgets/gimpitemtreeview.[ch]: removed GimpConvertItemFunc
typedef and function pointer in GimpItemTreeViewClass since
we can simply call gimp_item_convert() now.
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c
* app/display/gimpdisplayshell-dnd.c
* tools/pdbgen/pdb/layer.pdb: changed accordingly.
* app/pdb/layer_cmds.c: regenerated.
2003-08-25 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: added enum GimpContainerPolicy.
* app/core/gimpcontainer.[ch]: removed it here. Added new virtual
function GimpContainer::clear() which removes all items. Cleanup.
* app/core/gimplist.c: implement GimpContainer::clear(). Cleanup.
2003-08-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to
return a second value named "gui_size", where the primary return
value is the "constant" actual size (as long as no operation is
performed on the object), and the second "gui_size" return value
is the size of temporary stuff like preview caches or boundary
segments (which may change asynchronously, even if the object is
on the undo stack).
* app/core/gimp.c
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c
* app/core/gimpbuffer.c
* app/core/gimpchannel.c
* app/core/gimpcontainer.c
* app/core/gimpcontext.c
* app/core/gimpdata.c
* app/core/gimpdatafactory.c
* app/core/gimpdrawable.c
* app/core/gimpgradient.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpitem.c
* app/core/gimplayer.c
* app/core/gimplist.c
* app/core/gimppalette.c
* app/core/gimpparasitelist.c
* app/core/gimppattern.c
* app/core/gimpundo.c
* app/core/gimpundostack.c
* app/core/gimpviewable.c
* app/text/gimptextlayer.c
* app/vectors/gimpstroke.c
* app/vectors/gimpvectors.c: changed get_memsize() implementations
accordingly.
* app/display/gimpdisplayshell-title.c
* app/gui/debug-commands.c
* app/widgets/gimppreview.c: changed callers accordingly.
* app/core/gimpimage-undo-push.c: changed layer, channel, vectors
and layer_mask undo steps to add/subtract the size of the
resp. objects whenever they take/drop ownership of them. Ignore
the objects' "gui_size" to get identical sizes on
adding/subtracting. Fixes bug #120429.
2003-08-23 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimpwidgetstypes.h: changed GimpHelpFunc typedef:
- renamed "const gchar *help_data" to "const gchar *help_id".
- added "gpointer help_data".
* libgimpwidgets/gimphelpui.[ch]: added "gpointer help_data" to
gimp_help_connect(). Removed all fiddling with html links and
treat all help IDs as opaque identifiers.
* app/core/gimptoolinfo.[ch]: changed "help_data" member to
"help_id".
* app/widgets/gimpitemfactory.[ch]: removed the "help_path"
parameter from gimp_item_factory_new() since we don't fiddle with
html file paths any more. Simplifies menu item help a lot.
Renamed "help_data" member of struct GimpItemFactoryEntry to
"help_id".
* app/gui/plug-in-menus.c: changed accordingly. 3rd party
plug-ins' menu item help IDs are now encoded as
"help_path:help_id".
* app/gui/file-open-menu.c
* app/gui/file-save-menu.c: when constructing the <Load> and
<Save> menus, take the resp. procedures' locale_domain and
help_path into account. Fixes translation of 3rd party menu items.
Also do the right thing for load/save procs which are implemented
as temporary procedures (they are impossible to implement
currently but it's nice to do the right thing anyway...).
* app/widgets/gimphelp-ids.h: added GIMP_HELP_MAIN identifier.
* libgimpwidgets/gimpdialog.[ch]
* libgimpwidgets/gimpwidgets.[ch]
* libgimp/gimpui.c
* app/display/gimpdisplayshell.c
* app/gui/gui.c
* app/gui/about-dialog.c
* app/gui/color-notebook.c
* app/gui/dialogs-constructors.c
* app/gui/file-dialog-utils.[ch]
* app/gui/gradients-commands.c
* app/gui/help-commands.c
* app/gui/image-menu.c
* app/gui/menus.c
* app/gui/preferences-dialog.c
* app/gui/tips-dialog.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimplevelstool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* app/widgets/gimperrorconsole.c
* app/widgets/gimphelp.[ch]
* app/widgets/gimpmenufactory.[ch]
* app/widgets/gimptexteditor.c
* app/widgets/gimptoolbox.c
* app/widgets/gimpviewabledialog.[ch]
* plug-ins/common/CEL.c
* plug-ins/common/CML_explorer.c
* plug-ins/common/gee.c
* plug-ins/common/gee_zoom.c
* plug-ins/common/gqbist.c
* plug-ins/common/spheredesigner.c
* plug-ins/flame/flame.c
* plug-ins/fp/fp_gtk.c
* plug-ins/helpbrowser/helpbrowser.c
* plug-ins/ifscompose/ifscompose.c
* plug-ins/imagemap/imap_main.c: changed accordingly. Removed
trailing whitespace all over the place.
2003-08-21 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimphelp-ids.h: new file defining the available help
topics. Work in progress and totally unusable for matching to the
help system. Stay tuned...
* app/gui/about-dialog.c
* app/gui/brushes-menu.c
* app/gui/buffers-menu.c
* app/gui/channels-commands.[ch]
* app/gui/channels-menu.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gradients-commands.c
* app/gui/gradients-menu.c
* app/gui/image-menu.c
* app/gui/layers-commands.[ch]
* app/gui/layers-menu.c
* app/gui/module-browser.c
* app/gui/offset-dialog.c
* app/gui/palettes-menu.c
* app/gui/patterns-menu.c
* app/gui/resize-dialog.c
* app/gui/select-commands.c
* app/gui/templates-menu.c
* app/gui/tips-dialog.c
* app/gui/toolbox-menu.c
* app/gui/vectors-commands.[ch]
* app/gui/vectors-menu.c: replaced literal HTML file paths by help
IDs from gimphelp-ids.h. Renamed some menu callbacks to be
consistent with similar ones. This is just an intermediate commit
and not finished.
While browsing all the menus, I noticed that our "x to selection"
functions are not consistent at all. They should all offer the
REPLACE,ADD,SUBTRACT,INTERSECT options:
* app/core/gimpchannel.[ch]: added new function
gimp_channel_new_from_alpha(). Removed gimp_channel_layer_alpha()
and gimp_channel_layer_mask().
* app/core/gimpimage-mask.[ch]: added
gimp_image_mask_select_alpha() and
gimp_image_mask_select_component() which offer the full set of
operation, feather and feather_radius parameters as the other
selection functions.
* app/core/gimpimage-mask-select.[ch]: removed
gimp_image_mask_layer_alpha() and gimp_image_mask_layer_mask().
* app/gui/channels-commands.c (channels_channel_to_selection): use
gimp_image_mask_select_component() instead of implementing it
here.
* app/gui/image-menu.c
* app/gui/layers-commands.[ch]: offer the full choice of
REPLACE,ADD,SUBTRACT,INTERSECT with "Alpha to Selection" and "Mask
to Selection".
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/selection_cmds.c: regenerated.
2003-08-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask-select.c
(gimp_image_mask_select_channel): fixed GIMP_CHANNEL_OP_INTERSECT
for channels which are smaller than the selection (create a temp
channel like rect and ellipse select do). Also, don't modify the
input channel when feathering.
2003-08-09 Sven Neumann <neo@bender>
* configure.in: added devel-docs/app.
* app/core/gimpitem.c
* app/widgets/gimpdialogfactory.c: more documentation fixes.
2003-08-09 Sven Neumann <sven@gimp.org>
* Makefile.am
* app: added a first version of docs for the application. The
templates are not yet in CVS and it's not built by default (and
probably never will be).
2003-07-29 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_set_active_layer): moved the
code which manipulates gimage->layer_stack and the call to
gimp_layer_invalidate_boundary() inside the if(layer != active_layer)
branch so it is called less often. Fixes the slowness of bug #104440
for most cases since we don't need to recalculate the selection
boundary in the next step.
(gimp_image_set_active_channel): call
gimp_layer_invalidate_boundary() before setting the active_layer
to NULL. Fixes stale layer boundary when switching to a channel.
* app/display/gimpdisplay.c (gimp_display_flush_whenever): when
there are no updates, we still need to restart the selection.
Fixes missing layer boundary when switching from a channel to
a layer.
2003-07-26 Hans Breuer <hans@breuer.org>
* libgimp/gimpcompat.h : renamed GimpOrientationType
with Compat postfix to avoid name clashing when using
this header together with libgimp/gimpenums.h
* app/composite/makefile.msc : (new file)
**/makefile.msc : updated
* libgimp/gimp.c : use static defined _tile<widht|height>
in this file instead of function call
* libgimp/gimp.def libgimp/libgimpui.def : moved from former
to latter : gimp_<brush|font|gradient|pattern>_select_<new|destroy>
added to former gimp_<brushes|gradients|patterns>_popup
* app/paint/gimppaintcore.h : removed double semicolon
which gave msvc error C2059: syntax error : ';'
* libgimpbase/gimpwin32-io.h : (new file) compatibilty defines
which were spread over multiple files to make up mostly for
missing unistd.h
* app/base/tile-swap.c app/core/gimpimagefile.c
libgimpbase/gimpdatafiles.c
plug-ins/FractalExplorer/FractalExplorer.c : use new header
* plug-ins/gflare/gflare.c
plug-ins/flame/flame.c
plug-ins/FractalExplorer/Dialogs.c :
removed #ifdef G_OS_WIN32 special casing, not needed anymore
due to g_file_test() usage
* app/text/*.* : changes required for build with PangoWin32,
but not commited ...
2003-07-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c (gimp_image_remove_layer)
* app/core/gimpimage.c (undo_pop_layer)
* app/text/gimptextlayer.c (gimp_text_layer_render):
gimp_layer_invalidate_boundary() must be called whenever a layer
gets translated, resized or removed. Fixes stale layer outlines in
the canvas padding area.
2003-07-24 Sven Neumann <sven@gimp.org>
* app/config/Makefile.am
* app/config/gimpconfig-error.[ch]: moved code from gimpconfig.[ch]
to these new files.
* app/config/gimpconfig-utils.[ch]: moved gimp_config_string_indent()
here from gimpconfig.[ch].
* app/config/gimpconfig.[ch]
* app/config/gimpconfigwriter.c
* app/config/gimprc.c
* app/config/gimpscanner.c
* app/core/gimp-documents.c
* app/core/gimp-parasites.c
* app/core/gimp-templates.c
* app/widgets/gimpdevices.c: changed accordingly.
2003-07-24 Michael Natterer <mitch@gimp.org>
* app/core/gimptooloptions.c (gimp_tool_options_serialize):
add the name of the tool to the header and footer strings.
2003-07-24 Sven Neumann <sven@gimp.org>
* app/composite/Makefile.am: fixed build rules. There must not be
a dependency that causes gimp-composite-dispatch.[ch] to be
regenerated since we don't want to depend on Python for our build.
* app/core/gimpdrawable-blend.c (gradient_fill_region)
(gradient_put_pixel): fixed a problem with the new gradient
dithering on grayscale drawables (bug #118141).
2003-07-22 Michael Natterer <mitch@gimp.org>
* app/core/gimpgradient.[ch]: added "gboolean reverse" to
gimp_gradient_get_color_at() so all gradients can be used
reversed.
* app/core/gimpdrawable-blend.[ch] (gimp_drawable_blend)
* app/core/gimppalette-import.[ch] (gimp_palette_import_from_gradient):
added "gboolean reverse".
* app/paint/paint-enums.[ch]: removed enum GimpGradientRepeatMode
since it is identical to GimpRepeatMode, except for the now
obsolete ONCE_BACKWARD value.
* app/paint/gimppaintcore.[ch]: removed
gimp_paint_core_get_color_from_gradient()...
* app/paint/gimppaintoptions.[ch]: ...and added
gimp_paint_options_get_gradient_color(), which is much more
general. Added a "reverse" property to GimpGradientOptions and
changed the type of the "repeat" property to GimpRepeatMode.
* app/paint/gimppaintbrush.c: use
gimp_paint_options_get_gradient_color().
* app/tools/gimpblendoptions.[ch]: removed the "repeat" property
since it is in the parent class now.
* app/gui/gradient-select.c
* app/gui/palette-import-dialog.c
* app/widgets/gimpgradienteditor.c
* app/tools/gimpblendtool.c
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/misc_tools.pdb: changed accordingly.
* app/tools/gimppaintoptions-gui.c: added a "Reverse" toggle right
of the gradient preview.
* app/widgets/gimppreviewrenderergradient.[ch]: added "gboolean
reverse" member and gimp_preview_renderer_gradient_set_reverse()
API.
* tools/pdbgen/pdb/paint_tools.pdb: fixed the paintbrush invoker
to set GimpPaintOption's "use-fade" and "use-gradient" properties
correctly.
* app/pdb/gradients_cmds.c
* app/pdb/misc_tools_cmds.c
* app/pdb/paint_tools_cmds.c
* libgimp/gimpenums.h
* libgimp/gimpmisctools_pdb.[ch]
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: removed GimpGradientPaintMode
here too since it was only exported accidentially (it's not used
by any external API).
* plug-ins/script-fu/scripts/3dTruchet.scm
* plug-ins/script-fu/scripts/alien-glow-arrow.scm
* plug-ins/script-fu/scripts/alien-glow-bar.scm
* plug-ins/script-fu/scripts/alien-glow-bullet.scm
* plug-ins/script-fu/scripts/alien-glow-button.scm
* plug-ins/script-fu/scripts/alien-glow-logo.scm
* plug-ins/script-fu/scripts/basic1-logo.scm
* plug-ins/script-fu/scripts/basic2-logo.scm
* plug-ins/script-fu/scripts/beveled-button.scm
* plug-ins/script-fu/scripts/blended-logo.scm
* plug-ins/script-fu/scripts/burn-in-anim.scm
* plug-ins/script-fu/scripts/coffee.scm
* plug-ins/script-fu/scripts/comic-logo.scm
* plug-ins/script-fu/scripts/coolmetal-logo.scm
* plug-ins/script-fu/scripts/glossy.scm
* plug-ins/script-fu/scripts/gradient-bevel-logo.scm
* plug-ins/script-fu/scripts/gradient-example.scm
* plug-ins/script-fu/scripts/pupi-button.scm
* plug-ins/script-fu/scripts/rendermap.scm
* plug-ins/script-fu/scripts/sphere.scm
* plug-ins/script-fu/scripts/starscape-logo.scm
* plug-ins/script-fu/scripts/test-sphere.scm
* plug-ins/script-fu/scripts/textured-logo.scm
* plug-ins/script-fu/scripts/title-header.scm
* plug-ins/script-fu/scripts/weave.scm: pass "reverse" to
gimp_blend(). Pass FALSE in most cases and added script
parameters were it makes sense.
2003-07-17 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-params.[ch]: added "gboolean allow_percent"
to gimp_param_spec_unit() and to the GIMP_CONFIG_INSTALL_PROP_UNIT()
macro. Changed value validation accordingly.
* app/config/gimpconfig-types.c (string_to_unit): parse "percent"
correctly.
* app/widgets/gimppropwidgets.c (gimp_prop_unit_menu_new): show
the "Percent" menu entry if the param_spec allows percent.
* app/config/gimpcoreconfig.c
* app/core/gimpgrid.c
* app/core/gimptemplate.c
* app/text/gimptext.c: pass FALSE to disallow percent.
* app/paint/gimppaintoptions.c
* app/tools/gimpselectionoptions.c: pass TRUE. Brings back the
percent feature for fade_length, gradient_length and fixed_size
rect/ellipse select.
* app/tools/gimpbucketfilloptions.c
* app/tools/gimpmagnifyoptions.c
* app/tools/gimpselectionoptions.c
* app/tools/gimptransformoptions.c: don't call the the reset()
functions from the GUI constructors (and reset the options just
deserialized from disk). Instead, added set_defaults() functions
which do everything the old reset() functions did (except
upchaining) and call set_defaults() from reset() and from the GUI
constructors.
2003-07-10 Michael Natterer <mitch@gimp.org>
* app/base/boundary.[ch]: added "guchar threshold" parameters all
over the place instead of always using 127. Made the HALF_WAY
#define public.
(find_empty_segs): don't crash if PR->tiles is NULL but treat
PR->data as the entire buffer so the function can be used on
PixelRegions of TempBufs.
* app/core/gimpchannel.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpfuzzyselecttool.c: pass HALF_WAY to
find_mask_boundary().
2003-07-10 Dave Neary <bolsh@gimp.org>
* app/core/gimpbrush-header.h
* app/core/gimppattern-header.h: Replace guint by guint32
just in case we're on a platform with 16 bit ints.
* app/core/gimppattern.c: Uncomment a check for
colourdepth of the pattern. There are no other values
possible outside the range 1-4, but it serves as a
sanity check in case people do odd things.
* configure.in: Add a --enable-profile configure flag to
allow profiling support. Adds -pg to the CFLAGS.
2003-07-08 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: added GimpGradientSegment typedef.
* app/core/gimpgradient.h: removed it here.
* app/core/gimpgradient.c: no need to cast the return value
of g_object_new().
2003-07-04 Henrik Brix Andersen <brix@gimp.org>
* app/core/gimpdrawable-bucket-fill.c
(gimp_drawable_bucket_fill_full): applied a patch from Pedro
Gimeno <pggimeno@wanadoo.es> which fixes segmentation fault when
using <Image>/Edit/Fill with [FB]G Color.
2003-07-04 Henrik Brix Andersen <brix@gimp.org>
Added persistent storage of image grid in XCF files.
* app/core/gimpimage.[ch]: removed gimp_image_get_grid() and
gimp_image_set_grid() ...
* app/core/Makefile.am
* app/core/gimpimage-grid.[ch]: ... and added them to these new
files. Added gimp_grid_parasite_name(), gimp_grid_to_parasite()
and gimp_grid_from_parasite() functions.
* app/core/gimpimage-snap.c
* app/gui/grid-dialog.c: #include "gimpimage-grid.h"
* app/core/gimpimage-undo-push.c: #include "gimpimage-grid.h".
(gimp_image_undo_push_image_grid) mark image as dirty.
* app/xcf/xcf-save.c (xcf_save_image_props): save GimpGrid object
as a parasite.
* app/xcf/xcf-load.c (xcf_load_image): load GimpGrid from
parasite.
* devel-docs/parasites.txt: documented the new "gimp-image-grid"
parasite.
2003-07-04 Dave Neary <bolsh@gimp.org>
* app/core/gimpdrawable-bucket-fill.c: Add alpha channel
to temp buffer from gimpimage if there's an alpha
channel in the pattern being applied.
2003-07-02 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpbasetypes.h: changed GimpDatafileLoaderFunc to
take a separate "gpointer user_data" parameter (passing user_data
in a struct was a quite nonstandard API design). Made the
GimpDatafileData pointer const.
* libgimpbase/gimpdatafiles.[ch]: removed user_data from the
GimpDatafileData struct and added "const gchar *basename" so we
don't need to g_path_get_basename() in many callbacks.
* libgimp/gimpmiscui.[ch]: changed gimp_plug_in_parse_path() to
gimp_plug_in_get_path() and return the unparsed path.
* app/core/gimpdatafactory.c
* app/core/gimpenvirontable.c
* app/gui/gui.c
* app/plug-in/plug-ins.c
* libgimpmodule/gimpmoduledb.c
* plug-ins/script-fu/script-fu-scripts.c: changed accordingly.
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/FractalExplorer/FractalExplorer.[ch]
* plug-ins/FractalExplorer/Globals.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c: use gimp_datafiles_read_directories()
instead of fiddling with g_dir_open() manually. Random cleanups.
2003-06-29 Manish Singh <yosh@gimp.org>
* tools/gimp-mkenums: handle options with -'s in them
* tools/pdbgen/enumgen.pl: redo a bunch of logic for the below
* app/core/core-enums.h: use /*< pdb-skip, skip >*/ for skipping
in both gimp-mkenums and enumgen.pl
* app/core/core-enums.c: regenerated
2003-06-28 Dave Neary <bolsh@gimp.org>
* plug-ins/common/pat.c: Save patterns with alpha
channels, and remove warning while loading patterns
with an alpha channel.
* app/core/gimppattern.c
* app/core/gimpdrawable-bucket-fill.c
* app/paint/gimpclone.c: Make cloning from a pattern
source, and bucket filling with a pattern, work when
there's an alpha channel present in the pattern.
I'm not particularly happy with this, because the only
way to tell whether there's an alpha channel or not is
by the number of bytes in the TempBuf the clone and
bucketfill routines get passed, which is rather
restrictive. It would be nice if a TempBuf had a
_has_alpha () method.
2003-06-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.h: removed enum GimpContextPropType and
enum GimpContextPropMask.
* app/core/core-enums.[ch]: added them here.
* app/core/gimptoolinfo.[ch]: replaced "gboolean tool_context"
member by "GimpContextPropMask context_props" so each tool can
specify exactly which context properties it wants to have
persistently remembered.
* app/tools/tools-types.h: changed typedef GimpToolRegisterCallback
accordingly.
* app/tools/tool_manager.[ch] (tool_manager_register_tool): ditto.
Removed the "global_tool_context" and initialize all tool info
objects from the user_context after creation. Removed the
PAINT_OPTIONS_MASK #define and use the new context_props stored in
tool_info insted.
* app/tools/gimppainttool.h: #define the common properties of the
paint tools as GIMP_PAINT_TOOL_OPTIONS_MASK (which is OPACITY |
PAINT_MODE | BRUSH).
* app/tools/[all tools].c (gimp_*_tool_register): replaced the
"use_context" boolean by the actual mask of context properties the
tools need.
2003-06-24 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_image_grid)
* app/core/gimpimage.c (gimp_image_set_grid): ref/unref the grid.
* app/gui/view-commands.c (view_configure_grid_cmd_callback): set
the dialog transient for the shell, make shell->grid_dialog a
weak pointer of the grid dialog.
* app/gui/grid-dialog.c: don't set shell->grid_dialog to NULL
here, attach the grid using g_object_set_data_full() and don't
unref it explicitely. Use gimp_config_is_equal_to() instead of
gimp_config_diff().
* app/core/gimpgrid.[ch]: derive GimpGrid from GimpObject (not
GObject) allowing us to use gimp_object_get_memsize(). Added
missing copyright notice.
* app/core/gimpimage.c: only call gimp_object_get_memsize() if
gimage->grid != NULL.
* app/gui/grid-dialog.c: added mnemonics, set shell->grid_dialog
to NULL when destroyed.
* app/gui/view-commands.c (view_configure_grid_cmd_callback):
added call to gtk_window_present().
2003-06-23 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]
* app/config/gimpconfigwriter.[ch]
* app/config/gimpscanner.[ch]: added support for serializing to
and deserializing from strings. Had to do some smaller changes to
the GimpConfig API.
* app/config/test-config.c: added a simple test for the new
functions.
* app/config/gimpconfig-dump.c
* app/config/gimprc.c
* app/core/gimp-documents.c
* app/core/gimp-parasites.c
* app/core/gimp-templates.c
* app/core/gimpunits.c
* app/gui/session.c
* app/plug-in/plug-in-rc.c
* app/tools/tool_options.c
* app/widgets/gimpdevices.c: follow GimpConfig API changes.
* libgimpbase/gimpparasite.[ch]: declared the return value of
gimp_parasite_data() as gconstpointer.
This fixes bug #65198
* app/core/Makefile.am
* app/core/core-types.h:
* app/core/gimpgrid.[ch]: added new class GimpGrid.
* app/core/core-enums.[ch]: added new enum GimpGridType.
* app/core/gimpimage-guides.[ch]: removed the gimp_image_snap_*()
functions...
* app/core/gimpimage-snap.[ch]: ...and added them here since they
are no longer guide specific.
* app/core/gimpimage-undo-push.[ch]: added
gimp_image_undo_push_image_grid()
* app/display/gimpdisplayshell-handlers.c:
* app/core/gimpimage.[ch]: added grid member to _GimpImage. Added
new signal "grid_changed", added gimp_image_grid_changed(),
gimp_image_get_grid() and gimp_image_set_grid().
* app/display/gimpdisplayshell-appearance.[ch]: added
gimp_display_shell_set_show_grid(),
gimp_display_shell_get_show_grid(),
gimp_display_shell_set_snap_to_grid() and
gimp_display_shell_get_snap_to_grid().
* app/display/gimpdisplayshell-callbacks.c: added call to
gimp_display_shell_draw_grid()
* app/display/gimpdisplayshell.[ch]: added grid member to
_GimpDisplayShellVisibility, added snap_to_grid and grid_dialog
members to _GimpDisplayShell, added
gimp_display_shell_draw_grid(), modified
gimp_display_shell_snap_coords() to use the new
gimp_image_snap_*() functions.
* app/gui/image-menu.c: added grid entries to
image_menu_entries[].
* app/gui/view-commands.[ch]: added
view_configure_grid_cmd_callback(),
view_toggle_grid_cmd_callback() and
view_snap_to_grid_cmd_callback().
* app/gui/Makefile.am
* app/gui/grid-dialog.[ch]: added a grid dialog.
2003-06-13 Michael Natterer <mitch@gimp.org>
Cleaned up and improved the message system:
* app/core/gimp.[ch]: added "const gchar *domain" to
GimpMessageFunc (a NULL domain means the message is from the GIMP
core, everything else is a plug-in).
* app/errors.c: pass "domain == NULL" to gimp_message().
* tools/pdbgen/pdb/message.pdb: derive the message domain from the
current plug-in's menu_path (evil hack but works reasonably well).
* app/pdb/message_cmds.c: regenerated.
* app/widgets/gimpwidgets-utils.[ch] (gimp_message_box): added a
header showing the message domain and changed the dialog layout to
follow the HIG more closely.
* app/gui/error-console-dialog.[ch]: removed.
* app/widgets/gimperrorconsole.[ch]
* app/gui/error-console-commands.[ch]
* app/gui/error-console-menu.[ch]: new files containing a
re-implementation of the error console dialog.
* app/gui/Makefile.am
* app/gui/dialogs-constructors.c
* app/gui/gui.c
* app/gui/menus.c
* app/widgets/Makefile.am
* app/widgets/widgets-types.h: changed accordingly.
* app/display/gimpprogress.c: added more spacing and removed the
separator (more HIG compliant).
* plug-ins/[most plug-ins].c: Changed lots of messages and
progress strings:
- Removed plug-in names from messages since that's automatically
covered by "domain" now.
- Put all filenames in ''.
- Changed "Loading" to "Opening".
- Added "..." to all progress messages.
- Cleaned up all file open/save error messages to look the
same and include g_strerror(errno).
- Removed special casing for progress bars and *always* show them,
not only if run_mode != GIMP_RUN_NONINTERACTIVE (we can't expect
all plug-ins to do this correctly but need to hack the core to
sort out unwanted progress bars).
Unrelated:
- Cleaned up indentation, spacing, #includes, coding style and
other stuff while I was at all these files.
2003-06-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_configure): removed the
check again because adding e.g. GRAY drawables to RGB images is
prefectly ok as long as they are channels/masks.
2003-06-12 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_configure): check if the
drawable type fits to the image. This assertion would have catched
the problem below.
2003-06-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_mask_bounds): added some
more g_return_if_fail() to avoid NULL pointer dereferencing.
2003-06-06 Sven Neumann <sven@gimp.org>
* app/core/gimptoolinfo.[ch]: added "in_toolbox"; defaults to TRUE.
* app/tools/tool_manager.c: set "in_toolbox" to FALSE for tools
derived from GimpImageTool.
* app/widgets/gimptoolbox.c: respect the new flag when constructing
the toolbox.
2003-06-05 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_get_color_at):
* app/core/gimpimage-projection.c (gimp_image_projection_get_color_at):
use OPAQUE_OPACITY instead of 255.
* app/core/gimpimage-pick-color.[ch]: factored out code that
averages over colors so it can be used from GimpImageTool.
* app/tools/gimpimagemaptool.[ch]: derived from GimpColorTool and
added a GimpColorTool::pick implementation.
* app/tools/gimpcoloroptions.c
* app/tools/gimpcolorpickeroptions.c: add the toggle for
"sample_merged" in gimp_color_picker_options_gui().
* app/tools/gimpcolortool.c (gimp_color_tool_cursor_update): check
if the cursor is over the active drawable or if "sample_merged" is
active.
* app/tools/gimplevelstool.c: simplified since all color-picking is
now handled by the parent classes. Fixes bug #112668.
2003-06-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_bounds): always return
channel->x1,y1,x2,y2, *not* tx1,ty1,tx2,ty2 since the latter
contain bogus values if the mask is empty. Fixes bug #114419.
* plug-ins/script-fu/scripts/unsharp-mask.scm: cleaned up
while searching the bug.
2003-06-04 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.list: added VOID: ENUM, BOXED, INT.
* app/tools/gimpcolortool.[ch]: added a default implementation for
GimpColorTool::pick. Emit a "picked" signal when a color was
successfully picked.
* app/tools/gimpcolorpickertool.c: simplified a lot since
GimpColorTool does most of the work for us now.
2003-06-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-rotate.c (gimp_image_rotate_item_offset):
fixed offset calculation for 90 and 270 degree rotations.
* app/core/gimpimage-flip.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c: increase the progress also when
transforming the selection. Makes the progress appear more
continuous. Also clened up and simplified the progress code
in all files.
* app/core/gimpimage-resize.[ch]: added a progress like in the
files above.
* app/gui/image-commands.c (image_resize_callback): changed
accordingly.
(image_scale_implement): clened up and simplified a lot.
* tools/pdbgen/pdb/image.pdb: changed accordingly.
* app/pdb/image_cmds.c: regenerated.
2003-06-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_scale, resize): make sure
channels end up at (0, 0) after scaling and resizing.
Fixes bug #114213.
2003-05-26 Michael Natterer <mitch@gimp.org>
* app/base/tile-manager-private.h: added "gint ref_count" to the
TileManager struct.
* app/base/tile-manager.[ch]: replaced tile_manager_destroy()
by tile_manager_ref() and tile_manager_unref().
* app/core/gimpimage-undo-push.c: ref the tile managers stored in
the undo system and DON'T destroy them if no undo could be pushed.
Should fix the remaining crashes with undo disabled like in
bug #9350.
(!!!) Note that the tiles passed to gimp_image_undo_push_image()
and gimp_drawable_push_undo() as well as the tile managers of
drawables passed to gimp_image_undo_push_[layer|channel]_mod()
must be unref'ed by the caller now.
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste):
don't take ownership of the passed tiles but ref them if needed.
(!!!) Callers must unref the passed tiles themselves now.
* app/core/gimpbuffer.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-offset.c
* app/core/gimpdrawable.c
* app/core/gimpedit.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-projection.c
* app/core/gimpimage.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/paint/gimppaintcore.c
* app/text/gimptextlayer.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimptransformtool-undo.c
* app/tools/gimptransformtool.c: changed accordingly.
2003-05-24 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-rotate.c (gimp_image_rotate): fixed offset of
layers and vectors after rotation (bug #113611).
2003-05-21 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: added GimpDrawable::alpha_changed()
signal.
* app/core/gimpimage-undo-push.c
* app/core/gimplayer.c: emit it when alpha is removed from or
added to a layer.
* app/widgets/gimpcontainertreeview.[ch]: added a
"name_attributes" column to the list store which provides a
PangoAttrList for the name column.
* app/widgets/gimplayertreeview.[ch]: connect to all layers'
"alpha_changed" and set the BG layer's name to bold.
* app/widgets/gimpdrawabletreeview.c: removed redundant assertions.
2003-05-21 Simon Budig <simon@gimp.org>
* app/core/gimpscanconvert.[ch]: Extended to be able to handle
multiple polygons in a sane way.
* app/core/gimpimage-mask-select.c: Use this to convert
multiple-stroke vectors objects to selections. Libart rocks!
* app/tools/gimpiscissorstool.c: Changed accordingly.
2003-05-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_layer_mod): call
gimp_layer_invalidate_boundary() because the layer extents may
change.
* app/core/gimpitem-linked.c: pass clip_result == TRUE when
rotating linked channels.
* app/core/gimpdrawable-transform.c: implement clip_result so
linked channels can be rotated without leaving the image in an
inconsistent state. Added utility function
gimp_drawable_transform_rotate_point().
2003-05-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_rotate): don't default to
clip_result == TRUE (unlike the other transform functions).
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_tiles_rotate): fixed offset calculation.
* app/core/gimpimage-rotate.c: change the image size *after* all items
are rotated. Adjust all items' offsets after rotation. Rotate the
resolutions too. Seems to work now and fixes bug #6101.
* app/core/gimpimage.c (gimp_image_size_changed): emit
"size_changed" on all vectors.
* app/core/gimpitem-linked.[ch]: added gimp_item_linked_rotate().
* app/gui/drawable-commands.c: flip and rotate linked items too.
* app/vectors/gimpvectors.c (gimp_vectors_rotate): fixed rotation
angles.
Unrelated:
* app/core/gimpimage-merge.c: don't #include "path.h".
2003-05-20 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-flip.c: no need to include gimp-intl.h.
* app/core/gimpimage-rotate.c: change the image size if needed;
implemented rotation of guides.
* app/vectors/gimpvectors.c: implemented rotation of vectors.
2003-05-20 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c: remember the guide's orientation
in the guide undo. Needed for gimp_image_rotate().
2003-05-20 Sven Neumann <sven@gimp.org>
* app/core/core-enums.[ch]: added new enum GimpRotationType.
* app/core/Makefile.am
* app/core/gimpimage-rotate.[ch]: new files.
* app/core/gimpchannel.c
* app/core/gimpdrawable-transform.[ch]
* app/core/gimpdrawable.c
* app/core/gimpitem.[ch]
* app/core/gimplayer.c
* app/vectors/gimpvectors.c: added GimpItem::rotate. Still work in
progress.
* plug-ins/common/rotate.c: don't install any menu entries. The
plug-in is only kept around to provide plug_in_rotate for backward
compatibility.
* app/gui/drawable-commands.[ch]
* app/gui/image-commands.[ch]
* app/gui/image-menu.c: use the new rotate implementation and use
stock icons for the menu entries. Fixes bug #57797.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-guides.c (gimp_image_snap_rectangle): snap
correctly to the bottom and right sides of the rectangle. Also
snap to the closer guide if we snap twice on one axis.
Fixes bug #113233.
All snapping functions: use ROUND() instead of truncating the
double coords.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-convert.c (gimp_image_convert): push a
colormap undo if the image was INDEXED. Fixes bug #113236.
Minor Cleanups.
2003-05-18 Michael Natterer <mitch@gimp.org>
Implemented "Flip Image". Fixes bug #23179:
* app/core/core-enums.[ch]: added GIMP_UNDO_GROUP_IMAGE_FLIP.
* app/core/Makefile.am
* app/core/gimpimage-flip.[ch]: new files implementing
gimp_image_flip().
* app/gui/image-menu.c
* app/gui/image-commands.[ch]: added it to the "Image" menu.
* themes/Default/images/Makefile.am
* themes/Default/images/stock-flip-horizontal-16.png
* themes/Default/images/stock-flip-vertical-16.png
* libgimpwidgets/gimpstock.[ch]: added icons for the new
menu items.
Bugs found while hacking the stuff above:
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste):
only call gimp_layer_add_alpha() if the pasted tiles have alpha.
* app/core/gimpimage-undo-push.c (undo_pop_channel_mod): fixed to
do the right thing if the channel is the selection mask.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpmarshal.list: added BOOLEAN: OBJECT, POINTER.
* app/widgets/gimpcontainerview.[ch]: added a boolean return
value to GimpContainerView::select_item() which indicates if
the select operation was successful.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly.
* app/widgets/gimpdrawabletreeview.c: ditto. Removed the
tree_view's select_function because it was only constraining the
widget, not the underlying select operation. Instead, implement
GimpContainerView::select_item() and disallow anything but the
floating selection to be selected. Also re-enabled the
"floating_selection_changed" callback and explicitely set the
active item so the button states get updated. Fixes bug #112487.
2003-05-18 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_new_from_drawable): call
gimp_item_set_image() on the new layer's mask too if it exists.
2003-05-16 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch] (gimp_image_mask_extract): added
"gboolean cut_image" parameter so we can float selections
without cutting them from the original drawable.
* app/gui/select-commands.c
* tools/pdbgen/pdb/selection.pdb: pass cut_image == TRUE.
* app/pdb/selection_cmds.c: regenerated.
* app/tools/tools-enums.[ch]: added SELECTION_MOVE_COPY value
to the SelectOps enum.
* app/tools/gimpselectiontool.c: use the new mode when
<ctrl>+<alt>-dragging a selction (yes, this is evil but there are
no modifiers left).
* app/tools/gimpeditselectiontool.[ch]: extended EditType enum by
EDIT_MASK_COPY_TO_LAYER_TRANSLATE and pass cut_image == FALSE if
it's passed to init_edit_selection().
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimprectselecttool.c: pass the new mode to
GimpEditSelectionTool.
2003-05-14 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimp-utils.[ch]: new file for utility functions.
Contains gimp_rectangle_intersect() for now.
* app/core/gimpdrawable-transform.c: removed the function here.
* app/core/gimpdrawable.c (gimp_drawable_resize): use it to
determine the amount of pixels to copy between the old and new
tile managers. Removed restriction that forced the areas to
overlap by at least one pixel.
* app/core/gimpitem.c (gimp_item_real_transform): removed the
restriction here, too.
* app/core/gimplayer.c (gimp_layer_create_mask): use the new
function to decide how much to copy from the selection when
creating a mask from it.
2003-05-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-transform.[ch]: changed the TileManager
variable names to "orig_tiles" and "new_tiles" in the whole file.
(gimp_drawable_transform_tiles_flip): implement "clip_result".
Enables flipping of linked channels.
2003-05-13 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "gboolean clip_result" to
GimpItem::flip().
* app/vectors/gimpvectors.c
* app/tools/gimpfliptool.c: changed accordingly.
* app/core/gimpdrawable.c: implement GimpItem::flip() and
GimpItem::transform().
* app/core/gimpchannel.c
* app/core/gimplayer.c: chain up in flip() and transform() and do
only the layer/channel specific stuff here.
* app/core/gimpdrawable-transform.[ch]: fixed indentation.
(gimp_drawable_transform_tiles_flip): added "gboolean clip_result"
and warn that it is not yet implemented.
(gimp_drawable_transform_tiles_affine): when transforming a
channel set bg_color to transparent. Clip channels (but not layer
masks) only if the passed tiles have bpp == 1 (the channel is
unfloated).
(gimp_drawable_transform_affine): clip all unfloated channels.
* app/core/gimpitem-linked.[ch]: added gimp_item_linked_get_list()
utility function to avoind iterating all layers/channels/vectors
in all functions.
* app/tools/gimptransformtool.c: clip all unfloated channels.
The clipping fixes above together fix bug #112858.
2003-05-12 Michael Natterer <mitch@gimp.org>
Added support for transforming linked layers, channels
and vectors. Fixes bug #86277.
* app/core/gimpdrawable-transform.[ch]
(gimp_drawable_transform_tiles_flip): added "gdouble axis" and
calculate the resulting drawable offset.
(gimp_drawable_transform_flip): calculate the axis and pass it to
the function above.
(gimp_drawable_transform_[tiles_]affine): reordered parameters.
* app/core/gimpitem.[ch]: added virtual functions GimpItem::flip()
and GimpItem::transform().
* app/core/gimpchannel.c
* app/core/gimplayer.c
* app/vectors/gimpvectors.c: implement flip() and transform().
Note that all functions always transform the whole item,
regardless of a present selection.
* app/core/Makefile.am
* app/core/gimpitem-linked.[ch]: new files containing utility
functions which translate, flip and transform all linked items.
* app/tools/gimpfliptool.c
* app/tools/gimptransformtool.c
* tools/pdbgen/pdb/layer.pdb: use the new gimp_item_linked_*()
functions to translate, flip and transform all linked items.
* tools/pdbgen/pdb/transform_tools.pdb: follow
gimp_drawable_transform_affine() API change.
* app/pdb/layer_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2003-05-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added "gboolean push_undo" to
GimpItem::translate() and don't push and undo in
gimp_item_translate().
* app/core/gimpchannel.[ch]: removed public function
gimp_channel_translate() and implement GimpItem::translate().
* app/core/gimpimage-mask.c
* app/core/gimplayer.c: changed accordingly.
* app/vectors/gimpvectors.c: actually translate the vectors
in translate().
* app/gui/channels-commands.c (channels_new_channel_query): removed
useless call to gimp_channel_translate().
* app/tools/gimpeditselectiontool.c
* tools/pdbgen/pdb/layer.pdb: when translating a linked layer,
also translate all linked channels and vectors. Cleanup.
Note that the "linked" behaviour has changed: before this change,
moving a layer moved all linked layers unconditionally. Now,
linked layers/channels/vectors are moved *only* if the moved layer
is also linked (the linked items behave as a group now and moving
something not in the group does not affect the group).
* app/pdb/layer_cmds.c: regenerated.
2003-05-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-crop.c (gimp_image_crop)
* app/core/gimpimage-resize.c (gimp_image_resize)
* app/core/gimpimage-scale.c (gimp_image_scale):
don't #include "gimpchannel.h". Moved code around so they all do
their stuff in the same order (improves readability when comparing
the functions). Use GimpItem variables instead of GimpChannel or
GimpLayer ones. Lots of cleanup.
2003-05-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.c: added default implementations for scale()
and resize() which just set the resulting width/height and offset
values.
* app/core/gimpdrawable.c: chain up in scale() and resize().
* app/vectors/gimpvectors.[ch]: buncha vectors changes/features:
- Removed unused "linked" and "locked" members.
- Removed "changed" signal.
- Added "freeze" and "thaw" signals and functions to emit them.
- Added "freeze_count" member so we emit only one freeze/thaw pair
even when doing nested changes.
- Added GimpItem::translate() implementation.
- Actually scale and resize the vectors in scale() and resize().
- Added undo for scale() and resize().
- Added freeze()/thaw() pairs around all modifying functions.
- Changed gimp_vectors_copy_strokes() to work as needed.
* app/core/gimpimage-resize.c
* app/core/gimpimage-scale.c: resize and scale all vectors.
Fixes bug #36491.
* app/core/gimpimage-undo-push.c (undo_pop_vectors_mod): added
freeze()/thaw() around the vectors-modifying code. Also restore
width, height and offsets.
* app/tools/gimpvectortool.c: connect to "freeze" and "thaw"
and pause()/resume() vectors drawing accordingly.
2003-05-07 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_create_mask): when adding a
layer mask from selection, don't crash if the layer is not
entirely inside the image boundary but clip the copy_region()
accordingly. Fixes bug #112409. Added a local GimpDrawable variable
so we don't need to GIMP_DRAWABLE(layer) all the time.
2003-05-07 Michael Natterer <mitch@gimp.org>
Started to abstract item transformation so we can easily
transform multiple linked items later:
* app/core/gimpitem.[ch]: added new virtual function
GimpItem::scale() with the same signature as the former
gimp_layer_scale_lowlevel().
* app/core/gimpdrawable.c: implement scale() and do the
common parts of layer/channel scaling here.
* app/core/gimpchannel.[ch]
* app/core/gimplayer.[ch]: implement scale() for the
channel/layer specific parts of scaling.
* app/core/gimplayer.[ch]: renamed gimp_layer_scale() to
gimp_layer_scale_by_origin().
* app/vectors/gimpvectors.c: added empty scale() implementation.
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo-push.c
* app/gui/layers-commands.c
* tools/pdbgen/pdb/layer.pdb: changed accordingly.
* app/pdb/layer_cmds.c: regenerated.
Unrelated:
* app/core/gimpimage-undo-push.c: fixed item rename undo to
take the size of the saved name into account. Removed old
path_undo stuff.
2003-05-05 Pedro Gimeno <pggimeno@wanadoo.es>
* app/core/gimpdrawable-blend.c: Cleanups.
(gradient_calc_linear_factor): Apply the gradient to both sides
when Repeat is set to Sawtooth Wave. Fixes bug #112106.
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_tiles_affine): Fix copy'n'paste slip in
coordinates calculation for supersampling code. Transform the
pixel centers properly. Fixes bug #10466.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_rectangle,
gimp_draw_tool_draw_arc): Ported the fix for bug #17904 from the
STABLE branch (off-by-one when drawing the rectangle/ellipse
previews).
* app/tools/gimpeditselectiontool.c: Renamed
gimp_edit_selection_tool_snap to
gimp_edit_selection_tool_calc_coords, as it is no longer used for
snapping.
(gimp_edit_selection_tool_calc_coords): Use floor instead of
rounding. Callers changed to remove rounding, as it deals with
gdoubles directly. Thanks to Mitch for the help refining this
one. Fixes bug #17906.
2003-04-17 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-contiguous-region.c
(find_contiguous_region_helper): applied patch from Pedro Gimeno
that fixes bug #51883.
* plug-ins/common/bumpmap.c (bumpmap): applied patch from Pedro
Gimeno that fixes bug #52543.
2003-04-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-guides.c (gimp_image_add_x,y): new functions
snapping to one axis only.
(gimp_image_snap_rectangle): use them to enable snapping the
rectangle to all its corners, not just the NW and SE one.
2003-04-14 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpvectors.[ch]: Changed vectors->strokes to a
GList and removed stroke->next. Implemented stuff for duplicating
strokes. Duplicating a vector works now.
* app/tools/gimpvectortool.c: added not-yet-used function to
determine where a click has been. Refcounting stuff changed.
* app/core/gimpimage-mask-select.c
* app/paint/gimppaintcore-stroke.c: Changed accordingly.
2003-04-13 Michael Natterer <mitch@gimp.org>
* app/core/gimptemplate.c (gimp_template_notify): invalidate
the preview when the stock_id changes.
* app/widgets/gimptemplateeditor.[ch]: added an optional entry
to edit the template's name.
* app/widgets/gimptemplateview.[ch]: added a "duplicate" button and
function pointers for creating templates, editing templates and
creating images from templates.
* app/gui/file-new-dialog.[ch] (file_new_dialog_create): added an
optional template parameter.
* app/gui/file-commands.c: pass template == NULL.
* app/gui/templates-menu.c: added a "Duplicate Template" menu entry.
* app/gui/templates-commands.[ch]: added the callback for the
duplicate menu item. Added "New Template" and "Edit Template"
dialogs. Added a function which opens a file_new_dialog with
a template preselected.
* app/gui/dialogs-constructors.c: let GimpTemplateView know
about the functions.
2003-04-13 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.c (gimp_context_deserialize_property)
* app/core/gimpcontainer.c (gimp_container_deserialize): g_free()
the string returned by gimp_scanner_parse_string(). Replace
NULL object names by "".
2003-04-12 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-params.h: made object properties
G_PARAM_READWRITE by default. Added flag GIMP_PARAM_AGGREGATE
which indicates that an object property is not a reference but a
real part of its owner.
* app/config/gimpconfig-deserialize.c: g_object_set_property()
object properties only if they are not GIMP_PARAM_AGGREGATE.
* app/config/gimpconfig-utils.c (gimp_config_copy_properties,
gimp_config_reset_properties): copy and reset GIMP_PARAM_AGGREGATE
object properties correctly.
* app/config/gimpconfig-serialize.c: don't call
gimp_config_writer_open/close() for properties which are handled
by a GimpConfigIface::serialize_property() implementation.
* app/core/gimpcontext.c: removed exlicit G_PARAM_WRITABLE from
object properties since that's the default now. Call
gimp_config_writer_open/close() when serializing properties.
* app/core/gimpviewable.c (gimp_viewable_get_property): use
gimp_viewable_get_stock_id().
(gimp_viewable_set_stock_id): set stock_id to NULL if the new
stock_id is the same as viewable_class->default_stock_id.
Added serialize_property() which skips stock_id serialization
if it is NULL.
* app/tools/gimptextoptions.c: made the "text" property
GIMP_PARAM_AGGREGATE. Added gimp_text_options_set_property()
(which does nothing).
* app/widgets/gimptemplateeditor.[ch]: added an optional
GimpViewableButton to change the template's icon.
* app/gui/file-new-dialog.c: create it with the icon button so it
gets some testing.
2003-04-10 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: added gimp_context_type_to_prop_name().
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpviewablebutton.[ch]: new widget implementing
the wheel-scrollable preview button.
* app/tools/gimptextoptions.c
* app/tools/paint_options.[ch]: removed the code implementing the
same and use GimpViewableButton.
* app/tools/tool_manager.c: added the font to the context
properties which are remembered per tool. Added an evil hack
using g_object_set_data() to pass the global_dock_factory to
tool option GUI constructors.
2003-04-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_remove_channel): say
"Remove Channel" when pushing the undo, not "Remove Layer".
2003-04-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added vitrual function
GimpViewable::get_description() which returns the string that
should be presented to the user plus an optional tooltip with more
information. The default implementation just returns the object's
name and no tooltip.
* app/core/gimpbrush.c
* app/core/gimpbuffer.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimptoolinfo.c: implement get_description().
* app/core/gimpimagefile.[ch]: ditto. Renamed
gimp_imagefile_get_description() to
gimp_imagefile_get_desc_string(). Well, um, gimme a better name...
* app/gui/file-open-dialog.c: changed accordingly.
* app/file/file-utils.[ch]: renamed readXVThumb() to
file_utils_readXVThumb().
* tools/pdbgen/pdb/fileops.pdb: changed accordingly.
* app/widgets/widgets-types.h: removed GimpItemGetNameFunc typedef.
* app/widgets/gimpcontainerview-utils.[ch]: removed the the actual
get_name_funcs. They now live in the core as
GimpViewable::get_description() implementations.
* app/widgets/gimpcontainermenu.[ch]
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview.[ch]
* app/widgets/gimpmenuitem.[ch]
* app/widgets/gimpviewabledialog.c: removed get_name_func stuff
and use gimp_viewable_get_description().
* app/widgets/gimpcontainermenu.[ch]: added "preview_border_width"
to gimp_container_menu_set_preview_size().
* app/widgets/gimpimagedock.c: changed accordingly.
* app/pdb/fileops_cmds.c: regenerated.
2003-04-07 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_apply_mask): call
gimp_viewable_invalidate_preview() on the layer, not on the image
(fixes bug #108960).
2003-04-06 Michael Natterer <mitch@gimp.org>
* app/core/gimplist.[ch]: added gimp_list_uniquefy_name() utility
function.
* app/core/gimpdatalist.c
* app/core/gimpitem.c: use it here instead of duplicating almost
the same code.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimptemplateview.[ch]: new widget for editing the
template list.
* app/gui/dialogs-constructors.c: use it.
* app/gui/Makefile.am
* app/gui/templates-commands.[ch]
* app/gui/templates-menu.[ch]: new files implementing the context
menu for the template list.
* app/gui/menus.c: register the new menu with the menu factory.
* app/gui/file-commands.c (file_new_template_callback): uniquefy
the new template's name.
* app/gui/documents-commands.c: fixed typo.
2003-04-06 Michael Natterer <mitch@gimp.org>
* app/core/gimpgradient.c (gimp_gradient_get_color_at): fixed bug
spotted by Pedro Gimeno by moving the alpha calculation to the
bottom so it is not affected by rgb->hsv->rgb conversions
(bug #110053).
2003-04-05 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-utils.c (gimp_config_reset_properties):
reset object properties only if they are GIMP_PARAM_SERIALIZABLE.
* app/core/gimpcontext.[ch]: added a GimpTemplate property.
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs.c: added a template dialog.
* app/gui/dialogs-menu.c
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: and menu entries to open it.
* app/widgets/gimpdnd.[ch]: added DND for GimpTemplates.
2003-04-05 Michael Natterer <mitch@gimp.org>
* app/core/gimp-templates.c (gimp_templates_load):
gimp_list_reverse() after loading so it is in the right order.
2003-04-04 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimplimits.h: reduced GIMP_MAX_IMAGE_SIZE to 2^18.
* libgimpbase/gimputils.[ch]: added gimp_memsize_to_string()
utility function (which is definitely broken on 64bit systems).
* app/core/gimpimage-new.[ch]: removed
gimp_image_new_get_memsize_string() and gimp_image_new_create_image().
Renamed gimp_image_new_template_new() to
gimp_image_new_get_last_template().
* app/core/gimpimagefile.c
* app/display/gimpdisplayshell-title.c: changed accordingly.
* app/core/gimp-templates.c: changed filename from "templates"
to "templaterc".
* app/core/gimp.[ch]
* app/core/gimpimage-duplicate.c: don't include "gimpimage-new.h".
* app/core/gimptemplate.[ch]: removed
gimp_template_calc_memsize(). Instead, added the size and a
boolean indicating that it is valid to the GimpTemplate
struct. Added GObject::notify() implementation and update the
values there.
* app/widgets/gimppropwidgets.c: connect to the unit property
correctly.
* app/gui/file-new-dialog.c: changed accordingly. Disconnect
from the template's "notify" signal while changing all values.
2003-04-04 Sven Neumann <sven@gimp.org>
Applied a patch from yvind Kols that adds supersampling to the
transform operations (bug #109817):
* app/base/tile-manager-private.h
* app/base/tile-manager.[ch]: cache the last accessed tile and use
it to optimize read_pixel_data_1().
* app/core/gimpdrawable-transform-utils.c
* app/core/gimpdrawable-transform.c: changed the resampling
behavior when scaling down.
2003-04-03 Michael Natterer <mitch@gimp.org>
Added preliminary support for image templates. Not finished
yet. Addresses bug #96059. Now we need a volunteer to create
a nice collection of default templates...
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimptemplate.[ch]
* app/core/gimp-templates.[ch]: new files implementing the new
GimpTemplate object and the list of available image templates.
* app/core/gimp.[ch]: keep a container of templates around.
* app/core/gimpimage-new.[ch]: ported to use GimpTemplate. Removed
struct GimpImageNewValues.
* app/widgets/gimpcontainermenuimpl.c: changed to show the
"(none)" item for a NULL selection also, not only for an empty
container.
* app/widgets/gimppropwidgets.[ch]: added
gimp_prop_size_entry_connect() which connects an externally
created GimpSizeEntry to object properties. Fixed the size entry
code to actually work.
* app/gui/image-menu.c
* app/gui/file-commands.[ch]: added "Save as Template" which
creates a new template from any image's properties.
* app/gui/file-new-dialog.c: use prop_widgets and GimpTemplate.
Offer the available templates in a menu at the top of the dialog.
2003-04-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpimagefile.c: reverted my last "fix" and fixed the
real bug: "tEXt::Thumb::Size" is optional, so don't fail if it's
not present. Plugged some memleaks.
2003-04-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpmarshal.list: added VOID__DOUBLE_DOUBLE
* app/widgets/gimpnavigationpreview.[ch]: applied patch from
Pedro Gimeno that fixes mapping of preview scroll offsets to
image scroll offsets. Changed the x, y, width, height members
from gint to gdouble. Changed the external API to use exact
doubles instead of rounded ints.
* app/display/gimpnavigationview.c: speak to the navigation
preview in exact double values.
Alltogether fixes bug #109648.
2003-03-30 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-resize.c (gimp_image_resize): fixed to check
the *new* guide position to be within bounds, not the old
one. Cleanup.
* app/core/gimpimage-undo-push.c (undo_pop_image_guide): undo
guide removal and moves manually instead of calling
gimp_image_[add|move]_guide() because the latter may run into
g_return_if_fail(position <= gimage->width/height) if the undo
step is part of a resize or crop undo group.
2003-03-30 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-guides.c
* tools/pdbgen/pdb/guides.pdb: fixed to accept guide->position ==
image->width/height. Guides live *between* pixels, so they must be
able to exist right of/below the image's rightmost/bottom pixel.
* app/core/gimpimage-crop.c (gimp_image_crop_adjust_guides):
fixed guide iteration to not crash when the current guide is
removed from the image (fixes bug #109533).
* app/pdb/guides_cmds.c: regenerated.
2003-03-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-guides.[ch]: added "position" and "push_undo"
parameters to gimp_image_add_[vh]guide(). Start with a refcount
of 1, not 0 (EEK). Added gimp_image_guide_[un]ref(). Added
"position" parameter to gimp_image_add_guide(). Added new
function gimp_image_move_guide(). All functions push guide
undos correctly and call gimp_image_update_guide() so this
doesn't need to be done by callers.
* app/core/gimpimage-crop.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-undo-push.c
* app/core/gimpimage.c
* app/tools/gimpmeasuretool.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/guides.pdb: greatly simplyfied all places which
modify guides: don't fiddle with undo and guide properties
manually but simply use the API provided.
* app/tools/gimpmovetool.[ch]: ditto. Changed everything to
create/move the guide on button_release, not button_press. Enable
canceling the operation by clicking button3 before releasing
button1. Keep the guide drawn at its old position until the move
is finished (fixes bug #75349 and bug #109267).
* app/pdb/guides_cmds.c: regenerated.
2003-03-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_save_thumbnail):
call gimp_imagefile_update() on success. Ensures that the
previews are updated whenever we write the thumbnail.
2003-03-27 Sven Neumann <sven@gimp.org>
* app/core/gimplist.[ch]: added new function gimp_list_sort().
* app/text/gimpfontlist.c (gimp_font_list_restore): sort the list
after all fonts have been added instead of keeping the list in
order while inserting
2003-03-27 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.list: added a new marshaller.
* app/widgets/gimpcontainergridview.[ch]: added a "move_cursor"
signal and added keybindings for PageUp/PageDown and Home/End.
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/config/gimpcoreconfig.[ch]: added "gchar *default_font".
* app/config/gimprc-blurbs.h: and its blurb.
* app/core/gimp.[ch]: keep a GimpFontList around.
* app/core/gimpcontext.[ch]: added a GimpFont and all needed
fonctions to let it work like brush, pattern etc.
* app/core/gimpdatalist.c: cosmetic.
2003-03-25 Sven Neumann <sven@gimp.org>
* app/text/gimptext.c: include locale.h for setlocale().
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/widgets/Makefile.am: changed rules that generate enums code
to include gimp-intl.h instead of libgimp-intl.h.
* tools/pdbgen/app.pl
* tools/pdbgen/pdb/*.pdb: include gimp-intl.h.
2003-03-25 Sven Neumann <sven@gimp.org>
* Makefile.am
* gimpintl.h: removed this header file.
* gimpmiscui.c: include libgimp-intl.h.
* gimp.c (gimp_main): call setlocale() and bind to the libgimp
textdomain so that plug-ins don't need to do that explicitely.
* libgimp/stdplugins-intl.h: added the functionality that used to
live in gimpintl.h and removed the libgimp related stuff. Got rid
of the INIT_I18N_UI() macro.
* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
Plug-ins simply call INIT_I18N() once in their run() function.
* plug-ins/script-fu/script-fu-intl.h: added the functionality
that used to live in gimpintl.h and removed the libgimp related
stuff.
* app/Makefile.am
* app/gimp-intl.h: new file that defines the gettext macros for
the GIMP core.
* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.
* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: added new functions
gimp_image_active_[layer|channel|vectors]_changed() which emit the
resp. signals.
* app/core/gimpimage-undo-push.c (undo_pop_layer,channel,vectors):
fixed them to not leave the image's active layer, channel, vectors
pointers undefined (fixes bug #109110). Call gimp_item_removed()
from all of them.
* app/core/gimpimage-qmask.c: cleanup.
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c: use GIMP_STOCK_IMAGE as default_stock_id.
* app/widgets/gimppreviewrendererimage.[ch]: use GimpChannelType
to specify the channel to render and convert it to the pixel index
using gimp_image_get_component_index() when needed. Use the new
red, green, blue, gray and alpha icons when layer_previews is
FALSE.
* app/widgets/gimpcomponenteditor.c: changed accordingly.
2003-03-24 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpimage-preview.[ch]: moved the image preview code
to separate files.
* app/core/gimpimage.c: removed the functions here. Removed the
new utility function gimp_image_previews_resize() because it
did exactly what gimp_image_size_changed() should do. Moved
the missing bits to gimp_image_size_changed().
* app/core/gimplayer.c (gimp_layer_apply_mask): call
gimp_viewable_invalidate_preview() only if we don't call
gimp_drawable_update(). Calling them both is redundant.
2003-03-23 Sven Neumann <sven@gimp.org>
* app/core/gimplayer.c
* app/gui/image-menu.c
* app/gui/layers-menu.c: there doesn't seem to be a good reason to
disallow the creation of layer masks on indexed images.
2003-03-23 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_new_from_component): use
gimp_image_get_component_index() instead of doing the switch()es
manually.
2003-03-22 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-preview.c
* app/core/gimpimage.c (get_preview_size): return square
dimensions in config->layer_previews is FALSE (except if the size
is requested for a popup).
(get_popup_size): don't crete popups if config->layer_previews
is FALSE.
* app/core/gimpimage.c: added utility function
gimp_image_previews_resize() and call it on "notify::layer-previews".
Calls gimp_viewable_size_changed() on all drawables of the image
and on the image itself. Ensures that drawable/image previews
toggle their size correctly when toggling layer_previews.
* app/widgets/gimpselectioneditor.c: create the selection preview
as a popup so it keeps the image's aspect ratio when
layer_previews is FALSE.
2003-03-22 Sven Neumann <sven@gimp.org>
* themes/Default/images/stock-channel-16.png
* themes/Default/images/stock-channel-24.png
* themes/Default/images/stock-layer-16.png
* themes/Default/images/stock-layer-24.png: new icons provided by
Jimmac.
* themes/Default/images/stock-eye-12.png
* themes/Default/images/stock-linked-12.png: tiny visibility and
linked icons that I created from Jimmac's small versions by
scaling them down. Should probably be redone.
* libgimpwidgets/gimpstock.[ch]: allow to register multiple sizes
for the same stock_id. Added new icons.
* app/core/gimpchannel.c
* app/core/gimplayer.c: set default stock_ids so the new icons are
used when layer previews are disabled.
2003-03-20 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-new.c (gimp_image_new_values_new): default
the fill_type to GIMP_BACKGROUND_FILL (as in gimp_initialize()).
* app/gui/file-commands.c
* app/gui/file-new-dialog.c: made more dialogs transient for their
parent window.
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpimageeditor.c
* app/widgets/gimpundoeditor.c: simplified a little bit.
2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as
GdkModifierType instead of guint.
* app/core/gimpmarshal.list
* app/widgets/gimpcellrenderertoggle.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimppreview.c: use proper marshallers for signals
that take flags as parameters.
* app/core/gimpcontext.c: added the G_SIGNAL_TYPE_STATIC_SCOPE flag
to the GimpRGB signal parameter.
2003-03-20 Sven Neumann <sven@gimp.org>
* libgimpwidgets/libgimpwidgets.types
* libgimpwidgets/tmpl/gimpbutton.sgml
* libgimpwidgets/tmpl/gimppickbutton.sgml: improved.
2003-03-20 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplay.[ch]: removed gdisp->draw_guides
and gdisp->snap_to_guides.
* app/display/gimpdisplayshell.[ch]: added shell->snap_to_guides.
Added the state of guide, selection and active_layer visibility to
the GimpDisplayShellVisibility struct so they can be configured
separately for fullscreen mode. Update the popup_factory in
gimp_display_shell_real_scaled() only if this is the active
display.
* app/display/gimpdisplayshell-appearance.[ch]: added accessors
for selection, active_layer and guide visibility.
* app/display/gimpdisplayshell-selection.[ch]: changed
accordingly. Changed the selection and active_layer toggle
functions to *_set_hidden().
* app/display/gimpdisplayshell-callbacks.c
* app/gui/image-menu.c
* app/gui/view-commands.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpmovetool.c: changed accordingly.
* app/gui/gui.c (gui_display_new): update the menubar_factory
*after* making the new display the active one.
2003-03-19 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: added GIMP_UNDO_GROUP_MASK.
* app/tools/gimpeditselectiontool.c: use it for mask moving.
Made the "undo_desc" strings more specific.
* app/core/gimpundo.c: add it to the list of undo types for
which mask previews are created.
* app/core/gimpimage.c: s/Add Layer to Image/Add Layer/g etc.
2003-03-18 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch] (gimp_image_mask_translate)
* app/core/gimplayer.[ch] (gimp_layer_translate): added
"gboolean push_undo" parameters.
* app/core/gimpimage-crop.c
* app/core/gimpimage-resize.c
* app/display/gimpdisplayshell-dnd.c
* app/gui/layers-commands.c
* app/widgets/gimptoolbox.c
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/layer_cmds.c
* app/pdb/selection_cmds.c: regenerated.
* app/core/gimpimage-undo-push.c (undo_pop_layer_displace): call
gimp_layer_translate() with "push_undo == FALSE" instead of
duplicating gimp_layer_translate()'s code. Use GimpItemUndo for
GIMP_UNDO_MASK.
* app/tools/gimpeditselectiontool.c
(gimp_edit_selection_tool_cursor_key): check if the top undo on
the stack is of exactly the same type as the undo we would push
and just don't push it then (compresses layer translate undos and
fixes bug #86362). Changed stuff work with CAPS_LOCK or other
modifiers pressed.
2003-03-18 Michael Natterer <mitch@gimp.org>
Added an API for image colormap manupulation and made colormap
changes undoable (fixes bug #25963).
* app/core/Makefile.am
* app/core/gimpimage-colormap.[ch]: new files implementing
colormap getters/setters. The setters push undos using the
new function below.
* app/core/core-enums.[ch]: added GIMP_UNDO_IMAGE_COLORMAP.
* app/core/gimpimage-undo-push.[ch]: added
gimp_image_undo_push_image_colormap(). Use GimpItemUndo even more
often. Cleanup.
* app/core/gimpimage.[ch]: removed gimp_image_get_colormap() here.
* app/core/gimpimage-convert.c
* app/gui/colormap-editor-commands.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimptoolbox.c
* tools/pdbgen/pdb/image.pdb: use the new API.
* app/pdb/image_cmds.c: regenerated.
* plug-ins/common/vinvert.c: removed the comment about the bug,
cosmetic cleanup.
Unrelated:
* app/gui/splash.c: added a frame around the splash. Please eek
if it doesn't please you.
2003-03-17 Michael Natterer <mitch@gimp.org>
Made drawable/layer properties (visibility, opacity etc.)
undoable (fixes bug #73893).
* app/core/core-enums.[ch]: added undo types/groups for
visibility, mode, opacity, linked and preserve_trans.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a
ref'ed GimpItem pointer so (1) this doesn't need to be done by all
undo steps related to an item and (2) the item the undo step is
for can be determined from outside the undo system.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item()
which returns a new GimpItemUndo.
* app/core/gimpimage-undo-push.[ch]: use it for all item related
undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable
and GimpVectors pointers from the private undo structs. Added
undo push functions for the new undo types added above.
* app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added
"gboolean push_undo" parameter.
* app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode,
_preserve_trans, _linked): added "gboolean push_undo" parameters.
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-load.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c: changed accordingly.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to
the foo_accessors() functions. Removed $func from foo_accesors()
because we don't manipulate items without using getters/setters
any longer.
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c: regenerated.
* app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal
which carries an additional "GdkModifierType state" parameter as
in GimpCellRendererViewable .
* app/widgets/gimpcontainertreeview.c: emit "clicked" from
the toggle renderer, not "toggled" so the callbacks get the
modifier state.
* app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive
visible by <shift>+click" feature as in 1.2.
* app/widgets/gimplayertreeview.c: compress layer opacity undos by
looking at the top of the undo stack and not pushing an undo if
there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active
layer.
2003-03-17 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-utils.[ch]: added the new function
gimp_config_string_append_escaped(), see inline docs.
* app/config/gimpconfig-serialize.c
* app/config/gimpconfigwriter.c
* app/core/gimpcontainer.c: use the new function instead of
g_strescape().
2003-03-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem.[ch]: added virtual function rename() which
pushes an item rename undo. Added "default_name" and "rename_desc"
to the GimpItemClass struct which are used as default values.
* app/core/gimplayer.c: implement it and special-case floating
selections. set item_clas->default_name and item_class->rename_desc.
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: set item_class->default_name and
item_class->rename_desc.
* app/widgets/gimpitemtreeview.[ch]: removed rename_item() virtual
function and call gimp_item_rename().
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly.
2003-03-16 Michael Natterer <mitch@gimp.org>
Added GtkTreeView versions of layers/channels/vectors:
* app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES
to GIMP_UNDO_GROUP_ITEM_PROPERTIES.
* app/core/gimpcontainer.c (gimp_container_reorder): don't try
to reorder containers with num_children == 1.
* app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpchanneltreeview.[ch]
* app/widgets/gimpdrawabletreeview.[ch]
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimplayertreeview.[ch]
* app/widgets/gimpvectorstreeview.[ch]: new widgets.
* app/widgets/gimpcellrenderertoggle.c: draw the frame only if the
cell is prelit.
* app/widgets/gimpcellrendererviewable.[ch]: added "clicked"
signal, unref the renderer in finalize(). Set the renderer's
border color to black if the cell is not selected (a hack that
saves tons of code in GimpLayerTreeView).
* app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set()
stuff we just got from the store.
* app/widgets/gimpcontainertreeview.[ch]: added lots of state used
by the new subclasses to the GimpContainerTreeView struct. Create
the GtkListStore/GtkTreeView in GObject::constructor() and only
collect parameters in init() so subclasses can modify store/view
creation. Do most of the button_press_event stuff manually and
return TRUE from the handler.
* app/widgets/gimpcontainerview.c: cleanup.
* app/widgets/gimpitemlistview.h
* app/widgets/gimpvectorslistview.h: temp hacks before they die.
* app/widgets/gimppreviewrenderer.[ch]: added
gimp_preview_renderer_update_idle() which idle-emits "update"
without invalidating.
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs.c: added constructors for the new dialogs.
* app/gui/channels-commands.c
* app/gui/channels-menu.c
* app/gui/layers-commands.c
* app/gui/layers-menu.c
* app/gui/vectors-commands.c
* app/gui/vectors-menu.c: accept tree views as callback data.
2003-03-13 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h: made the GimpPreviewSize enum values a
little bit smaller. What used to be small is now called medium.
* app/config/gimpcoreconfig.c
* app/gui/dialogs.c: changed accordingly.
2003-03-12 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: added descriptions to the
GimpChannelType enum.
* app/core/gimpimage.[ch]: added gimp_image_get_component_index()
utility function which does the GIMP_RED_CHANNEL -> RED_PIX etc.
mapping. Use it in all component getters/setters.
* app/widgets/gimpcomponenteditor.[ch]: new widget implementing
the component list using GtkListStore/GtkTreeView. Still a bit
ugly because it uses the standard check instead of the eye icon.
* app/widgets/gimpcomponentlistitem.[ch]: removed.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpvectorslistview.c: changed accordingly.
* app/widgets/gimpchannellistview.[ch]: create a GimpComponentEditor
and removed the old GtkList based stuff.
* app/widgets/gimpitemlistview.[ch]: keep around a pointer to the
GimpMenuFactory passed to the constructor.
* app/gui/channels-menu.c (channels_menu_update): do the right
thing if "data" is a GimpComponentEditor.
* app/gui/channels-commands.[ch]: ditto. Implemented duplicating
of components and component to selection (bug #61018).
2003-03-12 Sven Neumann <sven@gimp.org>
* app/core/gimpchannel.[ch]: added gimp_channel_new_from_component()
which creates a new GimpChannel from an image's color component.
* app/gui/channels-commands.[ch]: added
channels_duplicate_component_cmd_callback().
* app/paint-funcs/paint-funcs-generic.h
* app/paint-funcs/paint-funcs.[ch]: added code to extract a color
component from a PixelRegion (untested!).
* plug-ins/common/checkerboard.c: cosmetics.
2003-03-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_create_thumbnail),
(gimp_imagefile_save_thumbnail)
* app/gui/file-open-dialog.c (file_open_create_thumbnails): don't
create thumbnails if core_config->layer_previews is FALSE
(bug #107242).
* app/file/file-save.c (file_save_as): call
gimp_imagefile_save_thumbnail() unconditionally since it does all
the needed checks itself.
2003-03-11 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.[ch]: made gimp_image_get_active_components()
a static function and changed its behaviour so that the image's
active components are only used for layers, not for channels.
Fixes bug #108083.
2003-03-10 Michael Natterer <mitch@gimp.org>
* app/core/gimppalette.[ch]: added GimpData::duplicate()
implementation so read-only palettes can be edited again by
duplicating them first.
* app/gui/dialogs-constructors.c: pass the <Palettes>, not the
<Gradients> menu identifier to the palette grid and tree view
constructors (spotted by Tigert).
2003-03-10 Sven Neumann <sven@gimp.org>
* app/config/gimpconfigwriter.[ch]: fixed creation of config file,
added new function gimp_config_writer_string() and improved
gimp_config_writer_linefeed().
* app/config/gimpconfig-serialize.c
* app/core/gimpcontext.c
* app/core/gimpdocumentlist.c: use gimp_config_writer_string()
instead of escaping the string manually.
* app/core/gimpunits.c (gimp_unitrc_save): use a GimpConfigWriter.
* app/plug-in/plug-in-rc.[ch] (plug_in_rc_write)
* app/plug-in/plug-ins.c: use a GimpConfigWriter.
2003-03-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpdatalist.c (gimp_data_list_uniquefy_data_name): use
gimp_data_list_data_compare_func(), not just strcmp(), so the
ordering of internal items is correct.
2003-03-06 Michael Natterer <mitch@gimp.org>
* themes/Default/images/stock-delete-16.png
* themes/Default/images/stock-lower-16.png
* themes/Default/images/stock-new-16.png
* themes/Default/images/stock-paste-16.png
* themes/Default/images/stock-raise-16.png
* themes/Default/images/stock-refresh-16.png: removed these files
since we use the icons provided by GTK+ now.
* themes/Default/gtkrc
* themes/Default/images/Makefile.am: removed them here hoo.
* libgimpwidgets/gimpstock.[ch]: reordered stuff to be consistent
in the header and the .c file. Added GIMP_STOCK_ERROR and
GIMP_STOCK_QUESTION which are available in all sizes (unlike
GTK_STOCK_DIALOG_ERROR and GTK_STOCK_DIALOG_QUESTION).
* app/core/gimpviewable.c
* app/display/gimpdisplayshell.c
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/file-save-dialog.c
* app/widgets/gimpwidgets-utils.c
* app/widgets/gimpdatafactoryview.c: use the new stock IDs.
* app/config/gimpcoreconfig.[ch]: renamed "preview_size" to
"layer_preview_size" and added "gboolean layer_previews" which
switches layer previews on/off independent of their size.
* app/config/gimprc-blurbs.h: added/changed their blurbs.
* app/core/core-enums.[ch]: removed GIMP_PREVIEW_SIZE_NONE.
* app/core/gimpdrawable-preview.c
* app/core/gimpdrawable.c
* app/core/gimpimage.c: return NULL previews if
core_config->layer_previews is FALSE. Invalidate all layer/channel
previews whenever "layer_previews" changes.
* app/widgets/gimppreviewrendererdrawable.c
* app/widgets/gimppreviewrendererimage.c: render the stock_id
if the drawable/image returns a NULL preview. Fixes bug #107242.
* app/display/gimpdisplayshell-handlers.c: don't set the
sensitivity of the navigation button because it can no longer be
disabled.
* app/display/gimpdisplayshell-layer-select.c
* app/gui/dialogs-constructors.c
* app/gui/dialogs.c
* app/gui/paths-dialog.c: changed accordingly.
* app/gui/preferences-dialog.c: added a toggle button for the new
"layer_previews" boolean.
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerlistview.c: chain up unconditionally
in GimpContainerView::clear_items().
* app/widgets/gimpcontainertreeview.c: ditto. Made the reorder()
implementation lengthy and eeky (but working) again... Stop signal
emission on double clicks so GtkTreeView doesn't re-select the
item we are about change.
* app/widgets/gimpcontainerview.c
(gimp_container_view_real_clear_items): need to use
g_hash_table_new_full() here too or everything will b0rk.
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_default_render_stock): use
gtk_widget_render_icon() instead of gtk_icon_set_render_icon().
* tools/pdbgen/enums.pl: this file wanted to be regenerated...
2003-03-06 Sven Neumann <sven@gimp.org>
* app/core/gimpparasitelist.c: fixed parasite serialization that
I broke yesterday.
* app/widgets/gimpenummenu.c: added support for mnemonics.
* app/core/core-enums.h: removed the inverted variants from the
GimpAddMaskType enum. Registered the enum with the type system.
* app/core/gimplayer.c: changed accordingly.
* app/gui/layers-commands.c (layers_add_mask_query): use an enum
frame and added a check button that allows to invert the inital
layer mask.
* tools/pdbgen/pdb/layer.pdb: updated documentation for the
gimp-layer-create-mask PDB function.
* plug-ins/script-fu/siod-wrapper.c: removed new enum values from
the compatibility defines.
* app/core/core-enums.c
* app/pdb/layer_cmds.c
* libgimp/gimpenums.h
* libgimp/gimplayer_pdb.c
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
2003-03-03 Hans Breuer <hans@breuer.org>
* app/text/makefile.msc (new file)
*/makefile.msc */*/makefile.msc : updated
* app/core/gimpdata.c : define access() constants
for G_OS_WIN32 case
* app/text/gimptext.c : <stdlib.h> for getenv()
* libgimp/gimp.def libgimp/gimpui.def : updated externals
* libgimpwidgets/libgimp-glue.c : make dynamic_resolve
actually work again for 'my' DLL naming convention
* plug-ins/gap/gap_pdb_calls.c : reflect renaming
of GIMP_VERTICAL to GIMP_ORIENTATION_VERTICAL
2003-03-03 Michael Natterer <mitch@gimp.org>
* app/core/gimplayer.c (gimp_layer_create_mask): don't try to
convert a grayscale layer to grayscale. Fixes bug #107422.
2003-03-01 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppreviewrenderer.[ch]: added "gint bytes" to the
GimpPreviewRenderer struct and pass it to
gimp_preview_render_to_buffer().
* app/widgets/gimppreviewrendererbrush.[ch]: render the indicators
to the renderer's buffer, not to the TempBuf so they always appear
in the corner again.
Misc cleanups:
* app/core/gimpbuffer.c (gimp_buffer_get_new_preview)
* app/core/gimppattern.c (gimp_pattern_get_new_preview): no need
to center the TempBuf if smaller than requested because
GimpPreviewRenderer::render()'s default implementation adjusts the
offsets itself.
* app/widgets/gimppreview.c (gimp_preview_set_viewable): no need
to update ourselves after we changed the renderer because the
renderer's signal will update us.
* app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_draw):
replaced my stupid buf_rect calculation overkill by something
simple that does the same.
2003-03-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpbuffer.c: don't scale the preview up if the
buffer is too small.
* app/core/gimppattern.c: don't add a white border around the
preview if the pattern is too small.
* app/widgets/gimppreviewrenderer.[ch]: new object. A buffer
that updates itself on GimpViewable changes and can render
itself to any widget. Basically GimpPreview reduced to the
render and draw code.
* app/widgets/gimppreview.[ch]: removed all rendering and drawing
code and keep a GimpPreviewRenderer instance. Connect to its
"update" signal for queuing draws on the preview.
* app/widgets/gimpcellrendererviewable.[ch]
* app/widgets/gimpcontainertreeview.c: same here: removed
rendering and drawing code and keep GimpPreviewRenderers in the
list store. Delays preview creation for GtkTreeViews until the
buffer is really needed for drawing and adds idle preview updating
on viewable changes.
* app/widgets/gimppreview-utils.[ch]
* app/widgets/gimpbrushpreview.[ch]
* app/widgets/gimpbufferpreview.[ch]
* app/widgets/gimpdrawablepreview.[ch]
* app/widgets/gimpimagepreview.[ch]: removed...
* app/widgets/gimppreviewrenderer-utils.[ch]
* app/widgets/gimppreviewrendererbrush.[ch]
* app/widgets/gimppreviewrendererdrawable.[ch]
* app/widgets/gimppreviewrendererimage.[ch]: ...and converted to
GimpPreviewRenderer subclasses.
* app/display/gimpnavigationview.c
* app/gui/palette-import-dialog.c
* app/widgets/Makefile.am
* app/widgets/widgets-enums.h
* app/widgets/widgets-types.h
* app/widgets/gimpchannellistview.c
* app/widgets/gimpcomponentlistitem.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainermenuimpl.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplistitem.c
* app/widgets/gimpnavigationpreview.[ch]
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpvectorslistview.c: changed accordingly.
2003-02-28 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-deserialize.c
* app/config/gimpconfig-serialize.[ch]: transparently serialize
and deserialize object properties that implement the
GimpConfigInterface.
* app/config/gimpconfig-utils.c (gimp_config_reset_properties):
call reset recursively if properties are itself objects that
implement the GimpConfigInterface.
* app/config/gimpconfig-dump.c: adapt to API changes.
* app/config/gimpconfig-params.h: made object properties installed
using GIMP_CONFIG_INSTALL_PROP_OBJECT() be not writable by default.
* app/core/gimpcontext.c (gimp_context_class_init): made objects
properties explicitely writeable.
* app/tools/gimptextoptions.c: made the GimpText object a property
of GimpTextOptions and removed lots of special handling which is
now transparently done by GimpConfigInterface.
2003-02-28 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-serialize.[ch]: renamed
gimp_config_serialize_changed_properties() to
gimp_config_serialize_properties_diff() and added a new function
gimp_config_serialize_changed_properties() that saves only
properties that have been changed from their default values.
* app/config/gimprc.c: follow the function name change.
* app/core/gimpcontext.c: override GimpConfigInterface::serialize
with gimp_config_serialize_changed_properties() so we store only
tool_options that have been changed from their default values.
2003-02-27 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added virtual function
get_popup_size() which returns a boolean indicating if a popup is
needed and its size.
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c
* app/core/gimpbuffer.c
* app/core/gimpdrawable-preview.[ch]
* app/core/gimpdrawable.c
* app/core/gimpgradient.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimpundo.c: implement it.
* app/widgets/gimppreview.[ch]: removed virtual functions
needs_popup() and create_popup(). Removed the code which creates
the popup and the popup members of the GimpPreview struct.
* app/widgets/gimppreview-popup.[ch]: new files providing the
utility function gimp_preview_popup_show() which can show popups
from any widget, not just from a GimpPreview. Checks if a popup is
needed using gimp_viewable_get_popup_size().
* app/widgets/gimpcellrendererviewable.c: show popups here too.
* app/widgets/gimpbrushpreview.c
* app/widgets/gimpbufferpreview.c
* app/widgets/gimpdrawablepreview.c
* app/widgets/gimpimagepreview.c: removed needs_popup() and
create_popup() implementations.
* app/widgets/gimpnavigationpreview.c: removed empty render()
implementation.
* app/widgets/gimpundoeditor.c: use a tree instead of a list view.
* app/widgets/gimpgradientpreview.[ch]
* app/widgets/gimppalettepreview.[ch]
* app/widgets/gimppatternpreview.[ch]: removed because they only
implemented the removed popup functions.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpmenuitem.c
* app/widgets/gimppreview-utils.c: changed accordingly
2003-02-26 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-serialize.c (gimp_config_serialize_properties):
don't insert an extra line-break after a serialized property.
* app/config/gimpconfig-serialize.c
* app/config/gimpconfig-dump.c
* app/gui/tips-parser.c: use g_string_truncate (str, 0) instead of
assigning an empty string.
* app/tools/gimptextoptions.c: override the serialize and
deserialize methods of the GimpConfig interface and save/restore
the associated GimpText object instead of GimpTextOptions.
* app/tools/tool_options.c (gimp_tool_options_build_filename):
don't append ".default" if no extension is given.
2003-02-26 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.[ch]: added a writeable field to GimpData and
set it from gimp_data_set_filename().
* app/gui/brushes-menu.c
* app/gui/gradients-menu.c
* app/gui/palettes-menu.c
* app/gui/patterns-menu.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpgradienteditor.c: look at data->writeable when
setting widgets sensitivity.
* app/gui/user-install-dialog.c (user_install_dialog_create): reduce
some of the dialog clutter by not showing the directories created for
plug-ins.
* app/core/gimpviewable.[ch]: added a default_stock_id to
GimpViewableClass so we don't need to hold a copy in each instance.
Added accessor functions to set and get the stock_id.
* app/core/gimptoolinfo.c
* app/gui/dialogs-constructors.c
* app/gui/image-menu.c
* app/tools/gimpcroptool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimppreview.c
* app/widgets/gimptoolbox.c: use gimp_viewable_get_stock_id().
* app/text/gimptextlayer.c: set a text icon as default stock_id.
2003-02-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.[ch]: added "gchar *stock_id" to the
GimpViewable struct. It is used by the GUI if the get_preview()
functions return NULL. Default to GTK_STOCK_DIALOG_QUESTION.
* app/core/gimptoolinfo.[ch]: set the tool's stock_id. Removed
the cached GdkPixbuf. Don't implement any preview function
so the GUI uses the stock_id.
* app/tools/tool_manager.c: removed GdkPixbuf creation, removed
the #warning about the buggy way we created the pixbuf.
* app/gui/dialogs-constructors.c
* app/gui/image-menu.c
* app/tools/gimpcroptool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* app/widgets/gimptoolbox.c: use viewable->stock_id instead
of tool_info->stock_id.
* app/core/gimpbrush.c
* app/core/gimpgradient.c
* app/core/gimpimagefile.c
* app/core/gimpundo.c: simplified get_preview() implementations:
- never scale previews up, only down.
- don't render white or checks backgrounds but simply return
TempBufs with alpha and let the preview system do its job.
- don't add padding but simply return previews smaller than
requested.
* app/display/gimpdisplayshell-render.[ch]: added
"render_blend_white", a 2d lookup table for blending on white,
just as the check lookup tables. Added "render_white_buf".
* app/widgets/gimppreview.[ch]: changed a lot:
- don't render the preview's border into the buffer.
- added "GdkGC *border_gc" and draw the preview's border in expose()
using gdk_draw_rectangle().
- added "GdkPixbuf *no_preview_pixbuf" and create it in
gimp_preview_real_render() if gimp_viewable_get_preview()
returned NULL.
- factored the actual preview rendering out to
gimp_preview_render_to_buffer(). Added configurable background
rendering for the preview itself and it's padding area
(the area the preview is larger than the buffer returned
by gimp_viewable_get_preview()).
- changed gimp_preview_render_and_flush() to
gimp_preview_render_preview() and added "inside_bg" and
"outside_bg" parameters.
- use the new render buffers for blending on white.
* app/widgets/gimpbrushpreview.c
* app/widgets/gimpbufferpreview.c
* app/widgets/gimpdrawablepreview.c
* app/widgets/gimpgradientpreview.c
* app/widgets/gimpimagepreview.c
* app/widgets/gimppalettepreview.c
* app/widgets/gimppatternpreview.c: don't create large white
TempBufs to center the previews in but simply set the TempBuf's
offsets to get them centered. Simplified & cleaned up many preview
render functions. Pass the correct GimpPreviewBG modes to
gimp_preview_render_preview().
* app/widgets/gimpcellrendererviewable.[ch]: new GtkCellRenderer
class derived from GtkCellRendererPixbuf which knows how
to use gimp_viewable_get_preview_size() and renders the
viewable's stock item if no preview can be created.
* app/widgets/gimpcontainertreeview.c: added a GtkTreeCellDataFunc
which creates the preview pixbuf if needed so we don't create it
unconditionally upon item insertion. Fixed preview size assertion
to use GIMP_PREVIEW_MAX_SIZE, not "64". Block "selection_changed"
while reordering the selected item.
* app/widgets/gimpcontainerview.c: cosmetic.
* app/widgets/gimpimagefilepreview.[ch]
* app/widgets/gimptoolinfopreview.[ch]
* app/widgets/gimpundopreview.[ch]: removed because the default
implementation is good enough.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimppreview-utils.c: changed accordingly.
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs-menu.c
* app/gui/dialogs.c
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: register grid and tree view variants
of the document history.
Unrelated:
* app/gui/gui.c (gui_exit_finish_callback): disconnect from
signals earlier.
* app/gui/user-install-dialog.c: create the "tool-options" subdir
of the user's ~/.gimp-1.3 directory.
2003-02-21 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-render.c (render_image_rgb):
replaced a for-loop with a call to memcpy().
* app/display/gimpdisplay.c: use g_memdup() instead of g_new()
followed by memcpy().
2003-02-21 Michael Natterer <mitch@gimp.org>
Refactored the GimpDisplayShell update/draw code:
* app/display/gimpdisplayshell.[ch]: removed the display_areas
list which used to hold the GimpAreas to update. Instead, simply
queue draws using gtk_widget_queue_draw[_area]() in
gimp_display_shell_expose_area(), _expose_full() and
_expose_guide(). Made all _draw() functions public because they
are now called from the "expose_event" handler. Removed rendering
from gimp_display_shell_flush() because stuff is now flushed
automatically by the gtk idle renderer.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_expose): draw everything here (the code
removed from gimp_display_shell_flush() without the GimpArea list).
(gimp_display_shell_canvas_tool_events): return "return_val", not
TRUE if gimp->busy is TRUE. Fixes unupdated (windowk bg color)
display areas. Fixes bug #106595.
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-cursor.c
* app/display/gimpdisplayshell-filter-dialog.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-selection.c
* app/gui/view-commands.c: changed accordingly. Removed calls to
gimp_display_shell_flush() all over the place.
* app/display/gimpdisplayshell-scroll.c: replaced lots of code by
a single call to gdk_window_scroll().
2003-02-20 Michael Natterer <mitch@gimp.org>
Reimplemented the undo history:
* app/Makefile.am
* app/undo_history.[ch]: removed.
Changes/cleanups to the undo system to enable/simplify the new
undo history implementation:
* app/core/core-types.h: removed enum undo_event_t. Removed the
GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc
because GimpUndo has a GimpImage pointer now (see below).
* app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an
enum value for REDO_EXPIRED.
* app/core/gimpimage.[ch]: added a GimpUndo pointer to the
"undo_event" signal which needs to be passed for all events except
UNDO_FREE.
* app/display/gimpdisplayshell-handlers.c: changed accordingly.
* app/core/gimpundo.[ch]: added a GimpImage pointer to the
GimpUndo struct. Removed GimpImage parameters all over the
place. Added preview stuff. The preview creation needs to be
triggered explicitly using gimp_undo_create_preview() because the
GimpUndo can't know when it's possible to create the preview.
* app/core/gimpimage-undo-push.c
* app/paint/gimppaintcore-undo.c
* app/tools/gimptransformtool-undo.c: changed accordingly, cleanup.
* app/core/gimpundostack.[ch]: ditto. Return the freed undo from
gimp_undo_stack_free_bottom(). Removed unused container signal
handlers.
* app/core/gimpimage-undo.c: free the redo stack the same way old
undos are freed (from bottom up). Emit "undo_event" with event ==
REDO_EXPIRED for each removed redo.
* app/core/gimpmarshal.list: added new marshallers.
New undo history implementation:
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpundoeditor.[ch]
* app/widgets/gimpundopreview.[ch]: new widgets for the undo
step previews and the history itself.
* app/widgets/gimppreview-utils.c: added GimpUndoPreview to the
list of possible preview types.
* app/gui/dialogs-constructors.[ch]
* app/gui/dialogs-menu.c
* app/gui/dialogs.c
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: removed the old and added the new undo
history to the dialog factory and the various dialog menus.
* app/widgets/gimpdnd.[ch]: don't warn if a GType has no
corresponding DND type. Instead, return FALSE from the function
that failed.
* app/widgets/gimppreview.c: check the return value of gimpdnd
functions. Not only add drag sources but also remove them when no
longer needed.
* app/widgets/gimpselectioneditor.h: removed unneeded inclusion of
"gui/gui-types.h".
2003-02-18 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/procedural_db.pdb
* app/pdb/procedural_db_cmds.c: use regfree() to free the regex
pattern buffer.
* app/widgets/gimpdnd.c (gimp_dnd_data_dest_add): unref the
GtkTargetList after adding it to the widget.
* app/core/gimpimage.c (gimp_image_get_new_preview): initialize
all fields of the mask pixel_region.
* app/core/gimpviewable.c (gimp_viewable_get_new_preview_pixbuf):
pass a destroy notifier to gdk_pixbuf_new_from_data() so that the
pixel data is freed with the pixbuf.
* libgimptool/gimptool.c (gimp_tool_class_init): register a
finalizer that unrefs the GimpToolControl object.
* app/widgets/gimpenummenu.c (gimp_enum_stock_box_new_with_range):
free the generated stock_id.
2003-02-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch] (gimp_image_position_*): added
"undo_desc" parameters.
* app/core/gimpimage-undo-push.c: changed accordingly.
* app/widgets/gimpitemlistview.[ch]: moved the item stack
manipulation function pointers from the instance to the class
struct. Added lots of descriptive strings to be used by tooltips
and undo steps.
* app/widgets/gimpchannellistview.c
* app/widgets/gimpitemlistitem.c
* app/widgets/gimplayerlistview.[ch]
* app/widgets/gimpvectorslistview.c
* app/gui/dialogs-constructors.c
* app/gui/layers-commands.[ch]
* app/gui/vectors-commands.c: changed accordingly. Cleanup.
2003-02-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpedit.c (gimp_edit_fill): pass more detailed
undo_desc strings instead of always "Fill".
* app/core/gimpimage-mask-select.c: changed undo_desc strings
to match the already existing blurbs of the selection tools.
2003-02-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-merge.[ch]: added "const gchar *undo_desc" to
gimp_image_merge_layers() so the undo steps say "Merge Down",
"Flatten Image" etc. instead of always "Merge Layers".
2003-02-14 Michael Natterer <mitch@gimp.org>
Fixed most of the bugs the Script-Fu logo scripts triggered:
* app/core/gimpdrawable-bucket-fill.[ch]
(gimp_drawable_bucket_fill): added "gboolean do_seed_fill"
parameter instead of assuming TRUE.
(gimp_drawable_bucket_fill_full): moved "color" and "pattern"
parameters to the end.
* app/tools/gimpbucketfilltool.c
* app/display/gimpdisplayshell-dnd.c
* app/widgets/gimpdrawablelistview.c: changed accordingly.
* tools/pdbgen/pdb/misc_tools.pdb: only pass TRUE if the selection
is empty. Restores old PDB behaviour.
* app/core/gimpimage-undo.c (gimp_image_undo_group_end): return
early if gimage->undo_on is FALSE. Fixes bogus criticals.
* app/core/gimpimage.c (gimp_image_add_[layer|channel|vectors]):
clamp the passed position to sane values before calling
gimp_container_insert() (Scripts adding layers at wrong indices
are broken but should not crash the core).
* tools/pdbgen/pdb/paint_tools.pdb: need to copy the relevant
paint parameters from the current context now that the paint
options are contexts themselves.
* tools/pdbgen/pdb/palette.pdb: removed useless includes.
(Mostly) fixed text PDB functions:
* app/text/gimptext-compat.[ch] (text_render): don't set
text->font_size = -1 but get the size from the PangoFontDescrition.
(text_get_extents): return the logical_rect, not the ink_rect
because the size of the created text layer will be the logical_rect.
* tools/pdbgen/pdb/text_tool.pdb: removed text_fontname_create()
utility function and the usage of pass_through and implement all
invokers in-place, using the correct parameters.
* plug-ins/script-fu/siod-wrapper.c: fixed BG-IMAGE-FILL compat
define so we can BG fill again. Cleaned up color handling code.
* plug-ins/script-fu/scripts/coolmetal-logo.scm
* plug-ins/script-fu/scripts/glossy.scm
* plug-ins/script-fu/scripts/land.scm
* plug-ins/script-fu/scripts/lava.scm
* plug-ins/script-fu/scripts/test-sphere.scm: use new gradient names.
* app/pdb/misc_tools_cmds.c
* app/pdb/paint_tools_cmds.c
* app/pdb/palette_cmds.c
* app/pdb/text_tool_cmds.c: regenerated.
2003-02-14 Sven Neumann <sven@gimp.org>
* app/core/gimplayermask.c (gimp_layer_mask_duplicate): return the
duplicate, not the original mask. Fixes bug #106010.
2003-02-13 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h: fixed use of proxy-resume and proxy-skip
trigraphs. We should get rid of these, they are so confusing.
* app/core/core-enums.c: regenerated.
* libgimpproxy/gimpproxytypes.h: this file was regenerated for no
good reason.
2003-02-12 Michael Natterer <mitch@gimp.org>
Moved the undo system to the core: Keep GimpUndoStack objects as
undo and redo stack. Use GimpUndo objects as members of the
stacks. GimpUndoStack is derived from GimpUndo and keeps undo
groups, so undo group handling is much simpler than before
(the whole group is just a single GimpUndo object on the
stack and not everything between group boundary markers).
* app/Makefile.am
* app/undo_types.h: removed.
* app/config/gimpcoreconfig.[ch]: added "gulong undo_size".
* app/config/gimprc-blurbs.h: and its blurb.
* app/core/core-enums.[ch]: added GimpUndoMode and GimpUndoType.
* app/core/core-types.h: removed UndoType, added GimpUndoAccumulator,
GimpUndoPopFunc and GimpUndoFreeFunc.
* app/core/gimpundo.[ch]: do everything the old "Undo" struct did.
Removed the virtual push() function and added free().
* app/core/gimpundostack.[ch]: keeps the new undo/redo stacks
and also acts as undo group.
* app/core/gimpimage-undo.[ch]: moved the undo apparatus here.
* app/core/gimpimage.[ch]: removed the old stuff.
* app/core/gimpmarshal.list: added marshaller needed for GimpUndo.
* app/undo.[ch]: removed the whole undo mechanism. Only the
actual undo pushing functions are left.
* app/undo_history.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/image-menu.c
* app/gui/preferences-dialog.c
* app/tools/gimpeditselectiontool.c: changed accordingly.
2003-02-10 Manish Singh <yosh@gimp.org>
* app/plug-in/plug-in.[ch]: added hooks for running plug-ins under
a memory debugger. Also, removed the args array from the PlugIn
structure, replacing with simply a variable for the path to the
plug-in (and one for a precalculated basename).
* app/plug-in/plug-in-debug.[ch]: helper routines for the above
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-proc.c
* app/plug-in/plug-in-progress.c: reflect new and renamed args members
* app/plug-in/Makefile.am: added plug-in-debug.[ch]
* app/core/core-types.h: added forward declaration for GimpPlugInDebug
* app/core/gimp.[ch]: added structure member for GimpPlugInDebug
* devel-docs/debug-plug-ins.txt: documented new feature
2003-02-10 Michael Natterer <mitch@gimp.org>
* app/tools/tool_options.[ch]: added a "const gchar *extension"
parameter to gimp_tool_options_[de]serialize(). Default to
"default" if NULL is passed.
* app/tools/tool_manager.[ch]: load the tool_options from the
default files in tool_manager_restore(), added tool_manager_save()
which saves the default files.
* app/app_procs.c: call tool_manager_save() on app exit.
* app/gui/tool-options-dialog.c: pass "user" when loading/saving
the user defaults. Changed tooltips of the load & save buttons.
2003-02-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.[ch]: simplified everything a lot by
merging the public GimpContextPropType enum with the internal
anonymous object property id enum. Removed the internal copy_prop
functions and handle property copying in a big switch() in
gimp_context_copy_property(). Removed the separate signal
connections for each property of the parent context and do the
same using a single "notify" handler. Emit "notify" signals all
over the place. Removed internal arrays which are no longer
needed due to enum merge and copy_property simplification.
Removed the array of signal names and use g_signal_name().
Removed gimp_context_unset_parent() and allow "parent" being NULL
in gimp_context_set_parent().
* app/tools/tool_manager.c
* app/widgets/gimpdevices.c: changed accordingly.
* libgimptool/gimptooltypes.h: changed GimpToolOptionsGUIFunc to
return a GtkWidget (the created tool options widget).
* libgimptool/gimptoolmodule.c: #include <gtk/gtk.h>
* app/tools/tool_options.[ch]: removed the "main_vbox" from the
GimpToolOptions struct. Changed gimp_tool_options_gui() to create
and return the main_vbox.
* app/tools/tool_manager.c: create the "This Tool has no Options"
label here if NULL was passed as "options_gui_func". Attach the
options widget to the tool_options object using
g_object_set_data().
* app/gui/tool-options-dialog.c: changed accordingly.
* app/tools/gimpairbrushtool.c
* app/tools/gimpblendoptions.[ch]
* app/tools/gimpbucketfilloptions.[ch]
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickeroptions.[ch]
* app/tools/gimpconvolvetool.c
* app/tools/gimpcropoptions.[ch]
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpflipoptions.[ch]
* app/tools/gimpinkoptions.[ch]
* app/tools/gimpmagnifyoptions.[ch]
* app/tools/gimpmeasureoptions.[ch]
* app/tools/gimpmoveoptions.[ch]
* app/tools/gimpselectionoptions.[ch]
* app/tools/gimpsmudgetool.c
* app/tools/gimptextoptions.[ch]
* app/tools/gimptransformoptions.[ch]
* app/tools/gimpvectoroptions.[ch]
* app/tools/paint_options.[ch]: return the options vbox from
all tool_options_gui functions.
2003-02-05 Sven Neumann <sven@gimp.org>
* libgimpbase/Makefile.am
* libgimpbase/gimputils.[ch]: added new files that hold the new
gimp_utf8_strtrim() routine; it might be useful in more places.
* libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories):
silently ignore directories in the path that can't be opened.
* app/core/gimpobject.c (gimp_object_set_name_safe): use
gimp_utf8_strtrim().
* app/widgets/gimpwidgets-utils.[ch]
* app/tools/gimptextoptions.c: try to make the text tool options
look more like all other tool options. Still needs work; I'll
leave this up to Mitch ...
This byte --> <-- is the millionth in this file!
2003-02-05 Sven Neumann <sven@gimp.org>
* app/core/gimpobject.c (gimp_object_set_name_safe): replaced with
an UTF-8 safe rewrite.
* app/widgets/gimpwidgets-utils.c (gimp_table_attach_stock): hacked
to allow being used with non-existent stock_ids (for prototyping).
* app/widgets/gimpenummenu.c: set the radio button mode correctly.
* app/widgets/gimpfontselection.c: tweaked spacing.
* app/tools/gimptextoptions.c: added controls for justification and
indentation. Removed letter-spacing control for now.
* app/text/gimptextlayer.[ch]: rerender the text layer from a low
priority idle function.
2003-02-05 Sven Neumann <sven@gimp.org>
* app/core/gimpobject.[ch]
* app/text/gimptextlayer.c: improved the code that trims the text
before setting it as layer name and moved it to GimpObject as
gimp_object_set_name_safe().
* app/text/gimptext.[ch]: removed fixed_height and gravity again.
* app/text/gimptextlayout.c: much simpler positioning that has the
advantage that it actually works.
* libgimpproxy/gimpobject.[ch]: this crap was regenerated.
2003-02-03 Michael Natterer <mitch@gimp.org>
* app/undo.c: unified some comments, some cleanup.
* app/pdb/procedural_db.c: some cleanup & comments to clarify
what GIMP_PDB_PASS_THROUGH does.