Commit Graph

19795 Commits

Author SHA1 Message Date
Michael Natterer 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
Michael Natterer 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
Michael Natterer 4b103eb966 app: factor out widget creation to start() functions
in crop, free select and rectangle select.
2017-06-27 20:34:31 +02:00
Michael Natterer 0e4d31937a app: do stuff in gimp_vector_tool_button_press() more like in other tools 2017-06-27 20:33:55 +02:00
Michael Natterer 0a1aa7e559 app: measure tool cleanup
- factor out widget creation to new start() function
- and tool shutdown to new halt() function
- connect to "response" and remove key_press()
- remove oper_update(), it was doing the same as the draw tool impl
2017-06-27 20:32:40 +02:00
Michael Natterer 1d33b20db6 app: port the rectangle and ellipse select tools to GimpToolRectangle 2017-06-27 18:25:31 +02:00
Michael Natterer 94bb1a78c1 app: some cleanup and fixes in GimpToolRectangle
- unset "rect_adjusting" before bailing out on button_release()
- update the integer rectangle when the double properties change
- don't try to show handles with a size of < 3
- remove unused members
- shorten some variable names
2017-06-27 17:46:47 +02:00
Michael Natterer 8a1d782b42 app: add optional round corners to GimpToolRectangle 2017-06-27 14:19:18 +02:00
Michael Natterer 75871cfa64 app: add the options to draw an ellipse within GimpToolRectangle 2017-06-27 00:46:55 +02:00
Michael Natterer 9d042e4de9 app: add gimp_canvas_arc_set() 2017-06-27 00:46:24 +02:00
Michael Natterer c07a5f0a61 app: add gimp_tool_widget_add_arc() 2017-06-27 00:45:45 +02:00
Michael Natterer 3a0aab71b6 app: gimp_tool_widget_get_cursor(): rename "cursor_modifier" to just "modifier"
The same in all subclasses.
2017-06-26 22:13:00 +02:00
Michael Natterer e4ec9e89f4 app: move tool widget creation into gimp_blend_tool_start() 2017-06-26 21:54:45 +02:00
Michael Natterer a3acb7422d app: move status message setting from GimpBlendTool to GimpToolLine 2017-06-26 21:48:43 +02:00
Michael Natterer 8b3be42e42 app: add gimp_draw_tool_set_default_status()
which sets a statusbar message to be used if there is no widget set,
or when hovering another display.
2017-06-26 21:47:54 +02:00
Michael Natterer 068f850c03 app: dispatch to the right vfunc in gimp_tool_widget_hover_modifier()
it was copy-paste dispatching to motion_modifier().
2017-06-26 21:39:51 +02:00
Michael Natterer 01235690cf app: GimpDrawTool: implement GimpTool::modifier_key()...
...and ::sctive_modifier_key()

and remove their implementations from most widget-ported subclasses.
2017-06-26 21:03:09 +02:00
Michael Natterer 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
Michael Natterer 72f8d7d6ac app: connect to GimpToolWidget::snap-offsets in GimpDrawTool
and remove the callback from all subclasses.
2017-06-26 20:37:51 +02:00
Michael Natterer 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
Michael Natterer 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
Michael Natterer 8ff941e0ca app: call gimp_blend_tool_halt() at the end of gimp_blend_tool_commit()
This should always be done (commit implies a subsequent halt), this
got lost during widget porting.
2017-06-26 20:03:26 +02:00
Michael Natterer 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
Michael Natterer 87e6de78ad app: implement the crop tool using GimpToolRectangle
GimpRectangleTool users down by one...
2017-06-26 19:19:16 +02:00
Michael Natterer be63a4a836 app: add new GimpToolWidget subclass GimpToolRectangle
which is a replacement for GimpRectangleTool. It's a massive piece of
code and I'm not sure everyting works as it should, but it seems to do
crop stuff without any glitches.
2017-06-26 19:19:16 +02:00
Michael Natterer 2f0963589b app: add gimp_rectangle_options_connect() and _disconnect()
and use the new function from GimpRectangleTool. We need this also in
the new GimpToolWidget-base code, so it has to move out of
gimprectangletool.c.
2017-06-26 19:19:16 +02:00
Michael Natterer 1ebf905ed3 app: change gimp_tool_widget_add_corner() to take x, y, width, height
instead of x1, y1, x2, y2.
2017-06-26 19:19:16 +02:00
Piotr Drąg 14795c1f72 Fix typos in translatable strings 2017-06-26 11:57:43 +02:00
Marco Ciampa 9bcbd12537 Typo fixed. 2017-06-26 10:45:35 +02:00
Michael Natterer 00ea73f29a app: add a generic GimpToolWidget::response() signal
and a default key_press() handler that emits CONFIRM, CANCEL and RESET
responses. Remove code with the same purpose from all subclasses.

Change tools feed key_press() to the widget and connect to its
"response" instead of implementing key_press() themselves. This will
only be better and less code after the tool side of this is done
generically.
2017-06-25 23:23:27 +02:00
Michael Natterer d27359cca2 app: add gimp_tool_widget_add_rectangle(), _rectangle_guides(), _corner() 2017-06-25 21:07:24 +02:00
Michael Natterer 84e1f757ce app: store the snap offsets in GimpToolWidget
Rename gimp_tool_widget_snap_offsets() to set_snap_offsets(),
and add gimp_tool_widget_get_snap_offsets().

