Commit Graph

48971 Commits

Author SHA1 Message Date
Martin 6441008fa5 Update Slovenian translation 2022-10-12 20:18:14 +00:00
Jehan 9fc8260c7c app: "vectors-copy" and "vectors-export" are now multi-paths aware. 2022-10-12 22:13:38 +02:00
Jehan fde780daeb app: "vectors-(raise|lower)*" actions now multi-paths aware. 2022-10-12 21:45:13 +02:00
Jehan 2835e85950 app: make the "vectors-select-*" actions multi-selection aware. 2022-10-12 21:21:22 +02:00
Jehan acf428b24c app: get rid of one more gimp_image_get_active_vectors(). 2022-10-12 18:02:43 +02:00
Jehan 925d4c317f app: cleaning unused variables.
Removing build warnings!
2022-10-12 17:53:04 +02:00
Jehan 131cdf0f1c app: fix preview for multi-layer transform.
Though it was working in the "Composited preview" case, it was only showing one
of the multiple layers being transformed in the basic case.
2022-10-12 17:52:04 +02:00
Hugo Carvalho d589547fa0 Update Portuguese translation 2022-10-12 15:48:54 +00:00
Jehan 274c079c4c app: also show rotation preview for multiple-selected paths. 2022-10-12 17:19:10 +02:00
Jehan b74e6c2198 Issue #8640: Rotate two selected paths creates error window. 2022-10-12 17:19:10 +02:00
Jehan dd0fc44677 NEWS: update. 2022-10-12 01:08:55 +02:00
Jehan e4e87d65ca plug-ins: fix the new unit editor (!655).
- Don't forget to run gimp_ui_init() to get GIMP's styling in plug-ins.
- Process the "key-press-event" signal so that Escape key closes the window (as
  it used to before the MR commit).
- Expand vertically the tree view, otherwise resizing the window leaves a lot of
  ugly empty space, even though the tree view is still shown incomplete with a
  scrollbar.
- Fix the Help button (which was doing nothing).
- Use full words for the "Refresh" and "Help" buttons, rather than icons. Text
  is usually prefered for UI discoverability/understandability, unless there is
  a space issue (i.e. too many icons for all of them to be words).
- Add a "OK" button too, and reorder the buttons similarly to how we usually
  order them.
- Minor coding style fixes (alignments…).
2022-10-11 22:11:16 +00:00
Jehan dc8298ce76 libgimpwidgets: use "system-help" for GIMP_ICON_HELP.
Just "help" is not one of the standard icon names as per the Freedesktop Icon
Naming specification.
See: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html

Therefore when using this name, we usually don't have any icon (especially as we
don't provide any in our own icon themes).
Use "system-help" instead which is a standard name 'for the “Help” system
category'.
2022-10-11 22:11:16 +00:00
Niels De Graef 567d7beb11 plug-ins: Remove GtkAction from unit editor
Migrate to `GAction` and while we're at it, clean up the plug-in by
using `G_DECLARE_FINAL_TYPE()`.
2022-10-11 22:11:16 +00:00
Jehan c928fda8ff app: fix GEX installation with warning while decompressing.
There is not only the ARCHIVE_OK and ARCHIVE_FATAL cases. There are also
ARCHIVE_WARN cases which should not break the installation (I think?). Since I
still want to pass the warning over to extension developers, I am printing it to
stderr.

As an additional fix, prevent such a warning when installing an extension over
itself. In such case, it looks like the archive_entry_size() would be 0, which
was triggering some "Writing to Empty File" warning.
2022-10-12 00:08:28 +02:00
Jehan 5df4875c88 app: do not depend on returned image for successful file_open_with_display().
We may return GIMP_PDB_SUCCESS with no image for generic file procedure, such as
is the case with .gex extension files.
file_open_image() already sanitizes the status returned by the plug-in, so at
this point, we should trust the returned status.

