Commit Graph

154 Commits

Author SHA1 Message Date
Ell 85a19da868 Issue #4366 - Color-to-alpha unnecessarily grayed out for grayscale images
Don't disable color-to-alpha for grayscale drawable, since the
operation is applicable to grayscale images (in particular, it
doesn't add color where there was none), and since we no longer
distinguish between layers and channels according to the drawable
format when updating the filters actions.
2020-01-17 12:12:36 +02:00
Ell 50b655de27 Issue #1975 - Color to alpha now requires an alpha-channel ...
... (used to add one automatically)

In GimpFilterTool and gimp_drawable_apply_operation(), use
gimp_drawable_filter_set_add_alpha() to add an alpha channel when
applying an operation that specifies "needs-alpha" to a drawable
that can have alpha.

Don't disable gegl:color-to-alpha (which has "needs-alpha") when
the drawable doesn't have an alpha channel, if one can be added.
2020-01-17 12:11:24 +02:00
Ell 6adf77e13a app, menus: add gegl:normal-map to Filters -> Generic 2019-10-23 20:04:38 +03:00
Ell 6b8ffd419d app: add missing SET_SENSITIVE() for new filter actions 2019-10-01 19:03:22 +03:00
Sabri Ünal e93a20e7ac Issue #3112 - Missing mnemonics.
(cherry picked from commit 30e4a7ee5e)
2019-08-05 22:44:36 +02:00
Michael Natterer ed64fda6e5 app: add gegl:mean-curvature-blur to Filters -> Blur 2019-07-19 14:41:19 +02:00
Michael Natterer d718da27a8 app: add gegl:newsprint to Filters -> Distorts
and add a custom GUI constructor that does nothing special (yet).
2019-07-17 18:24:33 +02:00
Michael Natterer 3b6b3fc189 app: GtkAction -> GAction madness part two
Change all action callbacks so they can be invoked by a GAction:

- add GimpActionCallback typedef:
  void (* cb) (GimpAction*, GVariant*, gpointer)
- change all action callbacks to the GimpActionCallback signature
- add "gimp-activate" and "gimp-change-state" signals to GimpAction,
  with the same signature as the resp. GAction signals
- remove all other custom action signals and only use the new
  GimpAction signals
- pass around appropriate GVariants containing booleans, int32,
  strings
- badly hack around to force a GimpProcedure pointer into a
  uint64 variant
- remove all G_CALLBACK() casts from all action callbacks,
  they all have the same signature now
2019-07-04 01:11:48 +02:00
Michael Natterer 86e07c16b5 app: start porting away from GtkAction and friends
Step one: get rid of all those deprecation warnings that make
it hard to see any other warnings:

- add a lot of dummy API to GimpAction, GimpActionGroup, GimpUIManager
  etc. which simply forwards to the deprecated GTK functions, they
  will all go away again later
- rename GimpAction to GimpActionImpl
- add interface GimpAction that is implemented by all action classes,
  creates a common interface and allows to remove some duplicated
  logic from GimpToggleAction and GimpRadioAction, and at the same
  time adds more features
2019-07-02 14:21:32 +02:00
Michael Natterer 928b85d25c app: add gegl:bayer-matrix and gegl:linear-sinusoid to the menus
in Filters -> Render -> Pattern. Also depend on GEGL from git.
2019-06-28 15:48:47 +02:00
Ell 3a4a00c71e Issue #40 - Layer offset tool
Add a new Offset filter tool, as a front-end to gimp:offset.  The
tool replaces, and provides the same interface as, the drawable-
offset dialog, while also providing live preview and on-canvas
interaction.

Note that we don't simply use a custom propgui constructor for
gimp:offset, since we need a little more control.
2019-06-05 19:06:56 -04:00
Alexandre Prokoudine 616efae3b0 Remap Linear Invert's mnemonic to I to remove a duplicate with Levels 2019-02-14 01:18:09 +03:00
Jehan f8f3a74971 Issue #2920: Dilate and Erode filters' tooltips are untranslatable.
Wrong message contexts!
2019-02-07 15:43:18 +01:00
Ell 537bf4ec6a app: add gegl:long-shadow to the menus 2018-08-09 19:02:59 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell a96264b1b7 app: add gegl:stereographic-projection (little planet) to the menus 2018-07-05 09:51:41 -04:00
Alexandre Prokoudine 38e5a021ad Sync USM menu entry to GEGL
(cherry picked from commit c2e1147ff5)
2018-07-02 20:06:58 +02:00
Michael Natterer 63817485c0 app: when a plug-in procedure is not sensitive, show the reason in the tooltip
Return an optional tooltip from gimp_procedure_get_sensitive(), in
GimpPlugInProcedure, build that tooltip from the image types the
procedure works on.
2018-06-22 13:29:52 +02:00
Ell f5ecc9f859 app, menus: add gegl:spherize to the menus 2018-05-06 07:13:08 -04:00
Ell cdd129110c app, menus: add gegl:recursive-transform to the menus 2018-05-06 07:13:00 -04:00
Simon Budig 6ffa19d595 fix internal name of the filter-grid help-id 2018-04-23 01:53:49 +02:00
Michael Natterer 4a26d4a3e6 Bug 793090 - GIMP crashes when invoking filter without an image
filters-commands.c always needs an image and a drawable, so use
return_if_no_drawable(), not return_if_no_display().

Also fix the sensitivity of the shadows-highlights actions, which made
this bug triggerable at all.
2018-02-01 14:36:59 +01:00
Michael Natterer b23f231a1a Bug 792470 - Some filters e.g. "Levels" are not added to "Repeat last" history
The four remaining "classic" color tools (Brightness-Contrast, Curves,
Levels and Threshold) are in fact just special UIs for otherwise
completely normal filter ops.

Add normal filter actions for them and invoke them like all
other filters, which makes them show up in the filter history
automatically.

The only small hack needed is to special case them in
gimp_gegl_procedure_execute_async() so the right tools are created
instead of the default GimpOperationTool. Also, blacklist the
automatically generated tools actions from action search and the
shortcut editor.
2018-01-14 15:42:29 +01:00
Alexandre Prokoudine 78821b4cb9 Add icons for Shadows-Highlights 2018-01-05 21:03:42 +03:00
Alexandre Prokoudine 098113a740 Fix the help hint for shadows-hughlights 2018-01-05 19:39:38 +03:00
Alexandre Prokoudine 3364ee2af4 Create custom UI for GEGL-based Shadows-Highlights filter...
... and place it in menu
2018-01-05 05:56:08 +03:00
Alexandre Prokoudine b7d2c5eab1 Add Exposure tool icon, remove erroneous stock entry for the colortemp icon 2017-12-28 04:11:55 +03:00
Alexandre Prokoudine c281fca1c0 Fix variables for the new icons 2017-12-27 07:49:52 +03:00
Alexandre Prokoudine 4d11e2b184 Add colortemp icons to the build 2017-12-27 07:49:52 +03:00
Alexandre Prokoudine 62cf942c46 Make Value Invert use the invert icon rather than the stock GEGL one 2017-12-27 03:13:50 +03:00
Thomas Manni c4c40b6a01 app: set sensitivity for median-blur filter action 2017-12-02 01:14:01 +01:00
Ell 5eb6187421 app, menus: add gegl:median-blur to the menus 2017-11-17 16:46:39 -05:00
Ell eef09abf3a app, menus: add gegl:spiral to the menus 2017-07-28 17:48:03 -04:00
Piotr Drąg 14795c1f72 Fix typos in translatable strings 2017-06-26 11:57:43 +02:00
Michael Natterer 109f23af39 app: replace the hue-saturation tool by a generic filter action
Move the GUI to a custom gimppropgui function.
2017-06-05 18:35:05 +02:00
Michael Natterer 757ca64e58 app: replace the color balance tool by a generic filter action
Move the color balance GUI to a custom gimppropgui function.
2017-06-05 01:20:37 +02:00
Michael Natterer ecfec4103b app: remove the colorize tool and replace it by a generic filter action 2017-06-04 21:21:43 +02:00
Michael Natterer adb826fb39 app: allow filter actions to have hardcoded default operation settings
by encoding them directly in the string attached to all filter
actions. The code now supports both "gegl:some-operation" and
"gegl:some-operation\n<serialized config>".

Add "default_settings" to GimpGeglProcedure to store the settings of
the invoking action, much like the "default_run_mode" member.

Change filters-commands.c to parse the new operation string, create
GimpGeglProcedures with the deserialized settings, and use those
settings when the procedures are ran.

Change the filter history to be smarter about what is already in the
history, there can now be several different procedures with the same
name.

Remove the dilate and erode actions from the drawable group, and add
them to filters, they are just special cases of value-propagate with
fixed settings.
2017-06-03 22:08:43 +02:00
Michael Natterer b1ea1eb71d app: apply some more filters immediately (without GUI) 2017-06-01 23:40:39 +02:00
Michael Natterer 383419926b app: add member "default_run_mode" to GimpGeglProcedure
which determines if a filter is applied directly (RUN_NONINTERACTIVE)
or asynchronously using GimpOperationTool (RUN_INTERACTIVE).

Split filter actions in two groups, one for direct apply and one for
interactive apply, which have separate callbacks that create
GimpGeglProcedures with the right default_run_mode set.

(After doing this distinction automatically based on the existance of
editable properties, I figured will might want direct apply also for
filters that do have properties, such as e.g. dilate and erode, which
are just value-propagate with some constant property values)
2017-05-31 23:48:22 +02:00
Michael Natterer 84e5aed103 app: turn invert-perceptual, -linear and -value into normal filter actions
so they show up in recent filters, and don't need their own callbacks.

This has the problem that they now show a GUI with no options, but
that simply puts on more pressure to fix this general uglyness of ops
without editable properties.
2017-05-26 18:49:22 +02:00
Michael Natterer e5e9e4b6c8 Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
Add gegl:hue-chroma to the "Colors" menu.
2017-05-07 18:32:45 +02:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Michael Natterer c6f00eb87f app, menus, plug-ins: add new menu Color -> Tone Mapping
Move all related GEGL filters and the retinex plug-in there..
2017-02-02 20:42:58 +01:00
Michael Natterer 7c9a740b74 app, menus: add gegl:image-gradient and gegl:snn-mean to the menus 2017-02-02 19:54:23 +01:00
Michael Natterer d434c60161 app, menus: add some more GEGL filters to the menus
and blacklist some others in the GEGL tool.
2017-02-02 17:43:27 +01:00
Michael Natterer 45d1e0b4ea app: change the help IDs of posterize and desaturate
they are simple filter now, not tools.
2017-01-31 21:08:36 +01:00
Alexandre Prokoudine efb1c5e022 Fix indents to amend the previous commit 2017-01-31 22:45:09 +03:00
Alexandre Prokoudine d61a62af67 Enabled a whole bunch of help IDs for GEGL-based filters
Also, fixed a few copy/paste errors.
2017-01-31 22:35:50 +03:00
Michael Natterer d293a00995 app, menus: add gegl:edge-neon to Filters -> Edge Detect 2017-01-22 14:35:35 +01:00