2006-09-12 Michael Natterer <mitch@gimp.org>
* app/tools/gimpmeasuretool.[ch]: implement active_modifier_key()
and give immediate feedback when Control (constrain to 15 degrees)
is toggled. Did a s/mtool/measure/g.
2006-09-12 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.c (gimp_tool_button_release): reset the
active_modifier_state *after* invoking the tool's button_release().
* app/tools/gimpblendtool.[ch]: implement active_modifier_key()
and give immediate feedback when Control (constrain to 15 degrees)
is toggled.
2006-09-12 Michael Natterer <mitch@gimp.org>
Added new tool API for modifier key events while the tool
is active and implement it in the rect select and crop tools.
Fixes bug #316156 and bug #355302.
* app/tools/gimptool.[ch]: added GimpTool::active_modifier_key()
and public function gimp_tool_set_active_motifier_state(). Remember
the active_state at button_press and reset it on button_release.
Ignore releases of modifiers that were pressed at button_press (but
only ignore them once).
* app/tools/tool_manager.[ch]: added wrapper
tool_manager_active_modifier_state_active().
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_events): return FALSE for all modifiers even
when mouse button 1 is pressed.
(gimp_display_shell_canvas_tool_events): when bouse button 1 is
pressed *and* the tool is active, dispatch the new active_modifier
events to tools.
* app/tools/gimpcroptool.c
* app/tools/gimprectangleselecttool.c
* app/tools/gimprectangletool.[ch]: implement active_modifier_key()
instead of modifier_key().
2006-09-12 Sven Neumann <sven@gimp.org>
* app/tools/gimpbrushtool.c (gimp_brush_tool_cursor_update): if
the "bad" cursor modifier is set, show the cursor regardless of
the gimprc "show-paint-tool-cursor" setting.
2006-09-12 Michael Natterer <mitch@gimp.org>
* app/paint/gimpsourcecore.[ch]: made gimp_source_core_motion() a
public function for the time being, pending further refactoring.
* app/paint/gimpperspectiveclone.[ch]: derive from GimpClone and
remove everything that is already imeplemented in the parent
classes. Particullarly, removed motion() implementation in favor
of a get_source() implementation and simply use GimpClone's
motion(). Also refuse to work on indexed drawables.
* app/paint/gimpperspectivecloneoptions.[ch]: derive from
GimpCloneOptions and remove everything that is already done by the
parent classes.
* app/tools/gimpperspectiveclonetool.c: changed
accordingly. Doesn't derive from GimpSourceTool yet since there is
some virtual function refactoring in GimpSourceTool missing.
2006-09-12 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcolortool.c (gimp_color_tool_button_press)
(gimp_color_tool_button_release): chain up to activate/halt the tool.
* app/tools/gimppainttool.c (gimp_paint_tool_button_press)
(gimp_paint_tool_button_release)
(gimp_paint_tool_motion): if the color tool is enabled, chain up
early and return. Fixes selection PAUSE/RESUME mismatch that was
hiding this display's selection forever when moving sample points.
2006-09-12 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimprectangletool.c
* app/tools/gimpselectiontool.c
* app/tools/gimpsourcetool.c
* app/tools/gimpvectortool.c: back out change committed on
2006-08-21 which passed modifier events to tools even while mouse1
was down. This generated way too much unexpected events that would
have to be special cased in all tools. Will implement an anternate
solution soon.
2006-09-08 Sven Neumann <sven@gimp.org>
* app/core/gimp.[ch]: added function gimp_get_tool_info().
* app/actions/tools-commands.c
* app/actions/vectors-commands.c
* app/tools/gimppainttool.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimptoolbox.c: use the new function instead of poking
into gimp->tool_info_list.
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]: moved code that deals with
the space key into separate functions. Added space_shaded_tool
to GimpDisplayShell instead of using a static variable for it.
* app/tools/tool_manager.c: removed unused include.
2006-09-08 Michael Natterer <mitch@gimp.org>
* app/tools/gimpperspectiveclonetool.c
(gimp_perspective_clone_tool_register): fix the tool's menu path
and accelerator.
2006-09-07 Michael Natterer <mitch@gimp.org>
Merged the "soc-2006-perspective-clone" branch. That branch is
now officially closed and all further fixes and changes have to
be applied to HEAD.
Did some minor adjustments, mostly small indentation and spacing
fixes. Derive the tool from GimpBrushTool and renamed the enum
added to paint-enums.h and it values, added stock icon and menu
entry.
Thanks a lot to Pedro Alonso Ferrer!
* app/paint/paint-enums.[ch]: new enum GimpPerspectiveCloneMode.
* app/paint/Makefile.am
* app/paint/gimpperspectiveclone.[ch]
* app/paint/gimpperspectivecloneoptions.[ch]: the perspective
clone core and its options.
* app/paint/gimp-paint.c: register it.
* app/tools/Makefile.am
* app/tools/gimpperspectiveclonetool.[ch]: the perspective clone tool.
* app/tools/gimp-tools.c: register it.
* app/tools/gimppaintoptions-gui.c: show the widgets that are used
by perspective clone.
* app/widgets/gimphelp-ids.h: the help ID.
* themes/Default/images/Makefile.am
* themes/Default/images/tools/stock-tool-perspective-clone-16.png
* themes/Default/images/tools/stock-tool-perspective-clone-22.png
* libgimpwidgets/gimpstock.[ch]: its stock ID and icons.
* menus/image-menu.xml.in: added it to the menu.
* app/tools/tools-enums.[ch]: add GimpRectangleConstraint
enum.
* app/tools/gimprectangletool.[ch]: replace "constrain"
boolean with "constraint" enum property. Implement
constraints in motion handler -- the implementation
is rather elegant but pretty tricky.
* app/tools/gimpcroptool.c: constrain to image bounds,
or to active drawable bounds if "current layer only"
option is checked.
* app/tools/gimpellipseselecttool.c
* app/tools/gimprectangleselecttool.c: no constraint.
This addresses bug #353936 -- I would say fixes it, but it
probably needs some fine-tuning. Also perhaps fixes
bug #329817 a bit better than before.
2006-09-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: added gimp_tool_get_options() so tools
don't need to incude "core/gimptoolinfo.h" just to get to
their options.
* app/tools/gimp*tool.h: added macros GIMP_FOO_TOOL_GET_OPTIONS()
which return specific tool options types and do all casting
themselves.
* app/tools/*.c: use the new macros and don't include
"core/gimptoolinfo.h" in most files.
* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_register):
make it use the parent context's FG and BG.
* app/tools/gimpcolortool.c (gimp_color_tool_real_picked): set the
color on the tool's options, not on the user context.
2006-09-04 Michael Natterer <mitch@gimp.org>
* app/paint/paint-enums.[ch]: removed enum GimpHealAlignMode, we
use the GimpSourceAlignMode now and can always disable REGISTERED
in the GUI should it turn out to be really totally pointless.
* app/paint/Makefile.am
* app/paint/gimphealoptions.[ch]: removed. Its properties are
completely covered by GimpSourceOptions.
* app/paint/gimpheal.[ch]: derive from GimpSourceCore.
* app/tools/gimphealtool.[ch]: derive from GimpSourceTool.
2006-09-04 Michael Natterer <mitch@gimp.org>
* app/tools/Makefile.am
* app/tools/gimpsourcetool.[ch]: new class which is essentially a
copy of GimpCloneTool with s/clone/source/ plus some minor
modifications.
* app/tools/gimpclonetool.[ch]: remove almost everything and
derive from GimpSourceTool.
2006-09-03 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.[ch]: added construct-only property
"undo-desc". Use this when pushing an undo instead of attempting
an unsuccessful lookup of the GimpPaintInfo object.
* tools/pdbgen/pdb/paint_tools.pdb
* app/tools/gimppainttool.c: use paint_info->blurb as undo
description when constructing the paint core.
* app/pdb/paint_tools_cmds.c: regenerated.
2006-09-03 Michael Natterer <mitch@gimp.org>
* app/paint/paint-enums.[ch]: renamed enum GimpCloneAlignMode to
GimpSourceAlignMode.
* app/paint/Makefile.am
* app/paint/gimpsourcecore.[ch]
* app/paint/gimpsourceoptions.[ch]: new classes which contain the
source selection functionality factored out of the clone core and
options.
* app/paint/gimpclone.[ch]
* app/paint/gimpcloneoptions.[ch]: remove that functionality here
and derive from the new classes.
* app/tools/gimpclonetool.c: changed accordingly.
2006-09-02 Michael Natterer <mitch@gimp.org>
Merged the "soc-2006-healing-brush" branch. That branch is now
officially closed and all further fixes and changes have to be
applied to HEAD.
Did some minor adjustments, mostly small indentation and spacing
fixes. Derive the tool from the newly introduced GimpBrushTool
which did not exist when the branch was created.
Thanks a lot to Kevin Sookocheff for this nice contribution!
* app/paint/paint-enums.[ch]: new enum GimpHealAlignMode.
* app/paint/Makefile.am
* app/paint/makefile.msc
* app/paint/gimpheal.[ch]
* app/paint/gimphealoptions.[ch]: the heal core and its options.
* app/paint/gimp-paint.c: register the heal core.
* app/tools/Makefile.am
* app/tools/makefile.msc
* app/tools/gimphealtool.[ch]: the heal tool.
* app/tools/gimp-tools.c: register the heal tool.
* app/tools/gimppaintoptions-gui.c: show the widgets that are used
by heal.
* app/widgets/gimphelp-ids.h: the heal help ID.
* tools/pdbgen/stddefs.pdb
* tools/pdbgen/pdb/paint_tools.pdb: the heal PDB wrappers.
* app/widgets/widgets-enums.h
* app/widgets/gimpcursor.c
* cursors/Makefile.am
* cursors/makefile.msc
* cursors/tool-heal.png
* cursors/xbm/tool-heal.xbm
* cursors/xbm/tool-heal-mask.xbm: a new cursor for the heal tool.
* libgimpwidgets/gimpstock.[ch]
* themes/Default/images/Makefile.am
* themes/Default/images/makefile.msc
* themes/Default/images/tools/stock-tool-heal-16.png
* themes/Default/images/tools/stock-tool-heal-22.png: new stock
icons for the heal tool.
* app/pdb/internal_procs.c
* app/pdb/paint_tools_cmds.c
* libgimp/gimppainttools_pdb.[ch]: regenerated.
2006-08-31 Sven Neumann <sven@gimp.org>
* app/composite/gimp-composite-mmx.c: moved declarations at the
beginning of the functions.
* app/tools/gimptransformtool.c (gimp_transform_tool_doit):
display a message if no paths are available. Could catch this
earlier, but this is the least intrusive change to fix bug #353495.
2006-08-29 Michael Natterer <mitch@gimp.org>
Changed GimpViewable preview rendering to have a context to get
FG/BG/whatever from. Use the context to enable dynamic FG/BG
colors in gradients. Fixes bug #127676 and bug #352214. Addresses
bug #128367 (doesn't fix it because there's no loading/saving and
no GUI yet).
* app/core/core-enums.[ch]: added enum GimpGradientColor to enable
specifying gradient colors in terms of foreground and background.
* app/core/gimpgradient.[ch]: added color_type members to the
GimpGradientSegment struct and honor them in
gimp_gradient_get_color_at(). Added GimpContext parameters to all
functions which finally call get_color_at().
* app/core/gimp-gradients.c: use the new method to implement the
builtin gradients.
* app/core/gimpviewable.[ch]: added GimpContext parameters to all
get_preview() and get_pixbuf() functions.
* app/core/gimpbrush.c
* app/core/gimpbuffer.c
* app/core/gimpdrawable-preview.[ch]
* app/core/gimpgradient.c
* app/core/gimpimage-preview.[ch]
* app/core/gimpimagefile.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimpundo.[ch]
* app/text/gimpfont.c
* app/vectors/gimpvectors-preview.[ch]: changed ::get_preview()
and ::get_pixbuf() implementations accordingly.
* app/core/gimpdrawable-blend.c
* app/core/gimppalette-import.[ch]
* app/dialogs/dialogs-constructors.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/resize-dialog.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell.c
* app/display/gimpnavigationeditor.c
* app/paint/gimppaintoptions.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimptexttool.c
* app/actions/gradient-editor-commands.c
* app/widgets/gimpaction.c
* app/widgets/gimpbrusheditor.[ch]
* app/widgets/gimpbufferview.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpclipboard.c
* app/widgets/gimpcoloreditor.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.[ch]
* app/widgets/gimpdataeditor.[ch]
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdnd.[ch]
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpgradienteditor.[ch]
* app/widgets/gimpgradientselect.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimppaletteeditor.[ch]
* app/widgets/gimppropwidgets.[ch]
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpthumbbox.[ch]
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpundoeditor.c
* app/widgets/gimpvectorstreeview.c
* app/widgets/gimpview-popup.[ch]
* app/widgets/gimpview.[ch]
* app/widgets/gimpviewablebutton.c
* app/widgets/gimpviewabledialog.c
* app/widgets/gimpviewrenderer.[ch]
* app/widgets/gimpviewrenderer-frame.c
* app/widgets/gimpviewrendererbrush.c
* app/widgets/gimpviewrendererbuffer.c
* app/widgets/gimpviewrendererdrawable.c
* app/widgets/gimpviewrenderergradient.c
* app/widgets/gimpviewrendererimage.c
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/gradient.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/image.pdb: added tons of GimpContext members
and parameters, implement GimpDocked::set_context() in many
widgets. Pass these locally remembered contexts to GimpViewable
functions. Did some minor cleanups on the way. There are still
some minor FIXMEs around where the code uses a NULL context (which
is allowed by the APIs)
* app/pdb/drawable_cmds.c
* app/pdb/gradient_cmds.c
* app/pdb/gradients_cmds.c
* app/pdb/image_cmds.c: regenerated.
2006-08-28 Sven Neumann <sven@gimp.org>
* app/tools/gimptextoptions.[ch]
* app/tools/gimptexttool.c
* app/widgets/gimptexteditor.[ch]: make the text editor transient
to the display shell.
2006-08-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcolortool.c (gimp_color_tool_real_picked): applied
modified patch from David Gowers which selects a matching color
from the palette editor's active palette. I'm not sure if this
behavior is desirable but we'll never find out if we dont't try.
Fixes bug #343358.
* app/tools/gimpselectiontool.c (gimp_selection_tool_modifier_key):
When Alt is down, don't allow other modifiers to change the
operation shown in the options. Fixes bug #349338.
* app/tools/tools-enums.h
* app/tools/gimptransformtool.[ch]: add support for handles at
midpoints of edges.
* app/tools/gimpscaletool.c: use midpoint handles for scaling
with fixed width or height. Fixes bug #344955.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion):
respect "fixed-center" constraint even if "fixed-aspect"
or "aspect-square" constraints are active.
2006-08-22 Sven Neumann <sven@gimp.org>
* app/tools/gimprotatetool.c (gimp_rotate_tool_motion): fixed code
that moves the angle between +/- pi (bug #352341).
* app/display/gimpdisplayshell-callbacks.c: allow modifier key events
for Shift and Control to be propagated even if button1 is down.
* app/tools/gimpclonetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimpvectortool.c: change modifier_key method
to prevent any bad consequences.
* app/tools/gimprectangletool.[ch]: add modifier_key handler, and use it
to toggle "make-square" if Shift is pressed while button1 is down, and
"fixed-center" if Control is pressed while button1 is down.
* app/tools/gimprectangleselecttool.c (gimp_rectangle_tool_modifier_key):
call rectangle tool modifer_key method after chaining up.
2006-08-15 Michael Natterer <mitch@gimp.org>
* app/tools/gimpeditselectiontool.c (gimp_edit_selection_tool_start):
added check for GIMP_TRANSLATE_MODE_MASK_COPY_TO_LAYER which was
forgotten when this mode was introduced.
2006-08-15 Hans Breuer <hans@breuer.org>
* **/makefile.msc app/gimpcore.def : updated
* app/xcf/xcf-save.c(1464) : error C2036: 'void *' : unknown size
pointer arithmetics on void a pointer looks like a GCC extension
* app/tools/gimpbrightnesscontrasttool.c
app/tools/gimpcolorbalancetool.c
app/tools/gimphuesaturationtool.c
app/tools/gimpcolorizetool.c : #include "core/gimp.h" for gimp_message
* app/tools/gimpiscissorstool.c : use RINT() rather than rint()
* app/widgets/gimpcontrollerlist.c : #include "gimpwidgets-utils.h"
for gimp_show_message_dialog
* app/core/gimpprogress.c(229) : 'gimp_progress_message' must
return a value
2006-08-14 Michael Natterer <mitch@gimp.org>
Fixed rounding and double vs. integer inconsistency when dealing
with mouse coordinates. Fixes bug #350694.
* app/tools/gimpiscissorstool.c
(clicked_on_vertex)
(clicked_on_curve): added double x and y parameters and use them
instead of the integer iscissors->x and ->y. Cleaned up the
functions a bit.
(gimp_iscissors_tool_button_press)
(gimp_iscissors_tool_motion): changed accordingly, also rint() the
passed mouse coords when assigning them to iscissors->x and ->y.
Unrelated cleanup:
(iscissors_free_buffers): removed, folded into reset()
(precalculate_arrays): removed, folded into class_init()
2006-08-14 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangletool.c: changed the limits for "pressx"
and "pressy". It's wrong to disallow negative values here.
2006-08-14 Sven Neumann <sven@gimp.org>
* app/tools/gimpiscissorstool.c (gimp_iscissors_tool_oper_update):
do not select ISCISSORS_OP_MOVE_POINT for terminal points. Fixes
bug #132352.
2006-08-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimpwidgets-utils.[ch]: introduced a simple message
dialog to use when there's no progress but a parent widget.
* app/dialogs/convert-dialog.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/preferences-dialog.c
* app/dialogs/stroke-dialog.c
* app/tools/gimpimagemaptool.c
* app/widgets/gimpactionview.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimppdbdialog.c
* app/widgets/gimpvectorstreeview.c: use the new utility function
instead of g_message().
* app/tools/gimprectangleselecttool.[ch]: if the user is
modifying a rectangle and the mode is REPLACE, don't
show the marching ants for the previous selection, because
it confuses users. Should fix bug #347945.
2006-08-10 Sven Neumann <sven@gimp.org>
* app/tools/gimpimagemaptool.c: for load and save errors, use a
GtkMessageDialog and make it transient for the tool dialog.
* app/tools/gimpvectortool.c: use gimp_message().
2006-08-09 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-transform.[ch]: added new function
gimp_display_shell_transform_segments().
* app/display/gimpdisplayshell-selection.c (selection_transform_segs)
* app/tools/gimpregionselecttool.c
(gimp_region_select_tool_calculate): use the new function instead
of looping over the segments.
2006-08-09 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-draw.c (gimp_display_shell_draw_pen)
(gimp_display_shell_draw_vector): use the new transform functions.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_lines)
(gimp_draw_tool_draw_strokes): bail out early if num_points == 0.
2006-08-09 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-transform.[ch]: renamed
transform_coords() to transform_coordinate(); same for the
untransform variant. Added new functions transform_points() and
transform_coords() that work on arrays.
* app/display/gimpdisplayshell-autoscroll.c
* app/display/gimpdisplayshell-callbacks.c: changed accordingly.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_lines)
(gimp_draw_tool_draw_strokes): use the new transform functions.
2006-08-08 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangleoptions.c
(gimp_rectangle_options_interface_get_type): made
GimpToolOptions a
prerequisite of the GimpRectangleOptions interface.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_interface_get_type): made GimpDrawTool a
prerequisite of the GimpRectangleTool interface.
2006-08-05 Michael Natterer <mitch@gimp.org>
Applied (modified and enhanced) patch from Chris Moller which allows
tools to distinguish similar colors not only by composite, but also
by R, G, B, H, S and V. Fixes bug #348291.
* app/core/core-enums.[ch]: added new enum GimpSelectCriterion
which can be one of { COMPOSITE, R, G, B, H, S, V }.
* app/core/gimpimage-contiguous-region.[ch]: added
select_criterion params and create the region based on difference
by the selected criterion.
* app/core/gimpchannel-select.[ch]
* app/core/gimpdrawable-bucket-fill.[ch]: take criterion params and
pass them through to the contiguous region functions.
* app/tools/gimpbucketfilloptions.[ch]
* app/tools/gimpselectionoptions.[ch]: added criterion properties
and GUI to select it.
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpfuzzyselecttool.c: pass the selected criterion to
the resp. core functions.
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimpselectioneditor.c
* app/display/gimpdisplayshell-dnd.c
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly
(simply pass GIMP_SELECT_CRITERION_COMPOSITE in most cases).
* app/pdb/edit_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated.
2006-08-04 Raphael Quinet <raphael@gimp.org>
* app/core/gimpimage-convert-data.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-convert.h
* tools/pdbgen/pdb/convert.pdb: Applied slightly modified patch
from David Gowers allowing a custom dither matrix to be used when
converting images to indexed mode. Fixes bug #136604.
* app/pdb/convert_cmds.c
* libgimp/gimpconvert_pdb.h
* libgimp/gimpconvert_pdb.c: Regenerated.
* app/tools/gimpselectiontool.c: N_() should have been _().
2006-08-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_bounds)
* app/core/gimpdrawable.c (gimp_drawable_mask_bounds)
(gimp_drawable_mask_intersect): allow to pass in NULL return
locations for any of the boundary return values.
* app/tools/gimpselectiontool.c (gimp_selection_tool_oper_update):
don't require hovering the selection for moving the selected
pixels, since this can be distinguished by looking at the
modifiers now. Check for the presence of any selected pixels
instead. Fixes bug #349341.
2006-08-03 Raphael Quinet <raphael@gimp.org>
* app/tools/gimpselectiontool.c (gimp_selection_tool_oper_update):
use gimp_suggest_modifiers().
* app/tools/gimpclonetool.c (gimp_clone_tool_oper_update): suggest
ctrl only when cloning from the image, not from a pattern
* app/tools/gimpsmudgetool.c (gimp_smudge_tool_init): don't
suggest Ctrl for that tool, even if it can be used.
2006-08-02 Raphael Quinet <raphael@gimp.org>
* app/tools/gimppainttool.c (gimp_paint_tool_oper_update): Allow
some paint tools to not suggest using the Ctrl modifier.
* app/tools/gimpvectortool.c (gimp_vector_tool_status_update):
slightly more elegant way to free the status string.
2006-08-02 Raphael Quinet <raphael@gimp.org>
* app/widgets/gimpwidgets-utils.h
* app/widgets/gimpwidgets-utils.c (gimp_suggest_modifiers):
New utility function to build status bar messages while allowing
dynamic names for the modifiers.
* app/tools/gimppainttool.h
* app/tools/gimppainttool.c: Added new members to the class in
order to allow paint tools to set different status messages for
the normal case or when drawing a line.
* app/tools/gimpclonetool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpsmudgetool.c: Use the new functions to set
appropriate messages in the status bar. Still work in progress,
partial fix for bug #124040.
* app/tools/gimpvectortool.c: Use gimp_suggest_modifiers().
2006-07-31 Karine Delvare <edhel@gimp.org>
* app/tools/gimprectangletool.c: Applied patch from Karl Günter
Wünsch which Corrects the asyncronicity between mouse cursor and
selected edge on egde resizing. Partial fix for bug #349337.
2006-07-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimpselectionoptions.c (gimp_selection_options_gui):
use g_type_is_a() where possible instead of checking individual
tool types separately.
2006-07-31 Michael Natterer <mitch@gimp.org>
* app/tools/Makefile.am
* app/tools/gimpregionselecttool.[ch]: new abstract base class
which does about the same as GimpFuzyySelectTool did, apart from
creating the mask of the selected region.
* app/tools/gimpbycolorselecttool.[ch]
* app/tools/gimpfuzzyselecttool.[ch]: removed all code and only
implement GimpRegionSelectTool::get_mask(). Fuzzy and by-color
select behave exactly the same now. Fixes bug #126748.
2006-07-30 Raphael Quinet <raphael@gimp.org>
* app/tools/gimppainttool.c
* app/tools/gimpvectortool.c
* app/tools/gimpselectiontool.c: Update the status bar messages.
Work in progress, partial fix for bug #124040.
2006-07-28 Michael Natterer <mitch@gimp.org>
* app/tools/gimpbycolorselecttool.c: removed GObject::dispose()
implementation (no need to disconnect from a signal connected with
g_signal_connect_object). Code cleanup in some functions.
2006-07-25 Michael Natterer <mitch@gimp.org>
* app/tools/gimplevelstool.c (levels_input_area_event): Applied
patch from Wim Lewis which fixes major uglyness (the code was
rounding using sprintf() and atof() -- puke). Fixes bug #348317.
2006-06-27 Sven Neumann <sven@gimp.org>
Applied patch from Zbigniew Chyla (bug 345982):
* app/tools/gimptransformtool.[ch]: added undo_desc field for
storing undo string and use that, not tool_info->blurb.
* app/tools/gimpfliptool.c
* app/tools/gimpperspectivetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c: set undo_desc.
2006-06-27 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c
(gimp_transform_tool_notify_type):
do not call bounds() and recalc() with a NULL display. Added
sanity checks for the display parameter to both functions.
Fixes bug #345791.
2006-06-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimptransformtool.c: (gimp_transform_tool_control):
always upchain.
(gimp_transform_tool_cursor_update): use the small crosshair
instead of GIMP_CURSOR_MOUSE as default cursor to avoid hotspot
jumping.
(gimp_transform_tool_doit): call prepare() after bounds().
2006-06-21 Sven Neumann <sven@gimp.org>
* app/tools/gimp-tools.c (gimp_tools_restore): don't attempt to
reorder to a position >= container->num_children.
* app/tools/gimprectangleselecttool.c: if there is a floating selection
and mouse is clicked outside it without movement, anchor it.
* app/tools/gimprectangletool.c: corner handle area was scaling
improperly when image was zoomed.
2006-06-20 Sven Neumann <sven@gimp.org>
* app/tools/tools-enums.h: added TRANSFORM_HANDLE_NONE (will
get rid of TRANSFORM_CREATING later).
* app/tools/gimptransformtool.[ch]: added member "use_handles" and
default to FALSE for all "use_foo" variables. Only deal with the
handles the specific transform tool asks for. Set cursors
according to the active handle.
* app/tools/gimpfliptool.c
* app/tools/gimpperspectivetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c: changed accordingly.
2006-06-18 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: added virtual functions
GimpTool::has_display(), which returns whether any tool subclass
keeps a pointer to the passed display; and GimpTool::has_image()
which returns a display based on a passed image, or NULL if no
display matches. Added default implementation of
GimpTool::control() which sets tool->display to NULL on HALT.
* app/tools/gimpclonetool.c
* app/tools/gimpdrawtool.c: implement both functions.
* app/tools/gimpclonetool.c: removed weak pointer hacks that are
no longer needed now (and were incomplete anyway).
* app/tools/tool_manager.c (tool_manager_select_tool)
(tool_manager_control_active)
(tool_manager_image_clean_dirty): use the new functions instead of
peeking around in tool subclasses (and forgetting tools that may
have display pointers, like the clone tool)
* app/display/gimpdisplay.c (gimp_display_delete): removed
fiddling with tool internals here too, control(HALT) on the tool
is now sufficient to remove any reference to the closed display.
* app/tools/gimprectangleselecttool.c
* app/tools/gimprectangletool.c: fix three issues identified by
jimmac: (1) when shift or ctrl are pressed, should start a new
rect regardless of pointer loc; (2) zoom was incorrectly affecting
width of sensitive areas; (3) must emit "rectangle-changed" after
keyboard-driven rectangle movement.
* app/tools/gimprectangleselecttool.c: handle situations
where the user "flips" the rectangle while modifying it.
This solution is not perfect, but better than before.
* app/tools/gimprectangletool.c: remove unneeded variable.
Following up on previous commit, with assist from yosh.
* app/tools/gimpnewrectselectoptions.[ch]
* app/tools/gimpnewrectselecttool.[ch]: removed
* app/tools/gimprectangleselectoptions.[ch]: magic-moved
from gimpnewrectselectoptions.[ch]
* app/tools/gimprectangleselecttool.[ch]: magic-moved
from gimpnewrectselecttool.[ch]
* app/tools/Makefile.am
* app/tools/gimp-tools.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimpellipseselecttool.h
* app/tools/gimpselectionoptions.c: change file names to
refer to moved files.
Here is the big change-over, finally.
* app/tools/gimprectselecttool.[ch]: removed.
* app/tools/Makefile.am
* app/tools/gimp-tools.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimpellipseselecttool.h
* app/tools/gimpnewrectselectoptions.c
* app/tools/gimpnewrectselectoptions.h
* app/tools/gimpnewrectselecttool.c
* app/tools/gimpnewrectselecttool.h
* app/tools/gimpselectionoptions.c
* app/widgets/gimptoolbox.c
* menus/image-menu.xml.in: get rid of the "new" in everything
referring to the new rect select tool, except filenames. This
will wait for yosh to perform cvs-magic-foo.
* app/tools/gimprectangleoptions.[ch]
* app/tools/gimprectangletool.[ch]: fix a couple of minor
problems that popped up during testing.
* app/tools/gimpcroptool.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimprectangletool.[ch]: code cleanups
* app/tools/gimpnewrectselecttool.[ch]: try to do what
the user intuitively expects when deciding which selection
operation to perform. When modifying an existing rectangle,
always use the operation with which it was created.
* app/tools/gimpcropoptions.c: clean up code.
* app/tools/gimpnewrectselecttool.c: really remove some
commented-out code.
* app/tools/gimprectangleoptions.[ch]: add "aspect-square"
and "controls-expanded" properties. Show "Make square" and
"Expand from center" in options so that we don't need modifier
keys to do this. Place numerical entries inside an expander
and hide them by default.
* app/core/core-enums.[ch]: add GimpAlignReferenceType enum
* app/core/gimpimage-arrange.c: support using a channel as
reference for alignment.
* app/tools/gimpaligntool.[ch]: support aligning with a list item,
image, selection, active layer, active channel, or active path.
Now similar in form and function to Inkscape Align/Distribute
dialog.
* app/core/core-enums.[ch]: add GIMP_ARRANGE_FOO values
to GimpAlignmentType, and change CENTER to HCENTER,
MIDDLE to VCENTER.
* app/core/gimpimage-arrange.c: extensively rewritten
to handle arrangement of objects, and to do the
required sorting of lists by offset.
* app/tools/gimpaligntool.[ch]: added ability to arrange
groups of layers etc with constant spacing. Also try
to change things so that the tool aligns with the
object that users expect intuitively.
* app/core/gimpimage-arrange.[ch]: added, utility function for
aligning and arranging things in an image.
* app/core/gimpitem-align.[ch}: removed, no longer needed.
* app/core/gimpimage-item-list.[ch] (gimp_image_item_list_align):
removed this function, no longer used.
* app/core/Makefile.am: changes described above.
* app/core/gimpguide.c: remove bit of cruft left accidentally.
* app/tools/gimpalignoptions.[ch]: remove "alignment type"
option, not needed at this point.
* app/tools/gimpaligntool.[ch]: numerous changes, most
importantly ability to align guides, and use them for
alignment. More work coming on this tool.
2006-06-07 Michael Natterer <mitch@gimp.org>
* app/actions/context-commands.c: cosmetic cleanup.
* app/core/core-types.h: move the GimpGuide typedef to the
"misc objects" section.
* app/tools/gimpforegroundselecttool.c: cosmetic cleanup.
* app/tools/gimpmeasuretool.c (gimp_measure_tool_cursor_update):
use the new corner and side cursors instead of using X cursors.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): renamed local variable
"update_cursor" to "update_sw_cursor", it has confused me too
often...
* app/core/gimpguide.c
* app/core/gimpguide.h: new files, implementing GuideGimp as a GimpObject
* app/core/Makefile.am: add new files as sources
* app/core/gimpimage-guides.h
* app/core/gimpimage-guides.c: use the new object instead of defining
GimpGuide here as a struct.
* app/core/gimpimage-crop.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-snap.c
* app/core/gimpimage-undo-push.c
* app/core/gimpimage.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell.c
* app/pdb/guides_cmds.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-save.c
* tools/pdbgen/pdb/guides.pdb: include "core/gimpguide.h", and use
g_object_ref/unref instead of gimp_image_guide_ref/unref.
2006-06-07 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_initialize):
initialize guide with the option's guide value.
(gimp_rectangle_tool_notify_guide): always sync with the
option's
guide value, even when tool->display is NULL.
2006-06-06 Michael Natterer <mitch@gimp.org>
* app/tools/gimpnewrectselecttool.c
(gimp_new_rect_select_tool_cancel)
(gimp_new_rect_select_tool_rectangle_changed): flush the image
after changing it.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_halt): don't
flush it here.
2006-06-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.c
(gimp_draw_tool_draw_rectangle_by_anchor)
(gimp_draw_tool_draw_arc_by_anchor): subtract 1 from outlined
width/height instead of adding 1 to filled.
2006-06-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_draw): use
GimpDrawTool API, not GimpCanvas one. Some cleanup.
2006-06-05 Michael Natterer <mitch@gimp.org>
* app/tools/tools-enums.[ch]: removed enum GimpRectangleMode.
* app/tools/gimprectangletool.[ch]: added virtual function
GimpRectangleTool::cancel(). Added public wrapper for it. Removed
coordinates paramaters from gimp_rectangle_tool_execute(). Removed
gimp_rectangle_tool_response(), need to call either execute() or
cancel() now. Added gimp_rectangle_tool_halt() which disconnects
the tool from the display without canceling it.
* app/tools/gimpcroptool.c: changed accordingly.
* app/tools/gimpnewrectselecttool.c: moved the rectangle creating
code from the execute() implementation to the new function
gimp_new_rect_select_tool_rect_select(). Added cancel()
implementation which pops the remembered undo step if
appropriate. Call the new rect_select() wrapper from
rectangle_changed() so we don't create the rectangle on both
button_release *and* execute(), breaking modifiers and stuff.
2006-06-04 Michael Natterer <mitch@gimp.org>
* app/tools/gimpscaletool.c (gimp_scale_tool_size_notify):
strcmp() the property name, so we don't change the size on random
property changes. Fixes the tool reverting to the previous
width/height on each new transform (destroying the previous size
box causes it to emit stuff like "notify::visible").
(gimp_scale_tool_prepare): additionally, disconnect from the size
box before destroying it (paranoia).
* app/tools/gimprectangletool.[ch]: add new signal
"rectangle-changed" and method rectangle_changed.
Emit them on button release and when dimensions are
changed in controls.
* app/tools/gimpnewrectselecttool.c: use rectangle_changed
method to change selection, undoing previous change if
necessary.
2006-06-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: renamed
gimp_image_coords_in_active_drawable() to
gimp_image_coords_in_active_pickable() and added boolean
"sample_merged" and "selected_only" parameters. Use floor()
instead of ROUND(), we want to round to the actual pixel, not to
the nearest pixel boundary.
* app/tools/gimpbucketfilltool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolortool.c
* app/tools/gimpfliptool.c
* app/tools/gimptransformtool.c: changed accordingly. Removed
quite some duplicated code which checked sample_merged and the
mask value at the cursor location.
* app/tools/gimpbycolorselecttool.c: use the hand tool cursor,
there's also a hand in the toolbox icon. Fixed cursor_update()
function to set the bad modifier when there is no pickable pixel
at the cursor loction.
* app/tools/gimpfuzzyselecttool.c: added cursor_update()
implementation which does the same as by_color_select's one.
* app/tools/gimpselectiontool.c
(gimp_selection_tool_cursor_update): don't override the bad
modifier which was set by a subclass' cursor_update().
2006-06-03 Michael Natterer <mitch@gimp.org>
* app/tools/gimpnewrectselecttool.c
(gimp_new_rect_select_tool_button_press): check for function ==
INACTIVE, not CREATING || EXECUTING when checking whether to start
moving.
* app/tools/gimpselectiontool.c (gimp_selection_tool_oper_update):
changed modifiers so alt+ctrl does cut+float+move and alt+shift
does copy+float+move.
* app/tools/gimpnewrectselecttool.[ch]: use RECT_INACTIVE state,
(but doesn't seem to do anything). More importantly, change
logic so that button_release executes the tool, and button
release undo's if appropriate.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_button_press):
if function is RECT_CREATING, start a new rectangle.
* app/tools/gimpnewrectselecttool.c: remove g_printerr statement that
mitch added for debugging.
2006-06-02 Michael Natterer <mitch@gimp.org>
* cursors/Makefile.am
* cursors/cursor-corner-bottom-left.png
* cursors/cursor-corner-bottom-right.png
* cursors/cursor-corner-top-left.png
* cursors/cursor-corner-top-right.png
* cursors/cursor-side-bottom.png
* cursors/cursor-side-left.png
* cursors/cursor-side-right.png
* cursors/cursor-side-top.png
* cursors/xbm/cursor-corner-bottom-left-mask.xbm
* cursors/xbm/cursor-corner-bottom-left.xbm
* cursors/xbm/cursor-corner-bottom-right-mask.xbm
* cursors/xbm/cursor-corner-bottom-right.xbm
* cursors/xbm/cursor-corner-top-left-mask.xbm
* cursors/xbm/cursor-corner-top-left.xbm
* cursors/xbm/cursor-corner-top-right-mask.xbm
* cursors/xbm/cursor-corner-top-right.xbm
* cursors/xbm/cursor-side-bottom-mask.xbm
* cursors/xbm/cursor-side-bottom.xbm
* cursors/xbm/cursor-side-left-mask.xbm
* cursors/xbm/cursor-side-left.xbm
* cursors/xbm/cursor-side-right-mask.xbm
* cursors/xbm/cursor-side-right.xbm
* cursors/xbm/cursor-side-top-mask.xbm
* cursors/xbm/cursor-side-top.xbm: new cursors for edge and corner
resizing. They perfectly align with the small crosshair and can be
used together with tool cursors and cursor modifiers.
* cursors/gimp-tool-cursors.xcf: add them here too.
* app/widgets/widgets-enums.h: add them to the GimpCursorType enum.
* app/widgets/gimpcursor.c: add them here too.
* app/display/gimpdisplayshell-cursor.c: treat them like the small
crosshair (don't replace them by the small crosshair but use them
as-is). Also allow the bad modifier with the large crosshair.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_cursor_update): use the new cursors. Don't
call gimp_tool_set_cursor() here.
(gimp_rectangle_tool_response): reset "function" to RECT_CREATING
when resetting the tool.
* app/tools/gimpselectiontool.[ch] (struct GimpSelectionTool):
added boolean member "allow_move" which defalts to TRUE.
(gimp_selection_tool_oper_update): don't move masks, floating
selections or anything when "allow_move" is FALSE. Changed
behavior of click inside a selection to simply create a new
selection, need to press alt+shift now to drag-float the
selection. Please test this, it's apretty fundamental change!
(gimp_selection_tool_cursor_update): use the tool's configured
cursor instead of always GIMP_CURSOR_MOUSE, so this function can
be called after gimp_rectangle_tool_cursor_update() to add the
plus, minus etc. modifiers.
* app/tools/gimpnewrectselecttool.c: implement
GimpTool::cursor_update() and call
gimp_rectangle_tool_cursor_update() from there. Chain up to get
the plus, minus etc. modifiers added.
Re-enble selection moving:
(gimp_new_rect_select_tool_oper_update): set GimpSelectionTool's
"allow_move" to FALSE unless the rectangle tool is in an idle
state.
(gimp_new_rect_select_tool_button_press): allow a selection moving
to be started if the rectangle tool is idle. Fall back to starting
a rect select if gimp_selection_tool_start_edit() returned FALSE.
2006-06-01 Michael Natterer <mitch@gimp.org>
* cursors/Makefile.am
* cursors/modifier-bad.png
* cursors/xbm/modifier-bad-mask.xbm
* cursors/xbm/modifier-bad.xbm: new "bad" cursor
modifier. Replaces the "bad" cursor.
* cursors/gimp-tool-cursors.xcf: added it here too.
* app/widgets/widgets-enums.h: added GIMP_CURSOR_MODIFIER_BAD.
* app/widgets/gimpcursor.c: add the bad modifier. Leave the bad
cursor there for now.
* app/display/gimpdisplayshell-callbacks.c
* app/tools/gimpaligntool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolortool.c
* app/tools/gimpfliptool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmovetool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c: use the modifier instead of the
cursor. Fixes hotspot jumping when switching between normal and
bad cursors. The changed cursor_update() functions even make more
sense IMHO. Fixes bug #158407.
* app/tools/gimprectangletool.[ch]: add "constrain" property
to specify whether to clip at image bounds when computing
dimensions.
* app/tools/gimpcroptool.c
* app/tools/gimpnewrectselecttool.c: set "constrain" to TRUE.
* app/tools/gimpellipseselecttool.c: set "constrain" to FALSE.
Hopefully fixes bug #329817.
2006-05-28 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_picked):
removed all code except info dialog updating and chain up instead.
* app/tools/gimpcolortool.c (gimp_color_tool_real_picked): newly
added default implementation. Also updates the colormap dialog and
picks into a palette.
* app/tools/gimppainttool.c (gimp_paint_tool_color_picked):
removed. The default impl. does this and much more now. Hopefully
fixes bug #320660.
2006-05-24 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.c (gimp_context_tool_list_thaw): the
default tool is the paintbrush, not rect select.
* app/tools/gimp-tools.c (gimp_tools_register): attach the default
visibility state to the tool_info.
* app/actions/tools-commands.c (tools_reset_cmd_callback): use the
attached boolean instead of reimplementing the default visibility
logic.
2006-05-23 Karine Delvare <edhel@gimp.org>
* app/core/gimpcontext.c
* app/tools/gimp-tools.c
* app/tools/gimpnewrectselecttool.c
* app/tools/gimprectselecttool.c
* app/widgets/gimptoolbox.c
* menus/image-menu.xml.in: replace old rect select by new in the
toolbox.
2006-05-23 Michael Natterer <mitch@gimp.org>
* app/tools/gimptransformtool.c (gimp_transform_tool_dialog_update):
don't call the virtual function if there is no dialog.
(gimp_transform_tool_recalc): show the dialog here after updating it.
* app/tools/gimpperspectivetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c (dialog_update): don't show it here.
2006-05-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimpclonetool.[ch]: re-apply heavily modified patch
from Michael Schumacher which shows the clone source even while
not painting. Fixes bug #324224. Did some additional cleanup.
2006-05-22 Sven Neumann <sven@gimp.org>
* app/actions/plug-in-commands.c (plug_in_collect_image_args):
removed debugging output.
* app/tools/gimpscaletool.c: create the GimpSizeBox in the
prepare() method to make entering relative sizes work.
2006-05-22 Sven Neumann <sven@gimp.org>
* app/tools/gimpscaletool.c (gimp_scale_tool_prepare): initialize
width, height and keep-aspect properties of the size box.