Also rename gimp_tool_widget_status() to set_status(), and
add new function and signal set_status_coords().
2017-06-24 21:09:18 +02:00
Michael Natterer d089aa629b app: rename enum GimpRectangleToolFixedRule to GimpRectangleFixedRule 2017-06-24 19:48:09 +02:00
Michael Natterer 6e2e8a6f08 app: move the rectangle tool enums from tools-enums to display-enums 2017-06-24 19:48:09 +02:00
Michael Natterer 9c3a2b5021 app: add gimp_canvas_corner_set() which sets everything except the anchor 2017-06-24 19:48:09 +02:00
Øyvind Kolås f3c999c80b app: scale remove outdated warning about scaling indexed images
Since the goat invasion, GIMP and GEGL have been using the set resampler and
map the resulting colors to the closest palette entries.
2017-06-24 19:06:07 +02:00
Jehan 970e9aca90 app: exclusive visibility toggle should also update same level items.
When toggling visibility of a child in an item group, we should also
toggle the visibility of other items in the same group, as well as
top-level items. Otherwise toggling exclusive visibility of any item in
a group is identical to toggling the parent's exclusive visibility,
which is simply absurd.
We still don't touch visibility of items in other groups.
2017-06-23 20:35:25 +02:00
Michael Natterer 3d7716aed4 app: use a GimpToolPolygon in GimpFreeSelectTool 2017-06-23 01:59:37 +02:00
Michael Natterer 2192f520da app: add new GimpToolWidget subclass GimpToolPolygon
which is the free select curve.
2017-06-23 01:57:21 +02:00
Michael Natterer 9e2a3c7aee app: add gimp_tool_widget_add_polygon() and add_polygon_from_coords() 2017-06-23 01:44:56 +02:00
Michael Natterer 9d8f94375e app: add gimp_canvas_polygon_set_points()
and allow NULL points in both this function and new().
2017-06-23 01:40:35 +02:00
Michael Natterer c3766b6109 app: make the points array const in gimp_channel_select_polygon() 2017-06-23 01:38:30 +02:00
Michael Natterer 96b8023091 app: add gimp_image_pick_vectors(), remove gimp_draw_tool_on_vectors() 2017-06-22 11:35:57 +02:00
Michael Natterer 523b73ff04 app: move guide and sample point picking to gimpimage-pick-item.[ch]
They are not actually items, but close enough.
2017-06-22 09:43:50 +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 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
Michael Natterer 924cb15060 app: add a fill button to the vector tool options, just like stroke 2017-06-22 00:53:59 +02:00
Michael Natterer 8b36164a2a app: bye bye to 1534 lines of code in GimpVectorTool, use a GimpToolPath 2017-06-21 23:28:07 +02:00
Michael Natterer 3ab92c7290 app: add GimpToolWidget subclass GimpToolPath, a complete vectors editor 2017-06-21 23:27:20 +02:00
Michael Natterer c4d5693903 app: add various handle and vectors hit tests to gimpcanvasitems-utils.[ch]
1:1 copies of the same functions in gimpdrawtool.[ch].
2017-06-21 23:21:26 +02:00
Michael Natterer 1aca558867 app: forgot to #include "gimptoolpath.h" in gimptoolwidget.c 2017-06-21 02:16:11 +02:00
Michael Natterer 82e2fa2e5e app: add gimp_tool_widget_add_path(), not used yet 2017-06-21 00:32:14 +02:00
Michael Natterer 91deb61475 app: add virtual functions GimpToolWidget::key_press() and ::key_release()
and api to call them. Not used anywhere yet.
2017-06-20 23:01:18 +02:00
Michael Natterer d2bfbfb748 app: some more cleanup in GimpToolLine
it was already working perfectly, but it's so simple I'd like to make
it "perfect" as a GimpToolWidget implementation example.
2017-06-20 19:07:24 +02:00
Michael Natterer 625ec4b773 app: add utility function gimp_canvas_handle_calc_size()
which is the code that calculates handle size based on pointer
proximity. Use the new function in GimpToolHandleGrid and
GimpToolLine, and clean up some stuff in GimpToolLine.
2017-06-20 01:02:23 +02:00
Michael Natterer 6560e3895b app: clear GimpToolTransformGrid's status when we leave proximity 2017-06-20 00:23:25 +02:00
Michael Natterer 956477831f app: some cleanup in GimpTransformTool
- add utility function gimp_transform_tool_get_widget()
- reorder some functions
- cleanup in draw()
2017-06-20 00:19:21 +02:00
Michael Natterer 99dee5860d app: manage GimpHandleTransformTool's handle-mode with an object binding 2017-06-19 23:46:06 +02:00
Michael Natterer 77d516b588 app: another copy/paste error broke moving in GimpToolHandleGrid 2017-06-19 23:45:35 +02:00
Michael Natterer 055ca325f2 app: manage the preview opacity with an object binding too 2017-06-19 23:39:37 +02:00
Michael Natterer 9f59657fef app: also manage all contrain and frompivot properties centrally
using g_object_bind_property().
2017-06-19 23:29:01 +02:00
Michael Natterer 0411801765 app: manage the transform tools' grid properties in GimpTransformTool
Simply use g_object_bind_property() to connect the grid properties of
GimpTransformOoptions and GimpToolTransformGrid and remove all other
grid property setting code.
2017-06-19 23:06:39 +02:00
Michael Natterer 4b597f9622 app: take the handle transform tool out of the playground
It seems proper enough now.
2017-06-19 22:56:07 +02:00
Michael Natterer 96da8c1505 app: add status message to the handle transform tool
and fix a few glitches from tool widget porting.
2017-06-19 22:53:30 +02:00
Michael Natterer 8ab11e7c18 app: bring back the live transformed path in GimpTransformTool 2017-06-19 22:13:50 +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
Michael Natterer 3ddfd107b9 app: add some newlines in gimpcanvasboundary.c 2017-06-19 21:53:20 +02:00
Michael Natterer 2d55978801 app: bring back the live selection transform boundary in GimpTransformTool 2017-06-19 20:51:56 +02:00
Michael Natterer 214a1babdb app: use a GimpToolTransformGrid in GimpPerspectiveClone
and clean up and reorder the code quite a bit.
2017-06-19 20:43:46 +02:00
Michael Natterer aa1e6c07f5 app: factor out a few lines of code in gimp_transform_tool_draw() 2017-06-19 20:07:10 +02:00
Michael Natterer b1dddcdc8f app: add #defines of standard handle sizes to gimpcanvashandle.h
The same values as in gimpdrawtool.h, tool widgets in display/ must
not include the draw tool header from tools/.
2017-06-19 10:46:05 +02:00
Michael Natterer f5a6c859d7 app: remove gimp_draw_tool_add_transform_guides() 2017-06-19 08:08:14 +02:00
Michael Natterer 3b21c08b41 app: add proximity-sensitive handles to the handle transform tool
as known from the blend tool.
2017-06-19 08:02:12 +02:00
Michael Natterer e13d3f1754 app: remove a lot of cruft from GimpTransformTool
All tools have a widget now so none of this stuff is needed any longer.
2017-06-19 01:53:01 +02:00
Michael Natterer 38c9ee9e93 app: use a GimpToolHandleGrid in GimpHandleTransformTool 2017-06-19 01:22:13 +02:00
Michael Natterer 6bd316e070 app: add new GimpToolTransformGrid subclass GimpToolHandleGrid
which implents the handle transform tool's interaction.
2017-06-19 01:21:06 +02:00
Ell c83f0e88af app: add virtual transform/type-conversion functions to GimpLayer
The GimpLayer implementation of the GimpItem transform functions,
and the GimpDrawable convert_type() function, apply their operation
to both the layer and its mask.  The subclasses of GimpLayer --
GimpGroupLayer and GimpTextLayer -- override some of these
functions, providing their own logic for the layer part, and
duplicating the mask part.

