Commit Graph

45425 Commits

Author SHA1 Message Date
Jehan 809e79f37a Issue #4919: PDF: Order of pages reversed when opening and closing.
Let's go with the logics "bottom layer is first", which is also the
logics in animated formats. Hence changing the layer order on loading
multi-page PDF.
2020-04-08 20:08:00 +02:00
Ell 38059dc5fd app: rename "Fade" section of GimpFilterTool to "Blending Options"
... and GIMP_LAYER_MODE_CONTEXT_FADE to
GIMP_LAYER_MODE_CONTEXT_FILTER.
2020-04-08 15:59:33 +03:00
Ell 4932beb302 app: fix last commits 2020-04-08 01:04:29 +03:00
Ell 7b46a8be45 app: exclude GimpSettings::time property from comparison
As per last commit, explicitly exclude the GimpSettings::time
property from comparison.
2020-04-08 00:26:45 +03:00
Ell 46df3642d2 libgimpconfig: in gimp_config_type_register(), don't override GimpConfig::equal()
gimp_config_type_register() currently overrides GimpConfig::equal()
to only compare the properties of the most-derived type.  However,
this prevents the properties of GimpOperationSettings from being
considered during comparison of operation-config objects.  Instead,
don't override GimpConfig::equal(), and rely on
GIMP_CONFIG_PARAM_DONT_COMPARE to exclude specific base-class
properties from comparison.
2020-04-08 00:22:49 +03:00
Ell c5c807d191 libgimpconfig: add GIMP_CONFIG_PARAM_DONT_COMPARE flag
... which excludes a property from comparison in the default
implementation of GimpConfig::equal().
2020-04-08 00:10:42 +03:00
Ell d25cddae8c app: add gimpoperationsettings.c to meson.build 2020-04-07 20:11:53 +03:00
Ell ddd3199e02 app: in filter tools, remember state of the fade and color-options expanders
In GimpFilterTool, remember the last expanded state of the color-
options and fade expanders.
2020-04-07 19:40:06 +03:00
Ell 8384d37e66 app: add "Fade" options to filter tools
As per commit ed7ea51fb7, reintroduce
the "Fade" functionality for filters, by incorporating it directly
into GimpFilterTool.

Add "mode" and "opacity" options to GimpOperationSettings, and add
a corresponding "Fade" expander to the GimpFilterTool dialog
allowing to control them.

Reintroduce the FADE layer-mode context, and use it to mark the
layer modes avaialable for fading.
2020-04-07 19:40:05 +03:00
Ell c81cb59e4e app: apply common operation settings when reapplying a filter
Add a new gimp_drawable_apply_operation_with_config() function,
which takes an operation node together with a config object, and
applies the operation using the config options, including both the
operation-specific options, and the common GimpOperationSettings
options.

Use the function in gimp_gegl_procedure_execute(), so that
reapplying a filter takes the common operation settings used
originally into account.
2020-04-07 19:39:53 +03:00
Ell b4afe6e7a6 app: in GimpFilterTool, store common settings in GimpOperationSettings
Remove the common operation settings from GimpFilterOptions, and
instead, in GimpFilterTool, store these settings in the operation's
config object, which is now a GimpOperationSettings subclass, as
per last commit.
2020-04-07 19:39:51 +03:00
Ell a1ff1601ee app: add GimpOperationSettings
Add a new GimpOperationSettings class, to be used as a base class
for all operation-config types.  The class provides options common
to all operations (namely, the clipping mode, input region, and
color options), which were previously stored in GimpFilterOptions,
and were therefore bound to the filter tool, instead of being
stored as part of the operation settings; as a result, these
options would have no effect when reapplying a filter, or when
restoring a preset.

The GimpOperationSettings options do not affect the operation
node, but rather the associated GimpDrawableFilter object.  The
class provides a gimp_operation_settings_sync_drawable_filter()
function, which applies the options to the filter.

Modify all custom and auto-generated operation-config types to
derive from GimpOperationSettings, and modify the GimpConfig
functions of the former to account for the GimpOperationSettings
properties, using a set of protected functions provided by the
class.
2020-04-07 19:26:28 +03:00
Ell 8c619bf0b2 app: add gimp_gegl_node_has_key()
... which determines if a node's operation-class has a specific
key, and can be used instead of gimp_gegl_node_get_key() when only
existence is important, to avoid compiler warnings.

Update the rest of the code to use the new function.
2020-04-07 19:02:18 +03:00
Ell 9947093d02 app: use gimp_drawable_supports_alpha() in GimpDrawableFilter
... instead of GIMP_IS_LAYER()
2020-04-07 19:02:17 +03:00
Ell 0ade474286 app: use gimp_drawable_filter_get_format() in GimpFilterTool
... to set the visibility of the clipping-mode combo based on the
filter's actual output format, instead of the drawable format.
2020-04-07 19:02:17 +03:00
Ell 9aee8744dc app: add gimp_drawable_filter_get_{drawable,operation,format}()
... which return the filter's drawable, operation, and output
format, respectively.
2020-04-07 19:02:16 +03:00
Jordi Mas 3f66f2df39 Fixes to Catalan translation 2020-04-05 20:49:33 +02:00
Jordi Mas bd1326fd53 Update Catatalan translation 2020-04-05 20:24:32 +02:00
Piotr Drąg 3c10f1cfc6 Update Polish translation 2020-04-05 12:20:56 +02:00
Yuri Chornoivan c1cc5ade2e Update Ukrainian translation 2020-04-05 09:24:04 +00:00
Jehan 023919d606 app: make version + revision string translatable.
Also add some comment for translators on this string and another.
Thanks to Piotr Drąg for commenting on these.
2020-04-04 16:38:19 +02:00
Jehan 97a0ad3fec build: sync development flatpak manifest with stable one. 2020-04-04 01:10:55 +02:00
Jehan cb731fd873 app: fix drag'n drop viewable description.
In GTK+3 GIMP, without a "width-chars" even short layer names (a few
letters) were always ellipsized to nothingness with the "ellipsize"
property.
So add a reasonable prefered width char (which will be at most 10
characters, less if the layer name is smaller).

Also drop "xpad" property as this is now deprecated.
2020-04-04 00:57:40 +02:00
Jehan 291af71e95 plug-ins: do not use strcpy() when src and dest overlap.
I don't reproduce these build warnings in my build but frogonia reported
them:

> warning: 'strcpy' accessing 1 byte at offsets 0 and [0, 2147483645] may overlap 1 byte at offset 0 [-Wrestrict]

And indeed the man of strcpy() clearly states that "The strings may not
overlap" (which is clearly not guaranted in current code as we don't
know the size of what's after the substring).
strncpy() might have done the trick as it doesn't say anything about
possible overlap or not, but let's just use memmove() instead where it
is clearly written that memory areas may overlap (note that bcopy() as
proposed by ankh would have also done the trick, but it is marked as
deprecated).
2020-04-04 00:48:36 +02:00
Jehan 105c4efc8b Issue #4487: change "Save color values from transparent pixels"…
… defaults to FALSE for PNG, TIFF.
The logics is that in most case, when alpha is 0, you don't expect color
to be retrieved and some people were bothered by this when erasing data
with eraser tool or selection deletion.

For the WIP image as well as for XCF format, we definitely want to keep
color data as there are workflows where you would want to erase/unerase
pixels subtly (selection also are not binary and should not be expected
to erase color data on layers with alpha channel). So we want to keep
the non-destructive behavior there.
Yet for export formats, going for "deleting what looks deleted" is a
valid approach, especially as it has been argued that experienced users
would know how to read and change the format options (and these
experienced users are likely the ones who may have valid reasons to want
pixels with full transparency to keep color values).
PNG and TIFF were the only 2 formats where I see such options, so
changing the default for these 2 plug-ins.
2020-04-03 20:04:26 +02:00
Jehan cc16ec5f9f Issue #4904: GIMP startup SLOW due to failed access to…
… oscp-router0[12].gnome.org.

The file was opened asynchronously through g_file_read_async() but the
actually reading from a GFileInputStream was actually done in the
callback, in the main thread. So it may be possible that file is
accessible but connection is very slow or non-reliable and actual
reading would block the main process. I am assuming this is what may
have happened for this reporter.

Instead let's use g_file_load_contents_async() which does the file
opening, reading and closing all in the asynchronous task, hence would
not slow down anything even if the remote resource is unavailable or
connection is very slow.
2020-04-03 19:32:26 +02:00
Ell 6bae5d8cf7 Issue #4895 - Crash when dragging a dockable dialog
Apparently, the "drag-begin" signal of dockbook tabs can be raised
multiple times when a drag begins (this seems to happen randomly,
and rarely -- possibly a GTK bug).  In
gimp_paned_box_drag_callback(), which gets called in response, make
sure not to leak the corresponding idle source in this case, which
can lead to a segfault if the widget is destroyed before the idle
is run.
2020-04-03 20:05:13 +03:00
Ell 491dc85242 app: add missing changes to last commits 2020-04-02 19:18:04 +03:00
Ell 912b36a8f8 app: don't detroy cached data when disabling filter-tool preview
In GimpFilterTool, use gimp_drawable_filter_set_preview(), added in
the previous commit, to toggle the filter's preview, instead of
removing and re-adding the filter.  This avoids destroying cached
results when disabling the preview, allowing to quickly toggle the
preview on and off to compare the result.
2020-04-02 19:04:42 +03:00
Ell 7ec033d896 app: add gimp_drawable_filter_set_preview()
... which allows enabling/disabling the filter's preview, without
destroying cached data.
2020-04-02 18:56:02 +03:00
Ell 616530e235 app: rename gimp_drawable_filter_set_preview() to _set_preview_split()
... in preparation for next commit.

Update GimpFilterTool accordingly.
2020-04-02 18:55:18 +03:00
Ell e324e2d4b3 app: add gimp_applicator_set_active()
... which allows temporarily turning the applicator into a NOP,
without destroying cached data.

