[gnome-shell/ewlsh/javascript-fixes] Fix leftover and incorrect JavaScript.
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/ewlsh/javascript-fixes] Fix leftover and incorrect JavaScript.
- Date: Thu, 15 Jul 2021 03:20:33 +0000 (UTC)
commit 772c2203fdf9a3a0a117e409329a483e19f36963
Author: Evan Welsh <contact evanwelsh com>
Date: Wed Jul 14 20:19:45 2021 -0700
Fix leftover and incorrect JavaScript.
js/gdm/loginDialog.js | 2 +-
js/ui/accessDialog.js | 4 +++-
js/ui/appDisplay.js | 3 +--
js/ui/background.js | 4 ++--
js/ui/calendar.js | 4 ++--
js/ui/components/keyring.js | 2 +-
js/ui/keyboard.js | 2 +-
js/ui/magnifier.js | 25 +------------------------
js/ui/messageList.js | 2 +-
js/ui/workspacesView.js | 3 ---
10 files changed, 13 insertions(+), 38 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index d2a82b43d1..760d7e9ef5 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -602,7 +602,7 @@ var LoginDialog = GObject.registerClass({
let bannerAllocation = null;
let bannerHeight = 0;
if (this._bannerView.visible) {
- bannerAllocation = this._getBannerAllocation(dialogBox, this._bannerView);
+ bannerAllocation = this._getBannerAllocation(dialogBox);
bannerHeight = bannerAllocation.y2 - bannerAllocation.y1;
}
diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js
index 057cd5b1bb..7c8d69b806 100644
--- a/js/ui/accessDialog.js
+++ b/js/ui/accessDialog.js
@@ -76,10 +76,12 @@ class AccessDialog extends ModalDialog.ModalDialog {
}
open() {
- super.open();
+ if (!super.open())
+ return false;
let connection = this._invocation.get_connection();
this._requestExported = this._request.export(connection, this._handle);
+ return true;
}
CloseAsync(invocation, _params) {
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index f86a7bb678..832bd02613 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -2292,8 +2292,7 @@ class FolderView extends BaseAppView {
}
// Overridden from BaseAppView
- animate(animationDirection) {
- this._grid.animatePulse(animationDirection);
+ animate(_animationDirection) {
}
createFolderIcon(size) {
diff --git a/js/ui/background.js b/js/ui/background.js
index 1f7c5e5720..3011fb2bb1 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -177,7 +177,7 @@ var BackgroundCache = class BackgroundCache {
animation = new Animation({ file: params.file });
- animation.load(() => {
+ animation.loadAsync(() => {
this._animations[params.settingsSchema] = animation;
if (params.onLoaded) {
@@ -634,7 +634,7 @@ class Animation extends GnomeDesktop.BGSlideShow {
this.loaded = false;
}
- load(callback) {
+ loadAsync(callback) {
this.load_async(null, () => {
this.loaded = true;
if (callback)
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 710efbac45..41caf43dcd 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -297,7 +297,7 @@ class DBusEventSource extends EventSourceBase {
let changed = false;
for (const id of ids)
- changed |= this._events.delete(id);
+ changed = changed || this._events.delete(id);
if (changed)
this.emit('changed');
@@ -310,7 +310,7 @@ class DBusEventSource extends EventSourceBase {
let changed = false;
for (const id of this._events.keys()) {
if (id.startsWith(sourceUid))
- changed |= this._events.delete(id);
+ changed = changed || this._events.delete(id);
}
if (changed)
diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js
index 8623f2fdd4..cd7a81e957 100644
--- a/js/ui/components/keyring.js
+++ b/js/ui/components/keyring.js
@@ -76,7 +76,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
warning.opacity = this.prompt.warning_visible ? 255 : 0;
});
this.prompt.connect('notify::warning', () => {
- if (this._passwordEntry && warning !== '')
+ if (this._passwordEntry && this.prompt.warning !== '')
Util.wiggle(this._passwordEntry);
});
warningBox.add_child(warning);
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index bc72d77f3d..062ba6e0b3 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -561,7 +561,7 @@ var FocusTracker = class {
this._setCurrentWindow(global.display.focus_window);
- this._grabOpBeginId = global.display.connect('grab-op-begin', (display, window, op) => {
+ this._grabOpBeginId = global.display.connect('grab-op-begin', (_, display, window, op) => {
if (window == this._currentWindow &&
(op == Meta.GrabOp.MOVING || op == Meta.GrabOp.KEYBOARD_MOVING))
this.emit('window-grabbed');
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index 08466b9a09..307067909b 100644
--- a/js/ui/magnifier.js
+++ b/js/ui/magnifier.js
@@ -221,7 +221,7 @@ var Magnifier = class Magnifier {
* @returns {bool} whether the magnifier is currently tracking the mouse
*/
isTrackingMouse() {
- return !!this._mouseTrackingId;
+ return !!this._pointerWatch;
}
/**
@@ -370,20 +370,6 @@ var Magnifier = class Magnifier {
}
}
- /**
- * getCrosshairsColor:
- * Get the color of the crosshairs.
- * @returns {string} The color as a string, e.g. '#0000ffff' or 'blue'.
- */
- getCrosshairsColor() {
- if (this._crossHairs) {
- let clutterColor = this._crossHairs.getColor();
- return clutterColor.to_string();
- } else {
- return '#00000000';
- }
- }
-
/**
* setCrosshairsThickness:
* Set the crosshairs thickness for all ZoomRegions.
@@ -1765,15 +1751,6 @@ class Crosshairs extends Clutter.Actor {
this._vertBottomHair.background_color = clutterColor;
}
- /**
- * getColor:
- * Get the color of the crosshairs.
- * @returns {ClutterColor} the crosshairs color
- */
- getColor() {
- return this._horizLeftHair.get_color();
- }
-
/**
* setThickness:
* Set the width of the vertical and horizontal lines of the crosshairs.
diff --git a/js/ui/messageList.js b/js/ui/messageList.js
index 8ffdaebc13..c68ab77fd2 100644
--- a/js/ui/messageList.js
+++ b/js/ui/messageList.js
@@ -22,7 +22,7 @@ function _fixMarkup(text, allowMarkup) {
_text = _text.replace(/<(?!\/?[biu]>)/g, '<');
try {
- Pango.parse_markup(_text, -1, '');
+ Pango.parse_markup(_text, -1, 0);
return _text;
} catch (e) {}
}
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 1d03e31319..baef2d3843 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -484,9 +484,6 @@ class WorkspacesView extends WorkspacesViewBase {
}
_activeWorkspaceChanged(_wm, _from, _to, _direction) {
- if (this._scrolling)
- return;
-
this._scrollToActive();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]