Avoid this duplication by adding a set of virtual transform and
type-conversion functions to GimpLayer.  Have the GimpLayer
implementaion of the corresponding GimpItem and GimpDrawable
functions use these functions to apply the operation to the layer,
while taking care of the mask themselves.  Have GimpLayer's
subclasses override the new virtual functions, instead of the
GimpItem and GimpDrawable ones.

Note that the existing implementation of convert_type() in
GimpTextLayer neglected to convert the mask, hence text layer masks
retained their old format after conversion.  This issue is fixed as
a side effect of this commit.
2017-06-17 13:42:41 -04:00
Alexandre Prokoudine 40dccbddd8 Bug 556884 - More messages marked for translation
Humanize action names to make them readable while
preserving their original grouping. Mark for translation
the missing ones. Use absolute values to make
"increase/decrease more" less cryptic since we hardcode
those values anyway.
2017-06-17 18:54:45 +03:00
Michael Natterer 6cd91f1fde app: move the handle transform matrix calculation to gimp-transform-utils.[ch] 2017-06-17 10:03:24 +02:00
Jehan 430c31b798 app, plug-ins: clean out trailing whitespaces in source code. 2017-06-17 04:47:53 +02:00
Michael Natterer a5f3808505 app: use the newly added tool widgets in the transform tools 2017-06-17 03:04:06 +02:00
Michael Natterer 457f6bf952 app: add GimpToolTransformGrid, GimpToolRotateGrid and GimpToolShearGrid
which do all transform tools' (except handle transform) canvas GUI and
their interaction.
2017-06-17 03:04:06 +02:00
Michael Natterer 44d33bfd3b app: change return value of GimpToolWidget::button_press() from gboolean to gint
so widgets can return which handle was clicked. The values boolean
semantics stay the same so if(retval) gives the same result. This is
useful for the upcoming transform tool widgets.
2017-06-16 20:55:02 +02:00
Ell d37fb8aa5c app: split sanity check into early/late stages, to fix gegl translation
The GEGL ops sanity check causes all ops to be initialized.  The
strings used by their properties will pick the translation selected
at the time of the check.  It must therefore run after language
intiailization, otherwise the selected translation would correspond
to the system locale, even if the user selected a different language
in the preferences.

Split the sanity check into early and late stages.  The early stage
is run before the call to app_run(), as it did before, while the
late stage is run during app_run(), after the configuration has been
loaded.  Currently, the GEGL ops check is the only late-stage check;
all other checks are performed during the early stage.
2017-06-15 09:51:25 -04:00
Ell 1c25a2f0bf app: remove double identity check from raster brush transform funcs
The identity parameter checks added to the raster brush
transformation functions in the previous commit are unnecessary,
since we're already testing for the identity matrix.  Remove them.
2017-06-14 15:47:29 -04:00
Ell c690ed6bf1 Bug 771616 - Changing parametric brush Hardness parameter doesn't work properly
Check if the brush parameters match the identity parameters, and
return the original brush mask/pixmap if they do, in the actual
mask/pixmap transformation virtual functions, instead of in their
wrappers.  While the identity parameters for raster brushes are
always scale=1, aspect-ratio=0, angle=0, and hardness=1, for
generated brushes they depend on the specific brush
parameterization.
2017-06-14 15:21:23 -04:00
Michael Natterer 1bc52dad71 app: return FALSE from gimp_canvas_item_hit() when the item is invisible 2017-06-14 00:16:09 +02:00
Michael Natterer 013bb4d81f app: add signal GimpToolWidget::snap_offsets() and API to emit it
so widgets can notify their handling tool of snap offsets.
2017-06-14 00:16:09 +02:00
Michael Natterer 495f90e6e2 app: allow to set an angle on a GimpCanvasHandle in GIMP_HANDLE_CROSS mode 2017-06-14 00:16:09 +02:00
Michael Natterer ad660a3c88 app: add gimp_tool_widget_add_transform_guides() 2017-06-14 00:16:09 +02:00
Michael Natterer 7082fc8b9e app: add x1,y1,x2,y2 parameters to gimp_canvas_transform_guides_set() 2017-06-14 00:16:09 +02:00
Jehan d6b0132654 app: s/groupe/group/ in a descriptive comment for function. 2017-06-13 19:17:46 +02:00
Jehan e23ee850d5 app: output an error message when iso code parsing failed.
Thanks to Lionel N. who bugged me with his Windows installation where
the XML file was not found by GIMP. We should output a warning when this
happens so that packagers can detect the issue and the expected
installation path for this dependency.
The reporter wants me to call him "Padawan Lionel" but I won't fall for
it! Or did I? :-D
2017-06-12 01:29:22 +02:00
Ell b737463a3b app: fix event reordering during motion compression
... due to commit 5543a9da4f
2017-06-11 18:54:29 -04:00
Michael Natterer ed1798209b app: use a GimpToolCompass in GimpMeasureTool 2017-06-11 23:44:55 +02:00
Michael Natterer 667435c105 app: some code reordering in gimp_blend_tool_button_press() 2017-06-11 23:41:56 +02:00
Michael Natterer 18fe8f61a5 app: add GimpToolCompass, which is the entire canvas GUI of the measure tool 2017-06-11 23:38:55 +02:00
Michael Natterer e05ba83453 app: add signal GimpToolWidget::status() and API to emit it
for subclasses to set status messages.
2017-06-11 23:18:47 +02:00
Ell 19f5f671d8 app: add "clipping" option to the flip tool
This option behaves similarly to the other transform tool, however
it's limited to "adjust" and "clip" only.  Now that the flip tool
can reflect across guides, this option is meaningful.
2017-06-11 15:09:46 -04:00
Ell 46b6c4fdd7 app: add support for reflecting across guides to the flip tool
When clicking on a guide while using the flip tool, reflect the
active item across the guide, rather than around its center.
2017-06-11 15:09:24 -04:00
Ell 20ccc4ed59 app: pad flipped/rotated drawables with transparency, not bg color
... when clipping, if they have an alpha channel

