Fix leftover and incorrect JavaScript.

This commit is contained in:
Evan Welsh 2021-07-14 20:19:45 -07:00
parent 7f7b515b84
commit 772c2203fd
No known key found for this signature in database
GPG key ID: 091203D0E8238805
10 changed files with 13 additions and 38 deletions

View file

@ -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;
}

View file

@ -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) {

View file

@ -2292,8 +2292,7 @@ class FolderView extends BaseAppView {
}
// Overridden from BaseAppView
animate(animationDirection) {
this._grid.animatePulse(animationDirection);
animate(_animationDirection) {
}
createFolderIcon(size) {

View file

@ -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)

View file

@ -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)

View file

@ -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);

View file

@ -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');

View file

@ -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.

View file

@ -22,7 +22,7 @@ function _fixMarkup(text, allowMarkup) {
_text = _text.replace(/<(?!\/?[biu]>)/g, '&lt;');
try {
Pango.parse_markup(_text, -1, '');
Pango.parse_markup(_text, -1, 0);
return _text;
} catch (e) {}
}

View file

@ -484,9 +484,6 @@ class WorkspacesView extends WorkspacesViewBase {
}
_activeWorkspaceChanged(_wm, _from, _to, _direction) {
if (this._scrolling)
return;
this._scrollToActive();
}