Commit Graph

49999 Commits

Author SHA1 Message Date
Niels De Graef 01e960e98e plug-ins/scheme-wrapper: Use GIR for enum values
This allows our script-fu plugins to use the GIMP enum values, just like
all our other plug-ins know them.

In other words:

* Names are consistent with those of other plug-ins
* Introspectable enums are automatically added as they are added to the
  introspection file, without even needing a recompile
* No need to keep track of our enum types anymore, as that is just a
  redundant implementation of introspection in practice. This in turn
  will let us simplify some of the pdb code
2023-05-24 23:19:20 +02:00
Niels De Graef 00415bed6a libgimp: Always pass size to g_bytes_unref_to_data
Unlike `g_bytes_get_data()`, the out argument for the size is not
optional, so if we try to pass `NULL` there, we actually get a segfault.
2023-05-24 23:16:36 +02:00
Alx Sa e1e30c6f72 app: Scale pattern preview to show full image
Currently, patterns are loaded as-is - if the full pattern is larger
than the preview, its cut off and you only see the left corner.
In those cases, the pattern is scaled using gegl_buffer_get ()'s scale
parameter.
2023-05-24 19:44:11 +00:00
Michael Natterer a8d30578cd script-fu: fix double free in script-fu-dialog.c
Spotted by Lloyd Konneker.
2023-05-24 21:35:48 +02:00
Alx Sa 7a1e6bedd5 plug-ins: Increase Script-fu Console size...
and Plug-in/Procedure Browser size.
gtk_widget_set_size_request () is applied to the dialog, as it does not
seem to bubble up from being applied to individual elements.
The existing 2.10 width/height values are used.
2023-05-24 18:56:23 +00:00
Michael Natterer 15d81b6b10 app: plug leaks in GimpExtensionManager 2023-05-24 18:27:00 +02:00
Michael Natterer 8d9eef875c libgimpwidgets: use gdk_seat_grab,ungrab() in gimphelpui.c,
getting rid of using the the deprecated pointer grab API.

Since there is something fishy and gtk_get_event_widget(event) always
returns the GtkInvisible we grab on (not the actual event widget), we
just steal the "find widget at pointer" code from gtkinspector and
find the help widget that way.
2023-05-24 17:18:38 +02:00
Michael Natterer 7e7a20530d libgimpwidgets: improve parameter names of gimp_grid_attach_aligned() 2023-05-24 15:59:34 +02:00
Michael Natterer a12339c890 app: increase preview size in gimpviewablebox.c
The height of the boxes was never determined by the preview but by the
label+entry, causing vertical padding around the preview. Now the
preview fills the area in more cases, at the cost of a few less
horizontal pixels for the entry.
2023-05-24 15:20:03 +02:00
Michael Natterer 9c9d3aaa35 themes: minimize spinbutton height in docks too
but add 2px top and bottom padding so all of those entries don't look
like the just escaped the garbage compactor.
2023-05-24 15:17:27 +02:00
Michael Natterer ee6108aa04 themes: minimize the height of all entries in docks 2023-05-24 14:47:42 +02:00
Michael Natterer 4fb27afd9e plug-ins: don't leak the comment string in file-psp.c 2023-05-24 14:32:00 +02:00
Michael Natterer 82e4bf5792 app: fix "active" state management in GimpToggleAction
gimp_toggle_action_real_toggle(): set "active" before emitting
"change-state" so we don't infinitely try to set the state in case of
a recursion.

gimp_toggle_action_toggle(): add notify("active") because it wasn't
done anywhere.