Right now, this case is only reachable through PDB, but it will become
relevant for the flip tool soon.
2017-06-11 15:09:18 -04:00
Ell 5543a9da4f app: compress tool motion evnets more conservatively
When compressing tool motion events, only compress motion events
at the front of the event queue, targeted at the same widget as,
and having similar characteristics to, the initial motion event;
stop compressing upon the first mismatched event.

Previously, all pending motion events targeted at the canvas were
compressed, stopping only at a button-release event targeted at the
canvas.  As a result, when adding a guide by dragging from a ruler,
there could be a situation where a pending button-release event
targeted at the ruler would be followed by motion events targeted at
the canvas, with a cleared state mask.  These motion events would
get compressed to the initial motion event targeted at the ruler,
resulting in a motion event with a cleared state mask being processed
before the said button-release event.  This, in turn, would cause the
guide tool's cursor_update function to be called, while the tool is
still active, emitting a CRITICAL.  Sheesh.

The moral of the story is: let's play it safe.
2017-06-11 15:08:19 -04:00
Michael Natterer 3c5d7075c1 app: add gimp_canvas_handle_set_size() and use it in GimpToolLine 2017-06-11 18:46:30 +02:00
Michael Natterer b92d98857c app: add gimp_tool_widget_get_shell(), and implement get_property("item")
forgot the latter in the initial version.
2017-06-11 18:26:37 +02:00
Michael Natterer 0eda6b0c9d app: fix blend tool behavior across multiple displays
Don't update the tool widget when hovering another display at the same
coordinates. Also improve statusbar messages.
2017-06-11 18:16:47 +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 1f76f04a73 app: use a GimpToolLine in GimpBlendTool
removes hundreds of lines of code, and behaves (almost) the same.
2017-06-10 23:54:11 +02:00
Michael Natterer 6fe578f269 app: add GimpToolLine, an subclass of GimpToolWidet
Implements the "line with handles" known from the blend tool, behind a
simple "x1, y1, x2, y2" interface.
2017-06-10 23:51:06 +02:00
Michael Natterer b026689e20 app: add new base class GimpToolWidget
which encapsulates a bunch of GimpCanvasItems plus their interaction,
using GimpTool-like virtual functions like button_press(),
button_release() motion() etc. Also has GimpDrawTool-like API to
manage the canvas items of its subclasses.
2017-06-10 23:47:54 +02:00
Michael Natterer d6587795c3 app: properly remove the children when a GimpCanvasGroup gets destroyed
Call gimp_canvas_group_remove_item() and don't just unref them, so
their state gets restored and signals get disconnected. They may not
be owned by the group, or have other external references.
2017-06-10 22:08:09 +02:00
Michael Natterer 2e209ac440 app: keep GimpCanvasItem from emitting "update" during destruction
Simply increase its change_count in dispose(). There is really no
reason to build expensive update regions and emitting signals when we
are about to go away.
2017-06-10 22:00:38 +02:00
Michael Natterer a4d2acac38 app: add gimp_canvas_item_transform_distance() and transform_distance_square()
to allow items to measure distances, exactly like the identical
GimpDrawTool API.
2017-06-10 21:55:40 +02:00
Michael Natterer 53a84bc6ea app: move enums GimpButtonPressType and GimpButtonReleaseType
from tools-enums.h to display-enums.h, will need them there soon.
2017-06-10 12:25:16 +02:00
Michael Natterer b11dec6dc6 app: remove some #includes from gimpfiltertool-settings.c 2017-06-10 12:23:33 +02:00
Michael Natterer d45fd4041d app: remove GimpFilterOptions' "settings" property
it was never used, only set, and these days we remember dialog
defaults differently anyway.
2017-06-08 22:28:50 +02:00
Michael Natterer 40a1d7c560 app: move new "about.h" include to its place, add some newlines 2017-06-07 20:53:48 +02:00
Jehan b7dd2622d1 Bug 774971 - Display errors outputted by GEGL.
Add a log handler so that GIMP can display errors outputted by GEGL.
Since third party code may run in threads and we have no control on
these, we have to be sure GTK+ code is run in a thread-safe way, hence
the usage of gdk_threads_add_idle_full(). This was the case here for
GEGL, and handling GEGL logs the same way as other GIMP logs would
result in crashes.
2017-06-07 15:51:33 +02:00
Jehan 6c2658ea4d app: keep track of all messages displayed by GimpErrorDialog.
This way, you can increment repeated messages even when not the last
one and you don't overflow the error dialog needelessly when 2 errors
repeat one after another.
2017-06-07 15:14:02 +02:00
Michael Natterer 4f4d6b27cf app: register the "settings folder" (e.g. GIMPDIR/curves) with the settings type
and remove all settings_folder API and values from GimpFilterTool and
its subclasses.
2017-06-05 22:00:17 +02:00
Michael Natterer 82d23fc6ff app: don't unref the passed file in gimp_operation_config_[de]serialize() 2017-06-05 20:32:07 +02:00
Michael Natterer 109f23af39 app: replace the hue-saturation tool by a generic filter action
Move the GUI to a custom gimppropgui function.
2017-06-05 18:35:05 +02:00
Michael Natterer 85aab2a0f5 app: restore color balance's tooltip 2017-06-05 13:16:59 +02:00
Michael Natterer 5abf0c2e5b app: rename gimppropgui-constructors.[ch] to gimppropgui-generic.[ch] 2017-06-05 12:05:39 +02:00
Michael Natterer 9e1aee48c5 app: move all custom gimppropgui constructors to their own files 2017-06-05 02:26:30 +02:00
Michael Natterer 757ca64e58 app: replace the color balance tool by a generic filter action
Move the color balance GUI to a custom gimppropgui function.
2017-06-05 01:20:37 +02:00
Michael Natterer ecfec4103b app: remove the colorize tool and replace it by a generic filter action 2017-06-04 21:21:43 +02:00
Michael Natterer adb826fb39 app: allow filter actions to have hardcoded default operation settings
by encoding them directly in the string attached to all filter
actions. The code now supports both "gegl:some-operation" and
"gegl:some-operation\n<serialized config>".

