[chronojump] Encoder analyze can be cancelled
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder analyze can be cancelled
- Date: Tue, 10 Apr 2018 12:44:35 +0000 (UTC)
commit 2cbc4bd1c4ae4fba132bd54e4534d58f1304d226
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Apr 10 14:44:11 2018 +0200
Encoder analyze can be cancelled
glade/app1.glade | 10 ++++++++--
src/gui/chronojumpIcons.cs | 2 ++
src/gui/encoder.cs | 8 +++++++-
3 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index e8bda9f..869836d 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1676,6 +1676,9 @@
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkLabel"
id="label_start_selector_jumps">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -23162,9 +23165,9 @@ then click this button.</property>
<property name="has_tooltip">True</property>
<property name="tooltip"
translatable="yes">Cancel process</property>
<property name="use_underline">True</property>
- <signal name="clicked"
handler="on_button_encoder_cancel_clicked" swapped="no"/>
+ <signal name="clicked"
handler="on_button_encoder_analyze_cancel_clicked" swapped="no"/>
<child>
- <widget class="GtkImage" id="image26">
+ <widget class="GtkImage"
id="image_encoder_analyze_cancel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-cancel</property>
@@ -25647,6 +25650,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/chronojumpIcons.cs b/src/gui/chronojumpIcons.cs
index 0e36743..eae9cb4 100644
--- a/src/gui/chronojumpIcons.cs
+++ b/src/gui/chronojumpIcons.cs
@@ -118,6 +118,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_encoder_rhythm_rest;
[Widget] Gtk.Image image_encoder_analyze_mode_options;
[Widget] Gtk.Image image_encoder_analyze_mode_options_close;
+ [Widget] Gtk.Image image_encoder_analyze_cancel;
//force sensor
[Widget] Gtk.Image image_selector_start_force_sensor;
@@ -220,6 +221,7 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_cancel.png");
image_button_cancel.Pixbuf = pixbuf;
image_encoder_capture_cancel.Pixbuf = pixbuf;
+ image_encoder_analyze_cancel.Pixbuf = pixbuf;
image_selector_start_cancel.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_person_pin.png");
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 773bf98..2f295a2 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1205,6 +1205,11 @@ public partial class ChronoJumpWindow
eCapture.Cancel();
}
+ void on_button_encoder_analyze_cancel_clicked (object o, EventArgs args)
+ {
+ encoderProcessCancel = true;
+ }
+
void on_button_encoder_capture_finish_clicked (object o, EventArgs args)
{
eCapture.Finish();
@@ -2539,6 +2544,7 @@ public partial class ChronoJumpWindow
button_encoder_analyze.Visible = false;
hbox_encoder_analyze_progress.Visible = true;
+ button_encoder_analyze_cancel.Sensitive = true;
encoderThreadStart(encoderActions.ANALYZE);
}
@@ -4639,7 +4645,6 @@ public partial class ChronoJumpWindow
(Util.IntToBool(table[6]) && ! radio_encoder_analyze_individual_current_set.Active);
button_encoder_capture_cancel.Sensitive = Util.IntToBool(table[7]);
- button_encoder_analyze_cancel.Sensitive = Util.IntToBool(table[7]);
button_encoder_capture_finish.Sensitive = Util.IntToBool(table[8]);
button_encoder_capture_finish_cont.Sensitive = Util.IntToBool(table[8]);
@@ -6750,6 +6755,7 @@ public partial class ChronoJumpWindow
button_encoder_analyze.Visible = true;
hbox_encoder_analyze_progress.Visible = false;
+ button_encoder_analyze_cancel.Sensitive = false;
encoder_pulsebar_analyze.Fraction = 1;
encoderButtonsSensitive(encoderSensEnumStored);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]