syntax fixes for older GS versions

This commit is contained in:
Jason DeRose
2021-05-04 21:11:36 -04:00
parent 6a76c9e914
commit 1e46333210
3 changed files with 7 additions and 7 deletions

View File

@@ -611,7 +611,7 @@ var IconAnimator = Utils.defineClass({
destroy: function() {
this._timeline.stop();
this._timeline = null;
for (const name in this._animations) {
for (let name in this._animations) {
const pairs = this._animations[name];
for (let i = 0, iMax = pairs.length; i < iMax; i++) {
const pair = pairs[i];
@@ -637,7 +637,7 @@ var IconAnimator = Utils.defineClass({
addAnimation: function(target, name) {
const targetDestroyId = target.connect('destroy', () => this.removeAnimation(target, name));
this._animations[name].push({ target, targetDestroyId });
this._animations[name].push({ target: target, targetDestroyId: targetDestroyId });
if (this._started && this._count === 0) {
this._timeline.start();
}

View File

@@ -47,7 +47,7 @@ function getPanelSize(settings, monitorIndex) {
function setPanelSize(settings, monitorIndex, value) {
if (!(Number.isInteger(value) && value <= 128 && value >= 16)) {
log(`Not setting invalid panel size: ${value}`);
log('Not setting invalid panel size: ' + value);
return;
}
let sizes = getSettingsJson(settings, 'panel-sizes');
@@ -67,7 +67,7 @@ function getPanelLength(settings, monitorIndex) {
function setPanelLength(settings, monitorIndex, value) {
if (!(Number.isInteger(value) && value <= 100 && value >= 0)) {
log(`Not setting invalid panel length: ${value}`);
log('Not setting invalid panel length: ' + value);
return;
}
let lengths = getSettingsJson(settings, 'panel-lengths');
@@ -86,7 +86,7 @@ function getPanelPosition(settings, monitorIndex) {
function setPanelPosition(settings, monitorIndex, value) {
if (!(value === Pos.TOP || value === Pos.BOTTOM || value === Pos.LEFT
|| value === Pos.RIGHT)) {
log(`Not setting invalid panel position: ${value}`);
log('Not setting invalid panel position: ' + value);
return;
}
const positions = getSettingsJson(settings, 'panel-positions');
@@ -103,7 +103,7 @@ function getPanelAnchor(settings, monitorIndex) {
function setPanelAnchor(settings, monitorIndex, value) {
if (!(value === Pos.START || value === Pos.MIDDLE || value === Pos.END)) {
log(`Not setting invalid panel anchor: ${value}`);
log('Not setting invalid panel anchor: ' + value);
return;
}
const anchors = getSettingsJson(settings, 'panel-anchors');

View File

@@ -579,7 +579,7 @@ var ProgressIndicator = Utils.defineClass({
this._isUrgent = false;
},
setUrgent(urgent) {
setUrgent: function(urgent) {
const icon = this._source.icon._iconBin;
if (urgent) {
if (!this._isUrgent) {