[chronojump/michrolab] minor: Changed some variables and added comments
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/michrolab] minor: Changed some variables and added comments
- Date: Thu, 14 Jul 2022 16:37:51 +0000 (UTC)
commit 1f2e62b0bbd0dcb970b5bc09637a2139a6bac91c
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon May 30 12:02:45 2022 +0200
minor: Changed some variables and added comments
src/gui/app1/chronojump.cs | 10 +++++-----
src/gui/app1/encoder.cs | 9 +++++++--
src/gui/app1/forceSensor.cs | 1 +
3 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 6d3521808..0a65aaafd 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -644,8 +644,8 @@ public partial class ChronoJumpWindow
rfdList = SqliteForceSensorRFD.SelectAll(false);
impulse = SqliteForceSensorRFD.SelectImpulse(false);
- initForceSensor();
- initRunEncoder();
+ initForceSensor ();
+ initRunEncoder ();
UtilGtk.EventBoxColorBackgroundActive (eventbox_button_show_modes_contacts, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
UtilGtk.EventBoxColorBackgroundActive (eventbox_change_modes_contacts_jumps_simple,
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
@@ -758,8 +758,8 @@ public partial class ChronoJumpWindow
//done here because in Glade we cannot use the TextBuffer.Changed
textview_contacts_signal_comment.Buffer.Changed += new
EventHandler(on_textview_contacts_signal_comment_key_press_event);
- contactsInitialize();
- encoderInitializeStuff();
+ initContacts ();
+ initEncoder ();
//done before configInitRead because that will change some Tooltips
addShortcutsToTooltips(operatingSystem == UtilAll.OperatingSystems.MACOSX);
@@ -877,7 +877,7 @@ public partial class ChronoJumpWindow
LogB.Information("Chronojump window started");
}
- private void contactsInitialize()
+ private void initContacts ()
{
followSignals = false;
check_contacts_capture_graph.Active = preferences.contactsCaptureDisplay.ShowGraph;
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 99225ecc4..21c1194a6 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -462,7 +462,7 @@ public partial class ChronoJumpWindow
//TODO: on cross, spline and force speed and power speed should have a spar value higher, like 0.7.
On the other hand, the other cross graphs, haveload(mass) in the X lot more discrete, there is good to put 0.5
- private void encoderInitializeStuff()
+ private void initEncoder ()
{
encoder_pulsebar_capture.Fraction = 1;
encoder_pulsebar_capture.Text = "";
@@ -4561,6 +4561,7 @@ public partial class ChronoJumpWindow
Button button_combo_encoder_exercise_capture_left;
Button button_combo_encoder_exercise_capture_right;
+ // called by initEncoder (just one time)
protected void createEncoderCombos()
{
//create combo exercises
@@ -4736,7 +4737,9 @@ public partial class ChronoJumpWindow
//and on change mode POWERGRAVITORY <-> POWERINERTIAL, because encoderExercises can have different
type (encoderGI)
private void createEncoderComboExerciseAndAnalyze()
{
+ // 1) selecte encoderExercises on SQL
ArrayList encoderExercises = SqliteEncoder.SelectEncoderExercises(false, -1, false,
getEncoderGIByMenuitemMode());
+ // 2) if ! encoderExcises, delete both combos and return
if(encoderExercises.Count == 0)
{
encoderExercisesTranslationAndBodyPWeight = new String [0];
@@ -4748,6 +4751,7 @@ public partial class ChronoJumpWindow
return;
}
+ // 3) define: encoderExercisesTranslationAndBodyPWeight and exerciseNamesToCombo
button_encoder_exercise_edit.Sensitive = true;
button_encoder_exercise_delete.Sensitive = true;
@@ -4762,7 +4766,7 @@ public partial class ChronoJumpWindow
i++;
}
- //get previous combo_encoder_exercise_capture value
+ // 4) update combo_encoder_exercise_capture and set active
string previousExerciseCapture = UtilGtk.ComboGetActive(combo_encoder_exercise_capture);
UtilGtk.ComboUpdate(combo_encoder_exercise_capture, exerciseNamesToCombo, "");
@@ -4773,6 +4777,7 @@ public partial class ChronoJumpWindow
combo_encoder_exercise_capture.Active =
UtilGtk.ComboMakeActive(combo_encoder_exercise_capture,
previousExerciseCapture);
+ // 5) update combo_encoder_exercise_analyze and set active
exerciseNamesToCombo = addAllExercisesToComboExerciseAnalyze(exerciseNamesToCombo);
UtilGtk.ComboUpdate(combo_encoder_exercise_analyze, exerciseNamesToCombo, "");
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index f5f7e89ac..a57587e2a 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -3264,6 +3264,7 @@ LogB.Information(" fs R ");
string [] forceSensorComboExercisesString; //id:name (no translations, use user language)
+ //called on init
private void createForceExerciseCombo ()
{
//force_sensor_exercise
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]