Commit Graph

39369 Commits

Author SHA1 Message Date
Piotr Drąg c97c2fe06d Update Polish translation 2017-11-05 16:20:39 +01:00
Ell 6ffa17bd33 app: avoid unnecessary work when all display filters are disabled
Return FALSE from gimp_display_shell_has_filter() when there are
filters, but they're all disabled, to avoid unnecessary extra
color conversions during rendering.
2017-11-05 09:03:04 -05:00
Ell bf659a9979 modules: stylistic code and ui text cleanup in display filters
The labels used in the old display filters ui were more descriptive
than the corresponding property nicks; modify the nicks/blurbs with
similar text.

... Plus random cleanup in clip-warning.
2017-11-05 08:45:35 -05:00
Ell bc9f179edf app: add gimp_data_is_{copyable,duplicatable}() to gimp_data.h
Forgot to add it to last commit :P
2017-11-04 22:13:31 -04:00
Ell 2fe6575d7e Bug 789901 - Gimp allows duplicating non-duplicatable data objects ...
... leading to a crash

Add gimp_data_is_copyable() and gimp_data_is_dulicatable().

Use gimp_data_is_duplicatable() when setting the sensitivity of the
various "foo-duplicate" actions, instead of inspecting the object's
GimpDataClass::duplicate pointer directly, since this is no longer
an indication of whether a GimpData object is duplicatable or not
(since commit 33de4d5530).
2017-11-04 22:00:29 -04:00
Ell 089bfe4e3d app: copy brush spacing when copying generated brushes
When copying a generated brush, copy its "spacing" property, in
addition to the other properties, which hasn't been previously
copied by ::duplicate().
2017-11-04 22:00:29 -04:00
Ell 880d3bd182 app: port GimpData subclasses from ::duplicate() to ::copy()
Finish up commit 17583ff04a, which
ported GimpGradient from ::duplicate() to ::copy(), by doing the
same for the rest of the GimpData subclasses that implement
::duplicate().

We still keep GimpData's ::duplicate() virtual function around,
even though it now points to the default implementation (which uses
::copy()) for all subclasses, since ::copy() is stronger than
::duplicate(), and we might want to have certain GimpData types
that are duplicatable, but not copyable.
2017-11-04 22:00:29 -04:00
Ell 9cd8e7f9c6 app: apply display filters in sRGB, not monitor profile
When we have display filters, break the color profile transform in
two: first, convert from the image profile to sRGB, then apply the
filters, then convert from sRGB to the monitor profile.
2017-11-03 04:24:49 -04:00
Ell 22a28a23cc libgimpcolor: add shortcut in gimp_color_profile_is_equal()
When the two pointers are equal, return TRUE immediately, instead
of comparing the profile to itself.
2017-11-03 04:24:15 -04:00
Ell 2520e0455c modules: remove custom display filter gui
Remove the configure() function from all our display filters, so
that they use a propgui.
2017-11-02 16:48:52 -04:00
Ell 7ec271bd0c modules: small cleanup in display-filter-clip-warning.c
Remove debug g_printerr(), and rearrange class_init() to match the
other display filters.
2017-11-02 16:48:52 -04:00
Ell 5b118a260b modules: add clip-warning display filter
The clip-warning display filter highlights pixels with at least one
componet whose value is outside the [0,1] range, or is NaN.
2017-11-02 16:12:33 -04:00
Ell 5a726a028e app: use a propgui for display filters that return a NULL config widget
When a display filter's configure() function returns NULL, use a
propgui for the filter, instead of not showing a widget at all, to
spare filters the need to manually construct a configuration gui.
2017-11-02 16:12:33 -04:00
Ell bcb7545fe1 app: in propgui, use flat color buttons for rgb props with no alpha 2017-11-02 16:12:33 -04:00
Ell a5a2b56850 app: use actual render area when processing display filters
When processing display filters, shift the filter buffer to the
top-left corner of the render area, and pass the actual render
area, instead of an area whose top-left coords are (0, 0), to the
display filter.  This allows for position-dependent display
filters.
2017-11-02 16:12:33 -04:00
Ell e042393199 app: small cleanup in GimpSpinScale 2017-11-02 09:04:39 -04:00
Luis Angel Gonzo da41269dcd Update Spanish translation 2017-11-02 11:24:45 +00:00
Ell ae851c34b4 app: avoid spin scale pointer wrap when value is at upper/loewr limit
When applying a relative adjustment to a spin scale, don't wrap the
pointer around the corresponding screen edge if the spin scale's
value is already minimal/maximal.
2017-11-02 02:36:39 -04:00
Ell 2bdf5372ba app: wrap pointer around screen edges during relative spin scale adjustment
While applying a relative spin scale adjusment (i.e., when dragging
from the lower half of the spin scale), wrap the pointer around the
screen edges (of the current monitor), so that the maximal possible
adjustment amount isn't artifically limited by the screen geometry.
This is especially useful for spin scales in dockables, since
dockables are normally placed near the edge of the screen.

