[chronojump] Encoder capture 4 views if all false show a message



commit 294c4c23040e6601dea2d2545d01847531326f89
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jul 19 12:16:13 2021 +0200

    Encoder capture 4 views if all false show a message

 glade/app1.glade        | 52 ++++++++++++++++++++++++++++++++++++++++++++++---
 src/gui/app1/encoder.cs | 17 +++++++---------
 2 files changed, 56 insertions(+), 13 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index d31738b80..b32d4b1e6 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -32297,6 +32297,45 @@ Concentric</property>
                                                             <widget class="GtkHBox" id="hbox50">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
+                                                            <property name="spacing">40</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" 
id="hbox_encoder_capture_show_need_one">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">2</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" 
id="label_encoder_capture_show_need_one">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">Please, select at least one of the options</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow43">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox74">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
                                                             <widget class="GtkLabel" id="label652">
@@ -32317,7 +32356,7 @@ Concentric</property>
                                                             <property name="can_focus">True</property>
                                                             <property 
name="receives_default">False</property>
                                                             <property name="draw_indicator">True</property>
-                                                            <signal name="clicked" 
handler="on_check_encoder_capture_bars_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_check_encoder_capture_show_modes_clicked" swapped="no"/>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32332,7 +32371,7 @@ Concentric</property>
                                                             <property name="can_focus">True</property>
                                                             <property 
name="receives_default">False</property>
                                                             <property name="draw_indicator">True</property>
-                                                            <signal name="clicked" 
handler="on_check_encoder_capture_table_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_check_encoder_capture_show_modes_clicked" swapped="no"/>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32347,7 +32386,7 @@ Concentric</property>
                                                             <property name="can_focus">True</property>
                                                             <property 
name="receives_default">False</property>
                                                             <property name="draw_indicator">True</property>
-                                                            <signal name="clicked" 
handler="on_check_encoder_capture_signal_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_check_encoder_capture_show_modes_clicked" swapped="no"/>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32356,6 +32395,13 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
                                                             </child>
                                                             </widget>
                                                             <packing>
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index ca8368fdc..b5b851457 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -125,6 +125,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.CheckButton check_encoder_capture_table;
        [Widget] Gtk.CheckButton check_encoder_capture_signal;
        [Widget] Gtk.HBox hbox_encoder_capture_save_repetitions;
+       [Widget] Gtk.HBox hbox_encoder_capture_show_need_one;
        [Widget] Gtk.Alignment alignment_encoder_capture_curves_bars_drawingarea;
 
        [Widget] Gtk.Box hbox_combo_encoder_exercise_capture;
@@ -1333,21 +1334,17 @@ public partial class ChronoJumpWindow
                }
        }
 
-       private void on_check_encoder_capture_bars_clicked (object o, EventArgs args)
+       private void on_check_encoder_capture_show_modes_clicked (object o, EventArgs args)
        {
                alignment_encoder_capture_curves_bars_drawingarea.Visible = check_encoder_capture_bars.Active;
-               hbox_encoder_capture_save_repetitions.Visible =
-                       (check_encoder_capture_bars.Active || check_encoder_capture_table.Active);
-       }
-       private void on_check_encoder_capture_table_clicked (object o, EventArgs args)
-       {
                alignment_treeview_encoder_capture_curves.Visible = check_encoder_capture_table.Active;
+               vpaned_encoder_capture_video_and_set_graph.Visible = check_encoder_capture_signal.Active;
+
                hbox_encoder_capture_save_repetitions.Visible =
                        (check_encoder_capture_bars.Active || check_encoder_capture_table.Active);
-       }
-       private void on_check_encoder_capture_signal_clicked (object o, EventArgs args)
-       {
-               vpaned_encoder_capture_video_and_set_graph.Visible = check_encoder_capture_signal.Active;
+
+               hbox_encoder_capture_show_need_one.Visible =
+                       ! (check_encoder_capture_bars.Active || check_encoder_capture_table.Active || 
check_encoder_capture_signal.Active);
        }
 
        private void encoderUpdateTreeViewCapture(List<string> contents)


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