Commit Graph

2283 Commits

Author SHA1 Message Date
Ell 4c041b2e8a app: allow hiding groups in the dashboard
Add a "groups" submenu to the dashboard popup menu, which can be
used to control which groups are shown in the dashboard.
2018-04-02 16:47:41 -04:00
Michael Natterer fe932fe7ad Bug 794826 - Do not default to last used filter settings
Add GimpGuiConfig::filter-tool-use-last-settings wchich defaults to FALSE.

Honor the new option in gimp_gegl_procedure_execute_async() and add
it to prefs -> dialog defaults.
2018-04-01 14:41:20 +02:00
Michael Natterer f586aac43a app: use g_clear_foo() in gimp_gegl_procedure_finalize() 2018-04-01 13:54:47 +02:00
Ell 53c145c0be app: add --show-debug-menu command-line option
The debug menu is currently not included in stable versions.

Include the menu unconditionally, but hide it, and its associated
actions, by default in stable versions.  Allow enabling the menu
using a new --show-debug-menu command-line option, in the same vein
as --show-playground.
2018-03-29 05:26:03 -04:00
Michael Natterer 1b623a99c8 Bug 794469 - Shift-click to create layer/channel/path...
...should really use last values

When creating a layer or channel "from last values", really use the
values last set be the user in the respective dialogs. In particular,
don't use properties of the active layer or channel. I have no idea
what we were thinking when adding that obscure logic.
2018-03-25 14:08:50 +02:00
Ell 8f07d76786 app: fix paste-in-place when pasting over a layer group/locked item
When pasting in place over a layer group or a content-locked item,
change the paste type to NEW_LAYER_IN_PLACE, rather than NEW_LAYER,
so that the new layer is still pasted in the right location.

Additionally, avoid showing the "Pasted as new layer because ..."
message when pasting over a layer group or a content-locked item,
when the paste type is NEW_LAYER[_IN_PLACE] to begin with.
2018-03-24 12:50:16 -04:00
Jehan cdabe69164 Bug 794469 - Shift-click-create layer always set "Default/Normal" mode.
It should use the last used layer mode instead.
2018-03-23 18:46:21 +01:00
Ell a7f3a2dd9f app, pdb, libgimp, plug-ins, menus: rename layer composite modes
Our composite modes don't correspond directly to the Porter-Duff
operators after which they're named, and these names aren't too
descriptive anyway.

Rename the composite modes as follows:

  Source Over       =>  Union
  Source Atop       =>  Clip to Backdrop
  Destination Atop  =>  Clip to Layer
  Source In         =>  Intersection

Update relevant code, including UI text, enumerator names, function
names, and action names.
2018-03-14 16:19:09 -04:00
Ell 36dec4e6b0 Bug 51112 - Support layer masks on layer groups
Add layer-mask support for group layers.  Group-layer masks work
similarly to ordinary-layer masks, with the following
considerations:

The group's mask size is the same as group's size (i.e., the
bounding box of its children) at all times.  When the group's size
changes, the mask is cropped to the new size -- areas of the mask
that fall outside of the new bounds are discarded and their data is
lost (sans undo), and newly added areas are filled with black (and
hence are transparent by default).

The new gimp_group_layer_{suspend,resume}_mask() functions can be
used to modify this behavior.  Between the outermost pair of
suspend/resume calls, the old mask data is remembered, and is used
to fill the newly added areas while cropping the mask when the
group is resized.  We override GimpItem::{start,end}_move() for
GimpLayer, to call these functions (suspend() in start_move(), and
resume() in end_move()) for each of the layer's ancestors.

As a result, while moving a layer, or a set of layers, atomically,
such as while dragging with the move tool, or moving linked layers,
the ancestors' mask data is not lost, and is only discarded at the
end of the operation.

This commit also takes care of properly handling undo for group-
layer mask crops, properly invalidating the image when the group
layer's mask is shown, and enabling the mask actions for group
layers (obviously :).
2018-02-05 12:08:54 -05: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 36dd16c6c6 Bug 792744 - Gimp crashes attempting to merge down a hidden layer
layers_actions_update(): make the merge down action insensitive
if the current layer is invisible.
2018-01-22 00:00:57 +01:00
Jehan 47804ff77b app: s/preceptual/perceptual/ in a string. 2018-01-15 17:14:26 +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
Massimo Valentini b118e8242b Bug 784647: Crash when choosing debug option Show Image Graph
The attached patch avoids CRITICALs when executing Debug actions
with no images open.
1) do not run projection benchmark unless there is an image
2) memsize of pluginmanager member was incorrectly computed using
   gimp_object functions for 2 GObjects
