Commit Graph

261 Commits

Author SHA1 Message Date
Andre Klapper be944b20c5 Rename "Intelligent Scissors" menu item to "Scissors Select"
Be consistent with tool dialog and tooltip.

Fixes #10793
2024-08-03 00:02:49 +00:00
Sabri Ünal 48d71bf6ab Issue #4094 - Corrects some tools descriptions
This patch corrects some inconsitent Tool Options Tab Title using tools tooltips.
Scissors > Scissors Select
Heal > Healing
Align > Aligment

(cherry picked from commit a1af934d9d)
2020-03-10 21:39:06 +03:00
Ell 053e5edc93 libgimpcolor, app, modules, plug-ins: remove GEGL_ITERATOR2 define
... it's no longer needed, since GEGL commit
gegl@9dcd2cde63f95a080bf16a58c10e9ffbdd99aace.

Partially reverts commits:

6fca9959c7
cc10af72cc
49c53568d7
8edbc0d491
29f63616d2
3a2014984d
ee48ec6877
4165a315d5
764085278f
b7633c722e
6ab12061b7
754a3c5b18
22b4b647bd
55b3438328
c6d23add65
f03a84d607
822f9f0d2b
95358ca1fa
cdda37f4ee
41e8035635
6761da42b2
fb5d7832a8
97ed7817d8
46e9036578
ea9c5e6a49
24fbdfb591
beb4ecb238
4b77831e03
fcf113a39c
567ffe94ff
2018-12-02 11:15:37 -05:00
Ell a5baba5539 Issue #2272 - Crash when using the intelligent-scissors tool ...
... after erasing all points

When erasing the last remaining point in the iscissors tool, halt
the tool, rather than leaving the tool active with an empty curve,
which it is not prepared to handle, and which results in a segfault
once trying to add a new point.

Additionally, when erasing the last remaining segment (i.e., the
two last remaining points), don't erase the entire segment (i.e.,
both points), but rather convert the segment to its initial point,
so that, in effect, we only erase the last point of the segment.
2018-09-26 02:14:16 -04:00
Øyvind Kolås beb4ecb238 app: migrate iscissorstool to new iterator api 2018-09-11 01:33:36 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell 3c95928031 app: in GimpIScissorsTool, use sampler object ...
... instead of gegl_buffer_sample()

Ditto.
2018-05-13 19:40:46 -04:00
luz.paz 7fdb963e01 Bug 794996 - Misc. typo fixes in comments in app/
Found via `codespell -q 3 --skip="./po*"`
2018-04-08 21:25:56 +02:00
Michael Natterer 12f920d8bf app: change GimpTileHandlerValidate's API to use GeglRectangle
instead of x, y, width, height.
2017-08-05 15:43:41 +02:00
Michael Natterer 0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of

if (instance->member)
  {
    g_object_unref/g_free/g_whatever (instance->member);
    instance->member = NULL;
  }

we now simply use

g_clear_object/pointer (&instance->member);
2017-07-15 18:42:44 +02:00
Michael Natterer 6a312a71f3 app: simplify GimpTool::undo() and ::redo()
Check for gimp_tool_can_undo() and can_redo() in gimptool.c, before
calling undo() and redo(), instead of doing the same in each tool
individually.
2017-07-09 17:22:06 +02:00
Michael Natterer ef294f4a54 app: clean up how tools are COMMITed and HALTed
Call HALT generically in gimp_tool_control() after calling COMMIT, and
remove all hacks in tools that call both COMMIT and HALT or call
halt() from commit().

Some tools interact with their subclasses (e.g. filter tool and
operation tool), and it's essential that COMMIT runs through the
entire class hierarchy before HALT.

Probably breaks something, please test.
2017-07-09 16:25:42 +02:00
Michael Natterer e21be2f3d9 app: rename GimpToolInfo's "blurb" and "help" members
to "label" and "tooltip". More standard names, less confusion.
2017-07-04 21:58:11 +02:00
Michael Natterer 54683840e3 app: rename GimpTool::get_undo_desc() and ::get_redo_desc()
to ::can_undo() and ::can_redo(). They still return description
strings and the new naming is slightly off :) but get_undo_desc() will
be needed for something else soon, and half of the time the functions
are indeed used to check whether there are undo/redo staps at all.
2017-07-04 20:43:28 +02:00
Michael Natterer 546bbe1e14 app: add a transform matrix to GimpCanvasPolygon and all API using it 2017-06-19 21:53:49 +02:00
Ell 09d6f2bad1 app: fix use of NULL canvas item in iscissors tool
... when editing an empty segment in interactive mode
2017-06-11 11:27:40 -04:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Thomas Manni ecc49ed9c6 iscissors: ensure first and last isegments are distinct before closing the curve 2016-11-25 07:44:49 +01:00
Michael Natterer 7c29077acd app: allow to remove the last added IScissors segment with backspace 2016-11-08 13:45:12 +01:00
Michael Natterer b4120e3f61 Bug 767650 - Uncommitted scissors selection is discarded on tool change
gimp_iscissors_tool_commit(): if the curve is not closed, close and
recalculate it.
2016-10-30 23:08:13 +01:00
Michael Natterer be6a47e750 app: some more cleanup in IScissors
Move quite some code to new functions of ICurve, preparation for
getting rid of a bunch of outstanding IScissors inconsistencies with
other tools.
2016-10-09 17:19:42 +02:00
Michael Natterer 6ca9ebdb95 app: remove the dynamic programming buffer from the GimpIscissorsTool struct
It's only used in one function and recreated each time, so create and
destroy it locally.
2016-10-07 01:58:37 +02:00
Michael Natterer 152c5a2c44 app: change most of Iscissors to use a GimpPickable not a GimpImage
This is just cleanup and enables adding a mode that doesn't behave like
"sample merged".
2016-10-07 01:18:16 +02:00
Michael Natterer 7ec04e4afe app: get rid of hardcoding GDK_SHIFT_MASK in tools/
gimp_suggest_modifiers(): change "shift_format" and "control_format"
parameters to "extend_selection_format" and "toggle_behavior_format",
which fixes the longstanding problem that the function did the right
thing only by accident.

