cleanup: Remove some unhelpful unused variables in destructuring

We aren't using them, and they don't add much in terms of clarity,
so drop them to fix a couple of eslint errors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627
This commit is contained in:
Florian Müllner 2019-02-01 14:41:55 +01:00
parent 2f97a1a55d
commit 11b116cb9d
28 changed files with 68 additions and 72 deletions

View File

@ -518,7 +518,7 @@ var LoginDialog = GObject.registerClass({
_getBannerAllocation(dialogBox) { _getBannerAllocation(dialogBox) {
let actorBox = new Clutter.ActorBox(); let actorBox = new Clutter.ActorBox();
let [minWidth, minHeight, natWidth, natHeight] = this._bannerView.get_preferred_size(); let [, , natWidth, natHeight] = this._bannerView.get_preferred_size();
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2; let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
actorBox.x1 = Math.floor(centerX - natWidth / 2); actorBox.x1 = Math.floor(centerX - natWidth / 2);
@ -532,7 +532,7 @@ var LoginDialog = GObject.registerClass({
_getLogoBinAllocation(dialogBox) { _getLogoBinAllocation(dialogBox) {
let actorBox = new Clutter.ActorBox(); let actorBox = new Clutter.ActorBox();
let [minWidth, minHeight, natWidth, natHeight] = this._logoBin.get_preferred_size(); let [, , natWidth, natHeight] = this._logoBin.get_preferred_size();
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2; let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
actorBox.x1 = Math.floor(centerX - natWidth / 2); actorBox.x1 = Math.floor(centerX - natWidth / 2);
@ -546,7 +546,7 @@ var LoginDialog = GObject.registerClass({
_getCenterActorAllocation(dialogBox, actor) { _getCenterActorAllocation(dialogBox, actor) {
let actorBox = new Clutter.ActorBox(); let actorBox = new Clutter.ActorBox();
let [minWidth, minHeight, natWidth, natHeight] = actor.get_preferred_size(); let [, , natWidth, natHeight] = actor.get_preferred_size();
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2; let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
let centerY = dialogBox.y1 + (dialogBox.y2 - dialogBox.y1) / 2; let centerY = dialogBox.y1 + (dialogBox.y2 - dialogBox.y1) / 2;
@ -648,7 +648,7 @@ var LoginDialog = GObject.registerClass({
// figure out how tall it would like to be and try to accommodate // figure out how tall it would like to be and try to accommodate
// but don't let it get too close to the logo // but don't let it get too close to the logo
let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth); let [, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);
let maxWideHeight = dialogHeight - 3 * logoHeight; let maxWideHeight = dialogHeight - 3 * logoHeight;
wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight); wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight);

View File

@ -45,7 +45,7 @@ function fadeInActor(actor) {
let hold = new Batch.Hold(); let hold = new Batch.Hold();
actor.show(); actor.show();
let [minHeight, naturalHeight] = actor.get_preferred_height(-1); let [, naturalHeight] = actor.get_preferred_height(-1);
actor.opacity = 0; actor.opacity = 0;
actor.set_height(0); actor.set_height(0);

View File

@ -87,9 +87,9 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
let hPadding = leftPadding + rightPadding; let hPadding = leftPadding + rightPadding;
let icon = this._items[this._selectedIndex]; let icon = this._items[this._selectedIndex];
let [posX, posY] = icon.get_transformed_position(); let [posX] = icon.get_transformed_position();
let thumbnailCenter = posX + icon.width / 2; let thumbnailCenter = posX + icon.width / 2;
let [childMinWidth, childNaturalWidth] = this._thumbnails.get_preferred_width(-1); let [, childNaturalWidth] = this._thumbnails.get_preferred_width(-1);
childBox.x1 = Math.max(primary.x + leftPadding, Math.floor(thumbnailCenter - childNaturalWidth / 2)); childBox.x1 = Math.max(primary.x + leftPadding, Math.floor(thumbnailCenter - childNaturalWidth / 2));
if (childBox.x1 + childNaturalWidth > primary.x + primary.width - hPadding) { if (childBox.x1 + childNaturalWidth > primary.x + primary.width - hPadding) {
let offset = childBox.x1 + childNaturalWidth - primary.width + hPadding; let offset = childBox.x1 + childNaturalWidth - primary.width + hPadding;
@ -103,7 +103,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
childBox.x2 = primary.x + primary.width - rightPadding; childBox.x2 = primary.x + primary.width - rightPadding;
childBox.y1 = this._switcherList.allocation.y2 + spacing; childBox.y1 = this._switcherList.allocation.y2 + spacing;
this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1); this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1);
let [childMinHeight, childNaturalHeight] = this._thumbnails.get_preferred_height(-1); let [, childNaturalHeight] = this._thumbnails.get_preferred_height(-1);
childBox.y2 = childBox.y1 + childNaturalHeight; childBox.y2 = childBox.y1 + childNaturalHeight;
this._thumbnails.allocate(childBox, flags); this._thumbnails.allocate(childBox, flags);
} }
@ -801,7 +801,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
} }
_enterItem(index) { _enterItem(index) {
let [x, y, mask] = global.get_pointer(); let [x, y] = global.get_pointer();
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, x, y); let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, x, y);
if (this._items[index].contains(pickedActor)) if (this._items[index].contains(pickedActor))
this._itemEntered(index); this._itemEntered(index);
@ -908,7 +908,7 @@ class ThumbnailList extends SwitcherPopup.SwitcherList {
return; return;
let totalPadding = this._items[0].get_theme_node().get_horizontal_padding() + this._items[0].get_theme_node().get_vertical_padding(); let totalPadding = this._items[0].get_theme_node().get_horizontal_padding() + this._items[0].get_theme_node().get_vertical_padding();
totalPadding += this.get_theme_node().get_horizontal_padding() + this.get_theme_node().get_vertical_padding(); totalPadding += this.get_theme_node().get_horizontal_padding() + this.get_theme_node().get_vertical_padding();
let [labelMinHeight, labelNaturalHeight] = this._labels[0].get_preferred_height(-1); let [, labelNaturalHeight] = this._labels[0].get_preferred_height(-1);
let spacing = this._items[0].child.get_theme_node().get_length('spacing'); let spacing = this._items[0].child.get_theme_node().get_length('spacing');
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let thumbnailSize = THUMBNAIL_DEFAULT_SIZE * scaleFactor; let thumbnailSize = THUMBNAIL_DEFAULT_SIZE * scaleFactor;

View File

@ -1109,7 +1109,7 @@ var FolderView = class FolderView extends BaseAppView {
} }
usedWidth() { usedWidth() {
let [availWidthPerPage, availHeightPerPage] = this._getPageAvailableSize(); let [availWidthPerPage] = this._getPageAvailableSize();
return this._grid.usedWidth(availWidthPerPage); return this._grid.usedWidth(availWidthPerPage);
} }

View File

@ -469,7 +469,7 @@ var BoxPointer = GObject.registerClass({
let sourceAllocation = this._sourceAllocation; let sourceAllocation = this._sourceAllocation;
let sourceCenterX = sourceAllocation.x1 + sourceContentBox.x1 + (sourceContentBox.x2 - sourceContentBox.x1) * this._sourceAlignment; let sourceCenterX = sourceAllocation.x1 + sourceContentBox.x1 + (sourceContentBox.x2 - sourceContentBox.x1) * this._sourceAlignment;
let sourceCenterY = sourceAllocation.y1 + sourceContentBox.y1 + (sourceContentBox.y2 - sourceContentBox.y1) * this._sourceAlignment; let sourceCenterY = sourceAllocation.y1 + sourceContentBox.y1 + (sourceContentBox.y2 - sourceContentBox.y1) * this._sourceAlignment;
let [minWidth, minHeight, natWidth, natHeight] = this.get_preferred_size(); let [, , natWidth, natHeight] = this.get_preferred_size();
// We also want to keep it onscreen, and separated from the // We also want to keep it onscreen, and separated from the
// edge by the same distance as the main part of the box is // edge by the same distance as the main part of the box is
@ -594,7 +594,7 @@ var BoxPointer = GObject.registerClass({
_calculateArrowSide(arrowSide) { _calculateArrowSide(arrowSide) {
let sourceAllocation = this._sourceAllocation; let sourceAllocation = this._sourceAllocation;
let [minWidth, minHeight, boxWidth, boxHeight] = this.get_preferred_size(); let [, , boxWidth, boxHeight] = this.get_preferred_size();
let workarea = this._workArea; let workarea = this._workArea;
switch (arrowSide) { switch (arrowSide) {

View File

@ -63,9 +63,8 @@ var CtrlAltTabManager = class CtrlAltTabManager {
if (a.sortGroup != b.sortGroup) if (a.sortGroup != b.sortGroup)
return a.sortGroup - b.sortGroup; return a.sortGroup - b.sortGroup;
let ax, bx, y; let [ax] = a.proxy.get_transformed_position();
[ax, y] = a.proxy.get_transformed_position(); let [bx] = b.proxy.get_transformed_position();
[bx, y] = b.proxy.get_transformed_position();
return ax - bx; return ax - bx;
} }

View File

@ -296,7 +296,7 @@ class DashActor extends St.Widget {
this.set_allocation(box, flags); this.set_allocation(box, flags);
let [appIcons, showAppsButton] = this.get_children(); let [appIcons, showAppsButton] = this.get_children();
let [showAppsMinHeight, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth); let [, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth);
let childBox = new Clutter.ActorBox(); let childBox = new Clutter.ActorBox();
childBox.x1 = contentBox.x1; childBox.x1 = contentBox.x1;

View File

@ -613,15 +613,15 @@ var _Draggable = class _Draggable {
if (this._dragActorSource && this._dragActorSource.visible) { if (this._dragActorSource && this._dragActorSource.visible) {
// Snap the clone back to its source // Snap the clone back to its source
[x, y] = this._dragActorSource.get_transformed_position(); [x, y] = this._dragActorSource.get_transformed_position();
let [sourceScaledWidth, sourceScaledHeight] = this._dragActorSource.get_transformed_size(); let [sourceScaledWidth] = this._dragActorSource.get_transformed_size();
scale = sourceScaledWidth ? this._dragActor.width / sourceScaledWidth : 0; scale = sourceScaledWidth ? this._dragActor.width / sourceScaledWidth : 0;
} else if (this._dragOrigParent) { } else if (this._dragOrigParent) {
// Snap the actor back to its original position within // Snap the actor back to its original position within
// its parent, adjusting for the fact that the parent // its parent, adjusting for the fact that the parent
// may have been moved or scaled // may have been moved or scaled
let [parentX, parentY] = this._dragOrigParent.get_transformed_position(); let [parentX, parentY] = this._dragOrigParent.get_transformed_position();
let [parentWidth, parentHeight] = this._dragOrigParent.get_size(); let [parentWidth] = this._dragOrigParent.get_size();
let [parentScaledWidth, parentScaledHeight] = this._dragOrigParent.get_transformed_size(); let [parentScaledWidth] = this._dragOrigParent.get_transformed_size();
let parentScale = 1.0; let parentScale = 1.0;
if (parentWidth != 0) if (parentWidth != 0)
parentScale = parentScaledWidth / parentWidth; parentScale = parentScaledWidth / parentWidth;

View File

@ -139,7 +139,7 @@ var InhibitShortcutsDialog = GObject.registerClass({
return; return;
} }
let [permissions, data] = res; let [permissions] = res;
if (permissions[appId] === undefined) // Not found if (permissions[appId] === undefined) // Not found
this._dialog.open(); this._dialog.open();
else if (permissions[appId] == GRANTED) else if (permissions[appId] == GRANTED)

View File

@ -18,7 +18,7 @@ var LocatePointer = class {
if (!this._settings.get_boolean(LOCATE_POINTER_KEY)) if (!this._settings.get_boolean(LOCATE_POINTER_KEY))
return; return;
let [x, y, mods] = global.get_pointer(); let [x, y] = global.get_pointer();
this._ripples.playAnimation(x, y); this._ripples.playAnimation(x, y);
} }
}; };

View File

@ -519,7 +519,7 @@ var Inspector = GObject.registerClass({
let primary = Main.layoutManager.primaryMonitor; let primary = Main.layoutManager.primaryMonitor;
let [minWidth, minHeight, natWidth, natHeight] = let [, , natWidth, natHeight] =
this._eventHandler.get_preferred_size(); this._eventHandler.get_preferred_size();
let childBox = new Clutter.ActorBox(); let childBox = new Clutter.ActorBox();
@ -942,7 +942,7 @@ var LookingGlass = class LookingGlass {
// Setting the height to -1 allows us to get its actual preferred height rather than // Setting the height to -1 allows us to get its actual preferred height rather than
// whatever was last given in set_height by Tweener. // whatever was last given in set_height by Tweener.
this._completionActor.set_height(-1); this._completionActor.set_height(-1);
let [minHeight, naturalHeight] = this._completionActor.get_preferred_height(this._resultsArea.get_width()); let [, naturalHeight] = this._completionActor.get_preferred_height(this._resultsArea.get_width());
// Don't reanimate if we are already visible // Don't reanimate if we are already visible
if (this._completionActor.visible) { if (this._completionActor.visible) {

View File

@ -107,8 +107,7 @@ var Magnifier = class Magnifier {
// Create the first ZoomRegion and initialize it according to the // Create the first ZoomRegion and initialize it according to the
// magnification settings. // magnification settings.
let mask; [this.xMouse, this.yMouse] = global.get_pointer();
[this.xMouse, this.yMouse, mask] = global.get_pointer();
let aZoomRegion = new ZoomRegion(this, this._cursorRoot); let aZoomRegion = new ZoomRegion(this, this._cursorRoot);
this._zoomRegions.push(aZoomRegion); this._zoomRegions.push(aZoomRegion);
@ -227,7 +226,7 @@ var Magnifier = class Magnifier {
* @return true. * @return true.
*/ */
scrollToMousePos() { scrollToMousePos() {
let [xMouse, yMouse, mask] = global.get_pointer(); let [xMouse, yMouse] = global.get_pointer();
if (xMouse != this.xMouse || yMouse != this.yMouse) { if (xMouse != this.xMouse || yMouse != this.yMouse) {
this.xMouse = xMouse; this.xMouse = xMouse;

View File

@ -650,7 +650,7 @@ class SourceActorWithLabel extends SourceActor {
let childBox = new Clutter.ActorBox(); let childBox = new Clutter.ActorBox();
let [minWidth, minHeight, naturalWidth, naturalHeight] = this._counterBin.get_preferred_size(); let [, , naturalWidth, naturalHeight] = this._counterBin.get_preferred_size();
let direction = this.get_text_direction(); let direction = this.get_text_direction();
if (direction == Clutter.TextDirection.LTR) { if (direction == Clutter.TextDirection.LTR) {
@ -1127,7 +1127,7 @@ var MessageTray = class MessageTray {
// this._onNotificationLeftTimeout() to determine if the mouse has moved far enough during the initial timeout for us // this._onNotificationLeftTimeout() to determine if the mouse has moved far enough during the initial timeout for us
// to consider that the user intended to leave the tray and therefore hide the tray. If the mouse is still // to consider that the user intended to leave the tray and therefore hide the tray. If the mouse is still
// close to its previous position, we extend the timeout once. // close to its previous position, we extend the timeout once.
let [x, y, mods] = global.get_pointer(); let [x, y] = global.get_pointer();
this._notificationLeftMouseX = x; this._notificationLeftMouseX = x;
this._notificationLeftMouseY = y; this._notificationLeftMouseY = y;
@ -1156,7 +1156,7 @@ var MessageTray = class MessageTray {
} }
_onNotificationLeftTimeout() { _onNotificationLeftTimeout() {
let [x, y, mods] = global.get_pointer(); let [x, y] = global.get_pointer();
// We extend the timeout once if the mouse moved no further than MOUSE_LEFT_ACTOR_THRESHOLD to either side. // We extend the timeout once if the mouse moved no further than MOUSE_LEFT_ACTOR_THRESHOLD to either side.
if (this._notificationLeftMouseX > -1 && if (this._notificationLeftMouseX > -1 &&
y < this._notificationLeftMouseY + MOUSE_LEFT_ACTOR_THRESHOLD && y < this._notificationLeftMouseY + MOUSE_LEFT_ACTOR_THRESHOLD &&
@ -1308,7 +1308,7 @@ var MessageTray = class MessageTray {
Meta.disable_unredirect_for_display(global.display); Meta.disable_unredirect_for_display(global.display);
this._updateShowingNotification(); this._updateShowingNotification();
let [x, y, mods] = global.get_pointer(); let [x, y] = global.get_pointer();
// We save the position of the mouse at the time when we started showing the notification // We save the position of the mouse at the time when we started showing the notification
// in order to determine if the notification popped up under it. We make that check if // in order to determine if the notification popped up under it. We make that check if
// the user starts moving the mouse and _onNotificationHoverChanged() gets called. We don't // the user starts moving the mouse and _onNotificationHoverChanged() gets called. We don't
@ -1378,7 +1378,7 @@ var MessageTray = class MessageTray {
} }
_notificationTimeout() { _notificationTimeout() {
let [x, y, mods] = global.get_pointer(); let [x, y] = global.get_pointer();
if (y < this._lastSeenMouseY - 10 && !this._notificationHovered) { if (y < this._lastSeenMouseY - 10 && !this._notificationHovered) {
// The mouse is moving towards the notification, so don't // The mouse is moving towards the notification, so don't
// hide it yet. (We just create a new timeout (and destroy // hide it yet. (We just create a new timeout (and destroy

View File

@ -396,8 +396,8 @@ var PadDiagram = GObject.registerClass({
} }
_allocateChild(child, x, y, direction) { _allocateChild(child, x, y, direction) {
let [prefHeight, natHeight] = child.get_preferred_height(-1); let [, natHeight] = child.get_preferred_height(-1);
let [prefWidth, natWidth] = child.get_preferred_width(natHeight); let [, natWidth] = child.get_preferred_width(natHeight);
let childBox = new Clutter.ActorBox(); let childBox = new Clutter.ActorBox();
if (direction == LTR) { if (direction == LTR) {

View File

@ -490,7 +490,7 @@ class ActivitiesButton extends PanelMenu.Button {
} }
_xdndToggleOverview() { _xdndToggleOverview() {
let [x, y, mask] = global.get_pointer(); let [x, y] = global.get_pointer();
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y); let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y);
if (pickedActor == this && Main.overview.shouldToggleByCornerOrButton()) if (pickedActor == this && Main.overview.shouldToggleByCornerOrButton())
@ -841,9 +841,9 @@ class Panel extends St.Widget {
let allocWidth = box.x2 - box.x1; let allocWidth = box.x2 - box.x1;
let allocHeight = box.y2 - box.y1; let allocHeight = box.y2 - box.y1;
let [leftMinWidth, leftNaturalWidth] = this._leftBox.get_preferred_width(-1); let [, leftNaturalWidth] = this._leftBox.get_preferred_width(-1);
let [centerMinWidth, centerNaturalWidth] = this._centerBox.get_preferred_width(-1); let [, centerNaturalWidth] = this._centerBox.get_preferred_width(-1);
let [rightMinWidth, rightNaturalWidth] = this._rightBox.get_preferred_width(-1); let [, rightNaturalWidth] = this._rightBox.get_preferred_width(-1);
let sideWidth, centerWidth; let sideWidth, centerWidth;
centerWidth = centerNaturalWidth; centerWidth = centerNaturalWidth;
@ -894,19 +894,18 @@ class Panel extends St.Widget {
} }
this._rightBox.allocate(childBox, flags); this._rightBox.allocate(childBox, flags);
let cornerMinWidth, cornerMinHeight;
let cornerWidth, cornerHeight; let cornerWidth, cornerHeight;
[cornerMinWidth, cornerWidth] = this._leftCorner.actor.get_preferred_width(-1); [, cornerWidth] = this._leftCorner.actor.get_preferred_width(-1);
[cornerMinHeight, cornerHeight] = this._leftCorner.actor.get_preferred_height(-1); [, cornerHeight] = this._leftCorner.actor.get_preferred_height(-1);
childBox.x1 = 0; childBox.x1 = 0;
childBox.x2 = cornerWidth; childBox.x2 = cornerWidth;
childBox.y1 = allocHeight; childBox.y1 = allocHeight;
childBox.y2 = allocHeight + cornerHeight; childBox.y2 = allocHeight + cornerHeight;
this._leftCorner.actor.allocate(childBox, flags); this._leftCorner.actor.allocate(childBox, flags);
[cornerMinWidth, cornerWidth] = this._rightCorner.actor.get_preferred_width(-1); [, cornerWidth] = this._rightCorner.actor.get_preferred_width(-1);
[cornerMinHeight, cornerHeight] = this._rightCorner.actor.get_preferred_height(-1); [, cornerHeight] = this._rightCorner.actor.get_preferred_height(-1);
childBox.x1 = allocWidth - cornerWidth; childBox.x1 = allocWidth - cornerWidth;
childBox.x2 = allocWidth; childBox.x2 = allocWidth;
childBox.y1 = allocHeight; childBox.y1 = allocHeight;

View File

@ -64,7 +64,7 @@ class ButtonBox extends St.Widget {
if (!child) if (!child)
return; return;
let [minWidth, natWidth] = child.get_preferred_width(-1); let [, natWidth] = child.get_preferred_width(-1);
let availWidth = box.x2 - box.x1; let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1; let availHeight = box.y2 - box.y1;

View File

@ -85,7 +85,7 @@ var PointerA11yTimeout = class PointerA11yTimeout {
Main.uiGroup.add_actor(pieTimer); Main.uiGroup.add_actor(pieTimer);
manager.connect('ptr-a11y-timeout-started', (manager, device, type, timeout) => { manager.connect('ptr-a11y-timeout-started', (manager, device, type, timeout) => {
let [x, y, mods] = global.get_pointer(); let [x, y] = global.get_pointer();
pieTimer.start(x, y, timeout); pieTimer.start(x, y, timeout);
if (type == Clutter.PointerA11yTimeoutType.GESTURE) if (type == Clutter.PointerA11yTimeoutType.GESTURE)
global.display.set_cursor(Meta.Cursor.CROSSHAIR); global.display.set_cursor(Meta.Cursor.CROSSHAIR);

View File

@ -958,7 +958,7 @@ var PopupSubMenu = class extends PopupMenuBase {
_needsScrollbar() { _needsScrollbar() {
let topMenu = this._getTopMenu(); let topMenu = this._getTopMenu();
let [topMinHeight, topNaturalHeight] = topMenu.actor.get_preferred_height(-1); let [, topNaturalHeight] = topMenu.actor.get_preferred_height(-1);
let topThemeNode = topMenu.actor.get_theme_node(); let topThemeNode = topMenu.actor.get_theme_node();
let topMaxHeight = topThemeNode.get_max_height(); let topMaxHeight = topThemeNode.get_max_height();
@ -1008,7 +1008,7 @@ var PopupSubMenu = class extends PopupMenuBase {
let targetAngle = this.actor.text_direction == Clutter.TextDirection.RTL ? -90 : 90; let targetAngle = this.actor.text_direction == Clutter.TextDirection.RTL ? -90 : 90;
if (animate) { if (animate) {
let [minHeight, naturalHeight] = this.actor.get_preferred_height(-1); let [, naturalHeight] = this.actor.get_preferred_height(-1);
this.actor.height = 0; this.actor.height = 0;
this.actor._arrowRotation = this._arrow.rotation_angle_z; this.actor._arrowRotation = this._arrow.rotation_angle_z;
Tweener.addTween(this.actor, Tweener.addTween(this.actor,

View File

@ -239,7 +239,7 @@ class RunDialog extends ModalDialog.ModalDialog {
this._errorMessage.set_text(message); this._errorMessage.set_text(message);
if (!this._errorBox.visible) { if (!this._errorBox.visible) {
let [errorBoxMinHeight, errorBoxNaturalHeight] = this._errorBox.get_preferred_height(-1); let [, errorBoxNaturalHeight] = this._errorBox.get_preferred_height(-1);
let parentActor = this._errorBox.get_parent(); let parentActor = this._errorBox.get_parent();
Tweener.addTween(parentActor, Tweener.addTween(parentActor,

View File

@ -762,8 +762,8 @@ var ScreenShield = class {
} }
_onDragMotion() { _onDragMotion() {
let [origX, origY] = this._dragAction.get_press_coords(0); let [, origY] = this._dragAction.get_press_coords(0);
let [currentX, currentY] = this._dragAction.get_motion_coords(0); let [, currentY] = this._dragAction.get_motion_coords(0);
let newY = currentY - origY; let newY = currentY - origY;
newY = clamp(newY, -global.stage.height, 0); newY = clamp(newY, -global.stage.height, 0);

View File

@ -114,9 +114,9 @@ function _loadMode(file, info) {
if (_modes.hasOwnProperty(modeName)) if (_modes.hasOwnProperty(modeName))
return; return;
let fileContent, success, tag, newMode; let fileContent, success, newMode;
try { try {
[success, fileContent, tag] = file.load_contents(null); [success, fileContent] = file.load_contents(null);
if (fileContent instanceof Uint8Array) if (fileContent instanceof Uint8Array)
fileContent = imports.byteArray.toString(fileContent); fileContent = imports.byteArray.toString(fileContent);
newMode = JSON.parse(fileContent); newMode = JSON.parse(fileContent);

View File

@ -115,7 +115,7 @@ var EntryMenu = class extends PopupMenu.PopupMenu {
}; };
function _setMenuAlignment(entry, stageX) { function _setMenuAlignment(entry, stageX) {
let [success, entryX, entryY] = entry.transform_stage_point(stageX, 0); let [success, entryX] = entry.transform_stage_point(stageX, 0);
if (success) if (success)
entry.menu.setSourceAlignment(entryX / entry.width); entry.menu.setSourceAlignment(entryX / entry.width);
} }
@ -125,7 +125,7 @@ function _onButtonPressEvent(actor, event, entry) {
entry.menu.close(BoxPointer.PopupAnimation.FULL); entry.menu.close(BoxPointer.PopupAnimation.FULL);
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
} else if (event.get_button() == 3) { } else if (event.get_button() == 3) {
let [stageX, stageY] = event.get_coords(); let [stageX] = event.get_coords();
_setMenuAlignment(entry, stageX); _setMenuAlignment(entry, stageX);
entry.menu.open(BoxPointer.PopupAnimation.FULL); entry.menu.open(BoxPointer.PopupAnimation.FULL);
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;

View File

@ -144,7 +144,7 @@ var Slider = class extends BarLevel.BarLevel {
} else if (direction == Clutter.ScrollDirection.UP) { } else if (direction == Clutter.ScrollDirection.UP) {
delta = SLIDER_SCROLL_STEP; delta = SLIDER_SCROLL_STEP;
} else if (direction == Clutter.ScrollDirection.SMOOTH) { } else if (direction == Clutter.ScrollDirection.SMOOTH) {
let [dx, dy] = event.get_scroll_delta(); let [, dy] = event.get_scroll_delta();
// Even though the slider is horizontal, use dy to match // Even though the slider is horizontal, use dy to match
// the UP/DOWN above. // the UP/DOWN above.
delta = -dy * SLIDER_SCROLL_STEP; delta = -dy * SLIDER_SCROLL_STEP;

View File

@ -76,8 +76,8 @@ var SwitcherPopup = GObject.registerClass({
// Allocate the switcherList // Allocate the switcherList
// We select a size based on an icon size that does not overflow the screen // We select a size based on an icon size that does not overflow the screen
let [childMinHeight, childNaturalHeight] = this._switcherList.get_preferred_height(primary.width - hPadding); let [, childNaturalHeight] = this._switcherList.get_preferred_height(primary.width - hPadding);
let [childMinWidth, childNaturalWidth] = this._switcherList.get_preferred_width(childNaturalHeight); let [, childNaturalWidth] = this._switcherList.get_preferred_width(childNaturalHeight);
childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2)); childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth); childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2); childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
@ -437,10 +437,10 @@ var SwitcherList = GObject.registerClass({
this._highlighted = index; this._highlighted = index;
let adjustment = this._scrollView.hscroll.adjustment; let adjustment = this._scrollView.hscroll.adjustment;
let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values(); let [value] = adjustment.get_values();
let [absItemX, absItemY] = this._items[index].get_transformed_position(); 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, containerHeight] = this.get_transformed_size(); let [containerWidth] = this.get_transformed_size();
if (posX + this._items[index].get_width() > containerWidth) if (posX + this._items[index].get_width() > containerWidth)
this._scrollToRight(); this._scrollToRight();
else if (this._items[index].allocation.x1 - value < 0) else if (this._items[index].allocation.x1 - value < 0)
@ -542,7 +542,7 @@ var SwitcherList = GObject.registerClass({
} }
if (this._squareItems) { if (this._squareItems) {
let [childMin, childNat] = this._maxChildWidth(-1); let [childMin] = this._maxChildWidth(-1);
maxChildMin = Math.max(childMin, maxChildMin); maxChildMin = Math.max(childMin, maxChildMin);
maxChildNat = maxChildMin; maxChildNat = maxChildMin;
} }

View File

@ -103,8 +103,7 @@ class UserWidgetLabel extends St.Widget {
let availWidth = box.x2 - box.x1; let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1; let availHeight = box.y2 - box.y1;
let [minRealNameWidth, minRealNameHeight, let [, , natRealNameWidth] = this._realNameLabel.get_preferred_size();
natRealNameWidth, natRealNameHeight] = this._realNameLabel.get_preferred_size();
if (natRealNameWidth <= availWidth) if (natRealNameWidth <= availWidth)
this._currentLabel = this._realNameLabel; this._currentLabel = this._realNameLabel;

View File

@ -1407,7 +1407,7 @@ var Workspace = class {
} }
_delayedWindowRepositioning() { _delayedWindowRepositioning() {
let [x, y, mask] = global.get_pointer(); let [x, y] = global.get_pointer();
let pointerHasMoved = (this._cursorX != x && this._cursorY != y); let pointerHasMoved = (this._cursorX != x && this._cursorY != y);
let inWorkspace = (this._fullGeometry.x < x && x < this._fullGeometry.x + this._fullGeometry.width && let inWorkspace = (this._fullGeometry.x < x && x < this._fullGeometry.x + this._fullGeometry.width &&
@ -1445,7 +1445,7 @@ var Workspace = class {
// this point.) // this point.)
if (win) { if (win) {
let [stageX, stageY] = clone.get_transformed_position(); let [stageX, stageY] = clone.get_transformed_position();
let [stageWidth, stageHeight] = clone.get_transformed_size(); let [stageWidth] = clone.get_transformed_size();
win._overviewHint = { win._overviewHint = {
x: stageX, x: stageX,
y: stageY, y: stageY,
@ -1467,7 +1467,7 @@ var Workspace = class {
} }
// setup new handler // setup new handler
let [x, y, mask] = global.get_pointer(); let [x, y] = global.get_pointer();
this._cursorX = x; this._cursorX = x;
this._cursorY = y; this._cursorY = y;

View File

@ -38,7 +38,7 @@ class WorkspaceSwitcherPopupList extends St.Widget {
let size = 0; let size = 0;
for (let child of this.get_children()) { for (let child of this.get_children()) {
let [childMinHeight, childNaturalHeight] = child.get_preferred_height(-1); let [, childNaturalHeight] = child.get_preferred_height(-1);
let height = childNaturalHeight * workArea.width / workArea.height; let height = childNaturalHeight * workArea.width / workArea.height;
if (this._orientation == Clutter.Orientation.HORIZONTAL) if (this._orientation == Clutter.Orientation.HORIZONTAL)
@ -174,8 +174,8 @@ class WorkspaceSwitcherPopup extends St.Widget {
} }
let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex); let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
let [containerMinHeight, containerNatHeight] = this._container.get_preferred_height(global.screen_width); let [, containerNatHeight] = this._container.get_preferred_height(global.screen_width);
let [containerMinWidth, containerNatWidth] = this._container.get_preferred_width(containerNatHeight); let [, containerNatWidth] = this._container.get_preferred_width(containerNatHeight);
this._container.x = workArea.x + Math.floor((workArea.width - containerNatWidth) / 2); this._container.x = workArea.x + Math.floor((workArea.width - containerNatWidth) / 2);
this._container.y = workArea.y + Math.floor((workArea.height - containerNatHeight) / 2); this._container.y = workArea.y + Math.floor((workArea.height - containerNatHeight) / 2);
} }

View File

@ -687,7 +687,7 @@ class ThumbnailsBox extends St.Widget {
for (let i = 0; i < this._thumbnails.length; i++) { for (let i = 0; i < this._thumbnails.length; i++) {
let thumbnail = this._thumbnails[i]; let thumbnail = this._thumbnails[i];
let [w, h] = thumbnail.actor.get_transformed_size(); let [, h] = thumbnail.actor.get_transformed_size();
if (y >= thumbnail.actor.y && y <= thumbnail.actor.y + h) { if (y >= thumbnail.actor.y && y <= thumbnail.actor.y + h) {
thumbnail.activate(time); thumbnail.activate(time);
break; break;
@ -775,7 +775,7 @@ class ThumbnailsBox extends St.Widget {
// Allow the reorder target to have a 10px "cut" into // Allow the reorder target to have a 10px "cut" into
// each side of the thumbnail, to make dragging onto the // each side of the thumbnail, to make dragging onto the
// placeholder easier // placeholder easier
let [w, h] = this._thumbnails[i].actor.get_transformed_size(); let [, h] = this._thumbnails[i].actor.get_transformed_size();
let targetBottom = targetBase + WORKSPACE_CUT_SIZE; let targetBottom = targetBase + WORKSPACE_CUT_SIZE;
let nextTargetBase = targetBase + h + spacing; let nextTargetBase = targetBase + h + spacing;
let nextTargetTop = nextTargetBase - spacing - ((i == length - 1) ? 0 : WORKSPACE_CUT_SIZE); let nextTargetTop = nextTargetBase - spacing - ((i == length - 1) ? 0 : WORKSPACE_CUT_SIZE);
@ -1256,7 +1256,7 @@ class ThumbnailsBox extends St.Widget {
} }
if (i == this._dropPlaceholderPos) { if (i == this._dropPlaceholderPos) {
let [minHeight, placeholderHeight] = this._dropPlaceholder.get_preferred_height(-1); let [, placeholderHeight] = this._dropPlaceholder.get_preferred_height(-1);
childBox.x1 = x1; childBox.x1 = x1;
childBox.x2 = x2; childBox.x2 = x2;
childBox.y1 = Math.round(y); childBox.y1 = Math.round(y);