From 7697ffa6b2735f9ed2ea0d9fafb90424c2e04472 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 26 Feb 2020 18:37:55 +0100 Subject: [PATCH] + gnome-characters-3.32.1-5 Fix use of removed functions --- 0001-Fix-deprecation-warnings.patch | 49 +++++++++++++++++++++++++++++ gnome-characters.spec | 9 +++++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-deprecation-warnings.patch diff --git a/0001-Fix-deprecation-warnings.patch b/0001-Fix-deprecation-warnings.patch new file mode 100644 index 0000000..e740c13 --- /dev/null +++ b/0001-Fix-deprecation-warnings.patch @@ -0,0 +1,49 @@ +From b5ea2f8bb6df077b1d1eaa88b062d558a5cdb3e4 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Fri, 26 Jul 2019 16:38:42 +0200 +Subject: [PATCH] Fix deprecation warnings + +Similarly to https://gitlab.gnome.org/GNOME/gnome-characters/issues/44 +--- + src/menu.js | 4 ++-- + src/window.js | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/menu.js b/src/menu.js +index c7510f5..cbd28a4 100644 +--- a/src/menu.js ++++ b/src/menu.js +@@ -72,7 +72,7 @@ var MenuPopover = GObject.registerClass({ + _handleSearchChanged(entry) { + let text = entry.get_text().replace(/^\s+|\s+$/g, ''); + let keywords = text == '' ? [] : text.split(/\s+/); +- this._keywords = keywords.map(String.toLowerCase); ++ this._keywords = keywords.map(x => x.toLowerCase()); + this._font_listbox.invalidate_filter(); + return true; + } +@@ -91,7 +91,7 @@ var MenuPopover = GObject.registerClass({ + if (row._family == 'None') + return true; + +- let nameWords = row._family.split(/\s+/).map(String.toLowerCase); ++ let nameWords = row._family.split(/\s+/).map(x => x.toLowerCase()); + return this._keywords.every(function(keyword, index, array) { + return nameWords.some(function(nameWord, index, array) { + return nameWord.indexOf(keyword) >= 0; +diff --git a/src/window.js b/src/window.js +index 2066105..5498b58 100644 +--- a/src/window.js ++++ b/src/window.js +@@ -168,7 +168,7 @@ var MainWindow = GObject.registerClass({ + _handleSearchChanged(entry) { + const text = entry.get_text().replace(/^\s+|\s+$/g, ''); + let keywords = text == '' ? [] : text.split(/\s+/); +- keywords = keywords.map(String.toUpperCase); ++ keywords = keywords.map(x => x.toUpperCase()); + if (keywords != this._searchKeywords) { + this._mainView.cancelSearch(); + this._searchKeywords = keywords; +-- +2.25.1 + diff --git a/gnome-characters.spec b/gnome-characters.spec index 7decf41..65281eb 100644 --- a/gnome-characters.spec +++ b/gnome-characters.spec @@ -4,7 +4,7 @@ Name: gnome-characters Version: 3.32.1 -Release: 4%{?dist} +Release: 5%{?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. @@ -24,6 +24,9 @@ BuildRequires: meson Requires: gjs >= %{gjs_version} Requires: gnome-desktop3 +# https://gitlab.gnome.org/GNOME/gnome-characters/-/merge_requests/36 +Patch0: 0001-Fix-deprecation-warnings.patch + %description Characters is a simple utility application to find and insert unusual characters. @@ -64,6 +67,10 @@ desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/%{appname}.deskto %changelog +* Wed Feb 26 2020 Bastien Nocera - 3.32.1-5 ++ gnome-characters-3.32.1-5 +- Fix use of removed functions + * Tue Jan 28 2020 Fedora Release Engineering - 3.32.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild