Commit Graph

43651 Commits

Author SHA1 Message Date
Michael Natterer 998bd04bd4 Issue #3599 - Crash when creating channel
Must use a GIMP_TYPE_ACTION_IMPL in GimpColorPanel, not just a
GIMP_TYPE_ACTION which is only an interface now.
2019-07-02 16:52:03 +02:00
Michael Natterer b9d47f2d1f app: change all action callback signatures to use GimpAction
instead of GtkAction, which is correct now because all our actions
implement the GimpAction interface.
2019-07-02 16:12:18 +02:00
Michael Natterer 738c035839 plug-ins: fix two harmless compiler warnings 2019-07-02 15:22:52 +02:00
Jehan 8ccd49ac78 Issue #3597: Free selection: CRITICAL when double clicking on a handle.
GIMP_BUTTON_PRESS_DOUBLE press event would be called before the second
release event happens hence the tool control would not be properly
halted. Just pass through the gimp_selection_tool_start_edit() check for
any press events other than GIMP_BUTTON_PRESS_NORMAL.
2019-07-02 15:21:05 +02:00
Michael Natterer f20b873396 app: fix some warnings in gimpactiongroup.c
They were not deprecation warnings, just hidden between them.
2019-07-02 14:40:30 +02:00
Michael Natterer 86e07c16b5 app: start porting away from GtkAction and friends
Step one: get rid of all those deprecation warnings that make
it hard to see any other warnings:

- add a lot of dummy API to GimpAction, GimpActionGroup, GimpUIManager
  etc. which simply forwards to the deprecated GTK functions, they
  will all go away again later
- rename GimpAction to GimpActionImpl
- add interface GimpAction that is implemented by all action classes,
  creates a common interface and allows to remove some duplicated
  logic from GimpToggleAction and GimpRadioAction, and at the same
  time adds more features
2019-07-02 14:21:32 +02:00
Jehan f4af95ab95 plug-ins: some cleaning in HEIF plug-in.
heif_chroma_interleaved_24|32bit are deprecated values replaced by
heif_chroma_interleaved_RGB(A).

Also we allocated a HEIF context twice (i.e. leaking it).

