Commit Graph

83 Commits

Author SHA1 Message Date
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer a72026820f app: rename gimpimage-pick-layer.[ch] to gimpimage-pick-item.[ch] 2017-06-22 08:17:40 +02:00
Michael Natterer 593ddb741f Bug 688746 - Select tool Alt+Shift and Alt+Ctrl dragging modifies...
Check for layer groups and locked layers in gimp_selection_tool_start_edit()
and show the usual warning instead of allowing the forbidden operation.
2012-12-14 23:02:56 +01:00
Michael Natterer 2d882dd64f Bug 676279 - Ctrl or Shift causes selection tools to reset...
Make sure to not override the logic that separates the tool option's
selection mode from the one determined by modifiers, by blindly
calling gimp_modifiers_to_channel_op(state) on a zero state.
2012-05-17 23:34:22 +02:00
Mukund Sivaraman abaf846578 Revert "app (selectiontool): Drop dead code"
This reverts commit c0083d24e6. It was
decided that although this code doesn't have an effect, it needs to be
modified to be fixed.
2011-10-12 19:30:58 +05:30
Mukund Sivaraman c0083d24e6 app (selectiontool): Drop dead code 2011-10-12 17:15:04 +05:30
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 d27b7a985c app: make gimp_selection_tool_start_edit() much easier to use correctly
- Add a "display" parameter and ignore tool->display
- Require the tool to be inactive, not active when calling it

This exactly matches all its use cases, which is "delegate to
GimpEditSelection tool if we are not doing anything ourselves", and
enables removing all delegate_button_press() functions because they
became one-liners after adapting to this change.
2011-06-03 09:49:40 +02:00
Michael Natterer 7c60bb5181 app: use more of the new GDK_KEY_foo key names
and move the compat defines from display-enums.h to widgets-enums.h
2011-03-29 17:24:08 +02:00
Michael Natterer 095ae5cc9b app: move mask_bounds() and mask_intersect() from GimpDrawable to GimpItem
There is nothing drawable-specific in there, and having them on
GimpItem enables some simplifications, esp. in upcoming PDB
wrappers. None of these refactorings is in this commit though.
2010-09-07 21:30:46 +02:00
Michael Natterer 6650693d29 app: move gimp_image_pick_layer() to its own file
and add a (still unused) text layer picking function.
2010-03-07 01:55:31 +01:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Michael Natterer 6aadd0bbc9 Rename gimp_image_pick_correlate_layer() to gimp_image_pick_layer() 2009-08-25 23:18:34 +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
Michael Natterer fb1660a4ea rename gimp_image_floating_sel() to gimp_image_get_floating_selection().
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: rename gimp_image_floating_sel() to
	gimp_image_get_floating_selection().

	* app/actions/channels-actions.c
	* app/actions/image-actions.c
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/select-actions.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: changed accordingly, replaced some
	instances of direct acces by the accessor.

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


svn path=/trunk/; revision=27649
2008-11-14 15:01:44 +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 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
Michael Natterer e801795022 app/core/gimpimagefile.c app/tools/gimpaligntool.c
2008-05-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagefile.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpvectortool.c
	* plug-ins/color-rotate/color-rotate-dialog.c
	* plug-ins/common/noise-rgb.c
	* plug-ins/common/value-propagate.c
	* plug-ins/gfig/gfig-dialog.c
	* plug-ins/gfig/gfig.h
	* plug-ins/gimpressionist/general.c
	* plug-ins/gimpressionist/gimpressionist.h
	* plug-ins/gimpressionist/orientation.c
	* plug-ins/gimpressionist/size.c
	* plug-ins/gimpressionist/utils.c
	* plug-ins/gradient-flare/gradient-flare.c
	* plug-ins/ifs-compose/ifs-compose.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/imagemap/imap_preferences.c: in latest GLib _() returns
	"const gchar*" as it should. Add const qualifiers to local utility
	functions and some explicit casts to fix the warnings caused by
	this.


