[chronojump/michrolab] Better code for last commit



commit 5bcdd9123644dc82cf1436e61ab8d265791c3ae2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Aug 26 12:54:53 2022 +0200

    Better code for last commit

 glade/app1.glade     |  5 ++++-
 src/gui/app1/jump.cs | 10 ++--------
 2 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 7039a9978..bf2864298 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -13399,7 +13399,7 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox158">
+                                                            <widget class="GtkHBox" 
id="hbox_extra_window_jumps_rj_hbox_fall">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
@@ -13422,6 +13422,7 @@ EncoderInertialCapture</property>
                                                             </child>
                                                             <child>
                                                             <widget class="GtkLabel" 
id="extra_window_jumps_rj_label_fall">
+                                                            <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
                                                             <property name="label" 
translatable="yes">Falling height</property>
@@ -13446,6 +13447,7 @@ EncoderInertialCapture</property>
                                                             <property name="spacing">6</property>
                                                             <child>
                                                             <widget class="GtkSpinButton" 
id="extra_window_jumps_rj_spinbutton_fall">
+                                                            <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="invisible_char">●</property>
                                                             <property 
name="invisible_char_set">True</property>
@@ -13467,6 +13469,7 @@ EncoderInertialCapture</property>
                                                             </child>
                                                             <child>
                                                             <widget class="GtkLabel" 
id="extra_window_jumps_rj_label_cm">
+                                                            <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
                                                             <property name="label">cm</property>
diff --git a/src/gui/app1/jump.cs b/src/gui/app1/jump.cs
index 47c29724a..b3a2635e6 100644
--- a/src/gui/app1/jump.cs
+++ b/src/gui/app1/jump.cs
@@ -78,11 +78,9 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.RadioButton extra_window_jumps_rj_radiobutton_kg;
        [Widget] Gtk.RadioButton extra_window_jumps_rj_radiobutton_weight;
        [Widget] Gtk.Table table_extra_window_jumps_rj_weight;
+       [Widget] Gtk.HBox hbox_extra_window_jumps_rj_hbox_fall;
        [Widget] Gtk.Image extra_window_jumps_rj_image_fall;
        [Widget] Gtk.Image extra_window_jumps_rj_image_weight;
-       //[Widget] Gtk.Label extra_window_jumps_rj_label_weight;
-       [Widget] Gtk.Label extra_window_jumps_rj_label_fall;
-       [Widget] Gtk.Label extra_window_jumps_rj_label_cm;
        [Widget] Gtk.Label extra_window_jumps_label_rj_start_inside;
        [Widget] Gtk.Label extra_window_jumps_label_rj_start_outside;
        [Widget] Gtk.CheckButton checkbutton_allow_finish_rj_after_time;
@@ -569,11 +567,7 @@ public partial class ChronoJumpWindow
        {
                if(myJumpType.IsRepetitive)
                {
-                       extra_window_jumps_rj_image_fall.Visible = show;
-                       extra_window_jumps_rj_label_fall.Visible = show;
-                       extra_window_jumps_rj_spinbutton_fall.Visible = show;
-                       extra_window_jumps_rj_label_cm.Visible = show;
-
+                       hbox_extra_window_jumps_rj_hbox_fall.Visible = show;
                        extra_window_jumps_label_rj_start_inside.Visible = ! show;
                        extra_window_jumps_label_rj_start_outside.Visible = show;
                


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]