cleanup: Mark unused arguments as unused

This will stop eslint from warning about them, while keeping their
self-documenting benefit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627
This commit is contained in:
Florian Müllner 2019-01-31 15:08:10 +01:00
parent 79cf3a6dd0
commit 2f97a1a55d
44 changed files with 110 additions and 110 deletions

View File

@ -1241,7 +1241,7 @@ var LoginDialog = GObject.registerClass({
this._authPrompt.cancel(); this._authPrompt.cancel();
} }
addCharacter(unichar) { addCharacter(_unichar) {
// Don't allow type ahead at the login screen // Don't allow type ahead at the login screen
} }

View File

@ -303,7 +303,7 @@ var ShellUserVerifier = class {
}); });
} }
_oVirtUserAuthenticated(token) { _oVirtUserAuthenticated(_token) {
this._preemptingService = OVIRT_SERVICE_NAME; this._preemptingService = OVIRT_SERVICE_NAME;
this.emit('ovirt-user-authenticated'); this.emit('ovirt-user-authenticated');
} }

View File

@ -84,7 +84,7 @@ class InputMethod extends Clutter.InputMethod {
this.emit('request-surrounding'); this.emit('request-surrounding');
} }
_onCommitText(context, text) { _onCommitText(_context, text) {
this.commit(text.get_text()); this.commit(text.get_text());
} }
@ -92,7 +92,7 @@ class InputMethod extends Clutter.InputMethod {
this.delete_surrounding(); this.delete_surrounding();
} }
_onUpdatePreeditText(context, text, pos, visible) { _onUpdatePreeditText(_context, text, pos, visible) {
if (text == null) if (text == null)
return; return;
@ -118,7 +118,7 @@ class InputMethod extends Clutter.InputMethod {
this._preeditVisible = false; this._preeditVisible = false;
} }
_onForwardKeyEvent(context, keyval, keycode, state) { _onForwardKeyEvent(_context, keyval, keycode, state) {
let press = (state & IBus.ModifierType.RELEASE_MASK) == 0; let press = (state & IBus.ModifierType.RELEASE_MASK) == 0;
state &= ~(IBus.ModifierType.RELEASE_MASK); state &= ~(IBus.ModifierType.RELEASE_MASK);

View File

@ -199,7 +199,7 @@ var LoginManagerSystemd = class {
Signals.addSignalMethods(LoginManagerSystemd.prototype); Signals.addSignalMethods(LoginManagerSystemd.prototype);
var LoginManagerDummy = class { var LoginManagerDummy = class {
getCurrentSessionProxy(callback) { getCurrentSessionProxy(_callback) {
// we could return a DummySession object that fakes whatever callers // we could return a DummySession object that fakes whatever callers
// expect (at the time of writing: connect() and connectSignal() // expect (at the time of writing: connect() and connectSignal()
// methods), but just never calling the callback should be safer // methods), but just never calling the callback should be safer

View File

@ -110,7 +110,7 @@ var ModemGsm = class {
this.signal_quality = quality; this.signal_quality = quality;
this.emit('notify::signal-quality'); this.emit('notify::signal-quality');
}); });
this._proxy.connectSignal('RegistrationInfo', (proxy, sender, [status, code, name]) => { this._proxy.connectSignal('RegistrationInfo', (proxy, sender, [_status, code, name]) => {
this.operator_name = _findProviderForMccMnc(name, code); this.operator_name = _findProviderForMccMnc(name, code);
this.emit('notify::operator-name'); this.emit('notify::operator-name');
}); });

View File

@ -147,7 +147,7 @@ function script_overviewShowStart(time) {
overviewFrames = 0; overviewFrames = 0;
} }
function script_overviewShowDone(time) { function script_overviewShowDone(_time) {
// We've set up the state at the end of the zoom out, but we // We've set up the state at the end of the zoom out, but we
// need to wait for one more frame to paint before we count // need to wait for one more frame to paint before we count
// ourselves as done. // ourselves as done.
@ -166,7 +166,7 @@ function script_applicationsShowDone(time) {
METRICS.applicationsShowTimeSubsequent.value = time - applicationsShowStart; METRICS.applicationsShowTimeSubsequent.value = time - applicationsShowStart;
} }
function script_afterShowHide(time) { function script_afterShowHide(_time) {
if (overviewShowCount == 1) { if (overviewShowCount == 1) {
METRICS.usedAfterOverview.value = mallocUsedSize; METRICS.usedAfterOverview.value = mallocUsedSize;
} else { } else {

View File

@ -234,31 +234,31 @@ function script_applicationsShowDone(time) {
METRICS.applicationsShowTime.value = time - applicationsShowStart; METRICS.applicationsShowTime.value = time - applicationsShowStart;
} }
function script_mainViewDrawStart(time) { function script_mainViewDrawStart(_time) {
redrawTiming = 'mainView'; redrawTiming = 'mainView';
} }
function script_mainViewDrawDone(time) { function script_mainViewDrawDone(_time) {
redrawTiming = null; redrawTiming = null;
} }
function script_overviewDrawStart(time) { function script_overviewDrawStart(_time) {
redrawTiming = 'overview'; redrawTiming = 'overview';
} }
function script_overviewDrawDone(time) { function script_overviewDrawDone(_time) {
redrawTiming = null; redrawTiming = null;
} }
function script_redrawTestStart(time) { function script_redrawTestStart(_time) {
redrawTiming = 'application'; redrawTiming = 'application';
} }
function script_redrawTestDone(time) { function script_redrawTestDone(_time) {
redrawTiming = null; redrawTiming = null;
} }
function script_collectTimings(time) { function script_collectTimings(_time) {
for (let timing in redrawTimes) { for (let timing in redrawTimes) {
let times = redrawTimes[timing]; let times = redrawTimes[timing];
times.sort((a, b) => a - b); times.sort((a, b) => a - b);

View File

@ -177,7 +177,7 @@ class PortalWindow extends Gtk.ApplicationWindow {
this._headerBar.setSecurityIcon(PortalHelperSecurityLevel.INSECURE); this._headerBar.setSecurityIcon(PortalHelperSecurityLevel.INSECURE);
} }
_onLoadFailedWithTlsErrors(view, failingURI, certificate, errors) { _onLoadFailedWithTlsErrors(view, failingURI, certificate, _errors) {
this._headerBar.setSecurityIcon(PortalHelperSecurityLevel.INSECURE); this._headerBar.setSecurityIcon(PortalHelperSecurityLevel.INSECURE);
let uri = new Soup.URI(failingURI); let uri = new Soup.URI(failingURI);
this._webContext.allow_tls_certificate_for_host(certificate, uri.get_host()); this._webContext.allow_tls_certificate_for_host(certificate, uri.get_host());

View File

@ -79,7 +79,7 @@ class AccessDialog extends ModalDialog.ModalDialog {
this._requestExported = this._request.export(connection, this._handle); this._requestExported = this._request.export(connection, this._handle);
} }
CloseAsync(invocation, params) { CloseAsync(invocation, _params) {
if (this._invocation.get_sender() != invocation.get_sender()) { if (this._invocation.get_sender() != invocation.get_sender()) {
invocation.return_error_literal(Gio.DBusError, invocation.return_error_literal(Gio.DBusError,
Gio.DBusError.ACCESS_DENIED, Gio.DBusError.ACCESS_DENIED,

View File

@ -469,7 +469,7 @@ var CyclerList = GObject.registerClass({
'item-removed': { param_types: [GObject.TYPE_INT] }, 'item-removed': { param_types: [GObject.TYPE_INT] },
'item-highlighted': { param_types: [GObject.TYPE_INT] } }, 'item-highlighted': { param_types: [GObject.TYPE_INT] } },
}, class CyclerList extends St.Widget { }, class CyclerList extends St.Widget {
highlight(index, justOutline) { highlight(index, _justOutline) {
this.emit('item-highlighted', index); this.emit('item-highlighted', index);
} }
}); });
@ -494,7 +494,7 @@ var CyclerPopup = GObject.registerClass({
}); });
} }
_highlightItem(index, justOutline) { _highlightItem(index, _justOutline) {
this._highlight.window = this._items[index]; this._highlight.window = this._items[index];
global.window_group.set_child_above_sibling(this._highlight.actor, null); global.window_group.set_child_above_sibling(this._highlight.actor, null);
} }

View File

@ -109,7 +109,7 @@ class BaseAppView {
this._allItems = []; this._allItems = [];
} }
_childFocused(actor) { _childFocused(_actor) {
// Nothing by default // Nothing by default
} }
@ -986,7 +986,7 @@ var AppSearchProvider = class AppSearchProvider {
return results.slice(0, maxNumber); return results.slice(0, maxNumber);
} }
getInitialResultSet(terms, callback, cancellable) { getInitialResultSet(terms, callback, _cancellable) {
let query = terms.join(' '); let query = terms.join(' ');
let groups = Shell.AppSystem.search(query); let groups = Shell.AppSystem.search(query);
let usage = Shell.AppUsage.get_default(); let usage = Shell.AppUsage.get_default();
@ -1864,7 +1864,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
return item; return item;
} }
popup(activatingButton) { popup(_activatingButton) {
this._redisplay(); this._redisplay();
this.open(); this.open();
} }

View File

@ -188,7 +188,7 @@ var BarLevel = class {
return this._maxValue; return this._maxValue;
} }
_setCurrentValue(actor, value) { _setCurrentValue(_actor, value) {
this._value = value; this._value = value;
} }

View File

@ -109,15 +109,15 @@ var EmptyEventSource = class EmptyEventSource {
destroy() { destroy() {
} }
requestRange(begin, end) { requestRange(_begin, _end) {
} }
getEvents(begin, end) { getEvents(_begin, _end) {
let result = []; let result = [];
return result; return result;
} }
hasEvents(day) { hasEvents(_day) {
return false; return false;
} }
}; };
@ -235,7 +235,7 @@ var DBusEventSource = class DBusEventSource {
this._loadEvents(false); this._loadEvents(false);
} }
_onEventsReceived(results, error) { _onEventsReceived(results, _error) {
let newEvents = []; let newEvents = [];
let appointments = results[0] || []; let appointments = results[0] || [];
for (let n = 0; n < appointments.length; n++) { for (let n = 0; n < appointments.length; n++) {
@ -734,7 +734,7 @@ class NotificationMessage extends MessageList.Message {
return this.notification.source.createIcon(MESSAGE_ICON_SIZE); return this.notification.source.createIcon(MESSAGE_ICON_SIZE);
} }
_onUpdated(n, clear) { _onUpdated(n, _clear) {
this.setIcon(this._getIcon()); this.setIcon(this._getIcon());
this.setTitle(n.title); this.setTitle(n.title);
this.setBody(n.bannerBodyText); this.setBody(n.bannerBodyText);

View File

@ -55,7 +55,7 @@ var AutomountManager = class {
} }
} }
_InhibitorsChanged(object, senderName, [inhibtor]) { _InhibitorsChanged(_object, _senderName, [_inhibitor]) {
this._session.IsInhibitedRemote(GNOME_SESSION_AUTOMOUNT_INHIBIT, this._session.IsInhibitedRemote(GNOME_SESSION_AUTOMOUNT_INHIBIT,
(result, error) => { (result, error) => {
if (!error) { if (!error) {

View File

@ -199,7 +199,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
return true; return true;
} }
_getWirelessSecrets(secrets, wirelessSetting) { _getWirelessSecrets(secrets, _wirelessSetting) {
let wirelessSecuritySetting = this._connection.get_setting_wireless_security(); let wirelessSecuritySetting = this._connection.get_setting_wireless_security();
if (this._settingName == '802-1x') { if (this._settingName == '802-1x') {
@ -444,7 +444,7 @@ var VPNRequestHandler = class {
this._destroyed = true; this._destroyed = true;
} }
_vpnChildFinished(pid, status, requestObj) { _vpnChildFinished(pid, status, _requestObj) {
this._childWatch = 0; this._childWatch = 0;
if (this._newStylePlugin) { if (this._newStylePlugin) {
// For new style plugin, all work is done in the async reading functions // For new style plugin, all work is done in the async reading functions

View File

@ -383,11 +383,11 @@ var AuthenticationAgent = class {
this._currentDialog.performAuthentication(); this._currentDialog.performAuthentication();
} }
_onCancel(nativeAgent) { _onCancel(_nativeAgent) {
this._completeRequest(false); this._completeRequest(false);
} }
_onDialogDone(dialog, dismissed) { _onDialogDone(_dialog, dismissed) {
this._completeRequest(dismissed); this._completeRequest(dismissed);
} }

View File

@ -260,7 +260,7 @@ class TelepathyClient extends Tp.BaseClient {
context.accept(); context.accept();
} }
_delegatedChannelsCb(client, channels) { _delegatedChannelsCb(_client, _channels) {
// Nothing to do as we don't make a distinction between observed and // Nothing to do as we don't make a distinction between observed and
// handled channels. // handled channels.
} }
@ -562,7 +562,7 @@ var ChatSource = class extends MessageTray.Source {
// This is called for both messages we send from // This is called for both messages we send from
// our client and other clients as well. // our client and other clients as well.
_messageSent(channel, message, flags, token) { _messageSent(channel, message, _flags, _token) {
this._ensureNotification(); this._ensureNotification();
message = makeMessageFromTpMessage(message, NotificationDirection.SENT); message = makeMessageFromTpMessage(message, NotificationDirection.SENT);
this._notification.appendMessage(message); this._notification.appendMessage(message);
@ -600,7 +600,7 @@ var ChatSource = class extends MessageTray.Source {
} }
} }
_presenceChanged(contact, presence, status, message) { _presenceChanged(_contact, _presence, _status, _message) {
if (this._notification) if (this._notification)
this._notification.update(this._notification.title, this._notification.update(this._notification.title,
this._notification.bannerBodyText, this._notification.bannerBodyText,

View File

@ -241,14 +241,14 @@ class ShowAppsIcon extends DashItemContainer {
this.setLabelText(_("Show Applications")); this.setLabelText(_("Show Applications"));
} }
handleDragOver(source, actor, x, y, time) { handleDragOver(source, _actor, _x, _y, _time) {
if (!this._canRemoveApp(getAppFromSource(source))) if (!this._canRemoveApp(getAppFromSource(source)))
return DND.DragMotionResult.NO_DROP; return DND.DragMotionResult.NO_DROP;
return DND.DragMotionResult.MOVE_DROP; return DND.DragMotionResult.MOVE_DROP;
} }
acceptDrop(source, actor, x, y, time) { acceptDrop(source, _actor, _x, _y, _time) {
let app = getAppFromSource(source); let app = getAppFromSource(source);
if (!this._canRemoveApp(app)) if (!this._canRemoveApp(app))
return false; return false;
@ -790,7 +790,7 @@ var Dash = class Dash {
} }
} }
handleDragOver(source, actor, x, y, time) { handleDragOver(source, actor, x, y, _time) {
let app = getAppFromSource(source); let app = getAppFromSource(source);
// Don't allow favoriting of transient apps // Don't allow favoriting of transient apps
@ -868,7 +868,7 @@ var Dash = class Dash {
} }
// Draggable target interface // Draggable target interface
acceptDrop(source, actor, x, y, time) { acceptDrop(source, _actor, _x, _y, _time) {
let app = getAppFromSource(source); let app = getAppFromSource(source);
// Don't allow favoriting of transient apps // Don't allow favoriting of transient apps

View File

@ -26,7 +26,7 @@ var EdgeDragAction = GObject.registerClass({
return global.display.get_monitor_geometry(monitorIndex); return global.display.get_monitor_geometry(monitorIndex);
} }
vfunc_gesture_prepare(actor) { vfunc_gesture_prepare(_actor) {
if (this.get_n_current_points() == 0) if (this.get_n_current_points() == 0)
return false; return false;
@ -42,7 +42,7 @@ var EdgeDragAction = GObject.registerClass({
(this._side == St.Side.BOTTOM && y > monitorRect.y + monitorRect.height - EDGE_THRESHOLD)); (this._side == St.Side.BOTTOM && y > monitorRect.y + monitorRect.height - EDGE_THRESHOLD));
} }
vfunc_gesture_progress(actor) { vfunc_gesture_progress(_actor) {
let [startX, startY] = this.get_press_coords(0); let [startX, startY] = this.get_press_coords(0);
let [x, y] = this.get_motion_coords(0); let [x, y] = this.get_motion_coords(0);
let offsetX = Math.abs (x - startX); let offsetX = Math.abs (x - startX);
@ -62,7 +62,7 @@ var EdgeDragAction = GObject.registerClass({
return true; return true;
} }
vfunc_gesture_end(actor) { vfunc_gesture_end(_actor) {
let [startX, startY] = this.get_press_coords(0); let [startX, startY] = this.get_press_coords(0);
let [x, y] = this.get_motion_coords(0); let [x, y] = this.get_motion_coords(0);
let monitorRect = this._getMonitorRect(startX, startY); let monitorRect = this._getMonitorRect(startX, startY);

View File

@ -778,7 +778,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
}); });
} }
Close(parameters, invocation) { Close(_parameters, _invocation) {
this.close(); this.close();
} }
}); });

View File

@ -206,7 +206,7 @@ var CandidatePopup = class CandidatePopup {
this._preeditText.hide(); this._preeditText.hide();
this._updateVisibility(); this._updateVisibility();
}); });
panelService.connect('update-auxiliary-text', (ps, text, visible) => { panelService.connect('update-auxiliary-text', (_ps, text, visible) => {
this._auxText.visible = visible; this._auxText.visible = visible;
this._updateVisibility(); this._updateVisibility();
@ -220,7 +220,7 @@ var CandidatePopup = class CandidatePopup {
this._auxText.hide(); this._auxText.hide();
this._updateVisibility(); this._updateVisibility();
}); });
panelService.connect('update-lookup-table', (ps, lookupTable, visible) => { panelService.connect('update-lookup-table', (_ps, lookupTable, visible) => {
this._candidateArea.actor.visible = visible; this._candidateArea.actor.visible = visible;
this._updateVisibility(); this._updateVisibility();

View File

@ -71,14 +71,14 @@ class BaseIcon extends St.Bin {
this._iconThemeChangedId = cache.connect('icon-theme-changed', this._onIconThemeChanged.bind(this)); this._iconThemeChangedId = cache.connect('icon-theme-changed', this._onIconThemeChanged.bind(this));
} }
vfunc_get_preferred_width(forHeight) { vfunc_get_preferred_width(_forHeight) {
// Return the actual height to keep the squared aspect // Return the actual height to keep the squared aspect
return this.get_preferred_height(-1); return this.get_preferred_height(-1);
} }
// This can be overridden by a subclass, or by the createIcon // This can be overridden by a subclass, or by the createIcon
// parameter to _init() // parameter to _init()
createIcon(size) { createIcon(_size) {
throw new GObject.NotImplementedError(`createIcon in ${this.constructor.name}`); throw new GObject.NotImplementedError(`createIcon in ${this.constructor.name}`);
} }
@ -247,7 +247,7 @@ var IconGrid = GObject.registerClass({
child.disconnect(child._iconGridKeyFocusInId); child.disconnect(child._iconGridKeyFocusInId);
} }
vfunc_get_preferred_width(forHeight) { vfunc_get_preferred_width(_forHeight) {
if (this._fillParent) if (this._fillParent)
// Ignore all size requests of children and request a size of 0; // Ignore all size requests of children and request a size of 0;
// later we'll allocate as many children as fit the parent // later we'll allocate as many children as fit the parent
@ -797,7 +797,7 @@ var PaginatedIconGrid = GObject.registerClass({
this._childrenPerPage = 0; this._childrenPerPage = 0;
} }
vfunc_get_preferred_height(forWidth) { vfunc_get_preferred_height(_forWidth) {
let height = (this._availableHeightPerPageForItems() + this.bottomPadding + this.topPadding) * this._nPages + this._spaceBetweenPages * this._nPages; let height = (this._availableHeightPerPageForItems() + this.bottomPadding + this.topPadding) * this._nPages + this._spaceBetweenPages * this._nPages;
return [height, height]; return [height, height];
} }

View File

@ -1282,7 +1282,7 @@ var Keyboard = class Keyboard {
} }
} }
}); });
button.connect('released', (actor, keyval, str) => { button.connect('released', (actor, keyval, _str) => {
if (keyval != 0) { if (keyval != 0) {
if (button._keyvalPress) if (button._keyvalPress)
this._keyboardController.keyvalRelease(keyval); this._keyboardController.keyvalRelease(keyval);
@ -1729,7 +1729,7 @@ var KeyboardController = class {
this.emit('groups-changed'); this.emit('groups-changed');
} }
_onSourceChanged(inputSourceManager, oldSource) { _onSourceChanged(inputSourceManager, _oldSource) {
let source = inputSourceManager.currentSource; let source = inputSourceManager.currentSource;
this._currentSource = source; this._currentSource = source;
this.emit('active-group', source.id); this.emit('active-group', source.id);

View File

@ -165,12 +165,12 @@ var Monitor = class Monitor {
const UiActor = GObject.registerClass( const UiActor = GObject.registerClass(
class UiActor extends St.Widget { class UiActor extends St.Widget {
vfunc_get_preferred_width (forHeight) { vfunc_get_preferred_width (_forHeight) {
let width = global.stage.width; let width = global.stage.width;
return [width, width]; return [width, width];
} }
vfunc_get_preferred_height (forWidth) { vfunc_get_preferred_height (_forWidth) {
let height = global.stage.height; let height = global.stage.height;
return [height, height]; return [height, height];
} }
@ -1230,7 +1230,7 @@ var HotCorner = class HotCorner {
} }
} }
handleDragOver(source, actor, x, y, time) { handleDragOver(source, _actor, _x, _y, _time) {
if (source != Main.xdndHandler) if (source != Main.xdndHandler)
return DND.DragMotionResult.CONTINUE; return DND.DragMotionResult.CONTINUE;
@ -1347,7 +1347,7 @@ var PressureBarrier = class PressureBarrier {
this._barrierEvents = this._barrierEvents.slice(firstNewEvent); this._barrierEvents = this._barrierEvents.slice(firstNewEvent);
} }
_onBarrierLeft(barrier, event) { _onBarrierLeft(barrier, _event) {
barrier._isHit = false; barrier._isHit = false;
if (this._barriers.every(b => !b._isHit)) { if (this._barriers.every(b => !b._isHit)) {
this._reset(); this._reset();

View File

@ -856,7 +856,7 @@ var LookingGlass = class LookingGlass {
this._extensions = new Extensions(this); this._extensions = new Extensions(this);
notebook.appendPage('Extensions', this._extensions.actor); notebook.appendPage('Extensions', this._extensions.actor);
this._entry.clutter_text.connect('activate', (o, e) => { this._entry.clutter_text.connect('activate', (o, _e) => {
// Hide any completions we are currently showing // Hide any completions we are currently showing
this._hideCompletions(); this._hideCompletions();

View File

@ -827,7 +827,7 @@ Signals.addSignalMethods(Source.prototype);
var MessageTray = class MessageTray { var MessageTray = class MessageTray {
constructor() { constructor() {
this._presence = new GnomeSession.Presence((proxy, error) => { this._presence = new GnomeSession.Presence((proxy, _error) => {
this._onStatusChanged(proxy.status); this._onStatusChanged(proxy.status);
}); });
this._busy = false; this._busy = false;

View File

@ -386,16 +386,16 @@ var Overview = class {
this.emit('windows-restacked', stackIndices); this.emit('windows-restacked', stackIndices);
} }
beginItemDrag(source) { beginItemDrag(_source) {
this.emit('item-drag-begin'); this.emit('item-drag-begin');
this._inItemDrag = true; this._inItemDrag = true;
} }
cancelledItemDrag(source) { cancelledItemDrag(_source) {
this.emit('item-drag-cancelled'); this.emit('item-drag-cancelled');
} }
endItemDrag(source) { endItemDrag(_source) {
if (!this._inItemDrag) if (!this._inItemDrag)
return; return;
this.emit('item-drag-end'); this.emit('item-drag-end');

View File

@ -446,14 +446,14 @@ class ActivitiesButton extends PanelMenu.Button {
this._xdndTimeOut = 0; this._xdndTimeOut = 0;
} }
handleDragOver(source, actor, x, y, time) { handleDragOver(source, _actor, _x, _y, _time) {
if (source != Main.xdndHandler) if (source != Main.xdndHandler)
return DND.DragMotionResult.CONTINUE; return DND.DragMotionResult.CONTINUE;
if (this._xdndTimeOut != 0) if (this._xdndTimeOut != 0)
Mainloop.source_remove(this._xdndTimeOut); Mainloop.source_remove(this._xdndTimeOut);
this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT, () => { this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT, () => {
this._xdndToggleOverview(actor); this._xdndToggleOverview();
}); });
GLib.Source.set_name_by_id(this._xdndTimeOut, '[gnome-shell] this._xdndToggleOverview'); GLib.Source.set_name_by_id(this._xdndTimeOut, '[gnome-shell] this._xdndToggleOverview');
@ -826,7 +826,7 @@ class Panel extends St.Widget {
this._updatePanel(); this._updatePanel();
} }
vfunc_get_preferred_width(forHeight) { vfunc_get_preferred_width(_forHeight) {
let primaryMonitor = Main.layoutManager.primaryMonitor; let primaryMonitor = Main.layoutManager.primaryMonitor;
if (primaryMonitor) if (primaryMonitor)

View File

@ -33,7 +33,7 @@ class ButtonBox extends St.Widget {
this._natHPadding = themeNode.get_length('-natural-hpadding'); this._natHPadding = themeNode.get_length('-natural-hpadding');
} }
vfunc_get_preferred_width(forHeight) { vfunc_get_preferred_width(_forHeight) {
let child = this.get_first_child(); let child = this.get_first_child();
let minimumSize, naturalSize; let minimumSize, naturalSize;
@ -48,7 +48,7 @@ class ButtonBox extends St.Widget {
return [minimumSize, naturalSize]; return [minimumSize, naturalSize];
} }
vfunc_get_preferred_height(forWidth) { vfunc_get_preferred_height(_forWidth) {
let child = this.get_first_child(); let child = this.get_first_child();
if (child) if (child)

View File

@ -571,7 +571,7 @@ var PopupMenuBase = class {
menuItem.actor.grab_key_focus(); menuItem.actor.grab_key_focus();
} }
}); });
menuItem._activateId = menuItem.connect_after('activate', (menuItem, event) => { menuItem._activateId = menuItem.connect_after('activate', (menuItem, _event) => {
this.emit('activate', menuItem); this.emit('activate', menuItem);
this.itemActivated(BoxPointer.PopupAnimation.FULL); this.itemActivated(BoxPointer.PopupAnimation.FULL);
}); });

View File

@ -310,7 +310,7 @@ var RemoteSearchProvider = class {
this.proxy.ActivateResultRemote(id); this.proxy.ActivateResultRemote(id);
} }
launchSearch(terms) { launchSearch(_terms) {
// the provider is not compatible with the new version of the interface, launch // the provider is not compatible with the new version of the interface, launch
// the app itself but warn so we can catch the error in logs // the app itself but warn so we can catch the error in logs
log(`Search provider ${this.appInfo.get_id()} does not implement LaunchSearch`); log(`Search provider ${this.appInfo.get_id()} does not implement LaunchSearch`);

View File

@ -773,7 +773,7 @@ var ScreenShield = class {
return true; return true;
} }
_onDragEnd(action, actor, eventX, eventY, modifiers) { _onDragEnd(_action, _actor, _eventX, _eventY, _modifiers) {
if (this._lockScreenState != MessageTray.State.HIDING) if (this._lockScreenState != MessageTray.State.HIDING)
return; return;
if (this._lockScreenGroup.y < -(ARROW_DRAG_THRESHOLD * global.stage.height)) { if (this._lockScreenGroup.y < -(ARROW_DRAG_THRESHOLD * global.stage.height)) {

View File

@ -192,7 +192,7 @@ var SearchResultsBase = class {
Main.overview.toggle(); Main.overview.toggle();
} }
_setMoreCount(count) { _setMoreCount(_count) {
} }
_ensureResultActors(results, callback) { _ensureResultActors(results, callback) {

View File

@ -154,7 +154,7 @@ var ShellMountOperation = class {
this._dialog.open(); this._dialog.open();
} }
close(op) { close(_op) {
this._closeExistingDialog(); this._closeExistingDialog();
this._processesDialog = null; this._processesDialog = null;
@ -753,7 +753,7 @@ var GnomeShellMountOpHandler = class {
* Closes a dialog previously opened by AskPassword, AskQuestion or ShowProcesses. * Closes a dialog previously opened by AskPassword, AskQuestion or ShowProcesses.
* If no dialog is open, does nothing. * If no dialog is open, does nothing.
*/ */
Close(params, invocation) { Close(_params, _invocation) {
this._clearCurrentRequest(Gio.MountOperationResult.UNHANDLED, {}); this._clearCurrentRequest(Gio.MountOperationResult.UNHANDLED, {});
this._closeDialog(); this._closeDialog();
} }

View File

@ -182,7 +182,7 @@ var Slider = class extends BarLevel.BarLevel {
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
} }
_moveHandle(absX, absY) { _moveHandle(absX, _absY) {
let relX, sliderX; let relX, sliderX;
[sliderX] = this.actor.get_transformed_position(); [sliderX] = this.actor.get_transformed_position();
relX = absX - sliderX; relX = absX - sliderX;

View File

@ -657,7 +657,7 @@ var InputSourceManager = class {
return false; return false;
} }
_ibusSetContentType(im, purpose, hints) { _ibusSetContentType(im, purpose, _hints) {
if (purpose == IBus.InputPurpose.PASSWORD) { if (purpose == IBus.InputPurpose.PASSWORD) {
if (Object.keys(this._inputSources).length == Object.keys(this._ibusSources).length) if (Object.keys(this._inputSources).length == Object.keys(this._ibusSources).length)
return; return;

View File

@ -149,7 +149,7 @@ var NMConnectionItem = class {
this._sync(); this._sync();
} }
_connectionStateChanged(ac, newstate, reason) { _connectionStateChanged(_ac, _newstate, _reason) {
this._sync(); this._sync();
} }
@ -222,7 +222,7 @@ var NMConnectionSection = class NMConnectionSection {
return _("Connect"); return _("Connect");
} }
_connectionValid(connection) { _connectionValid(_connection) {
return true; return true;
} }
@ -377,7 +377,7 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection {
this._client.activate_connection_async(connection, this._device, null, null, null); this._client.activate_connection_async(connection, this._device, null, null, null);
} }
deactivateConnection(activeConnection) { deactivateConnection(_activeConnection) {
this._device.disconnect(null); this._device.disconnect(null);
} }
@ -1708,7 +1708,7 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
this._source.notify(this._notification); this._source.notify(this._notification);
} }
_onActivationFailed(device, reason) { _onActivationFailed(_device, _reason) {
// XXX: nm-applet has no special text depending on reason // XXX: nm-applet has no special text depending on reason
// but I'm not sure of this generic message // but I'm not sure of this generic message
this._notify('network-error-symbolic', this._notify('network-error-symbolic',

View File

@ -85,7 +85,7 @@ var SwitcherPopup = GObject.registerClass({
this._switcherList.allocate(childBox, flags); this._switcherList.allocate(childBox, flags);
} }
_initialSelection(backward, binding) { _initialSelection(backward, _binding) {
if (backward) if (backward)
this._select(this._items.length - 1); this._select(this._items.length - 1);
else if (this._items.length == 1) else if (this._items.length == 1)
@ -161,7 +161,7 @@ var SwitcherPopup = GObject.registerClass({
return mod(this._selectedIndex - 1, this._items.length); return mod(this._selectedIndex - 1, this._items.length);
} }
_keyPressHandler(keysym, action) { _keyPressHandler(_keysym, _action) {
throw new GObject.NotImplementedError(`_keyPressHandler in ${this.constructor.name}`); throw new GObject.NotImplementedError(`_keyPressHandler in ${this.constructor.name}`);
} }
@ -296,7 +296,7 @@ var SwitcherPopup = GObject.registerClass({
} }
} }
_finish(timestamp) { _finish(_timestamp) {
this.fadeAndDestroy(); this.fadeAndDestroy();
} }
@ -531,7 +531,7 @@ var SwitcherList = GObject.registerClass({
return themeNode.adjust_preferred_width(maxChildMin, minListWidth); return themeNode.adjust_preferred_width(maxChildMin, minListWidth);
} }
vfunc_get_preferred_height(forWidth) { vfunc_get_preferred_height(_forWidth) {
let maxChildMin = 0; let maxChildMin = 0;
let maxChildNat = 0; let maxChildNat = 0;

View File

@ -74,7 +74,7 @@ var ShowOverviewAction = GObject.registerClass({
}); });
} }
vfunc_gesture_prepare(actor) { vfunc_gesture_prepare(_actor) {
return Main.actionMode == Shell.ActionMode.NORMAL && return Main.actionMode == Shell.ActionMode.NORMAL &&
this.get_n_current_points() == this.get_n_touch_points(); this.get_n_current_points() == this.get_n_touch_points();
} }
@ -108,12 +108,12 @@ var ShowOverviewAction = GObject.registerClass({
height: maxY - minY }); height: maxY - minY });
} }
vfunc_gesture_begin(actor) { vfunc_gesture_begin(_actor) {
this._initialRect = this._getBoundingRect(false); this._initialRect = this._getBoundingRect(false);
return true; return true;
} }
vfunc_gesture_end(actor) { vfunc_gesture_end(_actor) {
let rect = this._getBoundingRect(true); let rect = this._getBoundingRect(true);
let oldArea = this._initialRect.width * this._initialRect.height; let oldArea = this._initialRect.width * this._initialRect.height;
let newArea = rect.width * rect.height; let newArea = rect.width * rect.height;

View File

@ -297,14 +297,14 @@ var WorkspaceTracker = class {
GLib.Source.set_name_by_id(id, '[gnome-shell] this._queueCheckWorkspaces'); GLib.Source.set_name_by_id(id, '[gnome-shell] this._queueCheckWorkspaces');
} }
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) { _windowLeftMonitor(metaDisplay, monitorIndex, _metaWin) {
// If the window left the primary monitor, that // If the window left the primary monitor, that
// might make that workspace empty // might make that workspace empty
if (monitorIndex == Main.layoutManager.primaryIndex) if (monitorIndex == Main.layoutManager.primaryIndex)
this._queueCheckWorkspaces(); this._queueCheckWorkspaces();
} }
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) { _windowEnteredMonitor(metaDisplay, monitorIndex, _metaWin) {
// If the window entered the primary monitor, that // If the window entered the primary monitor, that
// might make that workspace non-empty // might make that workspace non-empty
if (monitorIndex == Main.layoutManager.primaryIndex) if (monitorIndex == Main.layoutManager.primaryIndex)
@ -559,14 +559,14 @@ var WorkspaceSwitchAction = GObject.registerClass({
return (this._allowedModes & Main.actionMode); return (this._allowedModes & Main.actionMode);
} }
vfunc_gesture_progress(actor) { vfunc_gesture_progress(_actor) {
let [x, y] = this.get_motion_coords(0); let [x, y] = this.get_motion_coords(0);
let [xPress, yPress] = this.get_press_coords(0); let [xPress, yPress] = this.get_press_coords(0);
this.emit('motion', x - xPress, y - yPress); this.emit('motion', x - xPress, y - yPress);
return true; return true;
} }
vfunc_gesture_cancel(actor) { vfunc_gesture_cancel(_actor) {
if (!this._swept) if (!this._swept)
this.emit('cancel'); this.emit('cancel');
} }
@ -608,7 +608,7 @@ var AppSwitchAction = GObject.registerClass({
}); });
} }
vfunc_gesture_prepare(actor) { vfunc_gesture_prepare(_actor) {
if (Main.actionMode != Shell.ActionMode.NORMAL) { if (Main.actionMode != Shell.ActionMode.NORMAL) {
this.cancel(); this.cancel();
return false; return false;
@ -617,7 +617,7 @@ var AppSwitchAction = GObject.registerClass({
return this.get_n_current_points() <= 4; return this.get_n_current_points() <= 4;
} }
vfunc_gesture_begin(actor) { vfunc_gesture_begin(_actor) {
// in milliseconds // in milliseconds
const LONG_PRESS_TIMEOUT = 250; const LONG_PRESS_TIMEOUT = 250;
@ -641,7 +641,7 @@ var AppSwitchAction = GObject.registerClass({
return this.get_n_current_points() <= 4; return this.get_n_current_points() <= 4;
} }
vfunc_gesture_progress(actor) { vfunc_gesture_progress(_actor) {
const MOTION_THRESHOLD = 30; const MOTION_THRESHOLD = 30;
if (this.get_n_current_points() == 3) { if (this.get_n_current_points() == 3) {
@ -1430,7 +1430,7 @@ var WindowManager = class {
} }
} }
_sizeChangeWindow(shellwm, actor, whichChange, oldFrameRect, oldBufferRect) { _sizeChangeWindow(shellwm, actor, whichChange, oldFrameRect, _oldBufferRect) {
let types = [Meta.WindowType.NORMAL]; let types = [Meta.WindowType.NORMAL];
if (!this._shouldAnimateActor(actor, types)) { if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_size_change(actor); shellwm.completed_size_change(actor);
@ -1443,7 +1443,7 @@ var WindowManager = class {
shellwm.completed_size_change(actor); shellwm.completed_size_change(actor);
} }
_prepareAnimationInfo(shellwm, actor, oldFrameRect, change) { _prepareAnimationInfo(shellwm, actor, oldFrameRect, _change) {
// Position a clone of the window on top of the old position, // Position a clone of the window on top of the old position,
// while actor updates are frozen. // while actor updates are frozen.
let actorContent = Shell.util_get_content_for_window_actor(actor, oldFrameRect); let actorContent = Shell.util_get_content_for_window_actor(actor, oldFrameRect);

View File

@ -72,11 +72,11 @@ class WindowCloneLayout extends Clutter.LayoutManager {
return box; return box;
} }
vfunc_get_preferred_height(container, forWidth) { vfunc_get_preferred_height(_container, _forWidth) {
return [this._boundingBox.height, this._boundingBox.height]; return [this._boundingBox.height, this._boundingBox.height];
} }
vfunc_get_preferred_width(container, forHeight) { vfunc_get_preferred_width(_container, _forHeight) {
return [this._boundingBox.width, this._boundingBox.width]; return [this._boundingBox.width, this._boundingBox.width];
} }
@ -403,7 +403,7 @@ var WindowClone = GObject.registerClass({
return true; return true;
} }
_onDragBegin(draggable, time) { _onDragBegin(_draggable, _time) {
this._dragSlot = this._slot; this._dragSlot = this._slot;
[this.dragOrigX, this.dragOrigY] = this.get_position(); [this.dragOrigX, this.dragOrigY] = this.get_position();
this.dragOrigScale = this.scale_x; this.dragOrigScale = this.scale_x;
@ -419,11 +419,11 @@ var WindowClone = GObject.registerClass({
this._workspace.acceptDrop(source, actor, x, y, time); this._workspace.acceptDrop(source, actor, x, y, time);
} }
_onDragCancelled(draggable, time) { _onDragCancelled(_draggable, _time) {
this.emit('drag-cancelled'); this.emit('drag-cancelled');
} }
_onDragEnd(draggable, time, snapback) { _onDragEnd(_draggable, _time, _snapback) {
this.inDrag = false; this.inDrag = false;
// We may not have a parent if DnD completed successfully, in // We may not have a parent if DnD completed successfully, in
@ -845,7 +845,7 @@ var LayoutStrategy = class {
// row.width, row.height, row.fullWidth, row.fullHeight, and // row.width, row.height, row.fullWidth, row.fullHeight, and
// (optionally) for each row in @layout.rows. This method is // (optionally) for each row in @layout.rows. This method is
// intended to be called by subclasses. // intended to be called by subclasses.
_computeRowSizes(layout) { _computeRowSizes(_layout) {
throw new GObject.NotImplementedError(`_computeRowSizes in ${this.constructor.name}`); throw new GObject.NotImplementedError(`_computeRowSizes in ${this.constructor.name}`);
} }
@ -858,7 +858,7 @@ var LayoutStrategy = class {
// * gridWidth - The total width used by the grid, unscaled, unspaced. // * gridWidth - The total width used by the grid, unscaled, unspaced.
// * gridHeight - The totial height used by the grid, unscaled, unspaced. // * gridHeight - The totial height used by the grid, unscaled, unspaced.
// * rows - A list of rows, which should be instantiated by _newRow. // * rows - A list of rows, which should be instantiated by _newRow.
computeLayout(windows, layout) { computeLayout(_windows, _layout) {
throw new GObject.NotImplementedError(`computeLayout in ${this.constructor.name}`); throw new GObject.NotImplementedError(`computeLayout in ${this.constructor.name}`);
} }
@ -1979,7 +1979,7 @@ var Workspace = class {
} }
// Draggable target interface // Draggable target interface
handleDragOver(source, actor, x, y, time) { handleDragOver(source, _actor, _x, _y, _time) {
if (source.realWindow && !this._isMyWindow(source.realWindow)) if (source.realWindow && !this._isMyWindow(source.realWindow))
return DND.DragMotionResult.MOVE_DROP; return DND.DragMotionResult.MOVE_DROP;
if (source.shellWorkspaceLaunch) if (source.shellWorkspaceLaunch)

View File

@ -26,7 +26,7 @@ class WorkspaceSwitcherPopupList extends St.Widget {
}); });
} }
_getPreferredSizeForOrientation(forSize) { _getPreferredSizeForOrientation(_forSize) {
let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex); let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
let themeNode = this.get_theme_node(); let themeNode = this.get_theme_node();

View File

@ -200,16 +200,16 @@ var WindowClone = class {
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
} }
_onDragBegin(draggable, time) { _onDragBegin(_draggable, _time) {
this.inDrag = true; this.inDrag = true;
this.emit('drag-begin'); this.emit('drag-begin');
} }
_onDragCancelled(draggable, time) { _onDragCancelled(_draggable, _time) {
this.emit('drag-cancelled'); this.emit('drag-cancelled');
} }
_onDragEnd(draggable, time, snapback) { _onDragEnd(_draggable, _time, _snapback) {
this.inDrag = false; this.inDrag = false;
// We may not have a parent if DnD completed successfully, in // We may not have a parent if DnD completed successfully, in
@ -1123,7 +1123,7 @@ class ThumbnailsBox extends St.Widget {
this._stateUpdateQueued = true; this._stateUpdateQueued = true;
} }
vfunc_get_preferred_height(forWidth) { vfunc_get_preferred_height(_forWidth) {
// Note that for getPreferredWidth/Height we cheat a bit and skip propagating // Note that for getPreferredWidth/Height we cheat a bit and skip propagating
// the size request to our children because we know how big they are and know // the size request to our children because we know how big they are and know
// that the actors aren't depending on the virtual functions being called. // that the actors aren't depending on the virtual functions being called.
@ -1311,7 +1311,7 @@ class ThumbnailsBox extends St.Widget {
this._indicator.allocate(childBox, flags); this._indicator.allocate(childBox, flags);
} }
_activeWorkspaceChanged(wm, from, to, direction) { _activeWorkspaceChanged(_wm, _from, _to, _direction) {
let thumbnail; let thumbnail;
let workspaceManager = global.workspace_manager; let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace(); let activeWorkspace = workspaceManager.get_active_workspace();

View File

@ -286,7 +286,7 @@ var WorkspacesView = class extends WorkspacesViewBase {
this._syncActualGeometry(); this._syncActualGeometry();
} }
_activeWorkspaceChanged(wm, from, to, direction) { _activeWorkspaceChanged(_wm, _from, _to, _direction) {
if (this._scrolling) if (this._scrolling)
return; return;