[chronojump] Button encoder recalculate moved to exercise options



commit 787df809f53a32520932e14cf2644762fc2d674a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Apr 1 17:16:48 2020 +0200

    Button encoder recalculate moved to exercise options

 glade/app1.glade        | 75 +++++++++++++++++++++++++++++++++----------------
 src/gui/app1/encoder.cs | 14 ++++++---
 2 files changed, 61 insertions(+), 28 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index f9f19673..b7f55cea 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -26392,28 +26392,6 @@ Concentric</property>
                                                             <property name="column_spacing">8</property>
                                                             <property name="row_spacing">8</property>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_encoder_recalculate">
-                                                            <property name="width_request">60</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="can_default">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="has_tooltip">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Recalculate set with changed parameters</property>
-                                                            <property name="relief">half</property>
-                                                            <property name="use_underline">True</property>
-                                                            <signal name="clicked" 
handler="on_button_encoder_recalculate_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkImage" id="image_recalculate">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property 
name="stock">gtk-missing-image</property>
-                                                            <property name="icon-size">2</property>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkButton" 
id="button_encoder_load_signal">
                                                             <property name="width_request">60</property>
                                                             <property name="visible">True</property>
@@ -26490,6 +26468,9 @@ Concentric</property>
                                                             <property name="right_attach">2</property>
                                                             </packing>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -28581,7 +28562,7 @@ then click this button.</property>
                                                             <widget class="GtkAlignment" 
id="alignment_encoder_capture_options">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="top_padding">14</property>
+                                                            <property name="top_padding">16</property>
                                                             <property name="bottom_padding">4</property>
                                                             <property name="left_padding">10</property>
                                                             <property name="right_padding">10</property>
@@ -29842,7 +29823,6 @@ then click this button.</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Close</property>
                                                             <property name="relief">half</property>
                                                             <signal name="clicked" 
handler="on_button_encoder_exercise_close_and_capture_clicked" swapped="no"/>
                                                             <accelerator key="Escape" signal="clicked"/>
@@ -29884,6 +29864,53 @@ then click this button.</property>
                                                             <property name="position">1</property>
                                                             </packing>
                                                             </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_encoder_exercise_close_and_recalculate">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="tooltip" 
translatable="yes">Recalculate set with changed parameters</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_button_encoder_exercise_close_and_recalculate_clicked" swapped="no"/>
+                                                            <accelerator key="Escape" signal="clicked"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox363">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">8</property>
+                                                            <child>
+                                                            <widget class="GtkImage" id="image_recalculate">
+                                                            <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">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label26">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Close 
and recalculate</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <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">2</property>
+                                                            </packing>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="type">label_item</property>
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 047bbffb..92651136 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -97,7 +97,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Button button_encoder_capture_cancel;
        [Widget] Gtk.Button button_encoder_capture_finish;
        [Widget] Gtk.Button button_encoder_capture_finish_cont;
-       [Widget] Gtk.Button button_encoder_recalculate;
+       [Widget] Gtk.Button button_encoder_exercise_close_and_recalculate;
        [Widget] Gtk.Button button_encoder_load_signal;
        [Widget] Gtk.Button button_encoder_load_signal_on_analyze;
        [Widget] Gtk.Viewport viewport_image_encoder_capture;
@@ -2318,7 +2318,7 @@ public partial class ChronoJumpWindow
                
                //need this because DONENOSIGNAL allows to recalculate with different parameters, 
                //but when deleted or cancelled, then don't allow
-               button_encoder_recalculate.Sensitive = false;
+               button_encoder_exercise_close_and_recalculate.Sensitive = false;
        }
 
        /*
@@ -4683,6 +4683,12 @@ public partial class ChronoJumpWindow
                encoder_exercise_show_hide (false);
                on_button_encoder_capture_clicked (o, args);
        }
+       void on_button_encoder_exercise_close_and_recalculate_clicked (object o, EventArgs args)
+       {
+               encoder_exercise_show_hide (false);
+               on_button_encoder_recalculate_clicked (o, args);
+       }
+
 
        //useful when there are no exercises (have been removed from database)
        bool selectedEncoderExerciseExists ()
@@ -5036,7 +5042,7 @@ public partial class ChronoJumpWindow
                //columns
                //c0 button_encoder_capture, hbox_encoder_sup_capture_analyze_two_buttons,
                //      hbox_encoder_configuration, frame_encoder_capture_options
-               //c1 button_encoder_recalculate
+               //c1 button_encoder_exercise_close_and_recalculate
                //c2 button_encoder_load_signal
                //c3 hbox_encoder_capture_curves_save_all_none, menuitem_export_encoder_signal, 
//button_menu_encoder_export_set
                //      button_encoder_delete_signal, vbox_encoder_signal_comment,
@@ -5093,7 +5099,7 @@ public partial class ChronoJumpWindow
                hbox_encoder_sup_capture_analyze_two_buttons.Sensitive = Util.IntToBool(table[0]);
                frame_encoder_capture_options.Sensitive = Util.IntToBool(table[0]);
 
-               button_encoder_recalculate.Sensitive = Util.IntToBool(table[1]);
+               button_encoder_exercise_close_and_recalculate.Sensitive = Util.IntToBool(table[1]);
                
                button_encoder_load_signal.Sensitive = Util.IntToBool(table[2]);
                button_encoder_load_signal_on_analyze.Sensitive = Util.IntToBool(table[2]);


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