Commit Graph

215 Commits

Author SHA1 Message Date
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
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
e51915a340 app: rename all tools' widget members to simply "widget"
instead of "line", "polygon", "compass" etc. Good for consistency and
for copy & paste :)
2017-06-27 22:50:50 +02:00
375acda3ed app: implement GimpTool::cursor_update() in GimpDrawTool
using the set widget. Remove or simplify cursor_update()
implementations in some subclasses.
2017-06-27 22:41:25 +02:00
a7e706f7b5 app: must set GimpDrawTool's widget to NULL when a tools is halted
We were leaking all tool widgets set with gimp_draw_tool_set_widget(),
and those having signal connections to e.g. the display shell were
doing things when they were supposed to be gone. Fixes make check.
2017-06-27 22:32:35 +02:00
0e4d31937a app: do stuff in gimp_vector_tool_button_press() more like in other tools 2017-06-27 20:33:55 +02:00
a89e6eeaea app: connect to GimpToolWidget::status and ::status-coords in GimpDrawTool
and remove the callbacks from subclasses.
2017-06-26 20:49:14 +02:00
f4fd10179e app: implement GimpTool::oper_update() in GimpDrawTool
and remove its implementations from most widget-ported subclasses.
2017-06-26 20:29:42 +02:00
4e50eb503d app: implement GimpTool::key_press() and ::key_release() in GimpDrawTool
and feed the events to the widget. Remove the implementations from
most subclasses.
2017-06-26 20:13:51 +02:00
0d3f719381 app: add gimp_draw_tool_set_widget() and use it in all ported tools
which so far manages drawing of the widget's GimpCanvasItem. Remove
GimpDrawTool::draw() implementations from most of the affected tools.
2017-06-26 19:50:31 +02:00
96b8023091 app: add gimp_image_pick_vectors(), remove gimp_draw_tool_on_vectors() 2017-06-22 11:35:57 +02:00
f7d4bcfe54 app: remove API that is not needed any longer from GimpDrawTool
and simplify gimp_draw_tool_on_vectors()'s API.
2017-06-22 01:31:41 +02:00
924cb15060 app: add a fill button to the vector tool options, just like stroke 2017-06-22 00:53:59 +02:00
8b36164a2a app: bye bye to 1534 lines of code in GimpVectorTool, use a GimpToolPath 2017-06-21 23:28:07 +02:00
da84c612a7 Bug 777749 - Paths Tool: better drawing of edited path after a visibility change
force a redraw without adding the aliased gray path
2017-03-21 16:17:20 +01:00
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
e1b31bd37e vectortool: one more explaining message. 2016-10-02 20:04:46 +02:00
0932386d1b app: add a callback to the stroke dialog
and move the actual stroking code to select-commands.c,
vectors-commands.c and gimpvectorstool.c. Remember the active drawable
so the stroke always happens on the drawable the dialog was invoked
with.
2016-09-27 11:15:52 +02:00
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
22fc50c279 app: rename all values of enum GimpContextPropMask
from GIMP_CONTEXT_FOO_MASK to GIMP_CONTEXT_PROP_MASK_FOO.
Also rename the FIRST and LAST values of enum GimpContextPropType.
2015-09-08 21:18:49 +02:00
2068c61a85 Bug 730862 - Preview frozen while dragging selection tools...
...(crop, rectangle, etc) in large image zoomed-to-fit

Default to GIMP_MOTION_MODE_COMPRESS in all tools, and override it to
GIMP_MOTION_MODE_EXACT if the tool really needs the exact path of
motion events. This greatly reduces the events processed by the
rectangle tools and makes them much more responsive.
2014-06-02 20:55:33 +02:00
88e4d7e468 app: commit ongoing tool operations on tool change instead of cancelling
On tool change, we used to simply halt tools before switching to the
new one, which meant losing ongoing live-previewed tool changes, like
transforms, warps and color corrections. This change makes them being
applied to the image instead before switching to the new tool:

Add enum value GIMP_TOOL_ACTION_COMMIT that is passed to
GimpTool::control() before tool switching. Handle the new enum value
in all tools, and actually commit the previewed stuff. This changes
the behavior of GimpCageTool, GimpImageMapTool, GimpTransformTool and
GimpWarpTool.
2014-04-04 22:34:26 +02:00
d4933b3052 Bug 674160 - Redesign of "Lock panel"
Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.

Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
2012-11-09 11:17:25 +01:00
2414301799 Review the last few commits and apply some style fanaticism
some completely unrelated,
2012-02-07 20:36:55 +01:00
39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
57dd302ee8 app: don't redundantly set GimpToolControl->scroll_lock to FALSE 2011-12-10 23:15:03 +01:00
82480557ea app: silence a harmless Gimp-Tools-CRITICAL
double-clicking on the preview of a newly created path
in paths dockable (to activate the vector tool) used to
show a

Gimp-Tools-CRITICAL **: gimp_draw_tool_add_path: ...
                        assertion `desc != NULL' failed
2011-11-18 18:36:29 +01:00
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
b300e389d2 Bug 659052: stroke path with a pattern always uses the Pine pattern 2011-09-20 14:01:35 +02:00
99e0e73fc6 app: add "x" and "y" properties to GimpCanvasPath
so paths can be rendered at any position. Pass 0,0 from all places
that draw GimpVectors.
2011-04-04 20:58:38 +02:00
492e0f9cfd app: some more mostly cosmetic tool cleanup 2011-04-04 08:19:12 +02:00
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
8f294661b2 app: don't #include "core/gimpprogress.h" when not needed 2011-02-22 17:32:33 +01:00
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
22db39afd2 app: fix incomplete earlier s/GtkAnchorType/GimpHandleAnchor/ change 2010-10-18 20:13:09 +02:00
54a65fa9c3 app: add gimp_draw_tool_add_path() and use it in the vector tool
Also clean up gimp_vector_tool_draw() a bit.
2010-10-07 14:10:57 +02:00
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
dfd5a265eb app: remove gimp_draw_tool_draw_dashed_line()
Instead, draw a normal line and set the "highlight" property on the
returned canvas item.
2010-09-25 18:04:40 +02:00
313f8bee1e app: remove "gboolean use_cairo" from the draw tool again
It's always TRUE now.
2010-09-24 21:14:49 +02:00
b5194b65c5 app: handle sizes should be odd numbers 2010-09-24 13:13:02 +02:00
2c0520281d app: reorder code in draw() so handles are on top of lines 2010-09-23 19:47:14 +02:00
39a4dfb923 app: enable cairo drawing for the vector tool 2010-09-23 19:26:29 +02:00
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
72b25fd355 app: let the vectors tool draw vectors the old way again
Seems like the best solution until tool drawing is ported to cairo.
2010-09-16 23:09:14 +02:00
5ab83e72ac app: don't let the vectors tool draw the active vectors
Let the display shell deal with drawing the vectors. The vectors
tool only draws the handles on the active vectors object.
2010-09-16 21:13:08 +02:00
3184c440b3 app: introduce GimpItem::to_selection()
Which replaces all the deparate functions to turn layers, channels,
layer masks and vectors into selections. Use the new virtual function
all over the place instead of calling the functions in
gimpchannel-select.c manually.
2010-07-20 23:09:19 +02:00
7bfa3272ab Give a hint what pressing shift over a vector handle does. 2010-02-09 23:21:42 +01:00
09c897262e Move all undo-related members to GimpImagePrivate
Also add some new API to access them.
2010-02-04 20:06:49 +01:00
c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
ac98c2c234 Use gimp_display_get_shell() instead of directly accessing it 2009-10-04 19:56:39 +02:00