userMenu: Use addSettingsAction

https://bugzilla.gnome.org/show_bug.cgi?id=701755
This commit is contained in:
Jasper St. Pierre 2013-04-25 15:45:53 -04:00
parent 403540e8a1
commit b68eb44ca5

View File

@ -566,7 +566,6 @@ const UserMenuButton = new Lang.Class({
let allowSettings = Main.sessionMode.allowSettings; let allowSettings = Main.sessionMode.allowSettings;
this._statusChooser.setSensitive(allowSettings); this._statusChooser.setSensitive(allowSettings);
this._systemSettings.visible = allowSettings;
this.setSensitive(!Main.sessionMode.isLocked); this.setSensitive(!Main.sessionMode.isLocked);
this._updatePresenceIcon(); this._updatePresenceIcon();
@ -742,10 +741,7 @@ const UserMenuButton = new Lang.Class({
item = new PopupMenu.PopupSeparatorMenuItem(); item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
item = new PopupMenu.PopupMenuItem(_("Settings")); this.menu.addSettingsAction(_("Settings"), 'gnome-control-center.desktop');
item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
this.menu.addMenuItem(item);
this._systemSettings = item;
item = new PopupMenu.PopupSeparatorMenuItem(); item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
@ -806,12 +802,6 @@ const UserMenuButton = new Lang.Class({
app.activate(); app.activate();
}, },
_onPreferencesActivate: function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().lookup_app('gnome-control-center.desktop');
app.activate();
},
_onLockScreenActivate: function() { _onLockScreenActivate: function() {
this.menu.close(BoxPointer.PopupAnimation.NONE); this.menu.close(BoxPointer.PopupAnimation.NONE);
Main.overview.hide(); Main.overview.hide();