2018-01-10 17:06:56 +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 fa2a1fd7e9 icons: lazy fixes for icons in the Help menu
It appears that GTK+/GNOME don't have an icon with
"help-browser" ID anymore, but we have exactly the icon
that is needed for two menu entries.

Also, the menu entry for "Search and Run..." was using
a system icon for finding stuff, which looked wrong when
used with a symbolic theme.

We could come up with something overly clever like
a dedicated CLI/terminal icon, but people would expect
a magnifier instead (judging by what Blender does)
and that's what we already use for the Zoom tool.
Hence the lazy fix.
2018-01-05 04:36:50 +03:00
Michael Natterer 135f58d3ae Bug 790002 - Remember last-used "Select color profile from disk" location
Add "color-profile-path" to GimpDialogConfig to remember the last-used
path in any profile chooser dialog.

Whenever a GimpColorProfileChooserDialog is created, call a new
gimpwidgets-utils helper function that connects to the dialog's "show"
and "response" signals and makes sure "color-profile-path" is set on
the dialog if it doesn't have a current folder already, and sets the
property back to the config object when a profile was actually chosen
from disk.
2018-01-02 23:09:00 +01:00
Ell ee41819165 app: various GimpDashboard improvements
Refactor GimpDashboard to autogenerate the UI based on a
description of the different variables, fields, and groups.

Allow individual groups to be expanded/collapsed, and individual
fields to be enabled/disabled.  Save the relevant state in the
dashboard's aux-info.

Add fields for the new GeglStats properties, as per GEGL commit
25c39ce6c9bb618f06ac96d118e624be66464d74.  The new fields are not
enabled by default.

Add "reset" action, to clear the history, and reset cumulative
data.
2017-12-30 13:57:31 -05: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
Ell 1f4b78bc68 app: add missing translation context to dashboard action tooltip 2017-12-19 16:57:28 -05:00
Ell 981e8dcdfe app, menus, icons: add dashboard dockable
The dashboard dockable shows the current GEGL cache and swap sizes,
and their recent history.  It has options to control the update
rate and history duration of the data, and an option to warn (by
raising/blinking the dialog) when the swap size approaches its
limit.
2017-12-18 19:42:23 -05:00
Ell 0beef7d97d app: in GimpItemTreeView, use color tag of parent for children with no tag
Add gimp_item_get_merged_color_tag(), which returns the color tag
of the nearest ancestor (including the current item) that has a
color tag other than NONE.  Use this function in GimpItemTreeView,
instead of gimp_item_get_color_tag(), to set the cell color of
items, so that item's with a NONE color tag inherit the color of
their parent.  Add a boolean "inherited" parameter to
gimp_get_color_tag_color(), which indicates if the color tag is the
item's actual color tag, or an inherited color tag, and modify the
returned color accordingly, so that inherited colors are less
saturated/lighter than non-inherited ones.
2017-12-07 17:02:05 -05:00
Alexandre Prokoudine 9e77a0f88b Add default keyboard shortcut for Paste in Place, Ctrl+Alt+V, that matches Inkscape's one 2017-12-05 21:07:56 +03:00
Thomas Manni c4c40b6a01 app: set sensitivity for median-blur filter action 2017-12-02 01:14:01 +01:00
Jehan 4355088644 app: layer's Blend|Composite Space|Mode actions labels too long.
Same as for the color tags issue, short labels look much better in
menus. On the other hand, the longer description needs to be as a
tooltip, otherwise there is not enough information in the action search
to distinguish one action purpose from another.
2017-11-23 20:40:49 +01:00
Jehan d88a09334d app: get rid of more abused GIMP_ICON_CLOSE on *-color-tag-menu.
I just replaced them by NULL. I don't think that is really necessary to
have any icons on these.
2017-11-23 20:40:49 +01:00
Jehan 39d03909dc app: s/GIMP_ICON_CLOSE/GIMP_ICON_EDIT_CLEAR/ for *-color-tag-none.
This part of commit 189a474502 was still
right. Keep it.
2017-11-20 02:44:44 +01:00
Jehan e3f8b470d2 Revert "app: copy *-color-tag-* tooltips into labels."
This reverts commit 189a474502.
As Mitch notes, this does not look that good in the menus. As for the
action search, since the tooltip is still shown below, the shortness and
duplication of the action labels make it less a problem.
2017-11-20 02:40:16 +01:00
Ell 5eb6187421 app, menus: add gegl:median-blur to the menus 2017-11-17 16:46:39 -05:00
Jehan 189a474502 app: copy *-color-tag-* tooltips into labels.
Current labels were very uninformative while tooltips contained what
should have been the labels. Just switch these.
Also replace GIMP_ICON_CLOSE by GIMP_ICON_EDIT_CLEAR for the various
*-color-tag-none actions. As a comment was reminding next to these
icons, the close icon was abused. The edit-clear icon on the other hand
is quite relevant.
2017-11-16 03:20:42 +01:00
Jehan 0e8b89c821 app: more casing inconsistencies and a double space. 2017-11-16 02:38:49 +01:00
Jehan be9d5758c2 app: various action labels made more accurate.
"Linked", "Lock Pixels|Position|Strokes" and color tags were not precise
enough to know if that were for channels, layers, any drawable or paths.
2017-11-16 02:34:27 +01:00
Jehan 6b0f9f001f app: apply Title Case to action labels.
Looking at most action labels, it seems the "Title Case" mixed-case
style has to be applied. Fix the few labels I found which were not
following this case style.
Also no need to have a tooltip when it is basically the same as the
label.
2017-11-16 02:27:24 +01:00
Jehan c70925126a app: s/channel/drawable/.
I assume a failed copy-paste. :-)
2017-11-16 01:32:00 +01:00
Jehan 1e87642ef0 Bug 785061 - Add channels-select-(prev|next|top|bottom) actions. 2017-11-16 01:26:19 +01:00
Jehan 4003bc79db app: layers-mode-* actions should not always be sensitive. 2017-11-16 01:14:18 +01:00
Jehan 87140a4cc6 app: more accurate labels for "Visible" actions.
There were 4 actions displaying as "Visible" only: channels-visible,
drawable-visible, layers-visible and vectors-visible. This was not very
useful to differentiate them (for instance in action search). Just make
clearer labels.
2017-11-15 21:14:41 +01:00
Jehan ffb923464c app: more accurate labels for "Other" actions.
Both view-rotate-other and view-zoom-other had for label "Othe_r...".
This is quite vague in particular when in out-of-menu contexts (i.e. the
action search).
2017-11-15 03:13:23 +01:00
Ell 8aa5e7825e app: move error console highlight flags to aux-info
Move the highlight flags of the error console from GimpGuiConfig
and sessionrc to GimpErrorConsole and its aux-info, respectively.
2017-11-13 10:19:12 -05:00
Michael Natterer b5e0dfb6e2 app: clarify "Into" -> "Into The Selection" in the buffers dialog too 2017-11-12 23:40:18 +01:00
Piotr Drąg d680c5453f app: fix typo in a translatable string 2017-11-12 19:14:36 +01:00
Michael Natterer f12d0d8c29 Bug 789764 - Please add Paste In Place feature
Add "In Place" variants for all sorts of pasting:

