Commit Graph

585 Commits

Author SHA1 Message Date
Michael Natterer e2ddfdc391 libgimpbase: add #define GIMP_METADATA_ERROR gimp_metadata_error_quark () 2017-09-03 15:46:17 +02:00
Michael Natterer ac7d8aa98d Bug 787019 - Gimp 2.9.6 misses -lm in libgimpbase/Makefile.am
Apply patch from Sebastian Pipping which adds -lm.
2017-08-31 21:36:06 +02:00
Ell 58fdaae3ad enums: add intermediate generated enum files to .gitignore 2017-08-24 15:35:27 -04:00
Jehan 6ff1ffa688 libgimpbase: add gp_(un)?lock() calls to the def file. 2017-08-16 12:22:11 +02:00
Jehan 15f7344038 libgimp, libgimpbase: allow multi-threaded plugins by locking...
...protocol calls.
Some calls are waiting for answers, for instance plugin procedures, and
tiles which expects data and acknoledgement.
This would result in error messages such as:
"expected tile ack and received: 5" (5 is GP_PROC_RUN)
Typically because a thread would run a procedure while another would
receive tiles.
2017-08-16 12:09:56 +02:00
Mikael Magnusson cab45eebf0 libgimpbase: fix compilation error in gimpmetadata.c 2017-08-11 19:42:18 +02:00
Michael Natterer 3b1916654c libgimpbase: return a \0 terminated string from gimp_metadata_get_guid() 2017-07-17 08:20:46 +02:00
Michael Natterer 93d2f49c16 Bug 784961 - Undeclared identifier 'TIME_UTC' - GIMP fails to build...
...on macOS (with macports)

Changed gimp_metadata_get_guid() to use a GRand that automatically
seeds itself from /dev/urandom (if available) or the current time.
2017-07-16 14:01:18 +02:00
Michael Natterer 8294ca9d21 Bug 784502 - Multiple identical path entries for resources cause...
...resources to be loaded and shown multiple times

Change gimp_path_parse() to filter out duplicate paths. This is the
function at the bottom which is used by everything else, so should
generically catch all duplicates.
2017-07-08 12:50:37 +02:00
Michael Natterer 4789acfd1e libgimpbase: add new metadata symbols to gimpbase.def 2017-07-08 00:10:50 +02:00
Michael Natterer 747b3768ef libgimpbase: remove gimp_metadata_register_xmp_namespace[s]()
and do the same in gimp_metadata_class_init(). Also fix all compiler
warnings and other stuff.
2017-07-07 19:11:12 +02:00
Ben Touchette dc9856cfe1 Bug 769820 - Cannot enter Iptc information when no metadata is available...
...and fails to write it to file when it is

Completely redo metadata editor and viewer code, adds support for
Xmp.xmpMM.History and more.
2017-07-07 18:11:39 +02:00
Jehan 7999cfbeef libgimp*: tab cleaning. 2017-06-17 11:38:18 +02:00
Ell 3ca48a0b30 enums: don't use comments in generated enum recipes
Works in bash, but apparently not portable.
2017-06-02 11:15:43 -04:00
Jehan cb02326284 libgimpbase: minor tab cleaning. 2017-05-23 18:09:41 +02:00
Ell 5bcde32caf enums: run gimp-mkenums from the build dir
Commit 1e6acbd4e1 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files.  This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.

Switch back to running gimp-mkenums from the build directory.  To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
2017-05-22 20:29:18 -04:00
Ell f9fa0d1b18 enums: don't write generated enum files to src-dir if unchanged
When regenerating an enum file, don't copy it back to the source
directory if it hasn't actually changed.  This allows using a read-
only source directory where the enum header is newer than the
generated file, as long as they're not really out of sync.

