Commit Graph

120 Commits

Author SHA1 Message Date
Jehan dbbcfb16d5 app, libgimp*, pdb, plug-ins: GimpContext is now using only GeglColor.
- app: gimp_context_get_(foreground|background)() are now returning a GeglColor.
- libgimp: PDB functions named similarly in libgimp are returning a newly
  allocated GeglColor too.
- A few other PDB functions (the ones using these functions) were updated and
  their signature changed to use GeglColor too, when relevant. Plug-ins which
  use any of the changed libgimp functions were fixed.
- GimpContext: signals "(foreground|background)-changed" are now passing a
  GeglColor.
- libgimpconfig: new macro GIMP_CONFIG_PROP_COLOR using gegl_param_spec_color().
- GimpContext: properties "foreground" and "background" are now GeglParamColor
  properties.
- app: All code interacting with GimpContext objects were updated to receive a
  GeglColor (that they may still convert, or no, to GimpRGB for now).
- app: gimp_prop_gegl_color_button_new() was added as an alternative to
  gimp_prop_color_button_new() when the property is a GeglParamColor. Eventually
  the former should replace completely the latter.
- libgimpwidgets: gimp_prop_color_area_new() now works on GeglParamColor
  properties only.
- libgimp: gimp_procedure_dialog_get_widget() will generate a GimpColorArea for
  GeglTypeParamColor arguments.
2024-02-11 23:28:02 +01:00
Stanislav Grinkov 978a795eb7
plug-ins: replace manual creation of GimpDrawablePreview's...
... with the call to gimp_procedure_dialog_get_drawable_preview(...) function.
2024-02-03 21:02:40 +06:00
Jehan bf8ee69570 plug-ins: fix some broken macros with a massive search-and-replace.
If we leave a space between the macro name and opening parenthese for argument
lists, the args are not considered macro args (which will be discovered when
using it). I experienced this issue while testing code on some plug-in
yesterday, so thought I might as well fix all these broken macros for casting to
the specific GimpPlugIn subclass, so that we won't have a next time.
2023-10-18 18:29:37 +02:00
Jehan 1d50c81130 libgimp, plug-ins, extensions: gimp_image_procedure_new2() renamed gimp_image_procedure_new(). 2023-10-01 21:02:34 +02:00
Jehan 5cc1c898d7 libgimp, plug-ins: enhance gimp_procedure_dialog_get_label() with markup and…
… mnemonic abilities.
2023-10-01 20:52:01 +02:00
Jehan 4f14f620c4 plug-ins: port to gimp_image_procedure_new2() all plug-ins which were already…
… working with a GimpProcedureConfig.

These are the easiest ones to port as most of the work was already done (mostly
just some now useless calls to remove).
2023-10-01 20:52:01 +02:00
Niels De Graef 89c359ce47 Remove GimpUint8Array in favor of GBytes
GLib has a specific type for byte arrays: `GBytes` (and it's underlying
GType `G_TYPE_BYTES`).