- extend the GimpPasteType enum with IN_PLACE values
- add the needed actions and menu items
- merge the action callbacks into one, taking an enum value as parameter
- refactor the pasting code in gimp-edit.c into smaller functions

We probably have too menu items in the "Edit" menu now, needs to be
sorted out.
2017-11-12 18:41:05 +01:00
Ell 2fe6575d7e Bug 789901 - Gimp allows duplicating non-duplicatable data objects ...
... leading to a crash

Add gimp_data_is_copyable() and gimp_data_is_dulicatable().

Use gimp_data_is_duplicatable() when setting the sensitivity of the
various "foo-duplicate" actions, instead of inspecting the object's
GimpDataClass::duplicate pointer directly, since this is no longer
an indication of whether a GimpData object is duplicatable or not
(since commit 33de4d5530).
2017-11-04 22:00:29 -04:00
Ell 7655dd727b app: make error-console highlighting criterion configurable
Currently, the error console is highlighted (shown/blinked) only
upon errors; however, warnings, which are not shown on the
statusbar while the error console is open, often also contain
important information.

Allow the user to configure which message types (errors, warnings,
and regular messages) highlight the error console, using a new
"highlight" submenu in the error-console menu.  Add corresponding
config options, saved in sessionrc.  By default, highlight the
error console unpon both errors and warnings.
2017-10-28 10:08:13 -04:00
Ell c5b88702e6 app: allow specifying a callback function for propgui pickers
Allow propgui constructors to specify an (optional) callback function
when creating pickers, to be called when a color/coordinate is picked,
similarly to controller callbacks.

Implement picker callback support in GimpFilterTool.  When the active
picker has an associated callback function, call it instead of the
class's color_picked() function.

Add lots of "#include <gegl.h>" to .c files that miss it, which is
now necessary, since this commit adds a Babl* parameter in
propgui-types.h.
2017-10-16 12:38:37 -04:00