cleanup: Use new indentation style for object literals
We have made good progress on object literals as well, although there are still a lot that use the old style, given how ubiquitous object literals are. But the needed reindentation isn't overly intrusive, as changes are limited to the object literals themselves (i.e. they don't affect surrounding code). And given that object literals account for quite a bit of the remaining differences between regular and legacy rules, doing the transition now is still worthwhile. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2200>
This commit is contained in:

committed by
Marge Bot

parent
ac9fbe92e5
commit
2b45a01517
@ -17,8 +17,10 @@
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const { AccountsService, Clutter, Gio,
|
||||
GLib, GObject, Pango, Polkit, Shell, St, UPowerGlib: UPower } = imports.gi;
|
||||
const {
|
||||
AccountsService, Clutter, Gio, GLib, GObject,
|
||||
Pango, Polkit, Shell, St, UPowerGlib: UPower,
|
||||
} = imports.gi;
|
||||
|
||||
const CheckBox = imports.ui.checkBox;
|
||||
const Dialog = imports.ui.dialog;
|
||||
@ -226,8 +228,10 @@ function init() {
|
||||
var EndSessionDialog = GObject.registerClass(
|
||||
class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
_init() {
|
||||
super._init({ styleClass: 'end-session-dialog',
|
||||
destroyOnClose: false });
|
||||
super._init({
|
||||
styleClass: 'end-session-dialog',
|
||||
destroyOnClose: false,
|
||||
});
|
||||
|
||||
this._loginManager = LoginManager.getLoginManager();
|
||||
this._loginManager.canRebootToBootLoaderMenu(
|
||||
@ -434,9 +438,11 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
_updateButtons() {
|
||||
this.clearButtons();
|
||||
|
||||
this.addButton({ action: this.cancel.bind(this),
|
||||
label: _("Cancel"),
|
||||
key: Clutter.KEY_Escape });
|
||||
this.addButton({
|
||||
action: this.cancel.bind(this),
|
||||
label: _('Cancel'),
|
||||
key: Clutter.KEY_Escape,
|
||||
});
|
||||
|
||||
let dialogContent = DialogContent[this._type];
|
||||
for (let i = 0; i < dialogContent.confirmButtons.length; i++) {
|
||||
@ -669,10 +675,12 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
if (proxy.Id == sessionId)
|
||||
continue;
|
||||
|
||||
let session = { user: this._userManager.get_user(userName),
|
||||
username: userName,
|
||||
type: proxy.Type,
|
||||
remote: proxy.Remote };
|
||||
const session = {
|
||||
user: this._userManager.get_user(userName),
|
||||
username: userName,
|
||||
type: proxy.Type,
|
||||
remote: proxy.Remote,
|
||||
};
|
||||
this._sessions.push(session);
|
||||
|
||||
let userAvatar = new UserWidget.Avatar(session.user, { iconSize: _ITEM_ICON_SIZE });
|
||||
|
Reference in New Issue
Block a user