Commit Graph

159 Commits

Author SHA1 Message Date
Sven Neumann 96a46d0d70 Fix bug #491272 (no cursor drawn for small brush sizes):
2007-10-29  Sven Neumann  <sven@gimp.org>

	Fix bug #491272 (no cursor drawn for small brush sizes):

	* app/tools/gimpbrushtool.[ch]
	(gimp_brush_tool_draw_brush): don't draw the brush outline if it
	becomes too small. Instead draw a small cross, but only if
	"draw_fallback" was passed as TRUE.
	(gimp_brush_tool_draw_brush): pass TRUE for "draw_fallback" if
	cursor drawing is disabled for the paint tools.

	* app/tools/gimpsourcetool.c (gimp_source_tool_draw): pass FALSE
	for "draw_fallback".

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_cross_by_anchor):
	draw a symmetric cross for odd handle sizes.

svn path=/trunk/; revision=23984
2007-10-29 17:17:14 +00:00
Sven Neumann a5d10b2ff0 renamed gimp_image_active_drawable() to gimp_image_get_active_drawable().
2007-07-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: renamed gimp_image_active_drawable() to
	gimp_image_get_active_drawable().

	* app/[lots of files]
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

svn path=/trunk/; revision=22958
2007-07-19 14:59:51 +00:00
Michael Natterer e5070a2486 add a local GimpDisplayConfig variable to improve readability.
2007-05-16  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpbrushtool.c (gimp_brush_tool_constructor): add a
	local GimpDisplayConfig variable to improve readability.