Finally it's better to initialize heif_image and heif_encoder variables
to NULL because these may not be set if creation functions fail (and
it's better to fail with NULL than with garbled unset contents).
2019-07-01 19:28:43 +02:00
Jehan 7f76430090 plug-ins: improve a bit HEIF export dialog.
- Add the quality slider in a frame under the "lossless" checkbox,
  making the relationship more obvious.
- Make the whole frame contents insensitive when "lossless" is checked
  and not just the slider. Once again, it makes the relationship more
  obvious.
- Add a mnemonic to the "Lossless" checkbox and "Quality" slider.
2019-07-01 16:57:22 +02:00
Jehan dfd79ad79b plug-ins: add a "Save color profile" checkbox in HEIF export. 2019-07-01 16:39:13 +02:00
Jehan 5d6baf5f85 plug-ins: implement our profile export policy for HEIF.
Same as WebP or jpeg: follow explicitly assigned profile TRC; convert
default (non-assigned) profile to sRGB, except if work format is 8-bit
linear.
2019-07-01 15:36:59 +02:00
Jehan 1370112ac2 plug-ins: improved space invasion in HEIF export. 2019-07-01 00:35:49 +02:00
Jehan ee9be7fe39 plug-ins: space invasion in WebP export. 2019-07-01 00:13:18 +02:00
Piotr Drąg b274789747 Update Polish translation 2019-06-30 15:35:37 +02:00
Massimo Valentini 6c033317ac issue 3082: screenshot plugin crashes when cancelling...
...the interactive capture dialogue
2019-06-29 18:10:23 +02:00
Jehan 667b4d71c9 libgimp, plug-ins: get rid of GIMP_EXPORT_NEEDS_OPAQUE_LAYERS capacity.
This new capacity was created just 3 commits ago (9933f46f85).
The point was that the real fix is to remove the implication
HANDLE_LAYERS => HANDLE_ALPHA, but this breaks public API behavior,
which is why I didn't go with it.

Still it just felt wrong to add a NEEP_OPAQUE capability when it should
be the same thing as not setting HANDLE_ALPHA. After discussion on IRC,
we decided that this implication was basically a bug, and since in all
core plug-ins, when HANDLE_LAYERS was set, we were also setting
HANDLE_ALPHA, no core plug-in code even has to be changed. As for
third-party plug-ins, let's assume that none has been relying on this
wrong assumption.
2019-06-29 17:08:06 +02:00
Michael Natterer e72a9d88a5 app: get rid of manual object type registration
and all deprecated use of private instance registration.
2019-06-29 16:41:41 +02:00
Michael Natterer 88188cba0c libgimpwidgets: don't use g_type_class_add_private() in GimpColorButton
and switch to using G_DEFINE_TYPE_WITH_CODE().
2019-06-29 16:14:53 +02:00
Jehan 7a73e9e76c plug-ins: set "Save layers" toggle unsensitive for single-layer images. 2019-06-29 14:57:04 +02:00
Jehan f9fd818c3d Issue #3553: Cannot export TIF as G3/G4 fax compression.
G3/G4 compression does not support transparency, yet in multi-layer
export, gimp_export_image() capability GIMP_EXPORT_CAN_HANDLE_LAYERS
implied GIMP_EXPORT_CAN_HANDLE_ALPHA. I guess multi-layer TIFF is more
for multi-page (at least with G3/G4 which is apparently a fax format, so
it makes sense) than actual multi-layer.

So I use the new GIMP_EXPORT_NEEDS_OPAQUE_LAYERS capability from
previous commit for this particular use case of export layers + G3/G4
compression.

Also it is better to run gimp_export_image() *after* the option dialog,
as we do for other formats, with variable capabilities depending on
which options was chosen, instead of running it before then after
merging layers when user chose not to export layers. This is duplicating
the purpose of gimp_export_image().
2019-06-29 14:33:03 +02:00
Jehan 9933f46f85 libgimp: add GIMP_EXPORT_NEEDS_OPAQUE_LAYERS export capacity.
Currently capability GIMP_EXPORT_CAN_HANDLE_LAYERS implies
GIMP_EXPORT_CAN_HANDLE_ALPHA. Though in many cases, multi-layer implies
alpha for basic compositing, our export plug-ins sometimes use the
concept of "layer export" for multi-pages or collection files.
Additionally sometimes alpha may not even be supported at all whereas
layers are. This will be the case in the next commit which will make use
of this new capability.
2019-06-29 14:08:41 +02:00
Michael Natterer cf8148df5e Issue #3093 - Invalid characters in Open Location dialog crashes GIMP
file_open_location_response(): guard against g_file_new_for_uri()
returning NULL (which it shouldn't) and an error being NULL (which it
shouldn't either for the same reason). Spotted by Massimo.
2019-06-29 13:16:43 +02:00
Michael Natterer 382fe030ce libgimp: forgot to deprecate gimp_drawable_preview_draw_region() 2019-06-28 19:31:07 +02:00
Michael Natterer 267d925025 plug-ins: port nl-filter to GEGL, 8 bit only 2019-06-28 19:25:31 +02:00
Michael Natterer c1f2973232 plug-ins: port film to GEGL 2019-06-28 18:40:41 +02:00
Michael Natterer 928b85d25c app: add gegl:bayer-matrix and gegl:linear-sinusoid to the menus
in Filters -> Render -> Pattern. Also depend on GEGL from git.
2019-06-28 15:48:47 +02:00
Michael Natterer a3e2dda8c7 plug-ins: port fractal-explorer to GEGL, 8 bit only 2019-06-28 13:03:45 +02:00
Michael Natterer be411a58a7 plug-ins: port flame to GEGL, 8-bit only 2019-06-28 12:37:26 +02:00
Michael Natterer 61013c392c libgimpbase: remove gimpdatafiles.[ch], it's deprecated and now unused 2019-06-28 12:02:31 +02:00
Michael Natterer 6078312bf2 plug-ins: replace gimp_datafiles_read_directories() by GFileEnumerator
in fractal-explorer and gradient-flare.
2019-06-28 11:49:58 +02:00
Hannie Dumoleyn 6f9e88149e Update Dutch translation
(cherry picked from commit 2d9539ed79)
2019-06-27 15:59:44 +00:00
Hannie Dumoleyn 8914353b9e Update Dutch translation
(cherry picked from commit 88b7e42f0b)
2019-06-27 15:57:23 +00:00
Jehan 1a1623784f plug-ins: plug-ins: get space from the profile in PNG export too. 2019-06-27 16:20:53 +02:00
Jehan b0bb456563 plug-ins: get the export space from the profile. 2019-06-27 15:57:00 +02:00
Michael Natterer eec6a385d9 libgimp: remove gimp_drawable_get_tile2()
is was deprecated and is now unused.
2019-06-27 13:56:33 +02:00
Michael Natterer d5ac62c6eb pygimp: argh... 2019-06-27 13:46:55 +02:00
Michael Natterer 61fe89ad02 pygimp: replace gimp_drawable_get_tile2() by gimp_drawable_get_tile() 2019-06-27 13:45:09 +02:00
Michael Natterer 86c2982fe1 libgimp: remove gimp_drawable_get_color_uchar()
it was deprecated and now unused.
2019-06-27 13:41:14 +02:00
Michael Natterer 4c7a43d234 plug-ins: replace gimp_drawable_get_color_uchar() by manual code 2019-06-27 13:37:04 +02:00
Michael Natterer 4c4abf7fc4 plug-ins: port blinds to GEGL
Found another unfinished result of boredom from years ago.
Stupid 8-bit only port.
2019-06-27 13:23:31 +02:00
Michael Natterer c3752ba743 Issue #3435 - GIMP encountered an error: GIMP-CRITICAL:...
...gimp_size_entry_set_resolution: assertion 'GIMP_IS_SIZE_ENTRY (gse)'
failed

In gimp_tool_options_manager_tool_changed() make sure the new tool's
tool options GUI always exists, so tools can access it even if the
tool options dockable is not currently open.
2019-06-26 18:53:22 +02:00
Michael Natterer 57ac8cfa7e plug-ins: port jigsaw to GEGL
Found in my stashes, I have no idea why I even bothered but it just
needed a minor fix to work, so here we go. Stupid port that always
uses 8 bit and kills higher bit depths.
2019-06-26 17:26:53 +02:00
Michael Natterer 06e0ca8ef0 plug-ins: fix comment typo in file-png 2019-06-26 17:26:06 +02:00
Michael Natterer b07975aa88 plug-ins: cleanup, copyright headers, formatting in the openexr-wrapper 2019-06-26 16:56:12 +02:00
Michael Natterer f7413d70dd plug-ins: improve JPEG and EXR comment validation
If the comment doesn't UTF-8 validate, leave valid UTF-8 at the
beginning intact. Also fix character range comparison to use guchar
instead of gchar
2019-06-26 16:51:26 +02:00
Michael Natterer 4c58386ead app: allocate GimpCurve's points with g_new0() and not just g_new()
so gimp_curve_equal() doesn't fail on random uninitialized padding
bits. Fixes finding previously used settings in the curves tool (they
were piling up just by re-applying a previously used setting).
2019-06-26 16:24:29 +02:00
Michael Natterer 0afcaefec5 Issue #3503 - Display Preset names on Filter Dialogs
Don't clear the preset combo right after a preset was selected.
Instead, clear it as soon as any change is made to the settings in the
dialog. This way the last chosen preset's name stays in the combo as
long as the current settings are identical to the preset.
2019-06-26 14:53:43 +02:00
Michael Natterer e2bacf918c plug-ins: improve/fix metadata handling in file-exr
Use gimp_image_metadata_load_finish() and pass the right flags
depending on whether comment and profile were loaded. Also, set the
profile before creating the layer so its space is correct
automatically.
2019-06-25 17:55:49 +02:00
Michael Natterer 4c41f185e2 plug-ins: space invade file-jpeg
Use the drawable's space for the load/save formats to avoid unwanted
color conversions. Also cleaned up the loading code a bit, it was
doing weird duplicated stuff for the preview and !preview cases.
2019-06-25 14:05:30 +02:00
Michael Natterer c356564984 plug-ins: space invade file-heif
Use the drawable's space for the load/save formats, to avoid unwanted
color conversions.
2019-06-25 13:53:44 +02:00
Michael Natterer 62f010df90 configure.ac, plug-ins: make file-heif build with older libheif again
Lower requirement to 1.3.2 and check for 1.4.0 separately. Put color
profile code in #ifdef HAVE_LIBHEIF_1_4_0.
2019-06-25 13:20:07 +02:00