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
This commit is contained in:
parent
11b116cb9d
commit
71759a0769
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
@ -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) {
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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,9 +104,9 @@ 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,
|
||||
[success_, pid] = GLib.spawn_async(null, argv, null,
|
||||
GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD,
|
||||
null);
|
||||
} catch (err) {
|
||||
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
});
|
||||
|
@ -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,
|
||||
|
@ -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')
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)', [
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user