[gnome-shell] mpris: Disallow media section on login screen



commit d66f5ab3c6832b8a7eee367b131fad312806d059
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Feb 20 16:40:04 2020 +0100

    mpris: Disallow media section on login screen
    
    The 'gdm' user is not going to run a media player, so there is no
    point in allowing the corresponding section on the login screen.
    
    All other sections are already disabled, so this is the only reason why
    we end up with the message list instead of only showing the calendar.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/2241

 js/ui/mpris.js | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/js/ui/mpris.js b/js/ui/mpris.js
index bc98c0402e..9eabe4431f 100644
--- a/js/ui/mpris.js
+++ b/js/ui/mpris.js
@@ -251,6 +251,10 @@ class MediaSection extends MessageList.MessageListSection {
         return !this.empty && Calendar.isToday(this._date);
     }
 
+    get allowed() {
+        return !Main.sessionMode.isGreeter;
+    }
+
     _addPlayer(busName) {
         if (this._players.get(busName))
             return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]