This fixes a crash when loading .gex files (GIMP_PDB_SUCCESS status yet a NULL
error).
2022-10-11 23:19:18 +02:00
Jehan bfc9e4bb72 configure: add an info message to advise building with meson and report bugs. 2022-10-11 16:39:12 +02:00
Jehan 8ac5178214 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).
2022-10-11 00:29:57 +02:00
Jehan fb1cb22f62 app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
  set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
  app_exit_after_callback() which doesn't have to change the value of
  app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
  must call `gimp_exit (gimp, TRUE);` instead, which does more than just
  emitting this signal. It also takes care of cleaning any remaining
  images without a display. If we don't do this, we are leaking
  GeglBuffer when opening images from command lines while quitting
  immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
  the fact that all the properties of a GimpCoreApp were construct-only.
  Instead make these proper properties. I use a trick used in other
  interface, creating a gimp_container_view_install_properties() which
  is called from child classes.
  The point of GimpCoreApp is not just to share a common interface, it's
  rather to weakly simulate some kind of multi-inheritance in GObject.
  Since we want both GimpApp and GimpConsoleApp to inherit from a same
  parent class while we also want them to inherit either from
  GtkApplication and GApplication respectively (yet without linking to
  GTK in this second case), we are stuck as far as normal GObject
  inheritance goes. This is why we use an interface to which we add a
  private struct through a GQuark trick. We want the property settings
  and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
  get_*(). These are useless as we don't expect these to have different
  implementation depending on the actual child class. Once again, our
  main goal was to simulate multiple inheritance rather than actually
  have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
  headers, etc.
- Clean various other details, coding styles, fix several more bugs and
  more…
2022-10-09 16:12:07 +02:00
Lukas Oberhuber 1ee1224d05 app: Add in gimpconsoleapp and gimpcoreapp interface
GimpApp is a GtkApplication
GimpCoreApp is an interface for common functions
GimpConsoleApp is a GApplication (to avoid linking in Gtk)
2022-10-09 16:12:07 +02:00
Niels De Graef 27fe67814e app: initial work on moving to GtkApplication.
Reviewer's message (Jehan): This was a work-in-progress by Niels, which
we only keep in this state because Lukas worked over it. I have rebased
and fix-amended many broken part of this commit, because various things
had been changed in these areas of code since this commit was initially
written.
2022-10-09 16:12:07 +02:00
Jehan 8bbde7db25 Issue #8695: fix GIR build in autotools.
Fixing this error:

> Gimp-3.0.o:(.data.rel+0x430): undefined reference to `gimp_text_layer_get_type' linking of temporary binary failed
2022-10-09 16:09:10 +02:00
Martin 5eb65a06a5 Update Slovenian translation 2022-10-09 08:09:34 +00:00
Luca Bacci d2dc2cb983 Add GimpPickButton implementation for Windows
Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/8506
2022-10-07 10:45:22 +00:00
Luca Bacci 9ef4aee21b 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 10:45:22 +00:00
Zurab Kargareteli 36050fd5be Update Georgian translation 2022-10-06 21:40:14 +00:00
Hugo Carvalho 4d592d0b6c Update Portuguese translation 2022-10-05 22:09:00 +00:00
Yuri Chornoivan dda66fe354 Update Ukrainian translation 2022-10-05 19:55:27 +00:00
Alx Sa ffbee51776 plug-ins: Fix odd length for .ani metadata
.ani files require metadata fields to be an even length. If the data
length is odd, an extra 0x00 is added for padding.
This patch updates the export and import code to comply with this
requirement.
2022-10-05 19:01:14 +00:00
Hugo Carvalho 30f13a75e3 Update Portuguese translation 2022-10-05 16:06:29 +00:00
Daniel Novomeský d11e175612 Add libheif-dev and libjxl-dev to Debian container 2022-10-05 16:44:47 +02:00
Daniel Novomeský eac694905f plug-ins: metadata import/export for JPEG XL format
Changes require libjxl 0.7.0
2022-10-05 14:15:26 +00:00
Lukas Oberhuber bce3bf23de goat-exercise: fix ability to load js
However, this is still currently crashing on MacOS.
2022-10-04 18:02:38 +01:00
Alx Sa 697b41dc45 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.
2022-10-02 14:44:46 +00:00
Hugo Carvalho b3332bb900 Update Portuguese translation 2022-10-01 22:10:06 +00:00
Fran Dieguez af5587197f Update Galician translation 2022-10-01 19:08:56 +00:00
Luming Zh b39569cb2e Update Chinese (China) translation 2022-10-01 14:19:37 +00:00
Jehan 892b62ec36 app, libgimp, pdb, plug-ins: new GimpTextLayer class in libgimp.
Now text layers are proper types, which means that the binding API will also be
nicer (e.g. `txt_layer.set_text('hello world')` in Python).

This commit also adds the param specs allowing to create plug-in procedures with
text layer parameters.

Finally it fixes the few calls in file-pdf-save (apparently the only plug-in
using specific text layer API right now) with explicit type conversion.
2022-09-30 20:55:51 +02:00
Gotam Gorabh 091ce7cdf2 libgimp: Add scrollbar to dialog comments
Resolves #8550
Puts comments widget in GtkScrolledWindow widget to prevent
dialogue growing too tall with multi-line comments.
2022-09-30 18:54:07 +00:00
Yuri Chornoivan aec5c3c108 Update Ukrainian translation 2022-09-30 17:20:50 +00:00
Martin 471f9e641b Update Slovenian translation 2022-09-30 16:18:54 +00:00
Jehan 690949eb34 app, libgimp, pdb: add a note about unsupported markup.
After re-reading #534, I realized I missed the discussion about unsupported
markup by the tool. Then I tested and confirmed what Ian Munsie initially said
in a comment: unsupported markups are properly rendered in the text layer, yet
are simply dropped when editing with the text tool.

This is actually the ideal behavior as it means that with the API, you can even
go further than what is currently possible with the GUI. So it gives nice powers
to people who can script GIMP. We still need some warning in the function
documentation to tell developers about this weakness in the tool GUI.
2022-09-30 00:59:10 +02:00
Jehan 9aa32ffe42 themes: fix textview background color.
It seems I had forgotten some hardcoded color in there. I didn't notice it until
now, because it was not that bad in the few instances where it was shown (for
instance the comment field in export plug-ins), but I really realized there was
a problem with the Python console which was not too practical (white writing on
kinda light background).
2022-09-30 00:51:33 +02:00
Ian Munsie 445909bff5 Issue #534: add a function to set the Pango markup of a text layer
This complements the existing text_layer_get_markup function and allows
scripts to create and modify complex text layers.

It adds the <markup> root tag if it was not supplied and will run the
markup through pango_parse_markup() to check for errors.

Reviewer's (Jehan) note: this is a mostly untouched patch contributed in #534,
except that code moved around. I also fixed the header set in the .pdb, a link
to pango markup docs and added the meson changes.
2022-09-30 00:50:34 +02:00
Jehan 8dcc9345fa libgimp: fix GObject-Introspection build in autotools.
Fixes:

> /usr/bin/ld: ../libgimp/.libs/libgimpui-3.0.so: undefined reference to `gimp_check_custom_color2'

