Commit Graph

50302 Commits

Author SHA1 Message Date
Jordi Mas 8d0393bd4d Update Catalan translation 2023-07-15 12:38:36 +02:00
Alx Sa 019c1ba5d9 themes: Remove "corners" around combo-boxes
The combo box button is contained within a box element.
The box was also having its background-color set,
so there were small square "corners" around each dropdown menu.
This patch separates the box color from the button color to prevent
this.
2023-07-15 02:51:41 +00:00
Jehan e0c8358132 Issue #9322: pass the "hidden-when" attribute in gimp_menu_model_get_item_attributes().
This should hopefully hide (really this time?) the items we don't want to be
seen on macOS menu bar.
2023-07-15 01:37:37 +02:00
Jehan 502944fc02 Issue #9704: radio actions not showing as radio menu items on macOS.
This issue was also happening on other platforms when run with the
GIMP_GTK_MENUBAR codepath.
2023-07-15 01:15:45 +02:00
Jehan dfdb698ce0 libgimp: update function's documentation. 2023-07-14 17:02:19 +02:00
Jehan 3b05315754 plug-ins: fix the Python test dialog.
With recent changes, a GimpResource's ID is not its name anymore.
2023-07-14 16:59:46 +02:00
Jehan a964b80ad7 plug-ins: the Python test plug-in should be installed for unstable branch and…
… non-release builds.
2023-07-14 16:45:39 +02:00
Jehan 1b2f229bf6 app: top-level custom menus must be added before the "Windows" menu.
"Windows" and "Help" should always be last. New top-level menus (created by
plug-ins, scripts or GEGL ops) will be appended in the order of creation between
"Filters" and "Windows" menus.
2023-07-14 16:41:55 +02:00
Jehan 0bd3a45757 app: fix hiccups in creation of submenus by plug-ins/filters.
There were some mixups between a few representations of menus:

* "_Some Menu" and "Some Menu" should both map to an existing submenu "Some
  Menu" (in the GimpMenuModel, the stored path doesn't contain mnemonic).
* The menu item on the other hand should contain the mnemonic and not lose it.
* Not only this, but "Some _Menu" should still map to the same menu, even if it
  was already created with a different mnemonic. It means that the first
  registered menmonic "wins", as we don't want duplicate submenus with same
  title (even if they have different mnemonics).

So this new code is better handling the canonical menu path (no mnemonic, no
section name, no double slashes, no trailing slashes, etc.) vs. the
canonical-with-mnemonic menu path to avoid weird duplicates.

Some additional bugs are fixed where we were creating weird empty submenus
containing the same items as the parent menu as well, or when a submenu title
was a perfect prefix of another submenu title at the same level.
2023-07-14 16:21:57 +02:00
Martin de7c74323f Update Slovenian translation 2023-07-14 09:05:55 +00:00
Martin 6040505563 Update Slovenian translation 2023-07-14 09:04:06 +00:00
Ekaterine Papava d4e7b25a68 Update Georgian translation 2023-07-14 05:07:26 +00:00
Jehan 982d32e79e menus: hide some menu items on macOS.
File/Quit, Edit/Preferences|Input Devices|Keyboard Shortcuts should not be in
the main menu bar on macOS because they are already in the "app menu".

See #9322.
2023-07-13 23:41:18 +02:00
Jehan 4c1ae49fc9 plug-ins: update the Help/GIMP Online links.
- Remove the wiki which is now dead.
- Update the roadmap link and title it in plural.
- Move the "Bug Reports and Feature Requests" inside "GIMP Online/" submenu.
2023-07-13 23:13:19 +02:00
Anders Jonsson d99b933243 menus: add missing submenus to image-menu.ui.in.in
This allows for translation and use of accelerators.
2023-07-13 21:30:14 +02:00
Martin 71e217617b Update Slovenian translation 2023-07-13 15:54:21 +00:00
Jehan c369a5ed70 menus: make all section names non-translatable.
I'm not sure what's the default for random string attribute, but better be
explicit anyway. I think this way, we make sure that gettext won't try and
translate these.
2023-07-13 16:57:23 +02:00
Jehan b9b1f4c53d app, menus: remove all placeholder code.
This is now fully replaced by the new section name code.
2023-07-13 16:53:11 +02:00
Jehan 9ad5049dec menus, plug-ins: now place various plug-ins in the right menu sections.
This removes a bunch of inconsistencies we had from the before-2.99.16 version
because new items from plug-ins were all added at the bottom of their respective
submenu.
2023-07-13 15:49:05 +02:00
Jehan d9aa7a6ba1 app: allow a new attribute "section-name" to <section> of menus.
This will replace the "placeholder" concept where I was using an invisible item
with a label and no action, making it invisible. Instead let's just name
(internally) our sections. This has the following advantages:

* Conceptually more correct: basically we just want to place items among the
  same category of actions.
* Easier to search for plug-in developers who'll want to place their plug-in
  procedures in menus, because it uses an actually searchable attribute
  ("section-name").

This is used by the core by allowing a special syntax in menu paths: if finished
by "/[Section]" then the item will be place in the specific section named
"Section". In case one actually wanted to create a submenu called "[Section]",
they can use a double bracket: "[[Section]" and "[[Section]]" will both map to a
normal submenu (not a section name) titled "[Section]".
All other usage of square brackets will not be processed in a particular way.
E.g. "Hello [World]" will end a submenu titled "Hello [World]" or "Bye]" will be
a submenu and so on.

Finally this system is currently limited to the position of the item itself,
i.e. must be placed as last element in the path. In particular, you currently
cannot use it to position a new submenu inside a section. E.g. say that I want
to create a submenu "From Platforms" under the "Open" section of the File/ menu.
This is currently impossible. With this syntax, we can create new items directly
in the "Open" section, or create a "From Platforms" submenu in the end of the
File/ menu, containing our new procedures.
This could be a good improvement to come.
2023-07-13 15:39:50 +02:00
Ekaterine Papava 9efd5fd4f2 Update Georgian translation 2023-07-13 05:04:13 +00:00
Ekaterine Papava 04a39c2ca1 Update Georgian translation 2023-07-13 05:00:50 +00:00
Ekaterine Papava 26683e574a Update Georgian translation 2023-07-13 04:55:50 +00:00
Luming Zh 2e67a21bd7 Update Chinese (China) translation 2023-07-13 00:13:22 +00:00
Alx Sa ab93a1484a meson: Add option to compile Amiga IFF
Code provided by @lillolollo
Since libilbm and libiff are not in all repositories yet, this adds an option so
it is not required when building GIMP.
2023-07-12 22:55:20 +00:00
Jacob Boerema b82419305b plug-ins: fix formatting in animation-optimize
A lot of the function calls did not have a space between function name
and opening parenthesis.
2023-07-12 16:45:26 -04:00
Jacob Boerema 5cdfa6e891 plug-ins: fix resource leak in animation-optimize 2023-07-12 16:45:26 -04:00
Jacob Boerema 5f1b0aab87 plug-ins: reduce chance of buffer overflow when copying strings
Sphere-designer: Since some of the strings are translated versions, we
can't know in advance how long they are going to be.
Let's use string copy/cat functions that explicitly check the size and
are guaranteed to add a NULL.
2023-07-12 16:45:26 -04:00
Yuri Chornoivan 35fba13d96 Update Ukrainian translation 2023-07-12 15:07:27 +00:00
Martin 469f1a145c Update Slovenian translation 2023-07-12 14:15:14 +00:00
Anders Jonsson 4239d1af44 plug-ins: uncomment animation-play in POTFILES.in
The animation-play plug-in was readded in
6bb03dc21a

