Commit graph

5158 commits

Author SHA1 Message Date
Ell
dd52d8d7a5 app: in performance logs, add new-lines between variable definitions
(cherry picked from commit c7f1730702)
2018-11-10 02:52:51 -05:00
Ell
645e30e641 app: a few fixes to performance-log backtrace output
Fix delta-encoding of performance-log backtraces in certain cases,
and distinguish between empty call-stacks and removed threads.

(cherry picked from commit eec1e1f189)
2018-11-07 14:26:38 -05:00
Ell
bc3847e851 app: avoid allocating empty tempbuf for drawable previews
In gimp_view_renderer_drawable_render(), make sure the preview size
is always at least 1x1.

Fixes commit 8009ea342a.

(cherry picked from commit 963322fdd4)
2018-11-03 04:30:23 -04:00
Ell
b8862acee9 app: include variable descriptions in performance logs
Include instrumentation-variable descriptions in the var-defs
section of performance logs, so that they can be displayed
alongside their names when viewing the log.

(cherry picked from commit 646208eff0)
2018-11-03 04:17:55 -04:00
Ell
5456226c99 app: simplify drawable preview rendering
Simplify gimp_view_renderer_drawable_render(), by consolidating
common code paths.  In particular, when rendering the preview as
part of an image, always crop the preview to the bounds of the
image, even when downscaling, to avoid unnecessarily downscaling/
convering cropped-out regions.  We previously only did this when
upscaling the preview by a factor of 2 or more; whatever the reason
for this used to be, it's no longer there.

(cherry picked from commit 8009ea342a)
2018-11-03 04:06:17 -04:00
Ell
4f27efc4a0 Issue #2436 - Crash after downsizing canvas
In gimp_view_renderer_drawable_render(), avoid overflow in preview-
area calculation.  This prevents erroneously setting 'scaling_up'
to FALSE while upscaling the drawable by a very large amount, which
can lead to the creation of a very large GimpTempBuf for the
preview, causing memory allocation to fail.

(cherry picked from commit 0cdbe91e5a)
2018-11-02 21:44:10 -04:00
Michael Natterer
c7dd4d8dd3 Issue #2235 - Color reset/swap keyboard shortcuts not discoverable...
...via hover tooltips

Use the GtkWidget::query_tooltip() signal on GimpFgBgEditor to emit an
own signal "tooltip" that has the hovered widget area as parameter.

Connect to GimpFgBgEditor::tooltip() in gimptoolbox-color-area.c and
set separate tooltips on the widget's areas, including the shortcuts
for "Swap colors" and "Default colors".

