[chronojump] Removed old mode menu
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Removed old mode menu
- Date: Tue, 12 May 2020 09:11:20 +0000 (UTC)
commit 1478de301290117a8c09693289ef4f5e0b88b52f
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue May 12 11:10:54 2020 +0200
Removed old mode menu
glade/app1.glade | 284 +++------------------------------------
src/gui/app1/chronojump.cs | 87 ++++--------
src/gui/app1/contactsExercise.cs | 78 -----------
src/gui/app1/encoder.cs | 2 +-
src/gui/app1/icons.cs | 31 -----
src/gui/guiTests.cs | 10 +-
src/gui/networks.cs | 8 +-
7 files changed, 50 insertions(+), 450 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 3e7166f7..090db8ed 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -177,260 +177,6 @@
</child>
</widget>
</child>
- <child>
- <widget class="GtkMenuItem" id="menuitem_mode">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Mode</property>
- <property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="menu2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_main_menu">
- <property name="label" translatable="yes">Main menu</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_main_menu_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_mode_main_menu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- </child>
- <child>
- <widget class="GtkMenuItem" id="menuitem1">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Jumps</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_jumps_simple">
- <property name="label" translatable="yes">Simple</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_jumps_simple">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">1</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_jumps_reactive">
- <property name="label" translatable="yes">Multiple</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_jumps_reactive">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkSeparatorMenuItem" id="menuitem4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- </child>
- <child>
- <widget class="GtkMenuItem" id="menuitem2">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Races</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_runs_simple">
- <property name="label" translatable="yes">Simple</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_runs_simple">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_runs_intervallic">
- <property name="label" translatable="yes">Intervallic</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_runs_intervallic">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_race_encoder">
- <property name="label" translatable="yes">Races with encoder</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_race_encoder">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkSeparatorMenuItem" id="menuitem5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- </child>
- <child>
- <widget class="GtkMenuItem" id="menuitem3">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Encoder</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_power_gravitatory">
- <property name="label" translatable="yes">Gravitatory</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_power_gravitatory">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_power_inertial">
- <property name="label" translatable="yes">Inertial</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_power_inertial">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkSeparatorMenuItem" id="menuitem6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_force_sensor">
- <property name="label" translatable="yes">Force sensor</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_force_sensor">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_reaction_time">
- <property name="label" translatable="yes">Reaction time</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_reaction_time">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_mode_other">
- <property name="label" translatable="yes">Other</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <signal name="activate" handler="on_menuitem_mode_activate" swapped="no"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image_menuitem_mode_other">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
<child>
<widget class="GtkMenuItem" id="force_sensor_menuitem">
<property name="can_focus">False</property>
@@ -24889,6 +24635,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -27653,6 +27402,18 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -27689,18 +27450,6 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -35546,6 +35295,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 8a2451d9..d81122c9 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -43,7 +43,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Window app1;
[Widget] Gtk.MenuBar main_menu;
[Widget] Gtk.MenuItem menuitem_open_session;
- [Widget] Gtk.MenuItem menuitem_mode;
//[Widget] Gtk.VBox vbox_menu_encoder;
[Widget] Gtk.MenuItem force_sensor_menuitem;
@@ -58,17 +57,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_chronojump_logo;
[Widget] Gtk.DrawingArea drawingarea_chronojump_logo;
- [Widget] Gtk.ImageMenuItem menuitem_mode_jumps_simple;
- [Widget] Gtk.ImageMenuItem menuitem_mode_jumps_reactive;
- [Widget] Gtk.ImageMenuItem menuitem_mode_runs_simple;
- [Widget] Gtk.ImageMenuItem menuitem_mode_runs_intervallic;
- [Widget] Gtk.ImageMenuItem menuitem_mode_race_encoder;
- [Widget] Gtk.ImageMenuItem menuitem_mode_power_gravitatory;
- [Widget] Gtk.ImageMenuItem menuitem_mode_power_inertial;
- [Widget] Gtk.ImageMenuItem menuitem_mode_force_sensor;
- [Widget] Gtk.ImageMenuItem menuitem_mode_reaction_time;
- [Widget] Gtk.ImageMenuItem menuitem_mode_other;
-
[Widget] Gtk.Notebook notebook_start; //start window or program
[Widget] Gtk.Notebook notebook_mode_selector; //use to display the mode images to select different
modes
[Widget] Gtk.Notebook notebook_mode_selector2; //for selection of jumps, runs, runs photocell, encoder
@@ -643,8 +631,6 @@ public partial class ChronoJumpWindow
rand = new Random(40);
- formatModeMenu();
-
putNonStandardIcons();
eventExecutePutNonStandardIcons();
//eventExecuteCreateComboGraphResultsSize();
@@ -862,26 +848,6 @@ public partial class ChronoJumpWindow
}
*/
- private void formatModeMenu()
- {
- ((Label) menuitem_mode_jumps_simple.Child).Text =
- " " + ((Label) menuitem_mode_jumps_simple.Child).Text;
- ((Label) menuitem_mode_jumps_reactive.Child).Text =
- " " + ((Label) menuitem_mode_jumps_reactive.Child).Text;
-
- ((Label) menuitem_mode_runs_simple.Child).Text =
- " " + ((Label) menuitem_mode_runs_simple.Child).Text;
- ((Label) menuitem_mode_runs_intervallic.Child).Text =
- " " + ((Label) menuitem_mode_runs_intervallic.Child).Text;
- ((Label) menuitem_mode_race_encoder.Child).Text =
- " " + ((Label) menuitem_mode_race_encoder.Child).Text;
-
- ((Label) menuitem_mode_power_gravitatory.Child).Text =
- " " + ((Label) menuitem_mode_power_gravitatory.Child).Text;
- ((Label) menuitem_mode_power_inertial.Child).Text =
- " " + ((Label) menuitem_mode_power_inertial.Child).Text;
- }
-
//different than on_preferences_activate (opening preferences window)
private void loadPreferencesAtStart ()
{
@@ -2794,11 +2760,6 @@ public partial class ChronoJumpWindow
* menu test selectors
*/
- private void on_menuitem_mode_main_menu_activate (object o, EventArgs args)
- {
- show_start_page();
- }
-
private void show_start_page()
{
notebook_mode_selector.CurrentPage = 0;
@@ -2835,7 +2796,7 @@ public partial class ChronoJumpWindow
private Constants.Menuitem_modes current_menuitem_mode;
private Constants.Menuitem_modes last_menuitem_mode; //store it to decide not change threshold when
change from jumps to jumpsRj
private bool last_menuitem_mode_defined = false; //undefined when first time entry on a mode (jumps,
jumpRj, ...)
- private void select_menuitem_mode_toggled(Constants.Menuitem_modes m)
+ private void changeMode (Constants.Menuitem_modes m)
{
LogB.Information("MODE", m.ToString());
current_menuitem_mode = m;
@@ -2922,6 +2883,7 @@ public partial class ChronoJumpWindow
on_extra_window_jumps_test_changed(new object(), new EventArgs());
hbox_results_legend.Visible = true;
frame_jumps_automatic.Visible = true;
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_jump_simple.png");
if(radio_mode_contacts_analyze.Active)
{
@@ -2932,6 +2894,7 @@ public partial class ChronoJumpWindow
button_contacts_bells.Sensitive = true;
on_extra_window_jumps_rj_test_changed(new object(), new EventArgs());
hbox_results_legend.Visible = false;
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_jump_reactive.png");
if(radio_mode_contacts_jumps_profile.Active ||
radio_mode_contacts_jumps_dj_optimal_fall.Active ||
radio_mode_contacts_jumps_weight_fv_profile.Active ||
radio_mode_contacts_jumps_evolution.Active)
@@ -2952,6 +2915,7 @@ public partial class ChronoJumpWindow
on_extra_window_runs_test_changed(new object(), new EventArgs());
hbox_results_legend.Visible = true;
frame_run_simple_double_contacts.Visible = true;
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_run_simple.png");
}
else
{
@@ -2961,6 +2925,7 @@ public partial class ChronoJumpWindow
on_extra_window_runs_interval_test_changed(new object(), new EventArgs());
hbox_results_legend.Visible = false;
createTreeView_runs_interval_sprint (treeview_runs_interval_sprint);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_run_multiple.png");
if(radio_mode_contacts_analyze.Active)
{
@@ -3019,6 +2984,7 @@ public partial class ChronoJumpWindow
vbox_encoder_exercise_mass.Visible = true;
label_encoder_exercise_inertia.Visible = false;
vbox_encoder_exercise_inertia.Visible = false;
+ image_encoder_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_weight.png");
if(radio_encoder_analyze_individual_current_set.Active ||
radio_encoder_analyze_individual_current_session.Active)
{
@@ -3063,6 +3029,7 @@ public partial class ChronoJumpWindow
label_gravitatory_vpf_propulsive.Visible = false;
notebook_encoder_top.Page = 1;
+ image_encoder_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_inertia.png");
}
encoderGuiChangesAfterEncoderConfigurationWin(true);
if(changed) {
@@ -3100,6 +3067,7 @@ public partial class ChronoJumpWindow
notebook_capture_graph_table.ShowTabs = false;
setLabelContactsExerciseSelected(m);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"force_sensor_icon.png");
pixbufMode = new Pixbuf (null, Util.GetImagePath(false) + "image_modes_force.png");
}
else if(m == Constants.Menuitem_modes.RUNSENCODER)
@@ -3126,6 +3094,7 @@ public partial class ChronoJumpWindow
forceSensorImageTestChange();
setLabelContactsExerciseSelected(m);
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"race_encoder_icon.png");
pixbufMode = new Pixbuf (null, Util.GetImagePath(false) + "image_modes_run.png");
}
else if(m == Constants.Menuitem_modes.RT)
@@ -3140,6 +3109,7 @@ public partial class ChronoJumpWindow
button_threshold.Visible = true;
//notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"reaction_time_icon.png");
pixbufMode = new Pixbuf (null, Util.GetImagePath(false) + "image_modes_rt.png");
}
else { //m == Constants.Menuitem_modes.OTHER (contacts / other)
@@ -3157,6 +3127,7 @@ public partial class ChronoJumpWindow
button_threshold.Visible = true;
//notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
+ image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"other_icon.png");
pixbufMode = new Pixbuf (null, Util.GetImagePath(false) + "image_modes_other.png");
}
@@ -3380,11 +3351,11 @@ public partial class ChronoJumpWindow
}
private void on_button_selector_start_jumps_simple_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_jumps_simple, new EventArgs());
+ changeMode (Constants.Menuitem_modes.JUMPSSIMPLE);
}
private void on_button_selector_start_jumps_reactive_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_jumps_reactive, new EventArgs());
+ changeMode (Constants.Menuitem_modes.JUMPSREACTIVE);
}
private void on_button_selector_start_runs_clicked(object o, EventArgs args)
@@ -3399,15 +3370,15 @@ public partial class ChronoJumpWindow
}
private void on_button_selector_start_runs_simple_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_runs_simple, new EventArgs());
+ changeMode (Constants.Menuitem_modes.RUNSSIMPLE);
}
private void on_button_selector_start_runs_intervallic_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_runs_intervallic, new EventArgs());
+ changeMode (Constants.Menuitem_modes.RUNSINTERVALLIC);
}
private void on_button_selector_start_race_encoder_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_race_encoder, new EventArgs());
+ changeMode (Constants.Menuitem_modes.RUNSENCODER);
}
private void on_button_selector_start_encoder_clicked(object o, EventArgs args)
@@ -3418,26 +3389,26 @@ public partial class ChronoJumpWindow
private void on_button_selector_start_encoder_gravitatory_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_power_gravitatory, new EventArgs());
+ changeMode (Constants.Menuitem_modes.POWERGRAVITATORY);
}
private void on_button_selector_start_encoder_inertial_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_power_inertial, new EventArgs());
+ changeMode (Constants.Menuitem_modes.POWERINERTIAL);
}
private void on_button_selector_start_force_sensor_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_force_sensor, new EventArgs());
+ changeMode (Constants.Menuitem_modes.FORCESENSOR);
}
private void on_button_selector_start_rt_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_reaction_time, new EventArgs());
+ changeMode (Constants.Menuitem_modes.RT);
}
private void on_button_selector_start_other_clicked(object o, EventArgs args)
{
- on_menuitem_mode_activate(menuitem_mode_other, new EventArgs());
+ changeMode (Constants.Menuitem_modes.OTHER);
}
private void on_button_start_back_clicked(object o, EventArgs args)
@@ -3690,24 +3661,20 @@ public partial class ChronoJumpWindow
if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSSIMPLE)
{
- LogB.Debug("menuitem_mode_jumps_simple");
on_normal_jump_activate(canCaptureC);
}
else if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSREACTIVE)
{
- LogB.Debug("menuitem_mode_jumps_reactive");
on_rj_activate(canCaptureC);
}
else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSSIMPLE)
{
- LogB.Debug("menuitem_mode_runs_simple");
extra_window_runs_distance =
Convert.ToDouble(label_runs_simple_track_distance_value.Text);
on_normal_run_activate(canCaptureC);
}
else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSINTERVALLIC)
{
- LogB.Debug("menuitem_mode_runs_intevallic");
//RSA runs cannot be simulated because it's complicated to manage the countdown
event...
if(currentRunIntervalType.IsRSA && ! canCaptureC) {
new DialogMessage(Constants.MessageTypes.WARNING,
@@ -3723,8 +3690,6 @@ public partial class ChronoJumpWindow
}
else if(current_menuitem_mode == Constants.Menuitem_modes.RT)
{
- LogB.Debug("menuitem_mode_rt");
-
if(extra_window_radio_reaction_time_discriminative.Active)
reaction_time_discriminative_lights_prepare();
@@ -3732,11 +3697,10 @@ public partial class ChronoJumpWindow
}
else if(radio_mode_pulses_small.Active)
{
- LogB.Debug("radio_mode_pulses");
on_pulse_activate (canCaptureC);
}
- else if(radio_mode_multi_chronopic_small.Active) {
- LogB.Debug("radio_mode_mc");
+ else if(radio_mode_multi_chronopic_small.Active)
+ {
on_multi_chronopic_start_clicked(canCaptureC);
}
@@ -5077,7 +5041,7 @@ public partial class ChronoJumpWindow
{
/*
ChronopicWindow.ChronojumpMode cmode = ChronopicWindow.ChronojumpMode.JUMPORRUN;
- if(radio_menuitem_mode_other.Active)
+ if(current_menuitem_mode == Constants.Menuitem_modes.OTHER)
cmode = ChronopicWindow.ChronojumpMode.OTHER;
chronopicWin = ChronopicWindow.View(cmode, preferences.volumeOn);
@@ -7132,7 +7096,6 @@ LogB.Debug("mc finished 5");
{
menus_sensitive(false);
session_menuitem.Sensitive = false;
- menuitem_mode.Sensitive = false;
//vbox_menu_encoder.Sensitive = false;
force_sensor_menuitem.Sensitive = false;
race_encoder_menuitem.Sensitive = false;
@@ -7196,7 +7159,6 @@ LogB.Debug("mc finished 5");
menus_sensitive(true);
session_menuitem.Sensitive = true;
- menuitem_mode.Sensitive = true;
//vbox_menu_encoder.Sensitive = true;
force_sensor_menuitem.Sensitive = true;
race_encoder_menuitem.Sensitive = true;
@@ -7373,7 +7335,6 @@ LogB.Debug("mc finished 5");
private void sensitiveGuiAutoStartEnd (bool start) {
//if automode, sensitiveGuiEventDoing, sensitiveGuiEventDone don't work
session_menuitem.Sensitive = ! start;
- menuitem_mode.Sensitive = ! start;
frame_persons.Sensitive = ! start;
button_contacts_exercise.Sensitive = ! start;
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
index 8778f160..6307e485 100644
--- a/src/gui/app1/contactsExercise.cs
+++ b/src/gui/app1/contactsExercise.cs
@@ -236,82 +236,4 @@ public partial class ChronoJumpWindow
label_contacts_exercise_selected_options.Text = name;
}
-
- private void on_menuitem_mode_activate(object o, EventArgs args)
- {
- Gtk.ImageMenuItem imi = o as Gtk.ImageMenuItem;
- if (o == null)
- return;
-
- if(o == menuitem_mode_jumps_simple)
- {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.JUMPSSIMPLE);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_jump_simple.png");
- } else if(o == menuitem_mode_jumps_reactive) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.JUMPSREACTIVE);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_jump_reactive.png");
- } else if(o == menuitem_mode_runs_simple) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSSIMPLE);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_run_simple.png");
- } else if(o == menuitem_mode_runs_intervallic) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSINTERVALLIC);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_run_multiple.png");
- } else if(o == menuitem_mode_race_encoder) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.RUNSENCODER);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"race_encoder_icon.png");
- } else if(o == menuitem_mode_power_gravitatory) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERGRAVITATORY);
- image_encoder_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_weight.png");
- } else if(o == menuitem_mode_power_inertial) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERINERTIAL);
- image_encoder_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"image_inertia.png");
- } else if(o == menuitem_mode_force_sensor) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.FORCESENSOR);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"force_sensor_icon.png");
- } else if(o == menuitem_mode_reaction_time) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.RT);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"reaction_time_icon.png");
- } else if(o == menuitem_mode_other) {
- select_menuitem_mode_toggled(Constants.Menuitem_modes.OTHER);
- image_contacts_exercise.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"other_icon.png");
- }
-
- changeMenuitemModeWidgets(image_menuitem_mode_jumps_simple, o == menuitem_mode_jumps_simple,
- "image_jump_simple.png", "image_jump_simple_yellow.png", (Label)
menuitem_mode_jumps_simple.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_jumps_reactive, o ==
menuitem_mode_jumps_reactive,
- "image_jump_reactive.png", "image_jump_reactive_yellow.png", (Label)
menuitem_mode_jumps_reactive.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_runs_simple, o == menuitem_mode_runs_simple,
- "image_run_simple.png", "image_run_simple_yellow.png", (Label)
menuitem_mode_runs_simple.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_runs_intervallic, o ==
menuitem_mode_runs_intervallic,
- "image_run_multiple.png", "image_run_multiple_yellow.png", (Label)
menuitem_mode_runs_intervallic.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_race_encoder, o == menuitem_mode_race_encoder,
- "race_encoder_icon.png", "race_encoder_icon_yellow.png", (Label)
menuitem_mode_race_encoder.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_power_gravitatory, o ==
menuitem_mode_power_gravitatory,
- "image_weight.png", "image_weight_yellow.png", (Label)
menuitem_mode_power_gravitatory.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_power_inertial, o ==
menuitem_mode_power_inertial,
- "image_inertia.png", "image_inertia_yellow.png", (Label)
menuitem_mode_power_inertial.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_force_sensor, o == menuitem_mode_force_sensor,
- "force_sensor_icon.png", "force_sensor_icon_yellow.png", (Label)
menuitem_mode_force_sensor.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_reaction_time, o == menuitem_mode_reaction_time,
- "reaction_time_icon.png", "reaction_time_icon_yellow.png", (Label)
menuitem_mode_reaction_time.Child);
- changeMenuitemModeWidgets(image_menuitem_mode_other, o == menuitem_mode_other,
- "other_icon.png", "other_icon_yellow.png", (Label) menuitem_mode_other.Child);
- }
-
- private void changeMenuitemModeWidgets(Gtk.Image image, bool active, string pathImageInactive, string
pathImageActive, Gtk.Label label)
- {
- Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + pathImageInactive);
- if(active)
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + pathImageActive);
-
- image.Pixbuf = pixbuf;
-
- if(active)
- {
- label.Text = Util.AddBoldMarks(label.Text);
- label.UseMarkup = true;
- } else
- label.Text = Util.RemoveBoldMarks(label.Text);
- }
-
}
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 9e448183..02711263 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -5013,7 +5013,7 @@ public partial class ChronoJumpWindow
/* called on:
* encoderPersonChanged()
- * select_menuitem_mode_toggled(Constants.Menuitem_modes m)
+ * changeMode (Constants.Menuitem_modes m)
*/
private void blankEncoderInterface()
{
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 0492d3e0..b44cb672 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -26,7 +26,6 @@ using Glade;
public partial class ChronoJumpWindow
{
- [Widget] Gtk.Image image_mode_main_menu;
[Widget] Gtk.Frame frame_image_logo_icon;
[Widget] Gtk.Image image_logo_icon;
[Widget] Gtk.Image image_logo_icon_transp;
@@ -102,17 +101,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_selector_start_other;
[Widget] Gtk.Image image_selector_start_back;
- [Widget] Gtk.Image image_menuitem_mode_jumps_simple;
- [Widget] Gtk.Image image_menuitem_mode_jumps_reactive;
- [Widget] Gtk.Image image_menuitem_mode_runs_simple;
- [Widget] Gtk.Image image_menuitem_mode_runs_intervallic;
- [Widget] Gtk.Image image_menuitem_mode_race_encoder;
- [Widget] Gtk.Image image_menuitem_mode_power_gravitatory;
- [Widget] Gtk.Image image_menuitem_mode_power_inertial;
- [Widget] Gtk.Image image_menuitem_mode_force_sensor;
- [Widget] Gtk.Image image_menuitem_mode_reaction_time;
- [Widget] Gtk.Image image_menuitem_mode_other;
-
[Widget] Gtk.Image image_mode_jumps_small;
[Widget] Gtk.Image image_mode_jumps_reactive_small;
[Widget] Gtk.Image image_mode_runs_small;
@@ -254,11 +242,6 @@ public partial class ChronoJumpWindow
* start of material design icons ---->
*/
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_home.png");
- image_mode_main_menu.Pixbuf = pixbuf;
- //image_home.Pixbuf = pixbuf;
- //image_home1.Pixbuf = pixbuf;
-
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_settings.png");
image_session_preferences.Pixbuf = pixbuf;
image_menu_preferences.Pixbuf = pixbuf;
@@ -344,17 +327,8 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_weight.png");
image_mode_encoder_gravitatory.Pixbuf = pixbuf;
- image_menuitem_mode_power_gravitatory.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_inertia.png");
image_mode_encoder_inertial.Pixbuf = pixbuf;
- image_menuitem_mode_power_inertial.Pixbuf = pixbuf;
-
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "force_sensor_icon.png");
- image_menuitem_mode_force_sensor.Pixbuf = pixbuf;
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "reaction_time_icon.png");
- image_menuitem_mode_reaction_time.Pixbuf = pixbuf;
- pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "other_icon.png");
- image_menuitem_mode_other.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_capture.png");
image_tests_capture.Pixbuf = pixbuf;
@@ -566,20 +540,15 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_jump_simple.png");
image_mode_jumps_small.Pixbuf = pixbuf;
- image_menuitem_mode_jumps_simple.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_jump_reactive.png");
image_mode_jumps_reactive_small.Pixbuf = pixbuf;
- image_menuitem_mode_jumps_reactive.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_run_simple.png");
image_mode_runs_small.Pixbuf = pixbuf;
image_mode_runs_small1.Pixbuf = pixbuf;
- image_menuitem_mode_runs_simple.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_run_multiple.png");
image_mode_runs_intervallic_small.Pixbuf = pixbuf;
image_mode_runs_intervallic_small1.Pixbuf = pixbuf;
- image_menuitem_mode_runs_intervallic.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "race_encoder_icon.png");
- image_menuitem_mode_race_encoder.Pixbuf = pixbuf;
image_mode_race_encoder_small.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "run_2x.png");
diff --git a/src/gui/guiTests.cs b/src/gui/guiTests.cs
index d277650c..e0a37f4c 100644
--- a/src/gui/guiTests.cs
+++ b/src/gui/guiTests.cs
@@ -433,15 +433,15 @@ public partial class ChronoJumpWindow
//configAutodetectPort = Config.AutodetectPortEnum.INACTIVE;
if(m == Constants.Menuitem_modes.JUMPSSIMPLE)
- on_menuitem_mode_activate(menuitem_mode_jumps_simple, new EventArgs());
+ changeMode (Constants.Menuitem_modes.JUMPSSIMPLE);
else if(m == Constants.Menuitem_modes.JUMPSREACTIVE)
- on_menuitem_mode_activate(menuitem_mode_jumps_reactive, new EventArgs());
+ changeMode (Constants.Menuitem_modes.JUMPSREACTIVE);
else if(m == Constants.Menuitem_modes.RUNSSIMPLE)
- on_menuitem_mode_activate(menuitem_mode_runs_simple, new EventArgs());
+ changeMode (Constants.Menuitem_modes.RUNSSIMPLE);
else if(m == Constants.Menuitem_modes.POWERGRAVITATORY)
- select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERGRAVITATORY);
+ changeMode (Constants.Menuitem_modes.POWERGRAVITATORY);
else if(m == Constants.Menuitem_modes.POWERINERTIAL)
- select_menuitem_mode_toggled(Constants.Menuitem_modes.POWERINERTIAL);
+ changeMode (Constants.Menuitem_modes.POWERINERTIAL);
LogB.TestEnd("chronojumpWindowTestsMode");
}
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 5faf642f..6223f6ad 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -188,7 +188,7 @@ public partial class ChronoJumpWindow
if(configChronojump.CompujumpStationMode != Constants.Menuitem_modes.UNDEFINED)
{
- //select_menuitem_mode_toggled(configChronojump.CompujumpStationMode);
+ //changeMode (configChronojump.CompujumpStationMode);
//better do like this because radiobuttons are not set. TODO: remove
radiobuttons checks
if(configChronojump.CompujumpStationMode ==
Constants.Menuitem_modes.RUNSINTERVALLIC)
on_button_selector_start_runs_intervallic_clicked(new object (), new
EventArgs());
@@ -199,10 +199,6 @@ public partial class ChronoJumpWindow
vbox_runs_interval.Visible = false;
vbox_runs_interval_compujump.Visible = true;
-
- menuitem_mode.Visible = false;
- //button_menu_outside_menu.Visible = false;
- //button_menu_outside_menu1.Visible = false;
}
Json.ChangeServerUrl(configChronojump.CompujumpServerURL);
@@ -466,7 +462,7 @@ public partial class ChronoJumpWindow
/*
if(linuxType == linuxTypeEnum.NETWORKS) {
//mostrar directament el power
- select_menuitem_mode_toggled(Constants.Menuitem_modes.POWER);
+ changeMode (Constants.Menuitem_modes.POWER);
//no mostrar menu
main_menu.Visible = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]