Commit Graph

22467 Commits

Author SHA1 Message Date
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
Michael Natterer 21ff9999e4 app: remove gimppluginmanager-file-procedure.[ch]
and merge it into app/plug-in/gimppluginmanager-file.c, it's used from
nowhere else.
2019-09-10 20:20:40 +02:00
Michael Natterer ff9b469808 app: move the file procedure registering functions into gimpplugin-proc.c
They are simply setting properties on GimpPlugInProcedures, just like
the other functions in gimpplugin-proc.[ch], so there is no reason to
have them elsewhere and with worse checks and error messages.
2019-09-10 20:05:27 +02:00
Ell 1b3c1fb9cb app: fix CRITICAL in GimpNavigationEditor
... after commit 2c9a8a567b.  Don't
use the same function as a handler for GimpContext::display-changed
and GimpContext::image-changed -- their signatures are different.
2019-09-10 17:55:58 +03:00
Jehan b73519830e app: gimp-register-magic-load-handler renamed in a previous commit.
Cf. commit 0745043ddb.
2019-09-10 15:03:28 +02:00
Ell 2c9a8a567b app: clear navigation editor when last image is closed
In GimpNavigationEditor, make sure to clear the editor's shell when
the last image is closed, even though the corresponding display is
stil alive, so that we don't needlessly extend the lifetime of the
image.  This is necessary after the recent GimpImageViewable
changes, since the editor now (indirectly) holds a reference on the
image.
2019-09-10 15:15:42 +03:00
Michael Natterer 0745043ddb pdb, libgimp: remove _gimp_register_load_handler()
and rename _gimp_register_magic_load_handler() to
_gimp_register_load_handler().
2019-09-10 12:29:17 +02:00
Michael Natterer b1683ce692 app: remove all check for the <Load> and <Save> menu prefixes
they are an ancient concept not supported any longer.
2019-09-10 12:14:57 +02:00
Félix Piédallu 46f706a403 [libgimp,app] add missing includes for windows 2019-09-09 18:15:13 +00:00
Sabri Ünal a60ac57207 Missing mnemonics on several file dialogs
This path corrects missing mnemonics on several save/open/export dialogs.

save: file
open: file, dds, fits, tiff
export: bmp, dds, fli, gbr, gih, mng, pat, pnm, pdf, raw, sunras, sgi, webp
2019-09-09 18:06:29 +00:00
Michael Natterer a88aa27942 app: use GError in all gimpplugin-proc.[ch] functions, not gimp_message() 2019-09-09 12:10:32 +02:00
Michael Natterer bde70bcdab pdb: avoid duplicate argument names in gimp-plugins-query
Also rename all arguments to make more sense.
2019-09-09 01:51:33 +02:00
Michael Natterer 41fa670434 Rename all "nparams" and "nreturn_vals" members in the wire protocol
to "n_params" and "n_return_vals".
2019-09-09 01:00:54 +02:00