(cherry picked from commit ae9d84dd22)
2018-10-25 14:58:57 +02:00
Oleksii Samorukov
7dbb9fee3d Fix compilation on Mac 10.6 and 10.7 (#2112) 2018-10-24 10:37:36 +02:00
Elle Stone
59682a1cb1 Issue #2345 - Add xyY to color sample readouts
Add xyY color space to the color spaces for sampling colors.

Also add code to xcf-load.c that makes sure the sample point loading
code handles unknown future GimpColorPickMode values (fall back to
PIXEL pick mode).

(cherry picked from commit 298cc57042)
2018-10-23 18:15:28 +02:00
Sergio Jiménez Herena
360aee10d8 app: Add option in the windows menu to hide the image tab bar. 2018-10-22 20:41:29 +02:00
Jehan
6b1ff0dd96 Issue #1924: Tool options mysteriously lock up due to DND/quartz issues.
On macOS, the "drag-end" signal does not seem to be emitted in some
cases, which leaves dockables in an unsensitive state. Rather than
trying to fix GTK+2 which is half-maintained nowadays anyway, let's drop
the unsensitivity. As a comment notes, this was anyway only a visual
cue. Dragging dockables in GIMP 2.10 already shows a lot of other visual
cues, so this is redundant.
In case of drop failure, we also had to cleanup the icon widget and
detach the dockable. This can be handled by the "drag-failed" (which
hopefully work better on macOS).

As an additional improvement, I raise the newly created dockable window,
since this is the most likely behavior when you just detached a dock
(and I realize it usually appeared behind other GIMP windows, at least
on GNOME).

Note: this is a gimp-2-10 only fix as master relies on GtkNotebook DnD
code which (hopefully, as I haven't tested) doesn't have this issue. The
detached window behind other windows issue doesn't exist on master, at
the very least.
2018-10-19 21:46:54 +02:00
Ell
60c49c5682 Issue #2237 - export as, select file type (by extention) list problem
In gimp_file_proc_view_get_proc(), when there is no selected
procedure (which can happen, in particular, when searching the
list), return the "automatic" procedure and its corresponding name/
filter, if one exists, instead of bailing.

Additionally, in GimpFileDialog, use a match-all filter when
gimp_file_proc_view_get_proc() returns no filter, avoiding
CRITICALs/segfault.

(cherry picked from commit e26a220a6f)
2018-10-16 07:50:02 -04:00
Michael Natterer
70611cb06a app: didn't push my latest version of the previous fix 2018-10-13 17:35:53 +02:00
Michael Natterer
130443a059 Issue #2210 - GIMP crashes on startup if usb mouse is present
In GimpDeviceInfo, make sure that the info->axes and info->keys arrays
always have info->n_axes and info->n_keys members. Also sync axes and
keys between GdkDevice and GimpDeviceInfo more often, and some
cleanup.

(cherry picked from commit 7adb6c26e5)
2018-10-12 20:18:23 +02:00
Ell
c9510721c5 app: construct tool-options GUI lazily
We currently construct the tool-options GUI for all the tools at
startup, which takes a significant amount of time.  Instead,
only register the GUI construction function with the tool-options
object, using the new gimp_tools_set_tool_options_gui_func()
function, and use the registered function to construct the GUI when
actually needed.

(cherry picked from commit c1347a7f26)
2018-09-27 02:44:35 -04:00
Ell
07c134e673 app: fix incompatible pointer type warning in gimpviewrendererdrawable.c
... more GLib 2.58 fallout.

(cherry picked from commit a5c8dd5c73)
2018-09-18 16:23:45 -04:00
Ell
31b369d09f app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:41:35 -04:00
luz.paz
23648e753e Misc. typo fixes
Found via `codespell`

(cherry picked from commit 386587736f)
2018-09-17 16:05:02 +02:00
Ell
64403d5fd8 app: add more information to performance logs
In addition to the verbose GIMP version, include in performance
logs the values of all environment variables beginning with BABL_,
GEGL_, or GIMP_, and of all the GEGL config options.

(cherry picked from commit 2c6b5c371e)
2018-09-16 09:00:20 -04:00
Jehan
536af959f1 Issue #2055: make save dialog compatibility information understandable.
* The minimum GIMP version for this XCF is always written down when it
  is GIMP 2.8 or over.
* The list of features warrating the minimum version is now listed in an
  expander container rather than as tooltip (making the list actually
  discoverable!).
* The warning on compression is now displayed as its own text under the
  checkbox (only when checking the box actually changes anything
  compatibility-wise), and not as additional text to the minimum GIMP
  version label. Otherwise it had far too much weight on the minimum
  compatible GIMP version text and people were wondering what it meant.
  We should not tell people what the checkbox cannot do (it cannot
  improve compatibility in some cases), only what it can do (it can
  improve compatibility in other cases).
* Update the feature list real-time when checking the compression box
  (making it even more obvious that tile compression may have a say in
  compatibility).
* Metadata info is still added on the GIMP version label as it does not
  limit compatibility of the XCF file itself.

(cherry picked from commit 573d817539)
2018-09-11 15:56:15 +02:00
Ell
0fcf02a7c6 app, tools: add "running" thread attribute to GimpBacktrace/performance-log
The "running" attribute (readable through
gimp_backtrace_is_thread_running(), and recorded in the performance
log) specifies if the thread was in a running or suspended state at
the time the backtrace was taken.  It is accurate on Linux, but
only approximated on Windows.

Adapt the performance-log-expand.py tool to maintain this attribute
(and any future thread attributes we might add).

(cherry picked from commit 78adb7c900)
2018-09-03 18:30:34 -04:00
Ell
21f708a297 app: add source-location information to GimpBacktrace
Add source filename and line number fields to the
GimpBacktraceAddressInfo struct, populated through
gimp_backtrace_get_address_info().  This is not currently supported
by the Linux backend, but is supported by the Windows backend,
which we'll be added in the next commit.

(cherry picked from commit a6ec857123)
2018-09-03 15:58:01 -04:00
Ell
06a22a9cf8 app: more GimpBacktrace tidying
... in preparation for the Windows backend.

(cherry picked from commit 422f6a55e4)
2018-09-03 15:58:01 -04:00
Ell
14c3c33f1b app: rename gimp_backtrace_get_symbol_info() to ..._get_address_info()
This function returns information about the given address, which
is currently mostly limited to the corresponding symbol
information, but we might want to add address-specific information
in the future, such as a line number.

(cherry picked from commit 7ac87dc01e)
2018-09-02 13:26:09 -04:00
Ell
28ad1d0eba app: add standard highlight colors to gimphighlightablebutton.h
We're currently only using GimpHighlightableButton in the layers
dialog, which defines its own set of highlight colors.  We're going
to use highlightable buttons in the dashboard too, so let's move
the highlight colors to gimphighlightablebutton.h, and give them
standard names.  We currently define
GIMP_HIGHLIGHTABLE_BUTTON_COLOR_AFFIRMATIVE (green), and
GIMP_HIGHLIGHTABLE_BUTTON_COLOR_NEGATIVE (red).

(This commit was accidentally dropped from the gimp-2-10 branch; it
should have gone before 40ac4f7bc0f43aee24dc7ae1cf674d1a59612f55.)
2018-09-02 03:37:23 -04:00
Ell
40ac4f7bc0 app, icons, menus: add performance-log recording to the dashboard
Add an option to record a performance log through the dashboard.
The log contains a series of samples of the dashboard variables, as
well as the full program backtrace, when available.  As such, it
essentially acts as a built-in profiler, which allows us to
correlate program execution with the information available through
the dashboard.  It is meant to be used for creating logs to
accompany perofrmance-related bug reports, as well as for profiling
GIMP during development.

The sample frequency defaults to 10 samples per second, but can be
overridden using the GIMP_PERFORMANCE_LOG_SAMPLE_FREQUENCY
environment variable.  Backtraces are included by default when
available, but can be suppressed using the
GIMP_PERFORMANCE_LOG_NO_BACKTRACE environment variable.

Logs are created through the new "record" button at the bottom of
the dashboard dialog.  When pressed, a file dialog is opened to
select the log file, and, once confirmed, data is being recorded to
the selected file.  Recording is stopped by pressing the "record"
button again (we use a highlight to indicate that recording is
active.)

While recording, the "reset" button is replaced with an "add marker"
button, which can be used to add event markers to the log.  These
can be used to mark events of interest, such as "started painting"
and "stopped painting", which then appear in the log as part of the
sample stream.  Markers are numbered sequentually, and the number
of the next (to-be-added) marker appears on the button.  Shift-
clicking the button adds an empty (description-less) marker, which
is only identified by its number; this can be used when markers
need to be added quickly.

The log is an XML file, containing some extra information (such as
the output of "$ gimp -v", and symbol information) in addition to
the samples.  The data in the file is delta-encoded to reduce the
file size, meaning that samples (as well as some other elements)
only specify the changes since the previous sample.  This adds a
necessary decoding step before data can be processed; the next
commit adds a tool that does that.

There are currently no tools to actually analyze the data -- that's
still TBD -- but at least we can start gathering it.
2018-09-02 03:26:11 -04:00
Ell
a2f1efc201 app: use gimp_gtk_container_clear() in GimpDashboard
... instead of doing the same thing ourselves.
2018-08-30 23:49:37 -04:00
Ell
d015c3d632 app: fix dashboard swap read-throughput desc.; add translator comment
(cherry picked from commit d210199da5)
2018-08-26 15:14:17 -04:00
Ell
fba9de69ee app: add gimp_gtk_container_clear()
... which removes all non-internal children of a GtkContainer.

(cherry picked from commit fd64aae47b)
2018-08-20 14:42:20 -04:00
Michael Natterer
7d9f79427f app: make GimpDeviceInfo more rubust against broken device listings
gimp_device_info_set_device(): don't just bail out if a device with
the same name is added again, instead, simply continue and overwrite
the info's old device with the new one.

NOTE that this only happens if something is wrong on the USB or udev
or libinput or whatever side and the same device is present multiple
times. The only "safe" thing is to assume that devices listed earlier
are dead and dangling entities and that the last registered device is
the one actually delivering events.

(cherry picked from commit 717c183a3e)
2018-08-20 20:06:36 +02:00
Ell
fddf34dc87 app: show swap read/write throughput in the dashboard
Show the read/write throughput of swap data in the corresponding
swap-group fields.

(cherry picked from commit 5446163e1d)
2018-08-19 17:40:05 -04:00
Ell
fa9b231679 app: add "queued" field to the dashboard swap group
... which reports the amount of data queued for writing to the
swap (see GEGL commit 64021786ee067cf66c038622719acc590e6341db.)
When the swap queue is full, a yellow color underlay is shown in
the history graph.

(cherry picked from commit cd54457d46)
2018-08-19 17:38:54 -04:00
Ell
3ae8ff5c74 app: add "compression" field to the swap dashboard group
The "compression" field reports the ratio between the total size of
the data in the swap, and the total size the data would have had if
all tiles in the swap occupied a unique data block.

See GEGL commit 185f4450f2a51690b39112973c61f894c1ec3e41.

(cherry picked from commit b6e552a74b)
2018-08-19 17:38:54 -04:00
Ell
7ed34fd920 app: show horizontal scrollbar in dashboard when necessary
(cherry picked from commit 8313a40fb5)
2018-08-19 03:38:23 -04:00
Ell
e10d5852c1 app: add gegl:long-shadow to the menus
(cherry picked from commit 537bf4ec6a)
2018-08-09 19:03:06 -04:00
Jehan
0bf695dc0f Issue #1974: and again another memory leak.
Thanks to Massimo for reporting all these!

(cherry picked from commit b3c9089ea2)
2018-08-05 11:49:09 +02:00
Jehan
51e5da1f93 Issue #1974: another memory leak when saving a file.
(cherry picked from commit 50221e1438)
2018-08-05 11:49:09 +02:00
ONO Yoshio
e2958714d9 MR !19: Add support for vertical text writing.
Squashed commit of the following:

commit ee1ff7d502658cfa1248a13a3f0348495db07eda
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sun Jul 29 00:31:47 2018 +0900

    Fixed that gimp-text-dir-ttb-* icons are lacked in Symbolic.

commit d87d012d697628da28fe90199cc04b95b72ba8ef
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 16:23:10 2018 +0900

    Fix a typo.

commit cf0238bf7df56c384cdf3b7ec69557d14740f853
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 15:50:57 2018 +0900

    Fixed seg fault error.

commit b07f60d06fa1a753fda5b4d46af01698c344154e
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Fri Jul 27 17:15:34 2018 +0900

    Add support for vertical text writing.

    https://gitlab.gnome.org/GNOME/gimp/issues/641

(cherry picked from commit 587d9bbb03)
2018-07-30 23:10:11 +02:00
Jehan
d403f3313a app: show relevant files only by default.
Just like it was until now, the default filtering should not be all
files, but only relevant files (i.e. XCF when saving, exportable images
when exporting and loadable images/XCF when opening).
Now all files will only be available through the "Show All Files"
checkbox.

This is simpler than previous implementations where the list was
proposing "All Files", "All Images" and "All XCF/export images". That is
just too much.

With this default, I get the "All Files" checkbox out of the expander so
that it is visible immediately even when the format list is unexpanded
(you don't want people to get pissed when not finding how to display all
their files).

(cherry picked from commit 6b4b3bad13)
2018-07-25 17:07:54 +02:00
Jehan
ed5432d58f Issue #1160: file dialog view filter getting confused with file...
... format selection.
Second step: add a "Show All Files" checkbox so that one can still
prevent view filtering even when forcing a load format.
This is useful when loading files with unusual extensions, for instance.

(cherry picked from commit 6369445874)
2018-07-25 16:12:19 +02:00
Jehan
88d126c31a Issue #1160: file dialog view filter getting confused with file...
... format selection.
As discussed, the first step is to get rid of the filter list. Our extra
widget now has both roles of filtering the file list and forcing a
loading procedure.

(cherry picked from commit 9ae7827f9b)
2018-07-25 15:39:41 +02:00
Ell
49ce2422f9 app: in GimpDial, add "clockwise-angles" property ...
... and rename "clockwise" to "clockwise-delta"

Add a boolean "clockwise-angles" property to GimpDial, which, when
set, causes the dial legs' angles to be measured clockwise, rather
than counter-clockwise.  The property is FALSE by default.

Rename the "clockwise" property, which controls the direction of
the measured delta between the two angles, to "clockwise-delta", to
avoid confusion, and adapt the rest of the code.

(cherry picked from commit 0c477564ad)
2018-07-24 02:26:59 -04:00
Ell
ed8f80bf4b app: fix dynamics editor "fade" curve color
In the dynamics editor, use the neutral curve color, which depends
on the current theme, for the "fade" curve, instead of hard-coding
it to dark gray, which is hardly visible with dark themes.

(cherry picked from commit b2a9bb4688)
2018-07-17 09:18:41 -04:00
Michael Natterer
88db1f8282 Issue #1805 - Sample Points keep resetting themselves to "Pixel"
Remember the sample point's GimpColorPickMode in the sample point
itself, so it is remembered across switching between images.

Not persistent in the XCF yet tho...

(cherry picked from commit a0129504c8)
2018-07-16 00:46:38 +02:00
Michael Natterer
6e86e2233e app: move GimpColorFrameMode to the core and name it GimpColorPickMode
(cherry picked from commit f676f2aa79)
2018-07-15 23:29:41 +02:00
Michael Natterer
a90619ff00 app: rename enum GimpColorPickMode to GimpColorPickTarget
This is just some preparation for fixing issue #1805, but actually
"target" is a much better name so I went the full way and also changed
GUI labels and the color picker tool options config property
accordingly.

If anyone notices at all, how horrible is it to lose your saved pick
target...

(cherry picked from commit b140b283dc)
2018-07-15 14:39:03 +02:00
Michael Natterer
9e71fc0983 Change a bazillion URLs to https://
Including all user-visible link and links called from code, like
the help pages.

(cherry picked from commit bab75b7365)
2018-07-14 14:23:42 +02:00
Ell
dadfced2af app: don't process updates when clearing container-tree-view context
In GimpContainerTreeView, don't process updates in response to a
selection-change if the selection is empty (for the reason this is
necessary in the first place (though not in this particular case),
see commit f9a71fb6de5a2e65e0d88c6b7aaa39f589d6cdc4.)  When
clearing the container-view's context, we deselect all items after
setting the context to NULL, in which case
gimp_view_renderer_draw() warns, breaking one of our tests.
2018-07-12 10:59:32 -04:00
Michael Natterer
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
Michael Natterer
cc20410e80 app, libgimp*: make user visible color model labels consistent
- "LCh" intead of "LCH"
- "CIE LCh" instead of "CIELCh"
- "HSV Hue" instead of "Hue (HSV)" for all models/components

(cherry picked from commit 926dc070ef)
2018-07-08 16:21:23 +02:00