calendar: Add Media section

We lost media controls outside of notification banners when
implementing the new notification designs. Reimplement this
functionality as a dedicated "Media" section in the message
list based on MPRIS.

https://bugzilla.gnome.org/show_bug.cgi?id=756491
This commit is contained in:
Florian Müllner
2016-02-15 12:13:22 +01:00
parent ee8fd1e613
commit 3ecdfaffd2
8 changed files with 318 additions and 2 deletions

View File

@ -13,6 +13,7 @@ const Shell = imports.gi.Shell;
const Main = imports.ui.main;
const MessageList = imports.ui.messageList;
const MessageTray = imports.ui.messageTray;
const Mpris = imports.ui.mpris;
const Util = imports.misc.util;
const MSECS_IN_DAY = 24 * 60 * 60 * 1000;
@ -1099,6 +1100,9 @@ const CalendarMessageList = new Lang.Class({
this._scrollView.add_actor(this._sectionList);
this._sections = new Map();
this._mediaSection = new Mpris.MediaSection();
this._addSection(this._mediaSection);
this._notificationSection = new NotificationSection();
this._addSection(this._notificationSection);