Commit Graph

27 Commits

Author SHA1 Message Date
Alx Sa 4bf5dc7b97 plug-ins: Port argument macros to functions
With the new API introduced int d1c4457f,
we next need to port all plug-ins using
the argument macros to functions.
This will allow us to remove the macros
as part of the 3.0 API clean-up.
2024-06-13 23:17:48 +00:00
Jehan afef78b62c plug-ins: g_object_[gs]et_data() in help-browser replaced with aux bytes arg. 2023-10-24 22:28:37 +02:00
Jehan 2b38a2df86 libgimp, plug-ins: rename gimp_procedure_new2() as gimp_procedure_new() and…
… remove the latter.

Now all GimpProcedure use this new implementation with use a config object.
2023-10-01 20:52:01 +02:00
Jehan 38ecbfc762 plug-ins: more plug-ins ported to gimp_procedure_new2(). 2023-10-01 20:52:01 +02:00
Simon Budig d16734a4e4 plug-ins: fix some glib related deprecations 2023-05-20 21:46:17 +02:00
Jehan bd94175c9a plug-ins: coding-style fixes.
While studying this code as base for the previous commit, I noticed various
coding style issues.
2023-01-27 01:48:33 +01:00
Jehan 18c37f7084 plug-ins, libgimp: override set_i18n() for all our core plug-ins.
Hence avoiding the stderr messages. These are going to be localized with
centrally installed catalogs "gimp*-std-plugins", "gimp*-script-fu" and
"gimp*-python".

We now handle core plug-in localizations differently and in particular,
with kind of a reverse logic:

- We don't consider "gimp*-std-plugins" to be the default catalog
  anymore. It made sense in the old world where we would consider the
  core plug-ins to be the most important and numerous ones. But we want
  to push a world where people are even more encouraged to develop their
  own plug-ins. These won't use the standard catalog anymore (because
  there are nearly no reasons that the strings are the same, it's only a
  confusing logic). So let's explicitly set the standard catalogs with
  DEFINE_STD_SET_I18N macro (which maps to a different catalog for
  script-fu plug-ins).
- Doing something similar for Python plug-ins which have again their own
  catalog.
- Getting rid of the INIT_I18N macro since now all the locale domain
  binding is done automatically by libgimp when using the set_i18n()
  method infrastructure.
2022-06-05 01:57:02 +02:00
Niels De Graef dddb23c6e5 help-browser: Rewrite without GtkAction
The initial attempt of this commit was to remove the `GtkAction` usage,
but grew a bit wider than that. The following happened:

* The dialog became a proper GObject, rather than being a big chunk of
  static variables that were hopefully initialized before you used them.
* The dialog now uses `GAction`s to implement actions, and converted
  some signal handlers to actions as well.
* The plug-in run procedure now uses `GtkApplication`. This is one hand
  necessary to be able to set accelerators for actions, but on the other
  hand is more future-proof, as GTK4 removes `gtk_main()`
2022-03-25 11:49:39 +00:00
Niels De Graef 8eb7f6df9e Remove GimpStringArray in favor of GStrv
GLib has a specific type of NULL-terminated string arrays:
`G_TYPE_STRV`, which is the `GType` of `char**` aka `GStrv`.

By using this type, we can avoid having a `GimpStringArray` which is a
bit cumbersome to use for both the C API, as well as bindings. By using
`GStrv`, we allow other languages to pass on string lists as they are
used to, while the bindings will make sure to do the right thing.

In the end, it makes the API a little bit simpler for everyone, and
reduces confusion for people who are used to working with string arrays
in other C/GLib based code (and not having 2 different types to denote
the same thing).