I am actually unsure this fix is fine. It doesn't look like it should
work. And worse, I can't reproduce the fix by reverting it after.

The only other person who reported it was akk, with exactly the same
symptoms.
2022-09-29 23:11:38 +02:00
Jehan c342bcf1d9 NEWS: update. 2022-09-29 22:47:18 +02:00
Jehan 4e08ab9659 themes: add some border theming to default and active buttons.
I noticed some buttons had a bluish border, showing the system theme leaking
over our default theme. So I'm just overriding this with a grayscale color.

These 2 new rules are especially useful in dialogs so that you know what happens
when you hit "Enter". The "default" action (.suggested-action in GTK CSS) is the
action we set to be the active one by default. E.g. if you open a dialog and hit
Enter immediately, without touching any widget focus, this is what will be
activated.

The GTK CSS .default action on the other hand seems to simply be the button with
focus right now, which can be changed through Tab or other ways. If both types
of styles are visible, the .default one is the actually activated action (not
.suggested-action), which is why I make its style a bit stronger (solid rather
than dotted and a bit more opaque).

Also I discover the shade() function to reuse a color and adding it
transparency!
2022-09-29 21:06:47 +02:00
Jehan 5c53fe7b49 themes: no different background for checked check/radio buttons.
Checked buttons had a background using the @selected-color. This was because of
a too broad rule on `.text-button:checked`. Basically it looks like the broad
rules are not good because they sometimes override more accurate rules for
specific widgets.

I also make a few more rules a bit more accurate. Also I extend some CSS rules
for check and radio buttons.
2022-09-29 19:59:55 +02:00
Alx Sa 4ddb71c8ac plug-ins: Export PSD as CMYK file
Adds an option to export as CMYK (mutually exclusive with the existing
Duotone export option). Header information (mode and number of channels)
are set, and the data itself is converted via Babl.
Layer channels are also hardcoded to 4, since GIMP currently doesn't
support CMYK channels.
2022-09-29 17:27:03 +00:00
Jehan 91ec8a34f3 themes: have the "extreme" CSS colors a bit less extreme.
We had some concept of slightly more extreme theme colors (i.e. darker in dark
themes) to color differently in some widget-in-widget cases.

For instance, we use this in the treeview list to separate it better from nearby
interface. But this extreme dark background may have been a bit "too dark", as
reported by Jacob. The goal is for this list to stand out, but maybe it was
standing out too much. Hopefully it's better now.

As a side change, I also add some borders to the top icon header (with "eye" and
"lock" icons) just above the list. I think it better explain the separation.
2022-09-29 19:01:00 +02:00