Commit Graph

20117 Commits

Author SHA1 Message Date
Alexandre Prokoudine 78821b4cb9 Add icons for Shadows-Highlights 2018-01-05 21:03:42 +03:00
Alexandre Prokoudine 7e80359b9b Add GIMP_HELP_FILTER_SHADOWS_HIGHLIGHTS to help IDs 2018-01-05 19:56:14 +03:00
Alexandre Prokoudine 098113a740 Fix the help hint for shadows-hughlights 2018-01-05 19:39:38 +03:00
Michael Natterer 82fde3e6c4 app: remove the split preview guide in gimp_filter_tool_get_operation()
so when switching ops in the GEGL tool, the new one doesn't show a
guide that does nothing until one toggles "Split view" twice.
2018-01-05 14:13:12 +01:00
Michael Natterer 5799352527 app: minor fixes in the shadows-highlights code 2018-01-05 12:23:36 +01:00
Alexandre Prokoudine 3364ee2af4 Create custom UI for GEGL-based Shadows-Highlights filter...
... and place it in menu
2018-01-05 05:56:08 +03:00
Alexandre Prokoudine fa2a1fd7e9 icons: lazy fixes for icons in the Help menu
It appears that GTK+/GNOME don't have an icon with
"help-browser" ID anymore, but we have exactly the icon
that is needed for two menu entries.

Also, the menu entry for "Search and Run..." was using
a system icon for finding stuff, which looked wrong when
used with a symbolic theme.

We could come up with something overly clever like
a dedicated CLI/terminal icon, but people would expect
a magnifier instead (judging by what Blender does)
and that's what we already use for the Zoom tool.
Hence the lazy fix.
2018-01-05 04:36:50 +03:00
Ell da8bcdcd56 app: in legacy layer modes, clamp after blending, not compositing
In legacy layer modes that may produce out-of-range output given
in-range input, clamp the result after blending and before
compositing, instead of after compositing, to avoid producing
different results than 2.8 in certain cases.
2018-01-04 13:33:57 -05:00
Ell 6759c4e675 app: use float literals in legacy layer modes
... to make the code more consistent with the non-legacy modes.
2018-01-04 13:33:50 -05:00
Ell 524e3d05fd app: show some info in collapsed dashboard group headers
Show the cache and swap occupied percentage in the header of their
group expander, when the group is collapsed.
2018-01-04 13:33:25 -05:00
Michael Natterer 895c0f558f app: add small hack to make the generic operation tool always invisible
so it can't be added to the toolbox. It's entirely useless when
activated on its own.
2018-01-04 19:23:39 +01:00
Ell b95bb99e05 app: in compress_motion(), remove accidentally added "break", fix comment 2018-01-04 08:48:11 -05:00
Ell d3b45f1875 Bug 791689 - On-Canvas GUI broken with extended input device
Improve the disabling/enabling of extended input events for the
canvas during enter/leave-notify events, in particular, so that
enter-notify events that are a result of pointer ungrabbing don't
erroneously reeanble extended input events.
2018-01-04 06:11:38 -05:00
Ell fa18044392 Bug 791689 - On-Canvas GUI broken with extended input device
Something about the unqueueing and requeueing of the entire event
queue during motion compression fries GTK's brain w.r.t. extended
input events.  Instead, have gimp_display_shell_compress_motion()
return the first non-compressed event to the caller, making it
responsible for dispatching it after handling the motion event.
2018-01-04 06:11:37 -05:00
Michael Natterer 1ce878ef47 Bug 791949 - Please ind Shift+T to the Unified Transform Tool
Clean up transform tool keyboard shortcuts (things move around by
stealing Shift+t from the scale tool):

Shift+T  Unified Transform (was Shift+L)
Shift+S  Scale             (was Shift+T)
Shift+H  Shear             (was Shift+S)
Shift+L  Handle Transform  (was Ctrl+Shift+H)
2018-01-03 18:02:28 +01:00
Michael Natterer 119f648a76 Bug 785001 - Enhanced smudge tool: Smudge with painting
Enable color picking with Ctrl-Click in the smudge tool because it now
uses the foreground color.
2018-01-03 02:29:33 +01:00
shark0r 32280a170b app: Add "No erasing effect" parameter to MyPaint brush
Last and unrelated patch of bug #785001.
2018-01-03 02:23:53 +01:00
Michael Natterer 135f58d3ae Bug 790002 - Remember last-used "Select color profile from disk" location
Add "color-profile-path" to GimpDialogConfig to remember the last-used
path in any profile chooser dialog.

Whenever a GimpColorProfileChooserDialog is created, call a new
gimpwidgets-utils helper function that connects to the dialog's "show"
and "response" signals and makes sure "color-profile-path" is set on
the dialog if it doesn't have a current folder already, and sets the
property back to the config object when a profile was actually chosen
from disk.
2018-01-02 23:09:00 +01:00
Michael Natterer 84fab474a7 Bug 788870 - Abr corrupted files crashing GIMP
Fix the crashes from the third zip:

- forgot to guard the other writing place in the RLE decoder
- one byte after the buffer is still one byte too much
- protect against seeking to bogus offsets
2018-01-02 19:19:59 +01:00
Michael Natterer dce93c7d7e Bug 762443 - Levels tool Output Level sliders works incorrectly
Add "clamp-input" (which clamps the input values to [0..1])
and "clamp-output" (which clips the final result to [0..1]),
properties, parameters and GUI to:

- GimpLevelsConfig
- GimpOperationLevels
- The levels tool dialog
- The gimp_drawable_levels() PDB API

The old deprecated gimp_levels() PDB API now sets both clamping
options to TRUE which restores the 2.8 behavior.

Also reorder some stuff in GimpLevelsConfig and elsewhere so the
levels parameters are always in the same order.
2018-01-02 18:47:20 +01:00
Michael Natterer 221e18ab09 Bug 788870 - Abr corrupted files crashing GIMP
Add brush dimension/depth/compression sanity checks for v6 brushes,
and make sure we don't overrun the RLE decoder's destination buffer.

This properly rejects all brushes from the second zip in the bug.
2018-01-02 15:36:07 +01:00
Massimo Valentini 423ce6fca3 Bug 770689 - Custom transparency controller for dark...
...outside area of Crop Tool -> Highlight option

Add "highlight-opacity" property and turn the controlling GUI into an
expanding toggle that reveals an opacity slider.
2018-01-02 14:33:27 +01:00
Elle Stone 7ac7b9519f Bug 791484 - Shorten color space channel identifiers to one letter...
...to allow more space for the channel values

to allow the Pointer, Sample Points, and Color Picker Information
dialogs to be narrower and still show the channel value, without the
channel value running over the top of the channel identifier.

Mitch: did even more and also split the coordinates display to two
lines, because on large images the widget's width was flickering
or the labels were overwriting each other.
2018-01-02 14:16:39 +01:00
Michael Natterer 479f370c7a app: add 2700 K and 4000 K to the list of Kelvin presets
They are common LED lamp temperatures. Also fix a typo and properly
order the list.
2018-01-02 13:30:53 +01:00
Massimo Valentini 31a6796fa8 Bug 788870 - Abr corrupted files crashing GIMP when saved...
...in brushes user directory

Consider 8bim section size unsigned, to avoid seeking backward when a
malicious brush includes an 8bim section unknown to GIMP.

This avoids the possibility to start an infinite loop on GIMP start.

Found just a water drop in the ocean, GIMP is still not secure.

Mitch: Added more sanity checks on the Abr's width/height/bytes so now
all brushes in the zip attached to the bug are properly rejected
instead of crashing GIMP.
2018-01-02 13:04:12 +01:00
Jehan f8e1d3b9c8 app, configure: adding dependency to mypaint-brushes.
This ensures that MyPaint default brushes are installed, otherwise this
makes the MyPaint brush tool quite useless and confusing unless MyPaint
is installed (which was making MyPaint a de-facto dependency of GIMP
until this commit!). Also we won't have to guess anymore the right path
for these brushs. The path will be known at compile time.
2018-01-01 22:33:56 +01:00
Michael Natterer 9678275049 Bug 787601 - Wrong mouse cursor when you select 'Rectangle select tool'
Make "Tool icon with crosshair" the default cursor-mode, it should
have been like that all along...
2018-01-01 20:20:19 +01:00
Richard McLean 699b835c87 Bug 787321 - Editing shear tool values numerically can have no effect
If the user enters a value in the shear tool dialog, that value must
be honored. Always set the shear direction to the edited axis and
reset the other axis to 0.
2018-01-01 18:22:34 +01:00
Michael Natterer c43be61c08 Bug 788423 - Fade left-right opacity slider doesn't work: value changes to 1.0
Use a GimpSpinScale widget instead of scale entry cruft, it handles
the model vs. view factor of 100.0 correctly. Also modernize the GUI
without using a table.
2018-01-01 17:57:46 +01:00
Tobias Stoeckmann f98d1b3a76 Bug 789613 - core: Fix integer overflow on 64 bit systems
The C language only promotes data values up to (un)signed int,
which is 32 bit, if no larger data type is used within the
calculation. Having a multiplication of two gint variables,
even if the expected target variable is of type gsize (64 bit),
leads to a possible integer overflow.

This bug can be triggered in gimp_temp_buf_new, which is used
to allocate memory for given supplied dimensions and bytes per
pixel. If triggered, less memory than needed is allocated and
therefore allows out of boundary accesses, either resulting in
possible code execution or information leakage.

