From 38cd56ca1a3d5f57aa064c50f08b1f768c06c0aa Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 26 Mar 2019 12:37:43 +0100 Subject: [PATCH] rename event --- src/app/components/vertical-icons-component.js | 4 ++-- src/app/tabs/analysis-tab.js | 4 ++-- src/app/tabs/compile-tab.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/components/vertical-icons-component.js b/src/app/components/vertical-icons-component.js index bf9ac34605..bc0ecdb00d 100644 --- a/src/app/components/vertical-icons-component.js +++ b/src/app/components/vertical-icons-component.js @@ -38,7 +38,7 @@ class VerticalIconComponent { if (!api.events) return let fn = this.iconStatus[api.profile.name] if (fn) { - api.events.unregister('setStatus', fn) + api.events.remove('statusChanged', fn) delete this.iconStatus[api.profile.name] } } @@ -49,7 +49,7 @@ class VerticalIconComponent { this.setIconStatus(api.profile.name, status) } this.iconStatus[api.profile.name] = fn - api.events.on('setStatus', this.iconStatus[api.profile.name]) + api.events.on('statusChanged', this.iconStatus[api.profile.name]) } /** diff --git a/src/app/tabs/analysis-tab.js b/src/app/tabs/analysis-tab.js index aadaba6975..2b663cf594 100644 --- a/src/app/tabs/analysis-tab.js +++ b/src/app/tabs/analysis-tab.js @@ -31,9 +31,9 @@ class AnalysisTab extends ApiFactory { var staticanalysis = new StaticAnalysis() staticanalysis.event.register('staticAnaysisWarning', (count) => { if (count) { - this.events.emit('setStatus', {key: 'exclamation-triangle', title: count + ' warnings', type: 'warning'}) + this.events.emit('statusChanged', {key: 'exclamation-triangle', title: count + ' warnings', type: 'warning'}) } else { - this.events.emit('setStatus', {key: 'check', title: 'no warning', type: 'success'}) + this.events.emit('statusChanged', {key: 'check', title: 'no warning', type: 'success'}) } }) this.registry.put({api: staticanalysis, name: 'staticanalysis'}) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 4bdd386b16..764a0442b6 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -79,7 +79,7 @@ class CompileTab extends ApiFactory { if (this._view.errorContainer) { this._view.errorContainer.innerHTML = '' } - this.events.emit('setStatus', {key: 'spinner', title: 'compiling...', type: 'info'}) + this.events.emit('statusChanged', {key: 'spinner', title: 'compiling...', type: 'info'}) }) this.fileManager.events.on('currentFileChanged', (name) => { @@ -89,7 +89,7 @@ class CompileTab extends ApiFactory { if (success) { // forwarding the event to the appManager infra this.events.emit('compilationFinished', source.target, source, 'soljson', data) - this.events.emit('setStatus', {key: 'check', title: 'compilation successful', type: 'success'}) + this.events.emit('statusChanged', {key: 'check', title: 'compilation successful', type: 'success'}) // Store the contracts this.data.contractsDetails = {} this.compiler.visitContracts((contract) => { @@ -100,7 +100,7 @@ class CompileTab extends ApiFactory { ) }) } else { - this.events.emit('setStatus', {key: 'exclamation', title: 'compilation failed', type: 'danger'}) + this.events.emit('statusChanged', {key: 'exclamation', title: 'compilation failed', type: 'danger'}) } // Update contract Selection let contractMap = {}