Commit Graph

205 Commits

Author SHA1 Message Date
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
Michael Natterer 3e2690832c added new virtual function GimpPaintCore::post_paint() and call it after
2004-06-14  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: added new virtual function
	GimpPaintCore::post_paint() and call it after calling
	GimpPaintCore::paint().

	* app/paint/gimpbrushcore.[ch]: renamed brush_core->grr_brush
	to brush_core->main_brush and reset brush_core->brush
	to brush_core->main_brush in GimpPaintCore::post_paint().

	* app/paint/gimpbrushcore.c
	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimppainttool.c: removed all code which restores
	the brush_core's old brush after painting since post_paint()
	does this automatically now.

	* app/paint/gimpclone.[ch]: moved static variables to the
	GimpClone struct.
2004-06-14 12:52:33 +00:00
Simon Budig 3c1b7fe68f renamed the "arrow_key" member to "key_press", since it is now no longer
2004-06-12  Simon Budig  <simon@gimp.org>

	* app/tools/gimptool.[ch]: renamed the "arrow_key" member
	to "key_press", since it is now no longer about just the arrow
	keys.

	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpeditselectiontool.h
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/tools/tool_manager.c: Changed accordingly.
2004-06-12 18:41:52 +00:00
Michael Natterer 714d63fcda cursors/Makefile.am cursors/cursor-none.png new empty cursor images.
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.
2004-06-04 23:08:29 +00:00
Sven Neumann c509204b7d tools/pdbgen/pdb/image.pdb app/pdb/image_cmds.c reverted changes I did to
2004-06-01  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/image.pdb
	* app/pdb/image_cmds.c
	* app/core/gimpimage.[ch]: reverted changes I did to the image
	unit earlier. As in 2.0, it will continue to not accept pixels.
	This makes the PDB API and the XCF format compatible again and
	fixes bug #142961 (and to some extent bug #137704).

	* app/core/Makefile.am
	* app/core/gimpimage-unit.[ch]: removed these files. The
	convenience accessors defined here aren't commonly used any
	longer.

	* app/display/gimpdisplay.[ch]
	* app/display/gimpdisplayshell.[ch]: added a unit parameter to
	gimp_display_new(). Made "unit" and "scale" properties of
	GimpDisplayShell.

	* app/actions/image-commands.c
	* app/actions/images-commands.c
	* app/actions/layers-commands.c
	* app/actions/select-commands.c
	* app/actions/view-commands.c
	* app/core/gimp-edit.c
	* app/core/gimp.[ch]
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpstatusbar.c
	* app/file/file-open.c
	* app/gui/gui-vtable.c
	* app/gui/info-window.c
	* app/gui/offset-dialog.c
	* app/gui/resize-dialog.[ch]
	* app/pdb/display_cmds.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/display.pdb: changed accordingly. Use the
	display unit where the image unit was used before.
2004-06-01 22:04:20 +00:00
Michael Natterer 23cfde41ba removed enum GimpPaintCoreFlags and member GimpPaintCore::flags. Added
2004-05-27  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: removed enum GimpPaintCoreFlags
	and member GimpPaintCore::flags. Added "gboolean traces_on_window"
	to GimpPaintCoreClass (defaults to FALSE).

	* app/paint/gimpclone.c: set traces_on_window = TRUE.

	* app/paint/gimpbrushcore.[ch]: added
	"gboolean handles_changing_brush" to GimpBrushCoreClass (defaults
	to FALSE).

	* app/paint/gimpclone.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.c: set handles_changing_brush = TRUE.

	* app/tools/gimppainttool.c: changed accordingly.
2004-05-27 20:48:49 +00:00
Michael Natterer b9d74b9aa4 added "guint32 time" parameters to GimpPaintCore::paint() and
2004-05-26  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: added "guint32 time" parameters
	to GimpPaintCore::paint() and ::interpolate().

	* 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/gimppaintbrush.c
	* app/paint/gimpsmudge.c: changed accordingly.

	* app/paint/gimpink.c: ditto and use the passed time instead of
	hardcoded dummy values.

	* app/paint/gimppaintcore-stroke.c: pass '0' as time.

	* app/tools/gimppainttool.c: pass the GdkEvent time.
2004-05-26 16:13:53 +00:00
Michael Natterer 552fc7a519 don't do special stuff if a virtual function doesn't exist. Instead, added
2004-05-26  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.c: don't do special stuff if a virtual
	function doesn't exist. Instead, added default implementations
	which do the special stuff and call the virtual functions
	unconditionally.

	* app/tools/gimppainttool.c: some stylistic cleanup.
2004-05-26 12:55:10 +00:00
Michael Natterer 080b503fd0 check if the GimpPaintCore really is a GimpBrushCore before catsting and
2004-05-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.c (gimp_paint_tool_button_press): check
	if the GimpPaintCore really is a GimpBrushCore before catsting and
	fiddling with internaly.
2004-05-26 08:45:59 +00:00
Michael Natterer 9a41a73de8 app/paint/Makefile.am app/paint/gimpbrushcore-kernels.h new GimpPaintCore
2004-05-25  Michael Natterer  <mitch@gimp.org>

	* app/paint/Makefile.am
	* app/paint/gimpbrushcore-kernels.h
	* app/paint/gimpbrushcore.[ch]: new GimpPaintCore subclass
	containing all the brush painting specific stuff.

	* app/paint/gimppaintcore-kernels.h: removed this file.

	* app/paint/gimppaintcore.[ch]: removed all brush stuff.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.[ch]
	* app/paint/gimpconvolve.[ch]
	* app/paint/gimpdodgeburn.[ch]
	* app/paint/gimperaser.[ch]
	* app/paint/gimppaintbrush.[ch]
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.[ch]: changed accordingly. Derive all
	classes which used to derive directly from GimpPaintCore from
	GimpBrushCore now. Lots of cleanup.

	* app/paint/paint-types.h
	* app/paint/gimp-paint.c
	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimppainttool.c
	* tools/kernelgen.c: changed accordingly.
2004-05-25 20:41:09 +00:00
Simon Budig 331f982322 added "use_offsets" parameter to gimp_draw_tool_draw_boundary() for
2004-02-21  Simon Budig  <simon@gimp.org>

	* app/tools/gimpdrawtool.[ch]: added "use_offsets" parameter
	to gimp_draw_tool_draw_boundary() for consistency.

	* app/tools/gimpeditselectiontool.c: Changed accordingly.

	* app/tools/gimppainttool.c: when drawing straight lines draw
	the brush preview at the end of the line.
2004-02-21 16:06:56 +00:00
Simon Budig 40ac20ff92 app/display/gimpdisplayshell.c Adjusted snapping distance to 8 pixels,
2004-02-18  Simon Budig  <simon@gimp.org>

	* app/display/gimpdisplayshell.c
	* app/tools/gimpmovetool.c: Adjusted snapping distance
	to 8 pixels, probably should be a preferences option.

	* app/tools/gimppainttool.c: Do not center the start and end
	of a straight line to the center of an image-pixel unless
	the brush mode is GIMP_BRUSH_HARD. Fixes bug #134410.
