[chronojump] Implemented on preferences gui: encoderRepetitionCriteriaGravitatory, encoderRepetitionCriteriaInert
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Implemented on preferences gui: encoderRepetitionCriteriaGravitatory, encoderRepetitionCriteriaInert
- Date: Tue, 5 Apr 2022 14:54:04 +0000 (UTC)
commit cef8d0a12821aa91a350755ebe5f4fe27eea6703
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Apr 5 16:53:23 2022 +0200
Implemented on preferences gui: encoderRepetitionCriteriaGravitatory, encoderRepetitionCriteriaInertial
glade/preferences_win.glade | 20 +++++++-------
src/gui/preferences.cs | 65 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+), 10 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index a0384dea8..978585b82 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -2372,7 +2372,7 @@ It starts before and arrives there with some speed.</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton"
id="radio_encoder_criteria_gravitatory_ecc-con">
+ <widget class="GtkRadioButton"
id="radio_encoder_rep_criteria_gravitatory_ecc_con">
<property name="label" translatable="yes">Average of both
phases</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2386,14 +2386,14 @@ It starts before and arrives there with some speed.</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton"
id="radio_encoder_criteria_gravitatory_ecc">
+ <widget class="GtkRadioButton"
id="radio_encoder_rep_criteria_gravitatory_ecc">
<property name="label"
translatable="yes">Eccentric</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
- <property
name="group">radio_encoder_criteria_gravitatory_ecc-con</property>
+ <property
name="group">radio_encoder_rep_criteria_gravitatory_ecc_con</property>
</widget>
<packing>
<property name="top_attach">2</property>
@@ -2406,13 +2406,13 @@ It starts before and arrives there with some speed.</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkRadioButton"
id="radio_encoder_criteria_gravitatory_con">
+ <widget class="GtkRadioButton"
id="radio_encoder_rep_criteria_gravitatory_con">
<property name="label"
translatable="yes">Concentric</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <property
name="group">radio_encoder_criteria_gravitatory_ecc-con</property>
+ <property
name="group">radio_encoder_rep_criteria_gravitatory_ecc_con</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -2475,7 +2475,7 @@ It starts before and arrives there with some speed.</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton"
id="radio_encoder_criteria_inertial_ecc-con">
+ <widget class="GtkRadioButton"
id="radio_encoder_rep_criteria_inertial_ecc_con">
<property name="label" translatable="yes">Average of both
phases</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2491,13 +2491,13 @@ It starts before and arrives there with some speed.</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton"
id="radio_encoder_criteria_inertial_ecc">
+ <widget class="GtkRadioButton"
id="radio_encoder_rep_criteria_inertial_ecc">
<property name="label"
translatable="yes">Eccentric</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <property
name="group">radio_encoder_criteria_inertial_ecc-con</property>
+ <property
name="group">radio_encoder_rep_criteria_inertial_ecc_con</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -2512,13 +2512,13 @@ It starts before and arrives there with some speed.</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkRadioButton"
id="radio_encoder_criteria_inertial_con">
+ <widget class="GtkRadioButton"
id="radio_encoder_rep_criteria_inertial_con">
<property name="label"
translatable="yes">Concentric</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <property
name="group">radio_encoder_criteria_inertial_ecc-con</property>
+ <property
name="group">radio_encoder_rep_criteria_inertial_ecc_con</property>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index e57806f77..3ac6141db 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -157,6 +157,12 @@ public class PreferencesWindow
[Widget] Gtk.Image image_encoder_capture_cut_by_triggers_help;
[Widget] Gtk.CheckButton check_encoder_capture_infinite;
[Widget] Gtk.Image image_encoder_capture_infinite;
+ [Widget] Gtk.RadioButton radio_encoder_rep_criteria_gravitatory_ecc_con;
+ [Widget] Gtk.RadioButton radio_encoder_rep_criteria_gravitatory_ecc;
+ [Widget] Gtk.RadioButton radio_encoder_rep_criteria_gravitatory_con;
+ [Widget] Gtk.RadioButton radio_encoder_rep_criteria_inertial_ecc_con;
+ [Widget] Gtk.RadioButton radio_encoder_rep_criteria_inertial_ecc;
+ [Widget] Gtk.RadioButton radio_encoder_rep_criteria_inertial_con;
//encoder other tab
[Widget] Gtk.CheckButton checkbutton_encoder_propulsive;
@@ -675,6 +681,19 @@ public class PreferencesWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "cont.png");
PreferencesWindowBox.image_encoder_capture_infinite.Pixbuf = pixbuf;
+ if(preferences.encoderRepetitionCriteriaGravitatory ==
Preferences.EncoderRepetitionCriteria.ECC_CON)
+ PreferencesWindowBox.radio_encoder_rep_criteria_gravitatory_ecc_con.Active = true;
+ else if(preferences.encoderRepetitionCriteriaGravitatory ==
Preferences.EncoderRepetitionCriteria.ECC)
+ PreferencesWindowBox.radio_encoder_rep_criteria_gravitatory_ecc.Active = true;
+ else // if(preferences.encoderRepetitionCriteriaGravitatory ==
Preferences.EncoderRepetitionCriteria.CON)
+ PreferencesWindowBox.radio_encoder_rep_criteria_gravitatory_con.Active = true;
+
+ if(preferences.encoderRepetitionCriteriaInertial ==
Preferences.EncoderRepetitionCriteria.ECC_CON)
+ PreferencesWindowBox.radio_encoder_rep_criteria_inertial_ecc_con.Active = true;
+ else if(preferences.encoderRepetitionCriteriaInertial ==
Preferences.EncoderRepetitionCriteria.ECC)
+ PreferencesWindowBox.radio_encoder_rep_criteria_inertial_ecc.Active = true;
+ else // if(preferences.encoderRepetitionCriteriaInertial ==
Preferences.EncoderRepetitionCriteria.CON)
+ PreferencesWindowBox.radio_encoder_rep_criteria_inertial_con.Active = true;
//encoder other -->
PreferencesWindowBox.checkbutton_encoder_propulsive.Active = preferences.encoderPropulsive;
@@ -2087,6 +2106,52 @@ public class PreferencesWindow
SqlitePreferences.EncoderCaptureInfinite, preferences.encoderCaptureInfinite,
PreferencesWindowBox.check_encoder_capture_infinite.Active);
+ //radio_encoder_rep_criteria_gravitatory_*
+ if(PreferencesWindowBox.radio_encoder_rep_criteria_gravitatory_ecc_con.Active &&
+ preferences.encoderRepetitionCriteriaGravitatory !=
Preferences.EncoderRepetitionCriteria.ECC_CON)
+ {
+ SqlitePreferences.Update(SqlitePreferences.EncoderRepetitionCriteriaGravitatoryStr,
+ Preferences.EncoderRepetitionCriteria.ECC_CON.ToString(), true);
+ preferences.encoderRepetitionCriteriaGravitatory =
Preferences.EncoderRepetitionCriteria.ECC_CON;
+ }
+ else if(PreferencesWindowBox.radio_encoder_rep_criteria_gravitatory_ecc.Active &&
+ preferences.encoderRepetitionCriteriaGravitatory !=
Preferences.EncoderRepetitionCriteria.ECC)
+ {
+ SqlitePreferences.Update(SqlitePreferences.EncoderRepetitionCriteriaGravitatoryStr,
+ Preferences.EncoderRepetitionCriteria.ECC.ToString(), true);
+ preferences.encoderRepetitionCriteriaGravitatory =
Preferences.EncoderRepetitionCriteria.ECC;
+ }
+ else if(PreferencesWindowBox.radio_encoder_rep_criteria_gravitatory_con.Active &&
+ preferences.encoderRepetitionCriteriaGravitatory !=
Preferences.EncoderRepetitionCriteria.CON)
+ {
+ SqlitePreferences.Update(SqlitePreferences.EncoderRepetitionCriteriaGravitatoryStr,
+ Preferences.EncoderRepetitionCriteria.CON.ToString(), true);
+ preferences.encoderRepetitionCriteriaGravitatory =
Preferences.EncoderRepetitionCriteria.CON;
+ }
+
+ //radio_encoder_rep_criteria_inertial_*
+ if(PreferencesWindowBox.radio_encoder_rep_criteria_inertial_ecc_con.Active &&
+ preferences.encoderRepetitionCriteriaInertial !=
Preferences.EncoderRepetitionCriteria.ECC_CON)
+ {
+ SqlitePreferences.Update(SqlitePreferences.EncoderRepetitionCriteriaInertialStr,
+ Preferences.EncoderRepetitionCriteria.ECC_CON.ToString(), true);
+ preferences.encoderRepetitionCriteriaInertial =
Preferences.EncoderRepetitionCriteria.ECC_CON;
+ }
+ else if(PreferencesWindowBox.radio_encoder_rep_criteria_inertial_ecc.Active &&
+ preferences.encoderRepetitionCriteriaInertial !=
Preferences.EncoderRepetitionCriteria.ECC)
+ {
+ SqlitePreferences.Update(SqlitePreferences.EncoderRepetitionCriteriaInertialStr,
+ Preferences.EncoderRepetitionCriteria.ECC.ToString(), true);
+ preferences.encoderRepetitionCriteriaInertial =
Preferences.EncoderRepetitionCriteria.ECC;
+ }
+ else if(PreferencesWindowBox.radio_encoder_rep_criteria_inertial_con.Active &&
+ preferences.encoderRepetitionCriteriaInertial !=
Preferences.EncoderRepetitionCriteria.CON)
+ {
+ SqlitePreferences.Update(SqlitePreferences.EncoderRepetitionCriteriaInertialStr,
+ Preferences.EncoderRepetitionCriteria.CON.ToString(), true);
+ preferences.encoderRepetitionCriteriaInertial =
Preferences.EncoderRepetitionCriteria.CON;
+ }
+
//---- end of encoder capture
//encoder other ----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]