Commit Graph

171 Commits

Author SHA1 Message Date
Michael Natterer efbbe39734 app: rmove gimp_free_select_tool_update_button_state()
and priv->button1_down. Use gimp_tool_control_is_active() instead
because it now has exactly that meaning.
2011-04-02 08:24:24 +02:00
Michael Natterer 813392cafd app: move shutdown code from gimp_free_select_tool_halt() to control(HALT) 2011-04-01 22:56:33 +02:00
Michael Natterer 96c8c35575 app: GimpFreeSelectTool: remove if (tool->display != display) checks
This can't happen in motion() and release() because they won't be
called if we didn't activate the tool.
2011-03-30 19:01:11 +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 9b5dc7559a app: set GimpFreeSelectTool active only while mouse-1 is down
First step towards tightening the tool state machine...
2011-02-28 21:04:42 +01:00
Michael Natterer ca618093cf app: don't show the line to the next free select point when not in proximity
like when leaving the canvas or crossing a window above (tools receive
one oper_update() with proximity = FALSE to indicate the pointer
leaving the canvas).
2011-02-27 11:49:54 +01: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 b693269060 app: simplify creating of stroke and fill groups a lot
- add gimp_draw_tool_push_group()/pop_group() which manage a stack
  of groups; all items automatically get added to the stack's top group
- use push_group()/pop_group() all over the place, which saves a lot
  of code in most cases
- return GimpCanvasGroup not GimpCanvasItem pointers from
  gimp_draw_tool_add_stroke_group() and fill_group()

Unrelated:

- add GipmCanvasGroup parameter to gimp_rectangle_tool_draw()
- put rect select's round corners into the stroke group to
  avoid ugly overdrawing (the mis-alignment of arcs becomes
  very visible now however, will fix that soon)
2010-10-04 14:03:37 +02:00
Michael Natterer 33ab94517f app: add gimp_draw_tool_add_stroke_group() and add_fill_group()
and use it in all tools which have groups.
2010-10-01 14:24:46 +02:00
Michael Natterer 201bfe3e25 app: add a "shell" property to GimpCanvasItem
and pass it to all constructors. The GimpDisplayShell is needed
because items are going to become more powerful soon.
2010-10-01 14:13:45 +02:00
Michael Natterer a306a46d45 app: make the code that puts the lines into a stroke group nicer
This much lesss feels like we need new API, let's see...
2010-09-26 15:43:59 +02:00
Michael Natterer 4b89850a2e app: draw the free select tool's line in one stroke()
This is clearly too complicated for general use, but it's only a test
case for the new APIs.
2010-09-26 14:17:04 +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 313f8bee1e app: remove "gboolean use_cairo" from the draw tool again
It's always TRUE now.
2010-09-24 21:14:49 +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 f9a7bea24a app: enable cairo drawing in the free select tool 2010-09-23 00:00:57 +02:00
Martin Nordholts c331d5f9eb Bug 598454 - Improve visual feedback for Free Select Tool handles
Highlight the handle for the first vertex in the Free Select Tool even
with button1 down, since releasing the button on the first point will
close the polygon, so it's a significant state which we must give
feedback for.
2009-12-21 22:24:26 +01:00
Martin Nordholts 50525e4543 app: Fill Free Select Tool handles when mouse is over them
Right now the Free Select Tool vertex handles are shown when the
cursor is in the proximity. Extend this a bit, so when the cursor is
_on_ a vertex handle, fill it completely. See bug 598454.
2009-12-21 21:27:54 +01:00
Martin Nordholts c7a5195bdf Bug 604078 - Crash when pressing Backspace with Free Select Tool
Make sure we never call gimp_free_select_tool_remove_last_segment()
with priv->n_segment_indices being negative, and increase robustness
of the code in general.

Note that we always halt the tool when backspace is pressed and there
are no vertices left. This is to minimize the risk of ending up in an
invalid tool state.
2009-12-09 22:33:03 +01:00
Michael Natterer 08f35de4ac Use gimp_display_get_image() instead of display->image 2009-10-07 19:00:42 +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 090e06ecdd Move the stuff in tools-utils to the core so it can be used from
app/paint/ in the next step.

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

* app/core/gimp-utils.[ch]: add gimp_constrain_line() instead.

