Commit Graph

133 Commits

Author SHA1 Message Date
Jehan b06fe36970 app, libgimp*, plug-ins, tools: settings custom check colors now space-invaded.
We pass 2 GeglColor through the wire now. Since it is passed very early
(when sharing the configuration), I had some issues with initialization
order of GEGL, and in particular when calling gegl_init() before
gegl_config() inside _gimp_config(), I had a bunch of such criticals:

> Plugin script-fu: GLib-GObject: CRITICAL: Two different plugins tried to register 'GeglOpPlugIn-transform-core'

Anyway in the end, I store the passed colors as raw bytes and strings in
the GPConfig object, and re-construct the GeglColor last minute in
_gimp_config().
2024-02-11 23:28:02 +01:00
Jehan 29ce8f234f libgimp*: removing now useless Makefile.gi files.
These were include files for the autotools build and are now unused.
2023-10-01 20:52:02 +02:00
Jehan 231ca0c505 Issue #9994: do not call g_file_info_get_is_hidden() (and others) directly.
This is not the main reason for the specific output in #9994. These ones are
more probably because of similar usage in GTK (which updated its own calls to
g_file_info_get_is_hidden|backup() in version 3.24.38). But we should likely
also update the various calls we have to use the generic
g_file_info_get_attribute_*() variants.

To be fair, it is unclear to me when we can be sure that an attribute is set.
For instance, when we call g_file_enumerate_children() or g_file_query_info()
with specific attributes, docs say that it is still possible for these
attributes to not be set. So I assume it means we should never use direct
accessor functions.

The only exception is that I didn't remove usage of g_file_info_get_name(),
since its docs says:

> * Gets a display name for a file. This is guaranteed to always be set.

Even though it also says just after:

> * It is an error to call this if the #GFileInfo does not contain
> * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

Which is very contradictory. But assuming that this error warning was
over-zealous documentation, I kept the direct accessors since they are supposed
to be slightly more optimized (still according to in-code documentation) so
let's priorize them when we know they are set for sure.
2023-09-19 15:34:48 +02:00
Michael Natterer 26dce72d2c Remove autotools 2023-05-27 00:03:52 +02:00
Jehan 106f2a061d Issue #8145: meson: generation of '*-enums.c' files.
Our meson build system was not properly building the enums.c file,
because they are versionned.

I did a similar trick as what I did for the pdbgen, which is that I used
a wrapper script around the existing perl script, which sets proper
options and generate a stamp file in the end (which is considered by
meson as the actual custom target, not the C file since it is generated
in the source dir).

The most important part is that the stamp file is a generated header
source (not just a random text file) which is **included** by the
generated C file. This is what will force meson to regenerate the C file
if the header is updated, **then** build using this new version, not use
an outdated versionned version (which would make for hard to diagnose
bugs), through the indirection of the intermediate stamp header.

See #4201.
See also: https://github.com/mesonbuild/meson/issues/10196#issuecomment-1080742592
2022-08-01 19:59:53 +02:00
Marie-P c112a55958 libgimp*, plug-ins: fix some warnings 2021-05-24 20:36:31 +00:00
Stanislav Grinkov 203393a9fc core: function documentation clarification
Update api documentation of GimpObject and GimpThumbnail classes to
clarify who and when will take care of disposing passed strings.
2021-05-24 11:04:44 +00:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00
Jehan 2dde79b3e7 libgimp*: move GObject Introspection into libgimp/.
libgimp is anyway processed at the very end after all other libgimp*
were built. This way, it also fixes #3746, by removing the $(top_srcdir)
everywhere from introspected files, hence making the build work again
with older automake.
2019-08-08 15:59:44 +02:00
Michael Natterer cc8fc0f90f libgimp*: add GI's .dirstamp to .gitigore 2019-08-03 19:50:17 +02:00
Niels De Graef 5f92ced1f3 Add (nullable) if applicable
Basically this commit makes sure that all return values that are marked
as "Returns:" also have a `(nullable)` annotation if it is mentioned on
the same line that NULL can also be returned.

This will prevent a few problems in GObject-introspection.
2019-08-03 07:53:47 +00:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Jehan 6fe2508301 libgimp*: fix various missing (transfer) annotations. 2019-08-01 01:52:07 +02:00
Michael Natterer 63695b4b21 libgimbase: merge gimpparam.h into gimpparamspecs.h
which means that it's now included normally via gimpbase.h
and not any longer via gimpbasetypes.h which we only did out
of lazyness. A *lot* of files in libgimp* and app/ now need to
2019-07-31 10:16:21 +02:00
Jehan 7444b8eb9c libgimpthumb: do not scan gimpthumb-enums.c for introspection.
gimpthumb-enums.c is a built source from the header. No need to scan it.
As a side effect, it fixes another build break as it could not recognize
the construction rule for this file.
Thanks to tmanni for raising these build issues.
2019-07-28 20:59:10 +02:00
Jehan 01e958422b libgimpthumb: argh! Copy paste error which broke the build. 2019-07-28 20:42:36 +02:00
Jehan fb4c86a660 libgimp*: make more libgimp* libraries introspected.
Only libgimpwidgets is not introspected yet as it didn't work from
scratch and I don't have the time right now to look into it. Anyway with
all the others, we already have so many warnings during the GObject
Introspection step now that we have a lot of work to do already!
2019-07-27 20:25:20 +02:00
Michael Natterer c144cf69de libgimp*: use more g_clear_pointer() 2019-07-25 12:37:52 +02:00
Jehan f8a1d574ee libgimpthumb: another missing link to libgimpbase.
Again this error was only raised when cross-compiling.

