Commit Graph

2302 Commits

Author SHA1 Message Date
Jehan 2484dec7d5 Issue #1211: Load fonts in background after startup.
Fonts should not be blocking startup as this provides a very bad
experience when people have a lot of fonts. This was experienced even
more on Windows where loading time are often excessively long.
We were already running font loading in a thread, yet were still
blocking startup (thread was only so that the loading status GUI could
get updated as a feedback). Now we will only start loading and proceed
directly to next steps.
While fonts are not loaded, the text tool will not be usable, yet all
other activities can be performed.
2018-05-27 02:13:33 +02:00
Michael Natterer baaa2cd7ca app: remove the entire dockable tab auto-sizing code
It was totally broken and could never work like this in GTK+ 3.x, and
if it can be reimplemented it should be started from scratch.
2018-05-26 16:28:58 +02:00
Michael Natterer b33c6bc072 app: fix drawing of the canvas padding color
Remove all clipping hacks for drawing the canvas background, turns out
they never worked and we were relying on the pattern set on the
window, gah!

Also remove deprecated attempts to get a backgroud color and simply
don't show a color box in the menus for "from theme" cases.
2018-05-23 22:46:54 +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
Jehan 7642715c17 app: allow setting parent for dialogs created by GimpDialogFactory.
Fixes a bunch of:
> Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
2018-05-20 21:06:33 +02:00
Michael Natterer ebe528aca8 app: port most menu items that want images to gimp_menu_item_set_image()
or remove the item setting completely.
2018-05-20 21:06:30 +02:00
Michael Natterer 5ece7a8d1f Port a lot of stuff from GdkScreen/monitor_number to GdkMonitor
including some fixes for getting pointer coords, and needed
API changes in libgimpwidgets.
2018-05-20 21:06:30 +02:00
Michael Natterer 5b3e3023cd app: port setting the canvas padding color to GtkStyleContext 2018-05-20 21:06:27 +02:00
Michael Natterer 2439ae3acf app: add new action "view-scroll-center" with shortcut Shift+J
The zoom focus discussion on IRC suggests that everybody is annoyed
about centering behavior (or lack thereof), so here is a way to
explicitly center the image witout zooming.
2018-05-19 18:06:49 +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
Jehan e796e3a50a app: popup error at startup when some fonts fail to load.
As proposed on IRC. This will allow people to debug their fonts (for
instance when there are permission issues or whatnot) by knowing the
list of problematic fonts in an error dialog at startup (and not only on
terminal).
2018-05-01 03:25:58 +02:00
luz.paz 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
Michael Natterer dcefc10eca app: make setting of layer mode on new layers smarter in layers-commands.c
If the mode remembered in GimpDialogConfig is NORMAL or NORMAL_LEGACY,
use the image's default new layer mode instead.
2018-04-24 14:00:34 +02:00
Simon Budig 6ffa19d595 fix internal name of the filter-grid help-id 2018-04-23 01:53:49 +02:00
Michael Natterer 428110f63f app: remove non-cut/copy/paste functions from gimp-edit.[ch]
Move them to the new files gimpdrawable-edit.[ch] and
gimpimage-fade.[ch].
2018-04-18 23:48:33 +02:00
Michael Natterer bf49b47620 Bug 795207 - Add color space to blend(gradient) tool options
First WIP commit, adds:

- enum GimpGradientBlendColorSpace { RGB_PERCEPTUAL, RGB_LINEAR }
- linear blending mode for gradient segments
- tool options GUI for the blend and paint tools which use gradients
2018-04-13 22:33:16 +02:00
Michael Natterer 3f95dc52d3 Bug 791519 - Unexpected selection from channel
Make sure a channel -> selection -> channel roundtrip never does any
gamma conversion.

In gimp_channel_duplicate(), make sure a created channel has the
right format, and the right data. Fixes selection -> channel.

When switching off quick mask, call gimp_item_to_selection() instead
if gimp_selection_load(), the latter was implementing a shortcut which
is now wrong.

Remove gimp_selection_load() which is now unused.

Unrelated: also remove gimp_selection_save(), it was an obvious
3-liner used only twice.
2018-04-10 02:00:23 +02:00
luz.paz 7fdb963e01 Bug 794996 - Misc. typo fixes in comments in app/
Found via `codespell -q 3 --skip="./po*"`
2018-04-08 21:25:56 +02:00
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