2004-02-18 18:37:49 +00:00
Michael Natterer 84458f5b95 removed GimpTool::cursor_update() implementation (which was there only to
2004-01-02  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.c: removed GimpTool::cursor_update()
	implementation (which was there only to stop drawing the brush
	preview when the mouse leaves the canvas). Instead, look at
	shell->proximity in GimpTool::oper_update() and just don't start
	drawing the preview if proximity is FALSE.

	* app/display/gimpdisplay.c (gimp_display_delete): set
	gdisp->shell to NULL *before* gtk_widget_destroy()ing the shell so
	our tool callbacks don't dispatch stuff while the shell is in the
	middle of being destroyed.

	Both changes fix bug #129374, though the latter is the fix for the
	real problem.
2004-01-02 17:36:45 +00:00
Sven Neumann c590c6aa15 app/display/gimpdisplayshell-callbacks.c
2003-10-28  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimphistogramview.c
	* app/widgets/gimpnavigationpreview.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppickbutton.c: use multihead safe variants of
	the unsafe functions gdk_pointer_ungrab(), gdk_keyboard_ungrab()
	and gdk_device_get_core_pointer().

	* plug-ins/libgck/gck/gck.h
	* plug-ins/libgck/gck/gckcolor.c: made libgck multi-head safe.

	* plug-ins/Lighting/lighting_ui.c
	* plug-ins/MapObject/mapobject_preview.c
	* plug-ins/MapObject/mapobject_ui.c: changed accordingly.

	* plug-ins/common/animationplay.c
	* plug-ins/common/curve_bend.c
	* plug-ins/gfig/gfig.c
	* plug-ins/imagemap/imap_preview.c: use multihead safe GDK API.
2003-10-29 20:57:21 +00:00
Sven Neumann 190a68b917 added GIMP_COLOR_PICK_MODE_NONE to the GimpColorPickMode enum.
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-10-25 19:00:49 +00:00
Sven Neumann 69f7bd131c app/core/Makefile.am added small wrappers to ease handling of image units
2003-10-01  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpimage-unit.[ch]: added small wrappers to ease
	handling of image units and to hide the core GimpUnit API.

	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpstatusbar.c
	* app/gui/info-window.c:
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimpscaletool.c: use the new functions.

	* app/core/gimp-units.c
	* app/vectors/gimpvectors-export.c: use the core GimpUnit API.

	* app/vectors/gimpvectors.c: no need to include gimpunit.h here.
2003-10-01 17:32:14 +00:00
Michael Natterer 6b2ca702ad app/paint/Makefile.am removed... ...and added.
2003-09-18  Michael Natterer  <mitch@gimp.org>

	* app/paint/Makefile.am
	* app/paint/paint.[ch]: removed...
	* app/paint/gimp-paint.[ch]: ...and added.

	* app/core/gimp.c: changed accordingly.

	* app/tools/Makefile.am
	* app/tools/tools.[ch]: removed...

	* app/tools/gimp-tools.[ch]: ...and added. Added
	gimp_tools_restore() and gimp_tools_save() and moved the entire
	tool registering and tool_options loading/saving code here. Call
	tool_manager_init() from gimp_tools_init() and tool_manager_exit()
	from gimp_tools_exit().

	* app/tools/tool_manager.[ch]: removed the code which now lives
	in gimp-tools.[ch]. The tool manager now has no knowledge about
	individual tools any more and just handles the active_tool
	and the tool part of tool <-> display interaction.
	Removed tool_manager_get_info_by_type().

	* app/tools/gimpvectortool.c (gimp_vector_tool_register): the
	tool's identifier is "gimp-vector-tool", not "gimp-path-tool".

	* app/app_procs.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/gui/vectors-commands.c
	* app/tools/gimppainttool.c: changed accordingly.
2003-09-18 13:51:10 +00:00
Michael Natterer 2ce758b846 Added nomis' favorite feature ;)
2003-09-17  Michael Natterer  <mitch@gimp.org>

	Added nomis' favorite feature ;)

	* app/paint/gimppaintcore.[ch]: added gimp_paint_core_cancel()
	which can be called instead of gimp_paint_core_finish().
	It simply copies core->undo_tiles back to the drawable instead of
	pushing them to the undo stack.

	* app/tools/gimppainttool.c (gimp_paint_core_button_release): call
	_cancel() instead of _finish() if the right mouse button is
	pressed.
2003-09-17 12:05:11 +00:00
Michael Natterer c049f82e59 made "tool-info" a G_PARAM_CONSTRUCT_ONLY property.
2003-08-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.c: made "tool-info" a G_PARAM_CONSTRUCT_ONLY
	property.

	* app/tools/tool_manager.c (tool_manager_tool_changed): pass it to
	g_object_new() instead of setting it after tool creation.

	* app/tools/gimppainttool.[ch]
	* app/tools/gimptransformtool.[ch]: removed ugly
	"gboolean notify_connected" hacks and connect to the signals in
	GObject::constructor().

	* app/tools/gimppainttool.c (gimp_paint_tool_contstructor): create
	paint_tool->core here from tool->tool_info->paint_info->paint_type.

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimppenciltool.c
	* app/tools/gimpsmudgetool.c: changed accordingly. Removed lots of
	useless class_init functions. Converted tabs to spaces. Cleanup.
2003-08-30 16:41:35 +00:00
jaycox 012288a54d paint_core_interpolate now takes care of setting core->last_coords. Don't
* app/paint/gimppaintcore.c: paint_core_interpolate now takes care
	of setting core->last_coords.  Don't reset core->distance in
	paint_core_start (fixes problem with shift-click brush strokes).
	Improved brush placement for stroked selections in
	paint_core_interpolate.
	* app/paint/gimppaintcore-stroke.c: dont need to set
	core->last_coords anymore.
	* app/tools/gimppainttool.c: dont need to set core->last_coords
	anymore.  Set core->distance in gimp_paint_tool_button_press.
2003-08-21 10:44:11 +00:00
Michael Natterer 82ac2e384f always look for the active drawable, not for the active layer. Fixes line
2003-08-19  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.c
	(gimp_paint_tool_oper_update,cursor_update): always look for the
	active drawable, not for the active layer. Fixes line and brush
	preview drawing for channels.
2003-08-19 18:04:40 +00:00
Michael Natterer e9e98af6fb app/config/gimpdisplayconfig.[ch] added "gboolean show_brush_outline".
2003-08-19  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpdisplayconfig.[ch]
	* app/config/gimprc-blurbs.h: added "gboolean show_brush_outline".

	* app/gui/preferences-dialog.c (prefs_dialog_new): added it to the
	"Pointer Movement Feedback" frame.

	* app/tools/gimppainttool.[ch]: connect to
	"notify::show-brush-outline" and toggle brush outline display
	accordingly. Fixes bug #120084.
2003-08-19 17:20:05 +00:00
Simon Budig 658407d3e3 Added changing the opacity via cursor keys. Left/Right: +- 1%, UpDown: +-
2003-08-08  Simon Budig  <simon@gimp.org>

        * app/tools/gimppainttool.c: Added changing the opacity via
        cursor keys. Left/Right: +- 1%, UpDown: +- 10%.

        I am just committing this, because jimmac will kill me if I dont...
2003-08-08 07:57:33 +00:00
Michael Natterer 827c3f37c4 removed the brush outline members since we have no chance to really cache
2003-07-24  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.[ch]: removed the brush outline members
	since we have no chance to really cache them without duplicating
	GimpPaintCore's brush change notification code.

	* app/paint/gimppaintcore.[ch]: added the outline here and really
	cache it this time. The paint_core doesn't create or use the
	outline but frees and NULLifies it whenever the brush changes.
2003-07-24 16:35:25 +00:00
Michael Natterer 30e041cd79 add a small EPSILON to the brush coordinates before rounding them (fixes
2003-07-16  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppainttool.c (gimp_paint_tool_draw): add a small
	EPSILON to the brush coordinates before rounding them (fixes
	off-by-one floating point rounding fnord for "hard edge" painting
	where e.g. (5.0 - (3.0 / 2.0)) was rounded to 3.0 instead of 4.0).

	* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_boundary): use
	RINT() instead of floor() to round the transformed boundary to
	GdkSegments.
2003-07-16 16:19:16 +00:00
Michael Natterer 78262ef745 removed "gboolean hard" member/property...
2003-07-14  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimperaseroptions.[ch]: removed "gboolean hard"
	member/property...

	* app/paint/gimppaintoptions.[ch]: ...and added it here. Added
	gimp_paint_options_get_brush_mode() utility function.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.h
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c: use the new utility funtion where
	appropriate. Removed trailing whitespace.

	* app/tools/gimpdrawtool.[ch] (gimp_paint_tool_draw_boundary):
	changed offset parameters from gint to gdouble so we can show the
	brush preview at sub-pixel positions.

	* app/tools/gimppainttool.c: use sub-pixel coordinates for the
	brush preview if paint_options->hard is FALSE (doesn't work for
	the pencil yet).

	The new brush preview unveiled that the positioning of even-sized
	brushes if off by 0.5 for soft brush application mode and off by
	1.0 for hard application mode:

	* app/paint/gimppaintcore.[ch] (gimp_paint_core_subsample_mask):
	offset painting by 0.5 pixels on the brushes' even sized axes by
	shuffling the subsample matrices around.

	Added "subsampling" for HARD brush application mode since a pixel
	of an even sized brush can snap to up to four different image
	pixels depending on the sub-pixel coordinates of the stroke.
2003-07-14 14:50:41 +00:00
Michael Natterer 84e73fa4d1 removed gimp_display_shell_transform_boundary() again...
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-07-10 16:01:45 +00:00
Sven Neumann 21b4aba939 changed the default radius.
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-05 15:43:49 +00:00
Sven Neumann 9d2cc5f82a reordered arguments.
2003-06-04  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-pick-color.[ch]: reordered arguments.

	* app/tools/gimpcolorpickertool.c
	* app/tools/gimppainttool.c: changed accordingly.
2003-06-04 16:42:46 +00:00
Sven Neumann 737bf44e28 app/tools/Makefile.am app/tools/gimpcoloroptions.[ch] new files that
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.
2003-06-04 15:48:17 +00:00
Sven Neumann 83a2f4983e app/paint/gimppaintcore.c applied a patch from Henning Makholm
2003-05-23  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintcore.c
	* app/tools/gimppainttool.c: applied a patch from Henning Makholm
	<henning@makholm.net> that improves drawing of narrow straight lines
	by moving the endpoints to pixel centers. Fixes bug #84145.
2003-05-23 13:22:38 +00:00
Michael Natterer c1ab39a5e8 removed gimp_drawable_offsets().
2003-05-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: removed gimp_drawable_offsets().

	* app/core/gimpitem.[ch]: added gimp_item_offsets().

	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-histogram.c
	* app/core/gimpedit.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-mask-select.c
	* app/core/gimpimage-mask.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-pick-color.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimage-projection.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/gui/channels-commands.c
	* app/gui/layers-commands.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c: regenerated.
2003-05-08 14:06:03 +00:00
Michael Natterer 8cee4963fb check for GIMP_IS_DISPLAY(gdisp) again.
2003-04-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.c: check for GIMP_IS_DISPLAY(gdisp) again.

	* app/tools/gimptool.h: don't #include "gimptoolcontrol.h"

	* app/tools/[all tools].c: #include "gimptoolcontrol.h"
2003-04-15 16:05:52 +00:00
Sven Neumann 28fddfd554 Makefile.am removed this header file.
2003-03-25  Sven Neumann  <sven@gimp.org>

	* Makefile.am
	* gimpintl.h: removed this header file.

	* gimpmiscui.c: include libgimp-intl.h.

	* gimp.c (gimp_main): call setlocale() and bind to the libgimp
	textdomain so that plug-ins don't need to do that explicitely.

	* libgimp/stdplugins-intl.h: added the functionality that used to
	live in gimpintl.h and removed the libgimp related stuff. Got rid
	of the INIT_I18N_UI() macro.

	* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
	Plug-ins simply call INIT_I18N() once in their run() function.

	* plug-ins/script-fu/script-fu-intl.h: added the functionality
	that used to live in gimpintl.h and removed the libgimp related
	stuff.

	* app/Makefile.am
	* app/gimp-intl.h: new file that defines the gettext macros for
	the GIMP core.

	* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.

	* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-03-25 16:38:19 +00:00
Michael Natterer 7a6a8d9dbb Moved the undo step implementations to the core and pass around lots of
2003-02-14  Michael Natterer  <mitch@gimp.org>

	Moved the undo step implementations to the core and pass around
	lots of "const gchar *undo_desc". Fixes bug #104367.

	* app/Makefile.am
	* app/undo.[ch]: removed...

	* app/core/Makefile.am
	* app/core/gimpimage-undo-push.[ch]: ...and added here.

	* app/paint/Makefile.am
	* app/tools/Makefile.am
	* app/paint/gimppaintcore-undo.[ch]
	* app/tools/gimptransformtool-undo.[ch]: new files for the
	paint and transform undos.

	* app/core/gimppaintinfo.[ch]: added a blurb.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.c
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c
	* app/paint/paint-types.h
	* app/paint/paint.c: pass the blurb when registering the core.

	* app/core/gimpdrawable.[ch]
	* app/core/gimpimage.[ch]
	* app/core/gimpimage-mask-select.[ch]
	* app/core/gimpimage-mask.[ch]
	* app/core/gimpimagemap.[ch]
	* app/core/gimplayer-floating-sel.[ch]: added "undo_desc" parameters
	to all undo pushing helper functions.

	* app/undo_history.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpedit.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-qmask.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-undo.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/gui/channels-commands.c
	* app/gui/file-commands.c
	* app/gui/file-open-dialog.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/paths-dialog.c
	* app/gui/select-commands.c
	* app/gui/vectors-commands.c
	* app/text/gimptext-compat.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimpchannellistview.c
	* app/widgets/gimpdrawablelistview.c
	* app/widgets/gimpselectioneditor.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/guides.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly: pass
	"undo_desc" strings, changed includes or simply removed inclusion
	of "undo.h". Some random cleanups.

	* tools/pdbgen/pdb/guides.pdb: cleaned up a lot. Fixed
	gimp_image_find_next_guide() to not return guides with
	position < 0 (and made it shorter and readable).

	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/guides_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/selection_tools_cmds.c: regenerated.
2003-02-14 14:14:29 +00:00
Michael Natterer f8c7174bcb app/paint/gimpairbrush.c app/paint/gimpclone.c app/paint/gimpconvolve.c
2003-02-05  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c
	* app/tools/gimpblendoptions.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpinktool.c
	* app/tools/gimppainttool.c
	* app/tools/paint_options.c: use GIMP_CONTEXT(tool_options)
	instead of gimp_get_current_context(). Cleanup.
2003-02-05 16:59:04 +00:00
Michael Natterer aa9f82d127 Made GimpToolOptions a GimpContext subclass and objectified all tool
2003-02-05  Michael Natterer  <mitch@gimp.org>

	Made GimpToolOptions a GimpContext subclass and objectified
	all tool options types.

	* app/core/core-types.h: replaced GimpToolOptionsNewFunc by
	GimpToolOptionsGUIFunc.

	* libgimpproxy/gimpproxytypes.h: regenerated.

	* app/core/gimppaintinfo.[ch]: added "GType paint_options_type".

	* app/core/gimptoolinfo.[ch]: added "GType tool_options_type",
	removed tool_info->context since GimpToolOptions are a GimpContext
	now. Added "gboolean use_context" as a temp_hack.

	* libgimptool/gimptooltypes.h: added the tool_options_type to
	the tool registering callback.

	* app/tools/tool_options.[ch]: is a real GimpContext subclass now.

	* app/paint/paint-types.h
	* app/paint/paint.c: added the paint_options_type to the paint
	registering stuff.

	* app/paint/gimppaintoptions.[ch]: is a real GimpToolOptions
	subclass now.

	* app/paint/Makefile.am
	* app/paint/gimpairbrushoptions.[ch]
	* app/paint/gimpcloneoptions.[ch]
	* app/paint/gimpconvolveoptions.[ch]
	* app/paint/gimpdodgeburnoptions.[ch]
	* app/paint/gimperaseroptions.[ch]
	* app/paint/gimpsmudgeoptions.[ch]: new files holding
	GimpPaintOptions subclasses.

	* app/paint/gimpairbrush.[ch]
	* app/paint/gimpclone.[ch]
	* app/paint/gimpconvolve.[ch]
	* app/paint/gimpdodgeburn.[ch]
	* app/paint/gimperaser.[ch]
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.c
	* app/paint/gimppencil.[ch]
	* app/paint/gimpsmudge.[ch]: removed paint options stuff, lots
	of related changed & cleanups.

	* tools/pdbgen/pdb/paint_tools.pdb: changed accordingly.

	* app/pdb/paint_tools_cmds.c: regenerated.

	* app/tools/Makefile.am
	* app/tools/gimpblendoptions.[ch]
	* app/tools/gimpbucketfilloptions.[ch]
	* app/tools/gimpcolorpickeroptions.[ch]
	* app/tools/gimpcropoptions.[ch]
	* app/tools/gimpflipoptions.[ch]
	* app/tools/gimpinkoptions.[ch]
	* app/tools/gimpmagnifyoptions.[ch]
	* app/tools/gimpmeasureoptions.[ch]
	* app/tools/gimpmoveoptions.[ch]
	* app/tools/gimptextoptions.[ch]
	* app/tools/gimpvectoroptions.[ch]: new files holding the various
	tool options classes.

	* app/tools/selection_options.[ch]
	* app/tools/transform_options.[ch]: made them objects.

	* app/tools/paint_options.[ch]: contains only the paint_options
	GUI and reset stuff.

	* app/tools/tools-types.h: removed SelectionOptions typedef for
	now.

	* app/tools/[all tools]: removed the tool options stuff except
	some GUI constructors. Tons of related changes.

	* app/tools/tool_manager.[ch]: changed tool registration / restore /
	switching accordingly.

	* app/widgets/gimpdrawablelistview.c
	* app/widgets/gimpselectioneditor.c: changed accordingly.
2003-02-05 14:39:40 +00:00
Manish Singh 1a44f2126c cleanup, removed unecessary G_OBJECT() casts. Should do the same for
2003-01-05  Manish Singh  <yosh@gimp.org>

        * many files in app, modules and libgimp*: cleanup, removed unecessary
        G_OBJECT() casts. Should do the same for plug-ins, when more of them
        get undeprecated.
2003-01-05 22:07:10 +00:00
Michael Natterer ef3f572af4 don't set paused_count to 0.
2003-01-03  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptoolcontrol.c (gimp_tool_control_halt): don't
	set paused_count to 0.

	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/tools/tool_manager.c: removed comments about doing so.
2003-01-03 13:59:23 +00:00
Sven Neumann 073e533a8a Finally landed the new GimpConfig based gimprc parser. It's not finished
2002-11-18  Sven Neumann  <sven@gimp.org>

	Finally landed the new GimpConfig based gimprc parser. It's not
	finished yet but we need to start somewhere. This release removes
	the old gimprc.[ch] files. The gimprc format changes slightly, but
	the changes are minimal. The Preferences dialog is temporarily
	disabled since it still needs to be ported. If you are are afraid,
	stay away from CVS for a few days ;-)

	* app/Makefile.am
	* app/gimprc.[ch]: removed the old gimprc system.

	* app/base/Makefile.am
	* app/base/base-config.[ch]: removed these files in favor of
	config/gimpbaseconfig.[ch].

	* app/core/Makefile.am
	* app/core/gimpcoreconfig.[ch]: removed these files in favor of
	config/gimpcoreconfig.[ch].

	* app/config/Makefile.am
	* app/config/config-types.h: moved typedefs into this new file.

	* app/config/gimpbaseconfig.[ch]
	* app/config/gimpcoreconfig.[ch]
	* app/config/gimpdisplayconfig.[ch]
	* app/config/gimpguiconfig.[ch]
	* app/config/gimprc.[ch]
	* app/config/test-config.c: brought into shape for real use.

	* app/base/base-types.h: include config/config-types.h here. Added
	a global GimpBaseConfig *base_config variable to ease migration.

	* app/gui/Makefile.am: temporarily disabled the preferences dialog.

	* app/app_procs.c
	* app/undo.c
	* app/undo_history.c
	* app/base/base.[ch]
	* app/base/gimphistogram.c
	* app/base/pixel-processor.c
	* app/base/temp-buf.c
	* app/base/tile-cache.c
	* app/core/core-types.h
	* app/core/gimp-documents.c
	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpcontext.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpimage-new.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimpmodules.c
	* app/core/gimppattern.c
	* app/display/Makefile.am
	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplay.[ch]
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-selection.c
	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpnavigationview.c
	* app/file/file-save.c
	* app/gui/device-status-dialog.c
	* app/gui/dialogs-constructors.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/gui.c
	* app/gui/menus.c
	* app/gui/paths-dialog.c
	* app/gui/resize-dialog.c
	* app/gui/session.c
	* app/gui/test-commands.c
	* app/gui/tips-dialog.c
	* app/gui/tips-dialog.h
	* app/gui/user-install-dialog.c
	* app/gui/view-commands.c
	* app/paint/gimppaintcore.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool.c
	* app/tools/gimptexttool.[ch]
	* app/tools/selection_options.c
	* app/tools/tools.c
	* app/tools/transform_options.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemfactory.c
	* app/widgets/gimpselectioneditor.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/gimprc.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: use the new config system
	instead of the old gimprc stuff.

	* etc/gimprc.in
	* etc/gimprc_user.in: adapted to the new gimprc format. Will update
	the man-page later...

	* app/pdb/fileops_cmds.c
	* app/pdb/gimprc_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/transform_tools_cmds.c
	* libgimp/gimpgimprc_pdb.c: regenerated.