* app/tools/gimpblendtool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimppainttool.c: changed accordingly.
2009-04-22 21:08:42 +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 d51c50820f Bug 496772 – Position shown in the statusbar needs more precision (for
2008-08-20  Michael Natterer  <mitch@gimp.org>

	Bug 496772 – Position shown in the statusbar needs more
	precision (for some tools)

	* app/display/display-enums.[ch]: add enum GimpCursorPrecision
	which can be one of { PIXEL_CENTER, PIXEL_BORDER, SUBPIXEL }.

	* app/display/gimpdisplayshell-cursor.[ch]: add "precision"
	parameter to gimp_display_shell_update_cursor() and pass it
	on to the statusbar.

	* app/display/gimpstatusbar.[ch]: add "precision" parameters to
	the cursor coordinates APIs, offset the passed coords accordingly
	and display them with one decimal point if SUBPIXEL is requested
	and the display's unit is PIXEL. Keep a second floating-point
	format string around at any time.

	* app/tools/gimptoolcontrol.[ch]: add a "precision" member and API
	so tools can configure the precision they need. Defalt to
	PIXEL_CENTER since that's right for almost all tools.

	* app/display/gimpdisplayshell-callbacks.c: pass the tool's
	precision to gimp_display_shell_update_cursor().

	* app/tools/gimptool.[ch]: add "precision" parameter to
	gimp_tool_push_status_coords() and pass it on to the statusbar.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: set precision in init() where
	needed. Adjust the precision in the fly when needed, e.g. while
	moving guides or when toggling hard-edge on paint tools. Also pass
	an appropriate precision to gimp_tool_push_status_coords(), which
	is not always the tool's precision as used for cursor display.


svn path=/trunk/; revision=26681
2008-08-20 16:22:09 +00:00
Sven Neumann 659b1f727f app/tools/gimpfreeselecttool.c formatting.
2008-08-16  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpfreeselecttool.c
	* app/tools/gimprectangletool.c: formatting.


svn path=/trunk/; revision=26588
2008-08-16 10:07:43 +00:00
Martin Nordholts 57e9c9943e Make switching selection mode through modifier keys work again.
2008-06-23  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_modifier_key): Make switching selection
	mode through modifier keys work again.

svn path=/trunk/; revision=25978
2008-06-23 18:41:53 +00:00
Martin Nordholts e068c051f1 When applying angle constraints on the first segment vertex, base on the
2008-06-21  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_update_motion): When applying angle
	constraints on the first segment vertex, base on the last segment
	vertex rather than not applying any constraint at all.

svn path=/trunk/; revision=25972
2008-06-21 09:39:49 +00:00
Martin Nordholts 3c339adacb Make angle constraints with the Free Select Tool by using Ctrl work also
2008-06-20  Martin Nordholts  <martinn@svn.gnome.org>

	Make angle constraints with the Free Select Tool by using Ctrl
	work also when moving vertices, not only when creating new ones.

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_active_modifier_key): Implement.

	(gimp_free_select_tool_update_motion): Put motion logic here so we
	can apply it from both _motion and _active_modifier_key.

	(gimp_free_select_tool_modifier_key): Ignore key presses from
	another display.

svn path=/trunk/; revision=25969
2008-06-20 12:34:37 +00:00
Martin Nordholts 13a102551a Don't alloc/free saved_points_(lower|higher)_segment on each move, instead
* app/tools/gimpfreeselecttool.c: Don't alloc/free
	saved_points_(lower|higher)_segment on each move, instead realloc
	on demand and free on tool destruction, just as we do e.g. for
	points.

svn path=/trunk/; revision=25968
2008-06-20 12:22:46 +00:00
Martin Nordholts 395b1c5a34 Remove n_saved_points_(lower|higher)_segment, we don't need them.
2008-06-20  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c: Remove
	n_saved_points_(lower|higher)_segment, we don't need them.

svn path=/trunk/; revision=25967
2008-06-20 11:40:32 +00:00
Martin Nordholts 4de401f623 Plug leak.
2008-06-20  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c (gimp_free_select_tool_finalize):
	Plug leak.

svn path=/trunk/; revision=25966
2008-06-20 11:23:09 +00:00
Martin Nordholts 5c4bf26cf7 Name cleanup.
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_revert_to_saved_state): Name cleanup.

svn path=/trunk/; revision=25799
2008-05-25 17:37:26 +00:00
Martin Nordholts a0ba68acff Handle the special case when there is only one point, so that moving
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_prepare_for_move)
	(gimp_free_select_tool_revert_to_saved_state)
	(gimp_free_select_tool_move_segment_vertex_to): Handle the special
	case when there is only one point, so that moving segment vertices
	works even if there only is one.

svn path=/trunk/; revision=25798
2008-05-25 17:35:52 +00:00
Martin Nordholts 82f331416f For completeness, comment on some uncommented instance-private variables.
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c: For completeness, comment on
	some uncommented instance-private variables.

svn path=/trunk/; revision=25797
2008-05-25 15:16:46 +00:00
Martin Nordholts 20106d27e7 Properly update the cursor.
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_cursor_update): Properly update the cursor.

