Benjamin Otte [Sun, 19 Mar 2023 04:04:51 +0000 (05:04 +0100)]
treelistmodel: Cache the item
This is a good idea to avoid reentrancy problems when any child model
(or potentially more than one child model) has started emitting
items-changed but the emission hasn't arrived in this model yet.
At tat point, we'd get_item() the wrong item from those models.
We want to avoid such cases of reentrancy.
Related: #5646
Benjamin Otte [Sun, 19 Mar 2023 04:07:17 +0000 (05:07 +0100)]
cssnode: Refer the correct previous item
We disconnect from old_previous, not from the new previous.
Related: #5646
Benjamin Otte [Fri, 17 Mar 2023 00:37:52 +0000 (00:37 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
Various fixes
Closes #5669
See merge request GNOME/gtk!5665
Benjamin Otte [Thu, 16 Mar 2023 23:50:13 +0000 (23:50 +0000)]
Merge branch 'gridview-filler-tile-fix' into 'main'
gridview: Fix condition for adding filler tiles
See merge request GNOME/gtk!5664
Benjamin Otte [Thu, 16 Mar 2023 22:36:00 +0000 (23:36 +0100)]
gldriver: Quick workaround for filter mismatch
We should really use texture views or samplers to handle this case for
shared textures, but this at least makes NEAREST not break.
Benjamin Otte [Thu, 16 Mar 2023 21:42:56 +0000 (22:42 +0100)]
listitem: Claim sequence when handling an event
See my rants on IRC for why we definitely need to claim gestures by
default in GTK5.
Fixes #5669
Алексей Шилин [Thu, 16 Mar 2023 21:21:09 +0000 (00:21 +0300)]
gridview: Fix condition for adding filler tiles
Code above ensures that i is always in [0, n_columns - 1] range, so
the condition was always true, which resulted in filler tile always
being added to the grid. As the result, an empty row appeared at the
end of the grid if the number of columns divided the number of items.
Only add filler tile if last row is not full, i.e. when i > 0.
Matthias Clasen [Thu, 16 Mar 2023 21:12:20 +0000 (21:12 +0000)]
Merge branch 'fix_next_accessible_sibling_after_refcounts' into 'main'
a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which decided whether we will use the overridden sibling on the context.
See merge request GNOME/gtk!5659
Matthias Clasen [Thu, 16 Mar 2023 21:07:29 +0000 (21:07 +0000)]
Merge branch 'label-file-links' into 'main'
label: Use GtkFileLauncher for file URI
Closes #5671
See merge request GNOME/gtk!5661
Benjamin Otte [Thu, 16 Mar 2023 20:59:17 +0000 (20:59 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
Various small fixes
Closes #5380
See merge request GNOME/gtk!5662
Benjamin Otte [Thu, 16 Mar 2023 20:27:35 +0000 (21:27 +0100)]
listview: Fix culling issues when using CSS padding
We were culling children based on the content box, but clipping via
overflow happens on the padding box, so we need to use that one instead.
Fixes issues with items not being visible / disappearing in Nautilus
when they are near the border.
Resolves #5380
Benjamin Otte [Wed, 15 Mar 2023 00:46:19 +0000 (01:46 +0100)]
rowstrides are gsize, not int
gdk-pixbuf got that wrong, don't repeat that mistake.
Benjamin Otte [Wed, 15 Mar 2023 00:45:48 +0000 (01:45 +0100)]
win32: Fix rowstride math
Matthias Clasen [Thu, 16 Mar 2023 20:06:49 +0000 (16:06 -0400)]
label: Use GtkFileLauncher for file URI
The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.
If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.
Same fix as
de3c1d0c73987225869908, for GtkLabel.
Fixes: #5671
Matthias Clasen [Thu, 16 Mar 2023 16:51:29 +0000 (16:51 +0000)]
Merge branch 'ebassi/issue-5671' into 'main'
linkbutton: Use GtkFileLauncher for file URI
Closes #5671
See merge request GNOME/gtk!5658
Lukáš Tyrychtr [Thu, 16 Mar 2023 16:15:08 +0000 (17:15 +0100)]
Always drop the reference of the ATContext
Lukáš Tyrychtr [Thu, 16 Mar 2023 14:16:32 +0000 (15:16 +0100)]
a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which
decided whether we will use the overridden sibling on the context.
Emmanuele Bassi [Thu, 16 Mar 2023 12:09:55 +0000 (12:09 +0000)]
linkbutton: Use GtkFileLauncher for file URI
The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.
If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.
Fixes: #5671
Guillaume Bernard [Thu, 16 Mar 2023 10:24:29 +0000 (10:24 +0000)]
Update French translation
(cherry picked from commit
904e6a03a54854601fac7470b757cf6c9213eafc)
Matthias Clasen [Thu, 16 Mar 2023 03:03:41 +0000 (03:03 +0000)]
Merge branch 'max-texture-size' into 'main'
gsk: Add a way to limit texture sizes
See merge request GNOME/gtk!5656
Benjamin Otte [Wed, 15 Mar 2023 23:36:44 +0000 (23:36 +0000)]
Merge branch 'drag-gl-wayland-hotspot-fix' into 'main'
wayland: Reset pending offset in GL path
See merge request GNOME/gtk!5657
Ivan Molodetskikh [Wed, 15 Mar 2023 23:11:40 +0000 (16:11 -0700)]
wayland: Reset pending offset in GL path
Otherwise GL surfaces that redraw without changing the hotspot have it
applied on top every frame and quickly slide away.
The cairo path and the X11 backend do not have this bug.
Ivan Molodetskikh [Wed, 15 Mar 2023 23:09:51 +0000 (16:09 -0700)]
testdndresize: Add non-resizing redrawing GL surface
The GL Wayland drag surface code path has a bug where it does not reset
the hotspot, so if a GL-backed draw surface redraws without resizing or
resetting the hotspot, it moves away. The next commit will fix that, but
this commit adds a test for that.
Matthias Clasen [Wed, 15 Mar 2023 21:50:01 +0000 (17:50 -0400)]
gsk: Use linear filtering for sliced textures
We use linear for unsliced textures, so we need
to do the same for sliced ones.
Matthias Clasen [Wed, 15 Mar 2023 19:45:01 +0000 (15:45 -0400)]
gsk: Fix texture slicing
We were just returning NULL for slices
here, which wasn't the intention.
Matthias Clasen [Wed, 15 Mar 2023 19:33:32 +0000 (15:33 -0400)]
gsk: Fix handling of large textures
When the texture is too large, actually
shrink the size to max_texture_size.
Matthias Clasen [Wed, 15 Mar 2023 18:31:45 +0000 (14:31 -0400)]
gsk: Add a way to limit texture sizes
Allow to set max texture size using the
GSK_MAX_TEXTURE_SIZE environment variable.
We only allow to lower the max (for obvious
reasons), and we don't allow values smaller
than 512 (since our atlases use that size).
Matthias Clasen [Wed, 15 Mar 2023 02:59:19 +0000 (02:59 +0000)]
Merge branch 'dragsurface-resize' into 'main'
Fix drag surfaces ignoring size updates on Wayland and X11
See merge request GNOME/gtk!5597
Ivan Molodetskikh [Tue, 7 Mar 2023 04:49:19 +0000 (20:49 -0800)]
x11/surface: Get current drag surface size with compute-size signal
Query and update size of drag surfaces, similarly to how it's done for
the Wayland backend in the previous commit.
Ivan Molodetskikh [Sun, 5 Mar 2023 18:18:56 +0000 (10:18 -0800)]
wayland/dragsurface: Get current size with compute-size signal
GdkDragSurface-backed widgets are not parented to an existing widget,
unlike popovers, and like toplevels. This means that there's nobody to
actively call gdk_drag_surface_present() to update the size, and
GdkDragSurface should do it on its own, just like GdkToplevel.
This commit implements this for the Wayland backend.
Ivan Molodetskikh [Sun, 5 Mar 2023 18:20:31 +0000 (10:20 -0800)]
dragicon: Handle compute-size
Compute our size when requested by the backend. This makes GtkDragIcons
actually recompute their size when it changes, instead of getting stuck
with the first size and potentially underallocating.
Ivan Molodetskikh [Sun, 5 Mar 2023 18:14:56 +0000 (10:14 -0800)]
dragsurface: Add compute-size signal
Similarly to GdkToplevel, GdkDragSurface's compute-size should be called
by backends to query the current surface size, and should be connected
to by widget implementations (like GtkDragIcon) to report the current
size.
GdkDragSurface-backed widgets are not parented to an existing widget,
unlike popovers, and like toplevels. This means that there's nobody to
actively call gdk_drag_surface_present() to update the size, and
GdkDragSurface should do it on its own, just like GdkToplevel.
Matthias Clasen [Wed, 8 Mar 2023 19:01:10 +0000 (14:01 -0500)]
Add GdkDragSurfaceSize
This helper type will be used in the next commit for a new compute-size
request on GdkDragSurface. It is analogous in spirit to GdkToplevelSize.
Matthias Clasen [Wed, 15 Mar 2023 02:32:37 +0000 (02:32 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gl: Print max texture size in debug output
See merge request GNOME/gtk!5654
Ivan Molodetskikh [Tue, 7 Mar 2023 04:19:31 +0000 (20:19 -0800)]
tests: Add resizing drag icon test
The test can verify that dynamic drag icon resizing and hotspot
adjustment work as intended.
Matthias Clasen [Wed, 15 Mar 2023 02:12:00 +0000 (22:12 -0400)]
gl: Print max texture size in debug output
This is useful information.
Matthias Clasen [Wed, 15 Mar 2023 01:24:18 +0000 (01:24 +0000)]
Merge branch 'add_visited_state' into 'main'
a11y: Add GTK_ACCESSIBLE_STATE_VISITED
See merge request GNOME/gtk!5616
Aleksandr Melman [Tue, 14 Mar 2023 20:47:29 +0000 (20:47 +0000)]
Update Russian translation
Matthias Clasen [Tue, 14 Mar 2023 19:22:28 +0000 (19:22 +0000)]
Merge branch 'drop-gslice' into 'main'
Drop gslice
See merge request GNOME/gtk!5634
Matthias Clasen [Fri, 3 Mar 2023 11:31:01 +0000 (06:31 -0500)]
inspector: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 12:09:40 +0000 (07:09 -0500)]
css: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:53:53 +0000 (06:53 -0500)]
tests: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:52:56 +0000 (06:52 -0500)]
testsuite: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:51:04 +0000 (06:51 -0500)]
modules: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 12:10:51 +0000 (07:10 -0500)]
gtk: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:48:49 +0000 (06:48 -0500)]
gsk: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:41:41 +0000 (06:41 -0500)]
gdk: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:33:36 +0000 (06:33 -0500)]
macos: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:31:58 +0000 (06:31 -0500)]
win32: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:28:46 +0000 (06:28 -0500)]
x11: Stop using g_slice
Matthias Clasen [Fri, 3 Mar 2023 11:24:58 +0000 (06:24 -0500)]
CODING-STYLE: Drop mention of g_slice
Matthias Clasen [Tue, 14 Mar 2023 18:54:54 +0000 (18:54 +0000)]
Merge branch 'wip/exalm/boxed-list' into 'main'
theme: Port .boxed-list style from libadwaita
See merge request GNOME/gtk!4806
Benjamin Otte [Tue, 14 Mar 2023 16:31:44 +0000 (16:31 +0000)]
Merge branch 'wip/hadess/children-left-msg' into 'main'
gtk: Fix "children left" warning with fatal warnings
See merge request GNOME/gtk!5652
Alexander Mikhaylenko [Thu, 9 Jun 2022 18:42:45 +0000 (22:42 +0400)]
theme: Port .boxed-list style from libadwaita
Consistently use it for boxed lists in inspector and gtk-demo.
Fixes issues like https://gitlab.gnome.org/GNOME/gtk/-/issues/3145
Bastien Nocera [Tue, 14 Mar 2023 15:00:47 +0000 (16:00 +0100)]
gtk: Fix "children left" warning with fatal warnings
When fatal warnings were turned on, the developer would never see which
widgets were left as children to the widget that triggered the warning as
those were printed in separate g_warning calls.
Print a single warning with all the info so runs with fatal warnings
aren't left without any info.
Matthias Clasen [Tue, 14 Mar 2023 15:33:20 +0000 (15:33 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Start 4.12 development
See merge request GNOME/gtk!5651
Matthias Clasen [Tue, 14 Mar 2023 12:21:35 +0000 (08:21 -0400)]
Start 4.12 development
Martin [Tue, 14 Mar 2023 12:43:31 +0000 (12:43 +0000)]
Update Slovenian translation
Matthias Clasen [Tue, 14 Mar 2023 12:16:30 +0000 (08:16 -0400)]
Post-release version bump
Matthias Clasen [Mon, 13 Mar 2023 14:58:58 +0000 (15:58 +0100)]
4.10.1
Daniel [Tue, 14 Mar 2023 11:43:00 +0000 (12:43 +0100)]
Updated Spanish translation
Matthias Clasen [Tue, 14 Mar 2023 05:30:17 +0000 (05:30 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gsk: Mark mask nodes as 'supports transforms'
See merge request GNOME/gtk!5650
Matthias Clasen [Mon, 13 Mar 2023 21:20:12 +0000 (22:20 +0100)]
css: Small speedups
Matthias Clasen [Mon, 13 Mar 2023 21:19:51 +0000 (22:19 +0100)]
icontheme: Silence a compiler warning
Matthias Clasen [Mon, 13 Mar 2023 17:20:02 +0000 (18:20 +0100)]
tests: Add more tests for texture scale nodes
Matthias Clasen [Mon, 13 Mar 2023 17:10:53 +0000 (18:10 +0100)]
gsk: Mark mask nodes as 'supports transforms'
Just like blur nodes, the renderer can handle
these without creating an extra offscreen.
Matthias Clasen [Tue, 14 Mar 2023 05:08:37 +0000 (05:08 +0000)]
Merge branch 'fix-texture-scale-rotation' into 'main'
gtk4-demo: Polish the image scaling demo
See merge request GNOME/gtk!5649
Benjamin Otte [Tue, 14 Mar 2023 05:03:13 +0000 (05:03 +0000)]
Merge branch 'bilelmoussaoui-main-patch-31679' into 'main'
GLTexture: Add GL_RGB format support
See merge request GNOME/gtk!5647
Matthias Clasen [Mon, 13 Mar 2023 16:59:04 +0000 (17:59 +0100)]
gsk: Fix rotated texture scale nodes
This was causing us to render rotated texture scale
nodes to an unclipped offscreen, bringing 'giant
intermediate texture' problems back.
Matthias Clasen [Mon, 13 Mar 2023 15:54:22 +0000 (16:54 +0100)]
gtk4-demo: Add a tooltip to image scaling
Show some information about the values.
Matthias Clasen [Mon, 13 Mar 2023 12:10:52 +0000 (13:10 +0100)]
gtk4-demo: Polish the image scaling demo
Make the scale binding bidirectional again, fix up
the ranges and the sensitivity of the actions, and
add a mark for the unscaled position.
Jürgen Benvenuti [Mon, 13 Mar 2023 18:30:32 +0000 (18:30 +0000)]
Update German translation
Bilal Elmoussaoui [Mon, 13 Mar 2023 13:59:17 +0000 (13:59 +0000)]
GLTexture: Add GL_RGB format support
Matthias Clasen [Mon, 13 Mar 2023 08:58:58 +0000 (08:58 +0000)]
Merge branch 'more-scaled-texture-fixes' into 'main'
Fix gtk_snapshot_append_scaled_texture
See merge request GNOME/gtk!5638
Matthias Clasen [Mon, 13 Mar 2023 07:55:52 +0000 (07:55 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gtk4-demo: Fix rotation handling in image scaling
See merge request GNOME/gtk!5643
Matthias Clasen [Mon, 13 Mar 2023 07:54:13 +0000 (08:54 +0100)]
gtk4-demo: Use gtk_snapshot_append_scaled_texture
Matthias Clasen [Fri, 10 Mar 2023 23:50:40 +0000 (00:50 +0100)]
Fix gtk_snapshot_append_scaled_texture
This was doing the wrong thing with transforms.
Matthias Clasen [Mon, 13 Mar 2023 07:38:58 +0000 (08:38 +0100)]
docs: Details about texture scale nodes
Add some more details about filtering, to
clarify things a bit.
Matthias Clasen [Mon, 13 Mar 2023 07:21:10 +0000 (08:21 +0100)]
gtk4-demo: Scale logarithmically in image scaling
Matthias Clasen [Mon, 13 Mar 2023 07:11:29 +0000 (08:11 +0100)]
gtk4-demo: Fix rotation handling in image scaling
We weren't sizing the widget correctly in rotated
cases.
Hugo Carvalho [Mon, 13 Mar 2023 00:06:26 +0000 (00:06 +0000)]
Update Portuguese translation
Fran Dieguez [Sun, 12 Mar 2023 23:19:49 +0000 (23:19 +0000)]
Update Galician translation
Aurimas Černius [Sun, 12 Mar 2023 20:01:39 +0000 (20:01 +0000)]
Update Lithuanian translation
Alexander Shopov [Sun, 12 Mar 2023 18:36:38 +0000 (18:36 +0000)]
Update Bulgarian translation
Ask Hjorth Larsen [Sun, 12 Mar 2023 15:24:18 +0000 (16:24 +0100)]
Updated Danish translation
Matthias Clasen [Sun, 12 Mar 2023 10:20:04 +0000 (10:20 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Add rotation to the scaling demo
Closes #5659
See merge request GNOME/gtk!5641
Asier Sarasua Garmendia [Sun, 12 Mar 2023 09:35:14 +0000 (09:35 +0000)]
Update Basque translation
Matthias Clasen [Sun, 12 Mar 2023 07:23:16 +0000 (08:23 +0100)]
columnview: Be more defensive
I am not sure how we can have no listitem here,
but better to be safe than sorry.
Fixes: #5659
Matthias Clasen [Sat, 11 Mar 2023 17:56:08 +0000 (18:56 +0100)]
gtk-demo: Add rotation to the scaling demo
Closing in on eog :)
Sabri Ünal [Sat, 11 Mar 2023 16:03:32 +0000 (16:03 +0000)]
Update Turkish translation
Anders Jonsson [Sat, 11 Mar 2023 15:47:38 +0000 (15:47 +0000)]
Update Swedish translation
Piotr Drąg [Sat, 11 Mar 2023 14:14:42 +0000 (15:14 +0100)]
Update Polish translation
Matthias Clasen [Sat, 11 Mar 2023 11:56:23 +0000 (11:56 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
inspector: Force a full redraw for debug nodes
See merge request GNOME/gtk!5640
Matthias Clasen [Sat, 11 Mar 2023 11:30:44 +0000 (12:30 +0100)]
inspector: Force a full redraw for debug nodes
Without this, debug nodes randomly are missing
in the tree, where we are reusing older render
nodes.
Matthias Clasen [Sat, 11 Mar 2023 10:21:13 +0000 (10:21 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
themes: Avoid ':' in custom target names
Closes #5280
See merge request GNOME/gtk!5639
Matthias Clasen [Sat, 11 Mar 2023 10:03:43 +0000 (11:03 +0100)]
themes: Avoid ':' in custom target names
For whatever reason, meson decides to use custom
target names in the file system, and on Windows,
the ':' is causing trouble here. So avoid it.
Fixes: #5280
Marek Černocký [Sat, 11 Mar 2023 08:52:49 +0000 (08:52 +0000)]
Update Czech translation
Ekaterine Papava [Sat, 11 Mar 2023 05:39:09 +0000 (05:39 +0000)]
Update Georgian translation
Benjamin Otte [Sat, 11 Mar 2023 00:26:18 +0000 (00:26 +0000)]
Merge branch 'wip/otte/rendernode-export' into 'main'
rendernode: Register SVG serializer
See merge request GNOME/gtk!5637
Balázs Úr [Fri, 10 Mar 2023 23:47:38 +0000 (23:47 +0000)]
Update Hungarian translation