2002-11-18 20:50:31 +00:00
Michael Natterer fa537489d7 removed gdisp->scale, gdisp->dot_for_dot, the scaling marcos and the
2002-06-27  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplay.[ch]: removed gdisp->scale,
	gdisp->dot_for_dot, the scaling marcos and the
	gdisplay_[un]transform[_f]() functions.

	* app/display/gimpdisplayshell.[ch]: added them here. Named the
	transform functions gimp_display_shell_[un]transform_xy[_f]().

	Made the gimp_display_shell_[un]transform_coords() functions copy
	all values of the GimpCoords struct, not just x and y.

	* app/display/gimpstatusbar.[ch]: keep a pointer to
	GimpDisplayShell, not GimpDisplay.

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-selection.c
	* app/display/gimpnavigationview.c
	* app/gui/image-commands.c
	* app/gui/info-window.c
	* app/gui/select-commands.c
	* app/gui/view-commands.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpvectortool.c: changed accordingly.

	* app/gui/layers-commands.c: if(gimage->selection_mask) is always
	TRUE, use if(!gimp_image_mask_is_empty(gimage)) instead.

	* app/tools/gimpfuzzyselecttool.[ch]: moved global variables
	to the object struct.
2002-06-26 22:16:59 +00:00
Michael Natterer a3f44d8b0f Separated tool_options creation from tool registration so we don't
2002-06-17  Michael Natterer  <mitch@gimp.org>

	Separated tool_options creation from tool registration so we
	don't implicitly create widgets before gui_init():

	* libgimptool/gimptooltypes.h: removed GimpToolOptionsNewFunc
	typedef here...

	* app/core/core-types.h: ...and added it here.

	* libgimpproxy/gimpproxytypes.h: regenerated.

	* app/core/gimptoolinfo.[ch]: added a GimpToolOptionsNewFunc
	pointer to remember the constructor. Fixed the finalize() method
	(bug was never noticed because we leaked all tool infos)

	* app/tools/tool_manager.[ch]: moved tool_options creation to the
	new function tool_manager_restore(). Unref the tool infos after
	adding them to their container. Added "brush" and "gradient" to
	the context properties which are defined for tool contexts.

	* app/app_procs.c: call tool_manager_restore() after gui_init().

	* app/gui/gui.c: removed the hack introduced recently and call
	render_setup() in gui_init() again, not in gui_themes_init().

	Use the correct contexts now that they are properly initialized
	at the time of tool_options creation:

	* app/tools/gimpblendtool.c: use tool_info->context, not
	gimp_get_user_context() to get/set the tool's gradient.

	* app/paint/gimppaintcore.[ch] (gimp_paint_core_start): added a
	GimpPaintOptions paramater and get the brush to use from
	paint_options->context (instead of gimp_get_current_context()).

	* app/paint/gimppaintcore-stroke.c
	* app/tools/gimppainttool.c: changed accordingly.

	* app/tools/paint_options.c: added a brush preview to the paint
	options.
