Commit graph

8044 commits

Author SHA1 Message Date
Ell
5b857dbb4b libgimpcolor, app, modules, plug-ins: remove GEGL_ITERATOR2 define
... it's no longer needed, since GEGL commit
gegl@9dcd2cde63f95a080bf16a58c10e9ffbdd99aace.

Partially reverts commits:

6fca9959c7
cc10af72cc
49c53568d7
8edbc0d491
29f63616d2
3a2014984d
ee48ec6877
4165a315d5
764085278f
b7633c722e
6ab12061b7
754a3c5b18
22b4b647bd
55b3438328
c6d23add65
f03a84d607
822f9f0d2b
95358ca1fa
cdda37f4ee
41e8035635
6761da42b2
fb5d7832a8
97ed7817d8
46e9036578
ea9c5e6a49
24fbdfb591
beb4ecb238
4b77831e03
fcf113a39c
567ffe94ff

(cherry picked from commit 053e5edc93)
2018-12-02 11:21:36 -05:00
Michael Natterer
54e93cefb3 Issue #1297 - Unhide the items hidden in the Advanced drop-down file...
...export dialogs

Remove the "Advanced" expanders from the PNG and TIFF export
dialogs. This does not reorder anything in the GUI yet, the
dialogs are still ugly.
2018-12-01 15:15:10 +01:00
Alexandre Prokoudine
70a1534842 Help menu: various updates
Commented out the inactive plug-ins registry: no point linking to a dead page.

Added links to the roadmap page, main wiki page, and the bug tracker. Placed
the link to the bug tracker one level up from '<Image>/Help/GIMP Online'
to make it more visible.
2018-11-16 03:10:33 +03:00
Jehan
84ce89a9be Issue #2501: Confusing wording in "Export Image as PDF" dialog.
Nothing said what was going to be the order of the page, except by
testing. Now there will be an explicit text, which will be automatically
updated when checking the "reverse order" box.

(cherry picked from commit afe1de950f)
2018-11-14 13:42:36 +01:00
Jehan
679e341285 Issue #2431: After coloring a selection and exporting to PDF, file...
... only shows the color (and nothing else) when "Convert bitmaps to
vector graphics where possible" was set.

This is because gimp_drawable_histogram() only checks selected pixels.
So let's make sure we work on a duplicate of the image so that we can
safely remove the selection before processing the export.
2018-11-08 15:24:42 +01:00
Jehan
911d3945eb Issue #2160: Exporting to PCX results in a warped file.
Add line data padding when necessary.
Additionally I realize we should convert to little-endian after checking
the bytesperline oddness (this bug was most likely unnoticed until now
as most desktop proc are little endian now anyway).

(cherry picked from commit 5d319b77bf)
2018-11-01 22:24:30 +01:00
Tobias Ellinghaus
7b4577a0e4
file-pnm: Remove clamping when loading PFM files
(cherry picked from commit bfcb7fc593)
2018-10-30 13:38:46 +01:00
Josef Ridky
56c8f8320d Issue #2087 - Issues discovered by coverity scan
Add missing fclose invocations and fix copy-paste issue.

This issues has been discovered by coverity scan proceeded by Red Hat.

Fixed some mistakes in the patch and added more fclose() (Mitch)
2018-10-19 11:24:48 +02:00
Ell
15767a8896 Issue #2339 - Error while executing script-fu-ripply-anim
In ripply-anim.scm, correct the edge-type argument passed to
plug-in-displace.

(cherry picked from commit 5e6e979a00)
2018-10-09 19:31:27 -04:00
ONO Yoshio
41bacb7cbc plug-ins: fix a datasourcetype does not shown in metadata-editor.
Tag of DigitalSourceType has 5 entries, but the combobox shown
only 4 items.

(cherry picked from commit 3c92b5e00b)
2018-10-02 08:49:03 +09:00
Jehan
788eb090b8 plug-ins: add more generated files in .gitignore.
(cherry picked from commit cb892aa0e6)
2018-09-29 23:18:03 +02:00
Sergio Jiménez Herena
0839a55d51 plug-ins: pygimp: Add autogenerated python files to .gitignore 2018-09-29 21:04:44 +00:00
Ell
97a29b1e9e plug-ins: in script-fu, don't query PDB procedures' info on startup
script-fu used to query the information of every PDB procedure on
startup, in order to get the number of parameters for each
procedure.  This was done so that nullary procedures were defined
in such a way as to accept (and ignore) any number of arguments
(and at least one of the scripts we ship relies on this behavior).
However, this requires expensive back-and-forth communication with
the main GIMP process, which notable slowed down script-fu's
startup, and had a non-negligible impact on GIMP's startup time.

