Commit Graph

22479 Commits

Author SHA1 Message Date
Ell 6bd5deea89 app: add offset support to shaped gradients
In gimp:gradient, handle the "offset" property in shaped gradients.
2019-09-22 21:59:07 +03:00
lillolollo 47a8560bae Fix meson build error ../../gimp/app/widgets/gimplanguagestore-parser.c:339:33: error: #if with no expression 339 | #if ENABLE_RELOCATABLE_RESOURCES 2019-09-22 17:28:51 +00:00
Jehan d10a4cb83d app: support smooth scroll events in GimpTagPopup widget. 2019-09-22 18:57:25 +02:00
Ell 5cc289b642 libgimpbase, libgimp, app: inherit swap-compression in plug-ins
Pass the swap-compression option set in the preferences down to
plug-ins, so that they use the same swap-compression algorithm as
the main app.
2019-09-22 18:05:24 +03:00
Ell 1664ecbf1d app: add "Swap compression" option to the preferences
Add a new "Swap compression" option to the preferences, allowing
explicit control over the tile-swap compression algorithm.
Previously, control over swap compression was only possible through
GEGL command-line options/environment variables.  Since the GEGL
API to list all available compression algorithms is still private
for now, we currently only list the three predefined compression
levels -- "best performance" (the default), "balanced", and "best
compression" -- and a "none" option, to disable compression
altogether.  Selecting a custom compression algorithm is possible
by entering its name manually.
2019-09-22 17:35:14 +03:00
Ell e30a24273d app: add missing NULL in call to gimp_directory_file() 2019-09-22 17:35:14 +03:00
Jehan a2c92c576d app, plug-ins: (Win32) fix calls to ShellExecute().
This function returns a HINSTANCE (which is technically a pointer if I
understand correctly) for backward compatibility reason. But this is
actually meant to be used as an int only according to the docs.
Yet casting to gint outputs "cast from pointer to integer of different
size" warnings.
We should use intptr_t instead for such cases, since it is a type made
explicitly to hold a pointer as int, hence should always be right on any
platform.

https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea
2019-09-22 14:09:09 +02:00
luzpaz 44d10e458c Fix various typos
Found via `codespell` (v1.17.0.dev0)
2019-09-21 17:10:46 +00:00
Michael Natterer 1bca89163d libgimpbase: remove gimp_personal_rc_file()
and port its remaining users to gimp_directory_file().
2019-09-21 18:08:13 +02:00
Jehan aeaae6bff2 app: (meson) fix main executables linking when building for Windows.
The psapi library had been forgotten.
2019-09-21 14:39:42 +02:00
Michael Natterer dbd793d631 libgimpconfig: get rid of filenames in all config related APIs
and rename function names which say "gfile" to just "file".
2019-09-21 12:55:12 +02:00
Michael Natterer 693984e235 app, libgimpwidgets: use the new parasite (de)serialization API 2019-09-21 12:26:29 +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
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 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
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
Michael Natterer 8cdab31393 app, libgimpconfig: move gimp_param_spec_duplicate() to libgimpconfig 2019-09-14 17:35:32 +02:00
Michael Natterer f73f813e1f app: gimp_param_spec_duplicate(): don't warn
about unsupported GParamSpecs, simply return NULL and move the warning
to the only caller instead.
2019-09-14 12:23:13 +02:00
Michael Natterer 3f84fbee1e app: don't use the deprecated GTimeVal in file-remote.c
Use g_get_monotonic_time() instead.
2019-09-14 12:22:04 +02:00
Michael Natterer 81ff4941a0 libgimpmodule: clean up GimpModule and GimpModuleDB
- make all struct members private
- add accessors
- rename functions
- remove unused API
2019-09-13 13:11:23 +02:00
Ell 4fc345183b app, meson.build: fix a bunch of warnings in C++ files 2019-09-12 20:04:50 +03:00
Michael Natterer 7fa730b1c7 app: make tests build again after file_open_image() signature change 2019-09-12 00:05:17 +02:00
Michael Natterer 83a936b8fe pdb: rename all functions in the "plug_in" group
from gimp_plugin_foo() to gimp_plug_in_foo() for consistency.
2019-09-11 23:58:47 +02:00
Michael Natterer 6de4af4ade pdb: change paths and URIs in the "plug_in" group to GFiles 2019-09-11 23:54:53 +02:00
Michael Natterer 2fa9b8f030 pdb: forgot to change an URI to GFile in gimp_file_load() 2019-09-11 22:48:32 +02:00
Michael Natterer 77731d1e8e pdb: change the URIs in the color profile API to GFiles 2019-09-11 22:44:17 +02:00
Michael Natterer 14af676b51 pdb, libgimp: change "filename" to "file" in gimp_pdb_dump() 2019-09-11 22:37:40 +02:00
Michael Natterer 6468fa06c7 pdb, plug-ins: change gimp_temp_name() to gimp_temp_file() 2019-09-11 22:32:44 +02:00
Michael Natterer 6bca8c4f89 pdb, app, libgimp, plug-ins: replace most PDB filenames/URIs by GFile
and in an attack of madness, changes almost all file plug-in
code to use GFile instead of filenames, which means passing
the GFile down to the bottom and get its filename at the very
end where it's actually needed.
2019-09-11 21:48:34 +02:00
Michael Natterer a5ac3e45fe libgimpbase, libgimp, app: add libgimp support for passing GFiles
Which means support for GParamSpecObject with value_type ==
G_TYPE_FILE, and converting between GFile and its URI for wire
communication directly above the protocol layer.