Add "default_settings" to GimpGeglProcedure to store the settings of
the invoking action, much like the "default_run_mode" member.

Change filters-commands.c to parse the new operation string, create
GimpGeglProcedures with the deserialized settings, and use those
settings when the procedures are ran.

Change the filter history to be smarter about what is already in the
history, there can now be several different procedures with the same
name.

Remove the dilate and erode actions from the drawable group, and add
them to filters, they are just special cases of value-propagate with
fixed settings.
2017-06-03 22:08:43 +02:00
Michael Natterer 2d38abd7c4 configure.ac: require babl >= 0.1.28 and GEGL >= 0.3.18 2017-06-03 18:14:33 +02:00
Michael Natterer c0c1225e93 pdb: remove a misplaced " from fileops.pdb 2017-06-03 18:12:50 +02:00
Michael Natterer e122303fe0 Bug 783382 - Lava filter broken
Allow NONE(0) for "wrapmode" (which translates to GEGL_ABYSS_NONE) in
the plug-in-edge PDB compat wrapper. The old plug-in accepted this
(undocumented) value and used a GimpPixelFetches in NONE mode.
2017-06-03 17:08:47 +02:00
Michael Natterer 142c167321 app: change the default value of "import-raw-plug-in" from NULL to ""
so it shows up in the generated gimprc and its manpage. This has no
effect on how the settings works.
2017-06-02 22:45:29 +02:00
Ell 3ca48a0b30 enums: don't use comments in generated enum recipes
Works in bash, but apparently not portable.
2017-06-02 11:15:43 -04:00
Michael Natterer b1ea1eb71d app: apply some more filters immediately (without GUI) 2017-06-01 23:40:39 +02:00
Michael Natterer 383419926b app: add member "default_run_mode" to GimpGeglProcedure
which determines if a filter is applied directly (RUN_NONINTERACTIVE)
or asynchronously using GimpOperationTool (RUN_INTERACTIVE).

Split filter actions in two groups, one for direct apply and one for
interactive apply, which have separate callbacks that create
GimpGeglProcedures with the right default_run_mode set.

(After doing this distinction automatically based on the existance of
editable properties, I figured will might want direct apply also for
filters that do have properties, such as e.g. dilate and erode, which
are just value-propagate with some constant property values)
2017-05-31 23:48:22 +02:00
Michael Natterer 9d502791d0 app: rename procedure_commands_run_procedure()
to procedure_commands_run_procedure_async(). Add a new
procedure_commands_run_procedure() that calls the procedure
synchronously, needed later.
2017-05-31 23:48:22 +02:00
Michael Natterer ed2fb2944f app: add a "settings" argument to GimpGeglProcedure
which gets added automatically by procedure_commands_get_display_args().

Move the non-interactive and run-with-last-vals code to
gimp_gegl_procedure_execute() (not execute_async()) because it makes
more sence to call it synchronously anyway (not implemented yet).

This commit should change no behavior.
2017-05-31 23:48:22 +02:00
Ell 14bcde2c73 app: small code reorganization in the curves tool
Move gimp_curves_tool_color_picked() to match its prototype's
position, per commit f876f3b5f4.
2017-05-31 08:47:23 -04:00
Ell ff91bb1b5b app: fix unused variable warning in warp tool
... due to commit 7136f09f0a
2017-05-30 20:11:37 -04:00
Ell 7136f09f0a app, cursors: add a cursor for the warp tool
... and use it instead of the perspective tool cursor.

Disable the cursor modifiers for now, since they're not really
meaningful.
2017-05-30 19:27:05 -04:00
Ell f876f3b5f4 app: fix curves tool color picking
Since commit bc4589968c, GimpFilterTool
assumes that color picking is only ever enabled through color picker
toggles, created using gimp_filter_tool_add_color_picker().  However,
the curves tool enables color picking using the color tool functions
directly.  CRITICALS ensued.

Use the new gimp_filter_tool_enable_color_picking() function, added
in the previous commit, and handle picking through the filter tool
interface, instead of the color tool interface.  This fixes the
issue.
2017-05-30 17:40:42 -04:00
Ell a5b03ddf2e app: add gimp_filter_tool_{enable,disable}_color_picking()
Subclasses of GimpFilterTool should use these functions to control
picking, instead of using gimp_color_tool_{enable,disable}()
directly.  This makes sure that the tool's picking state is
consistent, and allows the caller to control the pick identifier,
and use abyss picking (not currently needed by any subclass, but
maybe in the future, who knows.)
2017-05-30 17:40:42 -04:00
Michael Natterer 90698524d9 app: change gimp_operation_config_new() to _get_type()
Return only the config object's GType and do the g_object_new() in the
caller (one caller only needs the type, there is no need to create a
dummy object just to get to its type).
2017-05-29 08:04:52 +02:00
Michael Natterer 03085f491d app: ref the GimpProgress in gimp_procedure_execute[_async]()
around calling the actual execute vfuncs, Seen a crash when quitting
GIMP while a script-fu window was open, the progress was already
finalized. Now it simply prints the error message about the failing
script on the concole.
2017-05-28 17:41:52 +02:00
Michael Natterer 84e5aed103 app: turn invert-perceptual, -linear and -value into normal filter actions
so they show up in recent filters, and don't need their own callbacks.

