Commit Graph

49972 Commits

Author SHA1 Message Date
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
Michael Natterer 0c41856393 meson.build, sanity.c, gui.c: update and sync some dependency versions 2023-05-21 18:56:32 +02:00
Michael Natterer 7de9c347b6 script-fu: use gimp_value_array_copy(), and free the copy 2023-05-21 18:56:32 +02:00
Michael Natterer 0c73d7df12 libgimbase: add gimp_value_array_copy() 2023-05-21 18:56:32 +02:00
Alx Sa e020a6b3ca plug-ins: Add support ILBM HAM mode images
"Hold and Modify" ILBM images use control bits to increase the palette
beyond what's stored in the CMAP chunk. This patch checks if
HAM mode is set and then interprets the plane bits accordingly.
2023-05-21 15:31:42 +00:00
Simon Budig 5d7d11a81f screenshot: move deprecated pixdata into png resource 2023-05-21 13:22:57 +02:00
Simon Budig bf0cac7e1c meson: bump minimum required versino to avoid a warning 2023-05-21 12:01:52 +02:00
Yuri Chornoivan efbdd8e1c4 Update Ukrainian translation 2023-05-21 06:15:31 +00:00
Simon Budig 71b46d5a0b gimpimagemetadata: ...so that we can remove that ugly hack here. 2023-05-21 01:58:16 +02:00
Simon Budig 9e8f5a97d2 meson: add a minimum dependency on exiv2 0.27.4... 2023-05-21 01:58:16 +02:00
Niels De Graef 41e3d10a18 libgimpwidgets: Fix some gir annotations
Add a missing nullable, remove some references to `GtkHScale` as that no
longer exists.
2023-05-21 01:37:18 +02:00
Niels De Graef 3054901af0 app: Port GimpParasiteList to GListModel
GListModels are fun. They will also prove to be useful in the future.
2023-05-21 01:30:53 +02:00
Simon Budig 997e4b5f6c test-ui: re-enable one of the tests, our gtk-dependency is big enough now. 2023-05-21 01:22:00 +02:00
Simon Budig 41b47d1dde colorsvg2png: fix deprecation, slightly changing the behaviour 2023-05-21 01:10:51 +02:00
Niels De Graef a4c3eacc02 libgimpmodule: Convert ModuleDB to GListModel
This commit converts `GimpModuleDB` into a `GListModel`. This allows us
to drop quite a bit of custom code to have an adaptive list of modules
by just becoming a `GListModel` implementation.

Next to that, this commit also rewrites `GimpModule` to use the `notify`
signal for its 2 new properties: "auto-load" and "on-disk", rather than
trying to define a custom signal for that. This in turn allows us to use
basic methods like `g_object_bind_property()`.

Finally, the module manager dialog now uses `GtkListBox`, which can
easily bind to that new `GListModel` infrastructure.
2023-05-20 22:15:13 +00:00
Niels De Graef e5820261ec app: Use a GtkListBox for the themes list
Use a `GtkListBox` to show the list of GIMP themes rather than a
treeview. The idea is that we can expand this a bit more to give a
preview of the theme later on.
2023-05-20 22:15:13 +00:00
Simon Budig 8cf388c17f gimpcellrendererdashes: fix type of a variable 2023-05-20 23:59:29 +02:00
Simon Budig 83d6f46ee7 app: fix deprecation of g_spawn_check_exit_status() 2023-05-20 23:56:29 +02:00
Simon Budig 7f10328777 script-fu-dialog: fix memleak 2023-05-20 23:41:18 +02:00
Simon Budig a100bb7fcf gimptagpopup: port to GtkStateFlags 2023-05-20 23:32:18 +02:00
Simon Budig 289999ad52 core: remove the workaround, neither gcc nor clang generate a warning here. 2023-05-20 23:32:18 +02:00
Simon Budig 51311f913d metadata: shut up a weird warning 2023-05-20 23:32:18 +02:00
Niels De Graef 0f05de3dc0 libgimpwidgets: Try harder to set parent window
In case someone passes a `GtkWidget` rather than a `GtkWindow` as a
parent to a `GimpDialog`, we still have another way of trying to get its
parent window, using `gtk_window_get_toplevel()`. If we still get a
window from that, it allows us to still specify a reasonable
"transient-for" value for our newly-made `GimpDialog`.
2023-05-20 20:24:28 +00:00
Simon Budig 6e1747953a libgimp: fix a warning by using an enum of the correct type. 2023-05-20 22:16:06 +02:00
Jordi Mas d7f5cd0e43 Fix typo in Catalan translation 2023-05-20 22:05:56 +02:00
Simon Budig d16734a4e4 plug-ins: fix some glib related deprecations 2023-05-20 21:46:17 +02:00
Simon Budig 690c9ae21a gimpguidetool: fix somewhat pointless warning about uninitalized variable 2023-05-20 18:47:14 +02:00
Simon Budig a2458f1528 file-tiff-load: fix mismatching variable type 2023-05-20 18:47:14 +02:00