[chronojump] ForceSensor feedback gui added "_rectangle", preparing to path code
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor feedback gui added "_rectangle", preparing to path code
- Date: Mon, 10 May 2021 09:58:37 +0000 (UTC)
commit 1087cc5d60a9df59f1e7a36b87bab81eef96b3a4
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon May 10 11:58:02 2021 +0200
ForceSensor feedback gui added "_rectangle", preparing to path code
glade/repetitive_conditions.glade | 261 ++++++++++++++++++++++----------------
src/gui/app1/chronojump.cs | 2 +-
src/gui/repetitiveConditions.cs | 38 +++---
src/preferences.cs | 6 +-
4 files changed, 176 insertions(+), 131 deletions(-)
---
diff --git a/glade/repetitive_conditions.glade b/glade/repetitive_conditions.glade
index ec42d144..927150fd 100644
--- a/glade/repetitive_conditions.glade
+++ b/glade/repetitive_conditions.glade
@@ -4577,118 +4577,143 @@
<property name="border_width">14</property>
<property name="spacing">12</property>
<child>
- <widget class="GtkCheckButton" id="check_force_sensor_capture_feedback">
- <property name="label" translatable="yes">Show feedback rectangle</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_check_force_sensor_capture_feedback_toggled"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment29">
+ <widget class="GtkVBox" id="vbox18">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="left_padding">20</property>
+ <property name="spacing">12</property>
<child>
- <widget class="GtkHBox" id="hbox_force_sensor_capture_feedback">
+ <widget class="GtkCheckButton"
id="check_force_sensor_capture_feedback_rectangle">
+ <property name="label" translatable="yes">Show feedback rectangle</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="on_check_force_sensor_capture_feedback_rectangle_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment29">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="spacing">20</property>
+ <property name="left_padding">20</property>
<child>
- <widget class="GtkHBox" id="hbox324">
+ <widget class="GtkHBox" id="hbox_force_sensor_capture_feedback_rectangle">
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkLabel" id="label395">
+ <widget class="GtkHBox" id="hbox324">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">at</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_at">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">100 0 9999 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label395">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">at</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_rectangle_at">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">100 0 9999 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label397">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">N</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label397">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">N</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</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="GtkHBox" id="hbox323">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label396">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">range</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_range">
+ <widget class="GtkHBox" id="hbox323">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">40 2 200 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label396">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">range</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_rectangle_range">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">40 2 200 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label398">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">N</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -4696,32 +4721,48 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <widget class="GtkLabel" id="label398">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">N</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</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="GtkVBox" id="vbox19">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkCheckButton" id="check_force_sensor_capture_feedback_path">
+ <property name="label" translatable="yes">Show path</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="on_check_force_sensor_capture_feedback_path_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 2f542fc8..cef9abf2 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -7387,7 +7387,7 @@ LogB.Debug("mc finished 5");
}
else if(m == Constants.Menuitem_modes.FORCESENSOR)
{
- bool feedbackActive = repetitiveConditionsWin.GetForceSensorFeedbackActive;
+ bool feedbackActive = repetitiveConditionsWin.GetForceSensorFeedbackRectangleActive;
if(preferences.forceSensorCaptureFeedbackActive != feedbackActive)
{
SqlitePreferences.Update(SqlitePreferences.ForceSensorCaptureFeedbackActive,
feedbackActive.ToString(), false);
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index 83f89267..08ef92a5 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -186,10 +186,10 @@ public class RepetitiveConditionsWindow
[Widget] Gtk.CheckButton check_rhythm_rest_reps;
//forceSensor
- [Widget] Gtk.CheckButton check_force_sensor_capture_feedback;
- [Widget] Gtk.HBox hbox_force_sensor_capture_feedback;
- [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_at;
- [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_range;
+ [Widget] Gtk.CheckButton check_force_sensor_capture_feedback_rectangle;
+ [Widget] Gtk.HBox hbox_force_sensor_capture_feedback_rectangle;
+ [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_rectangle_at;
+ [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_rectangle_range;
const int JUMPSRUNSPAGE = 0;
const int ENCODERAUTOPAGE = 1;
@@ -408,15 +408,15 @@ public class RepetitiveConditionsWindow
{
if(forceSensorCaptureFeedbackActive)
{
- check_force_sensor_capture_feedback.Active = true;
- hbox_force_sensor_capture_feedback.Sensitive = true;
+ check_force_sensor_capture_feedback_rectangle.Active = true;
+ hbox_force_sensor_capture_feedback_rectangle.Sensitive = true;
} else {
- check_force_sensor_capture_feedback.Active = false;
- hbox_force_sensor_capture_feedback.Sensitive = false;
+ check_force_sensor_capture_feedback_rectangle.Active = false;
+ hbox_force_sensor_capture_feedback_rectangle.Sensitive = false;
}
- spin_force_sensor_capture_feedback_at.Value = forceSensorCaptureFeedbackAt;
- spin_force_sensor_capture_feedback_range.Value = forceSensorCaptureFeedbackRange;
+ spin_force_sensor_capture_feedback_rectangle_at.Value = forceSensorCaptureFeedbackAt;
+ spin_force_sensor_capture_feedback_rectangle_range.Value =
forceSensorCaptureFeedbackRange;
notebook_main.GetNthPage(FORCESENSORPAGE).Show();
}
@@ -586,7 +586,7 @@ public class RepetitiveConditionsWindow
return true;
}
else if(bellMode == Constants.BellModes.FORCESENSOR)
- return check_force_sensor_capture_feedback.Active;
+ return check_force_sensor_capture_feedback_rectangle.Active;
return false;
}
@@ -945,19 +945,23 @@ public class RepetitiveConditionsWindow
/* FORCESENSOR */
- private void on_check_force_sensor_capture_feedback_toggled (object o, EventArgs args)
+ private void on_check_force_sensor_capture_feedback_rectangle_toggled (object o, EventArgs args)
{
- hbox_force_sensor_capture_feedback.Sensitive = check_force_sensor_capture_feedback.Active;
+ hbox_force_sensor_capture_feedback_rectangle.Sensitive =
check_force_sensor_capture_feedback_rectangle.Active;
}
- public bool GetForceSensorFeedbackActive {
- get { return check_force_sensor_capture_feedback.Active; }
+ private void on_check_force_sensor_capture_feedback_path_toggled (object o, EventArgs args)
+ {
+ }
+
+ public bool GetForceSensorFeedbackRectangleActive {
+ get { return check_force_sensor_capture_feedback_rectangle.Active; }
}
public int GetForceSensorFeedbackAt {
- get { return Convert.ToInt32(spin_force_sensor_capture_feedback_at.Value); }
+ get { return Convert.ToInt32(spin_force_sensor_capture_feedback_rectangle_at.Value); }
}
public int GetForceSensorFeedbackRange {
- get { return Convert.ToInt32(spin_force_sensor_capture_feedback_range.Value); }
+ get { return Convert.ToInt32(spin_force_sensor_capture_feedback_rectangle_range.Value); }
}
diff --git a/src/preferences.cs b/src/preferences.cs
index b22696c7..d9b8c679 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -246,9 +246,9 @@ public class Preferences
public string forceSensorCalibrationDateTime;
public double forceSensorCalibrationWeight;
public double forceSensorCalibrationFactor;
- public bool forceSensorCaptureFeedbackActive;
- public int forceSensorCaptureFeedbackAt;
- public int forceSensorCaptureFeedbackRange;
+ public bool forceSensorCaptureFeedbackActive; //rectangle
+ public int forceSensorCaptureFeedbackAt; //rectangle
+ public int forceSensorCaptureFeedbackRange; //rectangle
public bool forceSensorStartEndOptimized;
public enum ForceSensorMIFDurationModes { SECONDS, PERCENT };
public ForceSensorMIFDurationModes forceSensorMIFDurationMode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]