Commit Graph

5349 Commits

Author SHA1 Message Date
Michael Natterer 1fc55c1572 app: switch off overlay scrollbars in tool options
and remove the viewport, GtkScrolledWindow adds one automatically now.
2018-07-06 14:24:43 +02:00
Ell 114d49510f app: log actions upon activation before emitting "selected" signal
In GimpAction, instead of connecting the action-history log
function to the action's "activate" signal as a user-provided
handler, call it directly from the default handler.

In subclasses of GimpAction, chain to the parent's activate()
function before emitting the "selected" signal, so that we always
log the action in the history before responding to it.

This allows us to avoid the hack in commit
6544ce4301.
2018-07-06 00:08:00 -04:00
Ell 6544ce4301 app: fix potential segfault in gimp_action_history_activate_callback()
In gimp_action_history_activate_callback(), bail if history.gimp is
NULL, instead of dereferencing it.  This can happen if GIMP is shut
down during the execution of a temporary procedure, such as a
script-fu script.  See the code comment for details.
2018-07-05 13:35:25 -04:00
Ell a96264b1b7 app: add gegl:stereographic-projection (little planet) to the menus 2018-07-05 09:51:41 -04:00
Michael Natterer ab17727d44 app: use GdkRGBA instead of GdkColor for text tags 2018-07-03 22:31:32 +02:00
Michael Natterer b6c099c4b9 app: fix width of GimpThumbBox' thumbnail generation progressbar
using CSS and GTK_ALIGN_FILL. The progress is currently not visible,
there is a bug in Adwaita that is about to be fixed upstream.
2018-07-03 19:43:05 +02:00
Ell b8e08cddbc app: fix GimpMeter history-graph painting when clipped
In GimpMeter, use cairo_path_extents() for getting the history
graph's extents, rather than cairo_clip_extents(), since the latter
may also include clipping applied by GTK.
2018-07-03 10:31:07 -04:00
Ell e6a59eba08 app: fix drawable-preview offset 2018-07-03 00:23:47 -04:00
Ell aa382650a1 app: add active async-operations counter to the dashboard
Add an "async" field to the dashboard's "misc" group, showing the
number of async operations currently in the "running" state (i.e.,
all those GimpAsync objects for which gimp_async_finish[_full]() or
gimp_async_abort() haven't been called yet).
2018-07-01 13:52:21 -04:00
Ell 30cc85fd63 app: add config option to enable/disable layer-group previews
Preview generation for layer groups is more expensive than for
other types of drawables, mostly since we can't currently generate
layer-group previews asynchronously.  Add a preferences option for
enabling layer-group previews separately from the rest of the
layer/channel previews; both of these options are enabled by
default.  This can be desirable regardless of performance
considerations, since it makes layer groups easily distinguishable
from ordinary layers.
2018-07-01 13:52:21 -04:00
Ell 8a81bfd2f1 app: render drawable previews asynchronously
In GimpViewRendererDrawable, use
gimp_drawable_get_sub_preview_async(), added in the previous
commit, to render drawable previews asynchronously.  While the
preview is being rendered, either keep showing the previous
preview, or render a placeholder icon.

This commit also fixes an issue where, under certain conditions, a
drawable preview would be rendered, even when layer/channel
previews are disabled in the preferences.
2018-07-01 13:52:21 -04:00
Michael Natterer 8516aedade app: on make check, search menu XML files in both buildir and srcdir
Turn GIMP_TESTING_MENUS_DIR into GIMP_TESTING_MENUS_PATH and look in
all its dirs for the menu file.
2018-07-01 19:33:51 +02:00
Michael Natterer 3089a20167 app: remove all calls to gdk_window_process_updated()
- remove gimp_widget_flush_expose()
- remove the "now" argument to gimp_display_shell_flush() and make it
  only update widget states
- rename gimp_display_flush_whenever() to gimp_display_flush_update_region()
  and call gimp_display_shell_flush() separately in the only case we
  passed FALSE to flush_whenever()
- remove th flush_now interval logic from GimpDisplay, as soon as we
  have exposed the canvas, we are in the loop for the next frame clock
  tick anyway, so delaying a useless and removed process_updates serves
  no purpose
- in gimptool-progress.c, create the invisible grab widget also for
  non-cencelable cases, so we can always safely run the main loop
  manually to make the progress updates visible
- in gimp-gegl-apply-operation.c, always run the main loop manually
  to make the progress updates visible
- in gimpstatusbar.c, leave some FIXME comments as reminder that
  we might need the same logic as in gimptool-progress.c
2018-07-01 16:40:27 +02:00
Michael Natterer 188fd773a5 app: make sure the active tool options get saved in devicerc
gimp_devices_save(): call gimp_device_info_save_tool() on the current
device.
2018-06-29 03:00:45 +02:00
Michael Natterer f294d5e1af app: gimp_container_icon_view_select_item() must only select one item
Call gtk_icon_view_unselect_all() before gtk_icon_view_select_path()
or we end up with an unintended multi-selection.
2018-06-28 23:32:20 +02:00
Ell 716510cb83 app: allow multiple variables as input to dashboard group-meter LED
When defining a dashboard group, allow specifying multiple
variables as input to the group meter's LED.  The LED is active
when any of the specified variables evaluates to TRUE, and its
color is the combination of the active variable colors.

Remove the swap-busy variable, and use swap-reading and
swap-writing as inputs to the swap group's LED instead, so that the
LED's color indicates whether the swap is currently being read-
from, written-to, or both.
2018-06-28 11:39:27 -04:00
Ell 19f4abbbd6 app: even more Windows-specific fixes in gimpdashboard.c
... and app/Makefile.am
2018-06-28 11:03:46 -04:00
Ell 4914103b5f app: more Windows-specific fixes in gimpdashboard.c 2018-06-28 10:18:31 -04:00
Ell d75e599431 app: s/DAta/Data/ in gimpdashboard.c 2018-06-28 05:05:58 -04:00
Michael Natterer 0961ccf754 Issue #1340 - Critical when editing input controllers
Don't pass a NULL widget to gimp_controller_list_edit_clicked().
Spotted by Massimo.
2018-06-28 09:34:19 +02:00
Michael Natterer 478d18f6c5 app: remove gdk_window_process_updates() from gimp_overlay_box_scroll()
All calls have to go away finally, but removing it from other places
involves some refactoring I have not completed yet.
2018-06-27 23:14:22 +02:00
Timm Bäder 06282f28ed app: Make GimpThumbBox pretty again
calling queue_resize during size-allocate is a no-go.
2018-06-27 19:00:03 +02:00
Jehan 1b9729d46d app: replace Carbon/Carbon.h by CoreGraphics/CoreGraphics.h.
As asked by Samm and solid_black on IRC.
Apparently tested and the change is fine, while getting rid of
deprecated API. I cannot test myself.
2018-06-26 15:50:40 +02:00
Jehan aad82d1a9b app: add an assertion test on result of gimp_widget_load_icon().
Actually since we make this function so that it should never return
NULL, we may as well return a test at the end. If pixbuf is NULL, then
it is an implementation bug somewhere and we should fix it.
2018-06-25 16:15:25 +02:00
Jehan 80d2a02b58 app: reorganize a bit gimp_widget_load_icon().
Massimo spotted some warning with clang in #1608 about pixbuf being used
initialized. Rather than just initializing it, I am actually
reorganizing a bit more the function because there was a bit of a logics
bug. In some weird case, it would have still been possible for this
function to return NULL instead of a magenta square (the case was: the
icon was not present in the icon theme; then wilber-eek was either not
present or failed to load).

This new code organization is more clearer, as a step by step, should
better identify the various failure cases and always return an allocated
GdkPixbuf.
2018-06-25 16:01:46 +02:00
Oleksii Samorukov 5b6126146a Fix screen resolution detection on OSX
GTK always returns 72 dpi due to API used. This patch using Cocoa
directly instead. Tested on Retina and non-hidpi displays.
2018-06-25 10:01:48 +00:00
Piotr Drąg 6834af889e app: fix typo in a translatable string (trnasferred) 2018-06-24 19:31:59 +02:00
Jehan b7685cc579 app: remove check since gimp_widget_load_icon() now always non-NULL.
This is the only place where such a check occured. All other calls
seemed to expect the return value to be non-NULL already.

(cherry picked from commit a9d851070a)
2018-06-24 18:26:49 +02:00
Jehan a6e77355d8 Revert "Issue #1608: Gimp 2.10.0 and 2.10.2 crash immediately on start."
This reverts commit 7886bdc2a9.
Not needed anymore since commit cb7cae2fec.
Now gimp_widget_load_icon() always returns non-NULL.
2018-06-24 18:26:49 +02:00
Jehan 123dcc6f3f app: gimp_widget_load_icon() should actually always return a result.
When the "gimp-wilber-eek" fallback will fail to load, we just create an
ugly magenta square instead.
See Mitch's review at #1608.

Master adaptation for commit 32931c4606.
2018-06-24 18:26:49 +02:00
Michael Natterer 80997a8646 Remove most GTK_ADJUSTMENT() and (GtkAdjutment *) casts
they are obsolete in GTK+ 3.x because GtkAdjustment cannot be passed
around as GtkObject any longer, GtkObject is gone.
2018-06-24 18:15:16 +02:00
Jehan 877c20f420 app: even for fallback icons, it is better to check lookup success. 2018-06-24 17:27:36 +02:00
Jehan 352bc2160f app: add a doc-comment to gimp_widget_load_icon().
Mostly to make sure that calling code takes NULL as a possible return
value.

(cherry picked from commit 4d4ba34006)
2018-06-24 17:14:25 +02:00
Jehan ff9d41902e app: load "gimp-wilber-eek" as fallback when an icon fails to load.
We were already doing so when an icon was simply absent from the icon
theme. But we may still end up in cases where the icon is seemingly
present, yet it fails to load (for instance the image file is
corrupted). When this happens, let's also try to load the wilber-eek
fallback.

Note that it doesn't completely stops gimp_widget_load_icon() from
possibly returning NULL (in the case where "gimp-wilber-eek" is also
missing/corrupted for instance), so calling code must still account for
possible NULL return value.

Basically the same as commit 9c6237b182
except that I just redid it instead of cherry-picking because the code
was a bit too different.
2018-06-24 17:02:19 +02:00
Jehan 7886bdc2a9 Issue #1608: Gimp 2.10.0 and 2.10.2 crash immediately on start.
If "gimp-swap-colors" or "gimp-default-colors" are present in the theme,
yet broken somehow, GIMP would crash because it was not checking if the
icons had been successfully loaded.
Just make the relevant checks and output on standard error that the swap
and/or default color areas are invisible.

(cherry picked from commit d997b2b897 with
conflicts resolved)
2018-06-24 17:02:19 +02:00
Michael Natterer b8e75a0201 app: more GimpGradientEditor cleanup
Let the split and replicate segments dialogs keep their own data and
don't use GimpGradientEditor struct members. Remove redundant members
and indent the struct.
2018-06-24 16:24:16 +02:00
Michael Natterer 025a13b519 app: peek/poke much less in GimpGradientEditor internals
Add gimp_gradient_editor_get_selection() and set_selection()
and use them in gradient-editor-commands.c
2018-06-24 15:58:59 +02:00
Michael Natterer acd3a6f169 Clean up color selector styling
- remove redundant frames, 3d-frames are gone anyway, so no need to
  keep double out/in frames around
- give all color selector classes CSS names
- add/fix some theme CSS styles
2018-06-24 15:41:04 +02:00
Michael Natterer 2b8b780b6a app, libgimpwidgets: all GimpColorHexEntries should have the same tooltip
Set the tooltip in GimpColorHexEntry itself and remove all other
tooltip setting. This just moves the translatable string sround in
libgimpwidgets/, and even removes it from app/.
2018-06-24 14:19:25 +02:00
Michael Natterer 72bc216f4a app: make GimpFgBgEditor and GimpFgBgView honor border and padding
and give them CSS names. Set an appropriate padding for GimpFgBgView
in notebook tabs in the theme CSS.
2018-06-24 13:58:21 +02:00
Ell 51793b114a app: fix dashboard swap read/write variable order
... to satisfy the inter-variable dependencies, so that the READING/
WRITING variables are based on the READ/WRITTEN values of the
current sample, and not the previous one.
2018-06-21 12:31:31 -04:00
Michael Natterer 558641fe6c app: move the gradient editor color dialog code to GimpGradientEditor
Same as previous commits.
2018-06-21 17:23:09 +02:00
Michael Natterer 02b6ff24da app: make gimp_gradient_editor_update() private 2018-06-21 13:57:39 +02:00
Michael Natterer 5edc0306f9 app: move the colormap editor color dialog code to GimpColormapEditor
See commit below.
2018-06-21 13:43:25 +02:00
Ell fda671841c app: more fixes to last dashboard commit
Don't show percentage for the swap read/written fields, and make
sure their history underlays are displayed correctly even if the
swap limit changes.
2018-06-21 07:39:09 -04:00
Michael Natterer 1c1dd2038e app: move the palette editor color dialog code to GimpPaletteEditor
That's cleaner than having it in palette-editor-commands.c
2018-06-21 12:43:59 +02:00
Ell ab9f70d95c app: a few fixes to last commit 2018-06-21 04:12:36 -04:00
Ell 6b9aba3067 app: add swap read/write fields to the dashboard
Add "read" and "written" fields to the dashboard swap group, which
report the total amount of data read-from/written-to the tile swap,
respetively.  These fields are non-active by default.  When these
fields are active, show a color underlay in the swap group's meter,
indicating when data was beging read-from/written-to the swap.

Improve the swap busy indicator (used as the meter's LED), so that
it's active whenever data has been read-from/written-to the swap
during the last sampling interval, rather than at the point of
sampling.
2018-06-21 04:00:59 -04:00
Michael Natterer 1ae2b5d573 Issue #1093 - Color dialog appears in the first monitor...
...while other windows are on the second monitor if window positions
are saved at exit

Add some lines of code to color_area_color_clicked() which position
the already existing color dialog exactly like a newly created dialog
would be positioned by gimp_dialog_factory_add_dialog().

This should be part of GimpDialogFactory but let's wait for another
case before we generalize it.
2018-06-20 15:59:29 +02:00
Ell dc6ea0a977 app: in the dashboard, fix statm file-descriptor initialization
... in the unlikely case that getting the page-size fails.
2018-06-19 13:41:35 -04:00