svn path=/trunk/; revision=25685
2008-05-17 13:08:19 +00:00
Sven Neumann a5d10b2ff0 renamed gimp_image_active_drawable() to gimp_image_get_active_drawable().
2007-07-19  Sven Neumann  <sven@gimp.org>

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

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

svn path=/trunk/; revision=22958
2007-07-19 14:59:51 +00:00
Michael Natterer 40718dc7e4 app/tools/gimpaligntool.c app/tools/gimpcolorpickertool.c
2007-03-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpaligntool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpvectortool.c: remove gimp_tool_pop_status() from
	control() implementations because GimpTool does this generically now.

	* app/tools/gimpblendtool.c
	* app/tools/gimpselectiontool.c: remove entire control()
	implementations because they were doing nothing else.


svn path=/trunk/; revision=22128
2007-03-15 17:32:50 +00:00
Michael Natterer 974a74004f remove useless includes. Some minor cleanup.
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/tools/*.c: remove useless includes. Some minor cleanup.


svn path=/trunk/; revision=22083
2007-03-09 11:10:40 +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 cb6fe48ccd Fix behavior so that when Alt is down, it appears as if no other modifier
2006-11-11  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpselectiontool.c
	(gimp_selection_tool_modifier_key): Fix behavior so that when Alt
	is down, it appears as if no other modifier was pressed.
	Fixes bug #349338.
2006-11-11 10:44:02 +00:00
Michael Natterer 91c3d6ee7a Separate selection tool function (select, move, cut, ...) from selection
2006-10-18  Michael Natterer  <mitch@gimp.org>

	Separate selection tool function (select, move, cut, ...) from
	selection mode (replace, add, ...). Fixes bug #313634 (that bug
	wasn't triggered any more in HEAD, but was still there).

	* app/tools/tools-enums.h: renamed enum SelectOp to SelectFunction
	and replaced the values REPLACE, ADD, SUBTRACT and INTERSECT by a
	single value SELECT.

	* app/tools/gimpselectiontool.h (struct GimpSelectionTool):
	renamed member "op" to "function". Changed "SelectOps saved_op" to
	"GimpChannelOps saved_operation".

	* app/tools/gimpselectiontool.c: we always have the right
	GimpChannelOps in the tool options, so simply use it instead of
	mixing up unrelated stuff in one enum. Results is some medium-ugly
	nested switches, but is generally much cleaner than before.

	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpregionselecttool.c: changed accordingly. Use the
	operation from the tool options instead of selection_tool->op when
	making the actual selection.
2006-10-18 08:04:55 +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
Sven Neumann 7053e3daac app/tools/gimpclonetool.c app/tools/gimpconvolvetool.c
2006-09-12  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimpvectortool.c: removed trailing dot from
statusbar
	messages.

	* app/widgets/gimpwidgets-utils.c (gimp_suggest_modifiers):
don't
	use "try" if the modifier action has been specified.
2006-09-12 06:37:54 +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
William Skaggs 61f13fd41c Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpselectiontool.c (gimp_selection_tool_modifier_key):
	When Alt is down, don't allow other modifiers to change the
	operation shown in the options.  Fixes bug #349338.
2006-08-25 22:07:26 +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
Raphael Quinet 1999e437d4 app/core/gimpimage-convert-data.h app/core/gimpimage-convert.c
2006-08-04  Raphael Quinet  <raphael@gimp.org>

	* app/core/gimpimage-convert-data.h
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-convert.h
	* tools/pdbgen/pdb/convert.pdb: Applied slightly modified patch
	from David Gowers allowing a custom dither matrix to be used when
	converting images to indexed mode.  Fixes bug #136604.

	* app/pdb/convert_cmds.c
	* libgimp/gimpconvert_pdb.h
	* libgimp/gimpconvert_pdb.c: Regenerated.

	* app/tools/gimpselectiontool.c: N_() should have been _().
2006-08-04 17:54:26 +00:00
Michael Natterer d25406c924 app/core/gimpchannel.c (gimp_channel_bounds) allow to pass in NULL return
2006-08-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_bounds)
	* app/core/gimpdrawable.c (gimp_drawable_mask_bounds)
	(gimp_drawable_mask_intersect): allow to pass in NULL return
	locations for any of the boundary return values.

	* app/tools/gimpselectiontool.c (gimp_selection_tool_oper_update):
	don't require hovering the selection for moving the selected
	pixels, since this can be distinguished by looking at the
	modifiers now. Check for the presence of any selected pixels
	instead. Fixes bug #349341.
2006-08-03 18:17:42 +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 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 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 f3a271b13c check for function == INACTIVE, not CREATING || EXECUTING when checking
2006-06-03  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpnewrectselecttool.c
	(gimp_new_rect_select_tool_button_press): check for function ==
	INACTIVE, not CREATING || EXECUTING when checking whether to start
	moving.

	* app/tools/gimpselectiontool.c (gimp_selection_tool_oper_update):
	changed modifiers so alt+ctrl does cut+float+move and alt+shift
	does copy+float+move.
2006-06-03 08:47:43 +00:00
Michael Natterer d1a76d93f7 cursors/Makefile.am cursors/cursor-corner-bottom-left.png
2006-06-02  Michael Natterer  <mitch@gimp.org>

	* cursors/Makefile.am
	* cursors/cursor-corner-bottom-left.png
	* cursors/cursor-corner-bottom-right.png
	* cursors/cursor-corner-top-left.png
	* cursors/cursor-corner-top-right.png
	* cursors/cursor-side-bottom.png
	* cursors/cursor-side-left.png
	* cursors/cursor-side-right.png
	* cursors/cursor-side-top.png
	* cursors/xbm/cursor-corner-bottom-left-mask.xbm
	* cursors/xbm/cursor-corner-bottom-left.xbm
	* cursors/xbm/cursor-corner-bottom-right-mask.xbm
	* cursors/xbm/cursor-corner-bottom-right.xbm
	* cursors/xbm/cursor-corner-top-left-mask.xbm
	* cursors/xbm/cursor-corner-top-left.xbm
	* cursors/xbm/cursor-corner-top-right-mask.xbm
	* cursors/xbm/cursor-corner-top-right.xbm
	* cursors/xbm/cursor-side-bottom-mask.xbm
	* cursors/xbm/cursor-side-bottom.xbm
	* cursors/xbm/cursor-side-left-mask.xbm
	* cursors/xbm/cursor-side-left.xbm
	* cursors/xbm/cursor-side-right-mask.xbm
	* cursors/xbm/cursor-side-right.xbm
	* cursors/xbm/cursor-side-top-mask.xbm
	* cursors/xbm/cursor-side-top.xbm: new cursors for edge and corner
	resizing. They perfectly align with the small crosshair and can be
	used together with tool cursors and cursor modifiers.

	* cursors/gimp-tool-cursors.xcf: add them here too.

	* app/widgets/widgets-enums.h: add them to the GimpCursorType enum.

	* app/widgets/gimpcursor.c: add them here too.

	* app/display/gimpdisplayshell-cursor.c: treat them like the small
	crosshair (don't replace them by the small crosshair but use them
	as-is). Also allow the bad modifier with the large crosshair.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_cursor_update): use the new cursors. Don't
	call gimp_tool_set_cursor() here.

	(gimp_rectangle_tool_response): reset "function" to RECT_CREATING
	when resetting the tool.

	* app/tools/gimpselectiontool.[ch] (struct GimpSelectionTool):
	added boolean member "allow_move" which defalts to TRUE.

	(gimp_selection_tool_oper_update): don't move masks, floating
	selections or anything when "allow_move" is FALSE. Changed
	behavior of click inside a selection to simply create a new
	selection, need to press alt+shift now to drag-float the
	selection. Please test this, it's apretty fundamental change!

	(gimp_selection_tool_cursor_update): use the tool's configured
	cursor instead of always GIMP_CURSOR_MOUSE, so this function can
	be called after gimp_rectangle_tool_cursor_update() to add the
	plus, minus etc. modifiers.

	* app/tools/gimpnewrectselecttool.c: implement
	GimpTool::cursor_update() and call
	gimp_rectangle_tool_cursor_update() from there. Chain up to get
	the plus, minus etc. modifiers added.

	Re-enble selection moving:

	(gimp_new_rect_select_tool_oper_update): set GimpSelectionTool's
	"allow_move" to FALSE unless the rectangle tool is in an idle
	state.

	(gimp_new_rect_select_tool_button_press): allow a selection moving
	to be started if the rectangle tool is idle. Fall back to starting
	a rect select if gimp_selection_tool_start_edit() returned FALSE.
2006-06-02 15:23:47 +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
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 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
Karine Delvare 87fe1e10c2 app/tools/gimpnewrectselecttool.c let status info be pushed.
2005-10-15  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimpnewrectselecttool.c
  * app/tools/gimpselectiontool.c: let status info be pushed.
2005-10-15 18:23:33 +00:00
Michael Natterer d64bf3564f added GimpPickable::get_opacity_at()
2005-07-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppickable.[ch]: added GimpPickable::get_opacity_at()

	* app/core/gimpchannel.[ch]: removed gimp_channel_value() and
	implement ::get_opacity_at() instead.

	* app/core/gimplayer.[ch]: removed gimp_layer_pick_correlate()
	and implement ::get_opacity_at() instead.

	* app/core/gimpselection.c: GimpChannel::value() doesn't exist
	any more.

	* app/core/gimpprojection.c: implement ::get_opacity_at(), always
	returns OPAQUE.

	* app/core/gimpimage.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptransformtool.c
	* tools/pdbgen/pdb/selection.pdb: changed accordingly.

	* app/pdb/selection_cmds.c: regenerated.
2005-07-11 19:21:52 +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
Michael Natterer 76d95a10d0 added new parameter "gboolean propagate_release" to
2004-10-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpeditselectiontool.[ch]: added new parameter
	"gboolean propagate_release" to gimp_edit_slection_tool_start()
	and remember it in the GimpEditSelectionTool struct. If requested,
	propagate GimpTool::button_release() to the tool below in the tool
	stack.

	* app/tools/gimpselectiontool.c (gimp_selection_tool_start_edit):
	pass FALSE so we don't get the button_release().

	* app/tools/gimpmovetool.[ch]: pass TRUE so we get
	button_release(). If moving a layer or path in "pick active" mode,
	remember the old active layer/path and switch back to it in
	button_release(). Fixes bug #97734.

	Unrelated:

	* app/tools/gimpeditselectiontool.c
	(gimp_edit_selection_tool_motion): set "first_move" to FALSE only
	if a move actually happened. Fixes un-undoable moves at high zoom
	factors.
2004-10-06 21:04:13 +00:00
Michael Natterer d50a2db779 renamed init_edit_selection() to gimp_edit_selection_tool_start(). Removed
2004-07-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpeditselectiontool.[ch]: renamed init_edit_selection()
	to gimp_edit_selection_tool_start(). Removed enum EditType.

	* app/tools/tools-enums.h: added enum GimpTranslateMode instead.

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

	* app/tools/gimpselectiontool.[ch]: added protected utility
	function gimp_selection_tool_start_edit().

	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimprectselecttool.c: use the new function instead of
	duplicating the same code three times, don't include
	"gimpeditselectiontool.h".

	* app/tools/gimpiscissorstool.c: don't include
	"gimpeditselectiontool.h".
2004-07-26 14:50:51 +00:00
Michael Natterer c5ec0d4f70 *** empty log message *** 2004-07-13 16:36:29 +00:00