(cherry picked from commit 2587b85aaa)
2018-08-12 22:46:44 +02:00
Michael Natterer 02160a26b0 libgimpthumb: update the URL of the thumbnail spec 2018-07-14 13:25:41 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +02:00
luz.paz 147c09f19e Bug 795161 - Misc. typo fixes in source comments and doxygen
Found via `codespell`
Follow-up to  commit 7fdb963e01
2018-04-18 21:06:57 +02:00
Ell 6ebc3f1b09 Makefiles: don't use -xobjective-c when linking files on Mac
Last commit caused -xobjective-c to be passed during linking on
Mac, causing object files to be treated as source files.  Add a
-xnone flag to AM_LDFLAGS, canceling the effect of -xobjective-c.

Additinally, add a -xobjective-c++ flag to AM_CXXFLAGS, so that we
can use Objective-C in C++ files on Mac, if we ever need to.
2018-04-08 04:03:55 -04:00
Ell 06950be7f0 Makefiles: don't use -xobjective-c when compiling C++ files on Mac
On Mac, pass -xobjective-c to the compiler through AM_CFLAGS, not
AM_CPPFLAGS, so that it's only used for C sources, and not C++
sources.  In the latter case, it clashes with the -std=... flag,
spewing an error.  Thanks, Partha :)
2018-04-07 16:57:52 -04: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
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
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 8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Michael Natterer 47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
Michael Natterer 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Jehan 8c1cd7caac Makefile: fix VPATH builds for win32. 2014-09-14 18:28:26 +02:00
Jehan 6208d21979 Bug 622758 - Fix error display for thumbnail creation
Do not stay forever in "Creating Preview..." state during
auto-thumbnailing, and fix error showing when creation fails.
2014-02-14 15:08:45 +13:00
Jehan 44fe30ef80 libgimpthumb: fix "assignment discards ‘const’ qualifier" warning. 2013-12-05 22:18:15 +13:00
Jehan 79cab368d3 libgimpthumb: adds "Since: GIMP 2.10" information to gimp_thumb_get_thumb_base_dir() 2013-12-05 22:16:48 +13:00
Jehan 6c4d8c45b7 libgimpthumb: new function gimp_thumb_get_thumb_base_dir()
Also use this new function in the gimp-thumbnail-list tool, which must
always use the same thumbnail folder as GIMP core.
2013-12-05 21:20:28 +13:00
Jehan 1e8ed15c13 libgimpthumb: fix error message when thumbnails dir detection fails.
We are now using the Freedesktop standard for the thumbnails dir, which
is not relative to home anymore.
2013-12-04 23:03:53 +13:00
Michael Natterer 027e34230e libgimpthumb: add GIO_LIBS also to gimp_thumbnail_list_LDADD 2013-07-01 19:06:12 +02:00
Michael Natterer 66847b4cfd libgimpthumb: use GIO_CFLAGS/LIBS not GLIB_CFLAGS/LIBS 2013-06-29 18:11:07 +02:00
Michael Natterer bb75596062 Bug 683152 - Preview thumbnails in file open dialog causes error in 2.8.2
Port gimp_thumb_file_test() to GIO which seems to get its stat()
calls right on all platforms.
2013-06-28 22:44:19 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer 66ff5dd70b Remove all calls to g_type_init(), it's deprecated
The type system is initialized automatically now.
2013-05-25 22:44:20 +02:00
Jehan 483505f2fc Bug 646644: support of freedesktop's Thumbnail Management Standard. 2013-05-10 07:57:39 +09:00
Ville Pätsi 9fe4e5fad9 Support file dates set to before the start of time 2012-09-21 20:52:07 +03:00
Michael Natterer 9112d68488 Move gimpdir and thumbnails to proper places on OSX
gimpdir goes to ~/Library/Gimp/x.y
thumbnails go to ~/Library/Caches/org.freedesktop.thumbnails

The thumbnail location is not standardized yet, but is the only
location that makes sense. Also fix user install to search old
gimpdirs to migrate in both Library and the classic location.
Remove the obsolete CABON_CFLAGS from all makefiles.
2012-05-12 14:39:44 +02:00
Michael Natterer 486e76bdab libgimp*: use GIMP_API_VERSION in Makefile.am instead of hardcoding 2.0 2012-05-04 15:38:45 +02:00
Michael Natterer 056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00
Michael Natterer 844df2b4df libgimp*: add guards that #error out if individual files are included
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.

The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
2011-04-28 14:30:41 +02:00
Michael Natterer 8efe98649e libgimpthumb: fix all gtk-doc warnings, and reach 100% doc coverage, yay! 2010-07-02 16:01:40 +02:00