svn path=/trunk/; revision=25796
2008-05-25 15:08:50 +00:00
Martin Nordholts 021fa373c3 Added support for supressing handles by holding Shift in the Free Select
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	Added support for supressing handles by holding Shift in the Free
	Select Tool so that new segments can be created where handles
	would otherwise obstruct.

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_handle_segment_selection): Renamed, and
	only select segment vertices if handles are not supressed.

	(gimp_free_select_tool_modifier_key): Make Shift toggle supressing
	handles.

	(gimp_free_select_tool_draw): Don't draw the handles if they are
	supressed.

	(gimp_free_select_tool_should_close): Only accept distance from
	start point as a reason to close the polygon if the handles are
	not supressed.

svn path=/trunk/; revision=25795
2008-05-25 14:31:33 +00:00
Martin Nordholts 5ca90dd406 Added support for double-clicking in the Free Select Tool. A double-click
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	Added support for double-clicking in the Free Select Tool. A
	double-click will commit the selection.

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_get_double_click_info): Helper function to
	retrive GTK+ double-click settings.

	(gimp_free_select_tool_should_close): Take double-clicking into
	account.

	(gimp_free_select_tool_revert_to_saved_state): Bail out if needed.

	(gimp_free_select_tool_button_release): Pass on time when
	clicking.

	(gimp_free_select_tool_handle_click): Pass time to this function,
	and modify it to handle double-clicks.

svn path=/trunk/; revision=25794
2008-05-25 13:44:11 +00:00
Martin Nordholts 0ddc9061f4 Remove invalid comment.
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_button_release): Remove invalid comment.

svn path=/trunk/; revision=25793
2008-05-25 11:50:12 +00:00
Martin Nordholts 866cc37543 A click might have slightly adjusted the points, so revert before doing
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_handle_click): A click might have slightly
	adjusted the points, so revert before doing the selection.
	(gimp_free_select_tool_revert_to_saved_state): Move definition up
	a bit.

svn path=/trunk/; revision=25792
2008-05-25 11:48:37 +00:00
Martin Nordholts 820379250b Make moving selection mask/pixels within the selection work for the Free
2008-05-25  Martin Nordholts  <martinn@svn.gnome.org>

	Make moving selection mask/pixels within the selection work for
	the Free Select Tool, as well as interaction with any resulting
	floating selection.

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_handle_click): Handle floating selections.
	(gimp_free_select_tool_status_update): Show the inital
	instructions until there are 3 or more segment vertices, rather
	than 3 or more points.

	(gimp_free_select_tool_oper_update): When there is no active tool,
	show selection tool status bar help messages instead of the tool
	specific ones.

	(gimp_free_select_tool_delegate_button_press): New helper function
	to decide wether to delgate operation to the selection tool.

	(gimp_free_select_tool_button_press): Handle delegation to the
	selection tool.

svn path=/trunk/; revision=25791
2008-05-25 11:25:56 +00:00
Martin Nordholts 43dec1b186 Draw handles within HANDLE_SIZE * 7 distance from cursor instead of only
2008-05-23  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c
	(gimp_free_select_tool_draw): Draw handles within HANDLE_SIZE * 7
	distance from cursor instead of only showing the hovered handle.
	(gimp_free_select_tool_oper_update): Remember last coordinates
	given here, so we can do above calculations.

svn path=/trunk/; revision=25782
2008-05-23 21:46:13 +00:00
Sven Neumann 5aa59b3ba0 app/core/gimpchannel-select.c app/core/gimpdrawable-bucket-fill.c
2008-05-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpchannel-select.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpimage-crop.c
	* app/dialogs/image-scale-dialog.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimppolygonselecttool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* libgimpwidgets/gimpcolorprofilestore.c
	* plug-ins/gfig/gfig-dialog.c: use C_() instead of Q_() for
	translations with context.

svn path=/trunk/; revision=25777
2008-05-23 14:09:55 +00:00
Martin Nordholts 91cf64359d Base a start of a new segment on the pending point, and enable 15 degree
2008-05-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c: Base a start of a new segment on
	the pending point, and enable 15 degree constraints on the pending
	point when Ctrl is being held down.

svn path=/trunk/; revision=25761
2008-05-22 18:05:10 +00:00
Martin Nordholts cb13929f5c app/tools/gimpfreeselecttool.[ch] Fix that some
2008-05-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.[ch]
	* app/tools/gimpforegroundselecttool.c: Fix that some
	gimp_free_select_tool_-functions had the wrong name.

svn path=/trunk/; revision=25759
2008-05-22 16:58:21 +00:00
Martin Nordholts 3ba5ecb5eb Remember the selection operation in use when the tool was started, and use
2008-05-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpfreeselecttool.c: Remember the selection operation
	in use when the tool was started, and use that when doing the
	selection. Improvements are still to be made with regards to
	synchronizing the tool options with the selection operation
	actually used.

svn path=/trunk/; revision=25756
2008-05-22 15:40:18 +00:00