svn path=/trunk/; revision=22514
2007-05-16 18:47:47 +00:00
Sven Neumann a4eafbad64 moved brush drawing code to the new function gimp_brush_tool_draw_brush().
2007-05-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpbrushtool.[ch] (gimp_brush_tool_draw): moved
	brush drawing code to the new function gimp_brush_tool_draw_brush().

	* app/tools/gimpsourcetool.c: (gimp_source_tool_draw): draw the
	brush outline at the source position (bug #435545).


svn path=/trunk/; revision=22450
2007-05-07 10:19:04 +00:00
Michael Natterer 83d3a750d4 include "libgimpmath/gimpmathtypes.h" instead of "libgimpmath/gimpmath.h".
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
	instead of "libgimpmath/gimpmath.h".

	* app/core/gimpbrush.h
	* app/paint/gimppaintcore.h
	* app/paint/gimpperspectiveclone.h
	* app/text/gimptext.h
	* app/tools/gimptransformtool.h: include gimpvector.h and
	gimpmatrix.h explicitely where they are needed in public structs.

	* app/*/*.c
	* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
	where needed.

	* app/pdb/paths_cmds.c: regenerated.


svn path=/trunk/; revision=22084
2007-03-09 13:00:01 +00:00
Michael Natterer 8398ed8735 maintain an is_drawn boolean which indicates whether the drawn stuff is
2007-01-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]: maintain an is_drawn boolean which
	indicates whether the drawn stuff is currently visible. Added
	gimp_draw_tool_is_drawn() to obtain it.

	* app/tools/gimpbrushtool.c (gimp_brush_tool_draw): don't create
	the brush outline segments for the purpose of undrawing (if we
	don't have the segments, we can hardly have drawn them before).
	Fixes artifacts when the brush is being scaled or changed.

	* app/core/gimpbrush.c: don't call brush_scale_mask() and
	brush_scale_pixmap() with zero width or height. Fixes warnings
	from these functions.


svn path=/trunk/; revision=21749
2007-01-21 19:54:57 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer c8cb6bfcf4 app/actions/tools-actions.c added actions and callbacks for the new paint
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-11-17 13:06:00 +00:00
Michael Natterer 6eb7089577 Made all brushes scalable from the tool options. So far only downscaling
2006-11-16  Michael Natterer  <mitch@gimp.org>

	Made all brushes scalable from the tool options. So far only
	downscaling is supported since we lack an algorithm for bitmap
	brush upscaling. Addresses bug #65030.

	* app/paint/gimppaintoptions.[ch]: added "brush-scale" property.

	* app/paint/gimpbrushcore.[ch]: separate pressure logic from brush
	scaling logic and take paint_options->brush_scale into account.
	Added gimp_brush_core_create_bound_segs() which returns BoundSegs
	of the correctly scaled brush mask for the brush preview on the
	canvas.

	* app/tools/gimpbrushtool.c: use gimp_brush_core_create_bound_segs()
	instead of doing this here (also removes all knowledge about lowlevel
	stuff from this file). Connect to notify::brush-scale of the
	paint options and invalidate the brush core's brush accordingly.

	* app/tools/gimppaintoptions-gui.c: added brush scale slider.
2006-11-16 15:11:27 +00:00
Michael Natterer a4edd11b28 simplified by calling gimp_draw_tool_pause/resume() unconditionally (it
2006-09-13  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpbrushtool.c: simplified by calling
	gimp_draw_tool_pause/resume() unconditionally (it does no harm,
	regardless of whether the tool is in color picking mode or not).
	Return early in gimp_brush_tool_draw() if color picking is
	enabled.

	* app/tools/gimpsmudgetool.c (gimp_smudge_tool_init): don't enable
	color picking, the tool doesn't use FG or BG.
2006-09-13 11:04:49 +00:00
Sven Neumann 7cbb46b2f0 if the "bad" cursor modifier is set, show the cursor regardless of the
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 14:24:10 +00:00
Michael Natterer 6c7f0c6830 added gimp_tool_get_options() so tools don't need to incude
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-05 18:25:31 +00:00
Sven Neumann 3360cb3150 don't include gimp-intl.h.
2006-08-16  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpbrushtool.c: don't include gimp-intl.h.
2006-08-16 10:34:44 +00:00
Michael Natterer 269ab384cf app/tools/Makefile.am app/tools/tools-types.h new GimpPaintTool subclass
2006-08-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/Makefile.am
	* app/tools/tools-types.h
	* app/tools/gimpbrushtool.[ch]: new GimpPaintTool subclass which
	completely handles brush outline drawing.

	* app/tools/gimppainttool.[ch]: removed all brush stuff here.

	* app/tools/gimpclonetool.[ch]
	* app/tools/gimpconvolvetool.[ch]
	* app/tools/gimpdodgeburntool.[ch]
	* app/tools/gimperasertool.[ch]
	* app/tools/gimppaintbrushtool.[ch]
	* app/tools/gimpsmudgetool.[ch]: derive from GimpBrushTool.

	* app/tools/gimpinktool.c: removed now obsolete cursor_update()
	implementation.
2006-08-15 21:46:22 +00:00
Raphael Quinet 8960d6ac5a Allow some paint tools to not suggest using the Ctrl modifier.
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 14:41:24 +00:00
Raphael Quinet a54a6b162c app/widgets/gimpwidgets-utils.h New utility function to build status bar
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-08-01 23:42:12 +00:00
Raphael Quinet 3739ee1883 app/tools/gimppainttool.c app/tools/gimpvectortool.c Update the status bar
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-30 20:15:07 +00:00
Michael Natterer 5af5606aac removed all code except info dialog updating and chain up instead.
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-28 14:13:44 +00:00
Michael Natterer 4a9a80548a remove some #if 0'ed cruft.
2006-05-22  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.c (gimp_paint_tool_control): remove
	some #if 0'ed cruft.
2006-05-22 19:23:23 +00:00
Michael Natterer b3c20ed2a5 prefix with GIMP_TOOL_ACTION_
2006-05-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-enums.h (enum GimpToolAction): prefix with
	GIMP_TOOL_ACTION_

	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/tools/tool_manager.c: changed accordingly. Introduce a
	common style for GimpTool::control()'s switch() block. Some
	minor cleanups.
2006-05-21 21:12:01 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Michael Natterer c2061e2922 connect to the context's "brush-changed" signal and update the brush
2006-05-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.c: connect to the context's
	"brush-changed" signal and update the brush core's brush
	accordingly. Fixes inconsistent brush preview when not moving
	the mouse while the brush changes (bug #323404).
2006-05-06 21:10:32 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Sven Neumann 5439aa4995 did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gdisp -> display substitution.
2006-03-28 17:55:52 +00:00
Sven Neumann 905fdfcbed did a global gimage -> image substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gimage -> image substitution.
2006-03-28 17:08:36 +00:00
Michael Natterer 2ed407b54f app/tools/gimptool.[ch] add "gboolean proximity" parameter to
2006-03-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: add "gboolean proximity" parameter
	to GimpTool::oper_update() in order to emphasize its importance
	and to avoid peeking around in the GimpDisplayShell struct.

	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpselectiontool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: changed accordingly. Got rid of
	quite some "display/gimpdisplayshell.h" includes.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): pass shell->proximity to
	tool_manager_oper_update_active().
2006-03-25 14:23:09 +00:00
Michael Natterer 8b8c784a5b port to G_DEFINE_TYPE() and friends. Some related cleanup.
2005-12-13  Michael Natterer  <mitch@gimp.org>

	* app/tools/*.c: port to G_DEFINE_TYPE() and friends. Some related
	cleanup.
2005-12-13 09:13:50 +00:00
Michael Natterer d0800a0ccb fix compile warning by adding default: for unused enum values.
2005-10-03  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.c (gimp_paint_tool_color_picked):
	fix compile warning by adding default: for unused enum values.
2005-10-03 21:37:41 +00:00
Michael Natterer 09454fb2a4 some general cleanup.
2005-09-03  Michael Natterer  <mitch@gimp.org>

	* app/base/pixel-region.[ch]: some general cleanup.

	(pixel_region_init_temp_buf)
	(pixel_region_init_data): new functions which initialize pixel
	regions on TempBufs and on raw contiguous arrays of pixel data.

	(pixel_region_configure): fixed a bug that has probably been there
	forever: when processing contiguous (non-tiled) data, interpret
	the original x and y coordinates of the region as offsets into
	the data. Before this fix, the initial x and y were simply ignored
	(by using them in a broken way), thus always forcing the upper
	left corner of the region being the beginning of the passed data.

	Lots of code was working around this problem by setting the
	pixel_region's data pointer to the proper starting pixel of the
	region in the middle the buffer.

	* libgimp/gimppixelrgn.c: some general cleanup.

	(gimp_pixel_rgn_configure): same fix as above. Fortunately, nobody
	seems to know that libgimp pixel regions can be used on arrays of
	data, just as core ones. Only two plug-ins were using this
	feature, and they are antique and written by spencer and federico,
	respectively. They both don't use offsets into the buffers and are
	not affected by this change. It's highly unlikely that anybody out
	there knows/uses this feature, so it can IMHO be safely changed.

	* app/base/temp-buf.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-combine.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpimage-preview.c
	* app/core/gimplayer.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c: use the pixel_region_init_foo()
	functions instead of initializing regions of TempBufs and raw data
	manually. Removed lots of workarounds for the broken offset
	handling. The changed places of code are much more readable now.
2005-09-03 17:16:58 +00:00
Michael Natterer 4fb1743f55 renamed puclic functions, defines and enums to live in a proper "boundary"
2005-08-20  Michael Natterer  <mitch@gimp.org>

	* app/base/boundary.[ch]: renamed puclic functions, defines and
	enums to live in a proper "boundary" namespace. Cleaned up and
	simplified internal code even more.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimplayer-floating-sel.c
	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimppainttool.c: changed accordingly.
2005-08-20 15:46:37 +00:00
Sven Neumann 6466e3b82d need to sort the boundary here since gimp_draw_tool_draw_boundary()
2005-07-18  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpeditselectiontool.c (gimp_edit_selection_tool_start):
	need to sort the boundary here since gimp_draw_tool_draw_boundary()
	expects a sorted boundary now. Fixes bug #310432.

	* app/tools/gimppainttool.c: formatting.
2005-07-18 15:54:49 +00:00
Tor Lillqvist 8cf79496a2 Store the GimpBrushCore::brush_bound_segs as sorted (the result of
2005-06-26  Tor Lillqvist  <tml@novell.com>

	* app/tools/gimppainttool.c (gimp_paint_tool_draw): Store the
	GimpBrushCore::brush_bound_segs as sorted (the result of
	sort_boundary), as the only place where it is used
	(gimp_draw_tool_draw_boundary()) would sort it each time it is
	called anyway.

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_boundary):
	Correspondingly we now don't have to sort the boundary here.
2005-06-26 16:51:13 +00:00
Sven Neumann 27042a7b36 app/tools/gimppainttool.[ch] unified tool and paint-tool statusbar APIs.
2005-05-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimppainttool.[ch]
	* app/tools/gimptool.[ch]: unified tool and paint-tool statusbar APIs.

	* app/tools/gimpblendtool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimpvectortool.c: changed accordingly.

	* app/tools/gimpselectiontool.c: give more hints in the statusbar.
	Some of the selection tools should probably override these.
2005-05-07 13:24:47 +00:00
Sven Neumann aca3e85384 register handler for the "GimpPaint" log domain.
2005-04-13  Sven Neumann  <sven@gimp.org>

	* app/app_procs.c: register handler for the "GimpPaint" log domain.

	* app/core/gimpdatafactory.c (gimp_data_factory_init): don't load
	any data if TRUE is passed for no_data.

	* app/tools/gimppainttool.c (gimp_paint_tool_draw): handle a NULL
	brush gracefully.
2005-04-13 00:16:24 +00:00
Sven Neumann 9071470d63 app/tools/gimppainttool.[ch] export paint tool statusbar API.
2005-04-04  Sven Neumann  <sven@gimp.org>

	* app/tools/gimppainttool.[ch] export paint tool statusbar API.

	* app/tools/gimpclonetool.c: added statusbar hint.
2005-04-04 21:03:21 +00:00
Sven Neumann d164aa746b do nothing if this message is at the top of the stack already.
2005-04-01  Sven Neumann  <sven@gimp.org>

	* app/display/gimpstatusbar.c (gimp_statusbar_push): do nothing if
	this message is at the top of the stack already.
2005-04-01 12:26:32 +00:00
Sven Neumann 45a7cd9a50 added a statusbar message suggesting to use Shift to draw a straight line.
2005-04-01  Sven Neumann  <sven@gimp.org>

	* app/tools/gimppainttool.c: added a statusbar message suggesting
	to use Shift to draw a straight line.
2005-04-01 11:54:08 +00:00
Michael Natterer 1870b5d5c9 in the spirit of the fix for bug #165618 below, allow tools to specify up
2005-03-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptoolcontrol.[ch]: in the spirit of the fix for bug
	#165618 below, allow tools to specify up to two "object actions"
	(actions which select brushes, patterns, ...).

	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimptexttool.c: set actions where appropriate.

	* app/actions/actions.c (action_select_object): allow objects to
	be selected by index.

	* app/actions/context-actions.c: added actions which select
	objects by index. Not really used but the same actions can be used
	to generically pass any GimpActionSelectType enum value to the
	action callbacks.

	* app/actions/tools-actions.c
	* app/actions/tools-commands.[ch]: added actions and callbacks
	for the new generic tool objects.

	Also fixed and cleaned up the new generic tool value code.
2005-03-04 19:05:40 +00:00
Michael Natterer a303b44c62 Fixed bug #165618:
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.
2005-03-04 11:42:46 +00:00
Sven Neumann 0c2d88e992 app/tools/Makefile.am added gimp_tool_motion_constrain(),
2004-08-22  Sven Neumann  <sven@gimp.org>

	* app/tools/Makefile.am
	* app/tools/tools-utils.[ch]: added gimp_tool_motion_constrain(),

	* app/paint/gimppaintcore.[ch]: removed gimp_paint_core_constrain().

	* app/tools/gimppainttool.c: changed accordingly.

	* app/tools/gimpblendtool.[ch]: use gimp_tool_motion_constrain()
	instead of duplicating that functionality.

	* app/tools/gimpmeasuretool.c: use gimp_tool_motion_constrain()
	instead of implementing completely different constraints.
2004-08-22 21:48:50 +00:00
Michael Natterer 85c2b2dd4f removed enum GimpPaintCoreState.
2004-07-19  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.h: removed enum GimpPaintCoreState.

	* app/paint/paint-enums.h: added enum GimpPaintState (with values
	that have a name space).

	* app/paint/gimppaintcore.[ch]
	* app/paint/gimpairbrush.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimpink.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimpsmudge.c
	* app/tools/gimppainttool.c: changed accordingly.

	* app/tools/gimpinktool.c: removed unused #include.
2004-07-19 14:37:40 +00:00
Michael Natterer c5ec0d4f70 *** empty log message *** 2004-07-13 16:36:29 +00:00
Simon Budig e7af53b0d3 app/actions/dialogs-commands.c app/display/gimpdisplayshell-dnd.c
2004-07-04  Simon Budig  <simon@gimp.org>

	* app/actions/dialogs-commands.c
	* app/display/gimpdisplayshell-dnd.c
	* app/gui/preferences-dialog.c
	* app/tools/gimppainttool.c
	* app/widgets/gimpdeviceinfo.c
	* app/widgets/gimpitemtreeview.c
	* plug-ins/imagemap/imap_selection.c
	* tools/pdbgen/pdb/gradients.pdb: Small changes to make GIMP
	CVS compile with gcc 2.95 again. Mostly double semicolons and
	variable declarations after other stuff. Spotted by Martin
	Renold.

	* app/pdb/gradients_cmds.c: regenerated.

	(there is one issue left, see his patch at
	http://old.homeip.net/martin/gcc-2.95.diff, I did not
	copy the #define va_copy __va_copy, since I don't know
	what happens here.)
2004-07-04 21:27:09 +00:00
Michael Natterer 04ed4a8a0f if the color tool is enabled, skip cursor hiding entirely.
2004-07-03  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.c (gimp_paint_tool_cursor_update): if
	the color tool is enabled, skip cursor hiding entirely.
2004-07-03 13:07:30 +00:00
Philip Lafleur bbed5b577b Chain up if the color tool is enabled. This fixes the problem of the color
2004-06-30  Philip Lafleur  <plafleur@cvs.gnome.org>

	* app/tools/gimppainttool.c (gimp_paint_tool_cursor_update):
	Chain up if the color tool is enabled. This fixes the problem of
	the color picker cursor not appearing when using a paint tool
	in color picking mode while "Show Paint Tool Cursor" is off.
2004-07-01 00:12:29 +00:00
Michael Natterer 4022980314 Fixed a 1.2 -> 2.0 regression that was forgotten:
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-30 12:10:08 +00:00
Michael Natterer c186126083 removed again (tools must not draw outside GimpDrawTool::draw()).
2004-06-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpclonetool.c (gimp_clone_tool_button_release):
	removed again (tools must not draw outside GimpDrawTool::draw()).

	(gimp_clone_tool_draw): removed check for gimp_draw_tool_is_active()
	because the draw function would not be called if the draw tool was
	inactive. Simplified check for whether or not to draw the src
	location.

	* app/tools/gimppainttool.c (gimp_paint_tool_button_release):
	pause/resume the draw tool across all button_release actions so
	tools (clone) have a chance to draw different things depending on
	gimp_tool_control_is_active(tool->control). Fixes bug #145022.
2004-06-28 11:36:00 +00:00
Michael Natterer 02b91f6628 app/tools/gimptool.[ch] added boolean return value to
2004-06-24  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: added boolean return value to
	GimpTool::key_press() which indicates if the event was handled.

	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.[ch]
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: return TRUE if the key event was handled.

	* app/tools/gimppainttool.c: removed key_press() implementation.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpcontrollerkeyboard.[ch]: new controller class
	which takes GdkEventKey and emits controller events for all
	combinations of modifiers and cursor keys.

	* app/widgets/gimpcontrollers.[ch]: added new function
	gimp_controllers_get_keyboard().

	* app/display/gimpdisplayshell-callbacks.c: if a key event was not
	handled by the active tool, dispatch it to the keyboard controller.

	* etc/controllerrc: add a keyboard controller which is configured
	to do the same as the removed gimp_paint_tool_key_press().
2004-06-24 10:16:08 +00:00
Michael Natterer 7e52ed902a added signal "set-brush" which is G_SIGNAL_RUN_LAST so we can connect
2004-06-23  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpbrushcore.[ch]: added signal "set-brush" which is
	G_SIGNAL_RUN_LAST so we can connect before and after the default
	implementation. Moved the brush setting and outline invalidation
	stuff to its default implementation. Also remember the outline's
	width and height. Call gimp_brush_core_set_brush() from
	gimp_brush_core_invalidate_cache() so "set-brush" is emitted
	whenever a generated brush becomes dirty.

	* app/tools/gimppainttool.c (gimp_paint_tool_button_press): don't
	pause/resume but rather stop/start the draw_tool. Fixes straight
	line preview aretefacts.

	(gimp_paint_tool_oper_update): set the brush_core's brush before
	starting the draw_tool.

	(gimp_paint_tool_draw): never free the brush_core's cached brush
	outline because the brush_core does that by itself now.

	(gimp_paint_tool_set_brush)
	(gimp_paint_tool_set_brush_after): new callbacks which pause and
	resume the draw_tool. Fixes brush outline artefacts when modifying
	the current brush e.g. by using the mouse wheel.
2004-06-23 12:19:28 +00:00
Michael Natterer 587e070ff4 removed PRETRACE_PAINT and POSTTRACE_PAINT from the GimpPaintCoreState
2004-06-14  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: removed PRETRACE_PAINT and
	POSTTRACE_PAINT from the GimpPaintCoreState enum. Removed
	"gboolean traces_on_window" from GimpPaintCoreClass.

	* app/paint/gimpclone.[ch]
	* app/paint/gimpink.c
	* app/tools/gimpclonetool.c: changed accordingly.

	* app/tools/gimppainttool.c: ditto. Show the brush outline
	while painting. Fixes bug #118348.
2004-06-14 15:26:29 +00:00