Fixes #9392
2023-05-24 14:09:50 +02:00
Michael Natterer 3a35974e3a app: fix bailout condition in gimp_menu_model_handles_subpath()
Fixes plug-in menus being added to all a GimpUIManager's menus,
even if they didn't match the menu_path
2023-05-24 13:43:35 +02:00
Michael Natterer 1d393fb926 app: don't try to break up a NULL menu_path in gimp_action_set_menu_path() 2023-05-24 13:41:37 +02:00
Simon Budig f540e79172 screenshot: there actually is no need to preprocess the PNG data... 2023-05-24 11:32:05 +02:00
Niels De Graef 2b4bf29553 gitlab-ci: Use JUnit reports from Meson
Meson has been generating Junit XML files of its test results since
0.55, so we can use that to show the test results in the GitLab UI.
2023-05-24 00:38:00 +02:00
Niels De Graef 89c359ce47 Remove GimpUint8Array in favor of GBytes
GLib has a specific type for byte arrays: `GBytes` (and it's underlying
GType `G_TYPE_BYTES`).

By using this type, we can avoid having a `GimpUint8Array` which is a
bit cumbersome to use for both the C API, as well as bindings. By using
`GBytes`, we allow other languages to pass on byte arrays as they are
used to, while the bindings will make sure to do the right thing.

In the end, it makes the API a little bit simpler for everyone, and
reduces confusion for people who are used to working with byte arrays
in other C/GLib based code (and not having 2 different types to denote
the same thing).

Related: https://gitlab.gnome.org/GNOME/gimp/-/issues/5919
2023-05-23 23:37:50 +02:00
Michael Natterer 9e79bb78a1 app: update the dialog and dockbook ui managers in gimp_dockbook_show_menu() 2023-05-23 16:31:57 +02:00
Michael Natterer 37dfa24def meson: default to create default binary symlinks only in stable versions 2023-05-23 10:34:47 +02:00
Michael Natterer 514042d57d app: don't leak the GSList connecting GimpRadioActions 2023-05-23 01:42:40 +02:00
Michael Natterer 4879589be6 app: use g_list_delete_link() not _remove_link() in GimpUIManager
so the list element actually gets freed.
2023-05-23 01:42:40 +02:00
Simon Budig 23da44e3c8 file-svg: remove deprecated librsvg api, added some pixbuf/cairo fuckery. 2023-05-23 00:45:50 +02:00
Michael Natterer e4f0bb0dfe app: valgrind found a bunch of memory leaks 2023-05-23 00:11:23 +02:00
Simon Budig 3b925cd78e animation-play: remove deprecated gtk-alignmnents 2023-05-22 22:35:30 +02:00
Yuri Chornoivan 339c858a65 Update Ukrainian translation 2023-05-22 17:13:13 +00:00
Ekaterine Papava e97ab651dd Update Georgian translation 2023-05-22 16:32:48 +00:00
Michael Natterer 7ada432690 app: big porting of weak pointers to g_set,clear_weak_pointer()
This started as review of weak pointers, but using
g_set_weak_pointer() and g_clear_weak_pointer() is almost always
better, and shorter.
2023-05-22 18:16:09 +02:00
Jacob Boerema 4789a31a15 plug-ins: issue #7658 add support for unregistered xmp namespaces
Our metadata library exiv2 only registers the most commonly used xmp
namespaces. Other namespaces need to be explicitly registered. We did not
read or try to store these namespaces, which caused a lot of warnings about
"No namespace info available for XMP prefix '...' and then we could not
process that metadata or save/export those tags.

We had to wait for gexiv2 support for registering/reading namespaces, but
that was added in gexiv2 version 0.12.2 (and the "try" version in 0.14.0).

