1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

4465 Commits

Author SHA1 Message Date
Jehan
1651e6e767 configure: release GIMP 2.10.36. 2023-11-05 23:20:50 +01:00
Jehan
68ba85b682 desktop: update release date in AppStream data. 2023-11-05 23:19:22 +01:00
Jehan
50ea6ac64e NEWS: update. 2023-11-05 22:40:13 +01:00
Jehan
2748cf8e23 README: sync with master branch (when relevant).
This is in part a backport of commit 6b86bb72f0, and a bit more.

In particular the mailing lists were still pushed forward (even though now
unusded for months!), and there was even a mention to the registry (which is
dead for years!).
2023-11-05 22:29:47 +01:00
Jehan
024e3c7495 Issue #9994: backport of gtk!5645 to avoid error messages with recent GLib.
These 3 patches should be included with our self-built GTK.
2023-11-05 22:09:47 +01:00
Jehan
b991f8b361 plug-ins: prevent explicit http scheme to be automatically changed to https.
This completes commit 685c8bde99 where the http:// scheme was automatically
transformed into https:// in some cases, in particular while typing (when
pasting for instance, it was still possible to add an http URL). So let's block
"toggled" signal handlers when the URL is explicitely edited to prevent this
annoying issue.
2023-11-05 21:53:54 +01:00
Alx Sa
100c668255 scripts: Fix brush crash on file-gbr-save call
Resolves #6485.

The file-gbr-save procedure call was changed to require non-empty "raw-uri" strings.
The brush creation and select-to-brush scripts are still sending empty strings for that parameter.
This patch fixes the issue by reusing the filename parameter, as the paste-to-brush script does.
2023-11-05 19:40:15 +00:00
Jehan
e448309563 Issue #3247: make consistent generated brush preview.
This is only a temporary solution meant to be backported to gimp-2-10 branch,
so that at least the preview now matches how angles always worked in at least
the 2.10 series: angles are measured clockwise.

Now there is the question that in the documentation of the Brush Editor, it is
written that angles are supposed to be counter-clockwise. A solution was
proposed to make them so, but only for generated brushes (whereas angles stayed
clockwise for other types of brush) which is a very bad inconsistency.
Furthermore I find the whole tool options vs. brush editor settings mess quite
confusing. Some decision should be made for GIMP 3.

For GIMP 2.10 though, this should be an OK fix: no behavior change on-canvas,
only making the preview actually match what happens on-canvas (even though it
goes against what the docs say but it's probably better than breaking workflows
relying on actual on-canvas behavior).

Note: this commit is based on an initial proposition by Alx Sa in MR !1119,
except that the patch was only working when the preview needed to be scaled.
Instead we must go through this brush transformation code path for generated
brushes, whatever the scale.

(cherry picked from commit eb7337d5e4)
2023-11-05 19:20:31 +01:00
Alx Sa
685c8bde99 plug-ins: Recognize https:// in ImageMap plug-in
This adds "https://" as a valid website prefix in the ImageMap URL edit
field, in addition to http://.
It also restores the prefix change that 2.10 had when you switched URL
types. It also fixes code formatting in affected areas.

(cherry picked from commit 6d02eb4505)
2023-11-05 15:42:53 +01:00
Sabri Ünal
ec0ecf61b7 Update Turkish translation 2023-11-05 07:56:36 +00:00
Jehan
bb20e96710 NEWS: update.
Use more complete naming for newly supported palette formats.
2023-11-02 20:16:53 +01:00
Luming Zh
cc319c4531 Update Chinese (China) translation 2023-11-01 13:07:33 +00:00
Yuri Chornoivan
868c8e7e7d Update Ukrainian translation 2023-10-31 19:26:35 +00:00
Anders Jonsson
4e4d19e602 Update Swedish translation 2023-10-30 10:58:11 +00:00
Alan Mortensen
693931854b Update Danish translation 2023-10-30 06:22:14 +00:00
Alan Mortensen
fa7a586b75 Update Danish translation 2023-10-30 06:19:37 +00:00
Jehan
69a5c959ef desktop: AppStream metadata for GIMP 2.10.36. 2023-10-29 23:32:11 +01:00
Jehan
987c137609 NEWS: prepare for GIMP 2.10.36 release. 2023-10-29 23:25:05 +01:00
Rodrigo Lledó
a2b5bd6b38 Update Spanish translation 2023-10-28 22:40:37 +00:00
Rodrigo Lledó
7130808aa0 Update Spanish translation 2023-10-28 22:35:14 +00:00
Alx Sa
9dda8139e4 plug-ins: Additional fixes for DDS Import
@Wormnest noted remaining regressions after 8faad92e.
The second fread() only runs if the DDSD_PITCH flag is set,
so the error handling check should also be conditional.
Additionally, the ZDI-CAN-22093 exploit no longer runs but
still could cause a plug-in crash. This patch adds an additional
check to ensure the buffer size was within bounds.
2023-10-28 21:44:51 +00:00
Martin
c305801943 Update Slovenian translation 2023-10-28 19:42:02 +00:00
Anders Jonsson
970f6509e4 Update Swedish translation 2023-10-28 04:37:58 +00:00
Alx Sa
a2a4511bcc plug-ins: Set Pixel Aspect Ratio for GIFs
If the GIF has a value other than 0 or 49 in its PixelAspectRatio 
header, then we now use it to set the non-square pixel resolution.
For reference, GIFs calculate this value like so:
PAR = (Value + 15) / (float) 64.
(Backport of 22963405)
2023-10-28 01:32:51 +00:00
Alx Sa
e92f279c97 plug-ins: Fix DDS import regression from 7db71cd0
@Wormnest pointed out that compressed files are likely smaller than
width * height * bps, so our check to prevent ZDI-CAN-22093
also caught valid files.
The size check is removed from load_image () and moved to load_layer ()
before the two fread() functions, as we know exactly how much we'll
try to read at that point.
(Backport of 8faad92e)
2023-10-27 22:04:48 +00:00
Alx Sa
338ea134af core: Add ACB and ASE palette support
Backports the following commits to add import support for Adobe
ACB and ASE palette formats:
ab29c447, 9a15f65a, a69c7736, 38495c7b
2023-10-27 16:52:29 +00:00
Alx Sa
cb6027791b widget: Fix list selection after 6a9d07d5
This keeps the code consistent with 2.99's 636b38be.
2023-10-27 16:27:37 +00:00
Martin
b45beb10a5 Update Slovenian translation 2023-10-26 19:03:34 +00:00
Sabri Ünal
34f3d4bd5e Update Turkish translation 2023-10-25 13:44:05 +00:00
Sabri Ünal
de1a4d8e1f Update Turkish translation 2023-10-25 13:42:11 +00:00
Sabri Ünal
e105c0f7af Update Turkish translation 2023-10-25 13:41:18 +00:00
Sabri Ünal
6456a8a02c Update Turkish translation 2023-10-25 13:29:53 +00:00
Vasil Pupkin
7f91cd175e Update Belarusian translation 2023-10-24 14:51:14 +00:00
Alx Sa
e7b2842378 plug-ins: Load PDFs at 300DPI by default 2023-10-22 23:35:41 +00:00
Anders Jonsson
6aa09e8244 Update Swedish translation 2023-10-21 21:45:03 +00:00
Sabri Ünal
47682697aa Update Turkish translation 2023-10-21 19:11:27 +00:00
Sabri Ünal
afefe6a142 Update Turkish translation 2023-10-21 19:10:00 +00:00
Alx Sa
6a9d07d5fa widgets: Prevent Toolbox autoscroll bug (@massimo)
In Preferences > Toolbox, clicking on an item below the
initial scroll window view causes it to jump to the top
automatically. This patch prevents this by setting the
clicked index in the GtkTreeView before grabbing focus.
(Backport of @massimo 's !1107)
2023-10-21 01:26:13 +00:00
Yuri Chornoivan
20547929e0 Update Ukrainian translation 2023-10-20 18:37:33 +00:00
Alx Sa
6ff31e9af6 libgimpbase: issue #1561 update Exif.Photo.PixelX/YDimension
Some images have Exif.Photo.PixelXDimension and Exif.Photo.PixelYDimension
metadata tags in addition to Exif.Image.ImageWidth and
Exif.Image.ImageHeight (mainly tiff images). So far, we were not updating
these optional tags, meaning they could get out-of-sync with the actual
dimensions when resizing and then exporting the image.

Since these tags are non essential, we will only update them if they are
already present.
(Backport of @Wormnest's 52fb1e93)
2023-10-19 03:17:11 +00:00
Luming Zh
def3885df5 Update Chinese (China) translation 2023-10-18 13:32:42 +00:00
Alx Sa
8af280b5f2 app: Scale pattern preview to show full image
Currently, patterns are loaded as-is - if the full pattern is larger
than the preview, it's cut off and you only see the left corner.
In those cases, the pattern is scaled using gegl_buffer_get ()'s scale
parameter.
Backported from !915.
2023-10-17 19:45:36 +00:00
Alx Sa
beacd036ff plug-ins: Add additional DigitalSourceType...
types for the metadata editor.
Backported from 5070e0e9.
2023-10-17 15:07:19 +00:00
Alx Sa
ae7d288d41 plug-ins: Prevent infinite loop in film
Resolves #10119.

If the user sets the "Image Spacing" and "Hole Width" values
to 0, the hole creation code gets stuck in an infinite loop.
This patch adds a check to the allocation code for the hole
to make sure both its dimensions are greater than 0. If not,
then the hole is not created in the first place.
2023-10-04 11:18:12 +00:00
Alx Sa
c90e4af4fd display: Backport "Expand from Center" fix by @programmer_ceds
Prevents the "Expand from Center" toggle from locking in place
when using the Rectangle Select tool.
2023-10-02 21:21:02 +00:00
Anders Jonsson
2bc325fdf0 Update Swedish translation 2023-10-01 18:11:54 +00:00
Alx Sa
7db71cd0b6 plug-ins: Fix DDS vulnerability (ZDI-CAN-22093)
Resolves #10069

Currently, the DDS header information for the width, height, and bytes per scan line
are read in and assumed to be correct. As these values are used for memory allocation
and reading, it would be good to verify they do not exceed the file size.

This patch adds a condition after the header is read in to verify those values. If they exceed
the file size (mins an offset), the file is not read in and an error message is shown.
2023-10-01 17:54:08 +00:00
Alx Sa
985c0a20e1 plug-ins: Fix vulnerability in file-psd
Resolves #10101.
This patch adds a missing break statement after an error condition
is detected to prevent the code from continuing afterwards.
2023-09-29 20:39:29 +00:00
Andras Timar
bf3d247770 Make transform matrix selectable
In our use case it is necessary to save the transform matrix, and the
easiest solution is to make the label selectable. If we print the
whole matrix into a single label, formatted with tabs and linefeeds,
then the whole matrix can be copied with a single operation.
2023-09-28 20:33:55 +00:00
Ekaterine Papava
7caab63374 Update Georgian translation 2023-09-25 03:52:52 +00:00
Luming Zh
0cfcaefa5e Update Chinese (China) translation 2023-09-24 17:40:07 +00:00
Yuri Chornoivan
d4067a867e Update Ukrainian translation 2023-09-24 15:59:02 +00:00
Balázs Úr
7f56fa6f1a Update Hungarian translation 2023-09-24 13:37:29 +00:00
Piotr Drąg
90e800fc90 Update Polish translation 2023-09-24 13:41:37 +02:00
Martin
87bf476105 Update Slovenian translation 2023-09-23 21:17:48 +00:00
Alx Sa
ef12c0a907 plug-ins: Fix vulnerabilities in file-psp
Backports commits e1bfd871 and 96f536a3
from master
2023-09-23 20:40:18 +00:00
Rodrigo Lledó
82d34450f9 Update Spanish translation 2023-09-21 11:11:07 +00:00
Rodrigo Lledó
d399c9ac74 Update Spanish translation 2023-09-21 11:04:38 +00:00
Anders Jonsson
15772c4c14 Update Swedish translation 2023-09-14 22:16:13 +00:00
Anders Jonsson
c5e28797f6 Update Swedish translation 2023-09-13 20:40:03 +00:00
Gabriel Scherer
4c54950219 a workaround fix for a gdk_device_get_state bug
See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6045

This is an alternative, quick&dirty approach to the nicer but more
invasive workaround:
  https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/934

Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-09-12 09:19:09 +00:00
Jürgen Benvenuti
01dea8dfb9 Update German translation 2023-09-11 07:17:52 +00:00
Vasil Pupkin
0005451dfc Update Belarusian translation 2023-09-10 19:51:54 +00:00
Jürgen Benvenuti
37b3a15049 Update German translation 2023-09-09 06:55:25 +00:00
Jordi Mas
c3320daaf8 Update Catalan translation 2023-09-06 06:36:13 +02:00
Balázs Úr
33d3a0502e Update Hungarian translation 2023-09-05 19:00:05 +00:00
Luming Zh
7ff8bf895c Update Chinese (China) translation 2023-09-03 14:22:06 +00:00
Piotr Drąg
b9bf11c82e Update Polish translation 2023-08-27 16:22:52 +02:00
Yuri Chornoivan
4429f38aa3 Update Ukrainian translation 2023-08-25 14:29:56 +00:00
Yuri Chornoivan
1af90a1b2f Update Ukrainian translation 2023-08-21 20:01:20 +00:00
Martin
3356342ce3 Update Slovenian translation 2023-08-21 11:41:40 +00:00
Alx Sa
19db4e56ed scripts: Add Table of Contents to User Manual submenu
Resolves #1040.
Adds a [Table of Contents] link that directs users to
ID "gimp-main", the table of contents page.
2023-08-21 02:00:05 +00:00
Stanislav Grinkov
429e4cc353 themes, dark: show a small padlock next the lock icon when it's active
gtkrc part of this patch was proposed by Kevin Payne

Fixes: #1546 (GNOME/Gimp tracker)
2023-08-20 16:52:14 +06:00
Stanislav Grinkov
fa46e7d5f4 themes, dark: show a white frame when hovering over lock buttons 2023-08-20 16:44:31 +06:00
Stanislav Grinkov
2f8babe4df widgets: add widget name to item tree view lock box...
... to make it separately themable via gtkrc
2023-08-20 16:44:31 +06:00
Alx Sa
57ce7065a4 modules: Add translation note for Clip warning
Resolves #8207.
Adds a note to clarify the purpose of the
Clip Warning color display filter.
2023-08-15 17:08:25 +00:00
Luming Zh
2f4408d529 Update Chinese (China) translation 2023-08-13 13:19:32 +00:00
Stanislav Grinkov
6323fa449b app: set the blank font name for the standard font instead of 'Standard'
to fix the issue when 'Standard' can be actual font from the list
or a font which starts with. (ie. Standard Symbols PS)

Fixes: #3104 (GNOME/Gimp tracker)
2023-08-13 14:51:10 +06:00
Martin
c1ea60fb3d Update Slovenian translation 2023-08-11 23:00:38 +00:00
Stanislav Grinkov
27369e8614 core: add FG to Transparent (Hardedge) gradient
Fixes: #9849 (GNOME/Gimp tracker)
(cherry picked from commit cbcb477182)
2023-08-11 13:05:40 +06:00
Stanislav Grinkov
000cf55620 tools: change text tool behavior when replacing a text
When replacing a selection, take and apply markup (if any)
from the first character of the selection for the entered
text.

This fixes the case when you no longer can change the
global layer text properties after replacing the text.

Also, this changes the behavior introduced in #1220.

Fixes: #7948 (GNOME/Gimp tracker)
(cherry picked from commit 4465db5223)
2023-08-10 22:32:54 +06:00
Yuri Chornoivan
2aaff8202a Update Ukrainian translation 2023-08-09 09:50:26 +00:00
Marco Ciampa
982fa664af Updated Italian translation 2023-08-08 13:21:08 +02:00
Marco Ciampa
8dfbf95a80 Updated Italian translation 2023-08-08 13:02:51 +02:00
Alx Sa
1a9fde1809 plug-ins: Fix lava filter for non-square selections
Resolves issue #9809, fixed by @mareroqpoland.
When "Separate Layer" is selected, the entire drawable is always
filled rather than using the selection. This patch uses the selection
instead (which will be "all" if there is no active selection)
2023-07-30 22:25:35 +00:00
Marco Ciampa
7964dac82a Small fix in Italian translation 2023-07-26 22:07:00 +02:00
Jehan
1f0c3ea31d build: removing now outdated patches.
They all are in released versions of GLib or libwmf.
Thanks to frogonia for reminding about it.
2023-07-26 21:57:37 +02:00
Jacob Boerema
7a2306457f plugins: fix #8082 XWD file renders incorrectly
(cherry picked from commit 6c8625e5fc)
2023-07-11 18:34:20 -04:00
Alx Sa
88c1793ad0 plug-ins: Fix typo in gfig-arc
Resolves #5742.
The check is for a horizontal line (where the Y coordinate
would be the same for all three points), but the X axis was
checked instead due to a copy/paste error.

(cherry picked from commit 624ae512fc)
2023-07-11 11:28:02 -04:00
Luming Zh
01b33e6762 Update Chinese (China) translation 2023-07-08 13:11:29 +00:00
Luming Zh
1e19b16add Update Chinese (China) translation 2023-07-07 12:10:00 +00:00
Marco Ciampa
746d111829 Updated Italian translation 2023-07-05 08:35:03 +02:00
Marco Ciampa
5eeb2229a6 Updated Italian translation 2023-06-29 11:54:46 +02:00
Daniel Novomeský
5befddc4fc plug-ins: fix HEIF/AVIF export 2023-06-28 18:30:48 +02:00
Daniel Novomeský
4243c65a9d plug-ins: fix JPEG XL export 2023-06-28 16:11:11 +02:00
Daniel Novomeský
b550ca7243 plug-ins: support libjxl v0.9 decoding API 2023-06-27 18:52:00 +02:00
Danial Behzadi
97c266843c Add Persian translation 2023-06-22 23:04:22 +00:00
Alx Sa
9b6fa05fec widgets: Fix RGB histogram pixel/count values
The RGB histogram shows three histograms overlaid on each other.
This multiples the pixel and count attributes by 3. To correct this,
the result of gimp_histogram_get_count () is divided by 3 for the
pixel and count displays.

(cherry picked from commit bf1e125138)
2023-06-15 22:24:24 -04:00
Jehan
f911c6be2f gitlab-ci: fix a s/stable/oldstable/ reference which I missed. 2023-06-11 16:26:09 +02:00
Jehan
6462114cf4 gitlab-ci: build the 2.10 branch on bullseye which still has Python 2.
So apparently Python 2 has been removed from the new Debian stable (bookworm).
As we still want to build the Python plug-ins in the CI, let's move on using
oldstable (bullseye) in gimp-2-10.
2023-06-11 16:16:34 +02:00
Cristian Secară
93b75d9342 Update Romanian translation 2023-06-11 13:55:14 +00:00
Alx Sa
9747c76922 gui: Fix upper text scaling for small images
Resolves #5742.
From fa0a0212, the splash's upper text was scaled to PANGO_SCALE_MEDIUM
both when the image width was 2x or less than 2x. This was likely a
copy/paste issue, as the lower text code scaling does not duplicate.
This patch fixes it by changing the else condition to scale to
PANGO_SCALE_SMALL.
Note that this change is unlikely to be seen as it requires a very small
splash screen image to reach the else condition.
2023-05-20 16:21:04 +00:00
Marco Ciampa
2e6e397c5f Updated Italian translation 2023-05-18 13:52:11 +02:00
Jordi Mas
942b82caf6 Update Catalan translation 2023-05-12 23:22:34 +02:00
Jehan
0636966eae app: clean exit depends on GIMP_RELEASE rather than GIMP_UNSTABLE.
See also commit d22f1c3332 on the `master` branch. The main difference is that
right now the stable branch exits cleanly in all cases, so we don't need the
temporary environment variable to force the dirty exit (which ironically means
no crashes).
2023-05-12 14:40:08 +02:00
Marco Ciampa
f1b3eaa866 Small fix in Italian translation 2023-05-11 12:58:14 +02:00
Marco Ciampa
37aac7c0e6 Small fix in Italian translation 2023-05-11 12:51:08 +02:00
Luming Zh
86b4cf3f34 Update Chinese (China) translation 2023-05-03 19:29:32 +00:00
Marco Ciampa
c112832ed7 Small fix in Italian translation 2023-05-03 16:15:30 +02:00
Marco Ciampa
1222cc2945 Small fix in Italian translation 2023-05-02 23:04:20 +02:00
Marco Ciampa
29162ddc6a Updated Italian translation 2023-04-28 01:49:34 +02:00
Jacob Boerema
d23bb06b53 libgimpbase: do not save Photoshop specific EXIF metadata
Photoshop can save metadata when exporting to tiff or jpeg, including
a thumbnail that we can't update. This can contain sensitive data, so we
should not export it. See issue #8383.

To do this, we add the two Photoshop specific tags that we know of to the
list of tags that should not be exported, so they won't be saved.

(cherry picked from commit f681c50414)
2023-04-26 17:48:30 -04:00
Daniel Novomeský
bb06322b49 plug-ins: use heif_init/heif_deinit 2023-04-24 18:07:19 +02:00
Rodrigo Lledó
b39058e0be Update Spanish translation 2023-04-24 10:28:07 +00:00
Rodrigo Lledó
87eb9871fd Update Spanish translation 2023-04-24 10:13:24 +00:00
Jehan
d32a24f4e9 plug-ins: fix the thread rendering the thumbnails all the time.
After testing a bit more, I realized that the thread was constantly re-rendering
the thumbnails, even though I didn't touch the "white-background"
button/argument.
This was not just a completely invisible problem, it actually affected the page
selection (it was very hard to select pages by clicking on them, it was randomly
working, and more often not selecting anything). This is how I realized there
was a problem.

The reason was simply that I was never actually calling g_cond_wait() because of
a first_loop flag I forgot to set.

Note that docs of g_cond_wait() explains that it is possible that "spurious
wakeup" happen. At first I thought I had this issue, which is why this commit
also adds a boolean flag to check after a wakeup, to make sure that I was in the
"condition met" case and not the "spurious wakeup" one.
Even though I realized afterwards the real reason was much more stupid, I still
left this additional check.

Fortunately this issue doesn't seem to affect the 2.10 code. Or to be more
accurate: the continuous render very likely happens there too, yet it doesn't
break page selection interaction with GTK+2 as far as I can see.

(cherry picked from commit 1584a9ba50)

Cherry pick note: though this issue didn't affect the dialog interaction in the
gimp-2-10 branch, I thought it'd still be better not to have never-ending
re-rendering of thumbnails for no good reasons.
2023-04-22 01:39:39 +02:00
Ekaterine Papava
267451913e Update Georgian translation 2023-04-20 05:32:05 +00:00
Sabri Ünal
56ea992958 Update Turkish translation 2023-04-17 15:37:48 +00:00
Sabri Ünal
6ec80c792c Update Turkish translation 2023-04-17 15:37:28 +00:00
Sabri Ünal
8214183c90 Update Turkish translation 2023-04-17 15:33:35 +00:00
Sabri Ünal
b00b8ee77d Update Turkish translation 2023-04-17 15:09:36 +00:00
Aurimas Černius
bfcd1f020d Update Lithuanian translation 2023-04-16 19:45:34 +00:00
dimspingos
6ed6d5787f Updated Greek translation 2023-04-12 15:17:31 +03:00
Petr Kovář
919ddf65b5 Add Czech translation 2023-04-06 13:39:40 +00:00
Nathan Follens
b93e590c49 Update Dutch translation 2023-04-01 12:35:27 +00:00
Nathan Follens
d57e2a1d10 Update Dutch translation 2023-04-01 12:23:22 +00:00
Nathan Follens
5fdc38e7dc Update Dutch translation 2023-04-01 12:16:50 +00:00
Hugo Carvalho
a3b444dee6 Update Portuguese translation 2023-03-27 15:36:16 +00:00
Hugo Carvalho
3c5df895c6 Update Portuguese translation 2023-03-27 15:34:28 +00:00
Hugo Carvalho
169dce5195 Update Portuguese translation 2023-03-27 15:30:20 +00:00
Marco Ciampa
4eda6c62e7 Updated Italian translation 2023-03-25 00:12:55 +01:00
Balázs Úr
e69d854d1c Update Hungarian translation 2023-03-15 00:12:00 +00:00
Balázs Úr
d51f706390 Update Hungarian translation 2023-03-15 00:06:11 +00:00
Balázs Úr
aab9cc6824 Update Hungarian translation 2023-03-14 23:55:06 +00:00
Alx Sa
61d470f6ad actions: Disable Arbitrary Rotation menus if...
...no image is active.
There are Arbitrary Rotation options under both the Image and Layer
menus. All of those rotation options are disabled without an image open.
To keep consistency, this disables those menu options as well.
The Tools menu Rotation option is left as-is.
(Backport)
2023-03-07 21:47:19 +00:00
Alx Sa
8fb43e2fc1 plug-ins: Let file-gif-save2 accept files paths...
...as parameters.
Currently, only file-gif-save can accept file paths in addition to URIs.
This results in inconsistent/unexpected behavior.
Now both versions of the GIF save procedure accept URIs or file paths.
First noted by Massimo in issue #5552.
2023-03-07 16:23:41 +00:00
Alx Sa
cd9f38805f plug-ins: Retain comment on non-interactive export
"globalcomment" is used to store and retrieve comments for GIFs.
However, it is only loaded via the GUI; thus, the comment is lost if
you re-export non-interactively.
This patch adds code to also load the comment from GimpParasite if
non-interactive export modes are used.
2023-03-07 03:24:38 +00:00
Cristian Secară
ea0ce234c3 Update Romanian translation 2023-03-07 01:16:51 +00:00
Piotr Drąg
12122dd0a2 Update Polish translation 2023-03-05 13:51:05 +01:00
U-YGGDRASIL\ender
5d36fae545 Installer: exclude two more unnecessary debug files, fix pygimp.env on ARM64 2023-03-03 18:39:46 +01:00
U-YGGDRASIL\ender
4cf4bca63b Installer: some more optimizations 2023-03-03 18:17:12 +01:00
U-YGGDRASIL\ender
9e37e65d38 Merge branch 'gimp-2-10' of ssh.gitlab.gnome.org:GNOME/gimp into gimp-2-10 2023-03-03 17:44:22 +01:00
U-YGGDRASIL\ender
22d0d1ddbf Installer: optimize file order, add solidbreak directives for faster install 2023-03-03 17:29:54 +01:00
Yuri Chornoivan
166462a291 Update Ukrainian translation 2023-03-03 14:53:10 +00:00
U-YGGDRASIL\ender
8bfac8f41b Installer: speed up installation by rearranging the order of included files 2023-03-03 15:21:46 +01:00
U-YGGDRASIL\ender
7253f69efa Installer: remove setup.ini again 2023-03-03 13:51:38 +01:00
U-YGGDRASIL\ender
6f921b27bb Installer: ARM64 support (also reverts some 2.99 changes not applicable to 2.10) 2023-03-03 13:20:27 +01:00
U-YGGDRASIL\ender
0793b2a796 Installer: remove setup.ini (not used any more) 2023-03-03 13:05:15 +01:00
U-YGGDRASIL\ender
597e68a364 Installer: include file extension in association name 2023-03-03 12:42:58 +01:00
Sveinn í Felli
615062ebb4 Update Icelandic translation 2023-03-01 10:24:23 +00:00
Martin
240725d4bc Update Slovenian translation 2023-02-26 12:35:38 +00:00
Jürgen Benvenuti
92611e6e9c Update German translation 2023-02-25 21:06:54 +00:00
Anders Jonsson
16f37dd8bd Update Swedish translation 2023-02-25 13:15:42 +00:00
Daniel Novomeský
d8566241a0 Fix flatpak release info about JPEG XL 2023-02-24 10:36:33 +01:00
Jehan
196db95ba4 configure: post-release version bump to 2.10.35. 2023-02-21 21:04:29 +01:00
Jehan
b073805fb3 configure: release GIMP 2.10.34. 2023-02-21 20:11:43 +01:00
Jehan
c4efe45cab desktop: update AppStream metadata release date. 2023-02-21 20:08:30 +01:00
Jehan
2ff4eda495 NEWS: update. 2023-02-21 20:07:07 +01:00
Tim Sabsch
c2092bd3f5 Update German translation 2023-02-21 06:37:02 +00:00
Jürgen Benvenuti
3ecf87ddba Update German translation 2023-02-21 06:33:31 +00:00
Anders Jonsson
5745413399 Update Swedish translation 2023-02-21 00:15:45 +00:00
Tim Sabsch
6e75bbfe05 Update German translation 2023-02-20 22:32:40 +00:00
Alan Mortensen
c24ffb2376 Update Danish translation 2023-02-20 16:56:30 +00:00
Jehan
6adf574513 app: don't draw the drop zone, just nothing when converting. 2023-02-19 18:53:42 +01:00
Jehan
de25be9210 app: fix a crash when converting to higher precision.
gimp_display_shell_render() writes to a GeglBuffer backed by allocated memory
(shell->profile_data). Unfortunately while converting prevision in
gimp_image_convert_precision(), we change the "precision" property (hence the
source format) first, hence end up trying to write data in a too small buffer.
This crash was hard to find as it was not showing up on my machine (though it
did produce rendering artifacts!), unless I built both GIMP and babl with
`b_sanitize=address`.

Note that an alternate fix was to make sure that the profile_data buffer is big
enough (by calling gimp_display_shell_profile_update() before rendering), but
anyway the image is in an inconsistent state while conversion is in progress:
whereas the `src_format` is the new one, the `src_profile` is still the old one
(and cannot be changed before we finish converting).

Moreover the render happen regularly on progress signals, once after each
converted drawable. So each of these rendering step happens in an inconsistent
state, with the wrong profile set, some of the drawables converted and others
not yet.
We could still render properly if each drawable's buffer used space-aware format
(thus allowing different drawables to use different profiles/spaces), but it
feels over-engineering the problem. It might be much better to ignore rendering
steps while converting the image precision. Moreover it would obviously make a
faster conversion.

See discussions in #9136 for this crash, which didn't have dedicated report
AFAIK.
2023-02-19 18:30:18 +01:00
Anders Jonsson
1022dcbcd2 Update Swedish translation 2023-02-18 13:04:12 +00:00
Anders Jonsson
30a1732def Update Swedish translation 2023-02-18 12:55:40 +00:00
Piotr Drąg
e1b10454a7 Update Polish translation 2023-02-18 11:50:14 +01:00
Jehan
a052afbb50 NEWS: update. 2023-02-16 23:15:32 +01:00
Jehan
bddcd5c268 Issue #9147: freeze when switching from multi-window to single window mode.
Don't keep bindings to still existing objects. We were ending up in some ugly
infinite looping.
2023-02-16 22:21:03 +01:00
Jehan
a86560bb57 app: fix global-buffer-overflow in "gimp:dissolve" implementation.
In case of negative y in the region to process, we were accessing invalid memory
(negative array index).

I hesitated between make so that a given ordinate always use the same index or
if we just want the start ordinate (whatever it is) to use index 0. The later
could have just been `(y - result->y) % RANDOM_TABLE_SIZE`.

I just decided to keep the existing logic (former case) though to be fair, not
sure it matters much.
2023-02-16 17:01:53 +01:00
Yuri Chornoivan
02a8e8ae41 Update Ukrainian translation 2023-02-16 13:40:35 +00:00
Martin
5c1863bf92 Update Slovenian translation 2023-02-15 22:12:43 +00:00
Martin
66c7fe1f8a Update Slovenian translation 2023-02-15 22:07:52 +00:00
Anders Jonsson
fcdf03ee23 Update Swedish translation 2023-02-15 11:53:33 +00:00
Jehan
41f40f530a plug-ins: option to choose whether loading a PDF with white background.
While at first, the idea of always loading PDF with transparency seemed good
(commit 7aff7e9c70), I realized that a lot of administrative PDF (generated with
text and vector graphics, rather than scans or alike containing raster) actually
have transparency. So now all these documents load with transparent background.
Clearly all the office software are assuming that PDF readers will fill the
background with white.

So add a checkbox to decide whether or not to fill the image with white. I don't
update the PDB procedure. I'll just do this on the main dev branch (while also
updating a bit the code to newer API).

Fortunately I regularly open such PDF documents with GIMP and could witness this
no-transparency expectation before we released GIMP 2.10.34! 😅
2023-02-14 23:59:44 +01:00
Sabri Ünal
4c61ea6ebf Update Turkish translation 2023-02-14 21:26:03 +00:00
Sabri Ünal
7adc4b682a Update Turkish translation 2023-02-14 21:21:58 +00:00
Sabri Ünal
e7786d2e94 Update Turkish translation 2023-02-14 21:21:50 +00:00
Jacob Boerema
3f4c279276 plug-ins: disable magics detection for Windows CUR and ICO files
The magics used for detection for CUR and ICO are not very unique and
interfere with the detection of certain types of TGA images.
Since these TGA images are regularly used, it seems better to only base
CUR and ICO detection on the extension, just as we do with TGA version 1
files.

See also issue #7912
2023-02-14 15:36:13 -05:00
Jacob Boerema
3e93779172 plug-ins: fix #9067 TGA files saved by Krita can't be opened
Krita had a bug where it incorrectly saved 4 for the alpha bits instead of
8. We will allow 4 and convert that to 8 to be able to read the incorrect
TGA images.

The likelyhood of real TGA images with 4 alphabits seems pretty low, so it
should not interfere with real images that have this set. We were not
supporting that anyway.

(cherry picked from commit 5f9415a641)
2023-02-14 15:16:55 -05:00
Yuri Chornoivan
34c43b7042 Update Ukrainian translation 2023-02-14 18:10:05 +00:00
Luna Jernberg
d27f8a4e96 Update Swedish translation 2023-02-14 16:38:28 +00:00
Jehan
517db53964 NEWS: update.
Added the 2 new PDB functions. I should not have added these so close to release
(because these add 2 translatable strings for undo), but anyway the added
strings are barely GUI-facing as these functions are for plug-in developers.

And I really wanted to finally review these MRs which have been sitting there
for months. Sorry translators!
2023-02-14 17:25:52 +01:00
Jehan
66ef1ef1ef app, libgimp, pdb: minor fixes.
- fix a typo s/Commponent/Component/.
- Add &std_pdb_compat() to the new PDB procedures (I realize that's probably
  what the contributor was asking about, back in !446). Not sure if it's right
  as there were none in this file, but these are clearly just wrappers around
  GEGL ops, so it seems fitting.
- Some alignment fixes.
- More accurate "$since" variables.
2023-02-14 17:12:31 +01:00
Jehan
c0a3582109 app: generated file (cf. previous commit). 2023-02-14 14:23:38 +01:00
Ian Martins
dbf9f277a2 pdb: add a PDB procedure for extract-component 2023-02-14 10:36:19 +00:00
Martin
1905197983 Update Slovenian translation 2023-02-14 00:17:37 +00:00
Alan Mortensen
7d6c5cc4de Update Danish translation 2023-02-13 18:33:26 +00:00
Alan Mortensen
b19b8238b3 Update Danish translation 2023-02-13 17:48:45 +00:00
Nyári-Kovács, Dávid Tamás
57ee6e13ab Fix file extension issue when "Saving As..." for guillotine
Original issue: #8581

1. When an image with a non-xcf format is loaded, within GIMP core it
qualifies as an imported file. (See gimp_image_get_imported_file
function)

2. But the guillotine plugin cannot propagate this information.
It can only set the file path on the new image it creates, and it uses the file extension of the original imported file.

3. But since the filename is set by the plugin is the actual filename not imported filename,
the gimpsavedialog.c module cannot differentiate it. This results in the
incorrect file extension being set in the "gimp_save_dialog_set_image"
function.

This issue can actually be present in other plugins as well that
generate new images which has to be checked.
2023-02-13 16:21:14 +00:00
Yuri Chornoivan
da1c7574d8 Update Ukrainian translation 2023-02-13 15:33:07 +00:00
Yuri Chornoivan
648a44cf98 Update Ukrainian translation 2023-02-13 15:31:16 +00:00
Anders Jonsson
53f095160a Update Swedish translation 2023-02-13 15:08:28 +00:00
Jehan
e456ab019b app, libgimp, pdb: fixing generated code and wrong GEGL op arguments.
This commit is a fixup commit for MR !790 which had a few issues:

- The args for shadows and highlights adjustments are "shadows-ccorrect" and
  "highlights-ccorrect" respectively.
- Also fixing generated code.
2023-02-13 14:21:16 +01:00
Ian Martins
0b96363e10 pdb: add a PDB procedure for shadows-highlights 2023-02-13 13:16:38 +00:00
Alx Sa
57d04e0e26 plug-ins: Fix CRITICAL message in Python console
This implements the full fix to the problem noted in the prior commit.
While it no longer crasheed when applying a function after clearing the
console, Jehan reported it still showed a CRITICAL message. This should
fix it the same as the 2.99 branch.
2023-02-13 12:55:40 +00:00
Alx Sa
3fbb96c36b plug-ins: Fix Python console crash after clear
GTK2 get_iter_at_line_offset() does not allow invalid offsets unlike
GTK3 version. Clearing the console creates an invalid iter due to an
empty buffer.

This patch attempts to resolve it by adding a ">>> " output when the
console is cleared, thus preventing the invalid iter issue.
2023-02-13 11:43:12 +00:00
Jehan
a902576864 gitlab-ci: do not allow failure for the distcheck.
This was making the CI issue much less visible, and distcheck is definitely
needed for releases.
2023-02-12 23:49:32 +01:00
Jehan
d8faa6d21c Revert "libgimpwidgets: fix def file."
This reverts commit 13284c8953.

Actually I should not have backported this change from the `master` branch.
These functions are still public in 2.10 (and internal in the main branch).

This should fix our CI.
2023-02-12 23:49:23 +01:00
Jehan
0aa087c8f9 NEWS: update. 2023-02-12 16:04:23 +01:00
Piotr Drąg
d78e1a7878 Update Polish translation 2023-02-12 13:17:22 +01:00
Jehan
aacd3d4640 Issue #8666: Color profile conversion is broken.
A bug in babl would run the color conversion twice when the input and output
buffer is the same and a LUT is available for the color transform. This is a
workaround in GIMP code (especially because we still don't require the latest
babl version), though a real bug fix will soon happen too in babl itself as
well.
2023-02-12 12:52:29 +01:00
Luna Jernberg
6d190931c8 Update Swedish translation 2023-02-12 11:22:41 +00:00
Martin
4a56ddc050 Update Slovenian translation 2023-02-12 10:08:40 +00:00
Martin
7ba4512d26 Update Slovenian translation 2023-02-12 10:07:11 +00:00
Alx Sa
6c901c1641 plug-ins: Make PDF background color fill optional
This adds a checkbox to single and multi-page PDF export to not fill
transparency with the background color
(which currently happens automatically)
2023-02-11 23:26:20 -05:00
Jehan
13284c8953 libgimpwidgets: fix def file.
The defcheck.py file finds these errors:

> Problem found in /home/jehan/dev/src/gimp/libgimpwidgets/gimpwidgets.def
>   the following symbols are listed in the .def-file,
>   but are not exported by the library.
>      - gimp_color_picker_cursors_get_resource
>      - gimp_icon_pixbufs_get_resource

Indeed these don't exist. Unsure why the autootols check failed to
report these until today.

(cherry picked from commit 01e87819ce)
2023-02-10 23:39:31 +01:00
Jehan
7aff7e9c70 plug-ins: load PDF without filling the background to white.
Some PDF have transparency on purpose. Filling with white, without any question,
is counter-productive and prevents from working on such PDF files.

Note that we could add an option with a checkbox, leaving one to decide whether
to fill the background or not. But it feels over-engineering the issue. The PDF
is transparent, so that's what we load, and that's it. If one wants to add a
background, it's easy to add a layer at the bottom of the stack (and they can
make it any color they want, not just white), after loading the file.

(cherry picked from commit c369827725)
2023-02-10 20:40:28 +01:00
Jehan
691b996be4 plug-ins: fix a crash in tiff_io_error().
I had a TIFF file which would crash while triggering an error, inside g_logv()
code (and according to the stacktrace, even probably inside some lower level
printf implementation code).

The reason was that I already processed the variable list with
g_strdup_vprintf() and printf didn't like this va_list being reused, then
segfaulted with some "Cannot access memory at address" error.

The alternate fix was to first copy the va_list in the first use with
va_copy()/G_VA_COPY, yet since we already processed the format data, I thought
it was useless to do this. Let's just directly use the formatted string.

(cherry picked from commit fb1f16d4b8)
2023-02-10 20:35:08 +01:00
Alx Sa
c9ba326f8e plug-ins: fix overwrite export creates thumbnail
...when it shouldn't.

Backport of Wormnest's code.
When overwriting the same file when exporting, we didn't check if the
image previously had a thumbnail. If the default setting in Preferences
is to add a thumbnail, then it would add one where it shouldn't.

Since thumbnails get saves as part of the EXIF metadata, we need to check
that to see if there was a thumbnail in the original image.
However, we were always removing the thumbnail from the metadata on import.

Let's delay removing this metadata until we need to, which has the
advantage that the metadata in our viewer is more complete.

When exporting starts, we add a check in gimp_image_metadata_save_prepare
to see if there was a thumbnail in the EXIF metadata. If not, then we
disable the thumbnail flag.

In gimp_image_metadata_save_finish we remove the thumbnail metadata when
the user doesn't want to save a thumbnail, or when the image format
does not support EXIF.
2023-02-09 23:05:00 +00:00
Jehan
aeb5eaa890 Issue #8359: GIMP crashes from "open the font selection dialog" button.
Apparently GDK/Win32 sends the "grab-broken-event" signal before the "clicked"
signal. This has only been changed since GTK4 so far.

Anyway the bottom line is that GimpContainerPopup would process a handled on
"clicked", using the object destroyed when "grab-broken-event" happened as
callback data. The solution is to make sure that the object stays alive long
enough. So I'm changing gimp_editor_add_button() to connect to signals with
g_signal_connect_object() (since all usage of this function was used with
GObject callback data, it was not a problem).

See discussion in !815.

As a side change, gimp_container_popup_dialog_clicked() should emit the
"cancel", not "confirm". This part was taken from MR !815 by Lloyd Konneker.

(cherry picked from commit f77f772f56)
2023-02-09 23:27:17 +01:00
Yuri Chornoivan
22ca5248af Update Ukrainian translation 2023-02-09 21:31:55 +00:00
Anders Jonsson
7d9cab6e5d Update Swedish translation 2023-02-09 21:30:22 +00:00
Stanislav Grinkov
2d59d233ef [app] Ensure calculated histogram spike height ...
is positive or zero. Sometimes the calculated `y` or `bg_y`
values are negative because the histogram value was divided
by zero (when max == 0.0).

Resolves: #9132 (Gnome/GIMP bug tracker)
(cherry picked from commit 9b517fbf7d)
2023-02-10 00:53:53 +06:00
Marco Ciampa
ab53ec2de4 Updated Italian translation 2023-02-09 19:18:10 +01:00
Sabri Ünal
6fbbd75cc1 Update Turkish translation 2023-02-09 15:55:41 +00:00
Sabri Ünal
b7c5d1a8c7 Update Turkish translation 2023-02-09 15:55:07 +00:00
Sabri Ünal
9bf5c0e51a Update Turkish translation 2023-02-09 15:54:24 +00:00
Alx Sa
c9f518a65c display: Fix statusbar tool icon offset
The Y offset of the statusbar tool icon is too large, which pushes it
off-screen. This scales the offset by the size of the icon to
prevent this problem.
2023-02-09 14:19:23 +00:00
Jehan
49310e5943 Issue %8365: Ambiguous naming of "Lock path strokes".
(cherry picked from commit 8bd3d5e0bb)
2023-02-09 15:12:45 +01:00
Jehan
2fd738bb3e Revert "libgimpcolor: fix call to cmsCreateProofingTransform()."
This reverts commit f7e7f396aa.

See issue #8269.
For GIMP 2.10, I'll just revert this commit so that we get back to pre-2.10.32
situation. For 3.0, we'll try to do something better.
2023-02-09 14:48:52 +01:00
Jehan
aa612807e7 NEWS: update. 2023-02-09 14:32:05 +01:00
Jehan
0cd38a87e1 desktop: new <release> tag for GIMO 2.10.34.
See #9136.
2023-02-09 13:38:41 +01:00
Jehan
6f2aff5133 NEWS: add a listing for 2.10.34. 2023-02-09 13:13:50 +01:00
Anders Jonsson
9ac937b3a1 Update Swedish translation 2023-02-08 23:07:31 +00:00
Alx Sa
979f3e7a60 plug-ins: Fix default TIFF export settings
This sets the default TIFF export to "normal" TIFF (regardless if GIMP
was built with BIGTIFF support or not). It then checks if
the BIGTIFF option was previously selected on export 
to optionally set the option to TRUE.
2023-02-08 03:45:39 +00:00
Alx Sa
2f15693cde plug-ins: Export PSD with paths
Ports PSD path export from file-tiff-save.c so that paths are carried
over in PSD project files as well.
2023-02-08 02:46:19 +00:00
Anders Jonsson
d0d0e7b88f Update Swedish translation 2023-02-08 00:54:05 +00:00
Anders Jonsson
9cae7fbb90 Update Swedish translation 2023-02-08 00:48:07 +00:00
Alx Sa
7f9680e8c4 plug-ins: Improve PSD load support
Backport of Wormnest's code to fix #5438.
Certain PSD layers have a flag called clipping set to 1. We were not
handling this flag and had some reports about colors bleeding where
they were not supposed to.
We are going to set GIMP's layer composite_mode to
GIMP_LAYER_COMPOSITE_CLIP_TO_BACKDROP, which is the closest we can get
to PhotoShop's clipping. With this, the colors won't bleed anymore.
This isn't the whole solution since PS apparently stops compositing when
it encounters a layer 
without clipping set, while GIMP doesn't stop until
it reaches the bottom layer of a group or the image.

PhotoShop handles clipping layers in a different way than GIMP. The only
way to have it look the same is by adding extra layer groups.
PSD layers that have clipping set, combined with the first non clipping
layer below it are grouped together in a new layer group.
Doing this results in the same image as the PSD merged image unless there
are other PSD elements in play that we don't handle yet.

See e.g. the NSFW image 
in the mentioned issue where the purple hair color
is a little darker than the merged image.
2023-02-07 01:58:32 +00:00
Alx Sa
233a014490 app: add eye icon to GimpItemTreeView header...
...visibility column.
Makes it much more obvious where you have to click for visibility, and
where each column is. Also it's more consistent.
Backport of Jehan's code.
2023-02-06 09:44:26 -05:00
Rodrigo Lledó
62951f034e Update Spanish translation 2023-02-04 03:44:31 +00:00
Rodrigo Lledó
db5ca02d93 Update Spanish translation 2023-02-04 03:42:43 +00:00
Rodrigo Lledó
81dd37e057 Update Spanish translation 2023-02-04 03:41:20 +00:00
Rodrigo Lledó
23986c6c3c Update Spanish translation 2023-02-04 03:39:01 +00:00
Martin
c4ee62a907 Update Slovenian translation 2023-02-01 20:21:59 +00:00
Martin
84f1589e28 Update Slovenian translation 2023-02-01 20:20:16 +00:00
Yuri Chornoivan
595bdc42f1 Update Ukrainian translation 2023-02-01 18:49:46 +00:00
Yuri Chornoivan
6758505e50 Update Ukrainian translation 2023-02-01 18:48:12 +00:00
Ekaterine Papava
87dc05e7c0 Update Georgian translation 2023-02-01 16:21:27 +00:00
Alx Sa
a8777a7374 libgimpconfig: Retain color scale preferences
RGB 0..255/0..100 and LCh/HSV settings are now remembered when closing
and reopening GIMP.
2023-01-29 14:05:20 +00:00
Alx Sa
b9448777e7 dialogs: Add template selector to resize dialog
Porting code by Stanislav Grinkov from dev branch.
Adds option for selecting predefined page sizes using the same
template selector as on "New Image" dialog.

Syncs up size and offset unit selectors to have the same value
when changing template and when resetting whole dialog.

Also adds pixel density 
selector to canvas size dialog
which will be shown when selected template pixel density doesn't
match the image pixel density.

Then user can either keep current image ppi and scale the
template or set image ppi to match the template ppi.

Density selector displayed only when template and image ppi
differs and template unit is matches one of real world units
(e.g. inch, mm, etc).
2023-01-29 09:55:11 +00:00
Yuri Chornoivan
53f0d60f10 Update Ukrainian translation 2023-01-27 14:47:33 +00:00
Martin
95d6a2867a Update Slovenian translation 2023-01-26 17:55:49 +00:00
Alx Sa
8c394d7706 app: "Canvas Size" dialog takes too much...
vertical space.
Let's use the horizontal space a little better.

To do this, Jehan moved the preview on the right side of the Canvas Size
and Offset number fields, and the "Center" button just below it.
2023-01-21 12:42:15 -05:00
Jacob Boerema
78ec4d1495 app: update gimphelp-ids.h
Removed several help ids that are not in use anymore.
Fixed spelling of one help id, the spelling has also been fixed in
gimp-help.
2023-01-14 16:07:04 -05:00
Lukas Oberhuber
313691b496 Fix 7957 2023-01-13 23:22:52 +00:00
Lukas Oberhuber
ec05f4b659 Fix 7957 2023-01-13 18:47:36 +00:00
Jehan
c25dd4e739 app: add a comment to complete !808.
It is better to add a comment rather than simply disabling these 2 calls without
explanation on macOS. This way, developers who'll look at this code in the
future will immediately know what's the reason and status for the "unicity"
concept of GIMP process on macOS. Basically there are 3 features:

- Opening files from another software (such as "open with" in file browsers)
  which is handled differently in macOS and apparently works fine. It looks like
  it works by handling system signals, connected from gui_unique_quartz_init().
- Opening files by running a new GIMP process which would pipe the filenames
  into an existing GIMP process before immediately exiting.
- Running batch process in an existing GIMP process, also by running a short-run
  GIMP process.

The last 2 features are simply now officially disabled in macOS because dbus is
not installed by default and seem like it may cause issues when it is.

See discussions in !808 and #8997.

(cherry picked from commit 68cd873481)
2023-01-12 18:58:16 +01:00
Lukas Oberhuber
be38a37444 macos: do not call dbus for uniqueness
DBus can cause instability on the MacOS platform, and regardless
MacOS handles application uniqueness already.

The batch version has also been modified as it only applies if
compiled as an application, since it returns FALSE if it is complied
as a console app.

(cherry picked from commit 9102e47637)
2023-01-12 18:58:09 +01:00
Milo Ivir
68e637bd44 Update Croatian translation 2023-01-12 16:48:03 +00:00
Alan Mortensen
6377449141 Update Danish translation 2023-01-09 18:06:16 +00:00
Lukas Oberhuber
cad9feed71 gimphelplocale: MacOS can get http and https 2023-01-06 23:16:37 +00:00
valadaptive
d6d2e56c00 app: Fix "Handle Transform" handle snap location 2023-01-02 15:31:59 -05:00
Jordi Mas
bd8ff18c94 Update Catalan translation 2023-01-01 07:13:37 +01:00
Chao-Hsiung Liao
ec5c48005e Update Chinese (Taiwan) translation 2022-12-31 00:01:03 +00:00
Chao-Hsiung Liao
a1f24a414a Update Chinese (Taiwan) translation 2022-12-30 23:59:24 +00:00
Chao-Hsiung Liao
aafad0b1a7 Update Chinese (Taiwan) translation 2022-12-30 23:56:34 +00:00
Chao-Hsiung Liao
0ac33b3d7c Update Chinese (Taiwan) translation 2022-12-30 23:54:16 +00:00
Daniel Novomeský
ce1f951871 gitlab-ci: use older package where python2 is still present
and build libjxl manually.
2022-12-29 13:34:47 +01:00
Simon Budig
41d45fa7dc app: update/fix the About's authors.xsl.
Apply Jehans' fix to the authors.xsl to this branch as well. Adapt it to
consider "recent" as >= 2.8 and don't change the sorting.
2022-12-25 23:30:33 +01:00
Cristian Secară
d7679a2330 Update Romanian translation 2022-12-25 01:52:08 +00:00
Alx Sa
f74ebc9c36 app: Disabled symmetry menu when no image is set
To improve discoverability, the symmetry dockable's combobox menu is now
shown (but disabled) when no image is set.
2022-12-24 03:43:35 +00:00
Jacob Boerema
208912be08 app: use pre-defined help id GIMP_HELP_COLORSELECTOR_PALETTE
Instead of using the string directly. This ensures that possible updates
in the string don't go unnoticed in gimp-help.

(cherry picked from commit 8372220345)
2022-12-23 13:04:14 -05:00
Jacob Boerema
0f5afa0f2e app: update available help ids for gimp-help
Add several missing help ids, remove those that are not used anymore,
and update "gimp-colorselector-water" to "gimp-colorselector-watercolor".

Also add a comment why some help ids are not used directly.
2022-12-23 13:04:02 -05:00
Ekaterine Papava
ac2f2df2c0 Add Georgian translation 2022-12-23 17:34:42 +00:00
Ekaterine Papava
71f5bb7152 Add Georgian translation 2022-12-23 17:32:53 +00:00
Ekaterine Papava
ee026944d5 Add Georgian translation 2022-12-23 17:29:33 +00:00
Daniel Novomeský
96690f3d65 libgimpbase: backport changes in gimp_metadata_copy_tag
New code will be used only when gexiv2 0.12.2+
is available during build time.
2022-12-21 13:30:16 +01:00
Kristjan SCHMIDT
8ef0a8701d Update Esperanto translation 2022-12-18 11:05:10 +00:00
Sabri Ünal
8e154d9426 Update Turkish translation 2022-12-11 19:47:50 +00:00
Sabri Ünal
7b8d8d8e4a Update Turkish translation 2022-12-11 19:47:37 +00:00
Sabri Ünal
19445e111b Update Turkish translation 2022-12-11 19:46:18 +00:00
Jehan
3fad4fd93d Issue #8948: Autotools build does not support the new babl-0.1 naming.
(cherry picked from commit 09ece8f6f9)
2022-12-09 16:35:23 +01:00
Cristian Secară
df56becafb Update Romanian translation 2022-12-05 23:42:37 +00:00
Cristian Secară
e681f837ab Update Romanian translation 2022-12-05 23:41:24 +00:00
Cristian Secară
a56eabbcfa Update Romanian translation 2022-12-05 23:40:35 +00:00
Cristian Secară
57a6206a6d Update Romanian translation 2022-12-05 23:39:42 +00:00
Cristian Secară
f32353b2de Update Romanian translation 2022-12-05 23:36:16 +00:00
Cristian Secară
15300dc440 Update Romanian translation 2022-12-05 23:34:04 +00:00
Daniel Novomeský
543f9e37e6 plug-ins: fix return value
-1 should be returned in case of error, not NULL.
It caused incompatible pointer to integer conversion with
clang version 15.0.3
2022-11-28 18:04:57 +01:00
Marco Ciampa
31cfca68a7 Small fix in Italian translation 2022-11-28 13:41:00 +01:00
Marco Ciampa
69c65b09c3 Small fix in Italian translation 2022-11-28 13:06:24 +01:00
Cristian Secară
426a8dbdbb Update Romanian translation 2022-11-21 04:26:51 +00:00
Sabri Ünal
dd06849944 Update Turkish translation 2022-11-19 16:53:21 +00:00
Jordi Mas
8a84f3b750 Update Catalan translation 2022-11-12 15:14:24 +01:00
Daniel Novomeský
d2d363727d plug-ins: JXL export
Partial back-port of JPEG XL export from GIMP 2.99
Export is always in 8bit lossless.
Export is quite slow but compression efficiency is usually
significantly better than PNG
and yet slightly better than lossless WebP.
2022-11-09 13:35:50 +00:00
Daniel Novomeský
0c53ee8c93 plug-ins: fix memory leak in HEIF, AVIF export 2022-11-09 13:35:50 +00:00
Jacob Boerema
b7219d51b1 plug-ins: improve security in flame plug-in
- Use g_malloc* functions instead of malloc, so we don't continue on
failed allocations unless we test for NULL.
- Make sure we don't iterate past the known number of control points (ncps).
- Safely allocate, initialize and free points. Since points seems to be
used uninitialized, we use g_malloc0 to set everything to 0.

(cherry picked from commit 981979bb39)
2022-11-08 16:57:44 -05:00
Anders Jonsson
b5178c5691 Update Swedish translation 2022-11-07 16:30:56 +00:00
Daniel Novomeský
c8fead2775 CI: add libheif-dev, libjxl-dev dependencies 2022-11-07 15:42:12 +01:00
Daniel Novomeský
2dd68ad1ee plug-ins: backport JPEG XL metadata import
and increase libjxl requirement to 0.7.0
2022-11-07 15:42:12 +01:00
Luming Zh
60cbb99479 Update Chinese (China) translation 2022-11-02 20:26:21 +00:00
Yuri Chornoivan
a1aea9e9fa Update Ukrainian translation 2022-11-01 20:44:14 +00:00
Rodrigo Lledó
61359eba18 Update Spanish translation 2022-11-01 10:51:18 +00:00
Jacob Boerema
5481b110f9 plug-ins: fix crash when reading corrupt flame settings file
Thanks to a report by Stefan Cornelius, we became aware that the flame
plug-in does no checking for correct input when loading a pre-saved
settings file.

I reworked the parser to read one or more values based on the type of
token, making sure we also don't read past the end of our token buffer.

All int values have a min and max value set. If any unexpected input is
encountered, we will give a warning.

(cherry picked from commit 89c83ef4c7)
2022-10-31 14:40:01 -04:00
Jacob Boerema
b36cc3ab3f plug-ins: fix missing input buffer length checking in flame
The flame plug-in can read stored settings from a file. The expected
input is that a ; signifies the end of input.

However, with user input we cannot depend on this to be true, so we need
to make sure that we do not read past the end of our input buffer.
To do so, we add a length check.

(cherry picked from commit 536c7cbc4b)
2022-10-31 14:39:54 -04:00
Jacob Boerema
b3186d72ee plug-ins: fix failure to load flame saved settings from file
We were using the plug-in name with underscores, which is incorrect.
Since nobody ever complained about this, this doesn't seem to be used
very often.

We will use the const that defines the plug-in name instead.

(cherry picked from commit 193596397e)
2022-10-31 14:39:45 -04:00
Piotr Drąg
792d7a4114 Update Polish translation 2022-10-30 13:12:32 +01:00
Martin
7a83ea6dbb Update Slovenian translation 2022-10-26 21:30:00 +00:00
Alx Sa
a53c84c244 plug-ins: fix #8127 Option to load reduced TIFFs
Adds a toggle to let users load TIFF pages with FILETYPE_REDUCEDIMAGE
tags. The specs do not state that these are always thumbnails, and they 
may have other uses. We assume that if only one page with this metadata
exists then it is a thumbnail; otherwise, the toggle option is 
enabled on load.
2022-10-26 18:16:41 +00:00
Zurab Kargareteli
0015eaf19c Update Georgian translation 2022-10-24 21:18:55 +00:00
Jacob Boerema
adc1419881 app: remove duplicate GIMP_HELP_TOOL_CURVES define
This caused a missing documentation warning for help id gimp-tool-curves
in gimp-help.

(cherry picked from commit 6cb58fbc8d)
2022-10-15 16:33:01 -04:00
Jacob Boerema
2beaee0a65 app: remove unused GIMP_HELP_TOOLS_DIALOG help id
This help id was used in the past but all references to it were removed
long ago with commit c53113d0cc.

Let's remove this define too since it causes a warning in gimp-help when
checking for help id's without documentation.

(cherry picked from commit 4b4dd5ec38)
2022-10-15 14:05:50 -04:00
Luca Bacci
11e063e416 Fix build on Windows by removing include of a missing header file
That was a mistake made when backporting a feature from GIMP3,
see https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/755
2022-10-11 15:03:59 +02:00
Jehan
555efb528d libgimpwidgets: fix automake syntaxe.
Automake doesn't accept the "if else" syntax. Instead, we must add a new if/else
inside the first else block.

While I'm at it, I also add a G_GNUC_INTERNAL to the internal function
_gimp_pick_button_win32_pick(), though I don't think it's absolutely necessary
(yet explicit is better).

(cherry picked from commit 8ac5178214)
2022-10-11 00:34:19 +02:00
Marco Ciampa
031ba6a258 Updated Italian translation 2022-10-10 09:39:01 +02:00
Marco Ciampa
90c3e4a8e4 Updated Italian translation 2022-10-10 09:33:16 +02:00
Luca Bacci
744115bac2 Add GimpPickButton implementation for Windows
Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/8506
2022-10-07 17:51:32 +02:00
Luca Bacci
d1f173938a Fix warning about using %d format modifier for an unsigned type
GetLastError () returns a DWORD, which is a typedef for a 32 bit
unsigned integral.
2022-10-07 17:50:49 +02:00
Tim Sabsch
011d46e220 Update German translation 2022-09-27 16:14:40 +00:00
Balázs Úr
65c66756cf Update Hungarian translation 2022-09-19 22:54:03 +00:00
Anders Jonsson
b25e219c46 Update Swedish translation 2022-09-10 11:30:41 +00:00
Sveinn í Felli
2d45e7e335 Update Icelandic translation 2022-09-08 16:54:01 +00:00
Lukas Oberhuber
4d61f0d129 gimp-updates: fix update checks on macOS
Update processing has to be done on the main thread to avoid
problems with GTK thread safety.

(cherry picked from commit 7f257a3a33)

Conflicts fixed:
	app/gimp-update.c
2022-09-07 00:34:29 +02:00
Jehan
e4a9f1b35a app, autotools: new GIMP_RELEASE macro.
We were using GIMP_UNSTABLE extensively to differentiate development
from stable code. But there is actually another level of development
code. Basically GIMP_UNSTABLE tells you are on the development branch,
e.g. for current branches, that you are on 2.99.* versions (vs. 2.10).
This depends on the minor version oddness.

GIMP_RELEASE will tell you if it's a release or a in-between-releases
code. This works with the micro version which must be even on release.
Any odd number means you are basically using random git code.

There can be any combination of GIMP_RELEASE and GIMP_UNSTABLE. For
instance 2.99.12 is a release of the unstable branch, whereas 2.10.33 is
development code of the stable branch.

I use this first in the update code as we were using GIMP_UNSTABLE for
both concepts but it made it harder to test. Now:

* GIMP_DEV_VERSIONS_JSON environment variable is only available on
  development code, not on release (whether stable or unstable).
* The weekly check limitation is also only for releases (dev code just
  check at every startup to quickly detect issues and regressions).
* Whether to look on testing website or public website json file depends
  on the code being a release or not.
* Finally only whether to check "DEVELOPMENT" or "STABLE" sections in
  the json file depends on whether we are on stable or unstable
  branches.

(cherry picked from commit fbb5b40345)
2022-09-05 22:55:47 +02:00
Jehan
7809cbf09d app: also properly check updates for "source" platform family.
I.e. non-macOS and non-Windows. For these, we don't really care about
the startup check usually (which is normally disabled anyway, at least
as a default), but we still care about the version check to work when
explicitly requested through the "About" dialog's button.
2022-09-05 16:39:28 +02:00
Lukas Oberhuber
b391f9f5c8 check_for_updates: fixes update check macos #7325
This was not working due to a missing port in glib.

Potentially could be contributed upstream to GLib.
2022-09-05 13:35:35 +00:00
Luming Zh
3622b39862 Update Chinese (China) translation 2022-09-04 18:17:07 +00:00
Hugo Carvalho
d6cdbdebb3 Update Portuguese translation 2022-09-02 13:44:46 +00:00
Piotr Drąg
51814400b7 Update Polish translation 2022-08-28 15:25:31 +02:00
Martin
36e0690c37 Update Slovenian translation 2022-08-26 12:03:20 +00:00
Yuri Chornoivan
31c75c69aa Update Ukrainian translation 2022-08-25 20:13:12 +00:00
Jacob Boerema
0204f0df44 plug-ins: improve formatting and comments related to resolution export ...
for PSD's

(cherry picked from commit fac6b2f3f1)

# Conflicts:
#	plug-ins/file-psd/psd-save.c
2022-08-24 15:49:37 -04:00
Jacob Boerema
12de7b8a97 plug-ins: fix #8508 Print exporting to PSD seems to export as cm ...
and import as inches

When GIMP's display unit was mm, our PSD export converted the X and Y
resolution as if a conversion from mm to inch was needed.

However, PSD's resolution is always measured in pixels per inch, so a
conversion is never necessary.
Removing the conversion, resolves the issue.

(cherry picked from commit 24886f91b1)
2022-08-24 15:48:55 -04:00
Jehan
6e91d246f7 Issue #8505: WEBP, be more informative with error.
Add the info about max dimension of WebP with WEBP_MAX_DIMENSION macro.

There is also a test about (picture->width / 4 > INT_MAX / 4), resp.
height, but this should anyway never happen as the C spec says the
smaller range for int is [-32767, 32767], which is an order bigger than
the current WEBP_MAX_DIMENSION (16383).
So we are probably fine assuming all VP8_ENC_ERROR_BAD_DIMENSION errors
will happen because of WEBP_MAX_DIMENSION.

(cherry picked from commit dfb7d2543a)
2022-08-24 12:33:21 +02:00
Jehan
6c9089ed39 Issue #6778: Colorpicker (from Colors dockable) shows wrong color.
Actually our X11 implementation is right, and the implementation from
the Freedesktop portal is "as far as it can do", i.e. that we get the
returned RGB value, which is unfortunately in display space. And it
doesn't return any space information together (we don't even know which
display the color comes from, in multi-display setups).

Therefore let's check if we are running GIMP on X11 and if so, let's
call this implementation first.

See this report on xdg-desktop-portal to get proper space info:
https://github.com/flatpak/xdg-desktop-portal/issues/862

(cherry picked from commit 9b21688501)

Cherry-pick note: GIMP 2.10 on Linux will just run on X11 even inside
Wayland (XWayland) so there is no need to check anymore if we are
actually running on X11 with GDK_IS_X11_DISPLAY() (to be more accurate:
you can't on GDK 2!). So now if X11 is compiled in, we simply use the
default color-picking implementation and drop portal calls. As simple as
that.
2022-08-24 12:32:49 +02:00
Jacob Boerema
8f169eb61c plug-ins: fix #8467 "incorrect value RichTIFFIPTC" when loading TIFF ...
created by Adobe Lightroom 5.1

Adobe products are known to write incorrect RichTIFFIPTC tags in TIFF
images.

Since libtiff correctly detects and handles this there is no real need
for end users to be warned. So instead of a warning we will only output
a message to stderr.

(cherry picked from commit 0ad54f863a)
2022-08-23 18:01:41 -04:00
Jacob Boerema
9829679e6d plug-ins: check for invalid resolution when loading TIFF image
This is essentially the same check as done in gimp_image_set_resolution,
but doing it here means we can load the image instead of throwing an
error.

We still need to get replacement xres and yres values, because these are
used to compute layer_offset_x_pixel and layer_offset_y_pixel.

(cherry picked from commit ced071a8ee)
2022-08-23 18:01:29 -04:00
Jacob Boerema
e2048249c9 plug-ins: fix GIMP becoming unresponsive due to corrupt image
Image m2-d0f86ab189cbe900ec389ca6d7464713.tif from the imagetestsuite
is a fuzzed image with an invalid very high number for the channel count.

This causes GIMP to become unresponsive for a very long time. Possibly
trying to allocate memory for all channels or another cause related to
the high number of channels.

Let's go for a more "reasonable" limit of 99 channels like we also do
for Photoshop images and show a message when we find an image with more
channels.

(cherry picked from commit 18d466df7f)
2022-08-23 18:01:16 -04:00
Jacob Boerema
9e9d6c0b9d plug-ins: fix crash when loading multi page TIFF images in non interactive mode
When loading a TIFF image using a script/plug-in in non interactive mode,
we did not initialize the list of pages, causing a crash when trying to
access it.

So, always initialize this list when non interactive.

(cherry picked from commit 853e9d5cb4)
2022-08-23 18:01:02 -04:00
Jacob Boerema
a8e8be0249 plug-ins: fix TIFF warnings about unknown tags not filtered out anymore
Due to a change in the format string in libtiff, warnings about unknown
fields were not filtered out anymore.

Adjust our filtering of warning messages so we catch this again since
end-users don't need to worry about this and we don't need the
possible extra issues.

(cherry picked from commit ac5a6e56b7)
2022-08-23 18:00:48 -04:00
Sabri Ünal
982881d612 Update Turkish translation 2022-08-21 17:57:12 +00:00
Sabri Ünal
1ca2cbae25 Update Turkish translation 2022-08-21 17:46:32 +00:00
Sabri Ünal
3023732663 Update Turkish translation 2022-08-21 17:46:10 +00:00
Sabri Ünal
cba686a150 Update Turkish translation 2022-08-21 17:44:52 +00:00
Sabri Ünal
976735427f Update Turkish translation 2022-08-21 17:29:37 +00:00
Sabri Ünal
2367e364a9 Update Turkish translation 2022-08-21 17:28:14 +00:00
Zurab Kargareteli
b84e15f512 Update Georgian translation 2022-08-18 14:27:36 +00:00
Milo Ivir
eaf9194586 Update Croatian translation 2022-08-17 00:35:25 +00:00
Jacob Boerema
8352d80de6 plug-ins: fix #8411 crash when attempting to open PSD
Apparently some layers in PSD files can have extra channels which we
did not account for when computing destination offsets, causing crashes.

So let's make sure we don't include the "extra" channels when computing
the offsets by introducing base_channels. We also move the alpha channel
in the spot of the first extra channel (even though it seems, based on
the one example we have, that the extra channel might be the same as
the alpha channel).

(cherry picked from commit 5fbd06629d)

# Conflicts:
#	plug-ins/file-psd/psd-load.c
2022-08-03 19:12:50 -04:00
Anders Jonsson
4891eb71a2 Update Swedish translation 2022-08-03 11:50:52 +00:00
Zurab Kargareteli
f4191a0317 Update Georgian translation 2022-07-23 13:59:34 +00:00
Zurab Kargareteli
72e8ca4cb6 Update Georgian translation 2022-07-22 14:36:53 +00:00
Øyvind Kolås
49052aeaaf configure, app: depend on GEGL-0.4.38 2022-07-21 22:52:07 +02:00
Marco Ciampa
0c5e109dd5 Small fix in Italian translation 2022-07-09 00:16:14 +02:00
Marco Ciampa
1463e6247b Small fix in Italian translation 2022-07-08 23:57:47 +02:00
Marco Ciampa
6f8ad09ff0 Small fix in Italian translation 2022-07-03 15:05:37 +02:00
Tim Sabsch
4596696ebd Update German translation 2022-06-30 19:40:46 +00:00
Marco Ciampa
ae38799ef2 Updated Italian translation 2022-06-30 11:03:16 +02:00
Tim Sabsch
204f14e1bf Update German translation 2022-06-19 15:25:06 +00:00
Jehan
dd2fc60e6a configure: post-release version bump to 2.10.33. 2022-06-17 22:17:28 +02:00
Rodrigo Lledó
7504db77fa Update Spanish translation 2022-06-16 14:11:19 +00:00
Rodrigo Lledó
b5adb24473 Update Spanish translation 2022-06-16 13:58:12 +00:00
Daniel Novomeský
7fae471426 plug-ins: ensure that metadata correspond to real image size 2022-06-16 14:02:45 +02:00
Jehan
0963550b2d Issue #7091: Exporting 16-bit precision images to raw *.data.
Just use the image format as-is. The only problem now is that we don't
support all formats for loading in file-raw yet.

(cherry picked from commit 01e0675f67)

 Conflicts:
	plug-ins/common/file-raw-data.c
2022-06-15 22:51:00 +02:00
Jehan
7ef2c62db5 Issue #8271: Export as DDS Seems Untranslated on All Languages. 2022-06-15 18:49:27 +02:00
Milo Ivir
d6bbd9fb01 Update Croatian translation 2022-06-15 07:49:05 +00:00
Milo Ivir
220053c036 Update Croatian translation 2022-06-15 07:46:57 +00:00
Jehan
2ea287125f configure: release GIMP 2.10.32. 2022-06-12 20:43:03 +02:00
Jehan
54765d3b91 NEWS: update. 2022-06-12 20:22:39 +02:00
Balázs Úr
a251c4e819 Update Hungarian translation 2022-06-10 23:02:17 +00:00
Balázs Úr
3ad6b2aa0d Update Hungarian translation 2022-06-10 22:17:13 +00:00
Alan Mortensen
46ae2204c0 Update Danish translation 2022-06-10 16:37:10 +00:00
Alan Mortensen
7718d9726b Update Danish translation 2022-06-10 16:34:38 +00:00
Alan Mortensen
11245114f7 Update Danish translation 2022-06-10 16:32:51 +00:00
Hugo Carvalho
9d0f920691 Update Portuguese translation 2022-06-09 23:05:46 +00:00
Boyuan Yang
2ef41625da Update Chinese (China) translation 2022-06-09 21:31:14 +00:00
Boyuan Yang
72446d4108 Update Chinese (China) translation 2022-06-09 21:22:33 +00:00
Martin
9de50fa42d Update Slovenian translation 2022-06-09 21:06:00 +00:00
Martin
04a10e2a54 Update Slovenian translation 2022-06-09 20:59:54 +00:00
Anders Jonsson
7cf888de3e Update Swedish translation 2022-06-09 18:50:07 +00:00
Marco Ciampa
b23ec8f4fc Updated Italian translation 2022-06-09 17:00:00 +02:00
Yuri Chornoivan
0ee58e722a Update Ukrainian translation 2022-06-09 14:27:03 +00:00
Piotr Drąg
e38661af31 Update Polish translation 2022-06-09 13:31:24 +02:00
Piotr Drąg
fecb490402 Update POTFILES.in 2022-06-09 12:28:19 +02:00
Anders Jonsson
286b5200d2 Update Swedish translation 2022-06-08 22:16:36 +00:00
Jacob Boerema
c34a6c7d87 plug-ins: fix not converting 8 bps grayscale MINISWHITE TIFF
We only set tiff_mode for images with bps < 8, but we also use it for
8 bps grayscale images to detect if MINISWHITE needs to be converted.

So, let's always set tiff_mode for PALETTE, MINISBLACK and MINISWHITE.

(cherry picked from commit 2e4b9bcba7)
2022-06-08 14:34:36 -04:00
Jordi Mas
e4ae40c1d1 Update Catalan translation 2022-06-08 19:56:39 +02:00
Jacob Boerema
b061fac229 plug-ins: fix #1790 Artifacts when opening tif images ...
generated by matlabs blocproc function

Based on the suggested solution by Massimo, we should not compute the
remaining pixels per line but only at the end of the whole block, be it
tile or scanline.

I have not been able to find bw or palette examples that use load_separate
instead of load_contiguous, so that case is not tested. But, it also
doesn't make much sense to have planar when you have just one plane.

(cherry picked from commit 94de89febf)
2022-06-08 13:29:04 -04:00
Jacob Boerema
95f0822fc3 plug-ins: fix #6766 TIFF B/W image opened as grayscale and not index map
In a previous commit 1, 2 and 4-bit B/W images were converted to grayscale.
However, it seems that there is more of a use case for these images to be
handled as indexed, even though technically they can be considered
grayscale.
Also, the only way to export these images again in the same format, is to
have them as indexed.

So, let's change this back, so that these kind of images will be opened
as indexed. With a reminder that in the future we could add an option
at loading time where the user can choose whether they prefer it to be
loaded as indexed or grayscale.

We use grayscale mappings, that we moved in the previous commit, to
add a palette to these grayscale images.

(cherry picked from commit 3e6237030c)
2022-06-08 13:28:37 -04:00
Jacob Boerema
ddc75a5617 plug-ins: move static variables for grayscale mapping to the top
In preparation of using some of them earlier, we move the variables
used for grayscale mapping of 1, 2 and 4-bit per pixel images to the
top of file-tiff-load.

(cherry picked from commit 11ef2e4432)

# Conflicts:
#	plug-ins/file-tiff/file-tiff-load.c
2022-06-08 13:28:25 -04:00
Jiri Grönroos
9f17513c85 Update Finnish translation 2022-06-08 17:09:50 +00:00
Jiri Grönroos
5d34a88fc0 Update Finnish translation 2022-06-08 16:53:58 +00:00
Jiri Grönroos
bb747359ad Update Finnish translation 2022-06-08 16:46:01 +00:00
Jiri Grönroos
55fd1ead15 Update Finnish translation 2022-06-08 16:42:44 +00:00
Marco Ciampa
912b0d479e Updated Italian translation 2022-06-08 14:47:10 +02:00
Hugo Carvalho
d198586af4 Update Portuguese translation 2022-06-08 10:49:36 +00:00
Yuri Chornoivan
35fded975b Update Ukrainian translation 2022-06-08 05:50:43 +00:00
Jehan
4fbc497c28 desktop: adding a <release> tag for GIMP 2.10.32. 2022-06-08 00:34:54 +02:00
Jehan
07f6b8a007 NEWS: update. 2022-06-08 00:05:41 +02:00
Jehan
42977f1c78 build: fix Windows installer language lists.
Georgian translation was added today and Galician in March.
2022-06-07 23:58:31 +02:00
Jehan
654571a50e build: add an option in the Windows installer to disable update check.
This will allow to use the official Windows installer directly in the
Windows Store, as per the new proposed workflow by Microsoft.

Nevertheless our GIMP for Windows has a built-in update check which
would check if a new version exist and warn people (advising them to go
on the website and download the new installer to update). We obviously
don't want this on the Windows Store which has its own update channel.
It would be confusing.

Therefore I added a feature to disable the built-in update check (not
even showing in Preferences) by tweaking a single package variable. The
installer now comes with new option /DISABLECHECKUPDATE=true which will
add said variable.

(cherry picked from commit 10145bb938)
2022-06-07 23:36:53 +02:00
Martin
32ffd69faa Update Slovenian translation 2022-06-07 14:40:08 +00:00
Hugo Carvalho
85128072af Update Portuguese translation 2022-06-07 13:46:40 +00:00
Zurab Kargareteli
915e1bfc27 Add Georgian translation 2022-06-07 03:59:18 +00:00
Zurab Kargareteli
be6631d607 Add Georgian translation 2022-06-07 03:54:49 +00:00
Zurab Kargareteli
162c84e25e Add Georgian translation 2022-06-07 03:51:06 +00:00
Jacob Boerema
34502e3829 libgimp: fix #1632 GIMP should not write to IPTC tag DateCreated
GIMP was saving the last changed/saved date to IPTC tag DateCreated,
which should only be used for the original creating date of the image
and thus should not be changed by GIMP.

After discussion in the cited issue, there is no tag in IPTC that we can
use, so we remove saving modified date from the IPTC metadata.

Instead we add two XMP tags, one for modified date and the other for the
date that metadata was changed. Since we do both when exporting, both are
saved with the same date/time in ISO 8601 format.

This also fixes another issue where we were not storing the timezone offset
for Xmp.tiff.DateTime. Since this has the same format as the other
XMP tags, we fix this together with this issue.
2022-06-06 21:34:34 -04:00
Alx Sa
0634bf3da9 plug-ins: fix #1106 Add CMYK/A loading for TIFFs
Adds support for loading 8 and 16 bit CMYK/A TIFF files with
attached color profiles.
2022-06-06 10:08:04 +00:00
Yuri Chornoivan
faee5af33a Update Ukrainian translation 2022-06-06 09:03:33 +00:00
Jehan
20b218e5a2 app: allow to disable the new version check altogether through a key…
… in the gimp-release file.

This will be useful to disable the update check for the Windows Store
even though we use the same build as the installer. All it will take
will be to append the line `check-update=false` to the file
`share/gimp/2.10/gimp-release` and it will behave as though the update
check is disabled (even though it is actually built-in).

(cherry picked from commit 9ef10c8764)

Conflicts fixed:
	app/dialogs/preferences-dialog.c
2022-06-06 01:11:29 +02:00
Jacob Boerema
7449594336 app: check for invalid offsets when loading XCF files
More safety checks for detecting broken xcf files, also based on examining
issue #8230.

After reading an offset where layer, channel, etc. data is stored, we
add a check to make sure that offset is not before where we read the
offset value. Because the data is always written after the offset that
points to it.

(cherry picked from commit a842869247)
2022-06-05 18:55:26 -04:00
Jacob Boerema
e7d4b580e5 app: check max dimensions when loading xcf files
Improvements in loading broken xcf files, based on examining issue #8230.
Besides checking for a minimum width and height, GIMP also has a maximum
size we can and should check.

In the case of the image itself, we change invalid dimensions to a size of
1 in hope that the individual layers etc will have the correct size.
For layer, we will also try to go on, but for channel and layer mask, we
will give up.

(cherry picked from commit 24c962b95e)
2022-06-05 18:55:16 -04:00
Jacob Boerema
6ab90ecbbd app: fix #8230 crash in gimp_layer_invalidate_boundary when channel is NULL
gimp_channel_is_empty returns FALSE if channel is NULL. This causes
gimp_layer_invalidate_boundary to crash if the mask channel is NULL.

With a NULL channel gimp_channel_is_empty should return TRUE, just like
the similar gimp_image_is_empty does, because returning FALSE here
suggests we have a non empty channel.

(cherry picked from commit 22af0bcfe6)
2022-06-05 18:54:20 -04:00
Anders Jonsson
5f4eea011b Update Swedish translation 2022-06-05 22:11:22 +00:00
Anders Jonsson
072bb68039 Update Swedish translation 2022-06-05 20:00:22 +00:00
Nikc
3a22719e68 plug-ins: fix #4492 Add export options
Adds a new option to flip the image on export. This allows for
direct imports into certain DirectX engines without altering the
project file. It also adds a new option to save all visible layers on
export, again to avoid altering the user's project file.
2022-06-05 18:19:59 +00:00
Nikc
8ac561458f plug-ins: Issue #6753 Add toggle for metadata
Backports option from master to toggle whether IPTC and thumbnails
are saved on export. Note that in webp format, IPTC data is saved
via XMP, so if XMP is not saved, IPTC option is deactivated.
2022-06-05 17:22:51 +00:00
Jehan
90f5ce7863 NEWS: update. 2022-06-05 13:52:21 +02:00
Zurab Kargareteli
300905ee50 Update Georgian translation 2022-06-05 06:07:00 +00:00
Daniel Novomeský
17fd249394 JPEG XL import support
JXL import is backported from GIMP 2.99
Added .jxl association for Windows installer
It was necessary to adjust plugin-defs.pl for HEIF plugin,
because necessary dependencies were missing there.
2022-05-31 18:23:50 +02:00
Tim Sabsch
e0cd10092b Update German translation 2022-05-29 05:07:44 +00:00
Jacob Boerema
d9c9ef7902 app: fix #6961 Scaled image bug
With large image sizes a 32-bit int is not enough for the intermediate
computations, which byte per pixel, width and height are.

So, just like the function below it does: gimp_gegl_pyramid_get_memsize,
we will cast these to gint64.

Thanks to Massimo Valentini for finding the cause.

(cherry picked from commit ba841a98da)
2022-05-28 12:17:30 -04:00
Jordi Mas
d0a6067fbb Update Catalan translation 2022-05-27 07:40:33 +02:00
Rodrigo Lledó
919c3ffa91 Update Spanish translation 2022-05-25 12:25:29 +00:00
Sabri Ünal
689b6cb9fd Update Turkish translation 2022-05-24 07:44:51 +00:00
Sabri Ünal
1cd45a7c2e Update Turkish translation 2022-05-24 07:40:50 +00:00
Luming Zh
25ce20c4bd Update Chinese (China) translation 2022-05-23 22:14:58 +00:00
Martin
4aeaedd3a4 Update Slovenian translation 2022-05-23 15:38:04 +00:00
Piotr Drąg
a742bc1b30 Update Polish translation 2022-05-22 14:58:27 +02:00
Sabri Ünal
5fb8cf568b MR !160: Arguments in wrong order 2022-05-22 10:26:19 +00:00
Jehan
973963ff76 NEWS: update. 2022-05-19 11:34:24 +02:00
Anders Jonsson
faf4d5ee9b Update Swedish translation 2022-05-18 22:11:56 +00:00
Hugo Carvalho
48daf4a635 Update Portuguese translation 2022-05-18 14:34:26 +00:00
Yuri Chornoivan
4958a2bc54 Update Ukrainian translation 2022-05-18 06:22:13 +00:00
Nikc
c51e5cbafa (Backport) Issue #4: Enable loading transparent .EPS files 2022-05-17 22:06:44 +00:00
Jacob Boerema
db236dcff8 plug-ins: remove unnecessary Windows specific code in tinyscheme
Removal of the snprintf define was also part of the UCRT Windows patch
in MINGW. Although it builds fine without this change, there is no need
anymore to redefine snprintf. In addition, I seem to remember that
_snprintf had a shortcoming.

So let's remove the Windows specific code, since it works fine without it.

(cherry picked from commit e268d38fb1)
2022-05-17 17:25:10 -04:00
Jacob Boerema
08ba94c652 plug-ins: fix Windows build in UCRT environment
The UCRT environment is a successor to the MINGW environment on Windows
with a more modern C runtime library.
Building under UCRT we get this error:
../../gimp/plug-ins/file-raw/file-darktable.c:420:7: error:
 function '__p__environ' is initialized like a variable"

To fix this we use the relevant part of patch 6 from:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-gimp

(cherry picked from commit ef817dc452)
2022-05-17 17:24:58 -04:00
Jacob Boerema
bb76dad358 plug-ins: fix #1351 Raw Data Import Creates Blank/White Image...
when Offset and Dimensions Bigger than File Size.

If we didn't read the exact amount of bytes, the whole image would be
filled with white.

Let's change this, so we read as much bytes as we can, and fill the rest
with white.

(cherry picked from commit 3644b9010a)
2022-05-16 14:01:18 -04:00
Aleksandr Melman
8089a4f8c4 Update Russian translation 2022-05-15 14:17:19 +00:00
Piotr Drąg
56ba6f8e30 Update Polish translation 2022-05-15 14:16:14 +02:00
Martin
9dec273d21 Update Slovenian translation 2022-05-11 09:58:03 +00:00
Hugo Carvalho
626a485fdf Update Portuguese translation 2022-05-10 21:13:48 +00:00
Rodrigo Lledó
2111dc38fd Update Spanish translation 2022-05-10 13:07:46 +00:00
Yuri Chornoivan
d30af62635 Update Ukrainian translation 2022-05-09 20:05:31 +00:00
Anders Jonsson
493e598553 Update Swedish translation 2022-05-09 18:19:14 +00:00
Jehan
5a840723a2 plug-ins: sync the BigTiff warning as in the main dev branch. 2022-05-09 19:43:48 +02:00
Nikc
9b807a09b4 plug-ins: Port BigTIFF save option from dev 2022-05-09 16:58:54 +00:00
Rafał Mikrut
bfc59da987 Cppcheck fixes
(cherry picked from commit 3e35fe4d80)

# Conflicts:
#	app/widgets/gimpcolordialog.c
#	libgimpwidgets/gimpchainbutton.c
2022-05-06 15:10:06 -04:00
Aleksandr Melman
dda9339969 Update Russian translation 2022-05-05 13:04:29 +00:00
Jacob Boerema
8cd6d05232 app: fix #8120 GIMP 2.10.30 crashed when allocate large memory
GIMP could crash if the information regarding old path properties read
from XCF was incorrect. It did not check if xcf_old_path succeeded and
kept trying to load more paths even if the last one failed to load.

Instead we now stop loading paths as soon as that function fails.
In case we have a failure here we also try to skip to the next property
based on the size of the path property, in hopes that the only problem
was this property.

(cherry picked from commit 4f99f1fcfd)
2022-04-29 16:44:23 -04:00
Jacob Boerema
6c7da6729a plug-ins: fix #3964 Incorrect position when printing
This was a long standing issue where the image was not printed at the
position as selected in our print preview.

The problem being that we do not take into account the dpi of the print
context we are printing to, but instead always assumed 72.
This is the fix that was suggested by Massimo.

(cherry picked from commit 0e462440cc)
2022-04-29 13:01:25 -04:00
Stanislav Grinkov
520835ede4 icons: Issue #4095. Add a thin contrast border for 'close' and 'detach' color theme icons…
…to improve their readability against dark backgrounds on mouse-hover.

Resolves: #4095 (GNOME gitlab tracker)
2022-04-26 23:56:38 +06:00
Stanislav Grinkov
b0ca7ff065 themes: Issue #4095. Add a on-hover effect to the menu-item …
… radio buttons to improve their readability against dark backgrounds.

Dark theme only.
2022-04-26 23:55:21 +06:00
Jacob Boerema
96edeb02a4 plug-ins: fix integer overflow in print-draw-page.c
As mentioned by Massimo in issue #6618, part of the problem there is an
integer overflow when using large size images when computing the offset
in pixels.

Let's fix our part of the problem by casting to guint64.
Besides that, also use casts to correctly compute progress for very
large images.

(cherry picked from commit cd4401fee4)
2022-04-25 14:24:09 -04:00
Jehan
f7e7f396aa libgimpcolor: fix call to cmsCreateProofingTransform().
Wrong argument order! See Little-CMS API.

(cherry picked from commit 1a840b8e18)
2022-04-24 21:22:25 +02:00
Aleksandr Melman
8e058220e5 Update Russian translation 2022-04-24 16:36:44 +00:00
Jordi Mas
0af9be50ad Update Catalan translation 2022-04-21 22:48:08 +02:00
Aleksandr Melman
8ff3b8a68a Update Russian translation 2022-04-17 18:47:04 +00:00
Sveinn í Felli
abbe29d754 Update Icelandic translation 2022-04-12 13:27:32 +00:00
Sveinn í Felli
08ffe4ae06 Update Icelandic translation 2022-04-12 13:15:10 +00:00
Sveinn í Felli
60e8093c4e Update Icelandic translation 2022-04-12 10:19:44 +00:00
Sveinn í Felli
900a2ebd0a Update Icelandic translation 2022-04-12 10:07:01 +00:00
Jehan
a7ff6ad95a NEWS: update. 2022-04-07 23:11:38 +02:00
Sveinn í Felli
f4129d3d54 Update Icelandic translation 2022-04-07 10:52:28 +00:00
Sveinn í Felli
c2bd3b916c Update Icelandic translation 2022-04-07 10:34:29 +00:00
Hannie Dumoleyn
af96b663d2 Update Dutch translation 2022-04-06 15:58:57 +00:00
Sveinn í Felli
998cb97dec Update Icelandic translation 2022-04-06 14:02:24 +00:00
Sveinn í Felli
cc6af232f0 Update Icelandic translation 2022-04-06 13:14:54 +00:00
Sveinn í Felli
744dc73e77 Update Icelandic translation 2022-04-06 11:56:10 +00:00
Jacob Boerema
e4d8a91f89 app: fix #3928 GIMP cannot open .xcf
GIMP stopped trying to read the XCF as soon as an invalid parasite was
encountered. However, in this specific case only the parasite data is
invalid, while the rest of the image is not corrupt.

Instead of terminating when we see a corrupt parasite, we skip to the
offset after the parasite. This may still be corrupt, but we can handle
that correctly, see e.g. the XCF in bugzilla issue 685086, which was
the reason of some of the previous changes.

Additionally:
- We add some logging to make it easier to handle future issues in this
  area.
- We add tests for a NULL parasite name, and for reading a different
  amount of parasite data than we expected. In both cases we return
  NULL instead of a parasite.

(cherry picked from commit 5b39bc963d)
2022-04-05 12:27:20 -04:00
Jacob Boerema
8c1b71120e libgimpbase: fix #8025 Slow loading of XCF files...
with many Xmp.photoshop.DocumentAncestors tags

This is similar to #7464, but in this case the XMP metadata was already
included in an XCF image.

We check for the occurrence of Xmp.photoshop.DocumentAncestors and stop
handling values when there are more than a 1000.

It would be easier to just check length for all tags and always
ignore when there are more than a 1000 values.
But in that case we would need to be sure there are no valid reasons for
tags to occur more than a 1000 times. So let's just limit it to this
specific tag.

(cherry picked from commit cadf485299)

# Conflicts:
#	libgimpbase/gimpmetadata.c
2022-04-04 17:03:04 -04:00
Aleksandr Melman
6f44527206 Update Russian translation 2022-04-04 10:54:23 +00:00
Charles Monzat
1c7e073379 Update French translation 2022-04-02 10:17:35 +00:00
Nikc
a80cb30764 plug-ins: fixing function call parameters 2022-04-01 16:50:41 +00:00
Milo Ivir
2ab0b9c3db Update Croatian translation 2022-03-30 18:12:44 +00:00
Nikc
09eccc9989 Fixes issues with fade-out breaking the script 2022-03-30 16:40:35 +00:00
Nikc
fc5dfa1f75 pdb: Updating the parameter range for brightness 2022-03-30 16:40:35 +00:00
Anders Jonsson
7f2bcd5c40 Update Swedish translation 2022-03-29 19:39:32 +00:00
Jehan
6727336a35 NEWS: update. 2022-03-24 00:39:36 +01:00
Anders Jonsson
d16310ec49 Update Swedish translation 2022-03-22 16:56:28 +00:00
Stanislav Grinkov
d2aaa02673 themes: Issue #2000. Make Color theme H/V chain icons...
... visually distinguishable.

Reused (with a bit of modification) Symbolic theme svg hchain/vchain icons.
2022-03-22 00:53:38 +06:00
Balázs Úr
634f30135d Update Hungarian translation 2022-03-21 00:16:12 +00:00
Luming Zh
958dee47a6 Update Chinese (China) translation 2022-03-16 12:17:03 +00:00
Luming Zh
4c65dc413b Update Chinese (China) translation 2022-03-16 12:14:32 +00:00
Anders Jonsson
25841a209c Update Swedish translation 2022-03-15 19:43:30 +00:00
Luming Zh
67953cf49e Update Chinese (China) translation 2022-03-15 18:51:10 +00:00
Anders Jonsson
905ce5c7db Update Swedish translation 2022-03-15 15:47:17 +00:00
Fran Dieguez
d6b1243f39 Add Galician translation 2022-03-12 21:01:12 +00:00
Balázs Meskó
f9b9da63d4 Update Hungarian translation 2022-03-10 00:30:05 +00:00
Balázs Úr
a7e933e837 Update Hungarian translation 2022-03-10 00:07:45 +00:00
Aleksandr Melman
713c7bf6b1 Update Russian translation 2022-03-09 21:05:02 +00:00
Jehan
af8c44b015 NEWS: update. 2022-03-09 19:13:30 +01:00
Nikc
ad38193b08 Issue #2509: Adding support for 'locl' in Text Tool
(cherry picked from commit b48286009e)
2022-03-09 18:55:35 +01:00
Milo Ivir
082af52522 Update Croatian translation 2022-03-03 21:08:49 +00:00
Aleksandr Melman
59e46f4d5b Update Russian translation 2022-02-25 18:40:36 +00:00
Øyvind Kolås
d8ac0eb878 configure, app: depend on GEGL-0.4.36 2022-02-21 23:39:35 +01:00
Aleksandr Melman
e4c1d8cd09 Update Russian translation 2022-02-21 20:39:24 +00:00
Jordi Mas
52533860cb Update Catalan translation 2022-02-19 20:45:17 +01:00
Jordi Mas
3036fd9d2d Update Catalan translation 2022-02-19 20:43:02 +01:00
Anders Jonsson
1160f6fc8f Update Swedish translation 2022-02-18 20:45:51 +00:00
Anders Jonsson
8bfcaaa504 Update Swedish translation 2022-02-16 01:10:20 +00:00
Stanislav Grinkov
566ae757ed themes: issue #7303 Add on-hover indicator around...
eye and link toggles in Layer/Channel/Path Dialog tree-views.

Resolves: #7303
2022-02-13 20:14:34 +06:00
Nikc
1ce7888630 (Backport) Issue #491: Script-fu support for all BMP save features 2022-02-12 11:45:16 +00:00
Anders Jonsson
78f6812518 Update Swedish translation 2022-02-10 21:24:47 +00:00
smlu
d6355d667c Add parameter run_mode_param to register function
Fixed thumbnail loading procedure of OpenRaster plugin.
2022-02-10 20:05:25 +00:00
Tim Sabsch
5b131de5b2 Update German translation 2022-02-09 18:37:53 +00:00
Luming Zh
375da9f389 Update Chinese (China) translation 2022-02-09 18:34:26 +00:00
Lukas Oberhuber
44a594bde7 Fix 7801
Fix provided by @dnovomesky
2022-02-07 17:31:23 +00:00
Luming Zh
566af91d53 Update Chinese (China) translation 2022-02-03 03:47:45 +00:00
Nikc
8229194abf Issue #4107: Removing titlebar/borders from Windows Splash Screen (Backport) 2022-02-01 16:22:49 +00:00
Luming Zh
61282527fa Update Chinese (China) translation 2022-01-31 23:30:15 +00:00
Nikc
2c2a901301 Issue #6683: Set turbulence max-value to 7 per GEGL specs 2022-01-30 21:02:56 +00:00
Jacob Boerema
168a6db665 libgimp: fix previous commit, now hopefully correctly sorted 2022-01-30 15:13:55 -05:00
Jacob Boerema
45791001b3 libgimp: add missing gimp_plug_in_error_quark to gimp.def 2022-01-30 14:29:13 -05:00
Alan Mortensen
ea19156490 Updated Danish translation of gimp-windows-installer 2022-01-30 12:35:07 +01:00
Alan Mortensen
0ccd9fc147 Updated Danish translation of gimp-python 2022-01-30 12:35:05 +01:00
Alan Mortensen
4cfb0c1f11 Updated Danish translation of gimp-plug-ins 2022-01-30 12:35:02 +01:00
Alan Mortensen
7b9c4b518c Updated Danish translation of gimp-libgimp 2022-01-30 12:35:00 +01:00
Alan Mortensen
755b7df744 Updated Danish translation 2022-01-30 12:34:57 +01:00
Rodrigo Lledó
0035486e37 Update Spanish translation 2022-01-27 10:18:11 +00:00
Rodrigo Lledó
5ed65d2c4e Update Spanish translation 2022-01-27 10:07:23 +00:00
Matej Urbančič
5833c456e2 Update Slovenian translation 2022-01-24 19:59:48 +00:00
Piotr Drąg
ca7e1a2c37 Update Polish translation 2022-01-23 12:33:46 +01:00
Anders Jonsson
0e4908e199 Update Swedish translation 2022-01-21 20:25:12 +00:00
Hugo Carvalho
814a0a82d8 Update Portuguese translation 2022-01-19 16:18:38 +00:00
Jehan
cba95c1e24 NEWS: update. 2022-01-19 15:57:48 +01:00
Jehan
b2b2a741d2 build: no need to chmod the test file which is already executable.
Also when working on out-of-tree builds, it would not find the file
anyway and we get this output:

> chmod: cannot access 'test-installer-langs.sh': No such file or directory

Though this was not breaking the tests, it has clearly been useless
until we see this one today.

(cherry picked from commit 201cbe7e3e)
2022-01-19 15:42:20 +01:00
Jehan
d3950ab0c9 plug-ins: fix backported DICOM patch.
Commit b44e7daf4c was closing a non-existing `dicom` variable. It was
named `DICOM` in the gimp-2-10 branch.
2022-01-19 14:55:57 +01:00
Jehan
ab582b0e56 libgimp: new gimp_plug_in_error_quark() / GIMP_PLUG_IN_ERROR.
We heavily rely on GError in libgimp to retrieve plug-in error messages.
In a lot of our code, we just use domain=0 for g_set_error*() functions
and alike, but this is actually forbidden and results in GLib warnings.

Some plug-ins instead create their own domain, other use G_FILE_ERROR
nearly everywhere, even in some cases where the choice is really
questionable. Since anyway this is mostly useful for passing the error
message through, it is much nicer to provide a generic domain
GIMP_PLUG_IN_ERROR, which can be used by all plug-ins when they don't
want to bother with the error domain.

Note: basically a copy-paste from commit 3f9c736592 which could not be
cherry-picked as surrounding code is completely different.
2022-01-19 14:52:06 +01:00
Nikc
d0690f3c40 Issue #4009: enables option to capture cursor in screenshot (Windows)
(cherry picked from commit 94c7f80282)
2022-01-19 14:18:27 +01:00
Yuri Chornoivan
ab0ddf1e0a Update Ukrainian translation 2022-01-19 11:11:52 +00:00
Jacob Boerema
a8ccd5801f plug-ins: incorrect label in file-raw export dialog
In issue #7528 the wrong export dialog label "RGB Save Type" caused
confusion.
Let's change it to "Palette Type", the same as it is in our master branch.
2022-01-18 18:18:17 -05:00
Yuri Chornoivan
ac1cd9147c Update Ukrainian translation 2022-01-18 22:53:44 +00:00
Jacob Boerema
b44e7daf4c plug-ins: fix #7524 DICOM File is broken
This is the same issue as with IM000001.dcm mentioned in issue #313.

There are two problems: incorrect endian conversion for 16 bits per pixel,
and not handling photometric interpretation "MONOCHROME1", which means
minimum value is white instead of black.

The endian conversion was fixed as suggested in issue #313.
For "MONOCHROME1" we added a variable bw_inverted and we invert the pixel
value if that variable is true.

(cherry picked from commit e51ca66ee5)
2022-01-18 16:32:15 -05:00
Jacob Boerema
1df5f20d65 plug-ins: fix #1111 TGA with indexed colors + alpha channel : not displayed correctly
Just like COLOR targa MAPPED (indexed) images with a size of 32 per
index should also have alphaBits set to 8 or else the images get
loaded incorrectly.

(cherry picked from commit a77131db3c)
2022-01-18 15:05:39 -05:00
Jacob Boerema
618280b07b plug-ins: fix #6871 indexed tga file cannot be saved
Exporting an image to TGA fails with a crash when it's an indexed image
with alpha channel. We were not taking into account that even though
the output is 1 byte per pixel, the input should allocate memory for
2 bytes per pixel (1 color index and 1 alpha channel).

(cherry picked from commit 059599fc78)
2022-01-18 15:03:52 -05:00
Rodrigo Lledó
f72ecd07b5 Update Spanish translation 2022-01-16 22:29:07 +00:00
Marco Ciampa
9f65f90ffb Updated Italian translation 2022-01-11 09:02:39 +01:00
Jacob Boerema
f061be280c plug-ins: fix #7464 GIMP stops responding opening metadata on import
Some images have huge amounts of XMP tag Xmp.photoshop.DocumentAncestors.
In certain cases more than 100000 values. This is apparently due to a bug
in certain versions of PhotoShop.

This makes deserializing it in the way we currently do too slow, probably
because of continuous reallocations after adding each value. Until we can
change this let's remove everything but the first 1000 values when
serializing. I think it is very unlikely there are any real cases where
more than a 1000 ancestor documents are referenced in an image. Testing
shows that this amount doesn't cause any serious slowdowns.

(cherry picked from commit b2c715b52b)
2022-01-03 12:04:37 -05:00
Boyuan Yang
32b7756fa1 Update Chinese (China) translation 2021-12-26 19:03:17 +00:00
Piotr Drąg
d5e68e7359 Update Polish translation 2021-12-26 12:11:28 +01:00
Rodrigo Lledó
6fab87be3b Update Spanish translation 2021-12-22 21:53:05 +00:00
Matej Urbančič
4628e26d99 Update Slovenian translation 2021-12-21 07:14:20 +00:00
Hugo Carvalho
1d4f361e88 Update Portuguese translation 2021-12-20 15:49:50 +00:00
Anders Jonsson
05227c6889 Update Swedish translation 2021-12-20 00:04:03 +00:00
Jehan
571791f53f configure: post-release version bump to 2.10.31. 2021-12-19 22:51:39 +01:00
Yuri Chornoivan
9f24ea57f7 Update Ukrainian translation 2021-12-19 21:11:21 +00:00
U-YGGDRASIL\ender
cee406b593 Windows installer: add Portuguese language to .iss file, too 2021-12-19 21:20:19 +01:00
U-YGGDRASIL\ender
df64ff563f Windows installer: add pt translation 2021-12-19 21:04:23 +01:00
Jehan
150461732f configure: release GIMP 2.10.30. 2021-12-19 20:35:44 +01:00
Jehan
b270728177 desktop: AppData tag for GIMP 2.10.30.
Sorry to translators! I guess this one won't be localized then, but it's
ok. This release was a bit unplanned.
2021-12-19 20:11:16 +01:00
Jehan
8582bde9bb NEWS: update. 2021-12-19 19:08:46 +01:00
U-YGGDRASIL\ender
f8cdec1883 Windows installer: drop codepage conversion, use UTF-8 for language files 2021-12-19 18:59:02 +01:00
Jehan
ae542e29ee libgimpwidgets: small details to better sync with master branch.
The gimp-2-10 patch contributed as !514 was slightly different from the
master one as !515, especially since the last one got the reviews. This
syncs the 2 codebases (making it easier to backport future patches on
the same piece of code) and do a few fixes.

- Syncing alignments.
- Fix a comment.
- Use g_build_filename() for properly creating paths rather than string
  concatenations.
2021-12-19 16:02:50 +01:00
Yoshinori Yamakawa
ccb94344fc libgimpwidgets: Migration from GetICMProfile() to WcsGetDefaultColorProfile() 2021-12-19 14:56:10 +00:00
Øyvind Kolås
acf5ac8c7e configure, app: depend on GEGL-0.4.34 2021-12-19 00:56:30 +01:00
Jehan
4201cf60b1 plug-ins: in file-gegl, use the accurate load/save GEGL operation…
… rather than generic "gegl:load" and "gegl:save".

In particular, it means using "gegl:rgbe-load|save" for RGBE images and
"gegl:exr-save" for EXR exporting.

Without this, we could encounter weird run cases where for instance, we
would detect a RGBE image through the file magic number in GIMP,
redirect the load to file-gegl, but "gegl:load" only relies on file
extension. So if the file extension was not ".hdr", "gegl:load" could
redirect to a different handler operation meant for another format,
hence break proper loading. If no extension was matched, it could even
redirect to a fallback handler, such as Image Magick.

This breaks loading or saving images which we would be otherwise able to
load/save. And it could also have some security implications. So let's
fix this by setting the accurate operations to use for each specific
file formats we want to support through the file-gegl plug-in.

Note: this is the gimp-2-10 version of commit e8a31ba4f2 (`master`
branch) adapted to the older 2.10 API.
2021-12-18 23:58:53 +01:00
Jehan
2b82362eae plug-ins: fix Radiance RGBE magic number.
Note that the full magic should be "#?RADIANCE". Not sure why we only
use the first 2 characters. Do some software create these RGBE files
with just "#?" and we want to be able to read these? No other image
format use these 2 characters as the start of their own magic numbers?

Anyway let's keep like this for now. We'll see. If it makes a problem,
we might update to more accurate magic later.

(cherry picked from commit d5164072e0)
2021-12-18 23:39:53 +01:00
Jehan
1ba2e11c91 plug-ins: move KDE portal for screenshot as fallback to the X…
… implementation and Freedesktop portal.

This is an alternative to commit ef9c483771 (`master` branch) for the
2.10 series. On the dev branch, we simply get rid of the KDE portal
implementation, on the basis that by the time that GIMP 3 gets released,
most KDE users will have a recent-enough KDE with featureful Freedesktop
portal.

Yet for the 2.10 series, I am wary that there might still be many KDE
installations where maybe there is not even a Freedesktop portal. So I
just switch the test order. Now we use the X implementation in priority,
if we are running in X (it's still the most featureful and robust
version anyway). Then we test the Freedesktop portal. And finally we
test the KDE portal. I am guessing that if we encounter a KDE
installation with no Freedesktop portal but a KDE one, it's an old
version so we won't have permission issues.

See issue #5785.
2021-12-17 20:24:23 +01:00
Jacob Boerema
672931b39d plug-ins: fix previous commit, bumpmap should be bumpmap_id 2021-12-17 12:49:21 -05:00
Jacob Boerema
468c067d65 plug-ins: fix #5305 Lighting Effects crashes when I use a channel as Bumpmap
When a channel is selected as bumpmap, the bump_format can be different
than it was before. However, we always kept the first bump_format, which
could be RGB, in which case trying to use it with a channel caused a
crash in GIMP.

To fix this we always update the bump_format if bumpmap is enabled.

(cherry picked from commit 7b7d616358)

# Conflicts:
#	plug-ins/lighting/lighting-image.c
2021-12-17 12:12:30 -05:00
Niels De Graef
dc8023b952 Fix compiler errors for XDG pickbutton impl
I forgot that we were on GTK 2 here :D
2021-12-15 08:57:56 +01:00
Niels De Graef
dcf0f9e7f4 libgimpwidgets: Use Screenshot portal for picking
Freedesktop (XDG) portals are a collection of D-Bus APIs that work
across desktop environments, display servers and work within
containerized applications, like Flatpak. The internal implementation
can then choose to implement these in such a way that takes into account
security considerations, as well as making sure the user consents to
certain actions.

One such portal is the `Screenshot` portal, which contains a
`Screenshot()` method as well as `PickColor()`. We already use the
former for taking a screenshot, and this commit makes sure our color
picker also makes use of the latter.

By doing this, color picking is now possible on the major Wayland
compositors.

(Honestly, we should remove DE-specific backends like that of KWin, to
have less variation on the possible results of a color picking
operation).

Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/1074

(cherry picked from commit e82f6d5b0f)
2021-12-15 08:34:08 +01:00
Jehan
566be5e986 app: do not use PATH_MAX and realpath() on macOS.
See the comments in MR!424.
Basically realpath relies on false assumptions (probably ones which used
to be true when the API got created) on the max size of a path. Actually
nowadays paths can be much bigger than what the macro advertizes or can
even be unbounded.
The Linux version of realpath() allows the second parameter to be NULL,
in which case it would allocate the buffer, exactly for this reason
(written in the BUGS section on the man). Unfortunately this behavior is
not standardized in POSIX and the man from Apple I found does not
indicate it will do this.

So let's use g_canonicalize_filename() instead, which seems to do the
right thing. Similarly use g_strdup_printf instead of g_snprintf().

Cherry-picked from commit 6f4fac7715eb66a90727f931246c93cd8e13a819 with
some conflict resolution.
2021-12-14 23:14:04 +01:00
Niels De Graef
c375b2349a screenshot: Remove GNOME Shell implementation
GNOME Shell has started restricting access for it's Screenshot D-Bus API
to internal components only [1] for security reasons. In other words,
this will start failing, so remove it in favor of just using the
freedesktop portal, which should always work.

[1]: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970

(cherry picked from commit 62953e6830)
2021-12-14 16:14:30 +01:00
Aurimas Černius
56673462c9 Update Lithuanian translation 2021-12-13 14:35:32 +00:00
Aurimas Černius
8c9f70f202 Update Lithuanian translation 2021-12-13 14:32:48 +00:00
Anders Jonsson
983b9f277e Update Swedish translation 2021-12-04 14:29:19 +00:00
Jacob Boerema
48fa390e3f plug-ins: Fix previous cherry picked commit.
In 2.10 we need to use id's.
2021-12-01 21:56:15 -05:00
Jacob Boerema
778f811e8a plug-ins: fix #7566 Import Issues with Indexed .dds Images
This proved to be both an import and export issue.
Our import set expected format as RGB, causing garbled image output.
Our export for indexed images converted to grayscale first, although the
palette was correctly saved. This caused wrong palette indexes on import.

For indexed images, on import, we request the actual indexed format after
creating the layer with gimp_drawable_get_format, which gives us a correct
indexed Babl format.
Also added logic for indexed with alpha, although I have no sample images
to test this.
For indexed images on export we do the same: use gimp_drawable_get_format
to get an actual indexed Babl format.

(cherry picked from commit dec5ca2219)

# Conflicts:
#	plug-ins/file-dds/ddsread.c
2021-12-01 15:21:18 -05:00
Jordi Mas
c2d94121ca Update Catalan translation 2021-11-30 12:53:05 +01:00
Jehan
cc2660070c devel-docs: bump official macOS support to 10.12 on stable 2.10…
… series as well (it was already so in the `master` branch).

See discussion:
https://gitlab.gnome.org/GNOME/gimp/-/issues/7515#note_1318891

Basically it's probably possible to backport some changes and still
support an older version, but we clearly lack contributors on macOS so
the current unique one's decision matters most.
2021-11-26 23:43:06 +01:00
Daniel Mustieles
0a0cb402f2 Update Spanish translation 2021-11-23 16:55:53 +00:00
Matej Urbančič
6b825b1b0c Update Slovenian translation 2021-11-22 16:05:00 +00:00
Matej Urbančič
397e1ce2d8 Update Slovenian translation 2021-11-22 16:00:22 +00:00
Jacob Boerema
57f20f6fac plug-ins: fix #7109 exported gimp .jpg not processable in Windows Photo Viewer
In cases where the whole EXIF MakerNote is invalid we still load that
MakerNote data and export it too, causing partial invalid EXIF metadata.
We don't need to explicitly save Exif.Photo.MakerNote at all, because
as soon as we try to save a brand specific tag exiv2 will create that
MakerNote tag itself.
So from now we don't save the MakerNote but only the tags that go in it.
In issues like #2159 where exiv2 doesn't parse all tags inside certain
brand specific MakerNotes correctly, we will still export invalid EXIF.
That is an exiv2 issue that we can't do much about unless we remove all
MakerNote metadata including those that we can read, which doesn't seem
like a good idea at all.

(cherry picked from commit 6840bb9eba)
2021-11-21 18:42:06 -05:00
Jacob Boerema
b2396ec9d8 app: fix #383 Large PBM files exported from GIMP are blank
Fix as suggested by Massimo with formatting adjustments by me.
The use of gulong and glong is not cross platform safe: on Windows it is
32-bit and on most other platforms 64-bit.

Let's use guint64 and gint64 instead.

(cherry picked from commit d2c5591088)
2021-11-14 18:27:39 -05:00
Jordi Mas
d71aec77be Update Catalan translation 2021-11-14 14:44:53 +01:00
Piotr Drąg
dbd07a4f3f Update Polish translation 2021-11-14 14:28:21 +01:00
Hugo Carvalho
12877380b3 Update Portuguese translation 2021-11-13 17:40:19 +00:00
Milo Ivir
13f16221be Update Croatian translation 2021-11-12 14:12:32 +00:00
Milo Ivir
adb1330176 Update Croatian translation 2021-11-12 14:09:51 +00:00
Yuri Chornoivan
84000a25a2 Update Ukrainian translation 2021-11-09 14:17:26 +00:00
Rodrigo Lledó
6a522847d8 Update Spanish translation 2021-11-09 00:01:59 +00:00
Jacob Boerema
2a31678e9c app: fix #6436 *.gih grayscale export crashes GIMP
When we try to export a grayscale image with layers with negative offsets
to a GIH brush GIMP crashes without producing any crashlog.
Running in GDB showed us that there is heap corruption caused by incorrect
computation of buffer sizes because of the negative offsets.

In file_gih_image_to_pipe there is a comment that offsets are assumed
positive, but no checking is done whether that is correct.
Let's add some checks, set offset to 0 if negative and adjust width and
height accordingly.

(cherry picked from commit e2b1cc9476)
2021-11-08 17:11:52 -05:00
Rūdolfs Mazurs
d9f562a39d Update Latvian translation 2021-11-08 20:50:48 +00:00
Rūdolfs Mazurs
3946710923 Update Latvian translation 2021-11-08 19:45:50 +00:00
Rodrigo Lledó
4c2719b430 Update Spanish translation 2021-11-06 18:18:00 +00:00
Rūdolfs Mazurs
dd79d2aa73 Update Latvian translation 2021-11-04 19:30:47 +00:00
Rūdolfs Mazurs
fd113de4bc Update Latvian translation 2021-11-04 19:03:29 +00:00
Rūdolfs Mazurs
a0c19f22d6 Update Latvian translation 2021-11-04 18:57:56 +00:00
Rūdolfs Mazurs
72c5bec0ce Update Latvian translation 2021-11-04 09:57:02 +00:00
Jacob Boerema
347bb5067d libgimpbase: fix #7383 GIMP loses exif data when a folder has Hebrew letters
On Windows when exporting an image saving the exif and other metadata fails
if the path or filename includes non ASCII characters.
Reason is that gexiv2 changed to using utf-8.

In the past we had to convert the filename to current locale on Windows,
but since it now also expects utf-8 there, just remove the special
handling of filename there.

(cherry picked from commit 8e1f982945)
2021-11-02 12:07:11 -04:00
Piotr Drąg
1948f1f474 Update Polish translation 2021-10-31 10:55:08 +01:00
Daniel Novomesky
a2e520bf22 plug-ins: fix memory leak in HEIF import/export 2021-10-29 12:00:00 +00:00
Jacob Boerema
6f13c5b21f plug-ins: fix incorrect loading of CMYK PSD images without layers.
PSD images using CMYK as color mode and without layers didn't load
correctly (wrong colors).
When a PSD does not have any layers, CMYK color mode was not converted to
RGB.
Note that PSD color images that do have layers (e.g. CMYK and LAB) store
the merged image as RGB!
To do all this we added a conversion for CMYK PSD with 0 layers and added
code to correctly determine whether an alpha channel exists.
This also fixes the case where loading the merged image of a 16 bit per
channel RGBA psd loads with the alpha channel opaque.

(cherry picked from commit b7518195b5)
2021-10-27 19:18:38 -04:00
Hugo Carvalho
cfaf761ed9 Update Portuguese translation 2021-10-27 15:19:14 +00:00
Jacob Boerema
ce41642ddd plug-ins: fix incorrect CMYK transform for the variant without alpha
Probably due to a copy-paste error the case without alpha was also using
the img->cmyk_transform_alpha instead of img->cmyk_transform.

(cherry picked from commit 5115021eac)
2021-10-26 18:05:34 -04:00
Jacob Boerema
7ebff6ed28 plug-ins: fix #7429 Error loading PSD file: Unsupported or invalid layer mask height
Our psd plug-in checks for valid layer mask sizes. Apparently a psd
layer mask where the rendered flag is set can have invalid dimensions
0, 0, 0, -1.
We will skip the sanity checks for rendered layers and at the same time
move the debug statements up to have relevant debug info available even
if our sanity checks stop further processing.

(cherry picked from commit b27bf5caa9)
2021-10-26 12:29:52 -04:00
Yuri Chornoivan
caa91ac051 Update Ukrainian translation 2021-10-26 06:51:21 +00:00
Jordi Mas
5d57183b7a Update Catalan translation 2021-10-25 22:50:08 +02:00
Anders Jonsson
c35f6605e6 Update Swedish translation 2021-10-25 18:35:21 +00:00
Daniel Novomesky
1d44b45f09 plug-ins: prefer AOM encoder for AVIF export
Name of the used encoder is printed during export,
It can be: aom, rav1e, x265
2021-10-25 15:52:30 +00:00
Jacob Boerema
398dbbe01b plug-ins: fix several issues detected by coverity
Detected issues fixed here:
- Use GString and g_string_append since otherwise we need to add g_free
after every g_strconcat.
- No error checking.
- We need to g_free value_utf.

Not detected by coverity:
- Wrong quotes around utf-8.
- Remove unused includes.

(cherry picked from commit 641080c838)
2021-10-24 22:17:32 -04:00
Jacob Boerema
9cfaf37c75 plug-ins: fix resource leaks detected by coverity
Several resource leaks here were detected by coverity:
- Not freeing value_utf.
- Strings returned by g_strconcat should be g_free'd. To handle the string
concatenations easier we use GString and g_string_append instead.
Also introduce function get_list_elements to reduce the number of
repetetive elements.
While we were at it, also remove unused includes.

(cherry picked from commit e90f041ca5)
2021-10-24 22:17:15 -04:00
Jacob Boerema
a9867d020a plug-ins: fix #7408 metadata-editor plugin cashing when saving metadata
When writing metadata in the metadata-editor it did not check for empty
values. In combination with gexiv2 0.14.0 (which doesn't check in this
specific case for an empty list of gchar **) and trying to set a non
repeatable Iptc tag (Iptc.Application2.Headline) using
gexiv2_metadata_set_tag_multiple we get a crash.

This fix checks first for a non empty value before trying to save the
metadata tag.
Since the code is very similar also implemented this check for the Xmp
tags in addition to the Iptc and simplified some duplicate code.

(cherry picked from commit 6eba73e714)
2021-10-24 13:45:41 -04:00
Jacob Boerema
3ed924d731 plug-ins: Iptc.Application2.Headline is not a repeatable tag
See issue #7408 where this is causing a crash when using gexiv 0.14.0
in combination with trying to save it as a multiple tag with an empty list.
According to https://exiv2.org/iptc.html the tag Iptc.Application2.Headline
is not repeatable so we will set mode to "single.

In addition to that I added comments to explain the differences in the
meaning of "single" and "multi" between the list of Xmp tags and Iptc tags.

(cherry picked from commit b070c6fba6)
2021-10-24 13:45:30 -04:00
Jehan
6be014fc59 app: replace using the "draw" signal by "expose-event" on GTK+2.
Not sure why but adding a handler to the "expose-event" signal of
GimpDisplayShell (similarly to how we do it in master branch on "draw")
just didn't work. But it works on the already existing signal handling
on the canvas instead (which actually is not a bad deal, as we also
remove the coordinates translation so maybe we should test this on
`master` too).

Note: why we are backporting all this logics to gimp-2-10 is because
changes in macOS BigSur broke the selection's marching ants the same way
they broke on Wayland and it was confirmed this fix worked for BigSur as
well, at least on the dev builds.
It is unnecessary to backport for Wayland (because GIMP 2.10 is based on
GTK2 which anyway works only through XWayland, hence doesn't have the
issue), we do it only for macOS BigSur (and further). Well at least the
fix will hopefully work on the stable branch, because I cannot test
myself.

See issue #5952.
2021-10-22 23:22:39 +02:00
Jehan
16adb3bf3d app: replace gtk_widget_queue_draw_region() with…
gtk_widget_queue_draw_area().

gtk_widget_queue_draw_region() has been introduced in GTK 3.0.
2021-10-22 23:15:40 +02:00
Jehan
71b23da329 app: add back a timeout-based idle function to queue a canvas redraw.
I'm still very unclear why exactly but it would seem that just queuing
the redraw with an idle function is not enough. At least on Windows,
Jacob was having cases where opening an image would get stuck unless the
mouse was moved (causing draw events most likely).

So let's use a timeout function instead. Probably no need to queue the
idle followed by the timeout function as we had before commit
4fee04b839. Instead just directly queue a draw if relevant, then run the
timeout at regular interval (marching ants speed).

(cherry picked from commit 668c9de5a5)
2021-10-22 23:15:40 +02:00
Jehan
9314ba7051 app: check the time before last selection draw before queuing a redraw.
This way, we would queue a lot less canvas region unnecessary redraws.
We still remake the time-before-last-draw check in the draw() signal
handling before we want to update the marching ants index for draw
events coming for other reasons (canvas updates, moving/zooming on
canvas, exposition changes, etc.).

(cherry picked from commit 6466d46052)
2021-10-22 23:15:40 +02:00
Jehan
73b40f4183 app: fix selection display on right/bottom borders when rulers are…
… displayed.

We should use the dimensions from the GimpDisplayShell not the the
GimpCanvas. Indeed the canvas is shorter when rulers are visible, hence
the selection next to the extreme sides (bottom and right sides of the
canvas) was not drawn.

(cherry picked from commit e8a531e51e)
2021-10-22 23:15:40 +02:00
Jehan
c3b35fd601 Issue #5640: Selection tools not showing selection on Wayland.
As suggested in a comment (itself coming from an IRC discussion), we
should not use gdk_window_(begin|end)_draw_frame() functions as this
works on X, but not on Wayland anymore. Instead draw directly during
draw() call of the shell widget, and force it to happen regularly, to
update the marching ants, via gtk_widget_queue_draw_region().

This is tested and works on Wayland. Please everyone, test thoroughly to
make sure it works well in all situations, and also that we don't get
any unexpected slowdowns.

Since the symptoms are very similar, it is highly possible that it also
fixes the issue #5952 too, for selection not showing on macOS since Big
Sur 11 (maybe they changed the same way as Wayland did). Unfortunately I
can't check this myself. Please test, whoever has access to a macOS Big
Sur and can build GIMP!

(cherry picked from commit 4fee04b839)
2021-10-22 23:15:40 +02:00
Jehan
81666bf01d NEWS: update. 2021-10-22 13:01:48 +02:00
Adam Fontenot
a08055f1a1 Issue #6210: Subpixel font rendering system settings should only…
… apply to GIMP GUI not text layer rendering in image.

Reviewer note: this is the theoretical fix, but it won't work right now
because Cairo explicitly bypasses grayscale antialiasing when system set
subpixel one. Still let's push this first patch, but the issue will be
actually fixed when Cairo will merge my MR too:
https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/114

(cherry picked from commit 00bbeabaf4)
2021-10-22 12:49:43 +02:00
Bruce Cowan
6adeb69be8 Update British English translation 2021-10-21 19:58:07 +00:00
Daniel Novomesky
2010a8a1e8 Installer: associate .avif extension 2021-10-20 15:38:34 +02:00
Bruno Lopes da Silva
9b7889e4de Update Brazilian Portuguese translation 2021-10-11 21:02:01 +00:00
Marco Ciampa
415f9e6bef Updated Italian translation 2021-10-11 13:17:14 +02:00
Jiri Grönroos
dc5379cf72 Update Finnish translation 2021-10-11 06:21:37 +00:00
Hugo Carvalho
b05caa5f24 Update Portuguese translation 2021-10-07 20:34:30 +00:00
Hugo Carvalho
40bff1b0a1 Update Portuguese translation 2021-10-07 20:29:30 +00:00
Hugo Carvalho
dfc7a7692d Update Portuguese translation 2021-10-07 20:24:55 +00:00
Hugo Carvalho
88888e0e3a Update Portuguese translation 2021-10-07 20:19:08 +00:00
Hugo Carvalho
b782bd884e Update Portuguese translation 2021-10-07 20:08:40 +00:00
Rodrigo Lledó
1e8ad391a3 Update Spanish translation 2021-10-07 14:00:04 +00:00
Piotr Drąg
b79175889f Update Polish translation 2021-10-03 13:28:53 +02:00
Hugo Carvalho
0b7e5802c8 Update Portuguese translation 2021-10-01 13:08:16 +00:00
Hugo Carvalho
86eed9d066 Add Portuguese translation 2021-10-01 13:01:05 +00:00
Matej Urbančič
9c3fb1953e Update Slovenian translation 2021-10-01 12:19:20 +00:00
Anders Jonsson
7515642c71 Update Swedish translation 2021-09-28 20:22:01 +00:00
Yuri Chornoivan
a481b373ce Update Ukrainian translation 2021-09-28 14:16:21 +00:00
Jordi Mas
583734fe7f Remove unnecessary space at the end of the string
(cherry picked from commit 6aaa017d34)
2021-09-28 12:44:20 +02:00
Jehan
104a5babf5 NEWS: update. 2021-09-28 12:17:42 +02:00
Jacob Boerema
a2335962ee plug-ins: fix saving of XMP BAG/SEQ array values in metadata-editor
XMP array tags of type BAG and SEQ can have multiple values, each of
which is on a separate line. However, we were reading and saving it as
just one value.

We change this by setting each line as a separate value with
gexiv2_metadata_set_tag_multiple.

In addition to that we found that setting the type of tag struct with
gexiv2_metadata_set_xmp_tag_struct caused arrays of multiple values per
tag to be set incorrectly: the last value in the list got added multiple
times. I'm not sure if we are using this function incorrectly, or that
there is a bug in gexiv2 or exiv2. Anyway, since it seems that all tags
and values I tested work without calling this function, let's just omit
this call.

(cherry picked from commit a4cb134f14)
2021-09-25 15:34:26 -04:00
Jacob Boerema
dd830db34b plug-ins: improve loading of XMP BAG/SEQ tags in metadata-editor
XMP array tags of type BAG and SEQ can have multiple values, each of these
values needs to be on a separate line to be correctly recognized as a
different value in the tag array. We were incorrectly loading all values
on one line separated by a comma.
For those tags that have equivalent IPTC tags we were also comparing just
the one XMP value with the whole, possibly multiple lines, of the same
IPTC, which could cause a failure to recognize identical tags.

We changed this to now have each value in a tag array on a separate line
by adding \n between values.
Each IPTC equivalent tag value is now compared to each value in the XMP
tag array and only added when a different value is found.

(cherry picked from commit 76dc649b3f)
2021-09-25 15:34:11 -04:00
Jacob Boerema
3150f08a0a plug-ins: in metadata-viewer improve how we show XMP tags.
XMP tags that have multiple values (usually of type XMpBag or XmpSeq) were
shown on one line. Which, especially for long text values, could make it
difficult to see the separate values for that tag.

Let's do the same as we do for IPTC tags that can occur multiple times and
show each value on a separate line.

(cherry picked from commit baaa1380cf)
2021-09-25 15:33:57 -04:00
Jacob Boerema
7a7f209cee plug-ins: use separate function for adding multiple values per tag
In the metadata-viewer refactor the code that adds multiple values per tag
to the list store into a separate function.
Currently used for IPTC tags only but the intention is to reuse it for
XMP tags with multiple values.

(cherry picked from commit e9ab89fa4f)

# Conflicts:
#	plug-ins/metadata/metadata-viewer.c
2021-09-25 15:33:27 -04:00
Jacob Boerema
aed3d9c779 plug-ins: fix #6258 Hierarchical XMP tag should be written to Array
When saving XMP metadata were using gexiv2_metadata_get_tag_string for all
tags, even those that can have multiple values. This caused those values
to be saved as one value instead of multiple.

To fix this we use gexiv2_metadata_get_tag_multiple, except for XmpText.
Then we add all returned values for that tag separately to our metadata.

(cherry picked from commit af888e481f)
2021-09-25 15:25:56 -04:00
Jehan
d4efd7005d configure: post-release version bump to 2.10.29. 2021-09-14 17:49:10 +02:00
Jehan
9f9ff10cf4 configure: release GIMP 2.10.28. 2021-09-14 15:50:46 +02:00
Jehan
4b26c879ab NEWS: 2.10.28 release notes. 2021-09-14 15:50:46 +02:00
Jehan
31b44a4f5c desktop: update 2.10.28 release date in appdata. 2021-09-14 15:45:45 +02:00
Jiri Grönroos
e158766813 Update Finnish translation 2021-09-11 10:25:11 +00:00
Alexandre Prokoudine
e46ec042a3 Update Russian translation 2021-09-11 00:43:49 +03:00
Jordi Mas
fb06f1214c Update Catalan translation 2021-09-09 21:43:37 +02:00
Matej Urbančič
61ef6747fc Update Slovenian translation 2021-09-08 19:49:39 +00:00
Marco Ciampa
3fbf9c6bff Updated Italian translation 2021-09-08 20:59:45 +02:00
Marco Ciampa
2d0d4116fc Updated Italian translation 2021-09-08 17:57:31 +02:00
Luna Jernberg
678fa437ed Update Swedish translation 2021-09-07 15:02:48 +00:00
Piotr Drąg
0bf30b3a1c Update Polish translation 2021-09-07 16:24:54 +02:00
Daniel Mustieles
37357ad03c Update Spanish translation 2021-09-07 13:44:57 +00:00
Marco Ciampa
7dbc6b987f Updated Italian translation 2021-09-07 12:57:37 +02:00
Yuri Chornoivan
5a4785470f Update Ukrainian translation 2021-09-07 08:30:02 +00:00
Boyuan Yang
0315a7cee9 Update Chinese (China) translation 2021-09-07 06:03:09 +00:00
Boyuan Yang
d850947382 Update Chinese (China) translation 2021-09-07 05:54:23 +00:00
Boyuan Yang
becad288fb Update Chinese (China) translation 2021-09-07 05:48:05 +00:00
Jehan
830ca73b6e desktop: let's skip 2.10.26 and directly release 2.10.28.
A boring build bug was introduced in a recent commit, and it was
recently fixed. It's life! ;-)
2021-09-07 00:37:08 +02:00
Stanislav Grinkov
473b05ea3a build: Update dark theme Makefile.am to include...
missing white-border prelight file.

This is continuation of the commit 3d102d0c. It fixes the startup
warnings and properly resolves #4128.
2021-09-06 23:27:25 +06:00
Rodrigo Lledó
30c4a37c0b Update Spanish translation 2021-09-06 11:38:58 +00:00
Yuri Chornoivan
e5ddf99bf9 Update Ukrainian translation 2021-09-06 05:22:20 +00:00
Jehan
b8c11e0e57 configure: post-release version bump to 2.10.27. 2021-09-05 23:52:45 +02:00
Jehan
1c7ff807ae configure: release GIMP 2.10.26. 2021-09-05 22:47:06 +02:00
Jehan
9875fcbc31 authors.xml, README: update the authors list.
- Update last-active parameter to 3.0 for various people.
- Add Liam Quin, lillolollo, Stanislav Grinkov, Povilas Kanapickas and
  woob.
- Move myself to maintainer.

(cherry picked from commit 0645bf6f0f)
2021-09-05 22:42:12 +02:00
Jehan
7107372880 authors: update the authors list.
Adding names of people with significant contributions:
- Jacob Boerema for his awesome work (on too much stuff to list it all!)
- Daniel Novomesky (HEIF, AVIF support)
- Félix Piédallu (meson build)
- Elad Shahar (Python 3 plug-ins, Spyrogimp, Mandala symmetry
  kaleidoscope mode)

(cherry picked from commit 9fc87b8d91)
2021-09-05 22:40:50 +02:00
Michael Natterer
f47b5d8176 authors.xml: add Niels De Graef
(cherry picked from commit 9969dd8b03)
2021-09-05 22:40:43 +02:00
Jehan
13cb9335a7 NEWS: update. 2021-09-05 22:35:32 +02:00
Øyvind Kolås
c496ce5aca configure, app: depend on GEGL 0.4.32 2021-09-05 20:56:19 +02:00
Anders Jonsson
66ca86cd72 Update Swedish translation 2021-09-05 16:04:17 +00:00
Piotr Drąg
731503ee5f Update Polish translation 2021-09-05 17:29:53 +02:00
Piotr Drąg
00abb65f0d Update POTFILES.in 2021-09-05 17:27:14 +02:00
Ngọc Quân Trần
1315c7c5d0 Update Vietnamese translation 2021-09-05 08:36:24 +00:00
Ngọc Quân Trần
2ef2b32153 Update Vietnamese translation 2021-09-05 08:10:07 +00:00
Jehan
3130cc397b NEWS: update. 2021-09-04 21:30:16 +02:00
Kevin Payne
8ac98f0d69 themes: Set light background for selected text ...
in Layers and Paths dockable dialogs to make text visible.

Resolves: #4006

Signed-off-by: Stanislav Grinkov <43956-stanislavgrinkov@users.noreply.gitlab.gnome.org>
2021-09-04 13:46:21 +06:00
Jehan
4cea403ecd build: sync build files and inno-setup with po files.
Thanks to the unit test comparing the available translations (based on
po files) and the configuration for InnoSetup, as well as the build
configuration, it's now easier to make sure we are always in sync.
2021-09-04 01:26:49 +02:00
Jehan
e807464145 build: improve the script to test for Windows installer languages.
We were only comparing the po list with the language list in the
gimp3264.iss. Nevertheless since we also generate the <code>.setup.isl
files, we should also verify generated files corresponds exactly to the
same list of languages.
This commit does it for meson and autotools build.

This is also how I fixed the meson list (cf. previous commit).

(cherry picked from commit 602add8c45
except that I removed the comparison with meson files)
2021-09-04 01:02:41 +02:00
Jehan
45fe197b02 build: add a test to check the Windows installer languages.
This way, we will avoid in the future any discrepancies between
languages set in the Windows installer and available translations (po
files in po-windows-installer/) because `make check` will fail.

(cherry picked from commit 8a42c6ccc2
apart from the removed meson file)
2021-09-04 00:56:25 +02:00
Aurimas Černius
baa4ce3ecd Add Lithuanian translation 2021-09-03 18:19:42 +00:00
Trần Ngọc Quân
1fb6175494 build: add Vietnamese translation to the Windows installer
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
(cherry picked from commit 60a9e25101)
2021-09-03 14:29:58 +02:00
Aurimas Černius
44b9e3fff9 Update Lithuanian translation 2021-09-02 20:51:16 +00:00
Stanislav Grinkov
250ad5de46 themes: Remove 3D shadow box around eye and link toggles...
in Layers, Channels, and Paths dockable dialog tree views.

Resolves: #1012
2021-09-03 00:49:55 +06:00
Stanislav Grinkov
16fe52582d app: Correctly place merged down layer...
when the image is in indexed color mode, and bottom layer doesn't
have an alpha channel.

Resolves: #4945
2021-09-02 12:20:09 +06:00
Anders Jonsson
72df5d6335 Update Swedish translation 2021-09-01 21:03:43 +00:00
Matej Urbančič
eb120a5cd5 Update Slovenian translation 2021-09-01 16:20:49 +00:00
Tim Sabsch
105c99d848 Update German translation 2021-09-01 14:46:28 +00:00
Stanislav Grinkov
3d102d0c9e themes: Add white border around dark theme GtkToggleButtons...
to improve accessibility by having visible feedback on mouse-hover.
Default prelight background was too dark for such task.

Resolves: #4128
2021-09-01 17:51:40 +06:00
Ngọc Quân Trần
5d8377303e Update Vietnamese translation 2021-09-01 06:54:28 +00:00
Ngọc Quân Trần
30fadd5377 Add Vietnamese translation 2021-09-01 06:49:43 +00:00
Tim Sabsch
7d5dbf2391 Update German translation 2021-08-31 19:41:45 +00:00
Tim Sabsch
a29befe2ed Update German translation 2021-08-30 21:03:40 +00:00
Philipp Kiemle
6a26201022 Update German translation 2021-08-30 20:07:40 +00:00
Rodrigo Lledó
fdfa71507e Update Spanish translation 2021-08-30 20:07:13 +00:00
Matej Urbančič
c1d50722f9 Update Slovenian translation 2021-08-30 18:44:27 +00:00
Matej Urbančič
efaf0e1ba8 Update Slovenian translation 2021-08-30 18:42:13 +00:00
Jordi Mas
186b21c478 Update Catalan translation 2021-08-30 20:18:07 +02:00
Marco Spiess
0a06779fee add msys support
(cherry picked from commit 512fc24694)
2021-08-30 00:06:58 +02:00
Jacob Boerema
a4846a0124 plug-ins: fix #7195 Exporting multilayer TIFF with EXIF saves some layers twice
If you first open a multi page TIFF, exiv2 generates EXIF tags for the
first 3 pages in the form of Exif.Image.<tags>, Exif.Image2.<tags>,
Exif.Image3.<tags>. When exporting with EXIF saving enabled, exiv2 thinks
it needs to save TIFF pages for the EXIF metadata of the second and third
page too. Those pages saved by exiv2 contain only metadata no real image
data and give warnings when loading.

The EXIF tags read from page 2 and 3 are only the basic image specs. We
don't use those, nor do we add tags to it. Until we support handling of
metadata for those pages and exiv2 has better support for all TIFF pages
beyond the first few, I see no reason to save this information.

So for now lets just delete all tags that start with Exif.Image followed
by a number.
2021-08-29 16:40:10 -04:00
Jacob Boerema
843d998028 plug-ins: fix #3740 Impossible to delete multi page tiff with thumbnail
On Windows there is a long standing issue in its File Explorer. When
GIMP exported as a multi page (multi-layer) TIFF with thumbnail saving
enabled, then the Windows thumbnailer apparently gets stuck and does not
close the TIFF file when browsing a folder. Because those files are not
closed it is impossible to delete them. This issue has been reported
many times over the years to Microsoft without any reaction.

Investigation showed us that this lock up only happens when we save the
thumbnail as a subifd. To resolve this issue we change this and now let
exiv2 handle our thumbnail saving, just as for other image formats. For
TIFF this means the thumbnail is saved as the second page of a TIFF.

Previous commits have made sure that it is now easier to recognize a TIFF
page as a thumbnail and to make sure we don't load thumbnail TIFF pages.

Since saving as a subifd is what made TIFF thumbnail saving different
from other formats, this commit consists of only removal of code.

(cherry picked from commit 42e61104d7)

# Conflicts:
#	plug-ins/file-tiff/file-tiff-save.c
2021-08-29 16:40:10 -04:00
Jacob Boerema
c9fe64b135 plug-ins: when loading TIFF images ignore thumbnail pages
TIFF image pages can specify what type of image that page represents.

If the page is marked as FILETYPE_REDUCEDIMAGE we will consider it to be
a thumbnail and filter that out of the list of pages that can be selected
to be loaded.

In addition to that we will try to recognize certain pages as thumbnail
that don't have the subfiletype tag set.
We will consider it a thumbnail if:
- It's the second page
- PhotometricInterpretation is YCbCr
- Compression is old style jpeg
- First page uses a different compression or PhotometricInterpretation
If these conditions are true the page will also be filtered out.

We could consider having an option whether to filter out thumbnail pages.
Since in the situation up until now we also don't load thumbnails, I think
this should be considered as a separate feature.

(cherry picked from commit 2a38ec9e4b)
2021-08-29 16:40:10 -04:00
Jacob Boerema
183900ca97 libgimp: set subfiletype to FILETYPE_REDUCEDIMAGE when saving EXIF thumbnails. 2021-08-29 16:40:10 -04:00
Yuri Chornoivan
f3764a59db Update Ukrainian translation 2021-08-29 17:11:24 +00:00
Jehan
ec8de3941e desktop: add an appdata section for 2.10.26 release.
We can see we are really working towards stability and consolidation
now, with few new features, but a lot of bug fixes.

(cherry picked from commit f04e7442f4)
2021-08-29 19:01:01 +02:00
Jehan
53fca481d7 NEWS: update. 2021-08-29 18:46:28 +02:00
Rodrigo Lledó
2d5c911733 Update Spanish translation 2021-08-26 13:06:29 +00:00
Jehan
dd49817a2f configure: --enable-check-update now with an "auto" value.
By default, when on "auto", the update check feature will be set
depending on the OS. In particular, on Windows and macOS, it will be ON,
because these are the 2 OSes which we distribute without an update
channel, hence where people used to have very outdated versions of GIMP.

On Linux, *BSD, and so on, distribution provide updates through package
repositories.

(cherry picked from commit 0e46fadf43)
2021-08-26 12:06:18 +02:00
Stanislav Grinkov
8ac06e201a themes: add hyperlink coloring to themes.
to fix 'bad' eye-straining link color in About dialog.

Resolves: #6730
2021-08-22 16:52:52 +02:00
Piotr Drąg
c69cf5f573 Update Polish translation 2021-08-22 12:31:00 +02:00
Matej Urbančič
0a663b2100 Update Slovenian translation 2021-08-17 20:03:26 +00:00
Jehan
9a023e3817 app: fix leaked queue created at init() (as reported by Massimo).
(cherry picked from commit 70f2192bff)
2021-08-16 15:08:41 +02:00
Jehan
e976481034 app: fix gimp_plug_in_cleanup_item_new().
This fixes a memory leak as reported by Massimo.
But even more, we fix the code logics, as the cleanup items were never
added to the `item_cleanups` list.

(cherry picked from commit ee09ae7245)
2021-08-16 15:08:41 +02:00
Luca Bacci
939f0caa19 Show message dialogs in preferences dialog
(cherry picked from commit ac0a084e6e)
2021-08-16 15:08:41 +02:00
Anders Jonsson
82612aff49 Update Swedish translation 2021-08-16 12:28:30 +00:00
Yuri Chornoivan
b4a712e198 Update Ukrainian translation 2021-08-16 10:25:20 +00:00
Rodrigo Lledó
0fde875bd3 Update Spanish translation 2021-08-16 07:22:03 +00:00
Rodrigo Lledó
114cfc95e8 Update Spanish translation 2021-08-16 07:17:44 +00:00
Jacob Boerema
0fccc87cb6 app: improve error message loading pattern that is too large
As noted in issue #6032 the error message when trying to open a pattern
file with dimension larger than supported could be a little clearer.

We do this by adding the maximum allowed dimensions to the error message.

(cherry picked from commit 317b5d9cff)
2021-08-09 18:28:16 -04:00
Jacob Boerema
d9e82494b4 app: disallow saving of patterns larger than max allowed dimensions
For GIMP patterns we have maximum allowed dimensions which we check when
loading a pattern. However, we did not check this when saving a pattern.
See issue #6032.

This commit adds a check when saving a pattern and adds a descriptive
error to make clear why saving fails.

(cherry picked from commit f130fe1917)
2021-08-09 18:27:59 -04:00
Jacob Boerema
fb099cbf2a plug-ins: fix build failure on Windows due to incompatible mkdir call in script-fu
On Windows mkdir only accepts one parameter. Fix this by using g_mkdir
which takes care of platform specific details internally.
2021-08-09 18:11:30 -04:00
Jacob Boerema
05403696cb libgimpbase: fix #1350 Failure to load metadata importing image with non-latin unicode path
On Windows loading metadata from images with non ASCII characters in their
path failed. Part of the fix is in gexiv2 that now converts the path from
utf-8 to utf-16 on Windows.

However we were still sending a localized path to gexiv2 where it was
expecting utf-8. This caused the conversion and thus loading of metadata
to fail. Fix is to remove the special handling for Windows and use the
utf-8 filename.

(cherry picked from commit 65950de735)
2021-08-09 12:25:44 -04:00
Jacob Boerema
85e4521b93 plug-ins: fix #2655 Can't open EPS-files with german Umlauts
Due to differences between Windows and most other platforms Ghostscript
didn't correctly load files with special characters on Windows.

First we needed to make sure that the filenames we use are in utf-8
format and then tell gsapi that we use utf8 encoding.

(cherry picked from commit 4f86d8088d)

# Conflicts:
#	plug-ins/common/file-ps.c
2021-08-09 12:10:51 -04:00
Matej Urbančič
762939162c Update Slovenian translation 2021-08-09 07:52:27 +00:00
Michael Bazzinotti
11a43aebdf Issue #5415: compensate for null byte
When exporting a C source file with runtime length encoding, the
C-string's array size does not accomodate for the null byte. However,
GIMP accomodates for the NULL byte in it's NON-RLE export, suggesting
that this has been a mere oversight for RLE.

This can cause at the worst a compile-time error and at least a warning
from the compiler.

(cherry picked from commit 4d528f297f)
2021-08-05 19:54:19 +02:00
Massimo Valentini
fcefb409e5 Issue #5267: Cage transform tool causes artifacts.
I somewhat bisected GEGL commits between 0.4.20 and 0.4.24 and found
that the one that introduced the env var GEGL_OPERATION_INIT_OUTPUT is
the first showing the problem.

Reviewer (Jehan) note: so it would be commit 6e9610e65c on GEGL repo.
This fix makes sense as it means that since this commit, the output
buffer could have random values. It's not a problem for any operation
where we fill every value, but I guess it's not the case for
"gimp:cage-coef-calc" which was likely relying on the old behavior of
being 0-initialized.

(cherry picked from commit 3b2a8f79f0)
2021-08-05 17:12:19 +02:00
Des McGuinness
75871f0418 Issue #5989 - performance improvement patches for gtk and gimp
Reviewer comment (Jehan): we have used this patch successfully on our
installers since start of 2021 (see commit b4d665d of our gtk-osx fork)
and it really improved the situation. I only fixed minor coding style
stuff in the patch.
Looking at what it does, I guess it is not ideal long-term if related to
10-bit display (as I understand from the comment), which a graphics app
would want to support properly. But for now, this is better than
extra-slow display until we get macOS developers able to look at this
more in depth in the future (I don't think that our dependencies are
really ready yet for 10-bit display support anyway, though I may be
wrong).
Some other forums seem to say it comes from macOS invalidating now more
than it should (i.e. the whole area instead of only the changed area)
and this NSViewUsesAutomaticLayerBackingStores flag would disable this
behavior. It might be one of these reasons, the other or both. This is
anyway a good first start for future contributors.

(cherry picked from commit 4f9b7373e6)
2021-08-04 21:52:50 +02:00
Jehan
5ad7ef10c3 Issue #6610: crashes on free select for images of certain dimensions.
g_alloca() is unadvised. Even though it might be more efficient in some
specific cases, it is pretty subject to stack overflow when a lot of
memory is requested.

Let's allocate dynamic memory instead. To avoid doing it too much, let's
just reuse the same pointer especially since region of interest will
usually be the same size when iterating a buffer, except for border
ones (which would usually be smaller, so we can use the same allocated
buffer again). I still make size checks, just in case.

(cherry picked from commit f2fb98cb69)
2021-08-04 19:36:12 +02:00
Jacob Boerema
b274cc07d9 plug-ins: fix #7086 Can't remove color space from a 1bit monochrome palette
For 1-bit BMP export we did not show the save dialog, making it
impossible to change settings interactively.

We enable the save dialog for 1-bit too, making sure to disable RLE, which
is not available for 1-bit.
2021-08-03 16:13:30 -04:00
Luna Jernberg
a69dc492ca Update Swedish translation 2021-07-31 11:24:49 +00:00
Boyuan Yang
1b51d1d78d Update Chinese (China) translation 2021-07-29 19:11:40 +00:00
Boyuan Yang
7395b2d262 Update Chinese (China) translation 2021-07-29 19:09:00 +00:00
Jacob Boerema
f3a676d064 app: fix #5153 keyboard shortcuts Shift+[ and ] don't work on most keyboards
On most keyboards the [ and ] keys are shared with { and }. Which means
that if you press Shift+[ you get {. We were using this key combination
to increase the tool's size by 10 and the other to decrease it by 10.

However, on all keyboards where these keys share the same physical spot
on the keyboard, this wasn't working.
So, let's change the actual keys to do this to { and }.

(cherry picked from commit 42fe8abc98)
2021-07-28 14:40:22 -04:00
Anders Jonsson
3be387b3e3 Update Swedish translation 2021-07-25 20:14:54 +00:00
Piotr Drąg
dbd568a1ec Update Polish translation 2021-07-25 12:52:27 +02:00
Yuri Chornoivan
912f5c5814 Update Ukrainian translation 2021-07-24 06:25:01 +00:00
Jacob Boerema
a0a089004a plug-ins: fix previous cherry-picked commit. 2021-07-23 16:46:28 -04:00
Jacob Boerema
e629e3e7d2 plug-ins: fix #1146 DICOM with big endian transfer syntax fails to load.
Our plug-in was not correctly handling DICOM images that use big endian
transfer syntax, which is deprecated.

We add support for that here, add a few g_debug statements to make future
debugging easier, and also return an error when we encounter a transfer
syntax that we can't handle instead of blindly continuing.

(cherry picked from commit e0707af073)

# Conflicts:
#	plug-ins/common/file-dicom.c
2021-07-23 15:37:58 -04:00
Jacob Boerema
300599f52c plug-ins: add support for planar configuration in DICOM images.
Part 1 of the fix for #1146.

In addition to that we also add some g_debug statements to make it easier
to determine certain image info.

(cherry picked from commit 3733a36d84)
2021-07-23 15:31:59 -04:00
Rodrigo Lledó
473a91c494 Update Spanish translation 2021-07-19 13:24:44 +00:00
Michael McLaughlin
da37571d92 Issue #6994: Color Noise produces artifacts with highly saturated…
… source colors

Reviewer's (Jehan) note: a git blame shows this is a clear bug
introduced in commit 9d19bf2a3e, which was a cleanup patch, and the
BOUNDS() macro was not doing exactly the same thing as the code before
the change.

(cherry picked from commit 3b3f34cd22)
2021-07-17 19:03:28 +02:00
Hannie Dumoleyn
56cf217579 Update Dutch translation 2021-07-14 09:30:21 +00:00
Piotr Drąg
73a9cb50ac Update Polish translation 2021-07-11 12:34:23 +02:00
Yuri Chornoivan
3047ea9c5b Update Ukrainian translation 2021-07-05 16:39:36 +00:00
Jehan
6829274dde app: add a comment and some newlines before the debug data section.
The markdown triple-quote (```) has to be on its own at the start of a
newline. Schumaml was telling me that too many reporters would paste
just after some text, which would therefore break the markdown syntax.

Instead let's add 3 newlines before the triple-quote, so that even
people who would not hit the "Copy Bug Information" button (but instead
select and copy) have a hint that these newlines are made on purpose.
Also add a comment (which is discarded by Gitlab) to make this even more
obvious.

Then even when pasting just after some text on the same line, the
triple-quote will end up on its own line.

(cherry picked from commit d3105e5c72)
2021-07-05 16:45:52 +02:00
Jehan
26baa0527d app: check if an item was already inserted by actually looking it up in…
… the container.

There was this weird case which we somehow could only reproduce on
Aryeom's computer/build, not mine, with the same code and reproduction
steps (reproducible at will on her build only). Basically when drag'n
dropping a duplicated layer inside a collapsed layer group, the
row-expanded handler would try to select the moved layer before it is
actually inserted. This would end up into crash-happy code.

I'm still unsure of why the order of operation is different here, but
anyway what is for sure is that the `inserting_item` boolean flag was
not protecting much. It's not like it's an actual mutex and anyway this
is not multi-threaded code either so this flag was mostly useless (which
is why we were crashing). Instead let's actually look if the item is in
the container or not.
2021-07-05 10:41:52 +02:00
Hannie Dumoleyn
1dd7e8ac55 Update Dutch translation 2021-07-01 11:11:59 +00:00
Alexandre Prokoudine
371c5f9a76 Update Russian translation 2021-06-26 03:42:59 +03:00
Jordi Mas
89b930cedf Update Catalan translation 2021-06-03 06:10:33 +02:00
Jordi Mas
c920260765 Update Catalan translation 2021-06-03 05:59:26 +02:00
Jordi Mas
f880844183 Update Catalan translation 2021-05-31 07:49:56 +02:00
Rodrigo Lledó
d6685d8951 Update Spanish translation 2021-05-25 06:17:35 +00:00
Ian Martins
a038051bb8 plug-ins: fix #6859 Hurl random pct limits in PDB are incorrect 2021-05-24 14:56:41 +00:00
Jacob Boerema
557a19469a plug-ins: fix incorrect cherry-picking of previous commit. 2021-05-19 22:29:37 -04:00
Jacob Boerema
815e624851 plug-ins: fix #6116 grayscale gif animation hangs on export.
GIF export was not taking into account that there can be
both grayscale layers with and without alpha in an image.

We make sure that the GEGL buffer knows the type of
drawable for the current layer.

(cherry picked from commit 3b3ab0aa11)

# Conflicts:
#	plug-ins/common/file-gif-save.c
2021-05-19 17:49:01 -04:00
Rodrigo Lledó
ad5aa1a6b1 Update Spanish translation 2021-05-18 12:05:09 +00:00
Matej Urbančič
63a9ef7915 Update Slovenian translation 2021-05-13 07:45:40 +00:00
Matej Urbančič
2c6866f8a6 Update Slovenian translation 2021-05-13 07:45:23 +00:00
Jehan
f2c2163be4 NEWS: update. 2021-05-12 13:18:57 +02:00
Ngọc Quân Trần
be32831984 Update Vietnamese translation 2021-05-12 07:03:21 +00:00
Ngọc Quân Trần
496582b160 Update Vietnamese translation 2021-05-12 06:54:27 +00:00
Jehan
af76c091cb Issue #6852: Don't include gimp30-tips.mo in binary package
Similar to previous plug-in but only for autotools. Separated in its own
commit for easy cherry-picking to `gimp-2-10` branch.

(cherry picked from commit a4a6ac59e0)
2021-05-11 14:38:41 +02:00
Marc Espie
f3c21c7e6e Issue #6850: support for memory in the dashboard under OpenBSD.
(cherry picked from commit 6dc98fe7f0)
2021-05-09 20:02:56 +02:00
Milo Ivir
25bf957a1b Update Croatian translation 2021-05-06 07:39:27 +00:00
Jacob Boerema
fe077ff3b3 plug-ins: fix using wrong offset for group layer masks in psd export.
Exporting to psd could result in very large files which often failed to
load in both GIMP and PS when a group layer with a layer mask
was present.

Reported on our IRC channel with a sample xcf which made it
possible to figure out the problem.

(cherry picked from commit 8fdeaddbe7)
2021-05-04 15:51:25 -04:00
Piotr Drąg
d58ba7c617 Update Polish translation 2021-05-02 12:02:45 +02:00
Rodrigo Lledó
108d9be2b7 Update Spanish translation 2021-04-29 11:20:52 +00:00
Jacob Boerema
c9d2722192 plug-ins: fix compilation of previous commit. 2021-04-26 22:27:20 -04:00
Jacob Boerema
e29219fee7 plug-ins: fix #5960 Gimp loads 16 bit DDS images with luminosity as 8 bit.
So far all dds images were loaded as 8 bit per channel which makes
sense for most but not all dds formats.

This commit implements loading in 16 bit for "L16" - a 16 bit
luminance channel.

In addition to that we improve security a bit  by not assuming
that L16 is the only left over case but instead explicitly
checking the correct value of rmask for L16.

For other cases we now set an error with enough details
to identify the type of DDS image that needs extra
handling.

(cherry picked from commit fe228a6f6f)

# Conflicts:
#	plug-ins/file-dds/ddsread.c
2021-04-26 17:45:04 -04:00
Jordi Mas
0bc3653f98 Update Catalan translation 2021-04-26 20:27:09 +02:00
Yuri Chornoivan
330c3f49a9 Update Ukrainian translation 2021-04-25 17:53:28 +00:00
Jordi Mas
0ebf24d4b4 Update Catalan translation 2021-04-25 19:11:18 +02:00
Anders Jonsson
9102914748 Update Swedish translation 2021-04-25 16:01:35 +00:00
Ian Martins
eb9eec4acb pdb: add a PDB compat procedure for median-blur 2021-04-25 12:19:04 +00:00
Jacob Boerema
9406991bb7 plug-ins:fix #6624 metadata viewer default window size is too small
Let's increase the default size of the metadata viewer a bit.
Ideally we would add some logic to determine the width of
the first column since that one currently depends on the
length of the longest tag. However for now this change
will be enough for most cases.

(cherry picked from commit 165b50abcc)
2021-04-24 12:52:58 -04:00
Jacob Boerema
b2fa1bd948 script-fu: fix #6741 Round Corners script fails to work on layer masks
The round corners script was assuming that the drawable always
was a layer, which is incorrect when a layer mask is selected.

We fix this by always requesting the active layer instead of
active drawable.

We also enable this script for RGB and GRAY with alpha
channel. Although it might not always make sense to
use this script when an alpha channel is present, there
can be use cases where it is perfectly fine.

So let the designer decide if this script is suited or not
instead of GIMP making that judgement.

(cherry picked from commit ed35579861)

# Conflicts:
#	plug-ins/script-fu/scripts/round-corners.scm
2021-04-24 12:52:19 -04:00
Jehan
58a54998d3 NEWS: update. Start the GIMP 2.10.26 section. 2021-04-24 15:42:24 +02:00
saul
c447c7e7b5 plug-ins: Add 'dir-make' procedure to Script-fu.
Closes: GNOME/gimp#541

Reviewer note: thanks to Stanislav Grinkov for cleaning up and reworking
a bit the patch, such as renaming the procedure to dir-make, as per
Kevin Cozens' review.

(cherry picked from commit 11906fa82c)
2021-04-24 15:23:48 +02:00
bootchk
57bffb2464 GIMP-CRITICAL: gimp_marshal_VOID__OBJECT_STRING_STRING: assertion 'n_param_values == 4' failed
(cherry picked from commit c6fde64815)
2021-04-24 15:23:41 +02:00
Jehan
ac7e841e24 Issue #5008: Always true condition (i>=0) inside fill_inverse_cmap_gray.
Removing useless condition, add a g_return_if_fail() assertion for the
only (impossible unless bug) case which we don't expect. Also set
default mindist to G_MAXLONG instead of a magic number (which was ok now
but might become a problem if some day colormap allowed more than 16-bit
per channel colors).
Finally break when we reach a distance of 0 since we won't get lower
anyway, so better stop early.

Thanks to Rafał Mikrut and Øyvind Kolås for code commenting.

(cherry picked from commit d6dac25579)
2021-04-24 15:23:33 +02:00
Jehan
2e6c233a4c app: fix an assertion when converting grayscale images to indexed.
We cannot just compare the drawable format with the model-type specs of
the color model. We need to include the space now.
In my case, some random screenshot converted to gray then indexed would
assert because the format is "Y' u8-space-gray-sRGB" (or for layers with
alpha: "Y'A u8-space-gray-sRGB"), hence indexed conversion failed and
ended up dark.

(cherry picked from commit c0e605ef96)
2021-04-24 15:23:21 +02:00
Jacob Boerema
404c728e2a plug-ins: fix #6755 DDS RGB10A2 has Red and Blue swapped.
Looking at the documentation it is indeed red that should go
in the lowest bits and blue in the highest bits so just
reverse our code for red and blue.

We also update the version of our GIMP DDS plug-in,
this way we can catch and correct RGB10A2 images
written by older versions of our plug-in and correct
them.

(cherry picked from commit cad6273fed)

# Conflicts:
#	plug-ins/file-dds/dds.h
2021-04-23 15:12:54 -04:00
Jacob Boerema
b93dd4e0fe Revert "app: append insensitive reason to GimpAction proxy tooltip."
This reverts commit bf9a292723.

I messed up copying the commit to cherry pick.
2021-04-23 15:07:55 -04:00
Jehan
bf9a292723 app: append insensitive reason to GimpAction proxy tooltip.
With my previous commit, I improved the search action display and search
algorithm (which was returning wrong results), but we had lost showing
the non-sensitive reason in menu item tooltips. This fixes it, by
actually appending the reason, but only in the end, on the GtkWidget
tooltip (not in the action's tooltip itself).

(cherry picked from commit 13a02aea23)
2021-04-23 15:02:12 -04:00
Jehan
c52aa7dc2c plug-ins: change non-existing brush.
Fixes:
> Calling error for procedure 'gimp-brush-get-pixels':
> Brush 'Circle (03)' not found

The data/brushes/Circle-3.vbr brush doesn't exist since commit
7aa12175a4 in 2012 as far as I can see.

(cherry picked from commit 65e10faf50)
2021-04-21 17:53:43 +02:00
AmanMatta
1664ca7867 Update Makefile.am
(cherry picked from commit 6e27c46b5f)
2021-04-21 01:37:02 +02:00
Jehan
9b87106720 Issue 6210: Subpixel font rendering system settings should only apply…
… to GIMP not text layer rendering in image

Patch was merged n Cairo today, wouhou!
https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/114
If not mistaken, the fix should then appear in Cairo 1.17.6 or 1.18.0
(whatever comes next). As we are obviously not going to bump the Cairo
dependency so early, let's just add the patch, at the very least to be
used for our official builds. Also this way, we won't forget about this
issue in the future when we need to bump Cairo.

(cherry picked from commit 5f61d84570)
2021-04-20 18:30:56 +02:00
Lloyd Konneker
7b0df6f04a Fix issue #6577 : scriptfu hang on select dialog on Mac 2021-04-19 14:30:59 +00:00
Jacob Boerema
573a4798b6 plug-ins: fix #6723 Unable to open DDS files.
This is the same as what we did for #5357
but in the reverse situation. The reason
for not doing the same at that time was
because I wasn't sure if that was valid
in all cases.

Looking at the documentation it does seem
to be the right solution and is working for
the supplied example image.

(cherry picked from commit 48ff5313c3)

# Conflicts:
#	plug-ins/file-dds/ddsread.c
2021-04-14 13:44:14 -04:00
Jacob Boerema
59bab76383 app: fix 3d transform tool not added to gimphelp-ids.h
(cherry picked from commit 4aaad4f749)
2021-04-09 18:04:49 -04:00
Jehan
2b6ab09cc1 Issue #6394: Wacom Airbrush finger wheel non-functional (on…
… Cintiq 16).
Adding the patch provided by Knuckx. Note that the GTK3 variant of the
patch is already merged to gtk-3-24 branch and published since GTK
3.24.28. Nevertheless since the contributor also provided a GTK2
variant, it would be a bit of a waste to let it go down the drain,
wouldn't it?
So let's try and use it in our GIMP 2.10.x packages for Windows.
2021-04-07 14:27:56 +02:00
Jehan
2c182ed5eb build: adding patch for glib!2020.
This is a patch for issue #913, the infamous "non-existent floppy drive"
or other unreachable network or unmounted drives. Well at least it
*should* fix the issue, but GLib developers are hoping we could test. So
let's add this in there for our next Windows package.

(cherry picked from commit 7e2a0238a2)
2021-04-07 13:33:06 +02:00
Hannie Dumoleyn
dbc3139759 Update Dutch translation 2021-04-05 16:02:23 +00:00
Hannie Dumoleyn
7f7331e4dd Update Dutch translation 2021-04-05 15:58:11 +00:00
Simon McVittie
4d6cf1e3e8 app: Don't second-guess the dependency system
Removing this check makes the treatment of LittleCMS consistent with
all the other dependencies checked in the same file, which only check
that the runtime version is at least the required version.

As long as we were compiled against LittleCMS >= 2.8, and are now
running against a version that has at least the same symbols, it doesn't
necessarily matter whether the version we are running against is the
same one we were compiled against.

Distributions like Debian and Ubuntu track the versions in which
individual symbols were introduced, which allows runtime dependencies
to be weakened when no newer symbols are actually used; this is
practically necessary when working with very large numbers of packages,
to avoid a new version of a dependency library unnecessarily blocking
upgrade of dependent packages. However, this doesn't work if dependent
packages add their own checks that bypass this mechanism.

Signed-off-by: Simon McVittie <smcv@debian.org>
(cherry picked from commit dda65d85c3)
2021-04-04 16:06:10 +02:00
Jehan
1fd6f68afa meson, configure, plug-ins: image/x-sun-raster is a supported MimeTypes.
Also ".sun" is a possible (and common) file name extension for Sun
Raster images, according to various sources and samples I found (these
samples with .sun extension also opened fine in GIMP, so it's not just a
subvariant which we may not handle or something of the sort). This one
is not so important though as we also register magic bytes for detection
(which is the proper way), but it can still be useful, mostly for
exporting (as we will direct to the SunRaster plug-in if someone tried
to export a file with .sun extension, since no other file format uses
this extension AFAICS).

There is no functional change, I just had a look at this plug-in while
handling !428 and realized this format was not present in the MimeType
list (which is used to generate the desktop file, in order to have
proper mime types, not detection based on extension only, unlike
Windows in !428).

(cherry picked from commit cd3333c6d3)
2021-04-04 16:04:58 +02:00
Mario Daniel Ruiz Saavedra
f742981171 build: remove *.rs file association with SUN Raster images
Nowadays .rs is the extension for the Rust programming language files,
and it's confusing that GIMP is trying to associate with them.

A simple rename of existing .rs images to .ras will allow them to be
opened again.

Note by reviewer: ideally file association should not rely on filename
extension, and should be detected properly (i.e. file "magic"). This way
even extension clash would not be a problem (format would be detected
whatever the extension used). Unfortunately it's apparently not the case
on Windows.
Anyway since nowadays chances to see a Rust code file are likely much
higher than seeing a Sun Raster image file, let's just accept this patch
and drop association of `.rs` on Windows.

(cherry picked from commit 809e045ead)
2021-04-04 03:23:39 +02:00
Simon McVittie
261eff08f4 app: Print 2-digit LittleCMS minor versions correctly
LittleCMS 2.12.0 defines LCMS_VERSION as 2120. We want to print that
as 2.12.0, not 2.2.0.

Resolves: https://gitlab.gnome.org/GNOME/gimp/-/issues/6505
Signed-off-by: Simon McVittie <smcv@debian.org>
(cherry picked from commit e54bfa58b1)
2021-04-04 01:50:09 +02:00
Piotr Drąg
09d2ef07bf Update Polish translation 2021-04-03 13:48:10 +02:00
Rodrigo Lledó
ed2484b429 Update Spanish translation 2021-04-03 09:56:49 +00:00
Jehan
08b396503f plug-ins: fix another cast warning.
Fix again these warnings:
> cast from pointer to integer of different size

(cherry picked from commit 2c6e21b1e7)

Note: the absence of this made script-fu crash on Windows 64-bit. See
issue #6664. Why this suddenly appeared and never happened before GIMP
2.10.24 is a big mystery.
2021-03-30 23:56:56 +02:00
Jehan
07b947fbeb configure: post-release version bump to 2.10.25. 2021-03-28 23:49:12 +02:00
Jehan
fea5236e19 configure: release GIMP 2.10.24. 2021-03-28 22:30:30 +02:00
Anders Jonsson
50c460877f Update Swedish translation 2021-03-28 20:04:31 +00:00
Jehan
a7a3b983fb docs, etc: regenerate gimprc and its manpage. 2021-03-28 22:01:41 +02:00
Yuri Chornoivan
a0bb707d55 Update Ukrainian translation 2021-03-28 18:13:03 +00:00
Jehan
6a2910bd3b plug-ins: set the "Save GeoTIFF data" checkbox insensitive when…
… there are no such data available.
No need to have people test and wonder what it changes when it makes no
difference. Also adding a tooltip to make the "present on import"
condition a bit more obvious (hopefully).

This is only on `gimp-2-10` for now, for the 2.10.24 release. I will
port this to `master` branch later.
2021-03-28 19:17:15 +02:00
Jehan
c864b65525 NEWS: update/reword a bit more.
Some of the points are taken from the 2.99.x branch NEWS file.
2021-03-28 18:55:40 +02:00
Jehan
5e4b52eb40 NEWS: update. 2021-03-28 18:25:11 +02:00
Jehan
90f8cb54eb plug-ins: fix crash of qbist when loading files.
Contents of these arrays are assumed to be limited to a specific range.
While it did work sometimes (because a further processing would randomly
regenerate some of the indexes and correctly limit the range), it often
crashed.

This commit fixes the crash, but I am not sure this plug-in is working
exactly as expected regarding data load/save. It feels like you would
expect to always get the same patterns with a same source data. Yet
there is further randomization going on.

Oppositely when saving data, and re-loading it later, I would expect
once again to get back the exact same patterns I had when saving the
data. So it would be a way to save the result of randomization (as
chances to get back a pattern one liked are slim by definition when it's
created randomly).

Right now, it doesn't behave at all like this. Files are only used as
some kind of random seed, not as a way to save/load patterns. I feel
this was not the purpose of the file handling here.

(cherry picked from commit 7fb696206e)
2021-03-28 03:19:24 +02:00
Jehan
504c7875d6 configure: missing OpenRaster MIME type in desktop file.
Adding support for .ora files when Python plug-ins are installed.

(cherry picked from commit 1de810f6de)
2021-03-28 01:54:47 +01:00
Anders Jonsson
c9c8f96e46 Update Swedish translation 2021-03-27 20:21:41 +00:00
Jehan
d397a68d7a desktop: AppData ready for tomorrow's release.
Note that I marked the news as releasing on the 29th though the release
is marked for 28th, because we never manage to release the web news on
the same day, and usually we wait for the Windows and/or macOS
installers at least.
2021-03-27 21:05:35 +01:00
Øyvind Kolås
b61871e94a configure,app: depend on GEGL-0.4.30
This contains fixes also for GIMP. Note that the current babl
requirement is the minimum build requirement, newer release do contain
relevant fixes.
2021-03-27 20:20:41 +01:00
Matej Urbančič
7ebfc03283 Update Slovenian translation 2021-03-26 19:13:53 +00:00
Matej Urbančič
6c126529fa Update Slovenian translation 2021-03-26 19:08:57 +00:00
Matej Urbančič
3b0a4bf336 Update Slovenian translation 2021-03-26 19:07:48 +00:00
Matej Urbančič
c182d17ef7 Update Slovenian translation 2021-03-26 19:04:44 +00:00
Jacob Boerema
c8422ac34b plug-ins: fix incorrect saving of Iptc.Application2.Caption in metadata-editor.
The saved value for Iptc.Application2.Caption is copied from Xmp.dc.description.
However the last one is multiline but the former should be single line. This
caused only the first line to be saved instead of all lines.

To fix this we set Iptc.Application2.Caption to single and use a different
conversion based on whether the tags from Xmp and Iptc are both
multiline or whether Iptc is single line.

(cherry picked from commit 5d14c59d2e)
2021-03-24 13:02:12 -04:00
Jacob Boerema
e3c57e43c8 plug-ins: fix incorrect values for ModelReleaseStatus and PropertyReleaseStatus.
While testing the metadata-editor I noticed that certain values for
ModelReleaseStatus and PropertyReleaseStatus were incorrectly
read back.

Apparently while copy pasting some values were forgotten to be
updated which caused incorrect values to be saved.

There probably are not many users of these metadata tags
since in all these years there hasn't been a bug report about this.

(cherry picked from commit 93f591931b)
2021-03-23 16:46:03 -04:00
Jacob Boerema
27ee0c87ee plug-ins: Do not write to Iptc.Application2.DateCreated if no date was set.
The metadata-editor allowed Iptc tags to be set if an empty string was
used contrary to Xmp tags. In the case of DateCreated this cause an
invalid date "0-00-00" to be written.

We added a check to only write text Iptc metadata if the value is
not empty.

(cherry picked from commit 0a902456ac)
2021-03-23 15:26:07 -04:00
Jacob Boerema
efc41d1fa8 plug-ins: Do not write empty ModelReleaseStatus and DigitalSourceType.
Fixes issue #3656 Empty metadata tags are written to XCF at least.

Xmp.plus.ModelReleaseStatus and Xmp.iptcExt.DigitalSourceType are
defined as combo boxes with a fixed number of possible values.
However there was no option to leave it empty so there always was
a value written when saving metadata in the metadata-editor.

We added a "select value" as default option and only write
metadata if a different value was chosen.

As a bonus we replaced the fixed loop numbers with
the current actual number of defined choices.

(cherry picked from commit a229454915)
2021-03-23 15:25:50 -04:00
Rodrigo Costa
8c1e7679a0 Update Brazilian Portuguese translation 2021-03-23 15:05:29 +00:00
Jacob Boerema
7b1f6e69dc plug-ins: interpret Exif.Photo.UserComment before showing in metadata-viewer.
(cherry picked from commit 34463786b1)

# Conflicts:
#	plug-ins/metadata/metadata-viewer.c
2021-03-22 16:30:02 -04:00
Jacob Boerema
e10517dccc libgimp: fix issue #6050 Phantom comments on pictures.
Since version 0.27.3 exiv2 has changed how it returns
comments for Exif.Photo.UserComment. We now get
the comment including the charset=Ascii value.

Let's remove anything that's not part of the actual
comment. To not complicate things we will  only
handle charset=Ascii for now since I've never seen
any other charset used.

(cherry picked from commit 352b5885b1)

# Conflicts:
#	libgimp/gimpimagemetadata.c
2021-03-22 16:29:12 -04:00
Jacob Boerema
34983e1a25 libgimp: improve saving xmp metadata.
1. Convert xmp /Iptc4xmpExt tag parts to /iptcExt because
exiv2 fails when we try to use the default namespace.

2. Don't only set structs from a fixed list but find all
xmp array elements and check what the best struct
type is: bag or seq.

3. Work around a sorting issue in (g)exiv2 by using a natural
sorting algorithm ourselves.

4. Added some g_debug statements to make it easier to
determine the cause of issues.
2021-03-21 18:27:35 +00:00
Anders Jonsson
0e14834e1d Update Swedish translation 2021-03-21 17:42:33 +00:00
Jacob Boerema
404d0a711d plug-ins: in metadata-editor use /iptcExt instead of /Iptc4xmpExt when saving.
We need to work around an issue in Exiv2 that saving to /Iptc4xmpExt bag
records fails which seems related to it registering /iptcExt. Unregistering
that and registering the first one doesn't work.
See: https://gitlab.gnome.org/GNOME/gexiv2/-/issues/24

So let's use /iptcExt for saving even though it's the less common form
for now. When loading metadata we try to load the most common
form first and if that fails we will load /iptcExt.

(cherry picked from commit a95371c2b0)
2021-03-16 13:27:12 -04:00
Jacob Boerema
81b4ce100e plug-ins: set most common CreatorContactInfo last in metadata-editor.
Set Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:* last since the short
form Xmp.iptc.Ci* could have been used to set this information too.

Becausethe first (longer) form is the most common let that override the
shorter form in the (unlikely) case that both are present and also have
different values.

Due to a bug in the metadata-editor previously only the short form
was saved.

(cherry picked from commit d00fe2bfe2)
2021-03-16 13:26:56 -04:00
Jacob Boerema
cb3f7d527d plug-ins: fix several memory leaks in metadata-editor.
(cherry picked from commit 184b803811)
2021-03-16 13:26:39 -04:00
Jacob Boerema
aeb4967334 plug-ins: fix using incorrect structs and fields in metadata-editor.
(cherry picked from commit f04b84cb39)
2021-03-16 13:26:23 -04:00
Jacob Boerema
11de16f8ab plug-ins: more refactoring of duplicate code in metadata-editor.
Reordered the strings in artworkorobject to be in the same
order as the columns.
Add write_metadata_tag_multiple function that handles most
of the previously duplicated code and check for special
handling of phonetype when necessary by adding
an enum and a get_phonetype function.

(cherry picked from commit 4609def72f)
2021-03-16 13:26:07 -04:00
Jacob Boerema
b5b8e38479 plug-ins: refactor writing single metadata tag in metadata-editor.
Use a separate function that can be reused and also get rid of
the large output_data array and strcat without length
checking. We will use GString instead.

(cherry picked from commit 9c2451d813)
2021-03-16 13:25:47 -04:00
Jacob Boerema
eda92ae5c7 plug-ins: remove use of strcpy without length checking in metadata-editor.
(cherry picked from commit 87763cbe27)
2021-03-16 13:25:30 -04:00
Jacob Boerema
b6f0c0130b plug-ins: remove use of global tagdata array in metadata-editor.
This removes some flawfinder warnings by not using a fixed
size array and using g_snprintf instead of g_sprintf and
using more safety checks.

(cherry picked from commit c2fa21ac7d)
2021-03-16 13:25:12 -04:00
Jacob Boerema
b40c29ac0a plug-ins: more refactoring of metadata-editor.
There was a lot of duplicate code based on
whether or not value was NULL with for
some tags partially unreachable code.

We combine the parts and only test
value for NULL where needed.

Also rename the typos in enum
COL_REGSITRY_* to
COL_REGISTRY_*

(cherry picked from commit 0a0eeac1ad)
2021-03-16 13:24:56 -04:00
Jacob Boerema
b0ab2b0e62 plug-ins: refactor metadata-editor adding values to gui.
There's a lot of duplicate code for adding string values
to the gui (liststore). This is another part of trying
to reduce that.
Besides that the copying code uses fixed size arrays
without length checking as pointed out by flawfinder.

We will instead use a function add_to_store to add a
comma or semicolon separated list of values stored in
value to add rows with values to the gui.

(cherry picked from commit e24a6dc8d6)
2021-03-16 13:24:37 -04:00
Stanislav Grinkov
6770f19e01 tools: Made 'Crop tool' aware of color or pattern changes
Crop tool used stale color / pattern values when performed crop with
'Allow growing' option. Its context was not notified when fg/bg/pattern
value was changed.

Closes: #4103
2021-03-11 19:45:19 +06:00
Balázs Úr
adc11d7a2c Update Hungarian translation 2021-03-11 08:27:02 +00:00
Jehan
9fcc31ea19 Issue 4594: Spotify doesn't open with Gimp open.
GLib has been fixed with commit 00e848fbc.
Add it in our patch list for the Windows installer until we get a
release containing the patch.

(cherry picked from commit 106e13d5db)
2021-03-10 13:26:21 +01:00
Piotr Drąg
be9995adc5 Update Polish translation 2021-03-06 14:25:21 +01:00
Yuri Chornoivan
58d63d4809 Update Ukrainian translation 2021-03-06 07:52:08 +00:00
Jacob Boerema
f4420f51a0 plug-ins: fix cherry picking of commit fb38e42 2021-03-05 15:16:27 -05:00
Jacob Boerema
c7f8e505de plug-ins: be a little more forgiving loading g3 fax images.
Only count a broken line once and only stop after at
least 10 consecutive broken lines since older fax
images are known for having bad lines.

This enables loading the image in issues #475.

(cherry picked from commit fd2aa645af)
2021-03-05 14:30:58 -05:00
Jacob Boerema
fb38e42ff4 plug-ins: improve error handling when loading g3 fax images.
Fixes issue #475 Loading a fuzzed .g3 file fails.

(cherry picked from commit 1edd114834)

# Conflicts:
#	plug-ins/file-faxg3/faxg3.c
2021-03-05 14:30:23 -05:00
Jacob Boerema
9bf8097bd7 plug-ins, TIFF: Oops, forgot to save formatting fixes before committing.
(cherry picked from commit 441631322b)
2021-03-04 15:25:47 -05:00
Yuri Chornoivan
3751cfa082 Update Ukrainian translation 2021-03-04 18:35:15 +00:00
Jacob Boerema
a2a12f4656 plug-ins, TIFF: Don't try to load image with bit depth we can't handle.
(cherry picked from commit a79aac687b)

# Conflicts:
#	plug-ins/file-tiff/file-tiff-load.c
2021-03-04 13:20:44 -05:00
Jacob Boerema
70e463fa99 plug-ins, TIFF: improve loading of miniswhite/minisblack images.
- Miniswhite and Minisblack TIFF images with bps 1, 2 and 4 were loaded as
indexed. We change this to grayscale since that's what they are.
- Fix not handling of miniswhite for 8 bps.

Fixes issue #1838 Tiff image display wrong (tiff tags not interpreted), black
line instead of white line.
Fixes issue #2680 Failure to load 4-bit grayscale TIFF layers.

(cherry picked from commit a6d4ef8b94)

# Conflicts:
#	plug-ins/file-tiff/file-tiff-load.c
2021-03-04 13:18:43 -05:00
Balázs Úr
7e100da669 Update Hungarian translation 2021-03-04 07:59:06 +00:00
Balázs Úr
87296e3408 Update Hungarian translation 2021-03-04 06:56:06 +00:00
Jordi Mas
1dbdf07ee5 Update Catalan translation 2021-03-03 22:49:12 +01:00
Jehan
d149dfbab7 plug-ins: changed GTK_RESPONSE_YES|NO into GTK_RESPONSE_OK|CANCEL.
Without the proper button response associated, we don't have the right
button order, as standardized by various desktops.

(cherry picked from commit 9893f60d8c)
2021-03-03 21:01:22 +01:00
Martin Srebotnjak
b6724806b0 Updated Slovenian translation 2021-03-03 17:29:09 +01:00
Martin Srebotnjak
6bbf65f3c8 Updated Slovenian translation 2021-03-03 17:28:09 +01:00
Martin Srebotnjak
a5fbc1818a Updated Slovenian translation 2021-03-03 17:26:56 +01:00
Martin Srebotnjak
72a14bd1ec Updated Slovenian translation 2021-03-03 17:19:29 +01:00
Martin Srebotnjak
24584537fd Updated Slovenian translation 2021-03-03 17:15:06 +01:00
Yuri Chornoivan
a3c61da627 Update Ukrainian translation 2021-03-03 07:41:22 +00:00
Jacob Boerema
198fdc4e52 plug-ins: improve a few error messages and allow translating.
Improved and added a few error messages and made all
user visible messages (g_message) translatable.

(cherry picked from commit 20cedd4c0c)

# Conflicts:
#	plug-ins/file-tiff/file-tiff-load.c
2021-03-02 17:37:48 -05:00
Jacob Boerema
2ead36db7d plug-ins: add more safety checks when loading a TIFF image.
Testing some fuzzed TIFF images from the imagetestsuite
revealed we should add some more checks for valid input
and function returns.

We now stop whenever the reported bps is above 64.
Even if it is valid we can't handle it anyway and I'm not
aware of any actual valid image like that.

Make sure the image dimensions are valid and in the range
that GIMP can handle.

Return directly when TIFFReadRGBAImage fails instead
of doing further processing and improve the error message.

Check result of TIFFReadTile and return if it fails.

(cherry picked from commit 2ff9ccf46c)
2021-03-02 17:33:31 -05:00
Jacob Boerema
753c596404 plug-ins: libtiff warnings can cause a crash on Windows.
Certain broken tiff fax images can cause a huge amount of warnings
which on Windows eventually causes GIMP to run out of resources
and then crash.

Since the avarage user won't have much use for these warnings
let's just only send them to stderr.

(cherry picked from commit 97739af643)
2021-03-02 17:33:16 -05:00
Hannie Dumoleyn
b5504159ed Update Dutch translation 2021-02-28 08:08:14 +00:00
Sabri Ünal
0fa7546893 Update Turkish translation 2021-02-28 07:11:24 +00:00
Piotr Drąg
9f0023659e Update Polish translation 2021-02-27 13:46:35 +01:00
Sabri Ünal
c3b612a457 Update Turkish translation 2021-02-26 17:39:06 +00:00
Sabri Ünal
a1e2445981 Update Turkish translation 2021-02-26 17:33:55 +00:00
Sabri Ünal
ab77c12f71 Update Turkish translation 2021-02-26 17:32:58 +00:00
Jordi Mas
7f38e19e3b Update Catalan translation 2021-02-26 18:29:01 +01:00
Hannie Dumoleyn
dfb1b7a6b4 Update Dutch translation 2021-02-26 11:49:43 +00:00
Hannie Dumoleyn
3dd107e917 Update Dutch translation 2021-02-26 11:46:39 +00:00
Hannie Dumoleyn
9b67bf648d Update Dutch translation 2021-02-26 11:43:37 +00:00
Hannie Dumoleyn
738571298a Update Dutch translation 2021-02-26 11:40:35 +00:00
Hannie Dumoleyn
a73ac67680 Update Dutch translation 2021-02-26 11:38:07 +00:00
Marco Ciampa
f034ea4237 Updated Italian translation 2021-02-25 15:47:57 +01:00
Philipp Kiemle
97e09dc760 Update German translation 2021-02-25 13:37:28 +00:00
Milo Ivir
fbfc777f88 Update Croatian translation 2021-02-25 11:47:39 +00:00
Milo Ivir
26a57a5757 Update Croatian translation 2021-02-25 11:46:56 +00:00
Milo Ivir
d4a55829ab Update Croatian translation 2021-02-25 11:43:34 +00:00
Anders Jonsson
fa30869e72 Update Swedish translation 2021-02-24 21:49:02 +00:00
Jehan
f83fd22c4b app: make "gegl:introspect" an optional operation dependency.
Check at runtime for the operation availability and set the "Show Image
Graph" action active depending on this check.

This goes with discussions to make this operation optional with a
runtime check for the tool `dot`.
See: https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/84
2021-02-24 20:05:46 +01:00
Stanislav Grinkov
f63086bd5a tools: Rectangle select. Incorrect center_xy after converting channel selection to rectangle
Was caused by widget tool fixed_center_x and fixed_center_y coordinates set to
coordinates of mouse click instead of rectangle center after converting channel
selection bbox to rectangle.

Now rectangle fixed_center_x and fixed_center_y coordinates are always updated
when tool widget x1, x2, y1, or y2 coordinates are updated.

Closes #6487

(cherry picked from commit 6959426603)
2021-02-24 19:05:42 +01:00
Daniel Mustieles
b9ee5ad6f2 Update Spanish translation 2021-02-24 17:21:58 +00:00
Yuri Chornoivan
6d4e869e0b Update Ukrainian translation 2021-02-24 16:41:44 +00:00
Jehan
cb6cf6d286 desktop: add 2.10.24 release note to AppData. 2021-02-24 17:15:59 +01:00
Balázs Meskó
b6227c4ffc Update Hungarian translation 2021-02-18 06:50:30 +00:00
Balázs Meskó
b5d55d453d Update Hungarian translation 2021-02-18 06:41:29 +00:00
Anders Jonsson
67a891a8db Update Swedish translation 2021-02-16 21:43:32 +00:00
Balázs Meskó
fd3d80ff69 Update Hungarian translation 2021-02-16 01:17:45 +00:00
William Ferguson
3e8f340e76 plug-ins: update darktable lua script to API change in darktable master
The Lua API is undergoing changes in darktable master. I've fixed the lua-scripts repository as I've made
changes, but I forgot about the collateral damage.

Attached is a fixed version of file-darktable-export-on-exit.lua which should be good for darktable 3.6 and
beyond.

Fixes #6421

(cherry picked from commit 636eb02edc)
2021-02-15 18:19:11 +01:00
Balázs Úr
6726d24251 Update Hungarian translation 2021-02-15 00:02:53 +00:00
Balázs Úr
f51c21fd89 Update Hungarian translation 2021-02-14 23:34:39 +00:00
Balázs Úr
96b917702c Update Hungarian translation 2021-02-14 00:51:41 +00:00
Balázs Úr
e5c0f3464d Update Hungarian translation 2021-02-14 00:20:12 +00:00
Jehan
22db7695c8 Issue #288: Point snapping to guides does not work outside the canvas.
This commit also makes snap to grid and snap to vectors work off-canvas.
Since we now have off-canvas viewing, it just makes sense that snapping
would work there too.

Note that I disable snap to grid when "Show All" is OFF. I am actually
unsure this is right (as "Show All" is a view action, and we usually
don't change behavior based on view actions; for instance snap to guides
are not disabled if guides are hidden). Yet I noticed we do this in
various other features when off-canvas. We kind of use this view flag as
a switch for features working off-canvas (for instance, color picking
works off-canvas only when "Show All" is ON). So let's keep the same
logics for now at least.

Snap to guide or snap to vectors will always work though, because guides
and vectors are always visible off-canvas (even when "Show All" is OFF).
They always have been (visible, not snappable off-canvas; now they are
both).

(cherry picked from commit 82438728fb)
2021-02-13 13:11:27 +01:00
Orgad Shaneh
97f063b926 Fix Python execution with autocrlf on Windows
If the interp file contains CRLF, the \r is read as part of the
executable file name, and gimp searches for python3.exe\r.

(cherry picked from commit b134da1f39)
2021-02-13 13:11:10 +01:00
Piotr Drąg
7aac5b8f33 Update Polish translation 2021-02-07 12:02:19 +01:00
Rodrigo Lledó
ea40649186 Update Spanish translation 2021-02-04 12:52:06 +00:00
Rodrigo Lledó
4966ed6a5f Update Spanish translation 2021-02-04 12:24:17 +00:00
Anders Jonsson
c03bf4c880 Update Swedish translation 2021-02-01 21:20:26 +00:00
Jordi Mas
d58adad75c Update Catalan translation 2021-01-31 22:28:18 +01:00
Yuri Chornoivan
47ab70ec84 Update Ukrainian translation 2021-01-31 17:34:47 +00:00
Stanislav Grinkov
de95be80a4 plug-ins: #5896. add option for reversing order of layers when importing PDF
This feature adds new 'Load in reverse order' toggle box to allow
selection of order of PDF pages before importing them as a layers
or images.
2021-01-31 17:00:44 +00:00
Anders Jonsson
73e6b1a124 Update Swedish translation 2021-01-27 21:21:33 +00:00
Jordi Mas
6feae84622 Update Catalan translation 2021-01-25 22:45:27 +01:00
Stanislav Grinkov
822de6891a plugins: feature #449 allow fract DPI values when importing PDF
This commit fixes the issue when requested page width/height was
    not honored because DPI resolution value was constrained to whole
    integer numbers only.
2021-01-24 16:19:52 +00:00
Piotr Drąg
16c8c04628 Update Polish translation 2021-01-24 13:10:33 +01:00
Jordi Mas
de3ee0030e Fixes to Catalan translation 2021-01-22 22:10:42 +01:00
Yuri Chornoivan
7b9102c6a2 Update Ukrainian translation 2021-01-22 18:25:32 +00:00
Jacob Boerema
921ccef1cd Issue #987 Corrupt 'gimp-metadata' parasite. Parsing XMP data failed.
XMP metadata saved by GIMP 2.8.x or earlier can have duplicate tags
making the XMP data invalid. There's not much we can do without a
whole lot of processing and complicated code and even then no
guarantee we would catch everything.

Instead let's just try to improve the message to the user so they
will be more likely to understand what's going on.

(cherry picked from commit 6df6332f9b)
2021-01-22 12:46:10 -05:00
Jordi Mas
9f35f214bf Update Catalan translation 2021-01-21 22:16:32 +01:00
Jacob Boerema
89809cf55a xcf: fix #6138 Stack Overflow when saving xcf.
Although I haven't been able to reproduce it, it is apparently
possible to get a Stack Overflow when loading xcf files with
presumably very large dimensions on Windows. From what
I'm reading Windows normally has a smaller stack size than
Linux, probably why it hasn't surfaced there.

Instead of allocating on the stack let's do a g_malloc0
combined with g_free.

(cherry picked from commit 6b65998bf7)
2021-01-21 11:46:45 -05:00
Jehan
603cc117b9 libgimpbase: fix memory leak in gimp_installation_directory().
Argh I should have properly reviewed !392 (commit c264f0b705).
It was leaking the return value of a g_path_get_basename().

(cherry picked from commit 1873f0d65c)
2021-01-19 12:13:06 +01:00
Pieter van Oostrum
8f38cb9900 gimp: macOS: fix for file export dialogs GIF and PNG. Authored by @pietervo, and he should be credited with this.
(cherry picked from commit c264f0b705)
2021-01-19 11:43:26 +01:00
Anders Jonsson
d04b5a97ee Update Swedish translation 2021-01-18 20:41:19 +00:00
Милош Поповић
342ad0b851 Update Serbian (Latin) translation 2021-01-18 19:19:54 +00:00
Милош Поповић
ede0292fd8 Update Serbian translation 2021-01-18 19:13:25 +00:00
Jehan
6c67eef3e7 plug-ins: more debugging data in file-darktable.
darktable GUI is "mangled" when opened from GIMP for a reporter. There
was already some debug info outputted (when running with DARKTABLE_DEBUG
environment variable). Adding the environment list (and some separation
titles to make it easier to distinguish what is what). Hopefully it will
help debugging.
See #6195 and https://github.com/darktable-org/darktable/issues/7402

(cherry picked from commit 7465b0782a)
2021-01-18 14:40:28 +01:00
Daniel Novomesky
51d8421eaa HEIF plug-in: ensure max quality for lossless encoding
There is a possible bug in libheif. Lossless setting is not working
when AVIF is saved via rav1e encoder.
This is a workaround of the problem.
2021-01-18 10:56:29 +00:00
Yuri Chornoivan
d29149c875 Update Ukrainian translation 2021-01-18 10:20:28 +00:00
Jacob Boerema
3399ee4d2c plug-ins: fix #6279 Error loading PSD file: Unexpected end of file.
We were not handling all possible record sizes for mask info and
in case it was an unknown size we set everything to 0 instead
of reading the parts we do recognize.

Let's make it more flexible by reading the parts we do know
about and skip the remaining data if any.

Also added a few more g_debug statements to make it
easier to check some values when needed.

(cherry picked from commit 83ab86eb8b)
2021-01-17 16:13:24 -05:00
sicklylife
0c1f0f4e0f Update Japanese translation 2021-01-16 22:40:20 +00:00
sicklylife
3885c273dd Update Japanese translation 2021-01-16 22:36:38 +00:00
sicklylife
dd82ed7cda Update Japanese translation 2021-01-16 22:31:52 +00:00
Милош Поповић
e6b630dc92 Update Serbian (Latin) translation 2021-01-15 22:50:06 +00:00
Милош Поповић
a1da04adb9 Update Serbian translation 2021-01-15 22:47:26 +00:00
Милош Поповић
d792e48477 Update Serbian (Latin) translation 2021-01-15 01:38:16 +00:00
Милош Поповић
f28d542386 Update Serbian translation 2021-01-15 01:35:18 +00:00
Милош Поповић
75aa01692d Update Serbian (Latin) translation 2021-01-15 00:31:18 +00:00
Милош Поповић
b9e83b7d55 Update Serbian translation 2021-01-15 00:28:37 +00:00
Jacob Boerema
e574cd31f6 plug-ins: fix #5081 Opening TIFF with YCbCr format displays incorrect warning.
When testing for the presence of extra channels we were not taking into
account all values of TIFFTAG_PHOTOMETRIC causing incorrect messages
that we had a non conformant TIFF without ExtraSamples field.

Since the same test is used twice I separated the code into a new function
and also added another related function to have similar code grouped
together for easier maintenance.

(cherry picked from commit f489976b05)
2021-01-14 12:42:16 -05:00
Милош Поповић
d54f5759bb Update Serbian (Latin) translation 2021-01-11 23:34:16 +00:00
Милош Поповић
24b86508e5 Update Serbian translation 2021-01-11 23:32:45 +00:00
Милош Поповић
342dbbd18b Update Serbian (Latin) translation 2021-01-11 22:32:14 +00:00
Милош Поповић
817306d786 Update Serbian translation 2021-01-11 22:25:36 +00:00
Timo Jyrinki
dfc2bcf7b9 Update Finnish translation 2021-01-10 08:21:55 +00:00
Jacob Boerema
37d75d5eb3 plug-ins: allow loading of BMP images with incorrect BI_BITFIELDS compression.
GIMP was exporting certain BMP images with 1, 4, 8 and 24 bpp
with an incorrectly set value of BI_BITFIELDS for compression,
see issue #6144.

According to the specification this is not supported but testing
shows that many image viewers and editors load these
images correctly.
Since allowing these unsupported values for bpp does not
seem to have any negative side effects and is easy to
implement let's add this.

(cherry picked from commit e55e078245)
2021-01-07 18:12:55 -05:00
Jacob Boerema
b38eedad01 plug-ins: fix #6144 Unrecognised or invalid BMP compression format.
The Microsoft specification for BITMAPV5HEADER says that
BI_BITFIELDS is valid for 16 and 32-bits per pixel, but we
were also using this flag for other values of bpp when
no rle compression was used.
Since this specification doesn't mention 24 bpp or other
values use BI_RGB instead.

(cherry picked from commit d8c164ced3)
2021-01-07 18:12:38 -05:00
Jacob Boerema
bf98388d97 plug-ins: set blue channel of BC5 dds images to 0 instead of 255.
Information in issue #6200 revealed that 0 as default value for
the blue channel is a lot more common than 255 so let's use
that instead. The discussion and testing revealed no negative
effects for the other formats that use the same code to
initialize the memory to read blocks of image data.

(cherry picked from commit 691548579a)
2021-01-05 22:48:56 -05:00
Jacob Boerema
c82c995bd3 plug-ins: fix incorrect dds BC5 images saved by GIMP.
Since older versions of our GIMP dds file exporter incorrectly
saved BC5 dds images with the red and green channels
swapped we should fix that. Since the exporter already
wrote the plug-ins version number and that it is written by
GIMP we can check for these incorrect images.

To enable that we increase the plug-ins revision in this
commit and swap red and green channels for images
that have an older version number and are of the
correct type.

(cherry picked from commit a4cc8b7070)

# Conflicts:
#	plug-ins/file-dds/dds.h
2021-01-05 22:48:00 -05:00
Jacob Boerema
204c6fa8a5 plug-ins: fix #6200 DDS BC5 compression/decompression has Red and Blue swapped.
(cherry picked from commit efa899ad15)
2021-01-05 22:40:20 -05:00
sicklylife
8aebe03034 Update Japanese translation 2021-01-04 21:25:29 +00:00
Daniel Șerbănescu
a51bcc5fa9 Update Romanian translation 2021-01-04 15:55:18 +00:00
nick758
5874f7fb0b Issue #5066: Create From Screenshot Crash.
(cherry picked from commit 029ffd5778)
2021-01-02 19:08:15 +01:00
sicklylife
dfdd71c7ab Update Japanese translation 2021-01-02 17:55:35 +00:00
sicklylife
a06c2dec13 Update Japanese translation 2021-01-02 17:53:50 +00:00
sicklylife
bda43922a5 Update Japanese translation 2021-01-02 17:15:57 +00:00
Daniel Mustieles
86c1524864 Update Spanish translation 2021-01-01 09:32:42 +00:00
Anders Jonsson
25bc7c674c Update Swedish translation 2020-12-30 17:32:38 +00:00
Jordi Mas
82cf4af2a5 Update Catalan translation 2020-12-23 07:52:14 +01:00
Jehan
b17b33e2e2 plug-ins: also omit hidden layer groups in PDF export.
When the "Omit hidden layers and layers with zero opacity" option is
set, this property was only checked on non-group layers. So if we had
non-hidden layers inside hidden layer groups, they ended up exported,
which is not the expected behavior.

See https://gitlab.gnome.org/GNOME/gimp/issues/4425#note_675350

(cherry picked from commit 24a0b0c53a)
2020-12-21 21:00:14 +01:00
Piotr Drąg
d6a0660c0d Update Polish translation 2020-12-20 12:42:24 +01:00
Yuri Chornoivan
bc7b0cb910 Update Ukrainian translation 2020-12-19 07:44:26 +00:00
Jacob Boerema
dbf41dc63f plug-ins: fix #4176 color displayed wrong in multi page tiffs with linear TRC.
If we were loading multi page tif images as layers then only the tif pages
that had a color profile attached would get set as linear (and each tiff page
can have a color profile). Since most of the time only the first page has a
color profile this caused us to load linear tiff pages incorrectly.

Also we were overwriting the color profile if there was more than one since
GIMP can only load one per image. Instead of using the last one we see
use the first one and notify if we encounter more than one.

(cherry picked from commit c05abcefc6)

# Conflicts:
#	plug-ins/file-tiff/file-tiff-load.c
2020-12-18 14:12:11 -05:00
Jehan
c7b5464026 po-plug-ins, po: (workaround bis) fixing the distcheck job in CI.
My fix in commit 9e4aa586f7 was not enough because CLEANFILES apparently
would only be processed on Makefile.am (i.e. with automake). Just remove
the file explicitly in the distclean rule.

(cherry picked from commit dfc4ecfc4c)
2020-12-17 15:45:25 +01:00
Jehan
7d9fd36cd8 po, po-plug-ins: (workaround) fixing the distcheck job in CI.
Now the distcheck job fails with the following error:

> ERROR: files left in build directory after distclean:
> ./po/.intltool-merge-cache.lock
> ./po-plug-ins/.intltool-merge-cache.lock
> make[1]: *** [Makefile:1155: distcleancheck] Error 1

There is definitely some change which happened on Debian packages,
either on intltool-merge itself, or something around, because these are
behavior breakage. We never set such `.intltool-merge-cache.lock` lock
files ourselves, so obviously we should not be the ones to clean these.
This is only a workaround which should be removed once upstream fixed
the issue.

(cherry picked from commit 9e4aa586f7)
2020-12-17 15:45:04 +01:00
Jehan
6b9131e643 data: create po-tags/ build directory.
We have a sudden CI failure which is maybe because of a change of
intltool-merge. We believe it might be because of a missing directory.
Let's test making it before running the command.

Fixes:

> /usr/bin/intltool-merge ../../../po-tags
>   ../../../data/tags/gimp-tags-default.xml.in gimp-tags-default.xml -x -u
>   -c ../../po-tags/.intltool-merge-cache
> No such file or directory at /usr/bin/intltool-merge line 396.

(cherry picked from commit 845f1c81ed)
2020-12-17 15:44:56 +01:00
Daniel Novomesky
5d76ae7db2 Updated HEIF plug-in
With libheif 1.10, visually lossless export is possible
for 10/12 bit depths too.
2020-12-17 13:46:09 +01:00
Jehan
b6ddab60c0 NEWS: update. 2020-12-14 15:17:19 +01:00
Bruno Lopes da Silva
e357b0bd83 Update Brazilian Portuguese translation 2020-12-14 11:01:59 +00:00
Henrique Roberto Gattermann Mittelstaedt
0d8b602c22 Update Brazilian Portuguese translation 2020-12-14 10:32:45 +00:00
Sveinn í Felli
b8531885e1 Update Icelandic translation 2020-12-12 15:28:41 +00:00
Jacob Boerema
258a394f58 plug-ins: fix loading 2 and 4 bit tiff images.
This fixes issue #6065 and part of #2680.

Sometime after GIMP 2.8 loading of 2 and 4 bit tif images,
both grayscale and indexed, got broken.

I added routines for handling 2 and 4 bit tifs based on
the handling of 1 bit images.

(cherry picked from commit 991e99f08a)
2020-12-10 22:33:24 -05:00
Michael Schumacher
87a670a272 gitlab-ci: package is called libaa1-dev, not libaa-dev 2020-12-09 22:51:58 +01:00
Michael Schumacher
2fefbded35 gitlab-ci: make the GIMP build more complete
Added appstream-util, libaa-dev, libavif-dev, libgs-dev and libheif-dev.
2020-12-09 22:48:15 +01:00
Michael Schumacher
d89a5b5ba1 gitlab-ci: we need graphviz for dot, not graphiz-dev 2020-12-09 22:19:30 +01:00
Jordi Mas
39d9e872bd Update Catalan translation 2020-12-09 21:19:57 +01:00
Piotr Drąg
90293c596c Update Polish translation 2020-12-06 13:02:50 +01:00
Christian Kirbach
f06316364d Update German translation 2020-12-05 18:57:26 +00:00
dlatikay
b1e11e5cf9 #5977 prompt to apply layer offset only if there actually is a (non-zero) offset
(cherry picked from commit 9c85faddaa)
2020-12-02 23:21:24 +01:00
Yuri Chornoivan
3706f43f59 Update Ukrainian translation 2020-12-02 07:33:30 +00:00
Jacob Boerema
d3527f22e4 plug-ins: fix mistakes in cherry-picking metadata improvements. 2020-12-01 21:16:03 -05:00
Jacob Boerema
bcf91f7774 plug-ins: use logging for some messages that seem to be for debugging only.
By using a logging domain we can filter the messages and can choose to
only see them when needed. They seem to be leftovers from coding or
debugging but I don't wanna invest too much time into this.

(cherry picked from commit 08afb7d03b)
2020-12-01 19:08:31 -05:00
Jacob Boerema
3f3dd3cfc9 plug-ins: improve error handling and use GError in metadata-editor/viewer.
metadata-editor and metadata-viewer did return GIMP_PDB_SUCCESS when
loading the dialog ui failed, we changed this to GIMP_PDB_EXECUTION_ERROR
and now use a GError to report it back to GIMP.

In metadata-editor also improve the error handling when loading the calendar
dialog fails.

The error also only showed in the console so change that to show a dialog
or the error console.

(cherry picked from commit 0ffee001bf)

# Conflicts:
#	plug-ins/metadata/metadata-editor.c
#	plug-ins/metadata/metadata-viewer.c
2020-12-01 19:07:47 -05:00
Jacob Boerema
1965c759a2 plug-ins: fix #2836 GPS data is truncated to the degree when edited.
The string parsing for gps longitude/latitude was not taking all
possible values into account and also the seconds part was
not saved with enough detail.

For altitude lets also increase the detail a bit from .1m to
.10m.

(cherry picked from commit 3d9a9fbbf3)

# Conflicts:
#	plug-ins/metadata/metadata-editor.c
2020-12-01 18:29:00 -05:00
Jacob Boerema
fe77ded9e9 plug-ins: improve formatting of gps data in metadata-editor.
Also add tooltips that explain how to correctly add gps
longitude, latitude and altitude values.

(cherry picked from commit 0318054cb4)
2020-12-01 18:26:31 -05:00
Jacob Boerema
f131ede108 plug-ins: use g_log instead of g_printerr when setting tag fails.
By using g_log with G_LOG_LEVEL_MESSAGE and empty domain
name we make sure the failure to write a tag will be seen by
the user in GIMP's user interface (error console or error
dialog).

(cherry picked from commit c4fa4fcda0)
2020-12-01 18:26:08 -05:00
Jacob Boerema
31164859af plug-ins: fix crash in metadata-editor when licensor phone data was NULL.
(cherry picked from commit a048c8f2a4)
2020-12-01 18:25:48 -05:00
Jacob Boerema
8b26c7e23d plug-ins: fix incorrect formatting when switching between m and ft for gps altitude.
(cherry picked from commit 3ce15f534b)
2020-12-01 18:25:27 -05:00
Jacob Boerema
f3c4e7af99 plug-ins: improve formatting of gps data in metadata-viewer.
Adding metadata-tags to Makefile.am for
the metadata-viewer since until now it was only used in
the metadata-editor.

The Exif gps metadata tags for longitude, latitude and
altitude get special handling to show them with more
precision and let the string parts be translated.

(cherry picked from commit 34407a6b7e)

# Conflicts:
#	plug-ins/metadata/meson.build
#	plug-ins/metadata/metadata-viewer.c
2020-12-01 18:24:29 -05:00
Jacob Boerema
5a68e24ca0 plug-ins: add functions for formatting gps metadata.
(cherry picked from commit 8db1555838)
2020-12-01 18:11:30 -05:00
Jacob Boerema
7bf6fa663f plug-ins: improve casing in metadata-tags.
The abbreviations M for meter and FT for foot/feet were written in uppercase.
However the offical abbreviations are lowercase so let's just follow that and
make them lowercase here too.

Above and Below Sea Level were using camel case with every word starting
with an uppercase letter and were used on the label of a combobox option
for gps altitude reference. Using standard casing with only the first word
using a capital seems better in this case.
a capital

(cherry picked from commit 23fa5c7ef7)
2020-12-01 18:11:08 -05:00
Jacob Boerema
aab39d3fe2 plug-ins: refactor saving longitude/latitude in metadata editor.
Saving of longitude and latitude was duplicating the same code,
except that in latitude it forgot to free some strings.

Let's move this code into it's own function to make it easier to
improve it.

(cherry picked from commit aa2027cc18)
2020-12-01 18:10:44 -05:00
Michael Schumacher
8d4919c95e gitlab-ci: expire distribution stage artifacts after 2 days 2020-11-30 23:41:18 +01:00
Marco Ciampa
434f632b71 Updated Italian translation 2020-11-30 13:00:38 +01:00
Marco Ciampa
3bfa97cb57 Updated Italian translation 2020-11-30 12:56:00 +01:00
Jordi Mas
eaaa74561b Update Catalan translation 2020-11-26 21:19:41 +01:00
Piotr Drąg
d3361c4dbc Update Polish translation 2020-11-22 13:42:28 +01:00
Jacob Boerema
2fd189031d plug-ins: oops I messed up cherry-picking. 2020-11-19 22:30:07 -05:00
Jacob Boerema
baa063e687 plug-ins: in metadata editor and viewer only convert values to UTF-8 if they are not.
Certain metadata is already UTF-8. Converting them from locale
to UTF-8 again leads to incorrectly shown strings.

(cherry picked from commit 3128047a0b)
2020-11-19 21:49:02 -05:00
Jacob Boerema
c74d623202 plug-ins: fix metadata-editor not saving Xmp.photoshop.Urgency and Xmp.xmpRights.Marked.
The values of Description tab - Copyright Status and IPTC tab - Urgency were not saved.
We are fixing that with this commit. Urgency is also saved to Iptc.Application2.Urgency.

(cherry picked from commit d004305019)
2020-11-19 21:48:42 -05:00
Jacob Boerema
78d4806c6b plug-ins: let metadata-editor also save Iptc tags.
(cherry picked from commit 47065df53c)
2020-11-19 21:48:17 -05:00
Jacob Boerema
88433bb4e1 plug-ins: add missing Iptc equivalents of Xmp tags in metadata-editor.
Also added a comment to Xmp.photoshop.CaptionWriter which
occurs twice in the list.

(cherry picked from commit 96c5d1c1a1)
2020-11-19 21:47:58 -05:00
Jacob Boerema
1055016eb5 plug-ins: In metadata-editor always read iptc equivalent values of xmp tags.
Iptc equivalent tags of Xmp tags were only read if the Xmp tag had no value
which doesn't make sense since there is no guarantee that they are the same.

We changed this to always read the Iptc tags too and if the value differs
from the Xmp tag we add both values. That way the user can decide
which values are relevant.

(cherry picked from commit 7cce45b377)
2020-11-19 21:47:41 -05:00
Jacob Boerema
f6bed86934 plug-ins: fix not showing all values of iptc tags that appear more than once.
This is one of the problems mentioned in issue #5863. This commit fixes
this problem in the metadata-editor by using gexiv2_metadata_get_tag_multiple.
Empty string values will be skipped.

(cherry picked from commit 879b3745d2)
2020-11-19 21:47:14 -05:00
Jacob Boerema
4275dbb8f5 plug-ins: Refactor cleaning xmp values into a separate function in metadata-editor.
The same code was used several times so we move it to  its own function.

(cherry picked from commit bd2f43bf20)
2020-11-19 21:46:55 -05:00
Jacob Boerema
2217680a6c plug-ins: fix incorrect struct used for comparison in metadata-editor.
(cherry picked from commit c855590ffa)
2020-11-19 21:46:39 -05:00
Jacob Boerema
173e2fcb64 plug-ins: fix incorrect single/multi(ple) values for certain iptc tags used in metadata editor.
(cherry picked from commit 786aaec2a3)
2020-11-19 21:46:16 -05:00
Jacob Boerema
51a622d950 plug-ins: fix incorrect reading of iptc tags that appear more than once.
This is one of the problems mentioned in issue #5863. This commit only fixes
this problem in the metadata-viewer.

(cherry picked from commit 26db975a84)

# Conflicts:
#	plug-ins/metadata/metadata-viewer.c
2020-11-19 21:45:06 -05:00
Jacob Boerema
6b854b0a30 plug-ins: Refactor certain string handling into separate functions in metadata-viewer.
(cherry picked from commit 599d91db54)

# Conflicts:
#	plug-ins/metadata/metadata-viewer.c
2020-11-19 21:43:04 -05:00
Jacob Boerema
3886252422 libgimpbase: fix incorrect reading of iptc tags that appear more than once.
This is one of the problems mentioned in issue #5863. This commit only fixes
our loading (and saving) of this metadata.
Certain iptc tags like "Keywords" can appear multiple times. We were using
gexiv2_metadata_get_tag_string to get the value but that always returns
the first value so we replaced that by gexiv2_metadata_get_tag_multiple.

(cherry picked from commit d0f67faf29)
2020-11-19 21:38:13 -05:00
Tim Sabsch
a13ddc9248 Update German translation 2020-11-19 21:50:15 +00:00
Christian Kirbach
07273da041 Update German translation 2020-11-18 15:27:46 +00:00
Tim Sabsch
be2a6eb81f Update German translation 2020-11-17 17:14:58 +00:00
Tim Sabsch
57a131ec9b Update German translation 2020-11-17 15:59:20 +00:00
Yuri Chornoivan
2afe4c7c98 Update Ukrainian translation 2020-11-16 18:30:22 +00:00
Jehan
7ec030814a plug-ins: improvement of TIFF loading when TIFFNumberOfDirectories()…
… fails.
My previous commit was just assuming there is one page when the libtiff
function fails. But thinking a bit more on this, there are 2 edge cases
even here:

- If the image is actually really corrupted to the point there are no
  TIFF directories to read.
- If there are actually more available directories. It would be much
  better if GIMP were able to salvage them from a broken file.

To handle these cases, I actually count manually the number of
directories by looping with TIFFSetDirectory() (which still works fine
on our minimal image). I use 65535 as a max value because in libtiff's
TIFFNumberOfDirectories() implementation, it says this is the max value
(even though I couldn't confirm this in the spec; there is a "Number of
Directory Entries" on 2 bytes, but this is about various fields for each
directories, not a number of directories; still anyway this is already a
huge number and since libtiff won't likely be able to handle directories
over this limit, not need to go over either).

I am also adding a test in the end so that we can output an appropriate
message if we actually failed to read any data from the TIFF (whether or
not TIFFNumberOfDirectories() succeeded, when we actually tried to read
the contents, we couldn't).

(cherry picked from commit 9a90eefe1f)
2020-11-16 16:26:33 +01:00
Jehan
09970f45b7 Issue #5837: TIFF file not recognized.
On a provided minimal 1×1px TIFF file, TIFFNumberOfDirectories() seems
to choke on some missing field and returns 0. I am not sure if the file
is actually valid or not, but let's make some kind of exception
(outputting a warning of our own when we do) by assuming there is at
least 1 page/image in the file when TIFFNumberOfDirectories() returns 0.

Other than this minimal file (which probably has no other interest than
being a test case), it could actually help salvage corrupted TIFF file
by attempting to read more data.

(cherry picked from commit 9ff0204230)
2020-11-16 15:29:09 +01:00
Jehan
9bd8a8a134 libgimpbase: do not use g_snprintf() with same source and buffer.
`man snprintf` clearly says (in NOTES) that when source and target
overlap, the result in undefined.

g_snprintf() conforms to the same standard hence would not get the
expected result. In my case, the result was just tzstr (e.g. "+01:00").

(cherry picked from commit 435d5ce83a)
2020-11-16 01:43:49 +01:00
Cristian Secară
7bca6f06c6 Update Romanian translation 2020-11-15 12:20:03 +00:00
Selyan Slimane AMIRI
ff137a6f12 Add Kabyle translation 2020-11-15 10:09:25 +00:00
Selyan Slimane AMIRI
6c1ace322b Add Kabyle translation 2020-11-15 10:06:50 +00:00
Jordi Mas
1a5b2c791e Update Catalan translation 2020-11-14 19:41:51 +01:00
Jehan
4ea7fb6f4f app: proper ellipsis & wrap on Image Properties label where it matters.
The color space label may be a bit long (depends on profile title which
may just be anything and we don't control it), so I allow it to wrap.

The file path on the other hand would not work well with wrapping. It
already has ellipsis in center, but GTK always gives the max size it can
as a default. So if the file is even just slightly deep in the file
tree, we end up with extra-wide Image Properties dialog.
My trick is to give a sensible max size at dialog creation (25
characters max) but to disable this max size as soon as the window gets
realized, hence allowing the label to actually grow up to the contents
actual max size, were one to manually resize the window.

(cherry picked from commit 377de0a65b)
2020-11-12 11:56:20 +01:00
Jehan
18fa6d3a2f app: display profile name in "Color space" field of Image Properties.
"RGB color" is not a color space, only the model. To get full color
space information, we want to display the model and associated profile
name.
Of course, the "Image Properties" dialog also has a tab displaying
details about the color profile. Still it's better if the general info
displays not too wrong label contents.

Note: when the used color profile has no name, it will show "(unnamed
profile)" which is still more informative than just the color model.

(cherry picked from commit b9ab461977)
2020-11-12 01:02:56 +01:00
Jehan
97955482b5 NEWS: add the D-Bus calls updates. 2020-11-11 13:23:50 +01:00
Jehan
2fd4fc7c7a app: improve opening images through the DBus service.
- Set the software as `initialized` later, and in particular after all
  recovered images (from crash) then all command line images were
  opened. The reason is that the DBus calls have necessarily been made
  after GIMP was started (typically could be images double-clicked
  through GUI). We don't want them to appear before the images given in
  command line (or worse, some before and some after).
- Process DBus service's data queue as a FIFO. The image requested first
  will be loaded first.
- When a DBus call happens while GIMP is not initialized or restored,
  switch to a timeout handler. The problem with idle handlers is that
  they would be attempted too often (probably even more during startup
  when no user event happens). This is good for actions we want to
  happen reasonably quickly (like would be normally DBus calls), but not
  when we are unsure of program availability schedule (i.e. at startup).
  Here not only the handler would run a lot uselessly but it would
  likely even slow the startup down by doing so. So while GIMP is not
  initialized, switch to half-a-second timeout handler, then only switch
  back to idle handler when we are properly initialized and GIMP is
  ready to answer calls in a timely manner.

(cherry picked from commit b2649daf11)
2020-11-11 13:19:43 +01:00
Jehan
f2f0b6aae8 app: wait for the software to be fully initialized before processing…
… DBus calls.
In particular, Aryeom would start GIMP and directly double click some
image to be loaded in GIMP in the very short while when splash is
visible. Previous code would wait for the `restored` flag to be TRUE.
This was nearly it as we can actually start loading images as soon as
the 'restore' signal has passed. Yet the flag is set in the main
handler, but we actually also need the <Image> UI manager to exist,
which is created in gui_restore_after_callback() (so also a 'restore'
handler, yet after the main signal handler, i.e. after `restored` is set
to TRUE). Without this, gui_display_create() would fail with a CRITICAL,
hence file_open_with_proc_and_display() as well.

I could have tried to set the `restored` flag later, maybe with some
clever signal handling trick (and handle both the GUI and non-GUI cases,
i.e. I cannot set the flag inside gui_restore_after_callback() as it
would break the non-GUI cases). Instead I go for a simpler logics with a
new `initialized` flag which is only meant to be set once, once
everything has been loaded, i.e. once you can consider GIMP to be fully
running hence ready to process any common runtime command.

(cherry picked from commit a86ed68870)
2020-11-11 13:19:35 +01:00
Rodrigo Lledó
220e6ca6a9 Update Spanish translation 2020-11-10 14:38:21 +00:00
Rodrigo Lledó
3edc753b58 Update Spanish translation 2020-11-10 12:40:57 +00:00
Rodrigo Lledó
2fca3d97bd Update Spanish translation 2020-11-10 09:29:28 +00:00
Rodrigo Lledó
69a367e333 Update Spanish translation 2020-11-10 09:27:26 +00:00
Dušan Kazik
abb8d51702 Update Slovak translation 2020-11-10 08:14:50 +00:00
Cristian Secară
60746f7478 Update Romanian translation 2020-11-09 19:12:48 +00:00
Jordi Mas
04de009f0c Update Catalan translation 2020-11-08 20:47:53 +01:00
Piotr Drąg
4c67233844 Update Polish translation 2020-11-08 11:54:05 +01:00
Luna Jernberg
566edc8ffa Update Swedish translation 2020-11-07 19:21:00 +00:00
Cristian Secară
462a266610 Update Romanian translation 2020-11-04 13:11:27 +00:00
Cristian Secară
fdc577f93f Update Romanian translation 2020-11-04 13:07:35 +00:00
Cristian Secară
348a2faa2a Update Romanian translation 2020-11-04 12:55:07 +00:00
Yuri Chornoivan
264310c809 Update Ukrainian translation 2020-11-03 15:17:20 +00:00
Jehan
6ca70a35fc NEWS: add GeoTIFF support. 2020-11-03 10:52:47 +01:00
Ruthra Kumar
0b40a4c8bc GeoTIFF tags support added to file-tiff plugin.
New checkbox 'Save GeoTIFF data' added to Export Dialog box.
2020-11-03 07:41:01 +00:00
Cristian Secară
3525e0d19a Update Romanian translation 2020-11-02 02:03:33 +00:00
Cristian Secară
979d9ae3ef Update Romanian translation 2020-11-02 01:37:07 +00:00
Cristian Secară
04b80f82f1 Update Romanian translation 2020-11-01 22:12:47 +00:00
Cristian Secară
de9ae0b41e Update Romanian translation 2020-11-01 22:07:17 +00:00
Cristian Secară
8ed25458d7 Update Romanian translation 2020-11-01 22:05:29 +00:00
Cristian Secară
4d4bb28af4 Update Romanian translation 2020-11-01 22:00:31 +00:00
Jehan
bb30dae5ff NEWS: oups mixed some 2.99.x news with 2.10.x ones. 2020-11-01 18:14:20 +01:00
Jehan
fddec4a910 NEWS: start a GIMP 2.10.24 section. 2020-11-01 17:42:38 +01:00
Piotr Drąg
f8c99a9db5 Update Polish translation 2020-11-01 10:42:26 +01:00
Cristian Secară
b998894c6d Update Romanian translation 2020-10-31 22:08:32 +00:00
Cristian Secară
40a1c98d47 Update Romanian translation 2020-10-31 21:54:04 +00:00
Cristian Secară
56bb4cd62a Update Romanian translation 2020-10-31 21:45:03 +00:00
Jordi Mas
82dc2285b1 Update Catalan translation 2020-10-31 22:20:08 +01:00
Jordi Mas
cc0774d5d7 Update Catalan translation 2020-10-31 11:05:56 +01:00
Yuri Chornoivan
f570fc804f Update Ukrainian translation 2020-10-30 06:12:52 +00:00
Jernej Simončič
e215ec3a27 Installer: forgot Components for girepository 2020-10-29 23:40:43 +01:00
Jernej Simončič
27c98c3478 Installer: some cleanup, make Lua optional, add devel splashes 2020-10-29 22:48:32 +01:00
Jernej Simončič
00dbfc7375 Installer: preparing for GIMP 2.99 2020-10-28 20:19:48 +01:00
Cristian Secară
d781cf7f0f Update Romanian translation 2020-10-28 02:57:35 +00:00
Cristian Secară
13a95ec138 Update Romanian translation 2020-10-27 15:42:15 +00:00
Cristian Secară
817f995f79 Update Romanian translation 2020-10-27 12:25:51 +00:00
Cristian Secară
d88318625b Update Romanian translation 2020-10-27 12:18:15 +00:00
Tim Sabsch
f08b53b6b4 Update German translation 2020-10-26 21:44:25 +00:00
Jehan
f51d8ccfc5 icons: add legacy "software-update-available" icon from Adwaita.
This is very similar to commit c6063183d3 from master branch, except
that I use the legacy tagged icon because GTK+2 does not have real
symbolic icon theme support yet, which means that I would actually have
to add the icon to all themes, and also revert colors and so on. That's
just annoying so let's just use the color icon here, which will be the
same fallback for all themes (even symbolic style ones).
The icon used is the update one from:
https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/blob/master/src/fullcolor/legacy/software-update.svg

Also I use now the same hicolor/ theme overlay trick as in master since
commit e815c615e1 so that I don't have to duplicate the work on all
themes.

Same as for the commit in master, licensing applies.
This icon comes from the Adwaita repository and is therefore licensed
under the terms of either the GNU LGPL v3 or Creative Commons
Attribution-Share Alike 3.0 United States License. See:
https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/blob/master/COPYING
2020-10-26 20:18:24 +01:00
Jehan
7c6a272138 plug-ins: fix a type warning.
Since obj->type_data is also int anyway, multiplying by a double value
is unneeded anyway. So let's just make an integer multiplication.
Fixes the following warning:
> warning: using integer absolute value function ‘abs’ when argument is
> of floating point type ‘double’ [-Wabsolute-value]

(cherry picked from commit 7462945360)
2020-10-26 20:18:24 +01:00
Jehan
951e7d8e03 app: fix some glitches in the splash status text.
These small glitches have bothered me for a while now, so I finally
fixed these before the dev release!
Basically there were 2 fixes:
1. use the ink extents to compute any drawn area as this is what will be
   actually drawn.
2. Not only expose the drawn area of the new text, but also the one of
   the previous text in order to be sure all text pixels are correctly
   reset (in case the new text is smaller than previous one). I.e. we
   must expose the smallest rectangle containing both previous and new
   area of text.

(cherry picked from commit 3a50e52ac7)
2020-10-26 20:18:24 +01:00
Cristian Secară
16c7ea4abf Update Romanian translation 2020-10-26 18:20:30 +00:00
Sergei Trofimovich
cd8c2c5893 configure.ac: fix --with-linux-input handling with upcoming autoconf-2.70
Upcoming autoconf-2.70 exposes deficiency in configure.ac:

```
$ autoconf-2.70_beta2 && ./configure --host=x86_64-pc-linux-gnu
./configure: line 1430: 5: Bad file descriptor
checking whether  is declared... ./configure: line 1432: ${+y}: bad
```

It happens because macros are called with parameters using insufficient quoting.

More details at https://lists.gnu.org/archive/html/bug-autoconf/2020-10/msg00027.html

The fix only amends `--with-linux-input`. Other cases of underquoting
will need to be handled separately.

Fix-by: Zack Weinberg
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
(cherry picked from commit cebeb90a87)
2020-10-26 19:01:13 +01:00
Jehan
c2ba474c81 plug-ins: register file-heif proc on init() instead of query().
Same as commit d48dae7181 but for libgimp 2.10 API.
2020-10-26 18:26:48 +01:00
Yuri Chornoivan
49fdb2a6be Update Ukrainian translation 2020-10-26 09:38:55 +00:00
Cristian Secară
e726e83863 Update Romanian translation 2020-10-25 20:15:47 +00:00
Daniel Novomesky
e526da2345 HEIF plug-in: runtime detection of supported formats
Lossless option switch to YUV444 format when save depth is 8bit.
I would like to enable YUV444 for 10,12bit depth
in the future too, but there is issue in libheif.
2020-10-25 13:36:57 +01:00
Piotr Drąg
40683e01a7 Update Polish translation
Fixes https://gitlab.gnome.org/Teams/Translation/pl/-/issues/9
2020-10-25 10:02:01 +01:00
Yuri Chornoivan
963b167dc4 Update Ukrainian translation 2020-10-25 04:50:14 +00:00
Jacob Boerema
b5d5deca7e plug-ins: use g_message instead of g_printerr when there is data loss.
After discussion with Jehan we concluded that it is better to report
these data loss messages to the user using g_message.

(cherry picked from commit f336f86f60)
2020-10-24 18:35:39 -04:00
Jacob Boerema
334e905ae2 plug-ins: don't try to read tiff pages with an invalid directory.
We didn't check whether TIFFSetDirectory succeeded nor did
we check TIFFReadScanline for failure which can cause
unresponsiveness.

We will not try to read a tiff page if setting its directory fails
and we will stop reading a page if reading scanline fails.

(cherry picked from commit e4514567f9)
2020-10-24 13:55:24 -04:00
Jacob Boerema
4226a05fd5 plug-ins: fix #3757 Exporting invalid tiffs: Missing required "ImageLength" field.
Because of Exif.Thumbnail.* tags file-tiff-save saved an invalid extra page in
exported tif images. Removing these tags fixed this for me.

(cherry picked from commit 7957653e98)
2020-10-23 17:49:44 -04:00
Cristian Secară
01f3d0472e Update Romanian translation 2020-10-23 18:06:51 +00:00
Jacob Boerema
2a84311090 libgimpbase: fix copy-paste error in documentation comments.
(cherry picked from commit 679fe079f6)
2020-10-23 13:22:54 -04:00
Jacob Boerema
4631cbd015 plug-ins: file-tiff-save looks for the wrong exif tags to delete.
The correct tag for sub images is Exif.SubImage instead of
Exif.Image. I also added Exif.Image.InterColorProfile since
that didn't seem to get deleted when saving without
color profile.

Also added a FIXME note since most of this stuff should be
genealized for all gimpmetadata handling.

(cherry picked from commit c10bb098b4)

# Conflicts:
#	plug-ins/file-tiff/file-tiff-save.c
2020-10-23 13:21:53 -04:00
Cristian Secară
098344bb8c Update Romanian translation 2020-10-23 08:41:37 +00:00
Jehan
7cfbb1739c app: properly free internal strings at finalization and before…
… overriding their previous value.

(cherry picked from commit 89db5f65fd)
2020-10-23 02:18:30 +02:00
Jehan
230e4fe731 configure: do not show "profile support: yes" when HEIC support is OFF.
Same as previous commit but for autotools, in a separate commit for easy
cherry-pick.

(cherry picked from commit fc25709367)
2020-10-22 11:58:17 +02:00
Cristian Secară
f15f64b5f8 Update Romanian translation 2020-10-21 12:32:33 +00:00
Yuri Chornoivan
a1c2119011 Update Ukrainian translation 2020-10-20 06:27:32 +00:00
Jehan
9814b47046 Issue #5783: Accessibility: Button focus not visible in dark theme.
Changing GtkButton::focus-line_width as proposed by Kevin Payne.
2020-10-19 21:46:58 +02:00
Jehan
59a1dff35e Issue #5788: 10/12 bpc in HEIF export does not mean HDR.
Similar to commit 05bb84ebed on master.
2020-10-19 20:48:50 +02:00
Jehan
8227fe7d30 autotools: separate line for HEIC and AVIF support.
Similar to previous commit for meson (separate commit for easy
cherry-pick to gimp-2-10).

(cherry picked from commit 22b8cd305c)
2020-10-19 20:15:52 +02:00
Jehan
bfc492fb1b Issue #4777: "New version available" after update.
The About dialog refreshes the release information relatively to
currently running version before being displayed. No check of the remote
JSON file is done, it only verifies whether any stored released
version/revision is not same (or even lower) than the actually running
version. Indeed existence of a stored release means that a newer version
exists at check time only. On later run, this stored information may
have become deprecated.

(cherry picked from commit 5c89099f75)
2020-10-16 18:16:06 +02:00
Dušan Kazik
7f7fc3bb6c Update Slovak translation 2020-10-16 12:24:09 +00:00
Dušan Kazik
2fcdabd878 Update Slovak translation 2020-10-16 09:31:45 +00:00
Jacob Boerema
91a91542f7 plug-ins: Let the user know if we fail to save image metadata in file-jpeg.
(cherry picked from commit fafe9889e0)

# Conflicts:
#	plug-ins/file-jpeg/jpeg.c
2020-10-15 15:28:01 -04:00
Jacob Boerema
7c5b585df7 libgimpbase: fix #2253 saving metadata failed if Pentax PreviewOffset present in exif tags.
Partially based on the comments of Massimo Valentini we block all Pentax and PentaxDng
exif Preview tags from being exported. We leave finding a more flexible solution for
problematic tags to a future contributor.

(cherry picked from commit 9069d812ef)
2020-10-15 15:19:42 -04:00
Cristian Secară
94f5fc33de Update Romanian translation 2020-10-15 16:45:04 +00:00
Cristian Secară
bae2fbd8b0 Update Romanian translation 2020-10-15 16:37:35 +00:00
Cristian Secară
f0045eb105 Update Romanian translation 2020-10-15 15:44:04 +00:00
Jordi Mas
8e4144359e Update Catalan translation 2020-10-12 22:07:38 +02:00
Jordi Mas
df10e278ba Update Catalan translation 2020-10-12 19:04:39 +02:00
Piotr Drąg
3a09eefd56 Update Polish translation 2020-10-11 10:12:24 +02:00
Daniel Novomesky
1202c2555b Fix a GUI bug in HEIF/AVIF export dialog. 2020-10-10 14:19:53 +02:00
Milo Ivir
84e5a6eea8 Update Croatian translation 2020-10-09 17:09:52 +00:00
Milo Ivir
523a2bb56e Update Croatian translation 2020-10-09 17:07:29 +00:00
Milo Ivir
901825908a Update Croatian translation 2020-10-09 17:05:22 +00:00
Jehan
d969cd7dc4 plug-ins: fix tiff load of grayscale images without alpha.
Though we were checking the profile, both code paths were importing
from non-linear data.

(cherry picked from commit 348c9c22d0)
2020-10-09 13:24:24 +02:00
Dušan Kazik
1b2f58f8ce Update Slovak translation 2020-10-09 10:43:40 +00:00
Dušan Kazik
5551428d28 Update Slovak translation 2020-10-09 09:54:42 +00:00
Dušan Kazik
46a12d4a4a Update Slovak translation 2020-10-09 09:24:17 +00:00
Dušan Kazik
781d5bceb7 Add Slovak translation 2020-10-09 08:41:21 +00:00
Jacob Boerema
b5e9bdb5df Issue #5735: incorrect condition because of missing parenthesis.
Also taking the opportunity to change the minimum size since I
apparently counted it wrong. The size always seems to be 46
starting from psp file-version 4 up to and including the current
version 13.

(cherry picked from commit 02bad34a41)
2020-10-08 18:41:37 -04:00
Dušan Kazik
993a7f80e5 Update Slovak translation 2020-10-08 13:05:32 +00:00
Dušan Kazik
f29a637236 Update Slovak translation 2020-10-08 11:26:43 +00:00
Jehan
6d491fbab9 Issue #5734: fix typos in if() test.
(cherry picked from commit 66dae000f9)
2020-10-08 01:37:29 +02:00
Jordi Mas
6271f8b262 Update Catalan translation 2020-10-07 23:09:05 +02:00
Rodrigo Lledó
6c6ee7e145 Update Spanish translation 2020-10-07 10:02:42 +00:00
Rodrigo Lledó
492c1eb90f Update Spanish translation 2020-10-07 10:01:00 +00:00
Rodrigo Lledó
76ed00db93 Update Spanish translation 2020-10-07 10:00:31 +00:00
Selyan Slimane AMIRI
4afccca4fe Add Kabyle translation 2020-10-05 12:09:09 +00:00
Anders Jonsson
128f848c60 Update Swedish translation 2020-10-04 23:13:15 +00:00
Michael Natterer
6f7927f2f8 configure.ac: post-release version bump to 2.10.23 2020-10-04 20:15:29 +02:00
Yuri Chornoivan
e11d7f0980 Update Ukrainian translation 2020-10-04 18:11:33 +00:00
Michael Natterer
0c8a7891f7 configure.ac: bump versions for the 2.10.22 release 2020-10-04 19:32:33 +02:00
Jehan
dd9a426fa4 desktop: update appdata with date and additional release note items.
This commit should have gone in master first, but appdata already
diverged in both gimp-2-10 and master branch. I'll sync again later.
2020-10-04 18:53:27 +02:00
Jehan
2cfdeaeb1f plug-ins: change export dialog title when exporting as AVIF.
Similar to commit 5ec3293fee on master.
2020-10-04 18:32:09 +02:00
Andika Triwidada
2c8e2599ac Update Indonesian translation 2020-10-04 09:13:36 +00:00
lillolollo
7b49f881fb NEWS: add fixed bugs 2020-10-03 20:28:08 +00:00
Jehan
5e7928560f desktop: add a <developer_name> tag.
It just says "The GIMP team" so it's kind of redundant/useless, but I
noticed that Flathub would just display an empty "Developer" section
because the tag is absent. Well at least it emphasizes the
community-developed side of GIMP.

(cherry picked from commit 257ada495f)
2020-10-02 02:29:58 +02:00
Alexandre Prokoudine
e97d46e48b 2.10.22: update NEWS to list recent bug fixes 2020-10-01 22:07:58 +00:00
Marco Ciampa
daeb3ebe17 Updated Italian translation 2020-09-30 13:53:41 +02:00
Marco Ciampa
48b52eb5b7 Updated Italian translation 2020-09-30 13:46:24 +02:00
Jehan
5dd80acd07 NEWS: update. 2020-09-27 14:06:09 +02:00
Sebastian Rasmussen
0a55c44705 plug-ins: When exporting BMP with color space info, always include color masks.
This fixes issue #4155.

(cherry picked from commit 9727a38977)
2020-09-27 13:56:02 +02:00
Liam Quin
761e93a49e plug-ins: The plugin can leak the "tif" file descriptor as written...
... and also doesn't write out all the data, if it does a "goto out" for
any reason. A leaked file descriptor can prevent a file from being
renamed or deleted on Windows.
See also #3740.

Reviewer note (Jehan): this may not be the main issue as reporters were
not writing about export failure. So there is probably another case even
when the plug-in successfully wrote the TIFF image.

(cherry picked from commit fe340c822a)
2020-09-27 01:33:06 +02:00
Jehan
df6e13a560 app: GimpFilterTool displays a "Sample merged" checkbox.
In several GeglOperation filters, it is possible to pick a color. Up to
now, it was only possible to pick a color from the active layer (the one
you run the operation on). With this change, we can also pick in Sample
merged mode, same as Color Picker tool and other color tools.

(cherry picked from commit 578c078590)
2020-09-26 13:31:19 +02:00
Jehan
4d74802521 Issue #5630: Sample Merged as defaults in Color Picker tool.
The rational: advanced users won't really care about defaults (they know
to switch this option on/off depending on situation) but maybe beginners
would be less confused to pick "what they see" on first use, rather than
picking on the active layer? Now whatever is the default won't change
anyone's daily usage of GIMP. Clearly every image and use case is
different, so both with or without sample merged are useful one time or
another (this is why the option exists). It's really about the less
surprising option for beginners, based on usage statistics.

I ran a small poll on Twitter/Reddit/Patreon/Tipeee and ended up with
numbers of 131 for switching to "Sample merged" as default and 43
against, which is about 75% in favor. So let's just switch. It makes
sense anyway.

(cherry picked from commit 578e3b0bd9)
2020-09-25 21:52:44 +02:00
Jehan
171ec7c24f app: NULL log domain is not a bug.
A log error can have a NULL domain (apparently equivalent to "" default
domain, according to g_log_set_handler() docs and we even explicitly
list the NULL domain in the log_domains array in app/gimp-log.c.

Yet our log handler was not expecting such possibility and was running a
g_str_has_prefix() on NULL. Not sure why it aborted there. It might be
because outputting a new warning inside the warning handler did not go
well. Anyway this seems to fix our side of the bug #5358. The main fix
will likely be on GEGL side (UMFPACK_ERROR_out_of_memory error).

(cherry picked from commit 5fb0577768)
2020-09-24 23:13:59 +02:00
Yuri Chornoivan
9dcd0de28c Update Ukrainian translation 2020-09-24 18:06:25 +00:00
Jehan
85656b2365 Issue #4505: Adjust the Preferences size to fit on smaller displays.
Make some of the bigger Preferences pages automatically scrollable if
needed. Based on my tests, this should be enough to fit on quite small
displays, at least with the default themes, even the 1366×768 reported
as too small. It should even fit in 1280×720 (in my tests, it did).

Targetting even smaller screens may be overdoing it for an image
manipulation software. We'll see if people still ask for a smaller
dialog.

(cherry picked from commit 2ec6510973)
2020-09-24 18:30:40 +02:00
Alexandre Prokoudine
7a0634fa49 2.10.22: NEWS update (bug fixes, translations) 2020-09-21 23:44:17 +00:00
Jehan
5ade6acb56 Issue #3481: Cannot paste images into GIMP copied from Telegram.
Adding patch by Massimo Valentini (@Massimo) for what is seemingly a bug
in GTK+2.24 in Windows.

The bug does not seem to happen on GIMP 3 (according to contributor
tests), so the bug/patch is likely not relevant anymore on GTK+3. So
let's just add this patch in our official GIMP build and be done with
it.
2020-09-20 19:25:04 +02:00
Julien Hardelin
b7b6612a4c Update French translation 2020-09-20 08:48:24 +00:00
Julien Hardelin
a2b70bad60 Update French translation 2020-09-20 08:38:15 +00:00
Jehan
f0a3e76e2a NEWS: update. 2020-09-20 02:28:55 +02:00
space pudim
0a9bb2839e Fix #4560 - file-xpm saving unused transparency
The XPM export plugin was saving the color `None` (transparency) to the
exported image palette for all images with an alpha channel, even if the
color was not used on any pixel.

Since it's nice to have `None` as the first color on the palette, mapped
to character ' ', and it could be too wasteful to scan all pixels twice,
the approach taken was to just undo it's premature insertion.
2020-09-19 23:09:04 +00:00
Jehan
7e4d4f9d60 Issue #2275: rotate commands not actually applied to the image.
Similar change as commit 8dcf258ffc on master.
2020-09-19 19:12:13 +02:00
Jordi Mas
757e741991 Update Catalan translation 2020-09-18 11:28:50 +02:00
Jordi Mas
b5ba019f33 Update Catalan translation 2020-09-18 11:18:49 +02:00
Jordi Mas
c97e8dd3a5 Update Catalan translation 2020-09-18 11:18:12 +02:00
Christian Kirbach
a413a7950e Update German translation 2020-09-17 07:00:46 +00:00
Jehan
3ca4c44062 gitlab-ci: fixing CI (hopefully) on gimp-2-10 branch.
According to the apt error, apparently python-dev has been renamed
python2-dev.
2020-09-15 20:48:22 +02:00
Jehan
8b306eea7c NEWS: update. 2020-09-15 20:20:30 +02:00
Anders Jonsson
32bedc7fa6 Update Swedish translation 2020-09-14 16:59:00 +00:00
Anders Jonsson
0923ad63ef Update Swedish translation 2020-09-14 16:50:25 +00:00
Piotr Drąg
8d0fe7151f Update Polish translation 2020-09-14 18:02:57 +02:00
Yuri Chornoivan
c969c8fc03 Update Ukrainian translation 2020-09-14 09:15:37 +00:00
Yuri Chornoivan
1f2bb44bc9 Update Ukrainian translation 2020-09-14 09:14:33 +00:00
Daniel Novomesky
f43f0546df Rename misleading Lossless string
The lossless option does not provide true lossless encoding yet, unfortunately.
We must rename the string to correctly inform users that the compression is not 100% lossless,
Technically the image gets converted from RGB to YUV420 format (which is lossy operation itself) and only afterwards the data are compressed lossless-ly.
2020-09-14 07:33:28 +00:00
Rodrigo Lledó
3a7ab25c7a Update Spanish translation 2020-09-14 07:28:10 +00:00
Alexandre Prokoudine
096cd27f49 Update Russian translation 2020-09-13 23:48:15 +03:00
Alexandre Prokoudine
8237fa5bba 2.10.22: we don't know how many more bug fixes we do before we tag the release, so let's not annoy translators as much 2020-09-13 20:01:24 +00:00
Alexandre Prokoudine
c7cdb59125 2.10.22: HEIF and PSP support updates, more contributors and translators, more bug fixes 2020-09-13 19:58:54 +00:00
Piotr Drąg
1b91757332 Update Polish translation 2020-09-13 14:06:27 +02:00
Yuri Chornoivan
c0b0a47a90 Update Ukrainian translation 2020-09-13 09:44:56 +00:00
Alexandre Prokoudine
31867ac2f2 2.10.22: mention PSP support improvements 2020-09-13 08:57:26 +00:00
Ell
9854327e9a libgimp: link libgimpui against GEGL
Needed since commit 4c8ee413eb.

(cherry picked from commit 25aefa972e)
2020-09-13 10:25:46 +03:00
Yuri Chornoivan
6005652b21 Update Ukrainian translation 2020-09-13 05:59:18 +00:00
Yuri Chornoivan
51ada32d07 Update Ukrainian translation 2020-09-13 05:55:52 +00:00
Alexandre Prokoudine
5e4e073b48 2.10.22: mention HEIF changes in AppData 2020-09-13 04:57:03 +03:00
Alexandre Prokoudine
ea725ba523 Update Russian translation 2020-09-13 04:40:20 +03:00
Daniel Novomesky
11f7c6fabf Make strings translateable in HEIF/AVIF export dialog 2020-09-12 17:24:29 +02:00
Yuri Chornoivan
ae23c9ac55 Update Ukrainian translation 2020-09-12 13:57:50 +00:00
Jacob Boerema
52b3194fd4 plug-ins: add support for indexed images in psp reader.
(cherry picked from commit bf66a07d20)
2020-09-12 12:07:42 +02:00
Jacob Boerema
9ec44fd835 plug-ins: add support for grayscale images in psp reader.
(cherry picked from commit 2054f9f163)
2020-09-12 12:00:14 +02:00
Jacob Boerema
712063a5eb plug-ins: add support for 16 bit integer images in psp reader.
(cherry picked from commit 7863d668e0)
2020-09-12 12:00:14 +02:00
Jacob Boerema
256292d514 plug-ins: show descriptive layer type name for psp layers we can't convert.
(cherry picked from commit 84f06e976a)
2020-09-12 11:40:07 +02:00
Jacob Boerema
8a85af71fc plug-ins: add defines for psp reader to include new things up to psp file version 8.
This also fixes the incorrect existing define for a mask layer.

(cherry picked from commit d7abb774a9)
2020-09-12 11:40:00 +02:00
Jacob Boerema
6421a05549 plug-ins: replace a few occurrences of g_message with g_set_error in psp reader.
(cherry picked from commit 0a8f5b99f5)
2020-09-12 11:39:53 +02:00
Yuri Chornoivan
7670e7980a Update Ukrainian translation 2020-09-11 06:40:04 +00:00
Daniel Novomesky
e2f2a3f23c Updated HEIF plug-in in 2.10 branch
Backported features from master:
AVIF export (when built with >= libheif 1.8.0)
High bit export
User can select save bit depth (8, 10, 12) during export

Minor fixes in import
2020-09-09 12:37:29 +02:00
sabri ünal
a710fa59e9 Typo - Put a blank after the fullstop.
(cherry picked from commit 4b3b22812b)
2020-09-09 07:59:53 +00:00
luz.paz
d9b102e196 Misc typo fixes in plug-ins/
(cherry picked from commit c1585d609b)
2020-09-08 23:22:57 +00:00
Jehan
a830ce5bb3 Issue #5623: https://gimp.org/gimp_versions.json is redirected…
… to www.gimp.org.

(cherry picked from commit 68a7431a10)
2020-09-08 21:15:14 +02:00
Daniel Novomesky
3bc240d0f5 Fix compilation with old libheif 1.3.2
High bit depth import enabled only for >= libheif 1.8.0
2020-09-08 09:17:41 +00:00
Daniel Mustieles
2a1c76a251 Updated Spanish translation 2020-09-07 09:43:55 +02:00
Daniel Mustieles
71ac378d17 Update Spanish translation 2020-09-07 07:18:31 +00:00
Daniel Novomesky
14546cf8b7 Updated HEIF plug-in
Back-porting some of the features from master:
AVIF import (need libheif >= 1.8.0)
High bit (10/12) import
NCLX color profile import (link with lcms)
Metadata import (link with gexiv2)
2020-09-06 18:33:13 +02:00
Stephan Woidowski
95fcd80466 Update German translation 2020-09-05 14:34:08 +00:00
Piotr Drąg
8aaa0e15f5 Update Polish translation 2020-09-05 12:37:57 +02:00
Marco Ciampa
4849391428 Updated Italian translation 2020-09-03 12:07:41 +02:00
Marco Ciampa
bd57def840 Typo fixed in Italian translation. 2020-09-03 11:47:04 +02:00
Jacob Boerema
987101df36 plug-ins: add most likely blend modes for certain psp blend modes.
This adds a blend mode for all known psp blend modes that were not
converted yet except for adjust.
I couldn't find any information about adjust and it's value of
255 suggests that it is not a normal blend mode.

(cherry picked from commit 19b261f3c6)
2020-09-01 12:47:09 -04:00
Jacob Boerema
146a8d644b plug-ins: fix reading of psp tubes when psp file version >= 4.
(cherry picked from commit b968a93ab2)
2020-09-01 12:47:09 -04:00
Jehan
a42cf4fb7f NEWS: update. 2020-09-01 12:38:11 +02:00
Elad Shahar
8caa5e93de plug-ins: backport spyrogimp Issue #5043 - reduce undos
Reduce number of undo steps created by Spryrogimp previews.
The implementation adds a function for clearing the
incremental preview drawing that is being executed as an idle task,
and closing an undo group in case the preview left it open (which
would usually be the case).
2020-09-01 12:11:12 +02:00
Yuri Chornoivan
b1334bc40c Update Ukrainian translation 2020-08-31 12:19:17 +00:00
Jacob Boerema
94bea61b10 plug-ins: add support for reading raster layers of newer psp versions.
(cherry picked from commit fa40bc7)
2020-08-31 11:01:41 +00:00
Jacob Boerema
7746e829c2 plug-ins: enable reading of psp images with file versions > 6.
(cherry picked from commit 85241a2)
2020-08-31 11:01:41 +00:00
Jacob Boerema
a4344fff7b plug-ins: refactor reading of raster layer extension info for psp images.
(cherry picked from commit 0666f7a)
2020-08-31 11:01:41 +00:00
Jacob Boerema
3765f80652 plug-ins: Take zero length layer names into account in psp reader.
(cherry picked from commit d7089c9)
2020-08-31 11:01:41 +00:00
Elad Shahar
6b4f0490f5 Issue #4816: fix spyrogimp to work with grayscale images 2020-08-31 12:49:41 +02:00
Michael Schumacher
feda32a436 gitlab-ci: update dependencies to add libraw20 2020-08-31 00:05:03 +02:00
Alexandre Prokoudine
81ca0de44d 2.10.22: update NEWS re plugins, add the developers/contributors section 2020-08-30 09:26:26 +03:00
Alexandre Prokoudine
8439dc3fcd 2.10.22: update NEWS 2020-08-30 09:26:26 +03:00
Boyuan Yang
2871367f9a Update Chinese (China) translation 2020-08-30 00:55:13 +00:00
Boyuan Yang
d2e1596fed Update Chinese (China) translation 2020-08-29 14:35:18 +00:00
Yuri Chornoivan
85e8c19290 Update Ukrainian translation 2020-08-29 11:00:17 +00:00
Piotr Drąg
dab2ed5b0b Update Polish translation 2020-08-29 12:20:06 +02:00
Alexandre Prokoudine
04c42c5ce5 Update release appdata 2020-08-29 12:00:58 +03:00
Simon McVittie
fbbdb62a98 build: Prefer to find libwmf using pkg-config
Traditional -config scripts are awkward for cross-compilation, multilib
systems (lib/lib64), and multiarch systems like Debian; only one copy
of the -config script can be in the PATH. As a result, some OS
distributions are starting to deprecate or even remove them.

pkg-config is designed to be a replacement for traditional -config
scripts, and is cross-compilation-friendly: the PKG_CHECK_MODULES macro
looks for an architecture-specific executable like
x86_64-linux-gnu-pkg-config, which can look in an architecture-specific
search path for library metadata, before falling back to a generic
pkg-config executable.

As a bonus, pkg-config also compares version numbers correctly
(see #2454).

libwmf having pkg-config metadata seems to be a relatively new thing,
so I've kept the -config script code path too, using it if pkg-config
does not find libwmf.

Bug-Debian: https://bugs.debian.org/956183
Signed-off-by: Simon McVittie <smcv@debian.org>


(cherry picked from commit 00024db382)
2020-08-27 13:05:25 +00:00
Alexandre Prokoudine
bceb288a58 2.10.22: bug fixes, translation updates, translators 2020-08-27 12:47:32 +03:00
Yuri Chornoivan
442f806288 Update Ukrainian translation 2020-08-27 05:22:12 +00:00
Alexandre Prokoudine
0855ea91b2 Fix markup issue in appdata 2020-08-27 03:23:03 +03:00
Alexandre Prokoudine
8a3eaaf9be 2.10.22: start filling in appdata re changes in the new version 2020-08-27 03:17:40 +03:00
Jehan
2321ab22fd NEWS: update. 2020-08-26 12:23:22 +02:00
Jehan
ed671d7eac Issue #5584: JPEG magics detection failure.
Our currently registered JPEG magics was using possible fields at the
start of the file (JFIF, Exif) in 7th byte. A JPEG provided in #5584 was
starting with yet another field (apparently some Photoshop-specific
field "Photoshop 3.0.8BIM") thus magics detection failed (and since
extension was wrong, the file was sent to another plug-in, hence loading
failed).

Looking further, it looks like the 3 first bytes are actually always
common to all JPEG and are the right magics/signature for a JPEG. These
3 bytes don't seem to be used by other formats as well according to my
research, which means we should not have false positives either. So
let's switch to this magics 0XFFD8FF at byte 0.

Note: same as commit 47a68dc871 on master but on old 2.10 API.
2020-08-26 12:21:33 +02:00
Jacob Boerema
63caa83eb7 plug-ins: fix reading layer names with high bit ASCII characters in psp files.
This also adds a few missing g_free when returning because of an error.

(cherry picked from commit 4ac373e84f)
2020-08-25 10:45:33 +02:00
Jacob Boerema
cebd634ec1 plug-ins: fix wrong layer offset of psp layers.
(cherry picked from commit dc80c78a26)
2020-08-25 10:45:33 +02:00
Sabri Ünal
0757f78097 Update Turkish translation 2020-08-24 15:08:16 +00:00
Ell
05341fada3 app: avoid dropping motion events in spin-scales
It looks like GDK motion hints are broken, at least on X, causing
us to drop motion events in GimpSpinScale, if the motion triggers
an operation that blocks the main thread for a significant amount
of time, such as projection invalidation.

Instead, disable motion hints for spin-scales, and use an idle to
perform ad-hoc motion compression.
2020-08-24 12:33:53 +03:00
Piotr Drąg
2fea312f03 Update Polish translation 2020-08-22 14:00:00 +02:00
Yuri Chornoivan
2cabb436d9 Update Ukrainian translation 2020-08-22 09:10:48 +00:00
Jacob Boerema
2cc7f4b6bb plug-ins: improve psp image reader stability by always using the block/chunk length.
Starting from psp file version 4 the specification recommends to always use the
block/chunk length to determine the next part of the image. This way it is
possible to skip parts you don't know or don't care about or additions in
newer versions.
This change makes sure to always do this which fixes reading several images
which crashed the plug-in before.

Also only try to read layer data if it is a raster layer.

(cherry picked from commit 15ad952)
2020-08-20 18:53:34 -04:00
Milo Ivir
0a9b2c8da6 Update Croatian translation 2020-08-17 20:13:00 +00:00
Milo Ivir
753b69da19 Update Croatian translation 2020-08-17 20:12:29 +00:00
Milo Ivir
1907584a76 Update Croatian translation 2020-08-17 20:10:22 +00:00
Jehan
c5bd7dfebf Issue #5530: do not fail font loading on broken user/GIMP fonts.conf.
Additionally to loading the default fontconfig configuration file, GIMP
also looks up /etc/gimp/<version>/fonts.conf and
$XDG_CONFIG_HOME/GIMP/<version>/fonts.conf (or equivalent in other
OSes). If these don't exist (which is the most common case), this is not
considered a bug. Fontconfig had a regression bug of
FcConfigParseAndLoad() in 2.13.92, which was fixed in a later commit:
fcada52291
As a consequence of this bug, font loading failed in Windows when these
non-mandatory files were absent.

The current commit, originally proposed by Jacob Boerema (@Wormnest) and
slightly reviewed works around the issue, because anyway there is never
any reason why failing to load these files should break font loading as
a general rule. Even if these files exist and are broken (wrong syntax
or whatnot), we should just output some warning on stderr and continue
loading without these additional confs.
With fontconfig 2.13.92, warnings will be also outputted (wrongly), but
at least it won't block loading anymore.

Also let's unref() the `config` object even when the whole font loading
succeeds. Man of FcConfigSetCurrent() clearly says that the reference
count of config is incremented since 2.12.0 (our current minimum
fontconfig is 2.12.4) so let's not leak one reference.

(cherry picked from commit c5f9b8e190)
2020-08-16 18:11:01 +02:00
Ell
464f259473 app: during splash-screen lookup, don't leak GFileEnumerator
(cherry picked from commit e09bb089a8b04372ac66aea8dc15c97301245683)
2020-08-11 21:52:08 +03:00
Tim Sabsch
78901653dc Update German translation 2020-08-09 19:15:49 +00:00
Jacob Boerema
2ad03dc61c plug-ins: fix incorrect loading of PSP images with uncompressed channel data.
According to the PSP specifications "Each scanline in the image data is stored on a 4 byte boundary.	"
Based on all actual images I've seen this is incorrect. Possibly it is a leftover from an older specification.

(cherry picked from commit f4088adefa)
2020-08-08 16:24:37 +02:00
Jacob Boerema
af9ccbbe4e plug-ins: fix reading of creator block data of PSP images.
Since string data in PSP images is not zero terminated
reading creator block data always failed.

(cherry picked from commit fcb9de07f6)
2020-08-08 16:24:30 +02:00
Yuri Chornoivan
aa3d054017 Update Ukrainian translation 2020-08-08 12:50:19 +00:00
Jehan
718c6ec2b8 gitlab-ci: add a distribution step.
I don't add this at the end of the distcheck job to make the interface
clearer, and also because the distcheck job will have full build
artifacts (allowing to debug a failing distcheck if necessary), whereas
the `sources` job will just publish tarballs and SHA256 sums generated
from these tarballs. Simple, clean.
2020-08-08 10:07:29 +02:00
Jehan
e1d88f1765 gitlab-ci: run distcheck with multi-jobs. 2020-08-07 16:39:54 +02:00
Sabri Ünal
de4f981192 Update Turkish translation 2020-08-07 14:24:30 +00:00
Sabri Ünal
7ca97bb0c1 Update Turkish translation 2020-08-07 14:21:55 +00:00
Piotr Drąg
0a58aa881b Update Polish translation 2020-08-06 16:36:46 +02:00
Jehan
030b8b1e59 gitlab-ci: move pygtk build into deps-debian/testing step.
This will make Python plug-in available for the main build step.
Also it should make the distcheck step shorter, hence hopefully will
prevent it from timing out so often.
2020-08-06 11:12:17 +02:00
Anders Jonsson
25065ebf54 Update Swedish translation 2020-08-05 21:58:12 +00:00
Jehan
542d11eed3 NEWS: update with GimpMemSizeEntry changes. 2020-08-05 15:46:07 +02:00
Jehan
c8c12f2ac1 libgimpwidgets: improve/fix more of GimpMemSizeEntry.
Looking further at this widget, many things are not right. Here are the
changes:
- Use binary prefixes (i.e. kibibyte, mebibyte and gibibyte) instead of
  decimal ones. We are making binary shifts so we were actually showing
  the wrong units.
- Round the value to the closest integer when showing it, not towards 0.
  Otherwise I had cases where it was showing 7GiB for an actual value of
  7.69GiB (default as computed by GIMP from my actual physical memory).
  Note that I am actually unsure even rounding makes sense. Shouldn't we
  rather show double values with a few digits after the decimal points?
  For such values, I think it would make sense.
- Do not edit the internally saved accurate value when the entry is
  edited to the same less accurate value as our saved value would be
  shown too. In particular when changing the display unit to a bigger
  one, we don't want to lose accuracy. This is especially true for low
  values. Say you don't have a lot of memory and you set the Tile cache
  size to 1.5GiB (1536MiB), you certainly don't want it to become either
  1 or 2GiB when switching display unit to GiB. Now even if the number
  will still display with less accuracy, the internal value will stay
  accurate.

(cherry picked from commit d886bb1b90)
2020-08-05 15:43:46 +02:00
Jehan
35c9e0a213 libgimpwidgets: fix setting GimpMemSizeEntry value with unit change.
This bug doesn't happen when setting value through the GUI as in such
case, the unit never changed. It happened when setting a value which
could not be properly displayed by current unit (typically smaller than
1 in this unit, or with remainder).
In such a case, we should not manually set private->shift before
gimp_int_combo_box_set_active(), or the callback was failing to
reconfigure the GtkAdjustement, in particular min and max values.

As a consequence, hitting a Preferences reset, with a GimpMemSizeEntry
in Gigabytes, it got reset to Kilobytes with the max values capped at
4096. So I realized a Reset ended me with a Tile cache size of 4096 KB
in particular, which is of course ridiculously small and would be a
problem if one doesn't notice the issue immediately.

(cherry picked from commit 0be4e5c1dc)
2020-08-05 15:10:21 +02:00
Marco Ciampa
dcc28a1ffc Updated Italian translation 2020-08-05 11:12:09 +02:00
Jehan
502804281e configure: look for pygtk-codegen-2.0 and pygtk defsdir in all cases.
Even without Python enabled, these are used for the `dist` step, hence
also for distcheck. These checks are not blocking normal builds though.
2020-08-03 02:16:16 +02:00
Jehan
bdc7f912f9 gitlab-ci: fix the GIMP 2.10 CI distcheck.
Unfortunately the dist target requires pygtk.
Note that even adding --disable-python to DISTCHECK_CONFIGURE_FLAGS
doesn't help as pygtk-codegen-2.0 is needed to generate various .defs
file added to the DIST.
Yet pygtk is absent from Debian testing nowadays because it is too old
and unmaintained. So let's build pygtk ourselves.

Among the few tricks to make pygtk build fine:
- force Python2 by setting PYTHON env variable (detect Python 3
  otherwise).
- patch to allow building against latest Pango.
2020-08-03 02:08:56 +02:00
Øyvind Kolås
562715dbf2 build, app: depend on GEGL-0.4.26 2020-08-02 22:37:55 +02:00
Liam Quin
7f2d52a575 Issue #4328: Distorted path of an open/imported circle from an svg file.
Undoing the apparent mistake (revert 27e78849a2) and changing the 2nd
occurrence instead.

(cherry picked from commit be0e63aa1c)
2020-08-02 22:12:41 +02:00
Yuri Chornoivan
42511194d5 Update Ukrainian translation 2020-08-02 18:08:55 +00:00
Jehan
3456d544ff NEWS: some minor typo fixes and alike. 2020-08-02 15:42:49 +02:00
Anders Jonsson
006e85e5ea Update Swedish translation 2020-08-02 12:06:43 +00:00
Piotr Drąg
da1a29c9f0 Update Polish translation 2020-08-02 13:55:28 +02:00
Ell
7bac21b6be devel-docs: document new "Messages" performance-log parameter
(cherry picked from commit d7de0781ab)
2020-08-02 11:08:46 +03:00
Ell
638e05494a app: allow recording GLIB log messages in performance logs
Add a new "Messages" boolean parameter to performance logs, which,
when set, records GLIB log messages in the performance log as
markers, with an accompanying sample capturing their backtrace.
This option is enabled by default.

(cherry picked from commit 9e0fdc8e2c)
2020-08-02 11:08:46 +03:00
Ell
a8e3f36e38 app: add gimp_log_{set,remove}_handler()
... which set/remove a GLIB log handler for all domains used by
GIMP.

Use the new functions in errors.c, instead of using
g_log_set_handler() directly.

(cherry picked from commit a143bfdf1d)
2020-08-02 11:08:45 +03:00
Ell
7dc9cdf42e devel-docs: use actual em-dashes in performance-logs documentation
(cherry picked from commit 0fae46133c)
2020-07-30 18:27:53 +03:00
Ell
09a3058839 devel-docs: remove old performance-logs-parameters section
(cherry picked from commit ca6f577413)
2020-07-30 18:19:53 +03:00
Ell
5d07a99bdc devel-docs: fix image URL in performance-logs documentation
(cherry picked from commit 1d70fee1fd)
2020-07-30 18:18:04 +03:00
Ell
980d6df67a devel-docs: update documentation of performance-log parameters
(cherry picked from commit d72e6b3aed)
2020-07-30 18:15:42 +03:00
Ell
86dd161f53 app: improve layout of performance-log file-selection dialog parameters
(cherry picked from commit 9b29d17895)
2020-07-30 18:15:42 +03:00
Jehan
18b62f1af4 NEWS: update. 2020-07-30 12:22:29 +02:00
Yuri Chornoivan
596ab794c5 Update Ukrainian translation 2020-07-30 09:53:56 +00:00
Ell
38b1298c2d app: in GimpDashboard, fix progressive-performance-log env-var
(cherry picked from commit d11cbbbbc9)
2020-07-30 01:14:42 +03:00
Ell
460db9d302 tools: add performance-log-progressive-coalesce.py; use in performance-log-viewer
Add a new performance-log-progressive-coalesce.py tool, which
coalesces partial address maps in progressive performacne logs into
a single global address map, suitable for processing by the rest of
the tools.

Use the new tool as part of the pipeline in performance-log-viewer.

(cherry picked from commit 76f9e5feaf)
2020-07-30 01:07:18 +03:00
Ell
b58ccec833 tools: add performance-log-close-tags.py, use in performance-log-viewer
Add a new performance-log-close-tags.py tool, which closes unclosed
tags in incomplete performance logs, allowing the rest of the
perofmance-log tools to process them.  This is necessary for
unfinished progressive logs.

Use the new tool as part of the pipeline in performance-log-viewer.

(cherry picked from commit e5fe1ef152)
2020-07-30 01:06:55 +03:00
Ell
60ca611096 app: add progressive performance logs
Add an option to record progressive performance logs.  Progressive
logs contain complete information after each recorded sample, by
writing partial address maps at each sample, containing all new
addresses introduced by the sample.  Furthermore, when recording a
progressive log, the output stream is flushed after each sample.

This allows recording complete logs even in cases where they can't
be properly terminated, such as when GIMP crashes or freezes in the
middle of the log.

Progressive logs are disabled by default, since they potentially
increase the sampling cost.  They can be enabled through a toggle
in the log file-dialog, or through the
GIMP_PERFORMANCE_LOG_PROGRESSIVE environment varaible.

(cherry picked from commit 146c234350)
2020-07-30 01:06:55 +03:00
Ell
7e21f79270 app: allow controlling performance-log parameters through the UI
When recording a performance log, allow setting the log parametrs
through the file dialog.  Currently, this includes the sample
frequency, and the option to include backtraces.

These options are still controllable through the
GIMP_PERFORMANCE_LOG_SAMPLE_FREQUENCY and
GIMP_PERFORMANCE_LOG_BACKTRACE environment variables.  When set,
the variables override the values entered through the UI.

(cherry picked from commit 126002c5c9)
2020-07-30 01:06:54 +03:00
Ell
5fc30e59d3 app: in GimpBacktrace Windows backend, return NULL backtrace if not initialized
In the Windows implementation of gimp_backtrace_new(), return NULL
if the backend is not fully initialized.

(cherry picked from commit 95b69dd77b)
2020-07-30 01:06:54 +03:00
Ell
22690abac3 Issue #5472 - CRITICAL while using Move tool with arrow keys
In gimp_edit_selection_tool_translate(), perform the active-item
checks even when the effective translation offset is 0, and only
bail afterwards.  This avoids erroneously calling
gimp_tool_message_literal() with a NULL message in this case.

(cherry picked from commit 3a462a5e63)
2020-07-29 20:08:27 +03:00
Sabri Ünal
0bf0f31a5b Issue 2874 - gimp-tool-pencil.svg icon size is corrected on Color icon theme 2020-07-28 16:55:10 +00:00
Michael Schumacher
a6c66e49fb build: add an additional distcheck step to .gitlab-ci.yml
Runs in the gimp stage in parallel to the make && make check build.
May catch dist errors.

Distcheck is allowed to fail. The idea is that being able to build GIMP
is more important and should get fast feedback, while make distcheck is
usually only used when a release is prepared.

Reviewer note: not sure about the "allowed to fail" part because we also
want to fix dist bugs as soon as we can (it's easier to find a bug
source when we get notified as soon as a guilty commit breaks the CI).
But anyway this is a step forward from current CI. So let's merge this
for now.
2020-07-28 16:41:54 +00:00
Ell
c38a23b90c Issue #4536 - Seg fault when trying to open image on Google Drive (Gnome 3.34.3)
In file_open_image(), mount non-native files *before* looking up a
file-proc.  Previously, we'd only mount the file after the initial
lookup, and fail to perform a second lookup if the mount succeeded,
leaving us with a NULL file-proc and a subsequent segfault.

Additionally, simplify the rest of the remote-file code-path.

(cherry picked from commit 0829dba97f)
2020-07-28 11:20:18 +03:00
Jehan
040c7b8b03 NEWS: update. 2020-07-26 14:02:26 +02:00
Jacob Boerema
8f539680de plug-ins: fix #5357 Image marked as compressed, but DDSD_LINEARSIZE is not set.
(cherry picked from commit 81a3370e1d)
2020-07-26 13:46:09 +02:00
David Russo
430e60a898 Stop writing file paths into TIFF DocumentNames
File paths can contain confidential information such as usernames
and directory structures, making the previous behaviour a potential
privacy and security risk.

(cherry picked from commit a3a88bf6b9)
2020-07-26 12:05:04 +02:00
Jehan
4d0db02081 NEWS: update. 2020-07-22 22:56:47 +02:00
Peter Oliver
08ae0a9bb9 Offer image/webp content type in .desktop file
Nautilus will only offer to open WebP files in applications that accept
the `image/webp` content type, not `image/x-webp`.  Even though it isn’t
on the [official
list](https://www.iana.org/assignments/media-types/media-types.xhtml#image),
`image/webp` seems to be more
[widely](https://en.wikipedia.org/wiki/WebP)
[recommended](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#Image_types)
than `image/x-webp`.

(cherry picked from commit 84c08e55e1)
2020-07-22 19:47:54 +02:00
Baurzhan Muftakhidinov
7942fe66b7 Update Kazakh translation 2020-07-21 04:50:31 +00:00
Baurzhan Muftakhidinov
3f0ffaa461 Update Kazakh translation 2020-07-21 04:44:05 +00:00
Tim Sabsch
08d94826d5 Update German translation 2020-07-18 09:22:56 +00:00
Jehan
40586036ee NEWS: kickstart the 2.10.22 section! 2020-07-17 22:41:23 +02:00
Jehan
a897b48921 app: show playground if any of the experimental feature is enabled.
Basically if you enabled OpenCL or any of the experimental tools, it
will show the Playground in Preferences. Otherwise, say you enabled some
experimental feature months ago (e.g. with the CLI option) and you now
experience crashes or whatnot. And you forgot how to change it, and only
remembered that there was something in Preferences. It would make you
crazy to not find the tab again to disable the option.

This is even more important as OpenCL is moving from a normal option to
a playground option. So you might not even have ever seen the Playground
tab in Preferences and would not know how to disable OpenCL after you
enabled it originally in "System Resources" tab.

So now Playground is visible with any of these 3 conditions:
* If you use an unstable version.
* If you run GIMP with --show-playground option.
* If you previously enabled one of the playground options.

(cherry picked from commit d3ef6cfb18)
2020-07-17 22:22:05 +02:00
Jehan
ebb5c3c0d2 app: move OpenCL settings into the Playground.
After discussions on IRC, it was decided that our current level of
support of OpenCL was not good enough. As a normal settings, people just
see it as a normal acceleration checkbox, even despite the warning text
and emoticone saying the opposite (i.e. it may even slow things down in
some cases).
Basically this feature needs more love to be back into mainstream
Preferences.

(cherry picked from commit 0f806d0e9c)
2020-07-17 22:21:56 +02:00
Jehan
a0c1a2cc36 app: add contents of /.flatpak-info in the verbose info.
This file is available in a flatpak sandbox and will contain various
info such as the build commit, very useful info as we can have several
builds for a same version. For instance if we have exactly the right
commit, we can load exactly the same binary as a bug reporter very
easily, hence are able to get source correspondance without necessarily
asking reporters to install debug symbols (though it stays easier if
they can do it).

Other interesting info contained in this file are the exact runtime
used, the installed application or runtime extensions, the permissions
(people may override our flatpak permissions so it's useful to be able
to check when they did) and environment variables…

(cherry picked from commit bc5f6371e9)
2020-07-17 22:21:47 +02:00
Elad Shahar
b0a4a95be4 Issue #5069: Gfig uses the Stroke color for filling instead of the fill color
(cherry picked from commit 0a611bd8ad)
2020-07-16 15:46:05 +02:00
Boyuan Yang
5feae636f3 Update Chinese (China) translation 2020-07-15 16:07:23 +00:00
Ell
88ef1d9156 libgimpwidgets: handle Enter/Esc keys in GimpSpinButton
In GimpSpinButton, don't propagate Enter key-press events if
updating the spin-button's value in response changes the entered
text.  This prevents confirming dialogs when hitting Enter after
entering a math expression in size entries, updating their value
instead.

Likewise, don't propagate Escape key-press events if a new value
was entered, and restore the original value instead.

(cherry picked from commit e531023031)
2020-07-14 13:01:35 +03:00
Boyuan Yang
1fc254a48a Update Chinese (China) translation 2020-07-11 19:07:13 +00:00
Jehan
aeed6fcb85 app: make "gegl:matting-levin" default engine of Foreground Select tool.
Even though this engine is optional, we already have the code to detect
its absence at runtime, and to fallback to "gegl:matting-global". So it
won't be a problem even then.

When the operation is present though, it definitely makes a lot more
sense than matting global as default, because it performs a lot better
in most cases (as far as I could see as well as others).

(cherry picked from commit b52cdf4c90)
2020-07-09 22:43:58 +02:00
Jordi Mas
2953d70620 Update Catalan translation 2020-07-02 14:56:02 +02:00
Piotr Drąg
fd58984350 Update Polish translation 2020-06-28 13:00:18 +02:00
Ell
3212da715b app: increase idle priority for hiding on-hover tool-group menu
In GimpToolButton, when in "show menu on hover" mode, increase the
idle priority for hiding the the tool-group menu upon button/menu
leave-notify.  Make the priority one step below the normal event
priority, so that a subsequent button/menu enter-notify event
canceling the idle is processed beforehand, while the idle is
otherwise still processed before ordinary lower-priority sources,
in particular, before projection rendering timeouts.
2020-06-28 12:12:36 +03:00
Anders Jonsson
b177c98e32 Update Swedish translation 2020-06-25 23:42:54 +00:00
Anders Jonsson
b62098d2ec Update Swedish translation 2020-06-25 20:20:26 +00:00
Yuri Chornoivan
acef860ea7 Update Ukrainian translation 2020-06-25 19:24:37 +00:00
Yuri Chornoivan
911b85fb3d Update Ukrainian translation 2020-06-25 19:22:51 +00:00
Ell
04d56bf31c plug-ins: add option to crop layers to image bounds when exporting TIFF
In file-tiff, add an option to crop the layers to the image bounds
when exporting individual layers (using GIMP_EXPORT_NEEDS_CROP
added in the previous commit), since TIFF has no concept of global
image bounds otherwise.  Cropping is enabled by default.
2020-06-25 18:34:20 +03:00
Ell
6c44e51b83 libgimp: add GIMP_EXPORT_NEEDS_CROP export capability
Add a new GIMP_EXPORT_NEEDS_CROP export capability, which causes
gimp_export_image() to crop the exported image content to the image
bounds; this is useful for formats that support layers, but have no
concept of global image bounds, hence cropping is the only way to
enforce the image bounds.

When showing the export dialog, give an option to either crop the
layers to the image bounds, or to resize the image to fit the
layers.
2020-06-25 18:34:20 +03:00
Ell
00d1a21b78 Issue #5274 - Exporting as TIFF fails for layers with a negative offset
When exporting a TIFF file without merging the image, make sure non
of the exported layers has a negative offset, by offsetting all the
layers as necessary.  TIFF doesn't support negative page offsets,
giving an error in libtiff.
2020-06-25 18:34:20 +03:00
Ell
33e76338d8 plug-ins: fix last commit for PLANARCONFIG == SEPARATE
(cherry picked from commit 46cb5a5e79)
2020-06-24 15:52:00 +03:00
Ell
7d5188db49 Issue #5275 - TIFF files with signed-int samples are misinterpreted as unsigned
When loading a TIFF file with signed-int samples, convert the
samples to unsigned-int by offsetting them to the unsigned range,
instead of misinterpreting them as unsigned values.

(cherry picked from commit 8b9819339d)
2020-06-24 15:36:24 +03:00
Marco Ciampa
68f27d7592 Updated Italian translation 2020-06-18 16:37:59 +02:00
Rodrigo Lledó
7e75ada64c Update Spanish translation 2020-06-18 06:36:50 +00:00
Jordi Mas
44ba3238af Fixes to Catalan translation 2020-06-18 00:02:37 +02:00
Marco Ciampa
93cf53564e Updated Italian translation 2020-06-16 16:53:39 +02:00
lillolollo
f4ff636dd3 devel-docs: Fix typo 2020-06-16 14:18:01 +00:00
Ell
00145da370 Issue #5226 - hover over toolgroup not working
In gimp_tool_button_enter_notify(), only mask-in the mouse-button
state for determining whether to show the tool-group menu.  This
avoids other bits of state -- in particular, certain keyboard
locks, including keyboard-layout state -- from preventing the menu
from showing.
2020-06-16 13:12:34 +03:00
Anders Jonsson
e8f6d848d6 Update Swedish translation 2020-06-15 20:30:10 +00:00
Marco Ciampa
1c57f1a410 Another small fix in italian translation 2020-06-15 15:38:48 +02:00
Marco Ciampa
23e09f2e24 Fixed plural in Italian translation 2020-06-15 15:27:03 +02:00
Marco Ciampa
e5018d43a7 Fixed 3D transformation option name 2020-06-15 10:45:29 +02:00
Ell
ab15245eb1 Issue #5219 - Color>Info>Export histogram counts pixels twice
gimp_histogram() takes an inclusive range -- the plug-in has been
counting non-zero pixels twice.

(cherry picked from commit 6a01bf2df2)
2020-06-14 17:05:12 +03:00
Piotr Drąg
362c68decb Update Polish translation 2020-06-14 13:42:06 +02:00
Ell
505955ba50 Issue #5232 - PSD export issue
In psd-save.c, fix erroneous call to gimp_item_get_image(), which
was being called with an image-id, instead of a drawable-id,
potentially causing an error or wrong results if the image-id did
not correspond to an existing item, or if the corresponding item
did not belong to the exported image.
2020-06-14 11:28:56 +03:00
Michael Schumacher
c0871d2a1e build: add libwmf patch from libwmf repository to prevent issue #4061
(cherry picked from commit 437bcf77df194b238126fe1c0b24c92b26a15442)
2020-06-13 16:59:37 +02:00
Michael Schumacher
7270916190 build: add libwmf patch from libwmf repository to prevent issue #4016
(cherry picked from commit 0ce3798a42)
2020-06-13 15:06:47 +02:00
Jordi Mas
2aa9a244c1 Update Catalan translation 2020-06-12 20:52:39 +02:00
Ell
ec22d5b402 data: clean up "Acrylic 05" brush
Clean up faint pixels in the "Acrylic 05" brush, which produce a
badly-thresholded mask with the Pencil tool.  See issue #5180.

Thanks to Sevenix for the fixed brush!

(cherry picked from commit f9cc239f2c)
2020-06-12 18:20:12 +03:00
Ell
e4fbf6c404 Issue #5208 - paint brush is broken when aspect ratio is set to negative
Fix horizontal downscaling of brush mipmap levels with odd width.
We'd previously fail to skip the last pixel of each input row,
which isn't included in the output when the width is odd, causing
subsequent output rows to be shifted to the right.

(cherry picked from commit c4a201eaf4)
2020-06-12 17:30:35 +03:00
Ell
ee01702fae app: fix error propagation in boolean GUM grouping subexpressions
(cherry picked from commit bbc0f18953)
2020-06-12 01:35:11 +03:00
Ell
50731ea7f8 app: fix reference parsing in boolean GUM expressions
(cherry picked from commit 5c07bcd1ff)
2020-06-12 01:35:11 +03:00
Ell
a215db1f12 app: fix switching filter-tool split-preview orientation
... after last commit.

(cherry picked from commit 93f728e484)
2020-06-11 21:33:13 +03:00
Ell
182e9ebac4 app: use absolute offset for filter-tool split-preview guide position
In GimpDrawableFilter and GimpFilterTool, use an absolute offset
for the split-preview guide position, instead of storing it as a
fraction of the drawable's width/height.  The latter could
introduce rounding error, which would result in wrong coordinates
when converted back to an absolute offset.

(cherry picked from commit 214936e8c6)
2020-06-11 20:46:23 +03:00
Ell
1cd0ace79f app: update custom guides when moved past display bounds
In GimpGuideTool, when a custom guide (whose position is updated
directly on motion) is moved past the display bounds, keep updating
the corresponding GimpGuide's position, even though the guide will
be removed on release, to avoid leaving the guide at its old
position.

This affects the filter tool's split-preview guide.

(cherry picked from commit 9a25ae7171)
2020-06-11 20:46:07 +03:00
Asier Sarasua Garmendia
2513171e3d Update Basque translation 2020-06-11 13:53:15 +00:00
Asier Sarasua Garmendia
f2a85c723b Update Basque translation 2020-06-11 13:30:50 +00:00
Yuri Chornoivan
6e762600e5 Update Ukrainian translation 2020-06-11 13:25:12 +00:00
Anders Jonsson
ec3ebc45ab Update Swedish translation 2020-06-11 13:14:02 +00:00
Asier Sarasua Garmendia
30ee9c9a5b Update Basque translation 2020-06-11 13:13:03 +00:00
lillolollo
ecaad7c691 NEWS: fix typos 2020-06-10 23:18:55 +00:00
Ell
a2ff734452 build: add GTK patch to avoid double definition of exported variables on Windows
... by qualifying them with "extern", in addition to
"__declspec(dllexport)".  Omitting "extern" happened to work in the
past, but recent GCC versions require it.
2020-06-10 18:29:55 +03:00
Ell
fb40d37bce libgimpbase: avoid double definition of exported variables on Windows
... by qualifying them with "extern", in addition to
"__declspec(dllexport)".  Omitting "extern" happened to work in the
past, but recent GCC versions require it.

(cherry picked from commit b2e223813b)
2020-06-10 18:29:33 +03:00
Jehan
970b0cf80d desktop: fix some news URL in appdata.
The 2.10.16/2.10.18 URL was wrong.

(cherry picked from commit 588ae66e52)
2020-06-10 02:21:29 +02:00
luz.paz
0087167cb3 Misc. typos
Found via `codespell`

(cherry picked from commit ac282f2045)
2020-06-10 02:09:26 +02:00
Marco Ciampa
18a9896a5e Updated Italian translation 2020-06-09 15:16:28 +02:00
Alan Mortensen
94c05554f9 Updated Danish translation 2020-06-09 15:11:50 +02:00
Jehan
4c08173025 app: make a tooltip translatable and translate device axis strings.
Thanks to Cristian Secară on the developer mailing list to notice them.

(cherry picked from commit 5302beb947)
2020-06-09 11:04:36 +02:00
Michael Natterer
72033f7493 libgimpconfig: fix string deserialization for some cases
In gimp_config_deserialize_fundamental(), we can't use
g_value_set_static_string() because that will in the end pass the
GScanner's temporary scanner->value.v_string to
GObject::set_property(), and depending on set_property()'s
implementation, we might not dup the string (for example objects
created via gimp_config_type_register() will simply use g_value_copy()
and end up with a dangling pointer as a string member).

(cherry picked from commit 2e6656599d)
2020-06-08 22:37:23 +02:00
sicklylife
025060f98e Update Japanese translation 2020-06-08 10:15:38 +00:00
Michael Natterer
de65e920a5 configure.ac: post-release version bump to 2.10.21 2020-06-07 22:51:04 +02:00
Michael Natterer
68d21512bf configure.ac: bump versions for the 2.10.20 release 2020-06-07 22:06:17 +02:00
Øyvind Kolås
dac5718af2 autotools,app: depend on GEGL 0.4.24 2020-06-07 21:24:40 +02:00
Øyvind Kolås
1c1e3de7c2 app, configure: depend on babl-0.1.78 2020-06-07 20:34:19 +02:00
sicklylife
0b163452ae Update Japanese translation 2020-06-07 14:25:11 +00:00
sicklylife
9c45354cf6 Update Japanese translation 2020-06-07 14:24:33 +00:00
sicklylife
2edd11d91e Update Japanese translation 2020-06-07 14:16:50 +00:00
sicklylife
40d594444d Update Japanese translation 2020-06-07 14:16:11 +00:00
Michael Natterer
43f1a3d515 NEWS: re-wrap long lines 2020-06-07 15:56:51 +02:00
Michael Natterer
e800aebffd docs, etc: regenerate system gimprc and its manpage 2020-06-07 15:56:14 +02:00
Ell
1b4675f6fc build: add Japanese translation to the Windows installer
(cherry picked from commit 0c06c24441)
2020-06-07 16:38:59 +03:00
Ell
aaeeb77501 po-windows-installer: fix unsupported chars in Japanese translation
(cherry picked from commit b56f5eb3f6)
2020-06-07 16:38:59 +03:00
sicklylife
84247ec2d3 Add Japanese translation 2020-06-06 19:27:53 +00:00
Hannie Dumoleyn
5346d50067 Update Dutch translation 2020-06-06 15:37:18 +00:00
Piotr Drąg
00840a15ec Update Polish translation 2020-06-06 14:15:38 +02:00
Anders Jonsson
990e6ed08d Update Swedish translation 2020-06-05 19:46:31 +00:00
Cristian Secară
4309bfc4d8 Update Romanian translation 2020-06-05 07:51:59 +00:00
Cristian Secară
2b90b1b7b1 Update Romanian translation 2020-06-04 23:32:30 +00:00
Ell
d4ce6c5453 plug-ins: in twain, unify 8- and 16-bit data transfer
(cherry picked from commit 86569b9ae3)
2020-06-04 22:01:42 +03:00
Ell
f358bd5cd2 plug-ins: another fix to last commit
(cherry picked from commit 6d4712edb9)
2020-06-04 21:00:56 +03:00
Ell
a28b865a80 plug-ins: fix last commit 2020-06-04 20:48:30 +03:00
Ell
f35df5503d Issue #4941 - TWAIN 16-bit greyscale/rgb scan always loaded as 8-bit
Simplify data transfer in the twain plug-in, and add support for
16-bit RGB/grayscale images.

(cherry picked from commit 30f65bb6c5fdbbb48edd3d07d764763d6a2477c4)
2020-06-04 20:41:25 +03:00
Yuri Chornoivan
63a242ce7e Update Ukrainian translation 2020-06-04 09:12:57 +00:00
Alexandre Prokoudine
5bee8eb79f Update Russian translation 2020-06-04 02:23:13 +03:00
Alexandre Prokoudine
bb65d26133 Add the list of changes in 2.10.20 to the appdata 2020-06-04 02:17:11 +03:00
Ell
580e4b813a plug-ins: fix last twain-plug-in commit
(cherry picked from commit 6def9e59fb)
2020-06-04 01:14:36 +03:00
Cristian Secară
b68ff3b7aa Update Romanian translation 2020-06-03 16:26:20 +00:00
Cristian Secară
090891c037 Update Romanian translation 2020-06-03 16:24:59 +00:00
Cristian Secară
f32730c718 Update Romanian translation 2020-06-03 16:23:18 +00:00
Cristian Secară
005003e5e5 Update Romanian translation 2020-06-03 16:21:23 +00:00
Ell
47298614f7 Issue #4210 - GIMP reports errors on scanning ...
... since GEGLification of the twain plug-in (2.10.14 and later
versions)

In the data-transfer functions, allocate a temporary buffer for the
converted data on each call using the current chunk size, instead
of reusing the buffer allocated on the first chunk.  This allows
for different chunks sizes across calls.

(cherry picked from commit 9a1d43c978)
2020-06-03 16:59:11 +03:00
Ell
3c61965075 app: misc cleanup in prop-gui range creation
(cherry picked from commit ca351d3520)
2020-06-03 10:16:30 +03:00
Ell
c82b894cd3 app: fix prop-gui static range visibility
(cherry picked from commit c7599626f4)
2020-06-03 10:16:30 +03:00
Yuri Chornoivan
28c7a813e8 Update Ukrainian translation 2020-06-03 06:56:11 +00:00
Ell
b6e0333aa0 app: in _gimp_prop_gui_new_generic(), use "range-label" pspec key as range label
... when available

(cherry picked from commit 4492f61df4)
2020-06-02 23:56:20 +03:00
Ell
0a82815aeb app: improve gegl:focus-blur prop-gui constructor
... by grouping the geometry options, which can be controlled
through the on-canvas UI, in an expandable frame, which is
collapsed by default.  The shape option is not part of the group,
and is moved to the top.

(cherry picked from commit 438babea6b)
2020-06-02 23:29:12 +03:00
Ell
8da94a5751 app, menus: add gegl:lens-blur to Filters -> Blur
gegl:lens-blur simulates an out-of-focus lens blur.
(cherry picked from commit 323355a708)
2020-06-02 23:29:12 +03:00
Ell
8e6a601a80 app: use special prop-gui widget for luminance ranges
In _gimp_prop_gui_new_generic(), when a pair of consecutive
properties have "range-start" and "range-end" roles, respectively,
and "luminance" units, use a range prop-widget for both properties,
as per the previous commits.

The range is sorted by default, unless the first property has a
"range-sorted" key of "false".

(cherry picked from commit 8eb752b194)
2020-06-02 23:29:12 +03:00
Ell
69b0d86713 app: add gimp_prop_range_set_ui_limits()
... which sets the limits of the range-widget's handle-bar
explicitly, instead of using the lower/upper properties' limits.

(cherry picked from commit ce8235e977)
2020-06-02 23:29:11 +03:00
Ell
e5916c81cc app: allow setting handle-bar limits explicitly
In GimpHandleBar, add gimp_handle_bar_{set,unset,get}_limits(), to
allow settings the handle-bar limits explicitly, rather than
inheriting the adjustment limits.

(cherry picked from commit fa5dd99559)
2020-06-02 23:29:11 +03:00
Ell
0c65fce18c app: add gimp_prop_range_new()
... which creates a widget controlling a pair of lower/upper range-
limit properties, comprised of a handle-bar and two spin-buttons.

If the "sorted" parameter is TRUE, the "lower" property is bounded
above by the "upper" property, and vice versa.

(cherry picked from commit e03b8e597b)
2020-06-02 23:29:11 +03:00
Ell
a974e71702 app: add gimp_gtk_adjustment_chain()
... which takes a pair of GtkAdjustments, and binds the value of
the first to the lower-limit of the second, and the value of the
second to the upper-limit of the first.

(cherry picked from commit 45e5c2231a)
2020-06-02 23:29:10 +03:00
Cristian Secară
74f96d626d Update Romanian translation 2020-06-02 17:13:00 +00:00
Ell
4c924c1cb8 app: in gimp_accel_label_set_action(), emit notify
(cherry picked from commit 0ac2aa5130)
2020-06-02 11:03:29 +03:00
Cristian Secară
89f8dc095d Update Romanian translation 2020-06-02 06:54:10 +00:00
Yuri Chornoivan
ae75f5de8f Update Ukrainian translation 2020-06-01 20:31:08 +00:00
Anders Jonsson
ffb0175a8c Update Swedish translation 2020-06-01 20:00:43 +00:00
Ell
252cd8f100 app: fix parsing of GUM cross-property references
(cherry picked from commit 8139836d5d)
2020-06-01 22:40:41 +03:00
Ell
5605e8484c app: in gimp_prop_eval_string(), don't leak result upon trailing tokens
(cherry picked from commit ae801871e5)
2020-06-01 22:40:40 +03:00
Ell
35d6d9e529 app: list all tool-group tools in tool-button tooltip
In tool-group GimpToolButton tooltips, in addition to showing the
description of the currently-active tool, list the other tools in
the group as well, to improve discoverability.

(cherry picked from commit 4d83c7a3fc)
2020-06-01 19:30:54 +03:00
Ell
a54704bcdc app: add GimpAccelLabel
Add a new GimpAccelLabel widget, which shows an accelerator label
for a given GimpAction.  Unlike GtkAccelLabel, GimpAccelLabel
doesn't show a user-provided label in addition to that.

Note that the size request of GtkAccelLabel doesn't include the
accelerator part, which is desirable in some contexts.
GimpAccelLabel doesn't suffer from that.

(cherry picked from commit 2259ad5fcc)
2020-06-01 19:30:09 +03:00
Cristian Secară
bf2dae8f7f Update Romanian translation 2020-06-01 11:32:20 +00:00
Hannie Dumoleyn
a403a7d72f Update Dutch translation 2020-06-01 11:00:24 +00:00
Cristian Secară
2b2b033ae5 Update Romanian translation 2020-06-01 10:53:04 +00:00
Cristian Secară
c52980110c Update Romanian translation 2020-05-31 15:35:00 +00:00
Cristian Secară
92ccf522eb Update Romanian translation 2020-05-31 15:07:57 +00:00
Cristian Secară
a04e9c92bf Update Romanian translation 2020-05-31 15:05:10 +00:00
Cristian Secară
8e6560c232 Update Romanian translation 2020-05-31 15:03:28 +00:00
Cristian Secară
b9da817ecc Update Romanian translation 2020-05-31 14:54:21 +00:00
qarmin
8bb4b722c8 Compare counter value instead its pointer address
(cherry picked from commit be5d23bf98)
2020-05-31 12:15:43 +02:00
Jehan
32ed52216c app: some small improvements in line art code.
Mostly I am adding a counter to the insignifiant zone fill, to be double
sure we are not going to fill huge areas (this should not happen already
anyway) and also it is no use to sample the line art buffer in such
case.

(cherry picked from commit 248477a125)
2020-05-31 12:15:19 +02:00
Hannie Dumoleyn
dc8a9f3643 Update Dutch translation 2020-05-30 17:38:03 +00:00
Rodrigo Lledó
ba2ff0184d Update Spanish translation 2020-05-30 13:52:59 +00:00
Claude Paroz
5dacdcd409 Updated French translation 2020-05-30 09:58:30 +02:00
Marco Ciampa
74d6cc2717 Updated Italian translation (fix the previous commit) 2020-05-29 22:53:34 +02:00
Daniel Șerbănescu
303ce20e99 Update Romanian translation 2020-05-29 19:43:52 +00:00
Marco Ciampa
1e372bd3f5 Updated Italian translation 2020-05-29 20:26:16 +02:00
Milo Ivir
5438170760 Update Croatian translation 2020-05-29 17:30:38 +00:00
Milo Ivir
ca17c69807 Update Croatian translation 2020-05-29 17:22:51 +00:00
Milo Ivir
b339f81833 Update Croatian translation 2020-05-29 17:20:46 +00:00
Milo Ivir
a13c4f6e01 Update Croatian translation 2020-05-29 17:16:33 +00:00
Milo Ivir
af8eb9076c Update Croatian translation 2020-05-29 17:14:22 +00:00
Milo Ivir
1726d4cec1 Update Croatian translation 2020-05-29 17:11:45 +00:00
Alan Mortensen
fbf36b4547 Updated Danish translation of gimp-plug-ins 2020-05-29 15:35:58 +02:00
Alan Mortensen
cb55b09d3a Updated Danish translation 2020-05-29 15:35:35 +02:00
Sabri Ünal
f001fac473 Update Turkish translation 2020-05-29 10:56:14 +00:00
Cristian Secară
118bb9470d Update Romanian translation 2020-05-28 17:12:46 +00:00
Cristian Secară
b517431da3 Update Romanian translation 2020-05-28 17:10:34 +00:00
Cristian Secară
40902bcf46 Update Romanian translation 2020-05-28 17:04:32 +00:00
lillolollo
4b9d58da22 NEWS: add more fixed bugs 2020-05-28 05:03:03 +00:00
Alexandre Prokoudine
1b5374a7ce Update NEWS 2020-05-27 17:33:09 +00:00
Øyvind Kolås
670078dba8 build,app: depend on babl-0.1.76 2020-05-27 15:17:46 +02:00
Bruce Cowan
c9e551d9f0 Update British English translation 2020-05-26 22:15:20 +00:00
Bruce Cowan
625ec2b9d5 Update British English translation 2020-05-26 22:11:20 +00:00
Sabri Ünal
b717d0550f Update Turkish translation 2020-05-26 16:21:16 +00:00
Sabri Ünal
d20317ce20 Update Turkish translation 2020-05-26 16:17:03 +00:00
Sabri Ünal
695ca1facd Update Turkish translation 2020-05-26 16:06:39 +00:00
Daniel Mustieles
390edf86b6 Update Spanish translation 2020-05-26 14:49:23 +00:00
Daniel Mustieles
e02d5965d2 Update Spanish translation 2020-05-26 14:43:24 +00:00
Michael Schumacher
a6dcab4c0c plug-ins: use G_GOFFSET_FORMAT to fix a long int vs. long long int format warning
(cherry picked from commit 8bf8eb9dc0)
2020-05-26 12:20:36 +02:00
Ell
0c4e6f1ef3 app: update tool widgets on display-shell changes more granularly
Partially revert commit c73710e410,
avoiding updating tool widgets unconditionally on tool resume in
GimpDrawTool -- it's too expensive in general.

Instead, handle display-shell changes in GimpToolWidget, by adding
GimpToolWidget::update_on_{scale,scroll,rotate} flags, which
subclasses can use to request an update on any of these events.

Set the flags as necessary for the affected widgets.

(cherry picked from commit afda774f44)
2020-05-26 10:46:44 +03:00
Ell
cf80b43b03 app: fix compiler warnings in GimpToolWidget
(cherry picked from commit ec69083354)
2020-05-26 10:46:17 +03:00
Simon Budig
52f57251bf Issue #1439: reverse the construction of the "selection to path" plugin. 2020-05-25 12:30:57 +02:00
Alexandre Prokoudine
6113abc175 Update NEWS 2020-05-24 15:41:21 +00:00
Tim Sabsch
07b0a178f4 Update German translation 2020-05-23 21:26:42 +00:00
Ell
efb97fa7bd app: implement GimpColorManaged for GimpImageProxy
In GimpImageProxy, implement GimpColorManaged by forwarding the
functions to the underlying GimpImage, and forwarding the signals
in the other direction.  This fixes color-managed view in the
Navigation dockable.

(cherry picked from commit 258c8454d5)
2020-05-22 16:36:42 +03:00
Jordi Mas
b742cc0a0d Update Catalan translation 2020-05-21 20:40:25 +02:00
Alexandre Prokoudine
5667dd2b97 Update and denaphtalinize Russian translation, part 1 of many 2020-05-21 12:38:38 +03:00
Ell
5771393379 app: zero-out transparent pixels when converting to indexed
When converting an image to indexed mode, zero-out transparent
pixels instead of leaving junk in their indices, which might well
be out of range of the palette.

(cherry picked from commit 09870d4b15)
2020-05-20 21:16:55 +03:00
Ell
3e61ef9ae6 app: fix alignment of generic pixel buffers
Wherever we store arbitrary-format colors in an opaque buffer, use
double for the buffer, instead of char, so that it has a strict-
enough alignment to handle all our used pixel formats.

(cherry picked from commit a90f59d961)
2020-05-20 08:54:31 +03:00
Jehan
81fb595ca0 app: do not try to copy a buffer result from a canceled GEGL operation.
This fixes:
> GEGL-WARNING: (../../src/gegl/gegl/buffer/gegl-tile.c:127):gegl_tile_dup: runtime check failed: (! src->damage)

Which happened when a GEGL operation was running and you canceled it in
the middle, say with the ESC key (easy to reproduce with long operations
such as "Color to Gray"). In such case, obviously don't try to copy the
unfinished operation result into the dest buffer.

(cherry picked from commit 2b764c6542)
2020-05-20 08:39:34 +03:00
Cristian Secară
3ebcf8d31a Update Romanian translation 2020-05-19 14:46:27 +00:00
Ell
7c8c2c0d69 app: don't leak text-tool UI manager
(cherry picked from commit 8fa9221fb8)
2020-05-19 17:06:32 +03:00
Ell
b5353eb2eb app: in GimpPanedBox, don't accept drag contexts with unsupported targets
... to avoid highlighting the droppable areas during darg.

(cherry picked from commit e38010b2d1)
2020-05-18 18:19:47 +03:00
Cristian Secară
b8dfa31a88 Update Romanian translation 2020-05-18 14:24:17 +00:00
Anders Jonsson
7361e2d8c3 Update Swedish translation 2020-05-17 20:14:10 +00:00
Piotr Drąg
1e9b8b32c7 Update Polish translation 2020-05-17 12:40:15 +02:00
Ell
f000e40590 Revert "app: update display-enums.c"
The updated display-enums.h isn't in gimp-2-10 yet :P

This reverts commit 3899d75a98.
2020-05-16 16:02:58 +03:00
Ell
bd892491f4 app: fix CRITICAL when using "show all" by default
When using "show all" by default, gimp_display_flush() can be
called during GimpDisplayShell construction, before the newly-
constructed shell is assigned to the display.  Use an ugly hack to
just ignore the flush when this happens.

(cherry picked from commit 0a06294af7)
2020-05-16 15:59:25 +03:00
Ell
3899d75a98 app: update display-enums.c
(cherry picked from commit bc13dc80dd)
2020-05-16 15:59:17 +03:00
Dimitris Spingos (Δημήτρης Σπίγγος)
cebcd49b3a Updated Greek translation 2020-05-15 14:24:46 +03:00
Ell
60db24b655 app: another fix in GimpToolFocus
(cherry picked from commit 1171798ca6)
2020-05-15 13:39:53 +03:00
Ell
03fcb782a6 app: various fixes in GimpToolFocus
(cherry picked from commit 2fcf667efd)
2020-05-15 12:34:04 +03:00
Yuri Chornoivan
60a4248ebf Update Ukrainian translation 2020-05-15 09:18:53 +00:00
Dimitris Spingos (Δημήτρης Σπίγγος)
991626f62e Updated Greek translation 2020-05-15 12:00:11 +03:00
Dimitris Spingos (Δημήτρης Σπίγγος)
765a427ac8 Updated Greek translation 2020-05-15 10:03:18 +03:00
Ell
92baa76e11 app: fix signature of gimp_canvas_limit_new()
... and gimp_tool_widget_add_limit().

(cherry picked from commit 9fe589734b)
2020-05-15 00:56:06 +03:00
Ell
3bc1d6a31a app: add gegl:focus-blur to Filters -> Blur
gegl:focus-blur blurs the image around a focal point.  It can be
used to create fake depth-of-field effects.

Add a prop-gui constructor which uses a FOCUS controller to control
the focus geometry.

(cherry picked from commit 60d4d25b93)
2020-05-15 00:50:01 +03:00
Ell
8e96c6c1b2 app, menus: add gegl:variable-blur to Filters -> Blur
gegl:variable-blur applies a blur with a per-pixel radius
controlled by a mask.

(cherry picked from commit 721f2d8c27)
2020-05-15 00:49:57 +03:00
Ell
85259b3faf app: add FOCUS controller to gegl:vignette
Add a prop-gui constructor to gegl:vignette, using a FOCUS
controller to control the op's geometry.

(cherry picked from commit f6f0a8a2d8)
2020-05-15 00:49:56 +03:00
Ell
5295a1121e app: add FOCUS prop-gui controller
... based on GimpToolFocus.

(cherry picked from commit 3a62c53009)
2020-05-15 00:49:47 +03:00
Ell
36b3745d10 app: add GimpToolFocus tool widget
Add a new GimpToolFocus tool widget, which defines a focus region,
consisting of an inner limit, an outer limit, and a transition
midpoint between them.  The widget allows controlling the limits
and the midpoint, and moving, scaling, and rotating the region.

(cherry picked from commit 5e005a762c)
2020-05-15 00:49:46 +03:00
Ell
d9ef974d43 app: add gimp_tool_widget_add_group()
... which adds a regular (non-filling, non-stroking) canvas-item
group to the widget.

(cherry picked from commit 1a8f0b6cd6)
2020-05-15 00:49:41 +03:00
Ell
24a7a3d27b app: add gimp_display_shell_constrain_angle()
... which constrains an angle to discrete increments in screen
space, similarly to gimp_display_shell_constrain_line().

(cherry picked from commit 8c1a277007)
2020-05-15 00:49:41 +03:00
Ell
ecf131ed0c app: add GimpCanvasLimit canvas item
Add a new GimpCanvasLimit canvas item, which draws an area limit
for different shapes.  It will be used by the following commits to
implement GimpToolFocus.

(cherry picked from commit 06a2b4f338)
2020-05-15 00:49:40 +03:00
Ell
bd00527fe5 app: in GimpDrawTool, update widget on tool resume
In GimpDrawTool, update the tool widget on GIMP_TOOL_ACTION_RESUME,
so that it can respond to changes in the display-shell scale/
offset.  We'd previously done that for individual tools/widgets,
but let's just do it in one place.

(cherry picked from commit c73710e410)
2020-05-15 00:49:08 +03:00
Ell
c4061c01aa app: pause/resume active tool when rotating canvas
In GimpDisplayShell, pause and restore the active tool when
rotating the canvas, similarly to scrolling and scaling.

(cherry picked from commit cd5e4e99dd)
2020-05-15 00:49:07 +03:00
Ell
2bfc4fc476 app: allow arbitrary aux inputs in GimpOperationTool
In GimpOperationTool, don't limit aux inputs to "aux".."aux32", and
rather list all aux inputs the op has.

(cherry picked from commit 1bf9d1ba53)
2020-05-15 00:48:55 +03:00
Cristian Secară
10ca1d8cd3 Update Romanian translation 2020-05-14 13:47:14 +00:00
Yuri Chornoivan
abdd94583d Update Ukrainian translation 2020-05-14 12:53:25 +00:00
Michael Natterer
cd1c842cd5 plug-ins: fix duplicate mnemonic in one string in ddswrite.c 2020-05-14 09:41:58 +02:00
Yuri Chornoivan
63a749721f Update Ukrainian translation 2020-05-12 20:10:16 +00:00
Cristian Secară
546309b7a2 Update Romanian translation 2020-05-12 20:01:43 +00:00
Cristian Secară
e9e4421787 Update Romanian translation 2020-05-12 19:58:06 +00:00
Daniel Șerbănescu
4aad8599f1 Update Romanian translation 2020-05-12 19:52:37 +00:00
Michael Natterer
f274b139fc Issue #3533 - Tool preset doesn't restore opacity and paint mode
There is no non-hackish way of fixing this without adding a new
"use-opacity-paint-mode" property to GimpToolPreset and a new toggle
in GimpToolPresetEditor. Restoring opacity and paint mode can now be
controlled explicitly, and defaults to TRUE.

(cherry picked from commit 97b714d428)
2020-05-12 21:14:41 +02:00
Anders Jonsson
2dbd3a951c Update Swedish translation 2020-05-11 22:49:35 +00:00
Yuri Chornoivan
bdd0a88783 Update Ukrainian translation 2020-05-11 07:04:24 +00:00
Øyvind Kolås
d0074985cc app: in UI strings s/Precision/Encoding/
(cherry picked from commit 7025039b93)
2020-05-11 03:55:45 +02:00
Daniel Șerbănescu
4d2b82f0d3 Update Romanian translation 2020-05-10 07:58:49 +00:00
Daniel Șerbănescu
fd52dfd55e Add Romanian translation 2020-05-10 07:48:09 +00:00
Daniel Șerbănescu
c6103998d4 Update Romanian translation 2020-05-09 18:57:28 +00:00
Ell
acd6c2b5f5 app: remove ANTI_ERASE from filter mode set
It used to be included in "Edit -> Fade", but it's too low-level.

(cherry picked from commit 59f3b07c5f)
2020-05-08 14:42:25 +03:00
Георгий Тимофеевский
a92270fe73 Fixed translation
(cherry picked from commit 58c41d9fdc)
2020-05-06 21:18:41 +03:00
Jehan
ef217108a6 app: clear the clipboard after storing its contents, upon quitting.
If we don't do this, the clipboard owner doesn't get unreffed (also the
GtkClipboardClearFunc is not called either, but we don't set any so this
was not a big problem).

The main consequence was that copying was setting the Gimp object as an
owner, which kept a reference and prevent its finalize() method to run,
hence was leaking data (and in particular some GEGL buffers for
clipboard operations, which was how the issue became more visible upon
exit).

(cherry picked from commit fca6371e29)
2020-05-06 19:25:25 +02:00
Jehan
694ce3fd54 devel-docs: update debugging-tips with GEGL's meson option names.
(cherry picked from commit 29b1d91b76)
2020-05-06 19:25:18 +02:00
Jehan
c35572f0c1 gitlab-ci: babl requires now vapigen for Vala binding.
(cherry picked from commit 2baf8a3be1)
2020-05-06 19:25:02 +02:00
T Collins
06049c3ac5 Update ddswrite.c
(cherry picked from commit f00df8f773)
2020-05-06 18:35:53 +02:00
Ell
25112a5355 Issue #4992 - Modifiers change Free Select tool mode while active
Properly initialize GimpSelectionTool::saved_operation upon
modifer-key press, even when some modifiers are masked out by
GimpPolygonSelectTool while the tool is active.  This avoids
erroneously "restoring" the operation to a previously-saved state
once the modifier keys are released.

(cherry picked from commit e0a5aaeb22)
2020-05-05 18:17:45 +03:00
Michael Natterer
cdc38639f5 Issue #3405 - Color component decompose crash for CMY
Remove the "CMY" model from compose and decompose, it's gone from
babl. Also fix decomposing to CMYK by using the right component names.

(cherry picked from commit f3f8d3a54e)
2020-05-02 21:18:52 +02:00
Michael Natterer
25873aa4df Issue #3949 - Image Map plug-in selects wrong areas
Fix one of the issues spotted by Massimo: in right_intersect() it must
be "dy > 0" not "dy > y".

(cherry picked from commit 9adf2d19f8)
2020-05-02 20:17:54 +02:00
Michael Natterer
56a361f55a Issue #5009 - Possible array overrun in d_draw_ellipse
Change while() to go from 0..360 instead of 0..361 so the code passes
automated tests. The code never ran into this situation but the change
is a small improvement anyway.

(cherry picked from commit 452924dbe9)
2020-05-02 16:55:52 +02:00
Michael Natterer
c5da8d1c95 Issue #5010 - Setting twice value pcvals.paper_invert in paper_store
Remove identical duplicated line.

(cherry picked from commit 97e0322ebb)
2020-05-01 22:51:13 +02:00
Øyvind Kolås
a0f03c0e37 app: do not snap white/black when making 2 color palette
For such needs there is a dedicated 1bit black/white palette in the
dialog.

(cherry picked from commit 80664c8e6e)
2020-05-01 17:37:05 +02:00
Øyvind Kolås
51955b2115 app: when creating palette only snap to black/white when present
By only doing the snapping to white/black for whitest/blackest palette
entries when the original RGB data contained these colors we permit
choosing near white/black colors in the cases where this might be
a desirable result as the whitest/blackest colors.

(cherry picked from commit d4387987b5)
2020-05-01 02:21:44 +02:00
Øyvind Kolås
a3f4bbbac9 app: make generated indexed palettes possibly contain pure black/white
The median-cut algorithm to derive a suitable palette for the image
computes each index to be used as the average of colors in a 3d box
in a color space, making the result value drift away from the extremes.
This makes it nigh impossible to achieve pure white or black, even
when the original image contained these colors, like in scans of
printed documents and technical drawings.

We counteract the drift by snapping the whitest color to white and the
blackest color to black if the resulting colors of median-cut are
already sufficiently close to white or black.

(cherry picked from commit 9bb3ff42d7)
2020-04-30 21:23:29 +02:00
Alexandre Prokoudine
14098bb081 Update NEWS 2020-04-29 22:53:19 +00:00
Michael Natterer
46e4f40fd6 Issue #4721 - Ordering of default MyPaint Brushes directories...
...is inconsistent

List the folder in the user's home first, like with other data types.

(cherry picked from commit 1e8923e184)
2020-04-29 14:32:44 +02:00
Michael Natterer
8ee5095248 Issue #4696 - Keyboard shortcuts for layer opacity are not working
layers_opacity_cmd_callback(): get the select_type from
the GVariant instead of using the GVariant as an enum
directly (missed when porting, spotted by Massimo).

Fix the same bug in channels_select_cmd_callback()
and layers_mode_cmd_callback().

(cherry picked from commit 50257e9f7e)
2020-04-29 13:33:34 +02:00
Ell
459a816786 Issue #4996 - Wrong propagate_mode parameter handling in plug-in-vpropagate
Fix plug-in-vpropagate compat procedure when propagate_mode == 3.

(cherry picked from commit 362b828a03)
2020-04-28 15:09:51 +03:00
Rodrigo Lledó
cfe528f376 Update Spanish translation 2020-04-28 08:34:58 +00:00
Michael Natterer
92e07ed6a2 app: don't leak event_blurb in gimp_controller_editor_edit_clicked()
(cherry picked from commit be8be1cb27)
2020-04-28 00:03:07 +02:00
Ell
916d8bb66d app: in Unified Transform tool, avoid moving pivot when locked
In GimpUnifiedTransfomTool, avoid moving the pivot when
readjusting, and when the transform directions are linked, if the
pivot is locked.

(cherry picked from commit d7c995153d)
2020-04-27 16:56:05 +03:00
Ell
7746da33de app: add GimpTransformGridTool::apply_info() vfunc
... which copies a TransInfo array to the current info array,
possibly with modifications.  While the default implementation
simply copies the array as-is, the following commit will override
the function for the Unified Transform tool, to avoid copying the
pivot position when the pivot is locked.

Use the function in GimpTransformGridTool, instead of copying the
array directly, as necessary.

(cherry picked from commit aa1a1f0a0c)
2020-04-27 16:56:05 +03:00
Ell
a4296bb6bb app: unlink transform directions on tool halt; make chain button insensitive
In GimpTransformGridTool, keep the transform-direction chain-button
insensitive while the tool is not active, and always unlink the
button when halting the tool.  This avoids the directions from
accidentally being kept linked, resulting in the tool seemingly
having no effect.

(cherry picked from commit 9f6af7dbd3)
2020-04-27 16:56:04 +03:00
Ell
9ee2b6685e plug-ins: in file-psd, use normal channel order
For some reason we reverse the channel order when loading/saving a
PSD file.  This doesn't seem to be necessary, and leads to a
reversed channel order across GIMP/Photoshop.  Simply use the
normal channel order instead.
2020-04-26 23:38:41 +03:00
Ell
3424a0844c Issue #189 - Store channel colors when saving as PSD
In file-psd, write a DisplayInfo image resource with the color/
opacity of all channels.
2020-04-26 23:38:41 +03:00
Ell
5bef0b9588 plug-ins: in file-psd, fix indentation in psd-save.c 2020-04-26 23:38:41 +03:00
Ell
0ef52b7d9e plug-ins: in file-psd, remove unused member of DisplayInfoNew 2020-04-26 23:38:41 +03:00
Ell
ccc9bd1849 plug-ins: in file-psd, fix u8 channel format
In file-psd, use a non-linear channel format when the image
precision is u8 non-linear, as per gimp_image_get_channel_format().
2020-04-26 23:38:41 +03:00
Jehan
39ca21218e app: fixes string format argument types on Windows 32-bit.
On 64-bit, all seems fine, but when building to 32-bit (at least Windows
32-bit), G_GUINT64_FORMAT is defined to "%llu" while time_t is a long
int. So it doesn't match and the compiler complains:

> warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'time_t' {aka 'long int'}

Let's cast to (guint64) to make sure the type always match.

(cherry picked from commit 7e7d48a7ac)
2020-04-21 14:15:53 +02:00
Jehan
fc9a6600c9 app: gimp_sigfatal_handler() must not be declared on Win32 without…
… DrMingw.
Fixes:
> warning: 'gimp_sigfatal_handler' declared 'static' but never defined

(cherry picked from commit 430f40d00b)
2020-04-21 14:15:53 +02:00
Jehan
a4a6e8cebf build: removing OpenBlas patches.
Our installer use Msys2 packages when possible. And Msys2 repository
provides version 0.3.9, released on March 2, which contains our patches.
No need for them here anymore, no need to make custom builds.

(cherry picked from commit 0aca033370)
2020-04-20 23:57:09 +02:00
Ell
038de4d3ef libgimpwidgets: fix logarithmic transform in gimp_scale_entry
Use the right GtkAdjustment in gimp_scale_entry_log_to_linear().
See merge request !49.

Thanks to MihailZenkov for spotting this!

(cherry picked from commit 5dc1572b01)
2020-04-20 18:45:17 +03:00
Seong-ho Cho
1709bbde73 Update Korean translation 2020-04-20 13:38:50 +09:00
Jehan
2335d5590d app: fix cast bug.
When building (at least on 32-bit), fixes this warning:
> app/widgets/gimpdashboard.c:3840:58: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Unsigned long long is specified in the C99 standard to be at least
64-bit. So it's normal that the compiler complains, as a cast from
unsigned long long to a pointer has chances to go very wrong.
Yet gimp_backtrace_get_frame_address() actually returns a guintptr which
is type-compatible with gpointer so let's not give the compiler false
information and just use this type. Then cast it to unsigned long long
just for printing to dashboard log.

(cherry picked from commit 8caef4ea0b)
2020-04-20 01:37:35 +02:00
Ell
a6c095b02d app: make sure to update the display-shell title/statusbar when closing image
... instead of relying on UI events to cause this indirectly.

(cherry picked from commit 37065ccf6f)
2020-04-19 18:02:45 +03:00
Ell
2cbb08595c Issue #4968 - Newly opened image not visible in image window ...
... when rulers and scrollbars are hidden

In gimp_display_shell_fill(), make sure a size-allocate always
happens for the canvas, even when the rulers and scrollbars are
hidden, so that the pending size_allocate_center_image is handled,
and doesn't block canvas drawing.

(cherry picked from commit 4e560f2ff0)
2020-04-19 18:02:45 +03:00
Jehan
59115b4cad NEWS: update. 2020-04-19 13:04:38 +02:00
Jehan
f1d102bece plug-ins: remove last usage of GTimeVal and g_get_current_time().
Deprecated as not year-2038-safe, this was the last remnant of code
which was still using it.

(cherry picked from commit 05556457df)
2020-04-19 12:58:13 +02:00
Jehan
2229b735bb plug-ins: fix more abs().
I am comparing absolute value of 2 double computation results. Might as
well just use fabs() instead of truncating both values to int.
Fixes the following:
> warning: using integer absolute value function ‘abs’ when argument is
> of floating point type ‘double’ [-Wabsolute-value]

(cherry picked from commit f6dd30f3a8)
2020-04-19 12:58:07 +02:00
Jehan
164fa3494f plug-ins: fix abs() on long int.
Fixes the following bug:

> warning: absolute value function ‘abs’ given an argument of type
> ‘glong’ {aka ‘long int’} but has parameter of type ‘int’ which may
> cause truncation of value [-Wabsolute-value]

(cherry picked from commit fddaa77218)
2020-04-19 12:57:59 +02:00
Jehan
aaa55f9042 plug-ins: fix some build warning.
Fixes:
> warning: using integer absolute value function ‘abs’ when argument is of floating point type ‘double’ [-Wabsolute-value]

(cherry picked from commit b71754f2a7)
2020-04-19 12:57:51 +02:00
Jehan
75aac15343 plug-ins: fix various other warnings on the Windows build CI.
1 > warning: "_WIN32_WINNT" redefined
2 > pointer targets in passing argument 2 of 'send' differ in signedness
3 > passing argument 4 of 'setsockopt' from incompatible pointer type

For the signedness/type issues, I just casted to (void *) which was the
expected type for these parameter on the Linux API anyway. As for
Windows API (which was expecting char* for these various API), the
compiler just does the cast itself from void* without complaining
anymore.

(cherry picked from commit c280cb9da7)
2020-04-19 12:55:31 +02:00
Jehan
b78fcb5dc9 plug-ins: fix signedness warning with different expectation Win/Linux.
On Windows, accept() wants an int for addrlen but on Linux, it wants a
socklen_t which is an unsigned int. So we can't just switch to gint as
proposed in !232 (if we do so, the signedness warning now happens on the
Linux build instead of the Windows one).

Fortunately it looks like socklen_t is actually typedef-ed to int in
Windows headers. So let's just use this type, which is much more proper
anyway as this variable is only used in functions which want this type
on Linux.

Fixes:

> warning: pointer targets in passing argument 3 of 'accept' differ in signedness

(cherry picked from commit e854de73ee)
2020-04-19 12:55:10 +02:00
Ell
21ce9d6b8f Issue #4967 - Crash when cancelling filters with aux inputs
In gimp_filter_tool_real_config_notify(), make sure the incoming
pspec in not NULL before accessing it.
gimp_operation_tool_aux_input_notify() may emit "notify" on the
config object with a NULL pspec.

(cherry picked from commit 19c0d43c25)
2020-04-18 17:53:20 +03:00
Anders Jonsson
556397cba1 Update Swedish translation 2020-04-15 01:06:18 +00:00
Ell
1878313511 app: maintain common settings when editing Brightness-Contrast/Levels as Levels/Curves
When converting Brightness-Contrast to Levels, and Levels to
Curves, make sure to copy the common settings as well as the
operation-specific settings.

(cherry picked from commit 987447f18f)
2020-04-14 18:03:47 +03:00
Ell
c2ee2553ce app: reset common settings when resetting Curves tool
In GimpCurveTool, don't reset the curve config manually, and rather
let GimpFilterTool reset it, only maintaining the active channel
(similarly to GimpLevelsTool), so that the common operation
settings are also reset.

Note that this also avoids keeping the channel curve types, which
should work correctly after last commit.

(cherry picked from commit 88689515ab)
2020-04-14 18:03:31 +03:00
Ell
cd1f531cde app: when copying GimpCurve, don't overwrite points from samples
In gimp_curve_config_copy(), make sure to copy the curve type
*before* the points, so that, when changing the type from FREE to
SMOOTH, we don't overwrite the copied points with interpolated
samples.

(cherry picked from commit 56693a8393)
2020-04-14 18:03:12 +03:00
Jehan
d7200ae55e NEWS: update. 2020-04-13 16:49:55 +02:00
Jehan
d059b7c9a3 app: cleanup previous commit from !31.
Instead of waiting forever for minor trailing whitespace cleanup, I
merged the patches and do a separate commit.
2020-04-13 16:49:34 +02:00
Sergio Jiménez Herena
cc6e21e05b app: add color index label to the palette editor. 2020-04-13 14:26:13 +00:00
lillolollo
2dd2ba1bfb plug-ins: file-psp.c fix incompatible pointer type 2020-04-13 12:55:52 +00:00
Jehan
97549081fd gitlab-ci: libspiro is needed to run gegl.
`gegl` binary is being run for icon generations on gimp-2-10.
2020-04-13 14:22:45 +02:00
Jehan
8e5e268bf6 .gitlab-ci: sync the gimp-2-10 CI with master.
It's minimal. I've not added CLang build or the Windows cross-builds
yet. Probably later. :-)

Only dependency changes from master are: GTK+2 instead of GTK+3.

Also GIMP is now built with --disable-python because even though Python
2 is still in Debian testing, apparently python-gtk2 is not packaged
anymore. So let's unfortunately drop this in our CI for simplicity sake.

This makes both master and gimp-2-10 CI now very similar, hence will
make it easier to fix one or the other.
2020-04-13 13:54:43 +02:00
Félix Piédallu
a66f88287c app: add missing includes for windows
(cherry picked from commit 46f706a403)
2020-04-13 11:57:38 +02:00
Yuri Chornoivan
b26dfb6fb6 Update Ukrainian translation 2020-04-13 06:54:42 +00:00
Ell
78983e4b59 app: apply "linear" setting when repeating curves and levels
In gimp_operation_config_sync_node(), when the operation has a
property of the config object's type, don't skip the other
properties.  This makes sure to set the "linear" property of
GimpOperation{Curves,Levels} according to the config object.  We'd
previously done it manually in GimpFilterTool, but the setting was
not applied when repeating the filter.

(cherry picked from commit 0096e563f6)
2020-04-13 02:07:16 +03:00
Michael Schumacher
f5e4b1770e .gitlab-ci.yml: remove pygtk from GIMP dependencies list
pygtk is being removed from distros, and this breaks our gimp-2-10 CI
build.

Removing it from the dependencies should make the build work
again, but means we lose building of the pygimp modules.
2020-04-13 00:04:47 +02:00
lillolollo
05e8e98a2e plug-ins: screenshot-win32.c forbids mixed declarations and code 2020-04-12 20:36:14 +00:00
Piotr Drąg
192efa80e8 Update Polish translation 2020-04-12 10:32:36 +02:00
Ell
1b3c945488 app: don't grab keyboard focus when showing tool-button menu on hover
In GimpToolButton, don't let the group menu grab the keyboard focus
when showing it on hover.  This avoids accidentally reassigning the
keyboard shortcut of the selected tool.
2020-04-11 12:38:21 +03:00
Sabri Ünal
91e49e0111 Update Turkish translation 2020-04-10 17:50:34 +00:00
Jordi Mas
573efb3fbc Update Catalan translation 2020-04-10 16:02:47 +02:00
Jordi Mas
a7191ba7ca Fixes to Catalan translation 2020-04-10 14:31:11 +02:00
Alexandre Prokoudine
3c3f239852 Update Russian translation 2020-04-10 03:07:26 +03:00
Jehan
3a3a5ff1ec NEWS: update. 2020-04-09 16:02:20 +02:00
Ell
7e673f4e52 plug-ins: add support for exporting 16-bit PSDs
In file-psd, add support for exporting high bit-depth images.  This
is currently limited to 16-bit images, since 32-bit images seem to
have a different structure (our loading code can successfully load
32-bit images exported by the plug-in, but not actual 32-bit PSD
files saved in Photoshop.)  Higher bit-depth images are saved as
16-bit for now.

Note also that when saving a linear image with a built-in linear
profile the result is wrong (the image is exported with a linear-
TRC profile, but the data is perceptual), but this is a general
problem we have to fix, not restricted to the PSD plug-in.

(cherry picked from commit 9099f317bc)
2020-04-09 01:19:10 +03:00
Jordi Mas
5fa235c192 Update Catalan translation 2020-04-08 22:48:01 +02:00
Jehan
bb030f4584 NEWS: update. 2020-04-08 20:17:01 +02:00
Jehan
f31f9b5e21 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.

(cherry picked from commit 809e79f37a)
2020-04-08 20:13:55 +02:00
Rodrigo Lledó
f02ca95b47 Update Spanish translation 2020-04-08 13:58:26 +00:00
Ell
ba7d2f4f87 app: rename "Fade" section of GimpFilterTool to "Blending Options"
... and GIMP_LAYER_MODE_CONTEXT_FADE to
GIMP_LAYER_MODE_CONTEXT_FILTER.

(cherry picked from commit 38059dc5fd)
2020-04-08 16:00:10 +03:00
Ell
8d08f4a672 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:42:48 +03:00
Ell
a643fc2ad1 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:42:48 +03:00
Ell
1a41acecf2 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:42:48 +03:00
Ell
bdbce2d235 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:42:48 +03:00
Ell
9e5fabf8a0 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:42:48 +03:00
Ell
6c0326a4fa 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:42:48 +03:00
Ell
2bd0b77ad0 app: use gimp_drawable_supports_alpha() in GimpDrawableFilter
... instead of GIMP_IS_LAYER()
2020-04-07 19:42:48 +03:00
Ell
80fd7386e2 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:42:48 +03:00
Ell
9906efd28a app: add gimp_drawable_filter_get_{drawable,operation,format}()
... which return the filter's drawable, operation, and output
format, respectively.
2020-04-07 19:42:48 +03:00
Chao-Hsiung Liao
58e5b57492 Update Chinese (Taiwan) translation 2020-04-07 00:49:19 +00:00
Chao-Hsiung Liao
a813c0db3a Update Chinese (Taiwan) translation 2020-04-07 00:45:48 +00:00
Chao-Hsiung Liao
6d442eb76e Update Chinese (Taiwan) translation 2020-04-07 00:40:54 +00:00
Anders Jonsson
63ca72c84f Update Swedish translation 2020-04-06 18:36:51 +00:00
Jordi Mas
4af498496a Fixes to Catalan translation 2020-04-05 21:04:47 +02:00
Piotr Drąg
d332b1bd8d Update Polish translation 2020-04-05 12:20:13 +02:00
Yuri Chornoivan
ebd89523bb Update Ukrainian translation 2020-04-05 06:52:42 +00:00
Jehan
c82bf2978a 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.

(cherry picked from commit 023919d606)
2020-04-04 16:41:38 +02:00
Marco Ciampa
d942908a3b Updated Italian translation 2020-04-04 01:53:13 +02:00
Jehan
2484871cbc 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).

(cherry picked from commit 291af71e95)
2020-04-04 01:13:12 +02:00
Jehan
19618a5b82 NEWS: update. 2020-04-03 20:52:42 +02:00
Jehan
7665228bdb 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.

(cherry picked from commit 105c4efc8b for
the TIFF one and adapted to gimp-2-10 code for PNG)
2020-04-03 20:17:37 +02:00
Jehan
168426a7b0 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.

(cherry picked from commit cc16ec5f9f)
2020-04-03 19:33:03 +02:00
Ell
64603c2ce6 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.

(cherry picked from commit 6bae5d8cf7)
2020-04-03 20:05:49 +03:00
Marco Ciampa
ace03e5bc0 Updated Italian translation 2020-04-03 18:01:50 +02:00
Marco Ciampa
927cea860a Updated Italian translation 2020-04-03 15:14:27 +02:00
Ell
b5e88ab95a app: regenerate config-enums.c 2020-04-02 22:32:09 +03:00
Ell
17e14487b8 app: add missing change to gimpdrawablefilter.c 2020-04-02 22:23:00 +03:00
Jehan
c3f93e5fef app: run gtk_widget_show() on the new checkbox.
It was unneeded on master, surely because there must be a
gtk_widget_show_all() run somewhere down the line.

Also reuse the button widget (not so important, but while I'm at it).
2020-04-02 18:25:34 +02:00
Ell
d35f8c67e7 app: add missing changes to last commits
(cherry picked from commit 491dc85242)
2020-04-02 19:18:22 +03:00
Ell
122d4b6f05 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.

(cherry picked from commit 912b36a8f8)
2020-04-02 19:04:53 +03:00
Ell
1da36f32a1 app: add gimp_drawable_filter_set_preview()
... which allows enabling/disabling the filter's preview, without
destroying cached data.

(cherry picked from commit 7ec033d896)
2020-04-02 18:57:12 +03:00
Ell
98e1f6a846 app: rename gimp_drawable_filter_set_preview() to _set_preview_split()
... in preparation for next commit.

Update GimpFilterTool accordingly.

(cherry picked from commit 616530e235)
2020-04-02 18:57:11 +03:00
Ell
3d727809da 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().

(cherry picked from commit e324e2d4b3)
2020-04-02 18:56:15 +03:00
Marco Ciampa
9f04d96d9b Updated Italian translation 2020-04-02 11:37:02 +02:00
Yuri Chornoivan
281b480d62 Update Ukrainian translation 2020-04-01 19:35:02 +00:00
Jehan
825b2a7c91 NEWS: update. 2020-04-01 21:25:28 +02:00
Jehan
16678f4db0 app: make new feature delete-pixels in Crop tool FALSE by default.
Better have the non-destructive behavior by default.

(cherry picked from commit 6a972786d9)
2020-04-01 21:17:59 +02:00
woob
d5fc3e8009 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

(cherry picked from commit 9a9e2e9a19)
2020-04-01 21:17:58 +02:00
woob
824a5a4580 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.

(cherry picked from commit ee97c25b87)
2020-04-01 21:17:57 +02:00
Yuri Chornoivan
3689332483 Update Ukrainian translation 2020-04-01 18:30:29 +00:00
Jehan
f2e46deb73 NEWS: update. 2020-04-01 18:24:52 +02:00
Jehan
b8c4e936eb 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).

(cherry picked from commit 39890a49eb)
2020-04-01 18:13:31 +02:00
Jehan
1b14b13e40 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.

(cherry picked from commit 56ffa2fd11)
2020-04-01 16:47:54 +02:00
Jehan
6cd49b8e6e Fix GTK+3 only code from commit 6d0886032d.
- gtk_show_uri_on_window() replaced by gtk_show_uri()
- gtk_button_new_from_icon_name replaced by
  gtk_image_new_from_icon_name() in a GtkButton.
- gtk_widget_set_margin_top() removed.
2020-04-01 15:39:25 +02:00
Jehan
3c50032a7b app: do not free non-allocated DBus manager.
While this issue was unseen so far on common desktop machines, the CI
build encountered it, hence failing 6 of the unit tests.
A connection to the bus could not be established hence the dbus_manager
was never allocated, and finally it would crash at exit if we tried to
unref it unconditionnally. Use g_clear_object() instead.

Also add some stderr output for easier debugging, for when one of the 2
possible error cases might happen (as documented by g_bus_own_name()).

(cherry picked from commit 2c1efdedf0)
2020-04-01 15:08:35 +02:00
Jehan
e0f3a9d834 app-tools, app: gimp-debug-tool crashing with NULL release_date.
The crash dialog was failing to be created when using the last version
of GIMP!

(cherry picked from commit d76c8e8cc3)
2020-04-01 15:08:35 +02:00
Jehan
e3d83fb8e5 app: fix minor indentation bugs.
(cherry picked from commit dd705e21c0)
2020-04-01 15:08:35 +02:00
Jehan
6d0886032d 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).

(cherry picked from commit a55e898c96)
2020-04-01 15:08:35 +02:00
Jehan
0badb9d468 app: display revision number in About dialog if > 0.
(cherry picked from commit 21e090aba5)
2020-04-01 15:08:35 +02:00
Jehan
108f782f5e app: let's display the release comment in update notification…
… when there is one such comment.

(cherry picked from commit 75a03b02f4)
2020-04-01 15:08:35 +02:00
Jehan
9d03027fb3 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).

(cherry picked from commit a05b085112)
2020-04-01 15:08:35 +02:00
Yuri Chornoivan
0521e58006 Update Ukrainian translation 2020-03-31 18:08:28 +00:00
lillolollo
4d847c9f06 App gimptooleditor fix tooltip text
(cherry picked from commit 450ebd5e2b)
2020-03-31 02:37:45 +00:00
Jehan
dd4cec577d 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.
2020-03-30 14:40:20 +02:00
Piotr Drąg
6154099e3c Update Polish translation 2020-03-29 13:00:22 +02:00
Jordi Mas
e6c6c6f51f Update Catalan translation 2020-03-29 07:19:04 +02:00
Yuri Chornoivan
a0fa771568 Update Ukrainian translation 2020-03-28 17:11:03 +00:00
Ell
7685c16a1e Issue #4846 - Symmetry origin is wrong when painting on offset drawable
In gimp_symmetry_{mirror,mandala}_update_strokes(), adjust the
symmetry origin according to the drawable offset, so that it
remains fixed relative to the image regardless of the drawable
position.

(cherry picked from commit 6ed9b2bb7a)
2020-03-26 20:29:44 +02:00
Ell
83fd8c6500 app: fix string in config-enums.h 2020-03-26 14:04:19 +02:00
Ell
04d17b7829 app: add option to show tool-button menu on hover
Add a "Menu mode" option to the toolbox preferences, which controls
the menu behavior for tool-group buttons, and can be one of "Show
on click" (current behavior), "Show on hover" (show the menu when
hovering over the button), and "Show on hover in single column"
(behaves like "Show on hover" when the toolbox has a single column,
and "Show on click" otherwise) -- the latter is the default.

Note that "Show on hover" requires the ability to remove the menu
grab, which doesn't seem to work in GTK3, so this change is
restricted to 2.10 for now.
2020-03-26 13:31:55 +02:00
Ell
327b3fb772 app: in GimpToolButton, select active tool in menu
In a GimpToolButton representing a tool group, select the group's
active-tool item when showing the menu.

(cherry picked from commit 75435c8e6b)
2020-03-26 13:30:05 +02:00
Jernej Simončič
3041a51f5b Installer: add Croatian and Marathi language 2020-03-24 21:36:32 +01:00
Jernej Simončič
a8fb741246 Installer: rearrange install order of files, should make installing slightly faster 2020-03-24 20:59:35 +01:00
Jernej Simončič
888efb220a Installer: file-mng builds on 32-bit Windows, stop special-casing it 2020-03-24 20:26:28 +01:00
Ell
ad85b13498 Issue #4858 - Duplicated image shows NULL in warning when closing it
In gimp_image_duplicate(), explicitly mark the new image as dirty,
so that its dirty time is set.  This avoids showing a NULL message
in place of the dirty time when closing the image.

(cherry picked from commit 83f935873a)
2020-03-23 22:31:07 +02:00
Ell
b6a777cb9d app, menus: add gegl:bloom to Filters -> Light and Shadow
(cherry picked from commit 74b0d2ad14)
2020-03-23 21:31:57 +02:00
Alexandre Prokoudine
8fcd187bf5 Update Russian translation 2020-03-23 17:27:52 +03:00
Ell
0e8b995ba0 app: apply spin-scale gamma to input, not output
In GimpSpinScale, apply the slider gamma to the input [min,max]
range, rather than the output [0,1] range, using an odd gamma
curve, in particular, so that we handle negative values correctly.

(cherry picked from commit 5678153797)
2020-03-22 13:30:30 +02:00
Yuri Chornoivan
f6120257cd Update Ukrainian translation 2020-03-21 14:38:03 +00:00
Anders Jonsson
942a1e4e97 Update Swedish translation 2020-03-19 23:28:45 +00:00
Ell
3c845ec433 Issue #4827 - Modified settings requiring a restart aren't saved
When checking for updates, write the new timestamp and version info
to Gimp::edit_config, instead of Gimp::config, and rely on its
auto-save mechanism to save the changes, in order to avoid having
to save Gimp::config on exit, which overrides modified settings
that require a restart, such as the UI language, as they are only
reflected in Gimp::edit_config.

This fixes the bug, but can cause the new update info to be
discarded if the Preferences dialog is open while checking for
updates, and is subsequently canceled.  Ideally, the update info
should live in a separate file, rather than in gimprc.

(cherry picked from commit ee2a65af0d)
2020-03-19 12:40:06 +02:00
Yuri Chornoivan
0463cbfaff Update Ukrainian translation 2020-03-18 09:19:40 +00:00
Michael Schumacher
fcb161c3f8 Change order of CFLAGS for SSE tests
This makes the configure tests for SSE support fail if CFLAGS specify -mno-sse2 or/and -mno-sse4.1.
Fixes #4363.

(cherry picked from commit 0108d7e214)
2020-03-18 00:47:47 +01:00
Jehan
3616734faf Issue #4745: make check test-desktop failed.
Please translators, read the translation comments! ;-)

(cherry picked from commit 8fd2f1e0e3)
2020-03-17 19:42:36 +01:00
luz.paz
83da81f308 Fix typos
Found via `codespell -q 3 -S ./ChangeLog*,*.po -L als,ang,ba,chello,daa,doubleclick,foto,hist,iff,inport,klass,mut,nd,ower,paeth,params,pard,pevent,sinc,thru,tim,uint`

(cherry picked from commit a928452eba)
2020-03-17 13:36:59 +01:00
Ming Chen
d46812839c m4macros: update ax_gcc_func_attribute.m4 to serial 12
The serial 7 of m4macros/ax_gcc_func_attribute.m4 has an issue that when
Wstrict-prototypes is used with gcc, the attribute detection always
fails even if the attribute is actually supported. In such case the fish
cache will never be constructed. It's fixed in serial 12 of the macro in
autoconf-archive and this change updates the one distributed with GIMP
to serial 12.

(cherry picked from commit 7a4254dda1)
2020-03-17 13:36:52 +01:00
Rodrigo Lledó
34fc10f014 Update Spanish translation 2020-03-16 09:17:28 +00:00
Ell
1af8ad8905 app: in plug-ins, fix invalid parameter names instead of rejecting procedure
Instead of rejecting plug-in procedures with invalid parameter- or
return-value names (see issues #4392 and 4641), simply fix the
invalid name and allow the procedure to register.  Apparently,
there are plug-ins out there that use invalid parameter names (in
particular, liquid-rescale), so let's keep them working in 2.10.

Show appropriate warning/error for invalid parameter names when not
in PDB compat mode.
2020-03-15 17:16:44 +02:00
Piotr Drąg
e4d3d88ac6 Update Polish translation 2020-03-15 14:19:41 +01:00
Jehan
cb4f0de066 Issue #4618: support Canon CR3.
And by "supporting CR3", I mean sending the file over to raw developer
software which are supposed to support it! At the very least RawTherapee
support CR3 (since recent version 5.8 apparently), not sure about
darktable (but if not yet, I assume it won't be long either).

(cherry picked from commit 3a0af1f50a)
2020-03-14 23:59:31 +01:00
Ell
fbaf3c4290 app: render layer-group preview in chunks
In gimp_drawable_get_sub_preview_async(), when the drawable buffer
has a validate handler (i.e., when it's a group layer), use a chunk
iterator to validate the buffer in chunks, where each chunk is
validated in a separate invocation of the async function.  This
prevents validation from blocking the main thread for too long when
the buffer is not already fully validated.

(cherry picked from commit 64bf77aed8)
2020-03-14 16:06:13 +02:00
Ell
cd4c81133a app: speed up layer-group preview rendering
In gimp_drawable_get_sub_preview_async(), when the drawable buffer
has a validate handler (i.e., when the drawable is a group layer),
validate the requested area before calling gegl_buffer_get(), so
that the buffer is validated in a single step, instead of tile-by-
tile.

(cherry picked from commit 919ddce773)
2020-03-14 13:55:05 +02:00
Ell
422452b5da app: add "chunked" parameter to gimp_tile_handler_validate_validate()
... which allows validating the area in chunks, instead of in a
single step.

(cherry picked from commit faf6acfb67)
2020-03-14 13:55:04 +02:00
Ell
24db85bef6 app: allow waiting on idle asyncs
In gimp_idle_run_async(), connect to the async's "waiting" signal,
and run the async func in the context of the caller in response, to
avoid blocking indefinitely.

(cherry picked from commit 30f509c84d)
2020-03-14 13:55:04 +02:00
Alexandre Prokoudine
552c9565e4 NEWS: mention #4793 fix 2020-03-14 09:54:43 +00:00
Ell
2460322522 app: white-space fix in gimp-utils.c
(cherry picked from commit fe82ee54e8)
2020-03-14 01:01:14 +02:00
Ell
42bfadd5c8 app: avoid duplication in gimp_drawable_get_sub_preview_async()
(cherry picked from commit 10fe3009ed)
2020-03-14 00:57:21 +02:00
Ell
d4b79fdcf1 Issue #4793 - Layer-group preview-update blocks UI when adding/removing layers
In gimp_drawable_get_sub_preview_async(), use
gimp_idle_run_async_full() to render the preview in a low-priority
idle source when the drawable uses a validate handler (i.e., when
it's a group layer), to avoid rendering the preview before the
projection is done rendering, causing a noticeable freeze.

(cherry picked from commit fee159e6b4)
2020-03-14 00:47:31 +02:00
Ell
d0d43ce252 app: add gimp_idle_run_async[_full]()
In gimp-utils, add new gimp_idle_run_async() and
gimp_idle_run_async_full() functions, having the same signature as
gimp_parallel_run_async[_full](), but running the async function in
an idle source on the main thread, instead of in a separate thread.

The 'priority' parameter of gimp_idle_run_async_full() specifies
the idle-source priority.

(cherry picked from commit 6733b153cc)
2020-03-14 00:47:30 +02:00
Ell
a787d61fbc app: rename GimpParallelRunAsyncFunc to GimpRunAsyncFunc
... and move it to core-type.h, in preparation for next commit.

(cherry picked from commit f25a8934fa)
2020-03-14 00:45:41 +02:00
Alexandre Prokoudine
f8fb958fde NEWS: some forgotten bits for 2.10.20 2020-03-10 19:01:54 +00:00
Alexandre Prokoudine
2ab72aac3f NEWS: start tracking 2.10.18 -> 2.10.20 changes 2020-03-10 18:59:09 +00:00
Sabri Ünal
a1af934d9d Issue #4094 - Corrects some tools descriptions
This patch corrects some inconsitent Tool Options Tab Title using tools tooltips.
Scissors > Scissors Select
Heal > Healing
Align > Aligment
2020-03-09 21:57:26 +00:00
Ell
5528c660af configure.ac: fix last commit
Removed a little bit too much.

(cherry picked from commit 51e4549d5c)
2020-03-08 13:10:41 +02:00
Ell
bf8f004b15 configure.ac: require glib >= 2.56.2
Recent code changes depend on 2.56 symbols, and no one seemed to
complain for 2.10.18, so let's just bump the requirement.

Furthermore, 2.56.0 and 2.56.1 have a Windows-specific bug we were
testing for, so let's just bump straight to 2.56.2.
2020-03-08 12:30:29 +02:00
Michael Natterer
3f2e17ca6e Issue #4328 - Distorted path of an open/imported circle...
...from an svg file

gimp_bezier_stroke_new_ellipse(): need to interpolate the path's head
and tail, not its tail and tail. Spotted by Massimo.

(cherry picked from commit 27e78849a2)
2020-03-07 14:50:30 +01:00
Ell
f70d24784c tools: in performance-log-viewer.py, handle markers with > INT_MAX timestamps
(cherry picked from commit 84ff130e18)
2020-03-06 12:37:11 +02:00
Rodrigo Lledó
4bd51786f2 Update Spanish translation 2020-03-06 07:35:25 +00:00
Ell
b886dd1f46 Issue #4641 - Invalid PDB parameter names for data-selection functions
In the various libgimp data-selection functions, replace spaces
with hyphens in the callback-proc parameter names.  Spaces in
parameter names are invalid, which is now enforced by GIMP/GLib,
causing procedure registration to fail.
2020-03-05 20:21:42 +02:00
Ell
84fdd1b601 Issue #4734 - GIMP crashed while using Unified Transformation Tool
When committing a transformation to a floating-selection layer, if
the selection mask is non-empty (probably a state we don't want to
allow, but one that can currently be achieved), and the tool-GUI
dialog is detached, gimp_transform_grid_tool_response() is called
*while* applying the transformation, leading, ultimately, to a
segfault.

Fix this by returning early when this happens.

(cherry picked from commit 11efe64736)
2020-03-05 19:02:17 +02:00
Nikc
cbb8e9debc Replace fileicon.ico with version contain 24x24, 64x64, 128x128, and 256x256 sizes for Windows icon, per issue #872 2020-03-05 14:22:56 +00:00
Nikc
23f7de4428 Replace wilber.ico with version containing 128x128 size of Windows icon, per issue #872 2020-03-05 14:22:56 +00:00
Nikc
e6633d7568 Replace fileicon.ico with version contain 24x24, 64x64, 128x128, and 256x256 sizes for Windows icon, per issue #872 2020-03-05 14:22:56 +00:00
Daniel Korostil
7966dce4d4 Update Ukrainian translation 2020-03-03 06:40:56 +00:00
Daniel Korostil
34964a0057 Update Ukrainian translation 2020-03-03 06:39:39 +00:00
Rodrigo Lledó
0d9b227d87 Update Spanish translation 2020-03-02 10:38:04 +00:00
Piotr Drąg
cf1afbc248 Update Polish translation 2020-03-01 14:51:36 +01:00
Ell
225fc14872 Issue #4663 - "Error loading PSD file: No error" while trying to open a PSD
In file-psd, avoid error on load when encountering an uknown image
resource of size 0.

(cherry picked from commit 0ce993c4b9)
2020-02-28 00:48:09 +02:00
Ell
44d0c63129 plug-ins: in file-psd, make offset/size fields unsigned
In file-psd, make the data_start and data_len fields of the
PSDimageres and PSDlayerres structs unsigned, to avoid potential
overflow/sign-extension.

(cherry picked from commit be7cace74e)
2020-02-28 00:48:09 +02:00
Rodrigo Lledó
0ff65ff76a Update Spanish translation 2020-02-27 13:50:18 +00:00
Tim Sabsch
e0e41796cc Update German translation 2020-02-24 20:30:03 +00:00
Nathan Follens
4ac41df830 Update Dutch translation 2020-02-24 16:15:55 +00:00
Anders Jonsson
5dfa459364 Update Swedish translation 2020-02-24 13:20:23 +00:00
Ell
9084b2449b app: add Finnish translation to the Windows installer
(cherry picked from commit ac289461ae)
2020-02-24 11:09:41 +02:00
Jiri Grönroos
3f9cd9b435 Update Finnish translation 2020-02-23 18:21:08 +00:00
Jiri Grönroos
2e1ae761ac Add Finnish translation 2020-02-23 18:00:00 +00:00
Ell
2d671cf5f7 Revert "configure.ac, app: temporarily revert GEGL dependency to 0.4.22 for release"
This reverts commit 6bed57abe2.
2020-02-23 19:28:02 +02:00
Michael Natterer
d1438a3fa0 configure.ac: post-release version bump to 2.10.19 2020-02-23 18:23:27 +01:00
Jiri Grönroos
26a8592f96 Update Finnish translation 2020-02-23 16:57:30 +00:00
Michael Natterer
de7f04567d NEWS: slight reformatting 2020-02-23 17:53:54 +01:00
Alexandre Prokoudine
69b63c2f14 2.10.18: update appdata to match recent changes 2020-02-23 16:27:34 +00:00
Alexandre Prokoudine
197bd743c8 2.10.18: update NEWS 2020-02-23 13:12:45 +03:00
Asier Sarasua Garmendia
25e3c899e0 Update Basque translation 2020-02-23 10:06:59 +00:00
Asier Sarasua Garmendia
ceaf9a8657 Update Basque translation 2020-02-23 09:33:55 +00:00
Ell
f8b07bd8b5 icons, tools: add Symbolic high-contrast variants
Add new Symbolic-High-Contrast and Symbolic-Inverted-High-Contrast
themes, which are automatically-generated high-contrast variants of
the (original) Symbolic theme.  The contrast factor is settable in
the makefile, and is currently at 1.5 for both themes.

Rename tools/invert-svg to tools/svg-contrast, which now takes a
contrast-factor argument, and adjusts the input SVG contrast,
instead of just inverting it.  Note that we can still use the tool
to invert icons, using a contrast of -1.
2020-02-22 22:51:18 +02:00
Ell
6bed57abe2 configure.ac, app: temporarily revert GEGL dependency to 0.4.22 for release
... and work around the missing gegl_buffer_share_storage() API in
gimp:replace.
2020-02-22 22:28:11 +02:00
Jehan
696bb3fa21 app: use GIMP_BUILD_PLATFORM_FAMILY instead of GIMP_BUILD_PLATFORM.
I didn't realize it because the meson build was returning 'windows' for
GIMP_BUILD_PLATFORM when I cross-built with Mingw-w64. But in the
autotools, it was storing "mingw32", which would not compare with our
gimp_versions.json. Therefore in GIMP 2.10.16, the version update check
would have worked, but not the revision check.
This fixes the problem.

(cherry picked from commit a5ea6d6b9b)
2020-02-22 19:58:55 +01:00
Ell
6e6366e53c plug-ins: in file-psd, use scratch allocator for temporary CMYK buffers; cleanup
(cherry picked from commit 1b6191d176)
2020-02-22 18:21:43 +02:00
Ell
49b12b58af app: in the Preferences dialog, allow horizontal scrollbars in all tree-views
Allow horizontal scrollbars in all the Preferences dialog tree-
views, so that they don't limit the minimal width of the dialog (in
particular, the UI- and icon-theme tree-views may contain
arbitrarily-long paths).

(cherry picked from commit d868247fd9)
2020-02-22 17:40:41 +02:00
Piotr Drąg
7b7ff8e152 Update Polish translation 2020-02-22 16:22:54 +01:00
Ell
38a9e80821 app: draw border around FG/BG-editor color areas
In GimpFgBgEditor, we currently use gtk_render_frame() in master,
and gtk_paint_shadow() in gimp-2-10, to draw a border around the
color FG/BG color areas.  However, the former is relatively
subtle, especially with dark themes, and the latter is a NOP with
the pixmap engine, which is what our built-in themes use.

Instead, draw the border ourselves as a pair of black and white
rectangles, similarly to Photoshop.

Move the entire color-frame drawing functionality to a separate
function, to avoid code duplication between the FG and BG frames.

(cherry picked from commit fb1c086097)
2020-02-22 17:16:54 +02:00
Anders Jonsson
1432f5ca4f Update Swedish translation 2020-02-22 12:55:08 +00:00
Ell
878f222233 app: suspend layer-group size updates while loading XCF
In xcf_load_image(), suspend size updates for layer groups before
adding their sublayers, to avoid unnecessary intermediary size
updates.  Resume size updates in reverse order, so that nested
groups are updated before their ancestors, after all layers have
been loaded.

(cherry picked from commit 63df5602a2)
2020-02-22 12:45:19 +02:00
Ell
b495475ad9 Issue #4634 - Pass-through groups bounding-box is not properly updated ...
... causing artifacts

In GimpGroupLayer, override GimpLayer::get_bounding_box() to return
the group's own calculated bounding box for pass-through groups,
instead of using the group graph's bounding box, as calculated by
the default implementation of GimpDrawable::get_bounding_box().
We don't currently update the group's bounding box in response to
all the events that may affect the graph's bounding box, which can
lead to artifacts, neither should we use the graph's bounding box
anyway, since it includes the backdrop's bounding box, as the
group's layers are composited against the background.

Note that we still use the graph's bounding box for non-pass-
through groups, since it takes attached filters into account,
which are applicable for normal groups, but not pass-through
groups.

Additionally, don't restrict the group's bounding when it has a
mask, since this is now handled by GimpLayer.

(cherry picked from commit aa9ae1c65c)
2020-02-21 22:57:41 +02:00
Ell
3e9276eae7 app: fix layer group effective mode for different mask modes
In gimp_group_layer_get_effective_mode(), don't take the mask into
account if GimpLayer::apply-mask is FALSE.

(cherry picked from commit 8c81c6e153)
2020-02-21 22:57:41 +02:00
Ell
983698ecc1 app: fix layer bounding box for different mask modes
In gimp_layer_get_bounding_box(), return the mask bounding box when
show-mask is active, and otherwise delegate the actual layer
bounding box calculation to a new GimpLayer::get_bounding_box()
function, and intersect its result with the mask bounding box, if
necessary.  The default GimpLayer::get_bounding_box()
implementation simply chains up to
GimpDrawable::get_bounding_box(), but GimpGroupLayer will override
this function in the following commits.

(cherry picked from commit 7f53cf9c55)
2020-02-21 22:57:40 +02:00
Ell
603d0a6274 app: fix layer effective mode for different mask modes
In GimpLayer, update the effective mode, and excludes-backdrop,
when any of the mask-related properties change, and, when show-mask
is active, set the effective mode to NORMAL.

(cherry picked from commit b2a1a7cb01)
2020-02-21 22:57:00 +02:00
Ell
3c702fbc1c app: fix compositing of layers with masks, outside the mask bounds
In GimpOperationLayerMode, when the op has a mask connected, and
we're processing an area outside the mask bounds, set the op's
opacity to 0, so that the backdrop shows through.  The actual
process() function gets a NULL mask pointer in this case, and so
would composite the layer as if it had no mask, exposing areas that
should be masked out.

Add a GimpOperationLayerMode::parent_process() function, which
subclasses can override instead of GeglOperation::process(), and
make sure to update the GimpOperationLayerMode::opacity field
before calling this function (and, subsequently, before calling
GimpOperationLayerMode::process()).

Clean up the rest of the fields, and adjust the rest of the code.

(cherry picked from commit 646c804c04)
2020-02-21 22:57:00 +02:00
Alexandre Prokoudine
644f14da45 2.10.18: update appdata 2020-02-21 22:50:05 +03:00
Michael Natterer
1054fc4488 configure.ac: bump versions for the 2.10.18 release 2020-02-21 19:05:44 +01:00
Alexandre Prokoudine
17de63d732 Update NEWS for 2.10.18 2020-02-21 14:21:43 +00:00
Massimo Valentini
9faef1b7ad Add naive support for CMYK u8 PSD files 2020-02-21 12:29:45 +01:00
Ell
5d1c6039e0 app: in paint tools, fix cursor position in line mode when snapping to angle
In GimpPaintTool, when not snapping brush outline to stroke, make
sure to properly snap the cursor position to 15-degree angle
multiples in line mode, not only when painting the line, but also
during motion.

(cherry picked from commit 0f07f1baa5)
2020-02-21 13:03:34 +02:00
Ell
b0a6cd6412 app: fix incorrect drawable format after applying a filter that resizes the drawable
In gimp_drawable_merge_filter(), fix the format of newly allocated
buffers when applying a filter that changes the size of the
drawable, and the requested format is either unspecified, or
matches the existing drawable format.  The new buffer would
previously be created with a "RGBA float" format in this case,
regardless of the image precision, resulting in a potential
mismatch between the drawable format and the image precision.

This cna lead to inconsistent buffer data when saved as XCF, which
is later rejected on load.  See issue #4643.

(cherry picked from commit ae6f6ba42a)
2020-02-21 12:03:00 +02:00
Ell
42b865561d app: avoid use-after-free when loading an XCF with corrupted layers
When dropping a corrupted layer while loading an XCF, make sure to
clear the corresponding XcfInfo fields that point to it, so that
it's not erroneously used later, as we now continue loading the
image even after corrupted layers are encountered.

See, for example, issue #4643, for a corrputed XCF file affected by
this.

(cherry picked from commit d53e701daa)
2020-02-21 12:03:00 +02:00
Alexandre Prokoudine
7df04317ed icons: bump the symbolic theme contrast just a little due to popular complaint 2020-02-20 20:00:17 +03:00
Rodrigo Lledó
d91ccf85e8 Update Spanish translation 2020-02-20 11:10:43 +00:00
Ell
39ba4c409e app: in gimp:replace, add fast path when compositing a layer over itself
In gimp:replace, when compositing the same content over itself,
i.e., when the input and aux buffers share the same storage and
same tile alignment, pass the input buffer directly as output,
instead of doing actual processing.

In particular, this happens when processing a pass-through group
outside of its actual bounds.

(cherry picked from commit 2eaaa950a5)
2020-02-20 13:03:39 +02:00
Ell
0b80a0d068 Makefile.am: require GEGL >= 0.4.23
(cherry picked from commit 401745e62a)
2020-02-20 13:03:33 +02:00
Daniel Korostil
22585fdde9 Update Ukrainian translation 2020-02-19 13:04:40 +00:00
Jordi Mas
e572f7c010 Update Catalan translation 2020-02-19 07:09:14 +01:00
Jordi Mas
1f73ac9b96 Update Catalan translation 2020-02-19 07:06:41 +01:00
Alan Mortensen
cab0e49f1b Updated Danish translation 2020-02-18 23:42:33 +01:00
Alan Mortensen
8c75baee1e Updated Danish translation of gimp-script-fu 2020-02-18 23:42:09 +01:00
Alan Mortensen
c99a415923 Updated Danish translation of gimp-python 2020-02-18 23:41:36 +01:00
Øyvind Kolås
6149c81042 app,autotools: depend on GEGL-0.4.22 2020-02-18 22:03:41 +01:00
Michael Natterer
e018c743b6 configure.ac: post-release version bump to 2.10.17 2020-02-18 21:11:46 +01:00
Michael Natterer
fe60c0ffac configure.ac: bump versions for the 2.10.16 release 2020-02-18 20:43:52 +01:00
Michael Natterer
65b6f7cc6f app: s/getenv/g_getenv/ in gui_restore_after_callback() 2020-02-18 20:39:15 +01:00
Michael Natterer
2ffa09fab5 app: fix indentation in gui_restore_after_callback() 2020-02-18 20:38:18 +01:00
Michael Natterer
1ebd013e53 NEWS: some paragraph re-wrapping
(mostly to avoid having to re-wrap most paragraphs for the
release announcement mail)
2020-02-18 20:08:36 +01:00
Michael Natterer
6980bc68bb etc, docs: update the default gimprc and its manpage 2020-02-18 20:03:29 +01:00
Ell
10bbdb323a plug-ins: improve PSD loading speed
In file-psd, improve loading speed, mostly by eliminating excessive
copies.

(cherry picked from commit 52f5a9f654)
2020-02-18 19:19:19 +02:00
Alexandre Prokoudine
90ac44467d Update Russian translation 2020-02-18 02:48:49 +03:00
Balázs Úr
27aae8881d Update Hungarian translation 2020-02-17 21:57:09 +00:00
Piotr Drąg
c382c57648 Update Polish translation 2020-02-17 17:19:15 +01:00
Ell
9b1d530945 Issue #4627 - memory corruption when open crafted sgi
In the file-sgi plug-in, check for failure when allocating buffers
of user-controlled size.

(cherry picked from commit 15438c58d2)
2020-02-17 17:01:37 +02:00
Ell
0095573c4b plug-ins: in file-sgi, convert tabs to spaces
(cherry picked from commit 2ed889394d)
2020-02-17 17:01:37 +02:00
Ell
3c2bc14c57 plug-ins: in screenshot, keep image dirty; keep history clean
In the screenshot plug-in, don't clean the image, since it's not
backed by any persistent source, and disable undo while modifying
it, so that the initial edit history is clean.

(cherry picked from commit 4fe8217898)
2020-02-16 23:06:12 +02:00
Anders Jonsson
cc24b968f7 Update Swedish translation 2020-02-16 20:59:26 +00:00
Alexandre Prokoudine
f0c33881ea Update Russian translation 2020-02-16 20:22:13 +03:00
Alexandre Prokoudine
629470e0bb Fixes and improvements for 2.10.16 appdata 2020-02-16 20:21:54 +03:00
Ell
39ad0319b9 devel-docs: add missing functions to libgimpfoo-sections.txt 2020-02-16 02:31:55 +02:00
Ell
75441884d0 data: in Makefile.am, make sure to uninstall gimp-release
(cherry picked from commit cf574c44fb)
2020-02-16 01:31:29 +02:00
Ell
860415b0f8 libgimpmath: fix unsorted line in gimpmath.def
(cherry picked from commit 75838a59a8)
2020-02-16 00:34:25 +02:00
Julien Hardelin
52dcc84b70 Update French translation 2020-02-14 21:05:24 +00:00
Ell
379082cd1b app: fix brush outline position when snapping to stroke
In GimpPaintTool, fix the brush outline position while painting,
when "Snap brush outline to stroke" is enabled.

(cherry picked from commit ea729f6d02)
2020-02-14 21:53:54 +02:00
Alexandre Prokoudine
173ace906a Update NEWS for 2.10.16 2020-02-14 12:06:53 +03:00
Alexandre Prokoudine
d0b16b17fb Fix the 2.10.16 release date in appdata 2020-02-14 12:06:53 +03:00
Jehan
990250c517 configure, data: create/install the gimp-release file.
(cherry picked from commit f98e506712)
2020-02-14 01:00:48 +01:00
Jehan
ae2aa6c79b app: store the revision number in a data file.
I realized having the revision as a build number is the wrong idea as it
implies packagers will have to rebuild GIMP for just a revision. Yet
very often revision may just be data change or dependency fix/update
without rebuild needed (i.e. no ABI change).
Instead let's keep this package information as a file 'gimp-release'
(inspired by /etc/os-release and other /etc/*-release files of
distributions).

(cherry picked from commit 87e9ebcfad)
2020-02-14 01:00:47 +01:00
Jehan
bb72b2f155 app: do not update a finalized dialog.
When the about dialog is destroyed, the weak link will be nullified.
Don't do anything then in our handler.

(cherry picked from commit cc9a15de97)
2020-02-13 22:33:45 +01:00
Jehan
c5c67b9d61 app: only show a "Last checked" date when we did at least 1 check.
If for instance you've got no internet connection or other reasons that
a check might fail, the check-update-timestamp will be 0, which is
1970-01-01.
Thanks to Alexandre Prokoudine for noticing it!

(cherry picked from commit ed77830381)
2020-02-13 22:33:38 +01:00
Jehan
3395362305 app: always show the "Check for updates" button in the About dialog.
Even when we already notify of an update, we should leave the ability to
query the last gimp_versions.json manually.
It would allow also people who disabled automatic check at startup
(whether through preferences or because the build disabled the feature
altogether) to still make update checks, and to not be forever stuck
with the result of an outdated version check.

(cherry picked from commit 2900f2a868)
2020-02-13 22:33:33 +01:00
Tim Sabsch
b3583119bd Update German translation 2020-02-13 19:36:34 +00:00
Tim Sabsch
9e358ebdbd Update German translation 2020-02-13 19:04:00 +00:00
Piotr Drąg
90cf7d268c Update Polish translation 2020-02-13 19:54:54 +01:00
Tim Sabsch
49d164fead Update German translation 2020-02-13 18:52:29 +00:00
Tim Sabsch
5728115413 Update German translation 2020-02-13 18:46:10 +00:00
Balázs Úr
1b9fca2b24 Update Hungarian translation 2020-02-13 18:03:32 +00:00
Balázs Úr
8ac751995d Update Hungarian translation 2020-02-13 17:53:56 +00:00
Balázs Meskó
138d2829d4 Update Hungarian translation 2020-02-13 17:47:32 +00:00
Anders Jonsson
fc805a4197 Update Swedish translation 2020-02-13 16:56:26 +00:00
Ell
075b072a64 app: increase the maximal airbrush stamp FPS
In the Airbrush tool, increase the maximal stamp FPS from 15 to 60,
and change the corresponding maximal Rate value from 150 to 100.
This technically affects tool presets, but we'll live.

(cherry picked from commit 6cd3c8bc74)
2020-02-13 18:47:06 +02:00
Ell
6ada1faed3 app: fix gimp_brush_mipmap_get_memsize()
Don't include the main mask/pixmap buffer size -- it's already
counted in gimp_brush_get_memsize().

(cherry picked from commit 30e925065f)
2020-02-13 16:56:41 +02:00
Anders Jonsson
0367972eb1 Update Swedish translation 2020-02-13 13:22:02 +00:00
Daniel Korostil
4177120b78 Update Ukrainian translation 2020-02-13 11:22:18 +00:00
Rodrigo Lledó
07afc8fcfe Update Spanish translation 2020-02-13 10:26:32 +00:00
Rodrigo Lledó
18d34fb408 Update Spanish translation 2020-02-13 08:56:29 +00:00
Rodrigo Lledó
603ed31fd3 Update Spanish translation 2020-02-13 08:47:04 +00:00
Rodrigo Lledó
43bd6915d5 Update Spanish translation 2020-02-13 08:40:56 +00:00
Anders Jonsson
4320d714ee Update Swedish translation 2020-02-13 00:02:26 +00:00
Anders Jonsson
7ea884bfc2 Update Swedish translation 2020-02-12 23:45:06 +00:00
Anders Jonsson
78c85ef13d Update Swedish translation 2020-02-12 23:39:08 +00:00
Nikc M
808812b8f0 Issue #175 - Allow the erase every other row plugin to skip a different number of rows
Adds generalized erase Nth row function,
and sets original erase row function to
call generalized one with n = 2
to reduce code duplication

(cherry picked from commit 0a5af889f9)
2020-02-13 01:18:53 +02:00
Elad Shahar
a9e33ee1ab plug-ins: in spyrogimp, add option to save path
This is backported from the gimp 3 master branch. Replace the checkbox
of two saving options (keep layer, or redraw on last active layer),
with a combo box that has a third option for saving the pattern as a path.
2020-02-13 00:58:11 +02:00
Elad Shahar
81ea68660c Issue #4326 - Add visual tab to spyrogimp plugin 2020-02-13 00:58:11 +02:00
Ell
fbc91f1556 app: reorganize #includes in gimpbrush-{mipmap,transform}.cc
(cherry picked from commit f797f688ad)
2020-02-13 00:14:33 +02:00
Ell
4ce6aa5a29 app: use mipmaps when downscaling raster brushes
When downscaling raster brushes, we currently resample the original
brush with no fitlering (other than bilinear interpolation), which
results in very noticable aliasing when using heavily downscaled
big brushes.

This commit constructs a box-filtered mipmap hierarchy for the
original brush on-demand, and the closest mipmap is used as the
resampling source for downscaled brushes, significantly improving
the output quality.

(cherry picked from commit ee39f0ec13)
2020-02-13 00:06:23 +02:00
Ell
02bf491a10 app: add gimp_brush_transform_get_scale()
... which converts a (scale, aspect_ratio) pair to a (scale_x,
scale_y) pair.

Change gimp_brush_transform_matrix() to take (scale_x, scale_y)
parameters, instead of (scale, aspect_ratio), and change the rest
of the code accordingly.

(cherry picked from commit 2dddf59dbf)
2020-02-13 00:06:13 +02:00
Ell
df016d472b app: fix brush-transform resampling
In gimpbrush-transform.cc, resample the transformed brush at pixel
centers instead of edges, and fix the corresponding source
coordinates.

(cherry picked from commit e0e1ad5e2a)
2020-02-13 00:06:13 +02:00
Alexandre Prokoudine
9efb499c20 NEWS: more translations for 2.10.16 2020-02-12 23:37:11 +03:00
Anders Jonsson
cdfcf4e31e Update Swedish translation 2020-02-12 20:21:40 +00:00
Tim Sabsch
8bfb3bc368 Update German translation 2020-02-12 19:03:02 +00:00
Alan Mortensen
628bf9f324 Updated Danish translation 2020-02-12 19:09:55 +01:00
Balázs Meskó
a036c81cdf Update Hungarian translation 2020-02-12 17:47:49 +00:00
Balázs Meskó
72d7a91094 Update Hungarian translation 2020-02-12 17:30:03 +00:00
Alexandre Prokoudine
736d808a03 Update news for 2.10.16 2020-02-12 00:22:27 +03:00
Zander Brown
911a82ffe5 Update British English translation 2020-02-11 18:26:10 +00:00
Bruce Cowan
2190649ea0 Update British English translation 2020-02-11 18:19:31 +00:00
Bruce Cowan
6724eb0f83 Update British English translation 2020-02-11 18:13:42 +00:00
Alexandre Prokoudine
56f61d047e Update appdata for upcoming 2.10.16 release 2020-02-11 19:39:19 +03:00
Alexandre Prokoudine
58acace2a2 Update news for 2.10.16 2020-02-11 19:22:13 +03:00
Ell
c125313bb9 Issue #4605 - Invalid abr brush crashes GIMP
When loading ABR brushes, error out on negative scan-line lengths,
instead of trying to allocate a huge buffer.  This entire code
could use a whole lot more unsignedness, but this should cover the
crash.

(cherry picked from commit 52cb2edd9e)
2020-02-11 18:00:55 +02:00
Ell
10e66aa215 app: in abr_rle_decode(), avoid freeing NULL scratch buffers
... gegl_scratch_free() doesn't generally accept NULL pointers.

(cherry picked from commit 782e209a33)
2020-02-11 18:00:55 +02:00
Marco Ciampa
76771468ee Updated Italian translation 2020-02-11 10:52:36 +01:00
Marco Ciampa
6afdeafbf9 Updated Italian translation 2020-02-11 10:47:03 +01:00
Daniel Korostil
4905904af6 Update Ukrainian translation 2020-02-11 09:37:42 +00:00
Daniel Korostil
464fc108ea Update Ukrainian translation 2020-02-11 09:36:02 +00:00
Daniel Korostil
5d0691625b Update Ukrainian translation 2020-02-11 09:34:49 +00:00
Daniel Korostil
f89fb76b46 Update Ukrainian translation 2020-02-11 09:30:51 +00:00
Daniel Korostil
e3214ad0ae Update Ukrainian translation 2020-02-11 09:29:07 +00:00
Marco Ciampa
e675ce3a02 Updated Italian translation 2020-02-11 08:00:26 +01:00
Ell
7ac1b4ba37 app: improve ABR brush loading speed
Improve the efficiency of decoding RLE data when loading ABR
brushes, by reading entire scanlines into a buffer all-at-once,
instead of reading the stream byte-by-byte.

(cherry picked from commit 07f95291a5)
2020-02-11 02:26:07 +02:00
Tim Sabsch
b2ea16b6b3 Update German translation 2020-02-09 23:18:05 +00:00
Sveinn í Felli
372783134c Update Icelandic translation 2020-02-09 18:19:46 +00:00
Sveinn í Felli
055839d3f2 Update Icelandic translation 2020-02-09 17:31:16 +00:00
Sveinn í Felli
d9caa3e38e Update Icelandic translation 2020-02-09 17:19:41 +00:00
Jordi Mas
f35cc12004 Update Catalan translation 2020-02-09 15:19:35 +01:00
Tim Sabsch
851e74f959 Update German translation 2020-02-09 13:22:44 +00:00
Alexandre Prokoudine
ea879a767d Update Russian translation 2020-02-09 15:20:42 +03:00
Piotr Drąg
9cc0d1183d Update Polish translation 2020-02-09 13:09:47 +01:00
Piotr Drąg
0a3ec870cf Update POTFILES.in 2020-02-09 12:49:11 +01:00
Tim Sabsch
5c4b5b6cae Update German translation 2020-02-09 01:10:03 +00:00
Tim Sabsch
0baa877f15 Update German translation 2020-02-09 01:08:01 +00:00
Tim Sabsch
94a5549413 Update German translation 2020-02-09 01:04:22 +00:00
Ell
522bc531f4 app: improve brush outline position when not snapping to stroke
In GimpPaintTool, track the cursor position separately from the
current paint core position, so that the brush outline doesn't lag
behind the cursor while painting.

(cherry picked from commit d244a079ca)
2020-02-08 11:52:20 +02:00
Ell
e467e10386 Issue #4584 - Segfault when closing an image with a layer group ...
... containing a floating selection

When destroying a GimpGroupLayer, remove all the children signal
handlers before destroying the container, so that we don't attempt
to reallocate the group's projection in response to
"update-bounding-box" signals emitted during layer destruction,
which can happen for floating selections.

(cherry picked from commit 893990afce)
2020-02-07 23:37:27 +02:00
Ell
f9c522b18f app: add gimp_container_remove_handlers_by_{func,data}()
... which remove all handlers matching the given callback/callback-
data.

temp

(cherry picked from commit 0891f1275a)
2020-02-07 23:37:27 +02:00
Jehan
4e1f175bf6 app: don't show "Check for updates" button in Preferences when option...
... deactivated at build anyway.

(cherry picked from commit f9f4538358)
2020-02-07 00:14:10 +01:00
Jehan
bcb17c94a8 app: accept "revision" and "date" fields to be absent on a build...
... object in the gimp_versions.json file.

(cherry picked from commit 7b3f696d9d)
2020-02-07 00:14:10 +01:00
Jehan
c4e213a2bd app: now also process the build revision when checking for updates.
The idea is to be able to advertize a new revision of the same version
of GIMP. For instance, this would apply when we release a
`gimp-2-10-14-setup-3.exe` Windows installer (then we are at revision
3, provided we started at revision 0).

The revision number is obviously only relevant to a given platform and
version. Also the concept of build ID allows to differentiate various
builds for a same platform, in particular to not look at revisions of
third-party builds. The build ID can be any string. Maybe we could just
use reverse DNS build id (such as "org.gimp.GIMP_official") to identify
the official GIMP build. So in the end, we only compare revisions for an
identical (version, platform, build-id) tuple.

(cherry picked from commit 7b5fff7861)
2020-02-07 00:14:10 +01:00
Jehan
81fe0f6fa4 app, configure: new --disable-check-update option at configuration.
Allows to disable the automatic update check at startup. I believe some
packagers will want such options, in particular on Linux distribution
(where they control their own release schedule and won't want GIMP to
pop new version warning up because they have been slow to update their
package).
Note that it is still possible to query version checks manually in the
about dialog, but the automatic check/popup is gone with this option.

(cherry picked from commit 315665592c)
2020-02-07 00:14:10 +01:00
Jehan
0a2ddbca3d app: better error management.
- Clear the GError when relevant.
- Check result of json_path_compile() just in case.
- Print some error on stderr when parsing of gimp_versions.json fails
  (which should never happen on releases but would help during
  development).

(cherry picked from commit 8528759834)
2020-02-07 00:14:10 +01:00
Jehan
92a4b29636 app: update gimp-update to new gimp_versions.json format.
Instead of storing versions as objects, we now store them as arrays,
because json arrays are ordered, unlike objects (the website was using
non-standard Python extension to consider the version objects ordered
but this is not proper and even more, the lib we use for GIMP does not
have a similar extension.
This simplifies a bit the code as we don't need to order the versions by
comparing their string representations.

(cherry picked from commit 1f75d2e34a)
2020-02-07 00:14:10 +01:00
Jehan
45ddce9352 app: forgot to localize a string.
Thanks to Piotr Drąg for noticing.

(cherry picked from commit b2c41bc1f9)
2020-02-07 00:14:10 +01:00
Jehan
9aa0cd2a4f app: fix a segmentation fault crash.
gtk_widget_get_window() may return NULL. I had the case when opening
some menus in bottom of tool options (like the "Save|Restore Tool
Preset" menus). We must check this before doing anything with it.

(cherry picked from commit 0a28534a90)
2020-02-07 00:14:10 +01:00
Jehan
f18d9f969d app: properly pass the last release version and date to gimp-debug-tool.
Previously we were only passing this information on the debug dialog
when debugging warnings and criticals. Now it will also have the
information for crashes, hence recommending people to update their GIMP
instead of reporting bugs on old versions.

(cherry picked from commit 5b664ecbec)
2020-02-07 00:14:10 +01:00
Jehan
e9b87c8368 app: debug dialog will now advise to update when relevant.
Instead of making the focus on bug reporting, the debug dialog will now
make the focus on updating the application if it is found that one is
not using the last version.
Debug data (backtraces and co.) will still be available and copiable,
but under an expander, and bug report button won't be displayed (i.e.
data will still be available upon request but we don't push anymore
people to submit it directly if they are using old versions of GIMP).

Of course, if you are using the last version (or version check was not
possible), the dialog still stays the same.

(cherry picked from commit 2f379494a7)
2020-02-07 00:14:10 +01:00
Jehan
621e941bf2 app: parse the release date for the last release.
I was mistakenly using the date of the last check, not the release date.

(cherry picked from commit d5febf6e62)
2020-02-07 00:14:10 +01:00
Jehan
1e76a008c5 app: also localize LC_TIME to GUI language.
When we set the GUI language through Preferences, also set LC_TIME, so
that locale-aware date functions also produce the right formats.

For instance, I use this in the About dialog to format the release date
of the last version of GIMP.

(cherry picked from commit a4e65ac836)
2020-02-07 00:14:10 +01:00
Jehan
49f1d83488 app: show the About dialog at startup when a new version is available.
This about dialog will complain an explicit message about the new
version and a link button to go to the download page.

(cherry picked from commit 6b237b90fd)
2020-02-07 00:14:10 +01:00
Jehan
bb316e5376 app: add alternative "Check for updates" button in the About dialog.
When an update is available, a big frame is visible, proposing to go to
the download page. Now a button is also available to explicitly request
for an update check in other cases (bypassing the wait delay for a
future startup).

(cherry picked from commit 827473fd88)
2020-02-07 00:14:10 +01:00
Jehan
52e3b02768 app: show new version availability in About dialog.
I was wondering which shape should take the new version notification
(again some ugly pop-up?!) and realized using the About dialog was a
good idea.
This is preparatory work for this to happen.

(cherry picked from commit 826ece3b86)
2020-02-07 00:14:10 +01:00
Jehan
07807203b5 app: make gimp_versions.json parsing easier to test.
First, let's make the check happen at each startup on unstable (still
once a week on stable).
Second, make it parse gimp.org's gimp_versions.json on stable, but
testing's one on unstable and also check environment variable
GIMP_DEV_VERSIONS_JSON (unstable only) to allow setting a local path
(allowing to tweak the file and test various cases).

Unrelated to testing, some improvements:
- save a timestamp in seconds (really no need to keep microseconds
  precision here).
- just in case, check that the saved timestamp is not in the future.

(cherry picked from commit b874cadfad)
2020-02-07 00:14:10 +01:00
Jehan
af91989eff app: fixes int overflow warning.
This fixes the following warning when compiling with Mingw:
> warning: integer overflow in expression of type 'long int' results in '-694967296' [-Woverflow]

(cherry picked from commit bb7f229b97)
2020-02-07 00:14:10 +01:00
Jehan
ef4b353b49 app: check last GIMP release from gimp.org/gimp_versions.json.
GIMP will now process the remote gimp_versions json file to look if one
is using the last version of GIMP. This initial code doesn't act up yet
on this information. This will come in further commits.

Here are the characteristics:
- Since this requires internet access, a new checkbox is available in
  the Preferences dialog, allowing to disable version checks. Note that
  it is enabled by default as it is an important security feature, but
  it has to be deactivatable.
- The remote access is done as an async operation because we don't want
  it to block the startup in any way (for whatever reason). Also it
  doesn't output errors if it fails to not be a bother (you don't
  technically need internet access for an image program).
- We don't check at every startup. At each successful check, we save a
  timestamp to prevent too frequent useless checks (I set it the timer
  to a week or more for now).

(cherry picked from commit 506a0476f4)
2020-02-07 00:14:10 +01:00
Jehan
8537ee8661 app, configure: add configure option for a build id and revision.
The point will be for a packager to create a unique build ID to identify
the build or provenance. I also add a revision number so that we can
identify 2 builds from the same version/commit, same maker and platform.

It will also be used later to check for new versions (see "phone home"
feature #2584).

Separating autotools and meson commits for easy backport.

(cherry picked from commit 73c09ebb32)
2020-02-07 00:14:09 +01:00
Ell
9ea30995d7 app: in polynomial_odd_roots(), fix derivative array size
(cherry picked from commit db678ad212)
2020-02-07 00:56:11 +02:00
Rodrigo Lledó
9a817d28dd Update Spanish translation 2020-02-06 10:35:53 +00:00
Ell
97938d78f5 app: respect brush-outline preferences in the Warp tool
In the Warp tool, handle the brush-outline and cursor prefernces
(namely, show-brush-outline, snap-brush-outline, and
show-paint-tool-cursor) similarly to the paint tools.

(cherry picked from commit 5cc9af09b0)
2020-02-05 21:37:14 +02:00
Ell
2c15299bda app: initialize GimpPaintTool::snap_brush field
(cherry picked from commit 272fa300aa)
2020-02-05 21:37:14 +02:00
Ell
ba772e6bf0 app: add "Snap brush outline to stroke" option to the preferences
Add a new "Snap brush outline to stroke" toggle to the "Image
Windows" preferences page.  When enabled, the brush outline in
paint tools snaps to the individual dabs while painting, instead of
following the cursor precisely (this is the existing behavior).
When disabled, the brush outline follows the cursor while painting
in the same way it does while not painting.

Disable the option by default.  This seems to be what most other
programs are doing, and it does give paitning a smoother feel.

(cherry picked from commit 499834a1cb)
2020-02-05 18:44:26 +02:00
Alexandre Prokoudine
7f632df33a Update Russian translation 2020-02-05 15:10:56 +03:00
Ell
4ef668676e app: set the default 3D Transform tool mode to rotation
Change the default mode of the 3D Transform tool from CAMERA to
ROTATE.  Canvas interaction is limited in camera mode, while
rotation is the main function of the tool.

(cherry picked from commit 251d758771)
2020-02-05 09:28:49 +02:00
Ell
8722629aac app: add missing file to last commit
(cherry picked from commit 3a8725a409)
2020-02-05 01:19:21 +02:00
Ell
1156b1e89e app: don't reject toolrc files due to missing experimental tools
Add a new GimpToolInfo::experimental boolean field, and mark
GimpNPointDeformationTool and GimpSeamlessCloneTool as
experimental.  In gimp_tools_deserialize(), don't reject the file
if the only missing tools are experimental, but rather add them to
the passed container.  In particular, this prevents us from
rejecting the default toolrc file when experimental tools are
enabled.

(cherry picked from commit 9f298f767f)
2020-02-05 00:07:22 +02:00
Ell
50ef78a52e app: increase display update rate
Now that painting is done in a separate thread, the display update
rate has a far smaller impact on it.  Increate the GimpDisplay
update rate, which handles image updates, to 60 FPS, and the
GimpDrawTool update rate to 120 FPS.  In particular, the latter
change makes brush-outline motion much smoother.
2020-02-04 17:51:14 +02:00
Rodrigo Lledó
5dd59fdaff Updated Spanish Translation 2020-02-04 12:32:47 +01:00
Rodrigo Lledó
357fd0fc20 Updated Spanish Translation 2020-02-04 12:30:33 +01:00
Rodrigo Lledó
219d368459 Update Spanish translation 2020-02-04 11:30:03 +00:00
Ell
7a29aca309 Issue #4174 - Crash when using the Foreground Select tool with an offset drawable
In the Foreground Select tool, use the drawable bounds (including
its offset) as the trimap buffer extents, which is now supported by
the rest of the code.  This is both more streamlined, and works
around a GEGL bug (independently fixed by commit
gegl@378cd512c35fe2eb255492f90b503a67ab38d7a3), causing
gegl:matting-global to segfault when the drawable and trimap bounds
are differnet.

(cherry picked from commit 666d0845e1)
2020-02-03 21:21:17 +02:00
Ell
a1eb04ea71 app: in GimpCanvasBufferPreview, take strong ref on buffer
In GimpCanvasBufferPreview, take a strong reference on the preview
buffer, fixing a segfault in the foreground-select tool when
switching engines while the grayscale preview is active.

(cherry picked from commit ea864e2d5c)
2020-02-03 21:21:17 +02:00
Ell
f4dc0fd147 app: in GimpCanvasBufferPreview, add support for offset buffers
Ditto.

(cherry picked from commit 43f8a5199f)
2020-02-03 21:21:17 +02:00
Ell
21d6c8a8da app: add support for offset buffers in GimpScanConvert
Ditto.

(cherry picked from commit d920569771)
2020-02-03 21:21:16 +02:00
Ell
901b0e7211 app: add support for offset buffers in gimp_channel_select_buffer() ...
... and gimp_gegl_mask_combine_buffer()

Allow the functions to work with buffers whose top-left corner is
not at (0, 0).

(cherry picked from commit 24534338e7)
2020-02-03 21:21:16 +02:00
Ell
113c1a6838 Issue #4285 - [Free Select Tool] functionality bug with Ctrl/Shift combination
While GimpPolygonSelectTool is active, don't let GimpSelectionTool
handle the Shift/Ctrl modifiers, which are handled by the tool
widget, unless they're used in combination with Alt, in which case
they're used to move the selection, instead of control the
selection mode.

(cherry picked from commit 0c917cb359b0ace43f82c68e36e64221ab1bcf91)
2020-02-03 12:38:59 +02:00
Ell
0bc37ce94a app: reorganize GimpPolygonSelectTool functions
... to match the GimpTool virtual-function order.

(cherry picked from commit f4adfd5a905f5e1f8001a4900e38d52968b1e93d)
2020-02-03 12:38:59 +02:00
Ell
0ad20b24f2 app: improve empty-selection check in GimpSelectionTool
Add a new GimpSelectionTool::have_selection() virtual function,
which determines if the image has a selection (default
implementation), or if the tool will create one upon committing
(implemented by subclasses).  Use this function in
gimp_selection_tool_oper_update() to determine the tool function;
in particular, don't use SELECTION_MOVE and SELECTION_MOVE_COPY
when there's no selection.

Override have_selection() in GimpFreeSelectTool, and return TRUE if
we have a polygon with three or more vertices, which will create a
selection upon committing.

(cherry picked from commit aeff0d6207463d0ed6f97e39e6b2450a60715863)
2020-02-03 12:38:59 +02:00
Ell
b94e8d91ea app: fix typo in gimpselectiontool.c 2020-02-03 12:38:46 +02:00
Ell
7dd7c67d0c app, po: don't translate gimppanedbox.c
... it doesn't have any translatable strings anymore.

(cherry picked from commit b8aba199a0)
2020-02-03 00:55:48 +02:00
Ell
a8e1cb83ff app: don't use gimp_highlight_widget() in GimpPanedBox
We already do our own highlighting of the droppable areas, so this
is just visual clutter.

Also, a fix for last commit.
2020-02-03 00:33:34 +02:00
Ell
4730bc2a4d app: "You can drop dockable dialogs here" no more!
This commit removes the empty-dock-pane message, and instead
highlights all empty dockable drop-target areas once a drag
operation begins.

Add new gimp_dockbook_{add,remove}_callback() global functions,
which can be used to register a callback function to be called when
a dockable drag operation begins and ends.

Register such a callback in GimpPanedBox, and use it to highlight
all drop areas the widget handles.  Furthermore, when the widget is
contained in a GtkPaned, make sure that it has a minimal size for
the duration of the drag operation, so that the drop area is
visible even if the widget is normally hidden.
2020-02-03 00:05:44 +02:00
Ell
fd162391b7 app: fix GimpToolEditor visibility-toggle state update
In GimpToolEditor, update the visibiltiy-toggle state in response
to the corresponding tool-item's "notify" signal, rather than its
"shown-changed" signal, since the latter is not emitted when the
item's visibility changes while it's not shown.

(cherry picked from commit df19401fb3)
2020-02-02 16:44:31 +02:00
Piotr Drąg
6d347dba5e Update Polish translation 2020-02-02 12:58:08 +01:00
Ell
9362e89b50 app: add a "Use tool groups" option to the toolbox preferences
Add a new Gimp::tool_item_ui_list, which is a GimpTreeProxy over
Gimp::tool_item_list.  This allows us to use either a hierarchical
or a flat tool list in the UI, by setting the "flat" property of
the new list.

Use Gimp::tool_item_ui_list in GimpToolPalette, so that the toolbox
layout is affected by this choice.

Add a "Use tool groups" toggle to the toolbox preferences, and bind
it to the "flat" property of Gimp::tool_item_ui_list.

(cherry picked from commit 3cda972100)
2020-02-01 13:20:23 +02:00
Ell
6c86a4c611 app: add GimpTreeProxy
Add a new GimpTreeProxy container class, which proxies a
GimpViewable tree.  The proxy has a dynamically-settable boolean
"flat" property, which controls if the tree hierarchy is preserved,
or if it's viewed as a flat list.

(cherry picked from commit 2caa518b19)
2020-02-01 13:16:03 +02:00
Ell
01cebc4307 app: add gimp_container_search()
Add a new GimpContainer::search() virtual function, and a
corresponding gimp_container_search() function, which works
similarly to gimp_container_foreach(), except that the callback
returns a boolean.  When the callback returns TRUE, the search is
stopped, and the current object is returned.

Implement GimpContainer::search() in GimpList.

(cherry picked from commit c4cc015c43)
2020-02-01 13:15:53 +02:00
Ell
f95decdc9f app: add GimpToolItem::shown property
Add a new read-only GimpToolItem::shown property, and a
corresponding GimpToolItem::shown-changed signal, which determines
if a tool item is visible throughtout the hierarchy, i.e., if it
and all its ancestors are visible.  This replaces
gimp_tool_item_is_visible().

Use the new property and signal in GimpToolPalette and
GimpToolEditor, to simplify the code, and in preparation for a flat
toolbox view.

(cherry picked from commit ee9661237e)
2020-02-01 13:15:52 +02:00
Ell
defc949724 app: use a weak pointer for tool-manager active group
In GimpToolManager, use a weak pointer for tracking the active tool
group, instead of taking a reference on it.  This avoids
erroneously extending the group's lifetime, which can cause
problems with the tool-item hierarchy.

In GimpToolGroup, make sure that newly-added tools don't already
have a parent.

(cherry picked from commit 30d833d00f)
2020-02-01 13:15:52 +02:00
Ell
5f97141ba6 app: fix a super secret segfault
(cherry picked from commit 2145f4301c)
2020-01-30 18:28:57 +02:00
Ell
c58d4017de app: move tool-activation upon tool-group active-tool change to GimpToolManager
When the active tool of the tool group associated with the
currently-selected tool changes, we select the new active tool;
this is currently handled in GimpToolButton.  Move this logic to
GimpToolManager, which already handles the other half of the
problem: updating the group's active tool when one of its tools is
selected.
2020-01-30 16:39:22 +02:00
Daniel Mustieles
f8dd60dba0 Update Spanish translation 2020-01-30 09:05:32 +00:00
Ell
b0f0013af6 app: various fixes to last commits
(cherry picked from commit bae9f2d880)
2020-01-30 10:46:21 +02:00
Ell
daad6a78b5 etc: add a default toolrc file, using tool groups to oragnize the tools
Add a default toolrc file, installed in the sysconf dir, with a
more minimalistic tool layout using groups, inspired by Photoshop
(not identical, though, don't kill me! :)
2020-01-30 02:46:53 +02:00
Ell
14d7964b9e app: reduce toolbox color-area size
Reduce the size of the toolbox color area, and make it square.
This allows for a narrower toolbox layout, which is more practical
now that we have tool groups.
2020-01-30 02:46:53 +02:00
Ell
0f4f4f28a4 app: use GimpToolButton in GimpToolPalette
In GimpToolPalette, replace the direct implementation of tool
buttons with GimpToolButton, added in the previous commit.
2020-01-30 02:46:53 +02:00
Ell
bcc5634093 app: add GimpToolButton
Add a new GimpToolButton class, used for tool-buttons in the
toolbox, instead of implementing them directly in GimpToolPalette.
Each GimpToolButton is associated with a GimpToolItem, which can be
either an individual tool or a group.

When a tool button is associated with a group, it displays the
group's active tool, with an arrow at the corner.  Clicking the
button selects the active tool, while clicking-and-holding, or
right-clicking, shows a menu of all the tools in the group.
Alternatively, the active tool can be changed using the scroll
wheel.
2020-01-30 02:46:53 +02:00
Ell
d916e3ca21 app: show popup menus at the same height as their corresponding button
In gimp_button_menu_position(), position the menu at the same
height as the button, instead of half-way down.  This is mostly a
stylistic choice, but it works much better for tool-button menus,
added in the next commit.
2020-01-30 02:46:53 +02:00
Ell
0bd3c2e18e app: add gimp_tool_info_get_action_name()
Move the logic for translating a tool identifier to a corresponding
action name to GimpToolInfo.  It's currently only used in
tools-actions.c, but the next commits will use it in tool buttons.
2020-01-30 02:46:53 +02:00
Ell
6b11e098da app: don't register action for GimpOperationTool
Allow creating GimpToolInfo objects with a NULL menu label, and do
that for GimpOperationTool.  The previous commit effectively
removed it from the Preferences tool editor, and this commit also
removes it from the action search.
2020-01-30 02:46:53 +02:00
Ell
25faf34922 app: add tool-group support to GimpToolEditor
Add tool-group support to GimpToolEditor, used to organize tools in
the Preferences dialog, including creating, rearranging, and
deleting groups.  Also, major cleanup.
2020-01-30 02:46:53 +02:00
Ell
905a352e0d app: add hierarchical dnd support to GimpContainerTreeView
In the default implementation of
GimpContainerTreeView::drop_viewable(), handle the case where the
source and/or destination viewables are not direct descendants of
the tree-view's container, but rather of one of its subcontainers.
2020-01-30 02:46:53 +02:00
Ell
0566ae3e0a libgimpconfig: allow calling gimp_scanner_new_string (NULL, -1, ...)
Allow calling gimp_scanner_new_string() with a NULL `text` and a
negative `text_len` (which is interpreted as 0), instead of
requiring `text_len == 0` in this case.  This allows passing a
negative `text_len` unconditionally to infer the length, even when
the string may be NULL.
2020-01-30 02:46:53 +02:00
Ell
207c6b283f app: add support for tool groups in toolrc
Add a new Gimp::tool_item_list list, in addition to
Gimp::tool_info_list.  The latter may contain arbitrary tool items,
including tool groups, and is intended for use in the UI (namely,
the toolbox and the preferences tool editor).

In gimp-tools, use Gimp::tool_item_list for representing the UI
tool order (while still using Gimp::tool_info_list as a flat list
of all GimpToolInfo objects), and add support for saving and
loading tool groups to/from toolrc.

Introduce file-version tracking in toolrc, and drop its contents on
version mismatch, or when new tools are introduced.  This is
slightly disruptive, but merging new changes with existing toolrc
files is non-trivial, and it doesn't happen very often.

Add support for a sysconf toolrc file, which is used if there's no
user toolrc file (i.e., on first use).  If neither file is found,
the hard-coded flat tool order is used.  This commit doesn't
provide a default toolrc file, but the next commits will.

Make the gimp-tools serialization and deserialization functions
public, for use in GimpToolEditor in the next commits.
2020-01-30 02:46:53 +02:00
Ell
85c986efdf app: don't merge similarly-named objects during GimpContainer deserialization ...
... if not using unique names

Add a new GimpContainer::get_unique_names() virtual function, and a
corresponding gimp_container_get_unique_names() function, which
determines if the container uses unique names for its objects.
Override get_unique_names() in GimpList, to return the corresponding
property.

In gimp_container_deserialize(), don't merge new objects with
existing objects sharing the same name if the container doesn't use
unique names.
2020-01-30 02:46:53 +02:00
Ell
d1cf7de23f app: update tool-group active tool in response to tool changes
In the tool manager, update the active tool of a GimpToolGroup when
one of its tools becomes active (or when the active tool is added
to the group).
2020-01-30 02:46:52 +02:00
Ell
160b17c8a8 app: add GimpToolGroup as a subclass of GimpToolItem
Add GimpToolGroup as a new subclass of GimpToolItem, representing a
collection of tools.  The end goal is to display tool groups using
a single button in the toolbox.

Tool groups are not recursive: they can only contain individual
tools, not other groups.  Each group has a single "active tool",
normally the most-recently-used tool of the group, which is
activated when clicking on the tool's button.
2020-01-30 02:46:52 +02:00
Ell
b3583041ac app: add GimpToolItem; derive GimpToolInfo from it
Add GimpToolItem as a common base class for toolbox items.
Derive GimpToolInfo from GimpToolItem, representing an individual
tool.  The next commits add support for tool groups, represented by
an alternative subclass of GimpToolItem.

Most of the tool-info properties remain in GimpToolInfo, however,
GimpToolItem takes care of tool-item visibility.
2020-01-30 02:46:52 +02:00
sicklylife
7c4c475597 Update Japanese translation 2020-01-29 09:14:00 +00:00
sicklylife
608c371dcf Update Japanese translation 2020-01-29 09:06:21 +00:00
Marco Ciampa
8f109a08e0 Updated Italian translation 2020-01-29 09:18:27 +01:00
Rodrigo Lledó
d061b1561b Updated Spanish Translation 2020-01-29 08:45:09 +01:00
Piotr Drąg
2e1ff3583f Update Polish translation 2020-01-26 14:32:05 +01:00
Jordi Mas
ba52a9e988 Update Catalan translation 2020-01-25 20:31:15 +01:00
Elad Shahar
817e83bb27 app: Fix Mandala Symmetry Kaleidoscope mode - brush transform and stroke order
Changed the reflection method to find the middle of the slice the
user is drawing on, and reflecting on that. This reflects the slice
in place, making it easier to rotate it to the intended location.
This fix preserves the order the dabs are drawn on the
slices, to be counterclockwise.

Fixed the brush transform, by setting the reflect output variable,
and calculating accordingly.

(cherry picked from commit ed6517f094)
2020-01-22 01:17:30 +02:00
Ell
4f9c3f2a6a app: avoid deleting empty layer groups when downscaling image
When dowscaling an image (or a layer group), empty layer groups
can be discarded as a result of their new dimensions being too
small, since we're calculating their new dimensions according to
their fake 1x1 dimensions.  However, these dimensions are purely an
implementation detail and shouldn't affect the result, and neither
do we show a warning for them.

Instead, simply avoid discarding empty layer groups.

(cherry picked from commit b99a2631ef)
2020-01-21 20:16:02 +02:00
Ell
13bc82e0ff icons: replace symbolic gimp-visible icons again 2020-01-21 19:14:42 +02:00
Ell
68e4fcd9fc icons: replace symbolic gimp-visible icon (aka the eye icon)
It looked meh :)
2020-01-20 23:12:44 +02:00
Ell
e14b95820c app: restrict whole-drawable updates to groups with filters
Restrict last commit's workaround to layer groups only (which is
the only relevant case ATM), since it negatively impacts the warp
tool, which does rely on the ability to perform (accurate) partial
updates with filters to improve performance.  It's only a temporary
hack anyway.

(cherry picked from commit 18870975b8)
2020-01-20 00:38:19 +02:00
Ell
3b8f01282b app: always update full drawable region if it has filters
When a drawable has filters attached, they may influence the area
affected by drawable updates.  Currently, we ignore that, updating
the original region regardless.  This can lead to drawable updates
not affecting the correct regions.  This couldn't be triggered
until now, but since layer groups can now have a transform op
attached as a filter, updates to their sublayers -- which can
happen while the transform tool is active -- run into this problem.

Fix it for now by simply updating the full drawable region when the
drawable has filters.  This is a very conservative approach -- we
don't even bother checking if we're only dealing with point
filters, as this change only influences transformed groups right
now.  Ultimately, we need to rely on node invalidation to drive
updates, which takes this into account.

(cherry picked from commit 8be0e646bc)
2020-01-19 21:08:07 +02:00
Ell
79b3fb5ce7 app: don't emit GimpImage::linked-items-changed for non-attached items
In gimp_item_set_linked(), don't emit the
GimpImage::linked-items-changed signal if the item is not attached.

(cherry picked from commit 1e26ce8a60)
2020-01-19 21:08:06 +02:00
Piotr Drąg
97a7a58138 Update Polish translation 2020-01-19 13:12:30 +01:00
Ell
6f68aa15b8 app: regenerate pdb/image-cmds.c 2020-01-18 16:01:11 +02:00
Ell
b09d272c5c app: add "Preview linked items" option to transform tools
Add a new "Preview linked items" option to the transform-grid
tools.  When this option is enabled, together with composited
previews, the transform preview includes all linked layers/channels
when transforming a layer/channel.  Note that paths aren't included
for now.

Ultimately, we'd probably want to cut down on the various preview
options and enable this by default, but let's make this optional
for now.

This commit also improves composited-preview clipping in some
cases.

(cherry picked from commit d24713349d)
2020-01-18 15:18:46 +02:00
Ell
fbcabeb99f app: add GimpImage::linked-items-changed signal
Add a new GimpImage::linked-items-changed signal, which is emitted
whenever the set of linked items in an image changes.

(cherry picked from commit 7d6737fe9a)
2020-01-18 15:18:46 +02:00
Ell
7b4fba243e app: suspend tile validation while setting extent of validate-handler buffer
In gimp_tile_handler_validate_buffer_set_extent(), suspend tile
validation while calling gimp_gegl_buffer_set_extent(), so that if
the call triggers clearing of partial tiles, these tiles don't get
unnecessarily validated.

(cherry picked from commit fcc1c3d380)
2020-01-18 12:43:08 +02:00
Ell
44bf74a8d0 app: disable transform clipping for layer groups
Using any clipping mode other than ADJUST is currently broken for
layer groups, since each layer in the group is clipped
individually, instead of clipping being applied to the group as a
whole.  Ultimately, we should fix that, but for now, simply disable
clipping for layer groups, by overriding GimpItem::get_clip() to
always return ADJUST.

(cherry picked from commit 203bc9d893)
2020-01-18 11:13:30 +02:00
Øyvind Kolås
9c654d8386 app,autotools: depend on babl 0.1.74 and GEGL 0.4.20 2020-01-17 17:06:35 +01:00
Ell
b1c9173b1f app: use gimp_gegl_node_get_key() in GimpFilterTool
... instead of doing the same thing manually.  This was supposed
to be part of the previous commits.

(cherry picked from commit 10a528ed2f)
2020-01-17 16:45:22 +02:00
Ell
9ee4091738 pdb: add missing change to last commit 2020-01-17 12:21:34 +02:00
Ell
b55afe8703 Issue #4366 - Color-to-alpha unnecessarily grayed out for grayscale images
Don't disable color-to-alpha for grayscale drawable, since the
operation is applicable to grayscale images (in particular, it
doesn't add color where there was none), and since we no longer
distinguish between layers and channels according to the drawable
format when updating the filters actions.
2020-01-17 12:12:57 +02:00
Ell
75d5eb7800 Issue #1975 - Color to alpha now requires an alpha-channel ...
... (used to add one automatically)

In GimpFilterTool and gimp_drawable_apply_operation(), use
gimp_drawable_filter_set_add_alpha() to add an alpha channel when
applying an operation that specifies "needs-alpha" to a drawable
that can have alpha.

Don't disable gegl:color-to-alpha (which has "needs-alpha") when
the drawable doesn't have an alpha channel, if one can be added.
2020-01-17 12:12:57 +02:00
Ell
868a64c0f8 app: in GimpFilterTool, consolidate drawable-filter option setup
In GimpFilterTool, move all the drawable-filter option setup to a
new gimp_filter_tool_update_filter() function, and call it whenever
the drawable-filter's options need to be updated.  This avoids
duplicating logic in various places.
2020-01-17 12:12:57 +02:00
Ell
8a54c78e6b app: add gimp_gegl_node_get_key()
... which gets an operation-class key for the operation associated
with the node, if any.
2020-01-17 12:12:57 +02:00
Ell
29a02b2949 app: add GimpDrawable::supports_alpha() vfunc
Add a new GimpDrawable::supports_alpha() virtual function, and a
corresponding gimp_drawable_supports_alpha() function, which
determine if the drawable supports an alpha channel.  The default
implementation returns FALSE, and GimpLayer overrides it to return
TRUE.
2020-01-17 12:12:57 +02:00
Ell
6c0d20c9e6 app: silence warning in gimp_transform_resize_crop()
The crop-to-result and crop-with-aspect transform-boundary
algorithms seem to consistently fail in some cases, and spit out a
warning, which can be too verbose if it triggers the debug dialog.

Demote the warning to a g_printerr(), with an eye to just dropping
these algorithms altogether.

(cherry picked from commit 0103fe2c19)
2020-01-17 00:29:46 +02:00
Alexandre Prokoudine
c696cc0a10 Update NEWS to match recent changes 2020-01-16 20:35:24 +00:00
Ell
f2715936cc app: add "Synchronous preview" option to transform tools
Add a "Synchronous preview" option to the transform-grid tools,
which renders the composited preview synchronously.  This reduces
the lag for painting the preview, but can harm responsiveness for
bigger images, where rendering the preview is slow.

This is mostly an experimental option for now; it will become more
interesting once we have mipmap rendering.

(cherry picked from commit 52cd27f0d3)
2020-01-16 11:41:17 +02:00
Ell
456ede52e8 app: in GimpTileHandlerValidate, fix tile-data pointer for negative coords
In gimp_tile_handler_validate_validate_tile(), when validating a
partial tile with negative coordinates, make sure to adjust the
result of the modulo when calculating the tile-realtive coordinates
so that they're non-negative, to fix the tile-data pointer offset.

(cherry picked from commit d39822bcd7)
2020-01-16 01:58:58 +02:00
Ell
0077eabce5 app: add "Composited preview" option to transform tools
Add a "Composited preview" option to all transform-grid tools,
which displays the transform preview as part of the image
composition (i.e., as it would actually look when applying the
transformation, keeping the layer at the right position in the
stack, and with the right layer mode), instead of using an overlay.

This option is off by default, since it's generally slower to
render than an overlay, due to the lack of mipmap rendering.  We're
also still using an overlay when transfoming a selection, and not a
whole layer.
2020-01-16 00:35:06 +02:00
Ell
c4a621d1dc app: freeze drawable preview in transform tools
In GimpTransformGridTool, when transforming a drawable, freeze the
drawable's preview while the tool is active, so that its ancestors'
previews don't get unnecessarily updated in response to hiding it.
2020-01-16 00:35:06 +02:00
Ell
54a95ab75b libgimpmath: add gimp_matrix3_equal()
... which compares two matrices.
2020-01-16 00:35:06 +02:00
Ell
6d7e18ff8a app: add gimp_drawable_filter_set_override_constraints()
In GimpDrawableFilter, add a
gimp_drawable_filter_set_override_constraints() function, which
allows bypassing certain constraints applied to the filter, based
on the drawable type and state.

Yes, this is a bit of a hack, added mostly as a quick-and-dirty way
to allow us to add filters to layer masks that affect their
bounding box, in preparation for composited transform previews.
2020-01-16 00:35:06 +02:00
Ell
1485e1d143 app: add gimp_drawable_filter_set_add_alpha()
Add an optional "format" parameter to gimp_drawable_merge_filter(),
which specifies the format to use for the output, possibly changing
the drawable's format.

In GimpDrawableFilter, add a gimp_drawable_filter_set_add_alpha()
function, which allows the filter to add an alpha channel to the
drawable when committed (by passing an appropriate format to
gimp_drawable_merge_filter()).
2020-01-16 00:35:06 +02:00
Ell
41ca26523c app: calculate drawable bounding box according to graph by default
Change the default implementation of
GimpDrawable::get_bounding_box() to return the drawable source
node's bounding box, instead of the drawable's item bounds.  This
allows filters to affect the size of all drawables, including, in
particular, layer masks.

Change GimpLayer's implementation of get_bounding_box() to return
the intersection of the layer's own bounding box, and the layer
mask's bounding box (if it has one), and update the layer's
bounding box when the mask is enabled/disabled, or when its
bounding box changes.
2020-01-16 00:35:06 +02:00
Ell
a2654ef7ce app: implement GimpPickable::flush in GimpGroupLayer
... by synchronously flushing the group's projection.  This is
necessary for pass-through groups, since their projection is
normally flushed asynchronously.

(cherry picked from commit 7f84f10154)
2020-01-15 22:05:35 +02:00
Ell
e409f301fe app: handle GimpTileHandlerValidate::invalidated in gimp:buffer-source-validate
In gimp:buffer-source-validate, invalidate the node in response to
GimpTileHandlerValidate::invalidated, added in the previous commit,
in addition to GeglBuffer::changed.

(cherry picked from commit bb8ee0e686)
2020-01-15 21:50:21 +02:00
Ell
0a93f5609e app: add GimpTileHandlerValidate::invalidated signal
Add a new GimpTileHandlerValidate::invalidated signal, which is
emitted when a region of the buffer is invalidated.  This would
allow us to properly invalidate the graph in response; this
normally happens in response to GeglBuffer::changed, but this
signal is not emitted when a region is merely invalidated.

(cherry picked from commit 3ea391602e)
2020-01-15 21:50:20 +02:00
Ell
537ae20fa0 app: allow calling gimp_tile_handler_validate_validate() with a NULL rect
... and validate the entire buffer.

(cherry picked from commit ba6040bbcd)
2020-01-15 21:50:20 +02:00
Oleksii Samorukov
df850fa394 Return FALSE on gimp_osx_focus_window to avoid endless loop
(cherry picked from commit 3e78c674d8)
2020-01-15 17:44:53 +01:00
Ell
628833426a libgimpmath: add version annotations to new matrix functions 2020-01-15 18:25:06 +02:00
Ell
4a4999082a icons: fix PNG 3D-transform icons in makefile 2020-01-15 18:15:31 +02:00
Rodrigo Lledó
3f7bb5b934 Update Spanish translation 2020-01-15 15:01:49 +00:00
Ryuta Fujii
ef87fe9497 Update Japanese translation 2020-01-13 14:22:14 +00:00
Piotr Drąg
676b8a77fe Update Polish translation 2020-01-12 19:28:55 +01:00
Ryuta Fujii
5b60aab22a Update Japanese translation 2020-01-12 16:15:03 +00:00
sicklylife
7a0c04b9f1 Update Japanese translation 2020-01-12 16:07:27 +00:00
Alexandre Prokoudine
a990b3f878 Update Russian translation 2020-01-12 13:03:50 +03:00
Alex Samorukov
66b16949a6 Add macOS support for the GIMP dashboard 2020-01-12 07:35:05 +00:00
Elad Shahar
ec10b37421 Issue #4484: Add reflection option for mandala symmetry
(cherry picked from commit 36dd48aea6)
2020-01-11 23:57:25 +01:00
sicklylife
bed9294c97 Update Japanese translation 2020-01-11 16:21:33 +00:00
sicklylife
c315e32617 Update Japanese translation 2020-01-11 16:13:50 +00:00
Ell
e884af8f42 app: clip transform-tools preview according to clipping mode
Add a "clip" property to GimpCanvasTransformPreview, specifying the
transform's clipping mode, and clip the preview accordingly.

In GimpTransformGridTool, sync the tool's clipping mode with the
preview's clipping mode.

(cherry picked from commit 7b2e6b7595)
2020-01-11 17:13:11 +02:00
Ell
41a8be5b2a app: fix spacing in gimptooltransform3dgrid.c
(cherry picked from commit d79ef34f87)
2020-01-10 23:21:41 +02:00
Ell
87d3590054 app: add unified interaction mode to the 3D Transform tool
Add a "Unified interaction" option to the 3D Transform tool, and a
corresponding "unified" property to GimpToolTransform3DGrid.  When
active, all three interaction modes of the grid (camera, move, and
rotate) are available simultaneously, regardless of the active
dialog page.  In this mode, the inner and outer regions of the item
are used for moving and rotation, respectively, and the vanishing-
point is controlled through through a handle.

(cherry picked from commit 30132fc2da)
2020-01-10 23:21:41 +02:00
Ell
c4d0c0bd6d app: in 3D Transform tool, fix rotation direction when rotating arouns local Z axis
In GimpToolTransform3DGrid, fix the test for determining which side
of the plane is facing the viewer, affecting the direction of
rotation when rotating around the local Z axis.

(cherry picked from commit bcaaa453c4)
2020-01-10 22:18:09 +02:00
Ell
8143564627 app: improve placement of new tools with existing toolrc
When ordering tools according to an existing toolrc file (which
is always present in a pre-existing profile), preserve the default
placement of newly-added tools, instead of always adding them to
the bottom of the list.

(cherry picked from commit 58d04375c9)
2020-01-10 18:45:02 +02:00
Sabri Ünal
0418bcc134 Update Turkish translation 2020-01-10 15:53:31 +00:00
Alex Samorukov
e59d8ca75c Move the comment to match the function it explains 2020-01-10 14:56:33 +00:00
Oleksii Samorukov
eb4b8fbd05 Move macos menu init to the gui related code and reparent it with a main window.
Closes #1258
2020-01-10 11:03:01 +01:00
Alexandre Prokoudine
7acebe298b NEWS: vastly better text for YUV 2020-01-10 11:57:28 +03:00
Alexandre Prokoudine
6d3c742b36 Update NEWS some more 2020-01-10 11:51:30 +03:00
Alexandre Prokoudine
661bab3f25 Update NEWS 2020-01-10 11:47:37 +03:00
Alexandre Prokoudine
2c785267ee Update Russian translation 2020-01-10 10:07:36 +03:00
Alexandre Prokoudine
46ee2d8438 Update Russian translation 2020-01-10 10:07:36 +03:00
Ell
4d5ea7fd95 Issue #4354 - When using color to fade dynamics and gradient with transparency ...
... brush does not have transparency

In the PAINT_MASK_TO_COMP_MASK paintcore-loops algorithm, used when
painting incrementally, multiply the paint mask values by the paint
opacity.  Previously, the paint opacity was ignored, breaking
various dynamics affecting the opacity.

(cherry picked from commit 9fe33702fb)
2020-01-09 22:36:45 +02:00
Ell
67b0279091 app: don't show context menu in compact spin scale without focus
Always enter relative adjustment mode when right-clicking an
unfocused compact GimpSpinScale, instead of showing the context
menu, since it otherwise leaves little room to enter relative mode
in narrow spin scales.  The context menu can still be activated for
focused spin scales.
2020-01-09 17:31:33 +02:00
sicklylife
d714508d8d Update Japanese translation 2020-01-09 15:03:13 +00:00
Ell
e27aa6c000 app: snap spin scale to page increments when holding Ctrl
When click-dragging a GimpSpinScale while holding Ctrl, in either
absolute or relative mode, snap the value (or the delta) to the
page increment.
2020-01-09 01:49:08 +02:00
Ell
6b9a6da4a7 libgimpwidgets: control GimpSpinButton scroll increments using modifiers
In GimpSpinButton, adjust the scroll step in response to modifiers:
normal scrolling uses the step increment, Ctrl uses the page
increment, and Shift scales the step increment down by the ratio
between the page and step increments (up to the minimal precision
of the spin button).

This applies to all spin buttons used in GIMP, including spin
scales.

(cherry picked from commit ac8bf47fa6)
2020-01-08 21:01:55 +02:00
sicklylife
839920d129 Update Japanese translation 2020-01-08 18:11:09 +00:00
sicklylife
03b135a9bb Update Japanese translation 2020-01-08 18:02:50 +00:00
Ell
b9c13c0900 app: fix integer overflow when reporting operation progress
In gimp_gegl_apply_cached_operation(), use gint64 for storing the
total and processed pixel counts used for reporting progress, to
avoid overflowing when applying an operation to a large image.

(cherry picked from commit f1c448e0f4)
2020-01-08 11:40:06 +02:00
Ell
c8b80d8997 menus: add the 3D Transform tool to the Tools menu
(cherry picked from commit 32da86b6ed)
2020-01-07 23:04:57 +02:00
Ell
818cbdbf4c app: fix wrong fix to gimpbacktrace-windows.c
This fixes commit 468f3e84d8.

(cherry picked from commit c93e5a2eae)
2020-01-07 22:18:55 +02:00
Ell
7fdfe791dd app: improve compact spin-scale behavior
GimpSpinScale now always grabs focus in response to a button press
in compact mode.  However, like before, the left button is always
used for absolute adjustment, even when pressed over the text,
instead of controlling the text cursor.

The right button is now used both for relative adjustment, and to
select the entire text.  Alternatively, the same can be achieved
with Shift+left-button.

The middle button has no special function.

Regardless, if a button-press event over the text triggers a
context menu, this overrides any of the above.
2020-01-07 20:58:20 +02:00
Alexandre Prokoudine
1874fa8a16 Update and improve Russian translation 2020-01-07 15:03:50 +03:00
Ryuta Fujii
f51fe56a6b Update Japanese translation 2020-01-07 11:10:25 +00:00
Ell
97d6201198 pdb: in plug_in_compat.pdb, set underlying op nodes
In plug_in_compat.pdb, when wrapping an op node inside a graph, set
the op node as the graph node's underlying operation.  This allows
gimp_gegl_apply_operation() to perform certain optimizations.

(cherry picked from commit e74994feaf)
2020-01-07 10:53:04 +02:00
Ell
6cf7b08c36 Issue #4204 - "Add Bevel" Has No Effect
In plug_in_compat.pdb, don't add child nodes to nodes containing an
op, since this turns them into graphs and discards the op.
Instead, add a new wrap_in_graph() helper function, which takes a
node op and wraps it in a simple "input -> op -> output" graph.
Use the graph as the container for child nodes, and as the node
passed to gimp_drawable_apply_operation().  (This is similar to
what we used to do before commit
afdd573136, except that we now pass
the parent node to gimp_drawable_apply_operation(), instead of the
op node).

(cherry picked from commit 8b7bafa43a)
2020-01-07 10:53:03 +02:00
Ell
2078e24b4a app: fix indentation in gimppivotselector.h
(cherry picked from commit 49221167c3)
2020-01-07 10:04:09 +02:00
Ell
27ad1316dd libgimpmath: add new matrix functions to .def file
... and fix docs for gimp_matrix4_transform_point().

(cherry picked from commit 9d015b7b1a)
2020-01-07 10:04:08 +02:00
Ell
8591b5b33f app: add compact style for spin scales
Add a boolean "compact" style property for GimpSpinScale.  When
TRUE, the widget uses a narrower layout, and the different upper/
lower-half behavior is gone.  Instead, the behavior depends on the
mouse button used: left-click is used for absolute adjustment
(similar to the upper-half behavior), middle-click is used for
relative adjustment (similar to the lower-half behavior), and right
click is used for manual value entry (similar for clicking on the
text area).

Add a new "Compact sliders" toggle to the Interface prefernces, to
control the spin-scale style.  Apply the style globally through the
themerc file, and update it when the option changes.

Use the compact style by default, because otherwise no one would
find it.  Theming in GTK3 works differently, and spin scales in
master need more work regardless, so this stays in 2.10 for now.
2020-01-06 23:10:05 +02:00
Ell
3d7bb4bc3d app, icons: add 3D Transform tool
Add a new 3D Transform tool, based on GimpToolTransform3DGrid,
added in the previous commit.  The tool UI provides a notbook with
three tabs, corresponding to the three GimpToolTransform3DGrid
modes:

  Camera - allows setting the primary vanishing point, as well as
  the camera's focal length, expressed either directly, or as the
  camera's angle of view, relative to the whole image or the
  transformed item.  By default, the vanishing point is aligned
  with the item's center, and the angle of view is fixed relative
  to the item; this essentially means that each item is transformed
  using a local perspective, independent of its position and size
  relative to the image.  A global perspective can be achieved by
  using a common vanishing point and focal length (or an image-
  relative angle of view).

  Move   - allows moving the item using X, Y, and Z offsets.

  Rotate - allows rotating the item using X, Y, and Z Euler angles.
  The order of rotation of the different axes can be controlled by
  a set of numbered buttons next to the sliders, and the rotation's
  pivot can be controlled using a pivot selector.
2020-01-06 23:10:05 +02:00
Ell
855eb0a150 app, cursors: add GimpToolTransform3DGrid tool widget
Add a new GimpToolTransform3DGrid tool widget, subclassed from
GimpToolTransformGrid, which can be used to perform 3D
transformations.

The widget can be in one of three modes:

  CAMERA - allows adjusting the primary vanishing point by moving a
  handle.

  MOVE   - allows moving the object through dragging.

  ROTATE - allows rotating the object through dragging.

By default, controlling the transformation through dragging applies
to the X and Y axes.  Holding Shift (or setting the "constrain-
axis" property) restricts the motion to only one of the axes.

For the MOVE and ROTATE mode, holding Ctrl (or setting the "z-axis"
property) allows controlling the Z axis instead.

For the same modes, holding Alt (or setting the "local-frame"
property), applies the adjustments in the object's local frame of
reference, instead of the display's global frame of reference.
2020-01-06 23:10:04 +02:00
Ell
d0ccd6ecfb app: add a protected gimp_tool_transform_grid_get_handle() function
... which can be used by subclasses to retrieve the currently-
active handle.
2020-01-06 23:10:04 +02:00
Ell
d30d47a0fd app: add GimpTransformGridTool::dynamic-handle-size property
Add a boolean GimpTransformGridTool::dynamic-handle-size property,
which controls whether the handle sizes are adjustment dynamically
according to the grid's size, or remain fixed.  This property is
TRUE by default, to maintain the current behavior.
2020-01-06 23:10:04 +02:00
Ell
cd7ccdf310 app: in GimpToolTransformGrid, add NONE function
In GimpToolTransformGrid, allow setting "inside-function" and
"outside-function" to a new NONE value, performing no
transformation when dragging the respective area.
2020-01-06 23:10:04 +02:00
Ell
d8d05b9908 app: add gimp-transform-3d-utils.c
Add gimp-transform-3d-utils.c with various utility functions for
performing 3D transformations, in preparation for adding a 3D
transform tool.
2020-01-06 23:10:04 +02:00
Ell
2412b5fc99 libgimpmath: add various GimpMatrix4 functions
Add gimp_matrix4_{identity,mult,transform_point}().
2020-01-06 23:10:04 +02:00
Ell
d546e3b813 libgimpmath: add various GimpMatrix2 functions
Add gimp_matrix2_{determinant,invert,transform_point}().
2020-01-06 23:10:04 +02:00
Ell
ab0b148d79 app: add a pivot selector to the Rotate tool
Add a GimpPivotSelector widget to the Rotate tool dialog, to allow
for quickly picking a pivot.
2020-01-06 23:10:04 +02:00
Ell
0c05c33b80 app, icons: add GimpPivotSelector widget
GimpPivotSelector is a 3x3 grid of toggle buttons, used for
selecting a natural pivot position (e.g., for a transform) relative
to an item: its center, its corners, and the midpoints of its
edges.
2020-01-06 23:10:04 +02:00
Ell
2ff0235fbf app: reduce dialog size of Unified Transform tool and friends
The tool dialog of generic-transform tools (the Unified,
Perspective, and Handle Trasnform tools) shows the current
transformation matrix.  Although we might as well show *something*
in the dialog (we can't get rid of it altogether, as it provides
the common tool actions), this information is probably meaningless
for most users, and isn't directly editable anyway.

Reduce the size of the matrix, to make it less prominent, and free
up some space.
2020-01-06 23:10:04 +02:00
Ell
11fecc15ea app: in GimpTransformGridTool, compress successive undo steps
Add a boolean 'compress' parameter to
gimp_transform_grid_tool_push_internal_undo().  When TRUE,
successive undo steps added rapidly are compressed into a single
step.

In the various subclasses, compress undo steps for dialog changes,
since we push an undo step for every intermediate change for those
(such as while dragging a spin-scale).  In contrast, we only push
tool-widget undo steps upon button release, hence there's no need
to compress them.
2020-01-06 23:10:04 +02:00
Ell
dab1eb021e app: in GimpTransformGridTool, avoid unnecessarily flushing image when pushing undo
In gimp_transform_grid_tool_push_internal_undo(), only flush the
image when undo/redo availability for the tool changes, instead of
for every undo step.  This speeds things up when many undo steps
are pushed in succession, which usually happens when using the tool
GUI.
2020-01-06 23:10:04 +02:00
Ell
65d5cd5daf app: fix indentation in gimptoolsheargrid.c 2020-01-06 23:10:04 +02:00
Ell
68c250b63e libgimpwidgets: fix percentage use in size-entry arithmetic when lower-bound != 0
In GimpSizeEntry, the value corresponding to 0%, as per
gimp_size_entry_set_size(), may be non-zero.  This works correctly
when using the size entry in percentage mode, but not when using
precentage as part of arithmetic.

Fix this by adding an 'offset' parameter to eevl's unit-resolution
callback, which can be specifies a constant value to add as part
of unit conversion, after scaling the converted value by the
conversion factor.  In GimpSizeEntry, use this parameter to offset
percentages by their lower bound.
2020-01-06 23:10:04 +02:00
Cyril Richard
93f935865f Issue #4203 - Wavelet decomposition only on RGB images
Add GRAY* to the list of supported image types.

(cherry picked from commit 38cccaac49)

(not really a cherry-pick, but nice to see the resp. commit from
master)
2020-01-06 19:49:57 +01:00
Massimo Valentini
61a2d53c9d Issue 2862 - Error message. Unable to decode abr...
...format version 10.

Simply allow the parser to read version 10, seems to work
with the brushes in issue #2862.

(cherry picked from commit c39d8fde33)
2020-01-06 19:38:12 +01:00
Elle Stone
07b3acd69b Issue #3588 - Add Yu'v' (CIE 1976 UCS) to GIMP color picker
Which is a linear transform of xyY that is more perceptually
uniform, and so well-suited for eventually adding chromaticity
diagrams to GIMP color tools. ACES documentation uses this color
space instead of xyY for showing chromaticity diagrams. Moving
forward I expect other venues also will start using Yu'v' as
the advantages over xyY chromaticity diagrams are fairly obvious.

(cherry picked from commit bb660c5821)
2020-01-06 19:24:24 +01:00
woob
b419aa5d10 app: expand functionality of merge-down button
Adds a number of modifier keys to the layer dockable's new "Merge Down"
button to access further functions, and adds among them a new action to
merge visible layers using the dialog's last values, akin to those
accompanying the New Layer and Add Layer Mask dialogs.

Modifier keys are bound as follows:
  Shift -> Merge layer group
  Ctrl -> Merge visible layers
  Ctrl + Shift -> Merge visible layers from last used values

The Merge Down button is kept sensitive even when the current layer
can't be merged down to allow access to these functions

(cherry picked from commit a11ada4ce2)
2020-01-06 18:39:30 +01:00
woob
3bab2e60fa app: consolidate UI for merging down and anchoring layers (issue #1184)
As they are both mutually exclusive and serve an almost identical
purpose, the "Merge down" and "Anchor Layer" are given mutually
exclusive visibility in menus, and the anchor button is replaced
with a merge down button in the Layers dockable whenever there is
no active floating selection

(cherry picked from commit f539fc78c0)
2020-01-06 18:39:10 +01:00
Ryuta Fujii
90de27109e Update Japanese translation 2020-01-06 14:32:50 +00:00
Marco Ciampa
8ae2d8358d Updated Italian translation 2020-01-06 11:32:50 +01:00
Ryuta Fujii
94739caf31 Update Japanese translation 2020-01-06 09:43:18 +00:00
Ryuta Fujii
f1b7801f95 Update Japanese translation 2020-01-06 09:35:06 +00:00
Jehan
b69c2ef9ce app: fix missing const qualifier.
Thanks to frogonia for noticing.

(cherry picked from commit 5ec22b6720)
2020-01-01 02:24:22 +01:00
Michael Natterer
0731fa3f35 Issue #2227 - GIMP 2.10.6 crashes with assertion GIMP_IS_TAGGED in...
...MyPaint brushes dialog

In gimp_tag_entry_assign_tags(), don't add/remove tags while iterating
tag_entry->selected_items, because that might change the list. Instead,
make a temporary deep copy of the list and iterate the copy. Spotted
by Massimo.

(cherry picked from commit ff32fe9f5d)
2020-01-01 00:27:24 +01:00
Julien Hardelin
1354d37921 Update French translation 2019-12-31 11:02:56 +00:00
Julien Hardelin
66a833f8f2 Update French translation 2019-12-30 09:15:55 +00:00
lillolollo
3f76d7782a Issue #4338 Plug-in file-header exporting to format C header wrong output. 2019-12-29 21:51:51 +00:00
Michael Natterer
52d7088c46 Issue #2674 - File/Open Recent opens the wrong document
Must call gimp_action_init() from gimp_action_impl_init() or the
signal handlers to update label and tooltip will ever be installed.
Found by Massimo.

(cherry picked from commit 45ad58dff4)
2019-12-28 21:40:39 +01:00
lillolollo
923ee63b43 plug-ins cml-explorer add missing gegl_init. 2019-12-28 17:05:02 +00:00
Michael Natterer
b5ceb4610d Issue #4331 - Bevel Reflect Logo script crashes in 2.10.14
Add missing gegl_init() to map-object.
2019-12-28 17:57:54 +01:00
Rodrigo Lledó
dba4e95497 Update Spanish translation 2019-12-24 10:50:19 +00:00
Jehan
573c043bab Issue #4392: Gimp Segmentation Fault triggered by Glib GParamSpec...
... property name validation.
Previous commit fixed the parameter name validation in core code. This
commit fixes the source error in the plug-in code.
2019-12-24 01:34:29 +01:00
Jehan
4550fc1bfa Issue #4392: Gimp Segmentation Fault triggered by Glib GParamSpec...
... property name validation.
GLib tightened its GParamSpec name validation, as it used to only check
that the first letter was a letter, which triggered this issue, though
the crash could have also happened with the former lax rules too (commit
30e630c9df792cf36cdb1cceb3daefbde1dc898a).

I opened a merge request in GLib to make the validation code into a
public function. In the meantime, let's just copy-paste the validation
code into ours and when a plug-in attempts to create a procedure with
invalid parameter or return value names, GIMP will just output an error
and refuse to install the procedure instead of crashing.
See: https://gitlab.gnome.org/GNOME/glib/merge_requests/1302
2019-12-24 01:34:29 +01:00
Michael Schumacher
92fda7713b build: .gitlab-ci.yml: add xorgproto package 2019-12-21 17:07:34 +01:00
Jehan
414b76f358 NEWS: update fixed bugs list. 2019-12-21 10:31:03 +01:00
y-guyon
94b1e98767 plug-ins: WebP: save_dialog() before gimp_export()
As mentioned in issue #1777, exporting non-animated WebP images was
only keeping the current layer.
Mimick file-gif-save.c: display the encoding settings pop-up earlier
so that gimp_export_image() can merge the layers unless "As Animation"
is enabled. Call gimp_image_get_layers() directly in save_image() in
case the layers were merged (for clarity because layers are used only
for animations).

(cherry picked from commit 8f828d1899)
2019-12-21 10:20:33 +01:00
Jehan
ecf40cffdb NEWS: add fixed bug number. 2019-12-19 21:15:06 +01:00
Ryuta Fujii
feeaa819a2 Update Japanese translation 2019-12-19 15:05:00 +00:00
Ryuta Fujii
b205bd6f59 Update Japanese translation 2019-12-18 16:11:50 +00:00
Ryuta Fujii
4254fe1ed7 Update Japanese translation 2019-12-18 16:09:21 +00:00
lillolollo
f50cb339c0 Core: Fix cast to pointer from integer of different size warning on gimpbacktrace-windows.c 2019-12-01 01:33:51 +00:00
lillolollo
638ce9a585 Updating NEWS added bug resolved whit no commit reference 2019-12-01 00:45:00 +00:00
lillolollo
1ca3d99fbc tools, fix implicit declaration of function atoi warning 2019-11-30 02:06:30 +00:00
lillolollo
8f33d5ea05 apply the same master patch 2019-11-29 22:06:28 +00:00
Jehan
771304d73b libgimpbase, plug-ins: fix all warnings to g_stat() calls.
The second parameter should be GStatBuf*, which will be defined to be
the right struct depending on the actual platform. Using `struct stat*`
was good on Linux but was outputting warnings on other platforms (at
least on Win32).

(cherry picked from commit 6bc6a07b7e)
2019-11-29 23:04:12 +01:00
Dimitris Spingos
5a5069649d Updated Greek translation 2019-11-28 11:02:54 +02:00
Dimitris Spingos
1c0f128de8 Updated Greek translation 2019-11-28 10:08:23 +02:00
Jehan
5c163918a2 NEWS: update bug report list. 2019-11-24 22:27:55 +01:00
Jehan
2d25b06f6f Issue #4209: Animation optimize for GIF moves layers to top left corner.
Regression from commit 9d33a9a9ca as spotted by Massimo.

(cherry picked from commit 9a4d1f0277)
2019-11-24 22:26:36 +01:00
Jehan
73c99d8ebb NEWS: update bug list. 2019-11-22 00:29:42 +01:00
Руслан Ижбулатов
ce4865670b Windows backtrace: VEH must use stdcall
Fixes issue #2794

(cherry picked from commit cd54a8fee9)
2019-11-22 00:08:38 +01:00
Jehan
27dd38531e build: add a patch for OpenBlas on Windows.
Actual patch contributor wants confidentiality to avoid leaking
proprietary information or whatever (I am not sure either what to be
scared of as it's all good and harmless to me, but let's respect the
request). See also #4246 for more details.

(cherry picked from commit 370499676f)
2019-11-20 17:29:35 +01:00
Jehan
b67fe859a7 app, devel-docs: remove dangling DBUS_GLIB_* variables.
dbus-glib is no more a dependency since commit c4460e84, i.e. already
since 2013!

(cherry picked from commit 5f2a6940e3)
2019-11-16 19:32:35 +01:00
Jordi Mas
e177d6ce07 Update Catalan translation 2019-11-16 08:28:42 +01:00
Jehan
68d2a7f952 configure: fix typo which was breaking the build.
(cherry picked from commit 6124be59b7)
2019-11-13 13:26:08 +01:00
Jehan
0570aec5fe Issue #4185: Plug-in “file-heif.exe” crashes exporting HEIF/HEIC.
My previous test (commit 41285813a5) was a bit misinformed. So it turns
out bug #4185 is for all platforms and the broken libheif versions are
1.5.0 and 1.5.1 only.

So my new test (platform independent) is: prefer libheif versions with
profile support, except 1.5.x; then prefer lower versions without
profile support; and only as last resort accept 1.5.x versions (but
output a warning).

(cherry picked from commit f051e6d238)
2019-11-13 12:40:14 +01:00
Alexandre Prokoudine
876c781b97 Fix make check by replacing metadata-tags.h with metadata.c as spotted by grem 2019-11-12 23:46:11 +03:00
Jehan
c0c0e9afc6 Issue #2543: gimp doesn't open on debian stretch (libmypaint crash).
Known bug in libmypaint dependency. It has been fixed in libmypaint
1.4.0, which we cannot hard require unfortunately (Debian testing still
at 1.3.0).

Still let's make add a warning so that packagers are aware of the issue
and update when possible.

(cherry picked from commit 5da252ca18)
2019-11-12 17:17:33 +01:00
Jehan
8f510e68f6 configure: improve libheif detection and output.
Replace the "Heif >= 1.4.0" line in the summary output by a comment in
the "Heif" line explaining this is about profile support.

Also add a >= 1.6.0 test and output a warning for Windows and macOS (cf.
bug #4185).

(cherry picked from commit 41285813a5)
2019-11-12 15:33:28 +01:00
Jehan
7328f0eab9 po: fix missing semicolon in Basque translation.
I am not touching the translation, only the formatting for the Keywords
field in desktop file. As requested by a translation comment, all
translations of this field need to end with semicolon too (without, we
get validation warnings).

(cherry picked from commit 053fbd7da5)
2019-11-12 15:32:36 +01:00
Alan Mortensen
83dd89b9d1 Updated Danish translation of gimp-plug-ins 2019-11-12 03:30:53 +01:00
Tim Sabsch
be953fb5c0 Update German translation 2019-11-11 23:06:03 +00:00
Ell
f04d72d008 Issue #4218 - Color>Invert doesn't work on saved selection channel ...
... or copied RGB channel

In gimp_drawable_merge_filter(), make sure the drawable's source
node is constructed before applying the operation.  The
construction of the source node connects the drawable's filter
stack to the udnerlying source node (usually, the buffer-source
node), which we rely on when calling
gimp_gegl_apply_cached_operation(), since we pass
connect_src_buffer == FALSE.  Otherwise, the operation is applied
to an empty input, instead of the drawable content.

(cherry picked from commit 0e29fc1b21)
2019-11-11 19:01:40 +02:00
Ell
f16ce35f8d app: in GimpHistogram, don't initialize n_bins to 256
... it's no longer needed, and breaks the type's invariants.

(cherry picked from commit 2a292b02e3)
2019-11-11 18:18:55 +02:00
Ell
9f8e244ec1 Issue #4205 - The histogram dock scale is incorrect when an image is opened
In gimp_histogram_view_update_bins(), don't update the view's
range if there's no histogram or the histogram is empty, to avoid
discarding the existing range.  Additionally, improve the range
readjustment when the number of bins changes.

(cherry picked from commit 0c899394b4)
2019-11-11 18:18:55 +02:00
Jordi Mas
7072b77224 Update Catalan translation 2019-11-10 20:22:43 +01:00
Jehan
47a4d210ca NEWS: update. 2019-11-08 14:10:25 +01:00
Jehan
e7478071e8 Issue #4194: resolution passes from 300ppi to 72ppi after saving.
We are running gimp_image_set_imported_file() when saving, with NULL to
drop the tie with the imported file. Let's only change the default
resolutions when we actually set an imported file.

Also set the `resolution_set` flag even when it doesn't change the
current values (hence no undo or signals), for instance setting from 300
to 300 PPI. In such case, even though nothing changes, the resolution
has to still be considered as explicitly set.

In the reporter case, any one of these 2 fixes is enough.
See also commit fef9b1d2a3 (set to 72 PPI as default for imported files
only) and commit a8f552da2f (set imported file to NULL).

(cherry picked from commit 417bf199c8)
2019-11-08 14:07:51 +01:00
Alex Samorukov
04997fc0ae Replace finite() with isfinite() by default
This is part of the C standard also also causing warning on macOS.
2019-11-07 09:09:22 +00:00
Oleksii Samorukov
4cd23c64e9 Revert finite() fix as it needs to be done in pdb and configure 2019-11-06 21:16:26 +01:00
Oleksii Samorukov
aff49550ee Fix "finite() is depricated" warning on macOS 2019-11-06 17:04:35 +01:00
Jehan
03b78e97d0 plug-ins: clean all warnings on metadata plug-in.
I made the various static arrays in headers declared as extern and
defined in a separate implementation file, with additional size constant
when necessary (since G_N_ELEMENTS() cannot be used on partially
defined arrays).

Note that this is better than the original implementation, yet I am not
saying this is ideal either. I am not fond of such code organization and
think a better one could be done. But it would require to dive deeper
into this plug-in and I don't want to right now, nor have the time.

At least now it stopped shouting all these warnings!

(cherry picked from commit 31cbc7e0e6)
2019-11-06 14:27:34 +01:00
Jehan
bcf2b4c7a6 plug-ins: clean out some warnings.
This cleans just a third of the warnings in this metadata plug-in. It is
a very bad practice to define static const strings in a header file like
this, especially if this header is included in several files. Let's make
these macros.

Also why are these header tags sometimes used with the const name (now
macros), sometimes directly with the string literals? I fixed some of
these, but more string literals are lying around.

Remaining warnings are similar, about const string arrays. If really we
want this, we should declare these extern and define them in a separate
implementation file. This whole plug-in should be really reorganized and
cleaned in depth.

(cherry picked from commit 024a919c77)
2019-11-06 14:27:27 +01:00
Alexandre Prokoudine
1cc2c8c834 Update NEWS 2019-11-06 12:46:51 +00:00
Anders Jonsson
d7bc23eaa6 Update Swedish translation 2019-11-05 20:10:02 +00:00
Daniel Korostil
4133709974 Update Ukrainian translation 2019-11-05 11:43:56 +00:00
Daniel Mustieles
316419de7a Revert "Updated Spanish Translation"
This reverts commit f208485871.
2019-11-05 08:39:11 +01:00
Rodrigo Lledó
f208485871 Updated Spanish Translation 2019-11-05 08:38:22 +01:00
Jordi Mas
412e383cf0 Update Catalan translation 2019-11-04 19:32:30 +01:00
Ell
ccd5ce6cce app: add "show all" support to the Bucket Fill tool in line-art mode
In the Bucket Fill tool, when using line-art mode, use a
GimpImageProxy as input for the GimpLineArt object, instead of
using the image direclty, when the line-art source is "all visible
layers".  Set the proxy's show-all mode according to the active
shell, so that the line-art uses the full image projection,
including out-of-canvas regions, when in show-all mode.

(cherry picked from commit 43a1c33ecf)
2019-11-04 13:33:47 +02:00
Ell
e79d852d3a app: (re-)add GimpDisplayShell::show-all property
... which corresponds to the shell's show-all mode.  We'll listen
to its "notify" signal in the bucket-fill tool.

(cherry picked from commit 02654b0ac0)
2019-11-04 13:33:47 +02:00
Ell
6349453ad3 app: in GimpLineArt, ref input pickable
... in particular, so that the GimpLineArt object can take
ownership over newly-created GimpImageProxy inputs.

(cherry picked from commit c8b5c81a41)
2019-11-04 13:33:47 +02:00
Ell
c5ff92d71d app: in GimpLineArt, add support for arbitrary buffer extents
In GimpLineArt, add support for arbitrary input-buffer extents,
by shifting/unshifting the input/output buffers before/after
passing them to the main algorithm, so that the algorithm keeps
working with buffers whose top-left corner is at (0, 0).

(cherry picked from commit bce96eb690)
2019-11-04 13:33:47 +02:00
Ell
174f1ea622 app: in GimpImageProxy, implement GimpPickable
In GimpImageProxy, implement the GimpPickable interface, so that
the proxy can be used as both a viewable and a pickable for the
image projection, with direct control over the show-all mode.  This
will allow us to use a GimpImageProxy as input for a GimpLineArt.

(cherry picked from commit 0e02795128)
2019-11-04 13:33:47 +02:00
Ell
d1324ad802 app: rename GimpImageViewable to GimpImageProxy
We're going to have GimpImageProxy implement GimpPickable, so that
it can be used as either a viewable or a pickable proxy for an
image.

(cherry picked from commit 8d8cc12f40)
2019-11-04 13:33:47 +02:00
Ell
defe920d43 app: rename gimpimageviewable.[ch] to gimpimageproxy.[ch]
... in preparation for actually renaming the class, but as a
separate step to keep the history.

(cherry picked from commit 0ddd3330b8)
2019-11-04 13:33:47 +02:00
Ell
e2fe79d859 app: add gimp_image_get_preview_format()
Add an internal gimp_image_get_preview_format(), which returns the
format to use for preview buffers, and use it in both
gimpimage-preview and GimpImageViewable, to reduce duplication.

(cherry picked from commit 74009c8b1e)
2019-11-04 13:33:47 +02:00
Ryuta Fujii
c020f8791c Update Japanese translation 2019-11-03 14:35:21 +00:00
Ryuta Fujii
15a1a8c695 Update Japanese translation 2019-11-03 14:22:18 +00:00
Ell
ef17d1a5e5 Issue #4172 - Gimp doesn't store negative values between sessions (Text Tool)
In gimp_config_deserialize_fundamental(), cast integer token values
to the target value type *before* negating them, to avoid
performing unsigned negation, which can result in a positive value
when cast to the target value type (in particular, when the target
value type is float/double).

(cherry picked from commit 38fff3b6b3)
2019-11-03 13:42:10 +02:00
Sabri Ünal
639ac3fb9d Update Turkish translation 2019-11-03 02:03:10 +00:00
Sabri Ünal
2150e37dcd Update Turkish translation 2019-11-03 01:57:33 +00:00
Sabri Ünal
4f9718d311 Update Turkish translation 2019-11-03 01:56:39 +00:00
Pascal Terjan
06b61daa80 Add missing -lm to file-psd plug-in
psd-save.c uses RINT which uses floor(). Not sure why this only
caused a failure on our armv7hl build and why it used to work
but we get:

libtool: link: gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wlogical-op -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type -Wl,--as-needed -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -o .libs/file-psd psd.o psd-util.o psd-load.o psd-save.o psd-thumb-load.o psd-image-res-load.o psd-layer-res-load.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic -pthread  ../../libgimp/.libs/libgimpui-2.0.so ../../libgimpwidgets/.libs/libgimpwidgets-2.0.so ../../libgimpconfig/.libs/libgimpconfig-2.0.so ../../libgimp/.libs/libgimp-2.0.so ../../libgimpcolor/.libs/libgimpcolor-2.0.so ../../libgimpmath/.libs/libgimpmath-2.0.so ../../libgimpbase/.libs/libgimpbase-2.0.so -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lharfbuzz -lfontconfig -lfreetype -lgegl-0.4 -lgegl-npd-0.4 -lgmodule-2.0 -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lbabl-0.1 -lz -ljpeg -pthread
/usr/bin/ld: psd-save.o: undefined reference to symbol 'floor@@GLIBC_2.4'
/usr/bin/ld: /lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:756: file-psd] Error 1

And adding -lm seems the right thing to do.
2019-10-31 15:10:15 +00:00
Alex Samorukov
e13e7fd8b6 Set required variables if is running from Apple application bundle 2019-10-31 14:51:24 +00:00
Jehan
0b49a26d6a app: when interpreter not found in interpreter DB, leave shebang as-is.
In particular, if the shebang is `#!/usr/bin/env lang` and we have not
registered a specific interpreter for `lang`, the system should leave
the env tool search the right interpreter for us. We only bypass env
when we set our own explicit interpreter.

(cherry picked from commit 9e844ae1d7)

Slight modification from master commit: not applying to
palette-to-gradient.py plug-in.
2019-10-30 13:55:13 +01:00
Jernej Simončič
c860d62a63 Installer: properly remove old icons on 32-bit installs and per-user installs 2019-10-29 23:10:34 +01:00
Jernej Simončič
903170b90d Merge branch 'gimp-2-10' of gitlab.gnome.org:GNOME/gimp into gimp-2-10 2019-10-29 21:45:37 +01:00
Ell
41c37e2611 configure.ac: fix escaping of backslashes in compiler version string
There is one more level of unescaping...

(cherry picked from commit d97dd6413a)
2019-10-29 21:27:33 +02:00
Jernej Simončič
989336be64 Installer: skip .debug files when they don't exist 2019-10-29 20:20:39 +01:00
Jernej Simončič
71b83a3b69 Installer: unofficial languages, ghostscript 9.50 2019-10-29 20:18:25 +01:00
Michael Natterer
61acdb36fe configure.ac: post-release version bump to 2.10.15 2019-10-27 22:37:52 +01:00
Michael Natterer
a4f55d6c7e configure.ac: bump versions for the 2.10.14 release 2019-10-27 22:13:04 +01:00
Alexandre Prokoudine
90ab98b41d Update Russian translation 2019-10-27 22:43:47 +03:00
lillolollo
daca0a254e Update NEWS add more fixed bugs 2019-10-27 16:41:06 +00:00
Samuel Rats
f4c87c048e app: fix typo in gimptoolrectangle.c 2019-10-27 16:57:21 +01:00
Michael Natterer
ceb11d070b desktop: set appdata release date of 2.10.14 to today 2019-10-27 16:48:13 +01:00
Øyvind Kolås
775d3b1099 configure,app: depend on babl-0.1.72
(cherry picked from commit fe3e945154)
2019-10-27 06:54:09 +02:00
Øyvind Kolås
2fde53eef1 configure. app: depend on gegl-0.4.18 2019-10-27 01:43:54 +02:00
Michael Natterer
a464b1129b docs, etc: regenerate default gimprc and its manpage 2019-10-26 21:46:48 +02:00
Michael Natterer
c1f070fbc5 AUTHORS: regenerated 2019-10-26 21:46:48 +02:00
Martin Srebotnjak
8a397d92f0 Updated Slovenian translation 2019-10-26 21:45:25 +02:00
Michael Natterer
fa820e9fdd NEWS: some fixes, and re-wrap overly wide paragraphs 2019-10-26 21:44:14 +02:00
Martin Srebotnjak
5bc18c685c Updated Slovenian translation 2019-10-26 21:41:45 +02:00
Ell
6bedbe5c79 app: don't use the deprecated GTimeVal in gimp-test-session-utils.c
GTimeVal, as well as g_file_info_get_modification_time(), have been
deprecated in GLib 2.62.  Use g_file_info_get_attribute_uint64()
instead.

(cherry picked from commit 549a606b2f)
2019-10-26 22:34:51 +03:00
Michael Natterer
7caeb46e65 app: don't use the deprecated GTimeVal in file-remote.c
Use g_get_monotonic_time() instead.

(cherry picked from commit 3f84fbee1e)
2019-10-26 22:34:05 +03:00
Ell
32a11ce457 configure.ac: add AC_MSG_RESULT() for color-profile directory check
(cherry picked from commit 6b87e2f90c)
2019-10-26 22:33:49 +03:00
Alexandre Prokoudine
65f55a4f2d Update NEWS 2019-10-25 10:48:46 +00:00
Alan Mortensen
72541154c7 Updated Danish translation of gimp-script-fu 2019-10-24 23:53:21 +02:00
Alan Mortensen
17bed99e05 Updated Danish translation of gimp-python 2019-10-24 23:53:21 +02:00
Alan Mortensen
0e463419fb Updated Danish translation of gimp-libgimp 2019-10-24 23:53:21 +02:00
Alan Mortensen
d2c0829007 Updated Danish translation 2019-10-24 23:33:15 +02:00
Sabri Ünal
1ce1b0eebe CID 225792 Resource leak in script-fu-server.c
Variable ai and ai_curr going out of scope at line 496.
Variable ai going out of scope at line 545.

Revealed by Coverity Scan.
2019-10-24 15:13:35 +00:00
Piotr Drąg
a551207638 Update Polish translation 2019-10-24 15:49:15 +02:00
Ell
6239c3926f app: add babl version info to $ gimp -v
... and any other users of gimp_version().

(cherry picked from commit 211b7de729)
2019-10-24 14:01:17 +03:00
lillolollo
9985a00aef Add a fixed bug since it is not mentioned on commit message 2019-10-24 10:18:47 +00:00
Alexandre Prokoudine
e5b1f52477 Update Russian translation 2019-10-24 13:10:52 +03:00
Ell
ed1d5364a4 app, menus: add gegl:normal-map to Filters -> Generic
(cherry picked from commit 6adf77e13a)
2019-10-23 20:04:49 +03:00
Sabri Ünal
3d7d46ea97 CID: 228176 Fix a Resource leak
This patch fixes a resource leak which was discovered by Coverity Scan.
2019-10-23 12:32:11 +00:00
Ell
412fa7822b app: avoid spurious channel switch in histogram editor when switching drawbles
Add an n_components parameter to gimp_histogram_clear_values(),
which allows to set the new component count when clearing the
histogram.  This is useful to seed the histogram with the correct
number of channels, for display purposes, before starting an async
histogram calculation.  We use this in GimpHistogramEditor, to
avoid resetting the view's channel back to "Value" each time the
active drawable changes.

(cherry picked from commit eb6f544c18)
2019-10-22 16:12:53 +03:00
Ell
ed40f0763e app: fix gimp_hisotgram_n_components() for empty histograms
(cherry picked from commit 8bd4ae34f5)
2019-10-22 16:12:53 +03:00
Ell
a2fe44ed8c app: streamline GimpHistogram; avoid spurious channel switch in histogram view
In GimpHistogram, get rid of the "n-channels" property and
corresponding gimp_histogram_n_channels() function.  The former
returned the actual number of channels, but this wasn't too useful,
as channel values may not be sequential; the latter returned the
number of components.  Instead, add an "n-components" property and
a corresponding gimp_histogram_n_components() function, both of
which return the number of components.  Furthermore, add a
gimp_histogram_has_channel() function, which determines if the
histogram has a given channel; this allows for simple testing for
channel availability, which was done wrong in various places.

Adjust the GimpHistogram code for the changes, and clean it up,
fixing a few bugs.

Adjust users of GimpHisotgram for the changes.  In particular,
in GimpHisotgramView, fix the channel-availability test when
setting the view's histogram (which happens whenever the active
drawable's preview is frozen), to avoid erroneously swithcing the
view's channel back to "Value" when a non-RGB channel is selected.

(cherry picked from commit fc17f0ed0c)
2019-10-22 15:50:24 +03:00
Jehan
82c0b69b79 NEWS: keep up-to-date. 2019-10-20 19:50:36 +02:00
Jehan
e729d0b6bb Issue #4119: GIMP main window not restored from Taskbar under MS Windows
Tested in a VM. Minimized window is properly deiconified and showed to
the front. Though a window in the back (not minimized) is not moved to
the front.

(cherry picked from commit 2f01751907)
2019-10-20 19:48:20 +02:00
Sabri Ünal
aeadaaeb6c CID 225808 Arguments in wrong order
Swapped arguments: height is passed to width. width is passed to height.

Please check the function in /app/core/gimpbrush.c at line: 606

void
gimp_brush_transform_size (GimpBrush     *brush,
                           gdouble        scale,
                           gdouble        aspect_ratio,
                           gdouble        angle,
                           gboolean       reflect,
                           gint          *width,
                           gint          *height)
2019-10-20 13:06:19 +00:00
Sabri Ünal
c326552872 225614 Copy-paste error
Copy-paste error: extensions in proc->extensions looks like a copy-paste error.
Should it say prefixes instead?
2019-10-20 12:47:15 +00:00
Sabri Ünal
a7a18cc83f CID 228074: Missing varargs init or cleanup in file-tiff-io.c
missing va_end: va_end was not called for ap_test.
2019-10-20 10:32:57 +00:00
Sabri Ünal
c5f597d5c0 Checking wrong sizeof in gimpmetadata.c
"Buffer 'strdata' is being written before its old content has been used."
2019-10-19 22:41:21 +00:00
Sabri Ünal
e6b0b992df CID 228155: Resource leak in file-tga.c
Variable fp going out of scope leaks the storage it points to.
2019-10-19 22:11:26 +00:00
Sabri Ünal
477c9458ab CID 227971: Resource leak
Leaked storage: Variable infile going out of scope leaks the storage it points to

Discovered by Coverity Scan.
2019-10-19 21:53:25 +00:00
Sabri Ünal
31001d9f29 CID 228166: Resource leak in file-raw-data.c
Overwriting fp in fp = fopen(newfile, "wb") leaks the storage that fp points to.
2019-10-19 21:29:18 +00:00
Rodrigo Lledó
76227d2642 Updated Spanish Translation 2019-10-14 08:44:53 +02:00
Rodrigo Lledó
6d9e3d4fd1 Update Spanish translation 2019-10-14 06:38:22 +00:00
Alexandre Prokoudine
419c7eda3c Update NEWS for translations and translators 2019-10-12 20:47:44 +00:00
Jehan
b30be4bc61 NEWS: also add info about change of defaults for pixel density.
Such logics change is worth being listed here.
2019-10-12 17:35:20 +02:00
Jehan
86ccfc90c3 NEWS: update with added fixed bug reports. 2019-10-12 17:15:39 +02:00
Jehan
3a34f80d45 Issue #4068: default pixel density should be 72.0 for loaded images.
New images should obviously still default to the template pixel density
(defaulting to 300.0 PPI when no specific template is selected).

Loaded images though should use a more conservative default of 72 PPI,
first because this is what other software defaults to when no density is
set (so we should keep consistent when possible), and this is also what
the Exif standard (I checked both last version 2.32, and older 2.3)
recommends when no resolution is set.

Technically we differentiate a loaded from a newly created image by
whether or not an imported_file has been set. Of course, any explicitly
set resolution will always override whatever default.

(cherry picked from commit fef9b1d2a3)
2019-10-12 17:12:15 +02:00
Jehan
32235fba15 Issue #4049: Colour fill on Line Art Detection misaligned when…
… different layer size/location used.

We need to use the source coordinate space when generating the first
fill buffer, then transform to the target layer coordinate space when
applying the drawable filter.

(cherry picked from commit 16d9c1f00d)
2019-10-12 17:12:01 +02:00
Jehan
98e955aebf libgimpwidgets: check error return for gtk_icon_theme_load_icon().
In gimp_page_selector_add_frame(), if "gimp-frame" icon cannot be loaded
(which should not happen, but reality can always strike back!), we want
to abort from gimp_page_selector_add_frame() immediately.

Also as a consequence, its return value might be NULL, hence should be
freed with g_clear_object() instead.

This happened here because of broken meson rules (which didn't install
this icon) and ended up in forever looping errors when loading a
multi-page PDF (pages are shown in frames in a dialog):

> (file-pdf-load:12348): GdkPixbuf-CRITICAL **: 11:59:28.513: gdk_pixbuf_copy_area: assertion 'src_pixbuf != NULL' failed

(cherry picked from commit 9dcdf37ab3)
2019-10-12 17:11:52 +02:00
Jehan
03491efa81 libgimp: fix a type cast warning (win32).
I had this warning when cross-building for Windows 64-bit:

> libgimp/gimpui.c:187:52: warning: passing argument 2 of
> 'gdk_win32_window_foreign_new_for_display' makes pointer from integer
> without a cast [-Wint-conversion]

> note: expected 'HWND' {aka 'struct HWND__ *'} but argument is of type 'guint32' {aka 'unsigned int'}

(cherry picked from commit cf6dae6f83)
2019-10-12 17:11:33 +02:00
Jehan
dfda00d5f7 app: fix "Result is not floating-point (UNINTENDED_INTEGER_DIVISION)".
See #3996.
This was a warning raised by the Coverity scan on one of the lines. I
fix also in the same time other arithmetics mixing int and double.
Better be thorough.
The specific warning was on:
> circ = 2.0 * G_PI * (private->width / 2)
where the division was integer, which was probably not intended. Of
course that error (display item only) was likely barely visible anyway,
still…

(cherry picked from commit c809e221ec)
2019-10-12 17:09:57 +02:00
Jehan
7d649189d6 devel-docs: update a reference to 32-bit pointers.
Though the description of the POINTER type clearly tells of the new type
size, it was still refered as 32-bit only in this introductory text.
Let's fix this.

(cherry picked from commit 35f55ef07a)
2019-10-12 17:09:38 +02:00
Asier Sarasua Garmendia
2d925a7986 Update Basque translation 2019-10-12 07:55:41 +00:00
Asier Sarasua Garmendia
c3378eb8f9 Update Basque translation 2019-10-12 07:48:05 +00:00
Asier Sarasua Garmendia
e3a7ace384 Update Basque translation 2019-10-12 07:34:57 +00:00
Asier Sarasua Garmendia
f29b5b1986 Update Basque translation 2019-10-12 06:59:30 +00:00
Asier Sarasua Garmendia
9892273c7c Update Basque translation 2019-10-11 19:42:35 +00:00
Asier Sarasua Garmendia
d6c5e30b65 Update Basque translation 2019-10-11 19:06:20 +00:00
Tim Sabsch
364fdecec8 Update German translation 2019-10-11 18:20:13 +00:00
Andika Triwidada
76414ed3a5 Update Indonesian translation 2019-10-11 07:55:26 +00:00
Asier Sarasua Garmendia
c4ce471fc9 Update Basque translation 2019-10-11 07:04:04 +00:00
Sabri Ünal
fc55ee23c6 Update Turkish translation 2019-10-10 15:03:22 +00:00
Sveinn í Felli
663fa8e7a5 Update Icelandic translation 2019-10-10 13:05:59 +00:00
Sveinn í Felli
b6c5a02008 Update Icelandic translation 2019-10-10 12:52:56 +00:00
Rodrigo Lledó
13ae54c876 Update Spanish translation 2019-10-07 07:11:51 +00:00
Rodrigo Lledó
c7bfcbae96 Update Spanish translation 2019-10-07 07:08:39 +00:00
Piotr Drąg
627014c17c Update Polish translation 2019-10-06 12:54:06 +02:00
Rūdolfs Mazurs
fe91d99034 Update Latvian translation 2019-10-05 20:07:36 +00:00
Rūdolfs Mazurs
e6ce73d5e1 Update Latvian translation 2019-10-05 20:04:53 +00:00
Rūdolfs Mazurs
0e952a58d5 Update Latvian translation 2019-10-05 19:59:29 +00:00
Rūdolfs Mazurs
317d692d32 Update Latvian translation 2019-10-05 19:34:42 +00:00
Rūdolfs Mazurs
907943e1c2 Update Latvian translation 2019-10-05 19:29:22 +00:00
Michael Natterer
2973f74c2d Issue #4008 - Ellipsis missing in File -> Page Setup
Add the missig ellipsis.
2019-10-05 12:26:45 +02:00
Ell
4c55475af9 app: restore behavior of gimp_gegl_apply_operation() with NULL src_buffer
Restore the behavior of gimp_gegl_apply_operation() prior to
11629fde66 when src_buffer is NULL:
keep the existing operation-node input, instead of using an empty
input.  Unlike gimp_gegl_apply_cached_operation(),
gimp_gegl_apply_operation() doesn't have an explicit
connect_src_buffer parameter.

This fixes empty output when merging layers.

(cherry picked from commit 076d9b2a28)
2019-10-05 09:43:27 +03:00
Ell
b89ad56a35 app: don't extend layers with no alpha channel when applying filters
In GimpFilterTool, don't provide a clipping option for layers with
no alpha channel, and always clip the result to the layer bounds,
since the extended regions of the result usually require alpha to
be meaningful.

Similarly to last commit, the ideal solution would be to
automatically add an alpha channel as necessary.

(cherry picked from commit 4b58e178a5a4206cd84ae6402a967862897f14bb)
2019-10-03 22:21:36 +03:00
Ell
ada1a3cf69 app: clip floating selection to layers with no alpha channel
Alawys clip a floating selection to its base layer, if the layer
has no alpha channel.  This avoids arbitrarily filling the extended
regions of the layer with, or compositing the floating selection
against, black color.

This is a temporary solution.  Ideally, we'd automatically add an
alpha channel to the layer as necessary.

(cherry picked from commit 7a8c79e7e75812d683430be163950b68a3d3498a)
2019-10-03 22:20:46 +03:00
Ell
3bb181cb03 app: update drawable bounding box when detaching floating selection
(cherry picked from commit 783b475b7b)
2019-10-03 21:31:28 +03:00
Ell
97c549198e app: avoid dropping cached data when committing filters
In gimp_gegl_apply_cached_operation(), add a boolean
connect_src_buffer parameter, which determines whether to connect
the source buffer to the operation-node's input, or to use its
existing input.  In gimp_drawable_merge_filter(), pass FALSE for
connect_src_buffer, so that the existing filter-node input is used.
This produces an equivalent result, however, it avoids invalidating
the filter node, and dropping cached data as a result.  In
operations that cache larger areas than the ROI, this avoids
reprocessing already-cached data when processing the rest of the
operation.

Additionally, in gimp_gegl_apply_cached_operation(), use an empty
input for the operation if src_buffer is NULL and
connect_src_buffer is TRUE; previously, we'd use the operation-
node's existing input when src_buffer was NULL.  Furthermore, crop
the operation-node's input to the destination rect when crop_input
is TRUE, even if connect_src_buffer is FALSE.

(cherry picked from commit 11629fde66)
2019-10-03 20:12:23 +03:00
Ell
eb0cf2d3f5 app: update drawable bounding box when floating-selection bounding box changes
When the bounding box of a floating selection changes, update the
bounding box of the associated drawable, since floating selections
are no longer clipped to the drawable's bounds in general.

(cherry picked from commit ec6bbd1937)
2019-10-02 21:35:23 +03:00
Ell
862821b98f app: fix CRITICAL when translating selected content
Fix a CRITICAL when creating a floating selection by Alt-dragging a
selection using one of the selection tools.

(cherry picked from commit 1e9bf288ba)
2019-10-02 18:38:05 +03:00
Ell
72eeee39db Issue #2837 - Floating selection is clipped to base layer
When attaching a floating selection to a layer, don't clip the
floating selection to the layer's boundary, and instead resize the
layer to include the entire floating selection when it's anchored.
As per the last commit, this can be prevented by locking the
layer's position.

(cherry picked from commit 64b979c2f3)
2019-10-02 18:22:28 +03:00
Ell
58e486ad93 app: don't resize layer when applying filter if its position/size are locked
When applying a filter to a layer whose position and size are
locked, avoid resizing the layer to the result size in ADJUST mode.
We do this by always returning GIMP_TRANSFORM_RESIZE_CLIP in
gimp_item_get_clip() when the position is locked, and properly
updating the drawable-filter's clip mode, and the filter-tool's UI,
when the position lock changes.

(cherry picked from commit 6ed6cd78d8)
2019-10-02 18:22:27 +03:00
Ell
b8177906a2 app: fix use of Clone tool with "sample merged" across images
In GimpSourceCore, when "sample merged" is enabled, derive the
source pickable from the source drawable's image according to the
paint-core's show-all flag manually, instead of using
gimp_paint_core_get_image_pickable(), which uses the destination
image, and would therefore only work when the source and
destination images are the same.

In GimpSourceTool, override GimpPaintTool::paint_prepare() to set
the paint-core's show-all flag according to the source display,
rather than the destination display.

(cherry picked from commit aa02f1f35c)
2019-10-02 17:16:00 +03:00
Ell
8f290dccce app: add GimpPaintTool::paint_prepare() vfunc
... which is called when starting to paint, before the tool's
paint-core is started, allowing the tool to configure the core.
Move the call to gimp_paint_core_set_show_all() to the default
implementation of paint_prepare().

(cherry picked from commit ffd6c2eda2)
2019-10-02 17:16:00 +03:00
Ell
78aeba77e2 app: add missing SET_SENSITIVE() for new filter actions
(cherry picked from commit 6b8ffd419d)
2019-10-01 19:03:26 +03:00
Ell
08f59073de Issue #3994 - Artifacts when committing half-cached filters
In gimp_gegl_apply_cached_operation(), when applying a non-point
filter with the same source and destination buffers, render the
result to a temporary buffer to avoid chunking artifacts.  We'd
previously duplicate the source buffer instead (with commit
35729ee02a erroneously copying the
cached results to the source/destination buffer before duplicating
it, causing this bug), but we now use a temporary result buffer
instead; this has roughly the same overhead, but would allow us to
keep the original operation-node input when committing a drawable
filter in a future commit, which would avoid dropping any cached
data.

(cherry picked from commit 88c6f8296d)
2019-09-30 10:25:19 +03:00
Piotr Drąg
f4e6fbdbbe Update Polish translation 2019-09-29 16:15:39 +02:00
Martin Srebotnjak
c5e0559291 Updated Slovenian translation 2019-09-28 21:18:59 +02:00
Martin Srebotnjak
5581a2f668 Updated Slovenian translation 2019-09-28 21:12:50 +02:00
Chao-Hsiung Liao
7c1ec07e3b Update Chinese (Taiwan) translation 2019-09-28 10:34:29 +00:00
Ell
dd1525cf75 app: add missing change to last commit
(cherry picked from commit 24731851e4)
2019-09-28 11:36:30 +03:00
Ell
a93d410916 app: avoid updating image bounding box multiple times when reordering layer
Add internal gimp_image_{freeze,thaw}_bounding_box() functions, and
use them in gimp_image_reorder_item() to avoid updating the
bounding box multiple times while moving a layer across group
boundary, to prevent flickering.

(cherry picked from commit a6ebbfe317)
2019-09-28 11:14:16 +03:00
Ell
e4c7f869c4 app: update image bounding box when moving layer inside/outside of group
In GimpImage, update the image's bounding box in response to the
layer container's "add" and "remove" signals, instead of during
gimp_image_{add,remove}_layer(), so that the bounding box is
properly updated when moving an existing layer inside/outside of a
layer group, instead of only when adding/removing a new layer.

Even though moving a layer across group boundary doesn't change the
overall image bounding box, it does change the group's bounding
box, affecting the image bounding box.  It's therefore necessary to
update the image bounding box again when the layer is re-added to
the layer stack, so that the bounding box doesn't get stuck in an
intermediate state.

(cherry picked from commit 2a753170b9)
2019-09-28 11:14:16 +03:00
Ell
6a1474677d app: fix offset handling in spiral gradients
In gimp:gradient, properly scale the "offset" property in spiral
graidnets.

(cherry picked from commit 04280690b2)
2019-09-27 16:07:52 +03:00
Sabri Ünal
a19f03486e --verbose messages don't need to be translatable. 2019-09-26 23:56:41 +00:00
Jehan
98989f1cde po-plug-ins: remove duplicate 'es' language.
Added in commit cf12a423ac. I assume this
was an error. Thanks to Piotr Drąg for noticing.
2019-09-27 01:24:55 +02:00
Jehan
8a400e304f Issue #3990: make the status of the XCF docs a bit clearer (hopefully).
Though it may have started as an unofficial document, it is clearly now
an official one (which should be obvious since it is in our source
repository, but apparently some people get misled by the historical
"Status" text to think this to be somehow unofficial).
So first of all, change the s/official/unofficial/ mention.

Secondly, add a small paragraph explicitly telling that the document is
complete (and meant to be), to the best of our knowledge. This document
is a detailed, full and exhaustive written "specification" of the XCF
format up to GIMP 2.10.x (even though the normative spec is still the
code itself). Now we are humans, we may have missed something, and if
so, this is just to be considered as any other bug, and reported to us
nicely to be fixed.

(cherry picked from commit 80e2e0a508)
2019-09-27 01:22:34 +02:00
Martin Srebotnjak
339b80aa15 Updated Slovenian translation 2019-09-26 20:47:31 +02:00
Martin Srebotnjak
30448c002c Updated Slovenian translation 2019-09-26 20:46:44 +02:00
Martin Srebotnjak
c0f3521e36 Updated Slovenian translation 2019-09-26 20:44:48 +02:00
Martin Srebotnjak
a7f308d276 Updated Slovenian translation 2019-09-26 20:44:01 +02:00
Rodrigo Lledó
47127c78e3 Update Spanish translation 2019-09-24 12:51:06 +00:00
Michael Natterer
871b9fedae libgimp: fix gimp_image_metadata_save_prepare()'s check for IPTC flags
it was checking gimp_export_xmp() not gimp_export_iptc(), probably a
copy/paste error.

(cherry picked from commit 70ac0e9d9a)
2019-09-24 12:14:28 +02:00
Daniel Mustieles
cf12a423ac Add Spanish translation 2019-09-23 14:08:26 +00:00
Daniel Mustieles
d1d8ffaa23 Updated Spanish Translation 2019-09-23 16:06:49 +02:00
Daniel Mustieles
a572718f71 Update Spanish translation 2019-09-23 14:03:15 +00:00
Alexandre Prokoudine
9d925aa629 Update NEWS 2019-09-23 00:15:24 +03:00
Ell
b7f1b1fbe9 app: add offset support to shaped gradients
In gimp:gradient, handle the "offset" property in shaped gradients.

(cherry picked from commit 6bd5deea89)
2019-09-22 21:59:19 +03:00
Ell
7c51194cc1 po: add gimpcompressioncombobox.c to POTFILES.in
(cherry picked from commit beeaec5670)
2019-09-22 18:17:36 +03:00
Ell
4e71435112 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.

(cherry picked from commit 5cc289b642)
2019-09-22 18:07:11 +03:00
Ell
d5e78f1899 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.

(cherry picked from commit 1664ecbf1d)
2019-09-22 17:42:23 +03:00
Piotr Drąg
eb386d2d5e Update Polish translation 2019-09-21 12:58:31 +02:00
Alexandre Prokoudine
740571401f Merge branch 'gimp-2-10' of https://gitlab.gnome.org/GNOME/gimp into gimp-2-10 2019-09-21 12:42:48 +03:00
Alexandre Prokoudine
f00fdab055 Update Russian translation 2019-09-21 12:42:20 +03:00
Claude Paroz
a8740ee510 Updated French translation 2019-09-21 10:55:26 +02:00
Ell
bafb44064b 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.

(cherry picked from commit e7479cad47)
2019-09-19 20:24:49 +03:00
Ell
7132dd0355 app: handle buffers with arbitrary origin in gimp_layer_new_from_gegl_buffer()
... by translating the layer according to the buffer's origin.

(cherry picked from commit 6ef21ed1f0)
2019-09-19 20:24:49 +03:00
Ell
b67efd4b6c 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.

(cherry picked from commit 71f42f6675)
2019-09-19 20:24:49 +03:00
Julien Hardelin
fd631a37c2 Update French translation 2019-09-19 14:46:09 +00:00
Ell
bb8a3b94cc 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.

(cherry picked from commit 7d2e872f4f)
2019-09-19 17:39:39 +03:00
Julien Hardelin
b2e6468e0c Update French translation 2019-09-19 14:22:03 +00:00
Rafael Fontenelle
4bd55696ec Update Brazilian Portuguese translation 2019-09-18 22:26:25 +00:00
Massimo Valentini
a997027da4 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.

(cherry picked from commit 9f85efd825)
2019-09-18 13:17:03 +03:00
Jehan
dc9e147b60 desktop: use better wording by prokoudine in Appdata file.
Just merge a bit with the "Title: info" formatting of other items.
2019-09-17 19:33:57 +02:00
Jehan
3313bfc9d3 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.

(cherry picked from commit 46e96a413d)
2019-09-17 19:31:46 +02:00
Jehan
8940e1db0b 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. :-)

(cherry picked from commit 8cdcaa4ef1)
2019-09-17 19:31:46 +02:00
Jehan
cde574ba20 Revert "Fix typo on appdata changelog, spotted by Sabri Ünal"...
and "Mention Show All option in the appdata changelog".

This reverts commit 57f5861ec4
and commit f203e92aa2.

The master AppData file is the one in master branch and should be kept
in sync. Even for 2.10.x release, this should have been pushed to master
then cherry-picked to gimp-2-10 (or the opposite as long as both
branches are synced).
Now I need to revert these to fix branch divergence. I will merge back
the wording by prokoudine in a later commit.
2019-09-17 19:30:42 +02:00
Sabri Ünal
51d924ef18 Update Turkish translation 2019-09-16 19:00:27 +00:00
Sabri Ünal
86a77ff07c Update Turkish translation 2019-09-16 18:58:46 +00:00
Piotr Drąg
34fec88a53 Update Polish translation 2019-09-16 20:34:40 +02:00
Alexandre Prokoudine
74de3ef229 NEWS: add code contributors and translators for 2.10.14 2019-09-16 20:42:38 +03:00
Michael Schumacher
c1da126a42 tools: add gimp-release-notes.sh to generate Contributors and Translators sections for NEWS 2019-09-16 18:43:55 +02:00
Alexandre Prokoudine
57f5861ec4 Fix typo on appdata changelog, spotted by Sabri Ünal 2019-09-16 18:02:07 +03:00
Alexandre Prokoudine
e7aed5cac0 Update NEWS: more info on out-of-canvas stuff, more bugfixes mentioned 2019-09-16 14:27:59 +03:00
Jehan
8d3e70aadc NEWS: add many forgotten changes.
I'm sure I missed many more. Please everyone, if you made news-worthy
changes, write them down in NEWS!
2019-09-16 11:57:37 +02:00
Jehan
414a9a7f49 plug-ins: mask the 3 "Converts *" procedure from file-dds plug-in.
See equivalent commit ccc8224aa9 in master
(couldn't cherry-pick as code changed too much with new API obviously).

Let's also hide these procs even in gimp-2-10, because that's how much
these don't really make sense for a core plug-in IMO.
2019-09-16 11:13:15 +02:00
Jehan
1f1b189e31 NEWS: update. 2019-09-16 10:53:00 +02:00
Jehan
50b1c19f36 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.

(cherry picked from commit 8fa7b5bc74)
2019-09-16 10:50:34 +02:00
Sergio Jiménez Herena
6789a4350c issue #2221: gimptool should install plug-ins into subfolders
(cherry picked from commit 283ec1da0f)
2019-09-16 10:50:26 +02:00
Alexandre Prokoudine
f203e92aa2 Mention Show All option in the appdata changelog 2019-09-16 00:59:39 +03:00
Alexandre Prokoudine
28dc82e6f9 Update Russian translation 2019-09-16 00:16:56 +03:00
lillolollo
bf5a0460f1 avoid conflict with win32 macro 2019-09-15 18:18:10 +00:00
Ell
dcfbc877ac app: behave as if "show all" is disabled in GimpCanvasPassePartout when keeping padding 2019-09-15 16:41:36 +03:00
Ell
be2c6d139f app: behave as if "show all" is disabled in GimpCanvasGrid when keeping padding 2019-09-15 16:41:36 +03:00
Ell
f5fab1daa6 app: behave as if "show all" is disabled in the navigation dockable when keeping padding 2019-09-15 16:41:36 +03:00
Ell
6088a747c0 app: behave as if "show all" is disabled in edit/buffers/DnD actions when keeping padding 2019-09-15 16:41:35 +03:00
Ell
f7582614f4 app: behave as if "show all" is disabled in scroll/zoom actions when keeping padding 2019-09-15 16:41:35 +03:00
Ell
c8df81692c 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:41:35 +03:00
Jehan
bb70b268e1 gitlab-ci: our CI base system (Arch) fixed their libmypaint package.
See: https://bugs.archlinux.org/task/62468
(cherry picked from commit 035802c5a6)
2019-09-15 14:37:52 +02:00
Anders Jonsson
5599dcb5a6 Update Swedish translation 2019-09-14 20:50:15 +00:00
Anders Jonsson
f101f10d4c Update Swedish translation 2019-09-14 17:37:16 +00:00
Marco Ciampa
93c1a6bf46 Updated italian translation 2019-09-14 16:41:52 +02:00
Hannie Dumoleyn
d7e068451f Update Dutch translation 2019-09-14 08:25:23 +00:00
Hannie Dumoleyn
a668d0a1a1 Update Dutch translation 2019-09-14 08:23:15 +00:00
Hannie Dumoleyn
3504e46950 Update Dutch translation 2019-09-14 08:21:45 +00:00
Hannie Dumoleyn
040c294b0b Update Dutch translation 2019-09-14 08:19:57 +00:00
Marco Ciampa
54ecc77787 Updated Italian translation 2019-09-13 13:57:32 +02:00
Ell
d3e1f50b13 app, meson.build: fix a bunch of warnings in C++ files
(cherry picked from commit 4fc345183b)
2019-09-12 20:05:45 +03:00
Ell
f8432a6dc9 tools: add mnemonic-clashes to EXTRA_DIST
(cherry picked from commit f0a8a5b67b)
2019-09-12 18:17:12 +03:00
Ell
c526f7f7a0 tools: add mnemonic-clashes tool
Add a new mnemonic-clashes tool, which checks for mnemonic clashes
in menus.  This tool can be invoked directly from the shell.  It
takes an optional parameter which limits the search to a specific
type of menus, according to their xml tag (in particular, "menu"
for regular menus, and "popup" for popup menus).

(cherry picked from commit a2a7fc993c)
2019-09-12 17:56:49 +03:00
Ell
10b05d42df 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.

(cherry picked from commit 1b3c1fb9cb)
2019-09-10 17:56:03 +03:00
Ell
0b6c63c0cc 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.

(cherry picked from commit 2c9a8a567b)
2019-09-10 15:16:13 +03:00
Sabri Ünal
a0255fc199 Update Turkish translation 2019-09-09 12:32:03 +00:00
Sabri Ünal
f6ed38876d Update Turkish translation 2019-09-09 12:30:50 +00:00
Sabri Ünal
42dc4d7a55 Update Turkish translation 2019-09-09 12:29:32 +00:00
Sabri Ünal
1dd6c01cb7 Update Turkish translation 2019-09-09 12:21:46 +00:00
Daniel Mustieles
ea51feff15 Update Spanish translation 2019-09-09 07:52:25 +00:00
Rodrigo Lledó
36fd07734b Update Spanish translation 2019-09-09 06:51:49 +00:00
Piotr Drąg
0cf0e9e624 Update Polish translation 2019-09-08 12:06:54 +02:00
Balázs Úr
ef6842bd8c Update Hungarian translation 2019-09-07 18:07:12 +00:00
Balázs Meskó
21075365c4 Update Hungarian translation 2019-09-07 18:03:10 +00:00
Balázs Meskó
1489a75152 Update Hungarian translation 2019-09-07 17:53:05 +00:00
Balázs Meskó
1d6508920f Update Hungarian translation 2019-09-07 17:42:45 +00:00
Ell
7c69bdad4f pdb: add $since info to gimp-image-merge-layer-group
(cherry picked from commit 85704c6c46)
2019-09-07 10:55:33 +03:00
Ell
0c85a0b3e4 Issue #3893 - Error message when exporting to to TIF if there is a layer mask on a group
When exporting to a format that supports layers, but doesn't
support layer masks, merge layer groups with a mask before applying
their mask, since masks can't be applied to layer groups.

(cherry picked from commit 643279bd31)
2019-09-07 10:43:30 +03:00
Ell
b4635741e6 pdb: add gimp-image-merge-layer-group procedure
Oddly, we didn't have this one yet :P

(cherry picked from commit 62a6023b27)
2019-09-07 10:42:32 +03:00
Ell
d8622989e3 app: fix empty mask when duplicating a group layer
In gimp_group_layer_mask_changed(), avoid recalculating the group's
bounding box if it hasn't been calculated yet, since, not only is
this unnecessary in this case, but it causes the group's mask to
be erroneously clipped upon duplication, when set by
gimp_layer_duplicate() while the group is still empty.

(cherry picked from commit 184762cd81)
2019-09-07 10:37:24 +03:00
Massimo Valentini
cbc8c7f17c Issue 2708: Animation playback detach and zoom 2019-09-07 01:41:32 +02:00
Massimo Valentini
1fc5ff4ed0 Issue 3100: cage transform tool -> always blurred without any action
Makes sure the tool doesn't offset everything by 0.5 pixels.

(cherry picked from commit 44cc7d239e)
2019-09-07 01:25:04 +02:00
Massimo Valentini
34f6e75d37 Issue 2873 - Missing menu text on Image Map filter
Add action labels missing after replacing stock items with icon names
and replace "<control>" shortcut designation with "<primary>"

(cherry picked from commit 32afd4cb3e)
2019-09-07 00:59:35 +02:00
Michael Schumacher
3755f9c9f1 build: add GitLab CI .gitlab-ci.yml file 2019-09-06 20:01:16 +02:00
Ell
10e6a3b309 app: add "show all" support to the Perspective Clone tool
... by adapting GimpPerspectiveClone to handle buffers with
arbitrary extents.  Note that the tool doesn't seem to work well in
"sample merged" mode to begin with, but this is unrelated.

(cherry picked from commit 19c693a937)
2019-09-06 20:10:47 +03:00
Ell
e372cc185f app: add "show all" support to the Clone tool
... by using gimp_paint_core_get_image_pickable() in
GimpSourceCore, and adapting it to handle source buffers with
arbitrary extents.

(cherry picked from commit c5bf595fe6)
2019-09-06 20:10:46 +03:00
Ell
9fe7177bc7 app: add "show all" support to the Smudge tool
... by using gimp_paint_core_get_image_pickable() in GimpSmude.

(cherry picked from commit 84656cb3d4)
2019-09-06 20:10:45 +03:00
Ell
86ecd4d04f app: add gimp_paint_core_{set_show_all,get_image_pickable}()
GimpPaintCore operates indipendently of a display, and hence needs
to be explictly told when operating in "show all" mode, affecting
the result of paint tools operating in "sample merged" mode.  Add
gimp_paint_core_set_show_all() for that purpose, and call it,
passing the current display's "show all" mode, in GimpPaintTool.
This controls which pickable (the image itself, or its projection)
is used as the sampling source, as per
GimpPaintCore::saved_proj_buffer, and as returned by the new
gimp_paint_core_get_image_pickable() function.

(cherry picked from commit 2523808e4a)
2019-09-06 20:10:45 +03:00
Michael Natterer
2d5f759ac1 Issue #3655 - Cannot edit long lines of metadata (no scroll bar)
Set the crollbar policy to automatic.
2019-09-06 17:35:53 +02:00
Massimo Valentini
19a8e76339 Issue 2206: Error message when opening "MULTICHANNEL" PSD...
...files (file attached)

(cherry picked from commit 0a1e9d1190)
2019-09-06 17:27:15 +02:00
Michael Natterer
07f8662dc0 Revert the *enums.c part of the last commit
- it was changing generated files
- no dialog-specific mnemonics on generic enum labels
2019-09-06 09:46:48 +03:00
Ell
09c7714021 app: add "show all" support to the bucket-fill tool in "fill similar colors" mode
In the bucket-fill tool, allow using the tool outside the canvas
bounds with "sample merged" active in "fill similar colors" mode,
when the current display is in "show all" mode.  Additionally,
ignore "sample merged" in "fill whole selection" mode, on which it
has no effect.

(cherry picked from commit 17f8cff6f6)
2019-09-05 18:04:22 +03:00
Ell
897426c4e1 app: in gimp_pickable_contiguous_region_by_seed(), add support for arbitrary buffer extents
(cherry picked from commit 99759a57e8)
2019-09-05 18:04:21 +03:00
Ell
f4b179c09e app: in gimp_gegl_mask_bounds(), add support for arbitrary buffer extents
(cherry picked from commit 6df0be91ba)
2019-09-05 18:04:21 +03:00
Ell
16c676809c app: fix gimp_gegl_mask_bounds()
(cherry picked from commit ddbff867a1)
2019-09-05 18:04:20 +03:00
Sabri Ünal
4b607550cb Missing mnemonics on Preferences 2019-09-05 12:47:06 +00:00
Sabri Ünal
a02958c5ce 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-05 12:46:14 +00:00
Sabri Ünal
35df110a05 Missing mnemonics on several dialogs
paste as brush, paste as pattern, select to new brush, select to new pattern
fill selection outline, fill path, stroke selection, distort, rounded rectangle
indexed color conversion, merge visible layers, new guide, new guide (by percent)
image properties, newsprint, fractal explorer, sample colorize, new layer

metadata editor (just a button), spyroplus (only common buttons)
2019-09-05 12:44:17 +00:00
Alexandre Prokoudine
9eb579aa08 More updates to Russian translation 2019-09-05 15:04:45 +03:00
Alexandre Prokoudine
45f91ae188 Update Russian translation 2019-09-05 14:47:25 +03:00
Ell
668d8b2ee1 app: update image-projection priority rect when switching displays
Update the image-projection priority rect to the current display's
viewport when the display becomes active, so that the right region
is rendered first when switching between different displays of the
same image.

(cherry picked from commit 582930aa61)
2019-09-05 13:56:46 +03:00
Ell
a9ed7767cf app: make "show canvas boundary" insensitive when "show all" is disabled
... since the canvas boundary is only shown in "show all" mode.

(cherry picked from commit 43e91d632e)
2019-09-05 13:20:01 +03:00
Ell
2038de0dc2 app: various fixes in gimp_display_shell_set_show_all()
(cherry picked from commit 19817877a5)
2019-09-05 13:20:00 +03:00
Ell
877acad596 app: fix a few compilation warnings 2019-09-04 20:56:24 +03:00
Ell
8ed929b272 app: fix transform-tool preview/bounds in show-all mode when transforming entire image
In the transform tools, when transforming the entire image in show-
all mode, don't crop the preview and the transform bounds to the
size of the canvas.
2019-09-04 20:56:24 +03:00
Ell
5b428a115d app: add support for show-all mode in GimpCanvasPassePartout
Don't clip the outer rect to the size of the canvas in show-all
mode.
2019-09-04 20:56:24 +03:00
Ell
f5ffc7d831 app: add support for show-all mode in GimpCanvasGrid
Don't crop the grid to the canvas size in show-all mode.
2019-09-04 20:56:24 +03:00
Ell
a0bdb2541d app: add gimp_canvas_item_untransform_viewport()
... which untransforms the viewport from display space to the
item's coordinate space (i.e., scaled and translated image space).
2019-09-04 20:56:24 +03:00
Ell
5e59e5c002 app: add support for color picking in "show all" mode
Add a show_all parameter to gimp_image_pick_color(), which, when
TRUE, allows picking colors outside the canvas bounds in sample-
merged mode.  Forward the display's "show all" mode through this
parameter where applicable (in particular, in the color-picker tool
and the pointer dockable).
2019-09-04 20:56:24 +03:00
Ell
8b90240928 app: fix gimp_projection_get_pixel_at() for general bounding boxes 2019-09-04 20:56:24 +03:00
Ell
06018d766f app: fix out-of-bounds rendering when alpha channel is invisible
When the image's alpha channel is invisible, paint regions outside
the image contents as black, instead of using a checkboard pattern.
This is especially notable when viewing the image in "show all"
mode.
2019-09-04 20:56:24 +03:00
Ell
66d1981f3a app: in GimpEditSelectionTool, freeze moved items' previews
... to avoid unnecessarily updating their previews while dragging,
and, in particular, to avoid updating the image's GimpImageViewable
size in show-all mode.
2019-09-04 20:56:24 +03:00
Ell
4eef2297b6 app: show full image contents in GimpNavigationEditor
In GimpNavigation{Editor,View}, show the full image contents when
the corresponding display is in "show all" mode.  Additionally,
when the display's "show canvas boundary" is active, show the
canvas boundary in the navigation view as well.
2019-09-04 20:56:23 +03:00
Ell
61535e0756 app: handle GimpImageViewable in GimpViewRendererImage
Allow using a GimpImageViewable as the source for a
GimpViewRenderer, by allowing GimpViewRendererImage to handle this
type of viewables.
2019-09-04 20:56:23 +03:00
Ell
b8377fd341 app: add GimpImageViewable class
Add a new GimpImageViewable class, which acts as a proxy viewable
for an image.  Unlike the image itself, whose preview is always
restricted to the size of the canvas, a GimpImageViewable provides
a show-all property, which controls whether the preview includes
the full image contents.  We're going to use GimpImageViewable as
the source viewable for GimpNavigationView.
2019-09-04 20:56:23 +03:00
Ell
4d2b713a08 app: defer GimpViewable::size-changed signal emission while frozen
In GimpViewable, defer emission of the size-changed signal while
the viewable's preview is frozen, and only emit the signal once
thawed.
2019-09-04 20:56:23 +03:00
Ell
214cda5403 app, menus: add "show canvas boundary" display option
Add a "show canvas boundary" display option, and a corresponding
"View" menu item and default-apperance preferences option.  When
enabled (the default), the canvas boundary is shown as an orange/
black dashed line in "show all" mode.
2019-09-04 20:56:23 +03:00
Ell
f0b7d0a2e2 app: improve display scroll/zoom-related behavior in "show all" mode
In "show all" mode, the image is thought to be "infinite"; this
commit improves the overall scrolling/zooming behavior in this mode
according to this assumption.  In cases where a specific image size
is needed (e.g., for the scrollbar bounds, fit-image-in-window,
etc.), the image's full bounding box is used; however, in cases
where a center point is needed (e.g., for the zoomed-out scrollbar
bounds, center-image-in-window), the canvas center, rather than the
bounding-box center, is still used.
2019-09-04 20:56:23 +03:00
Ell
1f76013d1e app: add "clip" parameter to gimp_display_shell_untransform_viewport()
... which specifies whether to clip the viewport to the canvas
(previously, it would always be clipped).  Use the appropriate
value in all callers, depending on the shell's "show all" mode.  In
particular, this commit avoids clipping the image projection's
priority rect to the canvas in "show all" mode.
2019-09-04 20:56:23 +03:00
Ell
162665e42b app, menus: add "show all" mode to GimpDisplayShell; "View -> Show All" toggle
Add a "show all" mode to GimpDisplayShell, controlled through a
corresponding "View -> Show All" menu item.  When enabled, the
entire image content is displayed, instead of cropping the image
to the canvas size.  More generally, the display behaves as if the
canvas were infinite.  The following commits improve the overall
behavior in this mode.

Add a prefernces option to control the default "show all" state.
2019-09-04 20:56:23 +03:00
Ell
5478f34b81 app: in preferences dialog, add "show sample points" toggle
... to the default-appearance options.  It was previously missing.
2019-09-04 20:56:23 +03:00
Ell
cb6b38abab app: in preferences dialog, swap position of default-appearance columns
... to match their menu order.
2019-09-04 20:56:23 +03:00
Ell
ceb8b398ca app: in GimpImage, ignore "show all" when image used as pickable
In GimpImage, make sure the image's pickable interface keeps
behaving as before (i.e., restricted to the canvas size), even when
the image is in "show all" mode.  In contrast, the image's
projection, when used as a pickable, *is* affected by "show all".
2019-09-04 20:56:23 +03:00
Ell
2e30ec353a app: add gimp_image_invalidate_all()
... which invalidates the entire image.  This replaces all calls to
gimp_image_invalidate() with the full canvas size, since the image
content can now be larger than the canvas.
2019-09-04 20:56:23 +03:00
Ell
94cdbacca7 app: add "show all" mode to GimpImage
Add a "show all" mode to GimpImage, which, when active, causes the
image projection's bounding box to be adjusted dynamically to the
combined bounding box of all layers and the canvas.  This mode is
controlled through the new gimp_image_{inc,dec}_show_all()
functions, which should be called by the display; a corresponding
display toggle will be added in the following commits.

Note that from the user's perspective, "show all" is a display
mode, rather than an image mode.  The GimpImage "show all" mode is
therefore merely an implementation detail, and shouldn't have any
effect on displays that don't use "show all" mode, or the PDB.
The ability to use the image with or without taking its "show all"
mode into account will be facilitated by the next commits.
2019-09-04 20:56:23 +03:00
Ell
3587c0a7d2 app: notify GimpProjection::buffer when freeing the projection's buffer
... instead of only when subsequently reallocating it, so that
listeners can respond to the buffer being freed.
2019-09-04 20:56:23 +03:00
Ell
66d7dc76aa app: in GimpProjection, avoid invalidating preview on flush while rendering
In GimpProjection, avoid erroneously invalidating the projectable's
preview when flushing the projection and there's nothing to be
flushed, if the chunk renderer is still running, and hence the
projection is not fully rendered yet.
2019-09-04 20:56:23 +03:00
Ell
e183b8e6ad app: in gimp_gegl_buffer_set_extent(), clear full OOB region
In gimp_gegl_buffer_set_extent(), clear the full now-out-of-bounds
region of the buffer, instead of only full out-of-bounds tiles;
however, we still make sure to clear full tiles, instead of partial
tiles, as much as possible.  This prevents (parts of) the old
content of the buffer from showing when it's enlarged again.  This
is especially relevant for the image projection, once we add
support for a dynamically-expanding canvas in the following
commits, since the projection of a reexpanded buffer can be
temporarily rendered to the display before it's fully
reconstructed, exposing parts of the old content.
2019-09-04 20:56:23 +03:00
Zander Brown
69dc32da80 Update British English translation 2019-08-30 19:19:19 +00:00
Marco Ciampa
d450e27286 Updated Italian translation 2019-08-30 09:32:00 +02:00
Marco Ciampa
e836245f12 Updated Italian translation 2019-08-29 13:09:05 +02:00
Zander Brown
d66a922cd3 Add British English translation 2019-08-27 17:26:47 +00:00
Zander Brown
b6837276b0 Update British English translation 2019-08-27 17:15:32 +00:00
Jehan
a47fcadcd8 NEWS: add bugfix number. 2019-08-27 12:48:51 +02:00
Jehan
7fc9357452 Issue #3263: fix critical error on bucket fill tool.
Fixes the error:
> Critical error: gimp_line_art_thaw: assertion 'line_art->priv->frozen'

This may happen in cases when we didn't actually freeze the line art at
pointer click, because we were in an invalid case (for instance,
clicking out of selection), hence we must not thaw the line art either
at button release.

(cherry picked from commit 6391b2bcff)
2019-08-27 12:45:21 +02:00
Martin Srebotnjak
7c0ed951c2 Updated Slovenian translation 2019-08-26 22:29:27 +02:00
Martin Srebotnjak
c70bd96b87 Updated Slovenian translation 2019-08-26 22:28:41 +02:00
Martin Srebotnjak
89f8217f4a Updated Slovenian translation 2019-08-26 22:27:48 +02:00
Martin Srebotnjak
a55b962d33 Updated Slovenian translation 2019-08-26 22:26:26 +02:00
Martin Srebotnjak
ba4fe89dcf Updated Slovenian translation 2019-08-26 22:19:18 +02:00
Zander Brown
ad542450ea Update British English translation 2019-08-26 09:11:44 +00:00
Jordi Mas
7d0fc8d2d9 Update Catalan translation 2019-08-26 09:34:43 +02:00
Balázs Úr
30dfd499ca Update Hungarian translation 2019-08-24 21:49:34 +00:00
Martin Srebotnjak
ad7bbd3af3 Updated Slovenian translation 2019-08-24 20:23:20 +02:00
Martin Srebotnjak
b6a4799314 Updated Slovenian translation 2019-08-24 20:21:34 +02:00
Martin Srebotnjak
98eb78a2b4 Updated Slovenian translation 2019-08-24 20:20:18 +02:00
Martin Srebotnjak
7bd11df998 Updated Slovenian translation 2019-08-24 20:19:19 +02:00
Anders Jonsson
20533c8567 Update Swedish translation 2019-08-23 12:04:24 +00:00
Alexandre Prokoudine
4f24ee0397 Remove Bugzilla from the desktop file
We don't seem to need it anymore, and all GNOME apps have removed it already.
2019-08-20 13:00:18 +03:00
Piotr Drąg
b742c7e39c Update Polish translation 2019-08-18 16:00:15 +02:00
Anders Jonsson
b24cb22547 Update Swedish translation 2019-08-16 20:58:35 +00:00
Anders Jonsson
70273f8d41 Update Swedish translation 2019-08-16 20:30:33 +00:00
Øyvind Kolås
7cc61ade2b plug-ins: link dds plugins against libm
(cherry picked from commit 1661aab620)
2019-08-14 11:58:26 +02:00
Ell
409853a03b app: update projection-buffer extent when projectable size changes
In GimpProjection, when the projectable's size changes, while its
offset remains the same, simply update the projection buffer's
extent, instead of allocating a new buffer and copying the contents
over.

(cherry picked from commit 1577174739)
2019-08-13 17:44:26 +03:00
Ell
d3af77890d app: add gimp_tile_handler_validate_buffer_set_extent()
... which sets the extent of a buffer with an assigned
GimpTileHandlerValidate, clipping the dirty region to the new
extent.

(cherry picked from commit b4ee9ff055)
2019-08-13 17:44:26 +03:00
Ell
56f6c35e30 app: add gimp_gegl_buffer_set_extent()
.... as a drop-in replacement for gegl_buffer_set_extent(), which,
in addition to setting the buffer's extent, clears any now-out-of-
bounds tiles, to free memory.

(cherry picked from commit 90610ac87e)
2019-08-13 17:44:25 +03:00
Rodrigo Lledó
574602dc1d Update Spanish translation 2019-08-13 08:35:14 +00:00
Ell
7072c20bb9 Issue #3341 - Add Bevel doesn't work for high thickness values
Something during the port to gimp-drawable-edit (commit
233ac80de1) broke add-bevel.scm when
the thickness is high enough for the selection to become empty.

Add an explicit check for a selection while constructing the bump-
map layer.

(cherry picked from commit 21649c5eaa)
2019-08-12 22:19:08 +03:00
Michael Natterer
afdd573136 pdb: don't pass nodes with parents to gimp_drawable_apply_operation()
(cherry picked from commit 8222d3ffad)
2019-08-12 19:43:44 +02:00
Ell
55c7841f15 app: differentiate tooltips of image/layer arbitrary-rotation actions
Change the tooltips of the "Image/Layer -> Transform -> Arbitrary
Rotation..." to make the two actions distinguishable in the action
search dialog, similarly to the other image/layer transform
actions.

(cherry picked from commit 9582cf7717)
2019-08-12 17:32:23 +03:00
Sabri Ünal
a61fb20e18 Update Turkish translation 2019-08-11 17:55:50 +00:00
Sabri Ünal
66e1601bca Update Turkish translation 2019-08-11 17:54:40 +00:00
Sabri Ünal
1e23fa2828 Update Turkish translation 2019-08-11 17:52:27 +00:00
Piotr Drąg
a9784d7b5f Update Polish translation 2019-08-11 15:06:46 +02:00
Ell
fd29ee1997 app, menus: add "Image -> Transform -> Arbitrary Rotation..." action
Add a gimp-rotate-image-arbitrary action, and a corresponding
"Image -> Transform -> Arbitrary Rotation..." menu entry, which
activates the rotate tool in image mode (similarly to the
corresponding action for layers).

(cherry picked from commit 8bff415f59)
2019-08-11 00:34:29 +03:00
Ell
7c7983d5ef app: use gimp_transform_tool_set_type() in tools-rotate-arbitrary action
... so that the original transform-type of the rotate tool is
restored once the layer is rotated.  Additionally, make sure to
set the tool's transform-type even if it's already active.

(cherry picked from commit 52ad37a2aa)
2019-08-11 00:30:18 +03:00
Ell
1e52fc5fa9 app: add gimp_transform_tool_set_type()
... which temporarily changes the transform-type of the tool,
restoring the original type once it's halted.  To be used when
activating a transform tool through an action for a specific
transform type.

(cherry picked from commit f651db52fb)
2019-08-11 00:30:17 +03:00
Ell
5903c9c71d app: add "Image" transform type to transform tools
Add a new "Image" transform type to the transform tools, in
addition to the existing "Layer", "Selection", and "Path" transform
types.  The "Image" mode transforms the entire image, rather than a
single item.  In tools with a preview, the preview shows the
transformed image projection.  The clipping mode controls how the
canvas is clipped during the transform; in particular, the ADJUST
clipping mode resizes the canvas to fit its transformed size.

(cherry picked from commit e4990bee7b)
2019-08-11 00:30:17 +03:00
Ell
cd4eaf6e54 app: indentation fixes in the transform tools
(cherry picked from commit 9f823c396a)
2019-08-11 00:30:16 +03:00
Ell
3675916880 app: use a pickable instead of a drawable in GimpCanvasTransformPreview
In GimpCanvasTransformPreview, use a GimpPickable, instead of a
GimpDrawable, as the preview source, so that we can use it with the
image projection, rather than just with drawables.

(cherry picked from commit 6023f97509)
2019-08-11 00:30:16 +03:00
Ell
e5d1f5ac4b app: add gimp_display_shell_show_image()
... which controls whether or not the image is rendered by the
shell.  We'll use this to hide the image while showing its
transform preview in the next commits.

(cherry picked from commit 539d666ae2)
2019-08-11 00:30:14 +03:00
Ell
52c66bca5e app: add gimp_image_transform()
Add a new gimp_image_transform() function, which transforms the
entire image, including all layers, channels (including selection
mask), vectors, guides, and sample points, according to a
transformation matrix.  The canvas is resized according to the
clip_result parameter, the same way drawables are resized during
transformation; the layers are resized using ADJUST mode
regardless.

(cherry picked from commit c45f1b4148)
2019-08-11 00:29:33 +03:00
Ell
2558d77d1c app: add gimp_image_flip_full()
... which takes the symmetry axis as a parameter, instead of hard-
coding the axis to the middle of the image, and which additionally
takes the clipping mode as a parameter, controlling whether to clip
or resize the canvas.  Note that the actual canvas size never
changes, but it may be offset when flipped around an off-center
axis, without clipping.

Implement gimp_image_flip() in terms of gimp_image_flip_full().

(cherry picked from commit ae080f06f9)
2019-08-11 00:29:32 +03:00
Ell
20dd07ca45 app: fix sample-point OOB check in gimp_image_resize[_with_layers]()
(cherry picked from commit d13c6ce3e0)
2019-08-11 00:29:32 +03:00
Ell
75d3276aa7 pdb: fix image-mask transforms
In the various PDB transform functions, avoid erroneously creating
a floating selection when transforming the image mask, and rather
transform the mask normally.
2019-08-09 22:24:04 +03:00
Ell
f221b424c0 app, pdb: use gimp_item_get_clip() everywhere
Remove the special clipping-mode handling for channels throughout
the transform (and drawable-filter) code, and rather use
gimp_item_get_clip(), added in the previous commit, instead.  As
mentioned in the previous commit, we only modify the clipping mode
in top-level code, while having lower-level code use the clipping
mode as-is.  This not only hides the actual clipping-mode logic
from the transform code, but, in particular, allows code performing
transformation internally to use arbitrary clipping modes.

Also, this commit fixes a bunch of PDB bugs all over the place :)
2019-08-09 22:24:03 +03:00
Ell
3a7972e5fb app: add gimp_item_get_clip()
Add a new GimpItem::get_clip() virtual function, and a
corresponding gimp_item_get_clip() function, which return the
actual clipping mode to be used when transforming (or applying a
filter to) a given item, given the original clipping mode.  This
applies only to whole-item transformations (i.e., when not creating
a floating selection), and should be used by the top-level code
applying the transformation, rather than by the actual
transformation code, so that the item can be transformed using a
different clipping mode internally.

Provide a default implementation that simply returns the input
clipping mode, and override for GimpChannel (to always return CLIP)
and for GimpVecotrs (to always return ADJUST).

(cherry picked from commit d5cdcc6c02)
2019-08-09 22:23:57 +03:00
Ell
a0d43cd927 app: fix layer-mask offset when applying filter to layer without clipping
(cherry picked from commit f9fb3e6fad)
2019-08-09 22:23:57 +03:00
Ell
037bc8575e app: limit color-history palette size
Limit the color-history palette size (currently, to 256 colors), to
avoid slowdowns, especially during loading.

(cherry picked from commit 07b7d63a7d)
2019-08-07 19:20:59 +03:00
Ell
8d15563f4c Issue #3718 - Large colorrc file causes lag when painting with a new color
In gimp_palette_mru_add(), if the added color doesn't match an
existing color, don't look for two duplicate existing colors (which
has quadratic complexity), since there shouldn't be any under
normal circumstances (as we're not adding duplicates to begin
with).

(cherry picked from commit e60829767e)
2019-08-07 19:20:58 +03:00
Alexandre Prokoudine
5db729bdbe Update Russian translation 2019-08-07 14:23:25 +03:00
Alexandre Prokoudine
6a36bdacf1 Update Russian translation 2019-08-07 14:02:37 +03:00
Alexandre Prokoudine
0c97288782 Update Russian translation, fix #3763 2019-08-07 13:51:03 +03:00
Jehan
0e8cdd0f74 m4macros: fix pythondev.m4.
My previous commit was bugged. Fix it and simplify the code a bit. No
need to check for existence for non-versionned include directory on
Windows. Just add the non-versionned dirs at the end, without other
condition that the target platform being Windows. This way, whether the
headers are installed in the versionned or non-versionned dirs, they
will be found.
2019-08-06 19:09:00 +02:00
Jehan
ac0c81b38f m4macros: Windows may have a versioned directory for headers.
Basically the same fix as 61c11b04c1, on
pythondev.m4 (for Python2) instead of python3dev.m4.
2019-08-06 16:38:49 +02:00
Sabri Ünal
30e4a7ee5e Issue #3112 - Missing mnemonics. 2019-08-05 20:06:50 +00:00
Michael Natterer
9587c125d4 pdb: fix the names of the oilify compat PDB wrappers
(cherry picked from commit 21d63d6c65)
2019-08-04 23:32:27 +02:00
Michael Natterer
176219020a libgimpbase: remove the gimp protocol mutex and gp_lock()/gp_unlock()
The protocol is supposed to be used recursively, the locks just
deadlock in some situations. Threaded use of the wire protocol is
simply forbidden.
2019-08-04 22:49:25 +02:00
Tim Sabsch
ea09260012 Update German translation 2019-08-04 19:25:33 +00:00
Piotr Drąg
23a94b32fc Update Polish translation 2019-08-04 15:19:02 +02:00
Michael Natterer
f3f3d066a6 app: better error reporting in gimp_pdb_dialog_run_callback()
Display the error returned from trying to run the temp procedure.

(cherry picked from commit 910828bf51)
2019-08-03 17:32:35 +02:00
Ell
965756b17f Issue #3723 - Symmetry Painting with random colour isn't symmetrical
In GimpPaintbrush, calculate grad_point in
_gimp_paintbrush_motion() independently of any stroke, and pass
its value down to GimpPaintbrush::get_paint_params() at each
stroke, so that the color is the same for all strokes, even when
using a color/random dynamics.

(cherry picked from commit 95429ad704)
2019-08-02 22:29:49 +03:00
Ell
2c8006896d app: in GimpFilterTool, add "clipping" option
In GimpFilterTool, add a new "clipping" option, which can be either
Adjust or Clip.  This option is controllable for layers, when
there's no selection mask.

When set to Adjust, which is used by default, the filter's output
may extent past the drawable's boundary, and the drawable will be
resized to match the output when committed.

(cherry picked from commit eaec9443c3)
2019-08-02 00:40:31 +03:00
Ell
97d666ff41 app: add gimp_drawable_filter_set_clip()
In GimpDrawableFilter, add a new gimp_drawable_filter_set_clip()
function, which controls whether the filter clips the result to the
drawable's boundary, or extends it past it.  The latter is only
possible for layers, when the selection mask is empty.

(cherry picked from commit b7f53262fc)
2019-08-02 00:40:27 +03:00
Ell
ed46ba4ded app: add "clip" parameter to gimp_drawable_merge_filter()
Add a new "clip" parameter to gimp_drawable_merge_filter().  When
set to FALSE, the function resizes the drawable to the bounding box
of the filter's output, instead of clipping the output to the
drawable's boundary.

(cherry picked from commit 89a9cf7e49)
2019-08-02 00:40:27 +03:00
Ell
bba810a9e5 app: in gimp_gegl_apply_cached_operation(), copy cached result *before* rejigging graph
In gimp_gegl_apply_cached_operation(), copy the cached results to
the destination buffer *before* reconnecting the operation node, as
this may cause the cache to be cleared (see commit
gegl@4347255cd9d5031e6757c70fdde5c63539d5f508).

(cherry picked from commit 35729ee02a)
2019-08-02 00:40:27 +03:00
Ell
114da41d61 app: in gimp:replace, implement GeglOperation::get_bounding_box()
... similarly to gimp:layer-mode, however, assume the destnation
(backdrop) is not included when the layer's opacity is 1, and
there's no mask.

(cherry picked from commit 998f89e3cb)
2019-08-02 00:40:26 +03:00
Ell
ea5b5e305a app: in gimp:layer-mode, implement GeglOperation::get_bounding_box()
... to take the layer's composite mode and opacity into account.

(cherry picked from commit 89c97bcf26)
2019-08-02 00:40:26 +03:00
Ell
05a2061776 app: in gimp:mask-components, implement GeglOperation::get_bounding_box()
... to forward the input/aux bounding box when the component mask
is fully clear/set, respectively.

(cherry picked from commit 9900fb74f2)
2019-08-02 00:40:25 +03:00
Ell
a0742047b5 app: in gimp:compose-crop, fix x/y properties lower bound
... from 0 to G_MININT.

(cherry picked from commit 332f662cda)
2019-08-02 00:40:25 +03:00
Ell
8c7d13541d app: calculate bounding box of group layers
In GimpGroupLayer, when recalculating the group's size as a result
of a change to one of the child layers (now including in response
to a child layer's GimpDrawable::bounding-box-changed signal),
calculate the group's bounding box (the bounding box of all its
child layers' bounding boxes) alongside its logical bounds.  Like
in GimpLayer, use the logical bounds as the bounding box if the
group has a mask.

This bounding box is passed to the group's projection, via
GimpGroupLayer's GimpProjectable::get_bounding_box()
implementation, resulting in a buffer whose extent is the same as
the bounding box.

(cherry picked from commit ad1f3d20fb)
2019-08-02 00:40:25 +03:00
Ell
1359c1cb47 app: add support for projectables with an arbitrary bounding box
In GimpProjectable, replace gimp_projectable_get_size(), which only
returned a width and a height, with
gimp_projectable_get_bounding_box(), which returns a full
rectangle.  This allows projectables to have an arbitrary bounding
box, not limited to a (0, 0) top-left corner.

Adapt GimpProjection, creating a buffer with corresponding extent
to the projectable's bounding box.

Adapt GimpImage and GimpGroupLayer.

(cherry picked from commit 8ff43942d6)
2019-08-02 00:40:24 +03:00
Ell
ea27923868 app: implement GimpDrawable::get_bounding_box() for GimpLayer
Implement GimpDrawable::get_bounding_box() for GimpLayer, by
returning the bounding box of its source node.  If the layer has a
mask, we simply return its logical boundary, since the layer can't
extend past the mask.

(cherry picked from commit 7a05d15f7e)
2019-08-02 00:40:24 +03:00
Ell
917f46f184 app: maintain drawable bounding box separately from its logical boundary
Maintain the bounding box of drawables (i.e., the bounds of their
actual rendered content) separately from their logical boundary (as
shown in the UI).

The bounding box is calculated through the new
GimpDrawable::get_bounding_box() virtual function, which has a
corresponding gimp_drawable_get_bounding_box() function; the
default implementation simply returns the drawable's logical
boundary.  The bounding box is specified in drawable coordinates,
i.e., it's not affected by the drawable's offset.

The bounding box is recalculated through
gimp_drawable_update_bounding_box(), which should be called
whenever a change may affect the bounding box (for example, when
setting a new buffer, as done implicitly by GimpDrawable's
::set_buffer() implementation, or when a drawable filter's
properties change, as will be done by GimpDrawableFilter in a
following commit).  When the bounding box changes, the affected
regions of the drawable are updated, and the
GimpDrawable::bounding-box-changed signal is emitted.

When gimp_drawable_update() is called with negative width/height
values, the entire drawable's bounding box is updated, rather than
only its logical boundary.

Likewise, GimpDrawableStack and GimpLayerStack are adapted to use
the bounding box, instead of the logical bounds, when updating the
drawable's area.

(cherry picked from commit 153cb33eec)
2019-08-02 00:40:23 +03:00
Ell
c217876a47 app: in GimpDrawable::set_buffer(), take bounds rect instead of offset only
In GimpDrawable::set_buffer(), and the corresponding
gimp_drawable_set_buffer_full() function, take a bounds rectangle,
which specifies both the drawable's new offset and its new size,
instead of only taking the new offset.  In
gimp_drawable_real_set_buffer(), set the item size according to the
rect dimensions, instead of the buffer dimensions.  The rect's
width/height may be 0, in which case the buffer's dimensions are
used.

Adapt the rest of the code.

We do this in preparation for maintaining the drawable's bounding
box separately from its logical bounds, allowing the drawable
content to extend beyond its bounds.

(cherry picked from commit 3afdd7c5c2)
2019-08-02 00:40:17 +03:00
Michael Natterer
8bf31bd8d1 libgimpcolor: fix "Since:" on gimp_param_spec_rgb_get_default() 2019-08-01 12:53:07 +02:00
Michael Natterer
30e02aeeac libgimpbase: capitalize some docs section titles
(cherry picked from commit d66b845bac)
2019-08-01 12:52:55 +02:00
Julia Dronova
3822dec73f Update Russian translation 2019-08-01 00:20:35 +03:00
Rodrigo Lledó
1f5131720a Update Spanish translation 2019-07-31 12:51:29 +00:00
Ell
2bdbc2f16d app: fix #include in gimpdrawable.c
Local foo leak.

(cherry picked from commit 2331b88d7d)
2019-07-30 21:37:02 +03:00
Ell
29aede6722 app: guarantee fully-COWed copies in more cases in paint code
(cherry picked from commit fb679f9efa)
2019-07-30 20:32:56 +03:00
Ell
ca98ff3c27 app: use gimp_gegl_buffer_dup() everywhere
... instead of gegl_buffer_dup().

(cherry picked from commit 2d80d4d138)
2019-07-30 20:32:56 +03:00
Ell
c0e04c3b5f app: add gimp_gegl_buffer_dup()
... as a drop-in replacement for gegl_buffer_dup(), which COWs all
tiles of the source buffer, including ones that aren't fully
included within buffer's extent.

(cherry picked from commit 5798cefe1b)
2019-07-30 20:32:55 +03:00
Ell
6cc671074a app: in gimp_gegl_buffer_copy(), allow tiles outside the abyss to be COWed
In gimp_gegl_buffer_copy(), assume that the area outside the abyss
is empty, and so, when the abyss policy is NONE, allow data otuside
the source/destination abyss to be copied, by temporarily modifying
the abyss.  This allows tiles that aren't fully contained within
the abyss to be COWed, unlike gegl_buffer_copy(), which has to be
more general.

(cherry picked from commit 69ce5e7e02)
2019-07-30 20:32:55 +03:00
Ell
b72aad57f2 app: remove gimp_gegl_rectangle_align_to_tile_grid()
... and replace it with gegl_rectangle_align_to_buffer().

(cherry picked from commit ab94251ae9)
2019-07-30 20:32:54 +03:00
Michael Natterer
e81061afc7 plug-ins: and in ifs-compose too...
(cherry picked from commit a47789fcb8)
2019-07-30 18:38:35 +02:00
Michael Natterer
82450330f0 libgimpconfig: fix float parsing in gimp_config_deserialize_fundamental() too
(cherry picked from commit 2d471ce049)
2019-07-30 18:38:24 +02:00
Michael Natterer
c9ded16963 Use g_ascii_dtostr() instead of g_ascii_formatd()
The latter is broken and doesn't guarantee a decimal point with the
current bug. Also, g_ascii_dtostr() doesn't need the format parameter
and produces nicer output.

(cherry picked from commit c0fb66254e)
2019-07-30 16:00:06 +02:00
Michael Natterer
77dd2982a5 libgimpconfig: make gimp_scanner_parse_float() less strict
A number without a decimal point can be put into a gdouble just fine,
no need to refuse them. Moreover, g_ascii_dtostr() serializes doubles
without fractional part without a decimal point, and we are soon going
to use it.

(cherry picked from commit 2c97bc8327)
2019-07-30 14:36:06 +02:00
Jernej Simončič
d32b049577 Installer: handle associations better 2019-07-29 00:23:09 +02:00
Ell
fc5a641d2e app: use longer iteration inteval (= bigger chunks) when applyng an op
In gimp_gegl_apply_[cached_]operation(), use a longer iteration
interval (resulying in bigger chunks) when processing the op, than
the iteration interval used for rendering the projection.  In
particular, use an even longer interval when processing area
filters, since their may be particularly sensitive to the chunk
size (see, for example, issue #3711).  Likewise, use the asme
longer interval when not showing progress indication, since we
don't need to stay responsive in this case (but don't avoid
chunking altogether, to reduce the space required for intermediate
results).

This allows us to process an op faster when committing a filter,
while still remaining responsive (if overall slower) during
preview.

(cherry picked from commit 5a500b4a12)
2019-07-28 12:10:29 +03:00
Ell
1e06f5df5c app: add gimp_gegl_node_is_area_filter_operation()
... which determines if a node is an area filter operation.  If the
node is a meta op, we conservatively return TRUE, as it may involve
an area-filter op.

(cherry picked from commit f6c4e4912a)
2019-07-28 12:10:29 +03:00
Ell
0712504d0c app: in the gradient tool, set the graph's underlying node
... to the gimp:gradient node

(cherry picked from commit a1f676aabd)
2019-07-28 12:10:28 +03:00
Michael Natterer
0b26db7471 libgimpcolor: add gimp_param_spec_rgb_get_default()
(cherry picked from commit 3597e92a20)
2019-07-27 16:12:11 +02:00
Piotr Drąg
1aab38f066 Update Polish translation 2019-07-27 15:36:21 +02:00
Jordi Mas
de10e027f3 Update Catalan translation 2019-07-27 11:52:18 +02:00
Julia Dronova
01b50782f7 Update Russian translation 2019-07-27 04:38:11 +03:00
Jehan
0a36d273f9 desktop: new <release> appdata tag for GIMP 2.10.14.
(cherry picked from commit 2e03300eb7)
2019-07-26 19:45:19 +02:00
Daniel Mustieles
22e20cb222 Update Spanish translation 2019-07-26 07:40:45 +00:00
Øyvind Kolås
75ab528105 build, app: require babl-0.1.68 or newer
(cherry picked from commit 23ade7b80b)
2019-07-25 23:15:13 +02:00
Jehan
47825f1c8a NEWS: s/On color/Color/
Cf. preview commit.
2019-07-25 22:48:13 +02:00
Jehan
91b58332e2 app: rename "On color" matting preview mode to "Color".
As discussed earlier with mitch and tmanni.

(cherry picked from commit 771d415b5f)
2019-07-25 22:46:29 +02:00
Michael Natterer
6ea372bfe8 libgimpbase: fix docs of struct GimpParamSpecValueArray
(cherry picked from commit e7af081b05)
2019-07-25 21:34:15 +02:00
Michael Natterer
9f529d6164 app: make sure the display is not rotated by a very small angle
gimp_display_shell_rotate_update_transform(): reliably set rotation to
0.0 using an epsilon of 1e-3.

(cherry picked from commit 7ddf40b78b)
2019-07-25 12:50:37 +02:00
Michael Natterer
1af8d2a2c7 libgimp*: use more g_clear_pointer()
(cherry picked from commit c144cf69de)
2019-07-25 12:40:33 +02:00
Michael Natterer
50e6d6ae20 libgimpwidgets: fix docs for GimpBusyBox:message
(cherry picked from commit fe75ef28ad)
2019-07-25 10:26:11 +02:00
Michael Natterer
adf308d10e app: remove gimp_display_shell_filter_new(), it's empty and useless
(cherry picked from commit ec18b969a3)
2019-07-25 10:02:16 +02:00
Michael Natterer
520c5f4b69 libgimpwidgets: add more docs
(cherry picked from commit 9e88105ee6)
2019-07-24 19:13:32 +02:00
Michael Natterer
65cda467d6 libgimpwidgets: declare GimpHintBox with public instance and class
like all other objects, so gtk-doc doesn't cripple its docs.

(cherry picked from commit f67e607395)
2019-07-24 15:17:15 +02:00
Alexandre Prokoudine
ec2b566fbb Update NEWS 2019-07-24 10:59:05 +00:00
Alexandre Prokoudine
8630302fbd Update NEWS 2019-07-24 10:57:32 +00:00
Dimitris Spingos
850a14733c Updated Greek translation 2019-07-24 08:00:36 +03:00
Michael Natterer
ac70d2346c libgimpbase: always allocate GimpPixPipeParams.placement, add docs
(cherry picked from commit f28ec4bf86)
2019-07-24 02:19:19 +02:00
Michael Natterer
ff1e645c2f libgimp*: lots of doc fixes and new docs for structs and enums
(cherry picked from commit aca5f806c4)
2019-07-24 01:26:11 +02:00
Ell
f020569caa app: add assigned-threads variable to the dashboard
Add an assigned-threads variable to the dashboard's misc group,
showing the number of worker threads which currently have work
assigned.  See commit
gegl@fc532f06773bd292c86abee31ac18f62e26d39df.

(cherry picked from commit e92732f7cf)
2019-07-23 17:15:19 +03:00
Michael Natterer
f974cdb5d7 devel-docs: update docs with missing symbols and types 2019-07-23 15:53:38 +02:00
Michael Natterer
f81d7d2f0b devel-docs: update the libgimpconfig and libgimpbase docs 2019-07-23 15:35:50 +02:00
Ell
07bf8c025c app: reduce time complexity of layer-group translation
When translating a layer group, avoid separately updating the
original area of the child layers before translating them (as per
the fix to issue #3484), as this results in quadratic time
complexity w.r.t. to the maximal subgroup nesting level.  Instead,
simply defer the updating of the group's offset until *after*
translating the child layers, so that their original area isn't
clipped by the parent, while their new area is still properly
updated even if the parent's size changes (see comment in code).

(cherry picked from commit ebb3ec4925)
2019-07-23 10:55:57 +03:00
Michael Natterer
f5e6812131 plug-ins: somehow common/Makefile.am wasn't properly generated/merged 2019-07-23 01:06:20 +02:00
Federico Mena Quintero
b7f22216e9 file-svg: Use rsvg_handle_new_from_gfile_sync() instead of GIOChannel
The latter is obsolete, and rsvg_handle_write()/close() are deprecated
anyway.

(cherry picked from commit 16660c5928)
2019-07-23 00:52:23 +02:00
Federico Mena Quintero
38e87c2d16 Issue #2561: Fix computation of SVG image sizes
The librsvg API was being called in an incorrect order.  One cannot
call rsvg_handle_get_dimensions() until after rsvg_handle_close() is
done.

(cherry picked from commit b2027c40b7)
2019-07-23 00:52:10 +02:00
Jehan
8d609ecfa4 plug-ins: use global gegl_init() in file-pdf-load run() function.
As noted by Mitch, this is simpler and what we do in other plug-ins.

(cherry picked from commit ef3c13c6c5)
2019-07-22 14:57:56 +02:00
Jehan
8164d7f26d plug-ins: babl_init|exit() for non-interactive "file-pdf-load" too.
Improve my previous commit: I added babl_init|exit() for
"file-pdf-load-thumb". But these was actually also missing from
non-interactive calls to "file-pdf-load", since the initialization was
done as part of gimp_ui_init() so far.
Just run them down the call stack around the needed part. It's not a
problem if it's called double (for the interactive code path).

(cherry picked from commit 443c171f8d)
2019-07-22 12:41:15 +02:00
Michael Natterer
9de16da01c plug-ins: link file-pdf against GEGL/babl
(cherry picked from commit f4b88c0a9e)
2019-07-22 12:41:15 +02:00
Jehan
b3bba49002 plug-ins: babl_init|exit() needs to be run for "file-pdf-load-thumb".
This is run as part of gimp_ui_init() in the normal "file-pdf-load"
calls, but such calls have been forgotten for the thumbnail load
procedure.

Also the GimpRunMode is only a parameter in "file-pdf-load". For
"file-pdf-load-thumb", the first parameter is directly the filename. The
fact it might have used to work is chance as it were only tested against
GIMP_RUN_INTERACTIVE, which is 0, so the test would end up FALSE, which
is what we want for thumbnail loading. Anyway now we get a proper call
(thumbnail loading always considered non-interactive).

(cherry picked from commit e0a24a27de)
2019-07-22 12:41:14 +02:00
Michael Natterer
d578aa67f5 plug-ins: clean up the file-dds GUI, remove the "Advanced" expander 2019-07-22 01:05:43 +02:00
Piotr Drąg
67bb165792 Update Polish translation 2019-07-21 13:49:30 +02:00
Ell
65fb2859c4 app: add active-thread variable to the dashboard
Add an active-thread variable to the dashboard's misc group,
showing the number of active worker threads.  See commit
gegl@6a3a6314d4d4cd668e0f6164afc0fde8b9c7c001.

(cherry picked from commit 2cc77e6927)
2019-07-21 00:00:57 +03:00
Ell
91c20c783a app: fix gradient dithering
In gimp:gradient, fix dithering to correspond to how we actually
round float values to 8-bit.  In particular, this avoids
introducing noise when a component is fixed at 0 or 1 along a
segment.

(cherry picked from commit e22fcc8942)
2019-07-19 21:50:16 +03:00
Michael Natterer
408129b331 plug-ins: port gimpressionist to GEGL, stupid 8-bit port only
(cherry picked from commit 3914e04722)
2019-07-19 18:59:28 +02:00
Michael Natterer
ae493acbe9 plug-ins: remove the oilify plug-in and add a PDB compat procedure
(cherry picked from commit b7cf850671)
2019-07-19 18:24:07 +02:00
Michael Natterer
a5e1eb85d8 plug-ins: port imagemap to GEGL
(cherry picked from commit 3c73d42e97)
2019-07-19 17:22:05 +02:00
Michael Natterer
5b5374c8fb app: add gegl:mean-curvature-blur to Filters -> Blur
(cherry picked from commit ed64fda6e5)
2019-07-19 14:42:11 +02:00
Michael Natterer
c923f24357 plug-ins: port warp to GEGL, stupid 8-bit port only
And put it back in the menus, it's just too weird not to have.

(cherry picked from commit d944a7b9a4)
2019-07-19 13:14:13 +02:00
Michael Natterer
c6ea2760b5 pdb, plug-ins: remove the newsprint plug-in and add a PDB compat procedure
(cherry picked from commit 31fc338ab0)
2019-07-18 13:00:37 +02:00
Michael Natterer
3fc13bd4e7 app: improve gegl:newsprint's GUI a lot
Add some frames, a notebook for the channels and toggles to lock all
channels' properties together.

(cherry picked from commit ce44b04005)
2019-07-18 02:16:39 +02:00
Michael Natterer
d503212f9d app: add gegl:newsprint to Filters -> Distorts
and add a custom GUI constructor that does nothing special (yet).

(cherry picked from commit d718da27a8)
2019-07-17 18:31:33 +02:00
Michael Natterer
a47e3cb152 plug-ins: port depth-merge to GEGL, stupid 8-bit port only
(cherry picked from commit 7cd78f436d)
2019-07-17 12:20:26 +02:00
Michael Natterer
5de0271b3f plug-ins: port van-gogh-lic to GEGL
Special effects that nobody understands, now in floating point.

(cherry picked from commit 4c1677078e)
2019-07-17 01:06:04 +02:00
Michael Natterer
14bc3ab400 plug-ins: port animation-optimize to GEGL, stupid 8-bit port only
(cherry picked from commit 9d33a9a9ca)
2019-07-15 12:26:54 +02:00
Piotr Drąg
878409bd4e Update Polish translation 2019-07-14 16:18:37 +02:00
Michael Natterer
6f5f466321 plug-ins, pdb: remove the contrast-normalize plug-in
and add a PDB compat procedure.

(cherry picked from commit 8fcccf3f88)
2019-07-14 14:33:51 +02:00
Michael Natterer
4bdb8792b5 Issue #360 - scripts that require brushes that GIMP no longer installs
carve-it.scm, chrome-it.scm: apply slightly modified patch from Carol
Spears which replaces hardcoding round brush names by creating a brush
on the fly and setting its radius.

Also fixed both scripts to not use deprecated color API which is
even completely gone from master.

(cherry picked from commit 3d049f565a)
2019-07-14 14:01:56 +02:00
Michael Natterer
ab39b6acc7 plug-ins, pdb: remove the edge-neon plug-in and add a PDB compat procedure
(cherry picked from commit 8b08f958ba)
2019-07-14 00:07:50 +02:00
Alexandre Prokoudine
568b1aff1a Update NEWS 2019-07-13 16:07:35 +00:00
Michael Natterer
4464f31d6d plug-ins: port twain to GEGL, 8-bit port only
This has only be tested to build, somebody please test if
it actually works.

(cherry picked from commit 12bed7be5b)
2019-07-13 12:53:50 +02:00
Michael Natterer
827d415a4f plug-ins: port destripe to GEGL, stupid 8-bit port only
(cherry picked from commit 98be067874)
2019-07-13 12:50:11 +02:00
Michael Natterer
0fdf11bfbb plug-ins: port cml-explorer to GEGL, stupid 8-bit port only
(cherry picked from commit f9e149dc1e)
2019-07-13 00:29:14 +02:00
Jehan
6490a34e3c plug-ins: properly free return values of gimp_image_get_layers()...
... and gimp_item_get_children().
I know plug-ins are shortlived. Still I don't like this!

(cherry picked from commit 6d4a11a261)
2019-07-12 13:16:54 +02:00
Michael Natterer
1039f54b58 plug-ins: port sparkle to GEGL, stupid 8-bit port only
(cherry picked from commit 075b34baea)
2019-07-12 13:08:39 +02:00
Jehan
e3f5b385f4 NEWS: keep up-to-date. 2019-07-12 00:14:15 +02:00
Jehan
ecd86145e0 plug-ins: clean up a bit file-pdf-save.
This improves commit bbd5ebbe8a. Several parameters did not need to go
inside draw_layer(). In particular this function should not take care of
filling return values on errors. It should just return a success boolean
with a GError which is processed on the main function. This also allows
proper shortcut to end the loop earlier on the first error.
Also the layer index parameter does not need to be a pointer since it
never requires updates.
Finally declare variables in smaller scopes for cleaner code.

(cherry picked from commit 5b2d89f794)
2019-07-12 00:10:33 +02:00
Lionel
7278663a98 Issue #1002: Fix for layer groups in PDF export
Added a recursive loop to draw layer children in layer groups. Text
layers in layer groups are now exported correctly.

(cherry picked from commit bbd5ebbe8a)
2019-07-12 00:10:27 +02:00
Jehan
465bedf699 app: salvage loaded group and text layer of dimension 0.
Whereas normal layers of dimension 0x0 are definitely broken, group and
text layers depend on their contents, which will be able to resize the
layer appropriately and fix whatever rendering. This commit allows to
salvage such layers, hence make XCF loading even more resistant to
certain form of file corruption.

This commit (and the previous one) are not theoretical but the result of
discovering some old corrupted file, with an empty group of size 0x0
(saved by GIMP itself, because of some old bug). Rather than destroying
these layer groups, this just allows us to reopen them without any kind
of loss!

(cherry picked from commit 06be074650)
2019-07-11 16:42:23 +02:00
Jehan
8bc234616d app: don't abandon immediately XCF loading at first layer load failure.
If the problem occurs at one of the first layer, we may end up loading
nearly nothing even though there may be a whole lot of other data in
good state. So instead keep track of the number of failed layer and
channel loading to still display an error popup at the end, because we
still need to alert the user something went wrong. Yet damages are
limited.

Also make sure that layer paths are fixed when some layers could not be
loaded, hence stored paths end up wrong.

(cherry picked from commit 2045fdd2a3)
2019-07-11 16:42:23 +02:00
Michael Natterer
a24f75f4bd plug-ins: hot's dest_buffer can have another format than src_buffer
(cherry picked from commit 32a229b049)
2019-07-11 16:21:21 +02:00
Michael Natterer
f837e3c458 plug-ins: port hot to GEGL, stupid 8-bit port only
(cherry picked from commit bad956cb1f)
2019-07-11 16:00:32 +02:00
Alexandre Prokoudine
80a34d16a6 Update NEWS 2019-07-11 11:52:00 +00:00
Michael Natterer
1ad7cbbb73 plug-ins: port contrast-retinex to GEGL, stupid 8-bit port only
(cherry picked from commit 0e23d7262b)
2019-07-11 12:18:07 +02:00
Jehan
c484a0c17b Issue #3641: gimp-drawable-offset does no longer work in script-fu...
... when one of the offsets is zero.

Found by Ell.

(cherry picked from commit a49a79e244)
2019-07-11 11:59:43 +02:00
Michael Natterer
d7668fb0bd plug-ins: port sphere-designer to GEGL, stupid 8-bit port only
(cherry picked from commit 0188853b23)
2019-07-11 10:40:35 +02:00
Alexandre Prokoudine
59c47bb842 Update NEWS 2019-07-10 16:13:07 +00:00
Jehan
3242eeb527 Issue #2685: Crash when distributing layers horizontally.
Make the returned values of g_list_length() a gint to avoid implicit
type conversion converting a possibly negative integer numberator into
unsigned int (which ends as a huge unsigned int instead of being
negative).

Found by Massimo!

(cherry picked from commit a6ad02a60a)
2019-07-10 17:28:07 +02:00
Jehan
8637d61c04 authors: add houz!
How come he was not in there already?
Also regenerate AUTHORS.

(cherry picked from commit b3f7f36bda)
2019-07-10 17:28:07 +02:00
Michael Natterer
0aded5156f plug-ins: port despeckle to GEGL, stupid 8-bit port only
(cherry picked from commit c59feead89)
2019-07-10 15:41:47 +02:00
Michael Natterer
44d8580f46 pdb, libgimp, app: add gimp_drawable_get_thumbnail_format()
so plug-ins can allocate buffers and stuff before getting the actual
thumbnail data.

(cherry picked from commit fc89dfb09b)
2019-07-10 15:17:07 +02:00
Alexandre Prokoudine
13f8ee76f7 Update NEWS 2019-07-10 11:25:36 +00:00
Alexandre Prokoudine
6274bc2d96 Update NEWS 2019-07-10 11:12:11 +00:00
Michael Natterer
0df4376aa4 plug-ins: port grid to GEGL, stupid 8-bit port only
(cherry picked from commit 0326a3e79a)
2019-07-10 12:46:14 +02:00
Michael Natterer
03e2cd0cfa plug-ins: port lighting to GEGL
(cherry picked from commit eaed92e7a0)
2019-07-10 12:21:30 +02:00
Jehan
c4991cbdbd NEWS: keep up-to-date. 2019-07-10 10:18:14 +02:00
Michael Natterer
dac6943b48 plug-ins: port map-object to GEGL
(cherry picked from commit 75114b1c40)
2019-07-09 17:11:45 +02:00
Michael Natterer
2f2067a5aa Issue #3630 - postscript plugin crashes
gsapi_new_instance() now expects a pointer to a NULL-initialized
pointer. Initialize "void *instance" with NULL. Found by massimo.

(cherry picked from commit bbcc7ca5f5)
2019-07-09 15:39:11 +02:00
Michael Natterer
bd91ddce8b plug-ins: forgot one deprecated call in sample-colorize
(cherry picked from commit 2a54b1b41c)
2019-07-09 13:18:22 +02:00
Michael Natterer
9dbabb8ac6 plug-ins: port sample-colorize to GEGL, stupid 8-bit port only
(cherry picked from commit df7699b814)
2019-07-09 13:16:43 +02:00
Jernej Simončič
c7c7a7d6a9 Installer: fix for issue 3226 2019-07-09 00:41:56 +02:00
Michael Natterer
a7a8fddafe plug-ins: port curve-bend to GEGL, stupid 8-bit port only
(cherry picked from commit 0b4b8d75ea)
2019-07-08 21:24:09 +02:00
Michael Natterer
4415d76102 plug-ins: a ton of cleanup in curve-bend
- move use of deprecated function to very few places
- indentation, formatting
- fix insane variable names, it's now much more readable

(cherry picked from commit 8ac6ec2a00)
2019-07-08 21:11:26 +02:00
Milo Ivir
d3dc0d82a4 Update Croatian translation 2019-07-08 14:46:00 +00:00
Michael Natterer
c97408c134 plug-ins: port tile-small to GEGL, stupid 8-bit port only
...GimpPixelFetcher use down to one!

(cherry picked from commit 069d4345bb)
2019-07-07 18:38:23 +02:00
Michael Natterer
f4b836c68d plug-ins: replace calls to GimpRegionIterator functions
by plain pixel region code, copied right out of gimpregioniterator.c.
Makes porting to GEGL easier and GimpRegionIterator unused.

(cherry picked from commit 775abb03f3)
2019-07-07 17:12:02 +02:00
Michael Natterer
b15f0ff687 plug-ins: port checkerboard to GEGL, stupid 8-bit port only
just for the sake of not using "Psychobilly", hello pippin :)

(cherry picked from commit 8f621ec91d)
2019-07-07 16:06:04 +02:00
Piotr Drąg
aa08ff28a6 Update Polish translation 2019-07-07 13:09:20 +02:00
Milo Ivir
4a16bd1bc3 Update Croatian translation 2019-07-06 20:44:02 +00:00
Milo Ivir
101d48c73b Update Croatian translation 2019-07-06 20:42:01 +00:00
Milo Ivir
75445c04f5 Update Croatian translation 2019-07-06 20:41:41 +00:00
Milo Ivir
e8f76920eb Update Croatian translation 2019-07-06 20:39:51 +00:00
Milo Ivir
93b924e896 Update Croatian translation 2019-07-06 20:38:43 +00:00
Milo Ivir
5f227fc721 Add Croatian translation 2019-07-06 20:38:16 +00:00
Milo Ivir
f5854be7cb Add Croatian translation 2019-07-06 20:36:04 +00:00
Bruce Cowan
ee40487cc9 Update British English translation 2019-07-06 19:17:36 +00:00
Bruce Cowan
17338b9630 Update British English translation 2019-07-06 19:07:18 +00:00
Bruce Cowan
04d5eaee39 Update British English translation 2019-07-06 19:03:07 +00:00
Michael Natterer
bcf6859b01 plug-ins: merge some more warning fixes from master 2019-07-06 15:26:33 +02:00
Michael Natterer
5e5060d598 plug-ins: port gradient-flare to GEGL, stupid 8-bit only
(cherry picked from commit 1900384cc0)
2019-07-06 15:17:22 +02:00
Michael Natterer
5397dac21b plug-ins: some WIP undeprecating curve-bend
better push before it rots... totally unfinished but works.

(cherry picked from commit 96e7a791f8)
2019-07-06 13:13:16 +02:00
Michael Natterer
d9349a5730 app: get rid of a few more GtkAction warnings, and a little cleanup
(cherry picked from commit f7007d5161)
2019-07-05 12:36:26 +02:00
Michael Natterer
9f3823ca6b plug-ins: space invasion leaked into 2.10 file-heif, but incompletely
merge the remaining diff to master so it builds again.
2019-07-05 01:47:43 +02:00
Michael Natterer
9c0085c7ec app: don't warn in gimp_action_history_action_activated()
if there is no "gimp". Happened after the action changes when invoking
the "quit" action.

(cherry picked from commit 87b1a27459)
2019-07-04 17:06:40 +02:00
Michael Natterer
29d765a0bd Issue #3610 - Documentation: missing item in built-in documentation...
...for gimp_context_set_antialias(antialias)

Mention gimp_context_set_antialias() in the stroke docs, and mention
the stroke functions in the antialias docs.

(cherry picked from commit 7a589951c9)
2019-07-04 13:37:18 +02:00
Michael Natterer
e00bb6e0b1 Issue #1725 - "Open location..." can't open internet URIs due to GLIB/GIO
When the remote volume can't be mounted by GIO, continue as if the
file procedure couldn't handle URIs and try downloading/uploading the
file manually.

(cherry picked from commit f370596d04)
2019-07-04 12:51:44 +02:00
Michael Natterer
ff7ca87c09 app: GtkAction -> GAction madness part two
Change all action callbacks so they can be invoked by a GAction:

- add GimpActionCallback typedef:
  void (* cb) (GimpAction*, GVariant*, gpointer)
- change all action callbacks to the GimpActionCallback signature
- add "gimp-activate" and "gimp-change-state" signals to GimpAction,
  with the same signature as the resp. GAction signals
- remove all other custom action signals and only use the new
  GimpAction signals
- pass around appropriate GVariants containing booleans, int32,
  strings
- badly hack around to force a GimpProcedure pointer into a
  uint64 variant
- remove all G_CALLBACK() casts from all action callbacks,
  they all have the same signature now

(cherry picked from commit 3b6b3fc189)
2019-07-04 01:32:18 +02:00
Rodrigo Lledó
0146ce354b Update Spanish translation 2019-07-03 11:48:35 +00:00
Rodrigo Lledó
55bc6b345a Update Spanish translation 2019-07-03 11:45:15 +00:00
Rodrigo Lledó
d674160067 Update Spanish translation 2019-07-03 11:27:53 +00:00
Michael Natterer
c2f4a47f4d plug-ins: fix two harmless compiler warnings
(cherry picked from commit 738c035839)
2019-07-02 17:41:41 +02:00
Jehan
c40d9ae0f6 NEWS: keep up-to-date. 2019-07-02 17:36:14 +02:00
Jehan
262d2023fa 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).

(cherry picked from commit f4af95ab95)
2019-07-02 17:30:34 +02:00
Jehan
4ea2e469d4 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.

(cherry picked from commit 7f76430090)
2019-07-02 17:30:20 +02:00
Jehan
f93eb567ea plug-ins: add a "Save color profile" checkbox in HEIF export.
(cherry picked from commit dfd79ad79b)
2019-07-02 17:27:28 +02:00
Jehan
1849ed9a34 Issue #3093: Invalid characters in Open Location dialog crashes GIMP.
Still a remaining CRITICAL. This was basically the same bug as commit
cf8148df5e, but somewhere else.
2019-07-02 17:22:55 +02:00
Jehan
ae35061fab 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.

(cherry picked from commit 5d6baf5f85)
2019-07-02 17:22:55 +02:00
Michael Natterer
29b300378d 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.

(cherry picked from commit 998bd04bd4)
2019-07-02 16:54:01 +02:00
Michael Natterer
a1a8f00617 app: change all action callback signatures to use GimpAction
instead of GtkAction, which is correct now because all our actions
implement the GimpAction interface.

(cherry picked from commit b9d47f2d1f)
2019-07-02 16:19:09 +02:00
Jehan
345acca1c8 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.

(cherry picked from commit 8ccd49ac78)
2019-07-02 15:47:45 +02:00
Michael Natterer
4a8417fa4c app: fix some warnings in gimpactiongroup.c
They were not deprecation warnings, just hidden between them.

(cherry picked from commit f20b873396)
2019-07-02 14:58:21 +02:00
Michael Natterer
417d0dccd7 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

(cherry picked from commit 86e07c16b5)

Merged to gimp-2-10 to keep the diff to master as small as possible
2019-07-02 14:57:45 +02:00
Piotr Drąg
5801ee048f Update Polish translation 2019-06-30 15:35:06 +02:00
Massimo Valentini
a381387662 issue 3082: screenshot plugin crashes when cancelling...
...the interactive capture dialogue

(cherry picked from commit 6c033317ac)
2019-06-29 18:15:42 +02:00
Jehan
e6e342e58f NEWS: keep up-to-date. 2019-06-29 17:38:59 +02:00
Jehan
dc23facb17 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.

(cherry picked from commit 667b4d71c9)
2019-06-29 17:10:11 +02:00
Michael Natterer
90d0fb4a6e app: get rid of manual object type registration
and all deprecated use of private instance registration.

(cherry picked from commit e72a9d88a5)
2019-06-29 16:43:12 +02:00
Michael Natterer
5cf40570cf libgimpwidgets: don't use g_type_class_add_private() in GimpColorButton
and switch to using G_DEFINE_TYPE_WITH_CODE().

(cherry picked from commit 88188cba0c)
2019-06-29 16:27:05 +02:00
Jehan
ccca743406 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().

(cherry picked from commit f9fd818c3d)
2019-06-29 14:39:18 +02:00
Jehan
390029020f 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.

(cherry picked from commit 9933f46f85)
2019-06-29 14:39:18 +02:00
Michael Natterer
2909514ace 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.

(cherry picked from commit cf8148df5e)
2019-06-29 13:17:56 +02:00
Michael Natterer
9ef3ce4c90 libgimp: forgot to deprecate gimp_drawable_preview_draw_region()
(cherry picked from commit 382fe030ce)
2019-06-28 19:32:52 +02:00
Michael Natterer
190296b47b plug-ins: port nl-filter to GEGL, 8 bit only
(cherry picked from commit 267d925025)
2019-06-28 19:27:11 +02:00
Michael Natterer
dd48c7862b plug-ins: port film to GEGL
(cherry picked from commit c1f2973232)
2019-06-28 18:41:45 +02:00
Michael Natterer
12b8d75ff1 app: add gegl:bayer-matrix and gegl:linear-sinusoid to the menus
in Filters -> Render -> Pattern. Also depend on GEGL from git.

(cherry picked from commit 928b85d25c)
2019-06-28 15:50:40 +02:00
Michael Natterer
2de397791f plug-ins: port fractal-explorer to GEGL, 8 bit only
(cherry picked from commit a3e2dda8c7)
2019-06-28 13:05:23 +02:00
Michael Natterer
88068b0dfc plug-ins: port flame to GEGL, 8-bit only
(cherry picked from commit be411a58a7)
2019-06-28 12:38:35 +02:00
Michael Natterer
69aeb9a2b3 plug-ins: replace gimp_datafiles_read_directories() by GFileEnumerator
in fractal-explorer and gradient-flare.

(cherry picked from commit 6078312bf2)
2019-06-28 11:52:44 +02:00
Hannie Dumoleyn
2d9539ed79 Update Dutch translation 2019-06-27 15:59:27 +00:00
Hannie Dumoleyn
88b7e42f0b Update Dutch translation 2019-06-27 15:57:06 +00:00
Hannie Dumoleyn
a6bccb5022 Update Dutch translation 2019-06-27 15:54:43 +00:00
Michael Natterer
803e5bfb81 pygimp: argh...
(cherry picked from commit d5ac62c6eb)
2019-06-27 13:47:54 +02:00
Michael Natterer
85117940ab pygimp: replace gimp_drawable_get_tile2() by gimp_drawable_get_tile()
(cherry picked from commit 61fe89ad02)
2019-06-27 13:45:56 +02:00
Michael Natterer
5ed0a6dab0 plug-ins: replace gimp_drawable_get_color_uchar() by manual code
(cherry picked from commit 4c7a43d234)
2019-06-27 13:38:35 +02:00
Michael Natterer
4b46bdd6f4 plug-ins: port blinds to GEGL
Found another unfinished result of boredom from years ago.
Stupid 8-bit only port.

(cherry picked from commit 4c4abf7fc4)
2019-06-27 13:26:53 +02:00
Michael Natterer
142105e0e2 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.

(cherry picked from commit c3752ba743)
2019-06-26 18:56:37 +02:00
Michael Natterer
fbee275946 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.

(cherry picked from commit 57ac8cfa7e)
2019-06-26 17:29:21 +02:00
Michael Natterer
34df5ecfe4 plug-ins: fix comment typo in file-png
(cherry picked from commit 06e0ca8ef0)
2019-06-26 17:29:10 +02:00
Michael Natterer
199995bb6b plug-ins: cleanup, copyright headers, formatting in the openexr-wrapper
(cherry picked from commit b07975aa88)
2019-06-26 16:58:14 +02:00
Michael Natterer
9fe8bacf19 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

(cherry picked from commit f7413d70dd)
2019-06-26 16:53:37 +02:00
Michael Natterer
0c2bad823c 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).

(cherry picked from commit 4c58386ead)
2019-06-26 16:28:18 +02:00
Michael Natterer
7b7e2ebecf 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.

(cherry picked from commit 0afcaefec5)
2019-06-26 14:58:30 +02:00
Michael Natterer
ecf96efe4f 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.

(cherry picked from commit e2bacf918c)
2019-06-25 17:59:01 +02:00
Michael Natterer
e918a937d5 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.

(cherry picked from commit 62f010df90)
2019-06-25 13:23:00 +02:00
Michael Natterer
0806588b56 Issue #3532 - Wrong color profile on nikon taken photos, it's...
...always AdobeRGB!

Change all file plug-ins to never call gimp_image_metadata_load_finish()
with the GIMP_METADATA_LOAD_COLORSPACE when they loaded a color profile.

This keeps gimp_image_metadata_load_finish() from assigning a profile
from DCT even if the loaded profile was GIMP's built-in sRGB.

(cherry picked from commit a08293dc74)
2019-06-25 13:22:47 +02:00
Jehan
a4b151759f plug-ins: updating deprecated enum names from libheif.
(cherry picked from commit b1133ef866)
2019-06-25 13:22:35 +02:00
Jehan
1c0761053d Issue #3164: HEIC doesnt have color profile.
Since this requires libheif 1.4.0, released end of February 2019, this
commit should not go into the gimp-2-10 branch right now.

(cherry picked from commit 22e14e0b9b)
2019-06-25 13:22:23 +02:00
Piotr Drąg
96713a30c9 Update Polish translation 2019-06-24 16:16:30 +02:00
Michael Natterer
86c858cc53 app: some formatting in the edit non-visible layers code
(cherry picked from commit e47936182e)
2019-06-24 15:58:42 +02:00
Jehan
a8b9dfbc3f Issue #3560: "Screenshot delay: __ seconds" item lacks mnemonic.
(cherry picked from commit 3604e8e7ad)
2019-06-24 12:03:52 +02:00
Alexandre Prokoudine
a5cc4c8dfd Add woob to the authors list 2019-06-23 17:51:40 +03:00
woob
4afc11580a app: Add initial support for configurable editing of non-visible layers (Issue #2713)
Add a "edit-non-visible" configuration option, found under
Edit->Preferences->Tool Options as "Allow editing on non-visible layers"
2019-06-23 16:18:05 +03:00
Emin Tufan Çetin
89ff122e01 Update Turkish translation 2019-06-22 22:02:45 +00:00
Emin Tufan Çetin
3a7ebc0ec7 Update Turkish translation 2019-06-22 21:50:38 +00:00
Michael Natterer
f73e31571a Issue #3500 - Preferences option to convert to Preferred RGB profile...
...doesn't work

Rename the labels to "built-in sRGB color profile" and "built-in
grayscale color profile" because that's what the option does, it never
converted to the preferred profiles from preferences.

(cherry picked from commit d67f4604aa)
2019-06-21 12:50:38 +02:00
Michael Natterer
f97464f7bf Revert "Issue #3164: HEIC doesnt have color profile."
This reverts commit bbe3911c80.

..and not this one either.
2019-06-21 10:11:52 +02:00
Michael Natterer
f09fbbda3f Revert "plug-ins: updating deprecated enum names from libheif."
This reverts commit 85a196e711.

Didn't mean to push that one...
2019-06-21 10:11:28 +02:00
Michael Natterer
28b20af6b2 Issue #3532 - Wrong color profile on nikon taken photos, it's...
...always AdobeRGB!

Enable the code in gimp_image_metadata_update_colorspace() which syncs
the DCF information to the image's actual color profile, at least as
good as it can, and otherwise sets it to "unspecified".

Also fixes issue #301.

(cherry picked from commit c4ee350f02)
2019-06-21 10:06:04 +02:00
Jehan
85a196e711 plug-ins: updating deprecated enum names from libheif.
(cherry picked from commit b1133ef866)
2019-06-20 19:31:09 +02:00
Jehan
bbe3911c80 Issue #3164: HEIC doesnt have color profile.
Since this requires libheif 1.4.0, released end of February 2019, this
commit should not go into the gimp-2-10 branch right now.

(cherry picked from commit 22e14e0b9b)

Cherry-picked now anyway... If we allow new featues in 2.10, we must
also allow for a few updated dependencies.
2019-06-20 19:30:19 +02:00
Jehan
cfd5d5038c Issue #3493: GIMP changes R-channel, when it should not.
Instead of treating any unspecified TIFF channel as non-premultiplied
alpha, let's now ask the user (in non-interactive case, we continue
defaulting to non-premultiplied channel and outputing a message). The 3
choices are: premultiplied, non-premultiplied (which is the default so
you can just hit Enter and get same result as previously) and channel.

It's still not perfect as it still assumes that an alpha channel will
necessarily be the first extra channel (though the spec does not mandate
such assumption). Let's say for now that it is enough. Using extra
channels for the alpha channel only is most likely the most common usage
(actually the spec only has specific types for such usage).

(cherry picked from commit 7cf98231f1)
2019-06-20 18:57:10 +02:00
Michael Natterer
da33bb5107 app: consolidate all metadata syncing code into gimpimage-metadata.c
Add gimp_image_metadata_update_pixel_size(), _bits_per_sample(),
_resolution() and use them from gimp_image_set_metadata() and from
various places in gimpimage.c which had identical copies of the same
code.

Also add gimp_image_metadata_update_colorspace() which syncs the color
space stored in the image's metadata with the color space of the
image's actual color profile. Call the function from the right places.

The body of gimp_image_metadata_update_colorspace() is currently
disabled because the syncing of color space information is
controversial, see issue ##3532 and issue #301.

(cherry picked from commit b9829eddfe)
2019-06-20 16:19:25 +02:00
Michael Natterer
11dfa49b44 libgimpconfig: fix previous commit to return the right error token
(cherry picked from commit d7d281bd97)
2019-06-20 15:03:17 +02:00
sarah
7a2ffc1a2c enhancement: validate reference argument of gimp_scanner_parse_string before using it
(cherry picked from commit f19844d0d1)
2019-06-20 15:03:03 +02:00
Jehan
c7867017e4 NEWS: keep up-to-date.
Future GIMP 2.10.14 is starting well! :-)
2019-06-18 19:00:48 +02:00
Thomas Manni
6dd2475bf8 Foreground-select Tool: new Preview Mode and color selector for "On color" preview
This commit adds a new preview called "Grayscale", allowing to see the
resulting mask in black and white. The previous preview is now called
"On color" and allow users to choose the color and opacity, instead of
imposing only 4 colors (red, green, blue, grey).

(cherry picked from commit d6bcb16b0b)
2019-06-18 18:06:30 +02:00
Michael Natterer
d01dd612e7 app: add missing space to a tooltip of the new feather feature
(cherry picked from commit 66b55da9c1)
2019-06-17 00:03:21 +02:00
Jehan
327b40792b app: commit the free selection before floating it.
When using a selection modifier Altr+Ctrl|Shift, we want to commit the
selection. If I do it too late though, and if the polygon was not closed
yet, the computed coordinates for the floating selection end up (0, 0)
because it is based on the selection coordinates (yet an unclosed
polygon does not create a selection yet). So commit the tool from within
GimpSelectionTool instead, as soon as we confirmed that the class is
going to take over with SELECTION_MOVE or SELECTION_MOVE_COPY.

Note: ability of quick copying|cuting an unclosed polygon is very useful
as it removes the additional step for a case where anyway committing the
selection was a prerequisite.

(cherry picked from commit 50f8cb8542)
2019-06-16 20:54:03 +02:00
Jehan
f948aaa939 Issue #3514: Free Select tool: Alt-Ctrl|Shift not working unless...
... selection is committed;
Fast copy|cut-paste modifiers in selection tools were not working with
the Free Select tool, even when the polygon was closed. The reason was
that GimpPolygonSelectTool was not properly chaining up with the parent
implementation for oper_update(), and then upon a button press, we need
to check to call gimp_selection_tool_start_edit() to see if the action
should not be handled by GimpSelectionTool.
Of course, since we don't necessarily want all child class of
GimpPolygonSelectTool to support these modifiers (typically we may not
want these in the Foreground select tool), I set allow_move to FALSE,
then set it to TRUE only in the GimpFreeSelectTool subclass.

(cherry picked from commit c9a91b32bc)
2019-06-16 20:20:04 +02:00
Michael Natterer
45aaa3a45d app: some files were missing from the previous commit
(cherry picked from commit 5160f51676)
2019-06-16 17:07:55 +02:00
Michael Natterer
a65042aebf Issue #3512 - feather selection doesn't work at edges of images
Add a "gboolean edge_lock" parameter to GimpChannel::feather() and a
"Selected areas continue outside the image" toggle to the "Feather
Selection" dialog, just like they exist for shrink selection and
border selection. At the end, convert the boolean to the right abyss
policy for gegl:gaussian-blur.

(cherry picked from commit aace6b179b)
2019-06-16 16:55:03 +02:00
Piotr Drąg
ddb704634e Update Polish translation 2019-06-16 13:36:56 +02:00
Jernej Simončič
c71a146220 Installer: forgot about .xcf extension 2019-06-16 09:18:38 +02:00
Jernej Simončič
e8ac2ed19b Installer: minor fixes 2019-06-16 00:28:10 +02:00
Jernej Simončič
fa1d71f714 Installer: ported install script to Inno Setup 6, add per-user install support
Rewrote file association handling to work both for all users and per-user
2019-06-15 23:55:44 +02:00
Julien Hardelin
8623119e7a Update French translation 2019-06-15 13:30:11 +00:00
Julien Hardelin
538156f715 Update French translation 2019-06-15 13:16:04 +00:00
Jernej Simončič
ad7434bb48 Installer: install 64-bit Python on 64-bit Windows 2019-06-14 20:27:11 +02:00
Jernej Simončič
cd8192ad5b Installer: changes for 2.10.12 2019-06-14 08:23:36 +02:00
Oleksii Samorukov
f17e3b157d Remove <U+FEFF> character before shebang header, OSX is very strict on that 2019-06-13 14:45:15 +02:00
Michael Natterer
73a0ad7c31 configure.ac: post-release version bump to 2.10.13 2019-06-12 23:37:45 +02:00
Michael Natterer
3d8535b55f configure.ac: bump versions for the 2.10.12 release 2019-06-12 23:17:10 +02:00
Michael Natterer
9b205f1583 NEWS: formatting, typos 2019-06-12 23:16:19 +02:00
Jehan
3809645bc5 NEWS: create news section for GIMP 2.10.12. 2019-06-12 23:10:00 +02:00
Alexandre Prokoudine
4938615236 Update Russian translation 2019-06-12 22:49:57 +03:00
Alexandre Prokoudine
fa87116fe6 Offset tool: mark forgotten messages for translation 2019-06-12 22:49:57 +03:00
Michael Natterer
add350f335 AUTHORS: regenerated 2019-06-12 21:43:19 +02:00
Øyvind Kolås
4abf2306b3 build: depend on babl-0.1.66
(cherry picked from commit b3dcb5aaac)
2019-06-12 21:36:44 +02:00
Michael Natterer
e70c08cdd0 app: add missing parameter in test-xcf.c 2019-06-12 21:06:56 +02:00
Kalev Lember
aedee5ef82 desktop: Update gimp-data-extras.metainfo with gimp's new appstream ID
(cherry picked from commit 6786343909)
2019-06-12 17:25:06 +02:00
Jehan
4c8c4c7e96 authors.xml: add Oleksii Samorukov and Yoshio Ono.
(cherry picked from commit 3ebad22539)
2019-06-12 17:23:51 +02:00
Jehan
76f1a02631 plug-ins: get rid of compilation warning.
Note that I am using twice TIFFErrorHandler type. This is because
TIFFWarningHandler does not exist, despite what the docs says and
upstream code actually uses twice the same handler type.

(cherry picked from commit de866d8815)
2019-06-12 17:23:51 +02:00
Anders Jonsson
b7b275f908 Update Swedish translation 2019-06-11 20:09:16 +00:00
Anders Jonsson
4fe8a76f9b Update Swedish translation 2019-06-11 19:18:26 +00:00
Anders Jonsson
e8f7b3575d Update Swedish translation 2019-06-11 19:06:43 +00:00
Michael Natterer
727b83cbe6 tools: fix windows file handling in gimp-test-clipboard.c
Use g_open() for proper filename encoding and _O_BINARY to avoid line
ending conversions.

(cherry picked from commit a9b36245c9)
2019-06-11 19:33:10 +02:00
Jehan
bf3ea7539e desktop: give 2.10.12 release date.
Let's make the release happen!

(cherry picked from commit fa6b57cfbd)
2019-06-11 17:33:20 +02:00
Jehan
0667fd27c6 Issue #3493: GIMP changes R-channel, when it should not.
Our TIFF loading code was not taking into account the case when extra
channels were stored in the TIFF file while ExtraSamples field is not
set. Yet as a side effect of a later channel count, we were setting
`alpha` to TRUE while `save_transp_pixels` was left uninitialized (hence
undefined behavior).

For now let's make sure we have no undefined behavior. When the
ExtraSamples field is missing and at least one extra channel is stored,
we will consider the first extra channel as non-premultiplied alpha
(this is also what we were doing when ExtraSamples was set to
"Unspecified data" and apparently according to Massimo, it would be a
common behavior in other software).

Note that it is an improvement from previous code (no undefined
behaviour anymore, instead we handle explicitly the TIFF error). Yet
this is not perfect yet. Ideally we should pop-up a dialog asking what
to do with this extra channel: either open as a channel (no alpha), or
as premultiplied or non-premultiplied alpha.

(cherry picked from commit b090bc5213)
2019-06-11 15:50:48 +02:00
Jehan
6a854e45fa Issue #2194: Action search dialog behaves as a full window using a...
... tiling window manager.
Completing commit e6364ffa81 by additionally making sure the search
dialog is non-modal. Otherwise it prevents positionning it wherever we
want and it stays in the center, potentially hiding the canvas and
darkening the main window.

(cherry picked from commit aa1171ada2)
2019-06-11 02:23:07 +02:00
Daniel Mustieles
33aada6b6f Update Spanish translation 2019-06-10 08:18:45 +00:00
Ell
9c8e1704c4 Issue #3484 - While moving a nested layer group, some area isn't updated
In gimp_group_layer_translate(), when translating a nested group
layer, call gimp_drawable_update_all() to update the child-layers'
original area *before* updating the group's offset, at which point
the group parent's size is updated, causing subsequent area-updates
during translation to be clipped to the parent's new bounds,
preventing the original areas from being properly cleared.

(cherry picked from commit 4a20a75dc3)
2019-06-10 03:55:44 -04:00
Ell
854374b2ce app: add gimp_drawable_update_all()
Add a new GimpDrawable::update_all() virtual function, and a
corresponding gimp_drawable_update_all() function, which updates
the full contents of the drawable.  Unlike calling
`gimp_drawable_update (drawable, 0, 0, -1, -1)`, which updates the
entire drawable area, gimp_drawable_update_all() only updates the
area that has actual content.  While the default implentation does
simply update the entire drawable area, GimpGroupLayer overrides
this function to recursively update its child layers, rather than
the its entire area.

(cherry picked from commit 3e5cbb03d9)
2019-06-10 03:55:43 -04:00
Piotr Drąg
1f0abe57cc Update Polish translation 2019-06-09 17:26:11 +02:00
Øyvind Kolås
d66e7dccac app: add GeglOperation *operation argument to GimpLayerModeBlendFunc
Some blend funcs depend on constants from the specifc color space we are
operating in and needs the space or operation propagated to the worker function
of the operation as discovered in issue #3451.

This commit propagates the operation, leaving the specific blend functions
needing it to call gegl_operation_get_source_space or similar without needing
that overhead for the rest.

(cherry picked from commit 8e90468308)
2019-06-09 12:48:59 +02:00
Jehan
c897aabcc8 plug-ins: PNG export TRC chosen similarly to TIFF.
While we tend to default to sRGB for 8-bit max formats (such as JPEG or
WebP) when no explicitly-assigned profile was set, there is no need to
do so for PNG too. Indeed since we have the ability to export 16-bit
PNG, let's consider this is ok to export 16-bit linear data when writing
GIMP's default linear profile.

Moreover let's follow the profile's (fallback to storage's) TRC also
when exporting to a specific precision (as chosen manually in the
dialog), not only when sticking to "Automatic", unless we are downsizing
a high bit depth work image to 8-bit without a manually assigned profile
(the only case we forcefully export as sRGB data, hence convert the
profile if linear storage).

(cherry picked from commit 24ed5870ad)
2019-06-07 19:09:00 +02:00
Jehan
e7cd743b05 plug-ins: simplify code a bit by removing useless variable.
(cherry picked from commit 8cd3f5a853)
2019-06-07 19:06:40 +02:00
Jehan
39672c8559 plug-ins: add the 8-bit linear with no assigned profile exception...
... in JPEG export.
Same as the WebP export, which is quite similar (8-bit max format), when
no profile was explicitly set, we want to convert any data from storage
format to non-linear (unlike when exporting high bit depth formats, such
as TIFF).
We only make an exception for 8-bit linear. This commit adds this
exception.

(cherry picked from commit 0461022198)
2019-06-07 19:05:23 +02:00
Jehan
bb9571db60 plug-ins: remove the "Advanced Options" expander in WebP export dialog.
Similarly to other export dialogs, we don't consider anymore metadata or
profile writing as being advanced options. Since these were the only
options shown in our current WebP export dialog, I removed the expander
altogether and moved everything out.

See also commit 540cfa9611.

(cherry picked from commit 26ba915ca5)
2019-06-07 19:02:04 +02:00
Jehan
5c8860bd49 plug-ins: fix profile writing in save_animation() in WebP export.
Profile and output linearity decision was doubled as save_layer() and
save_animation() and I realize that I forgot to update the
save_animation() one in earlier commits.

To avoid code copy-paste and divergence, I added an internal
webp_decide_output() function which I use in both aforementionned calls.

(cherry picked from commit 6712228e5e)
2019-06-07 19:01:56 +02:00
Jehan
0aad97cc18 plug-ins: add a "Save color profile" checkbox in WebP export.
Unlike most other formats, it didn't have one yet!

(cherry picked from commit 96e37dfdaf)
2019-06-07 19:01:49 +02:00
Jehan
1bdac39a92 plug-ins: improve decision on exported data format in Webp.
Same as other formats, we make sure that an explicitly set profile TRC
is always followed. When no profile is set, we always export as sRGB
when there is precision downsizing to avoid shadow posterization, since
WebP stores 8-bit max per channel (as far as I know, or at least as far
as we implemented it in our plug-in).
We only take the storage format into account when it is 8-bit linear
with profile export. In such case, we avoid conversion from 8-bit linear
to 8-bit sRGB.

This is different to TIFF export for instance, where we fallback on
following storage format TRC as we are able to export all sort of
precisions, hence with minimum quality loss.

(cherry picked from commit 2a1eabc177)
2019-06-07 19:01:34 +02:00
Jehan
a11cc8a63d plug-ins: improve decision of exported data format in TIFF export.
Same as we did for PNG and JPEG, we want to always export data with the
TRC of a profile manually assigned, and in particular NOT the curve of
the storage in GIMP (i.e. you may work on 32-bit linear, yet if you
assigned a sRGB TRC profile, this is what you should export). The
storage format will only dictate the exported data TRC when writing out
the default profile (i.e. no explicit profile assignement).
As a last case, when no profile is saved, we always export as sRGB.

As for the export precision, we always follow the storage one's, except
sometimes for 8-bit images. We promote 8-bit images to 16-bit if and
only if the storage does not match the export data linearity, to avoid
too much quality loss during format conversion.

(cherry picked from commit 8d9e70011d)
2019-06-07 18:57:40 +02:00
Ell
7acb6f36ab app: indentation fix in gimp:offset
(cherry picked from commit 8c1567f901)
2019-06-07 03:54:39 -04:00
Ell
618b6a62bd app: in gimp:offset, fix OFFSET_TRANSPARENT fast-path for chunked input
(cherry picked from commit 533091055e)
2019-06-07 03:49:49 -04:00
Ell
257e35dda1 app: avoid duplicate offset actions
Blacklist the "tools-offset" action in the GUI, and only keep
"filters-offset", to avoid duplication.  Update gimp:offset's
description, so that "filters-offset" gets a proper tool-tip.

(cherry picked from commit 42d4255262)
2019-06-06 04:52:32 -04:00
Ell
0d7a57d782 app: add GimpFilterTool::region_changed() virtual function
Add a new GimpFilterTool::region_changed() virtual function, which
gets called whenever the filter region changes, either due to a
change to the tool's "region" option, or a change to the image
mask.

Override GimpFilterTool::region_changed() in GimpOperationTool and
GimpOffsetTool, instead of listening to a change to the "region"
option in GimpTool::options_notify(), so that the tools are
properly updated when the image mask changes.

(cherry picked from commit 066827e23c)
2019-06-06 03:15:10 -04:00
Ell
3af7c508ad app: in gimp_filter_tool_get_drawable_area(), don't return empty area
In gimp_filter_tool_get_drawable_area(), when the image mask
doesn't intersect the drawable, return a minimal area, instead of
an empty/invalid area.

(cherry picked from commit 428ee0e2ad)
2019-06-06 03:10:04 -04:00
Ell
175e3ea7d9 app: various fixes/cleanups to last commits
(cherry picked from commit 30429e30e2)
2019-06-06 03:10:03 -04:00
Ell
ca4612cc43 Issue #40 - Layer offset tool
Add a new Offset filter tool, as a front-end to gimp:offset.  The
tool replaces, and provides the same interface as, the drawable-
offset dialog, while also providing live preview and on-canvas
interaction.

Note that we don't simply use a custom propgui constructor for
gimp:offset, since we need a little more control.

(cherry picked from commit 3a4a00c71e)
2019-06-05 19:10:52 -04:00
Ell
003b138ee6 app: implement gimp_drawable_offset() in terms of gimp:offset
Implement gimp_drawable_offset() in terms of gimp:offset, added in
the previous commit.  Other than avoiding duplication, this also
allows gimp_drawable_offset() to respect the current selection and
component mask (see issue #39.)

(cherry picked from commit 5b2f3980bd)
2019-06-05 19:10:51 -04:00
Ell
f7a1aec1e9 app, libgimpbase: add gimp:offset operation
Add a new gimp:offset operation, which implements equivalent
functionality to gimp_drawable_offset(), in preparation for adding
an interactive offset tool.

To simplify things, add a GIMP_OFFSET_WRAP_AROUND value to the
GimpOffsetType enum, to avoid the need for a separate wrap-around
flag.  This makes the gimp-drawable-offset procedure parameters a
little superfluous, but whatever.

(cherry picked from commit 40fefb6076)
2019-06-05 19:10:49 -04:00
Ell
fce4e98097 plug-ins: in file-tiff, don't leak image when not saving layers
In file-tiff, when not saving layers, avoid duplicating the image
to create the merged version if it's already been duplicated, and
make sure to delete the duplicated image otherwise.

(cherry picked from commit 8831ef2ea0)
2019-06-03 12:43:21 -04:00
Ell
186236ff35 app: update drawable when committing Warp tool
Make sure to update the drawable after committing the Warp tool, if
high-quality-preview is disabled, and we use a non-nearest sampler.

Necessary after commit d928a80b7f.

(cherry picked from commit 2da5cb562d)
2019-06-03 09:58:45 -04:00
Marco Ciampa
eae506a9da Updated Italian translation 2019-06-03 11:17:48 +02:00
Michael Natterer
e905f84a52 Issue #2057 - All tool presets change FG, BG and Pallete color...
...even when not supposed to

Don't use gimp_config_copy() to set the tool options from the ones
stored in the preset. Instead, add utility function
tool_manager_copy_tool_options() that only copies properties of
GimpToolOptions and its subclasses.

Simply set the tool, copy the tool options' context properties, then
copy the tool options' own properties and done. Much more obvious and
works.

(cherry picked from commit a14834e336)
2019-06-02 15:17:07 +02:00
Michael Natterer
46f94d2c75 app: remove redundant assignment in gimptoolpreset.c
(cherry picked from commit 8d1c36d9ce)
2019-06-02 15:14:28 +02:00
Piotr Drąg
bf18c3162f Update Polish translation 2019-06-02 14:09:26 +02:00
Michael Natterer
645d987e07 Issue #2957 - Gimp crashes when I attempt to change the icon size
Simplify GimpDockbook's signal connect/disconnect to
GimpGuiConfig::size-changed a lot, most likely to a point where some
connection doesn't get leaked, so this bug is probably fixed.
2019-06-02 03:29:19 +02:00
Ell
9db555149f app: avoid unnecessarily updating drawable after merging filter
In gimp_drawable_merge_filter(), add an "update" parameter, which
specifies whether to update the affected region of the drawable
after applying the filter.  Avoid updating the drawable when
commiting a GimpDrawableFilter (and manually update the drawable if
filter application was cancelled), and when anchoring a floating
selection, since in both cases the relevant region of the drawable
has already been updated.

(cherry picked from commit d928a80b7f)
2019-06-01 13:29:04 -04:00
Balázs Úr
99ae9a32da Update Hungarian translation 2019-06-01 16:58:25 +00:00
Michael Natterer
a624010931 Issue #2194 - Action search dialog behaves as a full window...
...using a tiling window manager

Set GimpSearchPopup's type hint to GDK_WINDOW_TYPE_HINT_DIALOG.

(cherry picked from commit e6364ffa81)
2019-06-01 17:40:37 +02:00
Michael Natterer
dd3529c0e9 libgimpwidgets: keep gimpwidgetsenums.h in alphabetical order
(cherry picked from commit 2f925e7277)
2019-06-01 16:43:07 +02:00
Michael Natterer
ef6bb9d4ad Issue #2643 - Conversion to grayscale fails with artifacts
Connect GimpDisplayShell to GimpImage::mode-changed and update its
cached color transforms. Also get rid of a duplicate conection to
GimpImage::precision-changed.

(cherry picked from commit a1aa179436)

No idea why the artifacty never appeared on 2.10, the code was just as
broken as in master...
2019-06-01 14:27:00 +02:00
Ell
fe9c1732b9 app: add "alpha" propertry to gimp:mask-components
In gimp:mask-components, add an "alpha" property, which controls
the masked-in alpha value in case there's no aux buffer.  Set it to
0 by default, so that gimp:mask-components behaves normally in the
absence of an aux buffer (as if the aux buffer was empty).  Set it
to 1 in the image's visible-mask node, to maintain the current
alpha-component visibility behavior.

This fixes incorrect results when the output bounding box of a
drawable filter is smaller than the drawable, which can lead to a
NULL aux buffer being fed to the filter's gimp:mask-components
node.

(cherry picked from commit 6425bf820a)
2019-05-31 13:11:26 -04:00
Ell
e457ddf993 Revert "app: avoid NULL output in layer-mode ops"
On a second thought... nope :)  We'll fix it another way.

This reverts commit 60947b7a34826657395ca485d334ccb302106e07.

(cherry picked from commit 3766af9ac9)
2019-05-31 13:11:26 -04:00
Ell
818570d6cc app: avoid NULL output in layer-mode ops
In GimpOperationLayerMode and GimpOperationReplace, make sure we
don't return a NULL output buffer, or forward a NULL input buffer,
but rather create an appropriate empty buffer in this case.  This
avoids wrong results when the layer-mode op's output is connected
to the aux input of a subsequent op, as a result of the op behaving
differently with a NULL aux buffer (in particular, this can happen
when a drawable filter's output bounding box is smaller than the
drawable.)

(cherry picked from commit 8fcac3298c)
2019-05-31 12:25:47 -04:00
Michael Natterer
c8fb30ab3c Issue #3057 - Retain last user-chosen ICC profile information...
...when generating "TRC variants"

When creating a new profile with different TRC from an existing
profile, keep all the original profile's description, model,
manufacturer and copyright strings around, but prefix them with "GIMP
from " or similar to indicate that they are different. Also make sure
we don't prefix strings with GIMP stuff multiple times when profiles
are generated repeatedly.

(cherry picked from commit 3cad4aa4c2)
2019-05-31 15:48:13 +02:00
Michael Natterer
8d05d01820 app: fix undoing image parasite attach/detach to emit the right signals
Add "gboolean push_undo" parameters to gimp_image_parasite_attach()
and _detach() and use the API also from undo, instead of implementing
attaching/removing manually and forgetting about the signals.

Fixes updating of the image properties color profile page.

(cherry picked from commit 710cfc1f47)
2019-05-30 16:58:53 +02:00
Michael Natterer
29ef374228 app: make sure builtin profiles *really* don't get attached to images
gimp_image_parasite_attach(): when we detected that a builtin profile
is about to be attached, actually bail out after removing the old
profile, instead of continuing to attaching the builtin profile
anyway. Gah...

(cherry picked from commit 07ffef38c3)
2019-05-30 16:15:51 +02:00
Michael Natterer
20b47618d0 app: use the DEFAULT_USE_PATTERN define instead of TRUE in GimpPreset
(cherry picked from commit e7307194cf)
2019-05-30 11:50:46 +02:00
Ell
0c4c1f1a8c app: s/gimp_list_compare()/gimp_g_list_compare()/
... so we don't clash with the GimpList namespace.

(cherry picked from commit 8ef461bb70)
2019-05-30 03:31:51 -04:00
Ell
80ea17d90b app: fix memory leak in previous commit
(cherry picked from commit 08ebcce2fa)
2019-05-30 02:43:53 -04:00
Ell
38e954ba25 app: allow moving an intersecting pair of guides with the Move tool
This commit adds support for moving together an intersecting pair
of guides using the Move tool, by dragging the guides at their
point of intersection.  This is useful when the guides are used to
mark a point, rather than a pair of lines (e.g., as is the case for
the mandala symmetry guides, which mark the symmetry's point of
origin).

Add gimp_image_pick_guides(), which can return a set of guides,
rather than a single guide.  The API allows an arbitrary set of
guides to be returned, but, in practice, at most two intersecting
guides are returned, as per the above.

In GimpMoveTool and GimpGuideTool, add support for moving multiple
guides together, and, in GimpMoveTool, use gimp_image_pick_guides()
to potentially pick multiple guides.

(cherry picked from commit 1e95481feb)
2019-05-30 01:52:03 -04:00
Ell
4dd3e73aaa app: add gimp_list_compare()
... which lexicographically (shallowly) compares a pair of GLists.

(cherry picked from commit c4ce70a2d3)
2019-05-30 01:52:03 -04:00
Sabri Ünal
7b4ef46fe4 Issue #3119 - Two tooltips were marked as translatable
(cherry picked from commit b1c113c444)
2019-05-30 00:42:02 +02:00
Sabri Ünal
fb03526f92 Issue #3105 - "Maximum Image Size" changed to "Maximum new image size"
Because of the real sentence is "Maximum new image size", this patch was necessary.
2019-05-29 22:24:06 +00:00
Michael Natterer
159a0a779f Issue #2986 - Input controller configuration window is too small by default
Set a minimum size on the event list's scrolled window.

(cherry picked from commit 476cf19747)
2019-05-29 23:37:06 +02:00
Michael Natterer
b5159905e0 Issue #263 - Add a "Save Keyboard Shortcuts Now" button...
...to the Configure Keyboard Shortcuts dialog

Add the button, based on an old patch from Sven Neumann, and make the
buttons in the keyboard shortcuts and input devices dialogs look and
behave the same.

(cherry picked from commit 04b69e2494)
2019-05-29 16:15:45 +02:00
Ell
92bec259ac app: add support for offset buffers in gimp_gegl_apply_[cached_]operation()
In gimp_gegl_apply_[cached_]operation(), add support for output
buffers whose extent's top-left corner is not (0, 0).  This is
needed by the previous commit.

(cherry picked from commit a6393e6c55)
2019-05-29 05:39:03 -04:00
Ell
df06c062cd app: fix symmetry transform in Clone/Heal tools when brush is cropped
In GimpSourceCore, when applying a symmetry transform to the source
content, combine the transform op with translation to the paint-
buffer coordinates, so that subclasses (namely, GimpClone and
GimpHeal) can use the op to apply the transformation directly from
the source buffer to the paint buffer in a single step.  This is
both more efficient, and avoids incorrect symmetry transforms when
the paint buffer is cropped to the bounds of the drawable.

(cherry picked from commit a701032b4e)
2019-05-29 05:26:55 -04:00
Ell
c75ba806be app: implement gimp_symmetry_get_operation() in terms of gimp_symmetry_get_matrix()
Remove the GimpSymmetry::get_operation() virtual function, and
instead implement gimp_symmetry_get_operation() by returning an
appropriate gegl:transform node based on the matrix returned by
gimp_symmetry_get_matrix().  The returned node is owned by the
caller; since we no longer use the node's identity for caching
trnasformed brushes, we no longer cache the transformation nodes.

Remove the function's paint_width and paint_height parameters, and
instead return a transformation that should be applied at the
center of the brush.  This simplifies the application of the
transformation in the Clone and Heal tools, as per the next commit.

Remove the implementation of GimpSymmetry::get_operation() from all
its subclasses, which should now only implement
GimpSymmetry::get_transform().

(cherry picked from commit 60a3965020)
2019-05-29 05:26:54 -04:00
Ell
3868733ea3 app: add gimp_gegl_create_transform_node()
... which takes a GimpMatrix3, and returns a corresponding
gegl:transform node.

(cherry picked from commit 3895dc07a9)
2019-05-29 05:26:54 -04:00
Ell
2025bbed65 app: use gimp_symmetry_get_matrix() in GimpInk
... instead of calculating the matrix manually.

(cherry picked from commit 117734f45f)
2019-05-29 05:26:53 -04:00
Ell
a474e69573 app: add gimp_symmetry_get_matrix()
... which returns the brush transform corresponding to a given
GimpSymmetry stroke as a GimpMatrix3, as per
gimp_symmetry_get_transform().

(cherry picked from commit cd7bcd081b)
2019-05-29 05:26:52 -04:00
Ell
bf6489f727 app: don't add fg color to history in GimpEraser
Add GimpPaintbrush::get_color_history_color() virtual function,
which should return the color to be added to the color history upon
painting, if any.  The default implementation returns the
foreground color, when not using a pixmap brush or color-from-
gradient.

Override this function in GimpEraser, to return the background
color when the affected drawable has no alpha channel, instead of
overriding GimpPaintCore::paint() for this purpose.  This avoids
erroneously adding both the background and foreground colors to the
history.

(cherry picked from commit 86f4d4d41d)
2019-05-29 05:26:51 -04:00
Michael Natterer
fa173b9675 libgimpcolor: better error messages in GimpColorProfile and GimpColorTransform
(cherry picked from commit 890b554230)
2019-05-28 17:38:42 +02:00
Michael Natterer
788c09259c Issue #3132 - Missing accelerator on "Export Image as JPEG" dialog
Change toggle button label to "Save color _profile".

(cherry picked from commit 0be3fce4fb)
2019-05-28 15:07:00 +02:00
Michael Natterer
d968eff2f6 Issue #2794 - Gimp crash just on File Open and Edit Preferences
As suggested by LRN, change gimp_sigfatal_handler() on Windows to
dstinguish between fatal and non-fatal exceptions so we don't abort on
each minor hickup.

(cherry picked from commit 679fd5f231)
2019-05-28 12:01:59 +02:00
Michael Natterer
54a383685e app, plug-ins: make sure a GIH brush's spacing is preserved
across load and save, by introducing a gimp-brush-pipe-spacing
parasite.

(cherry picked from commit 0710051e2b)
2019-05-28 00:28:30 +02:00
Marco Ciampa
1b0a17c0ec Updated Italian translation 2019-05-27 18:48:38 +02:00
Piotr Drąg
aea7f8e943 Update Polish translation 2019-05-27 18:18:35 +02:00
Michael Natterer
de568a0f61 app: use g_clear_pointer() in more places
(cherry picked from commit 901350ba20)
2019-05-27 17:51:14 +02:00
Ell
4208ff8147 Issue #886 - Artifacts symmetry painting with big brushes
In GimpClone and GimpHeal, use gimp_gegl_apply_operation(), instead
of gegl_node_process(), to apply the symmetry transform, which both
performs chunking and avoids aliasing problems.

(cherry picked from commit 024bc4cd3f)
2019-05-27 11:09:54 -04:00
Michael Natterer
7a6926a50b Issue #3067 - "Make New from Visible" produces wrong results
Call gimp_projectable_structure_changed() when the image's profile
changes so the projection buffer gets reallocated.

(cherry picked from commit 1e07f00a95)

(Picking this is not strictly needed, but did it anyway because it
doesn't hurt and this commit is hard to miss if we finally merge space
invasion to stable).
2019-05-27 15:24:28 +02:00
Michael Natterer
23c1e0328a Issue #3398 - colour map picker isn't positioned on the correct...
...-last positioned- monitor

Use gimp_dialog_factory_position_dialog() in GimpColormapEditor and
GimpPaletteEditor so the color dialogs appear where they were before.

(cherry picked from commit 765abcd316)
2019-05-27 14:58:08 +02:00
Michael Natterer
eb99c1a82f app: add gimp_dialog_factory_position_dialog()
which is the logic that used to be in color_area_color_clicked()
factored out to proper API. It makes sure that a dialog that was
visible before (and was only hidden not destroyed) appears at the same
point on the same monitor as before. See issue #1093.

(cherry picked from commit ebb6b08e62)
2019-05-27 14:33:04 +02:00
Ell
6a98b28a00 app: fix Ink tool symmetry transform
... to take tilt into account.

(cherry picked from commit 39e1a6dfea)
2019-05-27 02:16:36 -04:00
Michael Natterer
6fa861cec6 app: minor formatting fixes in gimpdrawable-bucket-fill.c
(cherry picked from commit c1cba759f8)
2019-05-27 00:31:25 +02:00
Ell
b2dac69b7e app: derive GimpEraser from GimpPaintbrush
In GimpPaintbrush, factor out the code responsible for determining
the current dab's paint parameters and content to a new
GimpPaintbrush::get_paint_params() virtual function.

Derive GimpEraser from GimpPaintbrush, instead of directly from
GimpBrushCore, implementing get_paint_params() appropriately.
This allows GimpEraser to reuse the paint-buffer content across
dabs, improving performance.

(cherry picked from commit aba4eef916)
2019-05-26 14:49:21 -04:00
Ell
eaef7dcf44 app: add symmetry-transform support to the Ink tool
In GimpInk, apply the current symmetry transform, as per
gimp_symmetry_get_transform(), to rendered blobs.

(cherry picked from commit 3b56bd7a9a)
2019-05-26 14:47:56 -04:00
Ell
e961b13ae6 app: use gimp_symmetry_get_transform() in paint code
Use gimp_symmetry_get_transform() instead of
gimp_symmetry_get_operation() throughout the paint code, where
possible.  This allows us to combine the symmetry transform with
the ordinary brush transform, simplifying the code, improving
performance, and avoiding multiple resamplings.  This also fixes
the paint-buffer size when using mandala symmetry with non-round
brushes, avoiding artifacts.

(cherry picked from commit b63af476bd)
2019-05-26 14:47:55 -04:00
Ell
85340f4b30 app: add gimp_symmetry_get_transform()
Add a GimpSymmetry::get_transform() virtual function, and a
corresponding gimp_symmetry_get_transform() function, which return
the brush transform corresponding to a given symmetry stroke in
terms of the rotation angle and reflection flag (in contrast to
gimp_symmetry_get_operation() which returns the same transforation
in terms of a GeglNode).  This would allow us to simplify, fix, and
improve the painting-code perofmrnace in the next commits.

Implement GimpSymmetry::get_transform() in its various subclasses.

(cherry picked from commit e0f2a6f1be)
2019-05-26 14:47:55 -04:00
Tim Sabsch
80e426b65b Update German translation 2019-05-26 13:00:12 +00:00
Jehan
72c5d24fe9 plug-ins: follow the assigned profile TRC in PNG export.
Similar to JPEG export (commit c5f7bac2ba)
as discussed with Ell. GIMP should follow and save as-is any *assigned*
profile. We only make a decision about whether to convert from storage
precision to another format when the profile is the default GIMP one.
2019-05-26 14:20:17 +02:00
fanjinke
5c80a2e600 libgimpbase: add hygon cpu detection and enable MMX/SSE support
Signed-off-by: fanjinke <fanjinke@hygon.cn>
(cherry picked from commit 5b1f8cb4d0)
2019-05-26 00:42:26 +02:00
Øyvind Kolås
e51d7b122d depend on babl-0.1.64
(cherry picked from commit a3f2d734a7)
2019-05-25 19:56:18 +02:00
Michael Natterer
52a182eaed Issue #3124 - layer mask pastes as a greyscale layer/grayscale layer...
...in a color image/colour image

gimp_edit_paste_get_layer(): only use the pasted-to drawable's format
with alpha if this is really a floating paste, use the image's layer
format with alpha for "as new layer" cases.

(cherry picked from commit 1f57675a46)
2019-05-25 17:11:42 +02:00
Massimo Valentini
3cacebd06a Issue #1220 - Text tool has color from previous line...
...when overwriting existing text

gimp_text_tool_enter_text(): when replacing a selection, use the text
properties from the text style editor for the entered text, otherwise
the style of the text before the selection will be used.

(cherry picked from commit 1a691f77e6)
2019-05-25 12:46:34 +02:00
Michael Natterer
d16c69ddf3 Issue #3343 - Some translated tooltips are appearing untranslated
Tool options properties must be translated with _() not N_().

(cherry picked from commit e249a42226)
2019-05-25 11:44:22 +02:00
Ell
7a8d0c4afb app: disregard composite space in source-only trivial layer modes
Extend last commit to also disregard the composite space when the
layer mode is trivial and only the source region is included in
compositing, since, in this case, the source color is unmodified.

(cherry picked from commit c2021d3c5b)
2019-05-24 02:42:59 -04:00
Ell
7313686192 app: disregard composite space in non-union alpha-only layer modes
In gimp_layer_mode_get_format(), disregard the requested composite
space when selecting the format, if the input layer mode is alpha-
only, and the requested composite mode is not UNION, since, in this
case, the layer mode doesn't combine the layer/backdrop colors, and
rather only modifies the alpha of one of them.  This allows us to
use the preferred format, avoiding gamma conversion.

This particularly improves the performance of the Eraser tool in
perceptual images.

(cherry picked from commit a5962e4049)
2019-05-24 01:43:26 -04:00
Michael Natterer
9501d63b20 plug-ins: big formatting and indentation cleanup in file-dds
Also change the license to GPL 3 or later, like all other files.

(cherry picked from commit 2a48a5f868)
2019-05-23 14:35:44 +02:00
Ell
275c2f9978 app: don't show result-size warning when transforming a selection
In gimp_drawable_transform_get_effective_clip(), always return
RESIZE_CLIP when the input drawable is the image mask, since the
presence of a selection doesn't matter in this case.  This avoids
erroneously displaying a result-size warning when transforming the
selection using any of the selection tools.

(cherry picked from commit 1c91578bb2)
2019-05-21 08:19:26 -04:00
Jordi Mas
12b101b31c Update Catalan translation 2019-05-20 18:31:02 +02:00
Jordi Mas
0b6c0b38f2 Update Catalan translation 2019-05-20 18:29:58 +02:00
Ell
28a0d91fd5 configure.ac: improve compiler version string escaping
In configure.ac, improve backslash escaping in the compiler
version string.  Backslashes are currently not properly escaped in
our Windows builds, leading to spurious (and, in particular, non-
UTF8) characters in the compiler version string.

(cherry picked from commit 04f9281bdd)
2019-05-20 03:09:24 -04:00
Ell
0fdf6c2289 app: initialize GimpBacktrace earlier on
Initialize GimpBacktrace earlier on in the startup process, so that
the Windows backend installs the thread-name exception handler
early enough to catch threads created before app_run() (in
particular, the GEGL worker threads).

(cherry picked from commit 853d91b8e4)
2019-05-19 10:50:02 -04:00
Ell
b0f6996e61 app: fix indentation in gimppaintbrush.h
(cherry picked from commit 86a7c053cc)
2019-05-15 13:33:04 -04:00
Ell
eb8ab63462 app: in GimpPaintbrush, reuse existing paint buffer
In GimpPaintbrush, avoid refilling the paint buffer at each dab if
the paint color/pixmap hasn't changed, as gimp_paint_core_paste()
no longer modifies the buffer since the commit before last.

Additionally, fix color-from-gradient dynamics when the image has a
profile.

(cherry picked from commit edc99531e6)
2019-05-15 10:55:30 -04:00
Ell
ea693288d3 app: add gimp_brush_core_get_brush_pixmap()
In GimpBrushCore, replace the private
gimp_brush_core_transform_pixmap() function with a public
gimp_brush_core_get_brush_pixmap() function, which, similarly to
gimp_brush_core_get_brush_mask(), returns the transformed brush
pixmap, and can be used by subclasses.

(cherry picked from commit fcd19a2aeb)
2019-05-15 10:54:56 -04:00
Ell
24e956714c app: don't modify paint buffer when pasting to canvas
We now have enough machinery in gimppaintcore-loops to avoid
modifying the paint buffer in gimp_paint_core_paste() in the no-
applicator case, by using the same set of algorithms as
gimp_paint_core_replace().  Other than reducing the number of
different code paths we have, this is both more efficient, and
allows us to reuse the paint buffer across dabs, as done in the
following commits.

Implement gimp_paint_core_replace() in terms of
gimp_paint_core_paste().  We keep the two functions separate, since
their implementation is still differnet when using an applicator.

Suppress the paint-buffer-modifying algorithms in
gimppaintcore-loops, but keep them around; using the same logic for
normal painting as we use for REPLACE painting is possible due to
the fact that all our current non-REPLACE modes treat alpha values
and mask values interchangeably.  In the future we might have modes
that distinguish between alpha and mask values, requiring the old
algorithms.

(cherry picked from commit f24bca5156)
2019-05-15 10:54:55 -04:00
Carles Ferrando Garcia
a526bacbad Update Catalan translation 2019-05-14 19:41:47 +00:00
Sabri Ünal
6d6bf8ec72 Issue #3140 - Export as DDS dialog does not have an Export button
(cherry picked from commit d7a4d5c6a8)
2019-05-13 20:36:32 +09:00
Piotr Drąg
071b560fee Update Polish translation 2019-05-12 15:05:54 +02:00
Sabri Ünal
64f67894eb Update Turkish translation 2019-05-12 08:13:03 +00:00
Sabri Ünal
31ee6864bd Update Turkish translation 2019-05-12 08:11:12 +00:00
Sabri Ünal
ae7f794335 Update Turkish translation 2019-05-12 08:10:52 +00:00
Sabri Ünal
692e09c119 Update Turkish translation 2019-05-12 08:08:49 +00:00
Ell
25721e39e6 app: in GimpBrushCore, free old paint buffer before allocating new one
In gimp_brush_core_get_paint_buffer(), when allocating a new paint
buffer, clear the old buffer *before* allocating the new one, to
reduce the amount of simultaneously allocated memory.

(cherry picked from commit bea1a44672)
2019-05-11 05:14:32 -04:00
Ell
3097978f4e app: in GimpDashboard, improve legend logic
(cherry picked from commit 088827e563)
2019-05-11 05:14:31 -04:00
Jehan
e7d9344880 app, libgimp, pdb: s/procesures/procedures/
While we are at it, another typo was missed.

(cherry picked from commit 45f37b9b63)
2019-05-10 01:42:29 +09:00
luz.paz
ce92efa82e Add a few more misc. source comment typos
(cherry picked from commit 1c91b8d97e)
2019-05-10 01:42:22 +09:00
luz.paz
9a60382f69 Misc. typos
Found via `codespell`

(cherry picked from commit 86edc31b11)
2019-05-10 01:42:12 +09:00
Jehan
6c1199a4d4 desktop: prepare an AppData release tag for 2.10.12.
(cherry picked from commit f4c6fd0ee4)
2019-05-09 12:38:29 +09:00
Carles Ferrando Garcia
616838e1c6 Update Catalan translation 2019-05-08 20:40:51 +00:00
Carles Ferrando Garcia
168080fc5c Update Catalan translation 2019-05-08 20:36:54 +00:00
Carles Ferrando Garcia
635b33837e Update Catalan translation 2019-05-08 20:34:21 +00:00
Ell
89495f457d app: add tile-alloc-total variable to the dashboard
Add a tile-alloc-total varaible to the dashboard's memory and misc
groups, showing the total amount of memory used by the tile
allocator (see commit
gegl@137e66e45138e8316f6403e53e8aa9a02ad523e7.)

(cherry picked from commit cf54f790fd)
2019-05-08 04:22:50 -04:00
Ell
cb4e9b92bc app: in GimpDashboard, don't show legend for groups with no meter
in GimpDashboard, don't show field legend colors in groups without
a meter.

(cherry picked from commit 8434ae42a3)
2019-05-08 04:22:49 -04:00
Ell
ec067b83ad configure.ac: require GEGL >= 0.4.16
(cherry picked from commit 29d575c033)
2019-05-08 04:22:48 -04:00
Ell
2d91f1ca02 Issue #3353 - Gimp 2.10.10 freezes while changing Background color ...
... in LCh colorspace

In gimptoolbox-color-area, when setting the context's background
color in response to a color-dialog change, block the right signal
handler, to avoid re-setting the color dialog's color, which would
cause the GtkAdjustment's "value-changed" signal (assuming it was
the source of the change) to be restarted if the new value doesn't
match the current one exactly, which can happen due to conversion
errors.

(cherry picked from commit c7a29e5f98)
2019-05-08 03:45:16 -04:00
Jehan
7b1af1f0cb app: round curve point position when displaying it as int.
Int casting results to truncation. First this is a bit counter-intuitive
as we usually expect rounding to the nearest integer. Moreover with the
new GUI updates on curve and curve tool, we end up with a mismatch as
the new Input/Output spin buttons where indeed showing rounded integers
whereas the coordinate indicator was showing truncated integers.

Make all these show same rounded value.
2019-05-08 13:58:45 +09:00
Jehan
5a3e9d1f00 Issue 1878: Eyedrop tool doesn't work when screen composing (KWin)...
... is enabled.

(cherry picked from commit b29d1ea6ff)
2019-05-07 19:09:56 +09:00
Jehan
a7fcbf6122 Issue #835: warnings building with Clang.
Fix an error (introduced in commit 3bf2a3c166).

(cherry picked from commit 90bc9e10f1)
2019-05-07 18:54:05 +09:00
Jehan
c5f7bac2ba plug-ins: follow the assigned profile TRC.
GIMP should not convert assigned profile to sRGB just because we stored
as linear on the XCF. In other words, we should not look at the image
precision to decide whether to export as linear (previously only 8-bit
linear images), but at the profile TRC. There are basically 3 cases:
(1) We don't save a profile, then convert to sRGB whatever the source
precision (because readers would assume sRGB for a no-profile jpeg).
(2) We save the default profiles: convert to sRGB because it's usually
a better choice for 8-bit formats and even working at 32-bit float
*linear* doesn't mean you want to export as 8-bit int *linear*. As the
image creator made no explicit export choice, we make an acceptable
default one.
(3) We save an explicitly assigned profile: keep the profile TRC, don't
convert!

Note that this apparently won't work perfectly right now, as GIMP
replaces the original TRC with the linear default TRC when converting to
linear. So the expected TRC is lost in such case when you have not
explicitly reset the correct profile. Yet this is on GIMP side and this
part of the issue should be fixed with the space invasion merge. For
now, this is how the plug-in should work.

This is based on my late discussion with Ell. Please everyone, and Ell
especially, review! :-)
2019-05-06 14:29:44 +09:00
Tim Sabsch
eec0983e5d Update German translation 2019-05-05 14:48:28 +00:00
Tim Sabsch
d85f3f7a1e Update German translation 2019-05-05 14:45:06 +00:00
Michael Natterer
2d2eed34cd Issue #3251 - Windows menu shows doc's old name not new
In windows-actions.c, connect to GimpDisplayShell's "notify::title"
and update the action label when it changes.

(cherry picked from commit c9b10ff3bf)
2019-05-05 16:28:40 +02:00
Michael Natterer
f16f3b56d4 app: don't dereference NULL image pointer
windows_menu_display_query_tooltip(): bail out if "image" is
NULL. Can't happen currently but did happen temporarily while hacking
on related code. Better safe than sorry.

(cherry picked from commit 3bf2a3c166)
2019-05-05 15:38:12 +02:00
Ell
2548dd1acf tools: in performance-log-viewer.py, fix deprecation warnings
(cherry picked from commit b1077a903e)
2019-05-01 15:34:48 -04:00
Ell
aa9d16a822 Issue #3306 - Memory leak using Crop tool
In gimp_canvas_passe_partout_get_extents(), free the inner region
after XORing it with the outer region.

(cherry picked from commit 84e183e5ed)
2019-04-30 16:47:08 -04:00
Ell
504a632433 Issue #3304 - Invalid write when halting filter tool with controller
In GimpFilterTool, properly clean up the controller's widget weak-
pointer and signal-handlers upon destruction, to avoid invalid
memory access when the widget is destroyed, if the widget outlives
the controller.

(cherry picked from commit 068df34a27)
2019-04-30 16:47:07 -04:00
Ell
3e2738e944 app: in gimp-gegl-nodes, set underlying operation
In the vairous gimp_gegl_create_foo_node() functions, set the
parent node's underlying operation node, so that
gimp_gegl_apply_cached_operation() avoids duplicating the source
buffer when applying these nodes (all underlying operations are
currently point ops.)

(cherry picked from commit 928e5957e3)
2019-04-30 14:32:21 -04:00
Piotr Drąg
a0f1f93e85 Update Polish translation 2019-04-28 16:19:40 +02:00
Jehan
3e1e1f2d1b Issue 2949: Newly Installed Fonts not Registering.
Apparently Microsoft added just recently the feature to install user
font (as opposed to system-wide fonts), without administration rights
(yes, only now, how crazy is that?). Right now GIMP does not see fonts
there.

We have an upstream report at fontconfig where such a default search
path should happen.
See: https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/144
Until it gets fixed there, let's just add the user fonts dir ourselves
in GIMP. This code should get killed later.

Notes:
- I renamed various DEFAULT_* data macros to GIMP_DEFAULT_* because
DEFAULT_PALETTE was conflicting with another macro in Windows API!
- Also I removed the DATADIR macro set under app/config/ because it is
also conflicting and anyway we use it in no files on this level.
- This is not perfectly tested on Windows. Please everyone with Windows
access, could you build and test if it works fine before release?

(cherry picked from commit 88f97aedef)
2019-04-28 22:59:09 +09:00
Jehan
c03f16caf2 Issue #3309: Translation of gimp installer for MS Windows.
Several of our own translations of the Windows installer are unused
because Inno Setup corresponding translations are marked "unofficial".
This mostly means that the language files for these are probably old and
unmaintained, hence outdated. And these files are not bundled together
with Inno Setup release (though still hosted in their repo).

Nevertheless it doesn't make sense that we would just waste the work of
our translators here. Maybe Inno Setup localization is not complete, so
what? At best it could even encourage translators to contribute upstream
to Inno Setup. Let's just enable all our current localizations of the
installer and see how it goes!

(cherry picked from commit 01f258faec)
2019-04-28 22:59:08 +09:00
Jehan
c009de14ac plug-ins: fix TIFF linear export.
The export code was checking the existence of a profile variable which
was never set. In other words, it seems we were always converting TIFF
pixels to non-linear, even when we were also exporting a linear profile.

Note that is not useful anymore to check profile existence as we now use
the effective profile (which always exists). So we just have to check if
the "save profile" option is on.

(cherry picked from commit 062195117c)
2019-04-28 22:59:08 +09:00
Ell
dd2632bc85 app: flush image when committing free-select tool
In GimpFreeSelectTool, flush the image when committing the tool, if
the seletion is created at the time of the commit (i.e., if the
polygon is not closed prior to the commit).

(cherry picked from commit 71c624c5ab)
2019-04-26 03:37:19 -04:00
Balázs Úr
ee7419cb01 Update Hungarian translation 2019-04-26 05:56:55 +00:00
Balázs Úr
38c1ee315d Update Hungarian translation 2019-04-26 05:53:25 +00:00
Balázs Úr
469ce04f83 Update Hungarian translation 2019-04-26 05:50:44 +00:00
Ell
30788227cc app: increase GimpSelectionTools idle priority to avoid flickering
In gimp_selection_tool_start_change(), increase the priority of the
idle source used for hiding the selection so that it's run before
the canvas is redrawn, to avoid flickering the previous selection.

(cherry picked from commit 3369958525)
2019-04-25 09:54:35 -04:00
Ell
03cb47f871 app: fix dirty mask/action in the rectangle- and free-select tools
In GimpRectangleSelectTool and GimpFreeSelectTool, make sure the
tool is committed when the selection is dirty.

(cherry picked from commit 6a2bea733b)
2019-04-25 07:08:59 -04:00
Ell
95f468fec2 Issue #2328 - Free Select tool should create preliminary marching ants selection
In GimpFreeSelectTool, use gimp_selection_tool_{start,end}_change()
to create the selection as soon as the polygon is closed, and
update it when the polygon, or the relevant tool-options, change,
similarly to GimpRectangleSelectTool.

(cherry picked from commit 476833b553)
2019-04-25 06:10:26 -04:00
Ell
9cc8d2403d app: factor-out common free/fg-select logic into GimpPolygonSelectTool
We currently derive GimpForegroundSelectTool from
GimpFreeSelectTool, which prevents us from making changes that are
limited to the free-select tool.

Factor out the common free-select and foreground-select logic into
a new GimpPolygonSelectTool base-class, and derive both from this
class.

(cherry picked from commit afab7deaa3)
2019-04-25 06:10:26 -04:00
Ell
67f44f3e34 app: add GimpToolPolygon::change-complete signal
... which is emitted when finishing a change to the polygon,
similarly to GimpToolRectangle::change-complete.

(cherry picked from commit 134ff92fe0)
2019-04-25 06:10:25 -04:00
Ell
c161b0cccb app: add gimp_tool_polygon_is_closed()
(cherry picked from commit f84f1d89dc)
2019-04-25 06:10:24 -04:00
Ell
7d4ea79a98 app: allow passing NULL pointers to gimp_tool_polygon_get_points()
(cherry picked from commit e8c915af93)
2019-04-25 06:10:23 -04:00
Ell
fb1e552acd app: remove unused field from GimpPolygonSelectToolPrivate
(cherry picked from commit eda421e852)
2019-04-25 06:10:23 -04:00
Ell
655af1dd44 app: move undo/redo logic for GimpRectangleSelectTool to GimpSelectionTool
Move GimpRectangleSelectTool's image undo/redo logic to
GimpSelectionTool, by adding a pair of
gimp_selection_tool_{start,end}_change() functions.  These
functions should be called by subclasses before/after changing the
selection, having the functions take care of undoing/redoing the
existing selection as necessary.  This allows us to reuse this
logic in other selection tools, specifically, the free-select tool.

(cherry picked from commit 4612105e52)
2019-04-25 06:10:22 -04:00
Jehan
ee3bc11e61 Issue #3129: Split sentence on gimpexport.c.
(cherry picked from commit 4dcda7ffb8)
2019-04-25 00:35:53 +02:00
Sabri Ünal
45784e9f50 Issue #3220 - "How to Use Dialogs" does not open any page. 2019-04-24 21:31:26 +00:00
Tobias Ellinghaus
776e2cba8f plug-ins: Move layer option up in TIFF dialog
This was requested by mitch.

(cherry picked from commit 5ddfe36d96)
2019-04-23 15:59:34 +02:00
Ell
95ea4e4272 Issue #3284 - Wrong layer renamed when switching images
In gimp_container_tree_view_clear_items(), temporarily unset the
tree-view's model before clearing it, so that name editing is
stopped beforehand.  Otherwise, name editing is stopped once the
corresponding item is removed from the store, causing us to rename
the wrong item.

(cherry picked from commit bb8648a2e9)
2019-04-21 10:35:08 -04:00
Piotr Drąg
7780f6169d Update Polish translation 2019-04-21 13:25:17 +02:00
Alexandre Prokoudine
7ef388a511 Update Russian translation 2019-04-21 00:02:44 +03:00
Ell
6de686bd50 Issue #3275 - Crash when opening an image after closing existing image
In gimp_open_dialog_set_image(), use a weak pointer for storing the
current image, to avoid a segfault in file_open_dialog_response()
if the active image at the time of the open action has been closed
before confirming the dialog.

(cherry picked from commit b01113741e)
2019-04-20 14:53:26 -04:00
Ell
49f3319f19 app: don't leak curve in gimp_curves_config_save_cruft()
(cherry picked from commit eda8b717d5)
2019-04-19 15:30:16 -04:00
Aron Xu
023a6f7900 Fix a terminology in zh_CN translation 2019-04-20 01:37:01 +08:00
Aron Xu
5684d5f85f Update zh_CN translation of po-script-fu 2019-04-20 01:29:49 +08:00
lumingzh
9a1663fac5 Update zh_CN translation of po-tips 2019-04-20 01:12:27 +08:00
lumingzh
7d1656d079 Update zh_CN translation of po-libgimp 2019-04-20 01:09:10 +08:00
Mingye Wang
a6501e4ba2 Update zh_CN translation of po-tags 2019-04-20 00:52:23 +08:00
Ell
da0183a516 app: fix spin-button width in the Curves tool
In the Curves tool, explicitly set the point-coordinate spin-
buttons' width-chars, so that their size remains fixed when their
range changes.

(cherry picked from commit 8fc94184a8)
2019-04-19 11:35:30 -04:00
Ell
f8eddc8696 app: fix last commit
(cherry picked from commit f6d76ff342)
2019-04-19 11:23:38 -04:00
Ell
168fa15091 app: fix Curves tool numeric-entry range/precision for > 8-bpc images
In the Curves tool, when the image precision is greater than 8-bpc,
use a 0.00-100.00 range for the point-coordinate spin-buttons,
instead of a 0-255 range.

(cherry picked from commit be719f9070)
2019-04-19 11:13:18 -04:00
Ell
001acb7d18 app: add smooth/corner curve-point types
Allow setting the type of GimpCurve control-points to either SMOOTH
or CORNER.  Smooth points produce a smooth curve, while corner
points produce a sharp curve (previously, all points were smooth).

In GimpCureView, display corner points using a diamond shape,
instead of a circle.

In the Curves tool, allow changing the curve's point types.

(cherry picked from commit 33e47c85a2)
2019-04-19 10:36:28 -04:00
Ell
f473af3c46 Issue #1528 - Allow precise or numeric input in color curves tool
Add input/output spin-buttons to the Curves tool, which allow
setting the selected point's coordinates numerically.

(cherry picked from commit 5140d903b8)
2019-04-19 10:36:27 -04:00
Ell
9861ea8e87 app: add "selection-changed" signal to GimpCruveView
... which gets emitted when the selected point changes.

(cherry picked from commit 91ecca7e10)
2019-04-19 10:36:27 -04:00
Ell
b5da9918f1 app: streamline GimpCurve
In GimpCurve, replace the use of a fixed-length control-point array
with a dynamically-sized array.  Adapt GimpCurve's interface, and
the rest of the code.

In addition to simplifying the code, this fixes a bug where the
curve object could be broken by moving the mouse too fast (yep...),
and allows more accurate point placement, both in the GUI editor,
and through canvas interaction in the Curves tool (see issue #814).

(cherry picked from commit b6d829a1b2)
2019-04-19 10:36:25 -04:00
Ell
f141fc4064 app: fix gimp_operation_levels_map_input() for negative values
... when gamma != 1

(cherry picked from commit dc6ca2cf9a)
2019-04-19 10:34:42 -04:00
Aron Xu
1158c0c10f Update zh_CN translation of po-windows-installer 2019-04-19 15:54:04 +08:00
lumingzh
0a05a2354e Update zh_CN translation 2019-04-19 15:47:02 +08:00
Julien Hardelin
345a9a89fa Update French translation 2019-04-18 16:16:17 +00:00
Ell
65a2a2fd8b app: in GimpCurveView, snap to curve when holding Ctrl
In GimpCurveView, when holding down Ctrl while adding/dragging a
point, snap the y-coordinate to the original curve (at the start of
the drag).  This is particularly useful for adding points along the
curve, without changing their y-coordinate.

Likewise, have the coordinate indicator show the snapped
coordinate.

(cherry picked from commit 8357c9ad64)
2019-04-17 18:00:25 -04:00
Ell
1ecb868821 app: in GimpCurveView, use relative motion when dragging point
In GimpCurveView, when dragging an existing curve point, don't
immediately move the point to the cursor position uppon button
press, but rather move it relative to its current position as the
cursor moves.  This allows selecting a point without moving it, and
adjusting its position more easily.

Additionally, when the cursor hovers above a point, or when
dargging a point, have the coordinate indicator show the point's
position, rather than the cursor's.

(cherry picked from commit 0b9737a3ed)
2019-04-17 18:00:25 -04:00
Sabri Ünal
8e9034cab8 Update Turkish translation 2019-04-17 19:23:19 +00:00
Sabri Ünal
7cb6df0db6 Update Turkish translation 2019-04-17 19:01:38 +00:00
Sabri Ünal
a0948e8164 Update Turkish translation 2019-04-17 19:01:18 +00:00
Sabri Ünal
27f20dd99a Update Turkish translation 2019-04-17 19:00:57 +00:00
Sabri Ünal
e17860fada Update Turkish translation 2019-04-17 18:58:44 +00:00
Ell
0ee8e5f17a app: add incremental mode to the Dodge/Burn tool
Add an "Incremental" option to the Dodge/Burn tool, which,
similarly to the Paintbrush, Pencil, and Eraser tools, applies the
effect incrementally as the pointer moves.

(cherry picked from commit 83184d1626)
2019-04-17 10:02:44 -04:00
Tim Sabsch
8009f62a77 Update German translation 2019-04-16 11:34:37 +00:00
Tobias Ellinghaus
9335c26b68 plug-ins: Add layer support to TIFF writing
(cherry picked from commit 7584969453)
2019-04-16 10:17:49 +02:00
Jehan
d1d0022500 plug-ins: export linear WebP if and only if the work image was 8-bit...
... linear itself AND if we export the profile.
Implement similar logics to WebP export as I did to JPEG in my previous
commit.

(cherry picked from commit b9458f8a6e)
2019-04-15 23:54:51 +02:00
Jehan
ec132fa396 plug-ins: export linear JPEG if and only if the work image was 8-bit...
... linear itself AND if we export the profile.

In most cases we want to save 8-bit image formats (here JPEG) as
non-linear, even though the work image may have been linear itself (yet
with higher bit depth). The reasons are shadow posterization on low bit
depth, and the fact that JPEG compression was designed for perceptually
uniform RGB and introduces shadow artifacts with linear RGB (see #1070,
message by Elle Stone). The only exception is when the creator was
working explicitly on 8-bit linear (not higher bit depth) AND if we
export the profile (otherwise most loaders around assume sRGB). In such
a case, let's consider the creator knows what one is doing and keep the
exported image linear.

Similar logics is already used in PNG exporter (though a bit of a
variant since PNG supports 16-bit so it is instead: 8-bit linear without
profile is promoted to 16-bit non-linear, and kept 8-bit linear with
profile).

(cherry picked from commit 5f4cf53519)
2019-04-15 23:12:38 +02:00
Jehan
bfe24a3b50 Issue #3253: exporting to webp from 32-bit float linear image...
... produces incorrect result.
Similar to previous fixes to JPEG and PNG exporters. Here WebP always
export 8-bit per channel colors, so let's always keep it non-linear.
Simply when the original data was linear, if we save the profile,
convert it to sRGB before exporting.

(cherry picked from commit 7a4b313b12)
2019-04-15 17:53:37 +02:00
Tim Sabsch
b9ed4a7f14 Update German translation 2019-04-13 18:21:15 +00:00
Jehan
1c3317db70 plug-ins: GimpPrecision has no NON_LINEAR and PERCEPTUAL values.
Fixing commit 532866007d.
2019-04-12 17:17:00 +02:00
Michael Natterer
2608a7e2d6 app: remove defines GIMP_BRUSH_FILE_VERSION and GIMP_PATTERN_FILE_VERSION
they were unused and wrong. Also clean up the brush and pattern
headers a bit.

(cherry picked from commit aee6d44b61)
2019-04-12 16:33:15 +02:00
Jehan
dcc297b6f7 Issue #3224: Fill by Line Art Detection Bug (Fatal Error with Crash).
Typos in gimp_pickable_contiguous_region_by_line_art().
Thanks to Massimo for debugging these!

(cherry picked from commit 5d5ced88a8)
2019-04-12 14:50:25 +02:00
Jehan
3ee3ca9c71 Issue #3193: Wrong colors after exporting 8bpc RGB png from 32f...
... linear XCF.
When choosing a specific pixel format (other than "Automatic"), we
always export as non-linear. Therefore if we were going to save a linear
profile, make sure we also convert it to sRGB too.

(cherry picked from commit c5fae74ac1)
2019-04-12 14:36:49 +02:00
Jehan
532866007d Issue #1070: exporting to jpeg from 32-bit float linear image...
... produces jpeg in linear color space.
The problem was that we were anyway always exporting to non-linear while
attaching a linear profile. A first approach would have been to export
in linear instead when the work image is linear, as proposed by mitch in
a first version of the patch. Yet as Elle Stone notes, it is not a great
idea to export 8-bit images as linear.
Instead let's continue to always export as non-linear, as we were
already doing. Yet when we also save a profile, and this one was
originally linear, let's convert it to sRGB TRC before exporting.

(cherry picked from commit 8594275bb7)
2019-04-12 14:36:49 +02:00
Rodrigo Lledó
1baba460db Update Spanish translation 2019-04-11 11:13:48 +00:00
Kukuh Syafaat
84bc29b77a Update Indonesian translation 2019-04-11 10:47:02 +00:00
Kukuh Syafaat
ed030168c2 Update Indonesian translation 2019-04-11 10:29:36 +00:00
Michael Natterer
dd5c4458c9 app: fix legacy .gpb parsing code in gimp_brush_load_brush()
Only seek back to after the end of the actual brush if a following
pattern was *not* found. Got this logic wrong in the original port of
the plug-in code.

(cherry picked from commit 40863bffdd)
2019-04-09 23:14:53 +02:00
Rodrigo Lledó
5eb033d30b Update Spanish translation 2019-04-09 10:28:46 +00:00
Emin Tufan Çetin
e073e0c55f Update Turkish translation 2019-04-08 16:26:24 +00:00
Michael Natterer
d1ee74b250 configure.ac: post-release version bump to 2.10.11 2019-04-07 18:54:50 +02:00
Michael Natterer
596f855749 configure.ac: bump versions for the 2.10.10 release 2019-04-07 18:30:13 +02:00
Michael Natterer
bdb2584b63 etc, docs: regenerate default gimprc and its manpage 2019-04-07 14:22:12 +02:00
Michael Natterer
896a7b5a12 NEWS: some fixes 2019-04-07 13:36:45 +02:00
Jehan
6ec62f2d17 desktop: prepare the GIMP 2.10.10 release.
Hopefully it will happen! :-)

(cherry picked from commit e0b958b22c)
2019-04-06 12:35:12 +02:00
Jehan
054da85911 po: always end the "Keywords" list with a semicolon!
It is written in a translator comment and is important because it breaks
some automatic validation tools along the way to packaging. Thanks for
following the translation comments! :-)
2019-04-06 11:27:02 +02:00
Ell
ce2e7420a8 Issue #2665 - Settings changes in Rectangle and Ellipse selection don't "stick"
In GimpRectangleSelectTool, update the selection upon changes to
the "antialias", "feather", "feather-radius", "round-corners", and
"corner-radius" options, so that they take effect immediately,
without having to change the selection bounds.

(cherry picked from commit 2da6cefa3f)
2019-04-06 05:22:24 -04:00
Christian Kirbach
91642674ce Update German translation 2019-04-04 23:20:26 +00:00
Marco Ciampa
abc2726c06 Updated Italian translation 2019-04-04 16:12:59 +02:00
Jehan
69b056a0b5 INSTALL: update info about libmypaint.
Since recently, one can also install the new "libmypaint-v1" branch. It
is not so different, but has several fixes. Among them, it fixes
building with recent automake.

(cherry picked from commit 1028345b7b)
2019-04-01 17:07:19 +02:00
Marco Ciampa
027e5ed5b0 Updated Italian translation 2019-04-01 12:57:48 +02:00
Ell
8c7e2a9e03 Issue #3025 - "File/New" doesn't honor "precision" choice ...
... for "Edit/Preferences/Default Image"

In GimpTemplateEditor, don't use gimp_prop_enum_combo_box_new() for
the "Precision" combo-box, and rather synchronize the combo-box and
the template manually, since we only want to update the "Gamma"
combo-box according to the precision when it changes through the
UI, and not when the template's precision otherwise changes.

This fixes an issue where we'd always set the default gamma value
when resetting the editor's template, overwriting the template's
original gamma value.

(cherry picked from commit 033082dd9a)
2019-03-31 15:18:59 -04:00
Rūdolfs Mazurs
7e26d66464 Update Latvian translation 2019-03-31 13:28:24 +00:00
Rūdolfs Mazurs
3c674c937c Update Latvian translation 2019-03-31 12:24:10 +00:00
Rūdolfs Mazurs
402c1f1f7b Update Latvian translation 2019-03-31 09:40:41 +00:00
Rūdolfs Mazurs
4204dab5f6 Update Latvian translation 2019-03-31 09:25:15 +00:00
Rūdolfs Mazurs
f810d59928 Update Latvian translation 2019-03-31 09:21:39 +00:00
Ell
522e497457 app: in GimpChunkIterator, avoid preparing rect before merging
In GimpChunkIterator, avoid preparing the current rect before
merging it back to the iterator's region, to save some work.

Additionally, strengthen the iterator's invariants and simplify
code.

(cherry picked from commit c95502266a)
2019-03-31 05:03:47 -04:00
Ell
1cdd32955e app: fix image-window UI-manager update while a projection is being rendered
Set the priority of the image window's UI-manager update idle
slightly higher than the projection idle priority, so that the
image actions are updated during projection rendering.

(cherry picked from commit 50aaeef6a0)
2019-03-30 19:31:26 -04:00
Ell
191c9812f3 app: small fix to GimpChunkIterator
(cherry picked from commit d182c41f8f)
2019-03-30 16:36:33 -04:00
Ell
c5d34b2496 app: in gimp:fill-source, align result to tile grid
In gimp:fill-source, align the result rect to the drawable buffer's
tile grid, so that all tiles are COWed for solid-color fills.

(cherry picked from commit fa31854a66)
2019-03-30 12:06:14 -04:00
Ell
9c9467e076 Issue #2090 - Crash when using transform tools
In GimpTransformGridTool, avoid producing non-finite coordinate
and angle values.  In particular, this fixes a crash in
gimp_transform_grid_tool_get_cursor() as a result of a NaN angle
value being converted to a negative integer, hitting an assert.

(cherry picked from commit be7906c05c)
2019-03-30 11:18:06 -04:00
Ell
4d2a5d1a94 app: more responsiveness improvements to GimpChunkIterator
Improve GimpChunkIterator's responsiveness to changes in processing
speed.

(cherry picked from commit 91f4c809d8)
2019-03-30 11:18:05 -04:00
Piotr Drąg
1096bdfd53 Update Polish translation 2019-03-30 14:34:50 +01:00
Ell
f0b5080f83 app: don't invalidate viewable preview when thawed unless explicitly requested
In GimpViewable, don't invalidate the preview when thawed, unless
there was an explicit call to gimp_viewable_invalidate_preview()
while it was frozen.  This avoids invalidating the previews of an
invisible drawable's ancestors when the drawable's preview is
frozen/thawed.

(cherry picked from commit 9dabad4cb9)
2019-03-29 04:54:12 -04:00
Ell
c8ea2f45f9 app: avoid risky alloca() in gimp_brush_save()
Replace an arbitrarily-sized g_alloca() with g_malloc() in
gimp_brush_save().

(cherry picked from commit 24ed9dbdf5)
2019-03-28 16:56:01 -04:00
Ell
c347f8770c app: avoid freezing image preview if drawable is not attached
When freezing/thawing a top-level drawable's preview, only freeze/
thaw the image preview if the drawable is attached.

(cherry picked from commit de36e33347)
2019-03-28 12:36:48 -04:00
Ell
b9ca245736 app: when freezing a drawable's preview, freeze ancestors' previews
Add GimpViewable::preview_{freeze,thaw}() virtual functions, which
get called when the viewable's preview is frozen/thawed.  Implement
the functions in GimpDrawable, recursively freezing the parent
drawable's preview (or the image's preview, for top-level
drawables) while the drawable's preview is frozen.  For layer
masks, freeze the associated layer's parent.

This avoids updating layer-group/image previews while painting on,
or applying a filter to, a descendant layer.  This both reduces
lag, and fixes a discrepancy between the layer's preview, which
isn't updated, and its parents' previews.

(cherry picked from commit e2ea2e4a82)
2019-03-28 12:26:54 -04:00
Jehan
273a0c4395 app: change antialias feature in fill by line art into Feather Edges.
This was actually more of a feathering feature I added earlier, and we
already have a function for that: gimp_gegl_apply_feather(). This is
using a gaussian blur, just as what I was doing anyway. This commit also
adds the "Feather Radius" scale, similar to other tools with the
"Feather Edges". So that makes it consistent (and more useful as you can
adapt to your needs).

(cherry picked from commit d821b088e2)
2019-03-28 14:12:12 +01:00
Ell
aa7fc3f08d app: add GTK+ patch allowing controlling combo-box popup style
Add a GTK+ patch providing a "popup-style" combo-box style
property, allowing to manually control the combo-box popup-style.
Use the LIST style for all combo-boxes in our system-wide gtkrc
file; this only has effect if GTK+ was built with the above patch.
2019-03-27 20:15:50 -04:00
Ell
1749fd995c app: add GTK+ patch to fix list-style combo-box popup width
Add a GTK+ patch that makes sure that list-style combo-box popups
are never narrower than their content.  This fixes the popup width
when using the System theme on Windows, for combo-boxes whose popup
cell-layout is wider than the combo-box cell-layout.  It is also
required for the next commit.
2019-03-27 20:15:50 -04:00
Ell
7edbad3144 app: include system gtkrc file in themerc
Include the system-wide gtkrc file, in addition to the user-
specific gtkrc file, in the generated themerc file, instead of
copying the former into the latter when creating the user's
gimpdir.  This allows us to modify the system-wide gtkrc file, and
having the changes take effect in existing installations.
2019-03-27 20:15:50 -04:00
Ell
f19ebb6269 app: revert combo-box drop-down changes
Revert the use of gtk_combo_box_set_wrap_width() to change the
combo-box drop-down style, except for the status-bar unit combo.
See https://gitlab.gnome.org/GNOME/gimp/issues/2828#note_421312 for
the rationale.

This reverts commits 1d984542e9,
68a33ab5bd, and
6dfca83c2a.

(cherry picked from commit 846d242f30)
2019-03-27 20:14:45 -04:00
Ell
9063b937fe app: use gimp:fill-source in gimp_drawable_edit_fill()
In gimp_drawable_edit_fill(), when performing a non-direct fill,
use a GimpDrawableFilter with gimp:fill-source, added in the
previous commit, instead of using gimp_drawable_apply_buffer() with
an intermediate fill buffer.  This avoids allocating a full-size
fill buffer, which may occupy a lot of space in pattern fills.

(cherry picked from commit 234f76b6fb)
2019-03-27 15:48:22 -04:00
Ell
75822d3d7b app: add gimp:fill-source operation
Add a new gimp:fill-source operation, which can act as a source
node for fill operations, instead of a fill buffer.  The op takes
a GimpFillOptions object, a drawable, and a pattern offset, and
uses gimp_fill_options_create_buffer() to produce its output.

This allows performing the entire fill operation in chunks as a
graph, instead of allocating a full-size fill buffer, which can
can occupy a lot of space for pattern fills.

(cherry picked from commit 6b0337e384)
2019-03-27 15:48:21 -04:00
Ell
2341117517 app: improve gimp_drawable_fill_buffer() for patterns
In gimp_drawable_fill_buffer(), when the fill-source is a pattern,
avoid going through an intermediate buffer when there's no profile
transform, and use the destination-buffer format for the
intermediate buffer, instead of the pattern format, when there is a
profile transform.

(cherry picked from commit 3c1634ee0d)
2019-03-27 15:48:21 -04:00
Ell
1416571389 app: use compositing format for fill buffer
Add gimp_fill_options_get_format(), which returns the format to be
used for the fill buffer; this is the same format used during
compositing.  Use this format in gimp_fill_options_create_buffer(),
instead of the drawable format.

This fixes the result of fill operations when the fill color/
pattern is not representable in the drawable format, and speeds up
color fills by avoiding color-conversion for the fill buffer during
processing.

(cherry picked from commit 245a17c79f)
2019-03-27 15:48:20 -04:00
Ell
6e06e5e856 app: in GimpDrawableFilter, set underlying operation
In GimpDrawableFilter, use
gimp_gegl_node_set_underlying_operation() to the the input
operation node as the underlying operation of the filter node.

(cherry picked from commit b0dfc1e7c7)
2019-03-27 15:48:20 -04:00
Ell
b5b5d71708 app: use underlying operation in gimp_gegl_apply_cached_operation()
In gimp_gegl_apply_cached_operation(), use the underlying
operation, as returned from
gimp_gegl_node_get_underlying_operation(), for testing whether the
operation is a point operation, for the purpose of avoiding
duplicating the input buffer.  Likewise, avoid duplicating the
buffer when the underlying operation is a source operation.

(cherry picked from commit 213b126c6e)
2019-03-27 15:48:19 -04:00
Ell
5e212fe0dd app: add gimp_gegl_node_{set,get}_underlying_oepration()
... which allow setting/getting the "underlying operation" node of
a graph node.  For example, GimpDrawableFilter constructs a complex
graph around a given operation node, which would be the underlying
operation of the graph.  This allows querying the properties of the
underlying operation, given only the graph.

In recursive cases, gimp_gegl_node_get_underlying_operation()
returns the most-nested underlying operation; when no underlying
operation has been set, gimp_gegl_node_get_underlying_operation()
returns the input node.

(cherry picked from commit eb5e473665)
2019-03-27 15:48:17 -04:00
Ell
3518ab9197 app: add gimp_gegl_node_is_source_operation()
... which determines if a node is a source operation.

(cherry picked from commit ff13e55c16)
2019-03-27 15:47:39 -04:00
Ell
55569d512e app: in gimp_drawable_apply_buffer(), work in chunks
In gimp_drawable_real_apply_buffer(), use GimpChunkIterator to blit
the applicator's output to the drawable's buffer in chunks, to
minimize the space used for intermediate results.

(cherry picked from commit 8f845d3a51)
2019-03-27 15:47:39 -04:00
Ell
7c6125ce67 app: improve responsiveness of GimpChunkIterator
In GimpChunkIterator, redajust the target area at each step,
instead of at each iteration, to adapt more quickly to the current
processing speed.  To avoid creating uneven chunks as a result,
only change the chunk height at the beginning of rows, unless the
resulting area would be more than twice as big as the target area.

(cherry picked from commit e904b71242)
2019-03-27 15:47:38 -04:00
Ell
f81c1cac10 app: preserve projection priority rect across structure/bounds changes
In GimpProjection, store the priority rect in image coordinates,
and only convert it to projectable coordinates when initializing
the chunk-iterator's priority rect.  This allows us to preserve the
priority rect across projectable structure/bounds changes.

(cherry picked from commit 9d80ccc3e6)
2019-03-26 04:58:57 -04:00
Daniel Korostil
6473daa05b Update Ukrainian translation 2019-03-25 21:33:10 +00:00
Daniel Korostil
bb747c58ed Update Ukrainian translation 2019-03-25 20:06:19 +00:00
Daniel Korostil
03c98739bd Update Ukrainian translation 2019-03-25 20:05:04 +00:00
Daniel Korostil
7d3b935327 Update Ukrainian translation 2019-03-25 20:03:58 +00:00
Daniel Korostil
b9375a3873 Update Ukrainian translation 2019-03-25 20:01:52 +00:00
Dimitris Spingos
81afa73bf3 Updated Greek translation 2019-03-25 19:44:45 +02:00
Ell
ebaf09e7cc app: don't disable filter format conversion if != drawable format
In gimp_drawable_merge_filter(), don't disable the filter
applicator's output-format conversion node if the output format is
different than the drawable's format, since it may change the
result.

(cherry picked from commit 30da2f3d6f)
2019-03-25 09:16:26 -04:00
Ell
269f2ca0fc app: skip cache and format conversion when merging a drawable filter
In gimp_drawable_merge_filter(), disable the filter applicator's
cache and output-format conversion nodes before processing the
uncached region of the filter, so that the result is written
directly to the drawable's buffer.

(cherry picked from commit 733a6ec01c)
2019-03-25 09:02:31 -04:00
Ell
fef2c3423a app: small fix to gimp_gegl_mask_combine_ellipse_rect()
(cherry picked from commit d4689441fe)
2019-03-24 14:45:59 -04:00
Ell
9ac360a125 Issue #3142 - Filters on-canvas preview doesn't work ...
... immediately after an image precision change

When flushing a projection, make sure it has a buffer, instead of
bailing if it doesn't.  We rely on the image projection's "update"
signal to update the display after certain operations that free the
buffer, which would previously fail to happen, and cause subsequent
flushes to be ignored until the buffer is explicitly accessed.

This fixes commit b07f810273.

(cherry picked from commit 106df3b794)
2019-03-24 03:20:43 -04:00
Alex Samorukov
8f3da0e8c4 Allow compilation on MacOS 10.5 leopard: issues #2923, #2924 and #2925 2019-03-23 23:33:07 +00:00
Martin Srebotnjak
f540f6c0a5 Updated Slovenian translation 2019-03-22 21:51:38 +01:00
Martin Srebotnjak
6a38c58cda Updated Slovenian translation 2019-03-22 21:50:49 +01:00
Martin Srebotnjak
e5026997b9 Updated Slovenian translation 2019-03-22 21:46:14 +01:00
Martin Srebotnjak
f1c5b3978a Updated Slovenian translation 2019-03-22 21:34:43 +01:00
Martin Srebotnjak
041107f801 Updated Slovenian translation 2019-03-22 21:28:18 +01:00
Ell
b8d94342ca Issue #3134 - Deleting last layer of group not updating image
In gimp_group_layer_get_size(), make sure to always set *width and
*height, even when the group is empty, so that when the function is
called through gimp_projectable_get_size() by the group's
projection, the correct size is reported.  This makes sure we
update the correct area when the group becomes empty.

(cherry picked from commit a712308f20)
2019-03-20 17:51:21 -04:00
Ell
dc8fad6ac6 app: improve gimpchannel-{combine,select}
In gimpchannel-select, move some of the common functionality of the
various gimp_channel_select_foo() functions to gimpchannel-combine.
Furthermore, don't special-case CHANNEL_OP_INTERSECT, but rather
pass it over to gimpchannel-combine, which is now prepared to
handle it in all functions, as per the previous commits.

In gimpchannel-combine, factor out the common functionality of the
various gimp_channel_combine_foo() functions into a pair of
gimp_channel_combine_{start,end}() functions, which are called
before/after the actual gimp_gegl_mask_combine_foo() function,
respectively.  In particular, these functions deal with calculating
the new channel bounds.  Previously, the various
gimp_gegl_mask_combine_foo() functions would implicitly invalidate
the channel bounds (since commit
d0ae244fe8), rendering the bounds-
recalculation code ineffective.  This avoids manually recalculating
the bounds in many cases, speeding up selection operations.

(cherry picked from commit 8e77347cac)
2019-03-20 16:27:55 -04:00
Ell
fa79923d4b app: improve gimp_gegl_mask_combine_buffer()
Simplify code, use gimp_gegl_buffer_copy() for CHANNEL_OP_REPLACE
when possible, improve value clipping, and parallelize processing.

(cherry picked from commit a227c8e94d)
2019-03-20 16:27:55 -04:00
Ell
9b76ea070d app: improve gimp_gegl_mask_combine_ellipse[_rect]()
Improve gimp_gegl_mask_combine_ellipse_rect() -- the funciton
responsible for rendering ellipse/rounded-rectangle selections.

Most notably, this commit significantly improves the function's
performance, by identifying whole tiles, whole rows, or parts of a
row, that are fully inside, or fully outside, the ellipse, and
filling them in bulk, instead of calculating the anti-aliasing
value at each pixel, which is now only done along the
circumference.

This commit also improves anti-aliasing, by more accurately
approximating the distance from a pixel to the ellipse, and by
normalizing the distance according to the pixel's cross-section
length in the direction of the said point.  In particular, we
guarantee that pixels that are fully inside/outside the ellipse
have a value of 1/0, respectively, facilitating the aforementioned
optimization.

Additionally, this commit fixes various edge cases where several
primitives coincide at a single pixel (in the rounded-rectangle
case), adds support for CHANNEL_OP_INTERSECT, and parallelizes
processing.

(cherry picked from commit 1044342393)
2019-03-20 16:27:55 -04:00
Ell
d0a3d81c4a app: improve gimp_gegl_mask_combine_rect()
Simplify the code, and add support for CHANNEL_OP_INTERSECT.

(cherry picked from commit 8a6e1c907d)
2019-03-20 16:27:55 -04:00
Ell
15e8b53f0c app: convert gimp-gegl-mask-combine to C++
... in preparation for next commits.

(cherry picked from commit 5198d3c32d)
2019-03-20 16:27:55 -04:00
Ell
2a2ad4324d app: add gimp_babl_format_change_{component_type,linear}()
... which change a format's component-type/TRC, without otherwise
affecting it.
2019-03-20 16:27:55 -04:00
Ell
5c70b827d2 app: add gimp_babl_is_bounded()
... which takes a GimpPrecision, and determines if its values are
bounded to the [0,1] range (which is currently only true for
integer precisions).

(cherry picked from commit d7f12c9d26)
2019-03-20 16:27:55 -04:00
Jehan
2675e944e3 app: make gimp_prop_gui_chain_toggled() less error-prone.
Don't assume that "toggled" signal means that toggle status actually
changed.

Though issue #3133 got fixed with my previous commit, let's make sure we
never create several GBinding for the same GimpChain by always checking
existence of a previous one after a "toggled" signal.
Also only create a GBinding object if one doesn't already exist.

(cherry picked from commit 9042e85f3c)
2019-03-20 15:12:25 +01:00
Jehan
2ebf56850e Issue #3133: Gimp freezes after selecting a filter preset and...
... clicking a GimpChain.
Since commit c0c055b4e9, gimp_chain_button_set_active() emits the
"toggled" signal. There is no need to emit it separately from
GimpOperationTool when setting presets with
gimp_operation_tool_set_config().

In particular, since the "toggled" signal was even sent unconditionnally
here, our code was ending creating several GBinding for the same 2
adjustments, which was creating an infinite loop.

(cherry picked from commit 03dc24455a)
2019-03-20 15:12:19 +01:00
Jehan
199f9f13a5 app: fixes g_object_unref: assertion 'G_IS_OBJECT (object)' failed.
"binding" data can be set to NULL. Do not assume it is a proper object.

Also I was tempted to use g_object_set_data() to simply free the
GBinding object on setting a new data, but such object will also be
freed when the widget is destroyed by default. So that would also end up
in double destruction. Instead just keep current logics.

This CRITICAL was reported in #3133 but this is not the main bug.

(cherry picked from commit af6760b3c9)
2019-03-20 15:12:13 +01:00
Jehan
66c47ee23f plug-ins: do not needlessly free/malloc() buffer of same size.
In an animated WebP, chances that layers/frame have the same size is
high. It is uneeded to free then malloc again a buffer at each frame,
unless we need more allocated memory.
This is probably not so significant, but still feels nicer.

(cherry picked from commit 0b68ce8182)
2019-03-19 12:54:13 +01:00
Snehalata B Shirude
4721643176 Update Marathi translation 2019-03-18 16:29:18 +00:00
Snehalata B Shirude
520b4fbf18 Update Marathi translation 2019-03-18 16:27:13 +00:00
Snehalata B Shirude
c15069797e Update Marathi translation 2019-03-18 11:12:37 +00:00
Snehalata B Shirude
2a83ce9abe Update Marathi translation 2019-03-18 11:11:30 +00:00
Snehalata B Shirude
9cf206f350 Update Marathi translation 2019-03-18 10:38:01 +00:00
Snehalata B Shirude
05e9bb7b3f Update Marathi translation 2019-03-18 10:35:58 +00:00
Snehalata B Shirude
b46d89257a Update Marathi translation 2019-03-15 12:25:58 +00:00
Snehalata B Shirude
6956a403d0 Update Marathi translation 2019-03-15 12:24:03 +00:00
Marco Ciampa
d67359f096 Updated Italian translation 2019-03-14 17:50:11 +01:00
Sveinn í Felli
28860c12dc Update Icelandic translation 2019-03-14 07:59:52 +00:00
Piotr Drąg
e3fe627faa Update Polish translation 2019-03-13 18:11:45 +01:00
Ell
f8aec23e33 app: avoid pushing undo while updating colormap entries
In GimpColormapEditor, while updating a colormap entry, only push
an undo step when confirming the new color.

(cherry picked from commit 506f412a05)
2019-03-13 10:57:19 -04:00
Ell
68f5bc63b6 app: more "Readjust" improvements
... technical stuff.

(cherry picked from commit 1e89c161c5)
2019-03-13 10:12:12 -04:00
Sveinn í Felli
1b9fdddc78 Update Icelandic translation 2019-03-13 11:01:44 +00:00
Sveinn í Felli
4d08f75978 Update Icelandic translation 2019-03-13 10:48:33 +00:00
Sabri Ünal
b3e34ccbae Update Turkish translation 2019-03-13 10:38:08 +00:00
Sveinn í Felli
282adfd581 Update Icelandic translation 2019-03-13 10:06:58 +00:00
Sveinn í Felli
3c68387e15 Update Icelandic translation 2019-03-13 09:55:23 +00:00
Ell
581944253c app: improve transform-tools readjustment
In GimpTransformGridTool, extend the functionality of the
"Readjust" button, such that if the transformation is already
adjusted to the view (i.e., when the button is clicked the second
time), readjust the transformation to the item bounds (as when
using the tool "normally"), and vice versa.  This allows switching
back and forth between "normal" mode, and "adjusted-to-view" mode.

Additionally, disable readjustment when the current transforamtion
is invalid, and show an error when readjustment results in an
invalid transformation.

(cherry picked from commit a3fa3b6181)
2019-03-13 05:28:36 -04:00
Ell
f6229c921a app: in gimp_tool_gui_set_response_sensitive(), allow non-existent ID
In gimp_tool_gui_set_response_sensitive(), silently ignore non-
existent response IDs, instead of emitting a CRITICAL, to match the
behavior of GtkDialog and GimpOverlayDialog.  This simplifies code
with optional dialog responses.

(cherry picked from commit 92216a635a)
2019-03-13 05:28:36 -04:00
Balázs Meskó
9ee3ee9aaa Update Hungarian translation 2019-03-13 08:39:59 +00:00
Piotr Drąg
c0be74d7f1 Update Polish translation 2019-03-12 18:54:46 +01:00
Sveinn í Felli
942da1ad66 Update Icelandic translation 2019-03-12 14:35:33 +00:00
Sveinn í Felli
0857c5025d Update Icelandic translation 2019-03-12 14:25:36 +00:00
Sveinn í Felli
578ed98227 Update Icelandic translation 2019-03-12 14:18:56 +00:00
Sveinn í Felli
90ee7635ce Update Icelandic translation 2019-03-12 14:14:57 +00:00
Daniel Korostil
9e64f4ac7d Update Ukrainian translation 2019-03-12 07:18:12 +00:00
Alexandre Prokoudine
78877be607 Tools presets -> Tool Pre_sets. Fixes #3092 2019-03-11 23:48:19 +03:00
Sveinn í Felli
1c143228f0 Update Icelandic translation 2019-03-11 19:47:02 +00:00
Sveinn í Felli
790c4b002e Update Icelandic translation 2019-03-11 19:03:05 +00:00
Alan Mortensen
0f4b010199 Updated Danish translation 2019-03-11 19:54:29 +01:00
Ell
3be1a98408 libgimpwidgets: fix arithmetic-expression supprot in GimpSizeEntry
... after commit 8b3c7ae193.

(cherry picked from commit 81a361be73)
2019-03-11 13:53:47 -04:00
Anders Jonsson
914d06547d Update Swedish translation 2019-03-11 16:56:29 +00:00
Piotr Drąg
3e08bd7e22 Update Polish translation 2019-03-11 11:39:12 +01:00
Jehan
18a2f576bb plug-ins: try to clarify "save-transp-pixels" argument of tiff saving.
This argument should actually say "Do not store premultiplied channel
values", which is what the TIFF spec calls "Unassociated alpha" (vs.
"associated alpha" when values are stored premultiplied by alpha).

Now I can see where the current description is coming from, which is
that any color with alpha 0 (totally masked) ends up as RGBA value (0,
0, 0, 0), in other words, the color information is completely lost. Yet
this label is not very helpful to understand what the checkbox really
does. I decided to not just change it altogether as people would have
gotten used to this for years, but at least adding completary
information in API and tooltip in GUI.
2019-03-11 10:45:28 +01:00
Nathan Follens
23ffa791f0 Update Dutch translation 2019-03-10 13:40:26 +00:00
Ell
f27bf95e05 Issue #2557 - Gimp Can't Rotate By More Than 180 Degree
When the "wrap" property of a GimpSpinButton is TRUE, wrap-around
out-of-range values entered through the spin-button's text entry,
instead of clamping them.  Since we're using GimpSpinButton
everywhere since last commit, this applies to all our angle-entry
spin buttons (including spin scales).

(cherry picked from commit 8b3c7ae193)
2019-03-09 07:43:17 -05:00
Ell
2dad85b84f libgimpwidgets, app, plug-ins: use GimpSpinButton everywhere
Replace all direct uses of GtkSpinButton with GimpSpinButton, so
that its modified behavior extends to all our spin buttons.
2019-03-09 07:43:13 -05:00
Snehalata B Shirude
633f6c1f94 Update Marathi translation 2019-03-09 12:08:33 +00:00
Jehan
1e725b3dbd NEWS: keep up-to-date. 2019-03-09 12:28:21 +01:00
Jehan
a0a7ead13f plug-ins: tiff exporting can now support INDEXED*.
Not sure what this @image_types parameter of gimp_install_procedure() is
used for. Exporting was working find with INDEXEDA image even when not
advertized by this function. Let's update this anyway.
2019-03-09 12:17:46 +01:00
Jehan
72e86545f0 Issue #102: TIFF plugin doesn't handle indexed images with alpha...
... channel.
2019-03-09 12:11:25 +01:00
Snehalata B Shirude
c4621601f6 Update Marathi translation 2019-03-09 11:04:02 +00:00
Snehalata B Shirude
34e41e9087 Update Marathi translation 2019-03-09 11:02:45 +00:00
Asier Sarasua Garmendia
c6ef13d63f Update Basque translation 2019-03-09 10:01:29 +00:00
Asier Sarasua Garmendia
8cf4b03868 Update Basque translation 2019-03-09 09:02:32 +00:00
Piotr Drąg
0ffebd18eb Update Polish translation 2019-03-08 19:42:37 +01:00
Ell
1ecbb94b2c app: take transform-grid handle size into account when readjusting
In the unified-transform, scale, and perspective tools, take the
maximal transform-grid handle size into account when readjusting
the transform, so that the handles themselves are fully within view
under arbitrary rotation, rather than just the corners.

(cherry picked from commit 46e16e175c)
2019-03-08 12:11:20 -05:00
Jehan
127fc91603 Issue #3087: error compiling for Windows.
s/THREAD_MODE_ABOVE_NORMAL/THREAD_PRIORITY_ABOVE_NORMAL/
Thanks to Sylvie Alexandre for noticing and searching this.

(cherry picked from commit ebc3ef3c5e)
2019-03-08 17:36:13 +01:00
Jehan
628960ed22 app: update fg/bg colors when committing a colormap change.
Since the color being currently edited is the selected one, it makes
sense that the fg/bg color should be updated appropriately.
2019-03-08 16:32:53 +01:00
Jehan
d378f19390 app: fix a critical on a colormap editor callback.
On color update, check the existence of a context image before trying to
update the colormap.
2019-03-08 16:04:20 +01:00
Jehan
c91d37eff2 Issue #3041: Color Picker no longer selects Colormap entry.
Do not take "Sample merge" into account when picking colors in a
single-layer image. The reason is to be able to get the index
information on indexed image. This information is lost otherwise when
using the whole image as a pickable.

Of course, other exceptions are possible, when you'd pick exactly a
colormap color, but I don't think it's worth making the code
extra-complicated for these. My previous commit will anyway already
select the right color in the colormap on common cases. Though it will
still fail to select the right index when several indexes store the same
color, on a multi-layer image, if you check "Sample merged" while the
right index was not the first one amongst the duplicates.

(cherry picked from commit 31b2b55b28)
2019-03-08 15:17:47 +01:00
Jehan
eabe27421d Issue #3041: Color Picker no longer selects Colormap entry.
This is not the ultimate fix yet, but at least a first improvement.

(cherry picked from commit e47185bf11)
2019-03-08 15:17:47 +01:00
Jehan
01990c4059 app: direct on-canvas color preview when editing a colormap color.
(cherry picked from commit a24957a804)
2019-03-08 15:17:47 +01:00
Jehan
812a0f6689 app: save the accurate color in the colormap palette when possible.
The colormap saves colors as unsigned char, which can be very inaccurate
compared to high precision colors. When adding colors from GimpRGB into
the colormap, use the original value to fill the colormap palette
instead of making a round trip conversion from double to uchar, then
back to double.

This also fixes a direct bug I encountered when adding the current
foreground color in the image colormap. Yet the GimpFgBgEditor or the
GimpColorHistory would still show the color out-of-gamut in cases when
the returned RGB after the roundtrip was not close enough to the
original RGB (even despite using an epsilon in GimpPalette code).

(cherry picked from commit f1cca8ee2e)
2019-03-08 15:17:47 +01:00
Jehan
ecd13f1456 app: update the GimpFgBgEditor when image colormap is updated.
(cherry picked from commit 8e8b4e82c1)
2019-03-08 15:17:47 +01:00
Jehan
7812aced5d Issue #1256: Import damages colormap numbering.
Do not remove fully transparent colors from the PNG palette.
2019-03-08 15:12:04 +01:00
Balázs Meskó
bee8543f44 Update Hungarian translation 2019-03-08 10:31:15 +00:00
Snehalata B Shirude
1ff6d653a2 Update Marathi translation 2019-03-08 10:04:19 +00:00
Snehalata B Shirude
225b8ac920 Update Marathi translation 2019-03-08 10:02:20 +00:00
Nathan Follens
114db4f60a Update Dutch translation 2019-03-08 09:57:16 +00:00
Balázs Meskó
ba3d090882 Update Hungarian translation 2019-03-08 09:33:46 +00:00
Ell
79f030cf6c app: fix mnemonic of transform-tools "Readjust" button
... and make sure that the tool implements readjust() when
receiving a RESPONSE_READJUST.

(cherry picked from commit 5ff38e6859)
2019-03-08 03:46:17 -05:00
Ell
47a44106c2 app: reset overall transformation in transform tools
In GimpTransformGridTool, reset both transform directions in
response to the "Reset" button, so that the overall transformation
is restored to the identity.  Previously, we would only reset the
active transform direction (possibly compensating in the opposite
direction, if both directions are linked).  This was intentional,
but it's probably a bit too confusing, especially in conjunction
with the newly added "Readjust" button.  Let's just go back to
resetting everything.

(cherry picked from commit 2c67b29190)
2019-03-07 17:50:10 -05:00
Ell
21f76df21b app: fix unused variable warning in gimp_tool_gui_new()
... due to commit b23fae86f0.

(cherry picked from commit 7fb1d05ca4)
2019-03-07 16:49:03 -05:00
Ell
ab060c110f app: implement readjust() in various transform tools
Implement GimpTransformGridTool::radjust(), added in the previous
commit, in various transform tools:

The unified-transform, scale, and perspective tools readjust the
transformation such that the grid is centered relative to the view,
and its handles are fully within view under arbitrary rotation.

The rotate tool readjusts the transformation such that the pivot is
centered, and the grid is unrotated, relative to the view.

(cherry picked from commit 5e5118c1db)
2019-03-07 16:27:30 -05:00
Ell
a8292fedf2 app: add "Readjust" function to transform-grid tools
Add an optional GimpTransformGridTool::radjust() virtual function,
which subclasses can implement to radjust the transformation based
on the current state of the display, such that it's easy to
control.  This is especially useful when the image is zoomed-in,
and the transform handles, which are initially across the layer
bounds, are out of view.

When a transform tool implements radjust(), show a "Readjust"
button in the tool GUI.  While readjusting the transformation, we
modify the opposite transformation such that the overall transform
remains unchanged, as if both transform-directions were linked, so
that only the transform grid is readjusted.

(cherry picked from commit 5055dd10d5)
2019-03-07 16:27:29 -05:00
Ell
8d20b7c665 app: add gimp_tool_gui_add_button()
In GimpToolGui, add gimp_tool_gui_add_button() and
gimp_tool_gui_add_buttons_valist(), which allow adding dialog
buttons after construction.

(cherry picked from commit b23fae86f0)
2019-03-07 16:27:27 -05:00
Alexandre Franke
ffe71f6c5b Update French translation 2019-03-07 11:40:45 +00:00
Ell
dfca360b66 app: various fixes to last commit
(cherry picked from commit caad9ca649)
2019-03-06 15:56:12 -05:00
Ell
977c4d0718 app: allow canceling line-art computation
Line-art computation can take a long time, and it's therefore
desirable for it to be interruptable.  While we do cancel the line-
art async when its result is no longer needed, most parts of the
computation don't respond to the cancelation request, leaving the
async operation running in the background, blocking subsequent
async operations.

Implement cancelation support of line-art computation, by passing
down the async object to the various functions, and periodically
checking for its cancelation at various points.  When the async is
canceled, we quickly abort the operation.

Even though cancelation now happens relatively quickly, some parts
of the computation are still uninterruptable and may incur some
latency, so we avoid waiting for the async opration to be aborted
after cancelation, as we did before.

(cherry picked from commit d8e69d66bc)
2019-03-06 15:24:18 -05:00
Sabri Ünal
f73e13f49f Update Turkish translation 2019-03-06 19:06:27 +00:00
Sabri Ünal
c6f2ad1bce Update Turkish translation 2019-03-06 19:05:07 +00:00
Sabri Ünal
f84135e3d9 Update Turkish translation 2019-03-06 18:57:21 +00:00
Piotr Drąg
7eae8e8cda Update Polish translation 2019-03-06 19:09:48 +01:00
Rodrigo Lledó
8014fa6ba8 Update Spanish translation 2019-03-06 11:06:39 +00:00
Ell
d918502aac app: use gimp_gegl_buffer_copy() in various places
... instead of gegl_buffer_copy().  The former parallelizes the
format conversion.

(cherry picked from commit bb7f61c919)
2019-03-06 06:00:10 -05:00
Sabri Ünal
9bbcaac5d2 Update Turkish translation 2019-03-06 10:55:30 +00:00
Sabri Ünal
5f7d6951f7 Update Turkish translation 2019-03-06 10:54:15 +00:00
Sabri Ünal
44703c03ff Update Turkish translation 2019-03-06 10:51:51 +00:00
Ell
cd159e4bd4 app: fix indepndent-async thread priority on Windows
Positive and negative priorities got swapped...

(cherry picked from commit 190095c97b)
2019-03-06 00:08:05 -05:00
Ell
08be2affee app: use independent async for resolving performance-log symbol information
... so that performance logs can be recorded during long-running
async operations, without those operations blocking the
finalization of the log.

(cherry picked from commit 652a2a90cf)
2019-03-06 00:02:11 -05:00
Ell
a3cd8c96d0 app: add gimp_parallel_run_async_independent_full()
... which is equivalent to gimp_parallel_run_async_independent(),
except that it takes an additional "priority" parameter, which
specifies the task's priority, with 0 being the default priority,
and lower values indicating higher priority.  Unlike
gimp_parallel_run_async_full(), the priority parameter doesn't
directly control the task's priority in a queue, but rather, we use
it to control the priority of the task's dedicated thread, on
supported platforms (previously, all independent async tasks would
run with low priority.)

Use low priority when loading fonts, which can take a long time, to
keep the existing behavior.

(cherry picked from commit fa2e4dcce0)
2019-03-06 00:02:10 -05:00
Ell
a465b9c341 app: clean up last commit
Remove gimp_item_tree_clear(), added in last commit, and move its
code to gimp_item_tree_dispose().  Likewise, in
gimp_image_dispose(), use g_object_run_dispose() on the image item-
trees, instead of gimp_item_tree_clear().

(cherry picked from commit b0de51b6bf)
2019-03-05 16:42:50 -05:00
Ell
c76076ec14 app: fix segfault when closing an image with a floating selection
Add gimp_item_tree_clear(), which removes all the items of a
GimpItemTree, and clear the layers/channels/vectors item trees in
gimp_image_dispose(), *before* finalizing the image, so that the
corresponding items' desctructors are called while the image is
still alive.  In particular, this allows the destructors to safely
call gimp_item_is_attached(), which happens when the image has a
floating selection, since commit
8d4e5e0ff7.

(cherry picked from commit d7e3a1e226)
2019-03-05 09:33:07 -05:00
Ell
4eda127c52 Issue #3062 - Picking by hue using "Select by Color" goes awry ...
... in GIMP 2.10.9 from git

In gimppickable-contiguous-region's pixel_difference() function,
which is used, among other things, by the select-by-color and
fuzzy-select tools, when selecting by LCh/HSV hue, treat a pair of
colors as inifinitely far apart if one of them has positive chroma/
saturation, and the other has chroma/saturation that's very close
to 0; conversely, treat a pair of colors as equal if both of them
have chroma/sautation that's close to 0.

As a result, when the seed color is saturated, gray pixels are
never selected, while when the seed color is desaturated, all, and
only, gray pixels are selected.

(cherry picked from commit 9886b69dac)
2019-03-05 09:01:45 -05:00
Sabri Ünal
9173e42274 Update Turkish translation 2019-03-05 00:35:09 +00:00
Sabri Ünal
51585bb802 Update Turkish translation 2019-03-05 00:32:28 +00:00
Sabri Ünal
71800dfd21 Update Turkish translation 2019-03-04 22:18:28 +00:00
Sabri Ünal
00c3c068d0 Update Turkish translation 2019-03-04 22:12:56 +00:00
Sabri Ünal
28232d166c Update Turkish translation 2019-03-04 21:34:57 +00:00
Jehan
07080d4540 app: improve line art filling when clicking on a line art closure.
When clicking on a line art pixel, only this pixel gets colored, which
is fine for actual (original) line art pixels. But on generated ones
(closure pixels, which are internal only), you end up with a single
pixel colored while the whole surrounding area is empty. This feels like
a bug (even though it was not one technically) as you have no way to
guess you are clicking on a closure pixel.
Instead, when this happens, simulate clicks on all neighbour pixels,
hence potentially coloring all surrounding regions, which is most likely
what you wanted.

(cherry picked from commit f310db6c21)
2019-03-04 19:01:44 +01:00
Jehan
03744e3012 app: fixing the line art GimpBusyBox visibility.
Commit bc187cc5cc was a bit wrong as it was possible to get some race
conditions when changing settings quickly in a short time frame.

(cherry picked from commit 3a317e72aa)
2019-03-04 19:01:44 +01:00
Jehan
a9ec675b77 app: avoid useless line art closure recomputation.
On various property changes, only recompute the line art when the
property actually changed. Also add a gimp_line_art_bind_gap_length() to
avoid computing twice the line art when changing both type of closure
(splines and segments) together, as is currently the case.

(cherry picked from commit c0996241f6)
2019-03-04 19:01:44 +01:00
Jehan
4233d90961 app: add a GimpBusyBox near the "Line Art Detection" label in…
… Bucket Fill tool options.
This will provide feedback when the line art closure is being computed,
which may be useful on big images where it may take some time. Otherwise
painter may be left hanging without knowing what takes time.

(cherry picked from commit bc187cc5cc)
2019-03-04 19:01:44 +01:00
Ell
6ae957088a app: improve warp-tool cropped-area calculation
In the warp tool, use the gegl:map-relative node to calculate the
affected drawable area to which the filter is cropped, to account
for box filtering.

(cherry picked from commit daa09ef602)
2019-03-04 08:44:32 -05:00
Jehan
2758a34b02 desktop: update a bit the 2.10.10 appdata.
(cherry picked from commit 8fce349c4e)
2019-03-04 12:18:35 +01:00
Rodrigo Lledó
0ed30bd1eb Update Spanish translation 2019-03-04 09:34:37 +00:00
Anders Jonsson
1f641546a9 Update Swedish translation 2019-03-03 21:40:06 +00:00
Ell
9b6604d011 app: add "real-time preview" option to the warp tool
Add a "real-time preview" option to the warp tool, which, when
toggled, causes the preview to be rendered synchronously during
motion.  This is slower, but gives better feedback.

(cherry picked from commit a93af839fe)
2019-03-03 16:24:05 -05:00
Ell
40a9b38b5c app: properly implement "spacing" option in the warp tool
The "spacing" option of the warp tool used to be handled by the
gegl:warp op, and have little effect.  Instead, implement it in the
warp tool directly, having the same effect as the other paint
tools.

Having a properly-working "spacing" option allows us to use EXACT
motion mode without cirppling down performance, which means that
the stroke now follows the pointer exactly, even when processing
takes a while.

Decrease the default "spacing" value to 10.

(cherry picked from commit e8a39d5c49)
2019-03-03 16:24:05 -05:00
Ell
579562f177 app: improve warp-tool invalidated-area calculation
In the warp tool, use the gegl:map-relative node to calculate the
invalidated drawable area when the displacement field changes, to
account for box filtering.

(cherry picked from commit aa91528084)
2019-03-03 16:24:05 -05:00
Ell
bf89b9a9bc app: set warp-tool scroll-lock to TRUE
In the warp tool, set scroll-lock to TRUE, so that the image isn't
scrolled when click-dragging outside the canvas, like the rest of
our paint tools.

(cherry picked from commit 6acedc7ebb)
2019-03-03 16:24:05 -05:00
Michael Natterer
1c66573f4c app: optimize gimp_layer_invalidate_boundary()
Don't mess with the image's mask if the layer is not attached or not
visible.
2019-03-03 20:25:40 +01:00
Michael Natterer
4ee74a11e6 app, plug-ins: move brush pipe saving from the file-gih plug-in to the core
As with .gbr and .pat, only the actual saving code, not the export
logic and GUI.

(cherry picked from commit cc7e07fecb)
2019-03-03 20:07:07 +01:00
Michael Natterer
2071f3bdc6 app: factor file_gbr_drawable_to_brush() out of file_gbr_image_to_brush()
(cherry picked from commit 861106a0b3)
2019-03-03 20:05:35 +01:00
Michael Natterer
d8aab75c09 app: factor out gimp_brush_pipe_set_params() from gimp_brush_pipe_load()
(cherry picked from commit e742b4a95b)
2019-03-03 20:00:25 +01:00
Jehan
590f58abff NEWS: keep up-to-date.
Not updated for a while, let's try to keep the file up-to-date so that
we can make relevant news. If I forgot stuff, please add them! :-)
2019-03-03 19:20:33 +01:00
sabri ünal
d50abef3a2 #3050 - Four tooltips marked as translatable
(cherry picked from commit 3c64697878)
2019-03-03 17:52:48 +01:00
Alan Mortensen
15038f8f3d Updated Danish translation of gimp-python 2019-03-03 15:08:38 +01:00
Alan Mortensen
fe0cf5777c Updated Danish translation of gimp-plug-ins 2019-03-03 15:08:38 +01:00
Alan Mortensen
481cca3907 Updated Danish translation of gimp-libgimp 2019-03-03 15:08:38 +01:00
Alan Mortensen
92ec0bb6a3 Updated Danish translation 2019-03-03 15:05:58 +01:00
Ell
1705333141 libgimpwidgets: fix gimp_spin_button_new_with_range()
(cherry picked from commit 19eb9fb1bf)
2019-03-03 04:22:30 -05:00
Ell
d81d857798 app: in gimppaintcore-loops, improve CanvasBufferIterator algorithm helper-class
In gimppaintcore-loops, fix the CanvasBufferIterator algorithm
helper-class so that it may appear more than twice in the
hierarchy, and integrate it into the normal dispatch-dependency
system, instead of having dependent algorithms inherit it directly.

(cherry picked from commit 03810861d2)
2019-03-02 16:24:52 -05:00
Ell
7f6e522a35 app: in gimp:mask-components, don't forward empty aux when mask is fully set
... since the result needs to be fully opaque in this case, rather
than fully transparent.

(cherry picked from commit 371e35eeb8)
2019-03-01 14:36:25 -05:00
Nathan Follens
ef44c72556 Update Dutch translation 2019-03-01 19:34:41 +00:00
Piotr Drąg
0eac712bc4 Update Polish translation 2019-03-01 20:24:53 +01:00
Ell
a3db1857fc app: small fix to last commit
(cherry picked from commit a8a29312de)
2019-03-01 14:15:25 -05:00
Ell
37797f9de4 app: fix toggling-off of alpha channel
Fix gimp:mask-components to use full-oapcity value for the alpha
component when it's masked-in and there's no "aux" input, so that
the image is rendered with full opacity when the alpha channel's
visiblity is toggled off, as per bug #143315.

(cherry picked from commit 6419ed3246)
2019-03-01 14:11:22 -05:00
Ell
1d05c286c5 app: disable spec. 8-bpp version of gimp:mask-components for non-little-endian platforms
(cherry picked from commit 6166f9ae14)
2019-03-01 14:11:21 -05:00
Nathan Follens
d70a030b75 Update Dutch translation 2019-03-01 17:08:57 +00:00
Ell
efc632948f Issue #3037 - Crash in transform tools after transforming an out-of-bounds selection
In GimpTransformGridTool, fix weak-pointer initialization for the
out-of-bounds selection-boundary canvas item, to avoid a CRITICAL
when initializing the tool in transform-selection mode for a fully
out-of-bounds selection, and a subsequent segfault when re-
initializing the tool.

(cherry picked from commit 1e739675a4)
2019-03-01 09:07:21 -05:00
Øyvind Kolås
7c7eb399b7 build,app: require GEGL-0.4.14
(cherry picked from commit dde7108584)
2019-03-01 14:48:01 +01:00
Øyvind Kolås
67efe67ed8 build,app: require babl-0.1.62 2019-03-01 14:46:52 +01:00
Ell
5a62d61885 app: add "Constrain handles", "Around center" options to the perspective tool
Add "Constrain handles" and "Around center" options to the
perspective-transform tool's GUI, which are similar to the
corresponding options of the unified-transform tool.  Both of these
options can already be controlled using Shift and Ctrl,
respectively, through the transform-grid widget, so we might as
well provide GUI toggles for them.

(cherry picked from commit ac4b0fe9f1)
2019-02-28 15:46:49 -05:00
Ell
41790aef4b app: fix transform-grid center point for non-affine transforms; use as pivot
In GimpToolTransformGrid, use the transformed center-point of the
original polygon as the position of the center-point handle, and as
a snapping point for the pivot when "cornersnap" is TRUE, instead
of using the center-point of the transformed polygon.  These two
points are different for non-affine transformations.

Furthermore, when "use-pivot-handle" is FALSE, use the center-
point as the reference point when transforming around the pivot,
instead of the pivot itself, which might not be set.  In
particular, this fixes transformation around the pivot in the
perspective tool.

Don't explicitly set the center-point as the pivot in the scale
tool, since this commit makes it unnecessary.

(cherry picked from commit cdc5782b3c)
2019-02-28 15:46:48 -05:00
Ell
3f43c2ea12 Issue #1554 - Select by Color tool does not select pixel(s) or area(s) of pixel(s)
In gimp_pickable_contiguous_region_by_color(), add a small epsilon
to the threshold value, to allow for small errors due to the input
color and pickable pixel-colors being converted to the common
format through different paths.

While we *could* special-case threshold == 0 when the input color
comes from the same pickable, as is the case for the select-by-
color tool, and perform an exact comparison in the original format,
in the more general case the input color can come from an arbitrary
source, such as a plug-in.

(cherry picked from commit a6c79770c3)
2019-02-28 09:27:48 -05:00
Ell
bf793f9d59 build: add Korean translation to the Windows installer
... but keep it disabled, since the Inno Setup Korean translation
is unofficial.

(cherry picked from commit fe35294ee7)
2019-02-27 03:41:32 -05:00
Ell
7bdb482eff po-windows-installer: technical fix to the Korean translations
ender's name can't be encoded in the target encoding -> use ASCII.

(cherry picked from commit ee49487cf2)
2019-02-27 03:41:32 -05:00
Sangdo Jun
297e4410d4 Add Korean translation 2019-02-27 07:26:57 +00:00
Ell
3f1e91fa0b app: in gimp_gegl_create_flatten_node(), explicitly set color node format
In gimp_gegl_create_flatten_node(), explicitly set the output
format of the background gegl:color node according to the composite
space, so that no conversion is required during compositing.

(cherry picked from commit ebf2c2fef1)
2019-02-25 11:31:03 -05:00
Ell
5d37a244dd app: merge layers in chunks, and show progress
In gimp_image_merge_layers() -- the internal function used by the
various layer-merging/flattenning functions -- process the merged-
layer graph in chunks, using gimp_gegl_apply_operation(), instead
of in one go, using gegl_node_blit_buffer().  Processing in chunks
better utilizes the cache, since it reduces the size of
intermediate buffers, reducing the chances of hitting the swap when
merging large images (see, for example, issue #3012.)

Additionally, this allows us to show progress indication.  Have the
relevant gimpimage-merge functions take a GimpProgress, and pass it
down to gimp_image_merge_layers().  Adapt all callers.

(cherry picked from commit e83d8ac4f2)
2019-02-25 05:10:59 -05:00
Ell
9de3b475ae app: streamline action_data_get_foo() functions
Streamline the various action_data_get_foo() functions, by having
each function only match the action data directly against its
specific type(s), and use the other functions to match the action
data against their corresponding types, instead of having each
function directly exhaust all possible matches.

Other than reducing depulication, it fixes certain cases in which
some action_data_get_foo() functions would fail to find a match,
even though one exists, since they failed to exhaust all the
options.

(cherry picked from commit 914200f3ad)
2019-02-25 05:10:58 -05:00
Ell
86e97536d3 app: in GimpSmudge, avoid copying brush pixmap when flow = 0
In GimpSmudge, avoid copying the brush's dab to the paint buffer
when using a pixmap brush if the flow parameter is 0 -- it has no
effect in this case.

(cherry picked from commit fb5987fd57)
2019-02-24 13:22:59 -05:00
Ell
2ea7deff4d app: improve gimp_brush_core_color_area_with_pixmap()
Reimplement gimp_brush_core_color_area_with_pixmap(), which copies
the brush's dab to the paint buffer when using a pixmap brush, in
terms of gimp-gegl-loops.  This simplifies the functions,
parallelizes processing, and transparently handles float brushes.

Replace the "mode" parameter of the function with an "apply_mask"
parameter, which specifies whether to apply the brush's mask to
the dab as part of copying.  Avoid applying the mask in
GimpPaintbrush; previously, we would erroneously apply the mask
twice when using the paintbrush tool: once when copying the
dab to the paint buffer, and again when pasting the paint buffer
to the canvas.

We still apply the mask in GimpSmudge, which results in the same
double-application behavior, however, this might be less practical
to fix.

(cherry picked from commit 5b09af4390)
2019-02-24 13:22:57 -05:00
Ell
25ed35af62 app: accept a const GimpTempBuf in more temp-buf functions
In gimp_temp_buf_{ref,unref}(), and
gimp_temp_buf_create_{buffer,pixmap}(), accept a const GimpTempBuf
argument.

(cherry picked from commit 0a1e62768a)
2019-02-24 13:22:28 -05:00
Piotr Drąg
8b1a5ea0c2 Update Polish translation 2019-02-24 17:37:21 +01:00
Michael Natterer
db675d84e3 app: implement saving of GimpBrushPipes in the core
Just the GimpData::save() and ::copy() part that is needed to
duplicate and rename them, the image-to-pipe logic from the export
plug-in remains to be ported.

(cherry picked from commit aee097fa97)
2019-02-23 19:44:23 +01:00
Ell
50a09d2451 Issue #2997 - Error importing PCX
Commit dc069e424a removed the
assumption that 1-bpp PCX files are B&W, in favor of using the
provided palette, which is (supposedly?) the correct behavior.
However, there are evidently B&W files that do not specify a
palette, resulting in an all-black image (i.e., a 2-color indexed
image, whose both palette entries are black).  Since other
software, including older versions of GIMP, load such files
"correctly", let's fix this by falling back to a B&W palette when
the provded palette is uniform.

(cherry picked from commit 11defa4271)
2019-02-22 12:02:14 -05:00
Ell
a5130c7f66 app: add temp-buf-total varaible to the dashboard
Add a temp-buf-total variable to the dashboard's misc group,
showing the total size of all GimpTempBuf objects.

(cherry picked from commit bb645bae17)
2019-02-22 08:47:13 -05:00
Balázs Úr
66e15ba261 Update Hungarian translation 2019-02-21 19:33:58 +00:00
Ell
bf92987353 app: replace use of deprecated dont-cache/no_cache with cache-policy
Replace the use of the deprecated GeglNode::dont-cache property,
and GeglOperationClass::no_cache field, with GeglNode::cache-policy
and GeglOperationClass::cache_policy, respectively.

See commit gegl@7f24430cda0d8c3eff311868823d445edc2a4e12.

(cherry picked from commit 7489f0aece)
2019-02-21 13:09:49 -05:00
Piotr Drąg
972c7ddede Update Polish translation 2019-02-21 17:35:00 +01:00
Alexandre Prokoudine
061bce7b7a Update Russian translation 2019-02-21 01:41:01 +03:00
Michael Natterer
088418e004 app, plug-ins: move file-gih-load from the file-gih plug-in to the core
(cherry picked from commit 52adaa1963)
2019-02-19 23:48:55 +01:00
Michael Natterer
45d3a054a4 app: some changes to GimpBrushPipe in preparation for .git image loading
- don't clear the names of the individual brushes, we need them for
  a load -> save roundtrip
- for the same reason, and for convenience, store the parameter string
  in the object
- clean up gimp_brush_pipe_finalize()

(cherry picked from commit 4b456e6079)
2019-02-19 23:48:09 +01:00
Michael Natterer
4944e61bc3 app: cosmetic change in file_pat_load_invoker()
just for consistency with file_gbr_load_invoker().

(cherry picked from commit 7aa99c8cf0)
2019-02-19 23:47:56 +01:00
Michael Natterer
13de8f2982 app: factor file_gbr_brush_to_layer() out of the brush-to-image logic
of file-gbr-load, and add some layer handling magic that doesn't
change a thing for simple brushes, but is needed for loading brush
pipes.

(cherry picked from commit 3b89ae40d0)
2019-02-19 23:47:34 +01:00
Ryuta Fujii
a07c086d7a Update Japanese translation 2019-02-18 14:42:36 +00:00
Balázs Meskó
fc45f1189e Update Hungarian translation 2019-02-18 12:16:00 +00:00
Balázs Meskó
de73cd294d Update Hungarian translation 2019-02-18 06:54:42 +00:00
Ell
bfa6285d23 plug-ins: in file-dds, rename endian.h to endian_rw.h ...
... to avoid clashing with the system <endian.h>

Thanks Andrea!

(cherry picked from commit b5a34c3190)
2019-02-17 13:35:22 -05:00
Ell
cbd712a2bd app: in operation tool, update scrolled-window size request when options-box size changes
In GimpOperationTool, update the options scrolled-window size
request whenever the size of the options box changes, instead of
only when constructing the GUI, since the options layout may change
dynamically through GUM, or through a custom GUI.
2019-02-17 04:20:11 -05:00
Ell
de1ac871e9 app: in gimppaintcore-loops, unsuppress COMBINE_PAINT_MASK_TO_CANVAS_BUFFER algorithm
In gimppaintcore-loops, unsuppress the
COMBINE_PAINT_MASK_TO_CANVAS_BUFFER algorithm (partially
reverts commit b717ead1abd487f663668ac131883dff0ffe4557.)

In gimp_paint_core_paste() it's always used together with
CANVAS_BUFFER_TO_PAINT_BUF_ALPHA, which matches a combined
algorithm, preventing it from being called, however, it can still
be called through gimp_paint_core_replace(), which uses it
together with CANVAS_BUFFER_TO_COMP_MASK, which doesn't have a
combined algorithm.  We can, however, filter out
CANVAS_BUFFER_TO_PAINT_BUF_ALPHA whenver
COMBINE_PAINT_MASK_TO_CANVAS_BUFFER is matched (since the combined
algorithm will be matched beforehand when both algorithms are
included).

(cherry picked from commit 6fe57a946b)
2019-02-16 14:19:20 -05:00
Ell
99130068bc app: in gimp:mask-components, handle half-precision float formats
(cherry picked from commit 7c1429d1ff)
2019-02-16 13:10:12 -05:00
Ell
d424a418cb app: in GimpDrawableFilter, don't mask-out alpha comonent for alpha-less drawables
In gimp_drawable_filter_sync_affect(), don't mask-out the filter's
alpha component when the drawable doesn't have an alpha channel,
since this is no longer necessary -- we now explicitly convert the
output to the drawable format as part of the graph -- and it
prevents the gimp:mask-components node from becoming a NOP.

(cherry picked from commit af2c7d1b33)
2019-02-16 13:10:12 -05:00
Ell
353951a44f app: set/clear component-mask alpha-bit of alpha-less drawables, to make mask uniform
In gimp_drawable_get_active_mask(), when the drawable doesn't have
an alpha channel, set or clear the mask's alpha bit, according to
the state of the other bits, so that it never gets in the way of a
fully set/clear mask.  The value of the alpha bit doesn't matter
when there's no alpha channel, however, having a uniform mask
allows us to skip component masking altogether.

Additionally, provide a default implementation for
GimpDrawable::get_active_mask() which returns a full mask, and
remove the equivalent implementation for GimpChannel.

(cherry picked from commit 1b900bfa16)
2019-02-16 13:10:11 -05:00
Michael Natterer
a04e24ce3e app, plug-ins: move brush (gbr) saving to the core
just the export logic remains in the plug-in, just as for patterns.

(cherry picked from commit 90164c4951)
2019-02-16 19:02:30 +01:00
Michael Natterer
c08932cab0 plug-ins: forward the error message if file-pat-save-internal fails
(cherry picked from commit b71ebcea6d)
2019-02-16 19:02:20 +01:00
Ell
339368f562 app: in gimppaintcore-loops, in MaskComponents::finalize_step(), chain up
(cherry picked from commit e513e9e054)
2019-02-16 10:11:10 -05:00
Ell
b6546536f9 app: use MASK_COMPONENTS algorithm in gimp_paint_core_{paste,replace}()
Remove the mask_components_onto() gimppaintcore-loops function, and
the GimpPaintCore::comp_buffer member.  Instead, in
gimp_paint_core_paste() and gimp_paint_core_replace(), use the
MASK_COMPONENTS algorithm, added in the previous commit.

(cherry picked from commit c7d8d9ba2e)
2019-02-16 10:02:38 -05:00
Ell
c4430b3deb app: in gimppaintcore-loops, add MASK_COMPONENTS algorithm
In gimppaintcore-loops, add a new MASK_COMPONENTS algorithm, which
masks the output of compositing into the destination buffer,
according to a component mask.  The algorithm uses the same code as
gimp:mask-comopnents, and can be used as part of a
gimp_paint_core_loops_process() pipeline, instead of using a
separate function.

(cherry picked from commit 08fa46ea41)
2019-02-16 10:01:10 -05:00
Ell
fe69dd2207 app: in gimppaintcore-loops, add [Temp]CompBuffer algorithm helper-classes
In gimppaintcore-loops, add a CompBuffer algorithm helper-class,
which provides access to the output buffer used for compositing,
to be used by the DO_LAYER_BLEND algorithm instead of the
destination buffer.

CompVuffer itself doesn't provide the storage for the buffer; this
is rather the responsibility of the algorithms that use it.  The
TempCompBuffer algorithm helper-class provides temporary storage
for the compositing buffer, and can be used by algorithms that need
a temporary buffer.

(cherry picked from commit 858f30a609)
2019-02-16 10:01:10 -05:00
Ell
ada815673e app: in gimppaintcore-loops, mark algorithms as mandatory/suppressed
In gimppaintcore-loops, use {Mandatory,Supressed}AlgorithmDispatch,
added in the previous commit, to mark certain algorithms as always
occuring, or never occuring, in all hierarchies.

(cherry picked from commit b717ead1ab)
2019-02-16 10:01:09 -05:00
Ell
8b86296979 app: in gimppaintcore-loops, add {Mandatory,Suppressed}AlgorithmDispatch
In gimppaintcore-loops, add MandatoryAlgorithmDispatch and
SuppressedAlgorithmDispatch class templates, which implement
dispatch functions suitable for algorithms which are always part of
the hierarchy, or never part of the hierarchy, respectively.  Using
one of these classes as the dispatch function for a given algorithm
verifies that the algorithm is/isn't included in the requested-
algorithm set, but doesn't otherwise increase the number of
instanciated hierarchies, since only one of these cases has to be
handled.

(cherry picked from commit fc7ffc71a3)
2019-02-16 10:01:09 -05:00
Ell
3dd2cf27b5 app: in gimppaintcore-loops, remove individual-algorithm functions
In gimppaintcore-loops, remove the individual-algorithm convenience
functions, which are merely wrappers around
gimp_paint_core_loops_process(), and aren't used anywhere anymore.
This allows us to avoid instanciating certain algorithm-hierarchies
which aren't used in practice, as will be done by the following
commits.

(cherry picked from commit 95761db557)
2019-02-16 10:01:07 -05:00
Ell
02b8845a2f app: improve gimp:mask-components
Add specialized versions of gimp:mask-components for 8-, 16-, and
32-bpc formats, to improve efficiency, and to preserve the contents
of masked-out components exactly.

Provide public functions for format-selection and processing, which
we'll use in the painting code, instead of reimplementing component
masking.

(cherry picked from commit ee156b8fd6)
2019-02-16 10:00:29 -05:00
Ell
3925ae5fbb app: convert gimp:mask-components to C++
... in preperation for next commit.

(cherry picked from commit a7f7a485bd)
2019-02-16 09:59:33 -05:00
Snehalata B Shirude
07dd124e06 Update Marathi translation 2019-02-16 08:44:53 +00:00
Snehalata B Shirude
08746b7e26 Update Marathi translation 2019-02-16 08:40:56 +00:00
Ell
83552620eb app: in gimp_gegl_apply_cached_operation(), don't dup src buffer for point ops
In gimp_gegl_apply_cached_operation(), when the source and
destination buffers are the same, avoid duplicating the source
buffer when the applied operation is a point operation, since
applying it in chunks from/to the same buffer is not a problem in
this case.

(cherry picked from commit 0d21f2469b)
2019-02-15 12:40:12 -05:00
Ell
bd67478b49 app: add gimp_gegl_node_is_point_operation()
... which takes a GeglNode, and determines if the associated
operation is a point operation.

Use in GimpFilterTool, instead of performing the same check
manually.

(cherry picked from commit 918f2e75bd)
2019-02-15 12:40:11 -05:00
Ryuta Fujii
ace1229823 Update Japanese translation 2019-02-15 14:10:20 +00:00
Piotr Drąg
9a30591b1e Update Polish translation 2019-02-14 19:48:31 +01:00
Ell
3847404db6 app: #include <string.h> in gimpoperationreplace.c
... for memset().

(cherry picked from commit 0cf77b0a3b)
2019-02-14 11:09:21 -05:00
Ell
d4976dfc61 app: change behavior of REPLACE mode for fully-transparent pixels
When the result of compositing has an alpha value of 0, the
corresponding color value is not mathematically defined.
Currently, all out layer modes opt to preserve the destination's
color value in this case.  However, REPLACE mode is different
enough to warrant a different behavior:

Unlike the other layer modes, when the compositing opacity
approaches 0 or 1, the output color value approaches the
destination or source color values, respectively, regardless of the
output alpha value.  When the opacity doesn't approach 0 or 1, the
output color value generally doesn't approach a limit as the output
alpha value approaches 0, however, when both the destination and
source alpha values are equal, the output color value is always a
simple linear interpolation between the destination and source
color values, according to the opacity.  In other words, this means
that it's reasonable to simply use the above linear interpolation
for the output color value, whenever the output alpha value is 0.

Since filters are commonly combined with the input using REPALCE
mode with full opacity, this has the effect that filters may now
modify the color values of fully-transparent pixels.  This is
generally desirable, IMO, especially for point filters.  Indeed,
painting with REPLACE mode (i.e., with tools that use
gimp_paint_core_replace()) behaved excatly as described above, and
had this property, before we switched gimp_paint_core_replace() to
use the common compositing code; this created a discrepancy between
painting and applying filters, which is now gone.

A side effect of this change is that we can now turn gimp:replace
into a NOP when the opacity is 100% and there's no mask, which
avoids the compositing step when applying filters.  We could
previously only apply this optimization to PASS_THROUGH mode, which
is a subclass of REPLACE mode.

Note that the discussion above concerns the UNION composite mode,
which is the only mode we currently use REPLACE in.  We modify the
rest of the composite modes to match the new behavior:
CLIP_TO_BACKDROP always preserves the color values of the
destionation, CLIP_TO_LAYER always preserves the color values of
the source, and INTERSECTION always produces fully-zeroed pixels.

(cherry picked from commit 27e8f452b3)
2019-02-14 11:05:20 -05:00
Ell
f844965455 app: remove gimp_gegl_replace()
Remove gimp_gegl_replace(), which is not used anywhere since the
last commit.  It's redundant with the rest of our compositing code,
in particular, gimp:replace and gimp:mask-components.

(cherry picked from commit d2f8413173)
2019-02-14 11:05:20 -05:00
Ell
116e8a6d4b app: remove gimp_drawable_replace_buffer()
Remove gimp_drawable_replace_buffer(), which is no longer used
anywhere since commits ddb69b77a7 and
3451ffb62c.  This eliminates
redundancy, since all compositing is now done through the layer-
mode code.

Furthermore, gimp_drawable_replace_buffer() used the drawable's
active-component array, whose layout depends on the image mode, as
an argument to gimp_gegl_replace(), which always expects an RGBA
component array, resulting in broken component masking in non-RGB
images.

(cherry picked from commit 2074accb60)
2019-02-14 11:05:19 -05:00
Jehan
0fef0a55f8 app: gimp_edgel_region_area() may return < 0 for non-closed zones.
The algorithm to compute a zone area by following its border only works
well for fully closed zones. It may return negative values otherwise.
Let's just assume the created zone is big in this case (which may or may
not be the case, but this is the safe case as it does not prevent
closure creation).

(cherry picked from commit 0636c302a3)
2019-02-14 13:54:24 +01:00
Rodrigo Lledó
daf7754e7a Update Spanish translation 2019-02-14 12:17:52 +00:00
Jehan
e24f9eec37 Issue #2961: minor coding style fix.
Missing space, and anyway let's use named parameters, which makes the
code better self-documented.

(cherry picked from commit 35eff00e2e)
2019-02-14 12:12:24 +01:00
Alexandre Prokoudine
648703b6f0 Remap Linear Invert's mnemonic to I to remove a duplicate with Levels 2019-02-14 01:21:01 +03:00
Ell
04052fe3a4 app: in GimpOperationTool, add scrollbar width to scrolled-window requisition
... so that the scrollbar doesn't cover the child in wide UIs.
2019-02-13 13:27:43 -05:00
Ell
0a82bd1109 app: in gimpbrushcore-loops, fix memory corruption in clear_edges()
s/width/height/

Fixes commit 9d19e804ed.

(cherry picked from commit 72d4977574)
2019-02-13 12:33:48 -05:00
Veerasamy Sevagen
3ff2285ba8 Setting the FileChooserbutton to a fixed width.
(cherry picked from commit 582801ccc5)
(cherry picked from commit b44c2e9352)
(cherry picked from commit cdd686f752)
(cherry picked from commit 3b818f6a9b)
(cherry picked from commit c7d5438b49)

Note from reviewer: sorry, this was not squashed on master! Gitlab
failed to squash even though the "squash commits" checkbox was checked!
So it ended as a 5-commit 1-line change!
:-/
2019-02-13 17:16:30 +01:00
Jehan
18d86cccbe NEWS: update. 2019-02-13 16:30:17 +01:00
Jehan
b409a781cd app: out-of-gamut for grayscale images too in GimpFgBgEditor.
I realized that the same issue as for indexed images could also apply to
grayscale. If your fg/bg colors are not gray, it should not be expected
for them to be paintable. So let's give the out-of-gamut hint.

(cherry picked from commit 9090de96f2)
2019-02-13 16:25:54 +01:00
Jehan
e48c239459 app: GimpFgBgEditor displays the out-of-gamut color for indexed images.
If a color is not within the indexed image's palette, we can consider it
to be out-of-gamut too (the gamut of such image being its palette).

This is a first step towards fixing #2938. Basically currently opening
indexed images is not made obvious and you can end up thinking GIMP is
broken as when you try to paint with a given FG or BG color, you may get
a completely different color on the canvas. And it is not obvious to
realize why. Now at least, the FG/BG color will tell you when the color
you are trying to paint with is not within the accepted palette.

(cherry picked from commit 7b4c96d03d)
2019-02-13 16:24:09 +01:00
Jehan
3fd78441ba app: pack color picker and hexadecimal entry on same line in Color dock.
There was no use to pack them on 2 lines. It was just making the FG/BG
widget overly huge, and the color picker button and hex entry very long.
This was just ugly. Also this dock is tall enough, so packing things
horizontally when it makes sense is better.

(cherry picked from commit 45adf9d0d7)
2019-02-13 16:13:24 +01:00
Jehan
4774bd3b48 app: s/plug-In/plug-in in a GUI-visible string.
(cherry picked from commit a6aa14bca2)
2019-02-13 16:13:07 +01:00
Jehan
b2fa4c6299 app: clarify function to validate line art closure.
Add some comments and string docs as it is not that obvious to
understand the whole logics, invert the return value (returning TRUE
when the closure line is accepted, instead of the opposite) and rename
it to more appropriate gimp_line_art_allow_closure().

(cherry picked from commit c4beca8c90)
2019-02-13 16:13:01 +01:00
Jehan
b2181d0fb2 app: proper signedness for return value of gimp_edgel_region_area().
It is just weird to return a negative area and multiply it by -1.
Just apply the proper signs from the start.

(cherry picked from commit 14e7424403)
2019-02-13 16:12:54 +01:00
Jehan
f5225f2211 app: error messages should happen on button press, not initialization.
The initialization is sometimes done when switching tools (for instance
when selecting the active tool by command), not always on button press.
So the error output behavior was inconsistent, and worse, the tool was
sometimes not forbidden to run when it should have been.
Just run all the checks (layer groups, locks and whatnot) on button
press.

(cherry picked from commit 74cfd4fd95)
2019-02-13 16:12:41 +01:00
Ryuta Fujii
8e5e7306ca Update Japanese translation 2019-02-13 14:11:46 +00:00
Marco Ciampa
4cf6d12912 Updated Italian translation 2019-02-13 11:29:44 +01:00
Michael Natterer
64d0e29e42 plug-ins: remove stuff that is no longer needed from file-pat
(cherry picked from commit 52b1348f3d)
2019-02-12 21:39:23 +01:00
Michael Natterer
7ce90a19b4 app, plug-ins: move pattern saving to the core
but only the actual saving code, not the export magic and dialog.

Add new internal procedure file-pat-save-internal which is not
registered as a file procedure and always works non-interactively on
the passed arguments and only saves the passed drawable. Use the new
internal procedure from the file-pat-save code and remove all file
writing code from the plug-in.

This way all pattern file writing code duplication is killed, while
the whole export mechanism is completely unchanged.

(cherry picked from commit b29ecfb5da)
2019-02-12 21:34:17 +01:00
Michael Natterer
376b053129 app: don't unref a NULL GimpTempBuf in gimp_pattern_copy()
(cherry picked from commit a95c169091)
2019-02-12 21:17:04 +01:00
Ell
4c6b181371 app: link tests against libappfile-data
(cherry picked from commit 68b22d45ed)
2019-02-12 13:54:28 -05:00
Michael Natterer
cf76b7f73c app: implement brush saving in the core
and enable duplicating the clipboard brush, like for patterns.

(cherry picked from commit 1e6b26e83a)
2019-02-12 18:54:16 +01:00
Michael Natterer
3dc01393eb app: remove useless includes from gimppattern-save.c
(cherry picked from commit 831d04ec7e)
2019-02-12 18:47:06 +01:00
Ell
88787d905b m4macros: remove binreloc.m4 from EXTRA_DIST
... it was removed by commit
4d84c1d7ee.

(cherry picked from commit 74a151a124)
2019-02-12 10:10:33 -05:00
Ell
ecc456556e app: in gimppaintcore-loops, fix indentation in DispatchPaintMaskToCompMask
(cherry picked from commit 4ecbf33e18)
2019-02-12 09:37:09 -05:00
Ryuta Fujii
62db4174dc Update Japanese translation 2019-02-12 14:30:29 +00:00
Ell
0066a47013 app: in gimp_paint_core_replace(), improve applicator path
In the applicator path of gimp_paint_core_replace(), actually use
the paint-core's applicator, instead of using
gimp_drawable_replace_buffer().  This improves speed, consolidates
code, and fixes some cases in which the latter is broken.

Furthermore, when using CONSTANT paint application-mode, use the
paint-core's undo_buffer as the compositing source, rather than the
drawable buffer, which is the correct behavior.

(cherry picked from commit 3451ffb62c)
2019-02-12 09:27:28 -05:00
Ell
940197e2d7 app: in gimp_paint_core_paste(), don't copy paint mask when combining to canvas buffer
In the applicator path of gimp_paint_core_paste(), use the paint
mask directly when combining it to the canvas buffer, rather than
using a copy of it, since it's not being modified.

Fix some comments.

(cherry picked from commit ba6713bbe1)
2019-02-12 09:27:28 -05:00
Ell
1c2fe3b51c app: implement gimp_paint_core_replace() using gimp_paint_core_loops_process()
Implement the no-applicator path of gimp_paint_core_replace() in
terms of gimp_paint_core_loops_process(), using the algorithms
added in the previous commit, instead of using
gimp_drawable_replace_buffer().  This improves speed, consolidates
code, and fixes some cases in which the latter is broken.

Furthermore, when using CONSTANT paint application-mode, use the
paint-core's undo_buffer as the compositing source, rather than the
drawable buffer, which is the correct behavior.

(cherry picked from commit ddb69b77a7)
2019-02-12 09:27:25 -05:00
Ell
f5222ce4d0 app: in gimppaintcore-loops, add {CANVAS_BUFFER,PAINT_MASK}_TO_COMP_MASK algorithms
In gimppaintcore-loops, add CANVAS_BUFFER_TO_COMP_MASK and
PAINT_MASK_TO_COMP_MASK paint algorithms, which copy the canvas
buffer and the paint mask, respectively, to the compositing mask.
When there is an image mask buffer, the algorithms additionally
combine the copied mask with the mask buffer.  When possible, the
algorithms use the canvas buffer/paint mask data directly as the
compositing mask data, instead of copying.

These algorithms are necessary in order to implement
gimp_paint_core_replace() in terms of
gimp_paint_core_loops_process(), which is done by the next commit.

(cherry picked from commit 183a55613e)
2019-02-12 09:26:23 -05:00
Ell
d4cb2d57bd app: in gimppaintcore-loops, make sure dest_buffer is the primary iterator buffer
In gimppaintcore-loops, in the DO_LAYER_BLEND paint algorithm, and
in the CanvasBufferIterator algorithm helper-class, initialize the
iterator *before* initializing the base class, to make sure that
dest_buffer, or canvas_buffer, respectively and in that order, is
the primary buffer of the iterator.  In particular, this avoids the
mask buffer being the primary buffer.  This is desirable, since
most of the buffers we iterate over are tile-aligned to the dest/
canvas buffers.

(cherry picked from commit f9c072c328)
2019-02-12 09:26:22 -05:00
Ell
aa7de29f9e app: in gimppaintcore-loops, add MaskBufferIterator algorithm helper-class
In gimppaintcore-loops, add a MaskBufferIterator algorithm helper-
class, which provides read-only iterator access to the mask buffer,
if one is used.

Use the new class in DoLayerBlend, instead of manually managing the
mask-buffer iterator.

(cherry picked from commit 44281ce2c4)
2019-02-12 09:26:22 -05:00
Ell
5a4ffd4495 app: in gimppaintcore-loops, add [Temp]CompMask algorithm helper-classes
In gimppaintcore-loops, add a CompMask algorithm helper-class,
which provides access to the mask buffer used for compositing, to
be used by the DO_LAYER_BLEND algorithm instead of the image mask
buffer.

CompMask itself doesn't provide the storage for the mask; this is
rather the responsibility of the algorithms that use it.  The
TempCompMask algorithm helper-class provides temporary storage for
the compositing mask, and can be used by algorithms that need a
temporary mask.

(cherry picked from commit e36847febb)
2019-02-12 09:26:21 -05:00
Ell
1a06fa0c0a app: in gimppaintcore-loops, name algorithms more consistently
In gimppaintcore-loops, make the algorithm names, and the names of
the corresponding functions, more consistent.

(cherry picked from commit d23e239fed)
2019-02-12 09:26:19 -05:00
Ell
470f760eee app: in gimppaintcore-loops, allow specifying dependencies to BasicDispatch
... which are dispatched before the algorithm, as in
AlgorithmDispatch.

(cherry picked from commit 2788444df4)
2019-02-12 09:24:58 -05:00
Ell
197ec919cd app: in gimppaintcore-loops, add finalize[_step]() algorithm functions
In gimppaintcore-loops, add finalize() and finalize_step()
algorithm functions, which get called at the end of processing the
entire area, and at the end of processing each chunk, respectively.
Algorithms can use these functions to clean up allocated resources.

(cherry picked from commit 4d2ce15400)
2019-02-12 09:24:58 -05:00
Ell
deda2699b9 app: in gimppaintcore-loops, make CanvasBufferIterator self-contained
In gimppaintcore-loops, make the CanvasBufferIterator algorithm
helper-class self-contained, not having to rely on AlgorithmBase.

(cherry picked from commit 0d1f724112)
2019-02-12 09:24:57 -05:00
Ell
9a13c66d96 app: in gimppaintcore-loops, use dynamic iterator indices
In the various gimppaintcore-loops algorithms, assign each
algorithm's iterator indices dynamically, rather than statically,
so that algorithms have more freedom in the way they initialize the
iterator.

(cherry picked from commit 9d1d21e716)
2019-02-12 09:24:56 -05:00
Marco Ciampa
162250c3fb Typo in Italian translation 2019-02-12 14:25:25 +01:00
Michael Natterer
5dc78980f4 app: implement pattern saving in the core
Add GimpData::save() implementation to GimpPattern, and change some
glue code to make patterns editable.

Also implement GimpData::duplicate() in GimpPatternClipboard, which
makes it possible to simply copy an area and duplicate the clipboard
pattern to create a new persistent pattern.

(cherry picked from commit e93fd73fac)
2019-02-11 21:02:36 +01:00
Marco Ciampa
1595f9f4e3 Updated Italian translation 2019-02-11 20:59:57 +01:00
Michael Natterer
4f00422bd4 app: add an "Open as Image" button to the brushes dialog
It was probably forgotten to add in the first place (the patterns
dialog also has one).

(cherry picked from commit fc609d12dd)
2019-02-11 20:53:57 +01:00
Piotr Drąg
2c53aa2067 Update Polish translation 2019-02-11 20:27:34 +01:00
Michael Natterer
b3797079bc app: move file-pat-load from the file-pat plug-in to the core
(cherry picked from commit 410ffc435e)
2019-02-11 18:39:04 +01:00
Michael Natterer
616f5aac11 app, plug-ins: start consolidating brush and pattern loading/saving code
We currently have brush and pattern I/O code in both the core and
plug-ins. This commit starts removing plug-in code in favor of having
one copy of the code in the core, much like XCF loading and saving is
implemented.

Add app/file-data/ module with file procedure registering code, for
now just with an implementation of file-gbr-load.

Remove the file-gbr-load code from the file-gbr plug-in.

(cherry picked from commit a4e77e57f6)
2019-02-11 12:56:56 +01:00
Michael Natterer
270bd71658 app: add all missing festures from file-gbr-load to the core brush loader
gimp_brush_load_brush(): support legacy gpb brushes, and port a check
for gsize overflow what was added to the plug-in.

(cherry picked from commit 619f999280)
2019-02-11 12:36:02 +01:00
Rodrigo Lledó
c05a700ccc Update Spanish translation 2019-02-11 07:53:20 +00:00
Rodrigo Lledó
c000c7a8a2 Update Spanish translation 2019-02-11 07:51:36 +00:00
Rodrigo Lledó
dfe1dbe0ad Update Spanish translation 2019-02-11 07:49:19 +00:00
Ell
4a7988b9fa Issue #2935 - GIMP 2.10 - options hidden in filter dialogs
gtk2 doesn't propagate the child requisition to the scrolled-window
requisition, so we have to do it manually.
2019-02-10 17:53:16 -05:00
Balázs Úr
c1e84c494d Update Hungarian translation 2019-02-10 17:37:22 +00:00
Ryuta Fujii
2465aecb4f Update Japanese translation 2019-02-10 15:46:38 +00:00
Ryuta Fujii
b7c1664273 Update Japanese translation 2019-02-09 13:02:04 +00:00
Marco Ciampa
d501a28807 Updated Italian translation 2019-02-09 01:18:28 +01:00
Piotr Drąg
d115e1d777 Update Polish translation 2019-02-08 20:36:16 +01:00
Ell
0f727e4f2f libgimpwidgets: in GimpChainButton, emit "toggled" signal when "active" changes
In GimpChainButton, emit the "toggled" signal whenever the chain
button's "active" property changes, either due to user interaction,
or programatically.  Previously, it would only get emitted when the
button was actually clicked.

In particular, this fixes an issue where the aspect ratio of a
coordinates size-entry won't get updated when its chain button got
toggled programatically, as can happen with the scale tool.

(cherry picked from commit c0c055b4e9)
2019-02-08 08:22:45 -05:00
Jehan
d815f355bb Issue #2922: Some sentences appear untranslated.
Again some missing context when requesting the strings (while they were
declared with context in static NC_()).
Also some mixup with some zoom actions strings declared with different
context in the same GimpEnumActionEntry.

(cherry picked from commit 6c5b6c6135)
2019-02-08 13:33:47 +01:00
Jehan
95be8d0769 po: fix msgctxt s/view-action/view-zoom-action/ for 5 strings.
Similar to master commit cb025cec64,
except that I just redid the search-replace as there were annoying
conflict merge (was easier to just redo massive search-replace).
2019-02-08 13:30:39 +01:00
Jehan
7067c3add3 Issue #2922: Some sentences appear untranslated.
(cherry picked from commit 60c334a779)
2019-02-08 11:44:51 +01:00
Balázs Meskó
7909409a03 Update Hungarian translation 2019-02-07 23:33:44 +00:00
Jehan
66803bc2b3 po: fix the context (msgctx) for 2 strings.
See commit f8f3a74971.
The context change was basically a bug fix, and nothing changed in the
original string, nor its actual GUI context/usage. Therefore there is no
need to invalidate the translations (mark it "fuzzy", which would be
what would happen automatically after this change) for the 43 languages
which already translated these. Let's just search-and-replace all the po
files with the correct context.

For the record, I got the green light from several translators on
gnome-i18n ML so let's fix. :-)

(cherry picked from commit 7a5e5be35e)
2019-02-07 18:42:53 +01:00
Jehan
5796cc46e4 app: improve line art bucket fill by filling unsignificant areas.
The line art imaginary segments/splines are not added when they create
too small zones, unless when these are just too small ("unsignificant").
Why the original algorithm keeps such micro-zones is because there may
be such zones created when several splines or segments are leaving from
a same key point (and we don't necessarily won't to forbid this). Also
we had cases when using very spiky brushes (for the line art) would
create many zones, and such micro-zones would appear just too often
(whereas with very smooth lines, they are much rarer, if not totally
absent most of the time).
Also it is to be noted that the original paper would call these
"unsignificant" indeed, but these are definitely significant for the
artists. Therefore having to "fix" the filling afterwards (with a brush
for instance) kind of defeat the whole purpose of this tool.

I already had code which would special-case (fill) 1-pixel zones in the
end, but bigger micro zones could appear (up to 4 pixels in the current
code, but this could change). Also I don't want to use the "Remove
Holes" (gimp:flood) operation as I want to make sure I remove only
micro-holes created by the line art closure code (not micro-holes from
original line arts in particular).

This code takes care of this issue by filling the micro-holes with
imaginary line art pixels, which may later be potentially bucket filled
when water-filling the line art.

(cherry picked from commit 72092fbdbc)
2019-02-07 18:42:46 +01:00
Jehan
1825392dbe Issue #2920: Dilate and Erode filters' tooltips are untranslatable.
Wrong message contexts!

(cherry picked from commit f8f3a74971)
2019-02-07 18:33:01 +01:00
Ell
f5e652d762 app, pdb: use compat formats for brushes/patterns in plug-ins
Plug-ins are not prepared to handle high-precision brushes/
patterns, even when they're otherwise aware of high-precision
drawables, so make sure to always use compat formats when
communicating brush/pattern data to plug-ins.

Allowing plug-ins to handle high-precision brush/pattern data would
require some additional API.

(cherry picked from commit 82c449496e)
2019-02-07 09:19:27 -05:00
sabri ünal
57b81c424b 2 sentences are marked as translatable.
These sentences are in use on "Preferences - Interface - Help System" page.

(cherry picked from commit 1853770660)
2019-02-07 14:56:54 +01:00
Jehan
29706cdc48 libgimpbase: style cleanup of gimpreloc.c
No code change, only indentation fixed and opening braces on newline, as
per our style guidelines.

(cherry picked from commit 757b8bba7d)
2019-02-07 14:56:26 +01:00
Jehan
6645cc7ba5 app, libgimpbase: --enable-relocatable-bundle replaces --enable-binreloc
Older --enable-binreloc configure option had basically the same purpose
as the newer --enable-relocatable-bundle, though the old binreloc was
only used for gimpenv.c code.
As a consequence, commit 10ce702188 was still not working fine since
gimp_installation_directory_file() also need binreloc enabled (to be
actually relocatable).

Let's get rid of this whole mess, by implying we want binreloc code to
be used when --enable-relocatable-bundle is ON. We don't need the
m4macros anymore, since AM_BINRELOC was basically just checking that
`/proc/self/maps` was present. But anyway being present at compile time
does not mean it will be at runtime (nor the opposite). So this test is
not that useful. The binreloc code will anyway fallback gracefully to
the non-binreloc code (i.e. trying to use build-time install paths) if
the procfs is lacking at runtime.

(cherry picked from commit 4d84c1d7ee)
2019-02-07 14:56:26 +01:00
Ell
a335eb0e6e app: avoid unnecessary calls to gimp_temp_buf_data_clear()
Avoid unnecessary calls to gimp_temp_buf_data_clear() in various
places, where either the entire buffer is being written to, or most
of it is, only requiring clearing the edges.

(cherry picked from commit 9d19e804ed)
2019-02-06 16:51:07 -05:00
Ell
1e0530e730 app: small fix in gimpbrushcore-kernels.h
(cherry picked from commit cbe40000f5)
2019-02-06 16:51:06 -05:00
Ell
d39634a914 Issue #2372 - Reduced quality of the Parametric brush in 2.10
Promote the precision of generated brushes to 32-bit float, and
modify brush preview generation, and gimpbrushcore-loops, to handle
float brushes.  This avoids posterization in large brushes.

Note that non-generated brushes are still uint8.

(cherry picked from commit 8ef1113dee)
2019-02-06 14:30:56 -05:00
Ell
8f31f8fa3c app: add gimp_temp_buf_{lock,unlock}()
In GimpTempBuf, add gimp_temp_buf_lock() and gimp_temp_buf_unlock()
functions, which lock/unlock the buffer for data access.  Unlike
gimp_temp_buf_get_data(), which returns a direct pointer to the
buffer's data, the new functions take a format parameter and may
return a temporary buffer, allowing the buffer to be accessed using
an arbitrary format.

(cherry picked from commit 12dde445c4)
2019-02-06 14:30:55 -05:00
Ryuta Fujii
d4e87e4d51 Update Japanese translation 2019-02-06 13:36:59 +00:00
Ryuta Fujii
99c59d92f3 Update Japanese translation 2019-02-06 13:07:58 +00:00
Ell
c9f4735669 libgimp: avoid libgimp tile-cache in the plug-in tile backend
In GimpTileBackendPlugin, avoid storing read/written tiles in the
libgimp tile-cache, since caching is already done by GEGL.

(cherry picked from commit 47dcd4b93a)
2019-02-05 17:26:23 -05:00
Rodrigo Lledó
17f355e9f3 Update Spanish translation 2019-02-05 14:22:37 +00:00
Rodrigo Lledó
f936089bcb Update Spanish translation 2019-02-05 14:21:34 +00:00
Ell
8878ff5f04 app: in GimpRotateTool, improve fuzzy comparisons
(cherry picked from commit b002f20412)
2019-02-05 04:39:11 -05:00
Ell
a771662420 libgimpwidgets: add gimp_chain_button_{get,size}_icon_size() to gimpwidgets.def
(cherry picked from commit 0714510802)
2019-02-05 03:49:51 -05:00
Ell
b5caa2ea2e po-python: add spyro_plus.py copy to POTFILES.skip
(cherry picked from commit 1b2ec2961c)
2019-02-05 02:50:30 -05:00
Balázs Meskó
d368fabf8e Update Hungarian translation 2019-02-04 22:55:15 +00:00
Ell
da6086636b app: in GimpTransformGridTool, allow linking forward/backward transforms
Add a GimpTransformGridTool::matrix_to_info() virtual function,
which should extract the tool-specific transformation parameters
given a transformation matrix, and the old parameter set (which is
needed in some tools, to derive the parameters that aren't encoded
in the matrix, such as the pivot point).  The transformation matrix
can be any combination of matrices calculated by the tool, and
their inverses.  Subclasses should only implement this function if
every such matrix can be mapped back to transformation parameters.
This is currently the case for all the transform-grid tools, except
for the shear tool (since it only supports shearing along one of
the horizontal or the vertical directions, however, the combined
matrix may require shearing in both directions).

When a transform-grid tool implements this function, show a chain-
button between the two transform-direction radio-buttons in the
tool options.  When the chain-button is linked, whenever the
transform corresponding to the active direction is modified, adjust
the transform corresponding to the non-active direction such that
the overall transform remains the same.

One notable workflow that this enables is transforming a layer
while adjusting a different area than its boundary, by first
defining the area while the transform-directions are linked, and
then transforming the area while the transform-directions are
unlinked.

(cherry picked from commit 39e23267f7)
2019-02-04 16:50:41 -05:00
Ell
ca06990828 app: in GimpTransformGridTool, allow simultaneous forward and backward transforms
In GimpTransformGridTool, allow performing simultaneous forward
(normal) and backward (corrective) transforms, by having each
transform direction operate on an independent set of parameters.
In other words, whereas the transform-grid tools previously had a
single transform, which could be applied either normally or
correctively using the "direction" tool-option, they now have two
independent transforms, one applied normally and the other
applied correctively, which are toggled using the "direction"
option.  The overall transform is the combination of the backward
transform, followed by the forward transform.

Another way to think about it, is that the tool transforms a source
shape into a destination shape.  The source shape is defined by the
backward transform, and the destination shape is defined by the
forward transform.  Wherewas previously only one of these shapes
could be controlled (the other shape always being the item bounds),
it's now possible to control both shapes in a single transform.
The next commit will allow modifying both shapes simultaneously,
making this even more useful.

Note that since both transforms start off as the identity, using
only one of the transform directions has the same behavior as
before.

(cherry picked from commit de8e81f81f)
2019-02-04 16:50:41 -05:00
Ell
b869f1bf5a libgimpwidgets: add GimpChainButton::active property
... which corresponds to the button's toggle state.

(cherry picked from commit 9c3f150e25)
2019-02-04 16:50:41 -05:00
Ell
fcfe6997cd libgimpwidgets: add GimpChainButton::icon-size property
... and corresponding gimp_chain_button_{get,size}_icon_size()
functions, which control the chain-button's icon size.

(cherry picked from commit 8d6c7e42bf)
2019-02-04 16:50:36 -05:00
Ell
3ad945c3c8 app: add GimpTransformToolClass::undo_desc field
Add an undo_desc field to GimpTransformToolClass, which subclasses
should set to the tool's default undo description.  Provide a
default implementation for the get_undo_desc() vfunc, which returns
(a copy of) undo_desc.  This simplifies transform tools that have a
static undo descrption, as well as provides a fallback when a
detailed undo description can't be generated (not currently
relevant, but will be used in the next commit).

(cherry picked from commit d549440650)
2019-02-04 16:48:57 -05:00
Ell
b0ab2b6564 app: improve rotate-tool undo description
When rotating an item around its center using the rotate tool,
i.e., if the pivot point hasn't been moved, don't include the pivot
coordinates in the undo description.

(cherry picked from commit 44c8a1f274)
2019-02-04 16:48:56 -05:00
Ell
054d441a8d app: improve measure-tool undo description
When straightening an item using the measure-tool, include the
orientation and angle in the undo description.

(cherry picked from commit b95bf3fb93)
2019-02-04 16:48:56 -05:00
Ell
b820d50827 app: add GimpToolCompass::effective-orientation property
In GimpToolCompass, add a read-only "effective-orientation"
property, which returns the actual orientation of the compass; in
particular, if the "orientation" property is set to AUTO,
"effective-orientation" returns HORIZONTAL or VERTICAL, depending
on the current compass direction.  In 3-point mode, the property
always returns AUTO.

(cherry picked from commit 40c0913178)
2019-02-04 16:48:55 -05:00
Ell
6495b6d023 app: fix CRITICALs in GimpMeasureTool
In GimpMeasureTool, don't try to access the "straighten" button
when halting the tool if it's NULL, which can happen when the
measure tool is selected upon startup, but is changed before its
tool-options GUI is constructed.

(cherry picked from commit 7fc5698f32)
2019-02-04 16:48:55 -05:00
Ell
d6bb1efd77 app: in gimp_transform_matrix_generic(), apply matrix even if invalid
In gimp_transform_matrix_generic(), apply the resulting matrix even
if the transformation is invalid, since GimpGenericTransformTool
relies on the matrix to properly update the transform-grid widget.

(cherry picked from commit 59ef222c7f)
2019-02-04 16:48:54 -05:00
Ell
d74df14766 app: in GimpTransformGridTool, fix layer hiding
In GimpTransformGridTool, when the "show-preview" tool-option
changes, don't take the transform validity into account when
deciding whether to hide the current layer -- it should only affect
the visibility of the preview, not the layer.

(cherry picked from commit 7ed512040e)
2019-02-04 16:48:54 -05:00
Ell
08c540ebc1 app: in GimpTransformGridTool, remove flip-tool hack
The flip tool is not a subclass of GimpTransformGridTool; this is
a leftover from GimpTransformTool.

(cherry picked from commit 3ebda874b5)
2019-02-04 16:48:53 -05:00
Jehan
32c185c7ee Issue #2906: Icon Theme bar strings have no translations. 2019-02-04 22:19:58 +01:00
Rodrigo Lledó
dc431bbcc1 Update Spanish translation 2019-02-04 10:42:45 +00:00
Michael Natterer
79454e2bf3 app: in the prefs dialog, warn that OpenCL support is experimental
(cherry picked from commit 7998a27b8b)
2019-02-04 10:40:22 +01:00
Michael Natterer
6be6ea0e92 Issue #2898 - Gegl Operations - Color Wrap does not fit the screen on...
...1920*1980 resolution

In GimpOperationTool, make the generated GUI scrollable if it is
higher than half the monitor's workarea. This is meant as a last
resort for generated GUIs that do not have a custom constructor that
makes them usable using better layouts.

(cherry picked from commit b85d7c2334)
2019-02-03 18:15:48 +01:00
Michael Natterer
b9a0bd4d62 libgimpbase: add gimp_installation_directory_file() to gimpbase.def
(cherry picked from commit c71a887b08)
2019-02-03 14:56:15 +01:00
Jehan
53de34230f libgimpbase: add gimp_installation_directory_file().
Fix previous commit.
Ahahah! Mitch, you didn't test your code before pushing! Bad boy! :P

(cherry picked from commit db00616888)

(Bad Jehan didn't pick this to 2.10)
2019-02-03 14:54:53 +01:00
Michael Natterer
a8f58acb9a Issue #2867 - iso-codes location is not relocatable on all platforms
gimplanguagestore-parser.c (parse_iso_codes): instead of
special-casing Windows and OS X, use ENABLE_RELOCATABLE_RESOURCES and
find the package relative to ${gimp_installation_directory}, so
relocating it works on all platforms (also flatpack, snap, whatever),
given the --enable-relocatable-bundle configure switch is used.

(cherry picked from commit 10ce702188)
2019-02-02 17:11:03 +01:00
Piotr Drąg
48dba7a0e1 Update Polish translation 2019-02-02 14:44:24 +01:00
Elad Shahar
eeeab8b209 Add i18n support for python spyrogimp plugin
(cherry picked from commit f6e4145756)
2019-02-01 07:41:23 -05:00
Ell
d2bc3eeb5d plug-ins: in pygimp/plug-ins/Makefile.am, simplify plug-in copy recipe
(cherry picked from commit 12dbd4aee2)
2019-02-01 07:41:22 -05:00
Ell
5f398c0888 plug-ins: in pygimp/plug-ins/Makefile.am, re-copy plug-ins upon change
In pygimp/plug-ins/Makefile.am, fix the rule for the generated
plug-in files, so that they're re-copied to the build dir upon
changes to the source plug-in files.

(cherry picked from commit 95044d86b3)
2019-02-01 07:12:38 -05:00
Ell
301691b3ed plug-ins: in pygimp/plug-ins/Makesfile.am, use tab-width of 8
... like the rest of our makefiles.

(cherry picked from commit bcd9f55526)
2019-02-01 07:12:38 -05:00
Ryuta Fujii
377cae8ecc Update Japanese translation 2019-01-31 16:09:03 +00:00
Ell
297971e447 app: fix CRITICAL when initializing the perspective-clone tool
When initializaing the perspective-clone tool in paint mode, the
GimpDrawTool may already be active, causing the call to
gimp_draw_tool_start() to fail with a CRITICAL.  Stop the draw tool
first, if active, to avoid that.

(cherry picked from commit 07d2d5af5a)
2019-01-31 09:13:04 -05:00
Ell
5e6378a7a3 app: in perspective-clone tool, fix cursor presicion; hide brush while adjusting
In GimpPerspectiveCloneTool, use PIXEL_CENTER cursor precision
while setting the source, and place the source-position handle at
the center of the selected pixel, rather than at its top-left
corner.

Additionally, disable the paint tool while adjusting the
perspective, so that the brush outline isn't shown, and the cursor
precision remains SUBPIXEL, even if the hard-edge option is
toggled.

(cherry picked from commit e5c9314a88)
2019-01-31 06:22:52 -05:00
Ell
5c3532609f app: add gimp_paint_tool_set_active()
... which can use to enable/disable certain aspects of
GimpPaintTool (in particular, brush-outline drawing).  Should be
used by subclasses, to temporarily disable the paint tool while in
a non-paint mode (currently, this is only needed by the
perspective-clone tool; see next commit.)

(cherry picked from commit 05dd5029ee)
2019-01-31 06:22:51 -05:00
Ell
028b0f39dd app: fix cursor precision of source tools
In GimpCloneTool, set the cursor precision to PIXEL_CENTER while
setting a source, and have GimpBrushTool snap the brush outline to
pixel centers.

(cherry picked from commit ef2818231f)
2019-01-31 06:22:50 -05:00
Ell
b1c977e510 app: fix cursor precision of various tools
Fix the cursor precision of the cage-transform, foreground-select,
n-point deformation, and warp-transform tools.

(cherry picked from commit 158705e4ef)
2019-01-31 04:39:40 -05:00
Michael Natterer
b81723042e plug-ins: add .gitignore file to file-dds
(cherry picked from commit 0fa98d4849)
2019-01-30 18:49:36 +01:00
Ryuta Fujii
6f8c8ce56d Update Japanese translation 2019-01-30 14:28:48 +00:00
Rodrigo Lledó
61d2e8ad74 Update Spanish translation 2019-01-30 07:44:44 +00:00
Ryuta Fujii
94d176d7f5 Update Japanese translation 2019-01-28 17:27:09 +00:00
Alan Mortensen
90d76267a7 Updated Danish translation of gimp-plug-ins 2019-01-28 13:12:49 +01:00
Ryuta Fujii
0d950bd289 Update Japanese translation 2019-01-27 15:24:58 +00:00
Michael Natterer
17e360e34b Issue #2863 - Improve error reporting for scripts
gimp_plug_in_handle_proc_install(): print the procedure name when
bailing out of a wrong proc install call. For an obsolete full-path
menu label, also print the label. Original patch by Liam Quin.

(cherry picked from commit 07e3c1c15b)

In libgimp, add a note to gimp_install_procedure() stating that
passing a full menu path as "menu_label" is deprecated.
2019-01-27 13:42:36 +01:00
Balázs Meskó
316c47da6f Update Hungarian translation 2019-01-26 21:37:53 +00:00
Balázs Meskó
b70a37a33d Update Hungarian translation 2019-01-26 21:32:21 +00:00
Ell
d11d094d02 Issue #1119 - Unable to give a layer group as a parameter to a python script
Pickle gimp.GroupLayer the same way we pickle gimp.Layer, so that
layer-group parameters can be properly saved.

All credit goes to Ofnuts :)

(cherry picked from commit b295a33aaf)
2019-01-26 16:02:26 -05:00
Ryuta Fujii
25d39eea9d Update Japanese translation 2019-01-26 16:17:08 +00:00
Jehan
69712634a1 plug-ins: optionally define several float.h macros for MinGW64.
This plug-in failed to cross-build because these macros were not defined
in the `float.h` of my MinGW64 environment (and they are used in some
ilmbase headers). Just define them ourselves if they are absent. I do
this only on MinGW environment because these should really be defined on
Linux (and other UNIX-like, I guess?) and if they are not, we may have a
bigger issue.

(cherry picked from commit 7a7ecda4f1)
2019-01-26 16:46:03 +01:00
Piotr Drąg
dc01a613ff Update Polish translation 2019-01-26 11:24:51 +01:00
Jehan
d79916f598 NEWS: keep up-to-date. 2019-01-25 21:45:17 +01:00
Salamandar
aaf5816695 Undo some (unnecessary) changes.
(cherry picked from commit fc657184a0)
2019-01-25 21:10:45 +01:00
Félix Piédallu
0436dd1cb7 (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)

(cherry picked from commit fc8303dd0a)
2019-01-25 21:10:41 +01:00
Jehan
ffe2fb478c app: new gimp_spin_scale_set_constrain_drag() and use it on paint...
... tools' brush options.
After discussions, it turned out that many people disliked that the spin
scale for brush size (and some other options) get you fractional values.
How often do you actually need to get a 4.32 pixel-size brush? And even
how meaningful is it? On the other hand, you usually want a 4 or a 5
pixel size brush and it's nearly impossible to get (exactly) by dragging
the scale widget.
It is so annoying that some even resort to edit the value with keyboard!
So I am adding an optional "constrain" feature to GimpSpinScale. It will
still be possible to get fractional values when constraining is on, for
instance with keyboard edit (the arrow incrementation also will keep any
fractional part). So the interaction for such scales is simply reversed
so that you get integers easily, and fractional parts with a bit more
effort.

It is not turned on by default (some feature actually need precision and
we don't want to break the sliders for these) and for the time being, I
only applied it to all the brush settings in paint tools. Now that it
exist, we may want to apply this to more scales in various parts of
GIMP.

(cherry picked from commit bff3903f37)
2019-01-25 18:34:09 +01:00
Jehan
699933470a libgimpbase: display thread id of the calling thread as hexadecimal...
... on macOS.
The debugger running on macOS is usually lldb and (from the reports we
get) it looks like lldb displays the tid as hexadecimal on macOS
(whereas lldb displays decimal tid on Linux! I know, it's confusing, yet
consistent with crash report experience!). So let's just do the same,
making it easy to quickly copy-search in order to look up the crashing
thread (without having to convert from decimal to hexa).
This is a bit of an approximation as I imagine we could have gdb on
macOS or whatever edge case. Let's say it's good for the common case and
still not an error otherwise (just a base conversion away).

(cherry picked from commit 8e0135362e)
2019-01-25 12:54:37 +01:00
Tim Sabsch
5a0e4554be Update German translation 2019-01-25 10:26:01 +00:00
Ell
71fe5c00fd plug-ins: avoid running pygimp plug-ins derived from gimpplugin.plugin at each startup
When initializing a pygimp plug-in derived from gimpplugin.plugin,
only pass the plug-in's init() and quit() functions to gimp.main()
if the plug-in actually implements them, instead of passing the
default NOP versions.  This avoids plug-ins that don't implement
init() from being registered as having an init function, causing
them to be run at each startup.

(cherry picked from commit 9851bc8962)
2019-01-25 04:34:27 -05:00
sabri ünal
9c6c064356 Typo
(cherry picked from commit 43fb9242ca)
2019-01-24 23:33:34 +01:00
Anders Jonsson
7a0a3f47c7 Update Swedish translation 2019-01-24 21:48:38 +00:00
Jehan
ada21f2594 Issue #2848: some sentences have no translation.
(cherry picked from commit f508e24f0c)
2019-01-24 16:20:11 +01:00
Ell
8361377b43 app: in gimp:gradient, improve adaptive supersampling
In gimp:gradient, when using adaptive supersampling, render the
gradient tile-by-tile, using an iterator, instead of row-by-row.
This significantly improves performance, while also avoiding the
assumption that gimp_adaptive_supersample_area() works row-by-row.

Additionally, when not using supersampling, use a single GRand
instance, since the separation to distinct seed and per-tile
instances, which was a threading optimization (commit
7f39e41254), is no longer needed.

(cherry picked from commit 2cd7938f02)
2019-01-24 04:15:27 -05:00
Ell
14030fc930 libgimpcolor: in gimp_adaptive_supersample_area(), use scratch allocator
In gimp_adaptive_supersample_area(), use the scratch allocator for
temporary buffers, instead of the regular allocator.

(cherry picked from commit 33d5eb2090)
2019-01-24 04:15:26 -05:00
Jehan
676936f9a7 NEWS: update. 2019-01-24 01:36:27 +01:00
Jehan
ead5e8e84b desktop: add rewrite of the Spyrogimp in appdata <release> tag.
It is well worth listing there!

(cherry picked from commit c3061c13d4)
2019-01-24 01:36:21 +01:00
Jehan
8729f9a662 plug-ins: clean the new Spyrogimp, rename it and remove old version...
... from menus.
The script-fu version is still available through pdb (for scripts) and
even in the action search. But in menus, only the new Python version
will be shown. Also update the description and name of the old version
to make clear it is deprecated in favor of the new plug-in.
Finally rename the new version to simply "plug-in-spyrogimp" (dropping
the "-plus" part as we should consider it as a replacement rather than
as another plug-in, which the "plus" would imply). Anyway the old one
was called "script-fu-spyrogimp", so there is no name clash.

While at it, do some trailing whitespace cleaning in the new plug-in.
2019-01-24 01:05:02 +01:00
Elad Shahar
529583430d plug-ins: Spyrogimp plugin rewrite.
Comment by reviewer (Jehan):

This was submitted through gimp-developer mailing list, by the same
author as the original Spyrogimp in script-fu, but this time in Python.

It does more than the original plug-in, with some automatic preview (by
drawing directly on a temporary layer, not as a GEGL preview), and using
the current tool options (current brush, etc.). The new API is similar
yet different. The much evolved possibilities makes that I don't think
it is worth trying to map 1-1 the new API to the old one, so I just let
the old plug-in next to the new one, with a different name.

Note finally that the author also contributed a new Spyrograph operation
to GEGL, yet with the comment: "The GEGL spyrograph operation is very
basic, and untested from gimp. I intend to keep developing it, since I
thought that on-canvas interaction would be very user-friendly. However,
I am not sure I will be able to get it work in a way that makes the
on-canvas interaction interactive enough.

Even if I do, it will not do what the Python plugin can do. It will be
much more basic."

So let's just integrate this evolved version of Spyrogimp for now. :-)
See: https://mail.gnome.org/archives/gimp-developer-list/2018-September/msg00008.html
2019-01-24 00:31:15 +01:00
Jehan
18bcb41573 desktop: check that no remaining TODOs are in appdata file.
Before each release, we prepare now a <release> tag. Unfortunately some
details are not always well known for sure in advance, in particular the
date of release (plans are made to be broken!), and also the release
news URL (since the date is in the URL). So I usually leave them as TODO
and until now, I never forgot to update them just before release. But
there is always the risk of forgetting.
Now the test for the appdata files will also look for remaining "TODO"
in the file if and only if the micro version is even (which means it's a
release). So we won't ever forget to update the file as long as we run
`make check` on the last commit (which we always do obviously).

(cherry picked from commit c0fed5afd6)
2019-01-23 23:51:05 +01:00
Jehan
b0c0895b48 desktop: reenable validity tests for appdata file.
It got disabled in commit 0492157dd2 because of a bug in appstream-util,
which has been fixed for monthes now. Let's just reenable it and assume
anyone who wants to run a `make check` on GIMP uses a recent
distribution with up-to-date system tools.

(cherry picked from commit f83271a39b)
2019-01-23 23:06:01 +01:00
Jehan
ec09eaca8a desktop: add <url> tags to <release>.
Cf. recent update of the appstream spec.
See also: https://github.com/ximion/appstream/pull/160

(cherry picked from commit cfe1941ac7)
2019-01-23 22:42:05 +01:00
Harald H
a5147bd49f Added OARS
(cherry picked from commit 42dd3fd939)
2019-01-23 22:42:05 +01:00
Jehan
24598bb5b6 desktop: add missing filter in <release> notes.
Also remove '.' at end of some <li>. `appstream-util` does not like full
stops in item lists, when in `validate-strict` mode (we don't test in
this mode, but it is worth improving the warning list a bit).

(cherry picked from commit 7a7de5c61c)
2019-01-23 22:42:05 +01:00
Ell
1bc7d5d01f devel-docs: in performance-logs.md, fix markers-page section number
(cherry picked from commit 4fefa44574)
2019-01-23 16:36:08 -05:00
Ell
34c732df1d tools: in performance-log-viewer.py, add markers view
Add a "markers" page to the performance-log viewer, which lists
the event markers contained in the log, and allows navigating
between them.

Update docs accordingly.

(cherry picked from commit dafb63fd66)
2019-01-23 16:33:33 -05:00
Ell
dcc4816770 tools: in performance-log-viewer.py, some cleanup
(cherry picked from commit 5a6548a4b6)
2019-01-23 16:33:33 -05:00
Ell
2052de6c3d devel-docs: fix performance-log profile-view function-column description
(cherry picked from commit 17270bb3aa)
2019-01-23 16:33:32 -05:00
Jehan
e7ec1aa550 app: allow more motion events with line art bucket fill.
When a fill zone was a bit too segmented, you'd want to just stroke
across it. But it was leaving some pieces uncolored, even though the
pointer dragged through it! The exact motion mode allows more events.

Note: I don't set it in the similar color filling (where it could have
been useful too) mostly because it is harder to remove events then (even
if a point was already filled, it could still serve as a seed for more
filling if threshold > 0), thus implied too much processing. Anyway in
all my tests, it was more a problem for line art filling anyway.

(cherry picked from commit 9c13058d54)
2019-01-23 19:42:35 +01:00
Ryuta Fujii
d317fc6dbe Update Japanese translation 2019-01-23 17:04:23 +00:00
Anders Jonsson
0ca82d41f3 Update Swedish translation 2019-01-22 21:48:33 +00:00
Anders Jonsson
9ad93d170b Update Swedish translation 2019-01-22 21:42:29 +00:00
Alexandre Prokoudine
97b905dc0a Update NEWS 2019-01-22 19:34:33 +00:00
Alan Mortensen
2d2aef533a Updated Danish translation of gimp-script-fu 2019-01-22 16:26:32 +01:00
Alan Mortensen
e30011590e Updated Danish translation of gimp-plug-ins 2019-01-22 16:26:30 +01:00
Alan Mortensen
8b66cf0053 Updated Danish translation of gimp-libgimp 2019-01-22 16:26:28 +01:00
Ryuta Fujii
aad44f0abf Update Japanese translation 2019-01-22 12:47:38 +00:00
Ell
6a65e76267 app: fix rectangle-select tool rounded-corners option
In GimpToolRectangle, fix the type of the cornder_radius field, so
that non-integer radii are properly displayed.

In GimpRectangleSelectOptions and GimpToolRectangle, increase the
maximal corner radius.

(cherry picked from commit a472696012)
2019-01-21 11:39:28 -05:00
Alan Mortensen
dbe80835ae Updated Danish translation 2019-01-21 14:06:13 +01:00
Michael Natterer
9adf6c89ff Issue #1942 - Smudge Tool with Sample Merged Option
Add a Sample Merged option to smudge, a lot like for heal, just needed
tweaking in more places.

(cherry picked from commit 34cad3a06e)
2019-01-20 17:50:50 +01:00
Ell
bcc44a08b1 app: fix indentation in gimpmaskundo.h
(cherry picked from commit 4db566f0e1)
2019-01-20 10:33:56 -05:00
Ell
8324aeba82 app: align mask-undo buffer to tile grid
In GimpMaskUndo, align the copied region to the source buffer's
tile grid, so that all copied tiles are COWed.

(cherry picked from commit 7cd768f3d8)
2019-01-20 10:07:33 -05:00
Jehan
78e9f09357 NEWS: keep up to date. 2019-01-20 16:02:19 +01:00
Jehan
10aa988afa Issue #2828: Scrolling up with a mouse within a drop-down list.
We were doing it all the wrong way, fixing one combo box object at a
time. So this commit basically reverses commits 68a33ab5bd, 6dfca83c2a
and a9a979b2d0 and instead runs the same code in the class code. This
way, all objects based on these base classes will have the fix from
scratch.
These improved various other drop-down lists (I found some of them, and
probably not all) as I fixed all GIMP custom widgets based on
GtkComboBox.

Note that it has to be run after filling the list apparently (I had the
problem especially with GimpIntComboBox if running in the _init() code,
then the list widget showed wrong).

(cherry picked from commit 1d984542e9)
2019-01-20 13:48:33 +01:00
Jehan
cbf5e7af7a Issue #2828: Scrolling up with a mouse within a drop-down list.
Just another instance of the GtkCombo issue, same as #2642.

(cherry picked from commit 68a33ab5bd)
2019-01-20 11:58:54 +01:00
oschlueter
951a388cc3 fixed typo in deprecation warning in gimpdrawable.h 2019-01-19 21:26:53 +00:00
Michael Natterer
a94b1389ed Issue #266 - Healing Tool - Sample Merged option does not work
gimp_heal_motion(): when sample merged is active, simply initialize
the paint buffer from the projection instead of the drawable.

(cherry picked from commit e269a837cd)
2019-01-19 18:33:00 +01:00
Ryuta Fujii
a16a95f430 Update Japanese translation 2019-01-18 22:46:45 +00:00
Ell
4c22313ce6 app: improve gimp_channel_clear()
When clearing a channel, do nothing if the channel is already
empty; otherwise, align the cleared rectangle to the channel
buffer's tile grid, so that all affected tiles are dropped, rather
than zeroed.  Furthermore, only update the affected region of the
channel.

(cherry picked from commit ac5e4f4c33)
2019-01-17 15:15:59 -05:00
Ell
858dbf6e18 app: update drawable filter upon alpha-lock change
In GimpDrawableFilter, when operating on a layer, update the filter
when the layer's lock-alpha flag changes.

(cherry picked from commit de4e7b4770)
2019-01-17 14:21:03 -05:00
Jehan
8064a17e86 app: fix a crash in bucket fill tool.
In commit c71b4916af, I forgot to disconnect signals on the bucket fill
options at finalization, leading the software to crash on an
non-existing tool.

(cherry picked from commit 0a952a3429)
2019-01-17 15:37:24 +01:00
Jehan
7700cb3d81 app: improved fix to commit 036ccc70cf.
After discussion with Sébastien Fourey and David Tschumperlé, it was
decided that a better fix for the edge case raised in #2785 was to add a
keypoint anyway, even if the point and none of its neigbours have a
positive smoothed curvature, yet they have a positive raw curvature. In
such case, we use the local maximum raw curvature instead of the local
maximum smoothed curvature.

(cherry picked from commit aa04258620)
2019-01-17 15:37:24 +01:00
Jehan
b35941ec4c Issue #2785: Fill by line art detection produces Segmentation fault...
... with some images.

(cherry picked from commit 036ccc70cf)
2019-01-17 15:37:24 +01:00
Ell
61a6b15a66 app: parallelize gimp_pickable_contiguous_region_by_color()
... by distributing the processed area over multiple threads.

(cherry picked from commit 8571d7812f)
2019-01-17 09:30:51 -05:00
Ell
cfd1d0463f app: convert gimppickable-contiguous-region to C++
(cherry picked from commit 9719dff9c5)
2019-01-17 09:30:50 -05:00
Piotr Drąg
ad969f0285 Update Polish translation 2019-01-17 11:49:35 +01:00
sabri ünal
e67d6752e8 Odd ` characters corrected as '.
(cherry picked from commit 76302b6634)
2019-01-16 12:40:58 +01:00
Ell
940cf5f196 tools: in performance-log-viewer.py, allow inverting selection
In the perofmance-log viewer, add header-bar buttons to clear and
invert the selection, and allow inverting the selection by ctrl-
right-clicking on the sample-selection area.

Update the docs.

(cherry picked from commit b74c33db5c)
2019-01-16 03:58:49 -05:00
Ell
46c5e8f33f tools: in performane-log-viewer.py, change sample-selection icon
(cherry picked from commit f246a0197b)
2019-01-16 03:58:49 -05:00
Marco Ciampa
1e4df259c1 Updated Italian translation 2019-01-16 09:38:38 +01:00
Jehan
32fdd69324 app: add the concept of line art source to Bucket Fill tool.
Additionally to sample merge and active layer, now we can only use the
layer above or below the active layer as line art source.

The line art fill is meant to work on drawing lines. Though sample merge
still is ok in many cases, the more you fill with colors, the more the
line art computation becomes unecessarily complex. Also when you use a
lot of layers with some of them already filled with colors, it makes it
impossible to colorize some line art zones with the tool. Moreover you
just don't want to have to hide every layers out there to colorize one
layer (especially background layers and such as you may want to see the
result with your background).
Thus we want to be able to set the source as a unique layer, while it
not being necessarily the active one (because you want lines and colors
on different layers). In this case, I am assuming that the color and the
line layers are next to each other (most common organization).

(cherry picked from commit c71b4916af)
2019-01-15 17:39:17 +01:00
Ryuta Fujii
83fd555717 Update Japanese translation 2019-01-15 16:20:10 +00:00
Ell
2247fce313 libgimp: in GimpTileBackendPlugin, change default tile multiplier to 1
In GimpTileBackendPlugin, change the default tile multiplier,
specifying the ratio between the backend tile-size, and GIMP's
tile-size, from 2 to 1.  Since we're reading/writing each GIMP tile
using a separate command anyway, using a large multiplier doesn't
provide any benefits, while it does have drawbacks.  In particular,
it reduces the chance that a write operation will affect an entire
tile, which allows us to avoid reading the tile data from GIMP.

(cherry picked from commit a5e2945b68)
2019-01-15 02:48:43 -05:00
Ell
535fd3a041 libgimp: in GimpTileBackendPlugin, don't read tile data upon TILE_SET
Add an internal _gimp_tile_ref_noinit() function, which increases
the ref-count of a tile *without* initializing its data (in
particular, without reading its data from GIMP, or zeroing it.)
Use this function, instead of gimp_tile_ref(), when storing a tile
in GimpTileBackendPlugin, to avoid unnecessarily reading the tile
data from GIMP.

(cherry picked from commit 5ffdb9aa41)
2019-01-15 02:48:41 -05:00
Ryuta Fujii
76e88e392c Update Japanese translation 2019-01-14 16:33:49 +00:00
Rodrigo Lledó
88cd4e205f Update Spanish translation 2019-01-14 07:28:01 +00:00
Marco Ciampa
228d8fbef5 Updated Italian translation 2019-01-14 00:53:56 +01:00
Ell
fe5ee0f7b8 app: clear priority rect when finishing projection rendering
In gimp_projection_finish_draw(), clear the chunk iterator's
priority rect before finishing rendering, since it's not needed at
this point, and this is slightly more efficient.

(cherry picked from commit 9833da3431)
2019-01-13 08:23:05 -05:00
Ell
293ae15b72 app: in filter tools, allow toggling on-canvas controller visibility
In GimpFilterTool, when the filter uses an on-canvas controller,
provide a toggle in the tool's filter-options dialog allowing to
toggle the controller's visibility.  This allows getting the
controller out of the way when unneeded.

(cherry picked from commit 33c22ae2a3)
2019-01-13 08:15:51 -05:00
Ell
c862886205 app: add gimp_tool_widget_{get,set}_visible()
Add mew gimp_tool_widget_{get,set}_visible() functions, which allow
setting the visibility of a tool widget.  While the widget is
invisible, it ignores all events.

(cherry picked from commit f1a7abaef9)
2019-01-13 08:15:50 -05:00
Ell
3ac417afe4 app: in GimpDrawTool, avoid CRITICAL on widget signal if not active
In GimpDrawTool, do nothing in the tool-widget signal handlers if
the draw-tool isn't active, to avoid CRITICALs due to a NULL
display.  This can happen if a widget is set before the tool is
started.

(cherry picked from commit 34e6c8734b)
2019-01-13 08:15:49 -05:00
Ell
8477c3d3cd app: in GimpToolPath, use gimp_tool_message() instead of _set_status() ...
... when trying to edit a locked path.

(cherry picked from commit a9883e98e3)
2019-01-13 08:15:49 -05:00
Ell
300166a612 app: handle GimpToolWidget::message in GimpDrawTool
... by forwarding the message to the tool.

(cherry picked from commit 265071f34b)
2019-01-13 08:15:48 -05:00
Ell
52a8dadaf6 app: handle GimpToolWidget::message in GimpToolWidgetGroup
... by forwarding the message, if the emitting widget has focus.

(cherry picked from commit 00a06f94be)
2019-01-13 08:15:48 -05:00
Ell
38c74c2809 app: add gimp_tool_widget_message[_literal]()
Add a GimpToolWidget::message signal, which can be emitted by tool
widgets to display a message, instead of using the ::status signal.

Add corresponding gimp_tool_widget_message[_literal]() functions.

(cherry picked from commit 1ac4b85ce0)
2019-01-13 08:15:47 -05:00
Ell
10f22753e4 app: in gimpdrawtool.c, s/rectangle/widget/ in tool-widget signal handlers
(cherry picked from commit 749dc3c465)
2019-01-13 08:15:46 -05:00
Piotr Drąg
0da466a47c Update Polish translation 2019-01-13 12:35:40 +01:00
Jehan
78392316db Issue #2786: a few string issues.
Several en_GB to en_US.

Also "Show a preview of the transform_grided image". "grided" should be
"gridded", but I also have a problem with the underscore. Should it be
"transform-gridded"? Even so, does it really make sense?
I chose to just read "Show a preview of the transformed image", which I
think is simpler and the most understandable (we don't need to leak the
implementation with a transform grid into the human read text IMO). If
anyone think that was not the right choice, feel free to propose
otherwise.
Thanks to Bruce Cowan for noticing these.

(cherry picked from commit f9c170dfbd)
2019-01-12 18:04:55 +01:00
Jehan
4fd8e4841f app: add link to Smart Colorization scientific paper.
This is sometimes asked, and myself also need to find it from time to
time. I may as well put the link inside the code comments, where it is
just easy to find!

(cherry picked from commit 005bc1406b)
2019-01-12 18:03:24 +01:00
Jehan
944d509e78 desktop: prepare GIMP 2.10.10 appdata.
(cherry picked from commit 388f6da1c4)
2019-01-12 18:03:24 +01:00
Ell
dfc038e650 app: in gimp_projection_chunk_render_start(), properly invalidate preview
In gimp_projection_chunk_render_start(), when the current
projection rendering is complete, but not finalized yet, and no new
rendering is started (since the current update region is empty),
make sure to invalidate the projectable's preview, since it
normally happens when rendering is finalized, which doesn't happen
in this case.

(cherry picked from commit 42845c9462)
2019-01-12 08:33:24 -05:00
Ell
f21eec319f app: in gimp_projection_chunk_render_start(), don't leak empty region
In gimp_projection_chunk_render_start(), don't leak the current
update region when it's empty, but not NULL, and properly shut down
the idle source.

(cherry picked from commit 0e5de95760)
2019-01-12 08:20:16 -05:00
Bruce Cowan
3f2815922f Update British English translation 2019-01-12 12:41:52 +00:00
Ell
4cbec7608f app: fix gimp_chunk_iterator_set_priority_rect()
(cherry picked from commit 942e1aa939)
2019-01-12 07:32:08 -05:00
Piotr Drąg
9bf833b0e4 Update Polish translation 2019-01-12 13:11:15 +01:00
Bruce Cowan
797469d351 Update British English translation 2019-01-12 12:03:58 +00:00
Ell
5e00c26295 app: in gimpchunkiterator.c, #include <stdlib.h>
... for qsort().

(cherry picked from commit a61f29e30a)
2019-01-12 06:16:50 -05:00
Ell
cc59bce82e Issue #440 - libgimp/gimptilebackendplugin.c provides no pyramid
In GimpTileBackendPlugin, return NULL when fetching z>0 tiles,
instead of simply ignoring the z coordinate, so that the mipmapped
tile is rendered locally.  Likewise, avoid storing z>0 tiles.

Note that this is suboptimal, since all the necessary level-0 tiles
need to be sent to the buffer as a result.  Ideally, we should
extend the wire protocol to handle mipmapped tiles.

(cherry picked from commit d0ae39f017)
2019-01-12 05:51:58 -05:00
Ell
aa0df19af2 app: in gimp_gegl_apply_cached_operation(), s/cancellable/cancelable/
To align gimp-2-10 with master, and fix commit
50dc4571cb.
2019-01-12 05:11:47 -05:00
Ell
7547df54dd app: in the gradient tool, halt gradient editor before committing filter
In the gradient tool, halt the gradient editor before committing
the filter, so that its image-flush idle source is removed before
applying the operation, to avoid flushing the image, and hence
restarting its projection rendering, during application.

(cherry picked from commit 2256ab22f7)
2019-01-12 04:54:18 -05:00
Ell
bb4b1e3f1f app: in gimp_tile_handler_validate_buffer_copy(), temporarily remove source handler
In gimp_tile_handler_validate_buffer_copy(), temporarily remove the
source buffer's validate handler, is exists, so that the subsequent
gegl_buffer_copy() can use fast tile copying, using the TILE_COPY
command.  GEGL currently only uses TILE_COPY when the source buffer
doesn't have any user-provided tile handlers.

(cherry picked from commit f4750a0ae7)
2019-01-12 04:54:18 -05:00
Ell
50dc4571cb app: use GimpChunkIterator in gimp_gegl_apply_cached_operation()
In gimp_gegl_apply_cached_operation(), replace the use of
GeglProcessor with GimpChunkIterator, so that we use the same
chunking logic as for rendering projections.  This has the
advantage of better chunk alignment to the tile grid and dynamic
chunk sizing, which improve performance.

Use chunking even when there's no progress indication, since it
generally results in better cache locality.

(cherry picked from commit 4110f7b7b1)
2019-01-12 04:54:16 -05:00
Ell
b62e3fd3b8 app: use GimpChunkIterator in GimpProjection
Replace the custom chunking logic of GimpProjection with
GimpChunkIterator, added in the previous commit.

(cherry picked from commit 246e782858)
2019-01-12 04:53:11 -05:00
Ell
8c31ed6f02 app: add GimpChunkIterator
Factor out the region-chunking logic of GimpProjection into a new
GimpChunkIterator type, providing a generic mechanism for iterating
over a cairo region in discrete chunks.  The iterator doesn't
perform any processing itself, but rather dispenses rectangular
chunks, which the user then processes.

Iteration is broken into intervals, the duration of which is
configurable.  Each iteration begins with a call to
gimp_chunk_iterator_next(), after which
gimp_chunk_iterator_get_rect() should be called in succession to
fetch a rectangle to process, until it returns FALSE, which marks
the end of the iteration.  Updates to the UI should take place in
the interval between iterations, but not during an iteration.  The
iterator dynamically adjusts the chunk size according to processing
speed, in order to match the target iteration interval.

The iterator can be given a priority rectangle, which is processed
before the rest of the region.  It can also be given a
representative tile rectangle, defining a regular tile grid;
dispensed chunks are aligned to the tile grid as much as possible.

(cherry picked from commit ba9ce34e10)
2019-01-12 04:53:10 -05:00
Piotr Drąg
075363f182 Update POTFILES.in 2019-01-11 18:50:23 +01:00
Jehan
5122b86588 NEWS: update. 2019-01-11 13:20:38 +01:00
Jehan
0055a2ad73 app: push a temporary status when picking layer with alt-midclick.
Though the layer list will also show updated, it is much easier to look
at the layer name in the status bar whose position never changes.
Anyway it makes sense to just show a temporary status info message
giving the picked layer name, making it all the easier to find the layer
you are looking for.

(cherry picked from commit 496bc02b49)
2019-01-11 13:19:56 +01:00
sabri ünal
a0361ec535 Annotation for translators.
(cherry picked from commit 74df62034a)
2019-01-10 12:55:42 +01:00
Marco Ciampa
24f32e6305 Updated Italian translation 2019-01-10 11:45:53 +01:00
Ell
a16d06a40a Issue #1824 - Crash on 2.10.4 using tablet
In GimpTool, track the last-seen pointer coordinates, modifier
state, and event time, during button_press() and motion() events
and use those to synthesize a button_release() event when
comitting/halting the tool, if the tool is still active, and a
matching button_release() event has not been received.

The paint tools (as well as other tools) require each
button_press() event to be matched by a button_release() event in
order to properly finish their operation, but one isn't organically
generated when switching tools due to a device change.

(cherry picked from commit 9b25611857)
2019-01-09 13:40:48 -05:00
Ryuta Fujii
0a22773a17 Update Japanese translation 2019-01-09 13:12:42 +00:00
Ryuta Fujii
51ecd3e14e Update Japanese translation 2019-01-09 13:06:31 +00:00
Jehan
5bbfbd1dba Issue #572: Key combinations not working with non English layout.
It is most likely the same issue as old bug 769550 (on bugzilla), which
is fixed with GTK+ 2.24.32. Back then, this version of GTK+ had not been
released yet so we only added a warning in the configure script. See
also commit b7345863.
Now it has been a year since GTK+ 2.24.32 has been released and any
distribution can just upgrade a micro version of GTK+ for bugfix. So
let's just drop the warning and do a hard requirement to 2.24.32.
2019-01-08 23:39:47 +01:00
Ryuta Fujii
f7cb9b92e8 Update Japanese translation 2019-01-08 15:41:32 +00:00
Ryuta Fujii
b7793b9c21 Update Japanese translation 2019-01-08 15:26:52 +00:00
Ell
d2b98a6700 app: in gimp_display_empty(), clear image of matching contexts
In gimp_display_empty(), clear the image of all contexts whose
display is the current display, so that, in particular, when
subsequently updating the action groups, which causes certain
actions to be activated, the image that used to be bound to the
display is not found through the user context.  This avoids re-
validating the image projection when closing the last image,
postponing image destruction.

(cherry picked from commit 49e57f8d6e)
2019-01-08 10:05:55 -05:00
Jehan
b1fe1675ce app: expect event == NULL in gimp_device_info_get_event_coords().
The problem was not happening with the master code of
gimpdisplayshell-tool-events.c, but I encountered it in gimp-2-10 with
the layer picking code.
Even then, it still works, but I need to protect calls to
gdk_event_get_axis() to avoid CRITICALs.
2019-01-08 14:19:11 +01:00
Jehan
2dc3e1813c app: make layer picking a generic modifier of the shell.
Instead of having layer picking only on paint tools with alt-click, make
it available everywhere with alt-middle click. Moving through layers is
also a way to navigate an image, so it actually makes sense to be with
other modifiers (panning, zooming, rotating), while making the feature
more generic (this is definitely useful whatever the selected tool).

(cherry picked from commit 4c337353a0)
2019-01-08 13:41:06 +01:00
Jehan
e0be9bdef2 app: alt-click to pick a layer will loop through candidate layers.
If you click on a zone filled in several visible layers, you don't
necessarily want the top layer. You may want one below. With this
change, as long as you hold alt, you will loop through all candidate
layers from top to bottom (then looping back top when reaching the
bottom).
In a first alt-click, you will always end up to the top candidate.

(cherry picked from commit 90e9eb3fca)
2019-01-08 13:41:06 +01:00
Jehan
5790c809c1 app: allow picking layer in paint tools on alt-click.
When working with a lot of layers, it is common to have to switch easily
between layers. And having to go back to the layer list is annoying and
also sometimes not practical at all when you can't find easily the right
layer. This is a first step in an experiment for such a feature, worked
together with Aryeom as advisor (and originator of the feature idea).
For now I apply this only to paint tools, though we are considering
having it as a generic modifier too, working whatever the tool. Yet we
wouldn't be able to use alt-left click (as it is used already in some
tools).
How it works is simply that in any paint tool, alt-click allows to
switch to the topmost layer having a visible pixel at the clicked
position.

(cherry picked from commit 3b59e6f61e)
2019-01-08 13:41:05 +01:00
Snehalata B Shirude
b2b88d7caf Update Marathi translation 2019-01-08 10:54:37 +00:00
Michael Natterer
752589f42d libgimpbase: more metadata fixes for tags that can appear multiple times
gimp_metadata_add() which is used to set blobs or EXIF, XMP and IPTC
on a GimpMetadata also needs the logic to set "multiple" tags in one
go, or it will lose all but the first one.

(cherry picked from commit 479fd5b24b)
2019-01-07 21:41:13 +01:00
Ell
926e28b219 app: in bucket fill tool, don't calculate line art of layer groups
... since they can't be used with the fill tool.

(cherry picked from commit 4b4fffbd0e)
2019-01-07 04:29:13 -05:00
Michael Natterer
101e2d0b48 Issue #1004 - file-pdf-load crashes in lcms when opening PDF with...
...color profile

Require poppler >= 0.50 which is the first version that has the fix.
2019-01-07 03:38:52 +01:00
Michael Natterer
44fd7157b6 plug-ins: s/g_printf/g_printerr/ in sgi.c 2019-01-07 00:48:43 +01:00
Michael Natterer
58e266ed8b Issue #1358 - Increase default size of "extended input device dialog"...
...for a less cramped look

With a minimum width of 300 instead of 200 pixels, much less device
names are cut off and need horizontal scrolling.

(cherry picked from commit ee6b629fa3)
2019-01-07 00:44:36 +01:00
Ell
0f2f95d97b app: in bucket-fill tool, avoid calculating line art when not in line-art mode
In the bucket-fill tool, don't pre-calculate the line art when not
using a line-art fill area.  Also, misc. cleanup.

(cherry picked from commit 823d4a0d24)
2019-01-06 16:31:11 -05:00
Jernej Simončič
778faaddc8 Installer: handle missing install directory of GIMP <2.8 better when there's still uninstall info in Registry 2019-01-06 21:35:50 +01:00
Jernej Simončič
b6f11ee635 Installer: remove dead code 2019-01-06 20:50:15 +01:00
Piotr Drąg
0fee22cb9d Update Polish translation 2019-01-06 19:21:11 +01:00
Michael Natterer
4f9bde3bad Issue #1437 - 2.10 Image Metadata "keywords" corrupt
We were not taking into account tags that can appear multiple times,
such as "keyword", they are handled by gexiv2 with the
get_tag_multiple() and set_tag_multiple() functions.

gimp_metadata_deserialize_text(): when deserializing our XML format,
check if a tag is already set on the metadata as "multiple" and if yes
retrieve it, append the new value and set it again.

gimp_image_metadata_save_finish(): take care of "multiple" values when
copying tags to new metadata created for saving.

This should preserve all values across an "import, edit, export".

Thing will still break when using the metadata editor, it doesn't
handle multiple values at all, but that code is very hard to
understand.

(cherry picked from commit d708ac0b21)
2019-01-06 17:53:41 +01:00
Ell
fbf73bee70 app: remove gimp-scratch; replace with gegl-scratch
The scratch allocator has been moved to GEGL (commit
gegl@b99032d799dda3436ffa8c1cc28f8b0d34fb965d).  Remove gimp-
scratch, and replace all its uses with gegl-scratch.

(cherry picked from commit 889e2e26ee)
2019-01-06 07:39:52 -05:00
Alexandre Prokoudine
f82eab6c95 Update NEWS 2019-01-06 04:44:59 +03:00
Alexandre Prokoudine
68b53d84f8 Update Russian translation 2019-01-06 04:16:19 +03:00
Michael Natterer
c924d60ea6 Issue #1793 - Move Guillotine tool to a different position in menus...
...(and rename it)

Move it into the "Crop" group of the image menu and call it "Slice
Using Guides".

(cherry picked from commit 5fffadba54)
2019-01-05 14:58:18 +01:00
Michael Natterer
30d5fb4851 Issue #2260 - "Selection to Path Advanced Settings" dialog not scrollable
Put the entire dialog content into a scrolled window.

(cherry picked from commit 99764000be)
2019-01-05 14:26:24 +01:00
Snehalata B Shirude
c6bf7b04f7 Update Marathi translation 2019-01-05 08:32:24 +00:00
Michael Natterer
25983b8280 Issue #2751 - Some Translated sentences appear as Untranslated
Pass the translation context to gimp_action_group_add_*_actions() to
make action translations work.

(cherry picked from commit 55219ffaf1)
2019-01-05 02:59:12 +01:00
Ryuta Fujii
73597b4efd Update Japanese translation 2019-01-04 21:32:06 +00:00
Ell
7fa5fbab94 app: small fix to last commit
(cherry picked from commit d39ac2a3f0)
2019-01-04 15:32:19 -05:00
Ell
a299270f8a app: in GimpHistogramEditor, don't block when creating bg histogram
In GimpHistogramEditor, when the drawable preview is frozen, don't
duplicate the main histogram as the bg histogram if calculation is
still ongoing, since this will block until histogram calculation is
complete.  In particular, this creates a noticeable stall when
beginning a paint stroke while the histogram is being calculated.

Instead, defer the creation of the bg histogram to the completion
of the calculation of the main histogram.

(cherry picked from commit 471efee769)
2019-01-04 15:18:22 -05:00
Ell
f08065b8c6 app: write floating-point vars using C locale in performance logs
When writing floating-point instrumentation variables in
performance logs, always use the C locale, rather than the current
locale.

(cherry picked from commit 626208b17c)
2019-01-04 13:04:58 -05:00
Michael Natterer
adbac2f680 Issue #2446 - DPI information is not stored in clipboard
Set the "x-dpi" and "y-dpi" options on the GdkPixbuf set on the
clipboard. There is not much more we can do, getting that value across
the clipboard is out of our control, but at least we set the vlaues
now.

(cherry picked from commit a0263f40d0)
2019-01-04 18:13:42 +01:00
Michael Natterer
8dee1276f1 pdb: deprecate gimp_get_theme_dir() and gimp_get_icon_theme_dir()
They are unused in 2.10 and master, and we do this via the plug-in
config message anyway.
2019-01-04 15:55:47 +01:00
Michael Natterer
490d565b57 Issue #2136 - On-image UI for adjusting Linear Motion Blur
Add on-canvas GUI (simple lines) for circular, linear and zoom motion
blur. The restrictions in the interaction show pretty well that there
is room for improvement here, the line is just a bit too generic, but
it's better than nothing.

(cherry picked from commit 39406b83d3)
2019-01-04 14:40:25 +01:00
Ell
5f00ee2a7d app: in GimpHistogramEditor, cancel ongoing async upon update
In gimp_histogram_editor_update(), cancel any ongoing histogram-
calculation async before restarting the idle source.  The async
will have been canceled anyway when recalculating the histogram
once the idle source is run, but we can cancel it as soon as we
know the histogram is outdated.

(cherry picked from commit 5561da87e6)
2019-01-04 08:17:43 -05:00
Ell
8142fe4d1c app: In GimpHistogram, align copied buffer region to tile rect
In gimp_histogram_calculate_async(), align the copied region of the
drawable and mask buffers to the tile grid, so that all copied
tiles are COWed.

(cherry picked from commit d56d663eaa)
2019-01-04 08:17:42 -05:00
Michael Natterer
23cc540f62 Issue #2540 - block width / height slider of the pixelize filter don't...
...have the same scaling

gimp_prop_widget_new_from_pspec(): when restricting the scale to the
actual op area for pixel-coordinate and pixel-distance properties,
only use the max value in the axis direction for pixel-coordinate; for
pixel-distance make sure we use the same value on both axes, simply
use MAX (area.width, area.height).

(cherry picked from commit 0a1ecdf4ee)
2019-01-03 22:23:24 +01:00
Michael Natterer
75682c1650 Issue #1538 - Crash when adding file to already opened image and...
...closing this image while the file is being loaded

Ref the image around all calls to file_open_layers() and
gimp_image_add_layers() so it stays around even if the user closes the
display in the meantime.

(cherry picked from commit fc4add7c2b)
2019-01-03 16:48:32 +01:00
Michael Natterer
4a294f6d6a tools: fix perl warning about unescaped left brace in gimp-mkenums
Simply use "\{" instead of "{" for matching a literal "{".
2019-01-03 15:20:33 +01:00
Michael Natterer
84942d2614 AUTHORS: regenerated 2019-01-03 15:07:26 +01:00
Michael Natterer
4572da5491 Issue #2685 - Crash when distributing layers horizontally
Fix xcf-load.c to correct out-of-range item offsets (simply set them
to 0), so XCF files that are broken this way can still be recovered.

This doesn't fix the original bug, just recovering the crash images.

(cherry picked from commit b9265e7cde)
2019-01-03 15:06:36 +01:00
gaaned92
422486409a Issue #2716 - Windows: Rawtherapee plugin cannot be installed
On Windows, prevent RawTherapee from opening a console window

(cherry picked from commit 9e82ace409)
2019-01-03 14:12:48 +01:00
Snehalata B Shirude
3117eb799b Update Marathi translation 2019-01-03 08:04:14 +00:00
Jehan
6c0cc5e042 authors.xml: my name was in duplicate.
Leaving the one without the surname. My surname is not a secret at all,
but I really don't consider it necessary anyway.
Well if some day, another dev came in with the same first name, it will
still be time to update this file. :-)

(cherry picked from commit be0d41e1ad)
2019-01-03 00:23:39 +01:00
Jehan
582caf5a4a Issue #2611: Cannot open certain .pdf files in GIMP.
I am unsure of the problem, but it is fixed by using
poppler_document_new_from_gfile() instead of giving the contents of a
GMappedFile to poppler_document_new_from_data().
Using GFile is anyway usually prefered so I don't dig up more and just
make this change.

(cherry picked from commit a89e503054)
2019-01-02 22:58:56 +01:00
Jehan
d75a4615bd plug-ins: a lot of coding style cleanup in file-dds.
Still a lot more to do but pushing WIP to not have it wasted if more
commits come in from others.
Also got rid of some global variables.

(cherry picked from commit ff2d22d915)
2019-01-02 21:49:34 +01:00
Michael Natterer
ffbe7282be Issue #2617 - Export to C image artifacts
As correctly spotted by Royce Pipkins, the buffer for the drawable's
pixel lines was too small.

Also fix the plug-in to hardcode "R'G'B'[A] u8" so it won't misbehave
on high bit-depth images, and make it work on all sorts of drawables,
not only "RGB*" (it will still always export RGB images).

(cherry picked from commit 74c9d835e8)
2019-01-02 21:29:18 +01:00
Jehan
fb36495f1e po-python: add the new file-dds plug-in to POTFILES.skip.
Thanks to Piotr Drąg for noting it.

(cherry picked from commit e20930e1ff)
2019-01-02 20:48:39 +01:00
Jehan
188c82ddc8 plug-ins: "Export as DDS" is translatable.
Thanks to Piotr Drąg for raising my overlooking this.

(cherry picked from commit d1de204dbc)
2019-01-02 20:48:38 +01:00
Michael Natterer
c45362c57d po-plug-ins, po-script-fu: update for the DDS plug-in
(cherry picked from commit 11ed7ee68b)
2019-01-02 20:48:38 +01:00
Jehan
c8b663e1b3 plug-ins: get rid of "Show this dialog" checkbox in file-dds.
None of our load plug-ins have such a checkbox, so this is not
consistent. Moreover one you uncheck it, you just can't get back the
dialog until next GIMP restart. That's very bad usability.

(cherry picked from commit 948608e658)
2019-01-02 19:37:59 +01:00
Jehan
80667aa73f plug-ins: s/Save as DDS/Export as DDS/
Let's make the GUI title consistent with our naming.

(cherry picked from commit 7e68aa37c1)
2019-01-02 19:17:22 +01:00
Jehan
4c4c54af2d plug-ins: fix a few more warnings.
There are still a bunch of warnings, especially regarding usage of
GtkTable, GtkMisc and some unused functions.

(cherry picked from commit 8f49fad3da)
2019-01-02 18:55:24 +01:00
Jehan
a6385fa096 plug-ins: make the file-dds plug-in load correctly.
This commit fixes the following error:

> attempted to install a procedure with a full menu path as menu label,
> this is not supported any longer.

Instead, if we want new items in menu, we should use
gimp_plugin_menu_register(). I add the calls, yet comment them out,
since I don't think we want these various conversion calls into the
provided filters. The proper way for data conversion should be through
babl/GEGL.

(cherry picked from commit 67a80c8667)
2019-01-02 18:55:23 +01:00
Jehan
4c8f8f45c0 plug-ins: make file-dds compile.
This is still very broken and it doesn't load well. But at least it
compiles!
All build errors (and a few warnings though not all) fixed.

(cherry picked from commit df8a20956b)
2019-01-02 18:55:23 +01:00
Alexandre Prokoudine
91c6f27cf2 file-dds: mark some user-vsible messages for translation, expose them to PO files
Unfortunately, no items of comboboxes are currently translatble
due to the way the code is written.

(cherry picked from commit 2f3504e06a)
2019-01-02 18:55:23 +01:00
Massimo Valentini
994368d68d file-dds: support for DXT2/DXT4, initial build and GEGL-related fixes
(cherry picked from commit d25348ca24)
2019-01-02 18:55:22 +01:00
Alexandre Prokoudine
369884cf9c file-dds: add original source code of the DDS plug-in
This is the code from the 'gimp-2.9' branch of the plug-in,
integrated into GIMP's build system.

(cherry picked from commit 79bc2dc1ef)
2019-01-02 18:54:52 +01:00
Michael Natterer
c4e6c3add2 app: wrap some overly long lines in gimpbucketfilltool.c
and some other pedantic style fixes.

(cherry picked from commit 292903b78d)
2019-01-02 16:35:48 +01:00
Michael Natterer
fca2e84f4f app, libgimpbase: move enum GimpBucketFillArea to the core
The whole bucket fill specific enum stuff is on its way out, so let's
keep this one out of libgimp for now until we decide how to present
line art filling in the PDB.

(cherry picked from commit 368f2e596a)
2019-01-02 15:54:20 +01:00
Ell
e666041d72 app: in GimpTileHandlerValidate, avoid fetching/copying whole tiles
In GimpTileHandlerValidate, when rendering a whole tile in respone
to a TILE_GET command, use gegl_tile_handler_get_tile() to get the
tile without preserving its data, so that we avoid unnecessarily
fetching the tile from storage, or copying its data during
uncloning.

(cherry picked from commit 78ed038fca)
2019-01-02 07:41:44 -05:00
Snehalata B Shirude
2b542fca1e Update Marathi translation 2019-01-02 08:59:31 +00:00
Michael Natterer
a27f7c7724 Issue #1788 - Inconsistency between FG color and selected color in...
...palette views despite selected color being in the currently
selected pallette

As suggested by Massimo, changing the color comparison EPSILON in
gimppalette.c from 1e-10 to 1e-6 fixes this, and is really small
enough.

Also, generally clean up color comparison epsilons:

- use a #define, not hardcoded values for all uses of
  gimp_rgb[a]_distance()
- call the #defines RGB_EPSILON and RGBA_EPSILON
- make them all 1e-6 or larger

(cherry picked from commit abd7cbfc8d)
2019-01-02 01:53:02 +01:00
Michael Natterer
d6ca6d510e Issue #2667 - When copying a text layer, paste should create a new...
...text layer, not an image of the text

In gimp_edit_paste_get_layer(), when pasting as floating selection,
collapse the pasted layer into an ordinary layer only if it's a group
layer. There is nothing that speaks against having a floating text
layer, it works just fine.

(cherry picked from commit 8a4aacb52f)
2019-01-02 00:17:45 +01:00
Michael Natterer
d7b9cb4e71 libgimp: use G_N_ELEMENTS() in gimp_image_metadata_save_finish()
intead of hardcoding the array length.

(cherry picked from commit d873290915)
2019-01-01 20:27:43 +01:00
Michael Natterer
0f4cbb070f configure.ac: require babl >= 0.1.61
(cherry picked from commit b24cc6e7fa)
2019-01-01 19:24:42 +01:00
Ell
d90fd01b32 app: show message when attempting to change layers while there is a floating sel.
In GimpDrawableTreeView, show an error message when attempting to
select a different drawable while the image has an active floating
selection.  In GimpLayerTreeView, also blink the editor button-row
when this happens, as a hint that the floating selection can be
committed/canceled through the buttons (we already highlight the
relevant ones.)

(cherry picked from commit 070e10eda7)
2019-01-01 09:14:31 -05:00
Ell
2114d63c18 plug-ins: in image-map, fix spin-scale adjustment
Fix deprecated use of non-zero page size for a spin-button
GtkAdjustment, and increase the page increment.

(cherry picked from commit 192bc9536c)
2019-01-01 07:53:30 -05:00
Ell
563036eab6 app: more optimizations to gimp_gegl_mask_bounds()
Another inner-loop logic improvement.

(cherry picked from commit 3351174ebe)
2019-01-01 06:53:35 -05:00
Ell
ae54ed2d68 app: optimize gimp_gegl_mask_bounds()
... by using the mask's native format, and improving the inner-loop
logic.

(cherry picked from commit 819a5352f6)
2019-01-01 06:34:14 -05:00
Ell
5807ca820b app: optimize gimp_gegl_mask_is_empty()
... by using the mask's native format, and gegl_memeq_zero().

(cherry picked from commit 986a298a07)
2019-01-01 06:34:14 -05:00
Anders Jonsson
dd2a4cd97f Update Swedish translation 2018-12-31 23:40:22 +00:00
Michael Natterer
25e1197549 cursors: add -HiDPI variants of all cursors
This includes gimp-tool-cursors-x2.xcf and cursorname-x2.png files,
they are simply 72x72 upscaled versions of the 36x36 fies with no
changes.

Anyone can now improve on cursors without having to deal with the
bulid process.

(cherry picked from commit ad5bf1dee7)
2018-12-31 22:28:42 +01:00
Michael Natterer
1c43c6f989 app: fix last gimpcursor.c commit: g_printerr() needs a newline
(cherry picked from commit 20225a2268)
2018-12-31 19:14:05 +01:00
Michael Natterer
8ed8def107 app: support cursors with a scale factor of 2 for HiDPI
If the scale factor is 2 or larger, look for cursor images named
"filename-x2.png" and use them instead. Guess HiDPI based on the
monitor resolution being > 250 ppi, ugly but so what.

Manually scale up the default cursor if there is no "x2" image, using
NEAREST interpolation, which looks better than smooth scaling on HiDPI
monitors.

Next: adding better HiDPI cursor images.

(cherry picked from commit 8ff8f1d442)
2018-12-31 16:21:34 +01:00
Michael Natterer
1706950400 app: pass a GdkWindow not GdkDisplay to gimp_cursor_new()
Preparation for adding HiDPI cursors.

(cherry picked from commit 47ff7e1467)
2018-12-31 14:08:36 +01:00
Ell
e61188e666 app: small fix to gimp_drawable_edit_fill()
(cherry picked from commit 3738ff3ffd)
2018-12-31 05:33:45 -05:00
Ell
480d2aa588 app: show error on attempt to clear/cut layer with locked alpha channel
Show an error message, and blink the layers-dialog lock-box, when
attempting to clear/cut a layer with a locked alpha channel.

(cherry picked from commit e967e5fa9e)
2018-12-31 04:40:18 -05:00
Ell
5d905d1d65 app: in gimp_drawable_edit_fill(), make trivial alpha-only fill a NOP
In gimp_drawable_edit_fill(), if the fill only affects the alpha
channel, and if the drawable has no alpha channel, or the alpha
channel is masked out, do nothing, instead of unnecessarily
performing the fill, which has no effect.

(cherry picked from commit 6384ff01b6)
2018-12-31 04:40:18 -05:00
Snehalata B Shirude
38e89da697 Update Marathi translation 2018-12-31 08:35:56 +00:00
Anders Jonsson
5198681493 Update Swedish translation 2018-12-30 21:07:08 +00:00
Anders Jonsson
90a8819072 Update Swedish translation 2018-12-30 20:45:40 +00:00
Marco Ciampa
cf4889548e Updated Italian translation 2018-12-30 19:01:08 +01:00
Ell
9058e4bd75 app: in gimp_gegl_apply_cached_operation(), intersect cached rects with dest rect
In gimp_gegl_apply_cached_operation(), intersect the cached rects
with the dest rect, so that we don't unnecessarily (if not
erroneously) copy cached regions outside the dest rect to the dest
buffer.  This can happen when the op's applicator crop-rect changes
dynamically.

(cherry picked from commit d9b4ffe09e)
2018-12-30 08:06:00 -05:00
Ell
f8a5c58d41 app: in warp tool, crop filter to stroke bounds
In the warp tool, set the drawable-filter's crop area to the
combined stroke bounds, so that, when comitting the tool, only this
area is processed, instead of the entire drawable area.

(cherry picked from commit e06c4643dc)
2018-12-30 05:13:30 -05:00
Ell
a330a94b94 app: in GimpDrawableFilter, only update crop/preview area when updating whole drawable
In GimpDrawableFilter, when updating the entire filter area, only
update the crop/preview area (as set by
gimp_drawable_filter_set_{crop,preview}()), instead of the entire
drawable.

(cherry picked from commit b846ffed19)
2018-12-30 05:13:30 -05:00
Ell
05f74b6f40 app: add gimp_drawable_filter_set_crop()
Add gimp_drawable_filter_set_crop(), which allows setting an output
crop rectangle for the filter; anything outside the rectangle
doesn't get filtered.  The crop area is combined with the preview
area to determine the filtered area during preview, however, unlike
the preview area, the crop area remains in effect while committing
the filter.

Consequently, when merging a drawable filter, if the filter has a
crop, only process the cropped area.

(cherry picked from commit 5c27d14fdf)
2018-12-30 05:13:29 -05:00
Ell
81bef8cd50 app: rename gimp_applicator_set_preview() to _set_crop(); add _get_crop()
We're going to use GimpApplicator's output crop for more than just
split previews.  Rename gimp_applicator_set_preview() to
gimp_applicator_set_crop(), and add gimp_applicator_get_crop(),
which returns the output crop rectangle, or NULL if cropping is
disabled.

(cherry picked from commit 7534ae53d6)
2018-12-30 05:13:29 -05:00
Ell
0685c05cfb app: in GimpFilterTool, make region combo insensitive when selection is empty
(cherry picked from commit 093e017df8)
2018-12-29 20:55:43 -05:00
Ell
3e1a631583 app: in GimpFilterTool, show region combo for non-point ops
In GimpFilterTool, show the region combo when applying a non-point
op, as well as when applying a position-dependent point op.  The
result of non-point ops may depend on the choice of input region,
even if the op is not position-dependent.

(cherry picked from commit 7949fd9a28)
2018-12-29 20:27:46 -05:00
Ell
bb039c8401 app: use GimpDrawableFilter in gimp_drawable_apply_operation()
In gimp_drawable_apply_operation(), use a temporary
GimpDrawableFilter to apply the operation, instead of using a
shadow buffer.  This renders and composits the op directly into the
drawable buffer, avoiding an intermediate buffer, requiring less
space and speeding up processing.

(cherry picked from commit b201f73562)
2018-12-29 14:28:51 -05:00
Ell
b4c1c94db0 app: in GimpApplicator, allow enabling cache/preview after construction; remove preview cache
Remove the use_split_preview and use_result_cache parameters of
gimp_applicator_new(), and allow enabling/disabling the cache
(through gimp_applicator_set_cache()) and the preview crop (through
gimp_applicator_set_preview()) after construction.

Move the preview crop node after the result cache, and remove the
separate preview cache node.  This eliminates an extra cache
buffer, reducing the space consumed by filters, and speeds up split
preview, since the cached result now includes the output
compositing.

(cherry picked from commit ab52dc6bca)
2018-12-29 14:28:50 -05:00
Daniel Korostil
b4813417b1 Update Ukrainian translation 2018-12-29 14:52:33 +00:00
Daniel Korostil
8703aab4e3 Update Ukrainian translation 2018-12-29 14:51:21 +00:00
Daniel Korostil
9fe42d7c0f Update Ukrainian translation 2018-12-29 14:44:29 +00:00
Rodrigo Lledó
20093484e7 Update Spanish translation 2018-12-29 10:39:34 +00:00
Snehalata B Shirude
112868500a Update Marathi translation 2018-12-29 10:22:44 +00:00
Ell
c650c51cbc app: in gimp_drawable_merge_filter(), align undo rect to tile grid
In gimp_drawable_merge_filter(), align the region copied to the
undo buffer to the drawable buffer's tile grid, so that the copied
tiles are COWed.

(cherry picked from commit cba4bc4781)
2018-12-28 08:31:05 -05:00
Ell
96a16b8db7 Revert "Bug 796090 - (wrong) true-color preview of GEGL filter ops, ..."
We now perform the conversion of filter output to the drawable
format as part of the individual filter nodes (see the last few
commits), so there's no need for another conversion after the
filter stack.

This reverts commit d6e0ca5054.

(cherry picked from commit 95393722cc)
2018-12-28 03:57:35 -05:00
Ell
8415bc7d94 app: cache result of floating selections
Use an output cache for floating-selection filters, to speed up
anchoring.

(cherry picked from commit 3f45e893bf)
2018-12-28 03:56:54 -05:00
Ell
20d6db79c2 app: use drawable format as floating-sel applicator output format
Set the output format of floating-selection applicators to the
target drawable format.  We're going to remove the global
GipDrawable convert-format node, which we use to get correct
previews for indexed drawables, so that each filter now has to do
its own format conversion.

(cherry picked from commit 0560c5a6fe)
2018-12-28 03:56:54 -05:00
Ell
37b0832c2d app: in GimpDrawableFilter, use the drawable format as the cache format
In GimpDrawableFilter, set the applicator's output format to the
drawable format, so that the cache uses the drawable format, and so
copying the cached result to the drawble's buffer when comitting
the filter becomes much cheaper, and, in particular, doesn't
require reading tiles out of the swap.  This notably improves
commit speed in large images, at the expense of requiring a few
extra conversions during preview.

(cherry picked from commit 8e57ee2265)
2018-12-28 03:56:53 -05:00
Ell
ad6fff33b6 app: add gimp_applicator_set_output_format()
In GimpApplicator, add gimp_applicator_set_output_format(), which
can be used to explicitly set the format of the result.  In
particular, this allows controlling the output cache format, which
can speed up the merging of cached filters.

(cherry picked from commit b93df0311f)
2018-12-28 03:56:52 -05:00
Ell
7c1d5b7a3e app: add GimpDrawable::format-changed signal
... which is emitted when the drawable's format is changed.

(cherry picked from commit 85e454bae8)
2018-12-28 03:56:52 -05:00
Ell
13c6fe5db6 app: in GimpLineArt, use "invalidate-preview" signal of input viewable
In GimpLineArt, use the "invalidate-preview" signal of the input
viewable, instead of its "painted" or "rendered" signals, for
asynchronously computing the line art.  Subsequently, remove the
aforementioned signals from GimpDrawable and GimpProjection,
respectively.  This simplifies the code, and reduces the number of
signals.

(cherry picked from commit ef9b1f6694)
2018-12-27 17:14:34 -05:00
Ell
cbffd9dfb6 app: remove gimp_applicator_dup_apply_buffer()
... nothing uses it after last commit.

(cherry picked from commit 12e83350bf)
2018-12-27 14:01:50 -05:00
lillolollo
c466b6108e Fix Problem found in ./libgimpbase/gimpbase.def
the following symbols are in the library,
  but are not listed in the .def-file:
     + gimp_bucket_fill_area_get_type

(cherry picked from commit 132a378bed)
2018-12-27 12:10:43 -05:00
Ell
23ae869f21 app: remove "Edit -> Fade..."
This commit completely removes the "Edit -> Fade..." feature,
because...

- The main reason is that "fade" requires us to keep two buffers,
  instead of one, for each fadeable undo step, doubling (or worse,
  since the extra buffer might have higher precision than the
  drawable) the space consumed by these steps.  This has notable
  impact when editing large images.  This overhead is incurred even
  when not actually using "fade", and since it seems to be very
  rarely used, this is too wasteful.

- "Fade" is broken in 2.10: when comitting a filter, we copy the
  cached parts of the result into the apply buffer.  However, the
  result cache sits after the mode node, while the apply buffer
  should contain the result of the filter *before* the mode node,
  which can lead to wrong results in the general case.

- The same behavior can be trivially achieved "manually", by
  duplicating the layer, editing the duplicate, and changing its
  opacity/mode.

- If we really want this feature, now that most filters are GEGL
  ops, it makes more sense to just add opacity/mode options to the
  filter tool, instead of having this be a separate step.

(cherry picked from commit ed7ea51fb7)
2018-12-27 11:45:11 -05:00
Sabri Ünal
f60fe04842 Update Turkish translation 2018-12-25 16:37:08 +00:00
Piotr Drąg
59eb563aa1 Update Polish translation 2018-12-24 14:42:12 +01:00
Jehan
e001f344e5 app: rename and merge the spline and segment length properties...
... in GimpBucketFillOptions for the line art algorithm.

Inside GimpLineArt, there are still 2 properties, but we don't show them
anymore in the Bucket Fill tool options. One of the main reason is
probably that it's hard to differentiate their usage. One is to close
with curved lines, the other with straight segments. Yet we don't
actually have any control on one or the other. All one knows is that you
can have "holes" in your drawing of a given size and you want them
close-like for filling. Only reason I can see to have 2 types of closure
is whether you'd want to totally disable one type of closure (then you
set it to 0). But this is a very limited reason for making the options
less understandable overall, IMO.
So for the time being, let's show up only a single option which sets
both properties in GimpLineArt. As patdavid says "it makes sense as a
first pass".

Also rename the option to shorter/simpler "Maximum gap length". Thanks
to patdavid and pippin for helping on figuring out this better label!

Finally I am bumping the default for the gaps to 100px. The original
values were ok for the basic small images used in demos, but not for
real life image where it was always too short (even 100px may still be
too short actually, but much better than the 20 and 60px from before!).

(cherry picked from commit 503775a5a0)
2018-12-24 13:35:32 +01:00
Piotr Drąg
b67ecb3d30 Update Polish translation 2018-12-23 13:53:04 +01:00
Michael Natterer
769a6f73cc app: fix capitalization of the "Line Art Detection" frame
(cherry picked from commit 822f1b9090)
2018-12-22 21:08:06 +01:00
Alexandre Prokoudine
3d9ad63c34 Unified transform: enable Constraint:Scale by default 2018-12-21 01:49:44 +03:00
Ell
d70aeea550 app: improve gradient color-sampling speed
Improve the speed of gimp_gradient_get_color_at(), which is used by
gimp:gradient during processing when the gradient cache is too big,
by disabling type checking, and inlining and avoiding some function
calls.

(cherry picked from commit 93f4b18704)
2018-12-20 08:32:23 -05:00
Jehan
3943530c50 NEWS: add various recently merged changes. 2018-12-20 10:54:55 +01:00
Marco Ciampa
36376b50e9 Updated Italian translation 2018-12-19 21:54:47 +01:00
Piotr Drąg
3e1791247b Update POTFILES.in 2018-12-19 19:11:29 +01:00
Jehan
3ef6c2fb96 app, pdb: more gimp-2-10 only tweak for the smart-colorization.
Again some changes because of the different PDB file organization
between branches.
2018-12-19 16:25:04 +01:00
Jehan
487c01f8d1 app: fix type warning.
I missed this warning when reviewing commit a9a979b2d0.
My bad!

(cherry picked from commit 182786b4fb)
2018-12-19 16:24:50 +01:00
Jehan
ef12064655 app: allow setting line art spline and segment length to 0.
Practically it means that the algorithm won't close line art anymore
with both settings at 0. This can nevertheless still be a very useful
tool when you have a drawing style with well-closed lines. In such a
case, you will still profit from the color flooding under the line art
part of the algorithm.
Moreover with such well-closed zones from start, you don't get the
over-segmentation anymore and the threaded processing will be faster
obviously.

(cherry picked from commit 0a2d066168)
2018-12-19 16:24:23 +01:00
Jehan
2d409f2d0e Issue #2664: add a tooltip to "better compression" checkbox.
Zlib is a "better" compression in the meaning that it is a more advanced
and complex algorithm than RLE. And in most cases, it should end up in
smaller file sizes. But as any algorithm, there may be cases when the
expectations are not met (worst cases or such). That's the nature of the
maths. Still we should not make the checkbox text over-complicated (it
is not the place to teach algorithmic), yet we can at least add a small
tooltip text.

(cherry picked from commit c3ac722995)
2018-12-19 16:24:10 +01:00
Jehan
86b9738286 app: do not make line art bucket fill a GimpSelectCriterion anymore.
This was my initial choice, but the more I think about it, the less I am
sure this was the right choice. There was some common code (as I was
making a common composite bucket fill once the line art was generated),
but there is also a lot of different code and the functions were filled
of exception when we were doing a line art fill. Also though there is a
bit of color works (the way we decide whether a pixel is part of a
stroke or not, though currently this is basic grayscale threshold), this
is really not the same as other criterions. In particular this was made
obvious on the Select by Color tool where the line art criterion was
completely meaningless and would have had to be opted-out!

This commit split a bit the code. Instead of finding the line art in the
criterion list, I add a third choice to the "Fill whole selection"/"Fill
similar colors" radio. In turn I create a new GimpBucketFillArea type
with the 3 choices, and remove line art value from GimpSelectCriterion.

I am not fully happy yet of this code, as it creates a bit of duplicate
code, and I would appreciate to move some code away from gimpdrawable-*
and gimppickable-* files. This may happen later. I break the work in
pieces to not get too messy.
Also this removes access to the smart colorization from the API, but
that's probably ok as I prefer to not freeze options too early in the
process since API needs to be stable. Probably we should get a concept
of experimental API.

(cherry picked from commit cd924f453a)
2018-12-19 16:23:26 +01:00
Jehan
7ea2ca26ff Issue #2495: different code for Windows and Linux on duplicate devices.
After discussing with Mitch, it turn out commit 717c183a3e was fixing
(or rather working around) actual issues of broken device/usb stack
issues on Linux, as expected.
Nevertheless on Windows, this broke in turn many tablets (see commit
ce24e16083). Therefore we do a very ugly #ifdef to bail from duplicate
devices on Windows whereas we continue on Linux. This fix and difference
of behavior is completely empirical, rather than based on actual good
logics, so that's quite annoying, but well… not much choice here.

Also note that since we had no report of breakage on other OSes (such as
macOS/BSD), at least that I know of, I let them with the Linux code
path.

(cherry picked from commit 74a7a5d3e2)
2018-12-19 16:23:16 +01:00
Jehan
e645cbb386 devel-docs: 0 at end of layer and channel pointer list is a pointer too.
(cherry picked from commit 3e967ed02c)
2018-12-19 16:22:34 +01:00
Jehan
fec11389cb app: allow switching fill type with Alt even when Pattern fill selected.
Currently in bucket fill tool, the modifier was only switching fg to bg
and bg to fg, and was doing nothing when pattern was set. I make it
switch to fg as well (and remember which was the original value).

(cherry picked from commit 5a157bf1ba)
2018-12-19 16:21:37 +01:00
Jehan
a68524d43b app: reorganize the line art code inside a GimpLineArt object.
The code was too much spread out, in core and tool code, and also it was
made too specific to fill. I'll want to reuse this code at least in the
fuzzy select tool. This will avoid code duplication, and also make this
new process more self-contained and simpler to review later (the
algorithm also has a lot of settings and it is much cleaner to have them
as properties rather than passing these as parameters through many
functions).

The refactoring may not be finished; that's at least a first step.

(cherry picked from commit db18c679f3)
2018-12-19 16:14:11 +01:00
Ell
4937d1d8d3 app: use gimp_async_add_callback_for_object() in the bucket-fill tool
... for the same reason as commit
7c00cf498a.

(cherry picked from commit 6103f0e5d0)
2018-12-19 16:06:37 +01:00
Jehan
b1236403cf app: add the segment and spline max length options for line art.
We can't just hardcode this. On huge images in particular, you'll want
to increase this value.

(cherry picked from commit d71efdec20)
2018-12-19 16:05:30 +01:00
Jehan
1471da20b7 app: some code cleaning in gimplineart.
In particular, make simpler code in a few places, taking abyss value
into account (rather than checking the position).

(cherry picked from commit f7a4ce1051)
2018-12-19 16:05:05 +01:00
Jehan
21e776b911 app, pdb: more gimp-2-10 only tweak for smart colorization.
Because of the file organization of PDB different between the 2.10 and
master branches.
2018-12-19 16:05:05 +01:00
Jehan
73b348de1c app: make GimpBucketFillTool a GimpColorTool.
In particular, it allows to easily color pick. This just makes sense as
the bucket fill is definitely what one could call a "color tool", and
being able to easily change color without having to constantly switch to
color picker tool nor open a color chooser dialog is a must.

The fill type option (FG/BG/Pattern) was already mapped to the common
toggle behavior key (Ctrl on Linux), which is commonly used for
switching to color picker on paint tools. So I decided to remap the fill
type switch to GDK_MOD1_MASK (Alt on Linux) to keep consistent with
other tools (at the price of a change for anyone used to this modifier,
though I doubt it was that much used).
I also made possible to combine the 2 modifiers (so you could pick the
foreground or background color with ctrl and ctrl-alt).

(cherry picked from commit 5d4281944f)
2018-12-19 15:54:12 +01:00
Jehan
439a44a613 app: flood isolated pixels in smart colorization fill.
The smart colorization was leaving irritating single pixels in between
colorized regions, after growing and combining. So let's just flood
these. We don't flood bigger regions (and in particular don't use
gimp_gegl_apply_flood()) on purpose, because there may be small yet
actual regions inside regions which we'd want in other colors. 1-pixel
regions is the extreme case where chances that one wanted it filled are
just higher.

(cherry picked from commit 744d67939d)
2018-12-19 15:53:46 +01:00
Jehan
4fe5dc5d42 app: radius map actually not useful during smart colorization grow step.
The distance map has all the information we need already. Also we will
actually grow up to the max radius pixel (middle pixel of a stroke).
After discussing with Aryeom, we realized it was better to fill a stroke
fully (for cases of overflowing, I already added the "Maximum growing
size" property anyway).

(cherry picked from commit 6bec0bc82d)
2018-12-19 15:53:05 +01:00
Jehan
c4988efdb0 app: add possibility to antialias line art colorization.
(cherry picked from commit d2f9549c9f)
2018-12-19 15:51:27 +01:00
Jehan
53fdd19d84 app: simpler code with gegl_node_blit().
No need to go through an intermediate GeglBuffer when unneeded.

(cherry picked from commit c32b0ecc92)
2018-12-19 15:51:14 +01:00
Jehan
b00580d4b1 app: add "line-art-max-grow" property to the bucket fill options.
When flooding the line art, we may overflood it in sample merge (which
would use color in the line art computation). And if having all colors
on the same layer, this would go over other colors (making the wrong
impression that the line art leaked).
This new option is mostly to keep some control over the mask growth.
Usually a few pixels is enough for most styles of drawing (though we
could technically allow for very wide strokes).

(cherry picked from commit eb042e6c87)
2018-12-19 15:48:47 +01:00
Jehan
706fe079c2 app: make sure we reset tool modifier state before saving options.
I had this funny behavior when I was quitting GIMP with the active tool
using modifiers (for instance bucket fill). Each time I'd quit with
ctrl-q (and if the image is not dirty), the options would use the value
from the modifier state and be saved as-is. Hence at next restart, the
default value was always different!

(cherry picked from commit dd3d9ab3dd)
2018-12-19 15:48:26 +01:00
Jehan
19c1f2654e app: properly (bucket) fill created splines and segments in line art.
For this, I needed distmap of the closed version of the line art (after
splines and segments are created). This will result in invisible stroke
borders added when flooding in the end. These invisible borders will
have a thickness of 0.0, which means that flooding will stop at once
after these single pixels are filled, which makes it quick, and is
perfect since created splines and segments are 1-pixel thick anyway.
Only downside is having to run "gegl:distance-transform" a second time,
but this still stays fast.

(cherry picked from commit 5a4754f32b)
2018-12-19 15:48:15 +01:00
Jehan
e5bea42b6f app: replace gegl:watershed-transform with custom algorithm.
We don't really need to flow every line art pixel and this new
implementation is simpler (because we don't actually need over-featured
watershedding), and a lot lot faster, making the line art bucket fill
now very reactive.
For this, I am keeping the computed distance map, as well as local
thickness map around to be used when flooding the line art pixels
(basically I try to flood half the stroke thickness).

Note that there are still some issues with this new implementation as it
doesn't properly flood yet created (i.e. invisible) splines and
segments, and in particular the ones between 2 colored sections. I am
going to fix this next.

(cherry picked from commit 3467acf096)
2018-12-19 15:48:04 +01:00
Jehan
e9b8122e18 app: fix a line art leak in bucket fill tool.
Introduced in commit b4e12fbbbb:
gimp_pickable_contiguous_region_prepare_line_art_async() was running
gimp_pickable_flush(), which provokes the "rendered" signal on the
image projection when a change occured. As a result, it was calling
gimp_bucket_fill_compute_line_art() within itself and since
tool->priv->async was not set yet, none of the call were canceled. Hence
the same line art is computed twice, but one is leaked.
Make sure we block this signal handler as a solution.

(cherry picked from commit 36c885a6df)
2018-12-19 15:47:48 +01:00
Jehan
2934293664 app: priority map now unneeded for gegl:watershed-transform.
This commit is based on GEGL master as I just made the auxiliary buffer
of gegl:watershed-transform optional for basic cases.
It doesn't necessarily makes the whole operation that much faster
according to my tests, but it makes the code simpler as creating this
priority map was quite unnecessary.

(cherry picked from commit 963eef8207)
2018-12-19 15:47:34 +01:00
Ell
3c0f1307cc app: add gimp_pickable_contiguous_region_prepare_line_art_async() ...
... and use in bucket-fill tool

Add gimp_pickable_contiguous_region_prepare_line_art_async(), which
computes a line-art asynchronously, and use it in the bucket-fill
tool, instead of having the tool create the async op.

This allows the async to keep running even after the pickable dies,
since we only need the pickable's buffer, and not the pickable
itself.  Previously, we reffed the pickable for the duration of the
async, but we could still segfault when unreffing it, if the
pickable was a drawable, and its parent image had already died.

Furthermore, let the async work on a copy of the pickable's buffer,
rather than the pickable's buffer directly.  This avoids some race
conditions when the pickable is the image (i.e., when "sample
merged" is active), since then we're using image projection's
buffer, which is generally unsafe to use in different threads
concurrently.

Also, s/! has_alpha/has_alpha/ when looking for transparent pixels,
and quit early, at least during this stage, if the async in
canceled.

(cherry picked from commit b4e12fbbbb)
2018-12-19 15:36:10 +01:00
Ell
3e5e0e2d37 app: in bucket-fill tool, cancel async on tool destruction
When computing line-art, don't ref the bucket-fill tool in the
async data, and rather cancel any ongoing async upon tool
destruction, so that the async callback doesn't attept to touch the
now-dead tool.  This avoids segfaulting in the async callback when
switching to a different tool, while a line-art async operation is
active.

Additionally, always cancel any previous async operation in
gimp_bucket_fill_compute_line_art(), even if not starting a new
one.

(cherry picked from commit 663a6c7011)
2018-12-19 15:35:43 +01:00
Ell
1778943152 app: in bucket-fill tool, fix potential leak when computing line-art
In the line-art async function, pass ownership over the resulting
buffer to the async object, so that the buffer is properly freed in
case the async in canceled after line-art computation is complete,
but before the completion callback is called.

Also, clear the tool's async pointer in the completion callback, to
avoid leaking the last issued async.

(cherry picked from commit 2e45c4c8c8)
2018-12-19 15:34:38 +01:00
Ell
e996020e19 app: in the bucket-fill tool, avoid CRITICALs when computing line-art ...
... when the current image/drawable are NULL.

(cherry picked from commit 4575949cdf)
2018-12-19 15:34:24 +01:00
Jehan
a83bbf8249 app: end point detection uses both the end point rate and clamped value.
(cherry picked from commit 79571231c5)
2018-12-19 15:34:01 +01:00
Jehan
4c3fcdb6bb app: better handle drawable and image update for line art computation.
The "update" signal on drawable or projection can actually be emitted
many times for a single painting event. Just add new signals ("painted"
on GimpDrawable and "rendered" on GimpProjection) which are emitted once
for a single update (from user point of view), at the end, after actual
rendering is done (i.e. after the various "update" signals).

Also better support the sample merge vs current drawable paths for
bucket fill.

(cherry picked from commit 047265333c)
2018-12-19 15:33:40 +01:00
Jehan
6155889315 app: remove now useless erosion size option.
Since commit b00037b850, erosion size is not used anymore, as this step
has been removed, and the end point detection now uses local thickness
of strokes instead.

(cherry picked from commit 3f58a38574)
2018-12-19 15:33:28 +01:00
Jehan
c1c544f882 app: improve end point detection for smart colorization.
Previous algorithm was relying on strokes of small radius to detect
points of interest. In order to work with various sizes of strokes, we
were computing an approximate median stroke thickness, then using this
median value to erode the binary line art.

Unfortunately this was not working that well for very fat strokes, and
also it was potentially opening holes in the line art. These holes were
usually filled back later during the spline and segment creations. Yet
it could not be totally assured, and we had some experience where color
filling would leak out of line art zones without any holes from the
start (which is the opposite of where this new feature is supposed to
go)!

This updated code computes instead some radius estimate for every border
point of strokes, and the detection of end points uses this information
of local thickness. Using local approximation is obviously much more
accurate than a single thickness approximation for the whole drawing,
while not making the processing slower (in particular since we got rid
of the quite expensive erosion step).
This fixes the aforementionned issues (i.e. work better with fat strokes
and do not create invisible holes in closed lines), and also is not
subject to the problem of mistakenly increasing median radius when you
color fill in sample merge mode (i.e. using also the color data in the
input)!
Also it is algorithmically less intensive, which is obviously very good.

This new version of the algorithm is a reimplementation in GIMP of new
code by Sébastien Fourey and David Tschumperlé, as a result of our many
discussions and tests with the previous algorithm.

Note that we had various tests, experiments and propositions to try and
improve these issues. Skeletonization was evoked, but would have been
most likely much slower. Simpler erosion based solely on local radius
was also a possibility but it may have created too much noise (skeleton
barbs), with high curvature, hence may have created too many new
artificial endpoints.
This new version also creates more endpoints though (and does not seem
to lose any previously detected endpoints), which may be a bit annoying
yet acceptable with the new bucket fill stroking interaction. In any
case, on simple examples, it seems to do the job quite well.

(cherry picked from commit b00037b850)
2018-12-19 15:32:58 +01:00
Jehan
ee582784b7 app: force the image flush after a selection fill.
Other bucket fills are now done as filter until committed, but basic
selection fill is still done automatically. So let's make sure the
canvas is updated immediately (as it used to be before my changes).

(cherry picked from commit 287d90ba9e)
2018-12-19 15:32:13 +01:00
Jehan
8fb83d7751 app: fix uninitialized variables.
(cherry picked from commit 255f2e1cdf)
2018-12-19 15:31:30 +01:00
Jehan
fd0f5c50a5 app: recompute line art if needed after a bucket fill commit.
(cherry picked from commit 969143c436)
2018-12-19 15:30:26 +01:00
Jehan
b6227b2787 app: update gimp-2-10 for bucket fill changes for smart colorization.
Some differences in PDB between gimp-2-10 and master branches.
2018-12-19 15:28:54 +01:00
Jehan
6b1d7969ed app: edit the bucket fill tool options with new line art options.
I have not added all the options for this new tool yet, but this sets
the base. I also added a bit of TODO for several places where we need to
make it settable, in particular the fuzzy select tool, but also simply
PDB calls (this will need to be a PDB context settings.

Maybe also I will want to make some LineArtOptions struct in order not
to have infinite list of parameters to functions. And at some point, it
may also be worth splitting a bit process with other type of
selection/fill (since they barely share any settings anyway).

Finally I take the opportunity to document a little more the parameters
to gimp_lineart_close(), which can still be improved later (I should
have documented these straight away when I re-implemented this all from
G'Mic code, as I am a bit fuzzy on some details now and will need to
re-understand code).

(cherry picked from commit 824af12438)
2018-12-19 15:26:42 +01:00
Jehan
808cdc9880 app: bucket fill tool with a "paint-style" interaction.
Rather than just having a click interaction, let's allow to "paint" with
the bucket fill. This is very useful for the new "line art" colorization
since it tends to over-segment the drawing. Therefore being able to
stroke through the canvas (rather than click, up, move, click, etc.)
makes the process much simpler. This is also faster since we don't have
to recompute the line art while a filling is in-progress.
Note that this new behavior is not only for the line art mode, but also
any other fill criterion, for which it can also be useful.

Last change of behavior as a side effect: it is possible to cancel the
tool changes the usual GIMP way (for instance by right clicking when
releasing the mouse button).

(cherry picked from commit e1c4050617)
2018-12-19 15:26:42 +01:00
Jehan
0e1d8ef695 app: make line art pre-computation in threads.
This makes the speed sensation of the tool much faster as line art can
be computed in dead time when you start the tool or when you move the
pointer.

(cherry picked from commit a3cda4abbe)
2018-12-19 15:26:41 +01:00
Jehan
32f0a49ecc app: compute line art in advance.
Right now, this is mostly meaningless as it is still done sequentially.
But I am mostly preparing the field to pre-compute the line art as
background thread.

(cherry picked from commit f246f40494)
2018-12-19 15:26:38 +01:00
Jehan
6dc959d376 devel-docs: small update for GEGL buffer leak debugging.
(cherry picked from commit b9de1076ed)
2018-12-19 15:20:19 +01:00
Jehan
0cf524e351 app: fix line art labellization.
The older labelling based off CImg code was broken (probably because of
me, from my port). Anyway I realized what it was trying to do was too
generic, which is why we had to fix the result later (labeling all
non-stroke pixels as 0, etc.). Instead I just implemented a simpler
labelling and only look for stroke regions. It still over-label a bit
the painting but a lot less, and is much faster.

(cherry picked from commit 93a49951a0)
2018-12-19 15:20:19 +01:00
Jehan
4da35468bc app: better use GeglBufferIterator!
I don't actually need to loop through borders first. This is what the
abyss policy is for, and I can simply check the iterator position to
verify I am within buffer boundaries or not.
This simplifies the code a lot.

(cherry picked from commit c4ff81540d)
2018-12-19 15:20:19 +01:00
Jehan
8557cd8cfb app: directly update the mask buffer with gegl_node_blit_buffer().
No need to create a temporary buffer for this.

(cherry picked from commit f02993fb9c)
2018-12-19 15:20:18 +01:00
Jehan
8dc6bcafa3 app: create a simple priority map for line art selection flooding.
We actually don't need to compute distance map. I just make the simplest
priority map, with 1 any line art pixel and 0 any other pixel (in mask
or not), lowest priority being propagated first.
And let the flooding begin!

(cherry picked from commit 410c747509)
2018-12-19 15:20:18 +01:00
Jehan
687d058416 app: with recent gegl:watershed-transform, no need for intermediate...
... labels buffer.
We can watershed directly the mask buffer being correctly flagged.
This commit relies on merge request gegl!8 being accepted and merged.

(cherry picked from commit e905ea7ba2)
2018-12-19 15:20:18 +01:00
Jehan
3b0a312e7e app: use char array for temporary data (rather than a GEGL buffer).
Also use more GeglBufferIterator on input GEGL buffer.
Using a char array is much less expensive and accelerated the line
erosion a lot!
Moving to GeglBufferIterator is not finished, but I do in steps.

(cherry picked from commit 0c80f8a718)
2018-12-19 15:20:17 +01:00
Jehan
325398fcf9 app: use simpler allocated variables.
Allocating double-level arrays is just very inefficient.

(cherry picked from commit f975f15ec0)
2018-12-19 15:18:22 +01:00
Jehan
95bbb26252 app: make visited into single-level allocated array.
(cherry picked from commit f19181dcf8)
2018-12-19 15:18:21 +01:00
Jehan
71ec6a9849 app: fix stroke labels in gimp_lineart_estimate_stroke_width().
I must make sure that stroke pixels are labelled 0 and non-stroke other
than 0.

(cherry picked from commit 910d7934f5)
2018-12-19 15:18:21 +01:00
Jehan
b1a3792aae app: use more GeglBufferIterator.
In this case, it makes the code a bit more messy, but hopefully more
efficient.

(cherry picked from commit 1822ea399a)
2018-12-19 15:18:21 +01:00
Jehan
6dbd12a915 app: use GeglBufferIterator rather than gegl_buffer_sample|set().
(cherry picked from commit 041a8f1eec)
2018-12-19 15:18:20 +01:00
Jehan
13466ba7e7 app: babl types returned by choose_format() must be float!
(cherry picked from commit fcd038eb16)
2018-12-19 15:18:20 +01:00
Jehan
239be8ecc8 app: implement second step for line art selection/filling.
When filling colors in line arts, you don't want to leave space between
the strokes and the color, which usually happen with any of the current
selection methods.
A "KISS" trick is usually to grow your selection a few pixels before
filling (adding an additional step in colorization process), which
obviously does not handle all cases (depending on drawing style and
stroke size, you may need to grow more or less) as it doesn't take into
account actual stroke geometry.

Instead, I label the selection and the "rest" differently and leave the
pixel strokes unlabelled. Then I let these unlabelled pixels be flooded
by the "gegl:watershed-transform" operation.
Note that this second step is different from the second step from the
GREYC research paper, as they use their own watershed algorithm taking
color spots as sources to color the whole image at once. This is a
different workflow from the one using bucket fill with a single color
source.

(cherry picked from commit 8502b4e743)
2018-12-19 15:18:20 +01:00
Jehan
bde56bdfdc app, libgimpbase: add GIMP_SELECT_CRITERION_LINE_ART selection type.
This commit implements part of the research paper "A Fast and Efficient
Semi-guided Algorithm for Flat Coloring Line-arts" from the GREYC (the
people from G'Mic). It is meant to select regions from drawn sketchs in
a "smart" way, in particular it tries to close non-perfectly closed
regions, which is a common headache for digital painters and colorists.

The implementation is not finished as it needs some watersheding as well
so that the selected area does not leave "holes" near stroke borders.
The research paper proposes a new watersheding algorithm, but I may not
have to implement it, as it is more focused on automatic colorization
with prepared spots (instead of bucket fill-type interaction).

This will be used in particular with the fuzzy select and bucket fill
tools.

Note that this first version is a bit slow once we get to big images,
but I hope to be able to optimize this.
Also no options from the algorithm are made available in the GUI yet.

(cherry picked from commit 8ed12b1b98)
2018-12-19 15:18:19 +01:00
Jehan
9a6aa31681 app: show the layer mode dropdown list properly.
Showing it was only displaying the top modes, with a lot of top space,
and you had to slowly scroll down the list. This is the same as #2642
(as Alexandre noted in a comment), so I just use the same "fix" though I
don't fully understand it. It feels more of a side effect of
gtk_combo_box_set_wrap_width() working around a bug of GtkComboBox. So
if anyone has a better fix and understand the issue, feel free to patch
(maybe GTK+ directly?). In the meantime, it works well enough. :-)

(cherry picked from commit 6dfca83c2a)
2018-12-19 15:14:23 +01:00
Kevin Stoffler
e17daf66e2 app: add gtk_combo_box_set_wrap_width for scale menu
(cherry picked from commit a9a979b2d0)
2018-12-19 13:46:34 +01:00
Ell
4e54ac9cdd app: update definition of "{cache,swap}-compressed" dashboard vars
Update the definition of the "cache-compressed" and "swap-
compressed" dashboard variables, to reflect the changes made by
GEGL commit gegl@dc22e997757ab91c180244d5290d094d2ea8572f.

(cherry picked from commit fda53f9c18)
2018-12-17 06:40:03 -05:00
Piotr Drąg
deb20726f1 Update Polish translation 2018-12-16 12:13:08 +01:00
Marco Ciampa
7c9629c01f Updated Italian translation 2018-12-13 15:56:03 +01:00
Ell
fd297f943b app: in the warp tool, blink behavior combo when the current behavior is invalid
In the warp tool, when the warp is empty and the current behavior
has no effect as a result (i.e., when it's ERASE or SMOOTH), show
an error message in the status bar, and blink the behavior combo
widget in the tool options, to hint at the source of the error.

(cherry picked from commit 7958387d54)
2018-12-12 11:23:49 -05:00
Ell
6f4e233cf0 app: in the warp tool, blink stroke frame when no events are selected
In the warp tool, when no stroke events are selected, blink the
stroke frame widget in the tool options, in addition to showing an
error message in the status bar, to hint at the source of the
error.

(cherry picked from commit 17cc44a7be)
2018-12-12 11:23:48 -05:00
Ell
a8ef7db616 app: s/GEGL_WARP_BEHAVIOR/GIMP_WARP_BEHAVIOR/
The enumerators of the GimpWarpBehavior enum, except for MOVE, had
a GEGL_ prefix, rather than a GIMP_ prefix, for some reason.

Change all of them to GIMP_.

(cherry picked from commit 2085cb4a37)
2018-12-12 11:23:48 -05:00
Ell
df475195d4 app: in gimp_widget_blink_cancel(), avoid redrawing non-blinking widget
Since commit fe139e5662, when
blinking a widget, we cancel blinking for all its ancestors.  Avoid
redrawing all the ancestors as a result, unless they're actually
blinking.  This prevents some noticeable lag when blinking a
widget.

(cherry picked from commit 5a2dee29d7)
2018-12-10 14:19:40 -05:00
Ell
a8841a3c07 app: in all tools, blink lock box when the current item is locked
In all tools, when the current item can't be edited due to its lock
mask, use gimp_tools_blink_lock_box(), added in the previous
commit,to blink the lock box of the corresponding dockable, in
addition to showing an error message in the status bar, to hint at
the source of the error.

(cherry picked from commit 637105b962)
2018-12-10 08:57:14 -05:00
Ell
c237ee3c23 app: add gimp_tools_blink_lock_box()
Add gimp_tools_blink_lock_box() utility function, in a new
gimptools-utils.c file, which takes a GimpItem, and blinks the
GimpItemTreeView lock-box of the corresponding dockable.  This can
be used to hint that the item's lock toggles are preventing it from
being edited.

(cherry picked from commit 9bdaec3a49)
2018-12-10 08:57:11 -05:00
Ell
66a9dffa2e app: in gimp_widget_blink(), cancel blinking of parent widgets
When blinking a widget using gimp_widget_blink(), cancel the
blinking of all its ancestors, to reduce visual clutter.

(cherry picked from commit fe139e5662)
2018-12-10 08:55:43 -05:00
Ell
ace9b12205 app: in the paint tools, blink mode box when the current mode is invalid
In the paint tools, when the current paint mode is invalid, i.e.,
when it requires an alpha channel, but the the current drawable has
no alpha channel, or its alpha channel is locked, blink the paint-
mode box widget in the tool options, in addition to showing an
error message in the status bar, to hint at the source of the
error.

(cherry picked from commit 464bf1b0a9)
2018-12-10 08:55:43 -05:00
Ell
a42f2cb2e7 app: in the transform tools, blink type box when there's no item to transform
In the transform tools, when there is no item of the selected type
to transform, blink the move-type box widget in the tool options,
in addition to showing an error message in the status bar, to hint
at the source of the error.

(cherry picked from commit 17412aa234)
2018-12-10 08:55:42 -05:00
Ell
92c6f87391 app: in the move tool, blink type box when there's no item to move
In the move tool, when there is no item of the selected type to
move, blink the move-type box widget in the tool options, in
addition to showing an error message in the status bar, to hint at
the source of the error.

(cherry picked from commit c9bc3d7a09)
2018-12-10 08:55:41 -05:00
Ell
02ccab9e7e app: in the selection tools, blink mode box when the current operation is invalid
In the selection tools, when the selected operation is invalid,
i.e., when trying to subtract-from or intersect-with an empty
selection, blink the selection-mode box widget in the tool options,
in addition to showing an error message in the status bar, to hint
at the source of the error.

(cherry picked from commit f990e41609)
2018-12-10 08:55:41 -05:00
Michael Natterer
95deaa7bf3 app: clean up size group code in the preferences dialog
(cherry picked from commit 0efa00932b)
2018-12-10 12:18:51 +01:00
Richard McLean
acc15e614a Issue #1299 - Add selection of default export file type
Patch cleaned up by Alexandre Prokoudine and Michael Natterer.

(cherry picked from commit bfbad0a5ca)
2018-12-10 12:17:00 +01:00
Marco Ciampa
e68fdd537d Updated Italian translation 2018-12-09 19:47:19 +01:00
Piotr Drąg
d797592223 Update Polish translation 2018-12-09 12:23:02 +01:00
Ell
a2c20b1539 Issue #2635 - Segfault when using measuring tool
In gimp_tool_compass_update_angle(), use fuzzy comparisson when
determining whether to update the angle properties, to avoid
infinite recursion due to floating-point inaccuracies.  In
partcicular, on x86, when using the x87 FPU rather than SSE, the
floating-point registers are 80-bit, while the properties are
stored as 64-bit, which can create small discrepancies between the
calculated angles and the stored values.

(cherry picked from commit ad831dbc6d)
2018-12-08 06:03:54 -05:00
Marco Ciampa
ebe209f463 Fixed term for unsharp mask in italian 2018-12-07 12:12:02 +01:00
Marco Ciampa
18bc8b8933 Updated Italian translation 2018-12-07 10:14:18 +01:00
Jehan
bffe0c6965 NEWS: update. 2018-12-07 00:51:13 +01:00
Jehan
96d67fd1b2 Issue #2495: many tablets broken by GIMP 2.10.8.
We had many reports of tablets from various brands (Huion, Gaomon,
XP-Pen…) broken in the last release (though working fine when
downgrading to 2.10.6). Latest Huion drivers seem to fix the issue
(according to at least one report), but this is not the case for other
tablets.

Though unable to test myself, provided stderr logs indicate that we hit
the case when 2 devices with the same name are registered. Therefore
this commit is basically reverting commit 717c183a3e (though keeping and
completing the comments). I don't think there is an ultimate solution
here but with this regression, experience shows us there seem to be a
lot more breakage when overwriting the device with newer occurences (at
least on Windows). It is unclear though if commit 717c183a3e was also
supposed to fix another case actually encountered. If so, we will need
to get an even more advanced solution.

(cherry picked from commit ce24e16083)
2018-12-07 00:51:13 +01:00
Skal
741a659a12 webpmux: fix memory leak by calling WebPMuxDelete()
(cherry picked from commit e9200d2c00)
2018-12-07 00:51:13 +01:00
Jehan
ab851924dd plug-ins: make various usage of g_file_replace() safer.
As I did on app/, finalizing an output stream also implicitly flushes
and closes it. Hence if an export ended with an error, we'd end up with
incomplete data file (possibly overwriting a previously exported image).
Only 2 plug-ins I haven't fixed yet are file-tiff-io and file-gif-save.
The later one don't even clean up its memory (which somehow is good here
as at least the output stream is never finalized hence sane files are
not overwritten in case of errors). As for the former (TIFF plug-in), it
doesn't even seem to have any error control AFAICS, apart from printing
error messages on standard error output.

(cherry picked from commit 66ec467217)
2018-12-07 00:51:13 +01:00
Jehan
48e14ef3b9 app, libgimpconfig: make various usage of g_file_replace() safer.
When an error occurs, we want to prevent overwriting any previous
version of the file by incomplete contents. So run
g_output_stream_close() with a cancelled GCancellable to do so.
See also discussion in #2565.

(cherry picked from commit 613bf7c5ab)
2018-12-07 00:51:05 +01:00
Jehan
c9da44bed3 app: do no overwite XCF when an error occurred at saving time.
We can cancel a file overwrite at the last second when closing the
stream by setting a cancelled cancellable. Current code was simply not
closing the stream, but this was not enough as overwriting was happening
anyway (probably when finalizing).
This will allow much safe saving process since we would not be
overwriting a previously sane XCF file when an error occurred (either in
our code or a memory error, or whatnot).
See also discussion in #2565.

(cherry picked from commit 076b53511a)
2018-12-07 00:27:12 +01:00
Ell
61a181933c app: in GimpProjection, fix reinit. of current row when chunk height changes
In GimpProjection's chunk renderer, when the chunk height changes
in the middle of a row, we need to merge the remainder of the
current render area back into the renderer's update region, and
refetch the remainder of the row as the new render area, so that we
don't miss any unrendered area, or re-render already-rendered area,
due to the change in chunk height.  However, we should previously
fail to verify that the fetched area is, in fact, the remainder of
the current row, which could cause us to render the wrong area,
missing parts of the update region.

Fix this, by breaking up some of the chunk-renderer fucntions into
smaller sub-functions, and using those in order to explicitly set
the new render area to the remainder of the current row when the
chunk height changes.  This also avoids erroneously merging the
unflushed update region of the projection into the renderer's
update region.

(cherry picked from commit c9c2397b0d)
2018-12-06 08:51:04 -05:00
Ell
09863478db Revert "app: save images with fractional grid coordinates as version-10 XCFs"
Actually, image grids are saved as parasites, so even though older
GIMP versions round their coordinates upon loading, they maintain
the fractional coordinates when re-saving the image, hence bumping
the XCF version is not really necessary.

This reverts commit 13119efda33a7aba323dc13e6a56207a15a9f000.

(cherry picked from commit 411ddb7e48)
2018-12-05 13:52:56 -05:00
Ell
6ca294abe0 app: save images with fractional grid coordinates as version-10 XCFs
Fractional-coordinate support for image grids was added in commit
1572bccc9f, right before the
introduction of XCF version 10.  While images with fractional grid
coordinates can be loaded with earilier versions of GIMP, the grid
coordinates are rounded to the nearest integer.

Bump the minimal XCF version when saving images with fractional
grid coordinates to 10, which should have been the case all along.

(cherry picked from commit a90322278d)
2018-12-05 13:33:42 -05:00
Michael Natterer
0a2aac7ce1 libgimp: actually use the path expanded in the previous commit
(cherry picked from commit 799f6b14bb)
2018-12-05 00:35:15 +01:00
Michael Natterer
f6350e1b5a libgimp: need to expand config->swap_path in gimp_config()
or the file system will be polluted with folders called
"${gimp_cache_path}".

(cherry picked from commit cc835e877d)
2018-12-04 19:45:21 +01:00
Ell
b06ffe4334 Issue #2604 - XCF saving bug in xcf_save_buffer()
The NULL terminator of the tile-offset array of dummy buffer-levels
is erroneously written as an int32, instead of an offset, even in
version-11+ XCFs, in which offsets are 64-bit.

Since the dummy levels aren't actually used by GIMP, we're going to
keep these fields as int32 as an exception, in order to remain
consistent with existing XCFs, and just add a comment in the code,
and update the docs.  If we ever make use of the higher buffer
levels, we should change these fields to offsets, and bump the XCF
version.

(cherry picked from commit 2168d91cf7)
2018-12-04 12:09:55 -05:00
Michael Natterer
9baae75c5c Integrate the logic of profile saving with metadata saving
Add flag GIMP_METADATA_SAVE_COLOR_PROFILE to GimpMetadataSaveFlags and
initialize it from gimp_export_color_profile() in
gimp_image_metadata_save_prepare().

Adapt all plug-ins to use the bit from the suggested export flags and
pass the actually used value back to
gimp_image_metadata_save_finish().

This changes no behavior at all but creates hooks on the libgimp side
that are called with the context of an image before and after the
actual export, which might become useful later. Also, consistency
is good even though the color profile is not strictly "metadata".

(cherry picked from commit c667fdc5c0)
2018-12-04 17:40:12 +01:00
Alexandre Prokoudine
4cdfbee64e Update Russian translation 2018-12-04 01:32:54 +03:00
Alexandre Prokoudine
86fd5e3b67 Update Russian translation 2018-12-04 01:01:31 +03:00
Michael Natterer
a865f5e83e Issue #701 - Add the ability to embed the GIMP built-in sRGB profile...
...upon exporting an image

Add a "Save color profile" toggle and always honor it.

(partially cherry picked from commit 7f9379cb32)
2018-12-03 19:47:24 +01:00
Michael Natterer
b25117376b plug-ins: always save the color profile in file-psd
by using gimp_image_get_effective_color_profile() instead of just
_get_color_profile(). Don't look at the preference setting because PSD
should behave more like "save" than "export" and save everything.

(cherry picked from commit a35b243f9b)
2018-12-03 19:28:10 +01:00
Ell
fa74fe78f9 app: don't use direct-buffer fill when some components are masked
(cherry picked from commit 83250eb57c)
2018-12-03 09:54:18 -05:00
Ell
03a4fafe30 app: mark REPLACE and PASS_THROUGH modes as trivial
(cherry picked from commit f508ec8b89)
2018-12-03 09:54:18 -05:00
Michael Natterer
2f5bbe9416 Issue #701 - Add the ability to embed the GIMP built-in sRGB profile...
...upon exporting an image

Add a "Save color profile" toggle to the PNG dialog and always honor it.

(cherry picked from commit 7ed93452e8)
2018-12-03 13:03:14 +01:00
Michael Natterer
8a90d8b8b2 Issue #1297 - Unhide the items hidden in the Advanced drop-down file...
...export dialogs

Move most stuff out of the "Advanced" expander, only nerdish encoding
options are left there.

Issue #701: Add a "Save color profile" toggle which honors the default
value configured in preferences and always saves the profile when
enabled.

(cherry picked from commit 540cfa9611)
2018-12-03 12:32:26 +01:00
Ell
5b857dbb4b libgimpcolor, app, modules, plug-ins: remove GEGL_ITERATOR2 define
... it's no longer needed, since GEGL commit
gegl@9dcd2cde63f95a080bf16a58c10e9ffbdd99aace.

Partially reverts commits:

6fca9959c7
cc10af72cc
49c53568d7
8edbc0d491
29f63616d2
3a2014984d
ee48ec6877
4165a315d5
764085278f
b7633c722e
6ab12061b7
754a3c5b18
22b4b647bd
55b3438328
c6d23add65
f03a84d607
822f9f0d2b
95358ca1fa
cdda37f4ee
41e8035635
6761da42b2
fb5d7832a8
97ed7817d8
46e9036578
ea9c5e6a49
24fbdfb591
beb4ecb238
4b77831e03
fcf113a39c
567ffe94ff

(cherry picked from commit 053e5edc93)
2018-12-02 11:21:36 -05:00
Ell
edbda43028 app: add "direct" parameter to gimp_projection_flush_now()
Add a boolean "direct" parameter to gimp_projection_flush_now(),
which specifies if the projection buffer should only be invalidated
(FALSE), or rendered directly (TRUE).

Pass TRUE when flushing the projection during painting, so that the
affected regions are rendered in a single step, instead of tile-by-
tile.  We previously only invalidated the projection buffer, but
since we synchronously flush the display right after that, the
invalidated regions would still get rendered, albeit less
efficiently.

Likewise, pass TRUE when benchmarking the projection through the
debug action, and avoid flushing the display, to more accurately
measure the render time.

(cherry picked from commit dac9bfe334)
2018-12-02 10:15:36 -05:00
Piotr Drąg
fb2db7fe29 Update Polish translation 2018-12-02 12:41:42 +01:00
Ell
33a015abef app: fix iterated-over area in gimp_gegl_clear()
Iterate over the per-thread area, not the full region.

(cherry picked from commit 06923d0f65)
2018-12-02 03:48:35 -05:00
Ell
98bf8319b6 app: another fix to drawable direct-fill criterion
Don't use a direct-buffer fill when filling using a pattern with
alpha, even when the mode is subtractive.

(cherry picked from commit 42b82419b1)
2018-12-02 03:43:28 -05:00
Ell
61b1e7a348 app: fix drawable direct-fill criterion
Don't use a direct-buffer fill if the mode is subtractive, and the
composite region includes the source.  Currently, this never
actually happens.

(cherry picked from commit 660f53d300)
2018-12-02 03:34:02 -05:00
Ell
8a131e97f1 app: optimize simple whole-drawable fill/clear
In gimp_drawable_edit_fill(), when filling/clearing the whole
drawable, without any special compositing (i.e., when there's no
selection, the opacity is 100%, and the layer mode is trivial),
fill/clear the drawable's buffer directly, without using an
applicator.  This makes such operations much faster, especially in
big images.

(cherry picked from commit dd8268c0a2)
2018-12-02 03:11:22 -05:00
Ell
5d536afded app: add gimp_fill_options_fill_buffer()
... which is similar to gimp_fill_options_create_buffer(), however,
it fills an existing buffer, instead of creating a new buffer.

Implement gimp_fill_options_create_buffer() in terms of the new
function.

(cherry picked from commit 45fc4cb4f9)
2018-12-02 03:11:21 -05:00
Ell
2dda622a20 app: add gimp_layer_mode_is_trivial()
Add a TRIVIAL layer-mode flag, and corresponding
gimp_layer_mode_is_trivial() function, which indicates if the blend
function of a given layer mode is trivial, i.e., either never
modifies the source pixels (for non-subtractive modes), or always
clears the destination pixels (for subtractive modes).

(cherry picked from commit 8adec5fb3a)
2018-12-02 03:11:21 -05:00
Ell
c4e51b9a45 app: add gimp_gegl_clear()
... which clears the alpha component of a given buffer region,
i.e., it makes the region transparent, while preserving color
information.  This corresponds to the "edit-clear" action.

(cherry picked from commit 2e3eab7fbd)
2018-12-02 03:11:20 -05:00
Ell
f7f4543416 app: in GimpPaintCore, align copied undo rect to tile grid
In gimp_paint_core_finish(), when copying the relevant region of
the cached undo buffer into a new buffer, align the region to the
buffer's tile grid, so that all copied tiles are COWed.  This
avoids lag when finishing a stroke.

(cherry picked from commit 861f356b63)
2018-12-02 03:11:20 -05:00
Ell
782d54a615 app: align drawable undo rectangle to tile grid
When creating a drawable undo from the drawable's buffer, align the
copied rectangle to the buffer's tile grid, so that all the copied
tiles are COWed, saving memory and gaining speed.

Add applied_x and applied_y fields to GimpDrawableUndo, specifying
the position at which to apply the applied_buffer, so that we apply
it in the right place, even if the undo rect has changed due to
alignment.

(cherry picked from commit bb9dd049fb)
2018-12-02 03:11:19 -05:00
Ell
6e82635d4f app: use gimp_gegl_rectangle_align_to_tile_grid() in gimp:buffer-source-validate
... instead of custom code.

(cherry picked from commit ce3a6c4fd6)
2018-12-02 03:11:18 -05:00
Ell
2b14355689 app: add gimp_gegl_rectangle_align_to_tile_grid()
... which expands a GeglRectangle, such that it's aligned to the
tile grid of a given GeglBuffer.

(cherry picked from commit 69e5f783c5)
2018-12-02 03:11:16 -05:00
Ell
0568490929 app: a few improvements to gimp-scratch
Simplify code a bit, and add branch-prediction annotations.

(cherry picked from commit f27b38808f)
2018-12-01 10:04:22 -05:00
Michael Natterer
54e93cefb3 Issue #1297 - Unhide the items hidden in the Advanced drop-down file...
...export dialogs

Remove the "Advanced" expanders from the PNG and TIFF export
dialogs. This does not reorder anything in the GUI yet, the
dialogs are still ugly.
2018-12-01 15:15:10 +01:00
Ell
a30087e83e app: sigh, another gimp-scratch link fix, in config/
That's the last one :)

(cherry picked from commit 67d595f651)
2018-12-01 08:27:44 -05:00
Ell
1a6281961e app: fix gimp-scratch linking in tests/ 2018-12-01 07:22:07 -05:00
Ell
5b5027dee1 app: fix gimp-scratch linking
(cherry picked from commit ae6bebb981)
2018-12-01 06:23:40 -05:00
Ell
806db2e64c app: #include <string.h> in gimp-scratch.h
... for memset().

(cherry picked from commit 8c9eb1c743)
2018-12-01 06:06:30 -05:00
Ell
59a3b9e5c0 app: fix definition signature of gimp_scratch_get_total()
(cherry picked from commit 5d1a79a34f)
2018-12-01 05:58:14 -05:00
Ell
595218f1d4 app: in Luminance mode, cache RGBA -> Y fish
(cherry picked from commit dbab0b557d)
2018-12-01 05:55:25 -05:00
Ell
963f036a4a app: in Luminance mode, replace VLAs with gimp-scratch
In the Luminance layer-mode, use the scratch allocator for
allocating temporary buffers, instead of using VLAs.
GimpOperationLayerMode already allocates data on the stack,
calculated as not to overflow the stack on any platform, so having
any of its descendants also allocate big buffers on the stack is
risky.

(cherry picked from commit 70b7316ebc)
2018-12-01 05:55:24 -05:00
Ell
c3ce696ce0 app: add scratch-total variable to the dashboard
Add a scratch-total variable to the dashboard's misc group, showing
the total amount of memory used by the scratch allocator.

(cherry picked from commit 698d1af798)
2018-12-01 05:55:24 -05:00
Ell
8593eb88fd app: add gimp-scratch allocator
gimp-scratch is a fast memory allocator (on the order of magnitude
of alloca()), suitable for small (up to a few megabytes), short-
lived (usually, bound to the current stack-frame) allocations.
Unlike alloca(), gimp-scratch doesn't use the stack, and is
therefore safer, and will also serve bigger requests, by falling-
back to malloc().

The allocator itself is very simple:  We keep a per-thread stack of
cached memory blocks (allocated using the normal allocator).  When
serving an allocation request, we simply pop the top block off the
stack, and return it. If the block is too small, we replace it with
a big-enough block.  When the block is freed, we push it back to
the top of the stack (note that even though each thread uses a
separate stack, blocks can be migrated between threads, i.e.,
allocated on one thread, and freed on another thread, although this
is not really an intended usage pattern.)  The idea is that the
stacks will ultimately stabalize to contain blocks that can serve
all the encountered allocation patterns, without needing to reisze
any of the blocks; as a consequence, the amount of scratch memory
allocated at any given time should really be kept to a minimum.

(cherry picked from commit a8a8655285)
2018-12-01 05:55:23 -05:00
Claude Paroz
60c7c2e937 Updated French translation 2018-12-01 11:08:04 +01:00
Claude Paroz
f217accbf4 Update French translation 2018-12-01 09:57:06 +00:00
Ell
d86d017980 app: in GimpBacktrace Linux backend, don't leak backtrace when dropping threads
Should have been part of commit
a29d040db5.

(cherry picked from commit 01f9409902)
2018-12-01 04:33:48 -05:00
Ell
31acea2cf7 app: in GimpBacktrace Linux backend, make blacklisted_thread_names const
(cherry picked from commit c749097dcc)
2018-12-01 03:52:36 -05:00
Ell
b493cb51f4 app: use gimp_async_add_callback_for_object() in various places
Use gimp_async_add_callback_for_object(), added in the previous
commit, instead of gimp_async_add_callback(), in cases where the
destructor of the object owning the async doesn't wait for the
async to finish.  This avoids leaking such ongoing asyncs on
shutdown, during which gimp-parallel either finishes or aborts the
asyncs: if at this point an async has any registered callbacks, an
idle source is added for running the callbacks, extending the
lifetime of the async; however, since we're not getting back into
the main loop, the idle is never run, and the async (and any
associated resources) are never freed.

(cherry picked from commit 7c00cf498a)
2018-11-30 04:15:45 -05:00
Ell
34cb63a048 app: add gimp_async_add_callback_for_object()
... which is similar to gimp_async_add_callback(), taking an
additional GObject argument.  The object is kept alive for the
duration of the callback, and the callback is automatically removed
when the object is destroyed (if it hasn't been already called).

This is analogous to g_signal_connect_object(), compared to
g_signal_connect().

(cherry picked from commit 49fd2847ac)
2018-11-30 04:15:44 -05:00
Ell
9001d65804 app: unref async when removing last callback if idle is pending
In gimp_async_remove_callback(), if removing the last callback
while the callback idle-source is already pending, cancel the idle
source and unref the async object (the async is reffed when adding
the idle source.)

(cherry picked from commit a779dd3849)
2018-11-30 04:15:44 -05:00
Alexandre Prokoudine
d20efd357a Update NEWS 2018-11-29 00:09:02 +03:00
Ell
b0b541d670 app: use gimp_tile_handler_validate_validate() in gimp:buffer-source-validate
Use gimp_tile_handler_validate_validate(), added in the commit
before last, in gimp:buffer-source-validate, in order to pre-render
the necessary region of the buffer, instead of performing the
validation implicitly by iterating over the region.  This is both
simpler, and, more importantly, allows us to render the entire
region in a single chunk, instead of tile-by-tile, which can be
considerably more efficient, especially with high thread counts.

This essentially extends the dynamic sizing of rendered projection
chunks to layer groups, which are rendered through
gimp:buffer-source-validate, rather than just the main image
projection.

(cherry picked from commit 83dd94ba6a)
2018-11-28 13:27:01 -05:00
Ell
378dc07c7b app: use gimp_tile_handler_validate_validate() in GimpProjection
Use gimp_tile_handler_validate_validate(), added in the last
commit, in GimpProjection, in order to render the projection,
instead of separately invalidating the buffer, undoing the
invalidation, and then rendering the graph.  This is more
efficient, and more idiomatic.

(cherry picked from commit d6f0ca5531)
2018-11-28 13:27:00 -05:00
Ell
a4fb3e11d6 app: add gimp_tile_handler_validate_validate()
... which validates a given rectangle directly into the buffer,
possibly intersecting it with the dirty region.  This is more
efficient than either invalidating, un-invalidating, and rendering
a given rect, as we're doing in GimpProjection, or validating the
buffer tile-by-tile, as we're doing in gimp:buffer-source-validate.

(cherry picked from commit 82a60997d4)
2018-11-28 13:27:00 -05:00
Ell
50b3c2b8ba app: add GimpTileHandlerValidate::validate_buffer() vfunc
... which is similar to the ::validate() vfunc, however, it should
render the result to the provided GeglBuffer, instead of to a
memory buffer.

Provide a default implementation, which uses
gegl_node_blit_buffer() if the default ::validate() implementation
is used, or, otherwise, calls uses
gegl_buffer_linear_{open,close}(), and passes the returned memory
buffer to ::validate().

(cherry picked from commit 0ad41cfe0c)
2018-11-28 13:26:59 -05:00
Ell
cc81f66f12 app: add GimpTileHandlerValidate::{begin,end}_validate() vfuncs
Add begin_validate() and end_validate() virtual functions, and
corresponding free functions, to GimpTileHandlerValidate.  These
functions are called before/after validation happens, and should
perform any necessary steps to prepare for validation.  The default
implementation suspends validation on tile access, so that the
assigned buffer may be accessed without causing validation.

Implement the new functions in GimpTileHandlerProjectable, by
calling gimp_projectable_begin_render() and
gimp_projectable_end_render(), respectively, instead of calling
these functions in the ::validate() implementation (which, in turn,
allows us to use the default ::validate() implementation.)

In GimpProjection, use the new functions in place of
gimp_projectable_{begin,end}_render().

(cherry picked from commit 5a623fc54b)
2018-11-28 13:26:58 -05:00
Ell
18815512f2 app: avoid starting the chunk renderer while finishing drawing a projection
In gimp_projection_finish_draw(), make sure we don't accidentally
re-start the chunk renderer idle source while running the remaining
iterations, in case the chunk height changes, and we need to reinit
the renderer state.

(cherry picked from commit 8a47b68194)
2018-11-28 13:26:58 -05:00
Ell
6ab3ecaca2 app: avoid flushing bufferless projections
Don't needlessly flush projections whose buffer hasn't been
allocated yet.  This can happen when opening an image, in which
case the image is flushed before its projection has a buffer.

(cherry picked from commit b07f810273)
2018-11-28 13:26:57 -05:00
Daniel Mustieles
22b11da891 Update Spanish translation 2018-11-28 15:17:18 +00:00
Marco Ciampa
fc7d61a6ea Updated Italian translation 2018-11-24 18:31:39 +01:00
Ell
90292953c3 app: in gimp-parallel, boost priority of waited-upon asyncs
When an async that was created through
gimp_parallel_run_async[_full](), and whose execution is still
pending, is being waited-upon, maximize its priority so that it
gets executed before all other pending asyncs.

Note that we deliberately don't simply execute the async in the
calling thread in this case, to allow timed-waits to fail (which is
especially important for gimp_wait()).

(cherry picked from commit 62baffed98)
2018-11-24 11:07:13 -05:00
Ell
8222124a96 app: add GimpAsync::waiting signal
... which is emitted when the async is being waited-upon, blocking
execution.

(cherry picked from commit 965da12b35)
2018-11-24 11:07:12 -05:00
Ell
79a44eda6d app: more gimp-parallel fixes
Fix indentation in gimp-parallel.{cc,h}.

Remove unused typedefs in gimp-parallel.h.

s/Gimp/Gegl/ in function-type cast in gimphistogram.c.

(cherry picked from commit 05a4437d9a)
2018-11-24 11:05:10 -05:00
Ell
8fe6645950 app: indentation fix in gimp-parallel.cc
(cherry picked from commit 115fc174f2)
2018-11-24 11:05:10 -05:00
Ell
d4312fd5f7 app: remove gimp_parallel_distribute(); use gegl_parallel_distribute()
The parallel_distribute() family of functions has been migrated to
GEGL.  Remove the gimp_parallel_distribute() functions from
gimp-parallel, and replace all uses of these functions with the
corresponding gegl_parallel_distrubte() functions.

(cherry picked from commit 2736cee577)
2018-11-24 11:05:10 -05:00
Ell
ac4ded137f configure.ac: require GEGL >= 0.4.13
(cherry picked from commit 43e3939d4a)
2018-11-24 11:05:10 -05:00
Oleksii Samorukov
63e86da6f3 tests: OSX - activate GIMP window when tests are running
If window is not focused gimp_test_utils_synthesize_key_event would
fail.
2018-11-23 23:15:25 +01:00
Oleksii Samorukov
9ae19eb8ec tests: implement gimp_test_utils_synthesize_key_event on OSX/QUARTZ 2018-11-23 23:06:12 +01:00
Oleksii Samorukov
40a08dcf48 tests: fix clang compilation error on test-eevl.c 2018-11-23 22:32:32 +01:00
Ell
4b647c52e1 Issue #2553 - Can't Move Imported or Pasted Path
Initialize the X/Y tilt fields of improted/pasted path control
points to 0, instead of 0.5, which is the normal value for these
fields in paths.  This avoids calculating bogus distances when
trying to pick the path, causing picking to fail.

(cherry picked from commit 0a123a81a3)
2018-11-23 08:48:41 -05:00
Alex Samorukov
62c52742cd do not activate OSX menu if tests are running to prevent crash 2018-11-23 11:39:21 +01:00
Alex Samorukov
d650e9f81f add to fix test link on OSX 2018-11-23 10:45:39 +01:00
Alexandre Prokoudine
a3b5a7fb32 Update NEWS 2018-11-23 01:51:29 +03:00
Alex Samorukov
465b4b10fb Enable hires retina support for the GTK2/OSX build 2018-11-22 13:45:30 +00:00
Ell
0a39f362b5 libgimpbase, libgimp, app: pass misc. GEGL config to plug-ins
Pass the GEGL tile-cache size, swap path, and thread-count to plug-
ins as part of their config, and have libgimp set the plug-in's
GeglConfig accordingly upon initialization.
2018-11-19 17:09:59 -05:00
Ell
7de86c63e6 libgimpbase: add _gimp_wire_{read,write}_int64()
... for reading/writing guint64 data in the wire protocol.

(cherry picked from commit 77c24ca16c)
2018-11-19 17:09:53 -05:00
Ell
4d542a4ba8 libgimpbase: don't leak GPConfig::icon_theme_dir
(cherry picked from commit 9afa42ab91)
2018-11-19 17:09:52 -05:00
Ell
46d4768699 libgimpwidgets: install gimpspinbutton.h
Added in commit 7ab9ee2686.

(cherry picked from commit 03a928409a)
2018-11-19 09:28:58 -05:00
Michael Natterer
ab48f12fd6 Issue #2224 - Use the "Swap folder" setting for the GEGL cache
Move swap/cache and temporary files out the GIMP user config dir:

libgimpbase: add gimp_cache_directory() and gimp_temp_directory()
which return the new default values inside XDG_CACHE_HOME and the
system temp directory. Like all directories from gimpenv.[ch] the
values can be overridden by environment variables. Improve API docs
for all functions returning directories.

Add new config file substitutions ${gimp_cache_dir} and
${gimp_temp_dir}.

Document all the new stuff in the gimp and gimprc manpages.

app: default "swap-path" and "temp-path" to the new config file
substitutions. On startup and config changes, make sure that the swap
and temp directories actually exist.

In the preferences dialog, add reset buttons to all file path pages.

(cherry picked from commit a29f73bd9a)
2018-11-18 18:27:05 +01:00
Piotr Drąg
5bab4a2c4a Update Polish translation 2018-11-18 13:23:40 +01:00
Alexandre Prokoudine
dc7bbe971d Update NEWS 2018-11-16 03:14:14 +03:00
Alexandre Prokoudine
70a1534842 Help menu: various updates
Commented out the inactive plug-ins registry: no point linking to a dead page.

Added links to the roadmap page, main wiki page, and the bug tracker. Placed
the link to the bug tracker one level up from '<Image>/Help/GIMP Online'
to make it more visible.
2018-11-16 03:10:33 +03:00
Ell
6f61a7d431 configure.ac: require babl >= 0.1.60
(cherry picked from commit 3821ce4bcd)
2018-11-15 12:56:13 -05:00
Ell
5b93eee52a app: in scale tool, scale around center even when using numeric input
In the scale tool, when the "around center" option is toggled,
scale the item around its center not only through canvas
interaction, but also when entering width/height values through the
tool GUI.

(cherry picked from commit 786bfa5171)
2018-11-15 12:53:11 -05:00
Jernej Simončič
4991603b2a Installer: remove LIBTHAI_DICTDIR environment variable (no longer needed, see https://gitlab.gnome.org/GNOME/gimp/issues/2496#note_365235 ) 2018-11-14 17:28:49 +01:00
Jehan
fd2008c5c2 NEWS: update. 2018-11-14 13:44:02 +01:00
Jehan
84ce89a9be Issue #2501: Confusing wording in "Export Image as PDF" dialog.
Nothing said what was going to be the order of the page, except by
testing. Now there will be an explicit text, which will be automatically
updated when checking the "reverse order" box.

(cherry picked from commit afe1de950f)
2018-11-14 13:42:36 +01:00
Alexandre Prokoudine
cee9a1a1c6 Update NEWS 2018-11-14 12:27:54 +00:00
ONO Yoshio
cd55cb3102 Issue #2489 - Gimp 2.10.8 layer menu text along path
Related #2064 - text along path not working with vertical text.

(cherry picked from commit a2da1cd596)
2018-11-13 12:56:25 +09:00
Adam Ostruszka
ec300891d3 Update Czech translation 2018-11-13 01:21:31 +03:00
Daniel Korostil
920f66a420 Update Ukrainian translation 2018-11-12 20:08:58 +00:00
Daniel Korostil
936d952312 Update Ukrainian translation 2018-11-12 20:07:47 +00:00
Ell
9ae2e4932d configure.ac: escape backslash chars in compiler version string
When constructing CC_VERSION, escape backslash characters in the
compiler version string, so that they don't get interpreted as
escape sequences by the compiler.  This is especially important on
Windows, where the version string of MinGW may contain backslash
characters as part of paths.

(cherry picked from commit c0b107531e)
2018-11-11 05:49:12 -05:00
Ell
7ca3fe6576 Issue #2473 - Transforming a layer doesn't properly transform its mask
In gimp_drawable_transform_buffer_affine(), avoid modifying the
clipping mode when transforming layer masks, since this function is
used (among other things) to transform layer masks together with
their layer, in which case they should use the same clipping mode
as the layer.

This fixes a regression introduced by commit
2ae823ba2b, causing layer masks to be
transformed with a mismatched clipping mode during layer
transforms, leading to discrepencies between the transformed layer
and the transformed mask.

This commit merely reverts the necessary part of above commit,
fixing the regression, though note that this code is really up for
some serious refactoring: the logic for determining which clipping
mode to use when is spread all over the place.

(cherry picked from commit 45fc30caa7)
2018-11-11 02:28:25 -05:00
Jernej Simončič
47103dc28f Installer: remove lib\gegl-0.2 2018-11-10 22:20:12 +01:00
Jernej Simončič
ed08c1eded Installer: include debug symbols for babl/gegl DLLs in lib\* 2018-11-10 22:05:42 +01:00
Ell
3a584ca151 Issue #2470 - Spacing between grid lines does not stay at 1px ...
... as I would like it to.

Use GimpSpinButton, added in the previous commit, in GimpSizeEntry,
instead of GtkSpinButton.  This avoids updating the spin-buttons'
adjustment values when they lose focus, truncating the value if it
can't be accurately displayed using the corresponding spin-button's
digit count.  Since size-entries can have multiple spin-buttons
using different units, this prevents the value from changing when
entring a value using one unit, and then shifting the focus to, but
not changing, another unit.
2018-11-10 06:57:54 -05:00
Ell
d928ed7252 libgimpwidgets: add GimpSpinButton
GimpSpinButton is a drop-in replacement for (and a subclass of)
GtkSpinButton.  Unlike GtkSpinButton, it avoids updating the
adjustment value when losing focus, unless the entry text has
changed.  This prevents accidental loss of precision, when the
adjustment value can't be accurately displayed in the entry.

Note that libgimpwidgets already defines a (deprecated)
gimp_spin_button_new() function.  This commit stays compatible with
the old function, by defining GimpSpinButton's _new() function as
gimp_spin_button_new_(), and defining a variadic
gimp_spin_button_new() macro, which expands to either the old or
the new function, based on the number of arguments, so that either
function can be used transparently as gimp_spin_button_new().  This
is all gone in master.
2018-11-10 06:57:54 -05:00
Ell
934d896fa8 tools: in performance-log-viewer.py, fix "function()" predicate ...
... when not specifying a thread-ID

(cherry picked from commit 84227fbfec)
2018-11-10 02:52:52 -05:00
Ell
dd52d8d7a5 app: in performance logs, add new-lines between variable definitions
(cherry picked from commit c7f1730702)
2018-11-10 02:52:51 -05:00
Jernej Simončič
3fd5b50f94 Installer: proper fix for libthai 2018-11-10 00:45:43 +01:00
Jernej Simončič
e40a5b9d4c Installer: remove Thai locale temporarily (causes crash on Windows 7) 2018-11-09 22:39:08 +01:00
Jernej Simončič
628a5ecb79 Installer: include extra debug symbols, Ghostscript 9.25 2018-11-09 22:29:32 +01:00
Ell
8e1e6dfb83 tools: add performance-log-coalesce.py to EXTRA_DIST
(cherry picked from commit c61138f8f0)
2018-11-09 02:23:46 -05:00
Michael Natterer
ee8f162151 configure.ac: post-release version bump to 2.10.9 2018-11-08 20:33:33 +01:00
Michael Natterer
a967e8d2c2 configure.ac: bump versions for the 2.10.8 release 2018-11-08 19:34:21 +01:00
Ell
3b07dc1f57 devel-docs: another typo fix in performance-logs.md TOC
:P

(cherry picked from commit 662636041c)
2018-11-08 11:00:08 -05:00
Ell
f8dda0d8eb devel-docs: fix typo in performance-logs.md TOC
(cherry picked from commit 5a077649f9)
2018-11-08 10:17:58 -05:00
Jehan
679e341285 Issue #2431: After coloring a selection and exporting to PDF, file...
... only shows the color (and nothing else) when "Convert bitmaps to
vector graphics where possible" was set.

This is because gimp_drawable_histogram() only checks selected pixels.
So let's make sure we work on a duplicate of the image so that we can
safely remove the selection before processing the export.
2018-11-08 15:24:42 +01:00
Ell
4cc0096450 themes: fix Dark theme tree-view selected text color during editing
In all themes, fix the color of selected text, while editing a
tree-view's item text (such as when renaming a layer), by
overriding tree-view specific styling with the global text-entry
style, for nested text entries inside tree-views.  The text would
previously use the same color as the selection background, making
it unreadable.

This issue affects the Dark and Gray themes, although this fix only
takes care of the Dark theme.
2018-11-08 07:22:55 -05:00
Ell
e23ce84dc0 devel-docs: fix typo in performance-issue screenshot
Gah :)
(cherry picked from commit 49375a3def)
2018-11-08 05:49:46 -05:00
Massimo Valentini
9cb1b66163 Issue #2454: recent libwmf uses pkg-config.
(cherry picked from commit df4e35a846)
2018-11-08 11:45:00 +01:00
Ell
5c51ecba31 devel-docs: fix typo in performance-logs/Makefile.am
(cherry picked from commit baa8aadc83)
2018-11-08 04:24:53 -05:00
Ell
805c5cc8a8 devel-docs: add performance-logs documentation
Add devel-docs/performance-logs/performance-logs.md, which
describes how to record and view performance logs, and how to
report perofrmance-related issues.

(cherry picked from commit fa9161e4f2)
2018-11-08 03:53:40 -05:00
Jehan
4e58d00eae libgimpmath: fix typo in various places: s/orthognal/orthogonal/.
(cherry picked from commit 4dc45f9658)
2018-11-07 23:40:53 +01:00
Jehan
b5e26f0399 libgimpbase: just remove a small typo in a doc comment.
(cherry picked from commit 1c9775d7bd)
2018-11-07 23:39:58 +01:00
Ell
fafeb7bf07 app: a few improvements to the GimpBacktrace Linux backend
Blacklist the "threaded-ml" thread, which seems to mask the
backtrace signal.

Improve signal-handler synchronozation, to avoid segfaulting when
giving up on waiting for all threads to handle the signal.
Furthermore, when one or more threads fail to handle the signal in
time, return a GimpBacktrace instance with backtraces for all the
other threads, and with empty backtraces for all the non-responding
threads, instead of returning NULL and leaking the allocated
instance.  Don't blacklist threads that failed to handle the signal
in time, and instead shorten the wait period for handling the
signal, and yield execution during waiting to lower the CPU usage.

(cherry picked from commit a29d040db5)
2018-11-07 14:26:40 -05:00
Ell
9489b66eec tools: a few improvements in performance-log-viewer.py
In sample-search predicates, remove the "exclusive" parameter of
the "function()" function, and replace it with optional "id" and
"state" parameters, which limit the match to the call-stacks of
matching threads, as per the "thread()" function.

Sort the backtrace thread-list by thread ID.

(cherry picked from commit 0b2d41635a)
2018-11-07 14:26:39 -05:00
Ell
3fdb5b32f7 tools: in performance-log-expand.py, preserve threads with empty stacks
... which can be present in logs since last commit.

(cherry picked from commit fb95d3b86e)
2018-11-07 14:26:39 -05:00
Ell
645e30e641 app: a few fixes to performance-log backtrace output
Fix delta-encoding of performance-log backtraces in certain cases,
and distinguish between empty call-stacks and removed threads.

(cherry picked from commit eec1e1f189)
2018-11-07 14:26:38 -05:00
Jehan
7c7e7c6012 desktop: update release date.
Still hope for tonight! Will it happen?! :-)

(cherry picked from commit 2c4831f90b)
2018-11-07 17:02:13 +01:00
Ell
ee3c6a9323 app: don't let image component mask affect channel colors
Connect GimpImage's gimp:mask-components node to the layers node
*before* connecting the channels node, so that the image's
component mask doesn't affect the channel colors, as is the case in
2.8.

(cherry picked from commit 56920dcdbf)
2018-11-04 13:24:05 -05:00
Ell
bc3847e851 app: avoid allocating empty tempbuf for drawable previews
In gimp_view_renderer_drawable_render(), make sure the preview size
is always at least 1x1.

Fixes commit 8009ea342a.

(cherry picked from commit 963322fdd4)
2018-11-03 04:30:23 -04:00
Ell
a4894b54ad tools: in performance-log-viewer.py, show variable descriptions
In the preformance-log viewer, show instrumentation-variable
descriptions as tooltips for the corresponding treeview rows.

(cherry picked from commit 21b36cd864)
2018-11-03 04:17:56 -04:00
Ell
b8862acee9 app: include variable descriptions in performance logs
Include instrumentation-variable descriptions in the var-defs
section of performance logs, so that they can be displayed
alongside their names when viewing the log.

(cherry picked from commit 646208eff0)
2018-11-03 04:17:55 -04:00
Ell
5456226c99 app: simplify drawable preview rendering
Simplify gimp_view_renderer_drawable_render(), by consolidating
common code paths.  In particular, when rendering the preview as
part of an image, always crop the preview to the bounds of the
image, even when downscaling, to avoid unnecessarily downscaling/
convering cropped-out regions.  We previously only did this when
upscaling the preview by a factor of 2 or more; whatever the reason
for this used to be, it's no longer there.

(cherry picked from commit 8009ea342a)
2018-11-03 04:06:17 -04:00
Ell
4f27efc4a0 Issue #2436 - Crash after downsizing canvas
In gimp_view_renderer_drawable_render(), avoid overflow in preview-
area calculation.  This prevents erroneously setting 'scaling_up'
to FALSE while upscaling the drawable by a very large amount, which
can lead to the creation of a very large GimpTempBuf for the
preview, causing memory allocation to fail.

(cherry picked from commit 0cdbe91e5a)
2018-11-02 21:44:10 -04:00
Rodrigo Lledó
9dadd2ad9e Update Spanish translation 2018-11-02 10:46:05 +00:00
Rodrigo Lledó
c447de9717 Update Spanish translation 2018-11-02 10:45:44 +00:00
Jehan
911d3945eb Issue #2160: Exporting to PCX results in a warped file.
Add line data padding when necessary.
Additionally I realize we should convert to little-endian after checking
the bytesperline oddness (this bug was most likely unnoticed until now
as most desktop proc are little endian now anyway).

(cherry picked from commit 5d319b77bf)
2018-11-01 22:24:30 +01:00
Piotr Drąg
b5a8a1fb2b Update Polish translation 2018-11-01 16:35:00 +01:00
Michael Natterer
a33a629bd9 Issue #2379 - Crash on saving
file_save(): make sure we always set an error on failure

file_save_dialog_save_image(): additionally, check that "error" exists
before dereferencing it.

(cherry picked from commit c55f2308e1)
2018-10-31 23:52:13 +01:00
Ell
ed7f9454c1 devel-docs: add "step" blending function to GGR format spec
(cherry picked from commit 026fe766cd)
2018-10-30 11:03:38 -04:00
Tobias Ellinghaus
7b4577a0e4 file-pnm: Remove clamping when loading PFM files
(cherry picked from commit bfcb7fc593)
2018-10-30 13:38:46 +01:00
Daniel Korostil
f63a7b293f Update Ukrainian translation 2018-10-29 12:10:03 +00:00
Ell
13ee89d491 app: fix tests for new show-tabs option
In app/tests, add the show-tabs pref, added in commit
1ca2d74411, to the expected sessionrc
files.

(cherry picked from commit 4113aaad69)
2018-10-27 05:43:18 -04:00
Ell
8a5ee944f7 Issue #2405 - Rotation center shifts by half a pixel ...
... the second time you do a 180 degrees rotation

In gimp_transform_resize_adjust(), nudge the transformed layer
boundary by EPSILON toward the center, to avoid enlarging the layer
unnecessarily, as a result of numeric error amplified by rounding,
when the tranformed boundary should land on integer coordinates.
In particular, this avoids enlarging the layer when rotating by 180
degrees.

(cherry picked from commit c271992aa0)
2018-10-27 00:14:51 -04:00
Alexandre Prokoudine
f46de793ae Update Russian translation 2018-10-26 01:55:59 +03:00
Alexandre Prokoudine
bd99d8e680 Fix Russian translation 2018-10-26 01:25:58 +03:00
Alexandre Prokoudine
b7766060ee Merge branch 'gerasimenko.olesya/gimp-update_russian_translation' into gimp-2-10 2018-10-26 01:21:38 +03:00
Anders Jonsson
99e1de90a6 Update Swedish translation 2018-10-25 19:23:44 +00:00
Piotr Drąg
d7ba5f6b2c Update Polish translation 2018-10-25 19:25:24 +02:00
Olesya Gerasimenko
02ccdf0f07 Updated Russian translation 2018-10-25 16:52:50 +03:00
Michael Natterer
c7dd4d8dd3 Issue #2235 - Color reset/swap keyboard shortcuts not discoverable...
...via hover tooltips

Use the GtkWidget::query_tooltip() signal on GimpFgBgEditor to emit an
own signal "tooltip" that has the hovered widget area as parameter.

Connect to GimpFgBgEditor::tooltip() in gimptoolbox-color-area.c and
set separate tooltips on the widget's areas, including the shortcuts
for "Swap colors" and "Default colors".

(cherry picked from commit ae9d84dd22)
2018-10-25 14:58:57 +02:00
Daniel Korostil
3f7ca2b28a Update Ukrainian translation 2018-10-25 11:05:02 +00:00
Marco Ciampa
7e77d3fc32 Some small fixes in Italian installer translation 2018-10-25 11:10:39 +02:00
Jernej Simončič
dde5de7340 Installer: don't scan recursively for configuration override files 2018-10-24 20:50:49 +02:00
Marco Ciampa
43def2f1aa Updated Italian translation 2018-10-24 12:44:49 +02:00
Marco Ciampa
6cf04bef6d Updated Italian translation 2018-10-24 12:37:23 +02:00
Oleksii Samorukov
7dbb9fee3d Fix compilation on Mac 10.6 and 10.7 (#2112) 2018-10-24 10:37:36 +02:00
Piotr Drąg
62eabad7a9 Update Polish translation 2018-10-23 21:23:18 +02:00
Ell
f6df603471 app: use "step" blending function in "FG to BG (Hardedge)" gradient
Use a single segment with a "step" blending function, added in the
previous commit, instead of two separate segments, for the "FG to
BG (Hardedge)" internal gradient.  This makes it simpler to change
its endpoint colors by modifying the gradient, instead of changing
the FG/BG colors.

(cherry picked from commit 84066ca26a)
2018-10-23 12:22:57 -04:00
Ell
0462734ffb Issue #2303 - Please add Constant type of gradient interpolation ...
... to make multi-color hard-edge gradient fills possible

Add a new "step" gradient-segment blending function, which is 0
before the midpoint, and 1 at, and after, the midpoint.  This
creates a hard-edge transition between the two adjacent color stops
at the midpoint.  Creating such a transition was already possible,
but required duplicating the same color at the opposing ends of two
adjacent stops, which is cumbersome.

(cherry picked from commit 68bf99e806)
2018-10-23 12:22:57 -04:00
Elle Stone
59682a1cb1 Issue #2345 - Add xyY to color sample readouts
Add xyY color space to the color spaces for sampling colors.

Also add code to xcf-load.c that makes sure the sample point loading
code handles unknown future GimpColorPickMode values (fall back to
PIXEL pick mode).

(cherry picked from commit 298cc57042)
2018-10-23 18:15:28 +02:00
Piotr Drąg
150b6c0501 Update Polish translation 2018-10-23 18:13:30 +02:00
Øyvind Kolås
20a1a31fc4 configure/app: depend on GEGL 0.4.12
(cherry picked from commit a39b4abfbc)
2018-10-23 14:39:43 +02:00
Sergio Jiménez Herena
360aee10d8 app: Add option in the windows menu to hide the image tab bar. 2018-10-22 20:41:29 +02:00
Michael Natterer
6564f4c713 Issue #2386 - Pattern fill with selection is shifted in 2.10
Add pattern offset parameters to gimp_fill_options_create_buffer() and
pass the selection's top-left corner so that pattern fills on the same
drawable are aligned.

(cherry picked from commit 38dcb73bfc)
2018-10-22 16:41:50 +02:00
Michael Natterer
4e103be4e5 Issue #2388 - CRITICAL: XMP Toolkit error 4: Invalid UTF-8 data byte
In gimp_metadata_add_xmp_history(), make sure the string returned by
strftime() has a terminating \0 after we mess with its format.

(cherry picked from commit 8421221b60)
2018-10-22 15:50:46 +02:00
Michael Natterer
7dc96c8f34 Issue #2332 - Marching ants from one image displayed on every tab
Seems we were drawing marching ants for hidden tabs ever since the
introduction of SWM, which is both a horrible waste of CPU time, and
also makes all selections visible on all displays on GTK+ 3.x.

Implement GtkWidget::unmap() in GimpDisplayShell and stop the ants
when the shell is unmapped.

(cherry picked from commit 1d43e2ff37)
2018-10-22 00:06:18 +02:00
Ell
8e6c7c10df tools: in performance-log-viewer.py, allow sorting profile by function name
In the performance-log viewer's profile view, allow sorting the
call-graph tree-views by function name, in addition to the
inclusive/exclusive frequencies.

(cherry picked from commit 4664fa73fb)
2018-10-21 03:37:35 -04:00
Marco Ciampa
20420b338c Updated Italian translation 2018-10-21 02:42:52 +02:00
Daniel Korostil
4efd6dfdbc Update Ukrainian translation 2018-10-20 19:18:41 +00:00
Ell
34f0cc3692 tools: in performance-log-viewer.py, fix percentage cell renderer
(cherry picked from commit 27dc9b815d)
2018-10-20 10:56:39 -04:00
Marco Ciampa
728534d416 Update Italian translation 2018-10-20 16:21:55 +02:00
Marco Ciampa
90fcfb0184 Update Italian translation 2018-10-20 15:37:12 +02:00
Michael Natterer
f95af9e571 docs, etc: regenerate system gimprc and its manpage 2018-10-20 11:31:29 +02:00
Liam Quin
8da246b2a3 Issue #1371 - Add title printf-like expando for export-clean and export-dirty
Add %Ex to print 'x' as export-clean indicator and %Nx for 'x' as
export-dirty indicator.

(cherry picked from commit 2e4b3ae05a)
2018-10-20 11:25:44 +02:00
Snehalata B Shirude
b20bb29148 Update Marathi translation 2018-10-20 07:03:42 +00:00
Jehan
6b1ff0dd96 Issue #1924: Tool options mysteriously lock up due to DND/quartz issues.
On macOS, the "drag-end" signal does not seem to be emitted in some
cases, which leaves dockables in an unsensitive state. Rather than
trying to fix GTK+2 which is half-maintained nowadays anyway, let's drop
the unsensitivity. As a comment notes, this was anyway only a visual
cue. Dragging dockables in GIMP 2.10 already shows a lot of other visual
cues, so this is redundant.
In case of drop failure, we also had to cleanup the icon widget and
detach the dockable. This can be handled by the "drag-failed" (which
hopefully work better on macOS).

As an additional improvement, I raise the newly created dockable window,
since this is the most likely behavior when you just detached a dock
(and I realize it usually appeared behind other GIMP windows, at least
on GNOME).

Note: this is a gimp-2-10 only fix as master relies on GtkNotebook DnD
code which (hopefully, as I haven't tested) doesn't have this issue. The
detached window behind other windows issue doesn't exist on master, at
the very least.
2018-10-19 21:46:54 +02:00
Ell
54dc73192f tools: in performance-log-viewer.py, visualize percentage in profile viewer
In the performance-log viewer's profile view, displasy in-line bar-
chart-like visualization of function and source-line sample
percentages, as part of the corresponding tree-view cells.

(cherry picked from commit 26ea334825)
2018-10-19 10:11:01 -04:00
Marco Ciampa
c36b1d0523 Small fix in Italian translation 2018-10-19 11:42:37 +02:00
Josef Ridky
56c8f8320d Issue #2087 - Issues discovered by coverity scan
Add missing fclose invocations and fix copy-paste issue.

This issues has been discovered by coverity scan proceeded by Red Hat.

Fixed some mistakes in the patch and added more fclose() (Mitch)
2018-10-19 11:24:48 +02:00
Øyvind Kolås
8bd365a109 NEWS: update 2018-10-18 18:48:42 +02:00
Michael Natterer
21214d5dd1 configure.ac: reorder the list of required versions in 2.10 too
so we can cherry-pick things again from master.
2018-10-18 18:35:02 +02:00
Øyvind Kolås
02936d9303 configure/app: depend on GEGL-0.4.10 2018-10-18 18:32:24 +02:00
Øyvind Kolås
793ae3f771 configure/app: depend on babl-0.1.58 2018-10-18 18:32:24 +02:00
Oleksii Samorukov
3adf4a4861 Fix plugin focus issues on osx
GTK/OSX does not automatically assign focus to the new windows (upstream 
issue), so activateIgnoringOtherApps is called. However, if it is called 
before gtk initialized it may cause number of focus issues.
2018-10-18 09:26:05 +02:00
Tim Sabsch
ee05ada0c4 Update German translation 2018-10-17 17:24:05 +00:00
Piotr Drąg
f0eabdc42f Update Polish translation 2018-10-16 21:08:05 +02:00
Marco Ciampa
d9ba60de4d Updated Italian translation 2018-10-16 16:06:39 +02:00
Ell
60c49c5682 Issue #2237 - export as, select file type (by extention) list problem
In gimp_file_proc_view_get_proc(), when there is no selected
procedure (which can happen, in particular, when searching the
list), return the "automatic" procedure and its corresponding name/
filter, if one exists, instead of bailing.

Additionally, in GimpFileDialog, use a match-all filter when
gimp_file_proc_view_get_proc() returns no filter, avoiding
CRITICALs/segfault.

(cherry picked from commit e26a220a6f)
2018-10-16 07:50:02 -04:00
Alan Mortensen
7d0d74912e Updated Danish translation 2018-10-15 14:14:59 +02:00
Alan Mortensen
efd1aca6fa Updated Danish translation 2018-10-14 20:14:18 +02:00
Michael Natterer
70611cb06a app: didn't push my latest version of the previous fix 2018-10-13 17:35:53 +02:00
Michael Natterer
130443a059 Issue #2210 - GIMP crashes on startup if usb mouse is present
In GimpDeviceInfo, make sure that the info->axes and info->keys arrays
always have info->n_axes and info->n_keys members. Also sync axes and
keys between GdkDevice and GimpDeviceInfo more often, and some
cleanup.

(cherry picked from commit 7adb6c26e5)
2018-10-12 20:18:23 +02:00
Alan Mortensen
e8f3751adc Updated Danish translation 2018-10-12 01:41:21 +02:00
Ell
65131b2c1b tools: fix performance-log viewer profile thread-filter
In performance-log-viewer.py, fix thread-state toggling in the
profile-view thread-filter popover, when not all threads are
included in the current selection.

(cherry picked from commit 43b492ff83)
2018-10-11 08:23:19 -04:00
Ell
b1cba6b142 app: always use libunwind for symbol names in GimpBacktrace Linux backend
In the GimpBacktrace Linux backend, always use libunwind, when
available, to find symbol names, even if dladdr() or libbacktrace
had already found one.  libunwind provides more descriptive names
in certain cases, and, in particular, full symbol names for C++
lambdas.

Note that, in some cases, this can result in a discrepancy between
the reported symbol name, and the corresponding source location.

(cherry picked from commit 72fc01742b)
2018-10-11 03:35:30 -04:00
Ell
397bbb29a9 app: fix gimp_wait() deadlock
In the GUI implementation of gimp_wait(), explicitly finish the
input-pipe async operation after the busy-dialog plug-in
terminates, to avoid the async callback function from being
repeatedly called, stalling the main thread.  Previously, this code
relied on gimp-parallel implicitly aborting the async operation,
but this is no longer the case since commit
4969d75785.

(cherry picked from commit 85b16b9eaa)
2018-10-11 02:26:08 -04:00
Ell
8c91206d55 tools: add performance-log-coalesce.py; use in performance-log-viewer
Add a new performance-log-coalesce.py tool, which groups together
performance-log address-map entries belonging to the same function
into a single symbol, by filling-in missing base symbol addresses.
The addresses are grouped such that each set of addresses
corresponding to a symbol of the same name, in the same source
file, are given the same (unique, but arbitrary) base address.
See the previous commit for why this is necessary.

This should work fine in most cases, however, for logs produced on
Windows, it can over-coalesce addresses belonging to different C++
lambda-functions in the same source file, since they all seem to be
given the same _FUN symbol name.

Use the new tool as part of the pipeline in performance-log-viewer.

(cherry picked from commit cb51ea981a)
2018-10-10 15:32:23 -04:00
Snehalata B Shirude
f314bbd515 Update Marathi translation 2018-10-10 18:22:20 +00:00
Ell
d0fdff7117 app: in GimpBacktrace Windows backend, avoid bogus symbol addresses
In the GimpBacktrace Windows backend, avoid reporting meaningless
symbol addresses when failing to retrieve meaningful ones.
Unfortunately, it seems that we never get symbol addresses for
symbols that have debug information, which negatively affects the
log viewer's call graph.  We're going to have to work around this.

(cherry picked from commit 52772cf3ff)
2018-10-10 10:02:09 -04:00
Ell
ca8bbd2e3d app: in GimpBacktrace Windows backend, set main-thread name
When initializing the GimpBacktrace Windows backend, set the name
of the current thread (which is assumed to be the main thread) to
the program's name, to match its name on Linux.  We normally rely
on the SET_THREAD_NAME exception to set thread names on Windows,
which isn't raised for the main thread.

(cherry picked from commit 52908f397f)
2018-10-10 10:02:09 -04:00
Marco Ciampa
58dccd6cf5 Updated Italian translation 2018-10-10 13:17:25 +02:00
Ell
93d1219507 app: improve description comment of GimpAsync
(cherry picked from commit ca6e4eb460)
2018-10-10 01:03:46 -04:00
Ell
15767a8896 Issue #2339 - Error while executing script-fu-ripply-anim
In ripply-anim.scm, correct the edge-type argument passed to
plug-in-displace.

(cherry picked from commit 5e6e979a00)
2018-10-09 19:31:27 -04:00
Ell
9f86b58a38 app: allow progressive execution of parallel async operations
In the gimp_parallel_run_async() family of functions, allow the
async callback to return without completing the async operation, in
which case the callback will be called again, until the operation
is either completed, or canceled, in which case it is aborted
(previously, returning from the callback without completing the
operation would cause it to be aborted.)  It is guaranteed that all
operations of the same priority will get a chance to run, even if
some of them contuinuosly return without completing.

This allows potentially time-consuming operations to yield
execution in favor of other same-priority operations, and, in
particular, of higher-priority operations, to avoid priority
inversion.  Essentially, this allows a simple form of cooperative
multitasking among async operations.

(cherry picked from commit 4969d75785)
2018-10-09 12:49:42 -04:00
Alexandre Prokoudine
64f881803a Update NEWS 2018-10-07 01:43:54 +03:00
Ell
e0e825580b Issue #2308 - Strange behavior when switching active layer during transform
Replace GimpTransformTool's 'drawable' field with an 'item' field,
and have GimpTransformGridTool set it to the active item, to which
the transformation is applied, during its initialization.  In
gimp_transform_tool_get_active_item(), return the value of the
transform tool's 'item' field, if not NULL, instead of the image's
active item.  This makes sure we apply that transform-grid tools
apply the transformation for the item for which they were
activated, even if the image's active item has changed.

(cherry picked from commit 3eaae58595)
2018-10-04 21:51:38 -04:00
Ell
32c2aa11df themes: fix check/radio buttons in tree views
Apply the check/radio-button style to GtkTreeView, so that
GtkCellRendererToggle picks the right check/radio-button graphic.
Otherwise, it falls back to a graphic that depends on the system
theme, and which may not play well with the current theme colors.

Note that this only affects the Dark theme; in the Light and Gray
themes, one of the KDE-hack styles "takes care" of this, but this
commit applies the same change to these themes anyway.
2018-10-04 21:51:30 -04:00
Daniel Korostil
eea3d3bbaa Update Ukrainian translation 2018-10-04 07:44:56 +00:00
Anders Jonsson
8b09905d73 Update Swedish translation 2018-10-02 21:31:18 +00:00
Tim Sabsch
7ac215dda3 Update German translation 2018-10-02 18:04:16 +00:00
Tim Sabsch
381ee94c8c Update German translation 2018-10-02 18:00:19 +00:00
Hannie Dumoleyn
c3f43465a4 Update Dutch translation 2018-10-02 07:22:17 +00:00
ONO Yoshio
41bacb7cbc plug-ins: fix a datasourcetype does not shown in metadata-editor.
Tag of DigitalSourceType has 5 entries, but the combobox shown
only 4 items.

(cherry picked from commit 3c92b5e00b)
2018-10-02 08:49:03 +09:00
Snehalata B Shirude
d2b5dff3d0 Update Marathi translation (plugins/script-fu/tags) 2018-10-01 13:56:23 +02:00
Snehalata B Shirude
b96672c3aa Update Marathi translation 2018-10-01 13:50:44 +02:00
Ell
e8fef315c5 app: in gimp-parallel, cancel ongoing async operations upon exit
When shutting-down gimp-parallel, cancel and/or abort any ongoing
and queued async operations, instead of finishing them (async
operations that already started executing will be canceled, but
execution will be blocked until they're finished.)  This is
especially important since we're shutting down gimp-parallel before
the destruction of data factories.  This commit causes any ongoing
async operations of the factories to be canceled on shutdown,
rather than waiting for them to finish normally.

(cherry picked from commit e46fdc714e)
2018-10-01 05:24:59 -04:00
Ell
7058aa259b app: add gimp_data_factory_data_cancel()
Add a new GimpData::data_cancel() virtual function, and a
corresponding gimp_data_factory_data_cancel() function.  This
function should cancel any ongoing async operations related to the
factory (i.e., included in its async set), and wait for the
operations to finish.  Provide a default implementation that simply
cancels and waits on the factory's async set.

Use this function to cancel any ongoing operations during factory
destruction, and in gimp_data_factory_data_free().

Override this function in GimpFontFactory, for which we can't
really cancel font loading, and simply cancel and clear the
factory's async set without waiting for loading to finish, making
sure that nothing happens (and, in particular, that the factory
isn't being accessed, since it might be already dead) when loading
does finish.

(cherry picked from commit 6bc0b3b8ad)
2018-10-01 05:24:59 -04:00
Ell
937f5ea0f0 app: don't depend on GimpData sort order for identifying internal data
In gimp_data_factory_data_foreach(), don't rely on internal
GimpData objects being sorted first (while this is currently true
for all types of GimpData, they may override the sort order.)

(cherry picked from commit 50bab438ce)
2018-10-01 05:24:59 -04:00
Alexandre Prokoudine
c0d00cba4a Update NEWS 2018-09-30 23:52:46 +03:00
Jehan
8a91cde184 INSTALL: update mypaint-brushes repository (finally upstream!).
The MyPaint project now hosts the repository which was under my name
previously. Yeah!

(cherry picked from commit 5ac267820f)
2018-09-30 21:07:40 +02:00
Ell
c6f1196721 tools: in performance-log-viewer.py, add annotated source view
Add an annotated source view to the performance-log viewer's
profile view.  When selecting the [Self] entry of a function's
profile, for which source information is available and whose source
is found locally, a new column opens, showing the function's
source, annotated with sample statistics.  Header-bar buttons allow
navigation through the annotated lines, selection of all the
samples corresponding to a given line, and opening the text editor
at the current line.

(cherry picked from commit 88438c5055)
2018-09-30 09:01:38 -04:00
Ell
8624f3070e tools: in performance-log-view.py, don't change call-graph path ...
... when selecting a function's samples

Since we now preserve the call-graph path across state changes,
there's no need to explictly set the path after selecting a
function's samples in the profile view.

(cherry picked from commit b672f20075)
2018-09-30 09:01:38 -04:00
Ell
4358430050 tools: in performance-log-viewer.py, cache source file lookups
In the performance-log viewer, cache the results of source-file
lookups, to speed up future lookups.

(cherry picked from commit 97498017c0)
2018-09-30 05:37:25 -04:00
Ell
33269cc8ff tools: in performance-log-viewer.py, allow viewing source files ...
... in backtraces

In the performance-log viewer's backtrace viewer, show a document
icon next to stack frames with source-location information, whose
source file is found locally.  Clicking the icon opens the source
file in a text editor at the relevant line.

Two environment variables control this feature:

  - PERFORMANCE_LOG_VIEWER_PATH is a list of colon-separated
    directories in which to look for source files.  If this
    variable is undefined, the current directory is used.

  - PERFORMANCE_LOG_VIEWER_EDITOR is the command to use to launch
    the text editor, for editing a specific file at a specific
    line.  The special strings "{file}" and "{line}" are replaced
    with the filename and line-number, respectively.  If this
    variable is undefined, "xdg-open {file}" is used.

(cherry picked from commit 0f38709259)
2018-09-30 05:10:52 -04:00
Jehan
788eb090b8 plug-ins: add more generated files in .gitignore.
(cherry picked from commit cb892aa0e6)
2018-09-29 23:18:03 +02:00
Sergio Jiménez Herena
0839a55d51 plug-ins: pygimp: Add autogenerated python files to .gitignore 2018-09-29 21:04:44 +00:00
Anders Jonsson
d9cb86de83 Update Swedish translation 2018-09-29 22:18:54 +02:00
Ell
c44015a84e tools: in performance-log-viewer.py, handle infinities in sample graph
Don't take infinite values into account when calculating the
vertical scale of sample graphs, and rather display infinite values
as dashed lines at the top of the graph.

(cherry picked from commit 46e5e4d478)
2018-09-29 15:43:50 -04:00
Ell
fc77bf31bc app: avoid double-initialization of operation tools when changing layers
When re-activating an operation tool by clicking on a different
drawable while the tool is active, we re-call the corresponding
procedure to re-activate the tool, which implictly initializes it.
Avoid initializaing it explicitly in addition to that, since this
leads to the creation of a new config object by the filter tool,
while the GUI still refers to the old, now-dead, config object,
causing CRITICALs or segfaults when changing any parameter.

(cherry picked from commit a21667821c)
2018-09-29 14:31:52 -04:00
Ell
9b3c2e9b4e app: don't commit trivial warp transform
In the warp tool, don't commit a trivial (empty) transform.  This
is especially important now that exiting the tool through undo
causes it to get comitted (... with a trivial transform).

(cherry picked from commit d12dd3fb35)
2018-09-29 12:38:50 -04:00
Ell
943757c136 Issue #1180 - Warp tool aborts changes to layer A when ...
... changing layers and warping layer B

Add a new GimpToolControl::dirty_action field, which specifies the
tool action to perform when the a dirty event matching the tool
control's dirty mask occurs; this field defaults to HALT.  Apply
this action to the active tool in tool-manager in response to a
matching dirty event, instead of unconditionally halting the tool.
Likewise, use this action to stop the active tool in response to a
button-press event on a different drawable in the same image.

Set the dirty action of the gradient and warp tools to COMMIT, so
that they get comitted, rather than stopped, in cases such as
switching layers (including switching to/from quick-mask mode),
and, for the warp tool, changing the selection.

(cherry picked from commit ed20393f0e)
2018-09-29 12:38:50 -04:00
Alan Mortensen
498c3f5b06 Updated Danish translation of gimp-windows-installer 2018-09-29 17:44:09 +02:00
Alan Mortensen
2ce208c0f2 Updated Danish translation of gimp-plug-ins 2018-09-29 17:44:07 +02:00
Alan Mortensen
66acf6641c Updated Danish translation of gimp-libgimp 2018-09-29 17:44:06 +02:00
Alan Mortensen
e98dbc3d53 Updated Danish translation 2018-09-29 17:40:37 +02:00
Ell
2e47f8277c app: avoid applying buffer to drawable if application region is empty
In gimp_drawable_real_{apply,replace}_buffer(), bail if the
applcation region, after intersection with the drawable and mask
extents, is empty.  This avoids trying to create a GeglBuffer with
negative width/height.

(cherry picked from commit ae3c006293)
2018-09-29 10:27:26 -04:00
Ell
fce08d2af7 Issue #2287 - Weird things happen with dodge tool ...
... (some sort of corruption)

In gimp_drawable_real_replace_buffer(), adjust the processed buffer
and mask_buffer regions according to the changes made to the
application region, as calculated by intersecting it with the
drawable and mask extents.  This fixes wrong application position
when painting using the heal, dodge/burn, smudge, or convolve
tools, on a drawable whose origin is above/to the left of the
image's origin, and there's a selection active.

(cherry picked from commit a782acab57)
2018-09-29 10:27:26 -04:00
Ell
943f92a6ac Issue #2222 - Warp Transform doesn't commit changes upon saving ...
... the XCF file

Add a "saving" signal to GimpImage, which is emitted when the image
is about to be saved or exported (but before it's actually saved/
exported).  Connect to this signal in tool-manager, and commit the
current tool in response (unless its GimpToolControl::preserve is
TRUE).

(cherry picked from commit ae628a8664)
2018-09-29 02:40:27 -04:00
Ell
df265073e4 tools: in performance-log-viewer.py, retain call-graph path
In the performance-log viewer's profile view, retain the current
call-graph path across state changes.

(cherry picked from commit fca05065e1)
2018-09-29 00:16:25 -04:00
Ell
61367b3f39 app: in performance-log-viewer.py, add undo support
Add undo functionality to the performance-log viewer, which allows
undoing/redoing changes to the sample selection, and the call-graph
state.

(cherry picked from commit 6ad3dbdb17)
2018-09-28 16:31:00 -04:00
Daniel Mustieles
45ee51c9ec Updated Spanish translation 2018-09-28 16:00:38 +02:00
Daniel Mustieles
d8a4e810da Updated Spanish translation 2018-09-28 13:01:58 +02:00
Piotr Drąg
f5598dc746 Update Polish translation 2018-09-28 00:06:08 +02:00
Jehan
e736532637 desktop: prepare release of GIMP 2.10.8.
Please everyone, feel free to update the list of upcoming
changes/features, if you feel some particular change should be more
prominently exposed in this list (or at the opposite that some change is
not worth mentionning), or for rewording, etc.

(cherry picked from commit ba53a833b2)
2018-09-27 23:33:22 +02:00
Ell
c9510721c5 app: construct tool-options GUI lazily
We currently construct the tool-options GUI for all the tools at
startup, which takes a significant amount of time.  Instead,
only register the GUI construction function with the tool-options
object, using the new gimp_tools_set_tool_options_gui_func()
function, and use the registered function to construct the GUI when
actually needed.

(cherry picked from commit c1347a7f26)
2018-09-27 02:44:35 -04:00
Ell
6bc2b330bb tools: various improvements in gimp-performance-log-viewer.py
Fix int-ratio variable formatting when the input is NaN, which can
happen when calculating the standard deviation, if all the values
are infinite.

Fix keyboard sample-range selection.

Deselect all samples when right-clicking a sample graph.

(cherry picked from commit d33fb0e7b8)
2018-09-27 01:13:12 -04:00
Ell
97a29b1e9e plug-ins: in script-fu, don't query PDB procedures' info on startup
script-fu used to query the information of every PDB procedure on
startup, in order to get the number of parameters for each
procedure.  This was done so that nullary procedures were defined
in such a way as to accept (and ignore) any number of arguments
(and at least one of the scripts we ship relies on this behavior).
However, this requires expensive back-and-forth communication with
the main GIMP process, which notable slowed down script-fu's
startup, and had a non-negligible impact on GIMP's startup time.

Instead, avoid querying procedure information, and implement the
special behavior for nullary procedures at call time.  We do this
by defining, in addition to the "strict" gimp-proc-db-call
procedure, a "permissive" -gimp-proc-db-call internal procedure,
and using the latter to call the predefined PDB procedures.

(cherry picked from commit 9a2999a553)
2018-09-26 14:41:29 -04:00
Rafael Fontenelle
edeb1d2981 Update Brazilian Portuguese translation 2018-09-26 08:12:38 -03:00
Rafael Fontenelle
140e371d5a Update Brazilian Portuguese translation 2018-09-26 08:12:22 -03:00
Marco Ciampa
35bf5bcab7 Updated Italian translation 2018-09-26 10:48:10 +02:00
Ell
49390462c8 Issue #2272 - Crash when using the intelligent-scissors tool ...
... after erasing all points

When erasing the last remaining point in the iscissors tool, halt
the tool, rather than leaving the tool active with an empty curve,
which it is not prepared to handle, and which results in a segfault
once trying to add a new point.

Additionally, when erasing the last remaining segment (i.e., the
two last remaining points), don't erase the entire segment (i.e.,
both points), but rather convert the segment to its initial point,
so that, in effect, we only erase the last point of the segment.

(cherry picked from commit a5baba5539)
2018-09-26 02:14:36 -04:00
Marco Ciampa
6e1d542128 Updated Italian translation 2018-09-25 23:09:56 +02:00
Ell
6a8ece0fd5 app: confirm transforms that result in very large items
In GimpTransformTools, precalculate the resulting size of the
transformed item(s), and request confirmation if the size grows to
over 10 times the size of the image (in either dimension).  This
protects against transformations that can result in suprprisingly
large items, such as inverted transformations, and, specifically,
perspective-correction transformations performed using the measure
tool, which will be added in the following commits.

(cherry picked from commit 20a6a3583b)
2018-09-25 04:31:37 -04:00
Ell
9ad52a2220 app: add gimp_drawable_transform_get_effective_clip()
Which returns the actual clip mode that will be used by the
drawable for a particular transformation.

(cherry picked from commit 2ae823ba2b)
2018-09-25 04:31:37 -04:00
Ell
3fe077a74c app: indentation fix in gimpdrawable-transform.[ch]
(cherry picked from commit 2c52bba071)
2018-09-25 04:31:37 -04:00
Ell
0f367371aa app: tweak focus behavior of GimpToolWidgetGroup when removing widget
When removing the focus widget of a GimpToolWidgetGroup, use the
last child, rather than the first child, as the new focus widget.
This plays nicer with auto-raise, and is probably better anyway.

(cherry picked from commit 24fb597196)
2018-09-23 13:26:55 -04:00
Ell
693cea427a app: in GimpToolWidgetGroup, improve focus behavior when adding/removing widgets
When a focused widget is added to a group, make it the new focus-
widget of the group, instead of unsetting its focus if another
widget already has focus.

When removing the focused widget from a group, set a different
widget as the group's focus widget (if one exists), instead of
unsetting the focus widget, so that nonempty groups always have a
focus widget.

(cherry picked from commit 95d2c92ff2)
2018-09-23 13:26:55 -04:00
Ell
f479711814 app: in GimpToolWidgetGroup, calculate hover widget at button press
In gimp_tool_widget_group_button_press(), explicitly call
gimp_tool_widget_group_hover() before forwarding the event to the
group's hover widget, so that the hover widget gets recalculated.
If a widget is added to the group as a result of a button-press
event, this guarantees that it gets considered as a target for the
same event.

(cherry picked from commit 5b217b3ad4)
2018-09-23 13:26:55 -04:00
Ell
54fbf1a8cb tools: in performance-log-viewer.py, right-align backtrace frame number column
(cherry picked from commit 51d9934942)
2018-09-23 01:38:17 -04:00
Ell
fab6b4746d tools: in performance-log-viewer.py, set thread filter search column
(cherry picked from commit 407e9f36ca)
2018-09-23 01:17:57 -04:00
Ell
b5d628bec2 tools: in performance-log-viewer.py, add thread filter to profile
In the performance-log viewer, add an option to filter which
threads, and which states of each thread, are included in the
profile.  By default, all threads in the RUNNING state are
included.

(cherry picked from commit 3f630378b0)
2018-09-23 00:53:30 -04:00
Ell
ea17d18d1b tools: in performance-log-viewer.py, defer UI updates util needed
In the performance-log viewer, defer updates to the various UI
elements when the selection changes until they're actually shown.
This improves responsiveness when changing the selection.

(cherry picked from commit a7afbe13ec)
2018-09-23 00:53:30 -04:00
Ell
0207c9baa1 configure.ac: fix libbacktrace test
... added in last commit.

(cherry picked from commit 0245775346)
2018-09-22 22:46:43 -04:00
Ell
b065ff7de7 app: add source location information to the Linux GimpBacktrace backend
When libbacktrace is available, use it to retrieve source location
information in the Linux GimpBacktrace backend.

(cherry picked from commit 7cdd1ebeef)
2018-09-22 22:39:17 -04:00
Ell
cb26c31a96 tools: only show object/source basename in performance-log backtraces
... to reduce their verbosity.  Show the full path in the
corresponding tooltip.

(cherry picked from commit 2c8e3f8e0a)
2018-09-21 09:29:13 -04:00
Ell
e839794d36 tools: replace performance-log viewer call-graph direction icons
Use the less-ambiguous, if just as clumsy,
"format-indent-more/less" icons, to stand for the
caller -> callee, and callee -> caller, directions, respectively.

(cherry picked from commit c7a4eb4602)
2018-09-21 07:45:19 -04:00
Ell
0a900542be themes: fix arrow color of menu items with a submenu
Commit 6484e91f82 broke the arrow
color of menu items with a submenu in the Dark theme; it seems to
have always been broken in the Light and Gray themes.

Fix this, by applying the default style to the GtkMenuItem class.
2018-09-21 04:07:44 -04:00
Ell
c0e82c0381 tools: a few improvements in performance-log-viewer.py
Fix searching for samples by thread name, in particular, when there
are unnamed threads.

Use GtkMenuButton, instead of GtkButton, for the find-samples
header button.

Add mnemonics to the find-samples popover.

(cherry picked from commit c537341d35)
2018-09-21 02:42:05 -04:00
Ell
e1b85e1109 Revert "app: disable parallel asynchronous operations when GEGL_THREADS=1"
This reverts commit 1c435f313b, which
is no longer necessary after GEGL commit
c8a0b9eff07c8d9122f55f7b7527d51788ae4575.
2018-09-20 08:10:47 -04:00
Mario Blättermann
b4f4aa5bea Replace de.po 2018-09-20 09:04:58 +00:00
Mario Blättermann
2eb640e1e5 Replace de.po 2018-09-20 08:57:41 +00:00
Dimitris Spingos
30cf61f877 Updated Greek translation 2018-09-20 07:40:48 +03:00
Jehan
2fa73961c7 NEWS: add file-rawtherapee improvements (better discovery). 2018-09-19 15:11:48 +02:00
Simon Mueller
1c993c44cb Issue #2179: Get rid of the win32_use_hkcu flag.
Simply always check HKCU first. If that lookup did not yield any result,
fall back to HKLM.

(cherry picked from commit 6a5023a38a)
2018-09-19 15:07:26 +02:00
Simon Mueller
fc4cb8443e Issue #2179: Make file_rawtherapee use the registry value that is...
... provided by RawTherapee's installer (version 5.5+).

See https://github.com/Beep6581/RawTherapee/issues/4783.
This patch required a small change to file_raw_get_executable_path
because the RawTherapee installer is supposed to work without admin
privileges and therefore can't write to HKLM.

Reviewer's note (Jehan): RawTherapee's installer does not add the
registry entry yet. We assume the upstream bug report will end up doing
so (someone has to make the first step!). :-)

(cherry picked from commit 829ca6583d)
2018-09-19 15:07:18 +02:00
Alexandre Prokoudine
c38b600546 Update NEWS 2018-09-19 02:07:45 +03:00
Ell
07c134e673 app: fix incompatible pointer type warning in gimpviewrendererdrawable.c
... more GLib 2.58 fallout.

(cherry picked from commit a5c8dd5c73)
2018-09-18 16:23:45 -04:00
Ell
6f83f69e9a app: fix unhandled enumeration value warning in gimptextlayer.c
(cherry picked from commit a84b57e67e)
2018-09-18 16:23:45 -04:00
Ell
31b369d09f app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:41:35 -04:00
Ell
ee11477dc5 app: some cleanup in gimppaintcore-loops
In gimp_paint_core_loops_process(), initialize the iterator with
sufficient room for the number of iterators used by the algorithm
hierarchy, instead of a fixed number.

Add an additional 'rect' parameter to the init_step() and
process_rows() algorithm member functions, which receives the area
of the currently-processed chunk, to be used instead of the
iterator's ROI member.  This allows us to pass a NULL iterator to
hierarchies that don't use an iterator, and avoid the stack-
allocated iterator hack we used in this case (and which became even
more problematic with the new iterator API).

(cherry picked from commit 6c6a7514a4)
2018-09-18 12:54:18 +02:00
Øyvind Kolås
ef035fb297 plug-ins: migrate pagecurl to new iterator api
(cherry picked from commit 6fca9959c7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
a5bbf913a4 plug-ins: migrate screenshot-x11 to new iterator api
(cherry picked from commit cc10af72cc)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8b3cd3057f plug-ins: migrate print-draw-page to new iterator api
(cherry picked from commit 49c53568d7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
ccf682052e plug-ins: migrate ifs compose to new iterator api
(cherry picked from commit 8edbc0d491)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
115c9070a4 plug-ins: migrate file-tiff-load to new iterator api
(cherry picked from commit 29f63616d2)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
01be5ca184 plug-ins: migrate psd plug-ins to new iterator api
(cherry picked from commit 3a2014984d)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
78b81a200a plug-ins: migrate gradient-map to new iterator api
(cherry picked from commit ee48ec6877)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
35713ad1ff plug-ins: migrate qbist to new iterator api
(cherry picked from commit 4165a315d5)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
a123c43a97 plug-ins: migrate file-png to new iterator-api
(cherry picked from commit 764085278f)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
ab1bb27129 plug-ins: compose migrated to new iterator api
(cherry picked from commit b7633c722e)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8e17056d15 plug-ins: colormap-remap migrated to new iterator api
(cherry picked from commit 6ab12061b7)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
4baf61a2a0 plug-ins: border-average migrated to new iterator api
(cherry picked from commit 754a3c5b18)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
9953fe57d9 plug-ins: decompose migrated to new iterator api
(cherry picked from commit 22b4b647bd)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
6d9022f2e6 app: migrate gimpoperationmaskcomponents to new iterator api
(cherry picked from commit 55b3438328)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
5818585a8b app: migrate gimpoperationgradient to new iterator api
(cherry picked from commit c6d23add65)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
925803f242 app: migrate gimpoperationcagetransform to new iterator api
(cherry picked from commit f03a84d607)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
fc222c8392 app: migrate gimpoperationcagecoefcalc to new iterator api
(cherry picked from commit 822f9f0d2b)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
04517b842a app: migrate operationbuffersourcevalidate to new iterator api
(cherry picked from commit 95358ca1fa)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
33dd7daa30 libgimpcolor: migrate to new iterator api
(cherry picked from commit cdda37f4ee)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
5531b53466 modules: migrate display filters to new iterator api
(cherry picked from commit 41e8035635)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
e092765dfe app: migrate paintcore loops to new iterator api
(cherry picked from commit fb5d7832a8)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8aaa3a99f2 app: migrate gimpmybrushsurface to new iterator api
(cherry picked from commit 97ed7817d8)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
4f46f92eb6 app: migrate brush core to new iterator api
(cherry picked from commit 46e9036578)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
6a40b6c75e app: migrate ink paint core to iterator api
(cherry picked from commit ea9c5e6a49)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
645a945647 app: migrate heal to new iterator api
(cherry picked from commit 24fbdfb591)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
8d5c00a80d app: migrate iscissorstool to new iterator api
(cherry picked from commit beb4ecb238)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
66dd9b119c app: migrate gimp-gegl-mask to new iterator api
(cherry picked from commit 4b77831e03)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
2910e872f2 app: migrate gegl-mask-combine to new iterator api
(cherry picked from commit fcf113a39c)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
3daafb09b6 app: migrate gegl-loops to new iterator api
(cherry picked from commit 567ffe94ff)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
f2dd887fc0 app: gimpscanconvert: migrate to new buffer iterator
(cherry picked from commit d99cae4ab8)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
969a028dcc app: pickable-contiguous-region migrated to new buffer iterator
(cherry picked from commit c56f543354)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
1555f4c86a app: palette-import migrated to new buffer iterator
(cherry picked from commit 43c107aeab)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
244ddef844 app: image-convert-indexed migrated to new buffer iterator
(cherry picked from commit 9f481d3607)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
957e0cd9cb app: histogram migrated to new buffer iterator
(cherry picked from commit 2c2d8d86fd)
2018-09-18 12:36:13 +02:00
Øyvind Kolås
84ac1148ac app: gimpdrawable-transform migrated to new buffer iterator
(cherry picked from commit 972f232316)
2018-09-18 12:36:13 +02:00
Ell
6484e91f82 themes: in the Dark theme, use 'class "GtkWidget"' instead of "*"
... for applying the global style.

Last commit *might* have fixed the need to use "*" instead of
"GtkWidget", although it's hard to tell -- nothing seems to be
obviously wrong, anyway.  Let's just try restoring this, and see if
anything breaks.
2018-09-18 06:17:59 -04:00
Ell
d7da2cb338 Issue #1604 - Active layer name is hard to read
In the gtkrc files of the Dark and Light themes, replace a bunch of
"widget" selectors with "widget_class" selectors, which is what
they really should be (they should probably also use angle-bracket
notation for classes, but as long as it works...)  This allows the
different styles to be merged correctly, and fixes the active layer
name color (more generally, the text color of selected rows of
focused tree-views inside dockables.)  The Gray theme seems to be
double-broken in such a way that "fixing" it causes it to do the
"wrong" thing...  I'm not touching that :)
2018-09-18 04:58:46 -04:00
Jehan
d7fa835cd3 app: don't sanity check for "gegl:matting-levin".
My previous commit answers the forever question "do we want to require
this?" which was in comments and can now be removed.
We don't need to actually require this operation for running GIMP, as it
runs fine without. Just testing in configure is enough of a warning for
the missing feature.

(cherry picked from commit 97247f41ea)
2018-09-17 19:51:22 +02:00
Jehan
5f088a95c3 configure: check presence of "gegl:matting-levin" with gegl --exists.
This is a runtime dependency. If absent, we simply won't have access to
the alternative Matting Levin engine in the foreground selection tool.

If we don't add a test in configure, this may be easily forgotten. I
created the `gegl --exists` feature specifically for this kind of
checks, so let's check operation existence.

(cherry picked from commit 9560a653c5)
2018-09-17 19:51:15 +02:00
luz.paz
23648e753e Misc. typo fixes
Found via `codespell`

(cherry picked from commit 386587736f)
2018-09-17 16:05:02 +02:00
Marco Ciampa
81bd873af5 Updated Italian translation 2018-09-17 08:37:22 +02:00
Jehan
e1cf340515 plug-ins: add the "msf1" brand for HEIF files.
After Dirk Farin had another look in the specs, it turns out that "mif1"
is actually allowed as major brand for HEIF. Also adding "msf1" which is
the equivalent for image sequences.

(cherry picked from commit 64b00b5c7f)
2018-09-16 22:56:07 +02:00
Jehan
e4bff4c801 Issue #2209: more accurate magic for HEIF files.
Just looking for "ftyp" would also match other ISOBMFF files (.mov or
.mp4 files for instance). These are the possible 4-byte "brand" code
which can follow "ftyp", as listed by Dirk Farin from libheif.

I add the "mif1" brand, as I encountered some files using this magic
(even though this should normally not be valid apparently, yet the file
loaded fine in GIMP).

This is not perfect as the standard allows potentially very big box
headers, in which case 8 bytes (the "largesize" slot) may be inserted
between "ftyp" and the brand, as I understand it. But this is actually
unlikely enough to probably never happen (the compatible brands list
would have to be huuuge, as it looks like this is the only extendable
part in a ftyp box). So let's assume this just never happens.

See also: https://github.com/strukturag/libheif/issues/83

(cherry picked from commit 4ad3993eca)
2018-09-16 22:56:07 +02:00
Jehan
eb227b1d0e devel-docs: add the package maintainers in the release-howto.
Nicknames on IRC/gitlab are hard, even more when they change depending
on the media! I realize we are regularly asking them or unsure of who to
contact (for instance here for releases). Let's associate each package
with its current maintainer to make it easy to contact the right person
to prepare our official packages before a release.

(cherry picked from commit dc9a30446b)
2018-09-16 22:55:54 +02:00
Jehan
e76d0941a9 Issue #2209: HEIF: Invalid input: No 'ftyp' box.
Adding a magic number for HEIC/HEIF, which would allow to discard
obvious non-HEIC images even with the wrong extension.

Note: it looks like this magic number would also match more generically
other ISO base media file format (ISOBMFF) formats, like .mov or .mp4
files. I am enquiring for better magic but for now, this is better than
nothing.

(cherry picked from commit d738d2f645)
2018-09-16 22:55:44 +02:00
Ell
3d24dfbc6e tools: in performance-log-viewer.py, fix profile viewer search column
(cherry picked from commit f8dd444e98)
2018-09-16 12:35:09 -04:00
Ell
cc18c2f890 tools: add performance-log-viewer.py and driver
performance-log-viewer.py is a viewer for GIMP performance logs.
The viewer is made up of two parts: a sample-selection area at the
top, and an information area at the bottom.

The sample-selection area visualizes the sampled variables and
markers using a simultaneous set of plots, and displays the
currently selected samples.  Samples can be selected directly
through the sample-selection area, or by other means, such as
searching for all samples satisfying a certain condition, or
containing a certain function.

The information area shows global information stored in the log, as
well as information specific to the currently selected samples,
including variable listing and statistics, full backtrace, and
profile/call-graph information.

Note that performance-log-viewer.py takes its input from STDIN,
like the rest of the performance-log tools, and is therefore
suitable for use as part of a pipeline.  For standalone use, the
performance-log-viewer driver is also included, which takes the log
file as a command-line argument, and processes it through an
appropriate pipeline before feeding it to the viewer.

(cherry picked from commit 3601c9189b)
2018-09-16 12:05:35 -04:00
Ell
440695fa45 tools: add performance-log-deduce.py
... which statistically deduces the correct thread states based on
backtrace address frequency, fixing local inaccuracies.

(cherry picked from commit 7e186f3e5d)
2018-09-16 12:05:35 -04:00
Piotr Drąg
5b96fa6985 Update Polish translation 2018-09-16 17:17:21 +02:00
Ell
64403d5fd8 app: add more information to performance logs
In addition to the verbose GIMP version, include in performance
logs the values of all environment variables beginning with BABL_,
GEGL_, or GIMP_, and of all the GEGL config options.

(cherry picked from commit 2c6b5c371e)
2018-09-16 09:00:20 -04:00
Ell
896af012cb app: in gimpbacktrace-linux, use SA_RESTART for the backtrace signal
(cherry picked from commit e8c1cd79ba)
2018-09-16 09:00:20 -04:00
Christian Kirbach
99b4ee2082 Update German translation 2018-09-14 18:45:06 +00:00
Rodrigo Lledó
e88050fcc5 Update Spanish translation 2018-09-14 06:41:42 +00:00
Jehan
536af959f1 Issue #2055: make save dialog compatibility information understandable.
* The minimum GIMP version for this XCF is always written down when it
  is GIMP 2.8 or over.
* The list of features warrating the minimum version is now listed in an
  expander container rather than as tooltip (making the list actually
  discoverable!).
* The warning on compression is now displayed as its own text under the
  checkbox (only when checking the box actually changes anything
  compatibility-wise), and not as additional text to the minimum GIMP
  version label. Otherwise it had far too much weight on the minimum
  compatible GIMP version text and people were wondering what it meant.
  We should not tell people what the checkbox cannot do (it cannot
  improve compatibility in some cases), only what it can do (it can
  improve compatibility in other cases).
* Update the feature list real-time when checking the compression box
  (making it even more obvious that tile compression may have a say in
  compatibility).
* Metadata info is still added on the GIMP version label as it does not
  limit compatibility of the XCF file itself.

(cherry picked from commit 573d817539)
2018-09-11 15:56:15 +02:00
Jehan
6952bbb1ad app: add a reason string for internal zlib compression in GIMP 2.10.
Even though chosen as a parameter to gimp_image_get_xcf_version() and
not a feature within the image itself, we also want to list this reason
in the compatibility list.

(cherry picked from commit 0fa2ef9118)
2018-09-11 15:56:07 +02:00
Piotr Drąg
25ddcc6171 Update Polish translation 2018-09-09 19:15:48 +02:00
Tim Sabsch
8be8b201ca Update German translation 2018-09-07 04:40:14 +00:00
Alexandre Prokoudine
d0ae9908de Start tracking changes between 2.10.6 and 2.10.8 2018-09-07 00:28:43 +03:00
Ell
b1652b02d8 app: don't change text-layer box mode after moving using text tool
When moving a text layer using the text tool (through alt+drag),
don't change the layer's box mode to "fixed", which is unnecessary,
since the layer's size isn't affected.

(cherry picked from commit 601c213c7a)
2018-09-06 11:47:08 -04:00
Ell
951c08efd5 app: fix text tool frame position when undoing move operation
While editing a text layer with the text tool, update the layer's
frame when the layer moves, which most notably happens when
undoing/redoing a move operation while the text tool is active.

(cherry picked from commit 238c1035db)
2018-09-06 11:47:08 -04:00
Ell
925b7f2c60 app: streamline text-tool drawing blocking/unblocking logic
The various functions of the text tool currently block and unblock
drawing (through gimp_text_tool_[un]block_drawing()) implicitly,
and in a non-symmetric fashion, which makes the tool's logic rather
fragile.  Instead, require blocking/unblocking to be done
symmetrically, and explicitly block/unblock drawing as necessary in
all functions.

(cherry picked from commit a03183b266)
2018-09-06 11:47:08 -04:00
Ell
e2b54845bd app: fix uninitialized variable warning in gimptexttool.c
(cherry picked from commit a1caa17531)
2018-09-06 11:47:08 -04:00
Marco Ciampa
0d6acfdf1b Updated Italian translation 2018-09-06 15:34:14 +02:00
ONO Yoshio
2ff515b374 app: avoid to rotate unattached vectors directory in ...
... gimp_text_tool_create_vectors_warped().
fixed commit 8dfe00fa17

(cherry picked from commit 5483ea88e5)
2018-09-06 08:45:40 +09:00
ONO Yoshio
3012738ace Revert "app: make unattached vectors enable to rotate."
This reverts commit 2d415f53bf.

(cherry picked from commit 1ff9487d00)
2018-09-06 08:45:25 +09:00
Gábor Kelemen
21e1445db4 Update Hungarian translation 2018-09-05 22:51:37 +00:00
Ell
468a4ad109 app: more cleanup in GimpBacktrace
Improve out-of-range check in gimp_backtrace_find_thread_by_id().

Remove unnecessary #include <exchndl.h> in gimpbacktrace-windows.c,
and revert commit 644234e99d (the
DrMingw detection happens at runtime).  The Windows backend can
work without DrMingw, it just can't find all the symbols, and
doesn't provide source-location information.

(cherry picked from commit b9f1ab8f53)
2018-09-05 14:59:58 -04:00
Jehan
e7dde73f84 app: GimpBacktrace Windows backend only available with Dr. Mingw. 2018-09-05 15:11:41 +02:00
Timo Jyrinki
c6b3a8363a Update Finnish translation 2018-09-05 10:33:16 +00:00
Ell
0fcf02a7c6 app, tools: add "running" thread attribute to GimpBacktrace/performance-log
The "running" attribute (readable through
gimp_backtrace_is_thread_running(), and recorded in the performance
log) specifies if the thread was in a running or suspended state at
the time the backtrace was taken.  It is accurate on Linux, but
only approximated on Windows.

Adapt the performance-log-expand.py tool to maintain this attribute
(and any future thread attributes we might add).

(cherry picked from commit 78adb7c900)
2018-09-03 18:30:34 -04:00
Ell
9f1a0a65bd app: add Windows backend to GimpBacktrace
The Windows backend produces full, multithreaded backtraces.  When
DrMingw is available, it also provides full symbol and (where
available) source-location information.  Otherwise, it provides
symbol information for most of our libraries, but not for the GIMP
binary itself.

(cherry picked from commit 667efc221d)
2018-09-03 15:58:01 -04:00
Ell
21f708a297 app: add source-location information to GimpBacktrace
Add source filename and line number fields to the
GimpBacktraceAddressInfo struct, populated through
gimp_backtrace_get_address_info().  This is not currently supported
by the Linux backend, but is supported by the Windows backend,
which we'll be added in the next commit.

(cherry picked from commit a6ec857123)
2018-09-03 15:58:01 -04:00
Ell
06a22a9cf8 app: more GimpBacktrace tidying
... in preparation for the Windows backend.

(cherry picked from commit 422f6a55e4)
2018-09-03 15:58:01 -04:00
Balázs Meskó
e8ef49ec68 Update Hungarian translation 2018-09-03 15:19:09 +00:00
Balázs Meskó
e69d7bff29 Update Hungarian translation 2018-09-03 14:33:25 +00:00
Balázs Meskó
2afb025939 Update Hungarian translation 2018-09-03 12:41:09 +00:00
Rodrigo Lledó
d8df237f8f Update Spanish translation 2018-09-03 07:05:45 +00:00
ONO Yoshio
7727c6f57c app: make unattached vectors enable to rotate.
(cherry picked from commit 2d415f53bf)
2018-09-03 12:34:31 +09:00
ONO Yoshio
54f9d3ee7d Issue #2064 - text along path not working with vertical text.
(cherry picked from commit 8dfe00fa17)
2018-09-03 12:34:15 +09:00
Ell
d89930cac9 app: remove unused #define in gimpbacktrace-linux.c
(cherry picked from commit c4d89bfe0b)
2018-09-02 14:33:32 -04:00
Ell
8a2126fc98 app: s/char/gchar/ in last commit 2018-09-02 13:48:19 -04:00
Ell
499a8962b3 app: don't use g_file_peek_path() in splash.c
... use g_file_get_path() instead.

g_file_peek_path() was added in GLib 2.56, but gimp-2-10 only
requires 2.54.
2018-09-02 13:42:58 -04:00
Ell
14c3c33f1b app: rename gimp_backtrace_get_symbol_info() to ..._get_address_info()
This function returns information about the given address, which
is currently mostly limited to the corresponding symbol
information, but we might want to add address-specific information
in the future, such as a line number.

(cherry picked from commit 7ac87dc01e)
2018-09-02 13:26:09 -04:00
Ell
af769588cd app: in gimpbacktrace-none.c, fix gimp_backtrace_get_frame_address()
(cherry picked from commit 77746fd8fc)
2018-09-02 13:26:09 -04:00
Ell
dd1a17d67e app: remove stray g_printerr() from gimpbacktrace-linux.c
(cherry picked from commit 0d3647f854)
2018-09-02 09:13:36 -04:00
Ell
14addc12e8 app: minor cleanup in GimpBacktrace
(cherry picked from commit cb8dd047d0)
2018-09-02 09:08:26 -04:00
Ell
8cfd24107f app: show error on attempt to subtract-from/intersect-with empty selection
In all the selection tools, show an error (and a BAD cursor
modifier) wheh starting a selection, if the current selection is
empty, and the tool is in SUBTRACT or INTERSECT mode (in which
case, the selection has no effect).

(cherry picked from commit 0e26525e65)
2018-09-02 08:50:22 -04:00
Ell
617577da27 app: fix app/tests linking
Required since commit 80bf686c94.

(cherry picked from commit 7a02859d32)
2018-09-02 04:57:47 -04:00
Ell
a35a2eeb81 po: add dashboard-commands.c to POTFILES.in
(cherry picked from commit 0e04b77589)
2018-09-02 04:16:56 -04:00
Ell
28ad1d0eba app: add standard highlight colors to gimphighlightablebutton.h
We're currently only using GimpHighlightableButton in the layers
dialog, which defines its own set of highlight colors.  We're going
to use highlightable buttons in the dashboard too, so let's move
the highlight colors to gimphighlightablebutton.h, and give them
standard names.  We currently define
GIMP_HIGHLIGHTABLE_BUTTON_COLOR_AFFIRMATIVE (green), and
GIMP_HIGHLIGHTABLE_BUTTON_COLOR_NEGATIVE (red).

(This commit was accidentally dropped from the gimp-2-10 branch; it
should have gone before 40ac4f7bc0f43aee24dc7ae1cf674d1a59612f55.)
2018-09-02 03:37:23 -04:00
Ell
1122b3e492 tools: add performance-log-related tools
performance-log-expand.py decodes a delta-encoded performance log
by expanding the deltas, producing a log where each sample (and
other relevant elements) contain complete information.  Note that
the structure of expanded logs is identical to that of delta-
encoded logs, the expanded log simply has no deltas.

performance-log-resolve.py resolves symbol information in
backtraces.  The logs produced by GIMP only specify the program
counter at each stack frame, providing an address-map to map
program-counter addresses to actual symbols separately.  This tool
looks up each program-counter address in the address map,
incorporating the relevant symbol information directly into the
backtrace.

Both tools read their input from STDIN, and write their output to
STDOUT, and can be chained in a pipeline (with
gimp-performance-log-expand.py appearing first).

Note that these tools require Python 3.

(cherry picked from commit d7c74a615b)
2018-09-02 03:27:33 -04:00
Ell
40ac4f7bc0 app, icons, menus: add performance-log recording to the dashboard
Add an option to record a performance log through the dashboard.
The log contains a series of samples of the dashboard variables, as
well as the full program backtrace, when available.  As such, it
essentially acts as a built-in profiler, which allows us to
correlate program execution with the information available through
the dashboard.  It is meant to be used for creating logs to
accompany perofrmance-related bug reports, as well as for profiling
GIMP during development.

The sample frequency defaults to 10 samples per second, but can be
overridden using the GIMP_PERFORMANCE_LOG_SAMPLE_FREQUENCY
environment variable.  Backtraces are included by default when
available, but can be suppressed using the
GIMP_PERFORMANCE_LOG_NO_BACKTRACE environment variable.

Logs are created through the new "record" button at the bottom of
the dashboard dialog.  When pressed, a file dialog is opened to
select the log file, and, once confirmed, data is being recorded to
the selected file.  Recording is stopped by pressing the "record"
button again (we use a highlight to indicate that recording is
active.)

While recording, the "reset" button is replaced with an "add marker"
button, which can be used to add event markers to the log.  These
can be used to mark events of interest, such as "started painting"
and "stopped painting", which then appear in the log as part of the
sample stream.  Markers are numbered sequentually, and the number
of the next (to-be-added) marker appears on the button.  Shift-
clicking the button adds an empty (description-less) marker, which
is only identified by its number; this can be used when markers
need to be added quickly.

The log is an XML file, containing some extra information (such as
the output of "$ gimp -v", and symbol information) in addition to
the samples.  The data in the file is delta-encoded to reduce the
file size, meaning that samples (as well as some other elements)
only specify the changes since the previous sample.  This adds a
necessary decoding step before data can be processed; the next
commit adds a tool that does that.

There are currently no tools to actually analyze the data -- that's
still TBD -- but at least we can start gathering it.
2018-09-02 03:26:11 -04:00
Ell
536fc332e0 app: add GimpBacktrace
GimpBacktrace provides an interface for creating and traversing
multi-threaded backtraces, as well as querying symbol information.
While we already have some backtrace functionality, it relies on
external tools for the most part, and as such is rather expensive,
and is only meant for producing opaque backtraces.  GimpBacktrace,
on the other hand, is meant to be relatively cheap (we're going to
use it for profiling,) and allow inspection of the backtrace data.
In the future, it might make sense to replace some, or all, of the
other backtrace functions with GimpBacktrace.

GimpBacktrace currently only supports Linux.  By default, it uses
dladdr() to query symbol information, which is somewhat limited (in
particular, it doesn't work for static functions.)  When libunwind
is installed, GimpBacktrace uses it to get more complete symbol
information.  libunwind is currently an optional dependency, but it
might make sense to promote it to a mandatory, or opt-out,
dependency, as it's lightweight and widely available.

On other platforms, the GimpBacktrace interface can still be used,
but it always returns NULL backtraces.

(cherry picked from commit 80bf686c94)
2018-09-02 03:24:51 -04:00
Ell
14ce0763ce app: add mnemonics to dashboard action labels
(cherry picked from commit a109a77db1)
2018-09-02 03:17:56 -04:00
Rafael Fontenelle
370dd32147 Update Brazilian Portuguese translation 2018-09-01 18:10:49 +00:00
Ell
a2f1efc201 app: use gimp_gtk_container_clear() in GimpDashboard
... instead of doing the same thing ourselves.
2018-08-30 23:49:37 -04:00
ONO Yoshio
e74a241cdf Issue #2124 - The origin of vertical, right to left text does not...
... load correctly

Fixed incorrect initialization of private base_dir.

(cherry picked from commit e98255efc1)
2018-08-31 08:52:50 +09:00
Ell
806cb6e348 Issue #2120 - Segmentation fault while using Levels to white balance a layer
Move the call to gimp_filter_tool_disable_color_picking() from the
filter-tool's dialog "unmap" handler to gimp_filter_tool_halt().
Since commit ec80a88513, we
explicitly destroy the GUI when halting the filter tool, which
happens before the dialog's unmap handler is called, which could
potentially result in a dangling pointer to the active color-picker
widget in gimp_filter_tool_disable_color_picking().

(cherry picked from commit 072d6b0d12)
2018-08-30 03:37:48 -04:00
Piotr Drąg
8c69f8cdd9 Update Polish translation 2018-08-28 19:48:54 +02:00
Ell
8814852159 Issue #2116 - bug: Image guide creation by dragging does not allow ...
... 100% position anymore

In GimpGuideTool, use a closed [0, max_position] range as the
allowable range for new/repositioned guides (where max_position is
either the image's width or height), so that guides can be placed
at the right/bottom edge of the image.

(cherry picked from commit 547190faa8)
2018-08-28 03:46:25 -04:00
Ell
d015c3d632 app: fix dashboard swap read-throughput desc.; add translator comment
(cherry picked from commit d210199da5)
2018-08-26 15:14:17 -04:00
Piotr Drąg
966b2fc75b Update Polish translation 2018-08-26 18:16:14 +02:00
Christian Kirbach
9feca3b094 Update German translation 2018-08-25 23:41:08 +00:00
Ell
f8c23c3720 Issue #2095 - Filter wavelet-decompose error with layer Group option active
In gimp_image_merge_layers(), explicitly fetch the graph of the top
layer's parent layer (if exists), to make sure that the top layer's
graph has a parent node.  We already fetch the image graph, which
takes care of top-level layers, however, if the top layer is a
child of an invisible layer group, as is the case in the wavelet-
decompose plug-in, this is not generally enough to guarantee that
the group's graph is constructed.

(cherry picked from commit e563845174)
2018-08-25 04:09:18 -04:00
Michael Natterer
7baedf02d9 app: s/sprintf/g_snprintf/ in xcf_save_image()
(cherry picked from commit bcf9c94358)
2018-08-21 12:22:58 +02:00
Ell
6c46891c4c app: explicitly clear GUI when halting a filter tool
In gimp_filter_tool_halt(), explicitly clear the GUI container
before clearing filter_tool->config, since the tool might be halted
during the GUI dialog's delete event, in which case the GUI will
only be implicitly destroyed *after* the function returns.  The
destruction of the GUI might fire signals whose handlers rely on
filter_tool->config, so we need to make sure it happens while it's
still alive.

In particular, this fixes a CRITICAL in the threshold tool, which
occurs due to the histogram view's "range-changhed" signal being
fired during its destruction, and its handler accessing
filter_tool->config.

(cherry picked from commit ec80a88513)
2018-08-20 14:42:22 -04:00
Ell
fba9de69ee app: add gimp_gtk_container_clear()
... which removes all non-internal children of a GtkContainer.

(cherry picked from commit fd64aae47b)
2018-08-20 14:42:20 -04:00
Michael Natterer
7d9f79427f app: make GimpDeviceInfo more rubust against broken device listings
gimp_device_info_set_device(): don't just bail out if a device with
the same name is added again, instead, simply continue and overwrite
the info's old device with the new one.

NOTE that this only happens if something is wrong on the USB or udev
or libinput or whatever side and the same device is present multiple
times. The only "safe" thing is to assume that devices listed earlier
are dead and dangling entities and that the last registered device is
the one actually delivering events.

(cherry picked from commit 717c183a3e)
2018-08-20 20:06:36 +02:00
Jernej Simončič
398d176855 Installer: small fix for 32on64 2018-08-20 20:05:09 +02:00
Jernej Simončič
cef2b7e72d Merge branch 'gimp-2-10' of gitlab.gnome.org:GNOME/gimp into gimp-2-10 2018-08-20 19:09:58 +02:00
Jernej Simončič
b7a32ee848 Installer: don't include unnecessary files, some more fixes for new plugin paths 2018-08-20 19:08:56 +02:00
Jehan
70d949eb0d devel-docs: document new debugging option --enable-win32-debug-console.
(cherry picked from commit 96dc7da000)
2018-08-20 17:29:34 +02:00
Ell
db0d3a4846 app: use adaptive chunk size when rendering projections
In GimpProjection, use an adaptive chunk size when rendering the
projection asynchronously, rather than using a fixed chunk size.
The chunk size is determined according to the number of pixels
processed during the last frame, and the time it took to process
them, aiming for some target frame-rate (currently, 15 FPS).  In
other words, the chunks become bigger when processing is fast, and
smaller when processing is slow.  We're currently aiming for
generally-square chunks, whose sides are powers of 2, within a
predefined range.

Note that the chunk size represents a trade off between throughput
and responsiveness: bigger chunks result in better throughput,
since each individual chunk incurs an overhead, in particular when
rendering area filters or multithreaded ops, while smaller chunks
result in better responsiveness, since the time each chunk
individual takes to render is smaller, allowing us to more
accurately meet the target frame rate.  With this commit, we aim to
find a good compromise dynamically, rather than statically.

The use of adaptive chunk sizes can be disabled by defining the
environment variable GIMP_NO_ADAPTIVE_CHUNK_SIZE, in which case we
use a fixed chunk size, as before.

(cherry picked from commit a1706bbd29)
2018-08-20 11:14:50 -04:00
Ell
b09498cd7a app: don't chunk update area when rendering projection synchronously
Add a boolean "chunk" parameter to
gimp_projection_chunk_render_iteration(), which determines whether
the work area should be sub-divided into chunks prior to rendering
(previously, the work area would always be sub-divided.)  Only
pass TRUE when rendering the projection asynchronously, in the
render callback, and pass FALSE when rendering the projection
synchronously, in gimp_projection_finish_draw(), which is called
when flushing the projection through the GimpPickable interface.

Rendering the projection using as big chunks as possible improves
performance, while worsening responsiveness.  Since responsiveness
doesn't matter when rendering synchronously, there's no reason to
render in chunks.

(cherry picked from commit 105ffc787d)
2018-08-20 11:14:50 -04:00
Jernej Simončič
6fceb041df Installer: zlib1.dll has no version info, compare timestamp when updating in System32 2018-08-20 15:52:12 +02:00
Jernej Simončič
ab3ff790ab Installer: plug-ins install changes 2018-08-20 15:50:04 +02:00
Jernej Simončič
5ddccb0de4 Installer: remove plugins from the lib\gimp\2.0\plug-ins directory 2018-08-20 12:15:40 +02:00
Ell
0e3084a9d1 Issue 2052 - Crash when using the flip tool
In gimp_transform_tool_transform(), use "active_item", instead of
"tool->drawable", when cutting/pasting the selected portion of a
layer for transformation.  The latter is a remnant of the old
transform-tool code, and is not guaranteed to be correspond to the
correct drawable, or even to a valid drawable (i.e., it can
potentially produce wrong results, or segfault.)

(cherry picked from commit 9420805525)
2018-08-20 04:22:41 -04:00
Ell
d3cab633de libgimp: in GimpTileBackendPlugin, use gegl_tile_backend_command()
In the command handler of GimpTileBackendPlugin, forward unhandled
commands to gegl_tile_backend_command(), instead of asserting that
they're within range (which has already been disabled by commit
bc3b076caf).  See GEGL commit
30047e65723ebb44fcde9c6b5f60ceecb43b0895.

(cherry picked from commit 668fee966a)
2018-08-19 19:46:22 -04:00
Ell
bc4bf58be3 configure.ac: require GEGL >= 0.4.9
(cherry picked from commit f1ff239d68)
2018-08-19 17:40:08 -04:00
Ell
fddf34dc87 app: show swap read/write throughput in the dashboard
Show the read/write throughput of swap data in the corresponding
swap-group fields.

(cherry picked from commit 5446163e1d)
2018-08-19 17:40:05 -04:00
Ell
fa9b231679 app: add "queued" field to the dashboard swap group
... which reports the amount of data queued for writing to the
swap (see GEGL commit 64021786ee067cf66c038622719acc590e6341db.)
When the swap queue is full, a yellow color underlay is shown in
the history graph.

(cherry picked from commit cd54457d46)
2018-08-19 17:38:54 -04:00
Ell
3ae8ff5c74 app: add "compression" field to the swap dashboard group
The "compression" field reports the ratio between the total size of
the data in the swap, and the total size the data would have had if
all tiles in the swap occupied a unique data block.

See GEGL commit 185f4450f2a51690b39112973c61f894c1ec3e41.

(cherry picked from commit b6e552a74b)
2018-08-19 17:38:54 -04:00
Michael Natterer
c335f78ee5 configure.ac: post-release version bump to 2.10.7 2018-08-19 20:11:08 +02:00
Alexandre Prokoudine
c0ef24b818 Update Russian translation 2018-08-19 20:37:08 +03:00
Michael Natterer
0a8173ffde configure.ac: release GIMP 2.10.6 2018-08-19 18:47:43 +02:00
Michael Natterer
6837554376 icons: make the gap of the broken chain larger in the Color theme 2018-08-19 18:43:39 +02:00
Ell
90ed3c8d3a libgimp: disable tile command range check in plug-in tile backend
In gimp_tile_backend_plugin_command(), disable the range check for
the input tile command.  This check prevents us from adding new
tile commands to GEGL without breaking the ABI; yet, the next GEGL
release will add a new command.  We're going to have to decide what
to do about this, but for now, let's just disable the check, so
that at least GIMP 2.10.6 is compatible with newer versions of
GEGL, no matter how we end up handling this.
2018-08-19 06:51:05 -04:00
Jehan
8f21c9483a Issue #1970: Python-fu missing in 2.10.4.
Do not set the interpreter to `python2` but to whatever was found by the
AM_PATH_PYTHON2() m4 macro.
It looks like the Python2 binary we ship in our DMG may be call "python"
only (without the '2'). Let's just make our code more resilient to
various builds.
I am not sure yet this is the only/actual problem for this issue on
macOS, but this is at least in the right way.
2018-08-19 12:34:00 +02:00
Jehan
87a9feb6d9 app: fix "Bad interpreter" error messaging.
If I override the `program` variable, and it is not found in PATH
environment, then it is NULL and the error message is unhelpful. Make
the return value of g_find_program_in_path() into a separate variable
instead, and only override `program` in the end, when we know it is
non-NULL.
2018-08-19 12:26:32 +02:00
Jehan
1e44cbd82c desktop: GIMP 2.10.6 is now planned to be released on 2018-08-19.
Hopefully that's now the right one!

(cherry picked from commit 1d555018ed)
2018-08-19 10:43:49 +02:00
Ell
7ed34fd920 app: show horizontal scrollbar in dashboard when necessary
(cherry picked from commit 8313a40fb5)
2018-08-19 03:38:23 -04:00
Øyvind Kolås
b03709ab5e configure/app: depend on GEGL 0.4.8 2018-08-18 15:26:46 +02:00
Snehalata B Shirude
024fb90fd4 Updated Marathi translation 2018-08-18 11:51:58 +02:00
Jehan
55a7872e1b plug-ins: include the right python source in the distribution.
The python path with directory are generated files and should not be in
the dist. The previous commit was fixing an in-tree `make check` but
this one fixes the `make distcheck` as the dist was packaging the wrong
python files.
2018-08-18 01:14:44 +02:00
Jehan
8ec5f44f2f po-python: skip copied Python files from POTFILES.
This issue was invisible when making VPATH builds, but appeared only in
source-tree builds as gettext tools are apparently mixing source and
build files. So we need to add these in the POTFILES.skip.
2018-08-18 00:07:58 +02:00
Tim Sabsch
319b1efb4d Update German translation 2018-08-17 16:41:17 +00:00
Michael Natterer
eb9789f241 etc, docs: regenerate system gimprc and its manpage 2018-08-17 02:22:23 +02:00
Bruno Lopes da Silva
8df7a258a4 Update Brazilian Portuguese translation 2018-08-16 20:31:05 +00:00
Ricardo Silva Veloso
7cc1bab361 Update Brazilian Portuguese translation 2018-08-16 20:25:15 +00:00
Jehan
f98dffce54 NEWS: new long shadow filter was missing. 2018-08-16 16:46:45 +02:00
Jehan
0b9a8af673 NEWS: keep up-to-date. 2018-08-16 14:22:21 +02:00
Jehan
035c785490 Issue #788: also install all python plug-ins in their own directory.
It seems I forgot to also install python plug-ins in a subdirectory
(because they are deactivated on master for the time being). I even
found a year-old patch from myself rotting in the tracker, and which was
doing exactly this.
I redid it, improved to fit changes.

(cherry picked from commit dbb9555d2f)
2018-08-16 13:25:51 +02:00
Jehan
5682a01626 plug-ins: fix individual install targets of common plug-ins.
The "rule from hell", dixit Mitch. :-)

(cherry picked from commit 2713bc4285)
2018-08-16 13:25:51 +02:00
Jehan
25f099344f plug-ins: make plug-ins inside common/ to also install in subfolders.
(cherry picked from commit d89ad95cc7)
2018-08-16 13:25:51 +02:00
Jehan
79961a6545 plug-ins: install plug-ins in subfolder.
I am going to forbid plug-ins from being installed directly in the root
of the plug-ins/ directory. They will have to be installed in a
subdirectory named the same as the entry point binary.
This may seem useless for our core plug-ins which are nearly all
self-contained in single binaries, but this is actually a necessary
restriction to eliminate totally the DLL hell issue on Windows. Moving
core plug-ins in subfolders is only a necessary consequence for it.

(cherry picked from commit 870ca6334d)
2018-08-16 13:25:51 +02:00
Øyvind Kolås
2c553da7eb configure/app: depend on babl 0.1.56
(cherry picked from commit 3d464e03b4)
2018-08-15 23:58:00 +02:00
Jehan
91cb86d2ab app: reorder function definitions/declarations.
Just make so that the declarations and definitions are in the same
order for easy maintenance.
2018-08-15 19:01:36 +02:00
Jehan
39afd29b7b NEWS: keep up-to-date. 2018-08-15 14:35:04 +02:00
Jehan
c9d7618056 app: open the Windows console a bit earlier.
If we enable the console on Windows, we might as well open it as fast as
possible, since its purpose is debugging.
2018-08-15 14:24:15 +02:00
Jehan
91c139f4d0 Issue #1809: update DLL directory for 32-bit plug-in run from 64-bit...
... Windows installation of GIMP.

Our default installer installs 32-bit version of the various DLLs in
32/bin/ (under the installation prefix). Currently this additional
folder is simply added in the PATH, so it works most of the time.
Unfortunately the PATH is searched last for DLLs, and in particular, it
is searched after system directories. So it means that if any misbehaved
application is installing DLLs in system dirs (and in particular
incompatible/older versions of the same DLLs a GIMP plug-in uses), it
breaks the 32-bit plug-in.

SetDllDirectoryW() bypasses this order and the set folder is searched in
between the binary directory and the system dirs. We were already
setting this for our main bin/ directory, which was good for 64-bit
plug-ins, but this was not protecting 32-bit plug-ins. Now our code to
run plug-ins check the bitness of the executable before running it, and
updates the DLL folder accordingly.
The alternative 32-bit folder can be overridden by the configure option
--with-win32-32bit-dll-folder (default: 32/bin/). This option can only
be set when building for 64-bit Windows obviously.

Alternatively we could have put copies of 32-bit DLLs in a subfolder
with each 32-bit plug-in, but this is at best a terrible workaround, as
we would duplicate DLLs for every such case. And this would not have
protected third-party plug-ins which wish to use some of our DLLs.
Last alternative is to use AddDllDirectory(), but it works since Windows
7 with a given update only. And our current official support is any
Windows since Windows 7. So we don't want to use this right now (also
I'm not sure it would actually be much better than current
implementation, and it seems to have a bit more limitations than
SetDllDirectoryW(), though I have not tested).
2018-08-15 14:21:20 +02:00
Jehan
ec79b5c9bc INSTALL, configure: replace Jasper with OpenJPEG.
Just realizing we haven't updated the INSTALL file with the dependency
change.

(cherry picked from commit fb57133d55)
2018-08-13 19:43:56 +02:00
Jehan
d49606ee83 app: work with GIO in splash code.
This will go with the next commit, but I broke it so I can backport the
code without extension handling in gimp-2-10 first.

(cherry picked from commit c7b5977637)
2018-08-12 23:14:02 +02:00
Jehan
1a28878943 app, configure: add a --enable-win32-debug-console build option.
Debugging stable versions under Windows is a pain because we don't have
access to the standard outputs. The debug console is indeed only built
on unstable builds. Let's make the debug console a separate build option
to allow building stable versions for debug (obviously the default
behavior when not configuring, is same as before, i.e. stable without
console and unstable with console).
2018-08-12 22:20:34 +02:00
Jehan
c49afa4f84 plug-ins: replace s/printf/g_printf/
When cross-compiling, I got various linking errors for printf() calls:
> undefined reference to `libintl_printf'

I am unsure why, since this is not recent code, and it used to build
fine with mingw64 compilers (last I cross-built, which is many months
ago). Anyway g_printf() works fine, all necessary libs are already
linked, and it is supposed to be a synonym. So let's just go the easy
way and use g_printf() only.
2018-08-12 20:59:48 +02:00
Jehan
d1d9eb17e5 configure: GLIB_COMPILE_RESOURCES is wrong when cross-compiling.
AM_PATH_GLIB_2_0 m4 macro actually computes this value using
$PKG_CONFIG. Yet $PKG_CONFIG variable is the pkg-config tool looking for
target libraries (not host), hence it would return the executable
`glib-compile-resources` built for the target.

Also using the same variable name invalidates our test: our own
AC_PATH_PROG was never run as the variable was already set. And no
environment variable could override this test anymore either. This is
why I rename the test variable to HOST_GLIB_COMPILE_RESOURCES.
2018-08-12 19:13:13 +02:00
Jehan
2587b85aaa libgimpthumb: another missing link to libgimpbase.
Again this error was only raised when cross-compiling.
2018-08-12 15:30:28 +02:00
Jehan
0865e9db1f tools: fix linking error.
Though no error was raised during a native build, a cross-build was
choking on this missing link to libgimpbase and failing.
The error returned by the linker though was a bit amiss.

Fixes:
> gimp-test-clipboard.o: In function `test_clipboard_copy_callback':
> tools/gimp-test-clipboard.c:419: undefined reference to `g_file_get_contents'
> collect2: error: ld returned 1 exit status
2018-08-12 15:24:24 +02:00
Jehan
a727131036 NEWS: keep up-to-date. 2018-08-12 13:04:01 +02:00
Jehan
3bbebaf6e0 Issue #1999: Opening the Preferences dialogue triggers Xcode warning.
It seems that calling `lldb` when it is absent triggers some popup
proposing to install Xcode on macOS. This is obviously not good. Let's
check presence with g_find_program_in_path() instead. I was refraining
from doing so until now, because this function allocates memory, hence
may not do well during a crash.
Fortunately we don't need to check for lldb during crash (unlike gdb
which has some unacceptable behavior for older versions, at least on
FreeBSD) so that should be ok.

(cherry picked from commit 04bbe941d5)
2018-08-11 00:34:43 +02:00
Jehan
c05bd7b6c9 app: small code cleaning.
Removing unused declaration of icons_set_icon_theme().
And reorder a bit the declarations to match the definition order.

(cherry picked from commit ae19441ddc)
2018-08-11 00:34:43 +02:00
Martin Srebotnjak
6bc992fc3a Updated Slovenian translation 2018-08-10 20:49:36 +02:00
Michael Natterer
b1fbf1eb63 Issue ##2000 - Linked and unlinked chain icons look almost identical
Make the gap of the broken chain icons of the "Color" theme wider.
2018-08-10 15:56:24 +02:00
Rūdolfs Mazurs
23c877cb09 Update Latvian translation 2018-08-10 13:54:59 +00:00
Rodrigo Lledó
3cf34c7ab9 Update Spanish translation 2018-08-10 11:54:34 +00:00
Tim Sabsch
83c764817f Update German translation 2018-08-10 11:46:00 +00:00
Tim Sabsch
eeb942612e Update German translation 2018-08-10 10:59:44 +00:00
Anders Jonsson
b785d7752c Update Swedish translation 2018-08-10 07:46:19 +00:00
Ell
dfe57b37cd app: fix group layer drawable update during size change
In gimp_group_layer_update_size(), never suspend drawable updates
(and, in fact, remove the option to suspend drawable updates
entirely,) and instead never update the drawable during the call to
gimp_drawable_set_buffer_full(), and flush the group's projection
*after* setting the drawable's buffer, so that any pending updates
will happen after the group's buffer and size are up-to-date.

This fixes some missed drawable updates.

(cherry picked from commit fc2c640ca2)
2018-08-10 03:21:14 -04:00
Ell
2f1041bed0 app: fix projection update-area offset upon buffer allocation/reisizing
In GimpProjection, change gimp_projection_add_update_area() to take
coordinates in the projection's coordinate system, rather than the
image coordinate system, and move the offset adjustment to the
projectable invalidation handler.

Modify gimp_projection_projectable_structure_changed() to pass
projection-space coordinates to gimp_projection_add_update_area().

gimp_projection_get_buffer() and
gimp_projection_projectable_bounds_changed() already pass
projection-space coordinates to gimp_projection_add_update_area(),
which was wrong before, when the projection had a nontrivial
offset, but is correct now.

(cherry picked from commit 2d63bc6e0a)
2018-08-10 03:21:14 -04:00
Piotr Drąg
895dd005b2 Update Polish translation 2018-08-10 06:46:51 +02:00
Ell
e10d5852c1 app: add gegl:long-shadow to the menus
(cherry picked from commit 537bf4ec6a)
2018-08-09 19:03:06 -04:00
Ell
e1e637c238 app: keep sanity/blacklist gegl op lists alphabetically sorted
(cherry picked from commit b6c56a6ae9)
2018-08-09 19:03:06 -04:00
Ell
cd086c94b3 configure.ac: require GEGL >= 0.4.7
(cherry picked from commit d4ef45bdbd)
2018-08-09 19:03:06 -04:00
Rūdolfs Mazurs
4409d5496d Update Latvian translation 2018-08-09 19:24:28 +00:00
Martin Srebotnjak
5f371bc84f Updated Slovenian translation 2018-08-09 20:52:56 +02:00
Martin Srebotnjak
03e95eb893 Updated Slovenian translation 2018-08-09 20:50:47 +02:00
Rūdolfs Mazurs
b17619399f Update Latvian translation 2018-08-09 18:46:37 +00:00
Martin Srebotnjak
02a4ce19d6 Updated Slovenian translation 2018-08-09 20:44:21 +02:00
Rūdolfs Mazurs
ee89bfad52 Update Latvian translation 2018-08-09 18:40:16 +00:00
Martin Srebotnjak
c27ba74e71 Updated Slovenian translation 2018-08-09 20:27:32 +02:00
Anders Jonsson
6c201827a7 Update Swedish translation 2018-08-08 23:23:26 +00:00
Anders Jonsson
b43a84c6fb Update Swedish translation 2018-08-08 23:16:39 +00:00
Claude Paroz
ef1f98863a Updated French translation for libgimp/plugins 2018-08-08 09:52:14 +02:00
Michael Natterer
af2a27f1c9 Issue #1662 - GIMP crashes while using cage transform when selection is active
Fixed by implementing Massimo's two findings:

gimp_operation_cage_transform_process(): if aux_buf is NULL, bail out
after initializing out_buf with identity vectors, fixes the crash.

gimp_cage_tool_create_filter(): set the drawable filter's region to
GIMP_FILTER_REGION_DRAWABLE, fixes offset when there is a selection.

(cherry picked from commit 49dfc6143d)
2018-08-07 20:11:52 +02:00
Piotr Drąg
6e656aedcb Update Polish translation 2018-08-07 18:53:43 +02:00
Tim Sabsch
d83fb5b9dd Update German translation 2018-08-07 16:23:44 +00:00
Mario Blättermann
b8ef5a8527 Update German translation 2018-08-07 16:13:23 +00:00
Rodrigo Lledó
338154ea0e Update Spanish translation 2018-08-07 12:33:46 +00:00
Øyvind Kolås
3712e688f2 configure/app: depend on GEGL 0.4.6
(cherry picked from commit cb132d2a97)
2018-08-07 02:42:47 -04:00
Øyvind Kolås
c1ec74badc configure/app: depend on babl 0.1.54
(cherry picked from commit 5fdcc0dfbb)
2018-08-07 02:42:47 -04:00
Jehan
b22c22a288 desktop: preparing release for GIMP 2.10.6.
(cherry picked from commit 343bfbf259)
2018-08-06 15:39:29 +02:00
Anders Jonsson
8b893bb817 Update Swedish translation 2018-08-06 11:35:43 +00:00
Anders Jonsson
7057490298 Update Swedish translation 2018-08-06 11:29:31 +00:00
ONO Yoshio
34b54971d8 Fix file-pdf-save exports broken vertical text.
(cherry picked from commit f0e585e7ff)
2018-08-06 12:14:08 +02:00
Rodrigo Lledó
4d6074fe23 Update Spanish translation 2018-08-06 09:52:20 +00:00
Rodrigo Lledó
c7574ff02c Update Spanish translation 2018-08-06 09:50:01 +00:00
Ell
5826a399b2 Issue #1125 - Transform tools temporarily disables layer mask
In GimpCanvasTransformPreview, add the necessary bits to the
preview graph so that, when transforming a layer, the layer's
opacity and mask are correctly applied to the preview.  Note that
since we're still not rendering the preview as part of the image
graph, the output is not always accurate, but it should be good
enough in most cases.

(cherry picked from commit 2ac91e0fc3)
2018-08-06 04:21:49 -04:00
Rodrigo Lledó
f6e7e9e633 Update Spanish translation 2018-08-06 07:22:21 +00:00
Piotr Drąg
34cb8fd231 Update Polish translation 2018-08-05 19:10:57 +02:00
Jehan
0bf695dc0f Issue #1974: and again another memory leak.
Thanks to Massimo for reporting all these!

(cherry picked from commit b3c9089ea2)
2018-08-05 11:49:09 +02:00
Jehan
51e5da1f93 Issue #1974: another memory leak when saving a file.
(cherry picked from commit 50221e1438)
2018-08-05 11:49:09 +02:00
Jehan
71f37d417c Issue #1974: Memory leak in gimpimage.c.
Ok my previous fix was wrong (at least for the part in the macro). This
is a macro, not a function. So each time we write _reason, the call to
g_strdup_printf() is reevaluated, hence data is allocated.
The right fix is to prepend `tmp` to the list, not `_reason`.
Thanks to Massimo for the debugging, as always!

(cherry picked from commit 2912fe7c17)
2018-08-04 12:59:21 +02:00
Jehan
8909684b59 Issue #1974: Memory leak in gimpimage.c.
ADD_REASON macro was leaking the allocated string when version_reason
return value was NULL (i.e. when we didn't care about the version
reasons).

Also we were not properly freeing all the reason strings at the end,
only the list. Use g_list_free_full() instead of g_list_free().

(cherry picked from commit 0ab682b0f5)
2018-08-04 09:42:57 +02:00
Ell
53b07a92dd Issue #1846 - "gitlab::" typo in the Windows installer
Introduced by commit 8eb77376c4.
Change to "gitlab:".

(cherry picked from commit aafa925906)
2018-08-03 22:14:57 -04:00
Ell
0edbb0586c app: short-circuit GimpProjection bounds-changed handler if disjoint
In gimp_projection_projectable_bounds_changed(), bail early by
calling gimp_projection_projectable_structure_changed() instead, if
the new bounds don't intersect the old bounds.

(cherry picked from commit c6b8a4213c)
2018-08-03 22:04:22 -04:00
Ell
53afeb11ac app: fix gimp_projection_projectable_bounds_changed()
In gimp_projection_projectable_bounds_changed(), which is called by
GimpProjection in response to a GimpProjectable::bounds-changed
signal, invalidate all regions of the new projection that weren't
copied from the old projection, so that they get rendered upon
flushing, instead of remaining empty.

Additionally, fix preview invalidation -- in particular, don't
directly invalidate the projectable's preview, even if preview
invalidation is already queued and chunk rendering was finished by
the boundary change, and instead always queue a preview
invalidation.

(cherry picked from commit bb5e3fd926)
2018-08-03 22:04:22 -04:00
Pat David
a1d2c05f0f app, libgimpbase: update vertical text labels (shorten)
Shortening vertical text option labels a little bit.

(cherry picked from commit 0ce4db749d)
2018-08-03 18:23:44 -04:00
Ell
d8c0368a52 app: avoid re-rendering group layers upon resizing
Make sure we don't unnecessarily update the group layer's drawable
while flusing the group's projection during resizing, since we want
to either update the entire drawable, or avoid any updates, when
replacing the drawable's buffer.  Note that explicitly supressing
updates in this case should theoretically not be necessary, but the
fact that the call to gimp_projectable_bounds_changed() can result
in reconstructing the projection (see the FIXME comment in that
function) makes it necessary in some cases nonetheless.

(cherry picked from commit bd726c96bf)
2018-08-03 14:10:00 -04:00
Ell
5eaa2f9091 app: avoid re-rendering group layers upon translation
When translating group layers, there's no need to re-render the
group's projection -- we can simply update the group's offset (and
offset node) directly, and redirect any layer-stack "update"
signals to the group's drawable.  This significantly improves
performance when moving groups.

(cherry picked from commit 3ff820a00a)
2018-08-03 14:10:00 -04:00
Ell
bcbc3c23e0 app: use gimp_projectable_bounds_changed() when resizing group layers
In GimpGroupLayer, use gimp_projectable_bounds_changed() when
updating the group layer's size, instead of reconstructing the
projection, unless reallocation of the projection has been
requested.  This is more efficient, since it simply copies the
content of the projection's old buffer to the new buffer, rather
than re-rendering the graph.

(cherry picked from commit 1bb3e962f6)
2018-08-03 14:10:00 -04:00
Ell
379d65e056 app: stop idle projection rendering when flushing group layers
In gimp_group_layer_flush(), stop any idle rendering, initiated
when a new buffer is allocated, before flushing the group's
pickable.  Otherwise, the idle rendering is finished synchronously,
which unnecessarily introduces a noticeable lag.

(cherry picked from commit a4957c7c76)
2018-08-03 14:10:00 -04:00
Ell
adadd4bbbd app: add "update" parameter to gimp_drawable_set_buffer_full()
... which specifies whether or not to update the drawable in
response to the buffer change.

Pass TRUE for "update" at all existing call sites, to keep the
current behavior.

(cherry picked from commit 26a8d141f6)
2018-08-03 14:10:00 -04:00
Ell
09d50449f2 app: respond to GimpProjectable::bounds-changed in GimpProjection
In GimpProjection, respond to the projectable's "bounds-changed"
signal, by reallocating the buffer, and copying the corresponding
region of the old buffer (using
gimp_tile_handler_validate_buffer_copy(), added a few commits back,
so that the relevant portion of the validate handler's dirty region
is also copied).  Additionally, shift and clip all outstanding
update regions as necessary (actually, we avoid copying the buffer
when a shift is necessary, and simply reconstruct the projection;
see FIXME comment in the code.)

(cherry picked from commit fbeae36118)
2018-08-03 14:10:00 -04:00
Ell
2ad7fe9763 app: add GimpProjectable::bounds-changed signal
... and a corresponding gimp_projectable_bounds_changed() function.

This signal can be emitted by implementers of GimpProjectable,
instead of the GimpProjectable::structure-changed signal, when the
projectable's bounds change, but its content does not -- i.e., the
old content simply gets cropped to the new bounds.

(cherry picked from commit 460c3d1349)
2018-08-03 14:10:00 -04:00
Ell
c0a4e12b3d app: add gimp_tile_handler_validate_buffer_copy()
Add gimp_tile_handler_validate_buffer_copy(), which can be used
instead of gegl_buffer_copy(), to copy a (subregion of a) source
buffer to a destination buffer with a GimpTileHandlerValidate,
uninvalidating, and avoiding unnecessarily rendering, the
affected region.  Additionally, if the source buffer also uses a
GimpTileHandlerValidate, the relevant parts of the source buffer's
dirty region are copied to the destination's dirty region as well.

(cherry picked from commit eeed4778a2)
2018-08-03 14:10:00 -04:00
Ell
9ad3720271 app: add gimp_tile_handler_validate_unassign()
... which should be used to properly remove a
GimpTileHandlerValidate from a buffer, instead of using
gegl_buffer_remove_handler() directly.

Use gimp_tile_handler_validate_unassign(), instead of
gegl_buffer_remove_handler(), in gimp_projection_free_buffer().

(cherry picked from commit 12530e21b2)
2018-08-03 14:10:00 -04:00
Ell
cf0abb0ed9 app: in GimpTileHandlerValidate, clear data when allocating tile
In GimpTileHandlerValidate, when allocating a new tile upon a
TILE_GET command, but not rendering the whole tile, clear the tile
data before rendering, so that the unrendered regions of the tile
contain zeros, rather than junk.

(cherry picked from commit e1e4ba9c8b)
2018-08-03 14:10:00 -04:00
Martin Srebotnjak
82555e58b9 Updated Slovenian translation 2018-08-03 17:52:10 +02:00
Martin Srebotnjak
cb0bc3a0b6 Updated Slovenian translation 2018-08-03 17:45:41 +02:00
Martin Srebotnjak
3db71dc2b8 Updated Slovenian translation 2018-08-03 17:42:57 +02:00
Martin Srebotnjak
599f947a66 Updated Slovenian translation 2018-08-03 17:38:38 +02:00
Martin Srebotnjak
05803d8f6c Updated Slovenian translation 2018-08-03 17:33:52 +02:00
Vinzenz Vietzke
0a2c03b667 Update German translation 2018-08-03 13:20:40 +00:00
Marco Ciampa
d2c45f3d03 Updated Italian translation 2018-08-02 17:50:32 +02:00
Jehan
c25aaaa0e0 app, libgimpbase: update vertical text labels.
This is my attempt to get better labels, shorter and also (hopefully)
improved English.
As Mitch states though, this is a Japanese-French-German conspiracy! So
any of you native English speakers out there, please review and suggest
proper English if needed. :-)

(cherry picked from commit 9cdedc98f8)
2018-08-02 15:26:19 +02:00
Jehan
9ec12b6246 app: minor coding-style cleanup.
Adding spaces between function names and parenthese.

I would normally have just amended the contributed patches and pushed,
but gitlab is making our review process over-complicated with many
roundtrips with contributors, and review quality drops. Stating it here
for the records!
See commit 70945b8960 (where this cleaning
should have directly been done).

(cherry picked from commit 5c56f8cb3a)
2018-08-02 15:26:19 +02:00
ONO Yoshio
8945f4b96d Fixed when texttool popup is shown first, it does not have current text direction.
(cherry picked from commit ee468b0024)
2018-08-02 15:26:19 +02:00
ONO Yoshio
f6ed6e6e72 Fixed that anchor position of text is shifted when text direction is changed.
anchor of LTR is top-left corner.
anchor of TTB-RTL is top-right cornner.
anchor of TTB-LTR is top-left cornner.

(cherry picked from commit 70945b8960)
2018-08-02 15:26:19 +02:00
Jehan
552dc5f867 INSTALL: update gettext requirement.
Also fix number of hyphens around the title.

(cherry picked from commit 9c84d2375b)
2018-08-01 19:00:38 +02:00
Jehan
8e889fd10c configure: making xgettext recommended version a requirement.
Back when I implemented this as a recommendation, gettext 0.19 was not
even out yet. Nowadays it is in Debian Testing (Debian Stable even!), so
it makes no sense to continue just "recommend" it, especially as it was
breaking script-fu localization.

See old commit feb1bf2797.

(cherry picked from commit 8e6afe10a6)
2018-08-01 19:00:31 +02:00
Jehan
8d2ade524e app: add "cairo-ARGB32" to "R'G'B'A u8" in gimp_babl_init_fishes().
This fish is used for text layers, so if we let it to be
lazy-initialized, the first time one writes text in a text layer, it
generates a few seconds delay, which is really not great.

(cherry picked from commit a03e52ea08)
2018-08-01 19:00:22 +02:00
Jehan
e870c6c5da po: fix validation of Desktop file because of Marathi keywords.
Fixes:
> WARNING: Failed to validate desktop file […] for locale string list
> key "Keywords[mr]" in group "Desktop Entry" does not have a semicolon
> (';') as trailing character

I just added a semicolon.

(cherry picked from commit 79a5c304d2)
2018-08-01 19:00:13 +02:00
Ell
daa12a1ebc Issue #1884 - Incorrect font when export to png
In gimp_layer_convert(), avoid converting the drawable type when
the source and destination color profiles are equal, if otherwise
unnecessary.  Otherwise, text layers get unnecessarily re-rendered
during conversion, and, by extension, during image duplication
(which happens when exporting to any format that requires merging
down the image).  This may cause the text layer to appear
differently in the duplicated image, or even use a different font
if the original font doesn't exist.

(cherry picked from commit a826a19359)
2018-08-01 05:06:30 -04:00
Ell
ed631c842a app: copy the is-color-managed status when duplicating an image
When duplicating an image, copy the source image's is-color-managed
status to the duplicated image, instead of having the duplicated
image always be color managed.  In particular, do this before
duplicating the layers, so that we don't convert the duplicated
layers from sRGB to the image's profile when duplicating an image
with a non-sRGB profile but with color management turned off.

(cherry picked from commit f38443f3b0)
2018-08-01 05:06:30 -04:00
Rodrigo Lledó
84e55dde1e Update Spanish translation 2018-08-01 08:16:41 +00:00
ONO Yoshio
bb56a97a8b Modified a comment in more detail.
(cherry picked from commit b405b0364c)
2018-07-31 15:24:30 +02:00
Jehan
ea12bc7a2b NEWS: keep up-to-date. 2018-07-31 00:35:24 +02:00
Jehan
ff13f75ebc icons: update icons for new top-to-bottom text feature.
They are not perfect (not a designer here!) but a bit less packed than
the previous one. So hopefully more understandable.

(cherry picked from commit e326faa77c)
2018-07-30 23:10:19 +02:00
ONO Yoshio
e2958714d9 MR !19: Add support for vertical text writing.
Squashed commit of the following:

commit ee1ff7d502658cfa1248a13a3f0348495db07eda
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sun Jul 29 00:31:47 2018 +0900

    Fixed that gimp-text-dir-ttb-* icons are lacked in Symbolic.

commit d87d012d697628da28fe90199cc04b95b72ba8ef
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 16:23:10 2018 +0900

    Fix a typo.

commit cf0238bf7df56c384cdf3b7ec69557d14740f853
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 15:50:57 2018 +0900

    Fixed seg fault error.

commit b07f60d06fa1a753fda5b4d46af01698c344154e
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Fri Jul 27 17:15:34 2018 +0900

    Add support for vertical text writing.

    https://gitlab.gnome.org/GNOME/gimp/issues/641

(cherry picked from commit 587d9bbb03)
2018-07-30 23:10:11 +02:00
Bruno Lopes da Silva
b43473d940 Update Brazilian Portuguese translation 2018-07-30 17:50:59 +00:00
Hannie Dumoleyn
892515fad2 Update Dutch translation 2018-07-30 17:16:45 +00:00
Bruno Lopes da Silva
cb55faeb61 Update Brazilian Portuguese translation 2018-07-30 16:30:32 +00:00
Piotr Drąg
19e243e8e7 Update Polish translation 2018-07-29 19:38:32 +02:00
Jehan
47b3f5cc33 NEWS: keep up-to-date. 2018-07-25 17:27:15 +02:00
Jehan
d403f3313a app: show relevant files only by default.
Just like it was until now, the default filtering should not be all
files, but only relevant files (i.e. XCF when saving, exportable images
when exporting and loadable images/XCF when opening).
Now all files will only be available through the "Show All Files"
checkbox.

This is simpler than previous implementations where the list was
proposing "All Files", "All Images" and "All XCF/export images". That is
just too much.

With this default, I get the "All Files" checkbox out of the expander so
that it is visible immediately even when the format list is unexpanded
(you don't want people to get pissed when not finding how to display all
their files).

(cherry picked from commit 6b4b3bad13)
2018-07-25 17:07:54 +02:00
Jehan
ed5432d58f Issue #1160: file dialog view filter getting confused with file...
... format selection.
Second step: add a "Show All Files" checkbox so that one can still
prevent view filtering even when forcing a load format.
This is useful when loading files with unusual extensions, for instance.

(cherry picked from commit 6369445874)
2018-07-25 16:12:19 +02:00
Jehan
88d126c31a Issue #1160: file dialog view filter getting confused with file...
... format selection.
As discussed, the first step is to get rid of the filter list. Our extra
widget now has both roles of filtering the file list and forcing a
loading procedure.

(cherry picked from commit 9ae7827f9b)
2018-07-25 15:39:41 +02:00
Ell
efe72a8d56 */Makefile.am: add *marshal.h files to BUILT_SOURCES
In subdirs containing a generated foomarshal.h header, add the
generated sources to BUILT_SOURCES, so that they're generated
before the rest of the source files are built.  Otherwise, since
there is no rule specifying the dependency between the rest of the
source files and foomarshal.h, and since foomarshal.h is not
checked into git (and hence doesn't exist when doing a clean
build), compilation of the said source files may fail if they're
built before foomarshal.h is generated.

(cherry picked from commit a5102a7dba)
2018-07-24 14:05:23 -04:00
Rodrigo Lledó
3a9025fd7f Update Spanish translation 2018-07-24 10:37:15 +00:00
Daniel Mustieles
800a02a297 Updated Spanish translation 2018-07-24 12:28:50 +02:00
Daniel Mustieles
b77c523c4e Updated Spanish translation 2018-07-24 10:22:06 +02:00
Ell
f1bc66ce30 app: fix segafult when halting filter-tool with controller
In GimpFilterTool, bind the controller's lifetime to the lifetime
of the config object, rather than to the lifetime of the
corresponding tool widget; make the controller's widget pointer a
weak pointer to the widget, and bail out of the controller "set()"
functions when the widget pointer is NULL.

This fixes an issue arising when the properties of a config object
that outlives the widget change after the widget had died,
triggering a call to the controller's set() function, resulting in
a segafult when trying to access the widget.

(cherry picked from commit 78abe756f1)
2018-07-24 02:27:01 -04:00
Ell
dc7d2c357c app: in prop-GUI, use "direction" UI-meta of angle props for dial
When constructing a prop-GUI widget for an angle property with a
dial, use the the property's "direction" UI-meta, if exists, to set
the direction of the dial.  Together with GEGL commit
7b0578073a0f20334b5a8a8fe57b649d9f302454, this fixes wrong dial
direction in certain ops that use clockwise angles.

(cherry picked from commit 6976e87dac)
2018-07-24 02:27:01 -04:00
Ell
49ce2422f9 app: in GimpDial, add "clockwise-angles" property ...
... and rename "clockwise" to "clockwise-delta"

Add a boolean "clockwise-angles" property to GimpDial, which, when
set, causes the dial legs' angles to be measured clockwise, rather
than counter-clockwise.  The property is FALSE by default.

Rename the "clockwise" property, which controls the direction of
the measured delta between the two angles, to "clockwise-delta", to
avoid confusion, and adapt the rest of the code.

(cherry picked from commit 0c477564ad)
2018-07-24 02:26:59 -04:00
Michael Schumacher
c582023ef5 icons: add missing gimp-color-space-non-linear.png files 2018-07-23 18:25:57 +02:00
Piotr Drąg
0aba1c0e76 Update Polish translation 2018-07-22 19:58:41 +02:00
Michael Natterer
77f3c8e404 libgimpwidgets, icons: add gimp-color-space-non-linear icon
For now just a copy of the "perceptual" icon.

(cherry picked from commit 5c94ebaed3)
2018-07-20 17:29:31 +02:00
Rodrigo
8954a0e24c Update Spanish translation 2018-07-19 09:00:58 +00:00
Ell
b72dc8abf1 Issue #1874 - Critical error after selecting "Edit Text on Canvas" ...
... from layer context menu

In gimp_text_tool_set_layer(), do nothing if the input layer is the
currently-edited layer, otherwise we get a CRITICAL.

(cherry picked from commit 6b1d77b11c)
2018-07-19 02:27:11 -04:00
Marco Ciampa
3e1138dd08 Updated Italian translation 2018-07-19 01:02:31 +02:00
Marco Ciampa
d5dd54c8ed Updated Italian translation 2018-07-19 00:53:22 +02:00
Jehan
29deb53727 libgimpconfig: update some description comments.
Second parameter of gimp_scanner_parse_token() and
gimp_scanner_parse_identifier() is not a return value. It is a value to
compare with.

(cherry picked from commit bc427479e0)
2018-07-18 16:34:19 +02:00
Jehan
a52473196f INSTALL: add some recommended dependencies to GEGL.
This is a "for info" comment so that packagers don't forget them when we
sometimes depend on some specific GEGL dependencies.

(cherry picked from commit 530a2bd9a5)
2018-07-18 16:34:01 +02:00
Dimitris Spingos (Δημήτρης Σπίγγος)
d779302c74 Update Greek translation 2018-07-18 17:28:43 +03:00
Ell
65daaeb876 app: improve file-handler sorting
... by falling back to the procedure name as a last resort.

(cherry picked from commit 534e8aa92c)
2018-07-18 09:27:36 -04:00
Ell
ed8f80bf4b app: fix dynamics editor "fade" curve color
In the dynamics editor, use the neutral curve color, which depends
on the current theme, for the "fade" curve, instead of hard-coding
it to dark gray, which is hardly visible with dark themes.

(cherry picked from commit b2a9bb4688)
2018-07-17 09:18:41 -04:00
Ell
2540b4eff8 app: indentation fix in gimppluginmanager-restore.c
(cherry picked from commit bfc2681753)
2018-07-17 03:19:04 -04:00
Ell
dd91322ab9 Issue #1825 - PSD files are loaded as merged by default ...
... depending on UI language

Use gimp_register_file_handler_priority(), added in the previous
commit, to increase the priority of the merged PSD loader, so that
the non-merged loader is always preferred over it (unless
explicitly chosen), regardless of the UI language.

(cherry picked from commit 0320126254)
2018-07-17 03:02:57 -04:00
Ell
c5c0f87310 app, pdb: add gimp-register-file-handler-priority procedure
Add a gimp-register-file-handler-priority procedure, which can be
used to set the priority of a file-handler procedure.  When more
than one file-handler procedure matches a file, the procedure with
the lowest priority is used; if more than one procedure has the
lowest priority, it is unspecified which one of them is used.  The
default priority of file-handler procedures is 0.

Add the necessary plumbing (plus some fixes) to the plug-in manager
to handle file-handler priorities.  In particular, use two
different lists for each type of file-handler procedures: one meant
for searching, and is sorted according to priority, and one meant
for display, and is sorted alphabetically.

(cherry picked from commit b4ac956859)
2018-07-17 03:02:57 -04:00
Michael Natterer
dc29bfe362 app: opaque in gimp_layer_new() is 1.0 not 255
The value is later CLAMP()ed correctly, but fix the call in xcf-load.c
anyway.

(cherry picked from commit ac5f44eb74)
2018-07-16 14:51:41 +02:00
Michael Natterer
7d897a451e libgimpcolor: add gimp_color_profile_get_space()
which returns the Babl space matching the profile.

(cherry picked from commit ac57af58a2)
2018-07-16 14:14:18 +02:00
Øyvind Kolås
75837694e6 app: gimp:semi-flatten propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
0a2ec7c292 app: gimp:threshold-alpha propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
9b4e8ee275 app: gimp:set-alpha propagate space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
a8a7c99389 app: gimp:grow propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
739d72c562 app: gimp:shrink propagate bable space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
6a6ef0f2e1 app: propagate babl space in pointfilter base class 2018-07-16 13:37:01 +02:00
Øyvind Kolås
df00af81b3 app: gimp:flood propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
f4cd1f7970 app: gimp:desaturate propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
3c49e43062 app: gimp:compose-crop propagate babl space 2018-07-16 13:37:01 +02:00
Øyvind Kolås
b7ca5f1997 app: gimp:border propagate babl space 2018-07-16 13:37:01 +02:00
Ell
e13eb13bc4 app: update GimpToolCompass when display is scaled/rotated
In GimpToolCompass (and, as a consequence, in the measure tool),
update the measured angle when the shell is scaled, rotated, or
flipped, so that we always satisfy the compass's constrains, and
render correctly.

(cherry picked from commit a810c6b60b)
2018-07-16 04:44:51 -04:00
Ell
7ab213d918 app: in GimpToolCompass, add visual distinction between angle lines
When using a GimpToolCompass in 3-point mode, add a small gap after
the angle arc to the line corresponding to the "second" non-origin
point, so that it's visually distinguishable from the line
corresponding to the "first" point.  This has significance for the
measure tool, since it determines the direction of the rotation
when straightening the image (the first point is rotated toward the
second point.)

(cherry picked from commit 0f03f9e9f5)
2018-07-16 02:17:13 -04:00
Ell
241c8dd756 app: keep display-enums.h (sort-of) alphabetically sorted
(cherry picked from commit f026a3fc2d)
2018-07-16 01:42:27 -04:00
Ell
9a77dc75a4 Issue #1850 - Undoing the "straighten" operation in the Measure tool ...
... does not restore the measure points

Halt the measure tool after straightening, thus removing the
expectation that undoing the operation should restore the original
points.

Halting the tool, rather than making undo work "as expected",
sidesteps several issues:

  - Implementing undo correctly is tricky, since image-undo and
    tool-undo are handled separately.

  - In fact, the measure tool doesn't provide tool-undo, so that
    image edits can be undone while the tool is active without
    affecting the tool, and it's not clear that we want to change
    this behavior.  However, this makes undoing a straighten
    operation a special case, and it's not entirely clear what the
    behavior should be when undoing other kinds of transformations,
    or when the measure points had changed since the straighten
    operation.

  - Perhaps most importantly, measure tool points are restricted to
    the pixel grid, which means that when measuring an angle
    against an orientation that's not fully horizontal or vertical
    in image space (either using a 3-point angle, or when the
    canvas is rotated), the resulting transformed point after
    straightening doesn't generally land on the pixel grid, causing
    it to be rounded, which can result in a non-zero angle after
    the rotation.  This is especially ugly, since clicking
    "straighten" again at this point would cause another non-
    trivial rotation.

(cherry picked from commit 2e08c9164a)
2018-07-16 01:21:48 -04:00
Michael Natterer
d26bde8f7a Issue #1805 - Sample Points keep resetting themselves to "Pixel"
Rename XCF property PROP_SAMPLE_POINT to PROP_OLD_SAMPLE_POINT and add
new PROP_SAMPLE_POINT.

The new property saves the sample point's pick mode plus some padding
for whatever else we might want to add. Always save the old property
too so nothing changes for older GIMP versions, and avoid loading the
old property if the new one was loaded before.

(cherry picked from commit 47a008be97)
2018-07-16 02:55:21 +02:00
Ell
bfa94216a9 app: bind "orientation" measure-tool option to compass
Bind the "orientation" property of the measure-tool options to the
tool's compass widget's "orientation" property, instead of manually
synchronizing their values.

(cherry picked from commit 7a91aabf37)
2018-07-15 19:58:59 -04:00
Ell
dc2cdfe658 Issue #1851 - Measure tool straighten rotation is always to the horizontal.
Add an "orientation" option to the measure tool, corresponding to
the "orientation" property of GimpToolCompass (i.e., it controls
the orientation against which the angle is measured, when not in 3-
point mode.)  The orientation is "auto" by default, so that the
angle is always <= 45 deg.  Note that the "orientation" option
affects the tool's "straighten" function, so that the layer is
rotated toward the current orientation.

Use the "pixel-angle" and "unit-angle" properies of
GimpToolCompass to read the measured angle, instead of duplicating
the angle-measurement logic, in particular, so that we benefit from
the improvements/fixes of the previous commit.

(cherry picked from commit cb3b7a1ba5)
2018-07-15 19:09:16 -04:00
Ell
fc4ca7fbcf app: add "orientation" property to GimpToolCompass + improvements
Add an "orientation" property to GimpToolCompass, which can be one
of "auto", "horizontal", or "vertical", and which controls the
orientation of the line against which the angle is measured, when
not in 3-point mode (previously, the line would always be
horizontal.)  When "orientation" is "auto", the orientation is
automatically set to either horizontal or vertical, such that the
measured angle is <= 45 deg.

Keep the line horizontal, or vertical, in display-space, rather
than in image-space, so that the compass works correctly even when
the canvas is rotated and/or flipped.

Fix the compass's behavior when the image's horizontal and vertical
resolutions are different, both with and without dot-for-dot.

Add "pixel-angle" and "unit-angle" read-only properties, which
return the measured angle either with or without taking the image's
resolution into account, respectively.  These properties will be
used by the measure tool in the next commit, instead of having it
implement its own angle calculation.

(cherry picked from commit d2f33cf1be)
2018-07-15 19:09:16 -04:00
Ell
4cb91320a4 app: fix line-angle constraint when xres != yres
Fix gimp_constrain_line() and friends to properly constrain line
angles when the image's horizontal and vertical resolutions are
different, and dot-for-dot is disabled.

(cherry picked from commit 4fefab1798)
2018-07-15 19:09:16 -04:00
Michael Natterer
88db1f8282 Issue #1805 - Sample Points keep resetting themselves to "Pixel"
Remember the sample point's GimpColorPickMode in the sample point
itself, so it is remembered across switching between images.

Not persistent in the XCF yet tho...

(cherry picked from commit a0129504c8)
2018-07-16 00:46:38 +02:00
Michael Natterer
6e86e2233e app: move GimpColorFrameMode to the core and name it GimpColorPickMode
(cherry picked from commit f676f2aa79)
2018-07-15 23:29:41 +02:00
Michael Natterer
513c71d1d2 app: sort core-enums.h alphabetically
Sorry for messing with git diffs, but this unsorted mess has been
annoying since forever.

(cherry picked from commit a7a277efe7)
2018-07-15 22:28:22 +02:00
Michael Natterer
16df7fa941 app: minor cleanup in gimpguide.c
(cherry picked from commit 827faa2a25)
2018-07-15 22:28:12 +02:00
Piotr Drąg
34080f1188 Update Polish translation 2018-07-15 19:58:18 +02:00
Michael Natterer
3abfd14d61 app: add GimpAuxItem as base class for GimpGuide and GimpSamplePoint
and GimpAuxItemUndo for their respective undo classes.

(cherry picked from commit 2cd829eb85)
2018-07-15 17:13:03 +02:00
Michael Natterer
3c9de4b59e app: turn GimpSamplePoint into a GObject, just like GimpGuide
In fact, they are so similar now, they should get a common abstract
parent class.

(cherry picked from commit b4c244b839)
2018-07-15 16:01:16 +02:00
Michael Natterer
f585cf94a0 app: some cosmetic cleanup in the guide code
(cherry picked from commit e76eb736d4)
2018-07-15 15:54:07 +02:00
Michael Natterer
a90619ff00 app: rename enum GimpColorPickMode to GimpColorPickTarget
This is just some preparation for fixing issue #1805, but actually
"target" is a much better name so I went the full way and also changed
GUI labels and the color picker tool options config property
accordingly.

If anyone notices at all, how horrible is it to lose your saved pick
target...

(cherry picked from commit b140b283dc)
2018-07-15 14:39:03 +02:00
Ell
bc312531fb app: flush async-operations queue when setting async thread count to 0
In gimp-parallel, always flush the async-operations queue (by
executing all remaining operations on the caller thread) when
setting the async-pool thread count to 0 (as happens when setting
GEGL_THREADS=1, per the previous commit,) and not only when
shutting GIMP down.  Otherwise, pending asynchronous operations
can "get lost" when setting GEGL_THREADS to 1.

Additionally, in gimp_gegl_init(), initialize gimp-parallel before
before connecting to GimpGeglConfig's "notify::num-processors"
signal, so that the number of async threads is set *before*
GEGL_THREADS, in order to avoid setting GEGL_THREADS to 1 while
async operations are still executing.

Also, allow setting the number of gimp-parallel-distribute threads
while a gimp-parallel-distribute function is running (which can
happen if gimp-parallel-distribute is used in an async operation,
as is the case for histogram calculation), by waiting for the
parallel-distribute function to finish before setting the number of
threads.

(cherry picked from commit 432a884715)
2018-07-15 05:07:46 -04:00
Ell
1c435f313b app: disable parallel asynchronous operations when GEGL_THREADS=1
When GEGL_THREADS=1, concurrent access to the same buffer is not
safe, which can result in errors if asynchronous operations are
allowed to run in parallel to the main thread (see
https://gitlab.gnome.org/GNOME/gimp/issues/1721#note_265898.)

Disable parallel execution of asynchronous operations when
GEGL_THREADS=1 for now, to fix this.  Ultimately, GEGL should be
able to remain thread-safe even when GEGL_THREADS=1.  Note that we
want to execute asynchronous operations on a separate thread even
when GEGL_THREADS=1, since the goal here is mainly to avoid
blocking the main thread during their execution, rather than
speeding their execution up (in particular, it's benecifical to run
asynchronous operations in parallel even on a single-core machine,
while parallelizing GEGL operations generally isn't.)

(cherry picked from commit 408540659f)
2018-07-15 03:44:33 -04:00
luz.paz
1de48b2692 gimptoolpolygon.c source typo
Found via `codespell`

(cherry picked from commit 719059fb4e)
2018-07-14 21:19:09 +02:00
luz.paz
2883b8fb40 Misc. comment typos
Found via `codespell`

(cherry picked from commit 732bcb463e)
2018-07-14 21:17:19 +02:00
Michael Natterer
e747cbad6b plug-ins, pdb: remove the unsharp-mask plug-in and add a PDB compat proc
(cherry picked from commit 680642e37c)
2018-07-14 17:15:56 +02:00
Michael Natterer
9e71fc0983 Change a bazillion URLs to https://
Including all user-visible link and links called from code, like
the help pages.

(cherry picked from commit bab75b7365)
2018-07-14 14:23:42 +02:00
Michael Natterer
7805a4cdbd libgimpthumb: update the URL of the thumbnail spec
(cherry picked from commit 02160a26b0)
2018-07-14 13:28:40 +02:00
Bruno Lopes da Silva
a7e98a33f5 Update Brazilian Portuguese translation 2018-07-14 01:07:00 +00:00
Michael Natterer
c4ba9c36a6 Issue #1841 - Export As... mng swaps width and height
layer_cols and layer_rows were swapped.

(cherry picked from commit 44b469e493)
2018-07-13 17:58:28 +02:00
Bruno Lopes da Silva
9340b68e81 Update Brazilian Portuguese translation 2018-07-13 14:04:02 +00:00
Michael Natterer
c743aed29d app: relax precondition checks in gimp_operation_config_get_type()
Only require the parent type if the requested type is not already
registered.

(cherry picked from commit 9ef39b507b)
2018-07-13 13:58:51 +02:00
Daniel Mustieles
bfc3b5f780 Update Spanish translation 2018-07-13 11:53:29 +00:00
Michael Natterer
5e3150b90e app: small formatting fix in gimpfiltertool-widgets.c
(cherry picked from commit 9629fc8785)
2018-07-13 12:41:30 +02:00
Rafael Fontenelle
87ef1d4d8f Update Brazilian Portuguese translation 2018-07-13 09:27:51 +00:00
Bruno Lopes da Silva
edd1d01b41 Update Brazilian Portuguese translation 2018-07-13 08:41:57 +00:00
Michael Natterer
e7cfda7d9f app: remove duplicate include in gimpcurvesconfig.c
(cherry picked from commit b5b48e51c8)
2018-07-13 01:19:33 +02:00
Bruno Lopes da Silva
127a982232 Update Brazilian Portuguese translation 2018-07-12 16:15:50 +00:00
Ell
dadfced2af app: don't process updates when clearing container-tree-view context
In GimpContainerTreeView, don't process updates in response to a
selection-change if the selection is empty (for the reason this is
necessary in the first place (though not in this particular case),
see commit f9a71fb6de5a2e65e0d88c6b7aaa39f589d6cdc4.)  When
clearing the container-view's context, we deselect all items after
setting the context to NULL, in which case
gimp_view_renderer_draw() warns, breaking one of our tests.
2018-07-12 10:59:32 -04:00
Michael Natterer
6f04d06095 Issue #1834 - (gimp-context-get-gradient) could return a gradient name...
...not found if language changed since last session

For various reasons, (gimp-context-get-brush, pattern, gradient, ...)
can return "Standard" which is the untranslatable name of the internal
fallback object.

Therefore, we must accept "Standard" as fallback in all PDB functions
that take brush, pattern, gradient etc. names.

(cherry picked from commit 397ae027ba)
2018-07-12 12:44:30 +02:00
Michael Natterer
ea86c3be12 Issue #1833 - (gimp-context-get-gradient-repeat-mode) always warns...
...and successfully fails

Commit d2ad2928 removed "gradient-repeat" from GimpPaintOptions, not
considering that it is also used in the PDB.

Move "gradient-repeat" from GimpGradientOptions back to
GimpPaintOptions, and add a comment that it is only used by the
gradient tool, not for painting.

(cherry picked from commit c3d37140eb)
2018-07-12 11:44:35 +02:00
Michael Natterer
f39d359bdf Forgot some license links... 2018-07-12 00:13:19 +02:00
Michael Natterer
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
Matej Urbančič
db5b2e3433 Updated Slovenian translation ... 2018-07-11 22:40:06 +02:00
Matej Urbančič
512cb31d83 Updated Slovenian translation ... 2018-07-11 22:38:20 +02:00
Matej Urbančič
b52541a03b Updated Slovenian translation ... 2018-07-11 22:35:26 +02:00
Matej Urbančič
4711f8b791 Updated Slovenian translation ... 2018-07-11 22:31:54 +02:00
Matej Urbančič
657169377e Merge branch 'gimp-2-10' of gitlab.gnome.org:GNOME/gimp into gimp-2-10 2018-07-11 22:28:59 +02:00
Matej Urbančič
f36bf556ca Updated Slovenian translation ... 2018-07-11 22:28:13 +02:00
Michael Natterer
cf80265411 More bugzilla -> gitlab in various files
(cherry picked from commit 8eb77376c4)
2018-07-11 22:26:53 +02:00
Martin Srebotnjak
0456c7c934 Updated Slovenian translation 2018-07-11 22:22:41 +02:00
Martin Srebotnjak
f0af65b65a Updated Slovenian translation 2018-07-11 22:20:36 +02:00
Michael Natterer
d6e0587085 po*: change Report-Msgid-Bugs-To URL to gitlab.gnome.org 2018-07-11 22:05:23 +02:00
Rafael Fontenelle
9c06f323e4 Update Brazilian Portuguese translation 2018-07-10 18:06:44 +00:00
Caio Nascimento
29094a5f0f Update Brazilian Portuguese translation 2018-07-10 14:14:39 -03:00
Bruno Lopes da Silva
6b096baf66 Update Brazilian Portuguese translation 2018-07-10 15:48:21 +00:00
Piotr Drąg
7e43757bf0 Update Polish translation 2018-07-10 05:50:30 +02:00
Rodrigo
a5437e4d0d Update Spanish translation 2018-07-09 11:06:28 +00:00
Daniel Mustieles
b871c3602d Update Spanish translation 2018-07-09 06:42:25 +00:00
Daniel Mustieles
5c20f279ed Update Spanish translation 2018-07-09 06:37:55 +00:00
Daniel Mustieles
bfff811ec1 Update Spanish translation 2018-07-09 06:35:05 +00:00
Bruno Lopes da Silva
b4d0f298f2 Update Brazilian Portuguese translation 2018-07-08 17:36:20 +00:00
Piotr Drąg
b5c470698f Update Polish translation 2018-07-08 17:36:55 +02:00
Michael Natterer
a09e016d32 libgimpwidgets: forgot one s/H/h/ in LCh
(cherry picked from commit a1f2464ed6)
2018-07-08 17:31:25 +02:00
Piotr Drąg
748863ae2a Update Polish translation 2018-07-08 17:22:28 +02:00
Michael Natterer
cc20410e80 app, libgimp*: make user visible color model labels consistent
- "LCh" intead of "LCH"
- "CIE LCh" instead of "CIELCh"
- "HSV Hue" instead of "Hue (HSV)" for all models/components

(cherry picked from commit 926dc070ef)
2018-07-08 16:21:23 +02:00
Michael Natterer
5d11544b2c app: make the rectangle options a bit narrower, still too wide...
(cherry picked from commit 6c3b1112be)
2018-07-08 14:49:13 +02:00
Daniel Șerbănescu
6377e60e26 Update Romanian translation 2018-07-08 07:34:26 +00:00
Jernej Simončič
d93b4437b7 Installer: fix .svg MIME type in Registry (fixes toolbox icons) 2018-07-08 00:18:37 +02:00
Vinzenz Vietzke
7acadffd47 Update German translation 2018-07-07 20:38:23 +00:00
Ell
f9a71fb6de app: work around GTK bug causing UI freeze during tree-view operations
In GimpContainerTreeView, work around a GTK bug which can cause the
window containing the tree view to stop processing updates,
resulting in an apprarent freeze, until update-processing is
explicitly requested.  This can be triggered by adding layers to a
layer group until the layers-dialog tree view is almost full, but
still doesn't have a scrollbar, and then duplicating the group.

This doesn't seem to affect GTK3, so not applying to master.
2018-07-07 16:25:38 -04:00
Michael Natterer
7b8d8a29a5 Issue #1805 - Sample Points keep resetting themselves to "Pixel"
Don't destroy the color frames when the number of points changes.
Instead, simply hide them so they keep their color model, but add an
upper limit of an arbitrary number of 16 frames to keep around.

(cherry picked from commit 370680f9bc)
2018-07-07 19:22:39 +02:00
Jehan
58b71b412c NEWS: kickstart the 2.10.6 news!
These are quite cool already. :-)
2018-07-07 18:34:12 +02:00
Snehalata B Shirude
9a08f499c6 Added Marathi translations 2018-07-07 18:16:29 +02:00
Snehalata Shirude
dccb2e3ead Added Marathi translation 2018-07-07 11:39:57 +02:00
Michael Natterer
7a49f59021 plug-ins: need to initialize "name" now in file-pat.c
(cherry picked from commit 34a0c36602)
2018-07-07 10:51:05 +02:00
Jernej Simončič
038e9e711b Installer: improved compile.bat 2018-07-06 20:51:04 +02:00
Ell
ff665da12b app, pdb: use gimp_babl_is_valid() in more places
Use gimp_babl_is_valid(), added in the previous commit, to validate
image-type/precision combinations in various functions.

(cherry picked from commit 49ca383fa4)
2018-07-06 13:45:01 -04:00
Ell
2ac529cb8c Issue #1792 - Xcf file crashing gimp-console-2.10 ...
... (valgrind reports Invalid read)

Add gimp_babl_is_valid(), which takes a GimpImageBaseType and a
GimpPrecision, and determines whether the image-type/precision
combination is valid.  Use this function to validate that loaded
XCFs use a valid type/precision combination, before trying to
create the image.  Otherwise, we get a CRITICAL, and eventually a
segfault, when the combination is invalid.

Use the same function to validate the arguments of
gimp_image_new().

(cherry picked from commit a0a62656d2)
2018-07-06 13:06:52 -04:00
Marco Ciampa
e25cccf049 Updated Italian translation 2018-07-06 13:51:54 +02:00
Marco Ciampa
abbe7c4e2f Merge branch 'gimp-2-10' of gitlab.gnome.org:GNOME/gimp into gimp-2-10 2018-07-06 13:50:20 +02:00
Marco Ciampa
7ca3f1d406 Updated Italian translation 2018-07-06 13:50:02 +02:00
Michael Natterer
f46cf260c5 Issue #1730 - pat file that crashes gimp-2.10
Introduce GIMP_PATTERN_MAX_SIZE (10000) and GIMP_PATTERN_MAX_NAME (256)
and validate pattern dimensions and pattern name length against them.

Add GIMP_BRUSH_MAX_NAME and validate that too.

Also make sure that the names are properly terminated, and some
cleanup.

(cherry picked from commit 9b56ca8c1d)
2018-07-06 13:11:57 +02:00
Michael Natterer
cd5e1470c9 app, plug-ins: move GIMP_BRUSH_MAX_SIZE to gimpbrush-header.h
and use it in the brush file plug-ins.

(cherry picked from commit 8195a56261)
2018-07-06 13:11:49 +02:00
Michael Natterer
b9272f8b5e app, plug-ins: clean up gimpbrush-header.h and gimppattern-header.h
Namespace the header structs, s/GBRUSH/GIMP_BRUSH/,
s/GPATTERN/GIMP_PATTERN/.

(cherry picked from commit e759ce3558)
2018-07-06 13:11:41 +02:00
Daniel Mustieles
80adf883d2 Update Spanish translation 2018-07-06 08:01:09 +00:00
Rodrigo
e93895ca84 Update Spanish translation 2018-07-06 07:28:55 +00:00
Rodrigo
dd6efd79c9 Update Spanish translation 2018-07-06 06:47:29 +00:00
Ell
74591e0598 app: properly shut down gimp-parallel in stable versions
In app_exit_after_callback(), call gimp_gegl_exit() before
gegl_exit() when performing a quick shut-down in stable versions,
so that gimp-parallel, and, in particular, the async thread pool,
is properly shut down.  Code running in the async thread pool may
use GEGL (in particular, now the drawable previews are rendered
asynchronously), and calling gegl_exit() while it's still running
is unsafe.

(cherry picked from commit ed033b1cb5)
2018-07-06 02:17:08 -04:00
Ell
4f20255675 app: log actions upon activation before emitting "selected" signal
In GimpAction, instead of connecting the action-history log
function to the action's "activate" signal as a user-provided
handler, call it directly from the default handler.

In subclasses of GimpAction, chain to the parent's activate()
function before emitting the "selected" signal, so that we always
log the action in the history before responding to it.

This allows us to avoid the hack in commit
6544ce4301.

(cherry picked from commit 114d49510f)
2018-07-06 00:08:04 -04:00
Ell
7a63095582 app: avoid CRITICAL when loading XCF with empty gimp-text-layer parasite
(cherry picked from commit b4aece8a27)
2018-07-05 22:48:16 -04:00
Ell
18bab869a0 app: avoid CRITICAL when loading XCF with empty symmetry parasites
(cherry picked from commit e97f2510dc)
2018-07-05 22:48:16 -04:00
Ell
3a356db7c9 libgimpbase: gracefully reject Exif/IPTC/XMP metadata of invalid size
In gimp_metadata_set_from_{exif,iptc,xmp}(), gracefully reject data
of invalid size, returning an error instead of raising a critical.

In particular, this avoids a CRITICAL when loading an XCF with an
empty exif-ata parasite.

(cherry picked from commit eafefc7d81)
2018-07-05 22:48:16 -04:00
Ell
6d7d062099 app: avoid CRITICAL when loading XCF with empty gimp-image-metadata parasite
(cherry picked from commit d4ff57c793)
2018-07-05 22:48:16 -04:00
Ell
42c401dde9 app: avoid CRITICAL when loading XCF with empty gimp-image-grid parasite
(cherry picked from commit b54256fbdc)
2018-07-05 22:48:16 -04:00
Ell
9ab781bdce app: avoid CRITICAL when writing 0-length data to XCF
In xcf_write_int8(), avoid calling g_output_stream_write_all() with
data == NULL and count == 0, in which case it raises a CRITICAL and
doesn't set bytes_written, which we proceed to use uninitialized.
This can happen, e.g., when writing an empty parasite.

(cherry picked from commit 8e798e9cf2)
2018-07-05 22:48:16 -04:00
Ell
26df575278 libgimpconfig: allow writing empty data in gimp_config_writer_data()
(cherry picked from commit 3b228afdbe)
2018-07-05 22:48:16 -04:00
Ell
62c016543d libgimpcolor, app: gracefully reject empty ICC profiles
In gimp_color_profile_new_from_icc_profile() and
gimp_image_validate_icc_profile(), don't raise a critical when
encountering an empty profile, but rather reject it gracefully with
an error.

(cherry picked from commit 10f33b080b)
2018-07-05 20:38:18 -04:00
Ell
9da04d9655 Issue #1783 - Xcf file crashing gimp-console-2.10 ...
... (Invalid read reported by valgrind)

In gimp_image_parasite_validate(), don't segfault when validating
a "gimp-comment" parasite of size 0 (i.e., whose data is a 0-byte
array, not an empty string), and just consider it invalid.

(cherry picked from commit f384a0713d)
2018-07-05 20:38:18 -04:00
Ell
d5e1af7d52 Issue #1783 - Xcf file crashing gimp-console-2.10 ...
... (Invalid read reported by valgrind)

In xcf_read_int8(), avoid calling g_input_stream_read_all() with
data == NULL and count == 0, in which case it raises a CRITICAL and
doesn't set bytes_read, which we proceed to use uninitialized.
This can happen, e.g., when reading an empty parasite.

(cherry picked from commit 6ebadea7c1)
2018-07-05 20:38:18 -04:00
Ell
9f0f11f44e app: fix potential segfault in gimp_action_history_activate_callback()
In gimp_action_history_activate_callback(), bail if history.gimp is
NULL, instead of dereferencing it.  This can happen if GIMP is shut
down during the execution of a temporary procedure, such as a
script-fu script.  See the code comment for details.

(cherry picked from commit 6544ce4301)
2018-07-05 13:35:36 -04:00
Jernej Simončič
324570712e Installer: show progress while removing old .debug files 2018-07-05 17:29:59 +02:00
Jernej Simončič
16562649f3 Installer: remove all obsolete 2.8 plugins 2018-07-05 17:27:41 +02:00
Ell
6ac4c48d9a app: add gegl:stereographic-projection (little planet) to the menus
(cherry picked from commit a96264b1b7)
2018-07-05 09:54:16 -04:00
Ell
9d53af65fd configure.ac: require GEGL >= 0.4.5
(cherry picked from commit 450e61f853)
2018-07-05 09:54:16 -04:00
Jernej Simončič
363b03aa35 Installer: more verbose debug messages 2018-07-05 14:45:04 +02:00
Jernej Simončič
78fbf159a6 Installer: include full version number in icon name 2018-07-05 13:55:24 +02:00
Jernej Simončič
a296c92f7c Installer: update python2 interpreter file 2018-07-05 12:18:13 +02:00
Daniel Mustieles
66ffab2cc1 Update Spanish translation 2018-07-05 09:39:30 +00:00
Jernej Simončič
76f7d6fa21 Installer: remove Quick Launch icon 2018-07-05 00:45:11 +02:00
Jernej Simončič
e5988ed940 Installer: install debug symbols by default 2018-07-05 00:33:13 +02:00
Jernej Simončič
ff66d3d218 Installer: ignore version information on files installed to {app} 2018-07-05 00:26:49 +02:00
Jernej Simončič
04be184020 Installer: include gdk-pixbuf-query-loaders.exe 2018-07-05 00:23:25 +02:00
Ell
b307c80381 app: fix signature of gimp_parallel_run_async() function template
Remove the now-useless "independent" parmaeter.  It is supplanted
by the new gimp_parallel_run_async_independent() function.

(cherry picked from commit 00d034a1d4)
2018-07-04 16:12:22 -04:00
Ell
ce47731997 app: add mnemonic to the layer-group previews prefrences option
(cherry picked from commit da1558d0c8)
2018-07-04 16:12:22 -04:00
Ell
a9435b9ed3 app: fix drawable-preview offset
(cherry picked from commit e6a59eba08)
2018-07-04 16:12:22 -04:00
Ell
3c03fcbfbb app: add active async-operations counter to the dashboard
Add an "async" field to the dashboard's "misc" group, showing the
number of async operations currently in the "running" state (i.e.,
all those GimpAsync objects for which gimp_async_finish[_full]() or
gimp_async_abort() haven't been called yet).

(cherry picked from commit aa382650a1)
2018-07-04 16:12:22 -04:00
Ell
0d2d45c3ef app: add config option to enable/disable layer-group previews
Preview generation for layer groups is more expensive than for
other types of drawables, mostly since we can't currently generate
layer-group previews asynchronously.  Add a preferences option for
enabling layer-group previews separately from the rest of the
layer/channel previews; both of these options are enabled by
default.  This can be desirable regardless of performance
considerations, since it makes layer groups easily distinguishable
from ordinary layers.

(cherry picked from commit 30cc85fd63)
2018-07-04 16:12:22 -04:00
Ell
a3883e5de7 app: make dependent options insensitive when "promote imported" is unchecked
In the preferences dialog, make the "dither images when promoting
to floating point" option insensitive when the "promote impoprted
images to floating point precision" option is unchecked.

(cherry picked from commit 5b9bc0aadd)
2018-07-04 16:12:21 -04:00
Ell
0765d8882a app: render drawable previews asynchronously
In GimpViewRendererDrawable, use
gimp_drawable_get_sub_preview_async(), added in the previous
commit, to render drawable previews asynchronously.  While the
preview is being rendered, either keep showing the previous
preview, or render a placeholder icon.

This commit also fixes an issue where, under certain conditions, a
drawable preview would be rendered, even when layer/channel
previews are disabled in the preferences.

(cherry picked from commit 8a81bfd2f1)
2018-07-04 16:12:21 -04:00
Ell
f993de75fe app: add gimp_drawable_get_sub_preview_async()
... which is an asynchronous version of
gimp_drawable_get_sub_preview().

We currently support async preview generation for drawables whose
buffer isn't backed by a GimpTileHandlerValidate tile handler
(i.e., anything other than group layers), since preview generation
fir such drawables may involve processing the corresponding graph,
which isn't thread-safe.

When the GIMP_NO_ASYNC_DRAWABLE_PREVIEWS environment variable is
defined, all drawable previews are synchronously generated.

(cherry picked from commit d79e3fbd6f)
2018-07-04 16:12:21 -04:00
Ell
fac91ddad4 app: add gimp_parallel_run_async_{full,independent}()
Remove the "independent" parameter of gimp_parallel_run_async(),
and have the function always execute the passed callback in the
shared async thread-pool.

Add a new gimp_parallel_run_async_full() function, taking, in
addition to a callback and a data pointer:

  - A priority value, controlling the priority of the callback in
    the async thread-pool queue.  0 is the default priority (used
    by gimp_parallel_run_async()), negative values have higher
    priority, and positive values have lower priority.

  - A destructor function for the data pointer.  This function is
    called to free the user data in case the async operation is
    canceled before execution of the callback function begins, and
    the operation is dropped from the queue and aborted without
    executing the callback.  Note that if the callback *is*
    executed, the destructor is *not* used -- it's the callback's
    responsibility to free/recycle the user data.

Add a separate gimp_parallel_run_async_independent() function,
taking the same parameters, and executing the passed callback in
an independent thread, rather than the thread pool.  This function
doesn't take a priority value or a destructor (and there's no
corresponding "_full()" variant that does), since they're pointless
for independent threads.

Adapt the rest of the code to the changes.

(cherry picked from commit b74e600c12)
2018-07-04 16:12:21 -04:00
Michael Natterer
fea8da130b configure.ac: post-release version bump to 2.10.5 2018-07-04 21:40:18 +02:00
Anders Jonsson
e9b646d5ce Update Swedish translation 2018-07-04 18:42:26 +00:00
Michael Natterer
e384409fe5 configure.ac: release GIMP 2.10.4 2018-07-04 20:16:04 +02:00
Ell
d20170ed6c app: in gimp-parallel, fix async-thread shutdown
... to prevent a potential deadlock.

(cherry picked from commit ff679c66a1)
2018-07-04 14:05:49 -04:00
Alan Mortensen
7b3ecb8080 Updated Danish translation of gimp-plug-ins 2018-07-04 19:38:16 +02:00
Alan Mortensen
bb34116ee3 Updated Danish translation 2018-07-04 19:38:14 +02:00
Michael Natterer
165cedc1ae NEWS: re-line-wrapped so I don't have to do that later in the mail client 2018-07-04 19:01:32 +02:00
Michael Natterer
fa033aaa3f docs, etc: regenerated default gimprc and its manpage 2018-07-04 18:56:51 +02:00
Jehan
3679b08337 desktop: 2.10.4 release is today, earlier than planned!
(cherry picked from commit 8eef339ed5)
2018-07-04 13:01:51 +02:00
Jehan
39213c790e NEWS: keep up-to-date. 2018-07-04 12:56:43 +02:00
Michael Natterer
964e5b4336 configure.ac: require GEGL >= 0.4.4
(cherry picked from commit a62fdce55a)
2018-07-04 12:46:28 +02:00
Alexandre Prokoudine
521afbd09f Update Russian translation 2018-07-04 09:43:49 +00:00
Alexandre Prokoudine
10dae0b2ea Update Russian translation 2018-07-04 03:18:33 +03:00
Michael Natterer
1022a638e8 Issue #1748 - Crash when parsing currupt tool preset
Bail out with an error instead of crashing when the tool options type
name is empty.

(cherry picked from commit e27e783f88)
2018-07-04 01:55:24 +02:00
Michael Natterer
d70bf7653d Issue #1719 - GIMP crashes with an invalid pluginrc
Fix 3 more crashes caused by accepting broken input, spotted by
Massimo.

(cherry picked from commit 7db59e7af9)
2018-07-04 00:19:44 +02:00
Rodrigo
960494c591 Update Spanish translation 2018-07-03 20:53:02 +00:00
Michael Natterer
e662b5a0ee app: fix logic error in tool_options_manager_paint_options_notify()
(cherry picked from commit 1ef7056324)
2018-07-03 20:13:49 +02:00
Michael Natterer
b4edec423c app: move the improved paint property copying code to GimpPaintOptions
and remove the old brush, dynamics, gradient property copying
functions.

(cherry picked from commit 80c423ae40)
2018-07-03 20:13:40 +02:00
Michael Natterer
a8b333a00e app: indentation in gimp-tools.c
(cherry picked from commit 5299b1894d)
2018-07-03 20:13:28 +02:00
Michael Natterer
cf7f27390c app: switch to using gimp-tool-options-manager
and remove all other tool options parent setting/unsetting and
property copying code. Also select a tool at the end of
tool_manager_init() so it is in sync with what the tool options
manager does.

(cherry picked from commit 37f69457b7)
2018-07-03 20:13:20 +02:00
Michael Natterer
19260d87b8 app: make sure the active tool options get saved in devicerc
gimp_devices_save(): call gimp_device_info_save_tool() on the current
device.

(cherry picked from commit 188fd773a5)
2018-07-03 20:13:05 +02:00
Michael Natterer
2a916b241c app: more stuff in gimp-tool-options-manager.c
tool_options_manager_tool_changed(): also copy the non-global paint
options of the new tool to the global paint options, so they get used
when "global_foo" is enabled.

(cherry picked from commit 1b858eb4ad)
2018-07-03 20:12:54 +02:00
Michael Natterer
08d64c6eb8 app: small fix in gimp-tool-options-manager.c
tool_options_manager_paint_options_notify(): sync properties between
tool paint options and global paint options if the property is global
*or* the active tool is involved.

tool_options_manager_global_notify(): don't mess with the active
tool's connection to the user context or its properties at all, it is
always fully connected to the user context anyway.

(cherry picked from commit 54257da7c4)
2018-07-03 20:12:44 +02:00
Michael Natterer
d03b31780b app: add gimp-tool-options-manager.[ch]
The way we currently manage tool options, and particularly copy things
around for "global_brush", "global_pattern" etc. sucks, is spread
across files, happens only on tool change, is thus buggy and leads to
all sorts of small inconsistencies.

This new manager will replace all of that stuff, and it does it in one
place, and will keep the user context, the global paint options, and
all tool options connected permanently, and only connect/disconnect
things when settings change, so everything is always in a consistent
state.

Pushed for review only, nothing is used yet.

(cherry picked from commit ef952f2926)
2018-07-03 20:12:29 +02:00
Michael Natterer
d851a9f203 app: prepare gimpdisplayshell-selection for undeprecation
with a patch that is mergable to 2-10.

(cherry picked from commit 7efb8576a1)
2018-07-03 19:46:27 +02:00
Ell
8ab76a42d8 app: fix GimpMeter history-graph painting when clipped
In GimpMeter, use cairo_path_extents() for getting the history
graph's extents, rather than cairo_clip_extents(), since the latter
may also include clipping applied by GTK.

(cherry picked from commit b8e08cddbc)
2018-07-03 10:31:18 -04:00
Daniel Korostil
7cdebe80a1 Update Ukrainian translation 2018-07-03 14:18:36 +00:00
Daniel Korostil
01e00a2afc Update Ukrainian translation 2018-07-03 14:04:55 +00:00
Daniel Korostil
c4e2763559 Update Ukrainian translation 2018-07-03 14:04:09 +00:00
Daniel Korostil
7b7dde84b0 Update Ukrainian translation 2018-07-03 09:22:12 +00:00
Michael Natterer
66ce32c8cb configure.ac: require babl >= 0.1.52
(cherry picked from commit 7aa4273806)
2018-07-02 20:08:47 +02:00
Ell
4569fdd34b app: explicitly close output stream when saving internal data
According to some bug reports, it seems that under some (unknown)
conditions we might save an empty custom gradient file on exit (for
equally unknown reasons).  The only difference in the way we save
internal data files, such as the custom gradient, compared to
gimp_data_save(), is the fact that we currently don't explicitly
close the output stream, but rather only unref it.

The output stream should be implicitly closed (and hence flushed)
upon destruction, but maybe the unreffing is not enough to
guarantee that it's actually destroyed (maybe it spawns an extra
reference for some reason, who knows.)  Anyway, let's just
explicitly close it, which also gives us a chance to catch and
report any errors occursing during flushing/closing (which,
altenatively, might be the culprit).

Additionally, a few more error-reporting improvements, to match
gimp_data_save().

(cherry picked from commit a72f7f1ace)
2018-07-02 11:48:49 -04:00
Rodrigo
80efa4a70d Update Spanish translation 2018-07-02 15:13:20 +00:00
Piotr Drąg
85a4ede083 Update Polish translation 2018-07-02 17:09:12 +02:00
Hannie Dumoleyn
2d6e47eef3 Update Dutch translation 2018-07-02 11:13:40 +00:00
Rodrigo
22cc731426 Update Spanish translation 2018-07-02 09:50:55 +00:00
Alexandre Prokoudine
c2e1147ff5 Sync USM menu entry to GEGL 2018-07-02 02:32:29 +03:00
Michael Natterer
b6c50c016c app: on make check, search menu XML files in both buildir and srcdir
Turn GIMP_TESTING_MENUS_DIR into GIMP_TESTING_MENUS_PATH and look in
all its dirs for the menu file.

(cherry picked from commit 8516aedade)
2018-07-01 19:46:31 +02:00
Piotr Drąg
6b42597d7b Update Polish translation 2018-07-01 19:27:49 +02:00
Rūdolfs Mazurs
6129f71a63 Update Latvian translation 2018-07-01 15:33:37 +00:00
Rūdolfs Mazurs
80bde0cb28 Update Latvian translation 2018-07-01 13:24:50 +00:00
Gábor Kelemen
99ae1a9e09 Update Hungarian translation 2018-07-01 08:01:54 +00:00
Jordi Mas
ef6354bf07 Update Catalan translation 2018-06-30 07:55:55 +02:00
Michael Schumacher
0a3d8ca0b2 app: Prevent parallel builds for the tests
The tests must not be run in parallel or in a different order as specified
2018-06-29 10:28:42 +00:00
Gábor Kelemen
42af1846b0 Update Hungarian translation 2018-06-28 22:21:55 +00:00
Balázs Meskó
972f13c3de Update Hungarian translation 2018-06-28 19:52:28 +00:00
Balázs Meskó
50a4e4f81c Update Hungarian translation 2018-06-28 19:51:23 +00:00
Ell
50db2b6655 app: a few async font loading fixes
In gimp_data_factory_finalize(), wait on the factory's async set
after canceling it, and before continuing destruction.  It's not
generally safe to just abandon an async op without waiting on it
-- this is a font-specific hack, due to the fact we can't actually
cancel font loading, and GimpFontFactory is prepared to handle
this.

Instead, in gimp_font_factory_finalize(), cancel and clear the
async set, so that GimpDataFactory doesn't actually wait for
loading to finish.

In gimp_font_factory_load_async_callback(), don't try to acess the
factory when the operation is canceled, since cancelation means the
factory is already dead.  On the other hand, when the opeation
isn't canceled, make sure to thaw the container even when font
loading failed, so that we always match the freeze at the begining
of the operation.

(cherry picked from commit b5890e05b8)
2018-06-28 15:38:55 -04:00
Jehan
445e3a16d9 INSTALL: add --enable-relocatable-bundle in options list.
(cherry picked from commit c543103783)
2018-06-28 19:26:32 +02:00
Jehan
7eb195cdbf Issue #1731: gbr file that crashes gimp-2.10.
GIMP_BRUSH_MAX_SIZE was already defined (as 10.000 pixels per dimension,
which is big for a brush) in gimpbrush.h. Let's just use this to
validate the size returned by the header.

(cherry picked from commit b3de0bb7a5)
2018-06-28 18:50:07 +02:00
Jehan
de5b6b2a81 Issue #1740: Move tool has two identical options for selection mode.
The "move-current" flag does not apply to selection mode and our current
code was simply setting the radio buttons insensitive while showing the
same labels on both buttons. This was not wrong per-se, yet very
confusing.

Instead let's just hide the radio buttons in selection mode, and update
the option title to "Move selection" (old label of both buttons) to keep
this mode as understandable as possible.

(cherry picked from commit 7cbbb8cba8)
2018-06-28 18:49:00 +02:00
Edward E
3ebeef9fed Issue #1563 - Dots instead of icons on Windows systems
Update windows installer patch for gtk+2 SVG file detection
2018-06-28 18:26:43 +02:00
Ell
ec1f1b3a45 app: allow multiple variables as input to dashboard group-meter LED
When defining a dashboard group, allow specifying multiple
variables as input to the group meter's LED.  The LED is active
when any of the specified variables evaluates to TRUE, and its
color is the combination of the active variable colors.

Remove the swap-busy variable, and use swap-reading and
swap-writing as inputs to the swap group's LED instead, so that the
LED's color indicates whether the swap is currently being read-
from, written-to, or both.

(cherry picked from commit 716510cb83)
2018-06-28 11:39:42 -04:00
Ell
352ce20356 app: even more Windows-specific fixes in gimpdashboard.c
... and app/Makefile.am

(cherry picked from commit 19f4abbbd6)
2018-06-28 11:03:49 -04:00
Ell
6fa454dd59 app: more Windows-specific fixes in gimpdashboard.c
(cherry picked from commit 4914103b5f)
2018-06-28 10:18:42 -04:00
Jehan
398d5e553a libgimpbase: forgot to add gimp_pixpipe_params_free() in gimpbase.def.
(cherry picked from commit 1a8bf4bcaf)
2018-06-28 12:27:19 +02:00
Ell
1b01e1311c app: s/DAta/Data/ in gimpdashboard.c
(cherry picked from commit d75e599431)
2018-06-28 05:06:08 -04:00
Michael Natterer
b0dc4a58ae Issue #1340 - Critical when editing input controllers
Don't pass a NULL widget to gimp_controller_list_edit_clicked().
Spotted by Massimo.

(cherry picked from commit 0961ccf754)
2018-06-28 09:42:58 +02:00
Michael Natterer
21f87d7d82 app: fix jumping around of newly created images
Put the center_image_on_size_allocate() code into the canvas'
size-allocate callbacck.

As a side effect we now have a flag in GimpDisplayShell which
indicates that there will be a size allocate before the next frame, so
simply skip drawing the canvas completely. This fixes new images
jumping around when they are first shown.

(cherry picked from commit c0480f502d)

(this fix is actually a side effect from fixing something else in
master)
2018-06-28 09:42:48 +02:00
Anders Jonsson
7eee2614f9 Update Swedish translation 2018-06-28 06:34:00 +00:00
Jehan
ee25bfc8bd libgimpbase: add gimp_pixpipe_params_free().
And use it where appropriate. A public API asking you to know the
internals of your code is a bad idea.
2018-06-27 18:37:20 +02:00
Jehan
b585201e5e Issue #1723: gih file that crashes gimp-2.10.
The flag `free_selection_string` is used to track an array of strings
with some of them being static and others allocated. This should have
been an array of boolean but we can't change it because it is public API
(though it should really not have been!).

So let's just allocate every string of the `selection` array instead,
which makes the boolean flag useless now.
2018-06-27 18:03:37 +02:00
Jehan
6580fae7b0 devel-docs: update macOS support to OSX 10.10.
As discussed on IRC with Mitch and Samm.
Older versions may work, and Samm says he will build for 10.9 actually,
but we officially only supports for 10.10.
2018-06-27 16:06:04 +02:00
Jehan
7fb7e05d67 NEWS: keep up-to-date. 2018-06-27 04:47:53 +02:00
Jehan
e96b05beed plug-ins: lookup WMF fonts on same prefix when relocatable bundle.
When ENABLE_RELOCATABLE_RESOURCES is set, override libwmf fontdir. This
is actually an alternate version of MR !9 by Alex Samorukov assuming a
bundled GIMP on a single prefix rather than depending on an environment
variable.
This especially makes the relocatable feature more discoverable (rather
than some random environment variable for which you'd need to read the
code to discover it then make some wrapper script for GIMP).

(cherry picked from commit 4ff856f68d)
2018-06-27 04:40:02 +02:00
Jehan
5824a3150f configure: replace --enable-bundled-mypaint-brushes with...
... --enable-relocatable-bundle option.
This will allow to use this option for more than MyPaint brushes. For
macOS and Windows, we default to "yes" and "no" for other OS, though it
is always possible to set an explicit value.

(cherry picked from commit 8da2646372)
2018-06-27 04:40:02 +02:00
Anders Jonsson
cede80c4eb Update Swedish translation 2018-06-26 21:54:48 +00:00
Jehan
ad3db88dfa desktop: tentative release for 2.10.4 on 2018-07-07.
And uncommenting the <release> tag for translators to be able to work on
it. Also using short list items without finale points to agree with
`appstream-util` rules.

(cherry picked from commit 4fa5f61dae)
2018-06-26 21:31:20 +02:00
Jehan
d2f57ee9ba app: replace Carbon/Carbon.h by CoreGraphics/CoreGraphics.h.
As asked by Samm and solid_black on IRC.
Apparently tested and the change is fine, while getting rid of
deprecated API. I cannot test myself.

(cherry picked from commit 1b9729d46d)
2018-06-26 21:31:12 +02:00
Michael Natterer
41807ace5c Issue #1719 - GIMP crashes with an invalid pluginrc
Check the return value of gimp_file_new_for_config_path() and set
an error if it returns NULL.

(cherry picked from commit c6aa613f9c)
2018-06-26 15:01:21 +02:00
Michael Natterer
f1ffb06ccb Issue #1714 - When GIMP starts, default brush hardness is always at 100
We should not have essential signal connections (such as setting tool
options from brush properties) implemented in the tool options GUI
files, because they are not active until the options GUI is created.
Also, that magic is simply too hidden in the options GUI files.

Move the signal connections and the brush property copying code to
gimppaintoptions.c where is can also be done cleaner.

However, this must only be done for the main tool options instance
that is used for the GUI. Therefore, add a "gui_mode" boolean to
GimpToolOptions and set it to TRUE for all main tool options.

(this is ugly, but much less ugly and much less hidden than all the
places where code lives (like tool_manager.c) that can now be moved
into GimpToolOptions and its subclasses, and implemented cleanly
there).

(cherry picked from commit cb0e6c65d0)
2018-06-26 00:59:17 +02:00
Rodrigo
a3040eec9e Update Spanish translation 2018-06-25 12:31:20 +00:00
Oleksii Samorukov
75cc48f7c0 Fix screen resolution detection on OSX
GTK always returns 72 dpi due to API used. This patch using Cocoa
directly instead. Tested on Retina and non-hidpi displays.

GTK+2 version of commit 5b6126146a.
Cf. MR !14.
2018-06-25 12:35:42 +02:00
Rodrigo
04d9037710 Update Spanish translation 2018-06-25 07:28:06 +00:00
Jehan
00e6366207 libgimpbase: fix declaration after statement and reset safecheck...
... after each successful read().
I completely missed this declaration after a statement during the review
of !13 even though I saw another similar issue!

Also let's reset the error counter to 0 each time a successful read()
happens so that we can continue reading even if a lot of EINTR were to
happen, as long as we globally go forward. Only consecutive errors
increment the counter.

Finally add a small comment to explain why we let EINTR pass instead of
breaking directly.

(cherry picked from commit 49b4b1a5c2)
2018-06-25 01:16:00 +02:00
Alex Samorukov
b8583468f9 Fix empty lldb backtrace on OSX
When lldb attaching to the process it triggers few "-1" errors on read with
EINTR error. After 1-2 errors read() call works again.
Also this patch fixing TID detection, syscall SYS_gettid is oficially deprecated
now and does not work. Also adding safecheck to avoid enldless loop.

(cherry picked from commit 559d9b89e3)
2018-06-25 01:15:52 +02:00
Jehan
d2aef6201c Issue #1712: Add translator comment for string "Export Exif...
... metadata by default".
Also for other metadata, and doing it both for the tooltip and the label
of the option.

(cherry picked from commit 50bcc8db3c)
2018-06-24 21:43:35 +02:00
Piotr Drąg
f6efb2e504 Update Polish translation 2018-06-24 19:31:07 +02:00
Piotr Drąg
1d88734d89 app: fix typo in a translatable string (trnasferred) 2018-06-24 19:30:09 +02:00
Michael Natterer
5feabfd1e0 app: more GimpGradientEditor cleanup
Let the split and replicate segments dialogs keep their own data and
don't use GimpGradientEditor struct members. Remove redundant members
and indent the struct.

(cherry picked from commit b8e75a0201)
2018-06-24 18:18:32 +02:00
Jehan
a9d851070a app: remove check since gimp_widget_load_icon() now always non-NULL.
This is the only place where such a check occured. All other calls
seemed to expect the return value to be non-NULL already.
2018-06-24 18:10:26 +02:00
Jehan
f140b987c7 Revert "Issue #1608: Gimp 2.10.0 and 2.10.2 crash immediately on start."
This reverts commit d997b2b897.
This is not needed anymore since gimp_widget_load_icon() always returns
a non-NULL GdkPixbuf now. Cf. commit 32931c4606.
2018-06-24 18:01:29 +02:00
Jehan
32931c4606 app: gimp_widget_load_icon() should actually always return a result.
When the "gimp-wilber-eek" fallback will fail to load, we just create an
ugly magenta square instead.
See Mitch's review at #1608.
2018-06-24 17:59:09 +02:00
Jehan
4d4ba34006 app: add a doc-comment to gimp_widget_load_icon().
Mostly to make sure that calling code takes NULL as a possible return
value.
2018-06-24 17:11:24 +02:00
Jehan
9c6237b182 app: load "gimp-wilber-eek" as fallback when an icon fails to load.
We were already doing so when an icon was simply absent from the icon
theme. But we may still end up in cases where the icon is seemingly
present, yet it fails to load (for instance the image file is
corrupted). When this happens, let's also try to load the wilber-eek
fallback.

Note that it doesn't completely stops gimp_widget_load_icon() from
possibly returning NULL (in the case where "gimp-wilber-eek" is also
missing/corrupted for instance), so calling code must still account for
possible NULL return value.
2018-06-24 16:19:58 +02:00
Jehan
d997b2b897 Issue #1608: Gimp 2.10.0 and 2.10.2 crash immediately on start.
If "gimp-swap-colors" or "gimp-default-colors" are present in the theme,
yet broken somehow, GIMP would crash because it was not checking if the
icons had been successfully loaded.
Just make the relevant checks and output on standard error that the swap
and/or default color areas are invisible.
2018-06-24 16:19:58 +02:00
Michael Natterer
7fece09eaf app: peek/poke much less in GimpGradientEditor internals
Add gimp_gradient_editor_get_selection() and set_selection()
and use them in gradient-editor-commands.c

(cherry picked from commit 025a13b519)
2018-06-24 16:02:18 +02:00
Michael Natterer
94235e4447 app, libgimpwidgets: all GimpColorHexEntries should have the same tooltip
Set the tooltip in GimpColorHexEntry itself and remove all other
tooltip setting. This just moves the translatable string sround in
libgimpwidgets/, and even removes it from app/.

(cherry picked from commit 2b8b780b6a)
2018-06-24 14:30:09 +02:00
Michael Natterer
eb57f0d0b3 Issze #1711 - GIMP does not unref all GLocalFileEnumerator it uses
unref the enumerator when done. Spotted by Massimo.

(cherry picked from commit ca3ffec111)
2018-06-24 14:16:12 +02:00
Jehan
be3abe6cea icons: work around dimension bug of librsvg for a bunch of color icons.
It feels I am just fighting against the system. So annoying!

(cherry picked from commit b87d34bace)
2018-06-24 00:24:45 +02:00
Jehan
87d2dbbe66 icons: complete color-scalable SVG.
Preparing extracting icons from a single file.

(cherry picked from commit 199df5a128)
2018-06-24 00:24:38 +02:00
Jehan
520c34899c tools: post-process SVG objects with "color-important" label.
This will allow a designer to simply "tag" an object so that its color
does not get overrided by GTK+ without needing to edit the file as text.

(cherry picked from commit 8a36b786bc)
2018-06-24 00:24:31 +02:00
Jehan
98848a464f Issue #1708: g_free() called instead of gdk_device_free_history().
As spotted by Massimo!

(cherry picked from commit 5e25cdc713)
2018-06-24 00:24:22 +02:00
Jehan
402c0d98f1 icons: update various icons to account for librsvg bugs.
It should now be possible to fully export our symbolic icons from a
single central file.
My long-standing bug of librsvg#250 is still opened and unfixed, but it
turns out most issues I encountered are anyway also problems when
recoloring symbolic icons in GTK+ (like using strokes instead of
fills!). So let's just bypass all problems at once by accounting for
these issues in the design.

(cherry picked from commit 4c68d5dfc9)
2018-06-24 00:23:58 +02:00
Jehan
9bc78a3b3c icons: fix many icons for proper recoloring.
I tried to fix all the icons I could see which had issues regarding all
recoloring matters (using fill not stroke, change circle/ellipses to
paths, etc.) when looking at a blank canvas.
I'm sure I still miss a lot but that will do for now.

(cherry picked from commit 8811b0d916)
2018-06-24 00:23:44 +02:00
Jehan
e960c4884b icons: force colors on some icons.
Sometimes even within symbolic icons, parts of the design must keep
fixed colors, when they are semantic. For instance this is the case for
the color-picker-(black|gray|white) icons or the gimp-default-colors.

The trick used by GTK+ to recolor is by supplying an additional CSS
style to icons which overrides inline CSS thanks to "! important"
keyword. Our own trick to circumvent this trick is to set "!important"
in inline CSS when one wishes not to have it overrided by the general
colors.
Right now I am doing the edit by hand with vim because Inkscape doesn't
seem to validate this keyword if I add it manually in its XML editor. So
what I did is add the "color-important" label on such object, and I will
later modify my SVG export tool to add !important on such object "fill"
values at export time.

(cherry picked from commit 5d5bbeb88b)
2018-06-24 00:23:44 +02:00
Jehan
fa6f2f65f0 icons: fix various symbolic icons not properly recolored.
The current recolorization code only recolors paths and rectangles. In
particular it leaves circles and ellipses as-is.
I opened the merge request gtk!214 for this issue. But in the meantime,
it is quite easy to change circles and ellipses into path with "object
to path" in Inkscape.

A second problem is that it only recolors fills, not strokes, as
previously stated. So I need to remove strokes from icons, or transform
them to paths.

(cherry picked from commit fd46018203)
2018-06-24 00:23:23 +02:00
Jehan
eb82161091 icons: larger spacing between broken chains.
It seems not wide enough to differentiate easily the broken and
non-broken chains. So let's make this gap bigger.

(cherry picked from commit a5afb04501)
2018-06-24 00:22:07 +02:00
Jehan
99e6b365ae icons: fixing more icons.
This time, 2 icons still had problems because of visible rectangles.
Fixing "gimp-prefs-folders" and "gimp-prefs-folders-mypaint-brushes".

(cherry picked from commit 2bb8afd119)
2018-06-24 00:22:07 +02:00
Jehan
11dd2365cd icons: fix various icons broken when recoloring with CSS.
For anyone wishing to help me fix icons, here is the trick: apparently
GTK+ would fill the paths with CSS colors, not stroke them. So when we
have icon drawing based on path-stroking, they don't end up as expected.
In Inkscape, just run "Stroke to Path" to transform a stroke design in a
fill design.
I am fixing "gimp-tool-cage", "document-revert", "gimp-image-reload",
"gimp-reset" and "view-refresh". More to follow as we discover them, I
guess.

(cherry picked from commit 4b6869dd67)
2018-06-24 00:20:48 +02:00
Jehan
709e5e4c7e icons: make gimp-tool-ellipse-select symmetric.
I may not be an icon designer, but this icon be so clearly asymmetric
always deeply annoyed me.

(cherry picked from commit 45f46db815)
2018-06-24 00:19:31 +02:00
Michael Natterer
8aa0d5a401 Issue #1706 - Typo in gimpgradientselect.h include guard
Fix typo, spotted by Massimo.

(cherry picked from commit 627d58dce1)
2018-06-23 12:42:34 +02:00
Anders Jonsson
5a0299acf0 Update Swedish translation 2018-06-22 21:13:19 +00:00
Ell
01e5390052 app: flush image after selecting colormap color
(cherry picked from commit 6af2a4997b)
2018-06-22 13:39:24 -04:00
Alexandre Prokoudine
fd14839c81 Update NEWS 2018-06-22 14:38:33 +00:00
Michael Natterer
2e007713a2 app: argh!
(cherry picked from commit f335ef7b61)
2018-06-22 13:57:44 +02:00
Michael Natterer
bd14991664 app: fix signature of gimp_gegl_procedure_get_sensitive()
(cherry picked from commit 7c3191fdd0)
2018-06-22 13:55:56 +02:00
Michael Natterer
cf4ef427b3 app: when a plug-in procedure is not sensitive, show the reason in the tooltip
Return an optional tooltip from gimp_procedure_get_sensitive(), in
GimpPlugInProcedure, build that tooltip from the image types the
procedure works on.

(cherry picked from commit 63817485c0)
2018-06-22 13:49:45 +02:00
Alexandre Prokoudine
671552fb93 Update NEWS 2018-06-22 09:46:16 +00:00
Ell
e9acea9d54 app: fix dashboard swap read/write variable order
... to satisfy the inter-variable dependencies, so that the READING/
WRITING variables are based on the READ/WRITTEN values of the
current sample, and not the previous one.

(cherry picked from commit 51793b114a)
2018-06-21 12:31:42 -04:00
Ell
cc626176b1 app: properly handle NULL rectangle arguments in gimp-gegl-loops
... and gimppaintcore-loops

When a rectangle argument is NULL, use the extents of the
corresponding buffer, instead of raising a CRITICAL, to match the
old behavior.

(cherry picked from commit 8a881ca61a)
2018-06-21 12:30:59 -04:00
Michael Natterer
86ad7a624f app: move the gradient editor color dialog code to GimpGradientEditor
Same as previous commits.

(cherry picked from commit 558641fe6c)
2018-06-21 17:26:42 +02:00
Michael Natterer
1ce50d9881 app: make gimp_gradient_editor_update() private
(cherry picked from commit 02b6ff24da)
2018-06-21 13:59:34 +02:00
Michael Natterer
e9bf0c05d2 app: move the colormap editor color dialog code to GimpColormapEditor
See commit below.

(cherry picked from commit 5edc0306f9)
2018-06-21 13:44:49 +02:00
Ell
3e842e8033 app: more fixes to last dashboard commit
Don't show percentage for the swap read/written fields, and make
sure their history underlays are displayed correctly even if the
swap limit changes.

(cherry picked from commit fda671841c)
2018-06-21 07:39:13 -04:00
Michael Natterer
913389aa91 app: move the palette editor color dialog code to GimpPaletteEditor
That's cleaner than having it in palette-editor-commands.c

(cherry picked from commit 1c1dd2038e)
2018-06-21 12:46:45 +02:00
Ell
af30bad855 app: a few fixes to last commit
(cherry picked from commit ab9f70d95c)
2018-06-21 04:12:42 -04:00
Ell
b934cc2ed9 app: add swap read/write fields to the dashboard
Add "read" and "written" fields to the dashboard swap group, which
report the total amount of data read-from/written-to the tile swap,
respetively.  These fields are non-active by default.  When these
fields are active, show a color underlay in the swap group's meter,
indicating when data was beging read-from/written-to the swap.

Improve the swap busy indicator (used as the meter's LED), so that
it's active whenever data has been read-from/written-to the swap
during the last sampling interval, rather than at the point of
sampling.

(cherry picked from commit 6b9aba3067)
2018-06-21 04:01:12 -04:00
Rodrigo
499993bdf0 Update Spanish translation 2018-06-21 07:08:48 +00:00
Ell
83d74e270c Issue #1682 - Segfault when starting GIMP, due to empty data files
Use gimp_input_data_stream_read_line_always(), instead of
g_input_data_stream_read_line(), in a bunch of places that don't
expect EOF.  If we don't do that, the code assumes the GError
parameter is set by the function and returns an error indication,
causing the caller to segfault when it tries to access
error->message.  Instead, we now process an empty line when EOF is
reached, which is caught by the normal parsing logic.

Additionally:

  - Use gimp_ascii_strto[id]() when loading gradients, generated
    brushes, and palettes, to improve error checking for invalid
    numeric input.

  - Improve gradient-segment endpoint consistency check.

  - Allow loading palette files with 0 colors.  They can be created
    during the session, so we might as well successfully load them.

(cherry picked from commit 993bbd354e)
2018-06-20 15:14:21 -04:00
Ell
7715dbba5f app: add gimp_ascii_strtoi() and gimp_ascii_strotod()
... which are similar to g_ascii_strtoll() (except that
gimp_ascii_strtoi returns a gint, and not a gint64), and
g_ascii_strtod(), however, they make error checking simpler, by
returning a boolean value, indicating whether the conversion was
successful (taking both conversion and range errors into account),
and return the actual value through a pointer.

(cherry picked from commit 3301c06163)
2018-06-20 15:14:21 -04:00
Ell
d544e5d7b2 app: add gimp_data_input_stream_read_line_always()
... which is a drop-in replacement for
g_data_input_stream_read_line(), however, it always returns a non-
NULL value when there's no error.  If the end-of-file is reached,
an empty string is returned.

(cherry picked from commit e090b910c0)
2018-06-20 15:14:21 -04:00
Michael Natterer
cda8d386e4 app: should --amend my commits after I fix something...
(cherry picked from commit 52204b74b1)
2018-06-20 20:34:36 +02:00
Michael Natterer
a8e1ca1252 app: protect windows-actions.c against adding/removing a GdkDisplay twice
same code as in GimpDeviceManager, should be only ever needed in the
presence of debug modules like GtkInspector.

(cherry picked from commit bf66882878)
2018-06-20 20:31:53 +02:00
Michael Natterer
dc3754317b Issue #1093 - Color dialog appears in the first monitor...
...while other windows are on the second monitor if window positions
are saved at exit

Add some lines of code to color_area_color_clicked() which position
the already existing color dialog exactly like a newly created dialog
would be positioned by gimp_dialog_factory_add_dialog().

This should be part of GimpDialogFactory but let's wait for another
case before we generalize it.

(cherry picked from commit 1ae2b5d573)
2018-06-20 16:05:59 +02:00
Alexandre Prokoudine
99d8597126 Update NEWS 2018-06-20 11:17:49 +00:00
Ell
bb4716b8ee app: make sure the color picker tool is halted when closing display
When using the color-picker tool's info window, set the tool's
display when a color is picked, and the gui is updated, so that we
properly halt the tool when the display is closed.  Otherwise, we
may segfault.

(cherry picked from commit 335023b127)
2018-06-19 17:35:08 -04:00
Ell
a334b78327 app: in the dashboard, fix statm file-descriptor initialization
... in the unlikely case that getting the page-size fails.

(cherry picked from commit dc6ea0a977)
2018-06-19 13:42:32 -04:00
Ell
14f27d4c75 app: make the dashboard scrollable
The dashboard is getting pretty crowded -- let's make it
scrollable.

(cherry picked from commit 9832f7129e)
2018-06-19 13:06:33 -04:00
Ell
40834dc75c app: add memory group to the dashboard
The memory group shows memory-usage information: the currently used
memory size, the available physical memory size, and the total
physical memory size.  It can also show the tile-cache size, for
comparison against the other memory stats.  The memory group is
active but contracted by default.

Note that the upper-bound of the meter is the physical memory size,
so the memory usage may be > 100% when GIMP uses the swap.

This is currently implemented for *nix systems with Linux-like
procfs, and Windows.

(cherry picked from commit 8d0766c1fc)
2018-06-19 13:06:33 -04:00
Michael Natterer
9c1f6bfc16 Issue #1678 - CWE-120 - Don't use strcpy()
Use strncpy() instead.

(cherry picked from commit a58fe8963a)
2018-06-19 15:39:26 +02:00
Michael Natterer
b83ab3c1a7 app: remove gimp_layer_mask_new_from_buffer() and some includes
(cherry picked from commit 6c506509b6)
2018-06-19 13:21:41 +02:00
Michael Natterer
8146da9930 Issue #1677 - Alpha channel copy / Layer Mask issues
gimp_layer_create_mask(): make sure we don't do a gamma conversion
when initializing the mask from a channel. This was probably not the
last place to need this fix.

Also get rid of a second switch(add_mask_type), must be some leftover
from long gone logic.

(cherry picked from commit f815a2d922)
2018-06-19 12:41:01 +02:00
Michael Natterer
4cc6f18cc9 app: fix drawing the focus around the selected color in GimpPaletteView
The grid lines are always black, so always draw a black/white focus
line and ignore theme colors.
2018-06-18 19:18:34 +02:00
Ell
d49e038ed3 plug-ins: add support for loading merged image data from PSD files
PSD files may include a "merged", pre-composited, version of the
image (in Photoshop, this is the case when saving files with
"Maximize Compatibility" enabled; GIMP always saves the merged
image data in exported PSD files.)  This commit adds support for
loading the merged image version from PSDs, instead of the full
layer hierarchy.  This is useful when loading PSD files that use
features that we don't currently support, and therefore can't
render correctly, such as adjustment layers.

When loading the merged image version, we avoid loading certain
additional data from the file, such as channels, paths, and
guides, while still loading metadata, making this akin to loading
other "flat" image formats.

This option is currently exposed as an additional file type
("Photoshop image (merged)"), which has to be explicitly selected
from the file-type list when opening the image.

(cherry picked from commit 1d9a8a91ab)
2018-06-18 06:34:41 -04:00
Michael Natterer
1663e63717 libgimp: forgot to deprecate gimp_gamma() 2018-06-18 02:59:24 +02:00
Michael Natterer
113829fd14 Issue #701 - Add the ability to embed the GIMP built-in sRGB profile...
...upon exporting an image

Step 1: make it configurable just like "Export EXIF" etc.

app, libgimp: add "export-color-profile" config option

Add it to the preferences dialog, and pass it on to plug-ins in the
GPConfig message. Add gimp_export_color_profile() to libgimp.

Nothing uses this yet.

(cherry picked from commit 8c9c091021)
2018-06-18 02:47:36 +02:00
Michael Natterer
9be8c0add3 app: cleanup in GimpClipboard
Mostly formatting and thortening variables. Only real change is adding
gimp_clipboard_new() and moving most init() code there.

(cherry picked from commit e0f46d1dc9)
2018-06-18 01:51:33 +02:00
Michael Natterer
d85932b9b7 Issue #1633 - Palette Editor is much too wide on GIMP 2.99
Make the bottom-left entry request only minimal width, it expands
anyway. Also replace the "Columns:" label by a "grid" icon and set a
tooltip on the columns spinbutton.

Addresses Issue #1223 too.

(cherry picked from commit 0aa018dec2)
2018-06-17 23:13:54 +02:00
Michael Natterer
35710903b6 app: make GimpCursorView fit narrow docks
Replace "Selection Bounding Box" by simply "Selection" and add a tooltip
to the frame that says it's the bounding box.

Addressed Issue #1223.

(cherry picked from commit 33d2595d22)
2018-06-17 23:08:14 +02:00
Edward E
8387984732 Issue #1240 - The drive or unc share you selected does not exist...
...or is not accessible

Installer: show install path on final confirmation page

(cherry picked from commit f18fcd468e)
2018-06-17 22:58:06 +02:00
Jehan
8df6f4c8a6 plug-ins: clearer plug-in-screenshot parameter description.
Our plug-ins have no "optional" parameters per-se. Clarify the
description to make explicit that the last 4 parameters are simply only
taken into account when the shoot type is SHOOT-REGION.

(cherry picked from commit 3a0c03a61c)
2018-06-17 22:17:22 +02:00
Ell
2009805ad0 app: fix filename in gimppropgui-recursive-transform.c license notice
(cherry picked from commit 6d8128e3e0)
2018-06-17 15:59:14 -04:00
Ell
313bb4bc2a app: merge back gegl:recursive-transform-plus propgui to recursive-transform
... following GEGL commit 6be0a86583f9c10c7710c96c21c261e4227c4727.

gegl:recursive-transform now allows applying multiple
transforamtions simultaneously, using multiple transform-grid
widgets.

(cherry picked from commit 56d15e83e9)
2018-06-17 15:50:08 -04:00
Michael Natterer
1779826da9 Issue #1611 - plug-in-screenshot does not work in non-interactive run mode
Turn the boolean "root" argument into enum ShootType and reorder that
enum to { WINDOW, ROOT, REGION } so that the "0", and "1" values match
the former boolean. Adapt parameter checking accordingly so that
callers without optional arguments (e.g. script-fu) can call all the
plug-ins's features.

(cherry picked from commit d94b954c2a)
2018-06-17 20:59:04 +02:00
Ell
226ea8863a Issue #1668 -- Smudge Tool - Wrong colors when painting on an image ...
... with a color profile other than the gimp built-in.

When initializing the smude tool's accum buffer, use
gimp_pickable_get_pixel_at(), instead of
gimp_pickable_get_color_at(), for picking the initial color to fill
the buffer with, so that we don't erroneously apply the image's
color tranform to it when the image has a profile.  Previously,
this would result in wrong colors when painting from the drawable
edges inward, with flow < 100%.

(cherry picked from commit 5a07876c78)
2018-06-17 14:25:29 -04:00
Michael Natterer
918043a9d9 app: make sure crash-saving of open images to XCF doesn't call the GUI
gimp_eek(): simply increase gimp->busy so XCF saving calling
gimp_set_busy() and gimp_unset_busy() won't call the GUI layer and do
whatever windowing system calls to set busy cursors.

(cherry picked from commit eaddef595e)
2018-06-17 19:45:36 +02:00
Ell
797bd3459b Issue #1668 - Smudge Tool - Wrong colors when painting on an image ...
... with a color profile other than the gimp built-in.

Remove the separate alpha-channel copy in
gimp_image_color_profile_srgb_to_pixel().  We no longer need it,
since GimpColorTransform already takes care of that itself.

We used babl_process() to copy the alpha, which would also
transform the input color from R'G'B' to the output color space.
When the same buffer was used for both input and output, this call
would overwrite the input to the subsequent
gimp_color_transform_process_pixels() call; when the output color
space was different than R'G'B', this meant we'd pass the input to
gimp_color_transform_process_pixels() in the wrong color space,
producing wrong results.  This was the case when converting the
foreground color for use with the smudge tool.

(cherry picked from commit e58e2ec5dc)
2018-06-17 13:38:34 -04:00
Piotr Drąg
9dbd051bad Update Polish translation 2018-06-17 17:13:49 +02:00
Michael Natterer
ac9fff1f1d Isse #1476 - strange behavior in Layer resize dialog
resize_dialog_new(): create the preview with "popup = TRUE", so we
really get a preview of layer size and not of the layer within the
image context like used for the layers dialog.

(cherry picked from commit 93d28ceccc)
2018-06-17 15:36:43 +02:00
Michael Natterer
8e12d8998d app: don't g_return_if_fail() in gimp_device_info_set_device()
when the GimpDeviceInfo already has a device. This is not a programming
error that should trigger a bug report popup, it's something else about
non-uniqueness of device names, or whatever. Simply g_printerr() a more
useful message that can help to debug this and bail out.

(cherry picked from commit f06d0485e6)
2018-06-17 15:20:43 +02:00
Michael Natterer
6ba0a4d6b8 app: some g_return_if_fail() were missing or non-standard in GimpContext
(cherry picked from commit 552a60b8bf)
2018-06-17 15:16:57 +02:00
Michael Natterer
c2d9f5e254 app: some cleanup in GimpContext
Use more g_clear_object() and g_clear_pointer() and remove useless
comments.

(cherry picked from commit 4260fa3e78)
2018-06-17 14:44:57 +02:00
Michael Natterer
4ea171c50e Issue #1213 - Text Tool Preset does not restore font face/name...
...after program restart

GimpContext was always supposed to keep the names of objects (brush,
pattern, font etc.) around even if these objects don't exist, for
cases like refreshing the data in a GimpDataFactory (which worked
fine), but also for deserializing the names of objects which don't
exist *yet* (delayed loading, no-data or whatever).

This commit fixes the delayed loading case (particularly affects fonts):

gimp_context_deserialize_property(): always keep the name of the
object around when it is not found, not only in the no-data case.

gimp_context_copy_property(): always copy the object *and* its name to
the dest context.

Add GimpConfig::duplicate() and ::copy() implementations which chain
up for duplicating/copying all properties and additionally copy all
object names to the new/dest context.

(cherry picked from commit ed1e2b1524)
2018-06-17 14:19:36 +02:00
Michael Natterer
c8e880dfc3 app: add GIMP_CONTEXT_PROP_MASK_TOOL_PRESET to GIMP_CONTEXT_PROP_MASK_ALL
It seems it was simply forgotten. PROP_MASK_ALL is used at some very
central places, so this commit might fix a few subtle bugs, or
introduce new ones, everybody look for strange tool preset behavior
please :)

(cherry picked from commit b3690b48d9)
2018-06-17 13:41:16 +02:00
Jehan
f4a54c5ab8 NEWS: keep up-to-date. 2018-06-16 03:51:34 +02:00
Salamandar
a42746c71d Specify utf-8 for rc file.
(cherry picked from commit 02edd1c8eb)
2018-06-16 03:50:14 +02:00
Salamandar
c176b0888e Fix encoding. The world should be utf-8.
(cherry picked from commit 8feb51954b)
2018-06-16 03:50:14 +02:00
Jehan
f3c5ed55c8 app: also search interpreters executable in $PATH.
Same as we did for binfmt-style lines, if the executable part (for
instance in `pygimp.interp`) is not an absolute path, let's allow
ourselves to find it in the environment $PATH.
2018-06-16 03:18:19 +02:00
Félix Piédallu
2265701268 Fix Python files:
* Prefer python2 to python that may point on python3 on modern installs.
* Fix indent/spaces consistency.
2018-06-16 02:49:54 +02:00
Jehan
769325e51b plug-ins: recognize "python2" env to launch the python interpreter. 2018-06-16 02:49:54 +02:00
Jehan
03ea9cac54 m4macros, plug-ins: run more accurately the "python2" interpreter.
Our configure test checks the presence of a Python2, but then uses
"python" as interpreter, which is a problem nowadays as the default
python is set to be Python 3 on some distributions (and this will be
more and more the case). So GIMP may end up trying to run our plug-ins
through Python 3 (which would fail) even if Python 2 is present.
Now AM_PATH_PYTHON2() m4 macro will set $PYTHON to a more accurate
Python version as priority.

Similarly let's use "python2" in the binfmt string for extension search.
2018-06-16 02:05:08 +02:00
Jehan
6080178a39 app: gimp_interpreter_db_add_extension() should check $PATH if needed.
So basically our binfmt set for Python simply never worked since we just
set 'python' and not a full path, but current code was not looking in
the $PATH environment. This was dead code. Now it's fixed.
2018-06-16 02:05:08 +02:00
Jehan
8509117fe6 app: actually resolve the interpreter through extension as last resort.
Current code of gimp_interpreter_db_resolve() was only resolving the
interpreter by the file extension when the file could not be opened for
reading or if it was empty/coult not be read. This basically made this
test completely useless.
Let's fix this. Now it will be run all the time, but simply at the end,
if shebang and magic failed.
2018-06-16 02:05:08 +02:00
Ell
d6792c973b app: fix scaling around center in scale tool; avoid negative width/height
In GimpScaleTool, fix scaling around the center-point, and make
sure the width and height are always >= 1 when updating the
transformation in response to a widget change.

(cherry picked from commit 1516bfc14b)
2018-06-15 16:05:13 -04:00
Ell
c7895c9752 app: clean up GimpTransformGridTool; adapt subclasses
Get rid of GimpTransformGridTool::recalc_matrix() and
gimp_transform_grid_tool_recalc_matrix(), and have
GimpTransformGridTool and its subclasses use
GimpTransformTool::recalc_matrix() and
gimp_transform_tool_recalc_matrix() directly instead.

In order to break the GimpToolWidget::changed/
GimpTransformTool::recalc_matrix() loop, add a
GimpTransformGridTool::update_widget() vfunc, which subclasses
should override to update their tool-widget (instead of doing this
in ::recalc_matrix()), and ::widget_changed(), which is called when
the tool-widget changes (and which subclasses should override
instead of connecting to the tool-widget's "changed" signal
directly.)  GimpTransformGridTool calls these functions as
necessary, instead of relying on extra parameters passed to
recalc_matrix().

Adapt all the direct and indirect subclasses of
GimpTransformGridTool to the change.

(cherry picked from commit 6a3fc6c1b9)
2018-06-15 16:05:13 -04:00
Jehan
130ef5ce59 Issue #248: Python console doesn't support input()/raw_input().
As noted by Massimo, we can just make the argument of raw_input() an
optional argument.

Also adding a modal implementation for input() so that it doesn't lock
the Python console waiting from input from the plug-in stdin. As noted
in Python doc, input() is equivalent to `eval(raw_input(prompt))`.
Not all that safe, but in the end, it is the developer's responsibility.
2018-06-15 18:34:57 +02:00
Jehan
b3cf7abd20 configure, tools: actually use GIMP_PKGCONFIG_VERSION and...
... GIMP_TOOL_VERSION rather than hardcoding versions.

Mostly cherry picked from commit 276d9b60b3
except pkg-config still checks gtk+-2.0 (not 3.0) on gimp-2-10 branch.
2018-06-15 17:36:33 +02:00
Ell
387cc35c58 Issue #1624 - Crashes when using Scissor Select Tool
In GimpTool, always clear tool->drawable upon halting, even for
tools that don't use it explicitly.

GimpTool sets tool->drawable in its default button_press()
implementation, and we potentially access it in
gimp_display_shell_initialize_tool(), so failing to clear it when
halting the tool may leave it as a dangling pointer, which can
result in a segfault when trying to initialize the tool in the
above function.  In particular, this happens with the iscissors
tool.

(cherry picked from commit 58c96f596e)
2018-06-15 08:19:51 -04:00
Simon Mueller
aac958607d plug-ins: use g_fopen(filename, "w+b")...
...because g_fopen(filename, "wb+") fails on Windows.

(cherry picked from commit 541f730f44)
2018-06-15 11:02:24 +02:00
Michael Schumacher
73c67d9612 plug-ins: use g_fopen(filename, "w+b") instead of "wb+" to fix SGI format export on the Microsoft Windows platforms
(cherry picked from commit c93727e791)
2018-06-15 08:06:25 +00:00
Ell
32993ab12d Issue #1646 - Transform preview looks wrong with selection
In GimpCanvasTransformPreview, when the image mask is not empty,
make sure to align it with the drawable using a gegl:translate
node, before combining both at the gegl:opacity node.  Otherwise,
the mask is applied at the wrong offset when the drawable's offset
is not (0, 0).

(cherry picked from commit d3a3c35317)
2018-06-15 01:59:45 -04:00
Ell
e486537ce0 Issue #1613 - foreground select tool raises a CRITICAL when committing
Make gimp_free_select_tool_halt() protected, and call it in
gimp_foreground_select_tool_set_trimap(), so that the free-select
subobject of the foreground-select tool is properly shut down
before switching to trimap mode.  In particular, this clears the
free-select tool widget at the right point; failing to do this
leads to CRITICALs later on.

(cherry picked from commit e15733236c)
2018-06-14 19:51:55 -04:00
Ell
08294f9ea7 Issue #1602 - Numeric selection size wrong after switching tools
In GimpToolRectangle, call gimp_tool_rectangle_update_options()
when the "[xy][12]" properties change, so that the "x", "y",
"width", and "height" properties are updated accordingly.

In particular, we set these properties when committing an empty
rectangle select tool, to init the rectangle to the current
selection bounds, and this call is necessary so that the "x", "y",
"width", and "height" tool options are properly updated as well.

(cherry picked from commit 47b7e7be7d)
2018-06-14 12:33:56 -04:00
Jehan
1a14f7e8c9 INSTALL: libheif must also be built with libx265.
(cherry picked from commit 33749491af)
2018-06-14 16:35:32 +02:00
Jehan
8ede025cee icons: clean the symbolic vector file.
All icons are now in the file.

(cherry picked from commit 3096fd295a)
2018-06-14 16:35:08 +02:00
Jehan
98763dded9 icons: fix symbolic icons.
With the symbolic-awareness of GTK+, vector icons are recolored (using
fg, success, warning and error colors). Unfortunately it was also
recoloring some rectangles with neither fill nor stroke, which were
using only to get appropriate icon size (these icons were therefore
displayed as just a square).

I made a quick pass in our icons to "fix" these. I expect I may have
missed some icons, or at the opposite, I may have broken other icons by
removing rectangles which should not have been removed. If you find any
such icon, please fix.
Also some icons do not look quite right just now. We will have to create
new guidelines on how to make symbolic icons and fix/redesign some, I
guess.

(cherry picked from commit 0c3659c5f1)
2018-06-14 16:35:08 +02:00
Jehan
dc8f44c6fa desktop: start a <release> tag for 2.10.4.
The 2 major changes seem to be the much-awaited font loading in
background, and this new "Auto straighten" option on Measurement tool.

Please everyone, feel free to tweak the release description while it is
still commented out. Once we remove the comment tags, it will be
submitted for translation.
2018-06-14 16:20:29 +02:00
Anders Jonsson
7412507c82 Update Swedish translation 2018-06-14 11:12:27 +00:00
Ell
5e53d06f74 app: make sure image colormaps always have at least one color
In gimp_image_set_colormap(), make sure the image's colormap always
has at least one color -- babl palette formats must have at least
one color.

If the function is called with 0 colors, use black.  We still need
to support this case, in particular, since existing XCFs may have
an empty colormap, and since plug-ins can call
gimp-image-set-colormap with 0 colors.

(cherry picked from commit c16c68e63e)
2018-06-14 03:19:29 -04:00
Jehan
f634757266 Revert "Issue #1612: Symmetry Painting dock needs a design tweak."
This reverts commit 55c5ebea3c.
Argh "valign" is a GTK+3 property. And actually testing now, I realize
this bug was only in the GIMP 3 codebase.
2018-06-14 03:59:04 +02:00
Jehan
5b628d422f plug-ins: add busy-dialog plug-in in plugin-defs.pl.
Introduced in commit 032e95fad6, Makefile.am was apparently directly
edited instead of plugin-defs.pl. This also fixes a typo:
s/bust-dialog/busy-dialog/

(cherry picked from commit 4117c98655)
2018-06-14 03:25:41 +02:00
Jehan
55c5ebea3c Issue #1612: Symmetry Painting dock needs a design tweak.
Make symmetry painting dock top-aligned.

(cherry picked from commit 035cef696a)
2018-06-14 03:25:32 +02:00
Michael Natterer
738bf71200 Issue #1634 - PNG image opens as a blank one in GIMP
Set the libpng error_fn to NULL *after* png_read_end() not before.
png_read_end() can throw errors and we recover what's partially loaded
from an image in the error handler.

(cherry picked from commit db08271d16)
2018-06-13 19:09:51 +02:00
Hannie Dumoleyn
0e61cb1203 Update Dutch translation 2018-06-13 11:18:18 +00:00
Michael Natterer
d76a6e8c11 plug-ins: pack the file-heif load dialog's icon view cells manually
There is something broken in the obscure "text_column" and
"pixbuf_column" code in GtkIconView, and I don't have the nerve to
debug it.

Enable opening an image on activation (double click).

(cherry picked from commit 625aa514f6)

(picking the icon view change was not neccessary but this plug-in will
get more updates so let's keep the code in sync)
2018-06-12 18:36:47 +02:00
Michael Natterer
6125d225ac plug-ins: put file-heif's icon view into a scrolled window 2018-06-12 13:34:24 +02:00
Michael Natterer
3b007f70f0 plug-ins: undeprecate file-heif but only as much as can be merged to 2.10
(cherry picked from commit afd4045866)
2018-06-12 13:26:40 +02:00
Michael Natterer
40c24dc3d0 Issue #1627 - Non-existing item ID error when loading multiple-image HEIFs
Accidentially killed a line when importing the plug-in.

(cherry picked from commit 1dee517bc9)
2018-06-12 12:58:37 +02:00
Marco Ciampa
e168c68b0c Updated Italian translation 2018-06-12 12:02:20 +02:00
Ell
3c9d513be9 Issue #1621 - Alpha incorrectly exported in PSD
In file-psd, fix the creation of the "merged" image data, saved in
PSD files along with the actual layer data.

(cherry picked from commit 8a01866af0)
2018-06-11 21:05:23 -04:00
Michael Natterer
c42c25732b all: make GimpDataLoaderFactory less static
Add functions to register loaders, remove the static array of loaders
given at construction time.

(cherry picked from commit f997106fb2)
2018-06-10 15:54:45 +02:00
Michael Natterer
561655bfb3 app: GimpToolPreset: s/GimpTransformOptions/GimpTransformGridOptions/
when deserializing the tool options.
2018-06-10 15:54:45 +02:00
Michael Natterer
bd30f28b09 app: if --verbose, make GimpDataFactory print each loaded and saved data 2018-06-10 15:54:45 +02:00
Piotr Drąg
1ae02929bc Update Polish translation 2018-06-10 15:42:57 +02:00
Ell
341077e23a Bug 759194 - Unified Transform Tool fails when layer is hidden
Last commit reintroduced this bug.

Allow transforming invisible layers using transform-grid tools, by
adding a 'drawable' member to GimpTransformTool, and setting/
clearing it when initializing/halting a GimpTransformTool.  In
gimp_transform_tool_check_active_item(), skip the visibility check
if the active item equals the GimpTransformTool's 'drawable'
member.

(cherry picked from commit cea6f1dc73)
2018-06-10 07:26:22 -04:00
Ell
d670edb339 app: don't allow transforming invisible layers in flip/measure tools
Split gimp_transform_tool_get_active_item() into two functions:
gimp_transform_tool_get_active_item(), which returns the item
without checking for errors, and
gimp_transform_tool_check_active_item(), which returns the active
item while checking for errors.  Adapt the rest of the code to the
change.

Remove the invisible_layer_ok parameter of
gimp_transform_tool_check_active_item(), and always return an error
when the active layer is invisible.  This causes the flip and
measure tools to correctly reject invisible layers.  Un-hide the
active item in GimpTransformGridTool before transforming, to avoid
rejecting layers that were hidden by the tool.

(cherry picked from commit 360b25b9a8)
2018-06-10 03:57:20 -04:00
Ell
1bd6079388 Issue #1607 - Fatal Crash on ACT Palette File Import
... and various other palette formats

Change accidental 'G_IS_INPUT_STREAM (file)' argument validation to
'G_IS_INPUT_STREAM (input)'.

(cherry picked from commit ea6d997e56)
2018-06-10 01:47:31 -04:00
Ell
70304ef75d app: code cleanup in the measure tool
(cherry picked from commit 845a19b785)
2018-06-10 01:26:14 -04:00
Ell
eccabd9ac9 app: derive GimpMeasureTool from GimpTransformTool
Derive GimpMeasureTool from GimpTransformTool (and
GimpMeasureOptions from GimpTransformOptions), so that we can reuse
GimpTransformTool's logic for the "straighten" function.  This
simplifies the code, aligns the measure tool with the rest of the
transform tools in terms of transform-related options (it can now
transform selections and paths, in addition to layers, and the
resampling method and clipping behavior are adjustable,) and fixes
straightening of layer groups.

Rename the function from "auto straighten" to just "straighten".

Don't resize the canvas after straightening.  Since we only
transform the active layer, and not the entire image, resizing the
canvas doesn't make much sense.

When in 3-point mode, rotate the second point toward the third
point, rather than toward the x-axis.

(cherry picked from commit b0cf2e435a)
2018-06-09 18:30:38 -04:00
Ell
340c4a2309 app: add GimpTransformGridTool; derive most transform tools from it
While most of our transform tools use an interactive transform
grid, and have similar behavior, the flip tool is an odd one out.
The new "auto straighten" function of the measure tool introduces
another tool that performs transformations, while not behaving like
the rest of the transform tools.

Factor out the parts of GimpTransformTool that handle user
interaction into GimpTransformGridTool (with corresponding
GimpTransformGridOptions, and GimpTransformGridToolUndo), and only
leave the basic transform functionality and options in
GimpTransformTool (and GimpTransformOptions).

Derive all the transform tools (and transform-tool base classes)
that previously derived from GimpTransformTool, from
GimpTransformGridTool.  The one exception is GimpFlipTool, which
still derives from GimpTransformTool directly.  The next commit
will derive GimpMeasureTool from GimpTransformTool as well.
2018-06-09 18:30:28 -04:00
Michael Natterer
93025adf02 Issue #1435 - Add tooltips to GimpColorNotebook's tabs
(cherry picked from commit 8d6f023b41)
2018-06-08 19:46:29 +02:00
Michael Natterer
def91dfc59 libgimpwidgets: install gimpbusybox.h as public header
(cherry picked from commit b75cbcb417)
2018-06-08 18:59:41 +02:00
Alex Samorukov
15f8ed090c Fix build on osx by adding appkit dependency
(cherry picked from commit f464ea0d4e)
2018-06-08 13:00:22 +02:00
Michael Natterer
22ae38d024 Issue #1441 - Copy paste issue, internal clipboard blocks global clipboard
Never return an internal image/buffer/svg/curve from any
gimp_clipboard function if we are not the owner of the display's
clipboard. The clipboard is supposed to be a global thing, and we must
only offer to ourselves what would be pasted in any other app.

(cherry picked from commit 7d3a129ddd)
2018-06-08 11:42:18 +02:00
Ell
aeff285216 app: in GimpPaintTool, sync brush-outline coords while painting
Add GimpPaintTool::paint_[xy] members, and periodically assign the
paint core's current coords to them in
gimp_paint_tool_paint_timeout(), while the main thread and the
paint thread are synchronized, during painting.

In gimp_paint_tool_draw(), fetch the current coords for the brush
outline from the above members during painting, instead of directly
from the paint core, to avoid a race condition with the paint
thread, so that we always use the correct coordinates at the time
the paint buffer was flushed back to the drawable.

(cherry picked from commit 5c17d2a43b)
2018-06-08 03:25:32 -04:00
Piotr Drąg
696d5b7f71 Update Polish translation 2018-06-07 16:22:38 +02:00
Michael Natterer
05747f75d5 Issue #1291 - Non-intrusive warning when saved XCF version...
...won't work with older GIMP?

Make gimp_image_get_xcf_version() return a "reason" string which lists
all reasons why the image can't be saved with compatibility for older
GIMP versions. Display the reason as tooltip on the compat hint label
in the save dialog.

(cherry picked from commit a4061a6b0d)
2018-06-06 23:12:04 +02:00
Ell
8a127d795e app: use default new-layer mode for layer groups and text layers
When creating a layer group, or a text layer, use the image's
default new-layer mode, instead of always using (non-legacy)
NORMAL.

(cherry picked from commit 7c7b6eb537)
2018-06-06 02:40:55 -04:00
Rodrigo
dc1ab40a41 Update Spanish translation 2018-06-06 06:23:36 +00:00
Jehan
2f24ee58a1 NEWS: also add gimp-test-clipboard. 2018-06-06 02:11:36 +02:00
Jehan
db6e8d51e6 NEWS: keep up-to-date. 2018-06-05 23:51:29 +02:00
Jehan
82fbfdf9d4 app: do not stop the measurement when straightening.
Instead just transform the measurement extremities appropriately to
still map to the same points.
To do so, I also added out parameters to gimp_image_resize_to_layers()
so that calling code can get offsets from old origin (as well as new
image dimensions).

(cherry picked from commit d56a8d439e)
2018-06-05 23:36:24 +02:00
Piotr Drąg
554f342db4 Update Polish translation 2018-06-05 19:16:53 +02:00
Jordi Mas
e230edf5a0 Update Catalan translation 2018-06-05 17:34:22 +02:00
Jehan
3cabdd8f4e app: measure tool's "auto straighten" with progress and link-aware.
Also make so that it works for any active drawable, not layers only.

(cherry picked from commit 3214199812)
2018-06-05 16:54:00 +02:00
Jehan
61f73d4f60 app: properly "auto straighten" in measure tool.
In particular, this tool should not make huge rotation where the top
ends up in the bottom and it should not depend on whether we started the
measure tool from the left, right, bottom or top. This is fixed by using
atan() instead of atan2().

Also make a proper tooltip text. Help id is unneeded most likely though.
Finally do some cleaning and alignment.

(cherry picked from commit ba1d937dfb)
2018-06-05 16:54:00 +02:00
Massimo Valentini
c179dfa714 Bug 526719: add easy way to set rotation angle to straighten an image
(cherry picked from commit 9baf2b62cd)
2018-06-05 16:54:00 +02:00
Piotr Drąg
1c2212151e Update Polish translation 2018-06-05 15:28:04 +02:00
Hannie Dumoleyn
6924412c91 Update Dutch translation 2018-06-05 10:56:16 +00:00
Ell
2ba1b8d465 configure.ac: require babl >= 0.1.51
(cherry picked from commit 5139a46602)
2018-06-05 04:39:54 -04:00
Ell
5d81183882 app: add custom GUI for gegl:recursive-transform-plus
gegl:recursive-transform-plus is an extension of
gegl:recursive-transform, allowing multiple transformations to be
applied simultaneously; it will eventually be merged back into
gegl:recursive-transform.  See GEGL commit
9829bc22e85526d789c4e80c05949d4c6202a207.

The GUI uses the new TRANSFORM_GRIDS controller, allowing adding,
duplicating, and removing transformations, and controlling them
through on-canvas transform grids.

(cherry picked from commit 99828a697a)
2018-06-05 04:33:09 -04:00
Ell
444899b82c configure.ac: require GEGL >= 0.4.3
(cherry picked from commit d5cab08215)
2018-06-05 04:33:09 -04:00
Ell
e1e508ad4e app: add TRANSFORM_GRIDS propgui controller
... which is similar to the TRANSFORM_GRID controller, supporting
multiple transformation matrices.

Implement the TRANSFORM_GRIDS controller in GimpFilterTool, using
the new GimpToolWidgetGroup to display multiple transform grids.

(cherry picked from commit 5e953ece85)
2018-06-05 04:33:09 -04:00
Ell
3250561340 app: add GimpToolWidgetGroup
GimpToolWidgetGroup is a tool widget acting as a container for
child widgets, multiplexing widget events and demultiplexing tool
events.  It can be used by tools to display multiple widgets
simultaneously.

The group keeps track of the current focus widget, and hover
widget.  Certain events are only dispatched to/forwarded from these
widgets.

The hover widget is determined by performing a hit test for all the
children, starting from the last child.  The first widget returning
GIMP_HIT_DIRECT, if any, is selected as the hover widget;
otherwise, if the current focus widget returns GIMP_HIT_INDIRECT,
it's selected; otherwise, if exactly one widget returns
GIMP_HIT_INDIRECT, it's selected; otherwise, there is no hover
widget.

The focus widget is set when clicking on a widget (or
programatically, using gimp_tool_widget_set_focus()).
Additionally, the group can raise the clicked widget to the top of
the stack (see gimp_tool_widget_group_set_auto_raise().)

(cherry picked from commit 4ef06b9922)
2018-06-05 04:33:09 -04:00
Ell
03e1cd20c9 app: add gimp_tool_widget_changed()
... which emits the "changed" signal, for use in subclasses to
notify the tool about widget changes not resulting from property
changes.

(cherry picked from commit 614cdcc0a8)
2018-06-05 04:33:09 -04:00
Ell
56281bf6f4 app: implement GimpToolWidget::hit() in all tool widgets
... and move the common functionality of their hit() and hover()
implementation to a separate function.

(cherry picked from commit 52a92a34d8)
2018-06-05 04:33:09 -04:00
Ell
312981568d app: add GimpToolWidget::hit() virtual function
... which takes the same arguments as GimpToolWidget::hover(), and
performs a hit-test, returning one of the following values:

  - GIMP_HIT_DIRECT:  The point corresponds to one of the widget's
    elements directly.

  - GIMP_HIT_INDIRECT:  The point does not correspond to one of the
    widget's elements directly, but the widget otherwise responds
    to press events at this point.

  - GIMP_HIT_NONE:  The widget does not respond to press events at
    this point.

Unlike hover(), hit() should not have any side effects.

(cherry picked from commit 385203f4d6)
2018-06-05 04:33:09 -04:00
Ell
6b73d5b396 app: implement GimpToolWidget::leave_notify() in various tool widgets
... by having them disable item highlights, and any other proximity
indication, when the cursor leaves the widget.

(cherry picked from commit 5e736c697f)
2018-06-05 04:33:09 -04:00
Ell
f1f9b859c4 app: add GimpToolWidget::leave_notify() vfunc
... which should be called on a widget when the cursor leaves the
widget, i.e., when it stops receiving hover events.

Have the default implementation clear the tool status.

(cherry picked from commit be7eff980e)
2018-06-05 04:33:09 -04:00
Ell
e34dd5a4eb app: in GimpDrawTool, set widget focus when setting widget
In gimp_draw_tool_set_widget(), make the new tool widget focused,
and unset the focus of the old widget.

(cherry picked from commit 322599836c)
2018-06-05 04:33:09 -04:00
Ell
8a69a3e755 app: respond to "focus-changed" signal in various tool widgets
... by disabling persistent item highlights when unfocused.

(cherry picked from commit 49089fc427)
2018-06-05 04:33:09 -04:00
Ell
f4f1ecf54a app: add gimp_tool_widget_{set,get}_focus(); "focus-changed" signal
The next few commits are going to add support for using multiple
tool widgets simultaneously.  As a first step, add a notion of a
focused tool widget, by adding gimp_tool_widget_{set,get}_focus(),
which tools/subclasses can use to control focus, and a
corresponding "focus-changed" signal, which tools/subclasses can
use to respond to focus changes.

(cherry picked from commit eeed9c413b)
2018-06-05 04:33:09 -04:00
Michael Natterer
1b1a89978f tools: rename test-keyboard.c and install it as gimp-test-clipboard
Clibpard bugs are so common, it will be useful to have on users'
machines.

(cherry picked from commit bd9d85e60b)
2018-06-04 22:40:02 +02:00
Dimitris Spingos (Δημήτρης Σπίγγος)
838e3b09bf Update Greek translation 2018-06-04 17:46:18 +03:00
Michael Natterer
a33b9e96d7 Issue #1560 - invisible canvas flip/rotation buttons...
...at the bottom of image window

Need to show/hide the event box, not just the labels/icons inside.

(cherry picked from commit 1806b66c5a)
2018-06-04 15:16:41 +02:00
Michael Natterer
226367d6cb app: add GimpDataLoaderFactory which loads data from an array of formats
specified by GimpDataLoaderEntry structs. Remove the same code from
GimpDataFactory and make it an abstract base class that only serves as
an interface for actual implementations. Also move around some stuff
in GimpDataFactory and remove virtual functions that were a bad idea
in the first place.

(cherry picked from commit 73da7c9a54)
2018-06-04 14:35:51 +02:00
Michael Natterer
e7ef28ef78 app: make gimp_data_factory_data_foreach() public
...this time without additional shit.

(cherry picked from commit 0b4677ec58)
2018-06-04 14:35:36 +02:00
Michael Natterer
aae538a4e5 app: add "new-func" and "get-standard-func" properties to GimpDataFactory
to make it behave better, and as preparation for further subclassing.

(cherry picked from commit 2ca408d146)
2018-06-04 14:35:18 +02:00
Michael Natterer
f6766cbc87 Issue #1531 - Zooming with mouse movement should keep track of original point
When Control-Button2-Zooming, remember the start point, pass it to
gimp_display_shell_scale_drag() and force gimp_display_shell_scale()
to zoom around that point by passing GIMP_ZOOM_FOCUS_POINTER and
faking the point using gimp_display_shell_push_zoom_focus_pointer_pos().

(cherry picked from commit 792cd581a2)
2018-06-04 11:45:20 +02:00
Michael Natterer
3220dc25f9 app: we always need to freeze/thaw around gimp_font_factory_data_init()
so pull it to the parent class. Also remove the "no_data" parameter
from the data_init() virtual function and handle it in
gimp_font_factory_data_init() itself.

(cherry picked from commit d1b9f74c6f)
2018-06-04 02:16:52 +02:00
Michael Natterer
bc0447bc1b app: handle fonts more correctly in gimp_context_deserialize_property()
The "no_data" case for fonts is gimp->no_fonts, not gimp->no_data.

(cherry picked from commit 1d2ff6aa1b)
2018-06-04 02:16:18 +02:00
Michael Natterer
82e5ce5dcd app: call the standard font "Standard" not "Sans-serif"
Sans-serif is also an actual font from the list and the standard font
is being used when there is really no font at all.

(cherry picked from commit 6b5fd27943)
2018-06-04 02:16:03 +02:00
Michael Natterer
7764f661d9 app: make gimp_font_get_standard() return a GimpData
like all other GimpData sublasses.

(cherry picked from commit 40b95227af)
2018-06-03 22:50:52 +02:00
Michael Natterer
78aac439d4 app: don't leak the identifier if gimp_data_make_internal() is called again
(cherry picked from commit f23958407c)
2018-06-03 22:50:38 +02:00
Michael Natterer
5401066631 app: move the GimpAsyncSet and the waiting code to GimpDataFactory
it's potentially useful for all data factories.

(cherry picked from commit c563659ed8)
2018-06-03 22:50:20 +02:00
Michael Natterer
2c4818f8df app: use gimp_data_factory_get_data_path() in GimpFontFactory
Also, make sure we freeze() and thaw() the font container correctly,
so that all places keep their fonts across a refresh.

The only thing to make this actually work seems to be a bug in the
list views, grid views work perfectly.

(cherry picked from commit 1b1739bb06)
2018-06-03 20:48:55 +02:00
Michael Natterer
12f6a06070 app: add gimp_data_factory_get_data_path[_writable]()
which return GLists of GFiles. Use the new API in GimpDataFactory's
default implementations.

(cherry picked from commit 68cf2641f8)
2018-06-03 20:48:46 +02:00
Michael Natterer
a8657b057d app: remove all old font management code, switch to GimpFontFactory[View]
Biggest change in this commit is reordering stuff in GimpContext
because GimpFont is now a first class citizen.

(cherry picked from commit e88fb8e9c7)
2018-06-03 20:48:34 +02:00
Michael Natterer
77f3306b4d app: add GimpFontFactoryView as replacement for GimpFontView
(cherry picked from commit d153c7489e)
2018-06-03 20:48:25 +02:00
Michael Natterer
e8793295c9 app: GimpDataFactoryView: don't add buttons for actions which don't exist
(cherry picked from commit 9dc5c7767d)
2018-06-03 20:48:18 +02:00
Michael Natterer
53f69d8be0 app: add new GimpDataFactory subclass GimpFontFactory
which contains all the font loading and refreshing including all async
stuff and is a complete replacement for gimp-fonts.c and GimpFontList.

(cherry picked from commit 0763ea2a69)
2018-06-03 20:48:05 +02:00
Michael Natterer
101aee560c app: derive GimpFont from GimpData
(cherry picked from commit 4d3c715990)
2018-06-03 20:47:58 +02:00
Michael Natterer
91e8515227 app: change all GimpCoreConfig data paths to GIMP_CONFIG_PARAM_CONFIRM
so they can be changed without restart (see previous commit).

(cherry picked from commit 5280d7a277)
2018-06-03 20:47:49 +02:00
Michael Natterer
0c04d3784b app: make GimpDataFactory properly derivable
Virtualize a lot of functions and move their code into the default
implementation. Also connect to changes of the "path" property and
reload data automatically when the path changes. Add "wait" method
which is by default empty but is to be implemented by fonts.

(cherry picked from commit 01e4104236)
2018-06-03 20:47:35 +02:00
Jordi Mas
1a16ca7757 Update Catalan translation 2018-06-03 20:12:10 +02:00
Ell
65f1895d4d app: strengthen gimp_async_set_{wait,cancel}()
Make sure gimp_async_set_wait() and gimp_async_set_cancel() work
correctly, even if the set changes in nontrivial ways as a result
of waiting-on/canceling individual operations.  This is purely
theoretic right now, but why not.

(cherry picked from commit ec5f4d03fa)
2018-06-03 10:05:10 -04:00
Ell
b6ecaad275 plug-ins: increase input precision in guides-new-percent.scm
Increase the percision of the "position" property of
guides-new-percent.scm to two decimal places.  Currently, it only
accepts integers, which limits its accuracy to 100px.

(cherry picked from commit 8e6a5298c1)
2018-06-01 10:53:51 -04:00
Ell
357c3d4b6b libgimpwidgets: add exponentiation support to eevl
Add support for exponentiation (using the ^ operator) to eevl.
This is occasionally useful, e.g., in geometrically-derived
quantities involving square roots.

(cherry picked from commit 8d35299410)
2018-06-01 10:53:51 -04:00
Michael Natterer
52e3eb32f3 Use g_set_object() in a lot of places, and splrinkle some g_clear_object()
This is mostly core code which we want to keep in sync with master as
long as possible, so I picked this one even though not strictly
neccessary.

(cherry picked from commit 1b7d63cce9)
2018-06-01 13:14:47 +02:00
Daniel Mustieles
2037b170f6 Update Spanish translation 2018-06-01 10:53:55 +00:00
Alan Mortensen
8aed405fde Updated Danish translation of gimp-script-fu 2018-05-31 13:59:51 +02:00
Alan Mortensen
c4c5177df0 Updated Danish translation of gimp-plug-ins 2018-05-31 13:59:50 +02:00
Ell
129a2c6179 app: hide container-editor busy box when clearing async-set binding
(cherry picked from commit e5e998e9c5)
2018-05-31 05:01:27 -04:00
Anders Jonsson
2296d39bf5 Update Swedish translation 2018-05-30 17:11:12 +00:00
Ell
7c72d8cfa1 app: restore font list in async callback, not async-set notify handler
When font loading is finished, restore the font list in the
corresponding async completion callback, and not in the
"notify::empty" signal handler of the fonts async set

This solves a problem arising when gimp_fonts_wait() is called
*inside* a "notify::empty" signal handler, emitted when reloading
fonts (causing the "empty" property of the fonts async set to
switch from TRUE to FALSE):  When the wait is over, "empty" will
switch back from FALSE to TRUE, however, since the "notify" signal
is non-recursive, the corresponding handler will not be called,
gimp_fonts_wait() will return *before* the font list is restored,
and the caller will see an empty font list.  This can happen under
certain circumstances when reloading fonts while the text tool is
active.

(cherry picked from commit 0e19f159f5)
2018-05-30 12:58:47 -04:00
Anders Jonsson
35d2d52fe2 Update Swedish translation 2018-05-30 16:51:30 +00:00
Alan Mortensen
58ec8189d4 Updated Danish translation 2018-05-30 17:13:08 +02:00
Rodrigo
e7d92e623f Update Spanish translation 2018-05-30 13:12:20 +00:00
Jehan
3c986695a0 authors: adding Simon Müller who did some nice patches on the Win32...
... screenshot plug-in.

(cherry picked from commit 75b226775e)
2018-05-30 12:15:40 +02:00
Jehan
0da0f8ff46 plug-ins: renaming Win32 implementation files to follow namespacing.
(cherry picked from commit ff6d7a7550)
2018-05-30 12:15:33 +02:00
Gil Eliyahu
1a5b28b51d Issue #1458 - Small border on side of single-window screenshot on...
... Windows.

Reviewer note (Jehan): I have not built on Windows because I need to
refresh my crossbuild environment, but it looks sane enough, and Gil
previously did good patches. I push as-is, hoping it still builds fine
on Windows. :-)

(cherry picked from commit 2caa400a96)
2018-05-30 12:15:27 +02:00
Piotr Drąg
51f15e0b78 Update Polish translation 2018-05-30 10:47:17 +02:00
Ell
476742b93d app: more cleanup
(cherry picked from commit e806a92c49)
2018-05-30 03:02:05 -04:00
Ell
b16ea49ca1 app: code cleanup in previous commits
(cherry picked from commit c27316093e)
2018-05-30 02:23:03 -04:00
Michael Natterer
93c337896c Issue #1520 - GIMP 2.10 Crashes when trying to convert 8bit colour...
...mode image to 1 bit.

Don't try to remove unused colors from the mono black/white palette,

(cherry picked from commit 0ff95b66b7)
2018-05-30 02:19:39 +02:00
Ell
05d30d95e1 app: fix linking of test-config
(cherry picked from commit e75bdf3acf)
2018-05-29 17:08:04 -04:00
Ell
bbf3cd6a27 po: update POTFILES.in
(cherry picked from commit 987afcd6d2)
2018-05-29 16:35:43 -04:00
Ell
081867de1e app: fix gui_wait() cleanup
(cherry picked from commit 5a66d6cc74)
2018-05-29 16:35:43 -04:00
Ell
7f18eb467e pdb: change image freeze/thaw procs to "Since: 2.10.2" 2018-05-29 16:07:48 -04:00
Ell
c7779b51b0 app: use gimp_wait() to wait for histogram in threshold and levels tools
In the threshold and levels tools, use gimp_wait() to wait for
histogram calculation to complete before applying auto-adjustment,
so that a message is displayed in the meantime.  Allow the
operation to be canceled, in which case we simply abort the auto-
adjustment, but let the histogram calculation continue.
2018-05-29 16:07:48 -04:00
Ell
0d5b09bb4b app, pdb: wait for fonts to load before dependent operations
Use gimp_fonts_wait(), added in the previous commit, to wait for
fonts to finish loading before operations that depend on font
availability.  In particular, this includes font- and text-related
PDB functions, and text-layer rendering.
2018-05-29 16:07:48 -04:00
Ell
f6fe8939cc app: add gimp_fonts_wait()
... which waits for font-loading to complete, using gimp_wait() to
show a message while waiting.

Note that we don't currently allow the wait to be canceled, since
it may have unpredictable effects on plug-ins, but the interface is
such that the wait might not complete, so calling code should be
prepared for that.
2018-05-29 16:07:48 -04:00
Ell
4527390cd6 app: add gimp_wait()
Add a GimpGui::wait() virtual function, and a corresponding
gimp_wait() function.  The function takes an object implementing
the GimpWaitable interface, and a printf-style message, and waits
for the object to become ready, displaying the message as
indication in the meantime.  The default implementation simply
prints the message to STDERR.

Implement the function in gui-vtable, using the busy-dialog plug-
in added in the previous commit, to display the message in a
dialog.  Additionally, if the object implements the GimpCancelable
interface, provide a "cancel" button in the dialog, which, when
pressed, causes gimp_cancelable_cancel() to be called on the
object.  Note that the function keeps waiting on the object even
after requesting cancelation; GimpTriviallyCancelableWaitable can
be used to stop the wait once cancelation has been requested.
2018-05-29 16:07:48 -04:00
Ell
f542d839f5 plug-ins: add busy-dialog plug-in
This plug-in is used internally to show an interactive dialog in a
separate process, while the main process is blocking waiting for an
operation to complete.  The dialog shows a custom message in a
GimpBusyBox, and potentially a "cancel" button, allowing the
operation to be canceled.  Communication with the main process is
performed through a pair of file descriptors, passed to the plug-in
as arguments.
2018-05-29 16:07:48 -04:00
Ell
de1084986c libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config
Pass the current icon theme directory to plug-ins through the
config message, and add a gimp_icon_theme_dir() libgimp function
for retrieving it.  Note that we already have a similar
gimp_icon_get_theme_dir() PDB function, which we keep around, since
it can be used to dynamically query for the current icon dir,
unlike the former, and since it returns a dynamically-allocated
string, while the rest of the config-related functions return
statically allocated strings.

Use the new function, instead of gimp_get_icon_theme_dir(), in
gimp_ui_init().  This allows gimp_ui_init() to run without making
any PDB calls.  Consequently, this allows us to start plug-ins that
call gimp_ui_init() without entering the main loop in the main app.
We're going to add a plug-in that displays an interactive dialog
while the main app is blocking waiting for an operation to
complete, and we need to be able to start the plug-in without
entering the main loop, to avoid the possibility of arbitrary code
being executed during the wait.

Bump the protocol version.
2018-05-29 16:07:48 -04:00
Ell
82b979383c app: show indication during font loading in text tool and font views
While fonts are loading, show a GimpBusyBox with an appropriate
message above the text tool options, and make the options
themselves insensitive, and in font views, such as in the fonts
dialog (through gimp_container_editor_bind_to_async_set(), added in
the previous commit).
2018-05-29 16:07:48 -04:00
Ell
5a156ccc78 app: add gimp_container_editor_bind_to_async_set()
... which takes a GimpAsyncSet and a message, and shows a
GimpBusyBox with that message, instead of the container view, while
the async set is nonempty.

We're going to use this for font-loading indication in font views,
such as in the fonts dialog.
2018-05-29 16:07:48 -04:00
Ell
aa22914568 libgimpwidgets: add GimpBusyBox
GimpBusyBox is used to show a message indicating an operation is in
progress.  It's basically just a spinner and a label, with some
styling.

We're going to use it both in app/ and in a plug-in.
2018-05-29 16:07:48 -04:00
Ell
957cdc23a0 app: disallow editing text layers while fonts are loading
We already avoid rendering text layers while fonts are loading,
showing an appropriate message, but this will soon be replaced with
waiting for the fonts to finish loading.

Instead, don't allow the text tool to start at all while the fonts
are loading (showing an appropriate tool message, and a BAD cursor
modifier), and halt the tool when reloading fonts if it's already
started.
2018-05-29 16:07:48 -04:00
Ell
953ee1dea5 app: use GimpAsyncSet for keeping track of font loading
Replace the boolean fonts_loading member of Gimp with
fonts_async_set, which is a GimpAsyncSet object.  This allows us
to easily respond to the completion of font loading and reloading,
as will be done in the next commits.

Additionally, move the call to FcConfigSetCurrent(), used to
activate the loaded font configuration, from the async thread to
the main thread, just to be on the safe side, and avoid calling
FcInitReinitialize() in gimp_fonts_reset() if font loading is still
in progress, which is unsafe.
2018-05-29 16:07:48 -04:00
Ell
67c8b00595 app: fix indentation in core-types.h 2018-05-29 16:07:48 -04:00
Ell
8fae111509 app: add GimpAsyncSet
GimpAsyncSet represents a dynamic set of running GimpAsync objects.
The objects are automatically removed from the set once they're
synced.

GimpAsyncSet implements the GimpWaitable and GimpCancelable
interfaces, allowing the entire set to be waited-on or canceled.

Additionally, GimpAsyncSet provides an "empty" property, which
indicates whether the set is empty or not.  This allows responding
to the completion of all the GimpAsync objects through the set's
"notify::empty" signal, or drive UI changes through property
bindings.
2018-05-29 16:07:48 -04:00
Ell
5c6ca1f16e app: add GimpTriviallyCancelableWaitable
GimpTriviallyCancelableWaitable is a proxy object for another
GimpWaitable object, implementing both the GimpWaitable interface
and the GimpCancelable interface.  While waiting on the proxy
simply waits on the underlying waitable, canceling the proxy
doesn't affect the underlying waitable, even if it implements
the GimpCancelable interface as well, but rather causes subsequent
wait operations on the proxy to successfully complete immediately.

This essentially causes cancelation to abort only the wait, rather
than the underlying operation.
2018-05-29 16:07:48 -04:00
Ell
7660891d8c app: add GimpUncancelableWaitable
GimpUncancelableWaitable is a simple proxy object for another
GimpWaitable object, implementing only the GimpWaitable interface.
Its main purpose is to mask away the cancelability of an object
implementing both GimpWaitable and GimpCancelable.
2018-05-29 16:07:48 -04:00
Ell
7740f0f830 app: implement GimpWaitable::try_wait() in GimpAsync 2018-05-29 16:07:48 -04:00
Ell
04a7b2c53a app: add GimpWaitable::try_wait() vfunc
... which should never block, but rather return TRUE or FALSE
immediately, depending on whether or not the waitable is ready.
2018-05-29 16:07:48 -04:00
Ell
85a1b1ece7 app: lower thread priority of independent async operations
In gimp_parallel_run_async(), lower the priority of threads
executing independent async operations.  Independent operations
are generally potentially long-standing background tasks, which we
don't want to bog down the rest of the program.

This is currently only implemented on Linux and Windows.
2018-05-29 16:07:48 -04:00
Michael Natterer
dca5d1377d Issue #1521 - First time start: GIMP-Error: Error while parsing templaterc
Don't use deprecated "fill-type" value names in the defailt templaterc.

(cherry picked from commit a0805e460a)
2018-05-29 00:06:46 +02:00
Marco Ciampa
7ebac15391 Updated Italian translation 2018-05-28 23:52:51 +02:00
Anders Jonsson
a0dde2d40f Update Swedish translation 2018-05-28 18:55:02 +00:00
Rodrigo
8c9f492d5f Update Spanish translation 2018-05-28 12:00:40 +00:00
Marco Ciampa
a4e920ce19 Updated Italian translation 2018-05-28 13:23:09 +02:00
Michael Natterer
5c2bde7f5d desktop: update .gitignore
(cherry picked from commit 1b71bd38ae)
2018-05-28 12:35:56 +02:00
Jehan
c5da652938 app: fix broken debug output on gitlab.
The GIMP version string and the backtrace both look completely wrong
when pasted as-is on gitlab. Somehow all linefeed are gone.

This can be fixed by surrounding these as blocks (triple backticks),
using markdown syntax. Of course now the debug content is not for our
tracker only since packagers are encouraged to replace with their own
tracker URL, but this small markdown syntax is simple enough that it
should not break formatting on other platforms (as far as I know).

(cherry picked from commit d4ff504735)
2018-05-28 06:35:04 +02:00
Jehan
6aa8db72d3 NEWS: keep up-to-date. 2018-05-28 05:00:30 +02:00
Michael Natterer
e34fc45ccb po: update POTFILES.skip
(cherry picked from commit 7d36b463dc)
2018-05-27 20:03:35 +02:00
Ell
1dff8d40c1 app: fix gimp_parallel_run_async() cancelation
In gimp_parallel_run_async(), when aborting a GimpAsync operation
in reponse to its "cancel" signal, properly clean up internal data
attached to the object, to avoid use-after-free if the signal is
emitted again.

(cherry picked from commit 3fa4c01bcf)
2018-05-27 13:59:42 -04:00
Ell
ddc9daceca app: add "independent" parameter to gimp_parallel_run_async()
Add a boolean "independent" parameter to gimp_parallel_run_async().
When FALSE, the passed function is run in the shared async thread
pool; when TRUE, the passed function is run in an independent
thread.

Generally, async operations should run in the async pool, however,
it might be desirable to run long-standing operations, especially
ones that can't be canceled, in independent threads.  This avoids
stalling quicker operations, and shutdown.

Adapt the rest of the code for the change.  In particular,
initialize the font cache in an independent thread.

(cherry picked from commit ad8add6808)
2018-05-27 13:18:56 -04:00
Ell
3ae1eec240 app: abort canceled pending operations in gimp_parallel_run_async()
In gimp_parallel_run_async(), connect to the returned GimpAsync's
"cancel" signal, and abort the operation in response if it's still
enqueued, i.e., if its execution hasn't started yet.

(cherry picked from commit 3958ffbe50)
2018-05-27 13:18:56 -04:00
Ell
fd1e5883f8 app: implement GimpWaitable and GimpCancelable in GimpAsync
Have GimpAsync implement the GimpWaitable and GimpCancelable
interfaces, added in the previous two commits, instead of providing
its own public version of the corresponding functions.

Add gimp_async_cancel_and_wait() as a convenience function for both
canceling an async operation, and waiting for it to complete.

Adapt the rest of the code to the change.

(cherry picked from commit e2c56ef407)
2018-05-27 13:18:56 -04:00
Ell
6f8892dc2d app: add GimpCancelable interface
... which provides a method for canceling an operation managed by
an object.

(cherry picked from commit 722f92d011)
2018-05-27 13:18:56 -04:00
Ell
028a33cf8a app: add GimpWaitable interface
... which provides methods for waiting on an object.

(cherry picked from commit 0fe066890e)
2018-05-27 13:18:56 -04:00
Jehan
4bf6590363 tools: make gimptool memory-managed.
The code was basically leaking memory everywhere, and apparently on
purpose (according to a top comment). Even on short-lived process, not
properly managing memory is not a good habit, especially if we plan to
maintain a program for the long run.
So here are some fixes. I'm sure I must have missed some places (code
was a mess), and hopefully I broke nothing. But that's good for now. At
least it is somewhat sane code now.

(cherry picked from commit f3de5cd3fe)
2018-05-27 17:57:09 +02:00
Jehan
452c9781e7 tools: do not segfault gimptool with source without extension.
Since commit 58fa382001, gimptool would accept source files with
non-standard extensions when using known C or C++ compilers. This would
include source with no extensions at all.
When this happens, do not try to set a pointer to a non-existing dot
separator to '\0'. That obviously segfaults.

(cherry picked from commit 02fc818bf6)
2018-05-27 16:23:53 +02:00
Jehan
41436198d7 tools: clean tabs out of gimptool code.
(cherry picked from commit 355676e7ae)
2018-05-27 16:23:46 +02:00
張俊芝
a52f83632f Issue #1506: Adds support for source file names with special...
... characters and non-standard suffixes in gimptool

(cherry picked from commit 58fa382001)
2018-05-27 16:23:34 +02:00
Jehan
ffb5f994fb Update various places with old git repository URIs.
(cherry picked from commit c6a1b9bcde)
2018-05-27 16:23:20 +02:00
Jehan
02e15f2dd9 build: update GNOME's git repository URI.
(cherry picked from commit 0034bd44b3)
2018-05-27 16:23:00 +02:00
Ell
44a800f0e5 libgimpconfig: align GimpConfig with the rest of the interfaces
Unlike the last two commits, we don't port GimpConfig to
G_DEFINE_INTERFACE(), since we need to provide a base initializer
for it.  However, this commit aligns it with the rest of our
intefaces, by renaming gimp_config_interface_get_type() to
gimp_config_get_type(), and by performing class initialization for
the interface in a separate function than base initialization.

Keep gimp_config_interface_get_type() around as a deprecated
function, to maintain ABI compatibility.  It will be removed in a
separate commit in master, so that this commit can be easily
cherry-picked to gimp-2-10.

(cherry picked from commit 5f8643a6ee)
2018-05-27 05:56:57 -04:00
Ell
51c1f7f650 libgimpcolor: port all interfaces to G_DEFINE_INTERFACE()
... instead of calling g_type_register_static() ourselves.

Keep the old foo_interface_get_type() (replaced with
foo_get_type()) around as deprecated functions, to maintain ABI
compatibility.  They will be removed in a separate commit in
master, so that this commit can be easily cherry-picked to
gimp-2-10.

(cherry picked from commit 6b40c7f37a)
2018-05-27 05:56:57 -04:00
Ell
40a9736bbf app: port all interfaces to G_DEFINE_INTERFACE()
... instead of calling g_type_register_static() ourselves.

(cherry picked from commit cdd96059f7)
2018-05-27 05:56:57 -04:00
Ell
c820764d4f app: code cleanup in GimpAsync
(cherry picked from commit 770634f84e)
2018-05-27 05:56:57 -04:00
Piotr Drąg
8d03b7b133 Update Polish translation 2018-05-27 07:29:36 +02:00
Jehan
ce5821639e app: output proper info message while fonts are loading.
To this effect, I add a variable to differentiate the "no-fonts on the
system" case from "fonts still loading".

(cherry picked from commit cfaa3103e7)
2018-05-27 03:45:07 +02:00
Jehan
89c829a242 Issue #1211: Load fonts in background after startup.
Fonts should not be blocking startup as this provides a very bad
experience when people have a lot of fonts. This was experienced even
more on Windows where loading time are often excessively long.
We were already running font loading in a thread, yet were still
blocking startup (thread was only so that the loading status GUI could
get updated as a feedback). Now we will only start loading and proceed
directly to next steps.
While fonts are not loaded, the text tool will not be usable, yet all
other activities can be performed.

(cherry picked from commit 2484dec7d5)
2018-05-27 02:36:39 +02:00
Jehan
117beee244 configure, desktop: update the bug report URL.
Also make so that the metadata URL is taken from the one of the package
set with configure.

(cherry picked from commit 6ebff7b3c5)
2018-05-27 02:34:50 +02:00
Ell
2511286e43 po-windows-installer: technical fix to the Latvian translation
ender's name can't be encoded in the target encoding.  Use
alternative form.
2018-05-26 15:04:18 -04:00
Ell
2d19f29200 app: various GimpAsync improvements
Improve the formalism of a GimpAsync object being "sycned"
(previously referred to as the main thread being "synced" with the
async thread), by both providing a gimp_async_is_synced() function,
separate from gimp_async_is_stopped(), and by improving the type
and function descriptions.

Make sure all previously added callbacks have been called after a
call to gimp_async_wait[_until](), even if these functions are
called from within a callback.

(cherry picked from commit a901c3c1f4)
2018-05-26 14:22:32 -04:00
Ell
c96c6802e8 app: add gimp_async_remove_callback()
... which removes a callback previously added through
gimp_async_add_callback().

(cherry picked from commit 85f67e196c)
2018-05-26 14:22:32 -04:00
Ell
52f8abbdbf app: use gimp_parallel_run_async() when loading fonts
Replace the custom threading code with a call to
gimp_parallel_run_async().  This simplifies the code, while
maintaining the current (blocking) behavior.  In the future, we
might build upon this to actually load the fonts in the background.

(cherry picked from commit 3e92e7a449)
2018-05-26 11:34:06 -04:00
Ell
89e9c8d9b3 app: add gimp_async_wait_until()
... which is similar to gimp_async_wait(), taking an 'end_time'
parameter, controlling how long to wait for the async operation to
complete.

(cherry picked from commit 68c57548fd)
2018-05-26 11:33:16 -04:00
Ell
f9ae3ae014 Issue #1490 - Crash when flattening an XCF file
The default stack size for new threads on MacOS is 512 KiB, making
our 512 KiB limit for stack-allocated buffers in
gimp_operation_layer_mode_real_process() too high.  Lower it to
256 KiB.

(cherry picked from commit 367399e5c0)
2018-05-25 20:35:32 -04:00
Ell
448fa97b85 app: fix progress text when applying shaped gradient through PDB
In gimp_drawable_gradient(), pass the undo description ("Gradient")
to gimp_gegl_apply_operation(), so that its displayed as the
progress text while rendering the gradient, even when applying a
shaped gradient, in which case we end the progress after
calculating the distance map, causing the progress text be NULL
during rendering unless explicitly set.

(cherry picked from commit deee2f14f5)
2018-05-25 12:44:10 -04:00
Ell
1d6d054212 app: in GimpOperationGradient, use sampler for reading the distance buffer
... instead of using gegl_buffer_get() directly.  This is slightly
faster.

(cherry picked from commit ef43fc395c)
2018-05-25 12:26:24 -04:00
Rodrigo
7feacb1ecf Update Spanish translation 2018-05-25 12:30:20 +00:00
Ell
b67c1e33f1 app: use gimp_gegl_buffer_copy() all over the place
Replace all uses of gegl_buffer_copy() in app/ with
gimp_gegl_buffer_copy(), added in the previous commit.

(cherry picked from commit 08ff2ac8c8)
2018-05-25 08:20:56 -04:00
Ell
1878543cf8 app: add gimp_gegl_buffer_copy()
... which is a drop-in replacement for gegl_buffer_copy(),
parallelizing the copy operation when the source and destination
formats are different, requiring a conversion.

(cherry picked from commit fded25b38c)
2018-05-25 08:20:56 -04:00
Alexandre Prokoudine
a984d9c49d NEWS: keep updated 2018-05-25 04:19:22 +03:00
Michael Natterer
a9636f7b1d app: actually set the color frames to "not dirty" after updating them
(cherry picked from commit 9d5fc680f8)
2018-05-24 01:56:00 +02:00
Michael Natterer
4a7d364062 app: remove gimp_display_shell_draw_background()
and remove all clipping hacks for drawing the canvas background, turns
out they never worked and we were relying on the pattern set on the
window, gah! This optimizes away one entire step of drawing of image
size, for each expose...
2018-05-23 22:56:15 +02:00
Marek Cernocky
07aa0b2615 Updated Czech translation 2018-05-23 09:40:44 +02:00
Rodrigo
16ff117b02 Updated Spanish translation 2018-05-22 16:35:15 +02:00
Rodrigo
37773c18e6 Updated Spanish translation 2018-05-22 16:00:52 +02:00
Marek Cernocky
378bcea50c Updated Czech translation 2018-05-22 14:30:40 +02:00
Timo Jyrinki
681bd2435e Update Finnish translation 2018-05-22 09:17:34 +00:00
Timo Jyrinki
87db3ce9a8 Update Finnish translation 2018-05-22 09:09:41 +00:00
Timo Jyrinki
e74884f7a1 Update Finnish translation 2018-05-22 07:17:25 +00:00
Marco Ciampa
a48d9178e8 Updated Italian translation 2018-05-21 15:47:53 +02:00
Jernej Simončič
9e5eeefa81 Installer: put back compatibility DLLs (for really old plugins)
(cherry picked from commit d436eb66fc)
2018-05-21 13:02:59 +02:00
Jernej Simončič
f74d1330aa Installer: set compatibility options to run Python plugins in high-DPI-aware mode
(cherry picked from commit fd59ecf2c5)
2018-05-21 13:02:46 +02:00
Jernej Simončič
eb41014b47 Installer: remove .dll files from plug-ins directory
(cherry picked from commit 952e7f365c)
2018-05-21 13:02:28 +02:00
Jernej Simončič
5b600509ba Installer: fix typos
(cherry picked from commit 0dc3b76306)
2018-05-21 13:02:08 +02:00
Jernej Simončič
bbca2b02b1 Installer: Python fixes
(cherry picked from commit 2a438351dd)
2018-05-21 13:01:52 +02:00
Daniel Șerbănescu
0cae2f0445 Update Romanian translation 2018-05-21 09:14:31 +00:00
Daniel Șerbănescu
c56440bbd7 Update Romanian translation 2018-05-21 09:04:03 +00:00
Jehan
a2902790cc plug-ins: fix Windows distribution.
"magnification-api-win32.h" was not included in the dist!
Note that I know that alphabetical order is wrong. I am planning to
actually change the name of the file (more in line with other filenames)
but I am waiting to finish a review of another patch from Gil before
doing so. So just let it as-is for now! ;-)
2018-05-20 23:19:44 +02:00
Michael Natterer
d6c80ef043 configure.ac: post-release version bump to 2.10.3 2018-05-20 21:01:28 +02:00
4773 changed files with 922578 additions and 502461 deletions

227
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,227 @@
image: debian:bullseye
stages:
- dependencies
- gimp
- distribution
variables:
GIT_DEPTH: "1"
INSTALL_DIR: "_install"
INSTALL_PREFIX: "${CI_PROJECT_DIR}/${INSTALL_DIR}"
PACMAN_CACHE: "${CI_PROJECT_DIR}/_pacman_cache"
## GNU/Linux 64-bit CIs ##
deps-debian/oldstable:
stage: dependencies
cache:
paths:
- _pacman_cache
artifacts:
expire_in: 1 hour
when: always
paths:
- "${INSTALL_DIR}"
- _babl/_build
- _gegl/_build
before_script:
- apt-get update
- apt-get install -y --no-install-recommends
appstream-util
autoconf
automake
build-essential
cmake
git
ffmpeg
graphviz
gobject-introspection
libaa1-dev
libavif-dev
libjson-glib-dev
libgexiv2-dev
libgirepository1.0-dev
libgs-dev
libgtk2.0-dev
libheif-dev
liblcms2-dev
libopenexr-dev
libraw-dev
librsvg2-dev
libspiro-dev
libsuitesparse-dev
libtiff5-dev
libtool
luajit
m4
meson
python2
python3
python2-dev
valac
wget
- apt-get install -y --reinstall ca-certificates
- git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git _babl
- git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl
- git clone --depth=${GIT_DEPTH} -b v0.7.x --recursive --shallow-submodules https://github.com/libjxl/libjxl.git _libjxl
- export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/pkgconfig"
- export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/`gcc -print-multiarch`/pkgconfig/:$PKG_CONFIG_PATH"
- export LD_LIBRARY_PATH="${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH}"
- export LD_LIBRARY_PATH="${INSTALL_PREFIX}/lib/`gcc -print-multiarch`:$LD_LIBRARY_PATH"
- export XDG_DATA_DIRS="${INSTALL_PREFIX}/share:/usr/local/share:/usr/share"
script:
- cd _babl
- meson -Dprefix="${INSTALL_PREFIX}" _build
- ninja -C _build
- ninja -C _build install
- cd ../_gegl
- meson --prefix="${INSTALL_PREFIX}" _build
- ninja -C _build
- ninja -C _build install
# libjxl
- cd ../_libjxl
- mkdir build
- cd build
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_COVERAGE=OFF -DJPEGXL_ENABLE_FUZZERS=OFF -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_WARNINGS_AS_ERRORS=OFF -DJPEGXL_ENABLE_SKCMS=ON -DJPEGXL_ENABLE_VIEWERS=OFF -DJPEGXL_ENABLE_PLUGINS=OFF -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_ENABLE_DOXYGEN=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_TCMALLOC=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_TOOLS=OFF ..
- ninja
- ninja install
- cd ..
# Building pygtk2 as it is not available in Debian testing anymore.
- cd ../build/gitlab-ci
- wget https://cairographics.org/releases/py2cairo-1.10.0.tar.bz2
- wget https://download.gnome.org/sources/pygobject/2.28/pygobject-2.28.7.tar.xz
- wget https://download.gnome.org/sources/pygtk/2.24/pygtk-2.24.0.tar.gz
- sha256sum -c deps.sha256sum
- export PYTHON=/usr/bin/python2
# py2cairo
- tar xjf py2cairo-1.10.0.tar.bz2
- cd py2cairo-1.10.0/
- libtoolize --force
- aclocal
- autoheader
- automake --force-missing --add-missing --foreign
- autoconf
- ./configure --prefix="${INSTALL_PREFIX}" && make && make install
- cd ..
# pygobject
- tar xf pygobject-2.28.7.tar.xz
- cd pygobject-2.28.7/
- ./configure --prefix="${INSTALL_PREFIX}" && make && make install
- cd ..
# pygtk
- tar xzf pygtk-2.24.0.tar.gz
- cd pygtk-2.24.0/
- patch -p1 < ../pygtk-Drop-the-PangoFont-find_shaper-virtual-method.patch
- ./configure --prefix="${INSTALL_PREFIX}" && make && make install
.gimp-debian/oldstable-base:
stage: gimp
dependencies:
- deps-debian/oldstable
artifacts:
expire_in: 1 week
when: always
name: "app-build-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
paths:
- _build
#- "${INSTALL_DIR}"
before_script:
- apt-get update
- apt-get install -y --no-install-recommends
at-spi2-core
build-essential
desktop-file-utils
ffmpeg
hicolor-icon-theme
ghostscript
git
glib-networking
gobject-introspection
gtk-doc-tools
intltool
iso-codes
libappstream-glib-dev
libbz2-dev
libdbus-glib-1-dev
libexif-dev
libgexiv2-dev
libgirepository1.0-dev
libgtk2.0-bin
libgtk2.0-dev
libgudev-1.0-dev
libheif-dev
libjson-glib-dev
liblcms2-dev
liblzma-dev
libmng-dev
libmypaint-dev
libopenexr-dev
libpoppler-glib-dev
libraw20
librsvg2-dev
libspiro-dev
libtiff-dev
libtool
libumfpack5
libwebp-dev
libwmf-dev
libxmu-dev
libxpm-dev
meson
mypaint-brushes
poppler-data
python2
python2-dev
xauth
xvfb
- export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/pkgconfig:${INSTALL_PREFIX}/share/pkgconfig"
- export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/`gcc -print-multiarch`/pkgconfig/:$PKG_CONFIG_PATH"
- export PKG_CONFIG_PATH="${INSTALL_PREFIX}/share/`gcc -print-multiarch`/pkgconfig/:$PKG_CONFIG_PATH"
- export LD_LIBRARY_PATH="${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH}"
- export LD_LIBRARY_PATH="${INSTALL_PREFIX}/lib/`gcc -print-multiarch`:$LD_LIBRARY_PATH"
- export XDG_DATA_DIRS="${INSTALL_PREFIX}/share:/usr/local/share:/usr/share"
- export PATH="${INSTALL_PREFIX}/bin:$PATH"
needs: ["deps-debian/oldstable"]
gimp-debian/oldstable-autotools:
extends: .gimp-debian/oldstable-base
script:
- mkdir _build
- cd _build
- ../autogen.sh
--prefix="${INSTALL_PREFIX}"
--enable-debug
- make -j "$(nproc)"
- make check
gimp-debian/oldstable-autotools-distcheck:
extends: .gimp-debian/oldstable-base
script:
# Actual build.
- mkdir _build
- cd _build
- ../autogen.sh
--prefix="${INSTALL_PREFIX}"
--enable-debug
--disable-python
--enable-gtk-doc
- make -j "$(nproc)"
- make -j "$(nproc)" distcheck
## Ready-to-distribute ##
sources:
stage: distribution
dependencies:
- gimp-debian/oldstable-autotools-distcheck
artifacts:
when: always
expire_in: 2 days
paths:
- gimp-*.tar.*
- SHA256SUMS
script:
- mv _build/gimp-*.tar.* .
- sha256sum gimp-*.tar.* > SHA256SUMS
needs: ["gimp-debian/oldstable-autotools-distcheck"]

17
AUTHORS
View File

@@ -9,6 +9,7 @@ GIMP was originally written by:
The current maintainers are:
Michael Natterer
Jehan
The following people have contributed code to GIMP:
@@ -31,6 +32,7 @@ The following people have contributed code to GIMP:
Marc Bless
Edward Blevins
Reagan Blundell
Jacob Boerema
Hendrik Boom
Xavier Bouchoux
Richard Bowers
@@ -74,6 +76,7 @@ The following people have contributed code to GIMP:
Daniel Egger
Ulf-D. Ehlert
Gil Eliyahu
Tobias Ellinghaus
Ell
Morton Eriksen
Larry Ewing
@@ -99,7 +102,9 @@ The following people have contributed code to GIMP:
Marcelo de Gomensoro Malheiros
Saul Goode
David Gowers
Niels De Graef
Cameron Gregory
Stanislav Grinkov
Eric Grivel
Stephen Griffiths
Pavel Grinfeld
@@ -130,11 +135,11 @@ The following people have contributed code to GIMP:
Kristian Jantz
Javier Jardón
Tim Jedlicka
Jehan
Róman Joost
Alexander Jones
Geert Jordaens
Aurimas Juška
Povilas Kanapickas
Malay Keshav
Andrew Kieschnick
Peter Kirchgessner
@@ -168,6 +173,7 @@ The following people have contributed code to GIMP:
Wing Tung Leung
Dave Lichterman
Adrian Likins
lillolollo
Tor Lillqvist
Ingo Lütkebohle
Nikc M.
@@ -203,6 +209,7 @@ The following people have contributed code to GIMP:
Christopher Montgomery
Tim Mooney
Adam D Moss
Simon Müller
Tobias Mueller
Michael Muré
Lionel N.
@@ -218,27 +225,30 @@ The following people have contributed code to GIMP:
Jon Nordby
Martin Nordholts
Stephen Robert Norris
Daniel Novomesky
Erik Nygren
Miles O'Neal
David Odin
Nelson A. de Oliveira
Victor Oliveira
Yoshio Ono
Thom van Os
Garry R. Osgood
Nathan Osman
Benjamin Otte
Petr Ovtchenkov
Alan Paeth
Jehan Pagès
Jay Painter
Juan Palacios
Ville Pätsi
Akkana Peck
Asbjorn Pettersen
Félix Piédallu
Mike Phillips
Nils Philippsen
Ari Pollak
Mircea Purdea
Liam Quin
Raphaël Quinet
John Ralls
Dennis Ranke
@@ -258,6 +268,7 @@ The following people have contributed code to GIMP:
Tim Rowley
Karthikeyan S
Daniel Sabo
Oleksii Samorukov
Mike Schaeffer
John Schlag
Norbert Schmitz
@@ -267,6 +278,7 @@ The following people have contributed code to GIMP:
Michael Schumacher
Tracy Scott
Craig Setera
Elad Shahar
shark0r
Peter Sikking
RyōTa SimaMoto
@@ -314,6 +326,7 @@ The following people have contributed code to GIMP:
Alexis Wilhelm
Calvin Williamson
Matthew Wilson
woob
Karl Günter Wünsch
Andrew Wyatt
Yoshinori Yamakawa

View File

@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/philosophy/why-not-lgpl.html>.

19
HACKING
View File

@@ -10,14 +10,14 @@ to have the following packages (or newer versions) installed:
* GNU libtool 1.5
- ftp://ftp.gnu.org/gnu/libtool/
Fine GNU mirrors are listed at http://www.gnu.org/prep/ftp.html
Fine GNU mirrors are listed at https://www.gnu.org/prep/ftp.html
Beta software can be found at alpha.gnu.org.
* pkg-config 0.16.0 (or preferably a newer version)
- http://www.freedesktop.org/software/pkgconfig/
- https://www.freedesktop.org/software/pkgconfig/
* gtkdocize
- http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/
- https://ftp.gnome.org/pub/GNOME/sources/gtk-doc/
* xsltproc
- ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/
@@ -79,12 +79,12 @@ Git
GIMP is available from GNOME Git. You can use the following commands
to get GIMP from the the git server:
$ git clone git://git.gnome.org/gimp
$ git clone https://gitlab.gnome.org/GNOME/gimp.git
You can read more on using GNOME's git service at these URLs:
http://live.gnome.org/Git
http://www.kernel.org/pub/software/scm/git/docs/
https://wiki.gnome.org/Git
https://www.kernel.org/pub/software/scm/git/docs/
You will also need relatively new stable releases of glib, pango, atk,
@@ -99,9 +99,10 @@ The best way to submit patches is to provide files created with
git-format-patch.
It is recommended that you file a bug report at
http://bugzilla.gnome.org/ and attach your patch to it as a plain text
file, not compressed. If your patch is reasonably small you can submit
it to the gimp-developer-list@gnome.org mailing list.
https://gitlab.gnome.org/GNOME/gimp
and either create a merge request or attach your patch to it as a plain
text file, not compressed. If your patch is reasonably small you can
submit it to the gimp-developer-list@gnome.org mailing list.
If the patch needs to be discussed, you should also consider using the
mailing list instead of Bugzilla because bug reports tend to be hard

View File

@@ -1,6 +1,6 @@
--------------------------------------
---------------------------------------
Installation instructions for GIMP @GIMP_APP_VERSION@
--------------------------------------
---------------------------------------
There are some basic steps to building and installing GIMP.
@@ -30,20 +30,24 @@ header files installed.
1. You need to have installed a recent version of pkg-config (>= @GIMP_PKGCONFIG_VERSION@) available
from http://www.freedesktop.org/software/pkgconfig/.
from https://www.freedesktop.org/software/pkgconfig/.
2. You need intltool (at least @INTLTOOL_REQUIRED_VERSION@, but preferably a newer version).
Intltool can be downloaded from
http://ftp.gnome.org/pub/gnome/sources/intltool/
You are recommended to install gettext version @XGETTEXT_RECOMMENDED_VERSION@ or over. Earlier gettext had
https://ftp.gnome.org/pub/gnome/sources/intltool/
You also need gettext version @XGETTEXT_REQUIRED_VERSION@ or over. Earlier gettext had
issues with script-fu localization, ending up in incomplete GIMP localization.
3. You need to have GEGL version @GEGL_REQUIRED_VERSION@ or newer and babl version
@BABL_REQUIRED_VERSION@ or newer. You can get them from http://gegl.org/ or clone
@BABL_REQUIRED_VERSION@ or newer. You can get them from https://gegl.org/ or clone
them from the GNOME git repository:
git://git.gnome.org/babl
git://git.gnome.org/gegl
https://gitlab.gnome.org/GNOME/babl.git
https://gitlab.gnome.org/GNOME/gegl.git
Note: install GEGL with libumfpack (SuiteSparse) for alternative Matting
engine "gegl:matting-levin" and OpenEXR library for OpenEXR format
support.
4. You need to have installed GTK+ version @GTK_REQUIRED_VERSION@ or newer.
GIMP also needs a recent version of GLib (>= @GLIB_REQUIRED_VERSION@), GDK-Pixbuf
@@ -51,7 +55,7 @@ header files installed.
from ftp://ftp.gtk.org/.
5. We use cairo >= @CAIRO_REQUIRED_VERSION@, which is hosted at
http://www.cairographics.org/.
https://www.cairographics.org/.
6. We require PangoCairo, a Pango backend using Cairo. Make sure you
have Cairo, FreeType2 and fontconfig installed before you compile
@@ -81,11 +85,13 @@ header files installed.
If installing from repository, do not install the master branch!
Checkout the tag "v1.3.0" instead, or simply install from a tarball
or from your favorite package manager.
You may also checkout the "libmypaint-v1" branch, which is the
development branch for libmypaint v1.x and has some more recent
fixes.
11. We also need the mypaint-brushes data package with is currently
hosted by Jehan, until the MyPaint project takes care of it:
11. We also need the mypaint-brushes data package:
https://github.com/Jehan/mypaint-brushes
https://github.com/mypaint/mypaint-brushes
If installing from repository, install from branch "v1.3.x" or the
particular tag "v1.3.0". In particular do not install from master
@@ -99,7 +105,7 @@ header files installed.
12. You may want to install other third party libraries or programs
that are needed for some of the available plug-ins. We recommend
to check that the following libraries are installed: libjasper,
to check that the following libraries are installed: openjpeg,
webkit, libmng, librsvg, libwmf, libaa and libgs (Ghostscript).
13. HEIF support depends on the libheif library. If you don't have
@@ -107,8 +113,9 @@ header files installed.
https://github.com/strukturag/libheif
Make sure you build libheif with libde265 support, otherwise the
plug-in is mostly useless.
Make sure you build libheif with libde265 and libx265 support (for
respectively decoding and encoding), otherwise the plug-in is
mostly useless.
14. The Python extension requires Python 2 development headers (@PYTHON2_REQUIRED_VERSION@
or newer) to be present. You will also need PyGTK and the
@@ -171,13 +178,13 @@ header files installed.
gs - ghostscript
libaa - ASCII art
libheif @LIBHEIF_REQUIRED_VERSION@ HEIF
libjasper - JPEG 2000
libmng - MNG
libwebp @WEBP_REQUIRED_VERSION@ WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
libwmf @WMF_REQUIRED_VERSION@ WMF
libXcursor - X11 Mouse Cursor
libxpm - XPM
openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
OpenJPEG @OPENJPEG_REQUIRED_VERSION@ JPEG 2000
python 2 @PYTHON2_REQUIRED_VERSION@ Python plug-ins
webkit @WEBKIT_REQUIRED_VERSION@ Help browser & webpage
@@ -188,6 +195,7 @@ header files installed.
xdg-email for sending emails
sendmail for sending emails if --with-sendmail enabled
gdb or lldb for our new bug-reporting dialog
"gegl:matting-levin" GEGL operation for alternative matting engine
Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries
lying around on your system, otherwise configure may fail to find the
@@ -201,9 +209,9 @@ compilation and installation output is not shown.
% tar xvfz gimp-@GIMP_VERSION@.tar.gz # unpack the sources
% cd gimp-@GIMP_VERSION@ # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GIMP
% make install # install GIMP
% ./configure # run the `configure' script
% make # build GIMP
% make install # install GIMP
The `configure' script examines your system, and adapts GIMP to run on
@@ -216,6 +224,10 @@ These are:
--disable-vector-icons. This option installs raster icons instead of
vector icons.
--enable-relocatable-bundle. This option forces GIMP to search some
resources (e.g. MyPaint brushes or libwmf fonts) relatively to the
running prefix, rather than using build-time paths.
--enable-shared and --disable-shared. This option affects whether
shared libraries will be built or not. Shared libraries provide
for much smaller executables. The default is to enable shared
@@ -243,11 +255,6 @@ These are:
in the user's home directory) to ~/.config/DIR/@GIMP_APP_VERSION@.
If DIR is an absolute path, the directory will be changed to DIR.
--enable-binreloc. When compiled for Linux with this option enabled,
GIMP will be binary relocatable. Plug-ins and data files will
be searched relative to the gimp binary instead of in the paths
defined at compile time.
--with-shm=[none|sysv|posix|auto]. This option allows you to specify
how image data is transported between the core and plug-ins. Usually
the best way to do this is detected automatically.
@@ -365,7 +372,7 @@ When ./configure fails
'configure' uses pkg-config, a tool that replaces the old foo-config
scripts. The most recent version is available from
http://www.freedesktop.org/software/pkgconfig/
https://www.freedesktop.org/software/pkgconfig/
'configure' tries to compile and run a short GTK+ program. There are
several reasons why this might fail:

1885
NEWS

File diff suppressed because it is too large Load Diff

View File

@@ -145,7 +145,7 @@ Bugs fixed in GIMP 2.0pre3
- 132162: Anchoring a floating selection on a channel (Mitch)
- 132271: Mosaic filter on selections (Simon)
- 132322: gimp-levels on grayscale images (Mitch)
- 132329: Info window doesn't show inital values (Shlomi Fish)
- 132329: Info window doesn't show initial values (Shlomi Fish)
- 118084: Info window not updated in automatic mode (Shlomi Fish)
- 132495: Positioning of glyphs that extend the logical rectangle (Sven)
- 108659: Use g_spawn in postscript plug-in (Peter Kirchgessner)
@@ -473,7 +473,7 @@ Overview of Changes in GIMP 1.3.15
- Load old paths as new vector objects [Mitch]
- Apply transformations to linked items [Mitch]
- Generalized item transformations [Mitch]
- Improved session managment [Mitch]
- Improved session management [Mitch]
- Speed up fonts query [Yosh]
- Backed out pluggable tools [Sven]
- Lots of bug fixes
@@ -563,7 +563,7 @@ Overview of Changes in GIMP 1.3.11
- Added PDB functions needed by GAP [Wolfgang Hofer, Sven]
- Updated the Win32 build system [Tor Lillqvist, Hans Breuer]
- Factored common code out of a number of plug-ins [Maurits]
- Use g_rand* functions whereever random numbers are needed [Bolsh]
- Use g_rand* functions wherever random numbers are needed [Bolsh]
- GimpPressionist plug-in cleaned up [Maurits]
- Finally landed the new gimprc code based on GimpConfig [Sven, Mitch]
- Added widgets for views on object properties [Mitch]
@@ -795,7 +795,7 @@ Overview of Changes in GIMP 1.3.0
to learn what libraries we require in detail.
- Cleaned up the core a lot. The app directory is now broken up into
subdirectories that define subsystems with defined dependencies.
- Seperated GUI from core functionality in almost all places.
- Separated GUI from core functionality in almost all places.
- The core object system does not depend on GTK+ any more.
- Rewrote large parts of the user interface in a more generic way.
- Started to rewrite the text tool (completely broken at the moment)

View File

@@ -502,7 +502,7 @@ Core:
more than 16 bits; don't offer dithering options in these cases.
- Default to linear TRC when converting to 16-bit float.
- Pre-initialize some babl-based pixel format conversion routines
at start-up to decrease the initial lazy intialization cost for
at start-up to decrease the initial lazy initialization cost for
some interactions.
- Remove max size limitation of 4GB for XCF files.
- Support clipboard images in the clipboard brush and pattern.

View File

@@ -112,7 +112,7 @@ Overview of Changes in GIMP 2.2-pre1
- Let lots of core dialogs remember their last values and add
shortcuts to run with the last values w/o opening the dialog.
- Added new PDB API for drawable tranformations.
- Added new PDB API for drawable transformations.
- Register all libgimp enums to allow language bindings such as
Script-Fu to access them using GType introspection.

View File

@@ -192,7 +192,7 @@ Changes in GIMP 2.3.12
- show a thumbnail in the "Rotate JPEG?" query dialog
- added file information to the Image Properties dialog
- more work on the new selection tools
- give immidiate feedback when tool modifier keys are pressed
- give immediate feedback when tool modifier keys are pressed
- added Lens Distortion plug-in
- internationalize Python binding and Python plug-ins
- improved internal message infrastructure, use the statusbar for warnings

View File

@@ -228,7 +228,7 @@ PDB:
- added new text layer API
- added gimp-vectors-export-to-file and gimp-vectors-export-to-string
- added procedure to test for existance of a procedure in the PDB
- added procedure to test for existence of a procedure in the PDB
- improved error handling for procedures

64
README
View File

@@ -25,55 +25,60 @@ detailed installation instructions, see the file INSTALL.
GIMP's home page is at:
http://www.gimp.org/
https://www.gimp.org/
Please be sure to visit this site for information, documentation,
tutorials, news, etc. All things GIMP-ish are available from there.
The automated plug-in registry is located at:
http://registry.gimp.org/
There you can get the latest versions of plug-ins, using a convenient
forms-based interface.
The latest version of GIMP can be found at:
http://www.gimp.org/downloads/
https://www.gimp.org/downloads/
We also have a website dedicated to documentation at:
https://docs.gimp.org/
2. Mailing Lists
================
2. Contributing
===============
We have several mailing lists dedicated to GIMP user and development
discussion. There is more info at
GIMP source code can be found at:
http://www.gimp.org/mail_lists.html
https://gitlab.gnome.org/GNOME/gimp/
Links to several archives of the mailing lists are included in that page.
Resources for contributors:
Gimp-user-list is a mailing list dedicated to user problems, hints and
tips, discussion of cool effects, etc. Gimp-developer-list is oriented
to GIMP core and plug-in developers. Gimp-gui-list is for discussing
about GIMP interface to improve user experience. Most people will only
want to be subscribed to gimp-user-list. If you want to help develop
GIMP, the gimp-developer mailing list is a good starting point; if you
want to help with GUI design, the gimp-gui list is where you want to
subscribe.
https://developer.gimp.org/
In particular, you may want to look in the "Core Development" section. Some
articles of particular interest for newcomers could be:
* Setting up your developer environment: https://developer.gimp.org/core/setup/
* GIMP Coding Style: https://developer.gimp.org/core/coding_style/
* Submit your first patch: https://developer.gimp.org/core/submit-patch/
3. IRC
======
3. Discussion Channels
======================
And finally, for the real junkies, there is an IRC channel devoted to
GIMP. On GIMPNet (a private free software oriented network) there is
#gimp. Many of the developers hang out there. Some of the GIMPNet
servers are:
We have several discussion channels dedicated to GIMP user and
development discussion. There is more info at:
https://www.gimp.org/discuss.html
For the real junkies, there are IRC channels (e.g. #gimp or #gimp-user)
devoted to GIMP on GIMPNet (a private free software oriented network).
Many of the developers hang out there. Some of the GIMPNet servers are:
irc.gimp.org:6667
irc.us.gimp.org:6667
irc.eu.gimp.org:6667
More discussion channels, such as forums, will be listed on the above
"discuss" page when they are moderated by a team member.
Links to archives of former discussion methods (e.g. mailing lists) are
also included in that page.
4. Customizing
==============
@@ -100,3 +105,4 @@ Have fun,
Michael Natterer
Dave Neary
Martin Nordholts
Jehan

View File

@@ -3,13 +3,13 @@ This file contains some important hints for translators.
The current status of the GIMP translation can be checked at
http://l10n.gnome.org/module/gimp
https://l10n.gnome.org/module/gimp
Translation of the GNU Image Manipulation Program is handled by the
GNOME Translation Project (see http://l10n.gnome.org/). If you want to
GNOME Translation Project (see https://l10n.gnome.org/). If you want to
help, we suggest that you get in touch with the translation team of
your language (see http://l10n.gnome.org/teams/).
your language (see https://l10n.gnome.org/teams/).
GIMP is different

View File

@@ -4,6 +4,5 @@ m4_include([m4macros/ax_cxx_compile_stdcxx.m4])
m4_include([m4macros/ax_gcc_func_attribute.m4])
m4_include([m4macros/ax_prog_cc_for_build.m4])
m4_include([m4macros/ax_prog_perl_version.m4])
m4_include([m4macros/binreloc.m4])
m4_include([m4macros/detectcflags.m4])
m4_include([m4macros/pythondev.m4])

View File

@@ -4,11 +4,13 @@ AUTOMAKE_OPTIONS = subdir-objects
libapp = $(top_builddir)/app/libapp.a
libappwidgets = $(top_builddir)/app/widgets/libappwidgets.a
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
framework_appkit = -framework AppKit
endif
if OS_WIN32
@@ -40,6 +42,7 @@ gimp_debug_tool_@GIMP_TOOL_VERSION@_CPPFLAGS = \
gimp_debug_tool_@GIMP_TOOL_VERSION@_LDADD = \
$(libappwidgets) \
$(libapp) \
$(libgimpbase) \
$(GIO_LIBS) \
$(GEGL_LIBS) \
$(GTK_LIBS) \
@@ -78,4 +81,5 @@ AM_CXXFLAGS = \
$(xobjective_cxx)
AM_LDFLAGS = \
$(framework_appkit) \
$(xnone)

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/*
@@ -49,14 +49,17 @@ main (int argc,
const gchar *pid;
const gchar *reason;
const gchar *message;
const gchar *bt_file = NULL;
gchar *trace = NULL;
const gchar *bt_file = NULL;
const gchar *last_version = NULL;
const gchar *release_date = NULL;
gchar *trace = NULL;
gchar *error;
GtkWidget *dialog;
if (argc != 6)
if (argc != 6 && argc != 8)
{
g_print ("Usage: gimp-debug-tool-2.0 [PROGRAM] [PID] [REASON] [MESSAGE] [BT_FILE]\n");
g_print ("Usage: gimp-debug-tool-2.0 [PROGRAM] [PID] [REASON] [MESSAGE] [BT_FILE] "
"([LAST_VERSION] [RELEASE_TIMESTAMP])\n");
exit (EXIT_FAILURE);
}
@@ -73,9 +76,16 @@ main (int argc,
if (trace == NULL || strlen (trace) == 0)
exit (EXIT_FAILURE);
if (argc == 8)
{
last_version = argv[6];
release_date = argv[7];
}
gtk_init (&argc, &argv);
dialog = gimp_critical_dialog_new (_("GIMP Crash Debug"));
dialog = gimp_critical_dialog_new (_("GIMP Crash Debug"), last_version,
release_date ? g_ascii_strtoll (release_date, NULL, 10) : -1);
gimp_critical_dialog_add (dialog, error, trace, TRUE, program,
g_ascii_strtoull (pid, NULL, 10));
g_free (error);

View File

@@ -1,5 +1,11 @@
## Process this file with automake to produce Makefile.in
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
endif
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
@@ -22,6 +28,7 @@ SUBDIRS = \
plug-in \
xcf \
file \
file-data \
pdb \
widgets \
propgui \
@@ -66,6 +73,8 @@ libapp_sources = \
gimp-log.c \
gimp-log.h \
gimp-priorities.h \
gimp-update.c \
gimp-update.h \
gimp-version.c \
gimp-version.h
@@ -74,6 +83,10 @@ libapp_a_SOURCES = $(libapp_sources)
gimp_@GIMP_APP_VERSION@_SOURCES = $(libapp_sources) main.c
if PLATFORM_LINUX
libdl = -ldl
endif
if PLATFORM_OSX
framework_cocoa = -framework Cocoa
endif
@@ -81,6 +94,16 @@ endif
if OS_WIN32
win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE)
# for GimpDashboard and GimpBacktrace
psapi_cflags = -DPSAPI_VERSION=1
libpsapi = -lpsapi
# for GimpBacktrace
libdbghelp = -ldbghelp
# for I_RpcExceptionFilter()
librpcrt4 = -lrpcrt4
if HAVE_EXCHNDL
exchndl = -lexchndl
endif
@@ -89,7 +112,7 @@ else
libm = -lm
endif
if USE_BINRELOC
if ENABLE_RELOCATABLE_RESOURCES
munix = -Wl,-rpath '-Wl,$$ORIGIN/../lib'
endif
@@ -113,6 +136,8 @@ AM_CPPFLAGS = \
$(GEGL_CFLAGS) \
$(LCMS_CFLAGS) \
$(GEXIV2_CFLAGS) \
$(psapi_cflags) \
$(xobjective_c) \
-I$(includedir) \
-I$(builddir)/gui
@@ -129,7 +154,8 @@ AM_LDFLAGS = \
-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec \
-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy \
-Wl,-u,$(SYMPREFIX)gimp_parallel_init \
-Wl,-u,$(SYMPREFIX)gimp_parallel_exit
-Wl,-u,$(SYMPREFIX)gimp_async_set_new \
-Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new
gimpconsoleldadd = \
xcf/libappxcf.a \
@@ -139,6 +165,7 @@ gimpconsoleldadd = \
vectors/libappvectors.a \
core/libappcore.a \
file/libappfile.a \
file-data/libappfile-data.a \
text/libapptext.a \
paint/libapppaint.a \
operations/libappoperations.a \
@@ -167,9 +194,15 @@ gimpconsoleldadd = \
$(Z_LIBS) \
$(JSON_C_LIBS) \
$(LIBMYPAINT_LIBS) \
$(LIBBACKTRACE_LIBS) \
$(LIBUNWIND_LIBS) \
$(INTLLIBS) \
$(RT_LIBS) \
$(libm)
$(libm) \
$(libdl) \
$(libpsapi) \
$(libdbghelp) \
$(librpcrt4)
gimp_@GIMP_APP_VERSION@_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -189,7 +222,6 @@ gimp_@GIMP_APP_VERSION@_LDADD = \
$(libgimpwidgets) \
$(GTK_LIBS) \
$(GTK_MAC_INTEGRATION_LIBS) \
$(DBUS_GLIB_LIBS) \
$(gimpconsoleldadd) \
$(exchndl) \
$(GIMPRC)

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ABOUT_H__
@@ -47,7 +47,7 @@
"GNU General Public License for more details." \
"\n\n" \
"You should have received a copy of the GNU General Public License " \
"along with GIMP. If not, see: http://www.gnu.org/licenses/")
"along with GIMP. If not, see: https://www.gnu.org/licenses/")
#endif /* __ABOUT_H__ */

View File

@@ -98,8 +98,6 @@ libappactions_a_SOURCES = \
filters-commands.h \
fonts-actions.c \
fonts-actions.h \
fonts-commands.c \
fonts-commands.h \
gradient-editor-actions.c \
gradient-editor-actions.h \
gradient-editor-commands.c \

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ACTIONS_TYPES_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -280,172 +280,196 @@ actions_exit (Gimp *gimp)
Gimp *
action_data_get_gimp (gpointer data)
{
GimpContext *context = NULL;
Gimp *result = NULL;
static gboolean recursion = FALSE;
if (! data)
if (! data || recursion)
return NULL;
if (GIMP_IS_DISPLAY (data))
return ((GimpDisplay *) data)->gimp;
else if (GIMP_IS_IMAGE_WINDOW (data))
recursion = TRUE;
if (GIMP_IS_GIMP (data))
result = data;
if (! result)
{
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
return shell ? shell->display->gimp : NULL;
GimpDisplay *display = action_data_get_display (data);
if (display)
result = display->gimp;
}
else if (GIMP_IS_GIMP (data))
return data;
else if (GIMP_IS_DOCK (data))
context = gimp_dock_get_context (((GimpDock *) data));
else if (GIMP_IS_DOCK_WINDOW (data))
context = gimp_dock_window_get_context (((GimpDockWindow *) data));
else if (GIMP_IS_CONTAINER_VIEW (data))
context = gimp_container_view_get_context ((GimpContainerView *) data);
else if (GIMP_IS_CONTAINER_EDITOR (data))
context = gimp_container_view_get_context (((GimpContainerEditor *) data)->view);
else if (GIMP_IS_IMAGE_EDITOR (data))
context = ((GimpImageEditor *) data)->context;
else if (GIMP_IS_NAVIGATION_EDITOR (data))
context = ((GimpNavigationEditor *) data)->context;
if (context)
return context->gimp;
if (! result)
{
GimpContext *context = action_data_get_context (data);
return NULL;
if (context)
result = context->gimp;
}
recursion = FALSE;
return result;
}
GimpContext *
action_data_get_context (gpointer data)
{
if (! data)
GimpContext *result = NULL;
static gboolean recursion = FALSE;
if (! data || recursion)
return NULL;
if (GIMP_IS_DISPLAY (data))
return gimp_get_user_context (((GimpDisplay *) data)->gimp);
else if (GIMP_IS_IMAGE_WINDOW (data))
{
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
return shell ? gimp_get_user_context (shell->display->gimp) : NULL;
}
else if (GIMP_IS_GIMP (data))
return gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
return gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_DOCK_WINDOW (data))
return gimp_dock_window_get_context (((GimpDockWindow *) data));
else if (GIMP_IS_CONTAINER_VIEW (data))
return gimp_container_view_get_context ((GimpContainerView *) data);
else if (GIMP_IS_CONTAINER_EDITOR (data))
return gimp_container_view_get_context (((GimpContainerEditor *) data)->view);
else if (GIMP_IS_IMAGE_EDITOR (data))
return ((GimpImageEditor *) data)->context;
else if (GIMP_IS_NAVIGATION_EDITOR (data))
return ((GimpNavigationEditor *) data)->context;
recursion = TRUE;
return NULL;
if (GIMP_IS_DOCK (data))
result = gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_DOCK_WINDOW (data))
result = gimp_dock_window_get_context (((GimpDockWindow *) data));
else if (GIMP_IS_CONTAINER_VIEW (data))
result = gimp_container_view_get_context ((GimpContainerView *) data);
else if (GIMP_IS_CONTAINER_EDITOR (data))
result = gimp_container_view_get_context (((GimpContainerEditor *) data)->view);
else if (GIMP_IS_IMAGE_EDITOR (data))
result = ((GimpImageEditor *) data)->context;
else if (GIMP_IS_NAVIGATION_EDITOR (data))
result = ((GimpNavigationEditor *) data)->context;
if (! result)
{
Gimp *gimp = action_data_get_gimp (data);
if (gimp)
result = gimp_get_user_context (gimp);
}
recursion = FALSE;
return result;
}
GimpImage *
action_data_get_image (gpointer data)
{
GimpContext *context = NULL;
GimpDisplay *display = NULL;
GimpImage *result = NULL;
static gboolean recursion = FALSE;
if (! data)
if (! data || recursion)
return NULL;
if (GIMP_IS_DISPLAY (data))
display = (GimpDisplay *) data;
else if (GIMP_IS_IMAGE_WINDOW (data))
{
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
display = shell ? shell->display : NULL;
}
else if (GIMP_IS_GIMP (data))
context = gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
context = gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_DOCK_WINDOW (data))
context = gimp_dock_window_get_context (((GimpDockWindow *) data));
else if (GIMP_IS_ITEM_TREE_VIEW (data))
return gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
recursion = TRUE;
if (GIMP_IS_ITEM_TREE_VIEW (data))
result = gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
else if (GIMP_IS_IMAGE_EDITOR (data))
return ((GimpImageEditor *) data)->image;
else if (GIMP_IS_NAVIGATION_EDITOR (data))
context = ((GimpNavigationEditor *) data)->context;
result = ((GimpImageEditor *) data)->image;
if (context)
return gimp_context_get_image (context);
else if (display)
return gimp_display_get_image (display);
if (! result)
{
GimpDisplay *display = action_data_get_display (data);
return NULL;
if (display)
result = gimp_display_get_image (display);
}
if (! result)
{
GimpContext *context = action_data_get_context (data);
if (context)
result = gimp_context_get_image (context);
}
recursion = FALSE;
return result;
}
GimpDisplay *
action_data_get_display (gpointer data)
{
GimpContext *context = NULL;
GimpDisplay *result = NULL;
static gboolean recursion = FALSE;
if (! data)
if (! data || recursion)
return NULL;
recursion = TRUE;
if (GIMP_IS_DISPLAY (data))
return data;
result = data;
else if (GIMP_IS_IMAGE_WINDOW (data))
{
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
return shell ? shell->display : NULL;
result = shell ? shell->display : NULL;
}
else if (GIMP_IS_GIMP (data))
context = gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
context = gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_DOCK_WINDOW (data))
context = gimp_dock_window_get_context (((GimpDockWindow *) data));
else if (GIMP_IS_IMAGE_EDITOR (data))
context = ((GimpImageEditor *) data)->context;
else if (GIMP_IS_NAVIGATION_EDITOR (data))
context = ((GimpNavigationEditor *) data)->context;
if (context)
return gimp_context_get_display (context);
if (! result)
{
GimpContext *context = action_data_get_context (data);
return NULL;
if (context)
result = gimp_context_get_display (context);
}
recursion = FALSE;
return result;
}
GimpDisplayShell *
action_data_get_shell (gpointer data)
{
GimpDisplay *display = NULL;
GimpDisplayShell *shell = NULL;
GimpDisplayShell *result = NULL;
static gboolean recursion = FALSE;
display = action_data_get_display (data);
if (! data || recursion)
return NULL;
if (display)
shell = gimp_display_get_shell (display);
recursion = TRUE;
return shell;
if (! result)
{
GimpDisplay *display = action_data_get_display (data);
if (display)
result = gimp_display_get_shell (display);
}
recursion = FALSE;
return result;
}
GtkWidget *
action_data_get_widget (gpointer data)
{
GimpDisplay *display = NULL;
GtkWidget *result = NULL;
static gboolean recursion = FALSE;
if (! data)
if (! data || recursion)
return NULL;
if (GIMP_IS_DISPLAY (data))
display = data;
else if (GIMP_IS_GIMP (data))
display = gimp_context_get_display (gimp_get_user_context (data));
else if (GTK_IS_WIDGET (data))
return data;
recursion = TRUE;
if (display)
return GTK_WIDGET (gimp_display_get_shell (display));
if (GTK_IS_WIDGET (data))
result = data;
return dialogs_get_toolbox ();
if (! result)
{
GimpDisplay *display = action_data_get_display (data);
if (display)
result = GTK_WIDGET (gimp_display_get_shell (display));
}
if (! result)
result = dialogs_get_toolbox ();
recursion = FALSE;
return result;
}
gint

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -48,7 +48,7 @@ static const GimpToggleActionEntry brush_editor_toggle_actions[] =
{
{ "brush-editor-edit-active", GIMP_ICON_LINKED,
NC_("brush-editor-action", "Edit Active Brush"), NULL, NULL,
G_CALLBACK (data_editor_edit_active_cmd_callback),
data_editor_edit_active_cmd_callback,
FALSE,
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
};

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BRUSH_EDITOR_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -46,43 +46,43 @@ static const GimpActionEntry brushes_actions[] =
{ "brushes-open-as-image", GIMP_ICON_DOCUMENT_OPEN,
NC_("brushes-action", "_Open Brush as Image"), NULL,
NC_("brushes-action", "Open brush as image"),
G_CALLBACK (data_open_as_image_cmd_callback),
data_open_as_image_cmd_callback,
GIMP_HELP_BRUSH_OPEN_AS_IMAGE },
{ "brushes-new", GIMP_ICON_DOCUMENT_NEW,
NC_("brushes-action", "_New Brush"), NULL,
NC_("brushes-action", "Create a new brush"),
G_CALLBACK (data_new_cmd_callback),
data_new_cmd_callback,
GIMP_HELP_BRUSH_NEW },
{ "brushes-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("brushes-action", "D_uplicate Brush"), NULL,
NC_("brushes-action", "Duplicate this brush"),
G_CALLBACK (data_duplicate_cmd_callback),
data_duplicate_cmd_callback,
GIMP_HELP_BRUSH_DUPLICATE },
{ "brushes-copy-location", GIMP_ICON_EDIT_COPY,
NC_("brushes-action", "Copy Brush _Location"), NULL,
NC_("brushes-action", "Copy brush file location to clipboard"),
G_CALLBACK (data_copy_location_cmd_callback),
data_copy_location_cmd_callback,
GIMP_HELP_BRUSH_COPY_LOCATION },
{ "brushes-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
NC_("brushes-action", "Show in _File Manager"), NULL,
NC_("brushes-action", "Show brush file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback),
data_show_in_file_manager_cmd_callback,
GIMP_HELP_BRUSH_SHOW_IN_FILE_MANAGER },
{ "brushes-delete", GIMP_ICON_EDIT_DELETE,
NC_("brushes-action", "_Delete Brush"), NULL,
NC_("brushes-action", "Delete this brush"),
G_CALLBACK (data_delete_cmd_callback),
data_delete_cmd_callback,
GIMP_HELP_BRUSH_DELETE },
{ "brushes-refresh", GIMP_ICON_VIEW_REFRESH,
NC_("brushes-action", "_Refresh Brushes"), NULL,
NC_("brushes-action", "Refresh brushes"),
G_CALLBACK (data_refresh_cmd_callback),
data_refresh_cmd_callback,
GIMP_HELP_BRUSH_REFRESH }
};
@@ -106,7 +106,7 @@ brushes_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group, "brushes-action",
brushes_edit_actions,
G_N_ELEMENTS (brushes_edit_actions),
G_CALLBACK (data_edit_cmd_callback));
data_edit_cmd_callback);
}
void

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BRUSHES_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -45,13 +45,13 @@ static const GimpActionEntry buffers_actions[] =
{ "buffers-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
NC_("buffers-action", "Paste Buffer as _New Image"), NULL,
NC_("buffers-action", "Paste the selected buffer as a new image"),
G_CALLBACK (buffers_paste_as_new_image_cmd_callback),
buffers_paste_as_new_image_cmd_callback,
GIMP_HELP_BUFFER_PASTE_AS_NEW_IMAGE },
{ "buffers-delete", GIMP_ICON_EDIT_DELETE,
NC_("buffers-action", "_Delete Buffer"), NULL,
NC_("buffers-action", "Delete the selected buffer"),
G_CALLBACK (buffers_delete_cmd_callback),
buffers_delete_cmd_callback,
GIMP_HELP_BUFFER_DELETE }
};
@@ -107,7 +107,7 @@ buffers_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "buffers-action",
buffers_paste_actions,
G_N_ELEMENTS (buffers_paste_actions),
G_CALLBACK (buffers_paste_cmd_callback));
buffers_paste_cmd_callback);
}
void

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BUFFERS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -46,15 +46,15 @@
/* public functions */
void
buffers_paste_cmd_callback (GtkAction *action,
gint value,
gpointer data)
buffers_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;
GimpContext *context;
GimpBuffer *buffer;
GimpPasteType paste_type = (GimpPasteType) value;
GimpPasteType paste_type = (GimpPasteType) g_variant_get_int32 (value);
container = gimp_container_view_get_container (editor->view);
context = gimp_container_view_get_context (editor->view);
@@ -74,8 +74,10 @@ buffers_paste_cmd_callback (GtkAction *action,
{
GimpDisplayShell *shell = gimp_display_get_shell (display);
gimp_display_shell_untransform_viewport (shell,
&x, &y, &width, &height);
gimp_display_shell_untransform_viewport (
shell,
! gimp_display_shell_get_infinite_canvas (shell),
&x, &y, &width, &height);
image = gimp_display_get_image (display);
}
@@ -96,8 +98,9 @@ buffers_paste_cmd_callback (GtkAction *action,
}
void
buffers_paste_as_new_image_cmd_callback (GtkAction *action,
gpointer data)
buffers_paste_as_new_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;
@@ -125,8 +128,9 @@ buffers_paste_as_new_image_cmd_callback (GtkAction *action,
}
void
buffers_delete_cmd_callback (GtkAction *action,
gpointer data)
buffers_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);

View File

@@ -12,20 +12,22 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __BUFFERS_COMMANDS_H__
#define __BUFFERS_COMMANDS_H__
void buffers_paste_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void buffers_paste_as_new_image_cmd_callback (GtkAction *action,
gpointer data);
void buffers_delete_cmd_callback (GtkAction *action,
gpointer data);
void buffers_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void buffers_paste_as_new_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void buffers_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __BUFFERS_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -52,58 +52,58 @@ static const GimpActionEntry channels_actions[] =
{ "channels-edit-attributes", GIMP_ICON_EDIT,
NC_("channels-action", "_Edit Channel Attributes..."), NULL,
NC_("channels-action", "Edit the channel's name, color and opacity"),
G_CALLBACK (channels_edit_attributes_cmd_callback),
channels_edit_attributes_cmd_callback,
GIMP_HELP_CHANNEL_EDIT },
{ "channels-new", GIMP_ICON_DOCUMENT_NEW,
NC_("channels-action", "_New Channel..."), NULL,
NC_("channels-action", "Create a new channel"),
G_CALLBACK (channels_new_cmd_callback),
channels_new_cmd_callback,
GIMP_HELP_CHANNEL_NEW },
{ "channels-new-last-values", GIMP_ICON_DOCUMENT_NEW,
NC_("channels-action", "_New Channel"), NULL,
NC_("channels-action", "Create a new channel with last used values"),
G_CALLBACK (channels_new_last_vals_cmd_callback),
channels_new_last_vals_cmd_callback,
GIMP_HELP_CHANNEL_NEW },
{ "channels-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("channels-action", "D_uplicate Channel"), NULL,
NC_("channels-action",
"Create a duplicate of this channel and add it to the image"),
G_CALLBACK (channels_duplicate_cmd_callback),
channels_duplicate_cmd_callback,
GIMP_HELP_CHANNEL_DUPLICATE },
{ "channels-delete", GIMP_ICON_EDIT_DELETE,
NC_("channels-action", "_Delete Channel"), NULL,
NC_("channels-action", "Delete this channel"),
G_CALLBACK (channels_delete_cmd_callback),
channels_delete_cmd_callback,
GIMP_HELP_CHANNEL_DELETE },
{ "channels-raise", GIMP_ICON_GO_UP,
NC_("channels-action", "_Raise Channel"), NULL,
NC_("channels-action", "Raise this channel one step in the channel stack"),
G_CALLBACK (channels_raise_cmd_callback),
channels_raise_cmd_callback,
GIMP_HELP_CHANNEL_RAISE },
{ "channels-raise-to-top", GIMP_ICON_GO_TOP,
NC_("channels-action", "Raise Channel to _Top"), NULL,
NC_("channels-action",
"Raise this channel to the top of the channel stack"),
G_CALLBACK (channels_raise_to_top_cmd_callback),
channels_raise_to_top_cmd_callback,
GIMP_HELP_CHANNEL_RAISE_TO_TOP },
{ "channels-lower", GIMP_ICON_GO_DOWN,
NC_("channels-action", "_Lower Channel"), NULL,
NC_("channels-action", "Lower this channel one step in the channel stack"),
G_CALLBACK (channels_lower_cmd_callback),
channels_lower_cmd_callback,
GIMP_HELP_CHANNEL_LOWER },
{ "channels-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
NC_("channels-action", "Lower Channel to _Bottom"), NULL,
NC_("channels-action",
"Lower this channel to the bottom of the channel stack"),
G_CALLBACK (channels_lower_to_bottom_cmd_callback),
channels_lower_to_bottom_cmd_callback,
GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM }
};
@@ -111,25 +111,25 @@ static const GimpToggleActionEntry channels_toggle_actions[] =
{
{ "channels-visible", GIMP_ICON_VISIBLE,
NC_("channels-action", "Toggle Channel _Visibility"), NULL, NULL,
G_CALLBACK (channels_visible_cmd_callback),
channels_visible_cmd_callback,
FALSE,
GIMP_HELP_CHANNEL_VISIBLE },
{ "channels-linked", GIMP_ICON_LINKED,
NC_("channels-action", "Toggle Channel _Linked State"), NULL, NULL,
G_CALLBACK (channels_linked_cmd_callback),
channels_linked_cmd_callback,
FALSE,
GIMP_HELP_CHANNEL_LINKED },
{ "channels-lock-content", NULL /* GIMP_ICON_LOCK */,
NC_("channels-action", "L_ock Pixels of Channel"), NULL, NULL,
G_CALLBACK (channels_lock_content_cmd_callback),
channels_lock_content_cmd_callback,
FALSE,
GIMP_HELP_CHANNEL_LOCK_PIXELS },
{ "channels-lock-position", GIMP_ICON_TOOL_MOVE,
NC_("channels-action", "L_ock Position of Channel"), NULL, NULL,
G_CALLBACK (channels_lock_position_cmd_callback),
channels_lock_position_cmd_callback,
FALSE,
GIMP_HELP_CHANNEL_LOCK_POSITION }
};
@@ -260,17 +260,17 @@ channels_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "channels-action",
channels_color_tag_actions,
G_N_ELEMENTS (channels_color_tag_actions),
G_CALLBACK (channels_color_tag_cmd_callback));
channels_color_tag_cmd_callback);
gimp_action_group_add_enum_actions (group, "channels-action",
channels_to_selection_actions,
G_N_ELEMENTS (channels_to_selection_actions),
G_CALLBACK (channels_to_selection_cmd_callback));
channels_to_selection_cmd_callback);
gimp_action_group_add_enum_actions (group, "channels-action",
channels_select_actions,
G_N_ELEMENTS (channels_select_actions),
G_CALLBACK (channels_select_cmd_callback));
channels_select_cmd_callback);
items_actions_setup (group, "channels");
}

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CHANNELS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -54,6 +54,9 @@
#include "gimp-intl.h"
#define RGBA_EPSILON 1e-6
/* local function prototypes */
static void channels_new_callback (GtkWidget *dialog,
@@ -87,8 +90,9 @@ static void channels_edit_attributes_callback (GtkWidget *dialog,
/* public functions */
void
channels_edit_attributes_cmd_callback (GtkAction *action,
gpointer data)
channels_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
@@ -133,8 +137,9 @@ channels_edit_attributes_cmd_callback (GtkAction *action,
}
void
channels_new_cmd_callback (GtkAction *action,
gpointer data)
channels_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
@@ -178,8 +183,9 @@ channels_new_cmd_callback (GtkAction *action,
}
void
channels_new_last_vals_cmd_callback (GtkAction *action,
gpointer data)
channels_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
@@ -204,8 +210,9 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
}
void
channels_raise_cmd_callback (GtkAction *action,
gpointer data)
channels_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
@@ -216,8 +223,9 @@ channels_raise_cmd_callback (GtkAction *action,
}
void
channels_raise_to_top_cmd_callback (GtkAction *action,
gpointer data)
channels_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
@@ -228,8 +236,9 @@ channels_raise_to_top_cmd_callback (GtkAction *action,
}
void
channels_lower_cmd_callback (GtkAction *action,
gpointer data)
channels_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
@@ -240,8 +249,9 @@ channels_lower_cmd_callback (GtkAction *action,
}
void
channels_lower_to_bottom_cmd_callback (GtkAction *action,
gpointer data)
channels_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
@@ -252,8 +262,9 @@ channels_lower_to_bottom_cmd_callback (GtkAction *action,
}
void
channels_duplicate_cmd_callback (GtkAction *action,
gpointer data)
channels_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *new_channel;
@@ -304,8 +315,9 @@ channels_duplicate_cmd_callback (GtkAction *action,
}
void
channels_delete_cmd_callback (GtkAction *action,
gpointer data)
channels_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
@@ -316,14 +328,14 @@ channels_delete_cmd_callback (GtkAction *action,
}
void
channels_to_selection_cmd_callback (GtkAction *action,
gint value,
gpointer data)
channels_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpChannelOps op;
GimpImage *image;
op = (GimpChannelOps) value;
op = (GimpChannelOps) g_variant_get_int32 (value);
if (GIMP_IS_COMPONENT_EDITOR (data))
{
@@ -348,76 +360,85 @@ channels_to_selection_cmd_callback (GtkAction *action,
}
void
channels_visible_cmd_callback (GtkAction *action,
gpointer data)
channels_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_visible_cmd_callback (action, image, GIMP_ITEM (channel));
items_visible_cmd_callback (action, value, image, GIMP_ITEM (channel));
}
void
channels_linked_cmd_callback (GtkAction *action,
gpointer data)
channels_linked_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_linked_cmd_callback (action, image, GIMP_ITEM (channel));
items_linked_cmd_callback (action, value, image, GIMP_ITEM (channel));
}
void
channels_lock_content_cmd_callback (GtkAction *action,
gpointer data)
channels_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_lock_content_cmd_callback (action, image, GIMP_ITEM (channel));
items_lock_content_cmd_callback (action, value, image, GIMP_ITEM (channel));
}
void
channels_lock_position_cmd_callback (GtkAction *action,
gpointer data)
channels_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_lock_position_cmd_callback (action, image, GIMP_ITEM (channel));
items_lock_position_cmd_callback (action, value, image, GIMP_ITEM (channel));
}
void
channels_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data)
channels_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
GimpImage *image;
GimpChannel *channel;
GimpColorTag color_tag;
return_if_no_channel (image, channel, data);
color_tag = (GimpColorTag) g_variant_get_int32 (value);
items_color_tag_cmd_callback (action, image, GIMP_ITEM (channel),
(GimpColorTag) value);
color_tag);
}
void
channels_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
channels_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
GimpChannel *channel2;
GimpContainer *container;
GimpImage *image;
GimpChannel *channel;
GimpChannel *channel2;
GimpContainer *container;
GimpActionSelectType select_type;
return_if_no_channel (image, channel, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
container = gimp_image_get_channels (image);
channel2 = (GimpChannel *) action_select_object ((GimpActionSelectType) value,
container,
channel2 = (GimpChannel *) action_select_object (select_type, container,
(GimpObject *) channel);
if (channel2 && channel2 != channel)
@@ -504,12 +525,12 @@ channels_edit_attributes_callback (GtkWidget *dialog,
{
GimpItem *item = GIMP_ITEM (channel);
if (strcmp (channel_name, gimp_object_get_name (channel)) ||
gimp_rgba_distance (channel_color, &channel->color) > 0.0001 ||
channel_visible != gimp_item_get_visible (item) ||
channel_linked != gimp_item_get_linked (item) ||
channel_color_tag != gimp_item_get_color_tag (item) ||
channel_lock_content != gimp_item_get_lock_content (item) ||
if (strcmp (channel_name, gimp_object_get_name (channel)) ||
gimp_rgba_distance (channel_color, &channel->color) > RGBA_EPSILON ||
channel_visible != gimp_item_get_visible (item) ||
channel_linked != gimp_item_get_linked (item) ||
channel_color_tag != gimp_item_get_color_tag (item) ||
channel_lock_content != gimp_item_get_lock_content (item) ||
channel_lock_position != gimp_item_get_lock_position (item))
{
gimp_image_undo_group_start (image,
@@ -519,7 +540,7 @@ channels_edit_attributes_callback (GtkWidget *dialog,
if (strcmp (channel_name, gimp_object_get_name (channel)))
gimp_item_rename (GIMP_ITEM (channel), channel_name, NULL);
if (gimp_rgba_distance (channel_color, &channel->color) > 0.0001)
if (gimp_rgba_distance (channel_color, &channel->color) > RGBA_EPSILON)
gimp_channel_set_color (channel, channel_color, TRUE);
if (channel_visible != gimp_item_get_visible (item))

View File

@@ -12,53 +12,66 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CHANNELS_COMMANDS_H__
#define __CHANNELS_COMMANDS_H__
void channels_edit_attributes_cmd_callback (GtkAction *action,
gpointer data);
void channels_new_cmd_callback (GtkAction *action,
gpointer data);
void channels_new_last_vals_cmd_callback (GtkAction *action,
gpointer data);
void channels_edit_attributes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_new_last_vals_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_raise_cmd_callback (GtkAction *action,
gpointer data);
void channels_raise_to_top_cmd_callback (GtkAction *action,
gpointer data);
void channels_lower_cmd_callback (GtkAction *action,
gpointer data);
void channels_lower_to_bottom_cmd_callback (GtkAction *action,
gpointer data);
void channels_raise_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_raise_to_top_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_lower_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_lower_to_bottom_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_duplicate_cmd_callback (GtkAction *action,
gpointer data);
void channels_delete_cmd_callback (GtkAction *action,
gpointer data);
void channels_to_selection_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void channels_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_visible_cmd_callback (GtkAction *action,
gpointer data);
void channels_linked_cmd_callback (GtkAction *action,
gpointer data);
void channels_lock_content_cmd_callback (GtkAction *action,
gpointer data);
void channels_lock_position_cmd_callback (GtkAction *action,
gpointer data);
void channels_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_linked_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void channels_color_tag_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void channels_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void channels_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __CHANNELS_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -48,7 +48,7 @@ static const GimpActionEntry colormap_actions[] =
{ "colormap-edit-color", GIMP_ICON_EDIT,
NC_("colormap-action", "_Edit Color..."), NULL,
NC_("colormap-action", "Edit this color"),
G_CALLBACK (colormap_edit_color_cmd_callback),
colormap_edit_color_cmd_callback,
GIMP_HELP_INDEXED_PALETTE_EDIT }
};
@@ -104,12 +104,12 @@ colormap_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "colormap-action",
colormap_add_color_actions,
G_N_ELEMENTS (colormap_add_color_actions),
G_CALLBACK (colormap_add_color_cmd_callback));
colormap_add_color_cmd_callback);
gimp_action_group_add_enum_actions (group, "colormap-action",
colormap_to_selection_actions,
G_N_ELEMENTS (colormap_to_selection_actions),
G_CALLBACK (colormap_to_selection_cmd_callback));
colormap_to_selection_cmd_callback);
}
void

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __COLORMAP_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -20,9 +20,6 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimpchannel-select.h"
@@ -30,101 +27,42 @@
#include "core/gimpimage.h"
#include "core/gimpimage-colormap.h"
#include "widgets/gimpcolordialog.h"
#include "widgets/gimpcolormapeditor.h"
#include "widgets/gimpdialogfactory.h"
#include "actions.h"
#include "colormap-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void colormap_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor);
/* public functions */
void
colormap_edit_color_cmd_callback (GtkAction *action,
gpointer data)
colormap_edit_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpColormapEditor *editor;
GimpImage *image;
const guchar *colormap;
GimpRGB color;
gchar *desc;
return_if_no_image (image, data);
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
editor = GIMP_COLORMAP_EDITOR (data);
colormap = gimp_image_get_colormap (image);
gimp_rgba_set_uchar (&color,
colormap[editor->col_index * 3],
colormap[editor->col_index * 3 + 1],
colormap[editor->col_index * 3 + 2],
255);
desc = g_strdup_printf (_("Edit colormap entry #%d"), editor->col_index);
if (! editor->color_dialog)
{
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (image),
action_data_get_context (data),
_("Edit Colormap Entry"),
GIMP_ICON_COLORMAP,
desc,
GTK_WIDGET (editor),
gimp_dialog_factory_get_singleton (),
"gimp-colormap-editor-color-dialog",
(const GimpRGB *) &color,
FALSE, FALSE);
g_signal_connect (editor->color_dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&editor->color_dialog);
g_signal_connect (editor->color_dialog, "update",
G_CALLBACK (colormap_edit_color_update),
editor);
}
else
{
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (editor->color_dialog),
GIMP_VIEWABLE (image),
action_data_get_context (data));
g_object_set (editor->color_dialog, "description", desc, NULL);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (editor->color_dialog),
&color);
}
g_free (desc);
gtk_window_present (GTK_WINDOW (editor->color_dialog));
gimp_colormap_editor_edit_color (editor);
}
void
colormap_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data)
colormap_add_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpImage *image;
gboolean background;
return_if_no_context (context, data);
return_if_no_image (image, data);
background = (gboolean) g_variant_get_int32 (value);
if (gimp_image_get_colormap_size (image) < 256)
{
GimpRGB color;
if (value)
if (background)
gimp_context_get_background (context, &color);
else
gimp_context_get_foreground (context, &color);
@@ -135,9 +73,9 @@ colormap_add_color_cmd_callback (GtkAction *action,
}
void
colormap_to_selection_cmd_callback (GtkAction *action,
gint value,
gpointer data)
colormap_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpColormapEditor *editor;
GimpImage *image;
@@ -146,38 +84,13 @@ colormap_to_selection_cmd_callback (GtkAction *action,
editor = GIMP_COLORMAP_EDITOR (data);
op = (GimpChannelOps) value;
op = (GimpChannelOps) g_variant_get_int32 (value);
gimp_channel_select_by_index (gimp_image_get_mask (image),
gimp_image_get_active_drawable (image),
editor->col_index,
op,
FALSE, 0.0, 0.0);
}
/* private functions */
static void
colormap_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor)
{
GimpImage *image = GIMP_IMAGE_EDITOR (editor)->image;
switch (state)
{
case GIMP_COLOR_DIALOG_UPDATE:
break;
case GIMP_COLOR_DIALOG_OK:
gimp_image_set_colormap_entry (image, editor->col_index, color, TRUE);
gimp_image_flush (image);
/* Fall through */
case GIMP_COLOR_DIALOG_CANCEL:
gtk_widget_hide (editor->color_dialog);
break;
}
gimp_image_flush (image);
}

View File

@@ -12,21 +12,22 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __COLORMAP_COMMANDS_H__
#define __COLORMAP_COMMANDS_H__
void colormap_edit_color_cmd_callback (GtkAction *action,
gpointer data);
void colormap_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void colormap_to_selection_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void colormap_edit_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void colormap_add_color_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void colormap_to_selection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __COLORMAP_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -81,13 +81,13 @@ static const GimpActionEntry context_actions[] =
NC_("context-action", "_Default Colors"), "D",
NC_("context-action",
"Set foreground color to black, background color to white"),
G_CALLBACK (context_colors_default_cmd_callback),
context_colors_default_cmd_callback,
GIMP_HELP_TOOLBOX_DEFAULT_COLORS },
{ "context-colors-swap", GIMP_ICON_COLORS_SWAP,
NC_("context-action", "S_wap Colors"), "X",
NC_("context-action", "Exchange foreground and background colors"),
G_CALLBACK (context_colors_swap_cmd_callback),
context_colors_swap_cmd_callback,
GIMP_HELP_TOOLBOX_SWAP_COLORS }
};
@@ -1095,148 +1095,148 @@ context_actions_setup (GimpActionGroup *group)
context_actions,
G_N_ELEMENTS (context_actions));
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_palette_foreground_actions,
G_N_ELEMENTS (context_palette_foreground_actions),
G_CALLBACK (context_palette_foreground_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_palette_foreground_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_palette_background_actions,
G_N_ELEMENTS (context_palette_background_actions),
G_CALLBACK (context_palette_background_cmd_callback));
context_palette_background_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_colormap_foreground_actions,
G_N_ELEMENTS (context_colormap_foreground_actions),
G_CALLBACK (context_colormap_foreground_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_colormap_foreground_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_colormap_background_actions,
G_N_ELEMENTS (context_colormap_background_actions),
G_CALLBACK (context_colormap_background_cmd_callback));
context_colormap_background_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_swatch_foreground_actions,
G_N_ELEMENTS (context_swatch_foreground_actions),
G_CALLBACK (context_swatch_foreground_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_swatch_foreground_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_swatch_background_actions,
G_N_ELEMENTS (context_swatch_background_actions),
G_CALLBACK (context_swatch_background_cmd_callback));
context_swatch_background_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_foreground_red_actions,
G_N_ELEMENTS (context_foreground_red_actions),
G_CALLBACK (context_foreground_red_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_foreground_red_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_foreground_green_actions,
G_N_ELEMENTS (context_foreground_green_actions),
G_CALLBACK (context_foreground_green_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_foreground_green_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_foreground_blue_actions,
G_N_ELEMENTS (context_foreground_blue_actions),
G_CALLBACK (context_foreground_blue_cmd_callback));
context_foreground_blue_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_foreground_hue_actions,
G_N_ELEMENTS (context_foreground_hue_actions),
G_CALLBACK (context_foreground_hue_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_foreground_hue_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_foreground_saturation_actions,
G_N_ELEMENTS (context_foreground_saturation_actions),
G_CALLBACK (context_foreground_saturation_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_foreground_saturation_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_foreground_value_actions,
G_N_ELEMENTS (context_foreground_value_actions),
G_CALLBACK (context_foreground_value_cmd_callback));
context_foreground_value_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_background_red_actions,
G_N_ELEMENTS (context_background_red_actions),
G_CALLBACK (context_background_red_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_background_red_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_background_green_actions,
G_N_ELEMENTS (context_background_green_actions),
G_CALLBACK (context_background_green_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_background_green_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_background_blue_actions,
G_N_ELEMENTS (context_background_blue_actions),
G_CALLBACK (context_background_blue_cmd_callback));
context_background_blue_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_background_hue_actions,
G_N_ELEMENTS (context_background_hue_actions),
G_CALLBACK (context_background_hue_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_background_hue_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_background_saturation_actions,
G_N_ELEMENTS (context_background_saturation_actions),
G_CALLBACK (context_background_saturation_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_background_saturation_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_background_value_actions,
G_N_ELEMENTS (context_background_value_actions),
G_CALLBACK (context_background_value_cmd_callback));
context_background_value_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_opacity_actions,
G_N_ELEMENTS (context_opacity_actions),
G_CALLBACK (context_opacity_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_opacity_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_paint_mode_actions,
G_N_ELEMENTS (context_paint_mode_actions),
G_CALLBACK (context_paint_mode_cmd_callback));
context_paint_mode_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_tool_select_actions,
G_N_ELEMENTS (context_tool_select_actions),
G_CALLBACK (context_tool_select_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_tool_select_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_brush_select_actions,
G_N_ELEMENTS (context_brush_select_actions),
G_CALLBACK (context_brush_select_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_brush_select_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_pattern_select_actions,
G_N_ELEMENTS (context_pattern_select_actions),
G_CALLBACK (context_pattern_select_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_pattern_select_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_palette_select_actions,
G_N_ELEMENTS (context_palette_select_actions),
G_CALLBACK (context_palette_select_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_palette_select_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_gradient_select_actions,
G_N_ELEMENTS (context_gradient_select_actions),
G_CALLBACK (context_gradient_select_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_gradient_select_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_font_select_actions,
G_N_ELEMENTS (context_font_select_actions),
G_CALLBACK (context_font_select_cmd_callback));
context_font_select_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
gimp_action_group_add_enum_actions (group, "context-action",
context_brush_spacing_actions,
G_N_ELEMENTS (context_brush_spacing_actions),
G_CALLBACK (context_brush_spacing_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_brush_spacing_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_brush_shape_actions,
G_N_ELEMENTS (context_brush_shape_actions),
G_CALLBACK (context_brush_shape_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_brush_shape_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_brush_radius_actions,
G_N_ELEMENTS (context_brush_radius_actions),
G_CALLBACK (context_brush_radius_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_brush_radius_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_brush_spikes_actions,
G_N_ELEMENTS (context_brush_spikes_actions),
G_CALLBACK (context_brush_spikes_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_brush_spikes_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_brush_hardness_actions,
G_N_ELEMENTS (context_brush_hardness_actions),
G_CALLBACK (context_brush_hardness_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_brush_hardness_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_brush_aspect_actions,
G_N_ELEMENTS (context_brush_aspect_actions),
G_CALLBACK (context_brush_aspect_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
context_brush_aspect_cmd_callback);
gimp_action_group_add_enum_actions (group, "context-action",
context_brush_angle_actions,
G_N_ELEMENTS (context_brush_angle_actions),
G_CALLBACK (context_brush_angle_cmd_callback));
context_brush_angle_cmd_callback);
}
void

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CONTEXT_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -81,8 +81,9 @@ static GimpColormapEditor * context_get_colormap_editor (void);
/* public functions */
void
context_colors_default_cmd_callback (GtkAction *action,
gpointer data)
context_colors_default_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
return_if_no_context (context, data);
@@ -91,8 +92,9 @@ context_colors_default_cmd_callback (GtkAction *action,
}
void
context_colors_swap_cmd_callback (GtkAction *action,
gpointer data)
context_colors_swap_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
return_if_no_context (context, data);
@@ -102,16 +104,19 @@ context_colors_swap_cmd_callback (GtkAction *action,
#define SELECT_COLOR_CMD_CALLBACK(name, fgbg, use_colormap, use_palette) \
void \
context_##name##_##fgbg##ground_cmd_callback (GtkAction *action, \
gint value, \
gpointer data) \
context_##name##_##fgbg##ground_cmd_callback (GimpAction *action, \
GVariant *value, \
gpointer data) \
{ \
GimpContext *context; \
GimpRGB color; \
GimpContext *context; \
GimpRGB color; \
GimpActionSelectType select_type; \
return_if_no_context (context, data); \
\
\
select_type = (GimpActionSelectType) g_variant_get_int32 (value); \
\
gimp_context_get_##fgbg##ground (context, &color); \
context_select_color ((GimpActionSelectType) value, &color, \
context_select_color (select_type, &color, \
use_colormap, use_palette); \
gimp_context_set_##fgbg##ground (context, &color); \
}
@@ -124,16 +129,19 @@ SELECT_COLOR_CMD_CALLBACK (swatch, fore, TRUE, TRUE)
SELECT_COLOR_CMD_CALLBACK (swatch, back, TRUE, TRUE)
void
context_foreground_red_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_foreground_red_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpContext *context;
GimpRGB color;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
color.r = action_select_value ((GimpActionSelectType) value,
color.r = action_select_value (select_type,
color.r,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
@@ -141,16 +149,19 @@ context_foreground_red_cmd_callback (GtkAction *action,
}
void
context_foreground_green_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_foreground_green_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpContext *context;
GimpRGB color;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
color.g = action_select_value ((GimpActionSelectType) value,
color.g = action_select_value (select_type,
color.g,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
@@ -158,16 +169,19 @@ context_foreground_green_cmd_callback (GtkAction *action,
}
void
context_foreground_blue_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_foreground_blue_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpContext *context;
GimpRGB color;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
color.b = action_select_value ((GimpActionSelectType) value,
color.b = action_select_value (select_type,
color.b,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
@@ -175,16 +189,19 @@ context_foreground_blue_cmd_callback (GtkAction *action,
}
void
context_background_red_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_background_red_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpContext *context;
GimpRGB color;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
color.r = action_select_value ((GimpActionSelectType) value,
color.r = action_select_value (select_type,
color.r,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
@@ -192,16 +209,19 @@ context_background_red_cmd_callback (GtkAction *action,
}
void
context_background_green_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_background_green_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpContext *context;
GimpRGB color;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
color.g = action_select_value ((GimpActionSelectType) value,
color.g = action_select_value (select_type,
color.g,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
@@ -209,16 +229,19 @@ context_background_green_cmd_callback (GtkAction *action,
}
void
context_background_blue_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_background_blue_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpContext *context;
GimpRGB color;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
color.b = action_select_value ((GimpActionSelectType) value,
color.b = action_select_value (select_type,
color.b,
0.0, 1.0, 1.0,
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
@@ -226,18 +249,21 @@ context_background_blue_cmd_callback (GtkAction *action,
}
void
context_foreground_hue_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_foreground_hue_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.h = action_select_value ((GimpActionSelectType) value,
hsv.h = action_select_value (select_type,
hsv.h,
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
@@ -246,18 +272,21 @@ context_foreground_hue_cmd_callback (GtkAction *action,
}
void
context_foreground_saturation_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_foreground_saturation_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.s = action_select_value ((GimpActionSelectType) value,
hsv.s = action_select_value (select_type,
hsv.s,
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
@@ -266,18 +295,21 @@ context_foreground_saturation_cmd_callback (GtkAction *action,
}
void
context_foreground_value_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_foreground_value_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_foreground (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.v = action_select_value ((GimpActionSelectType) value,
hsv.v = action_select_value (select_type,
hsv.v,
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
@@ -286,18 +318,21 @@ context_foreground_value_cmd_callback (GtkAction *action,
}
void
context_background_hue_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_background_hue_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.h = action_select_value ((GimpActionSelectType) value,
hsv.h = action_select_value (select_type,
hsv.h,
0.0, 1.0, 1.0,
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
@@ -306,18 +341,21 @@ context_background_hue_cmd_callback (GtkAction *action,
}
void
context_background_saturation_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_background_saturation_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.s = action_select_value ((GimpActionSelectType) value,
hsv.s = action_select_value (select_type,
hsv.s,
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
@@ -326,18 +364,21 @@ context_background_saturation_cmd_callback (GtkAction *action,
}
void
context_background_value_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_background_value_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpContext *context;
GimpRGB color;
GimpHSV hsv;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
gimp_context_get_background (context, &color);
gimp_rgb_to_hsv (&color, &hsv);
hsv.v = action_select_value ((GimpActionSelectType) value,
hsv.v = action_select_value (select_type,
hsv.v,
0.0, 1.0, 1.0,
0.01, 0.01, 0.1, 0.0, FALSE);
@@ -346,19 +387,22 @@ context_background_value_cmd_callback (GtkAction *action,
}
void
context_opacity_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_opacity_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpToolInfo *tool_info;
GimpContext *context;
GimpToolInfo *tool_info;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
tool_info = gimp_context_get_tool (context);
if (tool_info && GIMP_IS_TOOL_OPTIONS (tool_info->tool_options))
{
action_select_property ((GimpActionSelectType) value,
action_select_property (select_type,
action_data_get_display (data),
G_OBJECT (tool_info->tool_options),
"opacity",
@@ -367,25 +411,28 @@ context_opacity_cmd_callback (GtkAction *action,
}
void
context_paint_mode_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_paint_mode_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpToolInfo *tool_info;
GimpLayerMode *modes;
gint n_modes;
GimpLayerMode paint_mode;
gint index;
GimpContext *context;
GimpToolInfo *tool_info;
GimpLayerMode *modes;
gint n_modes;
GimpLayerMode paint_mode;
gint index;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
paint_mode = gimp_context_get_paint_mode (context);
modes = gimp_layer_mode_get_context_array (paint_mode,
GIMP_LAYER_MODE_CONTEXT_PAINT,
&n_modes);
index = context_paint_mode_index (paint_mode, modes, n_modes);
index = action_select_value ((GimpActionSelectType) value,
index = action_select_value (select_type,
index, 0, n_modes - 1, 0,
0.0, 1.0, 1.0, 0.0, FALSE);
paint_mode = modes[index];
@@ -414,91 +461,117 @@ context_paint_mode_cmd_callback (GtkAction *action,
}
void
context_tool_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_tool_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpContext *context;
GimpActionSelectType select_type;
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
context_select_object (select_type,
context, context->gimp->tool_info_list);
}
void
context_brush_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_brush_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpContext *context;
GimpActionSelectType select_type;
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
context, gimp_data_factory_get_container (context->gimp->brush_factory));
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
context_select_object (select_type,
context,
gimp_data_factory_get_container (context->gimp->brush_factory));
}
void
context_pattern_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_pattern_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpContext *context;
GimpActionSelectType select_type;
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
context, gimp_data_factory_get_container (context->gimp->pattern_factory));
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
context_select_object (select_type,
context,
gimp_data_factory_get_container (context->gimp->pattern_factory));
}
void
context_palette_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_palette_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpContext *context;
GimpActionSelectType select_type;
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
context, gimp_data_factory_get_container (context->gimp->palette_factory));
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
context_select_object (select_type,
context,
gimp_data_factory_get_container (context->gimp->palette_factory));
}
void
context_gradient_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_gradient_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpContext *context;
GimpActionSelectType select_type;
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
context, gimp_data_factory_get_container (context->gimp->gradient_factory));
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
context_select_object (select_type,
context,
gimp_data_factory_get_container (context->gimp->gradient_factory));
}
void
context_font_select_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_font_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpContext *context;
GimpActionSelectType select_type;
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
context, context->gimp->fonts);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
context_select_object (select_type,
context,
gimp_data_factory_get_container (context->gimp->font_factory));
}
void
context_brush_spacing_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_brush_spacing_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpBrush *brush;
GimpContext *context;
GimpBrush *brush;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
brush = gimp_context_get_brush (context);
if (GIMP_IS_BRUSH (brush) && gimp_data_is_writable (GIMP_DATA (brush)))
{
action_select_property ((GimpActionSelectType) value,
action_select_property (select_type,
action_data_get_display (data),
G_OBJECT (brush),
"spacing",
@@ -507,14 +580,17 @@ context_brush_spacing_cmd_callback (GtkAction *action,
}
void
context_brush_shape_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_brush_shape_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpBrush *brush;
GimpContext *context;
GimpBrush *brush;
GimpBrushGeneratedShape shape;
return_if_no_context (context, data);
shape = (GimpBrushGeneratedShape) g_variant_get_int32 (value);
brush = gimp_context_get_brush (context);
if (GIMP_IS_BRUSH_GENERATED (brush) &&
@@ -524,10 +600,9 @@ context_brush_shape_cmd_callback (GtkAction *action,
GimpDisplay *display;
const char *value_desc;
gimp_brush_generated_set_shape (generated,
(GimpBrushGeneratedShape) value);
gimp_brush_generated_set_shape (generated, shape);
gimp_enum_get_value (GIMP_TYPE_BRUSH_GENERATED_SHAPE, value,
gimp_enum_get_value (GIMP_TYPE_BRUSH_GENERATED_SHAPE, shape,
NULL, NULL, &value_desc, NULL);
display = action_data_get_display (data);
@@ -540,14 +615,17 @@ context_brush_shape_cmd_callback (GtkAction *action,
}
void
context_brush_radius_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_brush_radius_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpBrush *brush;
GimpContext *context;
GimpBrush *brush;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
brush = gimp_context_get_brush (context);
if (GIMP_IS_BRUSH_GENERATED (brush) &&
@@ -566,7 +644,7 @@ context_brush_radius_cmd_callback (GtkAction *action,
* is less than 1.0 px. This prevents irritating 0.1, 1.1, 2.1 etc
* radius sequences when 1.0 px steps are used.
*/
switch ((GimpActionSelectType) value)
switch (select_type)
{
case GIMP_ACTION_SELECT_SMALL_PREVIOUS:
case GIMP_ACTION_SELECT_SMALL_NEXT:
@@ -583,7 +661,7 @@ context_brush_radius_cmd_callback (GtkAction *action,
break;
}
radius = action_select_value ((GimpActionSelectType) value,
radius = action_select_value (select_type,
radius,
min_radius, 4000.0, min_radius,
0.1, 1.0, 10.0, 0.05, FALSE);
@@ -600,20 +678,23 @@ context_brush_radius_cmd_callback (GtkAction *action,
}
void
context_brush_spikes_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_brush_spikes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpBrush *brush;
GimpContext *context;
GimpBrush *brush;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
brush = gimp_context_get_brush (context);
if (GIMP_IS_BRUSH_GENERATED (brush) &&
gimp_data_is_writable (GIMP_DATA (brush)))
{
action_select_property ((GimpActionSelectType) value,
action_select_property (select_type,
action_data_get_display (data),
G_OBJECT (brush),
"spikes",
@@ -622,20 +703,23 @@ context_brush_spikes_cmd_callback (GtkAction *action,
}
void
context_brush_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_brush_hardness_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpBrush *brush;
GimpContext *context;
GimpBrush *brush;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
brush = gimp_context_get_brush (context);
if (GIMP_IS_BRUSH_GENERATED (brush) &&
gimp_data_is_writable (GIMP_DATA (brush)))
{
action_select_property ((GimpActionSelectType) value,
action_select_property (select_type,
action_data_get_display (data),
G_OBJECT (brush),
"hardness",
@@ -644,20 +728,23 @@ context_brush_hardness_cmd_callback (GtkAction *action,
}
void
context_brush_aspect_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_brush_aspect_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpBrush *brush;
GimpContext *context;
GimpBrush *brush;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
brush = gimp_context_get_brush (context);
if (GIMP_IS_BRUSH_GENERATED (brush) &&
gimp_data_is_writable (GIMP_DATA (brush)))
{
action_select_property ((GimpActionSelectType) value,
action_select_property (select_type,
action_data_get_display (data),
G_OBJECT (brush),
"aspect-ratio",
@@ -666,14 +753,17 @@ context_brush_aspect_cmd_callback (GtkAction *action,
}
void
context_brush_angle_cmd_callback (GtkAction *action,
gint value,
gpointer data)
context_brush_angle_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContext *context;
GimpBrush *brush;
GimpContext *context;
GimpBrush *brush;
GimpActionSelectType select_type;
return_if_no_context (context, data);
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
brush = gimp_context_get_brush (context);
if (GIMP_IS_BRUSH_GENERATED (brush) &&
@@ -685,12 +775,12 @@ context_brush_angle_cmd_callback (GtkAction *action,
angle = gimp_brush_generated_get_angle (generated);
if (value == GIMP_ACTION_SELECT_FIRST)
if (select_type == GIMP_ACTION_SELECT_FIRST)
angle = 0.0;
else if (value == GIMP_ACTION_SELECT_LAST)
else if (select_type == GIMP_ACTION_SELECT_LAST)
angle = 90.0;
else
angle = action_select_value ((GimpActionSelectType) value,
angle = action_select_value (select_type,
angle,
0.0, 180.0, 0.0,
0.1, 1.0, 15.0, 0.1, TRUE);
@@ -717,14 +807,16 @@ context_select_object (GimpActionSelectType select_type,
{
GimpObject *current;
current = gimp_context_get_by_type (context,
gimp_container_get_children_type (container));
current =
gimp_context_get_by_type (context,
gimp_container_get_children_type (container));
current = action_select_object (select_type, container, current);
if (current)
gimp_context_set_by_type (context,
gimp_container_get_children_type (container), current);
gimp_container_get_children_type (container),
current);
}
static gint

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CONTEXT_COMMANDS_H__
@@ -20,119 +20,121 @@
void context_colors_default_cmd_callback (GtkAction *action,
gpointer data);
void context_colors_swap_cmd_callback (GtkAction *action,
gpointer data);
void context_colors_default_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_colors_swap_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_palette_foreground_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_palette_background_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_palette_foreground_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_palette_background_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_colormap_foreground_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_colormap_background_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_colormap_foreground_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_colormap_background_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_swatch_foreground_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_swatch_background_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_swatch_foreground_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_swatch_background_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_foreground_red_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_foreground_green_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_foreground_blue_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_foreground_red_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_foreground_green_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_foreground_blue_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_background_red_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_background_green_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_background_blue_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_background_red_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_background_green_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_background_blue_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_foreground_hue_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_foreground_saturation_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_foreground_value_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_foreground_hue_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_foreground_saturation_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_foreground_value_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_background_hue_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_background_saturation_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_background_value_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_background_hue_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_background_saturation_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_background_value_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_opacity_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_paint_mode_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_opacity_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_paint_mode_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_tool_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_pattern_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_palette_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_gradient_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_font_select_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_tool_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_brush_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_pattern_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_palette_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_gradient_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_font_select_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_brush_spacing_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_shape_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_radius_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_spikes_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_hardness_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_aspect_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_angle_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void context_brush_spacing_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_brush_shape_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_brush_radius_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_brush_spikes_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_brush_hardness_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_brush_aspect_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void context_brush_angle_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __CONTEXT_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -47,7 +47,7 @@ static const GimpToggleActionEntry cursor_info_toggle_actions[] =
{ "cursor-info-sample-merged", NULL,
NC_("cursor-info-action", "_Sample Merged"), "",
NC_("cursor-info-action", "Use the composite color of all visible layers"),
G_CALLBACK (cursor_info_sample_merged_cmd_callback),
cursor_info_sample_merged_cmd_callback,
TRUE,
GIMP_HELP_POINTER_INFO_SAMPLE_MERGED }
};

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CURSOR_INFO_ACIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -30,13 +30,12 @@
/* public functions */
void
cursor_info_sample_merged_cmd_callback (GtkAction *action,
gpointer data)
cursor_info_sample_merged_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
gboolean active = g_variant_get_boolean (value);
gimp_cursor_view_set_sample_merged (view, active);
}

View File

@@ -12,15 +12,16 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __CURSOR_INFO_COMMANDS_H__
#define __CURSOR_INFO_COMMANDS_H__
void cursor_info_sample_merged_cmd_callback (GtkAction *action,
gpointer data);
void cursor_info_sample_merged_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __CURSOR_INFO_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -41,26 +41,44 @@ static const GimpActionEntry dashboard_actions[] =
GIMP_HELP_DASHBOARD_DIALOG },
{ "dashboard-groups", NULL,
NC_("dashboard-action", "Groups") },
NC_("dashboard-action", "_Groups") },
{ "dashboard-update-interval", NULL,
NC_("dashboard-action", "Update Interval") },
NC_("dashboard-action", "_Update Interval") },
{ "dashboard-history-duration", NULL,
NC_("dashboard-action", "History Duration") },
NC_("dashboard-action", "_History Duration") },
{ "dashboard-log-record", GIMP_ICON_RECORD,
NC_("dashboard-action", "_Start/Stop Recording..."), NULL,
NC_("dashboard-action", "Start/stop recording performance log"),
dashboard_log_record_cmd_callback,
GIMP_HELP_DASHBOARD_LOG_RECORD },
{ "dashboard-log-add-marker", GIMP_ICON_MARKER,
NC_("dashboard-action", "_Add Marker..."), NULL,
NC_("dashboard-action", "Add an event marker "
"to the performance log"),
dashboard_log_add_marker_cmd_callback,
GIMP_HELP_DASHBOARD_LOG_ADD_MARKER },
{ "dashboard-log-add-empty-marker", GIMP_ICON_MARKER,
NC_("dashboard-action", "Add _Empty Marker"), NULL,
NC_("dashboard-action", "Add an empty event marker "
"to the performance log"),
dashboard_log_add_empty_marker_cmd_callback,
GIMP_HELP_DASHBOARD_LOG_ADD_EMPTY_MARKER },
{ "dashboard-reset", GIMP_ICON_RESET,
NC_("dashboard-action", "Reset"), NULL,
NC_("dashboard-action", "_Reset"), NULL,
NC_("dashboard-action", "Reset cumulative data"),
G_CALLBACK (dashboard_reset_cmd_callback),
dashboard_reset_cmd_callback,
GIMP_HELP_DASHBOARD_RESET },
};
static const GimpToggleActionEntry dashboard_toggle_actions[] =
{
{ "dashboard-low-swap-space-warning", NULL,
NC_("dashboard-action", "Low Swap Space Warning"), NULL,
NC_("dashboard-action", "_Low Swap Space Warning"), NULL,
NC_("dashboard-action", "Raise the dashboard when "
"the swap size approaches its limit"),
G_CALLBACK (dashboard_low_swap_space_warning_cmd_callback),
dashboard_low_swap_space_warning_cmd_callback,
FALSE,
GIMP_HELP_DASHBOARD_LOW_SWAP_SPACE_WARNING }
};
@@ -138,14 +156,14 @@ dashboard_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (dashboard_update_interval_actions),
NULL,
0,
G_CALLBACK (dashboard_update_interval_cmd_callback));
dashboard_update_interval_cmd_callback);
gimp_action_group_add_radio_actions (group, "dashboard-history-duration",
dashboard_history_duration_actions,
G_N_ELEMENTS (dashboard_history_duration_actions),
NULL,
0,
G_CALLBACK (dashboard_history_duration_cmd_callback));
dashboard_history_duration_cmd_callback);
}
void
@@ -153,7 +171,12 @@ dashboard_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gboolean recording;
recording = gimp_dashboard_log_is_recording (dashboard);
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
@@ -195,8 +218,13 @@ dashboard_actions_update (GimpActionGroup *group,
break;
}
SET_SENSITIVE ("dashboard-log-add-marker", recording);
SET_SENSITIVE ("dashboard-log-add-empty-marker", recording);
SET_SENSITIVE ("dashboard-reset", !recording);
SET_ACTIVE ("dashboard-low-swap-space-warning",
gimp_dashboard_get_low_swap_space_warning (dashboard));
#undef SET_SENSITIVE
#undef SET_ACTIVE
}

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DASHBOARD_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -24,46 +24,303 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "widgets/gimpdashboard.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
#include "dialogs/dialogs.h"
#include "dashboard-commands.h"
#include "gimp-intl.h"
typedef struct
{
GFile *folder;
GimpDashboardLogParams params;
} DashboardLogDialogInfo;
/* local function prototypes */
static void dashboard_log_record_response (GtkWidget *dialog,
int response_id,
GimpDashboard *dashboard);
static void dashboard_log_add_marker_response (GtkWidget *dialog,
const gchar *description,
GimpDashboard *dashboard);
static DashboardLogDialogInfo * dashboard_log_dialog_info_new (GimpDashboard *dashboard);
static void dashboard_log_dialog_info_free (DashboardLogDialogInfo *info);
/* public functions */
void
dashboard_update_interval_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
dashboard_update_interval_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GimpDashboardUpdateInteval update_interval;
update_interval = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
update_interval = g_variant_get_int32 (value);
gimp_dashboard_set_update_interval (dashboard, update_interval);
}
void
dashboard_history_duration_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
dashboard_history_duration_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GimpDashboardHistoryDuration history_duration;
history_duration = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
history_duration = g_variant_get_int32 (value);
gimp_dashboard_set_history_duration (dashboard, history_duration);
}
void
dashboard_reset_cmd_callback (GtkAction *action,
gpointer data)
dashboard_log_record_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
if (! gimp_dashboard_log_is_recording (dashboard))
{
GtkWidget *dialog;
#define LOG_RECORD_KEY "gimp-dashboard-log-record-dialog"
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY);
if (! dialog)
{
GtkFileFilter *filter;
DashboardLogDialogInfo *info;
GtkWidget *hbox;
GtkWidget *hbox2;
GtkWidget *label;
GtkWidget *spinbutton;
GtkWidget *toggle;
dialog = gtk_file_chooser_dialog_new (
"Record Performance Log", NULL, GTK_FILE_CHOOSER_ACTION_SAVE,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Record"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_screen (
GTK_WINDOW (dialog),
gtk_widget_get_screen (GTK_WIDGET (dashboard)));
gtk_window_set_role (GTK_WINDOW (dialog),
"gimp-dashboard-log-record");
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
gtk_file_chooser_set_do_overwrite_confirmation (
GTK_FILE_CHOOSER (dialog), TRUE);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files"));
gtk_file_filter_add_pattern (filter, "*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("Log Files (*.log)"));
gtk_file_filter_add_pattern (filter, "*.log");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
info = g_object_get_data (G_OBJECT (dashboard),
"gimp-dashboard-log-dialog-info");
if (! info)
{
info = dashboard_log_dialog_info_new (dashboard);
g_object_set_data_full (
G_OBJECT (dashboard),
"gimp-dashboard-log-dialog-info", info,
(GDestroyNotify) dashboard_log_dialog_info_free);
}
if (info->folder)
{
gtk_file_chooser_set_current_folder_file (
GTK_FILE_CHOOSER (dialog), info->folder, NULL);
}
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
"gimp-performance.log");
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), hbox);
gtk_widget_show (hbox);
hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gimp_help_set_help_data (hbox2, _("Log samples per second"), NULL);
gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0);
gtk_widget_show (hbox2);
label = gtk_label_new_with_mnemonic (_("Sample fre_quency:"));
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
gtk_widget_show (label);
spinbutton = gimp_spin_button_new_with_range (1, 1000, 1);
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton),
info->params.sample_frequency);
g_signal_connect (gtk_spin_button_get_adjustment (
GTK_SPIN_BUTTON (spinbutton)),
"value-changed",
G_CALLBACK (gimp_int_adjustment_update),
&info->params.sample_frequency);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
toggle = gtk_check_button_new_with_mnemonic (_("_Backtrace"));
gimp_help_set_help_data (toggle, _("Include backtraces in log"),
NULL);
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
info->params.backtrace);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&info->params.backtrace);
toggle = gtk_check_button_new_with_mnemonic (_("_Messages"));
gimp_help_set_help_data (toggle,
_("Include diagnostic messages in log"),
NULL);
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
info->params.messages);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&info->params.messages);
toggle = gtk_check_button_new_with_mnemonic (_("Progressi_ve"));
gimp_help_set_help_data (toggle,
_("Produce complete log "
"even if not properly terminated"),
NULL);
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
info->params.progressive);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&info->params.progressive);
g_signal_connect (dialog, "response",
G_CALLBACK (dashboard_log_record_response),
dashboard);
g_signal_connect (dialog, "delete-event",
G_CALLBACK (gtk_true),
NULL);
gimp_help_connect (dialog, gimp_standard_help_func,
GIMP_HELP_DASHBOARD_LOG_RECORD, NULL);
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY, dialog);
g_signal_connect_object (dashboard, "destroy",
G_CALLBACK (gtk_widget_destroy),
dialog,
G_CONNECT_SWAPPED);
#undef LOG_RECORD_KEY
}
gtk_window_present (GTK_WINDOW (dialog));
}
else
{
GError *error = NULL;
if (! gimp_dashboard_log_stop_recording (dashboard, &error))
{
gimp_message_literal (
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
NULL, GIMP_MESSAGE_ERROR, error->message);
}
}
}
void
dashboard_log_add_marker_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GtkWidget *dialog;
#define LOG_ADD_MARKER_KEY "gimp-dashboard-log-add-marker-dialog"
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY);
if (! dialog)
{
dialog = gimp_query_string_box (
_("Add Marker"), GTK_WIDGET (dashboard),
gimp_standard_help_func, GIMP_HELP_DASHBOARD_LOG_ADD_MARKER,
_("Enter a description for the marker"),
NULL,
G_OBJECT (dashboard), "destroy",
(GimpQueryStringCallback) dashboard_log_add_marker_response,
dashboard);
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY, dialog);
#undef LOG_ADD_MARKER_KEY
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
dashboard_log_add_empty_marker_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gimp_dashboard_log_add_marker (dashboard, NULL);
}
void
dashboard_reset_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
@@ -71,13 +328,79 @@ dashboard_reset_cmd_callback (GtkAction *action,
}
void
dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
gpointer data)
dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gboolean low_swap_space_warning;
low_swap_space_warning = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gboolean low_swap_space_warning = g_variant_get_boolean (value);
gimp_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
}
/* private functions */
static void
dashboard_log_record_response (GtkWidget *dialog,
int response_id,
GimpDashboard *dashboard)
{
if (response_id == GTK_RESPONSE_OK)
{
GFile *file;
DashboardLogDialogInfo *info;
GError *error = NULL;
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
info = g_object_get_data (G_OBJECT (dashboard),
"gimp-dashboard-log-dialog-info");
g_return_if_fail (info != NULL);
g_set_object (&info->folder, g_file_get_parent (file));
if (! gimp_dashboard_log_start_recording (dashboard,
file, &info->params,
&error))
{
gimp_message_literal (
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
NULL, GIMP_MESSAGE_ERROR, error->message);
g_clear_error (&error);
}
g_object_unref (file);
}
gtk_widget_destroy (dialog);
}
static void
dashboard_log_add_marker_response (GtkWidget *dialog,
const gchar *description,
GimpDashboard *dashboard)
{
gimp_dashboard_log_add_marker (dashboard, description);
}
static DashboardLogDialogInfo *
dashboard_log_dialog_info_new (GimpDashboard *dashboard)
{
DashboardLogDialogInfo *info = g_slice_new (DashboardLogDialogInfo);
info->folder = NULL;
info->params = *gimp_dashboard_log_get_default_params (dashboard);
return info;
}
static void
dashboard_log_dialog_info_free (DashboardLogDialogInfo *info)
{
g_clear_object (&info->folder);
g_slice_free (DashboardLogDialogInfo, info);
}

View File

@@ -12,25 +12,37 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DASHBOARD_COMMANDS_H__
#define __DASHBOARD_COMMANDS_H__
void dashboard_update_interval_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dashboard_history_duration_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dashboard_update_interval_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dashboard_history_duration_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dashboard_reset_cmd_callback (GtkAction *action,
gpointer data);
void dashboard_log_record_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dashboard_log_add_marker_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dashboard_log_add_empty_marker_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
gpointer data);
void dashboard_reset_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DASHBOARD_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -55,8 +55,9 @@
/* public functions */
void
data_open_as_image_cmd_callback (GtkAction *action,
gpointer user_data)
data_open_as_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
@@ -95,8 +96,9 @@ data_open_as_image_cmd_callback (GtkAction *action,
}
void
data_new_cmd_callback (GtkAction *action,
gpointer user_data)
data_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
@@ -125,8 +127,9 @@ data_new_cmd_callback (GtkAction *action,
}
void
data_duplicate_cmd_callback (GtkAction *action,
gpointer user_data)
data_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
@@ -156,8 +159,9 @@ data_duplicate_cmd_callback (GtkAction *action,
}
void
data_copy_location_cmd_callback (GtkAction *action,
gpointer user_data)
data_copy_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
@@ -184,8 +188,9 @@ data_copy_location_cmd_callback (GtkAction *action,
}
void
data_show_in_file_manager_cmd_callback (GtkAction *action,
gpointer user_data)
data_show_in_file_manager_cmd_callback (GimpAction *action,
GVariant *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
@@ -218,8 +223,9 @@ data_show_in_file_manager_cmd_callback (GtkAction *action,
}
void
data_delete_cmd_callback (GtkAction *action,
gpointer user_data)
data_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
@@ -248,8 +254,9 @@ data_delete_cmd_callback (GtkAction *action,
}
void
data_refresh_cmd_callback (GtkAction *action,
gpointer user_data)
data_refresh_cmd_callback (GimpAction *action,
GVariant *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
Gimp *gimp;
@@ -262,9 +269,9 @@ data_refresh_cmd_callback (GtkAction *action,
}
void
data_edit_cmd_callback (GtkAction *action,
const gchar *value,
gpointer user_data)
data_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
@@ -288,7 +295,8 @@ data_edit_cmd_callback (GtkAction *action,
gimp_dialog_factory_get_singleton (),
screen,
monitor,
value);
g_variant_get_string (value,
NULL));
gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
data);

View File

@@ -12,30 +12,37 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DATA_COMMANDS_H__
#define __DATA_COMMANDS_H__
void data_open_as_image_cmd_callback (GtkAction *action,
gpointer data);
void data_new_cmd_callback (GtkAction *action,
gpointer data);
void data_duplicate_cmd_callback (GtkAction *action,
gpointer data);
void data_copy_location_cmd_callback (GtkAction *action,
gpointer user_data);
void data_show_in_file_manager_cmd_callback (GtkAction *action,
gpointer user_data);
void data_delete_cmd_callback (GtkAction *action,
gpointer data);
void data_refresh_cmd_callback (GtkAction *action,
gpointer data);
void data_edit_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data);
void data_open_as_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void data_new_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void data_duplicate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void data_copy_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void data_show_in_file_manager_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void data_delete_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void data_refresh_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void data_edit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DATA_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -30,13 +30,14 @@
/* public functions */
void
data_editor_edit_active_cmd_callback (GtkAction *action,
gpointer data)
data_editor_edit_active_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDataEditor *editor = GIMP_DATA_EDITOR (data);
gboolean edit_active;
edit_active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
edit_active = g_variant_get_boolean (value);
gimp_data_editor_set_edit_active (editor, edit_active);
}

View File

@@ -12,15 +12,16 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DATA_EDITOR_COMMANDS_H__
#define __DATA_EDITOR_COMMANDS_H__
void data_editor_edit_active_cmd_callback (GtkAction *action,
gpointer data);
void data_editor_edit_active_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DATA_EDITOR_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -38,7 +38,7 @@ static const GimpActionEntry debug_actions[] =
{ "debug-mem-profile", NULL,
"_Memory Profile", NULL, NULL,
G_CALLBACK (debug_mem_profile_cmd_callback),
debug_mem_profile_cmd_callback,
NULL },
{ "debug-benchmark-projection", NULL,
@@ -46,33 +46,33 @@ static const GimpActionEntry debug_actions[] =
"Invalidates the entire projection, measures the time it takes to "
"validate (render) the part that is visible in the active display, "
"and print the result to stdout.",
G_CALLBACK (debug_benchmark_projection_cmd_callback),
debug_benchmark_projection_cmd_callback,
NULL },
{ "debug-show-image-graph", NULL,
"Show Image _Graph", NULL,
"Creates a new image showing the GEGL graph of this image",
G_CALLBACK (debug_show_image_graph_cmd_callback),
debug_show_image_graph_cmd_callback,
NULL },
{ "debug-dump-items", NULL,
"_Dump Items", NULL, NULL,
G_CALLBACK (debug_dump_menus_cmd_callback),
debug_dump_menus_cmd_callback,
NULL },
{ "debug-dump-managers", NULL,
"Dump _UI Managers", NULL, NULL,
G_CALLBACK (debug_dump_managers_cmd_callback),
debug_dump_managers_cmd_callback,
NULL },
{ "debug-dump-keyboard-shortcuts", NULL,
"Dump _Keyboard Shortcuts", NULL, NULL,
G_CALLBACK (debug_dump_keyboard_shortcuts_cmd_callback),
debug_dump_keyboard_shortcuts_cmd_callback,
NULL },
{ "debug-dump-attached-data", NULL,
"Dump Attached Data", NULL, NULL,
G_CALLBACK (debug_dump_attached_data_cmd_callback),
debug_dump_attached_data_cmd_callback,
NULL }
};
@@ -98,4 +98,10 @@ void
debug_actions_update (GimpActionGroup *group,
gpointer data)
{
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
SET_SENSITIVE ("debug-show-image-graph", gegl_has_operation ("gegl:introspect"));
#undef SET_SENSITIVE
}

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DEBUG_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -36,6 +36,7 @@
#include "gegl/gimp-gegl-utils.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpmenufactory.h"
#include "widgets/gimpuimanager.h"
@@ -71,8 +72,9 @@ static gboolean debug_accel_find_func (GtkAccelKey *key,
/* public functions */
void
debug_mem_profile_cmd_callback (GtkAction *action,
gpointer data)
debug_mem_profile_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
extern gboolean gimp_debug_memsize;
Gimp *gimp;
@@ -86,8 +88,9 @@ debug_mem_profile_cmd_callback (GtkAction *action,
}
void
debug_benchmark_projection_cmd_callback (GtkAction *action,
gpointer data)
debug_benchmark_projection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDisplay *display;
return_if_no_display (display, data);
@@ -96,8 +99,9 @@ debug_benchmark_projection_cmd_callback (GtkAction *action,
}
void
debug_show_image_graph_cmd_callback (GtkAction *action,
gpointer data)
debug_show_image_graph_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *source_image = NULL;
return_if_no_image (source_image, data);
@@ -106,8 +110,9 @@ debug_show_image_graph_cmd_callback (GtkAction *action,
}
void
debug_dump_menus_cmd_callback (GtkAction *action,
gpointer data)
debug_dump_menus_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GList *list;
@@ -147,8 +152,9 @@ debug_dump_menus_cmd_callback (GtkAction *action,
}
void
debug_dump_managers_cmd_callback (GtkAction *action,
gpointer data)
debug_dump_managers_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GList *list;
@@ -169,30 +175,31 @@ debug_dump_managers_cmd_callback (GtkAction *action,
"========================================\n\n",
entry->identifier);
g_print ("%s\n", gtk_ui_manager_get_ui (managers->data));
g_print ("%s\n", gimp_ui_manager_get_ui (managers->data));
}
}
}
void
debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
gpointer data)
debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDisplay *display;
GimpImageWindow *window;
GtkUIManager *manager;
GimpUIManager *manager;
GtkAccelGroup *accel_group;
GList *group_it;
GList *strings = NULL;
return_if_no_display (display, data);
window = gimp_display_shell_get_window (gimp_display_get_shell (display));
manager = GTK_UI_MANAGER (gimp_image_window_get_ui_manager (window));
manager = gimp_image_window_get_ui_manager (window);
accel_group = gtk_ui_manager_get_accel_group (manager);
accel_group = gimp_ui_manager_get_accel_group (manager);
/* Gather formatted strings of keyboard shortcuts */
for (group_it = gtk_ui_manager_get_action_groups (manager);
for (group_it = gimp_ui_manager_get_action_groups (manager);
group_it;
group_it = g_list_next (group_it))
{
@@ -200,13 +207,13 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
GList *actions = NULL;
GList *action_it = NULL;
actions = gtk_action_group_list_actions (GTK_ACTION_GROUP (group));
actions = gimp_action_group_list_actions (group);
actions = g_list_sort (actions, (GCompareFunc) gimp_action_name_compare);
for (action_it = actions; action_it; action_it = g_list_next (action_it))
{
GtkAction *action = action_it->data;
const gchar *name = gtk_action_get_name (action);
GimpAction *action = action_it->data;
const gchar *name = gimp_action_get_name (action);
GClosure *accel_closure = NULL;
if (strstr (name, "-menu") ||
@@ -214,7 +221,7 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
name[0] == '<')
continue;
accel_closure = gtk_action_get_accel_closure (action);
accel_closure = gimp_action_get_accel_closure (action);
if (accel_closure)
{
@@ -229,7 +236,7 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
gchar *label;
gchar *key_string;
label_tmp = gtk_action_get_label (action);
label_tmp = gimp_action_get_label (action);
label = gimp_strip_uline (label_tmp);
key_string = gtk_accelerator_get_label (key->accel_key,
key->accel_mods);
@@ -264,8 +271,9 @@ debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
}
void
debug_dump_attached_data_cmd_callback (GtkAction *action,
gpointer data)
debug_dump_attached_data_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp = action_data_get_gimp (data);
GimpContext *user_context = gimp_get_user_context (gimp);
@@ -286,15 +294,12 @@ debug_benchmark_projection (GimpDisplay *display)
{
GimpProjection *projection = gimp_image_get_projection (image);
gimp_projection_stop_rendering (projection);
GIMP_TIMER_START ();
gimp_image_invalidate (image,
0, 0,
gimp_image_get_width (image),
gimp_image_get_height (image));
gimp_projection_flush_now (projection);
gimp_display_flush_now (display);
gimp_image_invalidate_all (image);
gimp_projection_flush_now (projection, TRUE);
GIMP_TIMER_END ("Validation of the entire projection");

View File

@@ -12,28 +12,35 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DEBUG_COMMANDS_H__
#define __DEBUG_COMMANDS_H__
void debug_mem_profile_cmd_callback (GtkAction *action,
gpointer data);
void debug_benchmark_projection_cmd_callback (GtkAction *action,
gpointer data);
void debug_show_image_graph_cmd_callback (GtkAction *action,
gpointer data);
void debug_dump_menus_cmd_callback (GtkAction *action,
gpointer data);
void debug_dump_managers_cmd_callback (GtkAction *action,
gpointer data);
void debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
gpointer data);
void debug_dump_attached_data_cmd_callback (GtkAction *action,
gpointer data);
void debug_benchmark_projection_cmd_callback (GtkAction *action,
gpointer data);
void debug_mem_profile_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void debug_benchmark_projection_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void debug_show_image_graph_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void debug_dump_menus_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void debug_dump_managers_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void debug_dump_attached_data_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DEBUG_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -116,7 +116,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
GIMP_HELP_UNDO_DIALOG },
{ "dialogs-cursor", GIMP_ICON_CURSOR,
NC_("dialogs-action", "Pointer"), NULL,
NC_("dialogs-action", "_Pointer"), NULL,
NC_("dialogs-action", "Open the pointer information dialog"),
"gimp-cursor-view",
GIMP_HELP_POINTER_INFO_DIALOG },
@@ -146,7 +146,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
GIMP_HELP_BRUSH_EDIT },
{ "dialogs-dynamics", GIMP_ICON_DYNAMICS,
NC_("dialogs-action", "Paint Dynamics"), NULL,
NC_("dialogs-action", "Paint D_ynamics"), NULL,
NC_("dialogs-action", "Open paint dynamics dialog"),
"gimp-dynamics-list|gimp-dynamics-grid",
GIMP_HELP_DYNAMICS_DIALOG },
@@ -188,13 +188,13 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
GIMP_HELP_PALETTE_DIALOG },
{ "dialogs-palette-editor", GIMP_ICON_PALETTE,
NC_("dialogs-action", "Palette Editor"), NULL,
NC_("dialogs-action", "Palette _Editor"), NULL,
NC_("dialogs-action", "Open the palette editor"),
"gimp-palette-editor",
GIMP_HELP_PALETTE_EDIT },
{ "dialogs-tool-presets", GIMP_ICON_TOOL_PRESET,
NC_("dialogs-action", "Tool presets"), NULL,
NC_("dialogs-action", "Tool Pre_sets"), NULL,
NC_("dialogs-action", "Open tool presets dialog"),
"gimp-tool-preset-list|gimp-tool-preset-grid",
GIMP_HELP_TOOL_PRESET_DIALOG },
@@ -336,12 +336,12 @@ dialogs_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group, "dialogs-action",
dialogs_dockable_actions,
G_N_ELEMENTS (dialogs_dockable_actions),
G_CALLBACK (dialogs_create_dockable_cmd_callback));
dialogs_create_dockable_cmd_callback);
gimp_action_group_add_string_actions (group, "dialogs-action",
dialogs_toplevel_actions,
G_N_ELEMENTS (dialogs_toplevel_actions),
G_CALLBACK (dialogs_create_toplevel_cmd_callback));
dialogs_create_toplevel_cmd_callback);
}
void
@@ -354,12 +354,12 @@ dialogs_actions_update (GimpActionGroup *group,
if (dialogs_actions_toolbox_exists (gimp))
{
toolbox_label = _("Toolbox");
toolbox_label = _("Tool_box");
toolbox_tooltip = _("Raise the toolbox");
}
else
{
toolbox_label = _("New Toolbox");
toolbox_label = _("New Tool_box");
toolbox_tooltip = _("Create a new toolbox");
}

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DIALOGS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -37,36 +37,42 @@
/* public functions */
void
dialogs_create_toplevel_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data)
dialogs_create_toplevel_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GtkWidget *widget;
GtkWidget *widget;
const gchar *identifier;
return_if_no_widget (widget, data);
if (value)
identifier = g_variant_get_string (value, NULL);
if (identifier)
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
NULL /*ui_manager*/,
value, -1, TRUE);
identifier, -1, TRUE);
}
void
dialogs_create_dockable_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data)
dialogs_create_dockable_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GtkWidget *widget;
Gimp *gimp;
GtkWidget *widget;
const gchar *identifier;
return_if_no_gimp (gimp, data);
return_if_no_widget (widget, data);
if (value)
identifier = g_variant_get_string (value, NULL);
if (identifier)
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
gimp,
gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
value);
identifier);
}

View File

@@ -12,19 +12,19 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DIALOGS_COMMANDS_H__
#define __DIALOGS_COMMANDS_H__
void dialogs_create_toplevel_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data);
void dialogs_create_dockable_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data);
void dialogs_create_toplevel_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dialogs_create_dockable_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DIALOGS_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -48,13 +48,13 @@ static const GimpActionEntry dock_actions[] =
{ "dock-close", GIMP_ICON_WINDOW_CLOSE,
NC_("dock-action", "Close Dock"), "", NULL,
G_CALLBACK (window_close_cmd_callback),
window_close_cmd_callback,
GIMP_HELP_DOCK_CLOSE },
{ "dock-open-display", NULL,
NC_("dock-action", "_Open Display..."), NULL,
NC_("dock-action", "Connect to another display"),
G_CALLBACK (window_open_display_cmd_callback),
window_open_display_cmd_callback,
NULL }
};
@@ -62,13 +62,13 @@ static const GimpToggleActionEntry dock_toggle_actions[] =
{
{ "dock-show-image-menu", NULL,
NC_("dock-action", "_Show Image Selection"), NULL, NULL,
G_CALLBACK (dock_toggle_image_menu_cmd_callback),
dock_toggle_image_menu_cmd_callback,
TRUE,
GIMP_HELP_DOCK_IMAGE_MENU },
{ "dock-auto-follow-active", NULL,
NC_("dock-action", "Auto _Follow Active Image"), NULL, NULL,
G_CALLBACK (dock_toggle_auto_cmd_callback),
dock_toggle_auto_cmd_callback,
TRUE,
GIMP_HELP_DOCK_AUTO_BUTTON }
};

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCK_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -47,8 +47,9 @@ dock_commands_get_dock_window_from_widget (GtkWidget *widget)
/* public functions */
void
dock_toggle_image_menu_cmd_callback (GtkAction *action,
gpointer data)
dock_toggle_image_menu_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GtkWidget *widget = NULL;
GimpDockWindow *dock_window = NULL;
@@ -58,15 +59,16 @@ dock_toggle_image_menu_cmd_callback (GtkAction *action,
if (dock_window)
{
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean active = g_variant_get_boolean (value);
gimp_dock_window_set_show_image_menu (dock_window, active);
}
}
void
dock_toggle_auto_cmd_callback (GtkAction *action,
gpointer data)
dock_toggle_auto_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GtkWidget *widget = NULL;
GimpDockWindow *dock_window = NULL;
@@ -76,7 +78,7 @@ dock_toggle_auto_cmd_callback (GtkAction *action,
if (dock_window)
{
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean active = g_variant_get_boolean (value);
gimp_dock_window_set_auto_follow_active (dock_window, active);
}

View File

@@ -12,17 +12,19 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCK_COMMANDS_H__
#define __DOCK_COMMANDS_H__
void dock_toggle_image_menu_cmd_callback (GtkAction *action,
gpointer data);
void dock_toggle_auto_cmd_callback (GtkAction *action,
gpointer data);
void dock_toggle_image_menu_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dock_toggle_auto_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DOCK_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -59,12 +59,12 @@ static const GimpActionEntry dockable_actions[] =
{ "dockable-close-tab", "window-close",
NC_("dockable-action", "_Close Tab"), "", NULL,
G_CALLBACK (dockable_close_tab_cmd_callback),
dockable_close_tab_cmd_callback,
GIMP_HELP_DOCK_TAB_CLOSE },
{ "dockable-detach-tab", GIMP_ICON_DETACH,
NC_("dockable-action", "_Detach Tab"), "", NULL,
G_CALLBACK (dockable_detach_tab_cmd_callback),
dockable_detach_tab_cmd_callback,
GIMP_HELP_DOCK_TAB_DETACH }
};
@@ -127,13 +127,13 @@ static const GimpToggleActionEntry dockable_toggle_actions[] =
NC_("dockable-action", "Loc_k Tab to Dock"), NULL,
NC_("dockable-action",
"Protect this tab from being dragged with the mouse pointer"),
G_CALLBACK (dockable_lock_tab_cmd_callback),
dockable_lock_tab_cmd_callback,
FALSE,
GIMP_HELP_DOCK_TAB_LOCK },
{ "dockable-show-button-bar", NULL,
NC_("dockable-action", "Show _Button Bar"), NULL, NULL,
G_CALLBACK (dockable_show_button_bar_cmd_callback),
dockable_show_button_bar_cmd_callback,
TRUE,
GIMP_HELP_DOCK_SHOW_BUTTON_BAR }
};
@@ -166,28 +166,28 @@ dockable_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group, "dialogs-action",
dialogs_dockable_actions,
n_dialogs_dockable_actions,
G_CALLBACK (dockable_add_tab_cmd_callback));
dockable_add_tab_cmd_callback);
gimp_action_group_add_radio_actions (group, "preview-size",
dockable_view_size_actions,
G_N_ELEMENTS (dockable_view_size_actions),
NULL,
GIMP_VIEW_SIZE_MEDIUM,
G_CALLBACK (dockable_view_size_cmd_callback));
dockable_view_size_cmd_callback);
gimp_action_group_add_radio_actions (group, "tab-style",
dockable_tab_style_actions,
G_N_ELEMENTS (dockable_tab_style_actions),
NULL,
GIMP_TAB_STYLE_AUTOMATIC,
G_CALLBACK (dockable_tab_style_cmd_callback));
dockable_tab_style_cmd_callback);
gimp_action_group_add_radio_actions (group, "dockable-action",
dockable_view_type_actions,
G_N_ELEMENTS (dockable_view_type_actions),
NULL,
GIMP_VIEW_TYPE_LIST,
G_CALLBACK (dockable_toggle_view_cmd_callback));
dockable_toggle_view_cmd_callback);
}
void

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCKABLE_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -44,20 +44,21 @@ static GimpDockable * dockable_get_current (GimpDockbook *dockbook);
/* public functions */
void
dockable_add_tab_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data)
dockable_add_tab_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
gimp_dockbook_add_from_dialog_factory (dockbook,
value /*identifiers*/,
g_variant_get_string (value, NULL),
-1);
}
void
dockable_close_tab_cmd_callback (GtkAction *action,
gpointer data)
dockable_close_tab_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
GimpDockable *dockable = dockable_get_current (dockbook);
@@ -72,8 +73,9 @@ dockable_close_tab_cmd_callback (GtkAction *action,
}
void
dockable_detach_tab_cmd_callback (GtkAction *action,
gpointer data)
dockable_detach_tab_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
GimpDockable *dockable = dockable_get_current (dockbook);
@@ -83,32 +85,32 @@ dockable_detach_tab_cmd_callback (GtkAction *action,
}
void
dockable_lock_tab_cmd_callback (GtkAction *action,
gpointer data)
dockable_lock_tab_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
GimpDockable *dockable = dockable_get_current (dockbook);
if (dockable)
{
gboolean lock = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean lock = g_variant_get_boolean (value);
gimp_dockable_set_locked (dockable, lock);
}
}
void
dockable_toggle_view_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
dockable_toggle_view_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
GimpDockable *dockable;
GimpViewType view_type;
gint page_num;
view_type = (GimpViewType)
gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
view_type = (GimpViewType) g_variant_get_int32 (value);
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
@@ -211,15 +213,15 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
}
void
dockable_view_size_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
dockable_view_size_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
GimpDockable *dockable = dockable_get_current (dockbook);
gint view_size;
view_size = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
view_size = g_variant_get_int32 (value);
if (dockable)
{
@@ -239,16 +241,15 @@ dockable_view_size_cmd_callback (GtkAction *action,
}
void
dockable_tab_style_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
dockable_tab_style_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
GimpDockable *dockable = dockable_get_current (dockbook);
GimpTabStyle tab_style;
tab_style = (GimpTabStyle)
gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
tab_style = (GimpTabStyle) g_variant_get_int32 (value);
if (dockable && gimp_dockable_get_tab_style (dockable) != tab_style)
{
@@ -265,8 +266,9 @@ dockable_tab_style_cmd_callback (GtkAction *action,
}
void
dockable_show_button_bar_cmd_callback (GtkAction *action,
gpointer data)
dockable_show_button_bar_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
GimpDockable *dockable = dockable_get_current (dockbook);
@@ -277,7 +279,7 @@ dockable_show_button_bar_cmd_callback (GtkAction *action,
gboolean show;
docked = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
show = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
show = g_variant_get_boolean (value);
gimp_docked_set_show_button_bar (docked, show);
}

View File

@@ -12,34 +12,38 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCKABLE_COMMANDS_H__
#define __DOCKABLE_COMMANDS_H__
void dockable_add_tab_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data);
void dockable_close_tab_cmd_callback (GtkAction *action,
gpointer data);
void dockable_detach_tab_cmd_callback (GtkAction *action,
gpointer data);
void dockable_lock_tab_cmd_callback (GtkAction *action,
gpointer data);
void dockable_add_tab_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dockable_close_tab_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dockable_detach_tab_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dockable_lock_tab_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dockable_toggle_view_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dockable_view_size_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dockable_tab_style_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dockable_show_button_bar_cmd_callback (GtkAction *action,
gpointer data);
void dockable_toggle_view_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dockable_view_size_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dockable_tab_style_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void dockable_show_button_bar_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DOCKABLE_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -45,62 +45,62 @@ static const GimpActionEntry documents_actions[] =
{ "documents-open", GIMP_ICON_DOCUMENT_OPEN,
NC_("documents-action", "_Open Image"), NULL,
NC_("documents-action", "Open the selected entry"),
G_CALLBACK (documents_open_cmd_callback),
documents_open_cmd_callback,
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-raise-or-open", NULL,
NC_("documents-action", "_Raise or Open Image"), NULL,
NC_("documents-action", "Raise window if already open"),
G_CALLBACK (documents_raise_or_open_cmd_callback),
documents_raise_or_open_cmd_callback,
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-file-open-dialog", NULL,
NC_("documents-action", "File Open _Dialog"), NULL,
NC_("documents-action", "Open image dialog"),
G_CALLBACK (documents_file_open_dialog_cmd_callback),
documents_file_open_dialog_cmd_callback,
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-copy-location", GIMP_ICON_EDIT_COPY,
NC_("documents-action", "Copy Image _Location"), NULL,
NC_("documents-action", "Copy image location to clipboard"),
G_CALLBACK (documents_copy_location_cmd_callback),
documents_copy_location_cmd_callback,
GIMP_HELP_DOCUMENT_COPY_LOCATION },
{ "documents-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
NC_("documents-action", "Show in _File Manager"), NULL,
NC_("documents-action", "Show image location in the file manager"),
G_CALLBACK (documents_show_in_file_manager_cmd_callback),
documents_show_in_file_manager_cmd_callback,
GIMP_HELP_DOCUMENT_SHOW_IN_FILE_MANAGER },
{ "documents-remove", GIMP_ICON_LIST_REMOVE,
NC_("documents-action", "Remove _Entry"), NULL,
NC_("documents-action", "Remove the selected entry"),
G_CALLBACK (documents_remove_cmd_callback),
documents_remove_cmd_callback,
GIMP_HELP_DOCUMENT_REMOVE },
{ "documents-clear", GIMP_ICON_SHRED,
NC_("documents-action", "_Clear History"), NULL,
NC_("documents-action", "Clear the entire document history"),
G_CALLBACK (documents_clear_cmd_callback),
documents_clear_cmd_callback,
GIMP_HELP_DOCUMENT_CLEAR },
{ "documents-recreate-preview", GIMP_ICON_VIEW_REFRESH,
NC_("documents-action", "Recreate _Preview"), NULL,
NC_("documents-action", "Recreate preview"),
G_CALLBACK (documents_recreate_preview_cmd_callback),
documents_recreate_preview_cmd_callback,
GIMP_HELP_DOCUMENT_REFRESH },
{ "documents-reload-previews", NULL,
NC_("documents-action", "Reload _all Previews"), NULL,
NC_("documents-action", "Reload all previews"),
G_CALLBACK (documents_reload_previews_cmd_callback),
documents_reload_previews_cmd_callback,
GIMP_HELP_DOCUMENT_REFRESH },
{ "documents-remove-dangling", NULL,
NC_("documents-action", "Remove Dangling E_ntries"), NULL,
NC_("documents-action",
"Remove entries for which the corresponding file is not available"),
G_CALLBACK (documents_remove_dangling_cmd_callback),
documents_remove_dangling_cmd_callback,
GIMP_HELP_DOCUMENT_REFRESH }
};

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCUMENTS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -75,8 +75,9 @@ static void documents_raise_display (GimpDisplay *display,
/* public functions */
void
documents_open_cmd_callback (GtkAction *action,
gpointer data)
documents_open_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
@@ -99,8 +100,9 @@ documents_open_cmd_callback (GtkAction *action,
}
void
documents_raise_or_open_cmd_callback (GtkAction *action,
gpointer data)
documents_raise_or_open_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
@@ -129,8 +131,9 @@ documents_raise_or_open_cmd_callback (GtkAction *action,
}
void
documents_file_open_dialog_cmd_callback (GtkAction *action,
gpointer data)
documents_file_open_dialog_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
@@ -151,8 +154,9 @@ documents_file_open_dialog_cmd_callback (GtkAction *action,
}
void
documents_copy_location_cmd_callback (GtkAction *action,
gpointer data)
documents_copy_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
@@ -167,8 +171,9 @@ documents_copy_location_cmd_callback (GtkAction *action,
}
void
documents_show_in_file_manager_cmd_callback (GtkAction *action,
gpointer data)
documents_show_in_file_manager_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
@@ -196,8 +201,9 @@ documents_show_in_file_manager_cmd_callback (GtkAction *action,
}
void
documents_remove_cmd_callback (GtkAction *action,
gpointer data)
documents_remove_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context = gimp_container_view_get_context (editor->view);
@@ -212,8 +218,9 @@ documents_remove_cmd_callback (GtkAction *action,
}
void
documents_clear_cmd_callback (GtkAction *action,
gpointer data)
documents_clear_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context = gimp_container_view_get_context (editor->view);
@@ -282,8 +289,9 @@ documents_clear_cmd_callback (GtkAction *action,
}
void
documents_recreate_preview_cmd_callback (GtkAction *action,
gpointer data)
documents_recreate_preview_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContext *context;
@@ -313,8 +321,9 @@ documents_recreate_preview_cmd_callback (GtkAction *action,
}
void
documents_reload_previews_cmd_callback (GtkAction *action,
gpointer data)
documents_reload_previews_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;
@@ -344,8 +353,9 @@ documents_remove_dangling_foreach (GimpImagefile *imagefile,
}
void
documents_remove_dangling_cmd_callback (GtkAction *action,
gpointer data)
documents_remove_dangling_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;

View File

@@ -12,33 +12,43 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DOCUMENTS_COMMANDS_H__
#define __DOCUMENTS_COMMANDS_H__
void documents_open_cmd_callback (GtkAction *action,
gpointer data);
void documents_raise_or_open_cmd_callback (GtkAction *action,
gpointer data);
void documents_file_open_dialog_cmd_callback (GtkAction *action,
gpointer data);
void documents_copy_location_cmd_callback (GtkAction *action,
gpointer data);
void documents_show_in_file_manager_cmd_callback (GtkAction *action,
gpointer data);
void documents_remove_cmd_callback (GtkAction *action,
gpointer data);
void documents_clear_cmd_callback (GtkAction *action,
gpointer data);
void documents_recreate_preview_cmd_callback (GtkAction *action,
gpointer data);
void documents_reload_previews_cmd_callback (GtkAction *action,
gpointer data);
void documents_remove_dangling_cmd_callback (GtkAction *action,
gpointer data);
void documents_open_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_raise_or_open_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_file_open_dialog_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_copy_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_show_in_file_manager_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_remove_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_clear_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_recreate_preview_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_reload_previews_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void documents_remove_dangling_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DOCUMENTS_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -44,34 +44,27 @@ static const GimpActionEntry drawable_actions[] =
{ "drawable-equalize", NULL,
NC_("drawable-action", "_Equalize"), NULL,
NC_("drawable-action", "Automatic contrast enhancement"),
G_CALLBACK (drawable_equalize_cmd_callback),
drawable_equalize_cmd_callback,
GIMP_HELP_LAYER_EQUALIZE },
{ "drawable-levels-stretch", NULL,
NC_("drawable-action", "_White Balance"), NULL,
NC_("drawable-action", "Automatic white balance correction"),
G_CALLBACK (drawable_levels_stretch_cmd_callback),
GIMP_HELP_LAYER_WHITE_BALANCE },
{ "drawable-offset", NULL,
NC_("drawable-action", "_Offset..."), "<primary><shift>O",
NC_("drawable-action",
"Shift the pixels, optionally wrapping them at the borders"),
G_CALLBACK (drawable_offset_cmd_callback),
GIMP_HELP_LAYER_OFFSET }
drawable_levels_stretch_cmd_callback,
GIMP_HELP_LAYER_WHITE_BALANCE }
};
static const GimpToggleActionEntry drawable_toggle_actions[] =
{
{ "drawable-visible", GIMP_ICON_VISIBLE,
NC_("drawable-action", "Toggle Drawable _Visibility"), NULL, NULL,
G_CALLBACK (drawable_visible_cmd_callback),
drawable_visible_cmd_callback,
FALSE,
GIMP_HELP_LAYER_VISIBLE },
{ "drawable-linked", GIMP_ICON_LINKED,
NC_("drawable-action", "Toggle Drawable _Linked State"), NULL, NULL,
G_CALLBACK (drawable_linked_cmd_callback),
drawable_linked_cmd_callback,
FALSE,
GIMP_HELP_LAYER_LINKED },
@@ -79,7 +72,7 @@ static const GimpToggleActionEntry drawable_toggle_actions[] =
NC_("drawable-action", "L_ock Pixels of Drawable"), NULL,
NC_("drawable-action",
"Keep the pixels on this drawable from being modified"),
G_CALLBACK (drawable_lock_content_cmd_callback),
drawable_lock_content_cmd_callback,
FALSE,
GIMP_HELP_LAYER_LOCK_PIXELS },
@@ -87,7 +80,7 @@ static const GimpToggleActionEntry drawable_toggle_actions[] =
NC_("drawable-action", "L_ock Position of Drawable"), NULL,
NC_("drawable-action",
"Keep the position on this drawable from being modified"),
G_CALLBACK (drawable_lock_position_cmd_callback),
drawable_lock_position_cmd_callback,
FALSE,
GIMP_HELP_LAYER_LOCK_POSITION },
};
@@ -143,12 +136,12 @@ drawable_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "drawable-action",
drawable_flip_actions,
G_N_ELEMENTS (drawable_flip_actions),
G_CALLBACK (drawable_flip_cmd_callback));
drawable_flip_cmd_callback);
gimp_action_group_add_enum_actions (group, "drawable-action",
drawable_rotate_actions,
G_N_ELEMENTS (drawable_rotate_actions),
G_CALLBACK (drawable_rotate_cmd_callback));
drawable_rotate_cmd_callback);
#define SET_ALWAYS_SHOW_IMAGE(action,show) \
gimp_action_group_set_action_always_show_image (group, action, show)
@@ -215,7 +208,6 @@ drawable_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("drawable-equalize", writable && !children);
SET_SENSITIVE ("drawable-levels-stretch", writable && !children && is_rgb);
SET_SENSITIVE ("drawable-offset", writable && !children);
SET_SENSITIVE ("drawable-visible", drawable);
SET_SENSITIVE ("drawable-linked", drawable);

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DRAWABLE_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -27,7 +27,6 @@
#include "core/gimp.h"
#include "core/gimpdrawable-equalize.h"
#include "core/gimpdrawable-levels.h"
#include "core/gimpdrawable-offset.h"
#include "core/gimpdrawable-operation.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
@@ -37,7 +36,6 @@
#include "core/gimpprogress.h"
#include "dialogs/dialogs.h"
#include "dialogs/offset-dialog.h"
#include "actions.h"
#include "drawable-commands.h"
@@ -45,22 +43,12 @@
#include "gimp-intl.h"
/* local function prototypes */
static void drawable_offset_callback (GtkWidget *dialog,
GimpDrawable *drawable,
GimpContext *context,
gboolean wrap_around,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y);
/* public functions */
void
drawable_equalize_cmd_callback (GtkAction *action,
gpointer data)
drawable_equalize_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
@@ -71,8 +59,9 @@ drawable_equalize_cmd_callback (GtkAction *action,
}
void
drawable_levels_stretch_cmd_callback (GtkAction *action,
gpointer data)
drawable_levels_stretch_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
@@ -96,44 +85,16 @@ drawable_levels_stretch_cmd_callback (GtkAction *action,
}
void
drawable_offset_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
GtkWidget *widget;
GtkWidget *dialog;
return_if_no_drawable (image, drawable, data);
return_if_no_widget (widget, data);
#define OFFSET_DIALOG_KEY "gimp-offset-dialog"
dialog = dialogs_get_dialog (G_OBJECT (drawable), OFFSET_DIALOG_KEY);
if (! dialog)
{
dialog = offset_dialog_new (drawable, action_data_get_context (data),
widget,
drawable_offset_callback,
NULL);
dialogs_attach_dialog (G_OBJECT (drawable),
OFFSET_DIALOG_KEY, dialog);
}
gtk_window_present (GTK_WINDOW (dialog));
}
void
drawable_linked_cmd_callback (GtkAction *action,
gpointer data)
drawable_linked_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
gboolean linked;
return_if_no_drawable (image, drawable, data);
linked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
linked = g_variant_get_boolean (value);
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
@@ -156,15 +117,16 @@ drawable_linked_cmd_callback (GtkAction *action,
}
void
drawable_visible_cmd_callback (GtkAction *action,
gpointer data)
drawable_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
gboolean visible;
return_if_no_drawable (image, drawable, data);
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
visible = g_variant_get_boolean (value);
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
@@ -187,15 +149,16 @@ drawable_visible_cmd_callback (GtkAction *action,
}
void
drawable_lock_content_cmd_callback (GtkAction *action,
gpointer data)
drawable_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
gboolean locked;
return_if_no_drawable (image, drawable, data);
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
locked = g_variant_get_boolean (value);
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
@@ -222,15 +185,16 @@ drawable_lock_content_cmd_callback (GtkAction *action,
}
void
drawable_lock_position_cmd_callback (GtkAction *action,
gpointer data)
drawable_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
gboolean locked;
return_if_no_drawable (image, drawable, data);
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
locked = g_variant_get_boolean (value);
if (GIMP_IS_LAYER_MASK (drawable))
drawable =
@@ -253,24 +217,27 @@ drawable_lock_position_cmd_callback (GtkAction *action,
}
void
drawable_flip_cmd_callback (GtkAction *action,
gint value,
gpointer data)
drawable_flip_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
GimpItem *item;
GimpContext *context;
gint off_x, off_y;
gdouble axis = 0.0;
GimpImage *image;
GimpDrawable *drawable;
GimpItem *item;
GimpContext *context;
gint off_x, off_y;
gdouble axis = 0.0;
GimpOrientationType orientation;
return_if_no_drawable (image, drawable, data);
return_if_no_context (context, data);
orientation = (GimpOrientationType) g_variant_get_int32 (value);
item = GIMP_ITEM (drawable);
gimp_item_get_offset (item, &off_x, &off_y);
switch ((GimpOrientationType) value)
switch (orientation)
{
case GIMP_ORIENTATION_HORIZONTAL:
axis = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
@@ -286,33 +253,34 @@ drawable_flip_cmd_callback (GtkAction *action,
if (gimp_item_get_linked (item))
{
gimp_item_linked_flip (item, context,
(GimpOrientationType) value, axis, FALSE);
gimp_item_linked_flip (item, context, orientation, axis, FALSE);
}
else
{
gimp_item_flip (item, context,
(GimpOrientationType) value, axis, FALSE);
gimp_item_flip (item, context, orientation, axis,
gimp_item_get_clip (item, FALSE));
}
gimp_image_flush (image);
}
void
drawable_rotate_cmd_callback (GtkAction *action,
gint value,
gpointer data)
drawable_rotate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
GimpContext *context;
GimpItem *item;
gint off_x, off_y;
gdouble center_x, center_y;
gboolean clip_result = FALSE;
GimpImage *image;
GimpDrawable *drawable;
GimpContext *context;
GimpItem *item;
gint off_x, off_y;
gdouble center_x, center_y;
GimpRotationType rotation_type;
return_if_no_drawable (image, drawable, data);
return_if_no_context (context, data);
rotation_type = (GimpRotationType) g_variant_get_int32 (value);
item = GIMP_ITEM (drawable);
gimp_item_get_offset (item, &off_x, &off_y);
@@ -320,41 +288,17 @@ drawable_rotate_cmd_callback (GtkAction *action,
center_x = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
center_y = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
if (GIMP_IS_CHANNEL (item))
clip_result = TRUE;
if (gimp_item_get_linked (item))
{
gimp_item_linked_rotate (item, context, (GimpRotationType) value,
gimp_item_linked_rotate (item, context, rotation_type,
center_x, center_y, FALSE);
}
else
{
gimp_item_rotate (item, context, (GimpRotationType) value,
center_x, center_y, clip_result);
gimp_item_rotate (item, context,
rotation_type, center_x, center_y,
gimp_item_get_clip (item, FALSE));
}
gimp_image_flush (image);
}
/* private functions */
static void
drawable_offset_callback (GtkWidget *dialog,
GimpDrawable *drawable,
GimpContext *context,
gboolean wrap_around,
GimpOffsetType fill_type,
gint offset_x,
gint offset_y)
{
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
gimp_drawable_offset (drawable, context,
wrap_around, fill_type,
offset_x, offset_y);
gimp_image_flush (image);
gtk_widget_destroy (dialog);
}

View File

@@ -12,35 +12,39 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DRAWABLE_COMMANDS_H__
#define __DRAWABLE_COMMANDS_H__
void drawable_equalize_cmd_callback (GtkAction *action,
gpointer data);
void drawable_levels_stretch_cmd_callback (GtkAction *action,
gpointer data);
void drawable_offset_cmd_callback (GtkAction *action,
gpointer data);
void drawable_equalize_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void drawable_levels_stretch_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void drawable_linked_cmd_callback (GtkAction *action,
gpointer data);
void drawable_visible_cmd_callback (GtkAction *action,
gpointer data);
void drawable_lock_content_cmd_callback (GtkAction *action,
gpointer data);
void drawable_lock_position_cmd_callback (GtkAction *action,
gpointer data);
void drawable_linked_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void drawable_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void drawable_lock_content_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void drawable_lock_position_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void drawable_flip_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void drawable_rotate_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void drawable_flip_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void drawable_rotate_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __DRAWABLE_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -46,37 +46,37 @@ static const GimpActionEntry dynamics_actions[] =
{ "dynamics-new", GIMP_ICON_DOCUMENT_NEW,
NC_("dynamics-action", "_New Dynamics"), NULL,
NC_("dynamics-action", "Create a new dynamics"),
G_CALLBACK (data_new_cmd_callback),
data_new_cmd_callback,
GIMP_HELP_DYNAMICS_NEW },
{ "dynamics-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
NC_("dynamics-action", "D_uplicate Dynamics"), NULL,
NC_("dynamics-action", "Duplicate this dynamics"),
G_CALLBACK (data_duplicate_cmd_callback),
data_duplicate_cmd_callback,
GIMP_HELP_DYNAMICS_DUPLICATE },
{ "dynamics-copy-location", GIMP_ICON_EDIT_COPY,
NC_("dynamics-action", "Copy Dynamics _Location"), NULL,
NC_("dynamics-action", "Copy dynamics file location to clipboard"),
G_CALLBACK (data_copy_location_cmd_callback),
data_copy_location_cmd_callback,
GIMP_HELP_DYNAMICS_COPY_LOCATION },
{ "dynamics-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
NC_("dynamics-action", "Show in _File Manager"), NULL,
NC_("dynamics-action", "Show dynamics file location in the file manager"),
G_CALLBACK (data_show_in_file_manager_cmd_callback),
data_show_in_file_manager_cmd_callback,
GIMP_HELP_DYNAMICS_SHOW_IN_FILE_MANAGER },
{ "dynamics-delete", GIMP_ICON_EDIT_DELETE,
NC_("dynamics-action", "_Delete Dynamics"), NULL,
NC_("dynamics-action", "Delete this dynamics"),
G_CALLBACK (data_delete_cmd_callback),
data_delete_cmd_callback,
GIMP_HELP_DYNAMICS_DELETE },
{ "dynamics-refresh", GIMP_ICON_VIEW_REFRESH,
NC_("dynamics-action", "_Refresh Dynamics"), NULL,
NC_("dynamics-action", "Refresh dynamics"),
G_CALLBACK (data_refresh_cmd_callback),
data_refresh_cmd_callback,
GIMP_HELP_DYNAMICS_REFRESH }
};
@@ -100,7 +100,7 @@ dynamics_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group, "dynamics-action",
dynamics_edit_actions,
G_N_ELEMENTS (dynamics_edit_actions),
G_CALLBACK (data_edit_cmd_callback));
data_edit_cmd_callback);
}
void

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DYNAMICS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -49,7 +49,7 @@ static const GimpToggleActionEntry dynamics_editor_toggle_actions[] =
{
{ "dynamics-editor-edit-active", GIMP_ICON_LINKED,
NC_("dynamics-editor-action", "Edit Active Dynamics"), NULL, NULL,
G_CALLBACK (data_editor_edit_active_cmd_callback),
data_editor_edit_active_cmd_callback,
FALSE,
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
};

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DYNAMICS_EDITOR_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -27,7 +27,6 @@
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawableundo.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "core/gimplayer.h"
@@ -35,6 +34,7 @@
#include "core/gimptoolinfo.h"
#include "core/gimpundostack.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
@@ -73,100 +73,93 @@ static const GimpActionEntry edit_actions[] =
{ "edit-undo", GIMP_ICON_EDIT_UNDO,
NC_("edit-action", "_Undo"), "<primary>Z",
NC_("edit-action", "Undo the last operation"),
G_CALLBACK (edit_undo_cmd_callback),
edit_undo_cmd_callback,
GIMP_HELP_EDIT_UNDO },
{ "edit-redo", GIMP_ICON_EDIT_REDO,
NC_("edit-action", "_Redo"), "<primary>Y",
NC_("edit-action", "Redo the last operation that was undone"),
G_CALLBACK (edit_redo_cmd_callback),
edit_redo_cmd_callback,
GIMP_HELP_EDIT_REDO },
{ "edit-strong-undo", GIMP_ICON_EDIT_UNDO,
NC_("edit-action", "Strong Undo"), "<primary><shift>Z",
NC_("edit-action", "Undo the last operation, skipping visibility changes"),
G_CALLBACK (edit_strong_undo_cmd_callback),
edit_strong_undo_cmd_callback,
GIMP_HELP_EDIT_STRONG_UNDO },
{ "edit-strong-redo", GIMP_ICON_EDIT_REDO,
NC_("edit-action", "Strong Redo"), "<primary><shift>Y",
NC_("edit-action",
"Redo the last operation that was undone, skipping visibility changes"),
G_CALLBACK (edit_strong_redo_cmd_callback),
edit_strong_redo_cmd_callback,
GIMP_HELP_EDIT_STRONG_REDO },
{ "edit-undo-clear", GIMP_ICON_SHRED,
NC_("edit-action", "_Clear Undo History"), NULL,
NC_("edit-action", "Remove all operations from the undo history"),
G_CALLBACK (edit_undo_clear_cmd_callback),
edit_undo_clear_cmd_callback,
GIMP_HELP_EDIT_UNDO_CLEAR },
{ "edit-fade", GIMP_ICON_EDIT_UNDO,
NC_("edit-action", "_Fade..."), NULL,
NC_("edit-action",
"Modify paint mode and opacity of the last pixel manipulation"),
G_CALLBACK (edit_fade_cmd_callback),
GIMP_HELP_EDIT_FADE },
{ "edit-cut", GIMP_ICON_EDIT_CUT,
NC_("edit-action", "Cu_t"), "<primary>X",
NC_("edit-action", "Move the selected pixels to the clipboard"),
G_CALLBACK (edit_cut_cmd_callback),
edit_cut_cmd_callback,
GIMP_HELP_EDIT_CUT },
{ "edit-copy", GIMP_ICON_EDIT_COPY,
NC_("edit-action", "_Copy"), "<primary>C",
NC_("edit-action", "Copy the selected pixels to the clipboard"),
G_CALLBACK (edit_copy_cmd_callback),
edit_copy_cmd_callback,
GIMP_HELP_EDIT_COPY },
{ "edit-copy-visible", NULL, /* GIMP_ICON_COPY_VISIBLE, */
NC_("edit-action", "Copy _Visible"), "<primary><shift>C",
NC_("edit-action", "Copy what is visible in the selected region"),
G_CALLBACK (edit_copy_visible_cmd_callback),
edit_copy_visible_cmd_callback,
GIMP_HELP_EDIT_COPY_VISIBLE },
{ "edit-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
NC_("edit-action", "From _Clipboard"), "<primary><shift>V",
NC_("edit-action", "Create a new image from the content of the clipboard"),
G_CALLBACK (edit_paste_as_new_image_cmd_callback),
edit_paste_as_new_image_cmd_callback,
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
{ "edit-paste-as-new-image-short", GIMP_ICON_EDIT_PASTE_AS_NEW,
NC_("edit-action", "_New Image"), NULL,
NC_("edit-action", "Create a new image from the content of the clipboard"),
G_CALLBACK (edit_paste_as_new_image_cmd_callback),
edit_paste_as_new_image_cmd_callback,
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
{ "edit-named-cut", GIMP_ICON_EDIT_CUT,
NC_("edit-action", "Cu_t Named..."), NULL,
NC_("edit-action", "Move the selected pixels to a named buffer"),
G_CALLBACK (edit_named_cut_cmd_callback),
edit_named_cut_cmd_callback,
GIMP_HELP_BUFFER_CUT },
{ "edit-named-copy", GIMP_ICON_EDIT_COPY,
NC_("edit-action", "_Copy Named..."), NULL,
NC_("edit-action", "Copy the selected pixels to a named buffer"),
G_CALLBACK (edit_named_copy_cmd_callback),
edit_named_copy_cmd_callback,
GIMP_HELP_BUFFER_COPY },
{ "edit-named-copy-visible", NULL, /* GIMP_ICON_COPY_VISIBLE, */
NC_("edit-action", "Copy _Visible Named..."), "",
NC_("edit-action",
"Copy what is visible in the selected region to a named buffer"),
G_CALLBACK (edit_named_copy_visible_cmd_callback),
edit_named_copy_visible_cmd_callback,
GIMP_HELP_BUFFER_COPY },
{ "edit-named-paste", GIMP_ICON_EDIT_PASTE,
NC_("edit-action", "_Paste Named..."), NULL,
NC_("edit-action", "Paste the content of a named buffer"),
G_CALLBACK (edit_named_paste_cmd_callback),
edit_named_paste_cmd_callback,
GIMP_HELP_BUFFER_PASTE },
{ "edit-clear", GIMP_ICON_EDIT_CLEAR,
NC_("edit-action", "Cl_ear"), "Delete",
NC_("edit-action", "Clear the selected pixels"),
G_CALLBACK (edit_clear_cmd_callback),
edit_clear_cmd_callback,
GIMP_HELP_EDIT_CLEAR }
};
@@ -179,7 +172,7 @@ static const GimpEnumActionEntry edit_paste_actions[] =
GIMP_HELP_EDIT_PASTE },
{ "edit-paste-in-place", GIMP_ICON_EDIT_PASTE,
NC_("edit-action", "Paste In Place"), "<primary><alt>V",
NC_("edit-action", "Paste In P_lace"), "<primary><alt>V",
NC_("edit-action",
"Paste the content of the clipboard at its original position"),
GIMP_PASTE_TYPE_FLOATING_IN_PLACE, FALSE,
@@ -193,7 +186,7 @@ static const GimpEnumActionEntry edit_paste_actions[] =
GIMP_HELP_EDIT_PASTE_INTO },
{ "edit-paste-into-in-place", GIMP_ICON_EDIT_PASTE_INTO,
NC_("edit-action", "Paste Into Selection In Place"), NULL,
NC_("edit-action", "Paste Int_o Selection In Place"), NULL,
NC_("edit-action",
"Paste the content of the clipboard into the current selection "
"at its original position"),
@@ -243,7 +236,7 @@ edit_actions_setup (GimpActionGroup *group)
GimpContext *context = gimp_get_user_context (group->gimp);
GimpRGB color;
GimpPattern *pattern;
GtkAction *action;
GimpAction *action;
gimp_action_group_add_actions (group, "edit-action",
edit_actions,
@@ -252,16 +245,17 @@ edit_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "edit-action",
edit_paste_actions,
G_N_ELEMENTS (edit_paste_actions),
G_CALLBACK (edit_paste_cmd_callback));
edit_paste_cmd_callback);
gimp_action_group_add_enum_actions (group, "edit-action",
edit_fill_actions,
G_N_ELEMENTS (edit_fill_actions),
G_CALLBACK (edit_fill_cmd_callback));
edit_fill_cmd_callback);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
"edit-paste-as-new-image-short");
gtk_action_set_accel_path (action, "<Actions>/edit/edit-paste-as-new-image");
action = gimp_action_group_get_action (group,
"edit-paste-as-new-image-short");
gimp_action_set_accel_path (action,
"<Actions>/edit/edit-paste-as-new-image");
gimp_action_group_set_action_context (group, "edit-fill-fg", context);
gimp_action_group_set_action_context (group, "edit-fill-bg", context);
@@ -305,11 +299,9 @@ edit_actions_update (GimpActionGroup *group,
GimpDrawable *drawable = NULL;
gchar *undo_name = NULL;
gchar *redo_name = NULL;
gchar *fade_name = NULL;
gboolean writable = FALSE;
gboolean children = FALSE;
gboolean undo_enabled = FALSE;
gboolean fade_enabled = FALSE;
if (image)
{
@@ -351,21 +343,6 @@ edit_actions_update (GimpActionGroup *group,
else if (redo)
redo_name = g_strdup_printf (_("_Redo %s"),
gimp_object_get_name (redo));
undo = gimp_image_undo_get_fadeable (image);
if (GIMP_IS_DRAWABLE_UNDO (undo) &&
GIMP_DRAWABLE_UNDO (undo)->applied_buffer)
{
fade_enabled = TRUE;
}
if (fade_enabled)
{
fade_name =
g_strdup_printf (_("_Fade %s..."),
gimp_object_get_name (undo));
}
}
}
@@ -377,18 +354,15 @@ edit_actions_update (GimpActionGroup *group,
SET_LABEL ("edit-undo", undo_name ? undo_name : _("_Undo"));
SET_LABEL ("edit-redo", redo_name ? redo_name : _("_Redo"));
SET_LABEL ("edit-fade", fade_name ? fade_name : _("_Fade..."));
SET_SENSITIVE ("edit-undo", undo_enabled && undo_name);
SET_SENSITIVE ("edit-redo", undo_enabled && redo_name);
SET_SENSITIVE ("edit-strong-undo", undo_enabled && undo_name);
SET_SENSITIVE ("edit-strong-redo", undo_enabled && redo_name);
SET_SENSITIVE ("edit-undo-clear", undo_enabled && (undo_name || redo_name));
SET_SENSITIVE ("edit-fade", fade_enabled && fade_name);
g_free (undo_name);
g_free (redo_name);
g_free (fade_name);
SET_SENSITIVE ("edit-cut", writable && !children);
SET_SENSITIVE ("edit-copy", drawable);

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __EDIT_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -53,10 +53,9 @@
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-transform.h"
#include "tools/gimptools-utils.h"
#include "tools/tool_manager.h"
#include "dialogs/fade-dialog.h"
#include "actions.h"
#include "edit-commands.h"
@@ -65,25 +64,28 @@
/* local function prototypes */
static void edit_paste (GimpDisplay *display,
GimpPasteType paste_type,
gboolean try_svg);
static void cut_named_buffer_callback (GtkWidget *widget,
const gchar *name,
gpointer data);
static void copy_named_buffer_callback (GtkWidget *widget,
const gchar *name,
gpointer data);
static void copy_named_visible_buffer_callback (GtkWidget *widget,
const gchar *name,
gpointer data);
static gboolean check_drawable_alpha (GimpDrawable *drawable,
gpointer data);
static void edit_paste (GimpDisplay *display,
GimpPasteType paste_type,
gboolean try_svg);
static void cut_named_buffer_callback (GtkWidget *widget,
const gchar *name,
gpointer data);
static void copy_named_buffer_callback (GtkWidget *widget,
const gchar *name,
gpointer data);
static void copy_named_visible_buffer_callback (GtkWidget *widget,
const gchar *name,
gpointer data);
/* public functions */
void
edit_undo_cmd_callback (GtkAction *action,
gpointer data)
edit_undo_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDisplay *display;
@@ -98,8 +100,9 @@ edit_undo_cmd_callback (GtkAction *action,
}
void
edit_redo_cmd_callback (GtkAction *action,
gpointer data)
edit_redo_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDisplay *display;
@@ -114,8 +117,9 @@ edit_redo_cmd_callback (GtkAction *action,
}
void
edit_strong_undo_cmd_callback (GtkAction *action,
gpointer data)
edit_strong_undo_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
return_if_no_image (image, data);
@@ -125,8 +129,9 @@ edit_strong_undo_cmd_callback (GtkAction *action,
}
void
edit_strong_redo_cmd_callback (GtkAction *action,
gpointer data)
edit_strong_redo_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
return_if_no_image (image, data);
@@ -136,8 +141,9 @@ edit_strong_redo_cmd_callback (GtkAction *action,
}
void
edit_undo_clear_cmd_callback (GtkAction *action,
gpointer data)
edit_undo_clear_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpUndoStack *undo_stack;
@@ -205,29 +211,9 @@ edit_undo_clear_cmd_callback (GtkAction *action,
}
void
edit_fade_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
GtkWidget *dialog;
return_if_no_image (image, data);
return_if_no_widget (widget, data);
dialog = fade_dialog_new (image, widget);
if (dialog)
{
g_signal_connect_object (image, "disconnect",
G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
gtk_widget_show (dialog);
}
}
void
edit_cut_cmd_callback (GtkAction *action,
gpointer data)
edit_cut_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
@@ -235,6 +221,9 @@ edit_cut_cmd_callback (GtkAction *action,
GError *error = NULL;
return_if_no_drawable (image, drawable, data);
if (! check_drawable_alpha (drawable, data))
return;
cut = gimp_edit_cut (image, drawable, action_data_get_context (data),
&error);
@@ -262,8 +251,9 @@ edit_cut_cmd_callback (GtkAction *action,
}
void
edit_copy_cmd_callback (GtkAction *action,
gpointer data)
edit_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
@@ -298,8 +288,9 @@ edit_copy_cmd_callback (GtkAction *action,
}
void
edit_copy_visible_cmd_callback (GtkAction *action,
gpointer data)
edit_copy_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GError *error = NULL;
@@ -327,18 +318,18 @@ edit_copy_visible_cmd_callback (GtkAction *action,
}
void
edit_paste_cmd_callback (GtkAction *action,
gint value,
gpointer data)
edit_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDisplay *display = action_data_get_display (data);
GimpPasteType paste_type = (GimpPasteType) value;
GimpPasteType paste_type = (GimpPasteType) g_variant_get_int32 (value);
if (paste_type == GIMP_PASTE_TYPE_FLOATING)
{
if (! display || ! gimp_display_get_image (display))
{
edit_paste_as_new_image_cmd_callback (action, data);
edit_paste_as_new_image_cmd_callback (action, value, data);
return;
}
}
@@ -363,8 +354,9 @@ edit_paste_cmd_callback (GtkAction *action,
}
void
edit_paste_as_new_image_cmd_callback (GtkAction *action,
gpointer data)
edit_paste_as_new_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GtkWidget *widget;
@@ -397,8 +389,9 @@ edit_paste_as_new_image_cmd_callback (GtkAction *action,
}
void
edit_named_cut_cmd_callback (GtkAction *action,
gpointer data)
edit_named_cut_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
@@ -417,8 +410,9 @@ edit_named_cut_cmd_callback (GtkAction *action,
}
void
edit_named_copy_cmd_callback (GtkAction *action,
gpointer data)
edit_named_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
@@ -437,8 +431,9 @@ edit_named_copy_cmd_callback (GtkAction *action,
}
void
edit_named_copy_visible_cmd_callback (GtkAction *action,
gpointer data)
edit_named_copy_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GtkWidget *widget;
@@ -446,7 +441,7 @@ edit_named_copy_visible_cmd_callback (GtkAction *action,
return_if_no_image (image, data);
return_if_no_widget (widget, data);
dialog = gimp_query_string_box (_("Copy Visible Named "), widget,
dialog = gimp_query_string_box (_("Copy Visible Named"), widget,
gimp_standard_help_func,
GIMP_HELP_BUFFER_COPY,
_("Enter a name for this buffer"),
@@ -457,8 +452,9 @@ edit_named_copy_visible_cmd_callback (GtkAction *action,
}
void
edit_named_paste_cmd_callback (GtkAction *action,
gpointer data)
edit_named_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GtkWidget *widget;
@@ -474,21 +470,25 @@ edit_named_paste_cmd_callback (GtkAction *action,
}
void
edit_clear_cmd_callback (GtkAction *action,
gpointer data)
edit_clear_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
return_if_no_drawable (image, drawable, data);
if (! check_drawable_alpha (drawable, data))
return;
gimp_drawable_edit_clear (drawable, action_data_get_context (data));
gimp_image_flush (image);
}
void
edit_fill_cmd_callback (GtkAction *action,
gint value,
gpointer data)
edit_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
@@ -497,7 +497,7 @@ edit_fill_cmd_callback (GtkAction *action,
GError *error = NULL;
return_if_no_drawable (image, drawable, data);
fill_type = (GimpFillType) value;
fill_type = (GimpFillType) g_variant_get_int32 (value);
options = gimp_fill_options_new (action_data_get_gimp (data), NULL, FALSE);
@@ -521,6 +521,32 @@ edit_fill_cmd_callback (GtkAction *action,
/* private functions */
static gboolean
check_drawable_alpha (GimpDrawable *drawable,
gpointer data)
{
if (gimp_drawable_has_alpha (drawable) &&
GIMP_IS_LAYER (drawable) &&
gimp_layer_get_lock_alpha (GIMP_LAYER (drawable)))
{
Gimp *gimp = action_data_get_gimp (data);
GimpDisplay *display = action_data_get_display (data);
if (gimp && display)
{
gimp_message_literal (
gimp, G_OBJECT (display), GIMP_MESSAGE_WARNING,
_("The active layer's alpha channel is locked."));
gimp_tools_blink_lock_box (gimp, GIMP_ITEM (drawable));
}
return FALSE;
}
return TRUE;
}
static void
edit_paste (GimpDisplay *display,
GimpPasteType paste_type,
@@ -583,7 +609,10 @@ edit_paste (GimpDisplay *display,
/* the actual paste-type conversion happens in gimp_edit_paste() */
}
gimp_display_shell_untransform_viewport (shell, &x, &y, &width, &height);
gimp_display_shell_untransform_viewport (
shell,
! gimp_display_shell_get_infinite_canvas (shell),
&x, &y, &width, &height);
if (gimp_edit_paste (image, drawable, paste,
paste_type, x, y, width, height))

View File

@@ -12,54 +12,65 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __EDIT_COMMANDS_H__
#define __EDIT_COMMANDS_H__
void edit_undo_cmd_callback (GtkAction *action,
gpointer data);
void edit_redo_cmd_callback (GtkAction *action,
gpointer data);
void edit_strong_undo_cmd_callback (GtkAction *action,
gpointer data);
void edit_strong_redo_cmd_callback (GtkAction *action,
gpointer data);
void edit_undo_clear_cmd_callback (GtkAction *action,
gpointer data);
void edit_undo_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_redo_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_strong_undo_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_strong_redo_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_undo_clear_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_fade_cmd_callback (GtkAction *action,
gpointer data);
void edit_cut_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_copy_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_cut_cmd_callback (GtkAction *action,
gpointer data);
void edit_copy_cmd_callback (GtkAction *action,
gpointer data);
void edit_copy_visible_cmd_callback (GtkAction *action,
gpointer data);
void edit_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_paste_as_new_image_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_paste_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void edit_paste_as_new_image_cmd_callback (GtkAction *action,
gpointer data);
void edit_named_cut_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_named_copy_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_named_copy_visible_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_named_paste_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_named_cut_cmd_callback (GtkAction *action,
gpointer data);
void edit_named_copy_cmd_callback (GtkAction *action,
gpointer data);
void edit_named_copy_visible_cmd_callback (GtkAction *action,
gpointer data);
void edit_named_paste_cmd_callback (GtkAction *action,
gpointer data);
void edit_clear_cmd_callback (GtkAction *action,
gpointer data);
void edit_fill_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void edit_clear_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void edit_fill_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __EDIT_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -43,13 +43,13 @@ static const GimpActionEntry error_console_actions[] =
{ "error-console-clear", GIMP_ICON_EDIT_CLEAR,
NC_("error-console-action", "_Clear"), NULL,
NC_("error-console-action", "Clear error console"),
G_CALLBACK (error_console_clear_cmd_callback),
error_console_clear_cmd_callback,
GIMP_HELP_ERRORS_CLEAR },
{ "error-console-select-all", NULL,
NC_("error-console-action", "Select _All"), "",
NC_("error-console-action", "Select all error messages"),
G_CALLBACK (error_console_select_all_cmd_callback),
error_console_select_all_cmd_callback,
GIMP_HELP_ERRORS_SELECT_ALL },
{ "error-console-highlight", NULL,
@@ -77,21 +77,21 @@ static const GimpToggleActionEntry error_console_highlight_actions[] =
{ "error-console-highlight-error", NULL,
NC_("error-console-action", "_Errors"), NULL,
NC_("error-console-action", "Highlight error console on errors"),
G_CALLBACK (error_console_highlight_error_cmd_callback),
error_console_highlight_error_cmd_callback,
FALSE,
GIMP_HELP_ERRORS_HIGHLIGHT },
{ "error-console-highlight-warning", NULL,
NC_("error-console-action", "_Warnings"), NULL,
NC_("error-console-action", "Highlight error console on warnings"),
G_CALLBACK (error_console_highlight_warning_cmd_callback),
error_console_highlight_warning_cmd_callback,
FALSE,
GIMP_HELP_ERRORS_HIGHLIGHT },
{ "error-console-highlight-info", NULL,
NC_("error-console-action", "_Messages"), NULL,
NC_("error-console-action", "Highlight error console on messages"),
G_CALLBACK (error_console_highlight_info_cmd_callback),
error_console_highlight_info_cmd_callback,
FALSE,
GIMP_HELP_ERRORS_HIGHLIGHT }
};
@@ -107,7 +107,7 @@ error_console_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "error-console-action",
error_console_save_actions,
G_N_ELEMENTS (error_console_save_actions),
G_CALLBACK (error_console_save_cmd_callback));
error_console_save_cmd_callback);
gimp_action_group_add_toggle_actions (group, "error-console-action",
error_console_highlight_actions,

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ERROR_CONSOLE_ACIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -46,8 +46,9 @@ static void error_console_save_response (GtkWidget *dialog,
/* public functions */
void
error_console_clear_cmd_callback (GtkAction *action,
gpointer data)
error_console_clear_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
GtkTextIter start_iter;
@@ -58,8 +59,9 @@ error_console_clear_cmd_callback (GtkAction *action,
}
void
error_console_select_all_cmd_callback (GtkAction *action,
gpointer data)
error_console_select_all_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
GtkTextIter start_iter;
@@ -70,14 +72,16 @@ error_console_select_all_cmd_callback (GtkAction *action,
}
void
error_console_save_cmd_callback (GtkAction *action,
gint value,
gpointer data)
error_console_save_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
gboolean selection = (gboolean) g_variant_get_int32 (value);
if (value && ! gtk_text_buffer_get_selection_bounds (console->text_buffer,
NULL, NULL))
if (selection &&
! gtk_text_buffer_get_selection_bounds (console->text_buffer,
NULL, NULL))
{
gimp_message_literal (console->gimp,
G_OBJECT (console), GIMP_MESSAGE_WARNING,
@@ -104,7 +108,7 @@ error_console_save_cmd_callback (GtkAction *action,
GTK_RESPONSE_CANCEL,
-1);
console->save_selection = value;
console->save_selection = selection;
g_object_add_weak_pointer (G_OBJECT (dialog),
(gpointer) &console->file_dialog);
@@ -132,37 +136,34 @@ error_console_save_cmd_callback (GtkAction *action,
}
void
error_console_highlight_error_cmd_callback (GtkAction *action,
gpointer data)
error_console_highlight_error_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean active = g_variant_get_boolean (value);
console->highlight[GIMP_MESSAGE_ERROR] = active;
}
void
error_console_highlight_warning_cmd_callback (GtkAction *action,
gpointer data)
error_console_highlight_warning_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean active = g_variant_get_boolean (value);
console->highlight[GIMP_MESSAGE_WARNING] = active;
}
void
error_console_highlight_info_cmd_callback (GtkAction *action,
gpointer data)
error_console_highlight_info_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpErrorConsole *console = GIMP_ERROR_CONSOLE (data);
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gboolean active = g_variant_get_boolean (value);
console->highlight[GIMP_MESSAGE_INFO] = active;
}

View File

@@ -12,27 +12,32 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __ERROR_CONSOLE_COMMANDS_H__
#define __ERROR_CONSOLE_COMMANDS_H__
void error_console_clear_cmd_callback (GtkAction *action,
gpointer data);
void error_console_select_all_cmd_callback (GtkAction *action,
gpointer data);
void error_console_save_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void error_console_clear_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void error_console_select_all_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void error_console_save_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void error_console_highlight_error_cmd_callback (GtkAction *action,
gpointer data);
void error_console_highlight_warning_cmd_callback (GtkAction *action,
gpointer data);
void error_console_highlight_info_cmd_callback (GtkAction *action,
gpointer data);
void error_console_highlight_error_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void error_console_highlight_warning_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void error_console_highlight_info_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __ERROR_CONSOLE_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -39,6 +39,7 @@
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpactionimpl.h"
#include "widgets/gimphelp-ids.h"
#include "display/gimpdisplay.h"
@@ -75,55 +76,55 @@ static const GimpActionEntry file_actions[] =
{ "file-open", GIMP_ICON_IMAGE_OPEN,
NC_("file-action", "_Open..."), "<primary>O",
NC_("file-action", "Open an image file"),
G_CALLBACK (file_open_cmd_callback),
file_open_cmd_callback,
GIMP_HELP_FILE_OPEN },
{ "file-open-as-layers", GIMP_ICON_LAYER,
NC_("file-action", "Op_en as Layers..."), "<primary><alt>O",
NC_("file-action", "Open an image file as layers"),
G_CALLBACK (file_open_as_layers_cmd_callback),
file_open_as_layers_cmd_callback,
GIMP_HELP_FILE_OPEN_AS_LAYER },
{ "file-open-location", GIMP_ICON_WEB,
NC_("file-action", "Open _Location..."), NULL,
NC_("file-action", "Open an image file from a specified location"),
G_CALLBACK (file_open_location_cmd_callback),
file_open_location_cmd_callback,
GIMP_HELP_FILE_OPEN_LOCATION },
{ "file-create-template", NULL,
NC_("file-action", "Create Template..."), NULL,
NC_("file-action", "Create _Template..."), NULL,
NC_("file-action", "Create a new template from this image"),
G_CALLBACK (file_create_template_cmd_callback),
file_create_template_cmd_callback,
GIMP_HELP_FILE_CREATE_TEMPLATE },
{ "file-revert", GIMP_ICON_IMAGE_RELOAD,
NC_("file-action", "Re_vert"), NULL,
NC_("file-action", "Reload the image file from disk"),
G_CALLBACK (file_revert_cmd_callback),
file_revert_cmd_callback,
GIMP_HELP_FILE_REVERT },
{ "file-close-all", GIMP_ICON_CLOSE_ALL,
NC_("file-action", "Close all"), "<primary><shift>W",
NC_("file-action", "C_lose All"), "<primary><shift>W",
NC_("file-action", "Close all opened images"),
G_CALLBACK (file_close_all_cmd_callback),
file_close_all_cmd_callback,
GIMP_HELP_FILE_CLOSE_ALL },
{ "file-copy-location", GIMP_ICON_EDIT_COPY,
NC_("file-action", "Copy _Image Location"), NULL,
NC_("file-action", "Copy image file location to clipboard"),
G_CALLBACK (file_copy_location_cmd_callback),
file_copy_location_cmd_callback,
GIMP_HELP_FILE_COPY_LOCATION },
{ "file-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
NC_("file-action", "Show in _File Manager"), "<primary><alt>F",
NC_("file-action", "Show image file location in the file manager"),
G_CALLBACK (file_show_in_file_manager_cmd_callback),
file_show_in_file_manager_cmd_callback,
GIMP_HELP_FILE_SHOW_IN_FILE_MANAGER },
{ "file-quit", GIMP_ICON_APPLICATION_EXIT,
NC_("file-action", "_Quit"), "<primary>Q",
NC_("file-action", "Quit the GNU Image Manipulation Program"),
G_CALLBACK (file_quit_cmd_callback),
file_quit_cmd_callback,
GIMP_HELP_FILE_QUIT }
};
@@ -156,7 +157,7 @@ static const GimpEnumActionEntry file_save_actions[] =
GIMP_HELP_FILE_SAVE },
{ "file-export", NULL,
NC_("file-action", "Export..."), "<primary>E",
NC_("file-action", "E_xport..."), "<primary>E",
NC_("file-action", "Export the image"),
GIMP_SAVE_MODE_EXPORT, FALSE,
GIMP_HELP_FILE_EXPORT },
@@ -168,7 +169,7 @@ static const GimpEnumActionEntry file_save_actions[] =
GIMP_HELP_FILE_OVERWRITE },
{ "file-export-as", NULL,
NC_("file-action", "Export As..."), "<primary><shift>E",
NC_("file-action", "E_xport As..."), "<primary><shift>E",
NC_("file-action", "Export the image to various file formats such as PNG or JPEG"),
GIMP_SAVE_MODE_EXPORT_AS, FALSE,
GIMP_HELP_FILE_EXPORT_AS }
@@ -188,7 +189,7 @@ file_actions_setup (GimpActionGroup *group)
gimp_action_group_add_enum_actions (group, "file-action",
file_save_actions,
G_N_ELEMENTS (file_save_actions),
G_CALLBACK (file_save_cmd_callback));
file_save_cmd_callback);
n_entries = GIMP_GUI_CONFIG (group->gimp->config)->last_opened_size;
@@ -213,7 +214,7 @@ file_actions_setup (GimpActionGroup *group)
}
gimp_action_group_add_enum_actions (group, NULL, entries, n_entries,
G_CALLBACK (file_open_recent_cmd_callback));
file_open_recent_cmd_callback);
for (i = 0; i < n_entries; i++)
{
@@ -330,7 +331,7 @@ file_actions_update (GimpActionGroup *group,
{
gimp_action_group_set_action_label (group,
"file-export",
C_("file-action", "Export..."));
C_("file-action", "E_xport..."));
}
/* needed for the empty display */
@@ -355,17 +356,17 @@ file_actions_last_opened_update (GimpContainer *container,
for (i = 0; i < n; i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("file-open-recent-%02d", i + 1);
GimpAction *action;
gchar *name = g_strdup_printf ("file-open-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
action = gimp_action_group_get_action (group, name);
if (i < num_documents)
{
GimpImagefile *imagefile = (GimpImagefile *)
gimp_container_get_child_by_index (container, i);
if (GIMP_ACTION (action)->viewable != (GimpViewable *) imagefile)
if (GIMP_ACTION_IMPL (action)->viewable != (GimpViewable *) imagefile)
{
GFile *file;
const gchar *name;

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILE_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -103,8 +103,9 @@ static void file_revert_confirm_response (GtkWidget *dialog,
void
file_open_cmd_callback (GtkAction *action,
gpointer data)
file_open_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GtkWidget *widget;
@@ -120,8 +121,9 @@ file_open_cmd_callback (GtkAction *action,
}
void
file_open_as_layers_cmd_callback (GtkAction *action,
gpointer data)
file_open_as_layers_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GtkWidget *widget;
@@ -141,8 +143,9 @@ file_open_as_layers_cmd_callback (GtkAction *action,
}
void
file_open_location_cmd_callback (GtkAction *action,
gpointer data)
file_open_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GtkWidget *widget;
return_if_no_widget (widget, data);
@@ -155,22 +158,25 @@ file_open_location_cmd_callback (GtkAction *action,
}
void
file_open_recent_cmd_callback (GtkAction *action,
gint value,
gpointer data)
file_open_recent_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GimpImagefile *imagefile;
gint index;
gint num_entries;
return_if_no_gimp (gimp, data);
index = g_variant_get_int32 (value);
num_entries = gimp_container_get_n_children (gimp->documents);
if (value >= num_entries)
if (index >= num_entries)
return;
imagefile = (GimpImagefile *)
gimp_container_get_child_by_index (gimp->documents, value);
gimp_container_get_child_by_index (gimp->documents, index);
if (imagefile)
{
@@ -213,9 +219,9 @@ file_open_recent_cmd_callback (GtkAction *action,
}
void
file_save_cmd_callback (GtkAction *action,
gint value,
gpointer data)
file_save_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
@@ -230,7 +236,7 @@ file_save_cmd_callback (GtkAction *action,
image = gimp_display_get_image (display);
save_mode = (GimpSaveMode) value;
save_mode = (GimpSaveMode) g_variant_get_int32 (value);
if (! gimp_image_get_active_drawable (image))
return;
@@ -354,8 +360,9 @@ file_save_cmd_callback (GtkAction *action,
}
void
file_create_template_cmd_callback (GtkAction *action,
gpointer data)
file_create_template_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDisplay *display;
GimpImage *image;
@@ -376,8 +383,9 @@ file_create_template_cmd_callback (GtkAction *action,
}
void
file_revert_cmd_callback (GtkAction *action,
gpointer data)
file_revert_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpDisplay *display;
GimpImage *image;
@@ -448,8 +456,9 @@ file_revert_cmd_callback (GtkAction *action,
}
void
file_close_all_cmd_callback (GtkAction *action,
gpointer data)
file_close_all_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
return_if_no_gimp (gimp, data);
@@ -471,8 +480,9 @@ file_close_all_cmd_callback (GtkAction *action,
}
void
file_copy_location_cmd_callback (GtkAction *action,
gpointer data)
file_copy_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
@@ -495,8 +505,9 @@ file_copy_location_cmd_callback (GtkAction *action,
}
void
file_show_in_file_manager_cmd_callback (GtkAction *action,
gpointer data)
file_show_in_file_manager_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
@@ -524,8 +535,9 @@ file_show_in_file_manager_cmd_callback (GtkAction *action,
}
void
file_quit_cmd_callback (GtkAction *action,
gpointer data)
file_quit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
return_if_no_gimp (gimp, data);

View File

@@ -12,43 +12,52 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILE_COMMANDS_H__
#define __FILE_COMMANDS_H__
void file_open_cmd_callback (GtkAction *action,
gpointer data);
void file_open_as_layers_cmd_callback (GtkAction *action,
gpointer data);
void file_open_location_cmd_callback (GtkAction *action,
gpointer data);
void file_open_recent_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void file_open_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_open_as_layers_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_open_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_open_recent_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_save_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void file_create_template_cmd_callback (GtkAction *action,
gpointer data);
void file_save_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_create_template_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_revert_cmd_callback (GtkAction *action,
gpointer data);
void file_close_all_cmd_callback (GtkAction *action,
gpointer data);
void file_copy_location_cmd_callback (GtkAction *action,
gpointer data);
void file_show_in_file_manager_cmd_callback (GtkAction *action,
gpointer data);
void file_quit_cmd_callback (GtkAction *action,
gpointer data);
void file_revert_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_close_all_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_copy_location_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_show_in_file_manager_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_quit_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void file_file_open_dialog (Gimp *gimp,
GFile *file,
GtkWidget *parent);
void file_file_open_dialog (Gimp *gimp,
GFile *file,
GtkWidget *parent);
#endif /* __FILE_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -30,6 +30,7 @@
#include "pdb/gimpprocedure.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
@@ -57,7 +58,7 @@ static const GimpActionEntry filters_menu_actions[] =
{ "filters-menu", NULL, NC_("filters-action",
"Filte_rs") },
{ "filters-recent-menu", NULL, NC_("filters-action",
"Recently Used") },
"Recently _Used") },
{ "filters-blur-menu", NULL, NC_("filters-action",
"_Blur") },
{ "filters-noise-menu", NULL, NC_("filters-action",
@@ -111,7 +112,7 @@ static const GimpStringActionEntry filters_actions[] =
GIMP_HELP_FILTER_COLOR_ENHANCE },
{ "filters-invert-linear", GIMP_ICON_INVERT,
NC_("filters-action", "_Linear Invert"), NULL, NULL,
NC_("filters-action", "L_inear Invert"), NULL, NULL,
"gegl:invert-linear",
GIMP_HELP_FILTER_INVERT_LINEAR },
@@ -135,7 +136,7 @@ static const GimpStringActionEntry filters_settings_actions[] =
{
{ "filters-dilate", GIMP_ICON_GEGL,
NC_("filters-action", "_Dilate"), NULL,
NC_("drawable-action", "Grow lighter areas of the image"),
NC_("filters-action", "Grow lighter areas of the image"),
"gegl:value-propagate\n"
"(mode white)"
"(lower-threshold 0.000000)"
@@ -151,7 +152,7 @@ static const GimpStringActionEntry filters_settings_actions[] =
{ "filters-erode", GIMP_ICON_GEGL,
NC_("filters-action", "_Erode"), NULL,
NC_("drawable-action", "Grow darker areas of the image"),
NC_("filters-action", "Grow darker areas of the image"),
"gegl:value-propagate\n"
"(mode black)"
"(lower-threshold 0.000000)"
@@ -183,6 +184,16 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:apply-lens",
GIMP_HELP_FILTER_APPLY_LENS },
{ "filters-bayer-matrix", GIMP_ICON_GEGL,
NC_("filters-action", "_Bayer Matrix..."), NULL, NULL,
"gegl:bayer-matrix",
GIMP_HELP_FILTER_BAYER_MATRIX },
{ "filters-bloom", GIMP_ICON_GEGL,
NC_("filters-action", "_Bloom..."), NULL, NULL,
"gegl:bloom",
GIMP_HELP_FILTER_BLOOM },
{ "filters-brightness-contrast", GIMP_ICON_TOOL_BRIGHTNESS_CONTRAST,
NC_("filters-action", "B_rightness-Contrast..."), NULL, NULL,
"gimp:brightness-contrast",
@@ -279,22 +290,22 @@ static const GimpStringActionEntry filters_interactive_actions[] =
GIMP_HELP_FILTER_DESATURATE },
{ "filters-difference-of-gaussians", GIMP_ICON_GEGL,
NC_("filters-action", "Difference of Gaussians..."), NULL, NULL,
NC_("filters-action", "Difference of _Gaussians..."), NULL, NULL,
"gegl:difference-of-gaussians",
GIMP_HELP_FILTER_DIFFERENCE_OF_GAUSSIANS },
{ "filters-diffraction-patterns", GIMP_ICON_GEGL,
NC_("filters-action", "Diffraction Patterns..."), NULL, NULL,
NC_("filters-action", "D_iffraction Patterns..."), NULL, NULL,
"gegl:diffraction-patterns",
GIMP_HELP_FILTER_DIFFRACTION_PATTERNS },
{ "filters-displace", GIMP_ICON_GEGL,
NC_("filters-action", "Displace..."), NULL, NULL,
NC_("filters-action", "_Displace..."), NULL, NULL,
"gegl:displace",
GIMP_HELP_FILTER_DISPLACE },
{ "filters-distance-map", GIMP_ICON_GEGL,
NC_("filters-action", "Distance Map..."), NULL, NULL,
NC_("filters-action", "Distance _Map..."), NULL, NULL,
"gegl:distance-transform",
GIMP_HELP_FILTER_DISTANCE_MAP },
@@ -343,6 +354,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:fattal02",
GIMP_HELP_FILTER_FATTAL_2002 },
{ "filters-focus-blur", GIMP_ICON_GEGL,
NC_("filters-action", "_Focus Blur..."), NULL, NULL,
"gegl:focus-blur",
GIMP_HELP_FILTER_FOCUS_BLUR },
{ "filters-fractal-trace", GIMP_ICON_GEGL,
NC_("filters-action", "_Fractal Trace..."), NULL, NULL,
"gegl:fractal-trace",
@@ -398,13 +414,18 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:mirrors",
GIMP_HELP_FILTER_KALEIDOSCOPE },
{ "filters-lens-blur", GIMP_ICON_GEGL,
NC_("filters-action", "Le_ns Blur..."), NULL, NULL,
"gegl:lens-blur",
GIMP_HELP_FILTER_LENS_BLUR },
{ "filters-lens-distortion", GIMP_ICON_GEGL,
NC_("filters-action", "Lens Distortion..."), NULL, NULL,
NC_("filters-action", "Le_ns Distortion..."), NULL, NULL,
"gegl:lens-distortion",
GIMP_HELP_FILTER_LENS_DISTORTION },
{ "filters-lens-flare", GIMP_ICON_GEGL,
NC_("filters-action", "Lens Flare..."), NULL, NULL,
NC_("filters-action", "Lens _Flare..."), NULL, NULL,
"gegl:lens-flare",
GIMP_HELP_FILTER_LENS_FLARE },
@@ -413,6 +434,21 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gimp:levels",
GIMP_HELP_TOOL_LEVELS },
{ "filters-linear-sinusoid", GIMP_ICON_TOOL_LEVELS,
NC_("filters-action", "_Linear Sinusoid..."), NULL, NULL,
"gegl:linear-sinusoid",
GIMP_HELP_FILTER_LINEAR_SINUSOID },
{ "filters-little-planet", GIMP_ICON_GEGL,
NC_("filters-action", "_Little Planet..."), NULL, NULL,
"gegl:stereographic-projection",
GIMP_HELP_FILTER_LITTLE_PLANET },
{ "filters-long-shadow", GIMP_ICON_GEGL,
NC_("filters-action", "_Long Shadow..."), NULL, NULL,
"gegl:long-shadow",
GIMP_HELP_FILTER_LONG_SHADOW },
{ "filters-mantiuk-2006", GIMP_ICON_GEGL,
NC_("filters-action", "_Mantiuk 2006..."), NULL, NULL,
"gegl:mantiuk06",
@@ -423,6 +459,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:maze",
GIMP_HELP_FILTER_MAZE },
{ "filters-mean-curvature-blur", GIMP_ICON_GEGL,
NC_("filters-action", "Mean C_urvature Blur..."), NULL, NULL,
"gegl:mean-curvature-blur",
GIMP_HELP_FILTER_MEAN_CURVATURE_BLUR },
{ "filters-median-blur", GIMP_ICON_GEGL,
NC_("filters-action", "_Median Blur..."), NULL, NULL,
"gegl:median-blur",
@@ -458,13 +499,18 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:cell-noise",
GIMP_HELP_FILTER_NOISE_CELL },
{ "filters-newsprint", GIMP_ICON_GEGL,
NC_("filters-action", "_Newsprint..."), NULL, NULL,
"gegl:newsprint",
GIMP_HELP_FILTER_NEWSPRINT },
{ "filters-noise-cie-lch", GIMP_ICON_GEGL,
NC_("filters-action", "CIE lch Noise..."), NULL, NULL,
NC_("filters-action", "_CIE lch Noise..."), NULL, NULL,
"gegl:noise-cie-lch",
GIMP_HELP_FILTER_NOISE_CIE_LCH },
{ "filters-noise-hsv", GIMP_ICON_GEGL,
NC_("filters-action", "HSV Noise..."), NULL, NULL,
NC_("filters-action", "HS_V Noise..."), NULL, NULL,
"gegl:noise-hsv",
GIMP_HELP_FILTER_NOISE_HSV },
@@ -474,7 +520,7 @@ static const GimpStringActionEntry filters_interactive_actions[] =
GIMP_HELP_FILTER_NOISE_HURL },
{ "filters-noise-perlin", GIMP_ICON_GEGL,
NC_("filters-action", "_Perlin Noise..."), NULL, NULL,
NC_("filters-action", "Perlin _Noise..."), NULL, NULL,
"gegl:perlin-noise",
GIMP_HELP_FILTER_NOISE_PERLIN },
@@ -513,6 +559,16 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:noise-spread",
GIMP_HELP_FILTER_NOISE_SPREAD },
{ "filters-normal-map", GIMP_ICON_GEGL,
NC_("filters-action", "_Normal Map..."), NULL, NULL,
"gegl:normal-map",
GIMP_HELP_FILTER_NORMAL_MAP },
{ "filters-offset", GIMP_ICON_TOOL_OFFSET,
NC_("filters-action", "_Offset..."), "<primary><shift>O", NULL,
"gimp:offset",
GIMP_HELP_TOOL_OFFSET },
{ "filters-oilify", GIMP_ICON_GEGL,
NC_("filters-action", "Oili_fy..."), NULL, NULL,
"gegl:oilify",
@@ -669,7 +725,7 @@ static const GimpStringActionEntry filters_interactive_actions[] =
GIMP_HELP_FILTER_TILE_SEAMLESS },
{ "filters-unsharp-mask", GIMP_ICON_GEGL,
NC_("filters-action", "_Unsharp Mask..."), NULL, NULL,
NC_("filters-action", "Sharpen (_Unsharp Mask)..."), NULL, NULL,
"gegl:unsharp-mask",
GIMP_HELP_FILTER_UNSHARP_MASK },
@@ -678,6 +734,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:value-propagate",
GIMP_HELP_FILTER_VALUE_PROPAGATE },
{ "filters-variable-blur", GIMP_ICON_GEGL,
NC_("filters-action", "_Variable Blur..."), NULL, NULL,
"gegl:variable-blur",
GIMP_HELP_FILTER_VARIABLE_BLUR },
{ "filters-video-degradation", GIMP_ICON_GEGL,
NC_("filters-action", "Vi_deo Degradation..."), NULL, NULL,
"gegl:video-degradation",
@@ -740,28 +801,28 @@ filters_actions_setup (GimpActionGroup *group)
gimp_action_group_add_string_actions (group, "filters-action",
filters_actions,
G_N_ELEMENTS (filters_actions),
G_CALLBACK (filters_apply_cmd_callback));
filters_apply_cmd_callback);
filters_actions_set_tooltips (group, filters_actions,
G_N_ELEMENTS (filters_actions));
gimp_action_group_add_string_actions (group, "filters-action",
filters_settings_actions,
G_N_ELEMENTS (filters_settings_actions),
G_CALLBACK (filters_apply_cmd_callback));
filters_apply_cmd_callback);
filters_actions_set_tooltips (group, filters_settings_actions,
G_N_ELEMENTS (filters_settings_actions));
gimp_action_group_add_string_actions (group, "filters-action",
filters_interactive_actions,
G_N_ELEMENTS (filters_interactive_actions),
G_CALLBACK (filters_apply_interactive_cmd_callback));
filters_apply_interactive_cmd_callback);
filters_actions_set_tooltips (group, filters_interactive_actions,
G_N_ELEMENTS (filters_interactive_actions));
gimp_action_group_add_enum_actions (group, "filters-action",
filters_repeat_actions,
G_N_ELEMENTS (filters_repeat_actions),
G_CALLBACK (filters_repeat_cmd_callback));
filters_repeat_cmd_callback);
n_entries = gimp_filter_history_size (group->gimp);
@@ -779,7 +840,7 @@ filters_actions_setup (GimpActionGroup *group)
}
gimp_action_group_add_procedure_actions (group, entries, n_entries,
G_CALLBACK (filters_history_cmd_callback));
filters_history_cmd_callback);
for (i = 0; i < n_entries; i++)
{
@@ -801,10 +862,11 @@ filters_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable = NULL;
gboolean writable = FALSE;
gboolean gray = FALSE;
gboolean alpha = FALSE;
GimpDrawable *drawable = NULL;
gboolean writable = FALSE;
gboolean gray = FALSE;
gboolean alpha = FALSE;
gboolean supports_alpha = FALSE;
image = action_data_get_image (data);
@@ -816,8 +878,9 @@ filters_actions_update (GimpActionGroup *group,
{
GimpItem *item;
alpha = gimp_drawable_has_alpha (drawable);
gray = gimp_drawable_is_gray (drawable);
gray = gimp_drawable_is_gray (drawable);
alpha = gimp_drawable_has_alpha (drawable);
supports_alpha = gimp_drawable_supports_alpha (drawable);
if (GIMP_IS_LAYER_MASK (drawable))
item = GIMP_ITEM (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
@@ -838,6 +901,8 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-antialias", writable);
SET_SENSITIVE ("filters-apply-canvas", writable);
SET_SENSITIVE ("filters-apply-lens", writable);
SET_SENSITIVE ("filters-bayer-matrix", writable);
SET_SENSITIVE ("filters-bloom", writable);
SET_SENSITIVE ("filters-brightness-contrast", writable);
SET_SENSITIVE ("filters-bump-map", writable);
SET_SENSITIVE ("filters-c2g", writable && !gray);
@@ -851,7 +916,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-dither", writable);
SET_SENSITIVE ("filters-color-rotate", writable);
SET_SENSITIVE ("filters-color-temperature", writable && !gray);
SET_SENSITIVE ("filters-color-to-alpha", writable && !gray && alpha);
SET_SENSITIVE ("filters-color-to-alpha", writable && supports_alpha);
SET_SENSITIVE ("filters-component-extract", writable);
SET_SENSITIVE ("filters-convolution-matrix", writable);
SET_SENSITIVE ("filters-cubism", writable);
@@ -873,6 +938,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-erode", writable);
SET_SENSITIVE ("filters-exposure", writable);
SET_SENSITIVE ("filters-fattal-2002", writable);
SET_SENSITIVE ("filters-focus-blur", writable);
SET_SENSITIVE ("filters-fractal-trace", writable);
SET_SENSITIVE ("filters-gaussian-blur", writable);
SET_SENSITIVE ("filters-gaussian-blur-selective", writable);
@@ -887,17 +953,23 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-invert-value", writable);
SET_SENSITIVE ("filters-image-gradient", writable);
SET_SENSITIVE ("filters-kaleidoscope", writable);
SET_SENSITIVE ("filters-lens-blur", writable);
SET_SENSITIVE ("filters-lens-distortion", writable);
SET_SENSITIVE ("filters-lens-flare", writable);
SET_SENSITIVE ("filters-levels", writable);
SET_SENSITIVE ("filters-linear-sinusoid", writable);
SET_SENSITIVE ("filters-little-planet", writable);
SET_SENSITIVE ("filters-long-shadow", writable && alpha);
SET_SENSITIVE ("filters-mantiuk-2006", writable);
SET_SENSITIVE ("filters-maze", writable);
SET_SENSITIVE ("filters-mean-curvature-blur", writable);
SET_SENSITIVE ("filters-median-blur", writable);
SET_SENSITIVE ("filters-mono-mixer", writable && !gray);
SET_SENSITIVE ("filters-mosaic", writable);
SET_SENSITIVE ("filters-motion-blur-circular", writable);
SET_SENSITIVE ("filters-motion-blur-linear", writable);
SET_SENSITIVE ("filters-motion-blur-zoom", writable);
SET_SENSITIVE ("filters-newsprint", writable);
SET_SENSITIVE ("filters-noise-cell", writable);
SET_SENSITIVE ("filters-noise-cie-lch", writable);
SET_SENSITIVE ("filters-noise-hsv", writable && !gray);
@@ -910,6 +982,8 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-noise-slur", writable);
SET_SENSITIVE ("filters-noise-solid", writable);
SET_SENSITIVE ("filters-noise-spread", writable);
SET_SENSITIVE ("filters-normal-map", writable);
SET_SENSITIVE ("filters-offset", writable);
SET_SENSITIVE ("filters-oilify", writable);
SET_SENSITIVE ("filters-panorama-projection", writable);
SET_SENSITIVE ("filters-photocopy", writable);
@@ -944,6 +1018,7 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-tile-seamless", writable);
SET_SENSITIVE ("filters-unsharp-mask", writable);
SET_SENSITIVE ("filters-value-propagate", writable);
SET_SENSITIVE ("filters-variable-blur", writable);
SET_SENSITIVE ("filters-video-degradation", writable);
SET_SENSITIVE ("filters-vignette", writable);
SET_SENSITIVE ("filters-waterpixels", writable);
@@ -957,7 +1032,8 @@ filters_actions_update (GimpActionGroup *group,
GimpProcedure *proc = gimp_filter_history_nth (group->gimp, 0);
gint i;
if (proc && gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable)))
if (proc &&
gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable), NULL))
{
gimp_action_group_set_action_sensitive (group, "filters-repeat", TRUE);
gimp_action_group_set_action_sensitive (group, "filters-reshow", TRUE);
@@ -975,7 +1051,8 @@ filters_actions_update (GimpActionGroup *group,
proc = gimp_filter_history_nth (group->gimp, i);
sensitive = gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable));
sensitive = gimp_procedure_get_sensitive (proc, GIMP_OBJECT (drawable),
NULL);
gimp_action_group_set_action_sensitive (group, name, sensitive);
@@ -1038,7 +1115,7 @@ filters_actions_history_changed (Gimp *gimp,
if (proc)
{
GtkAction *actual_action = NULL;
GimpAction *actual_action = NULL;
const gchar *label;
gchar *repeat;
gchar *reshow;
@@ -1058,8 +1135,8 @@ filters_actions_history_changed (Gimp *gimp,
if (g_str_has_prefix (gimp_object_get_name (proc), "filters-"))
{
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (group),
gimp_object_get_name (proc));
gimp_action_group_get_action (group,
gimp_object_get_name (proc));
}
else if (plug_in_group)
{
@@ -1070,12 +1147,12 @@ filters_actions_history_changed (Gimp *gimp,
* #517683.
*/
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
gimp_object_get_name (proc));
gimp_action_group_get_action (plug_in_group,
gimp_object_get_name (proc));
}
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
sensitive = gimp_action_get_sensitive (actual_action);
gimp_action_group_set_action_sensitive (group, "filters-repeat",
sensitive);
@@ -1095,14 +1172,14 @@ filters_actions_history_changed (Gimp *gimp,
for (i = 0; i < gimp_filter_history_length (gimp); i++)
{
GtkAction *action;
GtkAction *actual_action = NULL;
GimpAction *action;
GimpAction *actual_action = NULL;
const gchar *label;
gchar *name;
gboolean sensitive = FALSE;
name = g_strdup_printf ("filters-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
action = gimp_action_group_get_action (group, name);
g_free (name);
proc = gimp_filter_history_nth (gimp, i);
@@ -1112,19 +1189,19 @@ filters_actions_history_changed (Gimp *gimp,
if (g_str_has_prefix (gimp_object_get_name (proc), "filters-"))
{
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (group),
gimp_object_get_name (proc));
gimp_action_group_get_action (group,
gimp_object_get_name (proc));
}
else if (plug_in_group)
{
/* see comment above */
actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
gimp_object_get_name (proc));
gimp_action_group_get_action (plug_in_group,
gimp_object_get_name (proc));
}
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
sensitive = gimp_action_get_sensitive (actual_action);
g_object_set (action,
"visible", TRUE,
@@ -1138,10 +1215,10 @@ filters_actions_history_changed (Gimp *gimp,
for (; i < gimp_filter_history_size (gimp); i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("filters-recent-%02d", i + 1);
GimpAction *action;
gchar *name = g_strdup_printf ("filters-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
action = gimp_action_group_get_action (group, name);
g_free (name);
g_object_set (action,

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILTERS_ACTIONS_H__

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -29,12 +29,14 @@
#include "actions-types.h"
#include "operations/gimp-operation-config.h"
#include "operations/gimpoperationsettings.h"
#include "core/gimp.h"
#include "core/gimp-filter-history.h"
#include "core/gimpimage.h"
#include "core/gimpprogress.h"
#include "core/gimpsettings.h"
#include "widgets/gimpaction.h"
#include "actions.h"
#include "filters-commands.h"
@@ -58,9 +60,9 @@ static void filters_run_procedure (Gimp *gimp,
/* public functions */
void
filters_apply_cmd_callback (GtkAction *action,
const gchar *operation_str,
gpointer data)
filters_apply_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
@@ -70,19 +72,18 @@ filters_apply_cmd_callback (GtkAction *action,
return_if_no_drawable (image, drawable, data);
operation = filters_parse_operation (image->gimp,
operation_str,
gtk_action_get_icon_name (action),
g_variant_get_string (value, NULL),
gimp_action_get_icon_name (action),
&settings);
procedure = gimp_gegl_procedure_new (image->gimp,
GIMP_RUN_NONINTERACTIVE, settings,
operation,
gtk_action_get_name (action),
gtk_action_get_label (action),
gtk_action_get_tooltip (action),
gtk_action_get_icon_name (action),
g_object_get_qdata (G_OBJECT (action),
GIMP_HELP_ID));
gimp_action_get_name (action),
gimp_action_get_label (action),
gimp_action_get_tooltip (action),
gimp_action_get_icon_name (action),
gimp_action_get_help_id (action));
g_free (operation);
@@ -90,15 +91,17 @@ filters_apply_cmd_callback (GtkAction *action,
g_object_unref (settings);
gimp_filter_history_add (image->gimp, procedure);
filters_history_cmd_callback (NULL, procedure, data);
filters_history_cmd_callback (NULL,
g_variant_new_uint64 (GPOINTER_TO_SIZE (procedure)),
data);
g_object_unref (procedure);
}
void
filters_apply_interactive_cmd_callback (GtkAction *action,
const gchar *operation,
gpointer data)
filters_apply_interactive_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
@@ -107,49 +110,58 @@ filters_apply_interactive_cmd_callback (GtkAction *action,
procedure = gimp_gegl_procedure_new (image->gimp,
GIMP_RUN_INTERACTIVE, NULL,
operation,
gtk_action_get_name (action),
gtk_action_get_label (action),
gtk_action_get_tooltip (action),
gtk_action_get_icon_name (action),
g_object_get_qdata (G_OBJECT (action),
GIMP_HELP_ID));
g_variant_get_string (value, NULL),
gimp_action_get_name (action),
gimp_action_get_label (action),
gimp_action_get_tooltip (action),
gimp_action_get_icon_name (action),
gimp_action_get_help_id (action));
gimp_filter_history_add (image->gimp, procedure);
filters_history_cmd_callback (NULL, procedure, data);
filters_history_cmd_callback (NULL,
g_variant_new_uint64 (GPOINTER_TO_SIZE (procedure)),
data);
g_object_unref (procedure);
}
void
filters_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data)
filters_repeat_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpDrawable *drawable;
GimpDisplay *display;
GimpProcedure *procedure;
GimpRunMode run_mode;
return_if_no_drawable (image, drawable, data);
return_if_no_display (display, data);
run_mode = (GimpRunMode) g_variant_get_int32 (value);
procedure = gimp_filter_history_nth (image->gimp, 0);
if (procedure)
filters_run_procedure (image->gimp, display, procedure,
(GimpRunMode) value);
filters_run_procedure (image->gimp, display, procedure, run_mode);
}
void
filters_history_cmd_callback (GtkAction *action,
GimpProcedure *procedure,
gpointer data)
filters_history_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
Gimp *gimp;
GimpDisplay *display;
GimpProcedure *procedure;
gsize hack;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
hack = g_variant_get_uint64 (value);
procedure = GSIZE_TO_POINTER (hack);
filters_run_procedure (gimp, display, procedure, GIMP_RUN_INTERACTIVE);
}
@@ -181,7 +193,7 @@ filters_parse_operation (Gimp *gimp,
*settings =
g_object_new (gimp_operation_config_get_type (gimp, operation,
icon_name,
GIMP_TYPE_SETTINGS),
GIMP_TYPE_OPERATION_SETTINGS),
NULL);
if (! gimp_config_deserialize_string (GIMP_CONFIG (*settings),

View File

@@ -12,26 +12,26 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FILTERS_COMMANDS_H__
#define __FILTERS_COMMANDS_H__
void filters_apply_cmd_callback (GtkAction *action,
const gchar *operation,
gpointer data);
void filters_apply_interactive_cmd_callback (GtkAction *action,
const gchar *operation,
gpointer data);
void filters_apply_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void filters_apply_interactive_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void filters_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void filters_history_cmd_callback (GtkAction *action,
GimpProcedure *procedure,
gpointer data);
void filters_repeat_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
void filters_history_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data);
#endif /* __FILTERS_COMMANDS_H__ */

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -32,8 +32,8 @@
#include "widgets/gimphelp-ids.h"
#include "actions.h"
#include "data-commands.h"
#include "fonts-actions.h"
#include "fonts-commands.h"
#include "gimp-intl.h"
@@ -47,7 +47,7 @@ static const GimpActionEntry fonts_actions[] =
{ "fonts-refresh", GIMP_ICON_VIEW_REFRESH,
NC_("fonts-action", "_Rescan Font List"), NULL,
NC_("fonts-action", "Rescan the installed fonts"),
G_CALLBACK (fonts_refresh_cmd_callback),
data_refresh_cmd_callback,
GIMP_HELP_FONT_REFRESH }
};

View File

@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FONTS_ACTIONS_H__

Some files were not shown because too many files have changed in this diff Show More