Commit Graph

562 Commits

Author SHA1 Message Date
a710fa59e9 Typo - Put a blank after the fullstop.
(cherry picked from commit 4b3b22812b)
2020-09-09 07:59:53 +00:00
d9b102e196 Misc typo fixes in plug-ins/
(cherry picked from commit c1585d609b)
2020-09-08 23:22:57 +00:00
8caa5e93de plug-ins: backport spyrogimp Issue #5043 - reduce undos
Reduce number of undo steps created by Spryrogimp previews.
The implementation adds a function for clearing the
incremental preview drawing that is being executed as an idle task,
and closing an undo group in case the preview left it open (which
would usually be the case).
2020-09-01 12:11:12 +02:00
6b4f0490f5 Issue #4816: fix spyrogimp to work with grayscale images 2020-08-31 12:49:41 +02:00
Ell
ab15245eb1 Issue #5219 - Color>Info>Export histogram counts pixels twice
gimp_histogram() takes an inclusive range -- the plug-in has been
counting non-zero pixels twice.

(cherry picked from commit 6a01bf2df2)
2020-06-14 17:05:12 +03:00
a9e33ee1ab plug-ins: in spyrogimp, add option to save path
This is backported from the gimp 3 master branch. Replace the checkbox
of two saving options (keep layer, or redraw on last active layer),
with a combo box that has a third option for saving the pattern as a path.
2020-02-13 00:58:11 +02:00
81ea68660c Issue #4326 - Add visual tab to spyrogimp plugin 2020-02-13 00:58:11 +02:00
35df110a05 Missing mnemonics on several dialogs
paste as brush, paste as pattern, select to new brush, select to new pattern
fill selection outline, fill path, stroke selection, distort, rounded rectangle
indexed color conversion, merge visible layers, new guide, new guide (by percent)
image properties, newsprint, fractal explorer, sample colorize, new layer

metadata editor (just a button), spyroplus (only common buttons)
2019-09-05 12:44:17 +00:00
803e5bfb81 pygimp: argh...
(cherry picked from commit d5ac62c6eb)
2019-06-27 13:47:54 +02:00
85117940ab pygimp: replace gimp_drawable_get_tile2() by gimp_drawable_get_tile()
(cherry picked from commit 61fe89ad02)
2019-06-27 13:45:56 +02:00
f17e3b157d Remove <U+FEFF> character before shebang header, OSX is very strict on that 2019-06-13 14:45:15 +02:00
e24f9eec37 Issue #2961: minor coding style fix.
Missing space, and anyway let's use named parameters, which makes the
code better self-documented.

(cherry picked from commit 35eff00e2e)
2019-02-14 12:12:24 +01:00
3ff2285ba8 Setting the FileChooserbutton to a fixed width.
(cherry picked from commit 582801ccc5)
(cherry picked from commit b44c2e9352)
(cherry picked from commit cdd686f752)
(cherry picked from commit 3b818f6a9b)
(cherry picked from commit c7d5438b49)

Note from reviewer: sorry, this was not squashed on master! Gitlab
failed to squash even though the "squash commits" checkbox was checked!
So it ended as a 5-commit 1-line change!
:-/
2019-02-13 17:16:30 +01:00
eeeab8b209 Add i18n support for python spyrogimp plugin
(cherry picked from commit f6e4145756)
2019-02-01 07:41:23 -05:00
Ell
d2bc3eeb5d plug-ins: in pygimp/plug-ins/Makefile.am, simplify plug-in copy recipe
(cherry picked from commit 12dbd4aee2)
2019-02-01 07:41:22 -05:00
Ell
5f398c0888 plug-ins: in pygimp/plug-ins/Makefile.am, re-copy plug-ins upon change
In pygimp/plug-ins/Makefile.am, fix the rule for the generated
plug-in files, so that they're re-copied to the build dir upon
changes to the source plug-in files.

(cherry picked from commit 95044d86b3)
2019-02-01 07:12:38 -05:00
Ell
301691b3ed plug-ins: in pygimp/plug-ins/Makesfile.am, use tab-width of 8
... like the rest of our makefiles.

(cherry picked from commit bcd9f55526)
2019-02-01 07:12:38 -05:00
Ell
d11d094d02 Issue #1119 - Unable to give a layer group as a parameter to a python script
Pickle gimp.GroupLayer the same way we pickle gimp.Layer, so that
layer-group parameters can be properly saved.

All credit goes to Ofnuts :)

(cherry picked from commit b295a33aaf)
2019-01-26 16:02:26 -05:00
Ell
71fe5c00fd plug-ins: avoid running pygimp plug-ins derived from gimpplugin.plugin at each startup
When initializing a pygimp plug-in derived from gimpplugin.plugin,
only pass the plug-in's init() and quit() functions to gimp.main()
if the plug-in actually implements them, instead of passing the
default NOP versions.  This avoids plug-ins that don't implement
init() from being registered as having an init function, causing
them to be run at each startup.

