Commit Graph

50402 Commits

Author SHA1 Message Date
Luming Zh eb6d1b485a Update Chinese (China) translation 2023-08-04 19:47:06 +00:00
Luming Zh a265c9669a Update Chinese (China) translation 2023-08-02 18:48:19 +00:00
Boyuan Yang 45d644e4b8 Update Chinese (China) translation 2023-08-02 18:16:45 +00:00
Jacob Boerema 72ee6ff469 app: incorrect order of parameters in gimp_channel_select_round_rect
in gimpchannel-select.h
Looking at the version in gimpchannel-select.c, the calls made to it,
and also what is usual, the corner_radius_x should be before
corner_radius_y.

Found looking at the cppcheck logs.
2023-08-02 11:24:43 -04:00
Jacob Boerema eee763b1c1 plug-ins: fix #9816 file-raw-data.exe Crash
When changing the width we got a division by zero crash because we
did not consider the case of bpp * bitspp being less than 8.

To fix this we check if bitspp is less than 8 and in that case multiply
the amount of bytes by 8 and then divide by the number of bits per
pixel.
2023-07-31 13:58:26 -04:00
Jacob Boerema df8a349243 app: fix error on Windows with clang
When building using MSYS2 CLANG64 profile using clang 16, we get the
following error (besides other required patches):

../../gimp/app/widgets/gimpwidgets-utils.c:931:12: error: incompatible
pointer to integer conversion returning 'HGDIOBJ' (aka 'void *') from a
function with result type 'guint32' (aka 'unsigned int')
[-Wint-conversion]

For now, let's use the same GPOINTER_TO_INT macro we use in
gimpprogressbar.c. In the end, we need a 64-bit type available to
plug-ins, but that needs more work.
2023-07-31 13:58:26 -04:00
Jacob Boerema b5be3376a9 ci: remove aalib artifact path
We don't build aalib ourselves anymore since it's now provided by MSYS2,
so this build artifact is obsolete. Let's remove it.
2023-07-31 13:58:26 -04:00
lillolollo 87ed4842b4 Update link to the performance log instructions 2023-07-31 03:46:35 +00:00
Alx Sa 4b54ceb023 plug-ins: Fix lava filter for non-square selections
Resolves issue #9809, fix by @mareroqpoland.
When "Separate Layer" is selected, the entire drawable is always
filled rather than using the selection. This patch uses the selection
instead (which will be "all" if there is no active selection)
2023-07-30 22:24:49 +00:00
Stanislav Grinkov 261eb28eb4
icons: add thin border around color/legacy tool-text icon...
... to make it visible on the dark themes.

Resolves: #9681 (Gitlab GNOME tracker)
2023-07-29 20:47:13 +06:00
Balázs Úr 30afce1cd0 Update Hungarian translation 2023-07-29 06:31:35 +00:00
Balázs Úr a764bdcc7f Update Hungarian translation 2023-07-29 06:25:55 +00:00
Danial Behzadi d4d2a09d8a Update Persian translation 2023-07-29 00:41:49 +00:00
Danial Behzadi 248cadcfd8 Update Persian translation 2023-07-29 00:36:28 +00:00
Danial Behzadi 9e72ad0cbb Update Persian translation 2023-07-29 00:33:06 +00:00
Yuri Chornoivan 2c9896506d Update Ukrainian translation 2023-07-28 13:39:26 +00:00
Yuri Chornoivan 37295576b5 Update Ukrainian translation 2023-07-28 13:35:49 +00:00
Martin c64d7a71e3 Update Slovenian translation 2023-07-28 09:59:19 +00:00
Ekaterine Papava c42e205efb Update Georgian translation 2023-07-28 03:53:10 +00:00
Jehan 22f120333f Issue #9655: both @blurb and @help arguments should be localized.
Looking further, the @help is only used in gimp_proc_view_new() so far (for the
Procedure Browser) where the blurb and argument descriptions are already
localized. It makes no sense to only keep this in English. So let's ask to have
both arguments translated.

Now clearly we should not ask for @help to be mandatory. Very often, it makes no
sense to have a longer help string (the small blurb and the few arguments may be
very self-explanatory). So I make this argument nullable.

