2007-01-21 Raphael Quinet <raphael@gimp.org>
* app/display/gimpstatusbar.[ch]
* app/tools/gimptool.[ch]: add optional help text at the end of
the messages generated by gimp_statusbar_push_coords() and
gimp_statusbar_push_length().
* app/tools/gimpcolortool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpmovetool.c
* app/tools/gimprectangletool.c: use the updated functions.
* app/tools/gimpblendtool.c
* app/tools/gimpcolorpickertool.c: added status bar messages.
svn path=/trunk/; revision=21745
2006-11-17 Michael Natterer <mitch@gimp.org>
* app/actions/tools-actions.c
* app/actions/tools-commands.[ch]: added actions and callbacks for
the new paint options brush scale property. Assigned new
shortcuts: '<' and '>' are now changing tool-value-1 and '[' and
']' are changing tool-value-2
* app/actions/context-actions.c: removed the shortcuts from the
brush size actions.
* app/tools/gimpbrushtool.c
* app/tools/gimpcolortool.c: set tool-value-2 to brush-scale and
to color-average-radius, so '[' and ']' always affect the size of
the tip of the active tool. tool-value-1 is connected to
context-opacity so that is changeable using '<' and '>' now.
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-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-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.
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-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.
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.
2005-11-19 Michael Natterer <mitch@gimp.org>
* app/tools/gimpaligntool.c
* app/tools/gimpcolortool.c
* app/tools/gimpfliptool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmovetool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c: started to get rid of all stock GDK
cursors in preparation of fixing bug #158407.
2005-09-26 Michael Natterer <mitch@gimp.org>
Allow to disable the color picker info dialog. Fixes bug #315011:
* app/tools/tools-enums.[ch] (enum GimpColorPickerMode): added
value GIMP_COLOR_PICK_MODE_PALETTE.
* app/tools/gimpcolorpickeroptions.[ch]: deprecated property
"add-to-palette" and added property "use-info-window". Changed
tool options GUI accordingly.
* app/tools/gimpcolorpickertool.c
(gimp_color_picker_tool_modifier_key): made <shift> toggle
the use-info-window property.
(gimp_color_picker_tool_picked): moved palette picking code
into the pick_mode switch() statement.
* app/tools/gimpcolortool.c (gimp_color_tool_cursor_update):
show a "plus" cursor when adding to the palette.
2005-03-19 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-sample-points.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell.c
* app/tools/gimpcolortool.c: make sure sample points always have
coordinates in the range [0..width/height-1], also added lots of
+0.5 because they live at the pixels' centers, not at their
borders. Fixed drawing of sample points at the display borders.
2005-03-09 Michael Natterer <mitch@gimp.org>
More sample point stuff. Addresses bug #137776.
* app/core/gimpimage-sample-points.c
* app/core/gimpimage-undo-push.c: append, not prepend the sample
paints to the image's list because their index matters. Update
sample points when their index changes.
* app/display/gimpcanvas.[ch]: added own sytles for the sample
points. Added gimp_canvas_draw_text() which uses a PangoLayout
which is cached in the canvas.
* app/display/gimpdisplayshell-draw.c
(gimp_display_shell_draw_sample_point): draw the sample points
more distinct from guides using the new canvas APIs above.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_[hv]ruler_button_press): factored out all
code to
(gimp_display_shell_ruler_burron_press): which takes a boolean
"horizontal" variable and allows to add sample points with
<control>+drag.
* app/tools/gimpcolortool.[ch]: implement adding, moving and
removing of sample points in the same way as the move tool moves
guides.
* app/tools/gimpcolorpickertool.c
(gimp_color_picker_tool_oper_update): chain up.
2005-03-04 Michael Natterer <mitch@gimp.org>
Fixed bug #165618:
* app/tools/gimptoolcontrol.[ch]: added new functions
gimp_tool_control_set/get_action_value_1/2/3/4() which allow tools
to specify their primary, secondary etc. "values" using
action-identifying strings like "context/context-brush-radius-set".
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolortool.c
* app/tools/gimpinktool.c
* app/tools/gimppainttool.c: set actions where appropriate. Still
needs some way to document the mapping in a user-visible way.
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c: tab removal and minor cleanups.
* app/actions/actions.[ch]: added utility function
action_select_property().
* app/actions/tools-actions.c
* app/actions/tools-commands.[ch]: added actions and callbacks for
setting the ink blob size, aspect and angle. Also added actions
and callbacks for the new generic tool values.
2004-07-27 Sven Neumann <sven@gimp.org>
* libgimpbase/Makefile.am
* libgimpbase/gimpbase.h
* libgimpbase/gimpbase.def
* libgimpbase/gimpmemsize.[ch]: added new files with memsize
related functions (moved here from gimputil.c) and
GIMP_TYPE_MEMSIZE (moved here from app/config/gimpconfig-types.[ch]).
* libgimpbase/gimputils.[ch]: removed gimp_memsize_to_string() here.
* libgimpbase/gimpunit.[ch]: added GIMP_TYPE_UNIT (moved here from
app/config/gimpconfig-types.[ch]).
* libgimpbase/gimpbase-private.c
* libgimp/gimptile.c
* libgimp/gimpunitcache.c
* plug-ins/help/domain.c
* app/xcf/xcf-read.c: need to include glib-object.h.
* plug-ins/common/uniteditor.c: use GIMP_TYPE_UNIT.
* app/config/gimpconfig-types.[ch]: removed code that lives in
libgimpbase now.
* app/config/gimpconfig-deserialize.c: changed accordingly.
* app/config/gimpbaseconfig.c
* app/config/gimpdisplayconfig.c
* app/core/gimpcontext.c
* app/gui/grid-dialog.c
* app/tools/gimpcolortool.c
* app/widgets/gimpaction.c
* app/widgets/gimpunitstore.c: no need to include gimpconfig-types.h
any longer.
2004-06-30 Michael Natterer <mitch@gimp.org>
Fixed a 1.2 -> 2.0 regression that was forgotten:
* app/widgets/widgets-enums.[ch]: added enum GimpColorPickState
which can be one of { NEW, UPDATE }.
* app/widgets/gimppaletteeditor.[ch]: changed #if 0'ed function
gimp_palette_editor_update_color() to
gimp_palette_editor_pick_color() and restored the functionality of
creating/updating colors via this API
Changed button_press handler to only edit the color on double
click if it's really a double click on the same color.
Fixes bug #141381.
* app/tools/gimpcolorpickeroptions.[ch]: added boolean property
"add-to-palette" and a GUI for it.
* app/core/gimpmarshal.list
* app/tools/gimpcolortool.[ch]: added a GimpColorPickState
parameter to the "color_picked" signal. Pass NEW on button_press
and UPDATE on motion.
* app/tools/gimpcurvestool.c (gimp_curves_tool_color_picked)
* app/tools/gimplevelstool.c (gimp_levels_tool_color_picked)
* app/tools/gimppainttool.c (gimp_paint_tool_color_picked):
changed accordingly
* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_picked):
If "add-to-palette" is TRUE, get the palette editor and call
gimp_palette_editor_pick_color().
2004-06-14 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]: remember the last used
GimpCursorFormat so changing the format in prefs applies
instantly, and not after the next tool change.
* app/display/gimpdisplayshell-cursor.[ch]
* app/tools/gimptool.[ch]
* app/tools/gimptoolcontrol.[ch]
* app/tools/gimpclonetool.c
* app/tools/gimpcolortool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimptransformtool.c: s/GdkCursorType/GimpCursorType/g
2004-06-05 Michael Natterer <mitch@gimp.org>
* cursors/Makefile.am
* cursors/cursor-none.png
* cursors/xbm/cursor-none.xbm: new empty cursor images.
* app/config/gimpdisplayconfig.[ch]
* app/config/gimprc-blurbs.h
* app/widgets/widgets-enums.h
* app/widgets/gimpcursor.c
* app/display/gimpdisplayshell-cursor.c
* app/tools/gimppainttool.[ch]
* app/tools/gimpinktool.c
* app/gui/preferences-dialog.c: applied patches from Philip
Lafleur which implement hiding the cursor completely for paint
tools. Changed the name of the config option from
"hide-paint-tool-cursor" to "show-paint-tool-cursor" and default
to TRUE because this needs the brush outline being visible while
painting to be really usable. Fixes bug #132163.
* app/widgets/widgets-enums.h: renamed all GimpCursorType and
GimpToolCursorType enum values to GIMP_CURSOR_* and
GIMP_TOOL_CURSOR_*.
* app/widgets/gimpcursor.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-cursor.c
* app/tools/gimp*tool.c; changed accordingly.
2003-10-25 Sven Neumann <sven@gimp.org>
* app/tools/tools-enums.[ch]: added GIMP_COLOR_PICK_MODE_NONE to
the GimpColorPickMode enum.
* app/tools/gimpcolorpickeroptions.[ch]: removed "update-toolbox"
property; the new enum value serves this role better.
* app/tools/gimpcolorpickertool.c: handle the new enum value.
* app/tools/gimpcolortool.c: default to GIMP_COLOR_PICK_MODE_NONE.
Don't set a cursor modifier for this value. Fixes tool cursor for
levels and curves tools.
* app/tools/gimppainttool.[ch]: added a function to conveniently
enable the color picker and set the pick mode at the same time.
* app/tools/gimpairbrushtool.c
* app/tools/gimppaintbrushtool.c
* app/tools/gimppenciltool.c
* app/tools/gimpsmudgetool.c: use the new function.
* app/tools/gimperasertool.c: enabled color picking in the eraser
tool but set the mode to GIMP_COLOR_PICK_MODE_BACKGROUND.
2003-09-26 Michael Natterer <mitch@gimp.org>
Cleaned up all places which pick colors to work consistently: the
concept of an "active color" has disappeared, instead <ctrl> picks
the BG color all over the place (fixes bug #122931).
* app/tools/tools-enums.[ch]: added enum GimpColorPickMode which
can be one of { FOREGROUND, BACKGROUND }. Reordered enums so
non-registered ones are at the end of the file. Removed trailing
whitespace.
* app/tools/gimpcolorpickeroptions.[ch]: added a "pick-mode"
property and a GUI for it. Renamed the "update-active" property to
"update-toolbox".
* app/tools/gimpcolorpickertool.c: honor the new option. Toggle
pick-mode on <ctrl>.
* app/tools/gimpcolortool.[ch]: added pick_mode member and change
the cursor accordingly.
* app/widgets/gimpcolormapeditor.[ch]: added "GdkModifierType
state" to the "selected" signal. Removed the signal's default
implementation.
* app/gui/dialogs-constructors.c: fixed the signal handler which
lives here and set BG if <ctrl> was pressed.
* app/widgets/gimppaletteeditor.c: removed weird <ctrl> <->
active_color interaction and pick BG on <ctrl>. Don't change the
toolbox color when editing a color in the palette.
* app/widgets/gimptoolbox-color-area.[ch]: made the whole
active_color stuff private. Will remove these artefacts soon...
* app/gui/colormap-editor-menu.c
* app/gui/palette-editor-menu.c: added separate menu entries
for adding a color from the current FG and BG.
* app/gui/colormap-editor-commands.c
* app/gui/palette-editor-commands.[ch]: changed callbacks
accordingly.
* cursors/background.xbm
* cursors/background_mask.xbm
* cursors/foreground.xbm
* cursors/foreground_mask.xbm
* cursors/gimp-tool-cursors.xcf: moved the FG/BG cursor modifiers
closer to the upper right corner.
* app/widgets/gimpcursor.c: ignore the cursor modifiers' hotspots
since they are not relevant and I didn't save the hotspot in the
updated cursor files for that reason.
2003-07-10 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-transform.[ch]: removed
gimp_display_shell_transform_boundary() again...
* app/tools/gimpdrawtool.[ch]: ...and added as
gimp_draw_tool_draw_boundary(). Removed the GimpDrawToolState enum
and the "draw_state" member since they were redundant. Cleanup.
* app/tools/gimpeditselectiontool.c: changed accordingly.
* app/tools/gimppainttool.[ch]: added a brush preview so we
finally see where we will paint. Fixes bug #32498. Cleanup.
* app/tools/tool_manager.c: also look at draw_tool->gdisp, not
only at tool->gdisp when deciding whether the active tool has to
be suspended/resumed/halted. Fixes a couple of fnords with the
line preview and the new brush preview.
* app/tools/gimpcolortool.c: minor cleanup.
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 Sven Neumann <sven@gimp.org>
* app/tools/gimpcoloroptions.c: changed the default radius.
* app/tools/gimpcolortool.[ch]: pass GimpColorOptions to
gimp_color_tool_enable(). Added gimp_color_tool_disable() and
gimp_color_tool_is_enabled().
* app/tools/gimpcolorpickertool.c: changed accordingly.
* app/tools/gimppainttool.[ch]: derived GimpPaintTool from
GimpColorTool and removed most color picking code.
* app/tools/gimpdodgeburntool.c (gimp_dodgeburn_tool_modifier_key)
* app/tools/gimperasertool.c (gimp_eraser_tool_modifier_key):
chain up to the parent class.
* app/tools/gimppaintbrushtool.c: purely cosmetic change.
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-04 Sven Neumann <sven@gimp.org>
* app/tools/Makefile.am
* app/tools/gimpcoloroptions.[ch]
* app/tools/gimpcolortool.[ch]: new files that implement base
classes moved out of GimpColorPickerOptions and GimpColorPickerTool.
* app/tools/gimpcolorpickeroptions.[ch]
* app/tools/gimpcolorpickertool.[ch]: derive from the new obejcts.
* app/tools/gimpimagemaptool.h
* app/tools/gimppainttool.c
* app/tools/tools-types.h: moved typedefs into the types file.