2000-03-29 Michael Natterer <mitch@gimp.org>
* app/bezier_select.h
* app/bezier_selectP.h
* app/by_color_select.[ch]
* app/ellipse_select.[ch]
* app/free_select.[ch]
* app/move.[ch]
* app/rect_select.[ch]: kindof selection tools code review:
- use SelectOps instead of int.
- removed some unused prototyped and callbacks.
- don't show the SELECTION_MOVE_MASK cursor if there is no
selection and don't try to move the mask in that case.
- re(?)-enabled moving the selection mask even if there is a
floating selection.
- usual bunch of cleanups.
2000-03-27 Michael Natterer <mitch@gimp.org>
* app/transform_core.c: the button_press and cursor_update
functions were still doing checks on the active layer instead of
the active drawable.
Fixing this automatically made the layers mask transformable.
2000-03-26 Garry R. Osgood <gosgood@idt.net>
* gimp/app/bezier_select.c
in bezier_add_point(), when a BEZIER_MOVE type
point is being added to a path with at least
one extant segment, the point is re-typed
to a BEZIER_ANCHOR (which is old behavior)
and designated as the current anchor
(which is new behaviour). With this change,
motion events move the (second) control point
and indicia are properly updated. This closes
#6225.
2000-03-26 Michael Natterer <mitch@gimp.org>
* app/gimage_mask.[ch] (gimage_mask_extract): add an "add_alpha"
parameter to allow selected regions to be extracted without having
an alpha channel added.
* app/global_edit.c: pass add_alpha = TRUE.
* app/transform_core.[ch]: made the transform core work on
non-layer drawables even if no selection is present. Fixes#7485
and #7555.
- transform_core_cut(): extract the mask without alpha if
operating on a non-layer without having a selection.
- transform_core_paste(): return a boolean indicating success
instead of a layer and handle channels correctly.
- transform_core_do(): if the "floating_tiles" passed to the
function are from an un-floated non-layer, treat the whole
non-layer as alpha channel and never enter the loop which
transforms the (not present) color channels.
Also clip the result to ensure that the channel never grows
larger then the image.
* app/tools_cmds.c
* tools/pdbgen/pdb/tools.pdb: transform_core_paste() returns a
gboolean now.
2000-03-25 Michael Natterer <mitch@gimp.org>
* app/cursorutil.[ch]: new global variable "gimp_busy" which gets
set/unset whenever busy cursors are added/removed.
* app/info_dialog.c: register the info dialogs with the dialog
handler.
* app/fuzzy_select.[ch]: cleanups.
Here starts the ugly workaround which simulates something like
locking. If it works, it will close lots of bugs, if not, it's
easy to remove again.
So far, I didn't find strange side effects but Gimp is told to be
a complex program :-) Please test this.
* app/context_manager.c: don't allow tool changes if gimp_busy
is TRUE.
* app/disp_callbacks.c: don't allow mouse and key events in the
display_canvas if gimp_busy is TRUE.
(except if the current tool is FUZZY_SELECT and it is ACTIVE,
which is very ugly)
Also block other stuff like dropping colors/patterns etc.
* app/gdisplay_ops.c: don't close any display while Gimp is
busy. This is not really what we want but at least it prevents
crashes.
2000-03-24 Michael Natterer <mitch@gimp.org>
* Makefile.am
* gimp1_0_splash.ppm: added
* gimp1_1_splash.ppm: removed
* gimp_splash.ppm: the image formerly known as gimp1_1_splash.ppm
* app/app_procs.c: load gimp_splash.ppm
The idea if shearing the data_dir between Gimp versions has
vanished, so this seems like the right thing to do (TM).
Keep the 1.0 splash around for sentimental reasons but don't
install it anymore.
* plug-ins/common/autocrop.c: indentation paranoia.
2000-03-24 Michael Natterer <mitch@gimp.org>
* app/plug_in.c (plug_in_proc_def_remove): pass FALSE to
plug_in_proc_def_destroy() so the proc_def structure gets actually
freed.
* app/fileops.c
* app/gdisplay.[ch]: when reverting an image, reconnect all
affected views to the reverted version. This fixes one of the
bugs Tigert pointed out at GUADEC.
* app/gimage_mask.[ch]
* app/flip_tool.c: cleanups
--Sven & Mitch
* app/gimpdrawable.c: gimp_drawable_get_color_at() now silently
returns NULL again if the coordinates are out of range. A lot of
code using this function relies on this feature and correctly
checks the return value. No need to emit critical warnings here.
The GTK_CHECK_TYPE macro test for obj != NULL, no need to do this
check twice. Removed lots of unnecessary calls to g_return_if_fail().
* app/color_picker.c: with the old behaviour of
gimp_drawable_get_color_at() the code is a bit simpler.
* app/fuzzy_select.c: fuzzy_select relied on drawable_offsets()
returning off_x = off_y = 0 if drawable == NULL. Decided to change
this here, fixes bug #7077.
* app/gimpimage.[ch]: Even though we made bad experiences with the
changes in gimpdrawable.c, I have introduced similar argument checks
here.
* app/image_map.c: indentation
--Sven
* app/menus.c: applied and heavily modified a patch from Daniel Egger.
There's not any more the need to declare menu branches unless we
want to create empty submenus (to be filled in by plug-ins). Removes
a bunch of messages from the catalogs.
We do not longer put a seperator after submenus if the menu contains
nothing but submenus.
--Sven
2000-03-08 Tor Lillqvist <tml@iki.fi>
* app/cursorutil.c (gtkutil_compress_motion)
* app/edit_selection.c (process_event_queue_keys): Guard against
gdk_event_get returning NULL (which can happen at least on Win32).
* libgimp/gimp.def: Add a couple of new entry points.
* plug-ins/makefile.{cygwin,msc}: Update according to the source
file changes. Fix some typos in the .msc file.
Fixes by Hans Breuer:
* app/resize.c: Add some more includes.
* libgimp/gimpenv.c
* plug-ins/gflare/gflare.c: Win32 header lossage fixup.
2000-03-07 Michael Natterer <mitch@gimp.org>
* app/disp_callbacks.C: show GIMP_BAD_CURSOR if we have no layers.
Moved the closing bracket out of the GTK_HAVE_SIX_VALUATORS ifdefs
(just to force emacs to do correct indentation).
2000-03-07 Michael Natterer <mitch@gimp.org>
* app/by_color_select.c: immediate cursor_update feedback on
modifier events.
* libgimp/gimpwidgets.c: one more s/private_tip/help_data/
2000-03-04 Michael Natterer <mitch@gimp.org>
* Makefile.am
* cursors/selection_move.xbm
* cursors/selection_move_mask.xbm
* app/cursorutil.[ch]: new cursor for moving the selection
mask. Looks imho nicer than the ugly GDK_DIAMOND_CROSS.
* app/move.c
* app/rect_select.c: use the new cursor.
* app/paint_core.c: check for the statusbar's context_id in the
cursor_update function. Fixes gdk_criticals with the line preview
(which doesn't need a mouse click). Minor cleanups.
* app/tool_options.c: put the paint_pressure options in a
GtkHWrapBox instead of a GtkHBox. Makes the size of the dialog a
bit less locale-dependent.
* plug-ins/common/xbm.c: use accessor functions instead of using
the parasite's fields directly.
2000-03-03 Michael Natterer <mitch@gimp.org>
* app/crop.c: s/"Only"/"only"/
* app/iscissors.c: one more cursor_update fix. This time I don't
claim that it's _really_ correct.
* app/tool_options.c: don't add a separator after
opacity/paint_mode if a paint pressure options box follows.
* cursors/bad.xbm
* cursors/bad_mask.xbm: made it FAT (no need to use thin lines
which show as much as possible of the image below because the
cursor indicates that no operation is possible).
* libgimp/gimpprotocol.[ch]: s/int/gboolean/ where appopriate,
indentation paranoia.
_gp_*_read(): free the already allocated parts of the message if
reading a subsequent part fails. These cleanups will probably occur
shortly before the process crashes, but at least they make the
search for real leaks easier.
* plug-ins/common/uniteditor.c: some more tooltips.
* plug-ins/common/xbm.c: store the image comment in the
"gimp-comment" parasite and the hot spot in the new "hot-spot"
parasite. Added ui for entering the hot spot.
* docs/parasites.txt: documented the new "hot-spot" parasite.
2000-03-03 Michael Natterer <mitch@gimp.org>
* app/iscissors.c: this time cursor_update feedback is _really_
correct: for closed curves, show the "point" cursor if a mouse
click will modify the curve and the "bad" cursor if a mouse click
will do nothing. Seems it was not too hard to understand how it
works...
* plug-ins/common/uniteditor.c: for consistency, did a
s/"Delete","Undelete"/"Don't Save","Save"/.
Thu Mar 2 21:45:17 GMT 2000 Andy Thomas <alt@gimp.org>
* gimp/app/nav_window.c
The "follow display" nav window is now hidden when the
last window is closed.
2000-03-02 Michael Natterer <mitch@gimp.org>
* app/iscissors.c: Iscissors was using rect_select_cursor_update
which is totally wrong since the oper_update_func tool method was
introduced (in fact it didn't even give correct feedback before).
Added oper_update_func, modifier_key_func, cursor_update_func for
Iscissors which give correct cursor_update feedback now. The only
remaining inconsistency occurs when a curve is closed: There's no
way to find out if the mouse is over a control point/line or
outside (without touching the Iscissors engine, which I didn't
want to do because I don't understand how it works ;-).
2000-03-02 Michael Natterer <mitch@gimp.org>
* app/rect_select.[ch]: added a modifier_key_func which gives
immediate cursor_update feedback on modifier key events.
* app/ellipse_select.c
* app/free_select.c
* app/fuzzy_select.c
* app/rect_selectP.h: call the new function.
Added current_[x|y] fields to the tools' structures which get
updated from the "motion" functions. They have to appear in the
same order in all structures because the modifier_key_func treats
them all as rectangular selection tools.
This is ugly and cries for a object hierarchy of tools.
2000-03-01 Michael Natterer <mitch@gimp.org>
* app/gimpdrawable.c: gimp_drawable_get_color_at(): put the check
below back but only require a non-indexed drawable if the drawable
doesn't have an image.
(The function may call gimp_image_get_color() with gimage == NULL
for RGB and GRAY colors because we don't need a colormap to
transform them to RGB space).
This was the obscure special case (TM).
2000-03-01 Michael Natterer <mitch@gimp.org>
* app/gimpdrawable.c: gimp_drawable_get_color_at(): don't
g_return_val_if_fail(!indexed, NULL) because the function seems to
work fine for all kinds of drawables. Fixes#6756. Or is this
check needed for some obscure special case?
2000-03-01 Michael Natterer <mitch@gimp.org>
* Makefile.am
* cursors/*: a proper naming scheme for all cursor files. Added
zoom_in and zoom_out cursors.
* app/bezier_select.c
* app/by_color_select.c
* app/cursorutil.[ch]
* app/rect_select.c
* app/scale.[ch]: changed according to the new cursor names. Some
minor fixes.
* app/magnify.[ch]: made the zoom_in/zoom_out toggle a proper
tool_toggle and show cursors for the two modes.
* plug-ins/print/print-util.c: patch from Robert Kravitz which
fixes printing layers with alpha.
2000-03-01 Michael Natterer <mitch@gimp.org>
* app/gdisplay.c: set <Image>/File/Revert... insensitive if the
image has no filename.
* plug-ins/common/uniteditor.c: minor fix.
2000-03-01 Michael Natterer <mitch@gimp.org>
* C/dialogs/layers/Makefile.am
* C/dialogs/layers/index.html
* C/dialogs/layers/apply_mask.html: removed.
* C/layers/Makefile.am
* C/layers/index.html
* C/layers/apply_mask.html
* C/layers/delete_mask.html: new files.
* app/gimpcontextpreview.c: return without warning if popup_timeout
is already set. Suppresses warning that occured on double-click.
* app/layers_dialog.[ch]
* app/menus.c: added "Delete Mask" menu entry and removed dialog
asking if mask is to applied or discarded on "Apply Mask".
* app/tools.c: Magnify is not a transform tool
--Sven
Mon Feb 28 19:11:39 GMT 2000 Adam D. Moss <adam@gimp.org>
* app/cursorutil.c app/cursorutil.h:
added gtkutil_compress_motion() utility function to seek and
destroy outstanding pointer motion events from the gdk event queue
for a given widget.
* app/edit_selection.c:305: Use gtkutil_compress_motion() to
do a more thorough job of tracking motion (something recently
started interleaving our motion events with others, largely
nullifying the effectiveness of GDK_POINTER_MOTION_HINT_MASK).
* app/edit_selection.c:704: Yikes, the key-press snooping code
was turning part of the event queue back-to-front with each
compressed key-press. (Still looks a bit bogus overall; looks
as though it could transplant a whole chunk of the start of
the event queue right onto the end. I'll probably disable it
unless someone points out that I'm a doofus.)
2000-02-27 Garry R. Osgood <gosgood@idt.net>
* gimp/app/by_color_select.c
* gimp/app/color_picker.c
* gimp/app/gimpdrawable.c
* gimp/app/image_map.c
* gimp/app/paint_core.c
Inadvertent logic error in g_return_val_if_fail()
style sanity checks implemented in
gimp_drawable_get_color_at() gave rise to
segment violation reported in #6624;
error admitted out-of-bounds x&y that
do not map to tiles. Closes#6624.
GTK-critical warnings which result from
this new sanity check require that
gimp_drawable_get_color_at() clients
perform initial culling of out-of-bounds
x & y coordinates.
Sat Feb 26 23:58:27 GMT 2000 Andy Thomas <alt@gimp.org>
* gimp/app/nav_window.c
Now takes note of the users set preview size when close to the
edge of the screen.
If the user selected < MAX size of preview the popup would appear
in the incorrect location of the screen. This is a slight change
to the checkin of Sat Feb 19 13:53:34 CET 2000 by
Sven Neumann <sven@gimp.org>
2000-02-26 Garry R. Osgood <gosgood@idt.net>
* app/commands.c
* app/gimpimage.c
* app/layer.c
* app/layer.h
* app/resize.c
* app/resize.h
Aliasing artifacts that changed relative positions
of layers under scaling, giving rise to #5271, are
minimized by a new layer.c function,
layer_scale_by_factors(). Closes#5271. See
http://idt.net/~gosgood/gimp-patch/patch07.html for
further detail. See also usage documentation for
layer_scale() and layer_scale_by_factors() in
layer.c.
Provided logic for the Scale Image dialog box to
pre-check an image's layers for the possibility that
a particular scaling, s: 0 < s < 1, reduces a layer
dimension to zero. Should this case prevail, a
boolean dialog box warns the user of the
possibility. The user may (1) Cancel, returning
focus to Scale Image and the possibility of
corrective adjustment, or (2) OK the scaling. The
layers that will vanish upon the new scaling are
culled from the GimpImage::layers list first.
* app/fileops_cmds.c
* tools/pdbgen/pdb/fileops.pdb: don't add an already registered
load|save handler twice to the list. This fixes the problem
that extension were listed twice if a load|save plugin changed.
* app/plug_in.[ch]: code cleanup, indentation
* app/xcf.[ch]: same here, include copyright headers
* plug-ins/common/wmf.c: properly cancel the load if the user
pressed Cancel in the dialog (fixes bug #6500)
--Sven
2000-02-24 Michael Natterer <mitch@gimp.org>
* app/paths_dialog.c: we were also leaking all path preview
pixmaps ever created. Always remember that GdkPixmaps are not
created "floating" but with a real refcount of 1. Minor cleanups.
2000-02-24 Michael Natterer <mitch@gimp.org>
* app/gimpbrush.[ch]
* app/gimpbrushgenerated.[ch]
* app/gimpbrushlist.[ch]
* app/gimpbrushlistP.h
* app/gimpbrushpipe.[ch]
* app/gimpbrushpipeP.h: did a brushes code-review: indentation,
removed some includes, didn't find a bug :-)
* app/gradient.c
* app/palette.c: we were leaking all gradient and palette preview
pixmaps as well as all lists of palette colors on each refresh.
* libgimp/gimpenv.c: updated documentation.
2000-02-24 Michael Natterer <mitch@gimp.org>
* app/datafiles.c: fixed a memleak.
* app/gimpbrushlist.c
* app/gradient.c
* app/palette.c: use the gimp_path_* functions, cleanups.
* app/gimpbrushpipe.c: call the "destroy" function of the parent
class, not of the object class. Fixes a huge memleak on each
"Refresh".
* app/gimpbrushpipeP.h
* app/gimplist.c
* app/gimpbrush.c: did some cleanups while searching the brush
memleak.
* libgimp/gimpenv.c: gimp_path_get_user_writable_dir(): return a
copy of the string.
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c: g_free() the string returned by
gimp_path_get_user_writable_dir().
2000-02-24 Tor Lillqvist <tml@iki.fi>
* libgimp/gimp.h (Win32): Include <stdlib.h> for __argc and__argv.
* libgimp/{gimp,gimpui}.def: Add new entry points.
* libgimp/gimpenv.c (Win32): Make compileable, with no geteuid etc.
* app/makefile.{cygwin,msc}
* libgimp/makefile.{cygwin,msc}: Update object file list.
2000-02-23 Michael Natterer <mitch@gimp.org>
* app/file_new_dialog.c: use a gimp_query_boolean_box().
* libgimp/gimpenv.c
* libgimp/gimpquerybox.c: documentation updates.
* libgimp/gimpwidgets.[ch]: changed the widget constructors to
return only the container widget and added access marcos for the
sub-widgets. Added documentation for all functions.
Made gimp_toggle_button_sensitive_update() public so this feature
can be properly documented.
* plug-ins/common/blur.c
* plug-ins/common/gauss_iir.c
* plug-ins/common/gauss_rle.c
* plug-ins/common/plasma.c
* plug-ins/common/randomize.c
* plug-ins/common/snoise.c
* plug-ins/common/spread.c
* plug-ins/common/tile.c
* plug-ins/gflare/gflare.c: updated according to the
gimpwidgets.[ch] changes.
2000-02-23 Michael Natterer <mitch@gimp.org>
* libgimp/libgimp-decl.txt
* libgimp/libgimp-sections.txt
* libgimp/tmpl/gimpenv.sgml
* libgimp/tmpl/gimppixmap.sgml
* libgimp/tmpl/gimpwidgets.sgml: various updates and documentation
for all gimpwidgets.[ch] functions.
2000-02-22 Michael Natterer <mitch@gimp.org>
* app/gimpcontext.[ch]: it's more intelligent to implement the
parent_context stuff with gtk_signal_connect_object() instead of
having internal callbacks for each context attribute.
Exported the existing gimp_context_*_changed() functions and
changed them to do nothing but emitting the signal.
* app/app_procs.c
* app/tools.c
* app/transform_tool.c: use gimp_context_tool_changed() instead of
gtk_signal_emit_by_name().
2000-02-22 Michael Natterer <mitch@gimp.org>
* app/color_area.[ch]
* app/interface.c: pass masks for the "default" and "swap" pixmaps
to the color_area constructor and use them to create a clip mask
in color_area_draw().
* app/datafiles.[ch]: some harmless cleanups.
* libgimp/gimppixmap.c: use gtk_pixmap_set_build_insensitive()
instead of accessing the field directly.
2000-02-21 Michael Natterer <mitch@gimp.org>
* libgimp/gimppixmap.c: fixed a gtk-doc comment.
* libgimp/gimpenv.[ch]: new functions:
- gimp_path_parse(): Creates a GList of strings from a searchpath
string and performs sanity checks.
- gimp_path_to_str(): Creates a searchpath string from the list
returned by gimp_path_parse().
- gimp_path_free(): Frees the list returned by gimp_path_parse().
- gimp_path_get_user_writable_dir(): Returns the first dir in a
path where the user has write access. With this function the
"Save" dialogs of some plugins always show the plugin's
subdirectory of the user's gimp_dir instead of the read-only
global one.
* app/datafiles.[ch]
* app/gimpbrushlist.c: use the new functions and
s/datafile_loader_t/GimpDataFileLoaderFunc/.
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c
* plug-ins/gimpressionist/gimpressionist.c: use the new functions.
2000-02-21 Michael Natterer <mitch@gimp.org>
* app/perspective_tool.c
* app/rotate_tool.c
* app/scale_tool.c
* app/shear_tool.c
* plug-ins/common/gauss_iir.c
* plug-ins/common/gauss_rle.c: fix Solaris compilation problems
reported by Ludovic Poitou <ludovic.poitou@france.sun.com>.
* libgimp/gimppixmap.[ch]: new function gimp_pixmap_set().
* plug-ins/gfig/gfig.c: hacked the ui to use the libgimp widgets &
constructors and slightly reorganized it to use fewer screen
space (not yet perfect). Did a general namespace & code cleanup.
* plug-ins/FractalExplorer/FractalExplorer.c: use a GimpPathEditor
widget.
2000-02-19 Michael Natterer <mitch@gimp.org>
* libgimp/gimppixmap.c: gimp_pixmap_new(): set the widget's
requisition so it can be properly packed before it's realized.
* libgimp/gimpwidgets.[ch]: added a "text" parameter to
gimp_pixmap_button_new().
* app/undo_history.c: use gimp_pixmap_buttons.
* app/gradient.c
* app/nav_window.c
* app/palette.c
* libgimp/gimppatheditor.c
* plug-ins/Lighting/lighting_ui.c
* plug-ins/MapObject/mapobject_ui.c: changed calls to
gimp_pixmap_button_new().
* plug-ins/MapObject/mapobject_main.c: INIT_I18N() was missing in
query().
* plug-ins/pagecurl/pagecurl.c: use GimpVector2 functions instead
of reinventing the wheel.
* plug-ins/helpbrowser/helpbrowser.c: use gimp_pixmap_buttons.
* plug-ins/helpbrowser/back.xpm
* plug-ins/helpbrowser/forward.xpm: cropped.
* app/fuzzy_select.c: ignore motion_events in a time-window of
100ms after the last event. Was intended as a workaround for bug
#5949, but IMO it makes the tool more responsive and easier to
control.
* app/nav_window.c: as a workaround for bug #5955 move the
navigation popup on screen if used to close to the screen borders.
Moving the cursor will make the image scroll by a large amount
eventually, but IMHO this is better than having a nonfunctional
navigation popup.
* plug-ins/common/curve_bend.c
* plug-ins/gap/gap_decode_xanim.c: fixed typos
--Sven