From eef44730813975c4858f37591fee39c3bcbf7570 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Jan 15 2021 06:11:29 +0000 Subject: 0006-js-Always-use-AppSystem-to-lookup-apps.patch patch_name: 0006-js-Always-use-AppSystem-to-lookup-apps.patch present_in_specfile: true location_in_specfile: 45 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index a2d6910..cb2be7d 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1001,8 +1001,8 @@ var AppSearchProvider = class AppSearchProvider { let results = []; groups.forEach(group => { group = group.filter(appID => { - let app = Gio.DesktopAppInfo.new(appID); - return app && app.should_show(); + const app = this._appSys.lookup_app(appID); + return app && app.app_info.should_show(); }); results = results.concat(group.sort( (a, b) => usage.compare(a, b) diff --git a/js/ui/calendar.js b/js/ui/calendar.js index cd3e879..3ae2e44 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -791,8 +791,9 @@ var EventsSection = class EventsSection extends MessageList.MessageListSection { this._title.connect('clicked', this._onTitleClicked.bind(this)); this._title.connect('key-focus-in', this._onKeyFocusIn.bind(this)); - Shell.AppSystem.get_default().connect('installed-changed', - this._appInstalledChanged.bind(this)); + this._appSys = Shell.AppSystem.get_default(); + this._appSys.connect('installed-changed', + this._appInstalledChanged.bind(this)); this._appInstalledChanged(); } @@ -883,10 +884,13 @@ var EventsSection = class EventsSection extends MessageList.MessageListSection { Main.overview.hide(); Main.panel.closeCalendar(); - let app = this._getCalendarApp(); - if (app.get_id() == 'evolution.desktop') - app = Gio.DesktopAppInfo.new('evolution-calendar.desktop'); - app.launch([], global.create_app_launch_context(0, -1)); + let appInfo = this._getCalendarApp(); + if (app.get_id() == 'evolution.desktop') { + let app = this._appSys.lookup_app('evolution-calendar.desktop'); + if (app) + appInfo = app.app_info; + } + appInfo.launch([], global.create_app_launch_context(0, -1)); } setDate(date) {