[chronojump] Contacts exercise gui shows options on runs interval
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Contacts exercise gui shows options on runs interval
- Date: Wed, 11 Dec 2019 15:07:52 +0000 (UTC)
commit 4d99b6e7a0f2975742a599b81fa0473018b1e03d
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Dec 11 16:07:24 2019 +0100
Contacts exercise gui shows options on runs interval
glade/app1.glade | 5 +++--
src/gui/app1/contactsExercise.cs | 32 ++++++++++++++++++++++++++++++--
src/gui/app1/run.cs | 9 +++++++++
3 files changed, 42 insertions(+), 4 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 76670717..052f1c85 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -13818,6 +13818,7 @@ EncoderInertialCapture</property>
<property name="snap_to_ticks">True</property>
<property name="numeric">True</property>
<property
name="update_policy">if-valid</property>
+ <signal name="value_changed"
handler="on_extra_window_runs_interval_spinbutton_limit_value_changed" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
@@ -13853,8 +13854,8 @@ EncoderInertialCapture</property>
</child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
index a605662a..221b87ab 100644
--- a/src/gui/app1/contactsExercise.cs
+++ b/src/gui/app1/contactsExercise.cs
@@ -173,9 +173,9 @@ public partial class ChronoJumpWindow
{
name += extra_window_jumps_rj_spinbutton_limit.Value.ToString();
if(((JumpType) currentEventType).JumpsLimited)
- name += sep + " " + Catalog.GetString("jumps");
+ name += " " + Catalog.GetString("jumps");
else
- name += sep + " " + Catalog.GetString("seconds");
+ name += " s";
sep = "; ";
}
@@ -201,6 +201,34 @@ public partial class ChronoJumpWindow
label_contacts_exercise_selected_options.Text = label_runs_simple_track_distance_value.Text +
" " + label_runs_simple_track_distance_units.Text;
}
+ private void setLabelContactsExerciseSelectedOptionsRunsInterval()
+ {
+ LogB.Information("TT1");
+ if(currentEventType == null)
+ return;
+
+ LogB.Information("TT2");
+ string name = "";
+ string sep = "";
+
+ if( ((RunType) currentEventType).Distance >= 0 )
+ {
+ name = label_runs_interval_track_distance_value.Text + " m";
+ sep = "; ";
+ }
+ if( ! ((RunType) currentEventType).Unlimited )
+ {
+ name += sep + extra_window_runs_interval_spinbutton_limit.Value;
+
+ if( ((RunType) currentEventType).TracksLimited )
+ name += " " + Catalog.GetString("laps");
+ else
+ name += " s";
+ }
+
+ label_contacts_exercise_selected_options.Text = name;
+ }
+
private void on_menuitem_mode_activate(object o, EventArgs args)
{
Gtk.ImageMenuItem imi = o as Gtk.ImageMenuItem;
diff --git a/src/gui/app1/run.cs b/src/gui/app1/run.cs
index cc63e4ca..ac73335a 100644
--- a/src/gui/app1/run.cs
+++ b/src/gui/app1/run.cs
@@ -207,6 +207,8 @@ public partial class ChronoJumpWindow
} else {
extra_window_showLimitData(false, false); //visible, sensitive
}
+
+ setLabelContactsExerciseSelectedOptionsRunsInterval();
}
private void on_more_runs_update_test (object o, EventArgs args)
@@ -280,6 +282,11 @@ public partial class ChronoJumpWindow
extra_window_runs_interval_label_limit_units.Sensitive = sensitive;
}
+ private void on_extra_window_runs_interval_spinbutton_limit_value_changed (object o, EventArgs args)
+ {
+ setLabelContactsExerciseSelectedOptionsRunsInterval();
+ }
+
// ----
// ---- start of track distance
// ----
@@ -348,6 +355,8 @@ public partial class ChronoJumpWindow
label_runs_interval_track_distance_value.Text =
Util.TrimDecimals(genericWin.SpinDouble2Selected.ToString(),
preferences.digitsNumber);
+
+ setLabelContactsExerciseSelectedOptionsRunsInterval();
}
// ---- end of track distance
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]