There is only the @help_id which I wonder if we could not have a simpler
function gimp_procedure_set_documentation_uri(). Indeed while having a unified
infrastructure with a XML summary and help IDs and whatelse makes sense for GIMP
as a whole, I think that many third-party plug-ins would work much better with a
very simple direct URL. Or it could even be a GFile to a local file (for
plug-ins which want to embed their documentation in the plug-in folder for
instance). To be continued…
2023-07-27 22:59:51 +02:00
Jehan ce0a84003c libgimp, libgimpconfig: GimpResource can now be (de)serialized.
I add a new class method deserialize_create() to GimpConfigInterface which
returns the GimpConfig object per deserialization, instead of modifying an
existing bare object.

This matters for cases like our GimpResource (and later our GimpItem) classes
which are fully managed by libgimp and should be unique objects per actual
resource. It should even be possible to compare the pointer itself for identity.
That's why we need to let GimpResource create the object (in reality request it
to the infra and only ref it) through this new class method.

With this commit and the previous ones, all GimpResource are now properly stored
as plug-in settings (e.g. the "film" plug-in has a font setting which is now
properly remembered).

These identifiers are not portable (across various installations and therefore
not for XCF either), but at least they are reasonably identifying data on a same
installation (unlike GimpResource's int ID which is only valid within a single
session) which makes them very fine for plug-in settings storage.

When a data file disappears, we fallback to the context default data instead.
2023-07-27 15:34:45 +02:00
Jehan 38c717b149 app, libgimp, pdb: private _gimp_resource_get_by_identifiers() PDB function.
This finds the core resource knowing its type, name, collection and internal
state (in other words, the values returned by _gimp_resource_get_identifiers()).
2023-07-27 15:32:16 +02:00
Jehan fe58de7f81 app, libgimp, pdb: new private PDB call _gimp_resource_get_identifiers(). 2023-07-27 15:30:14 +02:00
Jehan 1a9c470b82 app: fix gimp_data_get_identifier() and add a concept of data collection.
The way we were creating a GimpData identifier was simply wrong, because it was
based on the assumption that the source file uniquely identifies a GimpData (cf.
gimp_tagged_get_identifier() which clearly says that the returned string must
uniquely identify this data). The very simple counter-examples for why this is
a mistake to consider a data file to be a good unique identifier are collection
files. For instance, TTC files (TrueType Collection) contain multiple fonts.

Instead I am adding the concept of "collection" with the assumption that
**within a given collection**, data names are unique (I do hope this to be and
stay true). So I add gimp_data_get_identifiers() and gimp_data_identify() to get
identifiers and check for identity.

The collection will use the old implementation of gimp_data_get_identifier()
because it is quite nice to have paths relative to data and config directories
(it allows some cases of data relocation without losing data identification).

The new implementation to compute a GimpTagged identifier on the other hand will
construct a string from the quality of being internal or not, the data name and
its collection.
2023-07-27 15:29:58 +02:00
Jehan 41ed091879 app, libgimp, pdb: add an internal gimp_context_get_resource().
This will be useful in an incoming code to serialize GimpResource PDB arguments.
2023-07-27 15:27:53 +02:00
Jehan 86cbb5232b pdb: fix a typo.
I guess we never use that type nowadays.
2023-07-27 15:27:29 +02:00
Jehan d439e9ff5c app, libgimp, pdb: factorize a bunch of similar code into gimp_pdb_get_resource().
Rather than reimplementing the same checks for every possible resource data
type, just do it once and redirect to the correct factory container.

For the libgimp API, we leave per-type functions `gimp_*_get_by_name()` (where *
can be brush|gradient|font|palette|pattern so far), but internally they all use
gimp_pdb_get_resource().

Note that eventually we want these functions to return a list of resources as it
should be possible to have several resources of a given type with the same name
(since they are made by third-party who might have had the same idea of a name).
2023-07-27 15:25:32 +02:00
Jehan ccde23ebaa libgimpconfig: don't break serializing properties if one property serialization…
… fails.

