[chronojump] gui: runInterval done, but execute need frame :(
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] gui: runInterval done, but execute need frame :(
- Date: Fri, 25 Mar 2011 09:25:14 +0000 (UTC)
commit 7d1e7a323e2130fa3ac1d5bdf1c1764c11c3c9d4
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Mar 24 19:36:20 2011 +0100
gui: runInterval done, but execute need frame :(
glade/chronojump.glade | 592 +++++++++++++++++------------------------------
src/gui/chronojump.cs | 76 ++++---
src/gui/eventExecute.cs | 9 +
src/gui/run.cs | 36 +++-
4 files changed, 294 insertions(+), 419 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 785328e..3617242 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -15629,7 +15629,7 @@ by you</property>
<widget class="GtkViewport" id="viewport_mode">
<property name="visible">True</property>
<property name="resize_mode">queue</property>
- <property name="hadjustment">0 0 769 76.900000000000006 692.10000000000002 769</property>
+ <property name="hadjustment">0 0 738 73.799999999999997 664.20000000000005 738</property>
<property name="shadow_type">out</property>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox2">
@@ -16473,27 +16473,6 @@ Chronopic</property>
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Add jump type</property>
- <signal name="clicked" handler="on_jump_type_add_clicked"/>
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-new</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkButton" id="button_rj_bells">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -16535,6 +16514,27 @@ Chronopic</property>
</child>
</widget>
<packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Add jump type</property>
+ <signal name="clicked" handler="on_jump_type_add_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-new</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -17067,112 +17067,136 @@ Chronopic</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox_runs_interval">
+ <widget class="GtkVBox" id="vbox32">
<property name="visible">True</property>
<child>
- <widget class="GtkButton" id="button_run_interval_by_laps">
- <property name="label" translatable="yes">By laps</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Intervallic run limited by Laps</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_run_interval_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_interval_by_time">
- <property name="label" translatable="yes">By time</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Intervallic run limited by Time</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_run_interval_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_interval_unlimited">
- <property name="label" translatable="yes">Unlimited</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Intervallic run unlimited (until "finish" button is clicked)</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_run_interval_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_interval_mtgug">
- <property name="label" translatable="yes">MTGUG</property>
+ <widget class="GtkHBox" id="hbox_runs_interval">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Intervallic run unlimited (until "finish" button is clicked)</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_run_interval_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
+ <property name="spacing">12</property>
<child>
- <widget class="GtkTable" id="table2">
+ <widget class="GtkHBox" id="hbox40">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
<child>
- <widget class="GtkButton" id="button23">
+ <widget class="GtkRadioButton" id="extra_window_radio_run_interval_by_laps">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Add run type</property>
- <signal name="clicked" handler="on_run_type_add_activate"/>
+ <property name="receives_default">False</property>
+ <property name="tooltip" translatable="yes">Intervallic run limited by laps</property>
+ <property name="relief">none</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">False</property>
+ <signal name="toggled" handler="on_extra_window_runs_interval_test_changed"/>
<child>
- <widget class="GtkImage" id="image3213">
+ <widget class="GtkLabel" id="label_extra_window_radio_run_interval_by_laps">
<property name="visible">True</property>
- <property name="stock">gtk-new</property>
+ <property name="label" translatable="yes">By laps</property>
</widget>
</child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="expand">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
+ <widget class="GtkRadioButton" id="extra_window_radio_run_interval_by_time">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">False</property>
+ <property name="group">extra_window_radio_run_interval_by_laps</property>
+ <signal name="toggled" handler="on_extra_window_runs_interval_test_changed"/>
+ <child>
+ <widget class="GtkLabel" id="label_extra_window_radio_run_interval_by_time">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Intervallic run limited by time</property>
+ <property name="label" translatable="yes">By time</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="extra_window_radio_run_interval_unlimited">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip" translatable="yes">Intervallic run unlimited (until "finish" button is clicked)</property>
+ <property name="relief">none</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">False</property>
+ <property name="group">extra_window_radio_run_interval_by_laps</property>
+ <signal name="toggled" handler="on_extra_window_runs_interval_test_changed"/>
+ <child>
+ <widget class="GtkLabel" id="label_extra_window_radio_run_interval_unlimited">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Unlimited</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="extra_window_radio_run_interval_mtgug">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">False</property>
+ <property name="group">extra_window_radio_run_interval_by_laps</property>
+ <child>
+ <widget class="GtkLabel" id="label_extra_window_radio_run_interval_mtgug">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">MTGUG</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="extra_window_radio_run_interval_more">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">False</property>
+ <property name="group">extra_window_radio_run_interval_by_laps</property>
+ <signal name="clicked" handler="on_extra_window_runs_interval_more"/>
+ <child>
+ <widget class="GtkLabel" id="label_extra_window_radio_run_interval_more">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">More runs</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox41">
+ <property name="visible">True</property>
+ <child>
<widget class="GtkButton" id="button_time_bells">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -17214,23 +17238,88 @@ Chronopic</property>
</child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="expand">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <placeholder/>
+ <widget class="GtkButton" id="button23">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Add run type</property>
+ <signal name="clicked" handler="on_run_type_add_activate"/>
+ <child>
+ <widget class="GtkImage" id="image3213">
+ <property name="visible">True</property>
+ <property name="stock">gtk-new</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
<child>
- <placeholder/>
+ <widget class="GtkButton" id="button3">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Add run type</property>
+ <signal name="clicked" handler="on_run_type_delete_intervallic"/>
+ <child>
+ <widget class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-remove</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
</child>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox38">
+ <property name="visible">True</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Selected:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="extra_window_runs_interval_label_selected">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">the selected test</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -20395,272 +20484,7 @@ weight</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox_runs1">
- <child>
- <widget class="GtkTable" id="table41">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">7</property>
- <property name="column_spacing">2</property>
- <property name="row_spacing">4</property>
- <child>
- <widget class="GtkButton" id="button_run_20yard">
- <property name="label" translatable="yes">20 Yard</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">20Yard Agility test</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_20m">
- <property name="label">20m</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Run 20 meters</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_100m">
- <property name="label">100m</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Run 100 meters</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_200m">
- <property name="label">200m</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Run 200 meters</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_400m">
- <property name="label">400m</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Run 400 meters</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_505">
- <property name="label">505</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">505 Agility test</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_illinois">
- <property name="label">Illinois</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Illinois Agility test</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_zigzag">
- <property name="label">ZigZag</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">ZigZag Agility test</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_shuttle">
- <property name="label">Shuttle</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Shuttle Run Agility test</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">5</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox350">
- <property name="visible">True</property>
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <placeholder/>
- </child>
- </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="left_attach">6</property>
- <property name="right_attach">7</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_run_gesell">
- <property name="label">Gesell DBT</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">ZigZag Agility test</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_normal_run_activate"/>
- <signal name="enter" handler="on_button_enter"/>
- </widget>
- <packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="left_attach">6</property>
- <property name="right_attach">7</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
+ <placeholder/>
</child>
<child>
<placeholder/>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 43c101e..0459235 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -612,6 +612,19 @@ public partial class ChronoJumpWindow
UtilGtk.ColorsRadio(extra_window_radio_run_zigzag);
UtilGtk.ColorsRadio(extra_window_radio_run_more);
+ //runs intervalchanges
+ UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_by_laps);
+ UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_by_time);
+ UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_unlimited);
+ UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_mtgug);
+ UtilGtk.ColorsTestLabel(label_extra_window_radio_run_interval_more);
+
+ UtilGtk.ColorsRadio(extra_window_radio_run_interval_by_laps);
+ UtilGtk.ColorsRadio(extra_window_radio_run_interval_by_time);
+ UtilGtk.ColorsRadio(extra_window_radio_run_interval_unlimited);
+ UtilGtk.ColorsRadio(extra_window_radio_run_interval_mtgug);
+ UtilGtk.ColorsRadio(extra_window_radio_run_interval_more);
+
//persons buttons
@@ -3460,7 +3473,7 @@ Console.WriteLine("X");
//interval runs clicked from user interface
//(not suitable for the other runs we found in "more")
- private void on_run_interval_activate (object o, EventArgs args)
+ private void old_on_run_interval_activate (object o, EventArgs args)
{/*
if(o == (object) button_run_interval_by_laps || o == (object) menuitem_run_interval_by_laps)
{
@@ -3486,37 +3499,36 @@ Console.WriteLine("X");
*/
}
- private void on_run_interval_accepted (object o, EventArgs args)
+ private void on_run_interval_activate (object o, EventArgs args)
{
- /*
Log.WriteLine("run interval accepted");
//if distance can be always different in this run,
//show values selected in runExtraWin
- int distanceInterval = 0;
- if(currentRunType.Distance == 0) {
- distanceInterval = runExtraWin.Distance;
+ double distanceInterval = 0;
+ if(currentRunIntervalType.Distance == 0) {
+ distanceInterval = extra_window_runs_interval_distance;
} else {
- distanceInterval = (int) currentRunType.Distance;
+ distanceInterval = currentRunIntervalType.Distance;
}
double progressbarLimit = 0;
//if it's a unlimited interval run, put -1 as limit value
//if(o == (object) button_rj_unlimited || o == (object) rj_unlimited) {
- if(currentRunType.Unlimited) {
+ if(currentRunIntervalType.Unlimited) {
progressbarLimit = -1;
} else {
- if(currentRunType.FixedValue > 0) {
- progressbarLimit = currentRunType.FixedValue;
+ if(currentRunIntervalType.FixedValue > 0) {
+ progressbarLimit = currentRunIntervalType.FixedValue;
} else {
- progressbarLimit = runExtraWin.Limited;
+ progressbarLimit = extra_window_runs_interval_limit;
}
}
//used by cancel and finish
//currentEventType = new RunType();
- currentEventType = currentRunType;
+ currentEventType = currentRunIntervalType;
//hide running buttons
sensitiveGuiEventDoing();
@@ -3538,7 +3550,7 @@ Console.WriteLine("X");
// currentPerson.UniqueID, currentPerson.Name,
// currentSession.UniqueID,
Constants.RunIntervalTable, //tableName
- currentRunType.Name
+ currentRunIntervalType.Name
// prefsDigitsNumber,
// progressbarLimit
// chronopicWin.Connected
@@ -3554,9 +3566,9 @@ Console.WriteLine("X");
event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done
event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked);
- //currentEventExecute = new RunIntervalExecute(eventExecuteWin, currentPerson.UniqueID, currentSession.UniqueID, currentRunType.Name,
- currentEventExecute = new RunIntervalExecute(currentPerson.UniqueID, currentSession.UniqueID, currentRunType.Name,
- distanceInterval, progressbarLimit, currentRunType.TracksLimited,
+ //currentEventExecute = new RunIntervalExecute(eventExecuteWin, currentPerson.UniqueID, currentSession.UniqueID, currentRunIntervalType.Name,
+ currentEventExecute = new RunIntervalExecute(currentPerson.UniqueID, currentSession.UniqueID, currentRunIntervalType.Name,
+ distanceInterval, progressbarLimit, currentRunIntervalType.TracksLimited,
chronopicWin.CP, appbar2, app1, prefsDigitsNumber, metersSecondsPreferred, volumeOn, repetitiveConditionsWin,
progressbarLimit, egd);
@@ -3572,7 +3584,6 @@ Console.WriteLine("X");
new EventHandler(on_event_execute_update_graph_in_progress_clicked);
currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded);
currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_run_interval_finished);
- */
}
@@ -3608,6 +3619,8 @@ Console.WriteLine("X");
statsWin.ShowUpdateStatsButton();
}
+ lastRunIsSimple = false;
+
//unhide buttons for delete last jump
sensitiveGuiYesEvent();
@@ -4189,26 +4202,23 @@ Console.WriteLine("X");
case EventType.Types.RUN:
if(lastRunIsSimple)
PrepareRunSimpleGraph(currentRun.Time, currentRun.Speed);
- /*
- if(currentRunType.HasIntervals) {
- RunType runType = SqliteRunIntervalType.SelectAndReturnRunIntervalType(currentRunInterval.Type);
- double distanceTotal = Util.GetRunITotalDistance(currentRunInterval.DistanceInterval,
- runType.DistancesString, currentRunInterval.Tracks);
-
- double distanceInterval = currentRunInterval.DistanceInterval;
- if(distanceInterval == -1) //variable distances
- distanceInterval = Util.GetRunIVariableDistancesStringRow(
- runType.DistancesString, (int) currentRunInterval.Tracks -1);
-
- PrepareRunIntervalGraph(distanceInterval,
+ else {
+ RunType runType = SqliteRunIntervalType.SelectAndReturnRunIntervalType(currentRunInterval.Type);
+ double distanceTotal = Util.GetRunITotalDistance(currentRunInterval.DistanceInterval,
+ runType.DistancesString, currentRunInterval.Tracks);
+
+ double distanceInterval = currentRunInterval.DistanceInterval;
+ if(distanceInterval == -1) //variable distances
+ distanceInterval = Util.GetRunIVariableDistancesStringRow(
+ runType.DistancesString, (int) currentRunInterval.Tracks -1);
+
+ PrepareRunIntervalGraph(distanceInterval,
Util.GetLast(currentRunInterval.IntervalTimesString),
currentRunInterval.IntervalTimesString,
distanceTotal,
runType.DistancesString,
volumeOn, repetitiveConditionsWin);
- } else
- PrepareRunSimpleGraph(currentRun.Time, currentRun.Speed);
- */
+ }
break;
case EventType.Types.PULSE:
PreparePulseGraph(Util.GetLast(currentPulse.TimesString), currentPulse.TimesString);
@@ -4880,7 +4890,7 @@ Console.WriteLine("X");
runsMoreWin = RunsMoreWindow.Show(app1, false); //delete run type
}
- private void on_run_type_delete_intervallic_activate (object o, EventArgs args) {
+ private void on_run_type_delete_intervallic (object o, EventArgs args) {
runsIntervalMoreWin = RunsIntervalMoreWindow.Show(app1, false); //delete run type
}
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 96e369a..e0d7804 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -1841,6 +1841,15 @@ Log.WriteLine("Preparing reactive A");
PrepareRunSimpleGraph(
currentEventExecute.PrepareEventGraphRunSimpleObject.time,
currentEventExecute.PrepareEventGraphRunSimpleObject.speed);
+ } else {
+ Log.Write("update graph: RUNINTERVAL");
+ PrepareRunIntervalGraph(
+ currentEventExecute.PrepareEventGraphRunIntervalObject.distance,
+ currentEventExecute.PrepareEventGraphRunIntervalObject.lastTime,
+ currentEventExecute.PrepareEventGraphRunIntervalObject.timesString,
+ currentEventExecute.PrepareEventGraphRunIntervalObject.distanceTotal,
+ currentEventExecute.PrepareEventGraphRunIntervalObject.distancesString,
+ volumeOn, repetitiveConditionsWin);
}
break;
}
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 39e553a..0787cd2 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -877,6 +877,7 @@ public class RepairRunIntervalWindow
partial class ChronoJumpWindow
{
+ //runs
//labels notebook_execute
[Widget] Gtk.Label label_extra_window_radio_run_custom;
[Widget] Gtk.Label label_extra_window_radio_run_20m;
@@ -907,6 +908,20 @@ partial class ChronoJumpWindow
[Widget] Gtk.RadioButton extra_window_radio_run_zigzag;
[Widget] Gtk.RadioButton extra_window_radio_run_more;
+ //runs interval
+ //labels notebook_execute
+ [Widget] Gtk.Label label_extra_window_radio_run_interval_by_laps;
+ [Widget] Gtk.Label label_extra_window_radio_run_interval_by_time;
+ [Widget] Gtk.Label label_extra_window_radio_run_interval_unlimited;
+ [Widget] Gtk.Label label_extra_window_radio_run_interval_mtgug;
+ [Widget] Gtk.Label label_extra_window_radio_run_interval_more;
+
+ //radio notebook_execute
+ [Widget] Gtk.RadioButton extra_window_radio_run_interval_by_laps;
+ [Widget] Gtk.RadioButton extra_window_radio_run_interval_by_time;
+ [Widget] Gtk.RadioButton extra_window_radio_run_interval_unlimited;
+ [Widget] Gtk.RadioButton extra_window_radio_run_interval_mtgug;
+ [Widget] Gtk.RadioButton extra_window_radio_run_interval_more;
//options runs
[Widget] Gtk.Label extra_window_runs_label_distance;
@@ -970,13 +985,19 @@ partial class ChronoJumpWindow
private void on_extra_window_runs_interval_test_changed(object o, EventArgs args)
{
+ if(extra_window_radio_run_interval_by_laps.Active) currentRunIntervalType = new RunType("byLaps");
+ else if(extra_window_radio_run_interval_by_time.Active) currentRunIntervalType = new RunType("byTime");
+ else if(extra_window_radio_run_interval_unlimited.Active) currentRunIntervalType = new RunType("unlimited");
+ else if(extra_window_radio_run_interval_mtgug.Active) currentRunIntervalType = new RunType("MTGUG");
+
+ extra_window_runs_interval_initialize(currentRunIntervalType);
}
private void on_extra_window_runs_interval_more(object o, EventArgs args)
{
previousRunIntervalType = currentRunIntervalType;
- if(extra_window_radio_run_more.Active) {
+ if(extra_window_radio_run_interval_more.Active) {
runsIntervalMoreWin = RunsIntervalMoreWindow.Show(app1, true);
runsIntervalMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_interval_accepted);
runsIntervalMoreWin.Button_cancel.Clicked += new EventHandler(on_more_runs_interval_cancelled);
@@ -1095,7 +1116,7 @@ partial class ChronoJumpWindow
{
runsIntervalMoreWin.Button_accept.Clicked -= new EventHandler(on_more_runs_interval_accepted);
- currentRunType = new RunType(
+ currentRunIntervalType = new RunType(
runsIntervalMoreWin.SelectedEventName, //name
true, //hasIntervals
runsIntervalMoreWin.SelectedDistance,
@@ -1166,6 +1187,17 @@ partial class ChronoJumpWindow
}
private void extra_window_runs_interval_toggle_desired_button_on_toolbar(RunType type) {
+ if(type.Name == "byLaps") extra_window_radio_run_interval_by_laps.Active = true;
+ else if(type.Name == "byTime") extra_window_radio_run_interval_by_time.Active = true;
+ else if(type.Name == "unlimited") extra_window_radio_run_interval_unlimited.Active = true;
+ else if(type.Name == "MTGUG") extra_window_radio_run_interval_mtgug.Active = true;
+ else {
+ //don't do this:
+ //extra_window_radio_run_interval_more.Active = true;
+ //because it will be a loop
+ //only do:
+ extra_window_runs_interval_initialize(type);
+ }
}
private void extra_window_showDistanceData (RunType myRunType, bool show, bool sensitive ) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]