This has the problem that they now show a GUI with no options, but
that simply puts on more pressure to fix this general uglyness of ops
without editable properties.
2017-05-26 18:49:22 +02:00
Michael Natterer ea7f1ba024 app: reduce indentation depth in gimp_plug_in_manager_search_directory()
by removing one if() level each from the nested loops. Instead,
continue the loop early if the file is hidden. And plug a memory leak.
2017-05-26 18:47:13 +02:00
Jehan f24edcded7 Revert "Bug 783108 - Make paint tools draw in all open views"
This reverts commit 2aa246f5e9.
As per Mitch request since painting is already too slow.
This may come back when we make painting fast again, I guess.
2017-05-26 17:48:34 +02:00
Richard McLean 2aa246f5e9 Bug 783108 - Make paint tools draw in all open views
Committed with minor fixes by the reviewer (Jehan).
2017-05-26 12:45:36 +02:00
Jehan efae55a73e app: allow plugin inside first-level directories of plug-ins folders.
We don't search recursively but only at the first level. If a plugin is
in its own subdirectory, the entry point has to be named the same (minus
extension) as the directory. For instance my-plugin/my-plugin for a
binary, or my-plugin/my-plugin.(py|exe|…).
This way, a plugin can load shared objects (libraries, other script
files, etc.) without polluting the main plug-ins directories, and in
particular without interfering with other plug-ins.
This is a first step to fix bug 757057 (DLL files which were used in
various plugins).
2017-05-24 17:33:15 +02:00
Ell 5bcde32caf enums: run gimp-mkenums from the build dir
Commit 1e6acbd4e1 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files.  This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.

Switch back to running gimp-mkenums from the build directory.  To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
2017-05-22 20:29:18 -04:00
Ell f9fa0d1b18 enums: don't write generated enum files to src-dir if unchanged
When regenerating an enum file, don't copy it back to the source
directory if it hasn't actually changed.  This allows using a read-
only source directory where the enum header is newer than the
generated file, as long as they're not really out of sync.

OTOH, *do* touch the generated source-dir file even when unchanged,
in order to avoid re-running its recipe on the next build, however,
allow this to silently fail (which is harmless).
2017-05-22 17:58:04 -04:00
Ell e7d781ff0e app: future-proof XCF layer blend/composite props
The layer blend space, composite space, and composite mode
properties have a special AUTO value, which may map to different
concrete values based on the layer mode.  Make sure we can change
this mapping in the future, without affecting existing XCFs (saved
after this commit), by encoding these properties as follows:

When saving an XCF, if the property has a concrete (non-AUTO)
value, which is always positive, encode it as is.  If the property
is AUTO, which is always 0, encode it as the negative of the value
it actually maps to at the time of saving (note that in some cases
AUTO may map to AUTO, in which case it's encoded as 0).

When loading an XCF, if the encoded property (stored in the file)
is nonnegative, use it as is.  Otherwise, compare the negative of
the encoded property to the value AUTO maps to at the time of
loading.  If the values are equal, set the property to AUTO;
otherwise, use the concrete value (i.e., the negative of the value
stored in the XCF).

Note that XCFs saved prior to this commit still load fine, it's
simply that if we change the AUTO mapping in the future, all their
AUTO properties will keep being loaded as AUTO, even if the
resulting concrete values will have changed.
2017-05-21 08:44:19 -04:00
Ell f400bdc049 app: add interpolation, abyss policy, and high quality preview options ...
... to the warp tool

The interpolation and abyss policy options control the sampler type
and abyss policy of the map-relative node.  The high quality preview
option determines whether to use the same sampler for map-relative
during preview as the one used during commit, or whether to use a
fast nearest-neighbor sampler.

A bit too much?  Maybe :)
2017-05-19 18:29:16 -04:00
Michael Natterer 81fe78bd9b app: derive GimpFgBgEditor from GtkEventBox instead of GtkDrawingArea
it doesn't need a visible GdkWindow.
2017-05-19 12:02:48 +02:00
Michael Natterer 54e2c196b7 app: use 2/3 of the area's shorter side for GimpFgBgEditor's oog color too 2017-05-19 11:55:54 +02:00
Michael Natterer 297ec3fdab app: add an out-of-gamut indicator to GimpFgBgEditor 2017-05-19 11:00:38 +02:00
Ell cd5930d813 warp: reorder warp tool options
... to be more similar to the paint options.
2017-05-19 04:56:30 -04:00
Ell 40afffbebc app: add option to stroke the warp tool during cursor motion ...
... and to disable/control the rate of the periodic stroke.

The warp tool is now fast enough to enable stroking directly in
the motion handler, which gives better-quality response to motion
than stroking periodically.  It's not quite fast enough to enable
exact motion, though :/

