popupMenu: Set initial visibility of settings items

With the recent session mode changes, the visibility of settings
items is now only set on sessionMode::updated - while the signal
is emitted when the session mode is initialized, settings items
that are added after that are visible regardless of the allowSettings
setting until the next sessionMode::updated signal is received.
Fix this by explicitly setting the initial visibility of settings
items.

https://bugzilla.gnome.org/show_bug.cgi?id=684473
This commit is contained in:
Florian Müllner 2012-09-20 15:58:08 +02:00
parent 0ff614ccd4
commit e8ebe4de14

View File

@ -904,6 +904,7 @@ const PopupMenuBase = new Lang.Class({
app.activate();
});
menuItem.actor.visible = Main.sessionMode.allowSettings;
this._settingsActions[desktopFile] = menuItem;
return menuItem;