[chronojump] menu 2.2.2 with jumps buttons, go button nicer and other tweaks
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] menu 2.2.2 with jumps buttons, go button nicer and other tweaks
- Date: Thu, 26 May 2022 12:04:34 +0000 (UTC)
commit eda683257ac4b7fc024ad9d36bcb22d6813af0c2
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu May 26 14:03:59 2022 +0200
menu 2.2.2 with jumps buttons, go button nicer and other tweaks
glade/app1.glade | 306 +++++++++++++++++++++++++++++++++++++++++---
images/md/start-24-blue.png | Bin 0 -> 4793 bytes
src/gui/app1/chronojump.cs | 61 +++++++--
src/gui/app1/icons.cs | 8 ++
4 files changed, 343 insertions(+), 32 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 9c4fd3e50..51bcb139f 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -4779,6 +4779,12 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
+ <widget class="GtkAlignment" id="alignment88">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">75</property>
+ <property name="bottom_padding">75</property>
+ <child>
<widget class="GtkHButtonBox" id="hbuttonbox27">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -5101,10 +5107,11 @@
</packing>
</child>
</widget>
+ </child>
+ </widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="padding">100</property>
<property name="position">0</property>
</packing>
</child>
@@ -5113,12 +5120,19 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
+ <widget class="GtkFrame" id="frame9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0.5</property>
+ <property name="label_yalign">1</property>
+ <property name="shadow_type">none</property>
+ <child>
<widget class="GtkVBox" id="vbox277">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">16</property>
<child>
- <widget class="GtkLabel"
id="label_selector_menu_2_2_2">
+ <widget class="GtkLabel"
id="label_selector_menu_2_2_2_desc">
<property name="visible">True</property>
<property name="can_focus">False</property>
</widget>
@@ -5129,18 +5143,228 @@
</packing>
</child>
<child>
+ <widget class="GtkNotebook"
id="notebook_menu_2_2_2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <widget class="GtkTable" id="table25">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">20</property>
+ <property name="row_spacing">20</property>
+ <child>
+ <widget class="GtkButton" id="button12">
+ <property name="height_request">60</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_button_selector_start_jumps_simple_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox271">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage"
id="image_mode_jumps_small1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">10</property>
+ <property
name="stock">gtk-missing-image</property>
+ <property name="icon-size">2</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label672">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Simple</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="y_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button13">
+ <property name="height_request">60</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_button_selector_start_jumps_reactive_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox272">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage"
id="image_mode_jumps_reactive_small1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">10</property>
+ <property
name="stock">gtk-missing-image</property>
+ <property name="icon-size">2</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label673">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Multiple</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_selector_start_jumps_simple1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
have 1 flight phase</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_EXPAND</property>
+ <property name="y_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_selector_start_jumps_reactive1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
have >1 flight phase</property>
+ </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_EXPAND</property>
+ <property name="y_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label670">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">jumps</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label674">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">races</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label671">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">races</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox280">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
<widget class="GtkHBox" id="hbox227">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<widget class="GtkButton"
id="button_menu_2_2_2_go">
- <property name="label">Go!</property>
- <property name="width_request">150</property>
- <property name="height_request">100</property>
+ <property name="height_request">60</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked"
handler="on_button_menu_2_2_2_go_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkAlignment" id="alignment60">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">20</property>
+ <property name="right_padding">20</property>
+ <child>
+ <widget class="GtkHBox" id="hbox274">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label675">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">Go!</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage" id="image_start">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -5152,10 +5376,45 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label676">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="label">isometric/elastic/weights/inertial</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_selector_menu_2_2_2_title">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
@@ -5164,7 +5423,7 @@
</child>
</widget>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
@@ -27100,6 +27359,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -33508,18 +33770,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>
@@ -33556,6 +33806,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>
@@ -42917,6 +43179,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -50922,6 +51187,9 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/images/md/start-24-blue.png b/images/md/start-24-blue.png
new file mode 100644
index 000000000..9a5194368
Binary files /dev/null and b/images/md/start-24-blue.png differ
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 5b7d09b7e..fc2419b15 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -4402,6 +4402,10 @@ public partial class ChronoJumpWindow
private void on_button_view_menu_2_2_2_clicked (object o, EventArgs args)
{
notebook_mode_selector.CurrentPage = 2;
+
+ //TODO: depending on mode, force click on button_menu_2_2_2_clicked to ensure all widgets are
updated
+ //if no current mode, then jumps
+
}
private void on_button_view_menu_2_2_1_clicked (object o, EventArgs args)
{
@@ -4420,33 +4424,64 @@ public partial class ChronoJumpWindow
[Widget] Gtk.EventBox eventbox_radio_menu_2_2_2_elastic;
[Widget] Gtk.EventBox eventbox_radio_menu_2_2_2_weights;
[Widget] Gtk.EventBox eventbox_radio_menu_2_2_2_inertial;
- [Widget] Gtk.Label label_selector_menu_2_2_2;
+ [Widget] Gtk.Notebook notebook_menu_2_2_2; //0 jumps, 1 races, 2 isometric/elastic/weights/inertial
+ [Widget] Gtk.Label label_selector_menu_2_2_2_title;
+ [Widget] Gtk.Label label_selector_menu_2_2_2_desc;
private void on_button_menu_2_2_2_clicked (object o, EventArgs args)
{
- string str = "";
+ string title = "";
+ string desc = "";
if (o == (object) radio_menu_2_2_2_jumps)
- str = "Jumps with contact platform";
+ {
+ title = "Jumps";
+ desc = "Jumps with contact platform";
+ notebook_menu_2_2_2.CurrentPage = 0;
+ }
else if (o == (object) radio_menu_2_2_2_races)
- str = "Races with photocells (Wichro or wired), or RaceAnalyzer";
+ {
+ title = "Races";
+ desc = "Races with photocells (Wichro or wired), or RaceAnalyzer";
+ notebook_menu_2_2_2.CurrentPage = 1;
+ }
else if (o == (object) radio_menu_2_2_2_isometric)
- str = "Isometric force exercises measured by a force sensor";
+ {
+ title = "Isometric";
+ desc = "Isometric force exercises measured by a force sensor";
+ notebook_menu_2_2_2.CurrentPage = 2;
+ }
else if (o == (object) radio_menu_2_2_2_elastic)
- str = "Elastic force exercises measured by a force sensor";
+ {
+ title = "Elastic";
+ desc = "Elastic force exercises measured by a force sensor";
+ notebook_menu_2_2_2.CurrentPage = 2;
+ }
else if (o == (object) radio_menu_2_2_2_weights)
- str = "Speed/power exercises displacing weights measured by an encoder";
+ {
+ title = "Weights";
+ desc = "Speed/power exercises displacing weights measured by an encoder";
+ notebook_menu_2_2_2.CurrentPage = 2;
+ }
else if (o == (object) radio_menu_2_2_2_inertial)
- str = "Speed/power exercises rotating an inertial machine and measured by an encoder";
+ {
+ title = "Inertial";
+ desc = "Speed/power exercises rotating an inertial machine and measured by an
encoder";
+ notebook_menu_2_2_2.CurrentPage = 2;
+ }
- if (str != "")
- label_selector_menu_2_2_2.Text = str;
+ if (title != "")
+ {
+ label_selector_menu_2_2_2_title.Text = "<b>" + title + "</b>";
+ label_selector_menu_2_2_2_title.UseMarkup = true;
+ }
+ if (desc != "")
+ label_selector_menu_2_2_2_desc.Text = desc;
}
private void on_button_menu_2_2_2_go_clicked (object o, EventArgs args)
{
-/* if (radio_menu_2_2_2_jumps.Active)
- else if (radio_menu_2_2_2_races.Active)
- else */if (radio_menu_2_2_2_isometric.Active)
+ //jumps, races modes have their own buttons
+ if (radio_menu_2_2_2_isometric.Active)
on_button_selector_start_force_sensor_clicked (new object (), new EventArgs ());
else if (radio_menu_2_2_2_elastic.Active)
on_button_selector_start_force_sensor_clicked (new object (), new EventArgs ());
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 539f4a555..bbd7d5be1 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -104,8 +104,11 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_selector_start_displ_weights;
[Widget] Gtk.Image image_selector_start_inertial;
+ [Widget] Gtk.Image image_start;
[Widget] Gtk.Image image_mode_jumps_small;
+ [Widget] Gtk.Image image_mode_jumps_small1;
[Widget] Gtk.Image image_mode_jumps_reactive_small;
+ [Widget] Gtk.Image image_mode_jumps_reactive_small1;
[Widget] Gtk.Image image_mode_runs_small;
[Widget] Gtk.Image image_mode_runs_small1;
[Widget] Gtk.Image image_mode_runs_intervallic_small;
@@ -671,11 +674,16 @@ public partial class ChronoJumpWindow
* gui for small screens
*/
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "start.png");
+ image_start.Pixbuf = pixbuf;
+
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_jump_simple.png");
image_mode_jumps_small.Pixbuf = pixbuf;
+ image_mode_jumps_small1.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_mode_jumps_reactive_small1.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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]