cleanup: Remove some unhelpful unused arguments

Those unused arguments aren't bugs - unbeknownst to eslint, they all
correspond to valid signal parameters - but they don't contribute
anything to clarity, so just remove them anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627
This commit is contained in:
Florian Müllner 2019-02-04 12:30:53 +01:00
parent 0257de1b7e
commit 79cf3a6dd0
33 changed files with 70 additions and 70 deletions

View File

@ -15,7 +15,7 @@ const RealmIface = loadInterfaceXML("org.freedesktop.realmd.Realm");
const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface);
var Manager = class {
constructor(parentActor) {
constructor() {
this._aggregateProvider = Provider(Gio.DBus.system,
'org.freedesktop.realmd',
'/org/freedesktop/realmd',

View File

@ -88,7 +88,7 @@ class InputMethod extends Clutter.InputMethod {
this.commit(text.get_text());
}
_onDeleteSurroundingText(context) {
_onDeleteSurroundingText() {
this.delete_surrounding();
}
@ -108,12 +108,12 @@ class InputMethod extends Clutter.InputMethod {
this._preeditVisible = visible;
}
_onShowPreeditText(context) {
_onShowPreeditText() {
this._preeditVisible = true;
this.set_preedit_text(this._preeditStr, this._preeditPos);
}
_onHidePreeditText(context) {
_onHidePreeditText() {
this.set_preedit_text(null, this._preeditPos);
this._preeditVisible = false;
}

View File

@ -38,7 +38,7 @@ function waitAndDraw(milliseconds) {
let timeline = new Clutter.Timeline({ duration: milliseconds });
timeline.start();
timeline.connect('new-frame', (timeline, frame) => {
timeline.connect('new-frame', (_timeline, _frame) => {
global.stage.queue_redraw();
});

View File

@ -151,7 +151,7 @@ class PortalWindow extends Gtk.ApplicationWindow {
this._webView.load_uri(this._originalUrl);
}
vfunc_delete_event(event) {
vfunc_delete_event(_event) {
if (this._recheckAtExit)
this._doneCallback(PortalHelperResult.RECHECK);
else

View File

@ -839,7 +839,7 @@ var AppDisplay = class AppDisplay {
this._controls.add_actor(this._views[i].control);
let viewIndex = i;
this._views[i].control.connect('clicked', actor => {
this._views[i].control.connect('clicked', () => {
this._showView(viewIndex);
global.settings.set_uint('app-picker-view', viewIndex);
});
@ -1586,12 +1586,12 @@ var AppIcon = class AppIcon {
GLib.Source.set_name_by_id(this._menuTimeoutId, '[gnome-shell] this.popupMenu');
}
_onLeaveEvent(actor, event) {
_onLeaveEvent(_actor, _event) {
this.actor.fake_release();
this._removeMenuTimeout();
}
_onButtonPress(actor, event) {
_onButtonPress(_actor, event) {
let button = event.get_button();
if (button == 1) {
this._setPopupTimeout();

View File

@ -34,7 +34,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
throw new Error('Too few devices for a selection');
}
_buildLayout(devices) {
_buildLayout() {
let title = new St.Label({ style_class: 'audio-selection-title',
text: _("Select Audio Device"),
x_align: Clutter.ActorAlign.CENTER });

View File

@ -635,7 +635,7 @@ var Animation = class Animation {
load(callback) {
this._show = new GnomeDesktop.BGSlideShow({ file: this.file });
this._show.load_async(null, (object, result) => {
this._show.load_async(null, () => {
this.loaded = true;
if (callback)
callback();

View File

@ -172,19 +172,19 @@ var BarLevel = class {
cr.$dispose();
}
_getCurrentValue(actor) {
_getCurrentValue() {
return this._value;
}
_getOverdriveStart(actor) {
_getOverdriveStart() {
return this._overdriveStart;
}
_getMinimumValue(actor) {
_getMinimumValue() {
return 0;
}
_getMaximumValue(actor) {
_getMaximumValue() {
return this._maxValue;
}
@ -192,7 +192,7 @@ var BarLevel = class {
this._value = value;
}
_valueChanged(barLevel, value, property) {
_valueChanged() {
this._customAccessible.notify("accessible-value");
}

View File

@ -220,13 +220,13 @@ var DBusEventSource = class DBusEventSource {
this._lastRequestEnd = null;
}
_onNameAppeared(owner) {
_onNameAppeared() {
this._initialized = true;
this._resetCache();
this._loadEvents(true);
}
_onNameVanished(oldOwner) {
_onNameVanished() {
this._resetCache();
this.emit('changed');
}

View File

@ -176,21 +176,21 @@ class KeyringDialog extends ModalDialog.ModalDialog {
return false;
}
_onShowPassword(prompt) {
_onShowPassword() {
this._buildControlTable();
this._ensureOpen();
this._updateSensitivity(true);
this._passwordEntry.grab_key_focus();
}
_onShowConfirm(prompt) {
_onShowConfirm() {
this._buildControlTable();
this._ensureOpen();
this._updateSensitivity(true);
this._continueButton.grab_key_focus();
}
_onHidePrompt(prompt) {
_onHidePrompt() {
this.close();
}

View File

@ -734,7 +734,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
let dialogContent = DialogContent[this._type];
for (let i = 0; i < inhibitorObjectPaths.length; i++) {
let inhibitor = new GnomeSession.Inhibitor(inhibitorObjectPaths[i], (proxy, error) => {
let inhibitor = new GnomeSession.Inhibitor(inhibitorObjectPaths[i], proxy => {
this._onInhibitorLoaded(proxy);
});

View File

@ -203,12 +203,12 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog {
this.contentLayout.add(content);
}
_onCancelButtonPressed(button, event) {
_onCancelButtonPressed() {
this.close();
this._invocation.return_value(GLib.Variant.new('(s)', ['cancelled']));
}
_onInstallButtonPressed(button, event) {
_onInstallButtonPressed() {
let params = { shell_version: Config.PACKAGE_VERSION };
let url = REPOSITORY_URL_DOWNLOAD.format(this._uuid);

View File

@ -198,11 +198,11 @@ var CandidatePopup = class CandidatePopup {
this._setTextAttributes(this._preeditText.clutter_text,
attrs);
});
panelService.connect('show-preedit-text', ps => {
panelService.connect('show-preedit-text', () => {
this._preeditText.show();
this._updateVisibility();
});
panelService.connect('hide-preedit-text', ps => {
panelService.connect('hide-preedit-text', () => {
this._preeditText.hide();
this._updateVisibility();
});
@ -212,11 +212,11 @@ var CandidatePopup = class CandidatePopup {
this._auxText.text = text.get_text();
});
panelService.connect('show-auxiliary-text', ps => {
panelService.connect('show-auxiliary-text', () => {
this._auxText.show();
this._updateVisibility();
});
panelService.connect('hide-auxiliary-text', ps => {
panelService.connect('hide-auxiliary-text', () => {
this._auxText.hide();
this._updateVisibility();
});
@ -256,15 +256,15 @@ var CandidatePopup = class CandidatePopup {
this._candidateArea.setOrientation(lookupTable.get_orientation());
this._candidateArea.updateButtons(lookupTable.is_round(), page, nPages);
});
panelService.connect('show-lookup-table', ps => {
panelService.connect('show-lookup-table', () => {
this._candidateArea.actor.show();
this._updateVisibility();
});
panelService.connect('hide-lookup-table', ps => {
panelService.connect('hide-lookup-table', () => {
this._candidateArea.actor.hide();
this._updateVisibility();
});
panelService.connect('focus-out', ps => {
panelService.connect('focus-out', () => {
this._boxPointer.close(BoxPointer.PopupAnimation.NONE);
Main.keyboard.resetSuggestions();
});

View File

@ -100,7 +100,7 @@ class KeyContainer extends St.Widget {
this._rows = [];
}
appendRow(length) {
appendRow() {
this._currentRow++;
this._currentCol = 0;
@ -1171,7 +1171,7 @@ var Keyboard = class Keyboard {
this._emojiSelection = new EmojiSelection();
this._emojiSelection.connect('toggle', this._toggleEmoji.bind(this));
this._emojiSelection.connect('hide', (selection) => this.hide());
this._emojiSelection.connect('hide', () => this.hide());
this._emojiSelection.connect('emoji-selected', (selection, emoji) => {
this._keyboardController.commitString(emoji);
});
@ -1467,7 +1467,7 @@ var Keyboard = class Keyboard {
this._setActiveLayer(0);
}
_onKeyboardGroupsChanged(keyboard) {
_onKeyboardGroupsChanged() {
let nonGroupActors = [this._emojiSelection.actor, this._keypad.actor];
this._aspectContainer.get_children().filter(c => !nonGroupActors.includes(c)).forEach(c => {
c.destroy();

View File

@ -267,7 +267,7 @@ var ObjLink = class ObjLink {
this._lookingGlass = lookingGlass;
}
_onClicked(link) {
_onClicked() {
this._lookingGlass.inspectObject(this._obj, this.actor);
}
};

View File

@ -148,7 +148,7 @@ var Magnifier = class Magnifier {
setActive(activate) {
let isActive = this.isActive();
this._zoomRegions.forEach((zoomRegion, index, array) => {
this._zoomRegions.forEach(zoomRegion => {
zoomRegion.setActive(activate);
});
@ -234,7 +234,7 @@ var Magnifier = class Magnifier {
this.yMouse = yMouse;
let sysMouseOverAny = false;
this._zoomRegions.forEach((zoomRegion, index, array) => {
this._zoomRegions.forEach(zoomRegion => {
if (zoomRegion.scrollToMousePos())
sysMouseOverAny = true;
});
@ -332,7 +332,7 @@ var Magnifier = class Magnifier {
this.setCrosshairsClip(clip);
let theCrossHairs = this._crossHairs;
this._zoomRegions.forEach ((zoomRegion, index, array) => {
this._zoomRegions.forEach (zoomRegion => {
zoomRegion.addCrosshairs(theCrossHairs);
});
}

View File

@ -124,7 +124,7 @@ var ShellMagnifier = class ShellMagnifier {
let zoomRegions = Main.magnifier.getZoomRegions();
let objectPaths = [];
let thoseZoomers = this._zoomers;
zoomRegions.forEach ((aZoomRegion, index, array) => {
zoomRegions.forEach (aZoomRegion => {
let found = false;
for (let objectPath in thoseZoomers) {
let proxyAndZoomRegion = thoseZoomers[objectPath];

View File

@ -658,7 +658,7 @@ function _queueBeforeRedraw(workId) {
*
* Returns: A string work identifier
*/
function initializeDeferredWork(actor, callback, props) {
function initializeDeferredWork(actor, callback) {
// Turn into a string so we can use as an object property
let workId = `${(++_deferredWorkSequence)}`;
_deferredWorkData[workId] = { 'actor': actor,

View File

@ -489,7 +489,7 @@ class ActivitiesButton extends PanelMenu.Button {
return Clutter.EVENT_PROPAGATE;
}
_xdndToggleOverview(actor) {
_xdndToggleOverview() {
let [x, y, mask] = global.get_pointer();
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y);
@ -596,7 +596,7 @@ var PanelCorner = class {
// Synchronize the locate button's pseudo classes with this corner
this._buttonStyleChangedSignalId = button.connect('style-changed',
actor => {
() => {
let pseudoClass = button.get_style_pseudo_class();
this.actor.set_style_pseudo_class(pseudoClass);
});

View File

@ -72,13 +72,13 @@ var PointerWatcher = class {
}
}
_onIdleMonitorBecameActive(monitor) {
_onIdleMonitorBecameActive() {
this._idle = false;
this._updatePointer();
this._updateTimeout();
}
_onIdleMonitorBecameIdle(monitor) {
_onIdleMonitorBecameIdle() {
this._idle = true;
this._idleMonitor.add_user_active_watch(this._onIdleMonitorBecameActive.bind(this));
this._updateTimeout();
@ -108,7 +108,7 @@ var PointerWatcher = class {
}
_updatePointer() {
let [x, y, mods] = global.get_pointer();
let [x, y] = global.get_pointer();
if (this.pointerX == x && this.pointerY == y)
return;

View File

@ -122,7 +122,7 @@ var PopupBaseMenuItem = GObject.registerClass({
this._parent = parent;
}
_onButtonPressEvent(actor, event) {
_onButtonPressEvent() {
// This is the CSS active state
this.add_style_pseudo_class('active');
return Clutter.EVENT_PROPAGATE;
@ -1193,11 +1193,11 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
return super._onKeyPressEvent(actor, event);
}
activate(event) {
activate(_event) {
this._setOpenState(true);
}
_onButtonReleaseEvent(actor) {
_onButtonReleaseEvent() {
// Since we override the parent, we need to manage what the parent does
// with the active style class
this.remove_style_pseudo_class('active');

View File

@ -295,7 +295,7 @@ var SelectArea = class {
return Clutter.EVENT_PROPAGATE;
}
_onButtonRelease(actor, event) {
_onButtonRelease() {
this._result = this._getGeometry();
Tweener.addTween(this._group,
{ opacity: 0,

View File

@ -335,7 +335,7 @@ var ScreenSaverDBus = class {
screenShield.connect('active-changed', shield => {
this._dbusImpl.emit_signal('ActiveChanged', GLib.Variant.new('(b)', [shield.active]));
});
screenShield.connect('wake-up-screen', shield => {
screenShield.connect('wake-up-screen', () => {
this._dbusImpl.emit_signal('WakeUpScreen', null);
});

View File

@ -202,7 +202,7 @@ var Slider = class extends BarLevel.BarLevel {
this.emit('value-changed', this._value);
}
_getMinimumIncrement(actor) {
_getMinimumIncrement() {
return 0.1;
}
};

View File

@ -67,7 +67,7 @@ function ssidToLabel(ssid) {
return label;
}
function ensureActiveConnectionProps(active, client) {
function ensureActiveConnectionProps(active) {
if (!active._primaryDevice) {
let devices = active.get_devices();
if (devices.length > 0) {
@ -401,7 +401,7 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection {
let item = this._connectionItems.get(activeConnection.connection.get_uuid());
if (item) {
this._activeConnection = activeConnection;
ensureActiveConnectionProps(this._activeConnection, this._client);
ensureActiveConnectionProps(this._activeConnection);
item.setActiveConnection(this._activeConnection);
}
}
@ -1802,13 +1802,13 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
connection = this._client.get_primary_connection();
if (connection) {
ensureActiveConnectionProps(connection, this._client);
ensureActiveConnectionProps(connection);
return connection;
}
connection = this._client.get_activating_connection();
if (connection) {
ensureActiveConnectionProps(connection, this._client);
ensureActiveConnectionProps(connection);
return connection;
}
@ -1845,7 +1845,7 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
a => (a instanceof NM.VpnConnection)
);
vpnConnections.forEach(a => {
ensureActiveConnectionProps(a, this._client);
ensureActiveConnectionProps(a);
});
this._vpnSection.setActiveConnections(vpnConnections);

View File

@ -103,7 +103,7 @@ var StreamSlider = class {
this._slider.setValue(value);
}
_sliderChanged(slider, value, property) {
_sliderChanged(slider, value) {
if (!this._stream)
return;
@ -346,7 +346,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._control = getMixerControl();
this._volumeMenu = new VolumeMenu(this._control);
this._volumeMenu.connect('icon-changed', menu => {
this._volumeMenu.connect('icon-changed', () => {
let icon = this._volumeMenu.getIcon();
if (icon != null) {

View File

@ -196,7 +196,7 @@ var SwitcherPopup = GObject.registerClass({
return Clutter.EVENT_STOP;
}
_clickedOutside(actor, event) {
_clickedOutside() {
this.fadeAndDestroy();
return Clutter.EVENT_PROPAGATE;
}

View File

@ -169,8 +169,8 @@ var ClutterFrameTicker = class {
this._startTime = -1;
this._currentTime = -1;
this._timeline.connect('new-frame', (timeline, frame) => {
this._onNewFrame(frame);
this._timeline.connect('new-frame', () => {
this._onNewFrame();
});
let perfLog = Shell.PerfLog.get_default();
@ -186,7 +186,7 @@ var ClutterFrameTicker = class {
return 60;
}
_onNewFrame(frame) {
_onNewFrame() {
// If there is a lot of setup to start the animation, then
// first frame number we get from clutter might be a long ways
// into the animation (or the animation might even be done).

View File

@ -99,7 +99,7 @@ var UnlockDialog = class {
this._authPrompt.cancel();
}
_otherUserClicked(button, event) {
_otherUserClicked() {
Gdm.goto_login_session_sync(null);
this._authPrompt.cancel();

View File

@ -512,7 +512,7 @@ var ViewSelector = class {
return this._text.text == this._entry.get_text();
}
_onTextChanged(se, prop) {
_onTextChanged() {
let terms = getTermsForSearchString(this._entry.get_text());
this._searchActive = (terms.length > 0);

View File

@ -2035,7 +2035,7 @@ var WindowManager = class {
this._tilePreview.show(window, tileRect, monitorIndex);
}
_hideTilePreview(shellwm) {
_hideTilePreview() {
if (!this._tilePreview)
return;
this._tilePreview.hide();
@ -2103,11 +2103,11 @@ var WindowManager = class {
app.activate();
}
_toggleAppMenu(display, window, event, binding) {
_toggleAppMenu() {
Main.panel.toggleAppMenu();
}
_toggleCalendar(display, window, event, binding) {
_toggleCalendar() {
Main.panel.toggleCalendar();
}

View File

@ -376,7 +376,7 @@ var WindowClone = GObject.registerClass({
return false;
}
_onClicked(action, actor) {
_onClicked() {
this._activate();
}
@ -467,7 +467,7 @@ var WindowOverlay = class {
this._maxTitleWidth = -1;
this._updateCaptionId = metaWindow.connect('notify::title', w => {
this._updateCaptionId = metaWindow.connect('notify::title', () => {
this.title.text = this._getCaption();
this.relayout(false);
});

View File

@ -465,7 +465,7 @@ var WorkspaceThumbnail = class {
this._allWindows[i].disconnect(this._minimizedChangedIds[i]);
}
_onDestroy(actor) {
_onDestroy() {
this.workspaceRemoved();
if (this._bgManager) {