Commit Graph

45556 Commits

Author SHA1 Message Date
Michael Natterer 97b714d428 Issue #3533 - Tool preset doesn't restore opacity and paint mode
There is no non-hackish way of fixing this without adding a new
"use-opacity-paint-mode" property to GimpToolPreset and a new toggle
in GimpToolPresetEditor. Restoring opacity and paint mode can now be
controlled explicitly, and defaults to TRUE.
2020-05-12 21:13:29 +02:00
Niels De Graef 0d9716a0a8 patternselect: Document pattern_name parameter
Fixes an annoying gtk-doc warning.
2020-05-12 20:03:56 +02:00
Niels De Graef 7ac6f0a22e viewable: Use GET_PRIVATE() before precondition checks
`GET_PRIVATE()` expands to `gimp_viewable_get_instance_private()`, which
just returns an offset of the passed on pointer. As such, it's safe to
call this on any value (even NULL) and to put it at the top of the
function block, saving some lines.
2020-05-12 17:59:08 +02:00
Niels De Graef 88b9359efc viewable: Use g_object_notify_by_pspec()
From commit 529aa743:

> `g_object_notify()` actually takes a global lock to look up the
> property by its name, which means there is a performance hit (albeit
> tiny) every time this function is called. For this reason, always try
> to use `g_object_notify_by_pspec()` instead.

While just _loading_ GIMP on my machine (ie during the splash screen)
`g_object_notify (viewable, "icon-name");` got called more than 4000
times already, so it's not an unused path.

Note that it's also less easy to make an accidental typo when using
`g_object_notify_by_pspec()`, as the compiler will complain about the
enum value being incorrect.
2020-05-12 17:59:03 +02:00
Niels De Graef bd69747014 viewable: Get rid of unused "stock-id" property
The property was only foreseen for backwards compatibility, so let's get
rid of it as we have the opportunity.
2020-05-12 13:27:30 +02:00
Niels De Graef ddfae277cb meson: Cleanup and fix issues using libapp_dep
Meson has a very useful tool for combining a set of linked libraries and
compiler arguments (like an internal pkg-config):
`declare_dependency()`. Use this command to ensure that we can easily
reuse libapp* over multiple libraries, executables and tests.

That way, if we also add a new dependency later on in one of the libapp
libraries, this won't need to be added multiple times.
2020-05-11 10:52:23 +00:00
Niels De Graef 8b0dfb99d5 app/test-xcf: include necessary headers for close() 2020-05-11 10:52:23 +00:00
Niels De Graef 5f117d0561 meson: Fix envvar in tests
`GIMP_TESTING_ABS_TOP_SRCDIR` is supposed to point to the top source root directory, not the top build directory.
2020-05-11 10:52:23 +00:00
Niels De Graef 3a167243b9 meson: Fix building of tests
The tests weren't building because they weren't linked to the static
libraries.

Note that some tests still need fixing, but at least they can be
built/run now.
2020-05-11 10:52:22 +00:00
Yuri Chornoivan ed4e2a3790 Update Ukrainian translation 2020-05-11 07:09:59 +00:00
Niels De Graef ae34e778fc meson: Use libgimp(ui)_dep in plug-ins meson files
This gives a big cleanup in the meson.build files of the plug-ins.

It's also quite a bit more maintainable, since anything that changes in
libgimp's dependencies, linkage, ... doesn't have to be copy-pasted into
each plug-in.
2020-05-11 07:01:37 +02:00
Niels De Graef 904a2e422d meson: Declare internal libgimp(ui) dependency
By using Meson's `declare_dependency()`, we can avoid specifying the
linked libraries, dependencies and includes we need over and over again.