Related: https://gitlab.gnome.org/GNOME/gimp/-/issues/5919
2022-02-12 00:07:53 +00:00
Michael Natterer 8a78203aed Properly prefix the values of enum GimpPDBProcType
to be GIMP_PDB_PROC_TYPE_PLUGIN, _EXTENSION etc.
2019-08-30 12:52:28 +02:00
Michael Natterer 4cb4b3ef3a plug-ins: port all plug-ins to the new macros 2019-08-20 01:03:38 +02:00
Michael Natterer 9cabc8c8d0 libgimp, plug-ins: use the new macros everwhere
Except for gimp_param_spec_string() which is on its way back to the
core.
2019-08-19 10:02:07 +02:00
Michael Natterer 5a09523214 Remove GIMP_TYPE_INT32 and GimpParamSpecInt32
Use gint and GParamSpecInt instead.
2019-08-15 14:04:56 +02:00
Michael Natterer 0491f653fa plug-ins: port help-browser to GimpPlugIn 2019-08-13 00:38:02 +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
Jehan d967219925 plug-ins: tab cleaning. 2017-02-01 01:59:45 +01:00
Michael Muré 9966bcfd13 remove now useless and deprecated g_thread_init
Warning

g_thread_init has been deprecated since version 2.32 and should not be used in newly-written code. This function is no longer necessary. The GLib threading system is automatically initialized at the start of your program.
2012-05-03 20:44:07 +09:00
Michael Natterer 8c4d99f883 Bug 645456 - Inconsistent window (role) naming scheme
Applied patch from Christoph Kappel which adds a "gimp-" prefix to all
plug-in dialog window roles.
2011-04-08 20:31:34 +02:00
Michael Natterer fcfb7cf160 Use the new g_[s]list_free_full() instead of foreach() and free() 2011-03-07 17:11:28 +01:00
Sven Neumann ebf0a98b18 Bug 577024 – help-browser plugin crashes when used with webkit 1.1.3
2009-03-28  Sven Neumann  <sven@gimp.org>

	Bug 577024 – help-browser plugin crashes when used with webkit 1.1.3

	* plug-ins/help-browser/help-browser.c (run): call g_thread_init().
	Seems to be needed with newer versions of webkit.


