[chronojump] Bells: show inertial_discard_first_three option, only on inertial
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Bells: show inertial_discard_first_three option, only on inertial
- Date: Mon, 20 Feb 2017 19:45:17 +0000 (UTC)
commit 502009e042223b4b2bc87dd43f1283f051c4367c
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Feb 20 20:33:42 2017 +0100
Bells: show inertial_discard_first_three option, only on inertial
src/constants.cs | 2 +-
src/gui/encoder.cs | 11 ++++++-----
src/gui/repetitiveConditions.cs | 9 +++++++--
3 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/constants.cs b/src/constants.cs
index f750f8c..82acdef 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -709,7 +709,7 @@ public class Constants
public static string CameraNotFound = Catalog.GetString("Sorry, no cameras found.");
public enum BellModes {
- JUMPS, RUNS, ENCODER
+ JUMPS, RUNS, ENCODERGRAVITATORY, ENCODERINERTIAL
}
public enum Menuitem_modes { JUMPSSIMPLE, JUMPSREACTIVE, RUNSSIMPLE, RUNSINTERVALLIC,
POWERGRAVITATORY, POWERINERTIAL, OTHER }
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 6e3db56..f2b80fa 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -82,8 +82,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_encoder_inertial_calibrate;
[Widget] Gtk.Label label_wait;
- [Widget] Gtk.Label label_gravitatory;
- [Widget] Gtk.Label label_inertial;
[Widget] Gtk.RadioButton radiobutton_gravitatory_not_menu;
[Widget] Gtk.RadioButton radiobutton_inertial_not_menu;
@@ -137,7 +135,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_encoder_capture_curves_none;
[Widget] Gtk.Button button_encoder_capture_curves_4top;
- [Widget] Gtk.Notebook notebook_encoder_exercise;
[Widget] Gtk.Box hbox_combo_encoder_exercise_analyze;
[Widget] Gtk.ComboBox combo_encoder_exercise_analyze;
@@ -564,8 +561,12 @@ public partial class ChronoJumpWindow
}
- private void on_button_encoder_bells_clicked(object o, EventArgs args) {
- repetitiveConditionsWin.View(Constants.BellModes.ENCODER, preferences.volumeOn);
+ private void on_button_encoder_bells_clicked(object o, EventArgs args)
+ {
+ if(radio_menuitem_mode_power_gravitatory.Active)
+ repetitiveConditionsWin.View(Constants.BellModes.ENCODERGRAVITATORY,
preferences.volumeOn);
+ else
+ repetitiveConditionsWin.View(Constants.BellModes.ENCODERINERTIAL,
preferences.volumeOn);
}
/*
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index a1b59f8..d907b71 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -203,7 +203,8 @@ public class RepetitiveConditionsWindow
RepetitiveConditionsWindowBox.volumeOn = volumeOn;
}
- void showWidgets(Constants.BellModes bellMode) {
+ void showWidgets(Constants.BellModes bellMode)
+ {
frame_best_and_worst.Hide();
frame_conditions.Hide();
hbox_jump_best_worst.Hide();
@@ -213,6 +214,7 @@ public class RepetitiveConditionsWindow
frame_encoder_automatic_conditions.Hide();
vbox_encoder_manual.Hide();
notebook_encoder_conditions.Hide();
+ checkbutton_inertial_discard_first_three.Hide();
if(bellMode == Constants.BellModes.JUMPS) {
frame_best_and_worst.Show();
@@ -224,12 +226,15 @@ public class RepetitiveConditionsWindow
hbox_run_best_worst.Show();
hbox_run_conditions.Show();
frame_conditions.Show();
- } else { //encoder
+ } else { //encoder (grav and inertial)
notebook_encoder_conditions.CurrentPage = 3; //power
frame_encoder_automatic_conditions.Show();
vbox_encoder_manual.Show();
if(checkbutton_encoder_show_manual_feedback.Active)
notebook_encoder_conditions.Show();
+
+ if(bellMode == Constants.BellModes.ENCODERINERTIAL)
+ checkbutton_inertial_discard_first_three.Show();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]