Basically, this conceptually acts like an internal pkg-config.
2020-05-11 06:42:29 +02:00
Øyvind Kolås 7025039b93 app: in UI strings s/Precision/Encoding/ 2020-05-11 03:51:35 +02:00
Anders Jonsson fa467ff573 Update Swedish translation 2020-05-10 19:39:02 +00:00
Anders Jonsson 96c795bebe Update Swedish translation 2020-05-10 19:32:28 +00:00
Niels De Graef f4c6d4bb79 gimplist: Don't use sort_func field directly
Ideally, we expose as little fields of our struct as possible, so we
don't have to care too much about API/ABI stability.
2020-05-10 16:05:12 +00:00
Niels De Graef 7a8a300adc gimpconfig-iface: Use G_DECLARE_INTERFACE 2020-05-10 14:45:19 +00:00
Niels De Graef 65b12c108d libgimpwidgets: UnitStore: Fix conflicting names
`gimp_unit_store_get_value()` clashes with the `get_value()` method of
its parent class GtkTreeStore. This means trouble for bindings, as seen
here in some pseudocode:

```vala
var unit_store = new Gimp.UnitStore();
// Which function are we referencing here, the one from GtkTreeStore or
// the one from GimpUnitStore? Worse, they both have different arguments
unit_store.get_value( ... )
```
2020-05-10 12:06:33 +00:00
Jehan 25ecef0dc3 build: fix cross-compiled meson builds.
A bug came with meson 0.54.1 (looking at reports, I understand it to be
a mix of a meson bug and a patch by Debian making it a different bug).
See:
- https://github.com/mesonbuild/meson/issues/6115#issuecomment-593312709
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959708

In any case, our Windows cross-builds end up with (with no libdir set on
our own): libdir=${prefix}/lib/x86_64-linux-gnu
This is obviously wrong as confirmed by meson report comments.
2020-05-10 13:21:08 +02:00
Daniel Șerbănescu ce17f2c10b Add Romanian translation
(cherry picked from commit fd52dfd55e)
2020-05-10 07:50:38 +00:00
Michael Schumacher 30be314465 .gitlab-ci.yml: expire all dependencies in 2 hours, and all builds in 1 day 2020-05-09 13:19:18 +02:00
Niels De Graef 69c5fd02d4 GimpHelpFunc: don't annotate (closure)
This is incorrect in that bindings trying to pass on the function cannot
pass on a user data (for closures). As such, get rid of the annotation.
2020-05-09 00:16:15 +02:00
Niels De Graef 4f46c9298e gimpintstore: Mark iter (out) annotations 2020-05-08 21:14:35 +02:00
Niels De Graef aa6079fe8a scrolledpreview: Add missing gir annotations 2020-05-08 19:48:11 +02:00
Niels De Graef 4b6362c0bd gir: Mark more (out) annotations 2020-05-08 17:11:14 +02:00
Niels De Graef 57d3837e40 gir: More missing annotations
Especially need to watch out with forgetting `(array)` and `(out)`
annotations, as they can really give a different API in certain (if not
most) bindings.
2020-05-08 16:57:45 +02:00
Niels De Graef f23ada8c77 zoompreview: Add (array) gir annotation 2020-05-08 16:34:23 +02:00
Niels De Graef 09f8a3c922 zoompreview: Fix gtk-doc identifier
Also fix the (transfer full) annotation, which isn't correct.
2020-05-08 16:32:54 +02:00
Niels De Graef 86478fe78a gimppropwidgets: Add (nullable) annotation for label 2020-05-08 16:28:48 +02:00
Niels De Graef 7aee2d1ea5 gir: Fix typo nulllable → nullable 2020-05-08 16:04:40 +02:00
Niels De Graef ed310dd48d Fix some gtk-doc comments and GIR annotations 2020-05-08 15:26:42 +02:00
Niels De Graef a8de828195 gimpwidget: Correct gtk-doc docs wrt GtkHBox
GtkHBox is a deprecated version of GtkBox, which we don't even use
anymore. It confuses the gtk-doc a build though, so let's fix it to get
rid of another warning.
2020-05-08 14:17:18 +02:00
Ell 59f3b07c5f app: remove ANTI_ERASE from filter mode set
It used to be included in "Edit -> Fade", but it's too low-level.
2020-05-08 14:42:22 +03:00
Niels De Graef 693eeae96b gimpprogress: Add arg descriptions to vfuncs
That squashes some gtk-doc warnings.
2020-05-08 10:39:33 +02:00
Niels De Graef 2f94513df4 libgimp: Make sure GIR includes the right header
When using GIR-based bindings that will eventually include the header
files (like Vala), we need to make sure to tell the gir-scanner what
file that is. Otherwise tools like `vapigen` have to make an educated
guess (which will be wrong).
2020-05-08 10:15:08 +02:00
Георгий Тимофеевский 58c41d9fdc Fixed translation 2020-05-06 15:37:44 +00:00
T Collins f00df8f773 Update ddswrite.c 2020-05-06 13:58:28 +00:00
Jehan fca6371e29 app: clear the clipboard after storing its contents, upon quitting.
If we don't do this, the clipboard owner doesn't get unreffed (also the
GtkClipboardClearFunc is not called either, but we don't set any so this
was not a big problem).

