Commit Graph

5337 Commits

Author SHA1 Message Date
6829274dde app: add a comment and some newlines before the debug data section.
The markdown triple-quote (```) has to be on its own at the start of a
newline. Schumaml was telling me that too many reporters would paste
just after some text, which would therefore break the markdown syntax.

Instead let's add 3 newlines before the triple-quote, so that even
people who would not hit the "Copy Bug Information" button (but instead
select and copy) have a hint that these newlines are made on purpose.
Also add a comment (which is discarded by Gitlab) to make this even more
obvious.

Then even when pasting just after some text on the same line, the
triple-quote will end up on its own line.

(cherry picked from commit d3105e5c72)
2021-07-05 16:45:52 +02:00
26baa0527d app: check if an item was already inserted by actually looking it up in…
… the container.

There was this weird case which we somehow could only reproduce on
Aryeom's computer/build, not mine, with the same code and reproduction
steps (reproducible at will on her build only). Basically when drag'n
dropping a duplicated layer inside a collapsed layer group, the
row-expanded handler would try to select the moved layer before it is
actually inserted. This would end up into crash-happy code.

I'm still unsure of why the order of operation is different here, but
anyway what is for sure is that the `inserting_item` boolean flag was
not protecting much. It's not like it's an actual mutex and anyway this
is not multi-threaded code either so this flag was mostly useless (which
is why we were crashing). Instead let's actually look if the item is in
the container or not.
2021-07-05 10:41:52 +02:00
f3c21c7e6e Issue #6850: support for memory in the dashboard under OpenBSD.
(cherry picked from commit 6dc98fe7f0)
2021-05-09 20:02:56 +02:00
b93dd4e0fe Revert "app: append insensitive reason to GimpAction proxy tooltip."
This reverts commit bf9a292723.

I messed up copying the commit to cherry pick.
2021-04-23 15:07:55 -04:00
bf9a292723 app: append insensitive reason to GimpAction proxy tooltip.
With my previous commit, I improved the search action display and search
algorithm (which was returning wrong results), but we had lost showing
the non-sensitive reason in menu item tooltips. This fixes it, by
actually appending the reason, but only in the end, on the GtkWidget
tooltip (not in the action's tooltip itself).

(cherry picked from commit 13a02aea23)
2021-04-23 15:02:12 -04:00
59bab76383 app: fix 3d transform tool not added to gimphelp-ids.h
(cherry picked from commit 4aaad4f749)
2021-04-09 18:04:49 -04:00
4ea7fb6f4f app: proper ellipsis & wrap on Image Properties label where it matters.
The color space label may be a bit long (depends on profile title which
may just be anything and we don't control it), so I allow it to wrap.

The file path on the other hand would not work well with wrapping. It
already has ellipsis in center, but GTK always gives the max size it can
as a default. So if the file is even just slightly deep in the file
tree, we end up with extra-wide Image Properties dialog.
My trick is to give a sensible max size at dialog creation (25
characters max) but to disable this max size as soon as the window gets
realized, hence allowing the label to actually grow up to the contents
actual max size, were one to manually resize the window.

(cherry picked from commit 377de0a65b)
2020-11-12 11:56:20 +01:00
18fa6d3a2f app: display profile name in "Color space" field of Image Properties.
"RGB color" is not a color space, only the model. To get full color
space information, we want to display the model and associated profile
name.
Of course, the "Image Properties" dialog also has a tab displaying
details about the color profile. Still it's better if the general info
displays not too wrong label contents.

Note: when the used color profile has no name, it will show "(unnamed
profile)" which is still more informative than just the color model.

(cherry picked from commit b9ab461977)
2020-11-12 01:02:56 +01:00
Ell
05341fada3 app: avoid dropping motion events in spin-scales
It looks like GDK motion hints are broken, at least on X, causing
us to drop motion events in GimpSpinScale, if the motion triggers
an operation that blocks the main thread for a significant amount
of time, such as projection invalidation.

Instead, disable motion hints for spin-scales, and use an idle to
perform ad-hoc motion compression.
2020-08-24 12:33:53 +03:00
Ell
638e05494a app: allow recording GLIB log messages in performance logs
Add a new "Messages" boolean parameter to performance logs, which,
when set, records GLIB log messages in the performance log as
markers, with an accompanying sample capturing their backtrace.
This option is enabled by default.

(cherry picked from commit 9e0fdc8e2c)
2020-08-02 11:08:46 +03:00
Ell
38b1298c2d app: in GimpDashboard, fix progressive-performance-log env-var
(cherry picked from commit d11cbbbbc9)
2020-07-30 01:14:42 +03:00
Ell
60ca611096 app: add progressive performance logs
Add an option to record progressive performance logs.  Progressive
logs contain complete information after each recorded sample, by
writing partial address maps at each sample, containing all new
addresses introduced by the sample.  Furthermore, when recording a
progressive log, the output stream is flushed after each sample.

This allows recording complete logs even in cases where they can't
be properly terminated, such as when GIMP crashes or freezes in the
middle of the log.

Progressive logs are disabled by default, since they potentially
increase the sampling cost.  They can be enabled through a toggle
in the log file-dialog, or through the
GIMP_PERFORMANCE_LOG_PROGRESSIVE environment varaible.

(cherry picked from commit 146c234350)
2020-07-30 01:06:55 +03:00
Ell
7e21f79270 app: allow controlling performance-log parameters through the UI
When recording a performance log, allow setting the log parametrs
through the file dialog.  Currently, this includes the sample
frequency, and the option to include backtraces.

These options are still controllable through the
GIMP_PERFORMANCE_LOG_SAMPLE_FREQUENCY and
GIMP_PERFORMANCE_LOG_BACKTRACE environment variables.  When set,
the variables override the values entered through the UI.

(cherry picked from commit 126002c5c9)
2020-07-30 01:06:54 +03:00
Ell
3212da715b app: increase idle priority for hiding on-hover tool-group menu
In GimpToolButton, when in "show menu on hover" mode, increase the
idle priority for hiding the the tool-group menu upon button/menu
leave-notify.  Make the priority one step below the normal event
priority, so that a subsequent button/menu enter-notify event
canceling the idle is processed beforehand, while the idle is
otherwise still processed before ordinary lower-priority sources,
in particular, before projection rendering timeouts.
2020-06-28 12:12:36 +03:00
Ell
00145da370 Issue #5226 - hover over toolgroup not working
In gimp_tool_button_enter_notify(), only mask-in the mouse-button
state for determining whether to show the tool-group menu.  This
avoids other bits of state -- in particular, certain keyboard
locks, including keyboard-layout state -- from preventing the menu
from showing.
2020-06-16 13:12:34 +03:00
0087167cb3 Misc. typos
Found via `codespell`

(cherry picked from commit ac282f2045)
2020-06-10 02:09:26 +02:00
4c08173025 app: make a tooltip translatable and translate device axis strings.
Thanks to Cristian Secară on the developer mailing list to notice them.

(cherry picked from commit 5302beb947)
2020-06-09 11:04:36 +02:00
Ell
8da94a5751 app, menus: add gegl:lens-blur to Filters -> Blur
gegl:lens-blur simulates an out-of-focus lens blur.
(cherry picked from commit 323355a708)
2020-06-02 23:29:12 +03:00
Ell
69b0d86713 app: add gimp_prop_range_set_ui_limits()
... which sets the limits of the range-widget's handle-bar
explicitly, instead of using the lower/upper properties' limits.

(cherry picked from commit ce8235e977)
2020-06-02 23:29:11 +03:00
Ell
e5916c81cc app: allow setting handle-bar limits explicitly
In GimpHandleBar, add gimp_handle_bar_{set,unset,get}_limits(), to
allow settings the handle-bar limits explicitly, rather than
inheriting the adjustment limits.

(cherry picked from commit fa5dd99559)
2020-06-02 23:29:11 +03:00
Ell
0c65fce18c app: add gimp_prop_range_new()
... which creates a widget controlling a pair of lower/upper range-
limit properties, comprised of a handle-bar and two spin-buttons.

If the "sorted" parameter is TRUE, the "lower" property is bounded
above by the "upper" property, and vice versa.

(cherry picked from commit e03b8e597b)
2020-06-02 23:29:11 +03:00
Ell
a974e71702 app: add gimp_gtk_adjustment_chain()
... which takes a pair of GtkAdjustments, and binds the value of
the first to the lower-limit of the second, and the value of the
second to the upper-limit of the first.

(cherry picked from commit 45e5c2231a)
2020-06-02 23:29:10 +03:00
Ell
4c924c1cb8 app: in gimp_accel_label_set_action(), emit notify
(cherry picked from commit 0ac2aa5130)
2020-06-02 11:03:29 +03:00
Ell
35d6d9e529 app: list all tool-group tools in tool-button tooltip
In tool-group GimpToolButton tooltips, in addition to showing the
description of the currently-active tool, list the other tools in
the group as well, to improve discoverability.

(cherry picked from commit 4d83c7a3fc)
2020-06-01 19:30:54 +03:00
Ell
a54704bcdc app: add GimpAccelLabel
Add a new GimpAccelLabel widget, which shows an accelerator label
for a given GimpAction.  Unlike GtkAccelLabel, GimpAccelLabel
doesn't show a user-provided label in addition to that.

Note that the size request of GtkAccelLabel doesn't include the
accelerator part, which is desirable in some contexts.
GimpAccelLabel doesn't suffer from that.

(cherry picked from commit 2259ad5fcc)
2020-06-01 19:30:09 +03:00
Ell
3e61ef9ae6 app: fix alignment of generic pixel buffers
Wherever we store arbitrary-format colors in an opaque buffer, use
double for the buffer, instead of char, so that it has a strict-
enough alignment to handle all our used pixel formats.

(cherry picked from commit a90f59d961)
2020-05-20 08:54:31 +03:00
Ell
b5353eb2eb app: in GimpPanedBox, don't accept drag contexts with unsupported targets
... to avoid highlighting the droppable areas during darg.

(cherry picked from commit e38010b2d1)
2020-05-18 18:19:47 +03:00
Ell
3bc1d6a31a app: add gegl:focus-blur to Filters -> Blur
gegl:focus-blur blurs the image around a focal point.  It can be
used to create fake depth-of-field effects.

Add a prop-gui constructor which uses a FOCUS controller to control
the focus geometry.

(cherry picked from commit 60d4d25b93)
2020-05-15 00:50:01 +03:00
Ell
8e96c6c1b2 app, menus: add gegl:variable-blur to Filters -> Blur
gegl:variable-blur applies a blur with a per-pixel radius
controlled by a mask.

(cherry picked from commit 721f2d8c27)
2020-05-15 00:49:57 +03:00
f274b139fc Issue #3533 - Tool preset doesn't restore opacity and paint mode
There is no non-hackish way of fixing this without adding a new
"use-opacity-paint-mode" property to GimpToolPreset and a new toggle
in GimpToolPresetEditor. Restoring opacity and paint mode can now be
controlled explicitly, and defaults to TRUE.

(cherry picked from commit 97b714d428)
2020-05-12 21:14:41 +02:00
ef217108a6 app: clear the clipboard after storing its contents, upon quitting.
If we don't do this, the clipboard owner doesn't get unreffed (also the
GtkClipboardClearFunc is not called either, but we don't set any so this
was not a big problem).

The main consequence was that copying was setting the Gimp object as an
owner, which kept a reference and prevent its finalize() method to run,
hence was leaking data (and in particular some GEGL buffers for
clipboard operations, which was how the issue became more visible upon
exit).

(cherry picked from commit fca6371e29)
2020-05-06 19:25:25 +02:00
92e07ed6a2 app: don't leak event_blurb in gimp_controller_editor_edit_clicked()
(cherry picked from commit be8be1cb27)
2020-04-28 00:03:07 +02:00
2335d5590d app: fix cast bug.
When building (at least on 32-bit), fixes this warning:
> app/widgets/gimpdashboard.c:3840:58: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Unsigned long long is specified in the C99 standard to be at least
64-bit. So it's normal that the compiler complains, as a cast from
unsigned long long to a pointer has chances to go very wrong.
Yet gimp_backtrace_get_frame_address() actually returns a guintptr which
is type-compatible with gpointer so let's not give the compiler false
information and just use this type. Then cast it to unsigned long long
just for printing to dashboard log.

(cherry picked from commit 8caef4ea0b)
2020-04-20 01:37:35 +02:00
d059b7c9a3 app: cleanup previous commit from !31.
Instead of waiting forever for minor trailing whitespace cleanup, I
merged the patches and do a separate commit.
2020-04-13 16:49:34 +02:00
cc6e21e05b app: add color index label to the palette editor. 2020-04-13 14:26:13 +00:00
Ell
1b3c945488 app: don't grab keyboard focus when showing tool-button menu on hover
In GimpToolButton, don't let the group menu grab the keyboard focus
when showing it on hover.  This avoids accidentally reassigning the
keyboard shortcut of the selected tool.
2020-04-11 12:38:21 +03:00
Ell
64603c2ce6 Issue #4895 - Crash when dragging a dockable dialog
Apparently, the "drag-begin" signal of dockbook tabs can be raised
multiple times when a drag begins (this seems to happen randomly,
and rarely -- possibly a GTK bug).  In
gimp_paned_box_drag_callback(), which gets called in response, make
sure not to leak the corresponding idle source in this case, which
can lead to a segfault if the widget is destroyed before the idle
is run.

(cherry picked from commit 6bae5d8cf7)
2020-04-03 20:05:49 +03:00
e0f3a9d834 app-tools, app: gimp-debug-tool crashing with NULL release_date.
The crash dialog was failing to be created when using the last version
of GIMP!

(cherry picked from commit d76c8e8cc3)
2020-04-01 15:08:35 +02:00
e3d83fb8e5 app: fix minor indentation bugs.
(cherry picked from commit dd705e21c0)
2020-04-01 15:08:35 +02:00
4d847c9f06 App gimptooleditor fix tooltip text
(cherry picked from commit 450ebd5e2b)
2020-03-31 02:37:45 +00:00
Ell
04d17b7829 app: add option to show tool-button menu on hover
Add a "Menu mode" option to the toolbox preferences, which controls
the menu behavior for tool-group buttons, and can be one of "Show
on click" (current behavior), "Show on hover" (show the menu when
hovering over the button), and "Show on hover in single column"
(behaves like "Show on hover" when the toolbox has a single column,
and "Show on click" otherwise) -- the latter is the default.

Note that "Show on hover" requires the ability to remove the menu
grab, which doesn't seem to work in GTK3, so this change is
restricted to 2.10 for now.
2020-03-26 13:31:55 +02:00
Ell
327b3fb772 app: in GimpToolButton, select active tool in menu
In a GimpToolButton representing a tool group, select the group's
active-tool item when showing the menu.

(cherry picked from commit 75435c8e6b)
2020-03-26 13:30:05 +02:00
Ell
b6a777cb9d app, menus: add gegl:bloom to Filters -> Light and Shadow
(cherry picked from commit 74b0d2ad14)
2020-03-23 21:31:57 +02:00
Ell
0e8b995ba0 app: apply spin-scale gamma to input, not output
In GimpSpinScale, apply the slider gamma to the input [min,max]
range, rather than the output [0,1] range, using an odd gamma
curve, in particular, so that we handle negative values correctly.

(cherry picked from commit 5678153797)
2020-03-22 13:30:30 +02:00
Ell
a787d61fbc app: rename GimpParallelRunAsyncFunc to GimpRunAsyncFunc
... and move it to core-type.h, in preparation for next commit.

(cherry picked from commit f25a8934fa)
2020-03-14 00:45:41 +02:00
Ell
38a9e80821 app: draw border around FG/BG-editor color areas
In GimpFgBgEditor, we currently use gtk_render_frame() in master,
and gtk_paint_shadow() in gimp-2-10, to draw a border around the
color FG/BG color areas.  However, the former is relatively
subtle, especially with dark themes, and the latter is a NOP with
the pixmap engine, which is what our built-in themes use.

Instead, draw the border ourselves as a pair of black and white
rectangles, similarly to Photoshop.

Move the entire color-frame drawing functionality to a separate
function, to avoid code duplication between the FG and BG frames.

(cherry picked from commit fb1c086097)
2020-02-22 17:16:54 +02:00
45ddce9352 app: forgot to localize a string.
Thanks to Piotr Drąg for noticing.

(cherry picked from commit b2c41bc1f9)
2020-02-07 00:14:10 +01:00
9aa0cd2a4f app: fix a segmentation fault crash.
gtk_widget_get_window() may return NULL. I had the case when opening
some menus in bottom of tool options (like the "Save|Restore Tool
Preset" menus). We must check this before doing anything with it.

(cherry picked from commit 0a28534a90)
2020-02-07 00:14:10 +01:00
f18d9f969d app: properly pass the last release version and date to gimp-debug-tool.
Previously we were only passing this information on the debug dialog
when debugging warnings and criticals. Now it will also have the
information for crashes, hence recommending people to update their GIMP
instead of reporting bugs on old versions.

(cherry picked from commit 5b664ecbec)
2020-02-07 00:14:10 +01:00
e9b87c8368 app: debug dialog will now advise to update when relevant.
Instead of making the focus on bug reporting, the debug dialog will now
make the focus on updating the application if it is found that one is
not using the last version.
Debug data (backtraces and co.) will still be available and copiable,
but under an expander, and bug report button won't be displayed (i.e.
data will still be available upon request but we don't push anymore
people to submit it directly if they are using old versions of GIMP).

Of course, if you are using the last version (or version check was not
possible), the dialog still stays the same.

(cherry picked from commit 2f379494a7)
2020-02-07 00:14:10 +01:00