cleanup: Remove spaces in object literals
We only adopted this style relatively recently, so there's a bit more to adjust. Still, it's manageable and another step towards getting rid of the legacy style. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2866>
This commit is contained in:

committed by
Marge Bot

parent
6a22af83dc
commit
071f92cfb6
@ -221,7 +221,7 @@ class IBusManager extends Signals.EventEmitter {
|
||||
this._candidatePopup.setPanelService(this._panelService);
|
||||
this._panelService.connect('update-property', this._updateProperty.bind(this));
|
||||
this._panelService.connect('set-cursor-location', (ps, x, y, w, h) => {
|
||||
let cursorLocation = { x, y, width: w, height: h };
|
||||
let cursorLocation = {x, y, width: w, height: h};
|
||||
this.emit('set-cursor-location', cursorLocation);
|
||||
});
|
||||
this._panelService.connect('focus-in', (panel, path) => {
|
||||
|
@ -103,7 +103,7 @@ export function findMatchingSlash(expr, offset) {
|
||||
*/
|
||||
export function findMatchingBrace(expr, offset) {
|
||||
let closeBrace = expr.charAt(offset);
|
||||
let openBrace = { ')': '(', ']': '[' }[closeBrace];
|
||||
let openBrace = {')': '(', ']': '['}[closeBrace];
|
||||
|
||||
return findTheBrace(expr, offset - 1, openBrace, closeBrace);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ class KeyboardManager {
|
||||
this._currentKeymap.options == options)
|
||||
return;
|
||||
|
||||
this._currentKeymap = { layouts, variants, options };
|
||||
this._currentKeymap = {layouts, variants, options};
|
||||
global.backend.set_keymap(layouts, variants, options);
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ class KeyboardManager {
|
||||
for (let i = 0; i < ids.length; ++i) {
|
||||
let [found, , , _layout, _variant] = this._xkbInfo.get_layout_info(ids[i]);
|
||||
if (found)
|
||||
this._layoutInfos[ids[i]] = { id: ids[i], layout: _layout, variant: _variant };
|
||||
this._layoutInfos[ids[i]] = {id: ids[i], layout: _layout, variant: _variant};
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
@ -142,9 +142,9 @@ class KeyboardManager {
|
||||
let _layout, _variant;
|
||||
[found, , , _layout, _variant] = this._xkbInfo.get_layout_info(id);
|
||||
if (found)
|
||||
return { layout: _layout, variant: _variant };
|
||||
return {layout: _layout, variant: _variant};
|
||||
else
|
||||
return { layout: DEFAULT_LAYOUT, variant: DEFAULT_VARIANT };
|
||||
return {layout: DEFAULT_LAYOUT, variant: DEFAULT_VARIANT};
|
||||
}
|
||||
|
||||
_buildGroupStrings(_group) {
|
||||
|
@ -199,7 +199,7 @@ class LoginManagerSystemd extends Signals.EventEmitter {
|
||||
await this._proxy.call_with_unix_fd_list('Inhibit',
|
||||
inVariant, 0, -1, null, cancellable);
|
||||
const [fd] = fdList.steal_fds();
|
||||
return new Gio.UnixInputStream({ fd });
|
||||
return new Gio.UnixInputStream({fd});
|
||||
}
|
||||
|
||||
_prepareForSleep(proxy, sender, [aboutToSuspend]) {
|
||||
|
@ -243,7 +243,7 @@ export const BroadbandModem = GObject.registerClass({
|
||||
},
|
||||
}, class BroadbandModem extends ModemBase {
|
||||
_init(path, capabilities) {
|
||||
super._init({ capabilities });
|
||||
super._init({capabilities});
|
||||
this._proxy = new BroadbandModemProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
|
||||
this._proxy_3gpp = new BroadbandModem3gppProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
|
||||
this._proxy_cdma = new BroadbandModemCdmaProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
|
||||
|
@ -76,7 +76,7 @@ const ParentalControlsManager = GObject.registerClass({
|
||||
|
||||
try {
|
||||
const connection = await Gio.DBus.get(Gio.BusType.SYSTEM, null);
|
||||
this._manager = new Malcontent.Manager({ connection });
|
||||
this._manager = new Malcontent.Manager({connection});
|
||||
this._appFilter = await this._getAppFilter();
|
||||
} catch (e) {
|
||||
logError(e, 'Failed to get parental controls settings');
|
||||
|
@ -106,7 +106,7 @@ class SignalTracker {
|
||||
_getSignalData(obj) {
|
||||
let data = this._map.get(obj);
|
||||
if (data === undefined) {
|
||||
data = { ownerSignals: [], destroyId: 0 };
|
||||
data = {ownerSignals: [], destroyId: 0};
|
||||
this._map.set(obj, data);
|
||||
}
|
||||
return data;
|
||||
@ -164,7 +164,7 @@ class SignalTracker {
|
||||
* @returns {void}
|
||||
*/
|
||||
untrack(obj) {
|
||||
const { ownerSignals, destroyId } = this._getSignalData(obj);
|
||||
const {ownerSignals, destroyId} = this._getSignalData(obj);
|
||||
this._map.delete(obj);
|
||||
|
||||
const ownerProto = this._getObjectProto(this._owner);
|
||||
|
@ -284,7 +284,7 @@ const SystemActions = GObject.registerClass({
|
||||
|
||||
let results = [];
|
||||
|
||||
for (let [key, { available, keywords }] of this._actions) {
|
||||
for (let [key, {available, keywords}] of this._actions) {
|
||||
if (available && terms.every(t => keywords.some(k => k.startsWith(t))))
|
||||
results.push(key);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ let _desktopSettings = null;
|
||||
export function findUrls(str) {
|
||||
let res = [], match;
|
||||
while ((match = _urlRegexp.exec(str)))
|
||||
res.push({ url: match[2], pos: match.index + match[1].length });
|
||||
res.push({url: match[2], pos: match.index + match[1].length});
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ function trySpawn(argv) {
|
||||
// We are only interested in the part in the parentheses. (And
|
||||
// we can't pattern match the text, since it gets localized.)
|
||||
let message = err.message.replace(/.*\((.+)\)/, '$1');
|
||||
throw new err.constructor({ code: err.code, message });
|
||||
throw new err.constructor({code: err.code, message});
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
@ -196,9 +196,9 @@ function _handleSpawnError(command, err) {
|
||||
*/
|
||||
export function createTimeLabel(date, params) {
|
||||
if (_desktopSettings == null)
|
||||
_desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
|
||||
_desktopSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'});
|
||||
|
||||
let label = new St.Label({ text: formatTime(date, params) });
|
||||
let label = new St.Label({text: formatTime(date, params)});
|
||||
_desktopSettings.connectObject(
|
||||
'changed::clock-format', () => (label.text = formatTime(date, params)),
|
||||
label);
|
||||
|
@ -69,7 +69,7 @@ export class WeatherClient extends Signals.EventEmitter {
|
||||
this._permStore.connectSignal('Changed',
|
||||
this._onPermStoreChanged.bind(this));
|
||||
|
||||
this._locationSettings = new Gio.Settings({ schema_id: 'org.gnome.system.location' });
|
||||
this._locationSettings = new Gio.Settings({schema_id: 'org.gnome.system.location'});
|
||||
this._locationSettings.connect('changed::enabled',
|
||||
this._updateAutoLocation.bind(this));
|
||||
|
||||
|
Reference in New Issue
Block a user