Add patch to fix gjs crash

This commit is contained in:
Kevin Fenzi 2023-07-28 15:24:23 -07:00
parent dd9bac95a9
commit d1d211d96f
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 9ed597b027d32574bb3ebe45091f4123560ad42a Mon Sep 17 00:00:00 2001
From: Christopher Davis <christopherdavis@gnome.org>
Date: Thu, 6 Jul 2023 10:18:14 -0400
Subject: [PATCH] window: Unpack recent-characters GValue
Currently `get_strv()` causes a crash due to a GJS issue.
---
src/window.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/window.js b/src/window.js
index 77305b6..712e2d8 100644
--- a/src/window.js
+++ b/src/window.js
@@ -71,7 +71,7 @@ var MainWindow = GObject.registerClass({
// FIXME: Can't use GSettings.bind with 'as' from Gjs
let recentCharacters = Main.settings.get_value('recent-characters');
- this.recentCharacters = recentCharacters.get_strv();
+ this.recentCharacters = recentCharacters.deepUnpack();
this._maxRecentCharacters = 100;
Main.settings.bind('max-recent-characters', this,
'max-recent-characters',
--
GitLab

View File

@ -8,7 +8,7 @@
Name: gnome-characters
Version: 45~alpha
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Character map application for GNOME
# Files from gtk-js-app are licensed under 3-clause BSD.
# Other files are GPL 2.0 or later.
@ -16,6 +16,8 @@ License: BSD-3-Clause AND GPL-2.0-or-later
URL: https://wiki.gnome.org/Design/Apps/CharacterMap
Source0: https://download.gnome.org/sources/%{name}/45/%{name}-%{tarball_version}.tar.xz
# fix crash in gjs
Patch0: https://gitlab.gnome.org/GNOME/gnome-characters/-/commit/9ed597b027d32574bb3ebe45091f4123560ad42a.patch
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: gobject-introspection-devel
@ -70,6 +72,9 @@ desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/%{appname}.deskto
%changelog
* Fri Jul 28 2023 Kevin Fenzi <kevin@scrye.com> - 45~alpha-3
- Add patch to fix gjs crash
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 45~alpha-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild