Commit Graph

185 Commits

Author SHA1 Message Date
Michael Natterer 66bd90c9f2 Bug 533590 - Perspective clone of a pattern doesn't apply perspective
Implement perspective cloning from a pattern. This needed quite some
refactoring, so GimpSourceCore would be able call its get_source()
vfunc also for a GimpClone subclass: essentially this commit adds a
new GimpSourceCore::use_source() vfunc that replaces the
source_options->use_source flag hack, and makes sure the graph used in
GimpPerspectiveClone's get_source() impl reads from the pattern
instead the drawable.

This version does not properly tile the pattern yet, so you can only
clone one copy of the pattern (gegl:tile is not quite doing the right
thing, so it's disabled).
2012-11-01 21:39:14 +01:00
Michael Natterer ffc9948d6e app: add a canvas group for tool items
so we can control where in the canvas item stack they appear.
Put the group right below the software cursor.
2011-11-16 21:10:43 +01:00
Michael Natterer 23dca3b522 app: don't use gimp_get_mod_reparator() for the source tool status
The new code is just as broken from an i18n point of view, but at
least looks right if translated right. Add translator comments to the
used strings in the clone and heal tools.
2011-10-07 00:34:43 +02:00
Michael Natterer 38b8f0596d app: use the new modifier API instead of constants in all tools
There are still many uses of literal SHIFT and MOD1 left, but all uses
of CONTROL are gone. Should work exactly as before on Win/X11, and
still has some glitches on OSX.
2011-10-06 21:59:07 +02:00
Michael Natterer 3982ddc39b app: implement gimp_get_mod_string() using gtk_accelerator_get_label()
so it can handle all modifiers (also Mac ones).
Remove gimp_get_mod_name_shift,control,alt().
2011-10-05 01:30:59 +02:00
Michael Natterer b77b94d3ed app: don't rely on gimp_brush_tool_create_outline() returning an outline
It can just as well return NULL.
2011-05-05 12:19:25 +02:00
Michael Natterer 91550117c7 app: fix GimpSourceTool's source position drawing for other displays
by adding the source outline's canvas item to the source display
directly. Poking in GimpDrawTool internals is gone and generally not
possible any longer since GimpCanvasItem based drawing.
2011-05-04 23:25:55 +02:00
Michael Natterer 492e0f9cfd app: some more mostly cosmetic tool cleanup 2011-04-04 08:19:12 +02:00
Michael Natterer cf0402f069 app: consistent handle sizes for tool drawing
Replace a myriad of defines in different tools by three consistent
sizes defined in gimpdrawtool.h.
2010-11-08 22:37:00 +01:00
Michael Natterer 22db39afd2 app: fix incomplete earlier s/GtkAnchorType/GimpHandleAnchor/ change 2010-10-18 20:13:09 +02:00
Michael Natterer b3af235e79 app: rename all gimp_draw_tool_draw_foo() functions
to gimp_draw_tool_add_foo() because that's what they do now.
2010-09-25 19:02:22 +02:00
Michael Natterer 4d0c750327 app: get rid of "gboolean use_offsets" in the draw tool
and always pass image coordinates. Transform the coords manually in
the very few places which passed TRUE.
2010-09-23 19:23:27 +02:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Michael Natterer 1a16b48c93 Add infrastructure for sending double and triple clicks to tools
* app/tools/tools-enums.[ch]: add enum GimpButtonPressType which can
be { NORMAL, DOUBLE, TRIPLE }

* app/tools/gimptool.[ch]: add press_type paramater to GimpTool::button_press()

* app/tools/gimp*tool.c
* app/tools/tool_manager.[ch]: changed accordingly.

* app/tools/gimptoolcontrol.[ch]: add members and API so tools can choose
to receive double and triple clicks.

* app/display/gimpdisplayshell-callbacks.c (gimp_display_shell_tool_events):
dispatch double and triple clicks to tools if they want them, and if they
became active by the preceding normal button press.
2009-06-20 17:37:31 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
Michael Natterer 5b68a1d0eb renamed gimp_item_offsets() to gimp_item_get_offset() and
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_offsets() to gimp_item_get_offset() and
	gimp_item_set_offsets() to gimp_item_set_offset().

	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/text/gimptextlayer-xcf.c
	* app/tools/<many>.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c
	* app/pdb/drawable-transform-cmds.c
	* app/pdb/selection-cmds.c
	* app/pdb/vectors-cmds.c
	* app/pdb/transform-tools-cmds.c: regenerated.


svn path=/trunk/; revision=27529
2008-11-02 23:03:29 +00:00
Michael Natterer f7287be7b5 app/tools/gimptool.[ch] made all GimpCoords* in the tool API const.
2008-11-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: made all GimpCoords* in the tool
	API const.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbrushtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpeditselectiontool.[ch]
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.[ch]
	* app/tools/gimpsourcetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: changed accordingly and added const
	to all GimpCoords* in utility functions too.

	* app/tools/gimptexttool.c: don't modify the passed coords. In
	fact, simply removed the code that did because it had no effect.


svn path=/trunk/; revision=27517
2008-11-01 15:17:36 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Sven Neumann 96a46d0d70 Fix bug #491272 (no cursor drawn for small brush sizes):
2007-10-29  Sven Neumann  <sven@gimp.org>

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

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

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

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

svn path=/trunk/; revision=23984
2007-10-29 17:17:14 +00:00
Sven Neumann 5e33911ec2 don't draw the source brush outline while selecting a new source location
2007-10-22  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpsourcetool.[ch]: don't draw the source brush
	outline while selecting a new source location (bug #488839).

svn path=/trunk/; revision=23902
2007-10-22 10:24:41 +00:00
Michael Natterer bf500e16d0 app/tools/gimpperspectiveclonetool.c (motion) don't allow to ctrl-switch
2007-08-17  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpperspectiveclonetool.c (motion)
	* app/tools/gimpsourcetool.c (motion): don't allow to ctrl-switch
	between clone and set-source mode while painting. It's totally
	unclear to me why we used to allow this since it doesn't make much
	sense and isn't very intuitive either. Fixes bug #467605.


svn path=/trunk/; revision=23302
2007-08-17 15:20:25 +00:00
Sven Neumann a4eafbad64 moved brush drawing code to the new function gimp_brush_tool_draw_brush().
2007-05-07  Sven Neumann  <sven@gimp.org>

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

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


svn path=/trunk/; revision=22450
2007-05-07 10:19:04 +00:00
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
Sven Neumann b41bc68023 improved highlighting. (gimp_draw_tool_draw_arc_by_anchor): take width and
2006-11-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_draw_corner):
	improved highlighting.
	(gimp_draw_tool_draw_arc_by_anchor): take width and height
	arguments instead of radius_x and radius_y.

	* app/tools/gimpiscissorstool.c
	* app/tools/gimpvectortool.c: slightly increased handle sizes.

	* app/tools/gimpmeasuretool.c: increased size of the end points.

	* app/tools/gimpperspectiveclonetool.c: increased handle size.

	* app/tools/gimprectangletool.c: renamed variables.

	* app/tools/gimpsourcetool.c: use a single define for the target
size.

	* app/tools/gimptransformtool.[ch]: increased handle size. Made
	the area that can be grabbed identical to the displayed handle.
	Replaced filled circle with a circle outline and a cross.

	* app/tools/gimptransformtool-undo.c: follow renaming of define
in
	gimptransformtool.h.
2006-11-07 11:09:51 +00:00
Michael Natterer 7b0531aa91 implement GimpPaintCore::start() and set paint_core->use_saved_proj to
2006-09-20  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpsourcecore.c: implement GimpPaintCore::start()
	and set paint_core->use_saved_proj to TRUE when we are using
	the destination drawable image's projection as source. Return
	FALSE from start() if there is no src_drawable set and removed
	checks for src_drawable != NULL further down in the code path.

	* app/tools/gimpperspectiveclonetool.c (button_press)
	* app/tools/gimpsourcetool.c (button_press): don't fiddle with
	paint_core->use_saved_proj here.

	* app/paint/gimpclone.c: implement GimpPaintCore::start() and
	return FALSE if we are in pattern mode and there is no pattern to
	clone from. Removed GimpPaintCore::paint() implementation because
	all it did was popping a message if there is no pattern. Removed
	check for pattern != NULL and cleaned up the file a bit.

	* app/paint/gimpperspectiveclone.c (paint): removed message about
	no pattern to clone from.
2006-09-19 23:14:50 +00:00
Michael Natterer 334f160ea3 app/tools/gimpperspectiveclonetool.c (button_press) need to instruct the
2006-09-16  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpperspectiveclonetool.c (button_press)
	* app/tools/gimpsourcetool.c (button_press): need to instruct the
	paint_core to make a copy of the projection whenever we clone from
	the same *image*, not from the same display. Fixes crash when
	cloning from the same image's projection in another view
	(bug #356209).
2006-09-16 21:49:53 +00:00
Michael Natterer 2e0f6b6b02 chain up before clearing src_drawable and src_display, so the draw tool
2006-09-13  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpsourcetool.c (gimp_source_tool_control): chain
	up before clearing src_drawable and src_display, so the draw
	tool can undraw the source marker. Fixes bug #355746.
2006-09-13 10:56:24 +00:00
Michael Natterer 05cd50c9f6 app/display/gimpdisplayshell-callbacks.c
2006-09-12  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpvectortool.c: back out change committed on
	2006-08-21 which passed modifier events to tools even while mouse1
	was down. This generated way too much unexpected events that would
	have to be special cased in all tools. Will implement an anternate
	solution soon.
2006-09-12 08:33:30 +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
Michael Natterer 449621f54d app/tools/Makefile.am new class which is essentially a copy of
2006-09-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/Makefile.am
	* app/tools/gimpsourcetool.[ch]: new class which is essentially a
	copy of GimpCloneTool with s/clone/source/ plus some minor
	modifications.

	* app/tools/gimpclonetool.[ch]: remove almost everything and
	derive from GimpSourceTool.
2006-09-03 23:11:35 +00:00
Michael Natterer 47b50d9123 renamed enum GimpCloneAlignMode to GimpSourceAlignMode.
2006-09-03  Michael Natterer  <mitch@gimp.org>

	* app/paint/paint-enums.[ch]: renamed enum GimpCloneAlignMode to
	GimpSourceAlignMode.

	* app/paint/Makefile.am
	* app/paint/gimpsourcecore.[ch]
	* app/paint/gimpsourceoptions.[ch]: new classes which contain the
	source selection functionality factored out of the clone core and
	options.

	* app/paint/gimpclone.[ch]
	* app/paint/gimpcloneoptions.[ch]: remove that functionality here
	and derive from the new classes.

	* app/tools/gimpclonetool.c: changed accordingly.
2006-09-02 22:39:26 +00:00
Michael Natterer 031e8e7905 app/tools/gimpairbrushtool.c app/tools/gimpalignoptions.c
2006-08-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpalignoptions.c
	* app/tools/gimpblendoptions.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickeroptions.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcropoptions.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpflipoptions.c
	* app/tools/gimphistogramoptions.c
	* app/tools/gimpinkoptions-gui.c
	* app/tools/gimpmagnifyoptions.c
	* app/tools/gimpmeasureoptions.c
	* app/tools/gimpmoveoptions.c
	* app/tools/gimppaintoptions-gui.c
	* app/tools/gimprectangleoptions.c
	* app/tools/gimprectangleselectoptions.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptextoptions.c
	* app/tools/gimptransformoptions.c
	* app/tools/gimpvectoroptions.c: code cleanup.
2006-08-27 22:19:35 +00:00
William Skaggs d47e125c3c Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpclonetool.c
	* app/tools/gimpforegroundselecttool.c: rewrite modifer_key
	functions more readably; no functional changes.
2006-08-21 19:04:05 +00:00
William Skaggs d4f2171301 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/display/gimpdisplayshell-callbacks.c: allow modifier key events
	for Shift and Control to be propagated even if button1 is down.

	* app/tools/gimpclonetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpvectortool.c: change  modifier_key method
	to prevent any bad consequences.

	* app/tools/gimprectangletool.[ch]:  add modifier_key handler, and use it
	to toggle "make-square" if Shift is pressed while button1 is down, and
	"fixed-center" if Control is pressed while button1 is down.

	* app/tools/gimprectangleselecttool.c (gimp_rectangle_tool_modifier_key):
	call rectangle tool modifer_key method after chaining up.
2006-08-21 17:10:29 +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 d2adebbc18 use gimp_suggest_modifiers().
2006-08-03  Raphael Quinet  <raphael@gimp.org>

	* app/tools/gimpselectiontool.c (gimp_selection_tool_oper_update):
	use gimp_suggest_modifiers().

	* app/tools/gimpclonetool.c (gimp_clone_tool_oper_update): suggest
	ctrl only when cloning from the image, not from a pattern

	* app/tools/gimpsmudgetool.c (gimp_smudge_tool_init): don't
	suggest Ctrl for that tool, even if it can be used.
2006-08-03 09:06:36 +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
Michael Natterer ff1d2973ac added virtual functions GimpTool::has_display(), which returns whether any
2006-06-18  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]: added virtual functions
	GimpTool::has_display(), which returns whether any tool subclass
	keeps a pointer to the passed display; and GimpTool::has_image()
	which returns a display based on a passed image, or NULL if no
	display matches. Added default implementation of
	GimpTool::control() which sets tool->display to NULL on HALT.

	* app/tools/gimpclonetool.c
	* app/tools/gimpdrawtool.c: implement both functions.

	* app/tools/gimpclonetool.c: removed weak pointer hacks that are
	no longer needed now (and were incomplete anyway).

	* app/tools/tool_manager.c (tool_manager_select_tool)
	(tool_manager_control_active)
	(tool_manager_image_clean_dirty): use the new functions instead of
	peeking around in tool subclasses (and forgetting tools that may
	have display pointers, like the clone tool)

	* app/display/gimpdisplay.c (gimp_display_delete): removed
	fiddling with tool internals here too, control(HALT) on the tool
	is now sufficient to remove any reference to the closed display.
2006-06-18 19:58:49 +00:00
Michael Natterer e286259048 renamed gimp_image_coords_in_active_drawable() to
2006-06-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: renamed
	gimp_image_coords_in_active_drawable() to
	gimp_image_coords_in_active_pickable() and added boolean
	"sample_merged" and "selected_only" parameters. Use floor()
	instead of ROUND(), we want to round to the actual pixel, not to
	the nearest pixel boundary.

	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimptransformtool.c: changed accordingly. Removed
	quite some duplicated code which checked sample_merged and the
	mask value at the cursor location.

	* app/tools/gimpbycolorselecttool.c: use the hand tool cursor,
	there's also a hand in the toolbox icon. Fixed cursor_update()
	function to set the bad modifier when there is no pickable pixel
	at the cursor loction.

	* app/tools/gimpfuzzyselecttool.c: added cursor_update()
	implementation which does the same as by_color_select's one.

	* app/tools/gimpselectiontool.c
	(gimp_selection_tool_cursor_update): don't override the bad
	modifier which was set by a subclass' cursor_update().
2006-06-03 15:41:40 +00:00
Michael Natterer 3f7b118225 cursors/Makefile.am cursors/modifier-bad.png
2006-06-01  Michael Natterer  <mitch@gimp.org>

	* cursors/Makefile.am
	* cursors/modifier-bad.png
	* cursors/xbm/modifier-bad-mask.xbm
	* cursors/xbm/modifier-bad.xbm: new "bad" cursor
	modifier. Replaces the "bad" cursor.

	* cursors/gimp-tool-cursors.xcf: added it here too.

	* app/widgets/widgets-enums.h: added GIMP_CURSOR_MODIFIER_BAD.

	* app/widgets/gimpcursor.c: add the bad modifier. Leave the bad
	cursor there for now.

	* app/display/gimpdisplayshell-callbacks.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: use the modifier instead of the
	cursor. Fixes hotspot jumping when switching between normal and
	bad cursors. The changed cursor_update() functions even make more
	sense IMHO. Fixes bug #158407.
2006-06-01 20:30:52 +00:00
Michael Natterer 474da9fcc4 re-apply heavily modified patch from Michael Schumacher which shows the
2006-05-22  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpclonetool.[ch]: re-apply heavily modified patch
	from Michael Schumacher which shows the clone source even while
	not painting. Fixes bug #324224. Did some additional cleanup.
2006-05-22 18:35:58 +00:00
Michael Natterer 39f2238655 revert previous change. Tools must not do anything essential in
2006-05-22  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpclonetool.c: revert previous change. Tools must
	not do anything essential in cursor_update(), and poking in the
	GimpClone struct is a bad hack. Will look into this.
2006-05-22 07:11:15 +00:00
William Skaggs b011f16411 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpclonetool.c:  apply patch from Michael
	Schumacher to show clone source even while not
	painting; fixes bug #324224.
2006-05-21 23:40:59 +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
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 0e7a40face app/tools/gimpclonetool.c app/tools/gimpcurvestool.c
2006-03-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpclonetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpvectortool.c (GimpTool::oper_update): don't push
	status messages when shell->proximity is FALSE. Make sure the old
	status message gets popped regardless of shell->proximity's
	value. Fixes stuck status bar messages.
2006-03-25 13:51:13 +00:00
Michael Natterer 5d8b25a27d variant of gimp_config_connect() which allows the connected objects to
2006-01-14  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-utils.[ch] (gimp_config_connect_full):
	variant of gimp_config_connect() which allows the connected
	objects to have different propertynames.

	* app/widgets/widgets-enums.[ch]: removed enum GimpViewType...

	* app/core/core-enums.[ch]: ...and added it here.

	* app/widgets/gimpviewablebutton.[ch] (gimp_viewable_button_new):
	added "button_preview_size" parameter so the button and popup
	preview sizes can be specified separately.

	* app/widgets/gimptemplateeditor.c: changed accordingly.

	* app/widgets/gimpviewablebox.[ch] (gimp_prop_*_box_new):
	new functions which take additional "view_type_prop" and
	"view_size_prop" parameters and sync the passed context's
	properties with the resp. properties of the viewable button.

	* app/paint/gimppaintoptions.[ch]
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpclonetool.c
	* app/tools/gimppaintoptions-gui.c
	* app/tools/gimptextoptions.[ch]: added view-type and view-size
	properties to the options objects and use the new viewable box
	constructors so the selected view types and sizes are persistant
	across sessions. Fixes bug #315443.
2006-01-14 00:09:22 +00:00