Commit Graph

45469 Commits

Author SHA1 Message Date
Jehan 49351777b6 Issue #3884: missing libgtk-3-dev leads to configure syntax error. 2020-04-27 12:21:19 +02:00
Ell 2d4de85fe3 plug-ins: in file-psd, use normal channel order
For some reason we reverse the channel order when loading/saving a
PSD file.  This doesn't seem to be necessary, and leads to a
reversed channel order across GIMP/Photoshop.  Simply use the
normal channel order instead.
2020-04-26 23:38:25 +03:00
Ell 281188e169 Issue #189 - Store channel colors when saving as PSD
In file-psd, write a DisplayInfo image resource with the color/
opacity of all channels.
2020-04-26 23:19:22 +03:00
Ell ac19f6413b plug-ins: in file-psd, fix indentation in psd-save.c 2020-04-26 23:16:05 +03:00
Ell 953a3ad479 plug-ins: in file-psd, remove unused member of DisplayInfoNew 2020-04-26 23:14:55 +03:00
Ell 251ce5126e plug-ins: in file-psd, fix u8 channel format
In file-psd, use a non-linear channel format when the image
precision is u8 non-linear, as per gimp_image_get_channel_format().
2020-04-26 23:14:52 +03:00
Jehan ffc7db84d1 build: build OpenEXR plug-in.
libopenexr was installed, but pkg-config was failing because of missing
dependency:
```
$ x86_64-w64-mingw32-pkg-config --modversion OpenEXR
Package IlmBase was not found in the pkg-config search path.
Perhaps you should add the directory containing `IlmBase.pc'
to the PKG_CONFIG_PATH environment variable
Package 'IlmBase', required by 'OpenEXR', not found
```

Looks like there may be a dependency bug in the openexr package in
Msys2. Anyway let's just add ilmbase and get this to be detected
correctly.
2020-04-21 14:47:51 +02:00
Jehan 7e7d48a7ac app: fixes string format argument types on Windows 32-bit.
On 64-bit, all seems fine, but when building to 32-bit (at least Windows
32-bit), G_GUINT64_FORMAT is defined to "%llu" while time_t is a long
int. So it doesn't match and the compiler complains:

> warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'time_t' {aka 'long int'}

Let's cast to (guint64) to make sure the type always match.
2020-04-21 14:11:49 +02:00
Jehan 430f40d00b app: gimp_sigfatal_handler() must not be declared on Win32 without…
… DrMingw.
Fixes:
> warning: 'gimp_sigfatal_handler' declared 'static' but never defined
2020-04-21 14:03:36 +02:00
Jehan 0aca033370 build: removing OpenBlas patches.
Our installer use Msys2 packages when possible. And Msys2 repository
provides version 0.3.9, released on March 2, which contains our patches.
No need for them here anymore, no need to make custom builds.
2020-04-20 23:56:46 +02:00
Ell 5dc1572b01 libgimpwidgets: fix logarithmic transform in gimp_scale_entry
Use the right GtkAdjustment in gimp_scale_entry_log_to_linear().
See merge request !49.

Thanks to MihailZenkov for spotting this!
2020-04-20 18:45:04 +03:00
Jehan 8caef4ea0b app: fix cast bug.
When building (at least on 32-bit), fixes this warning:
> app/widgets/gimpdashboard.c:3840:58: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Unsigned long long is specified in the C99 standard to be at least
64-bit. So it's normal that the compiler complains, as a cast from
unsigned long long to a pointer has chances to go very wrong.
Yet gimp_backtrace_get_frame_address() actually returns a guintptr which
is type-compatible with gpointer so let's not give the compiler false
information and just use this type. Then cast it to unsigned long long
just for printing to dashboard log.
2020-04-20 01:35:59 +02:00
Ell 37065ccf6f app: make sure to update the display-shell title/statusbar when closing image
... instead of relying on UI events to cause this indirectly.
2020-04-19 18:01:46 +03:00
Ell 4e560f2ff0 Issue #4968 - Newly opened image not visible in image window ...
... when rulers and scrollbars are hidden

In gimp_display_shell_fill(), make sure a size-allocate always
happens for the canvas, even when the rulers and scrollbars are
hidden, so that the pending size_allocate_center_image is handled,
and doesn't block canvas drawing.
2020-04-19 17:59:28 +03:00
Jehan eafe90fa7c libgimp, po-python: fix missing header in distribution…
… and additional source from python POTFILES.

These 2 fixes allow `make distcheck` to work fine.
You'll notice that I just commented the pygimp files out instead of just
deleting them. That's because there have been discussions and a patch
proposal lately about porting the pygimp API to Python 3/master. We are
not sure we want this yet for maintainability reason (and I was supposed
to be the one to wipe these files out!) but we'll see.
2020-04-19 12:52:28 +02:00
Ell 19c0d43c25 Issue #4967 - Crash when cancelling filters with aux inputs
In gimp_filter_tool_real_config_notify(), make sure the incoming
pspec in not NULL before accessing it.
gimp_operation_tool_aux_input_notify() may emit "notify" on the
config object with a NULL pspec.
2020-04-18 17:52:10 +03:00
Jehan e0851680ac build: more dependencies for the Windows builds. 2020-04-18 14:13:32 +02:00
Jehan 3a43e05936 gitlab-ci: porting the Windows cross-build CI to a Debian image.
As all other builds, let's use Debian/testing.
2020-04-18 14:13:32 +02:00
Jehan c280cb9da7 plug-ins: fix various other warnings on the Windows build CI.
1 > warning: "_WIN32_WINNT" redefined
2 > pointer targets in passing argument 2 of 'send' differ in signedness
3 > passing argument 4 of 'setsockopt' from incompatible pointer type

For the signedness/type issues, I just casted to (void *) which was the
expected type for these parameter on the Linux API anyway. As for
Windows API (which was expecting char* for these various API), the
compiler just does the cast itself from void* without complaining
anymore.
2020-04-17 14:42:25 +02:00
Jehan e854de73ee plug-ins: fix signedness warning with different expectation Win/Linux.
On Windows, accept() wants an int for addrlen but on Linux, it wants a
socklen_t which is an unsigned int. So we can't just switch to gint as
proposed in !232 (if we do so, the signedness warning now happens on the
Linux build instead of the Windows one).

Fortunately it looks like socklen_t is actually typedef-ed to int in
Windows headers. So let's just use this type, which is much more proper
anyway as this variable is only used in functions which want this type
on Linux.

Fixes:

> warning: pointer targets in passing argument 3 of 'accept' differ in signedness
2020-04-17 14:18:53 +02:00
Jehan e1a11504cd gitlab-ci: remove useless build dependencies. 2020-04-17 01:40:15 +02:00
Jehan 8398c83c23 build: use msys2 packages as source for the Windows CI.
This is a new feature I implemented in the crossroad cross-compilation
tool. Msys2 repository has more packages and they are more up-to-date
compared to Fedora and Suse cross-built packages (the 2 other available
sources for pre-built Windows packages).
This allows to simplify a lot the dependency preparation for the Windows
CI, and speed things up.
2020-04-17 01:39:58 +02:00
Jehan b948ff932d build: fix the Windows CI.
Recently added warnings on json-c dependency breaks with Mingw-w64.
Removes warning promotion to errors when compiling json-c.
2020-04-15 16:27:16 +02:00
Ell 987447f18f app: maintain common settings when editing Brightness-Contrast/Levels as Levels/Curves
When converting Brightness-Contrast to Levels, and Levels to
Curves, make sure to copy the common settings as well as the
operation-specific settings.
2020-04-14 18:03:05 +03:00
Ell 88689515ab app: reset common settings when resetting Curves tool
In GimpCurveTool, don't reset the curve config manually, and rather
let GimpFilterTool reset it, only maintaining the active channel
(similarly to GimpLevelsTool), so that the common operation
settings are also reset.

Note that this also avoids keeping the channel curve types, which
should work correctly after last commit.
2020-04-14 18:02:34 +03:00
Ell 56693a8393 app: when copying GimpCurve, don't overwrite points from samples
In gimp_curve_config_copy(), make sure to copy the curve type
*before* the points, so that, when changing the type from FREE to
SMOOTH, we don't overwrite the copied points with interpolated
samples.
2020-04-14 18:01:59 +03:00
Jehan 05556457df plug-ins: remove last usage of GTimeVal and g_get_current_time().
Deprecated as not year-2038-safe, this was the last remnant of code
which was still using it.
2020-04-14 16:08:38 +02:00
Yuri Chornoivan db35080e75 Update Ukrainian translation 2020-04-14 12:35:25 +00:00
Jehan f6dd30f3a8 plug-ins: fix more abs().
I am comparing absolute value of 2 double computation results. Might as
well just use fabs() instead of truncating both values to int.
Fixes the following:
> warning: using integer absolute value function ‘abs’ when argument is
> of floating point type ‘double’ [-Wabsolute-value]
2020-04-14 00:12:45 +02:00
Jehan fddaa77218 plug-ins: fix abs() on long int.
Fixes the following bug:

> warning: absolute value function ‘abs’ given an argument of type
> ‘glong’ {aka ‘long int’} but has parameter of type ‘int’ which may
> cause truncation of value [-Wabsolute-value]
2020-04-13 23:18:19 +02:00
Jehan b71754f2a7 plug-ins: fix some build warning.
Fixes:
> warning: using integer absolute value function ‘abs’ when argument is of floating point type ‘double’ [-Wabsolute-value]
2020-04-13 21:54:09 +02:00
Jehan ea0cc27c01 app, libgimp, pdb: update gimpfile PDB functions' documentation.
All file-related functions now uses a single GimpFile as argument.
Comments regarding path as entered vs full pathname are now obsolete.
2020-04-13 20:25:32 +02:00
Jehan 60854c8668 gitlab-ci: libspiro is needed to run `gegl`.
`gegl` binary is being run for icon generations on gimp-2-10.

(cherry picked from commit 97549081fd)

Note: this commit is so far not needed on master as we don't call gegl
during build time unlike in gimp-2-10. But we could at some point.
Better to be thorough.
2020-04-13 14:55:10 +02:00
Jehan afd2b81dbf build: proper libmypaint v1 development branch is now libmypaint-v1.5.x.
Development switched to this branch since v1.5.0 release.
2020-04-13 12:25:35 +02:00
Ell 0096e563f6 app: apply "trc" setting when repeating curves and levels
In gimp_operation_config_sync_node(), when the operation has a
property of the config object's type, don't skip the other
properties.  This makes sure to set the "trc" property of
GimpOperation{Curves,Levels} according to the config object.  We'd
previously done it manually in GimpFilterTool, but the setting was
not applied when repeating the filter.
2020-04-13 02:03:40 +03:00
lillolollo 202012ba73 plug-ins: screenshot-win32.c forbids mixed declarations and code
(cherry picked from commit 09fb64c604)
2020-04-12 19:39:30 +00:00
Piotr Drąg 472069779a Update Polish translation 2020-04-12 10:32:58 +02:00
Sabri Ünal 60b6c06638 Update Turkish translation 2020-04-10 17:48:43 +00:00
Jordi Mas 6cc47a7af0 Update Catalan translation 2020-04-10 16:03:29 +02:00
Jordi Mas 32d00fd0e0 Fixes to Catalan translation 2020-04-10 14:43:09 +02:00
Jordi Mas b2f21ded85 Update Catalan translation 2020-04-09 22:17:23 +02:00
Ell 9099f317bc plug-ins: add support for exporting 16-bit PSDs
In file-psd, add support for exporting high bit-depth images.  This
is currently limited to 16-bit images, since 32-bit images seem to
have a different structure (our loading code can successfully load
32-bit images exported by the plug-in, but not actual 32-bit PSD
files saved in Photoshop.)  Higher bit-depth images are saved as
16-bit for now.

Note also that when saving a linear image with a built-in linear
profile the result is wrong (the image is exported with a linear-
TRC profile, but the data is perceptual), but this is a general
problem we have to fix, not restricted to the PSD plug-in.
2020-04-09 01:17:56 +03:00
Jordi Mas 0d4a9b7ca4 Update Catalan translation 2020-04-08 22:49:13 +02:00
Jehan de6eacd524 build: build json-c with CMake.
json-c has 2 build systems (autotools and CMake) and it seems their
autotools broke with recent changes. I will report upstream. For the
time being, we may as well switch to CMake build.
2020-04-08 21:31:57 +02:00
Jehan 809e79f37a Issue #4919: PDF: Order of pages reversed when opening and closing.
Let's go with the logics "bottom layer is first", which is also the
logics in animated formats. Hence changing the layer order on loading
multi-page PDF.
2020-04-08 20:08:00 +02:00
Ell 38059dc5fd app: rename "Fade" section of GimpFilterTool to "Blending Options"
... and GIMP_LAYER_MODE_CONTEXT_FADE to
GIMP_LAYER_MODE_CONTEXT_FILTER.
2020-04-08 15:59:33 +03:00
Ell 4932beb302 app: fix last commits 2020-04-08 01:04:29 +03:00
Ell 7b46a8be45 app: exclude GimpSettings::time property from comparison
As per last commit, explicitly exclude the GimpSettings::time
property from comparison.
2020-04-08 00:26:45 +03:00
Ell 46df3642d2 libgimpconfig: in gimp_config_type_register(), don't override GimpConfig::equal()
gimp_config_type_register() currently overrides GimpConfig::equal()
to only compare the properties of the most-derived type.  However,
this prevents the properties of GimpOperationSettings from being
considered during comparison of operation-config objects.  Instead,
don't override GimpConfig::equal(), and rely on
GIMP_CONFIG_PARAM_DONT_COMPARE to exclude specific base-class
properties from comparison.
2020-04-08 00:22:49 +03:00
Ell c5c807d191 libgimpconfig: add GIMP_CONFIG_PARAM_DONT_COMPARE flag
... which excludes a property from comparison in the default
implementation of GimpConfig::equal().
2020-04-08 00:10:42 +03:00