|
|
5731ec |
From a0df79f8de4c13c36ed3b22cfdbb78e324424ef1 Mon Sep 17 00:00:00 2001
|
|
|
5731ec |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
5731ec |
Date: Sat, 14 Mar 2020 14:45:42 +0100
|
|
|
5731ec |
Subject: [PATCH 6/6] js: Always use AppSystem to lookup apps
|
|
|
5731ec |
|
|
|
5731ec |
There is no good reason for bypassing the application cache in
|
|
|
5731ec |
AppSystem and loading .desktop files again.
|
|
|
5731ec |
|
|
|
5731ec |
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1093
|
|
|
5731ec |
---
|
|
|
5731ec |
js/ui/appDisplay.js | 4 ++--
|
|
|
5731ec |
js/ui/calendar.js | 16 ++++++++++------
|
|
|
5731ec |
2 files changed, 12 insertions(+), 8 deletions(-)
|
|
|
5731ec |
|
|
|
5731ec |
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
|
|
|
5731ec |
index a2d691085..cb2be7d3c 100644
|
|
|
5731ec |
--- a/js/ui/appDisplay.js
|
|
|
5731ec |
+++ b/js/ui/appDisplay.js
|
|
|
5731ec |
@@ -1001,8 +1001,8 @@ var AppSearchProvider = class AppSearchProvider {
|
|
|
5731ec |
let results = [];
|
|
|
5731ec |
groups.forEach(group => {
|
|
|
5731ec |
group = group.filter(appID => {
|
|
|
5731ec |
- let app = Gio.DesktopAppInfo.new(appID);
|
|
|
5731ec |
- return app && app.should_show();
|
|
|
5731ec |
+ const app = this._appSys.lookup_app(appID);
|
|
|
5731ec |
+ return app && app.app_info.should_show();
|
|
|
5731ec |
});
|
|
|
5731ec |
results = results.concat(group.sort(
|
|
|
5731ec |
(a, b) => usage.compare(a, b)
|
|
|
5731ec |
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
|
|
|
5731ec |
index cd3e879c4..3ae2e44f8 100644
|
|
|
5731ec |
--- a/js/ui/calendar.js
|
|
|
5731ec |
+++ b/js/ui/calendar.js
|
|
|
5731ec |
@@ -791,8 +791,9 @@ var EventsSection = class EventsSection extends MessageList.MessageListSection {
|
|
|
5731ec |
this._title.connect('clicked', this._onTitleClicked.bind(this));
|
|
|
5731ec |
this._title.connect('key-focus-in', this._onKeyFocusIn.bind(this));
|
|
|
5731ec |
|
|
|
5731ec |
- Shell.AppSystem.get_default().connect('installed-changed',
|
|
|
5731ec |
- this._appInstalledChanged.bind(this));
|
|
|
5731ec |
+ this._appSys = Shell.AppSystem.get_default();
|
|
|
5731ec |
+ this._appSys.connect('installed-changed',
|
|
|
5731ec |
+ this._appInstalledChanged.bind(this));
|
|
|
5731ec |
this._appInstalledChanged();
|
|
|
5731ec |
}
|
|
|
5731ec |
|
|
|
5731ec |
@@ -883,10 +884,13 @@ var EventsSection = class EventsSection extends MessageList.MessageListSection {
|
|
|
5731ec |
Main.overview.hide();
|
|
|
5731ec |
Main.panel.closeCalendar();
|
|
|
5731ec |
|
|
|
5731ec |
- let app = this._getCalendarApp();
|
|
|
5731ec |
- if (app.get_id() == 'evolution.desktop')
|
|
|
5731ec |
- app = Gio.DesktopAppInfo.new('evolution-calendar.desktop');
|
|
|
5731ec |
- app.launch([], global.create_app_launch_context(0, -1));
|
|
|
5731ec |
+ let appInfo = this._getCalendarApp();
|
|
|
5731ec |
+ if (app.get_id() == 'evolution.desktop') {
|
|
|
5731ec |
+ let app = this._appSys.lookup_app('evolution-calendar.desktop');
|
|
|
5731ec |
+ if (app)
|
|
|
5731ec |
+ appInfo = app.app_info;
|
|
|
5731ec |
+ }
|
|
|
5731ec |
+ appInfo.launch([], global.create_app_launch_context(0, -1));
|
|
|
5731ec |
}
|
|
|
5731ec |
|
|
|
5731ec |
setDate(date) {
|
|
|
5731ec |
--
|
|
|
5731ec |
2.26.2
|
|
|
5731ec |
|