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:
Florian Müllner
2020-03-29 23:51:13 +02:00
committed by Marge Bot
parent ac9fbe92e5
commit 2b45a01517
70 changed files with 1357 additions and 852 deletions

View File

@@ -1,6 +1,7 @@
/* exported MessageListSection */
const { Atk, Clutter, Gio, GLib,
GObject, Graphene, Meta, Pango, St } = imports.gi;
const {
Atk, Clutter, Gio, GLib, GObject, Graphene, Meta, Pango, St,
} = imports.gi;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
@@ -331,18 +332,25 @@ var Message = GObject.registerClass({
let hbox = new St.BoxLayout();
vbox.add_actor(hbox);
this._actionBin = new St.Widget({ layout_manager: new ScaleLayout(),
visible: false });
this._actionBin = new St.Widget({
layout_manager: new ScaleLayout(),
visible: false,
});
vbox.add_actor(this._actionBin);
this._iconBin = new St.Bin({ style_class: 'message-icon-bin',
y_expand: true,
y_align: Clutter.ActorAlign.START,
visible: false });
this._iconBin = new St.Bin({
style_class: 'message-icon-bin',
y_expand: true,
y_align: Clutter.ActorAlign.START,
visible: false,
});
hbox.add_actor(this._iconBin);
let contentBox = new St.BoxLayout({ style_class: 'message-content',
vertical: true, x_expand: true });
const contentBox = new St.BoxLayout({
style_class: 'message-content',
vertical: true,
x_expand: true,
});
hbox.add_actor(contentBox);
this._mediaControls = new St.BoxLayout();
@@ -361,8 +369,10 @@ var Message = GObject.registerClass({
});
titleBox.add_actor(this._secondaryBin);
let closeIcon = new St.Icon({ icon_name: 'window-close-symbolic',
icon_size: 16 });
const closeIcon = new St.Icon({
icon_name: 'window-close-symbolic',
icon_size: 16,
});
this._closeButton = new St.Button({
style_class: 'message-close-button',
child: closeIcon, opacity: 0,
@@ -435,8 +445,10 @@ var Message = GObject.registerClass({
addMediaControl(iconName, callback) {
let icon = new St.Icon({ icon_name: iconName, icon_size: 16 });
let button = new St.Button({ style_class: 'message-media-control',
child: icon });
const button = new St.Button({
style_class: 'message-media-control',
child: icon,
});
button.connect('clicked', callback);
this._mediaControls.add_actor(button);
return button;
@@ -565,8 +577,10 @@ var MessageListSection = GObject.registerClass({
x_expand: true,
});
this._list = new St.BoxLayout({ style_class: 'message-list-section-list',
vertical: true });
this._list = new St.BoxLayout({
style_class: 'message-list-section-list',
vertical: true,
});
this.add_actor(this._list);
this._list.connect('actor-added', this._sync.bind(this));