[chronojump] Encoder capture 1set/cont according to preferences. Changed app1 GUI.
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder capture 1set/cont according to preferences. Changed app1 GUI.
- Date: Fri, 3 Apr 2020 11:17:49 +0000 (UTC)
commit 817be3cdd62f9ec88514ba4ab800da6ebed93ccc
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Apr 3 13:16:49 2020 +0200
Encoder capture 1set/cont according to preferences. Changed app1 GUI.
glade/app1.glade | 93 ++++++++++------------------------------------
src/gui/app1/chronojump.cs | 4 +-
src/gui/app1/encoder.cs | 34 ++++++++---------
src/gui/app1/icons.cs | 6 ---
src/gui/networks.cs | 5 +--
5 files changed, 39 insertions(+), 103 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 217b9029..8a5c6e8c 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -24847,6 +24847,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -26374,65 +26377,6 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkVBox"
id="vbox_encoder_capture_1_or_cont">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkRadioButton"
id="radio_encoder_capture_1set">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property
name="receives_default">False</property>
- <property name="tooltip"
translatable="yes">Capture 1 set</property>
- <property name="relief">none</property>
- <property name="active">True</property>
- <property name="draw_indicator">False</property>
- <child>
- <widget class="GtkImage"
id="image_encoder_capture_1set">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property
name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton"
id="radio_encoder_capture_cont">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property
name="receives_default">False</property>
- <property name="tooltip"
translatable="yes">Capture continuously</property>
- <property name="relief">none</property>
- <property name="active">True</property>
- <property name="draw_indicator">False</property>
- <property
name="group">radio_encoder_capture_1set</property>
- <child>
- <widget class="GtkImage"
id="image_encoder_capture_cont">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property
name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkButton"
id="button_encoder_capture">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -26456,7 +26400,7 @@ Concentric</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -26565,7 +26509,7 @@ Concentric</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -27163,18 +27107,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>
@@ -27211,6 +27143,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>
@@ -34838,6 +34782,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/chronojump.cs b/src/gui/app1/chronojump.cs
index 638bdbee..90a83abd 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -2303,7 +2303,7 @@ public partial class ChronoJumpWindow
LogB.Information("Bye2!");
- if(radio_encoder_capture_cont.Active)
+ if(preferences.encoderCaptureInfinite)
on_button_encoder_capture_finish_cont_clicked(new object(), new EventArgs());
else
encoderRProcCapture.SendEndProcess();
@@ -3014,8 +3014,6 @@ public partial class ChronoJumpWindow
hbox_combo_encoder_analyze_1RM.Visible=false;
radiobutton_encoder_analyze_neuromuscular_profile.Visible = false;
- radio_encoder_capture_1set.Active = true;
- //hbox_encoder_capture_1_or_cont.Visible = false;
vbox_angle_now.Visible = true;
label_gravitatory_vpf_propulsive.Visible = false;
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 13259ace..53fbd3b0 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -81,8 +81,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_encoder_capture_inertial_ecc;
[Widget] Gtk.Label label_encoder_capture_inertial_con;
- [Widget] Gtk.RadioButton radio_encoder_capture_1set;
- [Widget] Gtk.RadioButton radio_encoder_capture_cont;
[Widget] Gtk.Button button_encoder_capture;
//encoder calibrate/recalibrate widgets
@@ -774,7 +772,7 @@ public partial class ChronoJumpWindow
}
void prepareForEncoderInertiaCalibrate()
{
- sensitiveGuiEventDoing(radio_encoder_capture_cont.Active);
+ sensitiveGuiEventDoing(preferences.encoderCaptureInfinite);
button_encoder_inertial_calibrate.Sensitive = true;
button_encoder_inertial_calibrate_close.Sensitive = true;
label_wait.Text = " ";
@@ -949,7 +947,7 @@ public partial class ChronoJumpWindow
if(notebook_encoder_capture.CurrentPage == 1)
notebook_encoder_capture.PrevPage();
- sensitiveGuiEventDoing(radio_encoder_capture_cont.Active);
+ sensitiveGuiEventDoing(preferences.encoderCaptureInfinite);
LogB.Debug("Calling encoderThreadStart for capture");
@@ -1298,10 +1296,10 @@ public partial class ChronoJumpWindow
encoderButtonsSensitive(encoderSensEnum.DONENOSIGNAL);
//remove last set on cont if there is no data
- if(radio_encoder_capture_cont.Active)
+ if(preferences.encoderCaptureInfinite)
removeSignalFromGuiBecauseDeletedOrCancelled();
- if(configChronojump.EncoderCaptureShowOnlyBars && !
radio_encoder_capture_cont.Active)
+ if(configChronojump.EncoderCaptureShowOnlyBars && !
preferences.encoderCaptureInfinite)
new DialogMessage(Constants.MessageTypes.WARNING,
Catalog.GetString("Sorry, no repetitions matched your
criteria."));
}
@@ -2838,7 +2836,7 @@ public partial class ChronoJumpWindow
//will start calcule curves thread
if(capturedOk)
{
- if(radio_encoder_capture_cont.Active && ! captureContWithCurves)
+ if(preferences.encoderCaptureInfinite && ! captureContWithCurves)
{
LogB.Debug("Don't need to to encoderCalculeCurves");
encoderTimeStamp = UtilDate.ToFile(DateTime.Now);
@@ -5374,7 +5372,7 @@ public partial class ChronoJumpWindow
allocation.Height != encoder_capture_curves_allocationYOld)
{
encoder_capture_curves_bars_pixmap = new Gdk.Pixmap
(encoder_capture_curves_bars_drawingarea.GdkWindow, allocation.Width, allocation.Height, -1);
- if(encoder_capture_curves_bars_pixmap == null || ! radio_encoder_capture_cont.Active
|| firstSetOfCont)
+ if(encoder_capture_curves_bars_pixmap == null || ! preferences.encoderCaptureInfinite
|| firstSetOfCont)
{
if(encoderGraphDoPlot == null || ! encoderGraphDoPlot.GraphPrepared)
{
@@ -5558,7 +5556,7 @@ public partial class ChronoJumpWindow
treeview_encoder_capture_curves.Sensitive = true;
//on continuous mode do not erase bars at beginning of capture in order to see last
bars
- if(action == encoderActions.CAPTURE && radio_encoder_capture_cont.Active) {
+ if(action == encoderActions.CAPTURE && preferences.encoderCaptureInfinite) {
prepareEncoderGraphs(false, true); //bars, signal
encoderGraphDoPlot.ShowMessage("Previous set", true, false);
} else
@@ -5575,7 +5573,7 @@ public partial class ChronoJumpWindow
webcamEncoderFileStarted = WebcamEncoderFileStarted.NOCAMERA;
//remove treeview columns
- if( ! radio_encoder_capture_cont.Active || firstSetOfCont )
+ if( ! preferences.encoderCaptureInfinite || firstSetOfCont )
treeviewEncoderCaptureRemoveColumns();
if(encoder_capture_curves_bars_pixmap != null)
@@ -5615,7 +5613,7 @@ public partial class ChronoJumpWindow
int recordingTime = preferences.encoderCaptureTime;
- if(radio_encoder_capture_cont.Active)
+ if(preferences.encoderCaptureInfinite)
encoderProcessFinishContMode = false; //will be true when finish
button is pressed
string portName = "";
@@ -5627,7 +5625,7 @@ public partial class ChronoJumpWindow
encoder_capture_signal_drawingarea.Allocation.Height,
recordingTime,
preferences.encoderCaptureInactivityEndTime,
- radio_encoder_capture_cont.Active,
+ preferences.encoderCaptureInfinite,
findEccon(true),
portName,
(encoderConfigurationCurrent.has_inertia &&
eCaptureInertialBG != null),
@@ -5812,9 +5810,9 @@ public partial class ChronoJumpWindow
hbox_encoder_capture_wait.Visible = ! show;
vbox_encoder_capture_doing.Visible = show;
- button_encoder_capture_cancel.Visible = ! radio_encoder_capture_cont.Active;
- button_encoder_capture_finish.Visible = ! radio_encoder_capture_cont.Active;
- button_encoder_capture_finish_cont.Visible = radio_encoder_capture_cont.Active;
+ button_encoder_capture_cancel.Visible = ! preferences.encoderCaptureInfinite;
+ button_encoder_capture_finish.Visible = ! preferences.encoderCaptureInfinite;
+ button_encoder_capture_finish_cont.Visible = preferences.encoderCaptureInfinite;
}
//TODO: this has to be done every capture or just the first?
@@ -6315,7 +6313,7 @@ public partial class ChronoJumpWindow
private void updatePulsebar (encoderActions action)
{
- if(action == encoderActions.CAPTURE && radio_encoder_capture_cont.Active) {
+ if(action == encoderActions.CAPTURE && preferences.encoderCaptureInfinite) {
encoder_pulsebar_capture.Text = "";
encoder_pulsebar_capture.Pulse();
return;
@@ -6621,7 +6619,7 @@ public partial class ChronoJumpWindow
if(! preferences.encoderCaptureSecondaryVariableShow)
secondaryVariable = "";
- if(action == encoderActions.CURVES_AC && radio_encoder_capture_cont.Active &&
! captureContWithCurves)
+ if(action == encoderActions.CURVES_AC && preferences.encoderCaptureInfinite
&& ! captureContWithCurves)
{
//will use captureCurvesBarsData (created on capture)
LogB.Information("at fff with captureCurvesBarsData =");
@@ -6931,7 +6929,7 @@ public partial class ChronoJumpWindow
Util.FileDelete(UtilEncoder.GetEncoderStatusTempBaseFileName() + "5.txt");
Util.FileDelete(UtilEncoder.GetEncoderStatusTempBaseFileName() + "6.txt");
- if(action == encoderActions.CURVES_AC && radio_encoder_capture_cont.Active && !
encoderProcessFinishContMode)
+ if(action == encoderActions.CURVES_AC && preferences.encoderCaptureInfinite && !
encoderProcessFinishContMode)
on_button_encoder_capture_clicked_do (false);
//for chronojumpWindowTests
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index dfc3269c..24fdffd8 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -145,8 +145,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_encoder_exercise_close;
[Widget] Gtk.Image image_encoder_capture_open;
[Widget] Gtk.Image image_encoder_capture_open1;
- [Widget] Gtk.Image image_encoder_capture_1set;
- [Widget] Gtk.Image image_encoder_capture_cont;
[Widget] Gtk.Image image_encoder_capture_execute;
[Widget] Gtk.Image image_encoder_exercise_edit;
[Widget] Gtk.Image image_encoder_exercise_add;
@@ -434,10 +432,6 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "zero.png");
image_force_sensor_tare.Pixbuf = pixbuf;
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "one.png");
- image_encoder_capture_1set.Pixbuf = pixbuf;
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "cont.png");
- image_encoder_capture_cont.Pixbuf = pixbuf;
//pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "run_2x.png");
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_capture_big.png");
image_encoder_capture_execute.Pixbuf = pixbuf;
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 665d1408..f817fcf2 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -62,7 +62,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_current_person;
[Widget] Gtk.Button button_contacts_person_change;
[Widget] Gtk.Button button_encoder_person_change;
- [Widget] Gtk.VBox vbox_encoder_capture_1_or_cont;
//encoder exercise stuff
[Widget] Gtk.Label label_encoder_exercise_encoder;
@@ -156,8 +155,8 @@ public partial class ChronoJumpWindow
//and then tooltip appears during all capture, so hide this tooltip
button_encoder_capture_finish.TooltipText = "";
- //don't show encoder 1-cont buttons
- vbox_encoder_capture_1_or_cont.Visible = false;
+ //do not allow to capture infinite (cont)
+ preferences.encoderCaptureInfinite = false;
//don't allow to edit exercises
button_encoder_exercise_edit.Visible = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]