tools: use gimp_get_extend_selection_mask() instead of GDK_SHIFT_MASK
which is not 100% semantically correct in all cases, but at least a
step in the right direction to make the tool modifiers easier to
improve.
2015-10-17 15:31:08 +02:00
Michael Natterer a5edc76c76 app: Iscissors: actually set the state to REMOVE so the right cursor appears 2015-03-28 22:46:49 +01:00
Michael Natterer f2c4b9317f app: Iscissors: allow to remove points with Control-Click 2015-03-28 22:41:43 +01:00
Michael Natterer bd75ed6bf0 app: Iscissors: don't crash when cancelling the initial point 2015-03-28 21:52:26 +01:00
Michael Natterer 4842e2a14f Bug 670031 - Would like to undo intelligent scissors selections in progress
Add undo to the Isissors tool, along with some refactoring:

- Always modify the actual curve, instead of a set of obscure states
  kept around in the tool instance
- On cancel, simply go back to the curve on the undo stack
- Draw handles on top of curve segments
- Draw the currently edited segments and handles in the highlight color
2015-03-28 21:31:03 +01:00
Michael Natterer 565b0af74d app: IScissors: add struct ICurve for the entire curve and its state 2015-03-27 21:37:57 +01:00
Michael Natterer e6fe3ed3b0 app: Iscissors: rename struct ICurve to ISegment 2015-03-27 10:45:28 +01:00
Michael Natterer 94a872f051 app: some cleanup in the Iscissors tool
Create utility functions to create and free ICurve segments, improves
readability. And some random code cleanup.
2015-03-20 21:18:23 +01:00
Michael Natterer d11f83a640 app: resurrect the Iscissors tool to a zombie state
The interaction is fully restored, it's also ported to the new halt()
and commit() API of tools and semi-properly GEGLized: the gradient map
is now constructed on the fly using a GimpTileHandlerValidate
subclass.

The only problem is that it doesn't find any edges in the image and is
totally useless. Pushing anyway to put an end to the bitrot, any help
with debugging is greatly appreciated...
2015-03-17 22:24:56 +01:00
Michael Natterer 125cf2a2a3 app: use the image instead of the projection for accessing a pickable 2013-09-13 23:29:06 +02:00
Ville Skyttä 6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
Michael Natterer e546f2b43b Bug 683462 - cropping with rectangular select tool leaves misaligned...
Reset the tool on image changes again, but not if only the active
drawable changes, so keep bug #678890 closed:

Introduce new dirty flag GIMP_DIRTY_ACTIVE_DRAWABLE and set it on all
tools' dirty_mask except for rect select. Check the new flag when
reseting the active tool because of a drawable change.
2012-09-06 23:55:35 +02:00
Michael Natterer d80182cf25 app: disable the IScissors tool, if you want it back, please go ahead 2012-05-20 20:38:12 +02:00
Michael Natterer e5fc441433 app: GimpIscissorsTool: move one-time initializations to class_init() 2012-05-20 19:19:12 +02:00
Michael Natterer 69893e4f72 app: remove GimpPickable::get_tiles()
and change some legacy places to get their tiles from the buffer
returned by GimpPickable::get_buffer().
2012-05-06 01:01:54 +02:00
Michael Natterer 1bbd3d40a8 app: make the GimpTempBuf struct private and add accessors 2012-05-02 17:51:12 +02:00
Michael Natterer bdf6b48138 app: move GimpTempBuf from base/ to core/
and forget about include policy in base/, it's scheduled for removal
anyway.
2012-05-02 17:51:01 +02:00
Michael Natterer dccb909009 app: make GimpTempBuf reference counted
and remove the "take_ownership" parameter from
gimp_temp_buf_create_buffer(), simply always ref the buf.
2012-05-02 17:51:00 +02:00
Michael Natterer d5d8e36d21 app: gimp_-namespace all GimpTempBuf functions 2012-05-02 17:51:00 +02:00
Michael Natterer 42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
Michael Natterer 7441a1f6f7 app: turn the TempBuf's "bytes" into "format" and port everything to it 2012-05-02 17:50:59 +02:00
Michael Natterer d743bae6a7 app: remove temp_buf_resize()
and fix its only user by simply reallocating the buf.
2012-05-02 17:50:58 +02:00
Michael Natterer 2a853cd1ee app: remove GimpPickable::get_bytes() 2012-05-02 17:50:42 +02:00
Michael Natterer 0bcae125b5 app: merge gimp_drawable_get_read_buffer() and get_write_buffer()
into get_buffer(). The loss of zero copy will be compensated soon.
2012-05-02 17:46:04 +02:00
Michael Natterer f67bcfa82b app: port the entire GimpScanConvert API to GeglBuffer 2012-05-02 17:46:04 +02:00
Michael Natterer c35ff719a7 app/libgimp*: remove stuff found by -Wunused-but-set-variable 2011-05-01 23:23:19 +02:00
Michael Natterer 9ec725c297 app: move the GimpIscissorsTool shutdown code to control(HALT) 2011-04-02 11:58:29 +02:00