When reading xmp metadata we process all namespaces and add them to our
metadata xml when we haven't seen them before in the same image.
A GHashTable is used to keep track of the prefixes we have seen before.
The new namespace xml tag is skipped in older GIMP versions, but will be
used now to add the namespaces when exporting images with xmp metadata.
2023-05-22 11:57:08 -04:00
Alx Sa 3cd896c983 plug-ins: Import IBM PC Formatted TIFF layers
TIFFs with PSD layers can be saved in either Macintosh or IBM PC format.
IBM PC section labels are reversed and the integers are Little Endian.
We now check for 'MIB8' sections and reverse the necessary values so
that the PSD plug-in functions can handle them.
2023-05-22 14:45:34 +00:00
Martin daa8ed3567 Update Slovenian translation 2023-05-22 13:50:56 +00:00
Michael Natterer 9886062dca app: don't leave around a dangling weak pointer to some memory on the
stack in gimp_create_image_from_buffer()
2023-05-22 14:30:37 +02:00
Michael Natterer 3d5ea2eeb2 app: remove weak ref to action_factory in GimpMenuFactory 2023-05-22 14:11:48 +02:00
Michael Natterer 91fceebb1d app: improve readability in GimpMenuFactory 2023-05-22 14:11:06 +02:00
Alexander Shopov db3a88f1f5 Update Bulgarian translation 2023-05-22 08:44:18 +00:00
Simon Budig a6756b515b file-svg: fix deprecated use of rsvg_handle_get_dimensions() 2023-05-22 09:30:25 +02:00
Alx Sa 6f8f481ee2 plug-ins: Remove screenshot-icon.h in Makefile.am
Since the file itself was removed in 5d7d11a8.
2023-05-22 04:29:56 +00:00
Alx Sa 026e99c441 actions: Restore pasting image in empty workspace
In !769, I accidentally removed the ability to paste into an empty
workspace with Ctrl+V since I added a "does image exist?" check before
the `edit_paste_as_new_image_cmd_callback ()` call.
This patch resolves the issue by moving the check after the
"paste as image" function call.
2023-05-22 03:56:36 +00:00
Michael Natterer 9b388f873b modules: remove "static" from all modules' get_type() functions
Their implementations are defined by G_DEFINE_DYNAMIC_TYPE(), so
the compiler complained about the unused static prototype.
2023-05-22 03:51:36 +02:00
Michael Natterer f615cbc5af Revert "app: quick/dirty-exit on all releases (not just stable ones) while…"
This reverts commit d22f1c3332.

The memory corruption is fixed, we can restore the original quit code.
2023-05-22 03:39:52 +02:00
Michael Natterer 8f42731074 app: don't leave dangling GimpUIManager weak pointers around
in gimpmenumodel.c and gimpmenushell.c
2023-05-22 03:39:52 +02:00
Michael Natterer bf15c9d128 app: also remove (not only add) the weak pointer in
gimp_action_impl_activate(), it's only there to guard one function
call
2023-05-22 03:39:52 +02:00
Michael Natterer 1d069d05b4 app: fix dangling weak pointers to GimpEditor->priv->ui_manager 2023-05-22 03:39:52 +02:00
Michael Natterer ef0eb29e55 app: readability improvement in GimpActionFactory 2023-05-22 03:39:52 +02:00
Michael Natterer 4d38ae333a app: remove the weak pointer GimpPaintOptions->brush in dispose() 2023-05-22 03:39:52 +02:00
Michael Natterer 2de78e45b6 app: some formatting in gimppaintbrush.c 2023-05-22 03:39:52 +02:00
Niels De Graef da585065d6 Revert "app: Port GimpParasiteList to GListModel"
This reverts commit 3054901af0.

GimpParazite is not a GObject, so using a GListModel is not an option
for now
2023-05-22 01:26:18 +02:00
Niels De Graef dd3fd682f6 libgimp, pdb: Fix enums_get_type_names annotations
Annotate the array length
2023-05-22 01:19:17 +02:00
Michael Natterer bbad91d85d quit-dialog: remove write after free in quit_close_all_dialog_response()
This reverts 83397cbb15 except for the
unrelated typo fix.
2023-05-21 18:56:32 +02:00
Michael Natterer ea61efe679 app: remove gtk_container_set_focus_chain(), it's deprecated and
our use cases were overengineering anyway.
2023-05-21 18:56:32 +02:00