style: Fix indentation errors

While we have some style inconsistencies - mostly regarding split lines,
i.e. aligning to the first arguments vs. a four-space indent - there are
a couple of places where the spacing is simply wrong. Fix those.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/608
This commit is contained in:
Florian Müllner 2019-01-29 20:36:54 +01:00 committed by Georges Basile Stavracas Neto
parent 8fcd6c7153
commit 1398aa6562
51 changed files with 428 additions and 441 deletions

View File

@ -423,10 +423,7 @@ var ShellUserVerifier = class {
_startService(serviceName) { _startService(serviceName) {
this._hold.acquire(); this._hold.acquire();
if (this._userName) { if (this._userName) {
this._userVerifier.call_begin_verification_for_user(serviceName, this._userVerifier.call_begin_verification_for_user(serviceName, this._userName, this._cancellable, (obj, result) => {
this._userName,
this._cancellable,
(obj, result) => {
try { try {
obj.call_begin_verification_for_user_finish(result); obj.call_begin_verification_for_user_finish(result);
} catch (e) { } catch (e) {
@ -439,9 +436,7 @@ var ShellUserVerifier = class {
this._hold.release(); this._hold.release();
}); });
} else { } else {
this._userVerifier.call_begin_verification(serviceName, this._userVerifier.call_begin_verification(serviceName, this._cancellable, (obj, result) => {
this._cancellable,
(obj, result) => {
try { try {
obj.call_begin_verification_finish(result); obj.call_begin_verification_finish(result);
} catch (e) { } catch (e) {

View File

@ -89,9 +89,7 @@ var ObjectManager = class {
g_interface_info: info, g_interface_info: info,
g_flags: Gio.DBusProxyFlags.DO_NOT_AUTO_START }); g_flags: Gio.DBusProxyFlags.DO_NOT_AUTO_START });
proxy.init_async(GLib.PRIORITY_DEFAULT, proxy.init_async(GLib.PRIORITY_DEFAULT, this._cancellable, (initable, result) => {
this._cancellable,
(initable, result) => {
try { try {
initable.init_finish(result); initable.init_finish(result);
} catch (e) { } catch (e) {

View File

@ -167,8 +167,10 @@ const SystemActions = GObject.registerClass({
this.forceUpdate(); this.forceUpdate();
this._orientationSettings.connect('changed::orientation-lock', this._orientationSettings.connect('changed::orientation-lock',
() => { this._updateOrientationLock(); () => {
this._updateOrientationLockIcon(); }); this._updateOrientationLock();
this._updateOrientationLockIcon();
});
Main.layoutManager.connect('monitors-changed', Main.layoutManager.connect('monitors-changed',
() => { this._updateOrientationLock(); }); () => { this._updateOrientationLock(); });
Gio.DBus.system.watch_name(SENSOR_BUS_NAME, Gio.DBus.system.watch_name(SENSOR_BUS_NAME,

View File

@ -109,8 +109,7 @@ var AutomountManager = class {
// we force stop/eject in this case, so we don't have to pass a // we force stop/eject in this case, so we don't have to pass a
// mount operation object // mount operation object
if (drive.can_stop()) { if (drive.can_stop()) {
drive.stop drive.stop(Gio.MountUnmountFlags.FORCE, null, null,
(Gio.MountUnmountFlags.FORCE, null, null,
(drive, res) => { (drive, res) => {
try { try {
drive.stop_finish(res); drive.stop_finish(res);
@ -119,8 +118,7 @@ var AutomountManager = class {
} }
}); });
} else if (drive.can_eject()) { } else if (drive.can_eject()) {
drive.eject_with_operation drive.eject_with_operation(Gio.MountUnmountFlags.FORCE, null, null,
(Gio.MountUnmountFlags.FORCE, null, null,
(drive, res) => { (drive, res) => {
try { try {
drive.eject_with_operation_finish(res); drive.eject_with_operation_finish(res);

View File

@ -368,8 +368,7 @@ var VPNRequestHandler = class {
let argv = [authHelper.fileName, let argv = [authHelper.fileName,
'-u', connectionSetting.uuid, '-u', connectionSetting.uuid,
'-n', connectionSetting.id, '-n', connectionSetting.id,
'-s', serviceType '-s', serviceType];
];
if (authHelper.externalUIMode) if (authHelper.externalUIMode)
argv.push('--external-ui-mode'); argv.push('--external-ui-mode');
if (flags & NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION) if (flags & NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION)

View File

@ -33,18 +33,15 @@ class RunDialog extends ModalDialog.ModalDialog {
}); });
this._enableInternalCommands = global.settings.get_boolean('development-tools'); this._enableInternalCommands = global.settings.get_boolean('development-tools');
this._internalCommands = { 'lg': () => { this._internalCommands = {
Main.createLookingGlass().open(); 'lg': () => { Main.createLookingGlass().open(); },
},
'r': this._restart.bind(this), 'r': this._restart.bind(this),
// Developer brain backwards compatibility // Developer brain backwards compatibility
'restart': this._restart.bind(this), 'restart': this._restart.bind(this),
'debugexit': () => { 'debugexit': () => { Meta.quit(Meta.ExitCode.ERROR); },
Meta.quit(Meta.ExitCode.ERROR);
},
// rt is short for "reload theme" // rt is short for "reload theme"
'rt': () => { 'rt': () => {
@ -57,7 +54,6 @@ class RunDialog extends ModalDialog.ModalDialog {
}, },
}; };
let label = new St.Label({ style_class: 'run-dialog-label', let label = new St.Label({ style_class: 'run-dialog-label',
text: _("Enter a Command") }); text: _("Enter a Command") });

View File

@ -108,8 +108,7 @@ var Client = class {
} }
enrollDevice(id, policy, callback) { enrollDevice(id, policy, callback) {
this._proxy.EnrollDeviceRemote(id, policy, AuthCtrl.NONE, this._proxy.EnrollDeviceRemote(id, policy, AuthCtrl.NONE, (res, error) => {
(res, error) => {
if (error) { if (error) {
Gio.DBusError.strip_remote_error(error); Gio.DBusError.strip_remote_error(error);
callback(null, error); callback(null, error);