[chronojump] selector for change jumps simple <-> reactive
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] selector for change jumps simple <-> reactive
- Date: Wed, 31 Mar 2021 13:53:17 +0000 (UTC)
commit 8cf6660ce4332972bf6a5d97c93ddb047288a1c2
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Mar 31 15:52:38 2021 +0200
selector for change jumps simple <-> reactive
glade/app1.glade | 134 +++++++++++++++++++++++++++++++++------------
src/gui/app1/chronojump.cs | 32 ++++++++++-
src/gui/app1/icons.cs | 3 +
3 files changed, 131 insertions(+), 38 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 53296824..59161fb5 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -5055,20 +5055,21 @@ EncoderInertialCapture</property>
<property name="can_focus">False</property>
<property name="spacing">50</property>
<child>
- <widget class="GtkButton" id="button_show_modes_contacts">
+ <widget class="GtkHBox" id="hbox_change_modes_contacts">
<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_contacts">
+ <widget class="GtkButton" id="button_show_modes_contacts">
+ <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="hbox422">
+ <widget class="GtkEventBox"
id="eventbox_button_show_modes_contacts">
<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_contacts_grid">
<property name="width_request">24</property>
@@ -5076,28 +5077,85 @@ EncoderInertialCapture</property>
<property name="can_focus">False</property>
<property
name="stock">gtk-missing-image</property>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</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_jumps">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_change_modes_contacts_jumps_simple">
+ <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_contacts_jumps_simple_toggled" swapped="no"/>
<child>
- <widget class="GtkImage"
id="image_button_show_modes_contacts_current">
- <property name="width_request">24</property>
+ <widget class="GtkEventBox"
id="eventbox_change_modes_contacts_jumps_simple">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkImage"
id="image_change_modes_contacts_jumps_simple">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property
name="stock">gtk-missing-image</property>
+ </widget>
+ </child>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_change_modes_contacts_jumps_reactive">
+ <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>
+ <property
name="group">radio_change_modes_contacts_jumps_simple</property>
+ <signal name="toggled"
handler="on_radio_change_modes_contacts_jumps_reactive_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkEventBox"
id="eventbox_change_modes_contacts_jumps_reactive">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkImage"
id="image_change_modes_contacts_jumps_reactive">
+ <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">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</widget>
<packing>
@@ -5110,7 +5168,7 @@ EncoderInertialCapture</property>
<widget class="GtkHBox"
id="hbox_contacts_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_contacts_capture">
<property name="visible">True</property>
@@ -5228,7 +5286,7 @@ EncoderInertialCapture</property>
<child>
<widget class="GtkHBox" id="hbox_other">
<property name="can_focus">False</property>
- <property name="spacing">20</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkRadioButton"
id="radio_mode_pulses_small">
<property name="visible">True</property>
@@ -5346,7 +5404,7 @@ EncoderInertialCapture</property>
<child>
<widget class="GtkHBox" id="hbox_top_person">
<property name="can_focus">False</property>
- <property name="spacing">20</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label_top_person_name">
<property name="visible">True</property>
@@ -24580,6 +24638,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -30689,18 +30750,6 @@ 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>
@@ -30737,6 +30786,18 @@ 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>
@@ -39150,6 +39211,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 5663d3b9..e16fe63b 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -71,8 +71,15 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_show_modes_contacts;
[Widget] Gtk.Button button_show_modes_encoder;
+ [Widget] Gtk.HBox hbox_change_modes_jumps;
+ [Widget] Gtk.RadioButton radio_change_modes_contacts_jumps_simple;
+ [Widget] Gtk.RadioButton radio_change_modes_contacts_jumps_reactive;
+ [Widget] Gtk.Image image_change_modes_contacts_jumps_simple;
+ [Widget] Gtk.Image image_change_modes_contacts_jumps_reactive;
[Widget] Gtk.EventBox eventbox_button_show_modes_contacts;
+ [Widget] Gtk.EventBox eventbox_change_modes_contacts_jumps_simple;
+ [Widget] Gtk.EventBox eventbox_change_modes_contacts_jumps_reactive;
[Widget] Gtk.EventBox eventbox_button_show_modes_encoder;
[Widget] Gtk.EventBox eventbox_radio_mode_contacts_capture;
[Widget] Gtk.EventBox eventbox_radio_mode_contacts_analyze;
@@ -91,7 +98,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.HBox hbox_radio_mode_contacts_analyze_jump_simple_buttons;
[Widget] Gtk.Image image_button_show_modes_contacts_grid;
- [Widget] Gtk.Image image_button_show_modes_contacts_current;
[Widget] Gtk.Image image_button_show_modes_encoder_grid;
[Widget] Gtk.Image image_button_show_modes_encoder_current;
@@ -595,6 +601,8 @@ public partial class ChronoJumpWindow
initRunEncoder();
UtilGtk.EventBoxColorBackgroundActive (eventbox_button_show_modes_contacts, UtilGtk.YELLOW,
UtilGtk.YELLOW_LIGHT);
+ UtilGtk.EventBoxColorBackgroundActive (eventbox_change_modes_contacts_jumps_simple,
UtilGtk.YELLOW, UtilGtk.YELLOW_LIGHT);
+ UtilGtk.EventBoxColorBackgroundActive (eventbox_change_modes_contacts_jumps_reactive,
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);
@@ -2984,6 +2992,7 @@ public partial class ChronoJumpWindow
runEncoderProcessCancel = true;
}
+ hbox_change_modes_jumps.Visible = false;
button_contacts_bells.Sensitive = false;
radio_mode_contacts_capture.Active = true;
radio_mode_contacts_jumps_profile.Active = true;
@@ -3034,6 +3043,8 @@ public partial class ChronoJumpWindow
label_contacts_exercise_selected_options.Visible = true;
image_top_laterality_contacts.Visible = false;
+ hbox_change_modes_jumps.Visible = true;
+
if(m == Constants.Menuitem_modes.JUMPSSIMPLE)
{
notebooks_change(m);
@@ -3356,7 +3367,6 @@ public partial class ChronoJumpWindow
}
image_button_show_modes_contacts_grid.Pixbuf = pixbufModeGrid;
- image_button_show_modes_contacts_current.Pixbuf = pixbufModeCurrent;
image_button_show_modes_encoder_grid.Pixbuf = pixbufModeGrid;
image_button_show_modes_encoder_current.Pixbuf = pixbufModeCurrent;
@@ -3598,14 +3608,30 @@ public partial class ChronoJumpWindow
notebook_mode_selector2.CurrentPage = 0; //jumps
notebook_mode_selector.CurrentPage = 1; //2nd selector
}
+
private void on_button_selector_start_jumps_simple_clicked(object o, EventArgs args)
{
- changeMode (Constants.Menuitem_modes.JUMPSSIMPLE);
+ if(radio_change_modes_contacts_jumps_simple.Active)
+ changeMode (Constants.Menuitem_modes.JUMPSSIMPLE);
+ else
+ radio_change_modes_contacts_jumps_simple.Active = true;
}
private void on_button_selector_start_jumps_reactive_clicked(object o, EventArgs args)
+ {
+ if(radio_change_modes_contacts_jumps_reactive.Active)
+ changeMode (Constants.Menuitem_modes.JUMPSREACTIVE);
+ else
+ radio_change_modes_contacts_jumps_reactive.Active = true;
+ }
+ private void on_radio_change_modes_contacts_jumps_simple_toggled (object o, EventArgs args)
+ {
+ changeMode (Constants.Menuitem_modes.JUMPSSIMPLE);
+ }
+ private void on_radio_change_modes_contacts_jumps_reactive_toggled (object o, EventArgs args)
{
changeMode (Constants.Menuitem_modes.JUMPSREACTIVE);
}
+
private void on_button_selector_start_runs_clicked(object o, EventArgs args)
{
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index c57e0a67..e1b66bcf 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -451,6 +451,7 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_weight.png");
image_encoder_exercise.Pixbuf = pixbuf;
+
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "folder_new.png");
image_session_new1.Pixbuf = pixbuf;
image_session_new3.Pixbuf = pixbuf;
@@ -599,8 +600,10 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_jump_simple.png");
image_mode_jumps_small.Pixbuf = pixbuf;
+ image_change_modes_contacts_jumps_simple.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_jump_reactive.png");
image_mode_jumps_reactive_small.Pixbuf = pixbuf;
+ image_change_modes_contacts_jumps_reactive.Pixbuf = pixbuf;
image_tests_analyze_jump_rj.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_run_simple.png");
image_mode_runs_small.Pixbuf = pixbuf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]