Allow individually enabling/disabling stroking during motion and
periodically, and allow controlling the rate of the periodical
stroke.
2017-05-19 04:55:29 -04:00
Ell 13b619c474 app: use different samplers for preview and commit in warp tool
Use a fast nearest-neighbor sampler for the map-relative node
during preview, and a slower cubic sampler when comitting/animating.
2017-05-19 04:55:09 -04:00
Michael Natterer 4f903a69b3 app: set the palette import dialog's "# Colors" scale to logarithmic
because the scale is useless otherwise with its range of 2..10000,
and because I needed a test case for the next commit (the
gimp_scale_entry_set_logarithmic() API was unused).
2017-05-18 18:21:51 +02:00
Ell 3814ac9056 app: in warp tool, avoid nop strokes with the MOVE behavior
When using the MOVE behavior, don't append the current cursor
position to the stroke path in the timeout proc if the cursor
hasn't moved since last time.  It has no effect, except for
requiring an unnecessary update.
2017-05-17 15:22:47 -04:00
Ell 5be79bc8c4 app: in warp tool, compress motion events
We stroke the last-reported coords in a timeout proc, so there's
no real need for exact motion notification.
2017-05-17 15:22:38 -04:00
Ell a0b30d542d app: in warp tool, improve update region calc.
... as a result of a stroke change.
2017-05-17 15:21:33 -04:00
Elle Stone 127e7daeb2 Bug 773461 - Color picker lacks L*a*b* mode
Add LAB readout to Pointer and Sample Points dialogs
2017-05-17 10:27:53 -04:00
Ell 9c7cae6220 app: maintain warp tool graph structure during undo/redo
When undoing a warp stroke, don't disconnect the current warp node
from its predecessor; rather, keep the graph as-is, and only
reconnect the render_node to the previous node.  This avoids
invalidating the undone node, so that redoing it (which, likewise,
only involves reconnecting the render_node) doesn't require
reprocessing, making it much faster.
2017-05-16 20:35:46 -04:00
Ell 13e274d82e app: add "spacing" parameter to warp tool; change "hardness" range
The spacing parameter controls the stroke spacing of the warp op.
It's similar, but not identical, to the brush spacing parameter of
the paint tools.  It provides a tradeoff between speed and quality.

Change the UI range of the hardness parameter from [0, 1] to [0, 100],
to match the other parameters.
2017-05-16 20:35:42 -04:00
Jehan 0dbdf232d5 app, menus: rename confusing layers-text-tool and vectors-path-tool.
"layers-text-tool" action shows as "Text Tool" while "vectors-path-tool"
shows as "Path Tool". That's very confusing with tools-text and
tools-vectors respectively.
These actions are mostly about entering in edit mode with the active
layer or path. For text layers, it will enter text edition on canvas,
whereas just open the attributes edition dialog on other layers. For
consistency, layers-text-edit is renamed as well too layers-edit-text.
This also fix the side effect of commits 10099bd and 526918b where I
didn't realize that layers-text-tool was also working on non text layers
on purpose (being very badly named). Now there is a separate layers-edit
and layers-edit-text.
Thanks to Pat David for English corrections. :-)
2017-05-16 00:04:24 +02:00
Michael Natterer 8f2471b112 Bug 772667 - instant freeze on rotate
Limit the number of lines drawn in the transform tool canvas grid to
one line every 5 image pixels. This should probably be done in display
pixels, didn't change that yet.
2017-05-14 22:28:51 +02:00
Thomas Manni f25c0cb9c9 Bug 121446 - Transform tool bounding box for path
When transform tools are applied on a path, set their bounding box as follow:
- if a selection exists, use the selection bounds
- else if the path has a valid bounding box, use it
- else use the image canvas bounds

Also disable transform tools on an empty path (path without strokes) since
there is no data to transform.
2017-05-13 23:04:22 +02:00
Ell bb2417c299 app: add ui_meta keys for controlling some UI attributes dynamically
Add support for The following GEGL op property keys, which shall
contain GUM expressions of the specified type, controlling the
corresponding UI attributes of the property's widget:

  - sensitive [boolean]: controls widget sensitivity.

  - visible [boolean]: controls widget visibility.

  - label [string]: controls widget label (or the label of the
    associated label widget).

  - description [string]: controls widget tooltip text.

When any of above keys are present, the values they evaluate to take
precedence over the static values the corresponding attributes would
otherwise have.
2017-05-13 16:55:24 -04:00
Ell d6eb927b9e app: add interpreter for the GUM language
GUM is a small DSL, used in some property keys of GEGL operations
to dynamically control UI attributes based on context.  This commit
only adds an interpreter for the language; see the next commit for
the actual handling of the relevant keys.

See the comment at the top of gimppropgui-eval.c for a description
of the language.

Note that the interpreter is licensed under the LGPL.
2017-05-13 16:51:32 -04:00
Jehan bb977263ca app: layers-text-tool should give the focus to the canvas.
If focus is on the layer list for instance, running this action from
right-click menu raises the on-canvas toolbar, ready for edition, with a
visible text cursor. But if the canvas has no focus (since you clicked
on the layer list, it has the focus), you still have to move your mouse
over and click the text on canvas. That doesn't make sense and there
would be barely any reason to use this over selecting the text tool then
clicking the canvas.
2017-05-13 01:03:44 +02:00
Jehan 526918b26c app: layers_text_tool_cmd_callback() is not supposed to be run on...
... non-text layers.
Since commit 10099bd, the action will be non-sensitive with non-text
layers, so if it happens, there is a bug somewhere. Therefore
g_return_if_fail() on this condition.
Moreover opening the edit attributes dialog was absolutely confusing on
what this action is supposed to do. We should not have these kind of
random behaviors.
2017-05-13 00:01:56 +02:00
Jehan 10099bdaf7 app: layers-text-tool action should only be sensitive when active...
... layer is a text layer.
It doesn't make sense to activate the text tool on any other kind of
layer.
2017-05-13 00:00:35 +02:00
Ell 99ab780d9f app: update layer backdrop only after removing from stack
When a layer is removed from a layer stack, and its backdrop needs
invalidating, emit the UPDATE signals for the backdrop only after
the layer has been removed from the container.
2017-05-12 15:54:08 -04:00
Ell dd8e2e9b5e app: don't invalidate layer when invalidating its backdrop
Harmless, but unnecessary.
2017-05-12 15:54:07 -04:00
Ell 07ac78ef8d app: add GimpLayerStack
A subclass of GimpDrawableStack, for layer stacks.  Invalidates the
layers' backdrop as/when necessary, according to the value of their
excludes_backdrop property.

Make gimp_drawable_stack_update() protected, instead of private, so
that we can use it in GimpLayerStack.
2017-05-11 17:44:56 -04:00
Ell a051002295 app: add GimpLayer::excludes_backdrop property
A boolean flag, specifying whether the backdrop is clipped to the
layer.  That's the case when the layer's composite mode is dst-atop
or src-in.

This is a read-only property, derived from the other attributes of
the layer.  We compute its value through a virtual function, so that
GimpGroupLayer will eventually be able to specialize it for pass-
through groups.

