cleanup: Remove empty leading/trailing lines in blocks

gjs added a new rule to its eslint ruleset that forbids "block padding",
so make sure we conform to that rule before syncing up the configuration.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1498
This commit is contained in:
Florian Müllner 2020-11-13 23:52:26 +01:00 committed by Georges Basile Stavracas Neto
parent 7521b9c4b2
commit 8a47f1c667
22 changed files with 1 additions and 27 deletions

View File

@ -383,7 +383,6 @@ var ScreencastService = class extends ServiceImplementation {
this._removeRecorder(sender);
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
}
});
} catch (error) {
log(`Failed to start recorder: ${error.message}`);
@ -441,7 +440,6 @@ var ScreencastService = class extends ServiceImplementation {
this._removeRecorder(sender);
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
}
});
} catch (error) {
log(`Failed to start recorder: ${error.message}`);

View File

@ -20,7 +20,6 @@ var HistoryManager = class {
this._history = global.settings.get_strv(this._key);
global.settings.connect(`changed::${this._key}`,
this._historyChanged.bind(this));
} else {
this._history = [];
}
@ -72,7 +71,6 @@ var HistoryManager = class {
addItem(input) {
if (this._history.length == 0 ||
this._history[this._history.length - 1] != input) {
this._history = this._history.filter(entry => entry != input);
this._history.push(input);
this._save();

View File

@ -170,7 +170,6 @@ var IntrospectService = class {
for (let app of apps) {
let windows = app.get_windows();
for (let window of windows) {
if (!this._isEligibleWindow(window))
continue;

View File

@ -201,7 +201,6 @@ function removeLiterals(str) {
// Returns true if there is reason to think that eval(str)
// will modify the global scope
function isUnsafeExpression(str) {
// Check for any sort of assignment
// The strategy used is dumb: remove any quotes
// or regexs and comparison operators and see if there is an '=' character.

View File

@ -111,6 +111,5 @@ var SmartcardManager = class {
return true;
}
};
Signals.addSignalMethods(SmartcardManager.prototype);

View File

@ -907,7 +907,6 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
} else {
this.addItem(box, null);
}
}
this.connect('destroy', this._onDestroy.bind(this));

View File

@ -867,7 +867,6 @@ var PageManager = GObject.registerClass({
global.settings.connect('changed::app-picker-layout',
this._loadPages.bind(this));
}
_loadPages() {

View File

@ -201,7 +201,6 @@ var AutomountManager = class {
e.message.includes('Failed to activate device: Incorrect passphrase') ||
// cryptsetup returns EINVAL in many cases, including wrong TCRYPT password/parameters
e.message.includes('Failed to load device\'s parameters: Invalid argument')) {
this._reaskPassword(volume);
} else {
if (e.message.includes('Compiled against a version of libcryptsetup that does not support the VeraCrypt PIM setting')) {

View File

@ -238,7 +238,6 @@ var AuthenticationDialog = GObject.registerClass({
/* Yay, all done */
if (gainedAuthorization) {
this._emitDone(false);
} else {
/* Unless we are showing an existing error message from the PAM
* module (the PAM module could be reporting the authentication

View File

@ -224,7 +224,6 @@ var MessageDialogContent = GObject.registerClass({
return GLib.SOURCE_REMOVE;
});
}
}
set title(title) {

View File

@ -33,8 +33,7 @@ class KbdA11yDialog extends GObject.Object {
: _("Slow Keys Turned Off");
description = _('You just held down the Shift key for 8 seconds. This is the shortcut ' +
'for the Slow Keys feature, which affects the way your keyboard works.');
} else if (whatChanged & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) {
} else if (whatChanged & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) {
key = KEY_STICKY_KEYS_ENABLED;
enabled = (newFlags & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) > 0;
title = enabled

View File

@ -205,7 +205,6 @@ var Notebook = GObject.registerClass({
scrollToBottom(index) {
let tabData = this._tabs[index];
tabData._scrollToBottom = true;
}
_onAdjustValueChanged(tabData) {

View File

@ -1656,7 +1656,6 @@ var ZoomRegion = class ZoomRegion {
var Crosshairs = GObject.registerClass(
class Crosshairs extends Clutter.Actor {
_init() {
// Set the group containing the crosshairs to three times the desktop
// size in case the crosshairs need to appear to be infinite in
// length (i.e., extend beyond the edges of the view they appear in).

View File

@ -291,7 +291,6 @@ var LabelExpanderLayout = GObject.registerClass({
if (child.visible)
child.allocate(box);
}
}
});

View File

@ -673,7 +673,6 @@ var PadOsd = GObject.registerClass({
// the same group.
this._groupPads.splice(this._groupPads.indexOf(device), 1);
this._updatePadChooser();
}
});

View File

@ -785,7 +785,6 @@ function getInputSourceManager() {
var InputSourceIndicatorContainer = GObject.registerClass(
class InputSourceIndicatorContainer extends St.Widget {
vfunc_get_preferred_width(forHeight) {
// Here, and in vfunc_get_preferred_height, we need to query
// for the height of all children, but we ignore the results

View File

@ -1588,7 +1588,6 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection {
this._summaryItem.menu.addSettingsAction(_('Network Settings'),
'gnome-network-panel.desktop');
this._summaryItem.hide();
}
_sync() {

View File

@ -77,7 +77,6 @@ var Client = class {
this.probing = this._proxy.Probing;
if (this.probing)
this.emit('probing-changed', this.probing);
}
_onPropertiesChanged(proxy, properties) {

View File

@ -487,7 +487,6 @@ var SwitcherList = GObject.registerClass({
this._scrollToRight(index);
else if (this._items[index].allocation.x1 - value < 0)
this._scrollToLeft(index);
}
_scrollToLeft(index) {

View File

@ -222,7 +222,6 @@ class UserWidget extends St.BoxLayout {
opacity: 0,
});
this.add_child(this._label);
}
this._updateUser();

View File

@ -357,7 +357,6 @@ var WorkspaceTracker = class {
workspace._windowAddedId = workspace.connect('window-added', this._queueCheckWorkspaces.bind(this));
workspace._windowRemovedId = workspace.connect('window-removed', this._windowRemoved.bind(this));
}
} else {
// Assume workspaces are only removed sequentially
// (e.g. 2,3,4 - not 2,4,7)
@ -516,7 +515,6 @@ var AppSwitchAction = GObject.registerClass({
}
vfunc_gesture_progress(_actor) {
if (this.get_n_current_points() == 3) {
for (let i = 0; i < this.get_n_current_points(); i++) {
let [startX, startY] = this.get_press_coords(i);
@ -526,7 +524,6 @@ var AppSwitchAction = GObject.registerClass({
Math.abs(y - startY) > APP_MOTION_THRESHOLD)
return false;
}
}
return true;

View File

@ -172,7 +172,6 @@ class WorkspaceSwitcherPopup extends St.Widget {
indicator = new St.Bin({ style_class: 'ws-switcher-box' });
this._list.add_actor(indicator);
}
let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);