2002-06-17 10:34:28 +00:00
Michael Natterer aa7be287dc Fix for #85201:
2002-06-16  Michael Natterer  <mitch@gimp.org>

	Fix for #85201:

	* app/tools/gimpfliptool.c: set the toggle_cursor correctly.

	* app/tools/gimptransformtool.c: if "use_grid" is FALSE, skip the
	cursor update stuff and chain up directly.

	Misc tool->control options fixes:

	* app/tools/gimppainttool.c: set "motion_mode" to
	GIMP_MOTION_MODE_EXACT.

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimpsmudgetool.c: don't touch "motion_mode" here.

	* app/tools/gimpimagemaptool.c
	* app/tools/gimptransformtool.c: set "scroll_lock" to TRUE and
	"preserve" to FALSE.

	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c: don't touch them here.

	* app/tools/gimphistogramtool.[ch]: derive it from GimpImageMapTool
	so it inherits it's control settings.

	* app/tools/gimpellipseselecttool.c: don't set "preserve" to TRUE.

	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmovetool.c: code formating paranoia.

	* app/tools/gimptoolcontrol.c: fixed indentation.
2002-06-16 17:13:39 +00:00
Michael Natterer a3bb0b0dad Started to get rid of the gdisplays_foo() functions in
2002-05-08  Michael Natterer  <mitch@gimp.org>

	Started to get rid of the gdisplays_foo() functions in
	app/display/gimpdisplay-foreach.[ch]. Work in progress...

	* app/core/gimp.[ch]: added the display list to the Gimp object
	(as a GimpList of GimpObjects). This way we get more independent
	from whether there is GUI or not, as gimp->displays will simply
	be an empty list for the --no-interface case.

	* app/display/gimpdisplay.[ch]: Removed the global "display_list"
	and "display_num" variables. Use gimp->displays instead.

	* app/display/gimpdisplay-foreach.[ch]: renamed most functions
	from gdisplays_foo() to gimp_displays_foo() and pass them a Gimp
	pointer.

	* app/core/gimpimage.[ch]: added a "flush" signal.

	* app/display/gimpdisplay-handlers.c: connect to "flush" and call
	gimp_display_flush() in the callback.

	* tools/pdbgen/pdb/display.pdb: use gimp_displays_flush(gimp)
	here and only here.

	* app/pdb/display_cmds.c: regenerated.

	* app/app_procs.c
	* app/gui/gui.c
	* app/gui/preferences-dialog.c:
	s/gdislays_foo()/gimp_displays_foo(gimp)/

	* app/image_map.c
	* app/undo_history.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell-scale.c
	* app/gui/channels-commands.c
	* app/gui/colormap-editor-commands.c
	* app/gui/convert-dialog.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/qmask-commands.c
	* app/gui/select-commands.c
	* app/gui/vectors-commands.c
	* app/paint/gimpairbrush.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptexttool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpbufferview.c
	* app/widgets/gimpchannellistview.c
	* app/widgets/gimpcomponentlistitem.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimpdrawablelistitem.c
	* app/widgets/gimpdrawablelistview.c
	* app/widgets/gimpimageview.c
	* app/widgets/gimpitemlistitem.c
	* app/widgets/gimpitemlistview.c
	* app/widgets/gimplayerlistitem.c
	* app/widgets/gimplayerlistview.c
	* app/widgets/gimpvectorslistview.c: replaced gdisplays_flush()
	with calls to gimp_image_flush(gimage). Removed inclusion of
	"display/gimpdisplay-foreach.h" from most files.
