[gnome-sound-recorder/bilelmoussaoui/misc: 3/6] waveform: rename some functions
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder/bilelmoussaoui/misc: 3/6] waveform: rename some functions
- Date: Sun, 14 Jun 2020 13:59:25 +0000 (UTC)
commit c6fd19d299e7473ecd4abd518201f61e5779072d
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Sun Jun 14 15:31:46 2020 +0200
waveform: rename some functions
src/mainWindow.js | 6 +++---
src/waveform.js | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index c818219..3694a60 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -43,7 +43,7 @@ var MainWindow = GObject.registerClass({
this._recordGrid.add(this.waveform);
this._recorder.connect('waveform', (_, time, peak) => {
- this.waveform._drawEvent(time, peak);
+ this.waveform.drawAt(time, peak);
});
this._recorder.connect('notify::duration', _recorder => {
@@ -51,7 +51,7 @@ var MainWindow = GObject.registerClass({
});
this.connect('destroy', () => {
- this.waveform.endDrawing();
+ this.waveform.destroy();
this.player.stop();
this._recorder.stop();
});
@@ -104,7 +104,7 @@ var MainWindow = GObject.registerClass({
this._recordingList.insert(0, recording);
this._headerRevealer.reveal_child = true;
- this.waveform.endDrawing();
+ this.waveform.destroy();
this._playbackStack.set_visible_child_name('recorder-start');
}
diff --git a/src/waveform.js b/src/waveform.js
index 3720867..54fa8eb 100644
--- a/src/waveform.js
+++ b/src/waveform.js
@@ -80,7 +80,7 @@ var WaveForm = GObject.registerClass({
cr.$dispose();
}
- _drawEvent(time, peak) {
+ drawAt(time, peak) {
// Reset on Time = 0
if (time === 0)
this.peaks = Array(WAVE_SAMPLES).fill(-this.get_allocated_height());
@@ -90,7 +90,7 @@ var WaveForm = GObject.registerClass({
this.queue_draw();
}
- endDrawing() {
+ destroy() {
this.recordedTime = 0;
this.peaks.length = 0;
this.queue_draw();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]