+ gnome-characters-3.32.1-5

Fix use of removed functions
This commit is contained in:
Bastien Nocera 2020-02-26 18:37:55 +01:00
parent d0f10c8984
commit 7697ffa6b2
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,49 @@
From b5ea2f8bb6df077b1d1eaa88b062d558a5cdb3e4 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
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

View File

@ -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 <bnocera@redhat.com> - 3.32.1-5
+ gnome-characters-3.32.1-5
- Fix use of removed functions
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.32.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild