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