Commit Graph

47895 Commits

Author SHA1 Message Date
Jehan cfc770b85e Coding Style: update regarding tabs in Makefile-s.
Possibly the only place where we expect them?
2022-01-27 01:19:26 +01:00
Jehan 7a2f4b82f0 icons, tools: add a comment to generated icon-list.mk.
Just so that someone who happens to look in there is not tempted to
modify these files directly and get some instructions.
The comment is inspired from other similarly generated Makefile.am (i.e.
in plug-ins/commons/).
2022-01-27 01:00:20 +01:00
Jehan 3ed7c92f25 icons: regenerate the icon-list.mk-s with the new tool.
The lists are still exactly the same (except for one icon file whose
name the script fixed, which proves its usage/need even starting this
initial commit).

Now we also get more consistent tabbing than the manual one. Only
missing thing is that it was nice to separate some icons by categories
for easy reading. Maybe later.
2022-01-27 00:49:51 +01:00
Jehan fc12d9e414 tools: new tool to generate the icon-list.mk-s from icons/icon-lists/…
… listing.

This way, both the Color and Symbolic icon themes, both on meson and
autotools build systems all share the exact same list of icons.

I think there are still improvements to be done on what we list and
chosen sizes and icon categories. But this step is about just getting on
the same state as we currently are, simply with shared listings. Once we
are there, we can go forward.
2022-01-27 00:49:12 +01:00
Jehan 8aee873c95 icons: remove use of meson 'fs' module.
I realize that this module is available since meson 0.53.0 though our
current requirement is meson 0.50.0.
Note sure why meson was not popping any warning (normally it does when
we use a feature younger than the minimum requirement; but maybe this
doesn't work for modules).

Anyway this does the same thing without the 'fs' module, and maybe even
better (we know which icons should be converted or used from source, no
need to add any test logics here).
2022-01-26 16:43:18 +01:00
Jehan 8f0d67779c meson: rename -Dvec-icons to -Dvector-icons.
Should we really be that stingy for letters that we don't want to use
full words?! :-D
Let's have clear option names.
2022-01-26 02:55:27 +01:00
Jehan 784a209ba2 icons: share the same list for symbolic and color icons in meson.
Now we get back (slowly) to something a bit saner, with a common list
shared on both icon themes. This way, we make sure we won't miss any
icon when we will add/remove/change any icon.

This is only for the meson build right now, but next step is to use the
same list in the autotools build as well. This will get maximum
consistency across build systems.
2022-01-26 02:48:30 +01:00
Jehan 11183f4fa4 icons: have -Dvec-icons=false option work with meson.
The whole logics of creating specially prepared PNG images for vector
icons (with gtk-encode-symbolic-svg) was absent. This option was
basically completely broken, yet we now know that we need the ability to
install PNG alternatives for the icons (see #6821).

This is a continuation of previous commit which is straightening a bit
our whole icon theme builds. Note though that more needs to be done
because I definitely still see room for more mess and far too much
duplication.
2022-01-26 01:04:27 +01:00
Jehan ae861e01cd icons: sync all icon lists between autotools and meson.
Some icons were missing on one side or another side, though mostly on
the meson build. Also the option -Dvec-icons=false was basically
completely broken and clearly untested, most likely ever since the
original meson build contribution.

This commit doesn't even completely fix the non-vector icon rule,
because even the file names are wrong, and the bitmap icons are not even
constructed from their vector counterpart! I am going to fix this in the
next commit.
2022-01-25 22:12:38 +01:00
Jehan d266100ab7 devel-docs: update icons.txt and icon theme section in README. 2022-01-25 17:27:48 +01:00
Jehan a08224f7b3 INSTALL: update the install instructions regarding librsvg.
Currently it's a mandatory option (and it has been the case for years,
ever since commit 43e218859b) so let's update the info.

Note that there are still discussions going on about this dependency and
it being hard or impossible to build on many platforms (which are stuck
on old C version, before the move to Rust). See #6821.
We'll see how it goes.
2022-01-25 01:33:34 +01:00
Jehan 650e0fa7f3 build: sync nightly flatpak with updates from the dev flatpak.
This includes:
- "copy-icon" set
- Permission and cleanup rules updated
- Exiv2 bumped to 0.27.5
- Adding an x-checker-data for OpenEXR
- Poppler bumped to 22.01.00
- OpenBlas bumped to 0.3.19
- graphviz bumped to 2.50.0
2022-01-25 01:21:55 +01:00
Matej Urbančič 54e2c30f82 Update Slovenian translation 2022-01-24 19:57:55 +00:00
Jehan 996e5ef1eb icons: fix missing icons with the --disable-vector-icons option.
We should really get back to a single shared list as we have in
gimp-2-10.

Also just keeping the "no SVG icons" option feels wrong to me, yet it
turns out librsvg is quite a problem because of Rust, so recent versions
are just not available on many platforms (see #6821). This is what
blocked me so far to remove this whole listing of PNG variants for our
vector icon themes. Otherwise they would be gone by now.

I really wonder as well about all these size categories. Not that they
are not needed when in PNG format, but because it feels like nobody has
really taken the time to list which icons are needed in which size for
years. We really need to do some cleaning in this area.
2022-01-24 17:21:08 +01:00
Lukas Oberhuber 96c23903bc macos: support standard fullscreen
This moves to standard fullscreen behavior for Gimp.

Added benefit is that it no longer requires gdkquartz-cocoa-access.h
which the Gtk team wish to stop supporting https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4303.

Bug 756178 also no longer manifests, cdc7542d46
so it is now safe to do.

Finally, removes dependency on objective c in the app/display directory.
2022-01-24 14:49:42 +00:00
Jehan 84d298d4d3 devel-docs: fix autotools dist rules.
Since I removed some files and forgot to change these rules. Though I
actually wonder if this still makes sense to distribute all these files
within the tarball anymore. It made sense in the way software was
distributed 20 years ago, but nowadays people who want to develop would
clone the git repo not get a tarball. We'll see.
2022-01-24 15:45:43 +01:00
Boyuan Yang c2ef33e63c Update Chinese (China) translation 2022-01-24 13:55:14 +00:00
Lukas Oberhuber ce90cc28a1 macos: support python plugins in meson
This change makes sure that plugins can load when gimp is built with
meson. This is because .typelibs and .gir files do not have full library
paths when build using meson (this is different from autotools).
2022-01-24 02:12:22 +00:00
Piotr Drąg 10fe910728 Update Polish translation 2022-01-23 12:34:01 +01:00
Jehan 4065c33bf0 devel-docs: update the developer documentation further.
Add some more text and links to existing documents.

I also remove 3 files which are now either outdated or whose contents is
also written (with more or less similar text) in other more up-to-date
files.
2022-01-23 01:05:58 +01:00
Jehan 67a1d9f4d0 devel-docs: update further the devel docs.
Add more links to other files after I reviewed they were still relevant.

The `gitlab-milestones.txt` in particular had to be updated because the
contents was outdated (though we still need to manage milestones, simply
now we are a bit more fine-grained).
2022-01-22 23:00:50 +01:00
Jehan e4cb7e12b4 devel-docs: add CI info in developer docs.
Also remove the now deprecated Jenkins tutorial. We have not had this CI
system running for some time now, and the Gitlab CI has totally replaced
it.
2022-01-22 21:55:50 +01:00
Jehan fac84db028 devel-docs: add directory structure of the repo to developer docs.
Loosely based on the old structure.xml, except it was widely outdated.
So I removed or updated what was obsolete and added missing folders.

Obviously getting rid of the old `structure.xml` (now we have easier doc
generation through Gitlab).

Finally, I fix the table of contents and replaced the title with some
metadata-style stuff which Gitlab docs suggest (otherwise the document
title ends up in the table of contents, which is a bit silly).
2022-01-22 17:44:38 +01:00
Jehan 66cfa75291 tools: add a `flatpak-releases` tool for quick testing with Flatpak.
Sometimes we want to make quick tests on old versions of GIMP.
Rebuilding from source is definitely still an option, yet with flatpak,
we have many past builds available easily to us (at time of writing: 19
stable builds, 12 dev point-release builds and at least 3 nightlies —
though I seem to have issues with signatures on gnome-nightly right now,
so maybe there are more!).

There are some command lines needed to check the build history, then to
install a specific build, which I explained in developer docs (see
devel-docs/debugging-tips.txt, section "Testing older GIMP versions").
Yet it's clearly cumbersome and slow so I wrote this script today to
automatize the process a bit.

Running simply this command will list all available releases on the
Flathub repository (adding --beta or --nightly will list the development
releases and nightly builds instead):

$ tools/flatpak-releases

The listing will contain a topic describing the build as well as the
date, all this prefixed by a number. For instance, this is an excerpt of
the output for the dev releases:

$ tools/flatpak-releases --beta
 0: Update dependencies (127a0fa7) [2022-01-13 16:59:43 +0000]
 1: Issue #106:  File->Create->From Screenshot not working. (9c831b14) [2021-12-14 21:46:52 +0000]
 2: Release GIMP 2.99.8. (908bf5b0) [2021-10-20 20:29:00 +0000]
 3: Release GIMP 2.99.6. (e04355dd) [2021-04-26 14:08:32 +0000]
 …

The last build updates dependencies, the previous one fixes some
specific issue and the 2 previous ones are point releases.
Now say I needed to test/compare some behavior with how it was in 2.99.6
(e.g. to verify a regression), I would then run:

$ tools/flatpak-releases --beta -3

This would install this specific dev build number 3. In just 2
easy-to-remember commands and a few seconds, we can therefore list and
install specific Flatpak builds.
2022-01-22 16:04:35 +01:00
Anders Jonsson db5964ba90 Update Swedish translation 2022-01-21 20:19:58 +00:00
Nikc 998479706b Issue #4107: Removing titlebar/borders from Windows Splash Screen 2022-01-21 13:49:18 +00:00
Jehan 1aeee787a8 devel-docs: add a README.md.
This will be the root page for the developer documentation. Note that
there are other files in this directory (old `README` included) which
will need to be deleted but I don't do it just yet on purpose until I
checked them and integrate anything which could be of interest back into
the new documentation.
2022-01-20 22:14:07 +01:00
Jehan b35c44cb05 devel-docs: move specifications to their own subfolder.
Let's make the devel-docs folder a bit less crowded.
2022-01-20 20:41:44 +01:00
Jehan 2e8abf46ee libgimpbase: undeprecate GExiv2 calls in GimpMetadata.
There are still deprecations going around but for GExiv2 0.14.0 so we
can't change these yet.

Note also that I try a slightly different approach as I don't set a
GError for well-known tags as there is no reason these fail. I only add
a GError when we construct tags or similar calls.
2022-01-20 20:18:53 +01:00
Jehan c76172d971 libgimp: more un-deprecating GExiv2.
Last deprecated usages in this file. Actually there are a few other
calls but deprecated on GExiv2 0.14.0, hence over our current
requirement. So we'll have to handle these later.
2022-01-20 18:45:08 +01:00
Jehan 0d33ede670 libgimp: undeprecate some more GExiv2 calls.
Replace functions gexiv2_metadata_set_xmp_tag_struct() and
gexiv2_metadata_get_tag_type() with their _try_ variants.

Note that I print to stderr rather than raising a warning here as I am
quite unsure where the list of XMP metadata we are gathering comes from.
Is it fully validated by GExiv2, and therefore no errors are ever
supposed to happen? (in such case, we should raise a warning if it does)
Or is it user-provided data (e.g. from a file loaded in GIMP which can
contain broken metadata)? In such a case, we should probably handle the
error slightly differently to warn for non-processable data (hence
possibly metadata loss at export time).

For the time being, then go with this weak handling and take care of
this better when we can look further into this.
2022-01-20 18:26:07 +01:00
Jehan e3c803299a libgimp: port a bunch of gexiv2_metadata_set_tag_string() to …
… gexiv2_metadata_try_set_tag_string().

These are usage where we have full control over tag names and values so
no error is supposed to happen. This is why we use them as code warnings
and not returned error (because if an error did happen, this would be a
bug rather than a user error or a system error).
2022-01-20 17:56:28 +01:00
Jehan 96e25b7817 libgimp: fix and workaround Exif.Photo.UserComment interpretation.
Here are the changes:
- Separate the check for comment contents and the one of whether or not
  it starts with "charset=Ascii ". Indeed in my tests, we still want to
  handle the empty string case or the "binary comment" case even without
  the charset prefix (currently it was both or none, so I encountered
  cases with a broken "binary comment" comment because the charset
  prefix was absent).
- Add some #warning in order not to forget to remove the bogus "binary
  comment" test. Indeed after some digging in Exiv2 code, I could
  confirm this return value got removed in commit 9b510858 of Exiv2
  repository, i.e. since Exiv2 0.27.4. Now in my test case where I had a
  tag containing only 0s, Exiv2 returns an empty string, which is
  perfectly fine (and it's up to us to keep or ignore it).
- Use gexiv2_metadata_try_get_tag_interpreted_string() instead of their
  deprecate non-try counterparses. Right now, I am just outputting any
  error message to stderr, as I'm not sure if this is the kind of errors
  we want to warn people about. I guess it would depend on which type of
  errors exactly are returned, so let's see if we encounter some case in
  the future. For now stderr is fine to detect these.
2022-01-20 16:47:04 +01:00
Jehan 3294586438 libgimpcolor: use the proper GimpColorRenderingIntent type.
GimpColorRenderingIntent and BablIccIntent are actually 1-on-1
equivalent (for the common base values), but it's better anyway to call
with the right type. Also fixes this warning:

> libgimpcolor/gimpcolortransform.c:215:53: warning: implicit conversion
> from 'enum <anonymous>' to 'GimpColorRenderingIntent'
> [-Wenum-conversion]
2022-01-20 12:08:00 +01:00
Jehan 3d97a408ea clang-format: improve according to our coding style.
- Align macro values.
- Align backslashes to escape newlines.
- Added explicit PointerAlignment though this one seems unneeded.
- Increase the column limit (even though 80 is really the official one)
  and add some penalty on breaking on very unexpected places, such as
  around assignments or on first parameters in calls/declaration. We
  want short lines but this is more of a soft rule which should not
  override sensible line breaking rules.
- Group some rules and reorder rule names alphabetically within groups.
2022-01-19 23:17:23 +01:00
Jehan 1e47c8916a .gitlab: search common git ancestor with `mr-origin` remote.
It looks like origin is the same as mr-origin when the contributor
pushes to one's branch. But when a reviewer rebases through the Gitlab
"Rebase" button on web GUI, I got a fatal error:

> fatal: ambiguous argument 'origin/asalle/use-dynamics-flag': unknown
  revision or path not in the working tree.

Possibly `origin` is then the remote of the person who rebased (it would
be weird, yet it's a fact the branch is not found). Let's go with this
assumption.
2022-01-19 22:22:40 +01:00
Asa 9385a6405a .gitlab-ci.yml: add clang-format rules and pipeline
Fixes #950

`.gitlab/search-common-ancestor.sh`'s original authors are
Philip Withnall and Frederic Martinsons.
(Jehan/reviewer's note: script further improved by Asalle)
2022-01-19 20:44:45 +00:00
Hugo Carvalho 26ed0d63cd Update Portuguese translation 2022-01-19 16:10:01 +00:00
Jehan df06eebe8b Coding style: update.
- Add recommendations on whether to break MRs into 1 or more commits.
- Add style for one-line struct initialization.
- Protect some texts in backticks' markdown syntax.
2022-01-19 16:36:59 +01:00
Nikc 94c7f80282 Issue #4009: enables option to capture cursor in screenshot (Windows) 2022-01-19 01:28:47 +00:00
Yuri Chornoivan 5c4c5c5b5e Update Ukrainian translation 2022-01-18 22:56:41 +00:00
Jacob Boerema e51ca66ee5 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.
2022-01-18 16:30:28 -05:00
Jacob Boerema 059599fc78 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).
2022-01-18 15:00:22 -05:00
Rodrigo Lledó 1c8aad4f68 Update Spanish translation 2022-01-16 22:31:26 +00:00
Matej Urbančič 0986fec1fb Update Slovenian translation 2022-01-16 21:30:49 +00:00
Matej Urbančič 3f8934b33a Update Slovenian translation 2022-01-16 21:29:47 +00:00
Hugo Carvalho 794b27ef62 Update Portuguese translation 2022-01-13 11:57:03 +00:00
Rodrigo Lledó 2fe6b11158 Update Spanish translation 2022-01-11 18:17:49 +00:00
Marco Ciampa 3f6bf3cee9 Updated Italian translation 2022-01-11 10:58:43 +01:00
Marco Ciampa c27e972778 Updated Italian translation 2022-01-11 08:54:23 +01:00