1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-14 13:15:56 +02:00

gnu: gtk+: Update to 3.24.52.

* gnu/packages/patches/gtk3-treeview-test-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/gtk.scm (gtk+): Update to 3.24.52.  Apply patch.

Change-Id: Ibf49241f637ac1d5ed2c6f9675f78810c8acb265
Signed-off-by: Noé Lopez <noelopez@free.fr>
This commit is contained in:
Maxim Cournoyer
2026-03-24 10:43:05 +09:00
committed by Noé Lopez
parent ce8a71d961
commit bce6cffcb3
3 changed files with 89 additions and 22 deletions
+1
View File
@@ -1588,6 +1588,7 @@ dist_patch_DATA = \
%D%/packages/patches/gtk2-theme-paths.patch \
%D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \
%D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \
%D%/packages/patches/gtk3-treeview-test-fix.patch \
%D%/packages/patches/gtk-doc-respect-xml-catalog.patch \
%D%/packages/patches/gtk-doc-mkhtml-test-fix.patch \
%D%/packages/patches/gtk4-demo-reproducible.patch \
+21 -22
View File
@@ -24,7 +24,7 @@
;;; Copyright © 2019 Giacomo Leidi <therewasa@fishinthecalculator.me>
;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020-2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020-2026 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
@@ -987,7 +987,7 @@ application suites.")
(package
(inherit gtk+-2)
(name "gtk+")
(version "3.24.51")
(version "3.24.52")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -996,10 +996,11 @@ application suites.")
(file-name (git-file-name name version))
(sha256
(base32
"07vw0rani9d65px36fzzj7sprv5r48shyjdgzipkihzqaldd98yh"))
"197w1mb5vqm5d07sgdqkg54can7f1p4yjh42zx0y8z6m9p43shck"))
(patches (search-patches
"gtk3-respect-GUIX_GTK3_PATH.patch"
"gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
"gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"
"gtk3-treeview-test-fix.patch"))))
;; There is no "doc" output, because adding gtk-doc here would introduce a
;; dependency cycle with itself.
(outputs '("out" "bin"))
@@ -1075,22 +1076,20 @@ application suites.")
#~(modify-phases %standard-phases
(add-after 'unpack 'disable-failing-tests
(lambda _
;; These tests fail only in the containerized environment, for
;; unknown reasons.
(substitute* "testsuite/gtk/meson.build"
((".*\\['defaultvalue'],.*") "")
((".*\\['objects-finalize',.*") ""))
;; The 'flipping-icons.ui' and 'gtk-icontheme-sizing.ui' tests
;; fail for unknown reasons (see:
;; <https://gitlab.gnome.org/GNOME/gtk/-/issues/7679>).
(substitute* "testsuite/reftests/meson.build"
((" 'flipping-icons.ui',.*") "")
((" 'gtk-icontheme-sizing.ui',.*") ""))
;; This test fails just on i686-linux, for unknown reasons.
#$@(if (target-x86-32?)
#~((substitute* "testsuite/reftests/meson.build"
((" 'linear-gradient.ui',.*") "")))
#~())))
(substitute* "testsuite/gtk/meson.build"
((".*\\['defaultvalue'],.*") "")
((".*\\['objects-finalize',.*") ""))
;; The 'flipping-icons.ui' and 'gtk-icontheme-sizing.ui' tests
;; fail for unknown reasons (see:
;; <https://gitlab.gnome.org/GNOME/gtk/-/issues/7679>).
(substitute* "testsuite/reftests/meson.build"
((" 'flipping-icons.ui',.*") "")
((" 'gtk-icontheme-sizing.ui',.*") ""))
;; This test fails just on i686-linux, for unknown reasons.
#$@(if (target-x86-32?)
#~((substitute* "testsuite/reftests/meson.build"
((" 'linear-gradient.ui',.*") "")))
#~())))
(add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
(assoc-ref glib-or-gtk:%standard-phases
'generate-gdk-pixbuf-loaders-cache-file))
@@ -1114,8 +1113,8 @@ application suites.")
"/share/applications")))))))
(native-search-paths
(list (search-path-specification
(variable "GUIX_GTK3_PATH")
(files '("lib/gtk-3.0")))))))
(variable "GUIX_GTK3_PATH")
(files '("lib/gtk-3.0")))))))
(define-public gtk
(package
@@ -0,0 +1,67 @@
From 8fb3557bce1fdf9e2c4146e89b43753688d64455 Mon Sep 17 00:00:00 2001
From: Alessandro Astone <alessandro.astone@canonical.com>
Date: Mon, 23 Mar 2026 15:48:20 +0100
Subject: [PATCH] testsuite/a11y: Fixup treeview test after focus policy
changes
Since commit
fbc28541f0 ("a11y: Don't send focus-related events for unfocused treeview")
the window must have focus in order for the treeview to have focus and emit
the signal we want to test for.
Part-of: <https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/9716>
---
testsuite/a11y/tree-relationships.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/testsuite/a11y/tree-relationships.c b/testsuite/a11y/tree-relationships.c
index 34f45b690a5..a1cc1f38288 100644
--- a/testsuite/a11y/tree-relationships.c
+++ b/testsuite/a11y/tree-relationships.c
@@ -223,6 +223,24 @@ process_pending_idles ()
g_main_loop_run (loop);
}
+static void
+on_window_focus (GObject *obj,
+ GParamSpec *pspec,
+ gpointer data)
+{
+ GMainLoop *loop = data;
+ g_main_loop_quit (loop);
+}
+
+
+static void
+wait_window_focus (GtkWidget *window)
+{
+ GMainLoop *loop = g_main_loop_new (NULL, FALSE);
+ g_signal_connect (window, "notify::is-active", G_CALLBACK (on_window_focus), loop);
+ g_main_loop_run (loop);
+}
+
static void
test_a11y_tree_focus (void)
{
@@ -243,13 +261,15 @@ test_a11y_tree_focus (void)
window = builder_get_toplevel (builder);
g_assert (window);
- populate_tree (builder);
+ gtk_widget_show (window);
+ gtk_window_present (GTK_WINDOW (window));
+ wait_window_focus (window);
+ populate_tree (builder);
tv = (GtkTreeView *)gtk_builder_get_object (builder, "treeview1");
gtk_tree_view_expand_all (tv);
- gtk_widget_show (window);
-
+ gtk_widget_grab_focus (GTK_WIDGET (tv));
gtk_tree_view_get_cursor (tv, &path, &focus_column);
gtk_tree_path_down (path);
data.count = 0;
--
GitLab