Update to 4.10.1

This commit is contained in:
David King 2023-03-14 18:41:54 +00:00
parent db9491bf0d
commit 2e4ab1db03
5 changed files with 3 additions and 150 deletions

1
.gitignore vendored
View File

@ -41,3 +41,4 @@
/gtk-4.9.3.tar.xz
/gtk-4.9.4.tar.xz
/gtk-4.10.0.tar.xz
/gtk-4.10.1.tar.xz

View File

@ -1,85 +0,0 @@
From 442fa8d9723ff320993bd4a869c7ec1258c45218 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 9 Mar 2023 15:42:16 -0500
Subject: [PATCH] filerchooser: Show Recent files in inverse order
When looking at Recent files in the file chooser, it makes more
sense to show the recent files on top.
This commit flips the sort order for that case.
---
gtk/gtkfilechooserwidget.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 3a0dc6e41b..142daf6e2d 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -7083,60 +7083,64 @@ time_sort_func (gconstpointer a,
if (impl->operation_mode == OPERATION_MODE_RECENT)
{
time_a = (glong) g_file_info_get_attribute_uint64 ((GFileInfo *)a, G_FILE_ATTRIBUTE_TIME_ACCESS);
time_b = (glong) g_file_info_get_attribute_uint64 ((GFileInfo *)b, G_FILE_ATTRIBUTE_TIME_ACCESS);
}
else
{
time_a = (glong) g_file_info_get_attribute_uint64 ((GFileInfo *)a, G_FILE_ATTRIBUTE_TIME_MODIFIED);
time_b = (glong) g_file_info_get_attribute_uint64 ((GFileInfo *)b, G_FILE_ATTRIBUTE_TIME_MODIFIED);
}
if (time_a < time_b)
return GTK_ORDERING_SMALLER;
else if (time_a > time_b)
return GTK_ORDERING_LARGER;
else
return GTK_ORDERING_EQUAL;
}
static GtkOrdering
recent_sort_func (gconstpointer a,
gconstpointer b,
gpointer user_data)
{
GtkOrdering result;
result = time_sort_func (a, b, user_data);
+ /* Recent files should show most recently changed items first
+ */
+ result = -result;
+
if (result == GTK_ORDERING_EQUAL)
result = name_sort_func (a, b, user_data);
if (result == GTK_ORDERING_EQUAL)
result = location_sort_func (a, b, user_data);
return result;
}
static GtkOrdering
search_sort_func (gconstpointer a,
gconstpointer b,
gpointer user_data)
{
GtkOrdering result;
result = location_sort_func (a, b, user_data);
if (result == GTK_ORDERING_EQUAL)
result = name_sort_func (a, b, user_data);
if (result == GTK_ORDERING_EQUAL)
result = time_sort_func (a, b, user_data);
return result;
}
static char *
get_name (GFileInfo *info)
{
--
2.39.2

View File

@ -1,58 +0,0 @@
From 55faea104694599298a6ca1b9f2e7a1b46bad45a Mon Sep 17 00:00:00 2001
From: Ivan Molodetskikh <yalterz@gmail.com>
Date: Tue, 7 Mar 2023 09:51:32 -0800
Subject: [PATCH] combobox: Avoid extra queue_resize()
width-request already ensures it's above the minimum width, so avoid an
extra queue_resize() when setting size request to (-1, -1).
This is the same way as GtkDropDown works. This also unbreaks
GtkComboBox after the recent allocation fix in
75a417e33708dab2bdb2f784a8952e085a12bf03.
Incidentally, this also makes GtkComboBox actually resize its popup as
intended (that was broken before).
I don't think this is ultimately the final fix, sometimes I still get
allocation warnings. But the proper fix will probably involve changing
some more allocation machinery around popovers. This is good enough for
now.
---
gtk/deprecated/gtkcombobox.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/gtk/deprecated/gtkcombobox.c b/gtk/deprecated/gtkcombobox.c
index 618f0780b7..1e76b38f41 100644
--- a/gtk/deprecated/gtkcombobox.c
+++ b/gtk/deprecated/gtkcombobox.c
@@ -366,7 +366,6 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
{
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box);
- int menu_width;
gtk_widget_size_allocate (priv->box,
&(GtkAllocation) {
@@ -374,17 +373,8 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
width, height
}, baseline);
- gtk_widget_set_size_request (priv->popup_widget, -1, -1);
-
- if (priv->popup_fixed_width)
- gtk_widget_measure (priv->popup_widget, GTK_ORIENTATION_HORIZONTAL, -1,
- &menu_width, NULL, NULL, NULL);
- else
- gtk_widget_measure (priv->popup_widget, GTK_ORIENTATION_HORIZONTAL, -1,
- NULL, &menu_width, NULL, NULL);
-
- gtk_widget_set_size_request (priv->popup_widget,
- MAX (width, menu_width), -1);
+ gtk_widget_set_size_request (priv->popup_widget, width, -1);
+ gtk_widget_queue_resize (priv->popup_widget);
gtk_popover_present (GTK_POPOVER (priv->popup_widget));
}
--
GitLab

View File

@ -20,7 +20,7 @@ Version: 4.10.0
Release: %autorelease
Summary: GTK graphical user interface library
License: LGPLv2+
License: LGPL-2.0-or-later
URL: https://www.gtk.org
Source0: https://download.gnome.org/sources/gtk/4.10/gtk-%{version}.tar.xz
Source1: settings.ini
@ -29,11 +29,6 @@ Source1: settings.ini
# https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4756
Patch0: 0001-Revert-Meson-Simplify-pkgconfig-file-generator.patch
# https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5625
Patch1: 0001-filerchooser-Show-Recent-files-in-inverse-order.patch
# https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5608
Patch2: gtk4-4.10.0-combobox-allocation-fix.patch
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
BuildRequires: docbook-style-xsl

View File

@ -1 +1 @@
SHA512 (gtk-4.10.0.tar.xz) = 1283985ed64035e3b183cccc341dd38029112e8277065f8b39be56b4f489aaf03efc0ce5f9c36ddd746a776be3772f7606f1c54fd84292479d63d86b94281159
SHA512 (gtk-4.10.1.tar.xz) = 1fb04c7f5f3cb2f728c2048b0053efc3bef1be371d8e24648d9c3d5fb0404fd1e4fa31a511e02750290aec032253c6bade53651d1f32a3438c104130759ff074