[chronojump] At start 4 modes are shown. Button to show 6.



commit 2b0cb40c435a0be406038d74efd1032714507d99
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Mar 24 18:58:03 2020 +0100

    At start 4 modes are shown. Button to show 6.

 glade/app1.glade           | 179 ++++++++++++++++++++++++++++++++++++++-------
 src/gui/app1/chronojump.cs |  22 +++++-
 2 files changed, 172 insertions(+), 29 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index cddd2538..90dea107 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -982,13 +982,13 @@
                                                             <widget class="GtkAlignment" 
id="alignment_menu_session_options">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="top_padding">6</property>
+                                                            <property name="top_padding">5</property>
                                                             <property name="left_padding">16</property>
                                                             <child>
                                                             <widget class="GtkVBox" 
id="vbox_manage_sessions">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">6</property>
+                                                            <property name="spacing">5</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_menu_session_new">
                                                             <property name="visible">True</property>
@@ -1391,13 +1391,13 @@
                                                             <child>
                                                             <widget class="GtkAlignment" 
id="alignment_menu_encoder_options">
                                                             <property name="can_focus">False</property>
-                                                            <property name="top_padding">8</property>
+                                                            <property name="top_padding">5</property>
                                                             <property name="left_padding">16</property>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox56">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">4</property>
+                                                            <property name="spacing">5</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_menu_encoder_export_set">
                                                             <property name="label" translatable="yes">Export 
current set</property>
@@ -1537,13 +1537,13 @@
                                                             <widget class="GtkAlignment" 
id="alignment_menu_help_options">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="top_padding">8</property>
+                                                            <property name="top_padding">5</property>
                                                             <property name="left_padding">16</property>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox188">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">4</property>
+                                                            <property name="spacing">5</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_menu_help_documents">
                                                             <property name="visible">True</property>
@@ -4081,11 +4081,15 @@
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkHBox" id="hbox365">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
                                                             <widget class="GtkTable" id="table5">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="n_rows">2</property>
-                                                            <property name="n_columns">3</property>
+                                                            <property name="n_columns">2</property>
                                                             <property name="column_spacing">10</property>
                                                             <property name="row_spacing">10</property>
                                                             <child>
@@ -4179,14 +4183,14 @@
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox101">
+                                                            <widget class="GtkVBox" id="vbox102">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <child>
-                                                            <widget class="GtkLabel" id="label279">
+                                                            <widget class="GtkLabel" id="label280">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label" 
translatable="yes">Encoder</property>
+                                                            <property name="label" translatable="yes">Force 
sensor</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">True</property>
@@ -4195,15 +4199,15 @@
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_selector_start_encoder">
+                                                            <widget class="GtkButton" 
id="button_selector_start_force_sensor">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="relief">none</property>
-                                                            <signal name="clicked" 
handler="on_button_selector_start_encoder_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_button_selector_start_force_sensor_clicked" swapped="no"/>
                                                             <accelerator key="1" signal="clicked"/>
                                                             <child>
-                                                            <widget class="GtkImage" 
id="image_selector_start_encoder">
+                                                            <widget class="GtkImage" 
id="image_selector_start_force_sensor">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property 
name="stock">gtk-missing-image</property>
@@ -4218,21 +4222,21 @@
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="left_attach">2</property>
-                                                            <property name="right_attach">3</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>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox102">
+                                                            <widget class="GtkVBox" id="vbox101">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <child>
-                                                            <widget class="GtkLabel" id="label280">
+                                                            <widget class="GtkLabel" id="label279">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Force 
sensor</property>
+                                                            <property name="label" 
translatable="yes">Encoder</property>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">True</property>
@@ -4241,15 +4245,15 @@
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkButton" 
id="button_selector_start_force_sensor">
+                                                            <widget class="GtkButton" 
id="button_selector_start_encoder">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="relief">none</property>
-                                                            <signal name="clicked" 
handler="on_button_selector_start_force_sensor_clicked" swapped="no"/>
+                                                            <signal name="clicked" 
handler="on_button_selector_start_encoder_clicked" swapped="no"/>
                                                             <accelerator key="1" signal="clicked"/>
                                                             <child>
-                                                            <widget class="GtkImage" 
id="image_selector_start_force_sensor">
+                                                            <widget class="GtkImage" 
id="image_selector_start_encoder">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property 
name="stock">gtk-missing-image</property>
@@ -4264,12 +4268,120 @@
                                                             </child>
                                                             </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>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox379">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkVBox" 
id="vbox_start_selector_show_more">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkVSeparator" id="vseparator4">
+                                                            <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="padding">20</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox380">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_start_selector_show_more">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <signal name="clicked" 
handler="on_button_start_selector_show_more_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow19">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="arrow_type">left</property>
+                                                            </widget>
+                                                            </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_start_selector_show_less">
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <signal name="clicked" 
handler="on_button_start_selector_show_less_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkArrow" id="arrow20">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            </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="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkVSeparator" id="vseparator5">
+                                                            <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="padding">20</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkTable" 
id="table_start_selector_rt_other">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="n_rows">2</property>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox103">
                                                             <property name="visible">True</property>
@@ -4310,10 +4422,6 @@
                                                             </child>
                                                             </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>
@@ -4358,8 +4466,6 @@
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="left_attach">2</property>
-                                                            <property name="right_attach">3</property>
                                                             <property name="top_attach">1</property>
                                                             <property name="bottom_attach">2</property>
                                                             <property name="x_options">GTK_EXPAND</property>
@@ -4368,6 +4474,13 @@
                                                             </child>
                                                             </widget>
                                                             <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
                                                             <property name="expand">True</property>
                                                             <property name="fill">True</property>
                                                             <property name="position">1</property>
@@ -24556,6 +24669,12 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -34405,6 +34524,12 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 691c9348..01b53269 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -73,6 +73,9 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Notebook notebook_start;           //start window or program
        [Widget] Gtk.Notebook notebook_start_selector;  //use to display the start images to select different 
modes
        [Widget] Gtk.Notebook notebook_start_selector2; //for selection of jumps, runs, runs photocell, 
encoder
+       [Widget] Gtk.Table table_start_selector_rt_other;
+       [Widget] Gtk.Button button_start_selector_show_more;
+       [Widget] Gtk.Button button_start_selector_show_less;
        [Widget] Gtk.Notebook notebook_sup;
        [Widget] Gtk.HBox hbox_other;
        [Widget] Gtk.Notebook notebook_capture_analyze; //not encoder
@@ -3115,8 +3118,23 @@ public partial class ChronoJumpWindow
                setApp1Title(tempSessionName, Constants.Menuitem_modes.UNDEFINED);
 
                chronojumpLogo = new ChronojumpLogo (drawingarea_chronojump_logo, viewport_chronojump_logo);
-       }       
-       
+       }
+
+       private void on_button_start_selector_show_more_clicked (object o, EventArgs args)
+       {
+               button_start_selector_show_more.Visible = false;
+               button_start_selector_show_less.Visible = true;
+
+               table_start_selector_rt_other.Visible = true;
+       }
+       private void on_button_start_selector_show_less_clicked (object o, EventArgs args)
+       {
+               button_start_selector_show_more.Visible = true;
+               button_start_selector_show_less.Visible = false;
+
+               table_start_selector_rt_other.Visible = false;
+       }
+
        private Constants.Menuitem_modes current_menuitem_mode;
        private Constants.Menuitem_modes last_menuitem_mode; //store it to decide not change threshold when 
change from jumps to jumpsRj
        private bool last_menuitem_mode_defined = false; //undefined when first time entry on a mode (jumps, 
jumpRj, ...)


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