When the mouse is released, move the pointer back to its initial
position (at the beginning of the drag), to allow for subsequent
adjustments.

Unfortunately, moving the pointer programatically isn't supported
on all envrionments (Wayland, Xephyr, ...), and worse yet,
detecting that the pointer failed to move is tricky, so we have to
resort to an ungly hack to maintain the current behavior in this
case.  Gah :P
2017-11-01 15:59:48 -04:00
Ell 0323541d86 Bug 780375 - Color picker won't pick on Wayland
In GimpPickButton, try to pick from the local window under the
cursor, before falling back to picking from the root window, so
that we can at least pick from local windows on Wayland.
2017-10-31 11:21:44 -04:00
Marco Ciampa 0f716b3357 Updated Italian translation 2017-10-31 00:55:43 +01:00
Ell 262f25b319 app: fix GimpDataEditor name entry set_editable() logic
Small fix to last commit: make the name entry editable when the
data is renamable, even if it's not otherwise writable (completely
hypothetical for now.)
2017-10-30 17:25:52 -04:00
Ell bccef43049 app, pdb: prevent custom gradient from being renamed
Make internal data objects non-renamable, even if they're writable,
through gimp_data_is_name_editable().  Currently, the only such
object is the custom gradient.

Prevent changing the name of non-renamable data by making the name
entry of GimpDataEditor non-editable whenever
gimp_viewable_is_name_editable() is FALSE, even if the data is
otherwise editable.

Prevent the vairous PDB -rename() functions from renaming non-
renamable data, by adding a GimpPDBDataAccess flags type,
specifying the desired access mode for the data -- any combination
of READ, WRITE, and RENAME -- and replacing the 'writable'
parameter of the gimp_pdb_get_foo() functions with an 'access'
parameter.  Change the various .pdb files to use READ where they'd
used FALSE, and WRITE where they'd used TRUE; use RENAME, isntead
of WRITE, in the -rename() functions.
2017-10-30 17:22:29 -04:00
Ell b7b263e97b app: update GimpContainerEntry when the selected item's name changes
Keep track of the selected viewable of a GimpContainerEntry, and
update the entry text when the viewable's name changes, if the text
hasn't changed since the viewable was selected.
2017-10-30 17:22:29 -04:00
Ell 9eb75cde00 app: use G_FILE_CREATE_NONE for saved internal data files
Use G_FILE_CREATE_NONE, instead of G_FILE_CREATE_REPLACE_DESTINATION,
when saving internal data files, for consistency with the other files
we save.
2017-10-30 07:40:53 -04:00
Marco Ciampa ab05320ce1 Updated Italian translation 2017-10-30 11:37:30 +01:00
Ell fb5354c9e5 Bug 780979 - Fullscreen windows with WS_EX_NOACTIVATE | WS_EX_TRANSPARENT ...
... interfere with GIMP UI events

Add a GTK+ patch to ignore top-level transparent windows when
looking for the top-level GDK window at a certain pointer location,
in the Win32 GDK backend.
2017-10-29 15:15:34 -04:00
Michael Natterer d14f6647ad libgimp, libgimpbase: rename gimp_base_compat_enum_init()
to gimp_base_compat_enums_init() and move its prototype from
gimputils.h to gimpbase-private.h; it's not supposed to be
public API even though it's callable from the outside.
2017-10-29 18:37:18 +01:00
Piotr Drąg 61727c69e0 Update Polish translation 2017-10-29 17:41:35 +01:00
Michael Natterer a5e1dd84fd app: implement GimpToolActiveModifiers in GimpTool
Change gimp_tool_set_active_modifier_state() to honor the new
GimpToolControlSetting. Explicitly set the mode to SEPARATE in
all tools that require modifier keys during a stroke.

And here comes the actual fix: change GimpTransformTool and
GimpToolTransformGrid to use SAME mode, and remove their
active_modifer_key() and hover_modifier() impls, so it makes no
difference whether a modifier is pressed before of after mouse button
press/release.
2017-10-29 16:42:53 +01:00
Michael Natterer dd30cc79b5 app: let tools control how they recieve modifier keys during a stroke
Add new enum GimpToolActiveModifiers { OFF, SAME, SEPARATE } and
new API gimp_tool_control_set,get_active_modifiers(), the default
value is OFF.

OFF: the tool gets no modifier keys at all during a stroke

SAME: all modifiers are always delivered via GimpTool::modifier_key(),
and no magic is applied whatsoever when a mouse button is pressed or
released.

