[gnome-sound-recorder/testing: 44/49] Style fixes



commit 24e7f80ed91c35b2b4297a722265e3a87e5e60f2
Author: Meg Ford <megford gnome org>
Date:   Thu Mar 23 18:50:50 2017 -0500

    Style fixes

 src/mainWindow.js |   10 +++++-----
 src/waveform.js   |    7 +++----
 2 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index ac8c5ab..18c8db5 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -177,7 +177,7 @@ const MainView = new Lang.Class({
         if (play.getPipeStates() == PipelineStates.PLAYING) {
             play.stopPlaying();
             let listRow = this.listBox.get_selected_row();
-            let rowWidget = listRow.get_child(this.widget);
+            let rowWidget = listRow.get_child();
             rowWidget.foreach(Lang.bind(this,
                 function(child) {
 
@@ -578,7 +578,7 @@ const MainView = new Lang.Class({
     hasPreviousSelRow: function() {
        this.destroyLoadMoreButton();
            if (previousSelRow != null) {
-              let rowWidget = previousSelRow.get_child(this.widget);
+              let rowWidget = previousSelRow.get_child();
               rowWidget.foreach(Lang.bind(this,
                 function(child) {
                     let alwaysShow = child.get_no_show_all();
@@ -628,7 +628,7 @@ const MainView = new Lang.Class({
             }
 
             previousSelRow = selectedRow;
-            let selectedRowWidget = previousSelRow.get_child(this.widget);
+            let selectedRowWidget = previousSelRow.get_child();
             selectedRowWidget.show_all();
             selectedRowWidget.foreach(Lang.bind(this,
                 function(child) {
@@ -717,7 +717,7 @@ const MainView = new Lang.Class({
 
         if (activeState == PipelineStates.PLAYING) {
             play.pausePlaying();
-            let rowWidget = listRow.get_child(this.widget);
+            let rowWidget = listRow.get_child();
             rowWidget.foreach(Lang.bind(this,
                 function(child) {
 
@@ -741,7 +741,7 @@ const MainView = new Lang.Class({
         if (activeState != PipelineStates.PLAYING) {
             play.startPlaying();
 
-            let rowWidget = listRow.get_child(this.widget);
+            let rowWidget = listRow.get_child();
             rowWidget.foreach(Lang.bind(this,
                 function(child) {
 
diff --git a/src/waveform.js b/src/waveform.js
index 6067522..c3a9afb 100644
--- a/src/waveform.js
+++ b/src/waveform.js
@@ -50,6 +50,7 @@ const WaveForm = new Lang.Class({
 
     _init: function(grid, file) {
         this._grid = grid;
+        this.recordTime = null;
 
         let placeHolder = -100;
         for (let i = 0; i < 40; i++)
@@ -175,7 +176,6 @@ const WaveForm = new Lang.Class({
             start = this.recordTime;
         }
 
-        let i = 0;
         let xAxis = 0;
         let end = start + 40;
         let width = this.drawing.get_allocated_width();
@@ -195,9 +195,8 @@ const WaveForm = new Lang.Class({
             cr.setSourceRGBA(0.0, 185, 161, 255);
         }
 
-        for(i = start; i <= end; i++) {
-
-            // Keep moving until we get to a non-null array member
+        for(let i = start; i <= end; i++) {
+            // Keep moving until we get to a non-negative array member
             if (peaks[i] < 0) {
                 cr.moveTo((xAxis * pixelsPerSample), (waveheight - (peaks[i] * waveheight)))
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]