panel: Refuse to add (legacy) status icons not part of the session mode

If a session mode does not use certain status items, we don't want their
fallback implementation to show up either, so filter them out.

https://bugzilla.gnome.org/show_bug.cgi?id=677058
This commit is contained in:
Florian Müllner 2012-05-29 21:07:54 +02:00
parent 65d23fb9a3
commit ebbd295ebe

View File

@ -1144,6 +1144,9 @@ const Panel = new Lang.Class({
return; return;
} }
if (Main.sessionMode.statusArea.order.indexOf(role) == -1)
return;
icon.height = PANEL_ICON_SIZE; icon.height = PANEL_ICON_SIZE;
let buttonBox = new PanelMenu.ButtonBox(); let buttonBox = new PanelMenu.ButtonBox();
let box = buttonBox.actor; let box = buttonBox.actor;