Accepting request 1090971 from GNOME:Next
New upstream release OBS-URL: https://build.opensuse.org/request/show/1090971 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk4?expand=0&rev=138
This commit is contained in:
parent
abc5a7e794
commit
4197a00f55
118
966a2350.patch
118
966a2350.patch
@ -1,118 +0,0 @@
|
||||
From 966a23503a2e8bbb948270e06f3eb13ca4c06632 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Otte <otte@redhat.com>
|
||||
Date: Tue, 2 May 2023 19:48:54 +0200
|
||||
Subject: [PATCH] css: Don't transition to currentColor
|
||||
|
||||
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
|
||||
---
|
||||
gtk/gtkcssfiltervalue.c | 16 ++++++++--------
|
||||
gtk/gtkcssshadowvalue.c | 4 ++--
|
||||
gtk/gtkcssshadowvalueprivate.h | 2 +-
|
||||
3 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/gtk/gtkcssfiltervalue.c b/gtk/gtkcssfiltervalue.c
|
||||
index ed334979cb6..84f581121c5 100644
|
||||
--- a/gtk/gtkcssfiltervalue.c
|
||||
+++ b/gtk/gtkcssfiltervalue.c
|
||||
@@ -102,10 +102,10 @@ gtk_css_filter_clear (GtkCssFilter *filter)
|
||||
}
|
||||
|
||||
static void
|
||||
-gtk_css_filter_init_identity (GtkCssFilter *filter,
|
||||
- GtkCssFilterType type)
|
||||
+gtk_css_filter_init_identity (GtkCssFilter *filter,
|
||||
+ const GtkCssFilter *other)
|
||||
{
|
||||
- switch (type)
|
||||
+ switch (other->type)
|
||||
{
|
||||
case GTK_CSS_FILTER_BRIGHTNESS:
|
||||
filter->brightness.value = _gtk_css_number_value_new (1, GTK_CSS_NUMBER);
|
||||
@@ -135,7 +135,7 @@ gtk_css_filter_init_identity (GtkCssFilter *filter,
|
||||
filter->blur.value = _gtk_css_number_value_new (0, GTK_CSS_PX);
|
||||
break;
|
||||
case GTK_CSS_FILTER_DROP_SHADOW:
|
||||
- filter->drop_shadow.value = gtk_css_shadow_value_new_filter ();
|
||||
+ filter->drop_shadow.value = gtk_css_shadow_value_new_filter (other->drop_shadow.value);
|
||||
break;
|
||||
case GTK_CSS_FILTER_NONE:
|
||||
default:
|
||||
@@ -143,7 +143,7 @@ gtk_css_filter_init_identity (GtkCssFilter *filter,
|
||||
break;
|
||||
}
|
||||
|
||||
- filter->type = type;
|
||||
+ filter->type = other->type;
|
||||
}
|
||||
|
||||
#define R 0.2126
|
||||
@@ -466,7 +466,7 @@ gtk_css_value_filter_equal (const GtkCssValue *value1,
|
||||
{
|
||||
GtkCssFilter filter;
|
||||
|
||||
- gtk_css_filter_init_identity (&filter, larger->filters[i].type);
|
||||
+ gtk_css_filter_init_identity (&filter, &larger->filters[i]);
|
||||
|
||||
if (!gtk_css_filter_equal (&larger->filters[i], &filter))
|
||||
{
|
||||
@@ -590,7 +590,7 @@ gtk_css_value_filter_transition (GtkCssValue *start,
|
||||
{
|
||||
GtkCssFilter filter;
|
||||
|
||||
- gtk_css_filter_init_identity (&filter, start->filters[i].type);
|
||||
+ gtk_css_filter_init_identity (&filter, &start->filters[i]);
|
||||
gtk_css_filter_transition (&result->filters[i],
|
||||
&start->filters[i],
|
||||
&filter,
|
||||
@@ -602,7 +602,7 @@ gtk_css_value_filter_transition (GtkCssValue *start,
|
||||
{
|
||||
GtkCssFilter filter;
|
||||
|
||||
- gtk_css_filter_init_identity (&filter, end->filters[i].type);
|
||||
+ gtk_css_filter_init_identity (&filter, &end->filters[i]);
|
||||
gtk_css_filter_transition (&result->filters[i],
|
||||
&filter,
|
||||
&end->filters[i],
|
||||
diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c
|
||||
index 66029dbff44..fead476c00a 100644
|
||||
--- a/gtk/gtkcssshadowvalue.c
|
||||
+++ b/gtk/gtkcssshadowvalue.c
|
||||
@@ -331,7 +331,7 @@ gtk_css_shadow_value_new (ShadowValue *shadows,
|
||||
}
|
||||
|
||||
GtkCssValue *
|
||||
-gtk_css_shadow_value_new_filter (void)
|
||||
+gtk_css_shadow_value_new_filter (const GtkCssValue *other)
|
||||
{
|
||||
ShadowValue value;
|
||||
|
||||
@@ -340,7 +340,7 @@ gtk_css_shadow_value_new_filter (void)
|
||||
value.voffset = _gtk_css_number_value_new (0, GTK_CSS_NUMBER);
|
||||
value.radius = _gtk_css_number_value_new (0, GTK_CSS_NUMBER);
|
||||
value.spread = _gtk_css_number_value_new (0, GTK_CSS_NUMBER);
|
||||
- value.color = _gtk_css_color_value_new_current_color ();
|
||||
+ value.color = gtk_css_value_ref (other->shadows[0].color);
|
||||
|
||||
return gtk_css_shadow_value_new (&value, 1, TRUE);
|
||||
}
|
||||
diff --git a/gtk/gtkcssshadowvalueprivate.h b/gtk/gtkcssshadowvalueprivate.h
|
||||
index 21efac19080..a2cf97688b0 100644
|
||||
--- a/gtk/gtkcssshadowvalueprivate.h
|
||||
+++ b/gtk/gtkcssshadowvalueprivate.h
|
||||
@@ -35,7 +35,7 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GtkCssValue * gtk_css_shadow_value_new_none (void);
|
||||
-GtkCssValue * gtk_css_shadow_value_new_filter (void);
|
||||
+GtkCssValue * gtk_css_shadow_value_new_filter (const GtkCssValue *other);
|
||||
|
||||
GtkCssValue * gtk_css_shadow_value_parse (GtkCssParser *parser,
|
||||
gboolean box_shadow_mode);
|
||||
--
|
||||
GitLab
|
||||
|
@ -1,36 +0,0 @@
|
||||
From 099955b0c06dbddc9469bd3c8e63673a3a82883f Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Otte <otte@redhat.com>
|
||||
Date: Tue, 16 May 2023 18:08:21 +0200
|
||||
Subject: [PATCH] gridview: Add border-spacing where it was missed
|
||||
|
||||
We were computing column widths without taking border-spacing into
|
||||
account, making them slightly too big.
|
||||
---
|
||||
gtk/gtkgridview.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gtk/gtkgridview.c b/gtk/gtkgridview.c
|
||||
index 274f34c3c95..885826a138e 100644
|
||||
--- a/gtk/gtkgridview.c
|
||||
+++ b/gtk/gtkgridview.c
|
||||
@@ -657,7 +657,7 @@ gtk_grid_view_measure_list (GtkWidget *widget,
|
||||
gtk_grid_view_measure_column_size (self, &col_min, &col_nat);
|
||||
for_size = MAX (for_size, col_min * (int) self->min_columns);
|
||||
n_columns = gtk_grid_view_compute_n_columns (self, for_size, xspacing, col_min, col_nat);
|
||||
- column_size = for_size / n_columns;
|
||||
+ column_size = (for_size + xspacing) / n_columns - xspacing;
|
||||
|
||||
i = 0;
|
||||
row_height = 0;
|
||||
@@ -770,7 +770,7 @@ gtk_grid_view_size_allocate (GtkWidget *widget,
|
||||
orientation == GTK_ORIENTATION_VERTICAL ? width : height,
|
||||
xspacing,
|
||||
col_min, col_nat);
|
||||
- self->column_width = (orientation == GTK_ORIENTATION_VERTICAL ? width : height) / self->n_columns;
|
||||
+ self->column_width = ((orientation == GTK_ORIENTATION_VERTICAL ? width : height) + xspacing) / self->n_columns - xspacing;
|
||||
self->column_width = MAX (self->column_width, col_min);
|
||||
|
||||
/* step 2: determine height of known rows */
|
||||
--
|
||||
GitLab
|
||||
|
BIN
gtk-4.10.3.tar.xz
(Stored with Git LFS)
BIN
gtk-4.10.3.tar.xz
(Stored with Git LFS)
Binary file not shown.
3
gtk-4.10.4.tar.xz
Normal file
3
gtk-4.10.4.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7725400482e0685e28265e226c62847f4e73cfca9e9b416ac5838207f5377a24
|
||||
size 20526652
|
@ -1,100 +0,0 @@
|
||||
From 4f47683710bbb4b56c286c6ee6a5c394fcf2b755 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Wed, 29 Mar 2023 02:23:46 +0000
|
||||
Subject: [PATCH] Merge branch 'wip/otte/trelistmodel-fixage' into 'main'
|
||||
|
||||
treelistmodel: Don't add items in reverse
|
||||
|
||||
Closes #5707
|
||||
|
||||
See merge request GNOME/gtk!5744
|
||||
|
||||
(cherry picked from commit c5a53f235a2ed1b0acd0a8c29153e62377262d04)
|
||||
|
||||
1718db14 treelistmodel: Don't add items in reverse
|
||||
cd860beb Add a test for splicing treelistmodel
|
||||
---
|
||||
gtk/gtktreelistmodel.c | 2 +-
|
||||
testsuite/gtk/treelistmodel.c | 46 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 47 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c
|
||||
index dd3b3009ccc..1e55323c0a4 100644
|
||||
--- a/gtk/gtktreelistmodel.c
|
||||
+++ b/gtk/gtktreelistmodel.c
|
||||
@@ -357,7 +357,7 @@ gtk_tree_list_model_items_changed_cb (GListModel *model,
|
||||
}
|
||||
|
||||
tree_added = added;
|
||||
- for (i = 0; i < added; i++)
|
||||
+ for (i = added; i-- > 0;)
|
||||
{
|
||||
child = gtk_rb_tree_insert_before (node->children, child);
|
||||
child->parent = node;
|
||||
diff --git a/testsuite/gtk/treelistmodel.c b/testsuite/gtk/treelistmodel.c
|
||||
index 941ac3d306b..98493a3ba56 100644
|
||||
--- a/testsuite/gtk/treelistmodel.c
|
||||
+++ b/testsuite/gtk/treelistmodel.c
|
||||
@@ -261,6 +261,51 @@ test_remove_some (void)
|
||||
g_object_unref (tree);
|
||||
}
|
||||
|
||||
+static void
|
||||
+splice (GListStore *store,
|
||||
+ guint pos,
|
||||
+ guint removed,
|
||||
+ guint *numbers,
|
||||
+ guint added)
|
||||
+{
|
||||
+ GObject **objects = g_newa (GObject *, added);
|
||||
+ guint i;
|
||||
+
|
||||
+ for (i = 0; i < added; i++)
|
||||
+ {
|
||||
+ /* 0 cannot be differentiated from NULL, so don't use it */
|
||||
+ g_assert_cmpint (numbers[i], !=, 0);
|
||||
+ objects[i] = g_object_new (G_TYPE_OBJECT, NULL);
|
||||
+ g_object_set_qdata (objects[i], number_quark, GUINT_TO_POINTER (numbers[i]));
|
||||
+ }
|
||||
+
|
||||
+ g_list_store_splice (store, pos, removed, (gpointer *) objects, added);
|
||||
+
|
||||
+ for (i = 0; i < added; i++)
|
||||
+ g_object_unref (objects[i]);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+test_splice (void)
|
||||
+{
|
||||
+ GtkTreeListModel *tree = new_model (100, TRUE);
|
||||
+ gpointer item;
|
||||
+
|
||||
+ assert_model (tree, "100 100 100 99 98 97 96 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 70 70 69 68 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
|
||||
+ assert_changes (tree, "");
|
||||
+
|
||||
+ item = g_list_model_get_item (G_LIST_MODEL (tree), 1);
|
||||
+ g_assert_true (G_IS_LIST_MODEL (item));
|
||||
+ splice (item, 0, 5, (guint[5]) { 300, 301, 302, 303, 304 }, 5);
|
||||
+ /* expected */
|
||||
+ assert_model (tree, "100 100 300 301 302 303 304 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 70 70 69 68 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
|
||||
+ /* real outcome */
|
||||
+ // assert_model (tree, "100 100 304 303 302 301 300 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 70 70 69 68 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
|
||||
+ assert_changes (tree, "2-5+5");
|
||||
+
|
||||
+ g_object_unref (tree);
|
||||
+}
|
||||
+
|
||||
/* Test for https://gitlab.gnome.org/GNOME/gtk/-/issues/4595 */
|
||||
typedef struct _DemoNode DemoNode;
|
||||
|
||||
@@ -391,6 +436,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_test_add_func ("/treelistmodel/expand", test_expand);
|
||||
g_test_add_func ("/treelistmodel/remove_some", test_remove_some);
|
||||
+ g_test_add_func ("/treelistmodel/remove_splice", test_splice);
|
||||
g_test_add_func ("/treelistmodel/collapse-change", test_collapse_change);
|
||||
|
||||
return g_test_run ();
|
||||
--
|
||||
GitLab
|
||||
|
22
gtk4.changes
22
gtk4.changes
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 5 18:58:41 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Update to version 4.10.4:
|
||||
+ GtkFileChooser: Fix some memory leaks
|
||||
+ GtkUriLauncher: Validate the uri
|
||||
+ GtkStack: Fix a crash
|
||||
+ GtkGridView: Respect css border-spacing
|
||||
+ GtkScrolledWindow: Propagate child measure size whenever
|
||||
possible
|
||||
+ GtkPopoverMenu: Avoid unnecessary left padding
|
||||
+ GtkSearchEntry: Improve size allocation for the clear icon
|
||||
+ X11:
|
||||
- Avoid black flickering with xwayland window decorations
|
||||
- Trap XRandr errors
|
||||
+ CSS: Various fixes to transitions
|
||||
+ Updated translations.
|
||||
- Drop patches fixed upstream:
|
||||
+ fix-gridview.patch
|
||||
+ gtk4-correctly-refresh-after-delete.patch
|
||||
+ 966a2350.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 4 12:17:15 UTC 2023 - Paolo Stivanin <info@paolostivanin.com>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
%endif
|
||||
|
||||
Name: gtk4
|
||||
Version: 4.10.3
|
||||
Version: 4.10.4
|
||||
Release: 0
|
||||
Summary: The GTK+ toolkit library (version 4)
|
||||
License: LGPL-2.1-or-later
|
||||
@ -46,12 +46,6 @@ Source99: gtk4-rpmlintrc
|
||||
# https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4756
|
||||
# PATCH-FIX-OPENSUSE 0001-Revert-Meson-Simplify-pkgconfig-file-generator.patch -- Revert "Meson: Simplify pkgconfig file generator"
|
||||
Patch0: 0001-Revert-Meson-Simplify-pkgconfig-file-generator.patch
|
||||
# PATCH-FIX-UPSTREAM gtk4-correctly-refresh-after-delete.patch glgo#GNOME/nautilus#2941 badshah400@gmail.com -- Deleting files causes folders in the directory to disappear and reappear after a refresh
|
||||
Patch1: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5873.patch#/gtk4-correctly-refresh-after-delete.patch
|
||||
# PATCH-FIX-UPSTREAM 966a2350.patch glgo#GNOME/gtk#5798 -- css: Don't transition to currentColor
|
||||
Patch2: https://gitlab.gnome.org/GNOME/gtk/-/commit/966a2350.patch
|
||||
# PATCH-FIX-UPSTREAM fix-gridview.patch glgo#GNOME/nautilus#2980 -- Add border-spacing where it was missed
|
||||
Patch3: fix-gridview.patch
|
||||
|
||||
BuildRequires: cups-devel >= 2.0
|
||||
# We do not support building against cups 2.3 betas
|
||||
|
Loading…
Reference in New Issue
Block a user