OTOH, *do* touch the generated source-dir file even when unchanged,
in order to avoid re-running its recipe on the next build, however,
allow this to silently fail (which is harmless).
2017-05-22 17:58:04 -04:00
Michael Natterer d955b8c5b4 libgimpbase: change labels of GimpSelectCriterion values
so they are consistent with layer mode labels.
2017-05-10 11:45:34 +02:00
Michael Natterer 3f420614ff app, libgimpbase: allow to select colors by CIE L, C, and H
Add the additional enum values to enum GimpSelectCriterion, and
the few needed lines to gimppickable-contiguous-region.c.

It's horribly slow, but works.
2017-05-09 22:02:19 +02:00
Ell 1e6acbd4e1 enums: generate enum files in source dir
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.

Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
2017-05-06 17:26:16 -04:00
Jehan 695a1c26aa libgimpbase: update gimp_unit_get_digits() description...
... to favor the usage of gimp_unit_get_scaled_digits() when
appropriate.
2017-05-06 22:36:23 +02:00
Jehan bc344a9991 Bug 750180 - Fix different ways of writing Plug-in Plug-In Plugin.
It was agreed that we should write "plug-in" consistently. Only possibly
user-visible strings were updated.
Thanks to scootergrisen for a first patch which could not make it
after changing decision on the canonical writing.
2017-03-21 17:52:22 +01:00
Elle Stone 48e4044672 Bug 780065 - Change default way to desaturate to Luminance
which unlike HSL Lightness is actually physically meaningful and
also generally speaking much more useful than HSL Lightness.

Change "Lightness" to "Lightness (HSL)" to make it clear that
the "Lightness" in the Colors/Desaturate/Desaturate menu is not the
same as "Lightness" in LAB/LCH.

For completeness add the option to desaturate to "Value (HSV)".

Add links in app/operations/gimpoperationdesaturate.c
to the Wikipedia article with definitions of L/I/V in HSL/HSI/HSV.
2017-03-17 17:16:03 -04:00
Ell 3f15db9207 libgimpbase: add missing compat enum get_type()s to gimpbase.def 2017-02-28 06:53:22 -05:00
Michael Natterer fb3d1e4508 app, pdb, libgimp: rename values of enum GimpConvertPaletteType 2017-02-26 20:55:00 +01:00
Michael Natterer ed1ab140fb app, pdb, libgimp: rename values of enum GimpConvertDitherType
being exported to libgimp, and having a non-exported value, this is a
horrible mess like with GimpLayerMode, but at least the cruft value
names are deprecated now.
2017-02-26 20:13:09 +01:00
Ell 8f362941a5 libgimpbase: avoid build-time race between the two generated enum files 2017-02-19 15:18:30 -05:00
Simon Budig 7fd76c9325 libgimpbase: make .def-file consistent again. 2017-01-30 18:53:20 +01:00
Simon Budig 0d073b943c libgimpbase: make the private data size > 0 to avoid critical warnings 2017-01-30 17:05:23 +01:00
Simon Budig 884edf56ca libgimpbase: make GimpMetadata its own type derived from GExiv2Metadata 2017-01-30 16:43:59 +01:00
Michael Natterer ebd3ab1b26 A more hackish way to use GimpLayerMode instead of GimpLayerModeEffects
C++ won't allow us to use GimpLayerMode in the API where we used to
have GimpLayerModeEffects.

