[chronojump] selector for change encoder gravitatory/inertial
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] selector for change encoder gravitatory/inertial
- Date: Wed, 31 Mar 2021 14:38:52 +0000 (UTC)
commit 915f42c30d0f53afc540ec47e3020218832ec0c7
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Mar 31 16:38:35 2021 +0200
selector for change encoder gravitatory/inertial
glade/app1.glade | 92 +++++++++++++++++++++++++++++++++++++---------
src/gui/app1/chronojump.cs | 28 ++++++++++++--
src/gui/app1/icons.cs | 2 +
3 files changed, 101 insertions(+), 21 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 06236916..902c176c 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -29071,20 +29071,21 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="right_padding">50</property>
<child>
- <widget class="GtkButton"
id="button_show_modes_encoder">
+ <widget class="GtkHBox" id="hbox423">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked"
handler="on_button_show_modes_clicked" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkEventBox"
id="eventbox_button_show_modes_encoder">
+ <widget class="GtkButton"
id="button_show_modes_encoder">
+ <property name="width_request">40</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_button_show_modes_clicked" swapped="no"/>
<child>
- <widget class="GtkHBox" id="hbox423">
+ <widget class="GtkEventBox"
id="eventbox_button_show_modes_encoder">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
<child>
<widget class="GtkImage"
id="image_button_show_modes_encoder_grid">
<property name="width_request">24</property>
@@ -29092,28 +29093,85 @@ Concentric</property>
<property name="can_focus">False</property>
<property
name="stock">gtk-missing-image</property>
</widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="hbox_change_modes_encoder">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_change_modes_encoder_gravitatory">
+ <property name="width_request">40</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">False</property>
+ <signal name="toggled"
handler="on_radio_change_modes_encoder_gravitatory_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkEventBox"
id="eventbox_change_modes_encoder_gravitatory">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkImage"
id="image_change_modes_encoder_gravitatory">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkImage"
id="image_button_show_modes_encoder_current">
- <property name="width_request">24</property>
+ <widget class="GtkRadioButton"
id="radio_change_modes_encoder_inertial">
+ <property name="width_request">40</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_change_modes_encoder_gravitatory</property>
+ <signal name="toggled"
handler="on_radio_change_modes_encoder_inertial_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkEventBox"
id="eventbox_change_modes_encoder_inertial">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkImage"
id="image_change_modes_encoder_inertial">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property
name="stock">gtk-missing-image</property>
</widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
- </child>
</widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</widget>
</child>
@@ -29128,7 +29186,7 @@ Concentric</property>
<widget class="GtkHBox"
id="hbox_encoder_sup_capture_analyze_two_buttons">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">20</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkRadioButton"
id="radio_mode_encoder_capture_small">
<property name="visible">True</property>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index f07cae4f..5ed894ff 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -78,12 +78,16 @@ public partial class ChronoJumpWindow
[Widget] Gtk.RadioButton radio_change_modes_contacts_runs_simple;
[Widget] Gtk.RadioButton radio_change_modes_contacts_runs_intervallic;
[Widget] Gtk.RadioButton radio_change_modes_contacts_runs_encoder;
+ [Widget] Gtk.RadioButton radio_change_modes_encoder_gravitatory;
+ [Widget] Gtk.RadioButton radio_change_modes_encoder_inertial;
[Widget] Gtk.Image image_change_modes_contacts_jumps_simple;
[Widget] Gtk.Image image_change_modes_contacts_jumps_reactive;
[Widget] Gtk.Image image_change_modes_contacts_runs_simple;
[Widget] Gtk.Image image_change_modes_contacts_runs_reactive;
[Widget] Gtk.Image image_change_modes_contacts_runs_intervallic;
[Widget] Gtk.Image image_change_modes_contacts_runs_encoder;
+ [Widget] Gtk.Image image_change_modes_encoder_gravitatory;
+ [Widget] Gtk.Image image_change_modes_encoder_inertial;
[Widget] Gtk.EventBox eventbox_button_show_modes_contacts;
[Widget] Gtk.EventBox eventbox_change_modes_contacts_jumps_simple;
@@ -91,6 +95,8 @@ public partial class ChronoJumpWindow
[Widget] Gtk.EventBox eventbox_change_modes_contacts_runs_simple;
[Widget] Gtk.EventBox eventbox_change_modes_contacts_runs_intervallic;
[Widget] Gtk.EventBox eventbox_change_modes_contacts_runs_encoder;
+ [Widget] Gtk.EventBox eventbox_change_modes_encoder_gravitatory;
+ [Widget] Gtk.EventBox eventbox_change_modes_encoder_inertial;
[Widget] Gtk.EventBox eventbox_button_show_modes_encoder;
[Widget] Gtk.EventBox eventbox_radio_mode_contacts_capture;
[Widget] Gtk.EventBox eventbox_radio_mode_contacts_analyze;
@@ -110,7 +116,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_button_show_modes_contacts_grid;
[Widget] Gtk.Image image_button_show_modes_encoder_grid;
- [Widget] Gtk.Image image_button_show_modes_encoder_current;
//radio group
[Widget] Gtk.RadioButton radio_mode_contacts_capture;
@@ -617,6 +622,8 @@ public partial class ChronoJumpWindow
UtilGtk.EventBoxColorBackgroundActive (eventbox_change_modes_contacts_runs_simple,
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
UtilGtk.EventBoxColorBackgroundActive (eventbox_change_modes_contacts_runs_intervallic,
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
UtilGtk.EventBoxColorBackgroundActive (eventbox_change_modes_contacts_runs_encoder,
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
+ UtilGtk.EventBoxColorBackgroundActive (eventbox_change_modes_encoder_gravitatory,
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
+ UtilGtk.EventBoxColorBackgroundActive (eventbox_change_modes_encoder_inertial,
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
UtilGtk.EventBoxColorBackgroundActive (eventbox_button_show_modes_encoder, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_contacts_capture, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
UtilGtk.EventBoxColorBackgroundActive (eventbox_radio_mode_contacts_analyze, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
@@ -3387,7 +3394,6 @@ public partial class ChronoJumpWindow
image_button_show_modes_contacts_grid.Pixbuf = pixbufModeGrid;
image_button_show_modes_encoder_grid.Pixbuf = pixbufModeGrid;
- image_button_show_modes_encoder_current.Pixbuf = pixbufModeCurrent;
if(m == Constants.Menuitem_modes.POWERGRAVITATORY || m ==
Constants.Menuitem_modes.POWERINERTIAL)
image_encoder_exercise.Pixbuf = pixbufModeCurrent;
@@ -3704,11 +3710,25 @@ public partial class ChronoJumpWindow
private void on_button_selector_start_encoder_gravitatory_clicked(object o, EventArgs args)
{
- changeMode (Constants.Menuitem_modes.POWERGRAVITATORY);
+ if(radio_change_modes_encoder_gravitatory.Active)
+ changeMode (Constants.Menuitem_modes.POWERGRAVITATORY);
+ else
+ radio_change_modes_encoder_gravitatory.Active = true;
}
private void on_button_selector_start_encoder_inertial_clicked(object o, EventArgs args)
{
- changeMode (Constants.Menuitem_modes.POWERINERTIAL);
+ if(radio_change_modes_encoder_inertial.Active)
+ changeMode (Constants.Menuitem_modes.POWERINERTIAL);
+ else
+ radio_change_modes_encoder_inertial.Active = true;
+ }
+ private void on_radio_change_modes_encoder_gravitatory_toggled (object o, EventArgs args)
+ {
+ changeMode (Constants.Menuitem_modes.POWERGRAVITATORY);
+ }
+ private void on_radio_change_modes_encoder_inertial_toggled (object o, EventArgs args)
+ {
+ changeMode (Constants.Menuitem_modes.POWERINERTIAL);
}
private void on_button_selector_start_force_sensor_clicked(object o, EventArgs args)
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 5619bba9..3238f3ce 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -359,9 +359,11 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_weight.png");
image_mode_encoder_gravitatory.Pixbuf = pixbuf;
+ image_change_modes_encoder_gravitatory.Pixbuf = pixbuf;
app1s_image_show_data_encoder_grav.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_inertia.png");
image_mode_encoder_inertial.Pixbuf = pixbuf;
+ image_change_modes_encoder_inertial.Pixbuf = pixbuf;
app1s_image_show_data_encoder_inertial.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_jump.png");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]