Commit Graph

117 Commits

Author SHA1 Message Date
Jehan ccbf3c4bb0 app, libgimp*: add various stamp files to CLEANFILES.
Fixes:

> ERROR: files left in build directory after distclean:
2022-08-01 23:34:50 +02:00
Jehan 83e465ec16 app, libgimp*: updating autotools script in sync with meson.
Generated *enums.c now have an additional stamp no-op header include
(see last 2 commits). Sync this change into the autotools generation
scripts to prevent back and forth useless generation of these files each
time we switch from one build system to another.
2022-08-01 20:00:01 +02:00
Luca Bacci f6fc9d4245
Rename GimpLangRc to GimpEarlyRc 2021-08-25 18:23:17 +02:00
Oleksii Samorukov 6b5d1a0d46 Fix reference from gimp_param_spec_duplicate to gimp_config_param_spec_duplicate 2020-01-17 11:17:03 +01:00
Michael Natterer 1caff42c30 app: add missing space in gimp-mkenums command in config/ and display/ 2019-10-29 22:13:34 +01:00
Michael Natterer 967cbb4fad app: use the GParamSpec's name in gimp_pdb_dump()
and remove gimp_pdb_compat_arg_type_from_gtype(). The core is now free
of PDB legacy code.
2019-08-30 11:43:53 +02:00
Michael Natterer 32ea28b6b1 app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
  information needed for constructing all GParamSpecs we use, don't
  use GimpPDBArgType in GPProcInstall but an enum private to the wire
  protocol plus the GParamSpec's GType name. Bump the wire protocol
  version.

- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
  take care of converting between GPParamDef and GParamSpec. They
  share code as far as possible.

- Change pluginrc writing and parsing to re-use GPParamDef and the
  utility functions from gimpgpparamspecs.

- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
  the entire core uses proper GParamSpecs from the wire protocol now,
  the whole file will follow down the drain once we use a GValue
  representation on the wire too.

- In gimp_plug_in_handle_proc_install(), change the "run-mode"
  parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
  already an enum). and change all places in app/ to treat it as an
  enum value.

- plug-ins: fix cml-explorer to register correctly, a typo in
  "run-mode" was never noticed until now.

- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
  between old-style wire communication and using GParamSpec and
  GValue, it contains some functions that are subject to change or
  even removal in the next steps.

- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
  able to actually install procedures the new way.

- plug-ins: change goat-exercise to completely use the new GimpPlugIn
  and GimpProcedure API, look here to see how plug-ins will look in
  the future, of course subject to change until this is finished.

- Next: changing GPParam to transmit all information about a GValue.
2019-07-28 17:34:40 +02:00
Michael Natterer e931895f7c Issue #3364 - make check fails with a linker error
Link tests against $(LIBARCHIVE_LIBS).
2019-05-25 16:02:00 +02:00
Jehan 88f97aedef Issue 2949: Newly Installed Fonts not Registering.
Apparently Microsoft added just recently the feature to install user
font (as opposed to system-wide fonts), without administration rights
(yes, only now, how crazy is that?). Right now GIMP does not see fonts
there.

We have an upstream report at fontconfig where such a default search
path should happen.
See: https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/144
Until it gets fixed there, let's just add the user fonts dir ourselves
in GIMP. This code should get killed later.

Notes:
- I renamed various DEFAULT_* data macros to GIMP_DEFAULT_* because
DEFAULT_PALETTE was conflicting with another macro in Windows API!
- Also I removed the DATADIR macro set under app/config/ because it is
also conflicting and anyway we use it in no files on this level.
- This is not perfectly tested on Windows. Please everyone with Windows
access, could you build and test if it works fine before release?
2019-04-28 22:38:26 +09:00
Ell 68b22d45ed app: link tests against libappfile-data 2019-02-12 13:54:24 -05:00
Salamandar fc657184a0 Undo some (unnecessary) changes. 2019-01-25 19:08:28 +00:00
Félix Piédallu fc8303dd0a (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)
2019-01-25 19:08:28 +00:00
Ell 889e2e26ee app: remove gimp-scratch; replace with gegl-scratch
The scratch allocator has been moved to GEGL (commit
gegl@b99032d799dda3436ffa8c1cc28f8b0d34fb965d).  Remove gimp-
scratch, and replace all its uses with gegl-scratch.
2019-01-06 07:37:19 -05:00
Ell 67d595f651 app: sigh, another gimp-scratch link fix, in config/
That's the last one :)
2018-12-01 08:26:16 -05:00
Michael Natterer 6a7a010769 app: link tests against APPSTREAM_GLIB_LIBS 2018-07-06 13:26:07 +02:00
Ell e75bdf3acf app: fix linking of test-config 2018-05-29 17:07:55 -04:00
Jehan f8e1d3b9c8 app, configure: adding dependency to mypaint-brushes.
This ensures that MyPaint default brushes are installed, otherwise this
makes the MyPaint brush tool quite useless and confusing unless MyPaint
is installed (which was making MyPaint a de-facto dependency of GIMP
until this commit!). Also we won't have to guess anymore the right path
for these brushs. The path will be known at compile time.
2018-01-01 22:33:56 +01:00
Ell f7d6805ebb */Makefile.am: add abbreviations to generated enum files
Update the dprod production of generated enum files to include
abbreviated value descriptions, as per the previous commits.

Add a comment for translators above the abbreviated descriptions,
specifying the full description they abbreviate.
2017-11-30 03:10:14 -05:00
Jehan d01e182c7b Bug 787457 - Paint brush settings display system language (e.g. zh_TW)
... and ignore language setting (e.g. en_US).
The problem came from the fact that these settings names are class
properties of GimpPaintOptions/GimpContext which is first instanciated
when the Gimp object is created. This unfortunately happened before
language_init() since we needed these objects when loading gimprc
(making inversion of calls rather complicated).
Therefore they were localized with the system language, not the
configured language.
The solution was to create a very simple object GimpLangRC which
implements the GimpConfig interface, for sole purpose to read the
language from `gimprc` in a first pass. gimp_load_config() will still
happen later as a second pass to properly load the rest of the
configuration.
2017-10-09 00:36:44 +02:00
Ell 71bbd88e00 app: layer mode code shuffling
Commit 3635cf04ab moved the special
handling of bottom-layer compositing to GimpOperationLayerMode.
This required giving the op more control over the process()
function of its subclasses.  As a temporary workaround, the commit
bypassed the subclasses entirely, using "gimp:layer-mode" for all
modes.  This is the reckoning :)

Add a process() virtual function to GimpOperationLayerMode, which
its subclasses should override instead of
GeglOperationPointComposer3's process() functions.  Reinstate the
subclasses (by returning the correct op in
gimp_layer_mode_get_oepration()), and have them override this
function.

Improve the way gimp_operation_layer_mode_process() dispatches to
the actual process function, to slightly lower its overhead and
fix some thread-safety issues.

Remove the "function" field of the layer-mode info array, and have
gimp_layer_mode_get_function() return the
GimpOperationLayerMode::process() function of the corresponding
op's class (caching the result, to keep it cheap.)  This reduces
redundancy, allows us to make the ops' process() functions private,
and simplifies SSE dispatching (only used by NORMAL mode,
currently.)

Move the blend and composite functions of the non-specialized
layer modes to gimpoperationlayermode-{blend,composite}.[hc],
respectively, to improve code organization.

Move the SSE2 composite functions to a separate file, so that they
can be built as part of libapplayermodes_sse2, allowing
libapplayermodes to be built without SSE2 compiler flags.  This
allows building GIMP with SSE acceleration enabled, while running
the resulting binary on a target with no SSE accelration.

Add a "blend_function" field to the layer-mode info array, and use
it to specify the blend function for the non-specialized modes.
This replaces the separate switch() statement that we used
previously.