Instead, avoid querying procedure information, and implement the
special behavior for nullary procedures at call time.  We do this
by defining, in addition to the "strict" gimp-proc-db-call
procedure, a "permissive" -gimp-proc-db-call internal procedure,
and using the latter to call the predefined PDB procedures.

(cherry picked from commit 9a2999a553)
2018-09-26 14:41:29 -04:00
Simon Mueller
1c993c44cb Issue #2179: Get rid of the win32_use_hkcu flag.
Simply always check HKCU first. If that lookup did not yield any result,
fall back to HKLM.

(cherry picked from commit 6a5023a38a)
2018-09-19 15:07:26 +02:00
Simon Mueller
fc4cb8443e Issue #2179: Make file_rawtherapee use the registry value that is...
... provided by RawTherapee's installer (version 5.5+).

See https://github.com/Beep6581/RawTherapee/issues/4783.
This patch required a small change to file_raw_get_executable_path
because the RawTherapee installer is supposed to work without admin
privileges and therefore can't write to HKLM.

Reviewer's note (Jehan): RawTherapee's installer does not add the
registry entry yet. We assume the upstream bug report will end up doing
so (someone has to make the first step!). :-)

(cherry picked from commit 829ca6583d)
2018-09-19 15:07:18 +02:00
Øyvind Kolås
ef035fb297 plug-ins: migrate pagecurl to new iterator api
(cherry picked from commit 6fca9959c7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
a5bbf913a4 plug-ins: migrate screenshot-x11 to new iterator api
(cherry picked from commit cc10af72cc)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8b3cd3057f plug-ins: migrate print-draw-page to new iterator api
(cherry picked from commit 49c53568d7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
ccf682052e plug-ins: migrate ifs compose to new iterator api
(cherry picked from commit 8edbc0d491)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
115c9070a4 plug-ins: migrate file-tiff-load to new iterator api
(cherry picked from commit 29f63616d2)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
01be5ca184 plug-ins: migrate psd plug-ins to new iterator api
(cherry picked from commit 3a2014984d)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
78b81a200a plug-ins: migrate gradient-map to new iterator api
(cherry picked from commit ee48ec6877)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
35713ad1ff plug-ins: migrate qbist to new iterator api
(cherry picked from commit 4165a315d5)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
a123c43a97 plug-ins: migrate file-png to new iterator-api
(cherry picked from commit 764085278f)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
ab1bb27129 plug-ins: compose migrated to new iterator api
(cherry picked from commit b7633c722e)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8e17056d15 plug-ins: colormap-remap migrated to new iterator api
(cherry picked from commit 6ab12061b7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
4baf61a2a0 plug-ins: border-average migrated to new iterator api
(cherry picked from commit 754a3c5b18)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
9953fe57d9 plug-ins: decompose migrated to new iterator api
(cherry picked from commit 22b4b647bd)
2018-09-18 12:36:13 +02:00
luz.paz
23648e753e Misc. typo fixes
Found via `codespell`

(cherry picked from commit 386587736f)
2018-09-17 16:05:02 +02:00
Jehan
e1cf340515 plug-ins: add the "msf1" brand for HEIF files.
After Dirk Farin had another look in the specs, it turns out that "mif1"
is actually allowed as major brand for HEIF. Also adding "msf1" which is
the equivalent for image sequences.

(cherry picked from commit 64b00b5c7f)
2018-09-16 22:56:07 +02:00
Jehan
e4bff4c801 Issue #2209: more accurate magic for HEIF files.
Just looking for "ftyp" would also match other ISOBMFF files (.mov or
.mp4 files for instance). These are the possible 4-byte "brand" code
which can follow "ftyp", as listed by Dirk Farin from libheif.

I add the "mif1" brand, as I encountered some files using this magic
(even though this should normally not be valid apparently, yet the file
loaded fine in GIMP).

This is not perfect as the standard allows potentially very big box
headers, in which case 8 bytes (the "largesize" slot) may be inserted
between "ftyp" and the brand, as I understand it. But this is actually
unlikely enough to probably never happen (the compatible brands list
would have to be huuuge, as it looks like this is the only extendable
part in a ftyp box). So let's assume this just never happens.

See also: https://github.com/strukturag/libheif/issues/83

(cherry picked from commit 4ad3993eca)
2018-09-16 22:56:07 +02:00
Jehan
e76d0941a9 Issue #2209: HEIF: Invalid input: No 'ftyp' box.
Adding a magic number for HEIC/HEIF, which would allow to discard
obvious non-HEIC images even with the wrong extension.

Note: it looks like this magic number would also match more generically
other ISO base media file format (ISOBMFF) formats, like .mov or .mp4
files. I am enquiring for better magic but for now, this is better than
nothing.

(cherry picked from commit d738d2f645)
2018-09-16 22:55:44 +02:00
Jehan
8f21c9483a Issue #1970: Python-fu missing in 2.10.4.
Do not set the interpreter to `python2` but to whatever was found by the
AM_PATH_PYTHON2() m4 macro.
It looks like the Python2 binary we ship in our DMG may be call "python"
only (without the '2'). Let's just make our code more resilient to
various builds.
I am not sure yet this is the only/actual problem for this issue on
macOS, but this is at least in the right way.
2018-08-19 12:34:00 +02:00
Jehan
55a7872e1b plug-ins: include the right python source in the distribution.
The python path with directory are generated files and should not be in
the dist. The previous commit was fixing an in-tree `make check` but
this one fixes the `make distcheck` as the dist was packaging the wrong
python files.
2018-08-18 01:14:44 +02:00
Jehan
035c785490 Issue #788: also install all python plug-ins in their own directory.
It seems I forgot to also install python plug-ins in a subdirectory
(because they are deactivated on master for the time being). I even
found a year-old patch from myself rotting in the tracker, and which was
doing exactly this.
I redid it, improved to fit changes.

(cherry picked from commit dbb9555d2f)
2018-08-16 13:25:51 +02:00
Jehan
5682a01626 plug-ins: fix individual install targets of common plug-ins.
The "rule from hell", dixit Mitch. :-)

(cherry picked from commit 2713bc4285)
2018-08-16 13:25:51 +02:00
Jehan
25f099344f plug-ins: make plug-ins inside common/ to also install in subfolders.
(cherry picked from commit d89ad95cc7)
2018-08-16 13:25:51 +02:00
Jehan
79961a6545 plug-ins: install plug-ins in subfolder.
I am going to forbid plug-ins from being installed directly in the root
of the plug-ins/ directory. They will have to be installed in a
subdirectory named the same as the entry point binary.
This may seem useless for our core plug-ins which are nearly all
self-contained in single binaries, but this is actually a necessary
restriction to eliminate totally the DLL hell issue on Windows. Moving
core plug-ins in subfolders is only a necessary consequence for it.

(cherry picked from commit 870ca6334d)
2018-08-16 13:25:51 +02:00
Jehan
c49afa4f84 plug-ins: replace s/printf/g_printf/
When cross-compiling, I got various linking errors for printf() calls:
> undefined reference to `libintl_printf'

I am unsure why, since this is not recent code, and it used to build
fine with mingw64 compilers (last I cross-built, which is many months
ago). Anyway g_printf() works fine, all necessary libs are already
linked, and it is supposed to be a synonym. So let's just go the easy
way and use g_printf() only.
2018-08-12 20:59:48 +02:00
Jehan
d1d9eb17e5 configure: GLIB_COMPILE_RESOURCES is wrong when cross-compiling.
AM_PATH_GLIB_2_0 m4 macro actually computes this value using
$PKG_CONFIG. Yet $PKG_CONFIG variable is the pkg-config tool looking for
target libraries (not host), hence it would return the executable
`glib-compile-resources` built for the target.

Also using the same variable name invalidates our test: our own
AC_PATH_PROG was never run as the variable was already set. And no
environment variable could override this test anymore either. This is
why I rename the test variable to HOST_GLIB_COMPILE_RESOURCES.
2018-08-12 19:13:13 +02:00
ONO Yoshio
34b54971d8 Fix file-pdf-save exports broken vertical text.
(cherry picked from commit f0e585e7ff)
2018-08-06 12:14:08 +02:00
Ell
dd91322ab9 Issue #1825 - PSD files are loaded as merged by default ...
... depending on UI language

Use gimp_register_file_handler_priority(), added in the previous
commit, to increase the priority of the merged PSD loader, so that
the non-merged loader is always preferred over it (unless
explicitly chosen), regardless of the UI language.

(cherry picked from commit 0320126254)
2018-07-17 03:02:57 -04:00
luz.paz
2883b8fb40 Misc. comment typos
Found via `codespell`

(cherry picked from commit 732bcb463e)
2018-07-14 21:17:19 +02:00
Michael Natterer
e747cbad6b plug-ins, pdb: remove the unsharp-mask plug-in and add a PDB compat proc
(cherry picked from commit 680642e37c)
2018-07-14 17:15:56 +02:00
Michael Natterer
9e71fc0983 Change a bazillion URLs to https://
Including all user-visible link and links called from code, like
the help pages.

(cherry picked from commit bab75b7365)
2018-07-14 14:23:42 +02:00
Michael Natterer
c4ba9c36a6 Issue #1841 - Export As... mng swaps width and height
layer_cols and layer_rows were swapped.

(cherry picked from commit 44b469e493)
2018-07-13 17:58:28 +02:00
Michael Natterer
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
Michael Natterer
cf80265411 More bugzilla -> gitlab in various files
(cherry picked from commit 8eb77376c4)
2018-07-11 22:26:53 +02:00
Michael Natterer
7a49f59021 plug-ins: need to initialize "name" now in file-pat.c
(cherry picked from commit 34a0c36602)
2018-07-07 10:51:05 +02:00
Michael Natterer
f46cf260c5 Issue #1730 - pat file that crashes gimp-2.10
Introduce GIMP_PATTERN_MAX_SIZE (10000) and GIMP_PATTERN_MAX_NAME (256)
and validate pattern dimensions and pattern name length against them.

Add GIMP_BRUSH_MAX_NAME and validate that too.

Also make sure that the names are properly terminated, and some
cleanup.

(cherry picked from commit 9b56ca8c1d)
2018-07-06 13:11:57 +02:00
Michael Natterer
cd5e1470c9 app, plug-ins: move GIMP_BRUSH_MAX_SIZE to gimpbrush-header.h
and use it in the brush file plug-ins.

(cherry picked from commit 8195a56261)
2018-07-06 13:11:49 +02:00
Michael Natterer
b9272f8b5e app, plug-ins: clean up gimpbrush-header.h and gimppattern-header.h
Namespace the header structs, s/GBRUSH/GIMP_BRUSH/,
s/GPATTERN/GIMP_PATTERN/.

(cherry picked from commit e759ce3558)
2018-07-06 13:11:41 +02:00
Jehan
ee25bfc8bd libgimpbase: add gimp_pixpipe_params_free().
And use it where appropriate. A public API asking you to know the
internals of your code is a bad idea.
2018-06-27 18:37:20 +02:00
Jehan
e96b05beed plug-ins: lookup WMF fonts on same prefix when relocatable bundle.
When ENABLE_RELOCATABLE_RESOURCES is set, override libwmf fontdir. This
is actually an alternate version of MR !9 by Alex Samorukov assuming a
bundled GIMP on a single prefix rather than depending on an environment
variable.
This especially makes the relocatable feature more discoverable (rather
than some random environment variable for which you'd need to read the
code to discover it then make some wrapper script for GIMP).

(cherry picked from commit 4ff856f68d)
2018-06-27 04:40:02 +02:00
Michael Natterer
9c1f6bfc16 Issue #1678 - CWE-120 - Don't use strcpy()
Use strncpy() instead.

(cherry picked from commit a58fe8963a)
2018-06-19 15:39:26 +02:00
Ell
d49e038ed3 plug-ins: add support for loading merged image data from PSD files
PSD files may include a "merged", pre-composited, version of the
image (in Photoshop, this is the case when saving files with
"Maximize Compatibility" enabled; GIMP always saves the merged
image data in exported PSD files.)  This commit adds support for
loading the merged image version from PSDs, instead of the full
layer hierarchy.  This is useful when loading PSD files that use
features that we don't currently support, and therefore can't
render correctly, such as adjustment layers.

When loading the merged image version, we avoid loading certain
additional data from the file, such as channels, paths, and
guides, while still loading metadata, making this akin to loading
other "flat" image formats.

This option is currently exposed as an additional file type
("Photoshop image (merged)"), which has to be explicitly selected
from the file-type list when opening the image.

(cherry picked from commit 1d9a8a91ab)
2018-06-18 06:34:41 -04:00
Michael Natterer
1663e63717 libgimp: forgot to deprecate gimp_gamma() 2018-06-18 02:59:24 +02:00
Jehan
8df6f4c8a6 plug-ins: clearer plug-in-screenshot parameter description.
Our plug-ins have no "optional" parameters per-se. Clarify the
description to make explicit that the last 4 parameters are simply only
taken into account when the shoot type is SHOOT-REGION.

(cherry picked from commit 3a0c03a61c)
2018-06-17 22:17:22 +02:00
Michael Natterer
1779826da9 Issue #1611 - plug-in-screenshot does not work in non-interactive run mode
Turn the boolean "root" argument into enum ShootType and reorder that
enum to { WINDOW, ROOT, REGION } so that the "0", and "1" values match
the former boolean. Adapt parameter checking accordingly so that
callers without optional arguments (e.g. script-fu) can call all the
plug-ins's features.

(cherry picked from commit d94b954c2a)
2018-06-17 20:59:04 +02:00
Salamandar
a42746c71d Specify utf-8 for rc file.
(cherry picked from commit 02edd1c8eb)
2018-06-16 03:50:14 +02:00
Salamandar
c176b0888e Fix encoding. The world should be utf-8.
(cherry picked from commit 8feb51954b)
2018-06-16 03:50:14 +02:00
Félix Piédallu
2265701268 Fix Python files:
* Prefer python2 to python that may point on python3 on modern installs.
* Fix indent/spaces consistency.
2018-06-16 02:49:54 +02:00
Jehan
769325e51b plug-ins: recognize "python2" env to launch the python interpreter. 2018-06-16 02:49:54 +02:00
Jehan
03ea9cac54 m4macros, plug-ins: run more accurately the "python2" interpreter.
Our configure test checks the presence of a Python2, but then uses
"python" as interpreter, which is a problem nowadays as the default
python is set to be Python 3 on some distributions (and this will be
more and more the case). So GIMP may end up trying to run our plug-ins
through Python 3 (which would fail) even if Python 2 is present.
Now AM_PATH_PYTHON2() m4 macro will set $PYTHON to a more accurate
Python version as priority.

Similarly let's use "python2" in the binfmt string for extension search.
2018-06-16 02:05:08 +02:00
Jehan
130ef5ce59 Issue #248: Python console doesn't support input()/raw_input().
As noted by Massimo, we can just make the argument of raw_input() an
optional argument.

Also adding a modal implementation for input() so that it doesn't lock
the Python console waiting from input from the plug-in stdin. As noted
in Python doc, input() is equivalent to `eval(raw_input(prompt))`.
Not all that safe, but in the end, it is the developer's responsibility.
2018-06-15 18:34:57 +02:00
Simon Mueller
aac958607d plug-ins: use g_fopen(filename, "w+b")...
...because g_fopen(filename, "wb+") fails on Windows.

(cherry picked from commit 541f730f44)
2018-06-15 11:02:24 +02:00
Michael Schumacher
73c67d9612 plug-ins: use g_fopen(filename, "w+b") instead of "wb+" to fix SGI format export on the Microsoft Windows platforms
(cherry picked from commit c93727e791)
2018-06-15 08:06:25 +00:00
Jehan
5b628d422f plug-ins: add busy-dialog plug-in in plugin-defs.pl.
Introduced in commit 032e95fad6, Makefile.am was apparently directly
edited instead of plugin-defs.pl. This also fixes a typo:
s/bust-dialog/busy-dialog/

(cherry picked from commit 4117c98655)
2018-06-14 03:25:41 +02:00
Michael Natterer
738bf71200 Issue #1634 - PNG image opens as a blank one in GIMP
Set the libpng error_fn to NULL *after* png_read_end() not before.
png_read_end() can throw errors and we recover what's partially loaded
from an image in the error handler.

(cherry picked from commit db08271d16)
2018-06-13 19:09:51 +02:00
Michael Natterer
d76a6e8c11 plug-ins: pack the file-heif load dialog's icon view cells manually
There is something broken in the obscure "text_column" and
"pixbuf_column" code in GtkIconView, and I don't have the nerve to
debug it.

Enable opening an image on activation (double click).

(cherry picked from commit 625aa514f6)

(picking the icon view change was not neccessary but this plug-in will
get more updates so let's keep the code in sync)
2018-06-12 18:36:47 +02:00
Michael Natterer
6125d225ac plug-ins: put file-heif's icon view into a scrolled window 2018-06-12 13:34:24 +02:00
Michael Natterer
3b007f70f0 plug-ins: undeprecate file-heif but only as much as can be merged to 2.10
(cherry picked from commit afd4045866)
2018-06-12 13:26:40 +02:00
Michael Natterer
40c24dc3d0 Issue #1627 - Non-existing item ID error when loading multiple-image HEIFs
Accidentially killed a line when importing the plug-in.

(cherry picked from commit 1dee517bc9)
2018-06-12 12:58:37 +02:00
Ell
3c9d513be9 Issue #1621 - Alpha incorrectly exported in PSD
In file-psd, fix the creation of the "merged" image data, saved in
PSD files along with the actual layer data.

(cherry picked from commit 8a01866af0)
2018-06-11 21:05:23 -04:00
Ell
b6ecaad275 plug-ins: increase input precision in guides-new-percent.scm
Increase the percision of the "position" property of
guides-new-percent.scm to two decimal places.  Currently, it only
accepts integers, which limits its accuracy to 100px.

(cherry picked from commit 8e6a5298c1)
2018-06-01 10:53:51 -04:00
Jehan
0da0f8ff46 plug-ins: renaming Win32 implementation files to follow namespacing.
(cherry picked from commit ff6d7a7550)
2018-05-30 12:15:33 +02:00
Gil Eliyahu
1a5b28b51d Issue #1458 - Small border on side of single-window screenshot on...
... Windows.

Reviewer note (Jehan): I have not built on Windows because I need to
refresh my crossbuild environment, but it looks sane enough, and Gil
previously did good patches. I push as-is, hoping it still builds fine
on Windows. :-)

(cherry picked from commit 2caa400a96)
2018-05-30 12:15:27 +02:00
Ell
f542d839f5 plug-ins: add busy-dialog plug-in
This plug-in is used internally to show an interactive dialog in a
separate process, while the main process is blocking waiting for an
operation to complete.  The dialog shows a custom message in a
GimpBusyBox, and potentially a "cancel" button, allowing the
operation to be canceled.  Communication with the main process is
performed through a pair of file descriptors, passed to the plug-in
as arguments.
2018-05-29 16:07:48 -04:00
Jehan
a2902790cc plug-ins: fix Windows distribution.
"magnification-api-win32.h" was not included in the dist!
Note that I know that alphabetical order is wrong. I am planning to
actually change the name of the file (more in line with other filenames)
but I am waiting to finish a review of another patch from Gil before
doing so. So just let it as-is for now! ;-)
2018-05-20 23:19:44 +02:00
Michael Natterer
d35fecceb4 configure.ac: remove the option to disable script-fu
Forgot to do this for 2.10.0.
2018-05-18 13:06:24 +02:00
Thomas Manni
806d260601 script-fu: in weave, improve context and undo management
Use a gimp-context-push/pop at the beginning/end of the script
to keep the current context unchanged.

Add undo support for the whole procedure.
2018-05-16 21:44:30 +02:00
Jehan
9fb1c28687 plug-ins: properly free rectScreens after allocating it.
Also avoid global variables when possible. We can just use the data
variable of EnumDisplayMonitors() which will be passed on to the
callback. This is not perfect yet since rectScreensCount is still
global, but let's go for it for now.
2018-05-16 00:39:46 +02:00
Jehan
e357e7118c plug-ins: fixing various compilation warnings.
Mostly warnings about wrong types for some function parameters.
There is still a single warning remaining about ignoring the #pragma
macro, but I am not sure what to do about this warning. Apparently it is
something specifically for use with Visual Studio. We don't need this,
but since the contributor uses it, let's keep it.
2018-05-16 00:39:46 +02:00
Jehan
382d6c8ad5 plug-ins: put the initial foreground window back after a screenshot.
This was lost in commit 966843564d. It's not a big deal since this code
path would only happen when the capture using magnification API fails,
yet we may as well make it perfect.
Also taking the opportunity to change the return type to gboolean for
the various capture functions (though it is technically the same,
semantically we were returning success boolean).
And removing a comment which had been duplicated and left at a the wrong
place.
2018-05-16 00:39:10 +02:00
Jehan
a0b28589ac plug-ins: properly load user32.dll for SetProcessDPIAware().
Using similar code as other parts of Win32 code.
I hope I am not doing anything wrong. At least now it builds!
2018-05-16 00:39:10 +02:00
Gil Eliyahu
ae93b6db18 Plug-ins: fix screenshot bugs in windows.
This fixes bugs 793722 and 796121.
In particular it fixes:
- Single-window screenshot when partly off-screen or covered by another
  window.
- Screenshots when display scaling is not 100%.
2018-05-16 00:39:10 +02:00
Thomas Manni
d01bf70f86 script-fu: in slide, use an undo group when working on the initial image 2018-05-15 17:58:11 +02:00
Thomas Manni
316adffaae script-fu: in fuzzy-border, add undo support for the whole procedure 2018-05-15 17:36:27 +02:00
Thomas Manni
9c547e7d71 Bug 795958 - Effect (like "old photo") does not group undo information properly
When working on the current image, enclose the script actions in an undo group.

When working with a copy of the image, disable the undo stack of the new image
at the beginning of the script and reenable it at the end.
2018-05-15 11:40:08 +02:00
Ell
4d4881fe83 plug-ins: in selection-to-path, use sampler object ...
... instead of gegl_buffer_sample()

Ditto.
2018-05-13 19:40:46 -04:00
Ell
2d421d7f07 plug-ins: in smooth-palette, use sampler object ...
... instead of gegl_buffer_sample()

Ditto.
2018-05-13 19:40:46 -04:00
Ell
eece91eb06 plug-ins: in file-html-table, use sampler object ...
... instead of gegl_buffer_sample()

Ditto.
2018-05-13 19:40:46 -04:00
luz.paz
69b2e84924 Source and trivial typos
Found via `codespell` and `grep`
2018-05-12 23:44:47 +02:00
Jehan
9d9e9c707e plug-ins: minor cleanup.
In particular tabs were left out in the new file-heif plug-in.
2018-05-11 23:29:40 +02:00
Jehan
05145f44f2 plug-ins: set appropriate status when file-heif's load_image() fails.
Current code was only taking into account cancelation, so we could end
with weird plug-in return:

> HEIF/HEIC plug-in returned SUCCESS but did not return an image

Instead properly set an error status, and echo back the error from the
plug-in or libheif.
2018-05-11 22:48:23 +02:00
Ell
7540ce779d Bug 795716 - Wavelet Decompose takes too long to group layers
Use gimp_image_{freeze,thaw}_layers(), added in the previous
commit, to suppress updates to the Layers dialog while constructing
the decomposed layers, which significantly speeds up the operation
if the dialog is mapped.
2018-05-07 02:56:10 -04:00
Simon Budig
5a048f5b5d imagemap: fix invalid source removal 2018-05-05 20:01:57 +02:00
Michael Natterer
b706eaf002 plug-ins: enable metadata loading in file-heif
Do it half-manually for now. Also, there doesn't seem to be metadata
saving API in libhaif.
2018-05-05 14:38:27 +02:00
Michael Natterer
15b9bb1581 plug-ins: port file-heif to GIO 2018-05-05 12:53:39 +02:00
Michael Natterer
7e3fa0c8d8 plug-ins: port file-heif to GEGL, and don't use any deprecated API 2018-05-04 21:14:23 +02:00