By using this type, we can avoid having a `GimpUint8Array` which is a
bit cumbersome to use for both the C API, as well as bindings. By using
`GBytes`, we allow other languages to pass on byte arrays 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 byte 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
2023-05-23 23:37:50 +02:00
Alx Sa 4828970fa8 plug-ins: Restore original preview when disabled
I noticed after porting the last few plug-ins that GimpPreview went
to black when you unchecked the auto-preview option.
These widgets must be added directly to the dialogue rather than via the
new API in order for the unfiltered image drawable to be loaded
properly. They will eventually be removed in favor of on-canvas preview,
but let's get them working correctly for now.
2023-04-09 12:19:24 +00:00
Alx Sa c2b1ce5030 plug-ins: Port blinds to GimpProcedureDialog.
Also, update despeckle to close config when cancelled.
2023-04-07 04:06:59 +00:00
Jehan df074bfe09 plug-ins: label and documentation of plug-ins localized plug-in side.
This is the consequence of previous commit. Plug-ins' label and
documentation are now localized before sending these data to GIMP core.
In other words, we replace N_() macros with basic gettext calls.
2022-07-05 12:23:51 +02: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
Jehan 79e608694e plug-ins: fix many GimpImageProcedure to new run() API.
No logics change so far.
2021-04-04 01:40:00 +02:00
Jehan d95f417719 app, libgimpwidgets, modules, plug-ins: code changes after GimpScaleEntry…
… reclassing as GimpLabelSpin subclass.
2020-11-05 18:06:52 +01:00
Jehan b3c0ba061b app, libgimpwidgets, modules, plug-ins: finishing GimpScaleEntry port.
Renaming the temporary function gimp_scale_entry_new2() into
gimp_scale_entry_new() now that the original code is entirely gone. This
is now a fully-fledged widget with a nice and proper introspectable API.
2020-11-01 02:46:20 +01:00
Jehan f342b566c8 plug-ins: various plug-ins ported to new GimpScaleEntry. 2020-10-30 23:28:57 +01:00
Jehan ec9dbd8115 libgimpwidgets, app, plug-ins: fix last GIR warnings.
gimp_int_radio_group_new() was still complaining about the scope of
radio_button_callback(). Make it (scope notified) because it needs to
stay alive after the function returns and may be called multiple times.

