[chronojump] runInterval preferences win don't show double contacts mode radios
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] runInterval preferences win don't show double contacts mode radios
- Date: Mon, 26 Mar 2018 23:10:49 +0000 (UTC)
commit 7c6bcd58fe6cfc2f4171d3f113888fbab5bed5a3
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Mar 27 01:09:52 2018 +0200
runInterval preferences win don't show double contacts mode radios
glade/preferences_win.glade | 14 +++++++++++++-
src/gui/preferences.cs | 29 +++--------------------------
src/preferences.cs | 2 +-
3 files changed, 17 insertions(+), 28 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index b977c6f..aae3887 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -1482,7 +1482,6 @@ It starts before and arrives there with some speed.</property>
</child>
<child>
<widget class="GtkAlignment" id="alignment15">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
@@ -1544,6 +1543,19 @@ It starts before and arrives there with some speed.</property>
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <widget class="GtkLabel" id="label57">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Each track ends
before biggest contact time.</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 59f71ad..11f588f 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -99,9 +99,6 @@ public class PreferencesWindow
[Widget] Gtk.Box vbox_runs_i_prevent_double_contact;
[Widget] Gtk.CheckButton checkbutton_runs_i_prevent_double_contact;
[Widget] Gtk.SpinButton spinbutton_runs_i_prevent_double_contact;
- [Widget] Gtk.RadioButton radio_runs_i_prevent_double_contact_first;
- [Widget] Gtk.RadioButton radio_runs_i_prevent_double_contact_average;
- [Widget] Gtk.RadioButton radio_runs_i_prevent_double_contact_last;
//encoder capture tab
[Widget] Gtk.SpinButton spin_encoder_capture_time;
@@ -391,14 +388,6 @@ public class PreferencesWindow
else // Constants.DoubleContact.LAST DEFAULT
PreferencesWindowBox.radio_runs_prevent_double_contact_last.Active = true;
}
- if(preferences.runIDoubleContactsMode != Constants.DoubleContact.NONE) {
- if(preferences.runIDoubleContactsMode == Constants.DoubleContact.FIRST)
- PreferencesWindowBox.radio_runs_i_prevent_double_contact_first.Active = true;
- else if(preferences.runIDoubleContactsMode == Constants.DoubleContact.LAST)
- PreferencesWindowBox.radio_runs_i_prevent_double_contact_last.Active = true;
- else //Constants.DoubleContact.AVERAGE DEFAULT
- PreferencesWindowBox.radio_runs_i_prevent_double_contact_average.Active =
true;
- }
//---- end of double contacts stuff
@@ -1274,21 +1263,9 @@ public class PreferencesWindow
}
else if(PreferencesWindowBox.checkbutton_runs_i_prevent_double_contact.Active)
{
- //2.2 mode has changed between FIRST, AVERAGE or LAST
- if( PreferencesWindowBox.radio_runs_i_prevent_double_contact_first.Active &&
- (preferences.runIDoubleContactsMode != Constants.DoubleContact.FIRST)
) {
- SqlitePreferences.Update("runIDoubleContactsMode",
Constants.DoubleContact.FIRST.ToString(), true);
- preferences.runIDoubleContactsMode = Constants.DoubleContact.FIRST;
- }
- else if( PreferencesWindowBox.radio_runs_i_prevent_double_contact_average.Active &&
- (preferences.runIDoubleContactsMode !=
Constants.DoubleContact.AVERAGE) ) {
- SqlitePreferences.Update("runIDoubleContactsMode",
Constants.DoubleContact.AVERAGE.ToString(), true);
- preferences.runIDoubleContactsMode = Constants.DoubleContact.AVERAGE;
- }
- else if( PreferencesWindowBox.radio_runs_i_prevent_double_contact_last.Active &&
- (preferences.runIDoubleContactsMode != Constants.DoubleContact.LAST)
) {
- SqlitePreferences.Update("runIDoubleContactsMode",
Constants.DoubleContact.LAST.ToString(), true);
- preferences.runIDoubleContactsMode = Constants.DoubleContact.LAST;
+ if( preferences.runIDoubleContactsMode != Constants.DoubleContact.BIGGEST_TC ) {
+ SqlitePreferences.Update("runIDoubleContactsMode",
Constants.DoubleContact.BIGGEST_TC.ToString(), true);
+ preferences.runIDoubleContactsMode = Constants.DoubleContact.BIGGEST_TC;
}
if(preferences.runIDoubleContactsMS != (int)
PreferencesWindowBox.spinbutton_runs_i_prevent_double_contact.Value) {
diff --git a/src/preferences.cs b/src/preferences.cs
index 95b3d11..5099064 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -47,7 +47,7 @@ public class Preferences
public Constants.DoubleContact runDoubleContactsMode; //default LAST
public int runDoubleContactsMS; //milliseconds
- public Constants.DoubleContact runIDoubleContactsMode; //default AVERAGE
+ public Constants.DoubleContact runIDoubleContactsMode; //As 1.8.1 is NONE or BIGGEST_TC
public int runIDoubleContactsMS; //milliseconds
public int thresholdJumps;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]