This change requires passing a GParamSpec's value type as generic
member of GPParamDef, which in turn makes some members of its
sub-structures obsolete.
2019-09-11 21:40:17 +02:00
Ell d710e96d81 Issue #3781 - Display artifacts on HiDPI when render cache is invalidated
In GimpDisplayShell, scale the render cache by the window's scale
factor, and render its content in device pixels, instead of scaled
application pixels.  When painting the cache to the screen, unscale
the cairo context by the same factor, so that it's painted in the
native resolution.  Note that the various
gimp_display_shell_render_foo() functions still speak in
application pixels, and the scaling happens internally in
gimp_display_shell_render().

Aside from rendering at native resolution on HiDPI, this also fixes
an issue where grid-like display artifacts would appear when the
render cache was not fully validated due to the non-native scaling.
2019-09-11 21:19:26 +03:00
Salamandar c20a8b732c Enforce libbacktrace tests. Add missing dep in app 2019-09-11 18:02:15 +00:00
lillolollo a2b74147c9 Fixing error on Windors meson build 2019-09-11 17:21:17 +00:00
Félix Piédallu ba6973e791 Fix Meson some changes not pulled from Autotools 2019-09-11 17:10:47 +02:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00
Michael Natterer f3fb3d1a57 Remove the second "raw-filename"/"raw-uri" parameter from file procedures
It's an ancient concept from ancient times when we didn't have URIs
and only filenames (not to speak of GFile), and actually even from
before the ancient time before that ancient time when we first had
ones and zeros, and only had zeros.
2019-09-11 00:21:03 +02:00
Michael Natterer 6115d34fe8 Rename the "fileops" PDB group to just "file" 2019-09-10 21:38:11 +02:00
Michael Natterer 7c5cb29ca6 pdb: move the file procedure register API from "fileops" to "pdb"
because it has nothing to do with the other procedures in fileops and
only sets properties on procedures.
2019-09-10 21:24:09 +02:00
Michael Natterer fee551810b app: fix adding file procedures from pluginrc
gimp_plug_in_manager_add_to_db() used to call the PDB in order
to properly register file procedures from pluginrc. This broke
when I moved code to gimpplugin-file.c.

Instead, add gimp_plug_in_manager_add_load_procedure() and
gimp_plug_in_manager_add_save_procedure() and call them from both
gimpplugin-file.c and gimp_plug_in_manager_add_to_db(), which also has
the nice side effect that more GimpFileProcedureGroup logic gets moved
to its place in gimppluginmanager-file.c and less magic is needed in
gimpplugin-file.c.
2019-09-10 21:19:00 +02:00
Michael Natterer 56fee73441 pdb: reorder stuff in the "pdb" group to make more sense 2019-09-10 20:23:19 +02:00