[gnome-characters: 1/2] Fix JavaScript deprecation warnings
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters: 1/2] Fix JavaScript deprecation warnings
- Date: Thu, 1 Nov 2018 12:50:55 +0000 (UTC)
commit 224f385e276ce264a18da551c7c60af18a65cb77
Author: Christian Stadelmann <delqooklpy genodeftest de>
Date: Fri Oct 5 14:45:02 2018 +0000
Fix JavaScript deprecation warnings
Fixes #44.
src/searchProvider.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/searchProvider.js b/src/searchProvider.js
index 292afd6..efe776f 100644
--- a/src/searchProvider.js
+++ b/src/searchProvider.js
@@ -24,9 +24,9 @@ const Util = imports.util;
const MAX_SEARCH_RESULTS = 100;
-const SearchProviderInterface = Gio.resources_lookup_data('/org/gnome/shell/ShellSearchProvider2.xml',
0).toArray().toString();
+const SearchProviderInterface =
ByteArray.toString(Gio.resources_lookup_data('/org/gnome/shell/ShellSearchProvider2.xml', 0).toArray());
-const SearchProvider = GObject.registerClass({
+var SearchProvider = GObject.registerClass({
Name: 'CharactersSearchProvider',
}, class SearchProvider extends GObject.Object {
_init(application) {
@@ -48,7 +48,7 @@ const SearchProvider = GObject.registerClass({
this._cancellable.cancel();
this._cancellable.reset();
- let upper = keywords.map(String.toUpperCase);
+ let upper = keywords.map(String.prototype.toUpperCase);
let criteria = Gc.SearchCriteria.new_keywords(upper);
let context = new Gc.SearchContext({ criteria: criteria,
flags: Gc.SearchFlag.WORD });
@@ -154,4 +154,4 @@ const SearchProvider = GObject.registerClass({
this._activateAction('search', new GLib.Variant('as', terms),
timestamp);
}
-});
+});
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]