Commit Graph

44606 Commits

Author SHA1 Message Date
Ell f0a8a5b67b tools: add mnemonic-clashes to EXTRA_DIST 2019-09-12 18:16:37 +03:00
Ell a2a7fc993c tools: add mnemonic-clashes tool
Add a new mnemonic-clashes tool, which checks for mnemonic clashes
in menus.  This tool can be invoked directly from the shell.  It
takes an optional parameter which limits the search to a specific
type of menus, according to their xml tag (in particular, "menu"
for regular menus, and "popup" for popup menus).
2019-09-12 17:56:45 +03:00
Michael Natterer 63e0e7679b plug-ins: fix "film" to not crash on repeat
Can't have objects in the last_vals struct, use image IDs again.
2019-09-12 12:42:09 +02:00
Michael Natterer 73cd120a4c Issue #3912 - Object proxy management not happy with bindings
Don't drop references we do not own. Turns out bindings can have
things referenced even after all procedure code has returned. Keep the
old code there in #if 0 and keep the debug warning for now, maybe we
can do something generic about this.
2019-09-12 12:17:35 +02:00
Ell f1a13b4904 plug-ins: fix optional common/ plug-ins in meson build
Align plug-ins/common/meson.build with plugin-defs.pl, avoiding
building optional plug-ins whose dependencies aren't met.

Fix the build condition of the mail plug-in.
2019-09-12 13:04:16 +03:00
Michael Natterer 25f6198cc8 devel-docs: update the libgimp docs 2019-09-12 09:26:27 +02:00
Michael Natterer 7fa730b1c7 app: make tests build again after file_open_image() signature change 2019-09-12 00:05:17 +02:00
Michael Natterer 83a936b8fe pdb: rename all functions in the "plug_in" group
from gimp_plugin_foo() to gimp_plug_in_foo() for consistency.
2019-09-11 23:58:47 +02:00
Michael Natterer 6de4af4ade pdb: change paths and URIs in the "plug_in" group to GFiles 2019-09-11 23:54:53 +02:00
Michael Natterer 2fa9b8f030 pdb: forgot to change an URI to GFile in gimp_file_load() 2019-09-11 22:48:32 +02:00
Michael Natterer 77731d1e8e pdb: change the URIs in the color profile API to GFiles 2019-09-11 22:44:17 +02:00
Michael Natterer 14af676b51 pdb, libgimp: change "filename" to "file" in gimp_pdb_dump() 2019-09-11 22:37:40 +02:00
Michael Natterer 6468fa06c7 pdb, plug-ins: change gimp_temp_name() to gimp_temp_file() 2019-09-11 22:32:44 +02:00
lillolollo 4118fb6a76 Resolve implicit declaration of function 'getpid' 2019-09-11 19:55:16 +00:00
Michael Natterer 6bca8c4f89 pdb, app, libgimp, plug-ins: replace most PDB filenames/URIs by GFile
and in an attack of madness, changes almost all file plug-in
code to use GFile instead of filenames, which means passing
the GFile down to the bottom and get its filename at the very
end where it's actually needed.
2019-09-11 21:48:34 +02:00
Michael Natterer a5ac3e45fe libgimpbase, libgimp, app: add libgimp support for passing GFiles
Which means support for GParamSpecObject with value_type ==
G_TYPE_FILE, and converting between GFile and its URI for wire
communication directly above the protocol layer.

This change requires passing a GParamSpec's value type as generic
member of GPParamDef, which in turn makes some members of its
sub-structures obsolete.
2019-09-11 21:40:17 +02:00
lillolollo 5d365352ca Issue !125: avoid conflict with win32 macro.
jpeg-save.c:56: warning: "DEFAULT_QUALITY" redefined
   56 | #define DEFAULT_QUALITY          90.0
      |
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:71,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/rpc.h:16,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/objbase.h:7,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/shlwapi.h:16,
                 from C:/msys64/mingw64/include/jmorecfg.h:19,
                 from C:/msys64/mingw64/include/jpeglib.h:31,
                 from jpeg-save.c:33:
C:/msys64/mingw64/x86_64-w64-mingw32/include/wingdi.h:1140: note: this is the location of the previous definition
 1140 | #define DEFAULT_QUALITY 0
2019-09-11 19:01:49 +00:00
Ell d710e96d81 Issue #3781 - Display artifacts on HiDPI when render cache is invalidated
In GimpDisplayShell, scale the render cache by the window's scale
factor, and render its content in device pixels, instead of scaled
application pixels.  When painting the cache to the screen, unscale
the cairo context by the same factor, so that it's painted in the
native resolution.  Note that the various
gimp_display_shell_render_foo() functions still speak in
application pixels, and the scaling happens internally in
gimp_display_shell_render().

Aside from rendering at native resolution on HiDPI, this also fixes
an issue where grid-like display artifacts would appear when the
render cache was not fully validated due to the non-native scaling.
2019-09-11 21:19:26 +03:00
Salamandar c20a8b732c Enforce libbacktrace tests. Add missing dep in app 2019-09-11 18:02:15 +00:00
lillolollo a2b74147c9 Fixing error on Windors meson build 2019-09-11 17:21:17 +00:00
Jehan 3bfbf9972a tools: fix install-* meson targets.
We should not rely on the current working directory, as it looks like
meson sets it to be the source directory (even when actually in the
build dir) when running custom target (so it fails).

Instead meson explicitly sets MESON_SOURCE_ROOT and MESON_BUILD_ROOT
environment variables for us. We should use these. This should work in
every cases (whether calling from the source or build dir).

Also removing the special-casing for a _build/ directory. This updated
version is generic and won't assume that you used some generic naming or
direct subdir under the source (even if many people might use this path
and name; I, for one, certainly don't!).

See: https://mesonbuild.com/Run-targets.html
2019-09-11 18:43:34 +02:00
Jehan 035802c5a6 gitlab-ci: our CI base system (Arch) fixed their libmypaint package.
See: https://bugs.archlinux.org/task/62468
2019-09-11 17:23:40 +02:00
Félix Piédallu 1f20b72a45 Fix gitlab-ci : Archlinux fixed the bug upstream. 2019-09-11 17:11:38 +02:00
Félix Piédallu ba6973e791 Fix Meson some changes not pulled from Autotools 2019-09-11 17:10:47 +02:00
Félix Piédallu eb229fe2dc disabling Twain plug-in until it's fixed 2019-09-11 16:42:04 +02:00
Félix Piédallu db8922738f Add meson_install_subdir script 2019-09-11 16:42:04 +02:00
Félix Piédallu 184abdfc94 Print warnings at the end of configuration 2019-09-11 16:42:04 +02:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00
Félix Piédallu a97bad1cbe Update gitlab-ci 2019-09-11 16:42:04 +02:00
Félix Piédallu 793c9588bf Add meson to gitignore 2019-09-11 16:42:04 +02:00
Michael Natterer f3fb3d1a57 Remove the second "raw-filename"/"raw-uri" parameter from file procedures
It's an ancient concept from ancient times when we didn't have URIs
and only filenames (not to speak of GFile), and actually even from
before the ancient time before that ancient time when we first had
ones and zeros, and only had zeros.
2019-09-11 00:21:03 +02:00
Michael Natterer 6115d34fe8 Rename the "fileops" PDB group to just "file" 2019-09-10 21:38:11 +02:00
Michael Natterer 7c5cb29ca6 pdb: move the file procedure register API from "fileops" to "pdb"
because it has nothing to do with the other procedures in fileops and
only sets properties on procedures.
2019-09-10 21:24:09 +02:00
Michael Natterer fee551810b app: fix adding file procedures from pluginrc
gimp_plug_in_manager_add_to_db() used to call the PDB in order
to properly register file procedures from pluginrc. This broke
when I moved code to gimpplugin-file.c.

Instead, add gimp_plug_in_manager_add_load_procedure() and
gimp_plug_in_manager_add_save_procedure() and call them from both
gimpplugin-file.c and gimp_plug_in_manager_add_to_db(), which also has
the nice side effect that more GimpFileProcedureGroup logic gets moved
to its place in gimppluginmanager-file.c and less magic is needed in
gimpplugin-file.c.
2019-09-10 21:19:00 +02:00
Michael Natterer 56fee73441 pdb: reorder stuff in the "pdb" group to make more sense 2019-09-10 20:23:19 +02:00
Michael Natterer 21ff9999e4 app: remove gimppluginmanager-file-procedure.[ch]
and merge it into app/plug-in/gimppluginmanager-file.c, it's used from
nowhere else.
2019-09-10 20:20:40 +02:00
Michael Natterer ff9b469808 app: move the file procedure registering functions into gimpplugin-proc.c
They are simply setting properties on GimpPlugInProcedures, just like
the other functions in gimpplugin-proc.[ch], so there is no reason to
have them elsewhere and with worse checks and error messages.
2019-09-10 20:05:27 +02:00
Michael Natterer fba010a642 libgimp: more GimpPlugIn docs
Mention and guarantee the order of procedure registration (see
previous thumbnail loader commit). Remove duplicate docs from the
GimpPlugIn class comments that are needed for introspection, it's too
cumbersome to keep two identical texts in sync, and the removed text
is used nowhere.
2019-09-10 20:00:42 +02:00
Michael Natterer cc5149565a plug-ins: remove unused variables from plugin-browser.c 2019-09-10 19:47:12 +02:00
Michael Natterer 26a744f44d plug-ins: register thumbnail procedures before load procedures
so registering the thumbnail loader with the load procedure can
perform some checks for procedure existence and signature.
2019-09-10 19:36:54 +02:00
Jehan 5621de52fc libgimp: have both annotations for GObject Introspection and gtk-docs.
GTK-docs needs the struct member documentations in the main struct
comment. So let's get this back, while keeping the proper GI
introspection for each method this time.
As discussed with Mitch.
2019-09-10 18:13:26 +02:00
Ell 1b3c1fb9cb app: fix CRITICAL in GimpNavigationEditor
... after commit 2c9a8a567b.  Don't
use the same function as a handler for GimpContext::display-changed
and GimpContext::image-changed -- their signatures are different.
2019-09-10 17:55:58 +03:00
Jehan 49640ebfee plug-ins: fix warning on JavaScript goat exercise.
The exact warning was:
> (goat-exercise-gjs:26895): Gjs-WARNING **: 15:59:18.382: Some code
> called array.toString() on a Uint8Array instance. Previously this
> would have interpreted the bytes of the array as a string, but that is
> nonstandard. In the future this will return the bytes as
> comma-separated digits. For the time being, the old behavior has been
> preserved, but please fix your code anyway to explicitly call
> ByteArray.toString(array).  (Note that array.toString() may have been
> called implicitly.)
2019-09-10 16:06:48 +02:00
Jehan 183f00baf9 libgimp: fix GimpPlugInClass methods introspection.
Commit 005143a43e completely broke all the
introspected plug-ins, so I am reverting only the relevant changes.

If some things need to be improved in this part of the docs, let's do it
without breaking major stuff.
In particular: abstract methods must be properly documented (with
parameters, return values and annotations) like any function, and must
be named Class::method, e.g. GimpPlugInClass::query_procedures.
Other we break GObject Introspection, i.e. we break all plug-ins using
these.
2019-09-10 15:22:54 +02:00
Jehan b73519830e app: gimp-register-magic-load-handler renamed in a previous commit.
Cf. commit 0745043ddb.
2019-09-10 15:03:28 +02:00
Ell 2c9a8a567b app: clear navigation editor when last image is closed
In GimpNavigationEditor, make sure to clear the editor's shell when
the last image is closed, even though the corresponding display is
stil alive, so that we don't needlessly extend the lifetime of the
image.  This is necessary after the recent GimpImageViewable
changes, since the editor now (indirectly) holds a reference on the
image.
2019-09-10 15:15:42 +03:00
Michael Natterer 0745043ddb pdb, libgimp: remove _gimp_register_load_handler()
and rename _gimp_register_magic_load_handler() to
_gimp_register_load_handler().
2019-09-10 12:29:17 +02:00
Michael Natterer b1683ce692 app: remove all check for the <Load> and <Save> menu prefixes
they are an ancient concept not supported any longer.
2019-09-10 12:14:57 +02:00
Michael Natterer a20fb094d9 libgimp: remove gimp_plug_in_create_procedure() from the API
no plug-in code ever needs to call it.
2019-09-10 12:11:32 +02:00
Michael Natterer 34489d1b13 libgimp: add section docs for GimpPlugIn with general information
and document the members of GimpProcedureClass. Also various
doc fixes.
2019-09-10 11:17:12 +02:00