Move GimpLayerModeEffects to libgimpbase/gimpcompatenums.h so it's
not in the API any longer, and instead typedef and define stuff in
libgimp/gimptypes.h, and adapt the compat enum registering code
accordingly.
2017-01-24 23:28:34 +01:00
Jehan 0c07ae3bbf libgimpbase: new gimp_unit_get_accurate_digits() API function. 2017-01-23 20:20:25 +01:00
Jehan 7a330dcf6a libgimpbase: update gimp_unit_get_digits() description.
Digit accuracy being "approximately the same as an inch with 2 digits"
is only true for built-in units, not user-defined ones.
2017-01-20 00:40:27 +01:00
Jehan 3ab25af742 libgimpbase: fix a few typos. 2017-01-20 00:40:27 +01:00
Michael Natterer e5ac28811e libgimpbase: add compat enum get_type() functions to gimpbase.def 2017-01-09 19:46:34 +01:00
Michael Natterer 07600c6db6 libgimpbase: proper names for the GimpChannelType enum
Register the old value names as compat. Also add some forgotten
values and enums to gimpcompatenums.h
2017-01-09 19:40:30 +01:00
Michael Natterer 178794f6f1 libgimpbase: rename enum GimpHueRange's values
and add compat cruft for the old names.
2017-01-09 02:45:16 +01:00
Michael Natterer a2006110eb libgimpbase: fix typo on Makefile.am 2017-01-09 02:04:01 +01:00
Michael Natterer e53b269f1c libgimpbase: add new files gimpcompatenums.[ch]
Which are entirely private (not installed). They contain compat values
for enums where values have been renamed in gimpbaseenums.h.  The old
names get the old nicks generated so the new values in gimpbaseenums.h
can have proper new nicks. Register them as compat enums using
mechanism introduced for the GimpLayerMode change.
2017-01-09 01:05:48 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Hartmut Kuhse 66bc98d299 Revert "New GimpMetadata as subclass of GExiv2Metadata"
This reverts commit 3ab08c8bfd.
2017-01-03 19:36:22 +01:00
Hartmut Kuhse 3ab08c8bfd New GimpMetadata as subclass of GExiv2Metadata 2017-01-03 19:26:35 +01:00
Anders Jonsson a39ee69656 Fix typo and double space between words
https://bugzilla.gnome.org/show_bug.cgi?id=774004
2016-11-06 17:41:04 +01:00
Michael Natterer 31fcd79dd9 Bug 769738 - Add color tags/labels for layers/channels/paths
Add property "color-tag" of type enum GimpColorTag to GimpItem so all
layers, channels and paths can be tagged with a color.

For interoperability, use the color list from Krita which is a
superset of Photoshop's colors.

Features a "Color Tag" submenu in the layers, channels and paths
menus, a row of color radio buttons in the properties dialogs,
undo and PDB API.

As a side effect, some common code is now factores out into
items-actions.[ch] and items-commands.[ch] which adds visible, linked
and lock actions for layers and channels.
2016-10-29 17:02:16 +02:00
Michael Natterer 5f0e6cf148 libgimpbase: add translatable descriptions to enum GimpMergeType 2016-09-25 00:18:43 +02:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Jehan 8ac1e407c5 Bug 763202 - Create $XDG_DATA_HOME if it doesn't exist.
This has shown a problem especially on non-Linux platforms since XDG
is more of a Linux standard.
2016-06-13 03:34:26 +02:00
Michael Natterer e5a669bdfc libgimpbase: fix gimp_metadata_set_from_xmp() to really expect XMP
Don't skip the first 10 bytes. That code was there to skip the magic
"GIMP_XMP_1" of the old "gimp-metadata" parasite. Instead, properly
check for that magic in xcf_load_image() and pass only the actual XMP
to gimp_metadata_set_from_xmp(). Also remove the +10 hack in file-exr.
2016-04-22 22:49:06 +02:00
Massimo Valentini a3f4c50b3e Bug 765411: CRITICAL warnings loading an xcf with...
"exif-data" parasite

To migrate old "exif-data" parasites to GimpMetadata
an exif-only jpeg file is generated in memory, but its
APP1 marker length was 2 bytes short resulting in a
CRITICAL warning:

** (gimp-2.9:9): CRITICAL **: Directory Photo: IFD exceeds data buffer, cannot read next pointer.

Properly terminating the jpeg with an EOI marker also
gets rid of the WARNING:

** (gimp-2.9:9): WARNING **: JPEG format error, rc = 5
2016-04-22 17:30:44 +02:00
Jehan 0f67e21c98 themes: rename theme "Default" into "System".
Since we have many themes now, this new name better indicates that it
is meant to follow your desktop theme settings.
Also it will likely not remain the default theme.
2016-03-22 16:37:10 +01:00