Also adding a GDestroyNotify to free the callback data once the widget
is destroyed (additionally it will also serve as a notifier for bindings
to properly free the callback closure itself, not only it's data).

With this last one done, GObject Introspection generation now happens
without any warning output.
2020-01-15 14:00:19 +01:00
Michael Natterer 2e18a91916 plug-ins: saner argument name in blinds 2019-09-27 12:08:10 +02:00
luzpaz 44d10e458c Fix various typos
Found via `codespell` (v1.17.0.dev0)
2019-09-21 17:10:46 +00:00
Michael Natterer df8d5b02ae libgimp, plug-ins: remove the "preview" parameter from gimp_ui_init()
It's dead since a looong time.
2019-09-20 19:56:00 +02:00
Michael Natterer 749ad22c05 plug-ins: port blinds to GimpPlugIn 2019-08-30 13:24:10 +02: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
Jehan 08849a584c libgimp: GimpItem now also belong to libgimp. 2019-08-22 15:54:36 +02:00
Jehan 433fcd4334 plug-ins: ported a few plug-ins to new GimpImage/GimpDrawable classes. 2019-08-22 15:54:36 +02:00
Michael Natterer 4c4abf7fc4 plug-ins: port blinds to GEGL
Found another unfinished result of boredom from years ago.
Stupid 8-bit only port.
2019-06-27 13:23:31 +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
Simon Budig 7d64cf62c6 libgimpwidgets: rename the _grid()-Variants of gimp_scale_entry_*
Adjust all plugins to follow accordingly.

This concludes the GtkTable'ocide.
2018-05-20 21:06:35 +02:00
Michael Natterer bdbec7941c Use the new macros from the last commit in all files
...and gone are the annoying warnings.
2018-05-20 21:06:34 +02:00
Simon Budig def4acc842 common: kill GtkTable in a ton of plugins 2018-05-20 21:06:33 +02:00
Michael Natterer 24924211f4 plug-ins: lots of trivial GTK+ 3.0 porting
Most of it simply s/GtkObject/GtkAdjustment/
2018-05-20 21:06:27 +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
Michael Natterer 801bd8fb3f plug-ins: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Michael Natterer 7f2d5ebbc5 plug-ins: use the new drawable_ID-based GimpAspectPreview API 2015-09-17 00:28:09 +02:00
Clayton Walker 264d09b417 Rename colour and greyscale to color and grayscale respectively 2013-06-06 23:26:16 +02:00
Øyvind Kolås 5a851c3c9b plugins: hide blinds operation 2012-05-03 04:34:07 +02:00
Mukund Sivaraman 1d1fd1a35d blinds: Remove dead variables and assignments 2011-10-10 09:46:57 +05:30
Michael Natterer dcb4c6e34a plug-ins: use gtk_box_new() 2011-09-30 12:18:24 +02:00
Mikael Magnusson 8ff66342b8 plug-ins: set progress to 1.0 when done 2011-04-10 19:28:43 +02: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 97a73ea83f app: use gtk_box_pack_start() to pack a dialog's toplevel container
instead of gtk_container_add()'s because otherwise the widget will not
expand in GTK+ 3.x
2011-03-04 10:44:58 +01:00
Michael Natterer e805cb0cf4 Use gtk_dialog_get_content_area() instead of dialog->vbox 2009-07-15 18:57:12 +02:00
Michael Natterer 9b6c9e1fe4 Bug 155733 – need to check return values of gimp_drawable_mask_bounds()
Finally commit the patch from Luidnel Maignan, but don't spit messages
when the effected region is empty (core functions don't spit messages
either). Also got rid of some x2 and y2 variables that are not needed
any longer.
2009-06-07 23:52:37 +02:00
Michael Natterer b77822fb4c use enum GimpOrientationType instead of local #defines for HORIZONTAL and
2009-03-05  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/blinds.c: use enum GimpOrientationType instead
	of local #defines for HORIZONTAL and VERTICAL with identical
	values. Some indentation and formatting fixups.


svn path=/trunk/; revision=28112
2009-03-05 20:03:10 +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 c4777516ba app/gui/splash.c don't use gtk_box_pack_start_defaults(), it got
2008-07-21  Michael Natterer  <mitch@gimp.org>

	* app/gui/splash.c
	* plug-ins/common/*.c: don't use gtk_box_pack_start_defaults(),
	it got deprecated in GTK+ trunk.


svn path=/trunk/; revision=26252
2008-07-21 13:41:00 +00:00
Sven Neumann 0677b79c32 increased the maximum number of blinds to 100.
2008-05-05  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/blinds.c (MAX_FANS): increased the maximum
	number of blinds to 100.

svn path=/trunk/; revision=25566
2008-05-05 13:53:11 +00:00
Mukund Sivaraman c2d1214551 Changed "The GIMP" to "GIMP" everywhere, where it's used as a name.
2007-06-06  Mukund Sivaraman  <muks@mukund.org>

        Changed "The GIMP" to "GIMP" everywhere, where it's used as a name.


svn path=/trunk/; revision=22715
2007-06-06 08:44:52 +00:00
Sven Neumann a450ba46bb declared GimpPlugInInfo and GimpParamDef arrays as const.
2006-05-16  Sven Neumann  <sven@gimp.org>

	* plug-ins/*/*.c: declared GimpPlugInInfo and GimpParamDef arrays
	as const.
2006-05-16 12:26:20 +00:00
Sven Neumann 0486d1c9df removed trailing period from procedure blurbs.
2006-03-17  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/*.c: removed trailing period from procedure blurbs.
2006-03-17 09:29:48 +00:00
William Skaggs a8a732c414 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/common/AlienMap2.c
	* plug-ins/common/CML_explorer.c
	* plug-ins/common/align_layers.c
	* plug-ins/common/animationplay.c
	* plug-ins/common/animoptimize.c
	* plug-ins/common/apply_lens.c
	* plug-ins/common/autocrop.c
	* plug-ins/common/autostretch_hsv.c
	* plug-ins/common/blinds.c
	* plug-ins/common/blur.c
	* plug-ins/common/borderaverage.c
	* plug-ins/common/bumpmap.c
	* plug-ins/common/c_astretch.c
	* plug-ins/common/cartoon.c
	* plug-ins/common/ccanalyze.c
	* plug-ins/common/channel_mixer.c
	* plug-ins/common/checkerboard.c
	* plug-ins/common/color_enhance.c
	* plug-ins/common/colorify.c
	* plug-ins/common/colortoalpha.c
	* plug-ins/common/compose.c
	* plug-ins/common/convmatrix.c
	* plug-ins/common/cubism.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/decompose.c
	* plug-ins/common/deinterlace.c
	* plug-ins/common/depthmerge.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/destripe.c
	* plug-ins/common/diffraction.c
	* plug-ins/common/displace.c
	* plug-ins/common/dog.c
	* plug-ins/common/edge.c
	* plug-ins/common/emboss.c
	* plug-ins/common/engrave.c
	* plug-ins/common/exchange.c
	* plug-ins/common/film.c
	* plug-ins/common/flarefx.c
	* plug-ins/common/fp.c
	* plug-ins/common/fractaltrace.c
	* plug-ins/common/gauss.c
	* plug-ins/common/gee.c
	* plug-ins/common/gee_zoom.c
	* plug-ins/common/glasstile.c
	* plug-ins/common/gnomeprint.c
	* plug-ins/common/gqbist.c
	* plug-ins/common/gradmap.c
	* plug-ins/common/grid.c
	* plug-ins/common/guillotine.c
	* plug-ins/common/hot.c
	* plug-ins/common/illusion.c
	* plug-ins/common/iwarp.c
	* plug-ins/common/jigsaw.c
	* plug-ins/common/laplace.c
	* plug-ins/common/lic.c
	* plug-ins/common/mail.c
	* plug-ins/common/mapcolor.c
	* plug-ins/common/max_rgb.c
	* plug-ins/common/mblur.c
	* plug-ins/common/mosaic.c
	* plug-ins/common/neon.c
	* plug-ins/common/newsprint.c
	* plug-ins/common/nlfilt.c
	* plug-ins/common/noisify.c
	* plug-ins/common/normalize.c
	* plug-ins/common/nova.c
	* plug-ins/common/oilify.c
	* plug-ins/common/papertile.c
	* plug-ins/common/photocopy.c
	* plug-ins/common/pixelize.c
	* plug-ins/common/plasma.c
	* plug-ins/common/plugin-browser.c
	* plug-ins/common/polar.c
	* plug-ins/common/procedure-browser.c
	* plug-ins/common/randomize.c
	* plug-ins/common/retinex.c
	* plug-ins/common/ripple.c
	* plug-ins/common/sample_colorize.c
	* plug-ins/common/scatter_hsv.c
	* plug-ins/common/screenshot.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/semiflatten.c
	* plug-ins/common/sharpen.c
	* plug-ins/common/shift.c
	* plug-ins/common/sinus.c
	* plug-ins/common/smooth_palette.c
	* plug-ins/common/snoise.c
	* plug-ins/common/sobel.c
	* plug-ins/common/softglow.c
	* plug-ins/common/sparkle.c
	* plug-ins/common/spheredesigner.c
	* plug-ins/common/spread.c
	* plug-ins/common/struc.c
	* plug-ins/common/threshold_alpha.c
	* plug-ins/common/tile.c
	* plug-ins/common/tileit.c
	* plug-ins/common/tiler.c
	* plug-ins/common/uniteditor.c
	* plug-ins/common/unsharp.c
	* plug-ins/common/video.c
	* plug-ins/common/vinvert.c
	* plug-ins/common/vpropagate.c
	* plug-ins/common/warp.c
	* plug-ins/common/waves.c
	* plug-ins/common/whirlpinch.c
	* plug-ins/common/wind.c
	* plug-ins/common/winprint.c
	* plug-ins/common/zealouscrop.c: Give "helpful" blurbs to menu-
	accessible plugins, and mark them for translation.  Probably there
	is room for improvement in some of them.  Still needs to be done for
	plug-ins not in "common".
2006-03-15 21:10:34 +00:00