Commit Graph

526 Commits

Author SHA1 Message Date
Jehan 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
Massimo Valentini 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
Massimo Valentini 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
tcapix 6b4b8c95c7 Bug 792197 - inconsistent use of tabs and spaces in indentation
Turn tabs into spaces.
2018-01-04 13:25:26 +01:00
Massimo Valentini 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
Michael Natterer 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
Michael Natterer 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
Michael Natterer 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
Michael Natterer 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
Jehan 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
Michael Natterer 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
Jehan 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
Thomas Manni f981f83fbc plug-ins: replace deprecated enum values in py-slice plug-in 2017-04-18 06:28:03 +02:00
Jehan 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
Ell e69e84c7c7 plug-ins: s/HSV_COLOR_LEGACY/HSL_COLOR_LEGACY/ in file-openraster.py
Missed it when renaming the mode.
2017-03-16 09:48:39 -04:00
Michael Natterer 3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
Michael Natterer 0a0acc9f2a plug-ins: remove the hardcoded compat enums from script-fu and pygimp
Instead, simply look them up via the type system, and register their
values like they were normal enums.
2017-01-09 16:00:10 +01:00
Michael Natterer 178794f6f1 libgimpbase: rename enum GimpHueRange's values
and add compat cruft for the old names.
2017-01-09 02:45:16 +01:00
Michael Natterer 152adbb1bd Rename GIMP_LAYER_MODE_FOO_BROKEN to GIMP_LAYER_MODE_FOO_LEGACY
"Broken" sounds like it needs fixing, but it's legacy compat stuff
that will have to stay for all eternity.
2017-01-09 01:27:20 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Massimo Valentini eb287169c4 Bug 735774: Zarro Boogs found for PF_FILENAME - Ambiguous Entry Dialog
Before commit 20523c61ac
PF_FILE used to open a "open file" filechooser dialog.
That commit, while adding the ability to open
a "save dialog" filechooser dialog using PF_FILENAME,
changed the behavior of the existing gimpfu PF_FILE type.

Restore the previous behavior and update the
built-in plug-ins using a save dialog to the new
PF_FILENAME.
2016-08-01 09:06:12 +02:00
Massimo Valentini a1a4a067e4 Bug 735774: Zarro Boogs found for PF_FILENAME - Ambiguous Entry Dialog
FileChooser 'action' and 'buttons' should be consistent
and call set_alternative_button_order to be consistent
on platforms using the alternative button order.
2016-07-28 17:57:47 +02:00
Massimo Valentini f51acf3bfb Bug 761140: importing gimpui module causes plugin query failure
Remove gimp_ui_init call from gimpui module initialization.

