dateMenu: Use desktop action to open Evolution calendar

We include a private hidden .desktop file for evolution's calendar
component, so that we can explicitly open that component when
evolution is configured as the default calendar application.

That's because the evolution developers didn't want to ship
additional .desktop files at the time, but they have since
then included a desktop action that can be used for the same
purpose.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2479>
This commit is contained in:
Florian Müllner
2022-09-08 00:14:24 +02:00
committed by Marge Bot
parent 1236bf8f09
commit 661356766b
5 changed files with 6 additions and 26 deletions

View File

@ -284,13 +284,12 @@ class EventsSection extends St.Button {
Main.overview.hide();
Main.panel.closeCalendar();
let appInfo = this._calendarApp;
if (appInfo.get_id() === 'org.gnome.Evolution.desktop') {
const app = this._appSys.lookup_app('evolution-calendar.desktop');
if (app)
appInfo = app.app_info;
}
appInfo.launch([], global.create_app_launch_context(0, -1));
const appInfo = this._calendarApp;
const context = global.create_app_launch_context(0, -1);
if (appInfo.get_id() === 'org.gnome.Evolution.desktop')
appInfo.launch_action('calendar', context);
else
appInfo.launch([], context);
}
_appInstalledChanged() {