(cherry picked from commit 9851bc8962)
2019-01-25 04:34:27 -05:00
8729f9a662 plug-ins: clean the new Spyrogimp, rename it and remove old version...
... from menus.
The script-fu version is still available through pdb (for scripts) and
even in the action search. But in menus, only the new Python version
will be shown. Also update the description and name of the old version
to make clear it is deprecated in favor of the new plug-in.
Finally rename the new version to simply "plug-in-spyrogimp" (dropping
the "-plus" part as we should consider it as a replacement rather than
as another plug-in, which the "plus" would imply). Anyway the old one
was called "script-fu-spyrogimp", so there is no name clash.

While at it, do some trailing whitespace cleaning in the new plug-in.
2019-01-24 01:05:02 +01:00
529583430d plug-ins: Spyrogimp plugin rewrite.
Comment by reviewer (Jehan):

This was submitted through gimp-developer mailing list, by the same
author as the original Spyrogimp in script-fu, but this time in Python.

It does more than the original plug-in, with some automatic preview (by
drawing directly on a temporary layer, not as a GEGL preview), and using
the current tool options (current brush, etc.). The new API is similar
yet different. The much evolved possibilities makes that I don't think
it is worth trying to map 1-1 the new API to the old one, so I just let
the old plug-in next to the new one, with a different name.

Note finally that the author also contributed a new Spyrograph operation
to GEGL, yet with the comment: "The GEGL spyrograph operation is very
basic, and untested from gimp. I intend to keep developing it, since I
thought that on-canvas interaction would be very user-friendly. However,
I am not sure I will be able to get it work in a way that makes the
on-canvas interaction interactive enough.

Even if I do, it will not do what the Python plugin can do. It will be
much more basic."

So let's just integrate this evolved version of Spyrogimp for now. :-)
See: https://mail.gnome.org/archives/gimp-developer-list/2018-September/msg00008.html
2019-01-24 00:31:15 +01:00
56c8f8320d Issue #2087 - Issues discovered by coverity scan
Add missing fclose invocations and fix copy-paste issue.

This issues has been discovered by coverity scan proceeded by Red Hat.

Fixed some mistakes in the patch and added more fclose() (Mitch)
2018-10-19 11:24:48 +02:00
788eb090b8 plug-ins: add more generated files in .gitignore.
(cherry picked from commit cb892aa0e6)
2018-09-29 23:18:03 +02:00
0839a55d51 plug-ins: pygimp: Add autogenerated python files to .gitignore 2018-09-29 21:04:44 +00:00
8f21c9483a Issue #1970: Python-fu missing in 2.10.4.
Do not set the interpreter to `python2` but to whatever was found by the
AM_PATH_PYTHON2() m4 macro.
It looks like the Python2 binary we ship in our DMG may be call "python"
only (without the '2'). Let's just make our code more resilient to
various builds.
I am not sure yet this is the only/actual problem for this issue on
macOS, but this is at least in the right way.
2018-08-19 12:34:00 +02:00
55a7872e1b plug-ins: include the right python source in the distribution.
The python path with directory are generated files and should not be in
the dist. The previous commit was fixing an in-tree `make check` but
this one fixes the `make distcheck` as the dist was packaging the wrong
python files.
2018-08-18 01:14:44 +02:00
035c785490 Issue #788: also install all python plug-ins in their own directory.
It seems I forgot to also install python plug-ins in a subdirectory
(because they are deactivated on master for the time being). I even
found a year-old patch from myself rotting in the tracker, and which was
doing exactly this.
I redid it, improved to fit changes.

(cherry picked from commit dbb9555d2f)
2018-08-16 13:25:51 +02:00
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
2265701268 Fix Python files:
* Prefer python2 to python that may point on python3 on modern installs.
* Fix indent/spaces consistency.
2018-06-16 02:49:54 +02:00
769325e51b plug-ins: recognize "python2" env to launch the python interpreter. 2018-06-16 02:49:54 +02:00
03ea9cac54 m4macros, plug-ins: run more accurately the "python2" interpreter.
Our configure test checks the presence of a Python2, but then uses
"python" as interpreter, which is a problem nowadays as the default
python is set to be Python 3 on some distributions (and this will be
more and more the case). So GIMP may end up trying to run our plug-ins
through Python 3 (which would fail) even if Python 2 is present.
Now AM_PATH_PYTHON2() m4 macro will set $PYTHON to a more accurate
Python version as priority.

Similarly let's use "python2" in the binfmt string for extension search.
2018-06-16 02:05:08 +02:00
130ef5ce59 Issue #248: Python console doesn't support input()/raw_input().
As noted by Massimo, we can just make the argument of raw_input() an
optional argument.