2002-05-08 17:48:24 +00:00
Michael Natterer a74a8997b4 devel-docs/Makefile.am new file documenting the core's include policy.
2002-05-03  Michael Natterer  <mitch@gimp.org>

	* devel-docs/Makefile.am
	* devel-docs/includes.txt: new file documenting the core's
	include policy.

	* HACKING: mention it here.

	* libgimptool/gimptooltypes.h: removed GimpToolOptions here.

	* app/core/core-types.h: and added it here. This is a temp hack
	needed because GimpToolInfo needs to know the GimpToolOptions
	type.

	* libgimpproxy/gimpproxytypes.h: regenerated.

	* libgimptool/gimptoolmodule.h: don't include gimptooltypes.h here...
	* libgimptool/gimptoolmodule.c: ...but here.

	* app/config/gimpconfig-params.c: include "libgimpbase/gimpbase.h"
	entirely, not single files from it.

	* app/core/gimp.c
	* app/core/gimpcontext.c
	* app/core/gimpcoreconfig.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdocuments.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpedit.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-mask.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-new.c
	* app/core/gimpimage-projection.c
	* app/core/gimpimage-qmask.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimpmodules.c
	* app/core/gimppaintinfo.c
	* app/core/gimpparasite.c
	* app/core/gimppreviewcache.c
	* app/core/gimptoolinfo.c
	* app/core/gimpunit.c: include "core-types.h" and no other types file.

	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.c: include "tools/tools-types.h"
	instead of "libgimptool/gimptooltypes.h", warn about inclusion
	on "gui/gui-types.h"

	* app/file/file-open.c
	* app/file/file-save.c: don't include "libgimptool/gimptooltypes.h".

	* app/gui/about-dialog.c
	* app/gui/brush-select.c
	* app/gui/brushes-commands.c
	* app/gui/color-select.c
	* app/gui/data-commands.c
	* app/gui/device-status-dialog.c
	* app/gui/dialogs.c
	* app/gui/gradients-commands.c
	* app/gui/help-commands.c
	* app/gui/info-window.c
	* app/gui/palettes-commands.c
	* app/gui/patterns-commands.c
	* app/gui/resize-dialog.c
	* app/gui/tips-dialog.c
	* app/gui/tool-options-dialog.c: include "gui-types.h" and no
	other types file.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimppaintoptions.c
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c
	* app/paint/paint.c: include "paint-types.h" and no other types file.

	* app/pdb/pdb-types.h: don't include "libgimptool/gimptooltypes.h".

	* app/plug-in/plug-in-progress.c: warn about inclusion of
	"display/display-types.h"

	* app/tools/tools-types.h: include "libgimptool/gimptooltypes.h".

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpellipseselecttool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpinktool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool.c
	* app/tools/gimppenciltool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptoolcontrol.c
	* app/tools/gimptoolcontrol.h
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/tools/tools.c: include "tools-types.h" and no other types file,
	warn about inclusion of "gui/gui-types.h".

	* app/widgets/gimpcolorpanel.c
	* app/widgets/gimptoolbox-color-area.c: warn about inclusion of
	"gui/gui-types.h".

	* app/xcf/xcf-load.c
	* app/xcf/xcf.c: don't include "libgimptool/gimptooltypes.h".

	Split tool-safe-mode up in two files, one including libgimpproxy,
	one libgimp.

	* plug-ins/tools/Makefile.am
	* plug-ins/tools/tool-safe-mode-plug-in.[ch]: new files including
	libgimp/ stuff only.

	* plug-ins/tools/tool-safe-mode.[ch]: include libgimpproxy/ and
	libgimptool/ but don't include libgimp/ because of conflicting
	declarations.

	Unrelated:

	* app/tools/gimpclonetool.c: create the clone core so we don't crash.

	* app/gui/file-open-dialog.c: changed the way we create previews
	so that only out-of-date previews are created on a click in the
	preview area. Unconditional creation can still be forced by
	<Ctrl>+click. Changed the tooltip to document this.