This happens for plug-in settings storage. Serialization stops at first failed
property serialization, whereas we could store more. This feels like the last
settings feature is broken.
2023-07-27 15:24:56 +02:00
Balázs Úr 13dcc85daa Update Hungarian translation 2023-07-26 23:40:40 +00:00
Alx Sa f947109f92 build: Enable IFF format on Windows
Now that libiff and libilbm have been added to the MSYS2 repositories,
the plug-in can be built automatically on Windows.
2023-07-26 17:12:35 -04:00
Jacob Boerema 43a5b92c65 build: MSYS2 package python3-gobject was replaced by python-gobject 2023-07-26 16:29:22 -04:00
Jehan b64543caff libgimpwidgets: create proper links in function documentation. 2023-07-26 15:25:39 +02:00
Martin 7b737ecff7 Update Slovenian translation 2023-07-26 08:57:13 +00:00
Martin 18081d1745 Update Slovenian translation 2023-07-26 08:55:42 +00:00
Ekaterine Papava acc2baa7a6 Update Georgian translation 2023-07-26 03:57:22 +00:00
Ekaterine Papava 3d1325f52a Update Georgian translation 2023-07-26 03:49:57 +00:00
Jehan 269502cfe4 NEWS: update. 2023-07-26 00:53:00 +02:00
programmer-ceds b84095d7c6 Fix Tools Shortcuts 2023-07-25 21:33:28 +00:00
Anders Jonsson 8b84c5551b plug-ins: add and correct gettext macros in Python 2023-07-25 21:26:57 +00:00
Jehan 21a329dae6 app: nearly all GimpFont object now have an associated file.
(except from the aliases "Sans-serif", "Serif" and "Monospace")

The code to get the file path was inspired by code in MR !1011 by Idriss Fekir.

My initial idea was to use FcFreeTypeQueryAll() when adding each font
individually through FcConfigAppFontAddFile() but we were only doing this for
our additional directories (not the system ones) and also before we actually
loaded all the fonts through FontConfig. So this would have required more work
to get right. Though it also means that now the ! USE_FONTCONFIG_DIRECTLY code
path is more broken than ever (as we consider this path information quite
important for plug-ins now).

Additionally to make this work, I got rid of the code making all GimpFont
objects internal data by default, which is nonsense to begin with. Fonts are not
writable by GIMP, sure, yet they are external to GIMP and loaded from a file!

This will be important for an upcoming commit (which is currently in a branch
related to issues #50 and #9250), where we want to implement GimpResource
storage as plug-in settings, because fonts were the only GimpData without a file
and we are using this information to generate a collection identifier.
2023-07-25 23:10:29 +02:00
Jehan 9f9c0b4ea6 app: GimpFontFactory doesn't force anymore unique font names.
Note that there is a `container_obsolete` too in GimpDataFactory and I don't
apply the "unique-name" property to it because I'm unsure what it is.

Furthermore, eventually we'll want all types of data to allow duplicate names
(brushes, patterns or whatnot may come from all sources and may be named the
same by different people). But for now, let's focus on fonts before breaking
other parts of the codebase which we might not look into right now.
2023-07-25 23:10:26 +02:00
Jehan 0226b3ff5e app: only display the number of ignored fonts (and full listing if…
… the GIMP_DEBUG_FONTS environment variable is set.

Turns out nearly a thousand font files get ignored on my installation (and I
don't install much; a lot of them seem to be bitmap fonts (PCF) in a X11
directory). I still want output so that this topic doesn't get forgotten and
hopefully some day, we can do better. But a single line on stderr (and an
environment variable for details) is enough for now.
2023-07-25 21:16:04 +02:00
Idriss Fekir 5972d8d97f Implement support for custom fonts
Remap font names to unique generated names
so that pango sees them.

keep the font name for display and the internal
name for everything else.

* Fonts are still broken When exporting to pdf

* Not sure if xcf files would be usable on other systems
maybe use hash of psname internally instead

* Not sure if plug-ins using text layer work correctly
(do they use internal font name or the actual name?)
2023-07-25 21:16:04 +02:00
Yuri Chornoivan d337d2d196 Update Ukrainian translation 2023-07-25 19:04:17 +00:00
Jehan 490cb4ca3a app: rename snap data type to GimpImageSnapData and remove it from core-types.
This is definitely not core type material. Also it's much better in the proper
header gimpimage-snap.h and the type name should reflect the file namespace,
especially as we make it public.
2023-07-25 16:07:06 +02:00
mr.fantastic a6cf90b208 Support showing distance by view unit in realtime alignment 2023-07-25 15:31:16 +02:00
mr.fantastic 9e793cfe87 Adding on canvas text for equidistance snapping visualization 2023-07-25 15:31:16 +02:00
mr.fantastic 58d85efe75 Adding visuals to snapping by bounding boxes and equidistance
- Avoid conflict between snapping to active point and bbox/alignment snapping
- rearrange bbox snapping calls to give layer center more priority
2023-07-25 15:31:16 +02:00
mr.fantastic c47f4954ef Adding snapping by equidistance functionality 2023-07-25 15:31:16 +02:00
mr.fantastic 0aa8ac4660 Adding initial support for snapping layers/path_points by layers bounding boxes 2023-07-25 15:31:16 +02:00