svn path=/trunk/; revision=28227
2009-03-28 16:42:50 +00:00
Michael Natterer 4ea1437646 plug-ins/common/*.c plug-ins/color-rotate/color-rotate.c
2009-01-19  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/*.c
	* plug-ins/color-rotate/color-rotate.c
	* plug-ins/file-bmp/bmp.c
	* plug-ins/file-faxg3/faxg3.c
	* plug-ins/file-fits/fits.c
	* plug-ins/file-fli/fli-gimp.c
	* plug-ins/file-ico/ico.c
	* plug-ins/file-jpeg/jpeg.c
	* plug-ins/file-psd/psd-save.c
	* plug-ins/file-psd/psd.c
	* plug-ins/file-sgi/sgi.c
	* plug-ins/file-uri/uri.c
	* plug-ins/file-xjt/xjt.c
	* plug-ins/flame/flame.c
	* plug-ins/fractal-explorer/fractal-explorer.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gimpressionist/gimp.c
	* plug-ins/gradient-flare/gradient-flare.c
	* plug-ins/help-browser/help-browser.c
	* plug-ins/ifs-compose/ifs-compose.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/lighting/lighting-main.c
	* plug-ins/map-object/map-object-main.c
	* plug-ins/maze/maze.c
	* plug-ins/metadata/metadata.c
	* plug-ins/pagecurl/pagecurl.c
	* plug-ins/print/print.c
	* plug-ins/pygimp/gimpfu.py
	* plug-ins/script-fu/script-fu-script.c
	* plug-ins/script-fu/script-fu.c
	* plug-ins/selection-to-path/selection-to-path.c
	* plug-ins/twain/twain.c
	* plug-ins/win-snap/winsnap.c: document the "run-mode" parameter
	as we document enums for core procedures.


svn path=/trunk/; revision=27922
2009-01-19 20:11:36 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Michael Natterer c023af4671 plug-ins/common/cml-explorer.c plug-ins/common/depth-merge.c
2008-08-11  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/cml-explorer.c
	* plug-ins/common/depth-merge.c
	* plug-ins/common/file-cel.c
	* plug-ins/common/oilify.c
	* plug-ins/file-bmp/bmp-write.c
	* plug-ins/file-bmp/bmp.[ch]
	* plug-ins/file-ico/ico-dialog.c
	* plug-ins/file-ico/ico-save.c
	* plug-ins/file-ico/ico.h
	* plug-ins/flame/flame.c
	* plug-ins/fractal-explorer/fractal-explorer-dialogs.c
	* plug-ins/fractal-explorer/fractal-explorer.[ch]
	* plug-ins/gimpressionist/gimp.c
	* plug-ins/gimpressionist/gimpressionist.[ch]
	* plug-ins/gimpressionist/orientmap.c
	* plug-ins/gimpressionist/presets.c
	* plug-ins/gimpressionist/sizemap.c
	* plug-ins/help-browser/dialog.[ch]
	* plug-ins/help-browser/help-browser.c
	* plug-ins/ifs-compose/ifs-compose.c
	* plug-ins/imagemap/imap_default_dialog.c
	* plug-ins/imagemap/imap_main.[ch]
	* plug-ins/lighting/lighting-main.[ch]
	* plug-ins/lighting/lighting-ui.c
	* plug-ins/map-object/map-object-main.[ch]
	* plug-ins/map-object/map-object-ui.c
	* plug-ins/selection-to-path/selection-to-path.c
	* plug-ins/win-snap/winsnap.c: use PLUG_IN_BINARY and PLUG_IN_PROC
	defines consistently instead of using literal strings or other
	random defines. Define them if not already there or move them to
	plugin-global places.

	* plug-ins/win-snap/Makefile.am: rename the binary to "win-snap".

	* plug-ins/win-snap/winsnap.c: changed accordingly.


svn path=/trunk/; revision=26509
2008-08-11 19:42:08 +00:00
Sven Neumann 5cd010b14d don't show progress for local help lookups, they are fast enough.
2008-06-11  Sven Neumann  <sven@gimp.org>

	* plug-ins/help/help.c (load_help_idle): don't show progress for
	local help lookups, they are fast enough.

	* plug-ins/help-browser/help-browser.c: added the same progress
	code here. Might want to move it to the dialog window later.


svn path=/trunk/; revision=25927
2008-06-11 17:43:57 +00:00
Sven Neumann c1fe89b1b0 removed check for gtkhtml2 and added a check for wekbit instead.
2008-06-10  Sven Neumann  <sven@gimp.org>

	* configure.in: removed check for gtkhtml2 and added a check for
	wekbit instead.

	* INSTALL: document the changed dependency.

	* plug-ins/help-browser/Makefile.am
	* plug-ins/help-browser/dialog.[ch]: ported the help-browser to
	webkit. Offers the same functionality as before and some more.

	* plug-ins/help-browser/help-browser.c: some cleanup.

svn path=/trunk/; revision=25913
2008-06-10 15:55:28 +00:00
Sven Neumann 6b687736d3 plug-ins/help/Makefile.am plug-ins/help/gimphelpprogress.[ch] new files
2008-05-16  Sven Neumann  <sven@gimp.org>

        * plug-ins/help/Makefile.am
        * plug-ins/help/gimphelpprogress.[ch]
        * plug-ins/help/gimphelpprogress-private.h: new files providing a
        simple framework for progress indication and cancellation.

        * plug-ins/help/gimphelp.[ch]
        * plug-ins/help/gimphelpdomain.[ch]
        * plug-ins/help/gimphelpitem.[ch]
        * plug-ins/help/gimphelplocale.[ch]
        * plug-ins/help/gimphelptypes.h
        * plug-ins/help/help.c
        * plug-ins/help/locales.[ch]: changed accordingly (passing NULL
        as progress for now). Also updated copyright headers.

        * plug-ins/help-browser/help-browser.c: same here.

        * plug-ins/help/gimp-help-lookup.c: use the new API and show some
        progress indication when the --verbose command-line option is used.

svn path=/trunk/; revision=25674
2008-05-16 16:56:33 +00:00
Michael Natterer 2042f4f9e6 plug-ins/map-object plug-ins/gradient-flare plug-ins/ifs-compose
2008-03-24  Michael Natterer  <mitch@gimp.org>

	* plug-ins/map-object
	* plug-ins/gradient-flare
	* plug-ins/ifs-compose
	* plug-ins/selection-to-path
	* plug-ins/lighting
	* plug-ins/help-browser
	* plug-ins/fli: rename files in these folders to have no
	underscores and match new names of the plug-ins.

	* configure.in: changed accordingly.


svn path=/trunk/; revision=25197
2008-03-24 18:33:25 +00:00