The non-portal fallback method for launching a file manager to show the
file in its parent directory was incorrectly using the `ShowFolders`
method (open a folder) instead of `ShowItems` (open the parent directory
and show the file).
The `show_item` function (previously `show_folder`) had an unused
`callback` parameter; it has been removed and the type of the parameter
containing the GTask has been renamed and now uses the correct type
instead of gpointer to reduce the amount of casting required.
FixesGNOME/gtk#5842
In height-for-width and hscrollbar-policy = never, we can provide
the child with a proper for_size when measuring it. The same is true for
width-for-height and vscrollbar-policy = never.
This allows for accurately measuring the size of eg. wrapping labels.
When we start ignoring batches, we must do it everywhere,
or we may run into assertions. This was triggered by an
enormous text node tree produced by tests/rendernode-create.
If there is a value passed to GSK_RENDERER, display it in the window
title.
This is mostly so that when I show off screenshots, people know what
renderer I'm using.
Using gdk_texture_new_from_resource() is not valid here because we are
not sure if the given resource is valid.
Plus, the previous optimization is no longer relevant, because we are
not using gdk_pixbuf_new_from_resource() anymore - which was what this
optimization was about before it was ported to GdkTexture.
Test attached.
The filesystemmodel tracks changes and additions to child files
through G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED. This event will also
occur if the parent directory is changed. Since the parent directory
doesn't exist in the model, it creates a non-existent item.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4233
The actions document ended with a : where there used to be a period,
seemingly a bug in the conversion from XML. Replace that : with a
period, and remove another spurious : inserted during the conversion.
Strangely, the document's last sentence ended with a colon,
giving the impression there's missing text that should follow.
There is not.
Even more strange, it's _always_ ended with a colon,
ever since the file was converted from XML
(in commit 10cd539104).
BUT, the XML file it was converted _from_ ended that same sentence
with a period! I have no idea where the colon came from.
Make all length values from 0px to 8px available
as static values. This will help with cutting
down on the number of corner values (we have a
lot of 5px corners).
treelistmodel: Be safer during collapsing
See merge request GNOME/gtk!5875
(cherry picked from commit 29e7186829)
8766a6fa treelistmodel: Be safer during collapsing
3c76f3fb treelistmodel: Delay notifies from TreeListRow
The Expose events following a ConfigureNotify may arrive at
a time that we did not resize the surface yet, making these
expose events a no-op. Even though gsk/gtk take care of the
window content itself, this might lead to unrendered portions
of the window shadow.
This may be seen with GSK_RENDERER=cairo and GDK_BACKEND=x11,
attempting to tile a window (e.g. gtk4-demo) left or right.
The window will show black rectangles or other artifacts in
the window shadow areas that correspond to the newly painted
portions (as the window needs to expand vertically).
In order to fix this with a similar behavior to Wayland,
consider ourselves the whole surface invalidated after resize,
in order to ensure everything is painted from scratch.
(cherry-picked from commit 24302315fb)
Transition to the color that is in use instead.
Fixes crashes because currentColor is not an RGBA color and
therefor could not be queried later.
Fixes#5798
treelistmodel: Don't add items in reverse
Closes#5707
See merge request GNOME/gtk!5744
(cherry picked from commit c5a53f235a)
1718db14 treelistmodel: Don't add items in reverse
cd860beb Add a test for splicing treelistmodel