Add gimp_ui_init method to gimpui module and call it from
gimpplugin _run method before running the user code.
2016-07-27 19:11:31 +02:00
Michael Schumacher 2f62555d29 Bug 744878 - Python console should not close on Escape key
The code is set up to work without returning early, use a pass instead.
2016-07-25 00:59:04 +02:00
Akkana Peck a9b85bff5f Bug 744878 - Python console should not close on Escape key 2016-07-25 00:57:07 +02:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Carol Spears 245bbbc107 Bug 623886 - CancelError exception support for gimpfu.py 2016-06-22 01:22:08 +02:00
Jehan 8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Kristian Rietveld 596d5f7435 pygimp: disable deprecation warnings for gimpmodule, drawable, tile
We need to bind deprecated methods and cannot just implement these using
the replacements. So therefore, do not disturb us with deprecation
warnings for these files.
2016-05-01 21:44:04 +02:00
Kristian Rietveld b1117908f4 pygimp: add override for gimp_zoom_preview_get_source 2016-05-01 21:44:04 +02:00
Kristian Rietveld a2d7a04700 pygimp: add overrides for two _convert_surface() methods 2016-05-01 21:44:04 +02:00
Kristian Rietveld f29877dcc4 pygimp: require Pycairo in configure, link gimpui against pycairo 2016-05-01 21:44:04 +02:00
Kristian Rietveld 7934e1c8f1 pygimp: make GimpParasite type known to the code generator 2016-05-01 21:44:03 +02:00
Kristian Rietveld fd7c1eff47 pygimp: add type definition for GimpColorManaged 2016-05-01 21:44:03 +02:00
Kristian Rietveld f3583e21c5 pygimp: add GimpColorConfig object 2016-05-01 21:44:03 +02:00
Kristian Rietveld 5a1c4e035d pygimp: disable deprecation warnings for gimpui.c
gimpui.c is the language binding which is generated from gimpui.defs.
We need to bind deprecated methods, so please do not disturb us
with deprecation warnings for this file.
2016-05-01 21:44:03 +02:00
Kristian Rietveld 57a310ebd6 pygimp: add binding for GimpImageType 2016-05-01 21:44:03 +02:00
Kristian Rietveld fb5d4ac076 pygimp: remove calls to gimp_context_set_transform_recursion
This deprecated function is currently a no-op anyway.
2016-04-29 21:35:43 +02:00
Kristian Rietveld bb4cb5b4c1 pygimp: fix typo 2016-04-29 21:35:43 +02:00
Kristian Rietveld 6746e502c2 pygimp: fix implicit enum casts 2016-04-29 21:35:43 +02:00
Kristian Rietveld 04ef2c34db pygimp: python-console: ensure initial width of 80 characters 2016-04-29 21:35:43 +02:00
Kristian Rietveld 2f1c947abc pygimp: pyconsole: set up a default size of 80x40 characters
A default width of 80 characters makes Python help readable by default.
2016-04-29 21:35:42 +02:00
Kristian Rietveld cd5dfb8642 pygimp: pyconsole: use appropriate Pango function to estimate char width 2016-04-29 21:35:42 +02:00
Kristian Rietveld d9bb8d18f9 pygimp: pyconsole: replace raw_input builtin with modal raw input
We need to run raw_input in modal mode, such that we can return the
text that has been entered as the return value. This makes the use
of "raw_input()" within the pyconsole work as well as makes "help()"
not get stuck (it was blocking on input on stdin).
2016-04-29 21:35:42 +02:00
Kristian Rietveld 229285379b pygimp: pyconsole: comment the code a bit
So the code can be understood by mere mortals like me.
2016-04-29 21:35:42 +02:00
Kristian Rietveld a795c1c4ff pygimp: pyconsole: coding style 2016-04-29 21:35:42 +02:00
Kristian Rietveld 21a4999230 pygimp: pyconsole: remove unused method 2016-04-29 21:35:42 +02:00
Andrew Worsley 69e5c553d4 Bug 155733 - need to check return values of gimp_drawable_mask_bounds()
Add mask_intersect() to pygimp that allows access to
gimp_drawable_mask_intersect() and returns an exception if there is no
overlap.
2016-04-18 21:12:51 +01:00
Daniel Sabo f10067e560 plug-ins: openraster: Ignore the x,y values of layer groups (bug 760348)
Neither MyPaint or Krita sets these values when saving, and when
loading they have conflicting interpretations such that the only
universally valid value will be zero.
2016-03-23 11:44:41 -07:00
Michael Natterer 68a9835d56 Bug 756822 - Colors/Desaturate/Luminosity should operate on linear RGB
Add GIMP_DESATURATE_LUMINANCE to enum GimpDesaturateMode and rename
GIMP_DESATURATE_LUMINOSITY to GIMP_DESATURATE_LUMA.

Keep GIMP_DESATURATE_LUMINOSITY as deprecated compat value and add it
to the script-fo and pygimp compat constants.

Change GimpOperationDesaturate to process GIMP_DESATURATE_LUMINANCE
with linear "RGBA float".
2015-10-22 19:50:56 +02:00