2002-05-03 12:45:22 +00:00
Sven Neumann 84e1810adc app/tools/gimpairbrushtool.[ch] app/tools/gimpbezierselecttool.[ch]
2002-05-03  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpairbrushtool.[ch]
	* app/tools/gimpbezierselecttool.[ch]
	* app/tools/gimpblendtool.[ch]
	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpbucketfilltool[.ch]
	* app/tools/gimpbycolorselecttool[.ch]
	* app/tools/gimpclonetool[.ch]
	* app/tools/gimpcolorbalancetool[.ch]
	* app/tools/gimpcolorpickertool[.ch]
	* app/tools/gimpconvolvetool[.ch]
	* app/tools/gimpcroptool[.ch]
	* app/tools/gimpcurvestool[.ch]
	* app/tools/gimpdodgeburntool[.ch]
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpellipseselecttool[.ch]
	* app/tools/gimperasertool[.ch]
	* app/tools/gimpfliptool[.ch]
	* app/tools/gimpfreeselecttool[.ch]
	* app/tools/gimpfuzzyselecttool[.ch]
	* app/tools/gimphistogramtool[.ch]
	* app/tools/gimphuesaturationtool[.ch]
	* app/tools/gimpinktool[.ch]
	* app/tools/gimpiscissorstool[.ch]
	* app/tools/gimplevelstool[.ch]
	* app/tools/gimpmagnifytool[.ch]
	* app/tools/gimpmeasuretool[.ch]
	* app/tools/gimpmovetool[.ch]
	* app/tools/gimppaintbrushtool[.ch]
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool[.ch]
	* app/tools/gimppenciltool[.ch]
	* app/tools/gimpperspectivetool[.ch]
	* app/tools/gimpposterizetool[.ch]
	* app/tools/gimprectselecttool[.ch]
	* app/tools/gimprotatetool[.ch]
	* app/tools/gimpscaletool[.ch]
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsheartool[.ch]
	* app/tools/gimpsmudgetool[.ch]
	* app/tools/gimptexttool[.ch]
	* app/tools/gimpthresholdtool[.ch]
	* app/tools/gimptool.c
	* app/tools/gimptoolcontrol.h
	* app/tools/gimptoolmodule[.ch]
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool[.ch]
	* app/tools/path_tool.c
	* app/tools/tool_manager[.ch]
	* app/tools/tools.c
	* libgimptool/gimptool.c
	* libgimptool/gimptoolcontrol.h
	* libgimptool/gimptoolmodule.h: removed tons of warnings. Do we need
	to add -Werror to the CFLAGS to avoid such a mess in the future ?!
	Also had to enforce the GIMP coding style in lots of places :-(

	* libgimp/gimppixelrgn.c: got sick and tired of debugging plug-ins,
	so I've added checks for most parameters passed to the GimpPixelRgn
	functions. This will slow down plug-in execution a little bit but
	should help to find bugs early.
2002-05-03 11:31:08 +00:00
Nate Summers 810b983110 app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor
* app/tools/gimptoolcontrol.[ch]
 	* libgimptool/gimptool.c: resurrected the motion hints and cursor
 	changing code.

 	app/tools/gimpairbrushtool.c
	app/tools/gimpbezierselecttool.c
 	app/tools/gimpblendtool.c
 	app/tools/gimpbucketfilltool.c
 	app/tools/gimpbycolorselecttool.c
 	app/tools/gimpclonetool.c
 	app/tools/gimpcolorbalancetool.c
 	app/tools/gimpcolorpickertool.c
 	app/tools/gimpconvolvetool.c
 	app/tools/gimpcroptool.c
 	app/tools/gimpcurvestool.c
 	app/tools/gimpdodgeburntool.c
 	app/tools/gimpeditselectiontool.c
 	app/tools/gimpellipseselecttool.c
 	app/tools/gimperasertool.c
 	app/tools/gimpfliptool.c
 	app/tools/gimpfuzzyselecttool.c
 	app/tools/gimphistogramtool.c
 	app/tools/gimphuesaturationtool.c
 	app/tools/gimpimagemaptool.c
 	app/tools/gimpinktool.c
 	app/tools/gimpiscissorstool.c
 	app/tools/gimplevelstool.c
 	app/tools/gimpmagnifytool.c
 	app/tools/gimpmeasuretool.c
 	app/tools/gimpmovetool.c
 	app/tools/gimppaintbrushtool.c
 	app/tools/gimppainttool.c
 	app/tools/gimppathtool.c
 	app/tools/gimppenciltool.c
 	app/tools/gimpperspectivetool.c
 	app/tools/gimprectselecttool.c
 	app/tools/gimprotatetool.c
 	app/tools/gimpscaletool.c
 	app/tools/gimpselectiontool.c
 	app/tools/gimpsheartool.c
 	app/tools/gimpsmudgetool.c
 	app/tools/gimptexttool.c
 	app/tools/gimptransformtool.c
 	app/tools/gimpvectortool.c: set the motion mode; fix a few parameters

 	* app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented
 	some code I had temporarily commented out and didn't uncomment before
 	committing

 	* libgimptool/gimptoolcontrol.h
 	* app/tools/gimptoolcontrol-displayshell.[ch]: merged with
 	gimptoolcontrol.[ch].  The distinction was fairly arbitrary.

 	* plug-ins/tools/gimptoolcontrol.c: added some stubs

        * app/tools/Makefile.am
 	* app/tools/tool_manager.c
 	* app/display/gimpdisplayshell-callbacks.c: changed accordingly

 	* libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct
 	documentation on the undo operations
2002-04-21 07:31:12 +00:00
Nate Summers 69ccb4d370 massive tool plugin changes 2002-03-29 03:50:29 +00:00
Michael Natterer 3ff5cee9fb added enum GimpMotionMode which can be one of { EXACT, HINT, COMPRESS }.
2002-03-19  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-types.h: added enum GimpMotionMode which can be
	one of { EXACT, HINT, COMPRESS }.

	* app/tools/gimptool.[ch]: removed tool->perfectmouse and added
	tool->motion_mode. Default to GIMP_MOTION_MODE_HINT.

	* app/tools/gimpinktool.c
	* app/tools/gimppainttool.c: set GIMP_MOTION_MODE_EXACT.

	* app/tools/gimpfuzzyselecttool.c: set GIMP_MOTION_MODE_COMPRESS.

	* app/tools/gimpeditselectiontool.[ch]: ditto. Removed
	gtkutil_compress_motion().

	* app/display/gimpdisplayshell-callbacks.c: look at
	active_tool->motion_mode and perform pointer grabbing and motion
	compression accordingly. Also, don't request motion hints from
	XInput devices because the wacom driver sends crap (fixes #6901).
	This change also brings hints and ordinary motions back in sync
	albeit compression, so IMHO it also fixes #68542 and #22375, but
	this needs further investigation.
2002-03-19 13:14:25 +00:00
Michael Natterer cdf2a90b03 app/core/Makefile.am app/core/core-types.h new base class for something
2002-02-25  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpitem.[ch]: new base class for something which is a
	child of an image, has a PDB ID, a tattoo, parasites and emits
	a "removed" signal.

	* app/core/gimpdrawable.[ch]
	* app/vectors/gimpvectors.[ch]: derive from GimpItem. Removed
	lots of stuff from GimpDrawable.

	* app/core/gimp.[ch]: changed gimp->drawable_table and
	gimp->next_drawable_ID to gimp->item_table and gimp->next_item_id.

	* app/undo.[ch]: s/undo_push_drawable_parasite/undo_push_item_parasite/,
	minor cleanups.

	* app/core/gimplayer.[ch]: changed gimp_layer_new_from_tiles() and
	gimp_layer_new_from_drawable() to take the "dest_gimage" as
	second, not first parameter.

	* app/image_map.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-histogram.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpedit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-mask.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-pick-color.c
	* app/core/gimpimage.c
	* app/core/gimplayer-floating-sel.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-save.c
	* app/gui/channels-commands.c
	* app/gui/file-save-dialog.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/paths-dialog.c
	* app/gui/toolbox.c
	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.c
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c
	* app/plug-in/plug-in.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimppainttool.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* app/widgets/gimpdrawablepreview.c: changed accordingly.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpitemlistview.[ch]: new widget implementing most
	of the stuff formerly done by GimpDrawableListView.

	* app/widgets/gimpchannellistview.c
	* app/widgets/gimpdrawablelistitem.c
	* app/widgets/gimpdrawablelistview.[ch]
	* app/widgets/gimplayerlistview.c: changed accordingly.

	* app/widgets/gimpdnd.[ch]: added a vectors DND type.

	* app/gui/menus.c
	* app/gui/dialogs.c
	* app/gui/dialogs-constructors.[ch]: added a vectors dialog and
	a vectors item_factory.

	* app/gui/Makefile.am
	* app/gui/vectors-commands.[ch]: new files implementing the
	callbacks for the new vectors dialog and item_factory.

	* app/pdb/pdb_glue.h: some more ugly hacks to keep intermediate
	perl code working...

	* tools/pdbgen/pdb.pl: added a vectors type, use GimpItem for all
	ID lookups.

	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/misc_tools.pdb
	* tools/pdbgen/pdb/parasite.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb: misc changes according to
	stuff above.

	* app/pdb/channel_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/misc_tools_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/parasite_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/selection_tools_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
2002-02-25 17:58:50 +00:00
Michael Natterer 9c510759c5 Made the paint tool PDB wrappers work again (a bit at least...)
2002-02-21  Michael Natterer  <mitch@gimp.org>

	Made the paint tool PDB wrappers work again (a bit at least...)

	* app/Makefile.am: changed linking order. libtool sucks.

	* app/undo.c: check if active_tool is a GimpPaintTool before
	casting it.

	* app/paint/Makefile.am
	* app/paint/paint-types.h: added new files/types.

	* app/paint/gimppaintoptions.[ch]: new files cut out of
	tools/paint_options.h. Prefixed everything with "Gimp". There is
	still GtkWidget* cruft hanging around in the structs...

	* app/paint/gimppaintcore-stroke.[ch]: utility function
	which paints a stroke array. Needed for the PDB wrappers.

	* app/paint/gimpairbrush.[ch]
	* app/paint/gimpclone.[ch]
	* app/paint/gimpconvolve.[ch]
	* app/paint/gimpdodgeburn.[ch]
	* app/paint/gimperaser.[ch]
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.[ch]
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.[ch]: added *_options_new() functions which
	create correctly initialized options structures without widgets.

	* app/tools/paint_options.[ch]: removed the options struct
	definitions and value initialisations.

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpinktool.c
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimppainttool.c
	* app/tools/gimppenciltool.c
	* app/tools/gimpsmudgetool.c: changed all paint_options functions
	accordingly, s/PaintOptions/GimpPaintOptions/g etc., removed all
	#if 0'ed non_gui functions.

	* tools/pdbgen/pdb/paint_tools.pdb: use gimp_paint_core_stroke().
	We currently leak all paint_options structs created by the PDB
	wrappers, more stuff to come...

	* app/pdb/paint_tools_cmds.c: regenerated.
2002-02-21 16:02:30 +00:00
Michael Natterer 5153abafa6 return the corrent value in g_retuen_val_if_fail().
2002-02-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.c: return the corrent value in
	g_retuen_val_if_fail().

	* app/tools/gimppainttool.c: removed some more painting logic...

	* app/paint/gimppaintcore.[ch]: ...and added it here so the PDB
	wrappers can use it too. Added "gboolean use_pressure" which needs
	to be set by GimpPaintTool so we don't need access to GdkDevices.
2002-02-21 11:01:12 +00:00
Michael Natterer a49635e235 Implemented #10125 ("quick" colour picker does not honour "sample merged")
2002-02-20  Michael Natterer  <mitch@gimp.org>

	Implemented #10125 ("quick" colour picker does not honour
	"sample merged")

	* app/tools/gimpcolorpickertool.[ch]: made definition of
	GimpColorPickerToolOptions public.

	* app/tools/gimppainttool.c: get the color picker's tool_options
	and pick colors accordingly. Also draw a rectangle for
	"sample_average".
2002-02-20 11:37:20 +00:00
Michael Natterer bec4c72534 app/tools/tools-types.h chain up unconditionally in control(),
2002-02-18  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-types.h
	* app/tools/*.[ch]: chain up unconditionally in control(),
	s/ToolAction/GimpToolAction/g, s/ToolState/GimpToolState/g.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimppainttool.c: don't touch tool->paused_count
	(setting it to 0 was a hack which should no longer be needed).

	* app/tools/gimpdrawtool.c: check if the draw tool has actually
	been started (draw_tool->gdisp != NULL) before calling it's
	draw() function.

	* app/tools/tool_manager.c: simplified tool_manager_control_active():
	simply call gimp_tool_control() if gdisp == tool->gdisp.

	* app/tools/gimptool.[ch]: gimp_tool_control(): do all the PAUSE,
	RESUME and HALT voodoo here.

	* app/tools/gimppainttool.c: implemented #9902 (Drawing straight
	lines does not work between different views). It's an evil hack,
	but clearly marked in the source.
2002-02-18 17:00:09 +00:00
Michael Natterer 2ccbf2a43d Fixed #34633 (wheel mouse zooming leaves straigth-line helpline on image)
2002-02-17  Michael Natterer  <mitch@gimp.org>

	Fixed #34633 (wheel mouse zooming leaves straigth-line helpline on
	image) and maybe some other stuff caused by the misbehaviour
	described below:

	* app/tools/tools-types.h
	* app/tools/tool_manager.c (tool_manager_control_active):

	Removed the "PAUSED" ToolState.

	The possible state transitions were INACTIVE <-> ACTIVE <-> PAUSED,
	where the ACTIVE <-> PAUSED transition was done only in the
	tool_manager, causing the tools's control() never to be called
	when the tool was INACTIVE.

	The GimpPaintTool however wants to draw on the display when it's
	INACTIVE, and of course wants to be suspended/resumed correctly
	while fiddling with display repainting/scaling/...

	The PAUSED state was also redundant information, since
	(tool->paused_count > 0) is the same information (only more
	correct and independent of tool activity).

	* app/display/gimpdisplayshell-scale.[ch]: suspend/resume the
	active tool around _all_ changes to the display's "scale" and
	"offset" fields.  Added new function
	gimp_display_shell_scale_by_values() which does that and is called
	from all places which need to change these values.

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

	Unrelated stuff:

	* app/paint/gimpairbrush.c: added a #warning FIXME.

	* app/tools/gimpdrawtool.c: made a warning more verbose.

	* app/tools/gimppainttool.c: put one more drawable offset
	calculation in { .. }, will make a utility function out of it...
2002-02-17 11:46:39 +00:00