From 71759a0769b37a34b1c5c9dbfebc433c5851b70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 31 Jan 2019 15:08:00 +0100 Subject: [PATCH] cleanup: Mark unused (but useful) variables as ignored While we aren't using those destructured variables, they are still useful to document the meaning of those elements. We don't want eslint to keep warning about them though, so mark them accordingly. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627 --- js/gdm/loginDialog.js | 2 +- js/misc/fileUtils.js | 2 +- js/misc/jsParse.js | 10 +++++----- js/misc/loginManager.js | 4 ++-- js/misc/modemManager.js | 6 +++--- js/misc/util.js | 16 ++++++++-------- js/misc/weather.js | 2 +- js/perf/hwtest.js | 2 +- js/ui/accessDialog.js | 2 +- js/ui/appDisplay.js | 4 ++-- js/ui/background.js | 8 ++++---- js/ui/components/networkAgent.js | 6 +++--- js/ui/components/telepathyClient.js | 12 ++++++------ js/ui/dateMenu.js | 6 +++--- js/ui/dnd.js | 4 ++-- js/ui/endSessionDialog.js | 2 +- js/ui/extensionSystem.js | 4 ++-- js/ui/iconGrid.js | 2 +- js/ui/keyboard.js | 6 +++--- js/ui/layout.js | 4 ++-- js/ui/magnifier.js | 4 ++-- js/ui/messageList.js | 6 +++--- js/ui/notificationDaemon.js | 4 ++-- js/ui/padOsd.js | 14 +++++++------- js/ui/remoteSearch.js | 2 +- js/ui/screenShield.js | 2 +- js/ui/screenshot.js | 2 +- js/ui/search.js | 2 +- js/ui/sessionMode.js | 4 ++-- js/ui/shellEntry.js | 2 +- js/ui/shellMountOperation.js | 2 +- js/ui/status/system.js | 2 +- js/ui/switcherPopup.js | 10 +++++----- js/ui/workspace.js | 2 +- js/ui/workspaceThumbnail.js | 2 +- js/ui/workspacesView.js | 2 +- js/ui/xdndHandler.js | 2 +- 37 files changed, 84 insertions(+), 84 deletions(-) diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index db8351df9..3e15e458e 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -372,7 +372,7 @@ var SessionMenuButton = class { } for (let i = 0; i < ids.length; i++) { - let [sessionName, sessionDescription] = Gdm.get_session_name_and_description(ids[i]); + let [sessionName, sessionDescription_] = Gdm.get_session_name_and_description(ids[i]); let id = ids[i]; let item = new PopupMenu.PopupMenuItem(sessionName); diff --git a/js/misc/fileUtils.js b/js/misc/fileUtils.js index 06ad76eaa..0a3c4a387 100644 --- a/js/misc/fileUtils.js +++ b/js/misc/fileUtils.js @@ -84,7 +84,7 @@ function loadInterfaceXML(iface) { let f = Gio.File.new_for_uri(uri); try { - let [ok, bytes] = f.load_contents(null); + let [ok_, bytes] = f.load_contents(null); if (bytes instanceof Uint8Array) xml = imports.byteArray.toString(bytes); else diff --git a/js/misc/jsParse.js b/js/misc/jsParse.js index 464e6bf8b..a25479117 100644 --- a/js/misc/jsParse.js +++ b/js/misc/jsParse.js @@ -8,7 +8,7 @@ // This function is likely the one you want to call from external modules function getCompletions(text, commandHeader, globalCompletionList) { let methods = []; - let expr, base; + let expr_, base; let attrHead = ''; if (globalCompletionList == null) { globalCompletionList = []; @@ -21,7 +21,7 @@ function getCompletions(text, commandHeader, globalCompletionList) { // Look for expressions like "Main.panel.foo" and match Main.panel and foo let matches = text.match(/(.*)\.(.*)/); if (matches) { - [expr, base, attrHead] = matches; + [expr_, base, attrHead] = matches; methods = getPropertyNamesFromExpression(base, commandHeader).filter( attr => attr.slice(0, attrHead.length) == attrHead @@ -32,7 +32,7 @@ function getCompletions(text, commandHeader, globalCompletionList) { // not proceeded by a dot and match them against global constants matches = text.match(/^(\w*)$/); if (text == '' || matches) { - [expr, attrHead] = matches; + [expr_, attrHead] = matches; methods = globalCompletionList.filter( attr => attr.slice(0, attrHead.length) == attrHead ); @@ -230,10 +230,10 @@ function isUnsafeExpression(str) { function getDeclaredConstants(str) { let ret = []; str.split(';').forEach(s => { - let base, keyword; + let base_, keyword; let match = s.match(/const\s+(\w+)\s*=/); if (match) { - [base, keyword] = match; + [base_, keyword] = match; ret.push(keyword); } }); diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js index fa5807794..74d20eadb 100644 --- a/js/misc/loginManager.js +++ b/js/misc/loginManager.js @@ -109,7 +109,7 @@ var LoginManagerSystemd = class { let sessionId = GLib.getenv('XDG_SESSION_ID'); if (!sessionId) { log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.'); - let [session, objectPath] = this._userProxy.Display; + let [session, objectPath_] = this._userProxy.Display; if (session) { log(`Will monitor session ${session}`); sessionId = session; @@ -182,7 +182,7 @@ var LoginManagerSystemd = class { (proxy, result) => { let fd = -1; try { - let [outVariant, fdList] = proxy.call_with_unix_fd_list_finish(result); + let [outVariant_, fdList] = proxy.call_with_unix_fd_list_finish(result); fd = fdList.steal_fds()[0]; callback(new Gio.UnixInputStream({ fd: fd })); } catch (e) { diff --git a/js/misc/modemManager.js b/js/misc/modemManager.js index c72253ab6..f7240b67c 100644 --- a/js/misc/modemManager.js +++ b/js/misc/modemManager.js @@ -120,7 +120,7 @@ var ModemGsm = class { return; } - let [status, code, name] = result; + let [status_, code, name] = result; this.operator_name = _findProviderForMccMnc(name, code); this.emit('notify::operator-name'); }); @@ -171,7 +171,7 @@ var ModemCdma = class { // it will return an error if the device is not connected this.operator_name = null; } else { - let [bandClass, band, sid] = result; + let [bandClass_, band_, sid] = result; this.operator_name = _findProviderForSid(sid); } @@ -224,7 +224,7 @@ var BroadbandModem = class { } _reloadSignalQuality() { - let [quality, recent] = this._proxy.SignalQuality; + let [quality, recent_] = this._proxy.SignalQuality; this.signal_quality = quality; this.emit('notify::signal-quality'); } diff --git a/js/misc/util.js b/js/misc/util.js index b97218e07..d4441d960 100644 --- a/js/misc/util.js +++ b/js/misc/util.js @@ -75,7 +75,7 @@ function spawn(argv) { // occur when trying to parse or start the program. function spawnCommandLine(commandLine) { try { - let [success, argv] = GLib.shell_parse_argv(commandLine); + let [success_, argv] = GLib.shell_parse_argv(commandLine); trySpawn(argv); } catch (err) { _handleSpawnError(commandLine, err); @@ -104,11 +104,11 @@ function spawnApp(argv) { // Runs @argv in the background. If launching @argv fails, // this will throw an error. function trySpawn(argv) { - var success, pid; + var success_, pid; try { - [success, pid] = GLib.spawn_async(null, argv, null, - GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, - null); + [success_, pid] = GLib.spawn_async(null, argv, null, + GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, + null); } catch (err) { /* Rewrite the error in case of ENOENT */ if (err.matches(GLib.SpawnError, GLib.SpawnError.NOENT)) { @@ -139,10 +139,10 @@ function trySpawn(argv) { // Runs @commandLine in the background. If launching @commandLine // fails, this will throw an error. function trySpawnCommandLine(commandLine) { - let success, argv; + let success_, argv; try { - [success, argv] = GLib.shell_parse_argv(commandLine); + [success_, argv] = GLib.shell_parse_argv(commandLine); } catch (err) { // Replace "Error invoking GLib.shell_parse_argv: " with // something nicer @@ -395,7 +395,7 @@ function makeCloseButton(boxpointer) { function ensureActorVisibleInScrollView(scrollView, actor) { let adjustment = scrollView.vscroll.adjustment; - let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values(); + let [value, lower_, upper, stepIncrement_, pageIncrement_, pageSize] = adjustment.get_values(); let offset = 0; let vfade = scrollView.get_effect("fade"); diff --git a/js/misc/weather.js b/js/misc/weather.js index 486a86050..efd8ce82d 100644 --- a/js/misc/weather.js +++ b/js/misc/weather.js @@ -234,7 +234,7 @@ var WeatherClient = class { } _onPermStoreChanged(proxy, sender, params) { - let [table, id, deleted, data, perms] = params; + let [table, id, deleted_, data_, perms] = params; if (table != 'gnome' || id != 'geolocation') return; diff --git a/js/perf/hwtest.js b/js/perf/hwtest.js index 43b663c2d..15ba6b897 100644 --- a/js/perf/hwtest.js +++ b/js/perf/hwtest.js @@ -74,7 +74,7 @@ function extractBootTimestamp() { let datastream = Gio.DataInputStream.new(sp.get_stdout_pipe()); while (true) { - let [line, length] = datastream.read_line_utf8(null); + let [line, length_] = datastream.read_line_utf8(null); if (line === null) break; diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js index 9dbc1a910..462abe31e 100644 --- a/js/ui/accessDialog.js +++ b/js/ui/accessDialog.js @@ -132,7 +132,7 @@ var AccessDialogDBus = class { return; } - let [handle, appId, parentWindow, title, subtitle, body, options] = params; + let [handle, appId, parentWindow_, title, subtitle, body, options] = params; // We probably want to use parentWindow and global.display.focus_window // for this check in the future if (appId && `${appId}.desktop` != this._windowTracker.focus_app.id) { diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 9129c7776..5bb8e61ff 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -546,7 +546,7 @@ var AllView = class AllView extends BaseAppView { return false; this._panning = true; this._clickAction.release(); - let [dist, dx, dy] = action.get_motion_delta(0); + let [dist_, dx_, dy] = action.get_motion_delta(0); let adjustment = this._adjustment; adjustment.value -= (dy / this._scrollView.height) * adjustment.page_size; return false; @@ -1066,7 +1066,7 @@ var FolderView = class FolderView extends BaseAppView { } _onPan(action) { - let [dist, dx, dy] = action.get_motion_delta(0); + let [dist_, dx_, dy] = action.get_motion_delta(0); let adjustment = this.actor.vscroll.adjustment; adjustment.value -= (dy / this.actor.height) * adjustment.page_size; return false; diff --git a/js/ui/background.js b/js/ui/background.js index 38f52c670..2429c7cab 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -333,12 +333,12 @@ var Background = class Background { } _loadPattern() { - let colorString, res, color, secondColor; + let colorString, res_, color, secondColor; colorString = this._settings.get_string(PRIMARY_COLOR_KEY); - [res, color] = Clutter.Color.from_string(colorString); + [res_, color] = Clutter.Color.from_string(colorString); colorString = this._settings.get_string(SECONDARY_COLOR_KEY); - [res, secondColor] = Clutter.Color.from_string(colorString); + [res_, secondColor] = Clutter.Color.from_string(colorString); let shadingType = this._settings.get_enum(COLOR_SHADING_TYPE_KEY); @@ -651,7 +651,7 @@ var Animation = class Animation { if (this._show.get_num_slides() < 1) return; - let [progress, duration, isFixed, filename1, filename2] = this._show.get_current_slide(monitor.width, monitor.height); + let [progress, duration, isFixed_, filename1, filename2] = this._show.get_current_slide(monitor.width, monitor.height); this.transitionDuration = duration; this.transitionProgress = progress; diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 597bb1883..338371d13 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -385,7 +385,7 @@ var VPNRequestHandler = class { this._newStylePlugin = authHelper.externalUIMode; try { - let [success, pid, stdin, stdout, stderr] = + let [success_, pid, stdin, stdout, stderr] = GLib.spawn_async_with_pipes(null, /* pwd */ argv, null, /* envp */ @@ -486,7 +486,7 @@ var VPNRequestHandler = class { _readStdoutOldStyle() { this._dataStdout.read_line_async(GLib.PRIORITY_DEFAULT, null, (stream, result) => { - let [line, len] = this._dataStdout.read_line_finish_utf8(result); + let [line, len_] = this._dataStdout.read_line_finish_utf8(result); if (line == null) { // end of file @@ -541,7 +541,7 @@ var VPNRequestHandler = class { message: keyfile.get_string(VPN_UI_GROUP, 'Description'), secrets: [] }; - let [groups, len] = keyfile.get_groups(); + let [groups, len_] = keyfile.get_groups(); for (let i = 0; i < groups.length; i++) { if (groups[i] == VPN_UI_GROUP) continue; diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index 0fefd960e..e8b2dbabb 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -41,7 +41,7 @@ var NotificationDirection = { }; function makeMessageFromTpMessage(tpMessage, direction) { - let [text, flags] = tpMessage.to_text(); + let [text, flags_] = tpMessage.to_text(); let timestamp = tpMessage.get_sent_timestamp(); if (timestamp == 0) @@ -148,11 +148,11 @@ class TelepathyClient extends Tp.BaseClient { } vfunc_observe_channels(...args) { - let [account, conn, channels, dispatchOp, requests, context] = args; + let [account, conn, channels, dispatchOp_, requests_, context] = args; let len = channels.length; for (let i = 0; i < len; i++) { let channel = channels[i]; - let [targetHandle, targetHandleType] = channel.get_handle(); + let [targetHandle_, targetHandleType] = channel.get_handle(); if (channel.get_invalidated()) continue; @@ -181,7 +181,7 @@ class TelepathyClient extends Tp.BaseClient { } vfunc_handle_channels(...args) { - let [account, conn, channels, requests, userActionTime, context] = args; + let [account, conn, channels, requests_, userActionTime_, context] = args; this._handlingChannels(account, conn, channels, true); context.accept(); } @@ -239,7 +239,7 @@ class TelepathyClient extends Tp.BaseClient { } _approveTextChannel(account, conn, channel, dispatchOp, context) { - let [targetHandle, targetHandleType] = channel.get_handle(); + let [targetHandle_, targetHandleType] = channel.get_handle(); if (targetHandleType != Tp.HandleType.CONTACT) { context.fail(new Tp.Error({ code: Tp.Error.INVALID_ARGUMENT, @@ -427,7 +427,7 @@ var ChatSource = class extends MessageTray.Source { } _displayPendingMessages(logManager, result) { - let [success, events] = logManager.get_filtered_events_finish(result); + let [success_, events] = logManager.get_filtered_events_finish(result); let logMessages = events.map(makeMessageFromTplEvent); this._ensureNotification(); diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index 87979bd61..4b6dd922a 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -249,12 +249,12 @@ var WeatherSection = class WeatherSection { let current = info; let infos = [info]; for (let i = 0; i < forecasts.length; i++) { - let [ok, timestamp] = forecasts[i].get_value_update(); + let [ok_, timestamp] = forecasts[i].get_value_update(); let datetime = new Date(timestamp * 1000); if (!_isToday(datetime)) continue; // Ignore forecasts from other days - [ok, timestamp] = current.get_value_update(); + [ok_, timestamp] = current.get_value_update(); let currenttime = new Date(timestamp * 1000); if (currenttime.getHours() == datetime.getHours()) continue; // Enforce a minimum interval of 1h @@ -275,7 +275,7 @@ var WeatherSection = class WeatherSection { let col = 0; infos.forEach(fc => { - let [ok, timestamp] = fc.get_value_update(); + let [ok_, timestamp] = fc.get_value_update(); let timeStr = Util.formatTime(new Date(timestamp * 1000), { timeOnly: true }); diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 99273b781..5172b845f 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -503,7 +503,7 @@ var _Draggable = class _Draggable { while (target) { if (target._delegate && target._delegate.handleDragOver) { - let [r, targX, targY] = target.transform_stage_point(this._dragX, this._dragY); + let [r_, targX, targY] = target.transform_stage_point(this._dragX, this._dragY); // We currently loop through all parents on drag-over even if one of the children has handled it. // We can check the return value of the function and break the loop if it's true if we don't want // to continue checking the parents. @@ -575,7 +575,7 @@ var _Draggable = class _Draggable { while (target) { if (target._delegate && target._delegate.acceptDrop) { - let [r, targX, targY] = target.transform_stage_point(dropX, dropY); + let [r_, targX, targY] = target.transform_stage_point(dropX, dropY); if (target._delegate.acceptDrop(this.actor._delegate, this._dragActor, targX, diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index 5288badc8..491fee8d0 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -668,7 +668,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._loginManager.listSessions(result => { let n = 0; for (let i = 0; i < result.length; i++) { - let [id, uid, userName, seat, sessionPath] = result[i]; + let [id_, uid_, userName, seat_, sessionPath] = result[i]; let proxy = new LogindSession(Gio.DBus.system, 'org.freedesktop.login1', sessionPath); if (proxy.Class != 'user') diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index 2099d709d..7cf5e4453 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -203,9 +203,9 @@ var ExtensionManager = class { throw new Error('Missing metadata.json'); } - let metadataContents, success; + let metadataContents, success_; try { - [success, metadataContents] = metadataFile.load_contents(null); + [success_, metadataContents] = metadataFile.load_contents(null); if (metadataContents instanceof Uint8Array) metadataContents = imports.byteArray.toString(metadataContents); } catch (e) { diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index c80f7fe1a..5eec995c5 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -865,7 +865,7 @@ var PaginatedIconGrid = GObject.registerClass({ } _computePages(availWidthPerPage, availHeightPerPage) { - let [nColumns, usedWidth] = this._computeLayout(availWidthPerPage); + let [nColumns, usedWidth_] = this._computeLayout(availWidthPerPage); let nRows; let children = this._getVisibleChildren(); if (nColumns > 0) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 0372fb8ea..d4d41a638 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -474,7 +474,7 @@ var KeyboardModel = class { _loadModel(groupName) { let file = Gio.File.new_for_uri('resource:///org/gnome/shell/osk-layouts/%s.json'.format(groupName)); - let [success, contents] = file.load_contents(null); + let [success_, contents] = file.load_contents(null); if (contents instanceof Uint8Array) contents = imports.byteArray.toString(contents); @@ -662,7 +662,7 @@ var EmojiPager = class EmojiPager { } _onPan(action) { - let [dist, dx, dy] = action.get_motion_delta(0); + let [dist_, dx, dy_] = action.get_motion_delta(0); this.delta = this.delta + dx; if (this._currentKey != null) { @@ -904,7 +904,7 @@ var EmojiSelection = class EmojiSelection { _populateSections() { let file = Gio.File.new_for_uri('resource:///org/gnome/shell/osk-layouts/emoji.json'); - let [success, contents] = file.load_contents(null); + let [success_, contents] = file.load_contents(null); if (contents instanceof Uint8Array) contents = imports.byteArray.toString(contents); diff --git a/js/ui/layout.js b/js/ui/layout.js index 6e2664738..2e6db7b6f 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -1331,7 +1331,7 @@ var PressureBarrier = class PressureBarrier { let threshold = this._lastTime - this._timeout; while (i < this._barrierEvents.length) { - let [time, distance] = this._barrierEvents[i]; + let [time, distance_] = this._barrierEvents[i]; if (time >= threshold) break; i++; @@ -1340,7 +1340,7 @@ var PressureBarrier = class PressureBarrier { let firstNewEvent = i; for (i = 0; i < firstNewEvent; i++) { - let [time, distance] = this._barrierEvents[i]; + let [time_, distance] = this._barrierEvents[i]; this._currentPressure -= distance; } diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 8713794c7..379ff5b4d 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -359,7 +359,7 @@ var Magnifier = class Magnifier { */ setCrosshairsColor(color) { if (this._crossHairs) { - let [res, clutterColor] = Clutter.Color.from_string(color); + let [res_, clutterColor] = Clutter.Color.from_string(color); this._crossHairs.setColor(clutterColor); } } @@ -1514,7 +1514,7 @@ var ZoomRegion = class ZoomRegion { } _centerFromPointProportional(xPoint, yPoint) { - let [xRoi, yRoi, widthRoi, heightRoi] = this.getROI(); + let [xRoi_, yRoi_, widthRoi, heightRoi] = this.getROI(); let halfScreenWidth = global.screen_width / 2; let halfScreenHeight = global.screen_height / 2; // We want to pad with a constant distance after zooming, so divide diff --git a/js/ui/messageList.js b/js/ui/messageList.js index c8f4b9346..2cc116416 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -130,12 +130,12 @@ var URLHighlighter = class URLHighlighter { } _findUrlAtPos(event) { - let success; + let success_; let [x, y] = event.get_coords(); - [success, x, y] = this.actor.transform_stage_point(x, y); + [success_, x, y] = this.actor.transform_stage_point(x, y); let findPos = -1; for (let i = 0; i < this.actor.clutter_text.text.length; i++) { - let [success, px, py, lineHeight] = this.actor.clutter_text.position_to_coords(i); + let [success_, px, py, lineHeight] = this.actor.clutter_text.position_to_coords(i); if (py > y || py + lineHeight < y || x < px) continue; findPos = i; diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 17844ca5e..c541bd0a4 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -64,7 +64,7 @@ var FdoNotificationDaemon = class FdoNotificationDaemon { _imageForNotificationData(hints) { if (hints['image-data']) { let [width, height, rowStride, hasAlpha, - bitsPerSample, nChannels, data] = hints['image-data']; + bitsPerSample, nChannels_, data] = hints['image-data']; return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha, bitsPerSample, width, height, rowStride); } else if (hints['image-path']) { @@ -259,7 +259,7 @@ var FdoNotificationDaemon = class FdoNotificationDaemon { } _notifyForSource(source, ndata) { - let [id, icon, summary, body, actions, hints, notification] = + let [id_, icon, summary, body, actions, hints, notification] = [ndata.id, ndata.icon, ndata.summary, ndata.body, ndata.actions, ndata.hints, ndata.notification]; diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index 0da827718..2e76240bb 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -295,7 +295,7 @@ var PadDiagram = GObject.registerClass({ }, class PadDiagram extends St.DrawingArea { _init(params) { let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css'); - let [success, css, etag] = file.load_contents(null); + let [success_, css] = file.load_contents(null); if (css instanceof Uint8Array) css = imports.byteArray.toString(css); this._curEdited = null; @@ -419,13 +419,13 @@ var PadDiagram = GObject.registerClass({ for (let i = 0; i < this._labels.length; i++) { let [label, action, idx, dir] = this._labels[i]; - let [found, x, y, arrangement] = this.getLabelCoords(action, idx, dir); + let [found_, x, y, arrangement] = this.getLabelCoords(action, idx, dir); this._allocateChild(label, x, y, arrangement); } if (this._editorActor && this._curEdited) { - let [label, action, idx, dir] = this._curEdited; - let [found, x, y, arrangement] = this.getLabelCoords(action, idx, dir); + let [label_, action, idx, dir] = this._curEdited; + let [found_, x, y, arrangement] = this.getLabelCoords(action, idx, dir); this._allocateChild(this._editorActor, x, y, arrangement); } } @@ -561,7 +561,7 @@ var PadDiagram = GObject.registerClass({ if (str != null) { label.set_text(str); - let [found, x, y, arrangement] = this.getLabelCoords(action, idx, dir); + let [found_, x, y, arrangement] = this.getLabelCoords(action, idx, dir); this._allocateChild(label, x, y, arrangement); } label.show(); @@ -789,13 +789,13 @@ var PadOsd = class { } else if (event.get_source_device() == this.padDevice && event.type() == Clutter.EventType.PAD_STRIP) { if (this._editionMode) { - let [retval, number, mode] = event.get_pad_event_details(); + let [retval_, number, mode] = event.get_pad_event_details(); this._startStripActionEdition(number, UP, mode); } } else if (event.get_source_device() == this.padDevice && event.type() == Clutter.EventType.PAD_RING) { if (this._editionMode) { - let [retval, number, mode] = event.get_pad_event_details(); + let [retval_, number, mode] = event.get_pad_event_details(); this._startRingActionEdition(number, CCW, mode); } } diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js index b9d20325c..808417961 100644 --- a/js/ui/remoteSearch.js +++ b/js/ui/remoteSearch.js @@ -221,7 +221,7 @@ var RemoteSearchProvider = class { gicon = Gio.icon_new_for_string(meta['gicon']); } else if (meta['icon-data']) { let [width, height, rowStride, hasAlpha, - bitsPerSample, nChannels, data] = meta['icon-data']; + bitsPerSample, nChannels_, data] = meta['icon-data']; gicon = Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha, bitsPerSample, width, height, rowStride); } diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 4bcaa7fee..203c3ada8 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -778,7 +778,7 @@ var ScreenShield = class { return; if (this._lockScreenGroup.y < -(ARROW_DRAG_THRESHOLD * global.stage.height)) { // Complete motion automatically - let [velocity, velocityX, velocityY] = this._dragAction.get_velocity(0); + let [velocity_, velocityX_, velocityY] = this._dragAction.get_velocity(0); this._liftShield(true, -velocityY); } else { // restore the lock screen to its original place diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index c9f6bc1f4..320739547 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -199,7 +199,7 @@ var ScreenshotService = class { if (!screenshot) return; screenshot.pick_color(...coords, (o, res) => { - let [success, color] = screenshot.pick_color_finish(res); + let [success_, color] = screenshot.pick_color_finish(res); let { red, green, blue } = color; let retval = GLib.Variant.new('(a{sv})', [{ color: GLib.Variant.new('(ddd)', [ diff --git a/js/ui/search.js b/js/ui/search.js index ab6ba9dfa..b1235eb65 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -560,7 +560,7 @@ var SearchResults = class { } _onPan(action) { - let [dist, dx, dy] = action.get_motion_delta(0); + let [dist_, dx_, dy] = action.get_motion_delta(0); let adjustment = this._scrollView.vscroll.adjustment; adjustment.value -= (dy / this.actor.height) * adjustment.page_size; return false; diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index 0a35afed0..91ce58c4a 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -114,9 +114,9 @@ function _loadMode(file, info) { if (_modes.hasOwnProperty(modeName)) return; - let fileContent, success, newMode; + let fileContent, success_, newMode; try { - [success, fileContent] = file.load_contents(null); + [success_, fileContent] = file.load_contents(null); if (fileContent instanceof Uint8Array) fileContent = imports.byteArray.toString(fileContent); newMode = JSON.parse(fileContent); diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index 102aee5ac..3b18d3459 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -134,7 +134,7 @@ function _onButtonPressEvent(actor, event, entry) { } function _onPopup(actor, entry) { - let [success, textX, textY, lineHeight] = entry.clutter_text.position_to_coords(-1); + let [success, textX, textY_, lineHeight_] = entry.clutter_text.position_to_coords(-1); if (success) entry.menu.setSourceAlignment(textX / entry.width); entry.menu.open(BoxPointer.PopupAnimation.FULL); diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index ef2ad3ec5..14cf0db6e 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -628,7 +628,7 @@ var GnomeShellMountOpHandler = class { * attempt went wrong. */ AskPasswordAsync(params, invocation) { - let [id, message, iconName, defaultUser, defaultDomain, flags] = params; + let [id, message, iconName, defaultUser_, defaultDomain_, flags] = params; if (this._setCurrentRequest(invocation, id, ShellMountOperationType.ASK_PASSWORD)) { this._dialog.reaskPassword(); diff --git a/js/ui/status/system.js b/js/ui/status/system.js index adb32116f..6c2e2c8e2 100644 --- a/js/ui/status/system.js +++ b/js/ui/status/system.js @@ -39,7 +39,7 @@ var AltSwitcher = class { let childToShow = null; if (this._standard.visible && this._alternate.visible) { - let [x, y, mods] = global.get_pointer(); + let [x_, y_, mods] = global.get_pointer(); let altPressed = (mods & Clutter.ModifierType.MOD1_MASK) != 0; if (this._flipped) childToShow = altPressed ? this._standard : this._alternate; diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js index 9e7310a84..6e0690809 100644 --- a/js/ui/switcherPopup.js +++ b/js/ui/switcherPopup.js @@ -131,7 +131,7 @@ var SwitcherPopup = GObject.registerClass({ // details.) So we check now. (Have to do this after updating // selection.) if (this._modifierMask) { - let [x, y, mods] = global.get_pointer(); + let [x_, y_, mods] = global.get_pointer(); if (!(mods & this._modifierMask)) { this._finish(global.get_current_time()); return false; @@ -184,7 +184,7 @@ var SwitcherPopup = GObject.registerClass({ _keyReleaseEvent(actor, event) { if (this._modifierMask) { - let [x, y, mods] = global.get_pointer(); + let [x_, y_, mods] = global.get_pointer(); let state = mods & this._modifierMask; if (state == 0) @@ -439,7 +439,7 @@ var SwitcherList = GObject.registerClass({ let adjustment = this._scrollView.hscroll.adjustment; let [value] = adjustment.get_values(); let [absItemX] = this._items[index].get_transformed_position(); - let [result, posX, posY] = this.transform_stage_point(absItemX, 0); + let [result_, posX, posY_] = this.transform_stage_point(absItemX, 0); let [containerWidth] = this.get_transformed_size(); if (posX + this._items[index].get_width() > containerWidth) this._scrollToRight(); @@ -450,7 +450,7 @@ var SwitcherList = GObject.registerClass({ _scrollToLeft() { let adjustment = this._scrollView.hscroll.adjustment; - let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values(); + let [value, lower_, upper, stepIncrement_, pageIncrement_, pageSize] = adjustment.get_values(); let item = this._items[this._highlighted]; @@ -474,7 +474,7 @@ var SwitcherList = GObject.registerClass({ _scrollToRight() { let adjustment = this._scrollView.hscroll.adjustment; - let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values(); + let [value, lower_, upper, stepIncrement_, pageIncrement_, pageSize] = adjustment.get_values(); let item = this._items[this._highlighted]; diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 1acedd6d7..b88d9cc7b 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1521,7 +1521,7 @@ var Workspace = class { return; } - let [clone, overlay] = this._addWindowClone(win, false); + let [clone, overlay_] = this._addWindowClone(win, false); if (win._overviewHint) { let x = win._overviewHint.x - this.actor.x; diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 820be635a..d639386b4 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -683,7 +683,7 @@ class ThumbnailsBox extends St.Widget { } _activateThumbnailAtPoint(stageX, stageY, time) { - let [r, x, y] = this.transform_stage_point(stageX, stageY); + let [r_, x_, y] = this.transform_stage_point(stageX, stageY); for (let i = 0; i < this._thumbnails.length; i++) { let thumbnail = this._thumbnails[i]; diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index ca3e15f77..57227c0e1 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -530,7 +530,7 @@ var WorkspacesDisplay = class { } _onPan(action) { - let [dist, dx, dy] = action.get_motion_delta(0); + let [dist_, dx, dy] = action.get_motion_delta(0); let adjustment = this._scrollAdjustment; if (global.workspace_manager.layout_rows == -1) adjustment.value -= (dy / this.actor.height) * adjustment.page_size; diff --git a/js/ui/xdndHandler.js b/js/ui/xdndHandler.js index 9749b81bf..d56385428 100644 --- a/js/ui/xdndHandler.js +++ b/js/ui/xdndHandler.js @@ -101,7 +101,7 @@ var XdndHandler = class { while (pickedActor) { if (pickedActor._delegate && pickedActor._delegate.handleDragOver) { - let [r, targX, targY] = pickedActor.transform_stage_point(x, y); + let [r_, targX, targY] = pickedActor.transform_stage_point(x, y); let result = pickedActor._delegate.handleDragOver(this, dragEvent.dragActor, targX,