The next commit uses this property to actually do something useful.
2017-05-11 17:44:55 -04:00
Ell a67135658e app: add gimp_layer_mode_get_included_region()
Takes a layer mode and a composite mode, and returns the region
included in the composition.

Use this function in GimpOperationLayerMode, instead of testing
for specific composite modes directly.  Will also be used by
the next commit.

Indentation cleanup in gimp_layer_modes.h
2017-05-11 17:44:55 -04:00
Ell c78cecd76d app: rename GimpLayerModeAffectMask to GimpLayerCompositeRegion
... so that we can use it for other functions that involve
compositing regions (which we do in the next commit).

Rename gimp_operation_layer_mode_get_affect_mask() and
friends to _get_affected_region().
2017-05-11 17:44:55 -04:00
Ell b5974d3457 app: make LCH lightness select-criterion faster
babl already has a faster path for getting L only, than going
through LCH.
2017-05-11 17:44:55 -04:00
Michael Natterer 465eba3260 app: factor out button-2-motion handling code in GimpDisplayShell
less code in the huge gimp_display_shell_canvas_tool_events().
Also fix the rotating cursor in gimp_display_shell_start_scrolling().
2017-05-11 21:31:41 +02:00
Michael Natterer 0c98028f3b app: don't hide the transformed layer for the flip tool
flip has no interaction.
2017-05-10 15:12:21 +02:00
Michael Natterer 5355fe15b4 app: GimpToolPalette: disconnect signals in dispose() not finalize() 2017-05-09 23:14:24 +02:00
Michael Natterer 70eff55215 configure.ac: require babl >= 0.1.27 and GEGL >= 0.3.15 2017-05-09 22:49:56 +02:00
Jehan a634e61bc0 app: change text tool font size default.
With bigger and denser default images, the older 18px font default is
very small (~ 4pt font at 300PPI).
I decided to settle for a 15pt font, i.e. 62 px at 300 PPI, which seems
like quite an acceptable relative size for our FullHD defaults.
It is bigger than a default font size for —say— a text processor, but
GIMP is not really designed to process large walls of small text anyway.
Rather shorter texts at bigger sizes (i.e. designs, etc.). So this seems
like quite an ok default.
Note that as any defaults, this only goes as far and won't be what most
people need most of the time anyway. But at least we should get rid of
this ridiculous 18px default.
2017-05-09 22:08:30 +02:00
Jehan 7f9bf84ef6 app: font size wrong when hitting "Reset to default values" in text...
... tool when font unit is not pixel.
The default size is 18px. If for instance one is on a 300 PPI image, and
set the unit to mm, hitting "Reset to default values" sets to 213 px
(which corresponds to 18mm at 300PPI). I'm not 100% sure of the source
of the problem, but resetting the font size before the unit fixes it and
properly sets back to 18px. Let's go the lazy way and just do this.
2017-05-09 22:08:30 +02:00
Michael Natterer 3f420614ff app, libgimpbase: allow to select colors by CIE L, C, and H
Add the additional enum values to enum GimpSelectCriterion, and
the few needed lines to gimppickable-contiguous-region.c.

It's horribly slow, but works.
2017-05-09 22:02:19 +02:00
Michael Natterer 2766a9f807 app: add an LCH mode to GimpColorFrame
so picked colors can be displayed as LCH now.
2017-05-08 21:33:04 +02:00
Michael Natterer e5e9e4b6c8 Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
Add gegl:hue-chroma to the "Colors" menu.
2017-05-07 18:32:45 +02:00
Ell dfce143f8d app: push regenerated operations-enums.c file
Due to last commit.
2017-05-06 18:36:45 -04:00
Ell 13e2153d33 app: swap enum/ui order of dst-atop and src-in
It's a more logical order.  Hopefully, we're going to rename them
soon, so it'll all make more sense.
2017-05-06 18:23:20 -04:00
Ell 1e6acbd4e1 enums: generate enum files in source dir
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.

Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
2017-05-06 17:26:16 -04:00
Jehan 8c814a24d3 app: use gimp_unit_get_scaled_digits() in the Pointer Information dock.
gimp_unit_get_digits() won't return relevant information when using
higher resolution. gimp_unit_get_scaled_digits() will provide the right
amount of details relatively to the actual print resolution of the
active image.
2017-05-06 22:57:43 +02:00
Michael Natterer 6561dec3df Bug 315051 - Image preview in transforms keeps original version visible
Only hide the layer if the transform preview is visible.
2017-05-06 01:07:53 +02:00
Michael Natterer 7f33edea1b app, libgimp: allow to register more than one MIME type per procedure
GIMP will always use the first one from the list, but at least now
there is a way to register variants.
2017-05-04 23:22:37 +02:00
Michael Natterer 560340e8d6 app, pdb, libgimp: make the raw image importer configurable
Add "import-raw-plug-in" to gimprc, and a new procedure
gimp_register_file_handler_raw(). On startup, remove all load
procedures that are marked as "handles raw" but are not implemented by
the configured plug-in. Add the list of available plug-ins to prefs ->
import/export. Register all file-darktable procedures as handling raw.
2017-05-04 20:38:58 +02:00
Michael Natterer 7e239901dd app: add new GtkTreeView subclass GimpPlugInView
which takes a list of GimpPlugInProcedures and allows to choose
between the plug-ins that implement these procedures.
2017-05-04 20:35:41 +02:00
Ell 0ccb5e6bf9 app: don't prepare input color transform for source filters
... which don't have an input pad.  It CRITICALs.
2017-05-04 11:55:10 -04:00
Jehan 628be2af92 app: fix typo s/Devics/Devices/. 2017-05-04 05:34:12 +02:00
Jehan ab56f524e4 app: "Reset to default values" does not properly reset generated...
... brush features.
My previous commit only fixed aspect ratio reset, but I realize that
much more brush options are affected by defaults of generated brushes
(size, hardness, aspect ratio, angle and spacing). Let's reset all these
after the basic property reset.
2017-05-04 04:59:59 +02:00