The main consequence was that copying was setting the Gimp object as an
owner, which kept a reference and prevent its finalize() method to run,
hence was leaking data (and in particular some GEGL buffers for
clipboard operations, which was how the issue became more visible upon
exit).
2020-05-06 15:46:24 +02:00
Niels De Graef b680945752 gir: Make use of typedefs for GimpProgressVtable vfuncs
GObject introspection has issues handling random vfuncs (i.e. not part
of a GObject). Most of all, it needs to be able to give these a name
(so they can be used to cast in some higher level languages for
example). As such, give each vfunc in `GimpProgressVtable` a separate
typedef.
2020-05-06 11:40:26 +00:00
Niels De Graef 4729fc8dec Use GIMP_TYPE_RGB instead of G_TYPE_POINTER
That way, bindings can set the correct signature for callbacks.
2020-05-06 10:36:33 +00:00
Niels De Graef 82e945d945 Add GIR annotations to bilinear utils 2020-05-05 19:37:44 +02:00
Niels De Graef 58fecd7f8c gir: Make sure the GIR file includes the correct header
That way, bindings that still need to know the original C header that
needs to be included (like Vala) are pointed to the correct place.
2020-05-05 19:16:49 +02:00
Niels De Graef 97fcc8ca0f gir: Mark gimp_dialog_new() parent nullable 2020-05-05 19:14:58 +02:00
Jehan 29b1d91b76 devel-docs: update debugging-tips with GEGL's meson option names. 2020-05-05 18:42:26 +02:00
Yuri Chornoivan 50d9886c82 Update Ukrainian translation 2020-05-05 15:46:23 +00:00
Ell e0a5aaeb22 Issue #4992 - Modifiers change Free Select tool mode while active
Properly initialize GimpSelectionTool::saved_operation upon
modifer-key press, even when some modifiers are masked out by
GimpPolygonSelectTool while the tool is active.  This avoids
erroneously "restoring" the operation to a previously-saved state
once the modifier keys are released.
2020-05-05 18:17:39 +03:00
Jehan 6cf9badefd gitlab-ci: cppcheck does not need to wait for previous stages to occur. 2020-05-05 16:21:43 +02:00
Jehan 2baf8a3be1 gitlab-ci: babl requires now vapigen for Vala binding. 2020-05-05 16:18:54 +02:00
Elad Shahar 93602a3973 Issue #4326 - Add visual tab to spyrogimp plugin
Add visual tab to spyrogimp plugin for a more intuitive, visual
way of specifying the spyrograph pattern.
In addition, fix using the selection as the fixed gear, and add
option to save the pattern to a path.
2020-05-05 13:29:09 +03:00
Niels De Graef 83d6764e0e gir: Add (closure) tags 2020-05-04 21:31:30 +02:00