[chronojump] Encoder set load (at both tabs) show progress bar
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder set load (at both tabs) show progress bar
- Date: Mon, 6 Apr 2020 11:22:17 +0000 (UTC)
commit 6c06dac8b2da8f70bf639d0cd22ef28f0405f3c0
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Apr 6 13:21:35 2020 +0200
Encoder set load (at both tabs) show progress bar
glade/app1.glade | 148 ++++++++++++++++++++++++++++++++++--------------
src/gui/app1/encoder.cs | 50 ++++++++++++++--
2 files changed, 153 insertions(+), 45 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 89029f51..ac9bf370 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -24828,6 +24828,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -26390,32 +26393,6 @@ Concentric</property>
<property name="column_spacing">8</property>
<property name="row_spacing">8</property>
<child>
- <widget class="GtkButton"
id="button_encoder_load_signal">
- <property name="width_request">60</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Load
set</property>
- <property name="relief">half</property>
- <property name="use_underline">True</property>
- <signal name="clicked"
handler="on_button_encoder_load_signal_clicked" swapped="no"/>
- <child>
- <widget class="GtkImage"
id="image_encoder_capture_open">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property
name="stock">gtk-missing-image</property>
- <property name="icon-size">2</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
<widget class="GtkButton"
id="button_encoder_delete_signal">
<property name="visible">True</property>
<property name="sensitive">False</property>
@@ -26483,6 +26460,57 @@ Concentric</property>
</child>
</widget>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox398">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton"
id="button_encoder_load_signal">
+ <property name="width_request">60</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Load
set</property>
+ <property name="relief">half</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked"
handler="on_button_encoder_load_signal_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkImage"
id="image_encoder_capture_open">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ <property name="icon-size">2</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkProgressBar"
id="encoder_pulsebar_load_signal">
+ <property name="width_request">60</property>
+ <property name="can_focus">False</property>
+ <property name="activity_mode">True</property>
+ <property name="show_text">True</property>
+ <property
name="pulse_step">0.10000000149</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -27085,18 +27113,6 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -27133,6 +27149,18 @@ Concentric</property>
</packing>
</child>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -30139,7 +30167,11 @@ then click this button.</property>
</packing>
</child>
<child>
- <widget class="GtkButton"
id="button_encoder_load_signal_on_analyze">
+ <widget class="GtkHBox" id="hbox83">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton"
id="button_encoder_load_signal_at_analyze">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -30149,7 +30181,7 @@ then click this button.</property>
<property name="use_underline">True</property>
<signal name="clicked"
handler="on_button_encoder_load_signal_clicked" swapped="no"/>
<child>
- <widget class="GtkHBox" id="hbox83">
+ <widget class="GtkHBox" id="hbox400">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
@@ -30167,12 +30199,36 @@ then click this button.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label37">
+ <widget class="GtkHBox" id="hbox401">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_load_signal_at_analyze">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Load
another set</property>
</widget>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkProgressBar"
id="encoder_pulsebar_load_signal_at_analyze">
+ <property name="can_focus">False</property>
+ <property name="activity_mode">True</property>
+ <property name="show_text">True</property>
+ <property
name="pulse_step">0.10000000149</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
@@ -30182,6 +30238,13 @@ then click this button.</property>
</child>
</widget>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
@@ -34819,6 +34882,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index c6c700a3..6c849d86 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -98,7 +98,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_encoder_exercise_close_and_recalculate;
[Widget] Gtk.Button button_encoder_capture_session_overview;
[Widget] Gtk.Button button_encoder_load_signal;
- [Widget] Gtk.Button button_encoder_load_signal_on_analyze;
+ [Widget] Gtk.Button button_encoder_load_signal_at_analyze;
[Widget] Gtk.Viewport viewport_image_encoder_capture;
[Widget] Gtk.Image image_encoder_capture;
[Widget] Gtk.ProgressBar encoder_pulsebar_capture;
@@ -298,6 +298,9 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Notebook notebook_encoder_analyze;
[Widget] Gtk.Image image_encoder_analyze;
[Widget] Gtk.ProgressBar encoder_pulsebar_analyze;
+ [Widget] Gtk.ProgressBar encoder_pulsebar_load_signal;
+ [Widget] Gtk.ProgressBar encoder_pulsebar_load_signal_at_analyze;
+ [Widget] Gtk.Label label_encoder_load_signal_at_analyze;
[Widget] Gtk.Alignment alignment_treeview_encoder_capture_curves;
[Widget] Gtk.TreeView treeview_encoder_capture_curves;
@@ -428,6 +431,10 @@ public partial class ChronoJumpWindow
{
encoder_pulsebar_capture.Fraction = 1;
encoder_pulsebar_capture.Text = "";
+ encoder_pulsebar_load_signal.Fraction = 1;
+ encoder_pulsebar_load_signal.Text = "";
+ encoder_pulsebar_load_signal_at_analyze.Fraction = 1;
+ encoder_pulsebar_load_signal_at_analyze.Text = "";
encoder_pulsebar_analyze.Fraction = 1;
encoder_pulsebar_analyze.Text = "";
@@ -5103,7 +5110,7 @@ public partial class ChronoJumpWindow
button_encoder_capture_session_overview.Sensitive = Util.IntToBool(table[2]);
button_encoder_load_signal.Sensitive = Util.IntToBool(table[2]);
- button_encoder_load_signal_on_analyze.Sensitive = Util.IntToBool(table[2]);
+ button_encoder_load_signal_at_analyze.Sensitive = Util.IntToBool(table[2]);
hbox_encoder_capture_curves_save_all_none.Sensitive = Util.IntToBool(table[3]);
button_export_encoder_signal.Sensitive = Util.IntToBool(table[3]);
@@ -5752,10 +5759,25 @@ public partial class ChronoJumpWindow
//treeview_encoder_capture_curves.Sensitive = false;
encoderThread = new Thread(new ThreadStart(encoderDoCurvesGraphR_curves));
+
if(action == encoderActions.CURVES)
GLib.Idle.Add (new GLib.IdleHandler (pulseGTKEncoderCurves));
else // action == encoderActions.LOAD
+ {
+ //capture tab
+ button_encoder_load_signal.Visible = false;
+ encoder_pulsebar_load_signal.Fraction = 0;
+ encoder_pulsebar_load_signal.Visible = true;
+
+ //analyze tab
+ label_encoder_load_signal_at_analyze.Visible = false;
+ encoder_pulsebar_load_signal_at_analyze.SetSizeRequest (
+ label_encoder_load_signal_at_analyze.SizeRequest().Width, -1);
+ encoder_pulsebar_load_signal_at_analyze.Fraction = 0;
+ encoder_pulsebar_load_signal_at_analyze.Visible = true;
+
GLib.Idle.Add (new GLib.IdleHandler (pulseGTKEncoderLoad));
+ }
encoderButtonsSensitive(encoderSensEnum.PROCESSINGR);
LogB.ThreadStart();
@@ -6280,12 +6302,21 @@ public partial class ChronoJumpWindow
encoderRProcAnalyze.CancelRScript = true;
}
+ //capture tab
+ button_encoder_load_signal.Visible = true;
+ encoder_pulsebar_load_signal.Visible = false;
+
+ //analyze tab
+ label_encoder_load_signal_at_analyze.Visible = true;
+ encoder_pulsebar_load_signal_at_analyze.Visible = false;
+
finishPulsebar(encoderActions.LOAD);
LogB.ThreadEnded();
return false;
}
updatePulsebar(encoderActions.LOAD); //activity on pulsebar
+
Thread.Sleep (50);
//LogB.Debug(" L:", encoderThread.ThreadState.ToString());
LogB.Information(" L:" + encoderThread.ThreadState.ToString());
@@ -6389,13 +6420,24 @@ public partial class ChronoJumpWindow
contents = Catalog.GetString("Starting R");
}
- if(action == encoderActions.CURVES || action == encoderActions.LOAD) {
+ if(action == encoderActions.CURVES)
+ {
if(fraction == -1)
encoder_pulsebar_capture.Pulse();
else
encoder_pulsebar_capture.Fraction =
UtilAll.DivideSafeFraction(fraction, 6);
-
+
encoder_pulsebar_capture.Text = contents;
+ }
+ else if(action == encoderActions.LOAD)
+ {
+ if(fraction <= 0) {
+ encoder_pulsebar_load_signal.Pulse();
+ encoder_pulsebar_load_signal_at_analyze.Pulse();
+ } else {
+ encoder_pulsebar_load_signal.Fraction =
UtilAll.DivideSafeFraction(fraction, 6);
+ encoder_pulsebar_load_signal_at_analyze.Fraction =
UtilAll.DivideSafeFraction(fraction, 6);
+ }
} else {
if(fraction == -1)
encoder_pulsebar_analyze.Pulse();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]