Update to 3.99.0

This commit is contained in:
Kalev Lember 2023-06-19 22:41:44 +02:00
parent bc46990616
commit 1557b11c3c
4 changed files with 7 additions and 150 deletions

View File

@ -1,35 +0,0 @@
From b6d3ff07044e3e48cbaf66ed4ae0fc17e10a910e Mon Sep 17 00:00:00 2001
From: Logan Rathbone <poprocks@gmail.com>
Date: Mon, 8 May 2023 01:16:37 -0400
Subject: [PATCH 1/2] util: remove fatal assert on exit if window invalid
GtkWindow
See https://gitlab.gnome.org/GNOME/zenity/-/merge_requests/25#note_1738825
---
src/util.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/util.c b/src/util.c
index 8cfae934..85847df1 100644
--- a/src/util.c
+++ b/src/util.c
@@ -460,14 +460,10 @@ zenity_util_gapp_quit (GtkWindow *window, ZenityData *data)
if (data->exit_code != 0)
exit (data->exit_code);
- if (window)
- {
- g_assert (GTK_IS_WINDOW (window));
+ if (window && GTK_IS_WINDOW (window))
gtk_window_destroy (window);
- }
- else {
+ else
g_application_release (g_application_get_default ());
- }
}
int
--
2.40.1

View File

@ -1,104 +0,0 @@
From 93d4c88cea5167cc6d2bed8b85b7931399068d59 Mon Sep 17 00:00:00 2001
From: Logan Rathbone <poprocks@gmail.com>
Date: Mon, 8 May 2023 02:22:08 -0400
Subject: [PATCH 2/2] progress: Cleanup unnecessary static objects and remove
spurious builder unref
---
src/progress.c | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/src/progress.c b/src/progress.c
index adc75745..8e6e8951 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -40,16 +40,12 @@
static GtkBuilder *builder;
static ZenityData *zen_data;
-static GIOChannel *channel;
static int pulsate_timeout = -1;
static gboolean autokill;
static gboolean no_cancel;
static gboolean auto_close;
-gint zenity_progress_timeout (gpointer data);
-gint zenity_progress_pulsate_timeout (gpointer data);
-
static void zenity_progress_dialog_response (GtkWidget *widget, char *rstr, gpointer data);
static gboolean
@@ -147,13 +143,13 @@ stof (const char *s)
}
static gboolean
-zenity_progress_handle_stdin (GIOChannel *channel, GIOCondition condition,
+zenity_progress_handle_stdin (GIOChannel *source, GIOCondition condition,
gpointer data)
{
- static ZenityProgressData *progress_data;
- static GObject *progress_bar;
- static GObject *progress_label;
- static GtkWindow *parent;
+ ZenityProgressData *progress_data;
+ GObject *progress_bar;
+ GObject *progress_label;
+ GtkWindow *parent;
float percentage = 0.0;
GIOStatus status = G_IO_STATUS_NORMAL;
@@ -167,12 +163,12 @@ zenity_progress_handle_stdin (GIOChannel *channel, GIOCondition condition,
g_autoptr(GString) string = g_string_new (NULL);
g_autoptr(GError) error = NULL;
- while (channel->is_readable != TRUE)
+ while (source->is_readable != TRUE)
;
do {
do {
status = g_io_channel_read_line_string (
- channel, string, NULL, &error);
+ source, string, NULL, &error);
while (g_main_context_pending (NULL)) {
g_main_context_iteration (NULL, FALSE);
@@ -265,7 +261,7 @@ zenity_progress_handle_stdin (GIOChannel *channel, GIOCondition condition,
}
}
- } while ((g_io_channel_get_buffer_condition (channel) & G_IO_IN) ==
+ } while ((g_io_channel_get_buffer_condition (source) & G_IO_IN) ==
G_IO_IN &&
status != G_IO_STATUS_EOF);
}
@@ -286,15 +282,13 @@ zenity_progress_handle_stdin (GIOChannel *channel, GIOCondition condition,
zenity_progress_pulsate_stop ();
- g_object_unref (builder);
-
if (progress_data->autoclose)
{
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
zenity_util_gapp_quit (parent, zen_data);
}
- g_io_channel_shutdown (channel, TRUE, NULL);
+ g_io_channel_shutdown (source, TRUE, NULL);
return FALSE;
}
return TRUE;
@@ -303,7 +297,8 @@ zenity_progress_handle_stdin (GIOChannel *channel, GIOCondition condition,
static void
zenity_progress_read_info (ZenityProgressData *progress_data)
{
- channel = g_io_channel_unix_new (0);
+ GIOChannel *channel = g_io_channel_unix_new (0);
+
g_io_channel_set_encoding (channel, NULL, NULL);
g_io_channel_set_flags (channel, G_IO_FLAG_NONBLOCK, NULL);
g_io_add_watch (channel,
--
2.40.1

View File

@ -1 +1 @@
SHA512 (zenity-3.92.0.tar.xz) = 0e28b5fa60736210ee474ee483bd98b63f17c0d815dc6050532e82bda7d82b560f5227e4882fa6c969352d9e48d19c8addf5587acac8eac8f0fc9ac185edaf76
SHA512 (zenity-3.99.0.tar.xz) = 65820dd9f5e60dad14867dc584ac4a2d43f6c259c4eccd021c76f2deb4206a29de17db4eb8a911fff12243a594b624c1aa3781087bcd41308c4ea6c0dc919633

View File

@ -1,18 +1,11 @@
Name: zenity
Version: 3.92.0
Release: 2%{?dist}
Version: 3.99.0
Release: 1%{?dist}
Summary: Display dialog boxes from shell scripts
License: LGPL-2.1-or-later
URL: https://wiki.gnome.org/Projects/Zenity
Source: https://download.gnome.org/sources/%{name}/3.92/%{name}-%{version}.tar.xz
# https://gitlab.gnome.org/GNOME/zenity/-/merge_requests/25#note_1740317
# https://bugzilla.redhat.com/show_bug.cgi?id=2177287
# Hoping these two will finally fix the zenity crashes people are
# seeing when launch Steam etc. Backports from upstream master
Patch0: 0001-util-remove-fatal-assert-on-exit-if-window-invalid-G.patch
Patch1: 0002-progress-Cleanup-unnecessary-static-objects-and-remo.patch
Source: https://download.gnome.org/sources/%{name}/3.99/%{name}-%{version}.tar.xz
BuildRequires: pkgconfig(libadwaita-1) >= 1.2
BuildRequires: /usr/bin/help2man
@ -61,6 +54,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Zenity.desk
%changelog
* Mon Jun 19 2023 Kalev Lember <klember@redhat.com> - 3.99.0-1
- Update to 3.99.0
* Mon May 08 2023 Adam Williamson <awilliam@redhat.com> - 3.92.0-2
- Backport two patches from upstream to hopefully really fix crashes (#2177287)