[gnome-sound-recorder] record.js: Destroy the recordGrid if the pipeline StateChangeReturn is failed
- From: Meg Ford (Margaret) <megford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] record.js: Destroy the recordGrid if the pipeline StateChangeReturn is failed
- Date: Thu, 17 Oct 2013 01:32:05 +0000 (UTC)
commit 10c579484cd1612fe40446d5bad6452418a8ce7a
Author: Meg Ford <meg387 gmail com>
Date: Wed Oct 16 19:57:46 2013 -0500
record.js: Destroy the recordGrid if the pipeline StateChangeReturn is failed
Reset the UI if the recording process fails
src/record.js | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/record.js b/src/record.js
index cce9bd1..e6ba8a3 100644
--- a/src/record.js
+++ b/src/record.js
@@ -148,7 +148,6 @@ const Record = new Lang.Class({
if (ret == Gst.StateChangeReturn.FAILURE) {
this._showErrorDialog(_("Unable to set the pipeline to the recording state."));
- this.onEndOfStream();
} else {
MainWindow.view.setVolume();
}
@@ -165,12 +164,12 @@ const Record = new Lang.Class({
GLib.source_remove(this.timeout);
this.timeout = null;
}
- MainWindow.wave.endDrawing();
+
+ if (MainWindow.wave != null)
+ MainWindow.wave.endDrawing();
},
- onEndOfStream: function() {
- this.srcElement.set_state(Gst.State.NULL);
- this.srcElement.get_state(null, null, -1);
+ onEndOfStream: function() {
this.pipeline.set_state(Gst.State.NULL);
this.pipeState = PipelineStates.STOPPED;
this.recordBus.remove_signal_watch();
@@ -197,7 +196,6 @@ const Record = new Lang.Class({
errorTwo = description;
this._showErrorDialog(_("Error: " + errorOne + " " + errorTwo));
- this.stopRecording();
}
let s = message.get_structure();
@@ -257,6 +255,7 @@ const Record = new Lang.Class({
errorDialog.connect ('response', Lang.bind(this,
function() {
errorDialog.destroy();
+ MainWindow.view.onRecordStopClicked();
}));
errorDialog.show();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]