Also remove it from POTFILES.skip together with
curve-bend that already had been reactivated.
2023-07-12 13:22:26 +02:00
Jacob Boerema 6c8625e5fc plugins: fix #8082 XWD file renders incorrectly 2023-07-11 18:26:05 -04:00
Jacob Boerema ea68d87b66 plug-ins: clean up file-xwd
- Add modern error handling using GError.
- Check return values of fseek and fgetc for errors.
- Remove most occurrences of g(u)long.
- Fixed overflow issue with maxred/green/blue found with coverity.
2023-07-11 18:17:42 -04:00
Jacob Boerema 6484193d8f script-fu: fix out-of-bounds array access
I noticed this in coverity. I couldn't find any actual script using
SF_DISPLAY, so the impact probably isn't very big.
Because the enums start at 0, the size of the array should be at least
one more than the value of the last enum, which was not the case here.

Increase the size of the array by 1, so that accessing SF_DISPLAY,
which is the enum with the highest value, is valid.
2023-07-11 12:04:24 -04:00
Alx Sa 624ae512fc 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.
2023-07-11 15:25:39 +00:00
Jehan ae29736ee0 app, libgimp, pdb: fix annotations for resources as return values.
Resources are stored by the plug-in infrastructure and their memory should not
be managed by plug-in code.

My commit 4f69995b46 was crappy and modified a generated function. I was just
too tired with all the heat in here, I guess!
2023-07-11 16:16:21 +02:00
Anders Jonsson 30319739ed .gitlab: update link in merge request template 2023-07-11 12:47:12 +00:00
Jehan 4be2dfdee2 devel-docs: our macOS package minimum requirement is now 10.13 (High Sierra). 2023-07-11 14:20:28 +02:00
Jehan 4f69995b46 libgimp: fix annotations for gimp_brush_get_by_name().
Similarly to how we handled image items, all resources are handled and stored by
the plug-in infrastructure and should not be destroyed. This wrong annotation
was triggering bindings to unref resources when going out of scope, hence
crashing plug-ins.
2023-07-11 12:00:22 +02:00
Jehan d54c511968 plug-ins: use proper gimp_brush_get_by_name().
Note that in the future, we expect this to be possible to create other brushes
with a same name. Maybe we should have a special function allowing to request
core resources (the ones installed by GIMP itself).
2023-07-11 12:00:22 +02:00
Jacob Boerema d43075dca0 plug-ins: incorrect order of parameters in load_image_resource
Even though these parameters are currently not used here, better use
the correct order.
2023-07-10 17:50:08 -04:00
Jacob Boerema 63bb893c06 plug-ins: fix resource leak in psd-load
Adding unsupported messages was overwriting the old message without
first freeing it. In addition, the first message was initialized
as a string constant.
We now start with duplicating the (empty) string, so that it can be
freed. We then add a define to reduce boilerplate to add the string
for each unsupported feature. The code in this define takes care of
adding the new message and freeing the old message.
2023-07-10 17:50:08 -04:00
Martin a9f642322d Update Slovenian translation 2023-07-10 20:44:12 +00:00
Yuri Chornoivan c7d32f37c6 Update Ukrainian translation 2023-07-10 19:44:56 +00:00
Jacob Boerema bbbd149ba3 plug-ins: fix possible integer overflow on large images in jigsaw
Make sure we use gsize for intermediate results to not get integer
overflow on large image sizes.
This still is not ideal, but better than a crash, since we may (try to)
allocate a very large block of memory, which we should eventually fix
by looping over smaller size buffers.
2023-07-10 14:19:07 -04:00
Jacob Boerema 97a71cfd41 libgimp: fix resource leak in gimpimagemetadata-save 2023-07-10 14:19:07 -04:00
Ekaterine Papava 8febbf9da8 Update Georgian translation 2023-07-10 17:08:06 +00:00
Jacob Boerema 03e32e6fd3 app, pdb: silence coverity warning about integer overflow
Brushes can't be large enough to actually cause overflow here, but
since the result is gsize, it can't hurt to have the intermediate
results to gsize too.
2023-07-10 12:30:24 -04:00
Jacob Boerema 5645abc051 plug-ins: fix meson deprecated warning for file-icns 2023-07-10 12:30:24 -04:00
Anders Jonsson 44108eb9c3 app: make debug menu translatable 2023-07-10 14:58:49 +00:00