SEPARATE: this is the "classic" way: modifiers while hovering and
while stroking are delivered separately, and hover modifiers don't
affect stroke modifiers.
2017-10-29 16:42:53 +01:00
Ell 70881728f2 Bug 786844 - Wavelet decompose plugin changes image slightly
(AKA Issue with grain merge layer mode)

Fall back to using the legacy grain-extract/merge modes when the
input image precision is integer, and only use the non-legacy modes
when the precision is floating point.  The midpoint intensity value
of the non-legacy modes is 0.5, which isn't representable exactly
using integer precision, causing small deviations between the input
image and the reconstructed image.
2017-10-29 11:27:35 -04:00
Ell e4440e3fdb app: save custom gradient across sessions
Add a framework for saving and restoring internal data objects, in
gimp-internal-data.c.  Internal data objects are saved in separate
files under a new "internal-data" subdirectory of the user's gimp
directory.  The internal data is saved, restored, and cleared
together with the tool options.

Use this to save and restore the custom gradient.  In the future,
we might add similar writable internal data objects that we'd want
to save.
2017-10-29 10:19:07 -04:00
Ell 601f1bde98 app: small cleanup in gimpwidgets-utils.c
Fix comment typos, and move the gimp_widget_blink() code to the
same location as its prototype.
2017-10-29 10:19:07 -04:00
Jehan 4f871cb57d NEWS: update various notable improvements.
We should keep the list as updated as possible! :-)
2017-10-28 22:33:58 +02:00
Jordi Mas 8dc33b7729 Fixes to Catalan translation 2017-10-28 22:09:07 +02:00
Ell fdd8b3f4f6 app: add "#include <gegl.h>" to tests
Needed since commit c5b88702e6.
2017-10-28 10:54:19 -04:00
Ell 7655dd727b app: make error-console highlighting criterion configurable
Currently, the error console is highlighted (shown/blinked) only
upon errors; however, warnings, which are not shown on the
statusbar while the error console is open, often also contain
important information.

Allow the user to configure which message types (errors, warnings,
and regular messages) highlight the error console, using a new
"highlight" submenu in the error-console menu.  Add corresponding
config options, saved in sessionrc.  By default, highlight the
error console unpon both errors and warnings.
2017-10-28 10:08:13 -04:00
Ell b2bc33bdf1 app: blink the statusbar on warnings and errors
Statusbar messages are too easy to miss.  Blink the statusbar when
showing a warning or an error, to attract attention.
2017-10-28 10:08:10 -04:00
Ell e029795dfb app: add gimp_widget_blink(); use instead of gimp_dockable_blink()
gimp_dockable_blink() is used to attract the user's attention to a
specific dockable.  Generalize this to arbitrary widgets, by
replacing gimp_dockable_blink[_cancel]() with
gimp_widget_blink[_cancel](), in gimpwidgets-utils.c.
2017-10-28 10:07:10 -04:00
Ell e921c89496 app: improve gimp_highlight_widget() visibility on dark themes
The GTK+ implementation of gtk_drag_higlight(), used by
gimp_highlight_widget(), paints a black box around the widget,
which is not very noticable when using a dark theme.  Copy the GTK+
code (which is simple enough) over to gimpwidgets-utils.c, and use
the widget's text color for the box instead.
2017-10-28 10:07:10 -04:00
Luis Angel Gonzo 35ac95815a Update Spanish translation 2017-10-28 09:54:11 +00:00
Jordi Mas 29331c3b3e Update Catalan translation 2017-10-25 06:49:41 +02:00
Jordi Mas 8515877244 Update Catalan translation 2017-10-25 06:42:07 +02:00
Jordi Mas e47b955454 Update Catalan translation 2017-10-25 06:40:42 +02:00
Ell 66b92854f0 Bug 789436 - Fix out of boundary write in file-xmc.c.
Fix stupid mistake in last commit, by me :)
2017-10-24 20:05:15 -04:00
Tobias Stoeckmann 9a073508f7 Bug 789436 - Fix out of boundary write in file-xmc.c.
A malicious XMC file can contain an invalid TOC count, which could lead
to an out of boundary write on 32 bit systems due to integer overflow.

This error occurs during thumbnail creation.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2017-10-24 19:06:22 -04:00
Ell 7a4d5385fd libgimpbase: add gimp_base_compat_enum_init() to gimpbase.def 2017-10-24 14:55:29 -04:00
Ell 3b15ff5d30 app: convert bg color to image color space when removing alpha
When removing a layer's alpha channel, convert the background color
from sRGB to the image color space before compositing the layer on
top of it.
2017-10-24 14:35:05 -04:00
Massimo Valentini 7c32451dfb Bug 784305 - Deprecated enum constants are not registered in python-fu. 2017-10-24 02:34:34 +02:00