Remove the "affected_region" field of the layer-mode info array.
We don't need it anymore, since we can go back to using
GimpOperationLayerMode's virtual get_affected_region() function.

Last but not least, a bunch of code cleanups and consistency
adjustments.
2017-08-17 11:19:37 -04: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
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
Michael Natterer 2dbf1b46b2 app: rename gimp_layer_mode_is_linear() to gimp_layer_mode_wants_linear_data() 2017-01-31 01:43:48 +01:00
Michael Natterer dd3eec6198 app: change linking order of the sub-libs of app/operations
so layer-modes/ can use the enums in enums-types.h without failing to
link.
2017-01-17 14:28:40 +01:00
Michael Natterer 87e5d10ddb app: make tests build again 2017-01-15 18:52:43 +01:00
Michael Natterer fd070eeb25 app: start moving layer modes into their own build directories
New directories:

operations/layer-modes/
operations/layer-modes-legacy/
2017-01-09 21:58:18 +01:00
Michael Natterer 3a14a646f5 app: add new config class GimpDialogConfig
which will keep all settings of the "don't ask me again" kind. For
now, moved the "color-profile-policy" there.
2016-08-14 22:21:59 +02:00
Michael Natterer 0bfa402c1a Argh, this was meant to be squashed into the previous commit... 2016-05-26 22:18:50 +02:00
Daniel Sabo c97a529968 app: Change mypaint dependency from libmypaint-gegl to just libmypaint 2015-12-28 09:18:46 -08:00
Michael Natterer 4266f86e08 app: remove tons of linker workarounds from Makefilea
either linkers got smarter or our structure got better, or this breaks
on whatever other linkers again...
2015-08-27 21:44:15 +02:00
Michael Natterer 46eef4d09d app: remove references to plug_in_icc_profile_apply_rgb() from Makefiles 2015-08-27 13:52:26 +02:00
Nils Philippsen 9171de3b80 tests: link against -lm
(see commit 4c7338c097)
2015-07-16 14:27:04 +02:00
Michael Natterer 9d510d8fff app: make the MyPaint brush path configurable in Prefs -> Folders
Keep the config values around even if compiled without MyPaint brush
support, so we remember the values between sessions of differently
compiled GIMP versions.
2015-04-25 21:14:22 -04:00
Michael Natterer 02fd23e3b8 app: link tests against LIBMYPAINTGEGL_LIBS 2015-04-13 02:14:28 +02:00
Michael Natterer e2630ae322 app: argh, fix last fix... 2014-09-17 22:31:43 +02:00
Michael Natterer 16f6b57a5d app: link test-config against Z_LIBS 2014-09-17 12:57:55 +02:00
Michael Natterer 26f45822e7 app: port gimpconfig-dump.c to GIO 2014-08-12 12:59:12 +02:00
Daniel Sabo 1f7b9a8f8e Fix missing HARFBUZZ_LIBS in app/config 2014-05-02 20:33:09 -07:00
Daniel Sabo 5cee9408be app,gimpwidgets: Add some missing libs so the tests build 2014-03-20 03:15:50 -07:00
Hartmut Kuhse 21bed1e2fb Completely rewrite metadata handling using gexiv2
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:

- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
  include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
  including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
  changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
2013-10-27 01:02:17 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +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 c7d9b9f35c app: make test-config build again 2012-06-21 19:39:41 +02:00
Michael Natterer cf90475e9f app: forgot to commit this one... 2012-05-20 19:32:40 +02:00
Michael Natterer 91392f85e5 app: make tests build again 2012-05-19 01:27:37 +02:00
Michael Natterer ede421bd45 app: rename GimpBaseConfig to GimpGeglConfig
because that's its future purpose.
2012-05-14 22:57:58 +02:00
Martin Nordholts d7db79c2f2 app: Make tests build
In particular: link.
2012-05-10 22:12:58 +02:00
Martin Nordholts 563d3c10d6 Make 'make check' compile 2012-05-02 21:53:38 +02:00