修改 /usr/share/gnome-shell/js/ui/userMenu.js
- // ....
- _createSubMenu: function() {
- // ....
- // wuxb: add 3lines for PowerOff item
- item = new PopupMenu.PopupMenuItem(_("Power Really Off"));
- this.menu.addMenuItem(item);
- item.connect('activate', Lang.bind(this, this._onPowerOffActivate));
- },
- // ....
- // wuxb: add 4 lines for poweroff
- _onPowerOffActivate: function() {
- Main.overview.hide();
- this._session.ShutdownRemote();
- }, // <-注意这些可恶的逗号
- });
阅读(1754) | 评论(0) | 转发(0) |