Also adding a modal implementation for input() so that it doesn't lock
the Python console waiting from input from the plug-in stdin. As noted
in Python doc, input() is equivalent to `eval(raw_input(prompt))`.
Not all that safe, but in the end, it is the developer's responsibility.
2018-06-15 18:34:57 +02:00
aa67a0228b Bug 795620 - Missing gegl in rpath of python/gimp.so
gegl was not listed as a dependency of python/gimp.so, which
omitted it from rpath, breaking the plug-ins on Nix, which relies
on rpaths.
2018-04-28 11:53:44 +02:00
4a77ff2d3d Bug 795557 - Misc. typo fixes in source, comments and doxygen (pt3)
Found via `codespell` and grep.
2018-04-25 23:49:06 +02:00
b80036e14f pdb: deprecated gimp-layer-translate
and port all plug-ins/scripts to gimp-item-transform-translate.
2018-04-23 15:49:23 +02:00
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
657c39dc74 plug-ins, themes: use the "normal text" color as stdout color of...
... the python console.
It was using "selected text", which is most often inverted color (close
if not identical to the background color). As a consequence, it made
stdout output unreadable by default, forcing themes to always define a
style for the python console. Using "normal text" is a much better
choice to default to something readable from a parent style.

As a consequence, I also removed "python-fu-console" styling from the
System theme, where there should be as few theming as possible.
2018-01-09 18:41:59 +01:00
e663526de9 Bug 753736: GIMP Python green prompt is virtually...
... unreadable to those with certain type of color blindness
2018-01-09 17:44:37 +01:00
7ccf5d2624 Bug 761140: importing gimpui module causes plugin query failure
After commit f51acf3bfb the python console no longer
initialized gimpui, because it is no longer part of module
initialization.

If the plug-in is run noninteractively and it imports
gimpui explicitely it is now necessary to call gimp_ui_init ()
at the right time
2018-01-06 12:12:16 +01:00
6b4b8c95c7 Bug 792197 - inconsistent use of tabs and spaces in indentation
Turn tabs into spaces.
2018-01-04 13:25:26 +01:00
cd4a0a185c Bug 783336: exported openraster (.ora) missing...
...mergedimage.png

fix also the thumbnail creation, that:
must be 8 bit; should not be upscaled; should not have frame
or decoration, that I interpreted as when there are transparent
areas they should not be blended with a background color,
so instead of image_flatten use  image_merge_visible_layers
(also for the merged_image)
2018-01-01 16:00:30 +01:00
e6c1c14a94 pdb, libgimp: change the gimp-drawable-invert API again
Remove the invert-linear and invert-non-linear variants and simply add
"gboolean linear" to gimp-drawable-invert. This should actually be an
enum but I didn't find a good name right now...
2017-09-03 21:28:47 +02:00
2e6c39ed9c pdb, libgimp: rename gimp_drawable_invert() to _invert_non_linear()
and add gimp_drawable_invert_linear(). Also, finally deprecate
gimp_invert() and port all its uses in plug-ins and scripts to
gimp_drawable_invert_non_linear() so the result is the same.
2017-08-30 12:27:17 +02:00
e16c8a2352 Move the new "default_new_layer_mode" APIs to the image...
...in both the core and libgimp.

Images now know what the default mode for new layers is:

- NORMAL for empty images
- NORMAL for images with any non-legacy layer
- NORMAL_LEGAVY for images with only legacy layers

This changes behavior when layers are created from the UI, but *also*
when created by plug-ins (yes there is a compat issue here):

- Most (all?) single-layer file importers now create NORMAL layers
- Screenshot, Webpage etc also create NORMAL layers

Scripts that create images from scratch (logos etc) should not be
affected because they usually have NORMAL_LEGACY hardcoded.

3rd party plug-ins and scripts will also behave old-style unless they
get ported to gimp_image_get_default_new_layer_mode().
2017-08-21 20:18:00 +02:00
838449254a plug-ins: use gimp_get_default_new_layer_mode() for most new layers
instead of hardcoding NORMAL_LEGACY.
2017-08-20 17:12:46 +02:00
731cc47a22 plug-ins: pyconsole.py must be included in the distribution.
By default, _DATA files are not included. Hence `make distcheck` fails
with:
*** No rule to make target 'pyconsole.py', needed by 'all-am'.
Let's add it back.
2017-06-01 01:12:09 +02:00
320a3db133 plug-in: add python-console.py back to EXTRA_DIST
and change variable names to be like the ones of the main python
plug-in dir.
2017-05-31 23:48:22 +02:00
e985110250 plug-ins: install python-console plug-in in its own subdirectory.
As a consequence of commit efae55a, plug-ins should not install
data/library files alongside on the root plug-ins/ directory. If they
have such files, they should create a subdirectory named as the entry
point file. Obviously we should be the first to follow this guideline.
We had one such plug-in: python-console.py, which is importing
pyconsole.py. Let's have both these files under
plug-ins/python-console/.
2017-05-26 00:15:26 +02:00
f981f83fbc plug-ins: replace deprecated enum values in py-slice plug-in 2017-04-18 06:28:03 +02:00
bc344a9991 Bug 750180 - Fix different ways of writing Plug-in Plug-In Plugin.
It was agreed that we should write "plug-in" consistently. Only possibly
user-visible strings were updated.
Thanks to scootergrisen for a first patch which could not make it
after changing decision on the canonical writing.
2017-03-21 17:52:22 +01:00