Commit Graph

44671 Commits

Author SHA1 Message Date
Michael Natterer 82b11c361a libgimpconfig: add function which (de)desialize from/to a GimpParasite 2019-09-21 12:26:29 +02:00
Alexandre Prokoudine 3c1871680c Update Russian translation 2019-09-21 12:48:36 +03:00
Jehan 396d227436 libgimp: fix typo and libgimpui build.
Apart from some obvious typo, libgimpui link was failing with meson
because it now relies on a function from libgimpconfig (i.e.
gimp_config_reset()), since commit bfb7f43dbc. This fixes:
> /usr/bin/ld: libgimp/gimpproceduredialog.c:223: undefined reference to `gimp_config_reset'
2019-09-21 01:29:16 +02:00
Jehan 9ac117b143 meson: iso-codes is an optional dependency. 2019-09-21 00:27:15 +02:00
Jehan b834fdb64a plug-ins: remove unused variable.
Fix:
> ifs-compose.c:1501:20: warning: unused variable ‘style’ [-Wunused-variable]

Unused since commit b347cc73a1.
2019-09-21 00:27:15 +02:00
Michael Natterer df8d5b02ae libgimp, plug-ins: remove the "preview" parameter from gimp_ui_init()
It's dead since a looong time.
2019-09-20 19:56:00 +02:00
Michael Natterer aa41baef1e libgimp: add gimp_procedure_config_get_procedure()
and use it in gimp_procedure_dialog_new() to make sure that the passed
config was created by the passed procedure.
2019-09-20 19:33:50 +02:00
Michael Natterer f62665ad31 plug-ins: use GimpProcedureDialog in despeckle 2019-09-20 19:26:07 +02:00
Michael Natterer bfb7f43dbc libgimp: add GimpProcedureDialog, the new dialog class for plug-ins
It knows about the procedure and its config, and so far implements the
entire construction boilerplate and "Reset" on its own.
2019-09-20 19:24:40 +02:00
Michael Natterer df62d08798 plug-ins: as a proof-of-concept, port despeckle to GimpProcedureConfig
Its entire dialog and execution are now based on object properties and
widgets are views on the properties. Also add a "Reset" button.
2019-09-20 12:54:50 +02:00
Michael Natterer b441d100ff libgimp: add GimpProcedureConfig which implements the GimpConfig interface
It's the base for bringing proper management of saved settings
(including the last used values) and generated GUI using prop_widgets
to plug-ins.
2019-09-20 12:34:03 +02:00
Michael Natterer 31bf04a610 libgimpconfig: fix precondition checks in gimp_config_type_register()
check for zero pspecs or more than zero pspecs, but consistently check
both pspecs and n_pspecs.
2019-09-20 00:35:56 +02:00
Michael Natterer d52316741f devel-docs: remove duplicate </SECTION> that broke quite some stuff 2019-09-20 00:34:42 +02:00
Ell e7479cad47 app: add "show all" support to "Layer -> New from Visible"
When in "show all" mode and canvas padding is disabled, have the
"layers-new-from-visible" action create a new layer from the full
image content, rather than just the canvas content.
2019-09-19 20:24:38 +03:00
Ell 6ef21ed1f0 app: handle buffers with arbitrary origin in gimp_layer_new_from_gegl_buffer()
... by translating the layer according to the buffer's origin.
2019-09-19 20:24:37 +03:00
Ell 71f42f6675 app: add gimp_display_shell_get_canvas_pickable()
... which is similar to gimp_display_shell_get_pickable(), however,
it returns the projection, rather than the image, only when
gimp_display_shell_get_infinite_canvas() is TRUE, i.e., when the
shell is in "show all" mode *and* canvas padding is disabled.
2019-09-19 20:24:37 +03:00
Ell 7d2e872f4f app: in Rectangle/Ellipse tools, update selection when clicking inside existing one
In GimpRectangleSelectTool, when creating the rectangle widget as a
result of clicking inside an existing selection, update the
selection at the click, so that the tool's effects are applied
immediately, without having to further modify the selection.
2019-09-19 17:39:22 +03:00
Jehan fdb46684f8 app: revert `#pragma once` to macro guards in meson build.
Some change which happened with the meson port. From my research, this
`#pragma once` is not standard, though it is apparently implemented in
most common compilers.
Also apparently it is based on heuristic, hence it might happen that
file identity fails. Though unsure how often it would happen, if ever, I
don't find this very acceptable (and probably makes for hard-to-debug
bugs).

So let's revert to basic macro guards, stupid and no heuristic, which
don't ever fail and are very easy to read.
2019-09-19 13:31:22 +02:00
Rafael Fontenelle 791b2a12d4 Update Brazilian Portuguese translation
(cherry picked from commit 4bd55696ec)
2019-09-18 22:29:15 +00:00
Massimo Valentini 9f85efd825 Issue #1283 - Artifacts in filters when aux input depends on filter result
In GimpBufferSourceBox, dup the selected buffer (and flush the
pickable to make sure it's fully rendered) instead of using it
directly in the source node.  This avoids chunking artifacts when
the buffer's content depends on the filter output, such as when
using the affected layer, or a dependent projection, as input.
2019-09-18 13:16:59 +03:00
Michael Natterer 0029760e2e plug-ins: add some missing types to script_fu_marshal_procedure_call()
Scripts must be able to pass values to procedures even if they have no
idea what the actual parameter type is (item, uchar, layer mask), to
the script it's all just numbers anyway.
2019-09-17 21:42:10 +02:00
Jehan 9ebaecdffb desktop: use better wording by prokoudine in Appdata file.
Just merge a bit with the "Title: info" formatting of other items.

(cherry picked from commit dc9e147b60)
2019-09-17 19:36:50 +02:00
Jehan 46e96a413d desktop: fix the AppData release listing.
I wrote down the wrong option name (based on some Gaussian Blur specific
option). My mistake was to make a quick check in GIMP itself instead of
properly looking at the relevant commit message and code change.
Thanks to Sabri Ünal for raising this issue.
2019-09-17 13:07:12 +02:00
Jehan 5c7d6da1c3 libgimpconfig: allow gimp_config_type_register() with 0 pspecs.
There is at least one valid case of a config type registration with no
parameters: when registering the gegl:nop operation. This is the default
case when running the GEGL operation tool. See implementation of
gimp_filter_tool_get_operation().
Therefore we ended up crashing GIMP just by calling this tool.
2019-09-17 12:55:04 +02:00
Jehan 642e47efaa plug-ins: fix warning.
Fix the following warning for missing case values:
> enumeration value ‘WEBKIT_LOAD_REDIRECTED’ not handled in switch
(same for WEBKIT_LOAD_COMMITTED)
2019-09-17 11:21:19 +02:00
Piotr Drąg 8edb75d78f Update Polish translation 2019-09-16 20:35:10 +02:00
Michael Natterer ccd6f6385b libgimpconfig: turn some comments into actual docs 2019-09-16 20:24:06 +02:00
Jehan 8cdcaa4ef1 desktop: update release note in AppData.
So many exciting changes in 2.10.14, it's hard to choose what to list,
since AppData notes need to stay short. :-)
2019-09-16 12:07:35 +02:00
Michael Natterer 7c79fcc3ce libgimpmodule: annotate gimp_module_get_file() 2019-09-16 10:50:16 +02:00
Michael Natterer 3598722020 libgimpconfig: add gimp_config_type_register()
which implements a generalized (not GEGL operation specific) version
of the dynamic config type creation code from gimp-operation-config.c.
2019-09-16 10:48:32 +02:00
Michael Natterer 832e7fafc1 libgimpconfig: gimp_config_param_spec_duplicate() support GFile
object param specs.
2019-09-16 10:48:32 +02:00
Jehan ccc8224aa9 plug-ins: mask the 3 "Converts *" procedure from file-dds plug-in.
They are semantically wrong anyway because they work on drawable,
assuming that the drawable is encoded in whatever non-RGB pixel (while
getting data in R'G'B'A format). This is just an internal trick of the
file-dds plug-in which converts DDS data internally instead of having
babl doing the job by making appropriate formats.

Anyway we should definitely not expose such procedure publicly. I am not
deleting the code directly, just hiding it away in `#if 0` for now.
2019-09-16 10:41:00 +02:00
Jehan 8fa7b5bc74 tools: clean up patch from merge request !36.
Commit 283ec1da0f previously pushed had some coding style bugs, which
unfortunately couldn't be fixed before pushing because the platform
doesn't allow it and the original contributor is not available lately.
Let's fix these.
2019-09-16 09:53:24 +02:00
Sergio Jiménez Herena 283ec1da0f issue #2221: gimptool should install plug-ins into subfolders 2019-09-16 07:26:56 +00:00
lillolollo a94a286576 app: fix GStatBuf warning on gimpconfig-file.c
Fixes the following warning:
> passing argument 2 of 'g_stat' from incompatible pointer type
2019-09-15 18:08:54 +00:00
Ell c98edaf101 app: behave as if "show all" is disabled in GimpCanvasPassePartout when keeping padding 2019-09-15 16:39:03 +03:00
Ell f418ac3e2d app: behave as if "show all" is disabled in GimpCanvasGrid when keeping padding 2019-09-15 16:39:03 +03:00
Ell c9fc2862f8 app: behave as if "show all" is disabled in the navigation dockable when keeping padding 2019-09-15 16:39:03 +03:00
Ell 3cef5b52ac app: behave as if "show all" is disabled in edit/buffers/DnD actions when keeping padding 2019-09-15 16:39:03 +03:00
Ell 2d6e80b8ed app: behave as if "show all" is disabled in scroll/zoom actions when keeping padding 2019-09-15 16:39:00 +03:00
Ell 235a20b65e app: add option to keep canvas padding in "show all" mode
Add an option to keep the normal canvas padding in "show all" mode,
instead of extending the checkerboard pattern indefinitely.  This
is useful when wanting to show the image content beyond the canvas,
while still keeping the focus on the canvas; further commits will
extend this mode to behave in more view-related cases as if "show
all" wasn't enabled.

Add a new 'View -> Padding Color -> Keep Padding in "Show All"
Mode" toggle, which controls this behavior, with a corresponding
default-value option in the preferences, under "Image Windows ->
Appearance".
2019-09-15 16:32:38 +03:00
Piotr Drąg f7798bcd9a Update POTFILES.in 2019-09-15 11:26:24 +02:00
Jehan 7777c5fa0c plug-ins: port gradients-save-as-css to Python 3 + new API. 2019-09-15 10:20:11 +02:00
lillolollo b942682280 fix
```
../../gimp/plug-ins/common/file-psp.c: In function 'load_image':
../../gimp/plug-ins/common/file-psp.c:1930:25: warning: passing argument 2 of 'g_stat' from incompatible pointer type [-Wincompatible-pointer-types]
 1930 |   if (g_stat (filename, &st) == -1)
      |                         ^~~
      |                         |
      |                         struct stat *
In file included from ../../gimp/plug-ins/common/file-psp.c:44:
C:/msys64/mingw64/include/glib-2.0/glib/gstdio.h:134:31: note: expected 'GStatBuf *' {aka 'struct _stat64 *'} but argument is of type 'struct stat *'
  134 |                  GStatBuf    *buf);
      |                  ~~~~~~~~~~~~~^~~

```
2019-09-14 22:21:11 +00:00
Jehan 8e74a22ce7 tools: improve the install-* meson targets.
Continue installing the list of files to install even if a failure
occured. In particular, I encountered a problem where script-fu was
failing to install because the installed binary was being executed (and
its memory probably mmap-ed). Hence the copy failed with:

> [Errno 26] Text file busy: '/my/prefix/lib64/gimp/2.99/plug-ins/script-fu/script-fu'

Yet trying to reinstall plug-ins while GIMP is being run, hence
script-fu is being executed, is a very common development trick (for me
at least). So instead, when such an error occurs, I simply save it and
output all the exceptions in the end (where these warnings are properly
visible), instead of failing everything.

Of course, ideally the subtarget should not even try to install
script-fu as it is unchanged. This is why I changed shutil.copy() by
shutil.copy2() to install metadata, which include last access timestamp.
Maybe this could be used to decide whether the installed file is already
the last one, thus not retry, though I am actually unsure if this is
enough (on the other hand, the ultimate check of bit-to-bit comparison
may obviously be too much/slow which is counter-productive), which is
why I am not doing this change right now.
2019-09-15 00:00:35 +02:00
Jehan cf276ed972 libgimp: fix introspection of PDB functions in meson build.
PDB headers had been forgotten and therefore a whole bunch of functions
were not introspected.
2019-09-14 23:26:30 +02:00
Anders Jonsson ac8c7770d7 Update Swedish translation
(cherry picked from commit 5599dcb5a6)
2019-09-14 20:50:35 +00:00
Jehan 5495689180 plug-ins: fix Python plug-ins installation.
They were installed under $libdir/gimp/2.99/ instead of
$libdir/gimp/2.99/plug-ins/.
2019-09-14 22:39:39 +02:00
Anders Jonsson 716a996dcd Update Swedish translation
(cherry picked from commit f101f10d4c)
2019-09-14 17:37:37 +00:00
Michael Natterer 44f3630574 libgimpconfig: support more types in gimp_config_param_spec_duplicate()
It now supports all GParamSpecs possible on the wire protocol, except
the ones that are implemented in app/ and libgimp/ (image, drawable,
...) and are not visible to libgimpconfig
2019-09-14 18:29:38 +02:00