This commit also improves gimp_applicator_set_{src,dest}_buffer().
2020-04-02 18:54:18 +03:00
Niels De Graef 878804fb01 Cleanup GObject signal marshallers
* Don't generate our own marshallers if they are available in GLib
  already
* Don't set the c_marshaller parameter in `g_signal_new()` if it's a
  default marshaller provided by GLib. See commit message of commit
  39e4aa3c57 on why this is the case.
2020-04-01 21:20:01 +00:00
Jehan 6a972786d9 app: make new feature delete-pixels in Crop tool FALSE by default.
Better have the non-destructive behavior by default.
2020-04-01 21:15:03 +02:00
woob 9a9e2e9a19 app: leave locked pixels alone when cropping
Cropping tools will no longer discard layer data that falls out of the
crop region if the layer's pixels are locked
2020-04-01 18:14:20 +00:00
woob ee97c25b87 app: make deletion of cropped pixels in crop tool optional
Adds a new "Delete cropped pixels" toggle to the crop tool options,
to allow turning off the deletion of layer data that falls out of the
crop region.
2020-04-01 18:14:20 +00:00
Jehan 39890a49eb Issue #4871: Plug-ins not translated.
Revert "app: also localize LC_TIME to GUI language."
This reverts commit a4e65ac836.

LC_TIME format apparently does not accept the broader format with just
the lang part, for instance "fr". The region is necessary, like "fr_FR".
In our supported languages, we were mostly using lang only except for a
few langs where we support regional variants.
This makes sense as time format may be quite different depending on
regions (dates are quite different in GB vs US, though that was actually
one of the cases where we were using accurate locale format).

And the main issue is that it was not only breaking time localization.
Normal string localization (LANGUAGE) got somehow broken as well by
broken LC_TIME.

Anyway for now let's just stick to whatever OS-set time format (even
though it may differ from GIMP Preferences-set language defaults).
2020-04-01 18:02:42 +02:00
Jehan 56ffa2fd11 app: no generic comment when no revision comment set.
After discussing with Schumaml and Houz on IRC, let's just drop the
generic comment which may be confusing and is probably unecessary,
especially now that I write the revision number (present and new ones).
So let's just assume people understand that they should update, even
when GIMP version stays the same (this was the case I was the most wary
about, that people think the notification is an error as since they have
the last version, they don't have to update GIMP).

I hesitated to at least leave just the simple "It is recommended to
update." sentence but after much hesitation, let's go with no generic
comment at all. The download button by itself should suffice.

Of course, when a specific revision comment is set in
gimp_versions.json, it is still displayed.
2020-04-01 16:41:58 +02:00
Yuri Chornoivan 98bd6f4b61 Update Ukrainian translation 2020-03-31 06:26:09 +00:00
Brian Popow 56ec3163b5 Fix German translation (Teams-Translation-German-de-Issues-#22) 2020-03-30 22:07:20 +02:00
Jehan 8f17d0b0d1 app: remove deprecated GimpContainerGridView.
This class has been removed for nearly 2 years.
2020-03-30 20:39:54 +02:00
Jehan a55e898c96 app: GUI improvements to the update display in About dialog.
- Instead of the download link being just a link button (similar to
  browser "blue text" links), make it a proper button encompassing the
  update icon and the download text "Download GIMP X.Y.Z".
- Make also the revision number part of the download information.
- Frame title is now "Update available!" instead of "New version
  available!" (because it's not necessarily a new version, it can also
  be just a package revision. "Update" is more generic).
- When no update is available, the "Check for updates" button is big and
  has a label, and also now an icon. When an update is available, hence
  we display now a button for the download link, the "Check for updates"
  button becomes small with icon only in order not to take visual
  priority over the download itself (yet allowing to re-check for even
  newer information).
2020-03-30 20:38:13 +02:00
Yuri Chornoivan e3c9ff780a Update Ukrainian translation 2020-03-30 15:35:49 +00:00
Jehan 21e090aba5 app: display revision number in About dialog if > 0. 2020-03-30 15:44:23 +02:00
Jehan 75a03b02f4 app: let's display the release comment in update notification…
… when there is one such comment.
2020-03-30 15:37:34 +02:00
Jehan a05b085112 app: show time of last version update check.
As noted on IRC, after the first update check on a given day, it looks
like the check button does nothing. Therefore also display the check
time to clearly show the button click was taken into account (simply
there are no updates, hence only displayed check time is updated).
2020-03-30 14:52:18 +02:00
Jehan 7f3bb72c8c app: print gimp_versions.json parsing error on stderr.
Do it even on stable builds as it can help diagnose bugs on releases.
Note that the issue we had just know with casing on the build-id would
not have been seen by such stderr output anyway. Just in case for future
issues.

(cherry picked from commit dd4cec577d)
2020-03-30 14:43:41 +02:00
Tobias Ellinghaus 9908c14fbf
devel-docs: Fix id of PROP_BLEND_SPACE 2020-03-30 11:04:59 +02:00
Piotr Drąg 7ad16a4eb1 Update Polish translation 2020-03-29 13:01:02 +02:00
Yuri Chornoivan e819318b70 Update Ukrainian translation 2020-03-28 17:32:51 +00:00