diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2021-05-07 23:18:14 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2021-05-08 09:47:42 +0200 |
commit | 468cb5980b56d348979488a74a9b5de638400160 (patch) | |
tree | 1426485105b897074e82af80efdd545462edb211 /pkgs/desktops/gnome/extensions/fuzzy-app-search/fix-desktop-file-paths.patch | |
parent | d03a5eb09720fd6ad670df12d8eafbbfcd7ff494 (diff) |
gnome: rename from gnome3
Since GNOME version is now 40, it no longer makes sense to use the old attribute name.
Diffstat (limited to 'pkgs/desktops/gnome/extensions/fuzzy-app-search/fix-desktop-file-paths.patch')
-rwxr-xr-x | pkgs/desktops/gnome/extensions/fuzzy-app-search/fix-desktop-file-paths.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/desktops/gnome/extensions/fuzzy-app-search/fix-desktop-file-paths.patch b/pkgs/desktops/gnome/extensions/fuzzy-app-search/fix-desktop-file-paths.patch new file mode 100755 index 0000000000000..1795f998c9bde --- /dev/null +++ b/pkgs/desktops/gnome/extensions/fuzzy-app-search/fix-desktop-file-paths.patch @@ -0,0 +1,50 @@ +diff --git a/applicationsUtils.js b/applicationsUtils.js +index 728223b..aa9f291 100644 +--- a/applicationsUtils.js ++++ b/applicationsUtils.js +@@ -44,27 +44,24 @@ var Search = new Lang.Class({ + * @return {Void} + */ + _init: function () { +- let dir = [ +- "/usr/share/applications", +- GLib.get_home_dir() + "/.local/share/applications", +- ]; +- +- // listen object - file/monitor list +- this._listen = dir.map((path) => { +- let file = Gio.File.new_for_path(path); +- let monitor = file.monitor(Gio.FileMonitorFlags.NONE, null); +- +- // refresh on each directory change +- monitor.connect( +- "changed", +- Lang.bind(this, this._handleMonitorChanged) +- ); +- +- return { +- file: file, +- monitor: monitor, +- }; +- }); ++ this._listen = [...new Set(GLib.get_system_data_dirs())] ++ .filter((path) => path.endsWith("/share")) ++ .map((path) => Gio.File.new_for_path(path + "/applications")) ++ .filter((file) => file.query_exists(null)) ++ .map((file) => { ++ let monitor = file.monitor(Gio.FileMonitorFlags.NONE, null); ++ ++ // refresh on each directory change ++ monitor.connect( ++ "changed", ++ Lang.bind(this, this._handleMonitorChanged) ++ ); ++ ++ return { ++ file: file, ++ monitor: monitor, ++ }; ++ }); + this._interval = null; + this._data = {}; + \ No newline at end of file |