[chronojump] Encoder test config with button: "close and capture"



commit 82eab863d0e72b42c244ebf97c5ea5beddc4085f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Feb 4 16:19:42 2020 +0100

    Encoder test config with button: "close and capture"

 glade/app1.glade      | 97 ++++++++++++++++++++++++++++++++++++++++++---------
 src/gui/app1/icons.cs |  2 ++
 src/gui/encoder.cs    |  6 ++++
 3 files changed, 89 insertions(+), 16 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 80f670b3..e0977a0f 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -11475,7 +11475,7 @@ EncoderInertialCapture</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkAlignment" id="alignment2">
+                                                          <widget class="GtkAlignment" 
id="alignment_contacts_instructions">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="top_padding">4</property>
@@ -23188,6 +23188,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -25459,6 +25462,18 @@ 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>
@@ -25495,18 +25510,6 @@ 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>
@@ -25930,13 +25933,13 @@ Concentric</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="border_width">4</property>
-                                                            <property 
name="label_xalign">0.004999999888241291</property>
+                                                            <property name="label_xalign">0.5</property>
                                                             <property name="shadow_type">in</property>
                                                             <child>
                                                             <widget class="GtkAlignment" 
id="alignment_encoder_capture_options">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="top_padding">10</property>
+                                                            <property name="top_padding">12</property>
                                                             <property name="bottom_padding">10</property>
                                                             <property name="left_padding">10</property>
                                                             <property name="right_padding">10</property>
@@ -27142,6 +27145,11 @@ Concentric</property>
                                                             </widget>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkHBox" id="hbox242">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">30</property>
+                                                            <child>
                                                             <widget class="GtkButton" id="button_11">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
@@ -27151,7 +27159,7 @@ Concentric</property>
                                                             <signal name="clicked" 
handler="on_button_encoder_exercise_close_clicked" swapped="no"/>
                                                             <accelerator key="Escape" signal="clicked"/>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox242">
+                                                            <widget class="GtkHBox" id="hbox357">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">8</property>
@@ -27183,6 +27191,60 @@ Concentric</property>
                                                             </child>
                                                             </widget>
                                                             <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_encoder_exercise_close_and_capture">
+                                                            <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"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox360">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">8</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_encoder_close_and_capture">
+                                                            <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="label438">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Close 
and capture</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">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
                                                             <property name="type">label_item</property>
                                                             </packing>
                                                             </child>
@@ -32791,6 +32853,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/icons.cs b/src/gui/app1/icons.cs
index b3e0c96d..f821c5cb 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -70,6 +70,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Image image_button_execute;
        [Widget] Gtk.Image image_contacts_bell;
        [Widget] Gtk.Image image_contacts_close_and_capture;
+       [Widget] Gtk.Image image_encoder_close_and_capture;
        [Widget] Gtk.Image image_tests_capture;
        [Widget] Gtk.Image image_tests_sprint;
        [Widget] Gtk.Image image_tests_analyze_general;
@@ -330,6 +331,7 @@ public partial class ChronoJumpWindow
                image_tests_capture.Pixbuf = pixbuf;
                image_mode_encoder_capture.Pixbuf = pixbuf;
                image_contacts_close_and_capture.Pixbuf = pixbuf;
+               image_encoder_close_and_capture.Pixbuf = pixbuf;
 
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_sprint.png");
                image_tests_sprint.Pixbuf = pixbuf;
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 7da0d654..e26dc471 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -4649,6 +4649,12 @@ public partial class ChronoJumpWindow
                hbox_top_person_encoder.Sensitive = ! show;
        }
 
+       void on_button_encoder_exercise_close_and_capture_clicked (object o, EventArgs args)
+       {
+               encoder_exercise_show_hide (false);
+               on_button_encoder_capture_clicked (o, args);
+       }
+
        //useful when there are no exercises (have been removed from database)
        bool selectedEncoderExerciseExists ()
        {


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