While at it, make sure that the supplied format can actually be
resolved to a bytes per pixel value. If not, return NULL.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2018-01-01 17:10:01 +01:00
Michael Natterer 8df06eb5cd app: get rid of GParameter and g_object_newv() (deprecated in GLib 2.54)
Replace gimp_parameter_*() utility functions with equivalent
gimp_properties_*() functions which deal with separate arrays of names
and values, and use g_object_new_with_properties() instead of
g_object_newv().
2018-01-01 15:20:05 +01:00
Michael Natterer 2b65ff4551 configure.ac: require glib >= 2.54.2 2018-01-01 14:49:03 +01:00
Michael Natterer 6dc2d9d91d Bug 791948 - Please enable "save tool option on exit" by the default
Enable "save-tool-options" and "save-device-status" by default,
it's the expected behavior these days.
2018-01-01 14:46:32 +01:00
Ell 37a6620006 app: don't upscale preallocated display buffers by GIMP_DISPLAY_RENDER_MAX_SCALE
After commit 8029508fbe, we always
render the image in chunks that are at most
GIMP_DISPLAY_RENDER_BUF_WIDTH x GIMP_DISPLAY_RENDER_BUF_HEIGHT,
even when the window's scale factor is > 1.
2017-12-31 11:57:22 -05:00
Ell 09e1c7f9b5 app: fix mask overlay position when zoom != 100%
... and the mask offset != (0, 0)

Thanks tmanni!
2017-12-31 11:57:22 -05:00
Ell 0d27800aa7 app: small cleanup in GimpDashboard 2017-12-31 10:47:10 -05:00
Michael Natterer d91487e6af Revert "app: do not forbid merging down floating layers, instead anchor them."
This reverts commit 40bc5307dc.

It's not *exactly* the same. The floating selection can belong to a
channel or layer mask. Also, this belongs into the GUI layer, not the
core.
2017-12-31 13:56:00 +01:00
Jehan 9da25e6261 app: get_set_error() with domain == 0 is forbidden.
That makes critical errors:
> GLib-CRITICAL **: g_error_new_literal: assertion 'domain != 0' failed
2017-12-31 01:46:34 +01:00
Jehan 40bc5307dc app: do not forbid merging down floating layers, instead anchor them.
Anchoring a floating layer is basically equivalent to merge down. This
is already what we do in other merging actions (flatten image and merge
visible layers).
2017-12-31 00:19:14 +01:00
Jehan cc47597aae app: gimp_image_merge_down() on a floating selection crashes GIMP.
Forbid merging down a floating selection.
Probably we can do something better. But that's a first step.
2017-12-30 23:30:19 +01:00
Ell d3cfdf7a38 app: improve dashboard cache-maximum tooltip 2017-12-30 14:10:43 -05:00
Ell ee41819165 app: various GimpDashboard improvements
Refactor GimpDashboard to autogenerate the UI based on a
description of the different variables, fields, and groups.

Allow individual groups to be expanded/collapsed, and individual
fields to be enabled/disabled.  Save the relevant state in the
dashboard's aux-info.

Add fields for the new GeglStats properties, as per GEGL commit
25c39ce6c9bb618f06ac96d118e624be66464d74.  The new fields are not
enabled by default.

Add "reset" action, to clear the history, and reset cumulative
data.
2017-12-30 13:57:31 -05:00
Ell 354891d22c app: add gimp_meter_{set,get}_value_active()
... which can be used to individually enable/disable meter values,
while maintaining the rest of their properties, and their samples.

Also, cleanup.
2017-12-30 13:57:30 -05:00
Alexandre Prokoudine b7d2c5eab1 Add Exposure tool icon, remove erroneous stock entry for the colortemp icon 2017-12-28 04:11:55 +03:00
Alexandre Prokoudine c281fca1c0 Fix variables for the new icons 2017-12-27 07:49:52 +03:00
Alexandre Prokoudine 4d11e2b184 Add colortemp icons to the build 2017-12-27 07:49:52 +03:00
Jehan d89ed759ef app: small logics improvement.
Current migration code would still return TRUE for success if the copy
of a regular file failed for any reason.
Also getting rid of some weird block and making sure we free dirname
only when it has been assigned a value.
2017-12-27 04:10:57 +01:00
Jehan f14be48e74 app: protect user_install_dir_copy() against infinite recursivity.
When recursively browsing folders, there is always the risk of infinite
recursivity, in particular with symbolic links which can create loops.
Let's just assume that we don't have any data over 5 levels of
directories to avoid a security risk.
2017-12-27 03:56:53 +01:00
Alexandre Prokoudine 62cf942c46 Make Value Invert use the invert icon rather than the stock GEGL one 2017-12-27 03:13:50 +03:00
Jehan cdfffc6924 app: add some warning for code which should not happen. 2017-12-26 17:47:05 +01:00