[chronojump] Two session menuitems moved to new encoder/forcesensor menus



commit d5c21b41123fa257e0b23b769068638fca27502b
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jul 22 11:42:36 2019 +0200

    Two session menuitems moved to new encoder/forcesensor menus

 glade/app1.glade      | 207 ++++++++++++++++++++++++++++++++++----------------
 src/gui/chronojump.cs |  14 ++--
 2 files changed, 149 insertions(+), 72 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 43e61821..779f6d76 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -102,24 +102,6 @@
                         <property name="can_focus">False</property>
                       </widget>
                     </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_export_encoder_signal">
-                        <property name="label" translatable="yes">Export current encoder set (to raw 
data)</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="tooltip" translatable="yes">Export set to CSV 
(Spreadsheet)</property>
-                        <property name="use_stock">False</property>
-                        <property name="always_show_image">True</property>
-                        <signal name="activate" handler="on_button_encoder_export_all_curves_clicked" 
swapped="no"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image_export_encoder_signal">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="stock">gtk-missing-image</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="menuitem_import_chronojump_session">
                         <property name="label" translatable="yes">Import session from another Chronojump 
database</property>
@@ -137,15 +119,6 @@
                         </child>
                       </widget>
                     </child>
-                    <child>
-                      <widget class="GtkMenuItem" id="menuitem_encoder_session_overview">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Overview of this encoder session</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="on_menuitem_encoder_session_overview_activate" 
swapped="no"/>
-                      </widget>
-                    </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="menuitem_export_csv">
                         <property name="label" translatable="yes">Export session to _CSV 
(Spreadsheet)</property>
@@ -174,39 +147,6 @@
                         <signal name="activate" handler="on_export_session_activate" swapped="no"/>
                       </widget>
                     </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_force_sensor_open_folder">
-                        <property name="label" translatable="yes">Force sensor - Open data folder</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_stock">False</property>
-                        <property name="always_show_image">True</property>
-                        <signal name="activate" handler="on_menuitem_force_sensor_open_folder_activate" 
swapped="no"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image_force_sensor_open_folder">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="stock">gtk-open</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem_force_sensor_check_version">
-                        <property name="label" translatable="yes">Force sensor - Check version</property>
-                        <property name="can_focus">False</property>
-                        <property name="tooltip" translatable="yes">Check version of force sensor 
firmware.</property>
-                        <property name="use_stock">False</property>
-                        <property name="always_show_image">True</property>
-                        <signal name="activate" handler="on_buttons_force_sensor_clicked" swapped="no"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image_force_sensor_check_version">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="stock">gtk-missing-image</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="menuitem_race_analyzer_open_folder">
                         <property name="label" translatable="yes">Race analyzer - Open data folder</property>
@@ -245,11 +185,6 @@
                         </child>
                       </widget>
                     </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separador8">
-                        <property name="can_focus">False</property>
-                      </widget>
-                    </child>
                     <child>
                       <widget class="GtkSeparatorMenuItem" id="sepearador7">
                         <property name="visible">True</property>
@@ -467,6 +402,94 @@
                 </child>
               </widget>
             </child>
+            <child>
+              <widget class="GtkMenuItem" id="encoder_menuitem">
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">_Encoder</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem_export_encoder_signal">
+                        <property name="label" translatable="yes">Export current set (to raw data)</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip" translatable="yes">Export set to CSV 
(Spreadsheet)</property>
+                        <property name="use_stock">False</property>
+                        <property name="always_show_image">True</property>
+                        <signal name="activate" handler="on_button_encoder_export_all_curves_clicked" 
swapped="no"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image_export_encoder_signal">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-missing-image</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkMenuItem" id="menuitem_encoder_session_overview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Overview of this session</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_menuitem_encoder_session_overview_activate" 
swapped="no"/>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="force_sensor_menuitem">
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">_Force sensor</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem_force_sensor_open_folder">
+                        <property name="label" translatable="yes">Open data folder</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_stock">False</property>
+                        <property name="always_show_image">True</property>
+                        <signal name="activate" handler="on_menuitem_force_sensor_open_folder_activate" 
swapped="no"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image_force_sensor_open_folder">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-open</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem_force_sensor_check_version">
+                        <property name="label" translatable="yes">Force sensor - Check version</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip" translatable="yes">Check version</property>
+                        <property name="use_stock">False</property>
+                        <property name="always_show_image">True</property>
+                        <signal name="activate" handler="on_buttons_force_sensor_clicked" swapped="no"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image_force_sensor_check_version">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-missing-image</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
             <child>
               <widget class="GtkMenuItem" id="view_menuitem">
                 <property name="visible">True</property>
@@ -2070,6 +2093,24 @@
                                                             <placeholder/>
                                                             </child>
                                                             <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkLabel" 
id="label_start_selector_jumps">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -21327,6 +21368,24 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -30129,6 +30188,24 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 32ea84e0..1ee8aaee 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -45,6 +45,9 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.MenuItem menuitem_open_session;
        [Widget] Gtk.MenuItem menuitem_mode;
        
+       [Widget] Gtk.MenuItem encoder_menuitem;
+       [Widget] Gtk.MenuItem force_sensor_menuitem;
+
        [Widget] Gtk.HBox hbox_gui_tests;
        [Widget] Gtk.SpinButton spin_gui_tests;
        [Widget] Gtk.ComboBox combo_gui_tests;
@@ -3180,8 +3183,7 @@ public partial class ChronoJumpWindow
                event_execute_drawingarea_run_simple_double_contacts.Visible = false;
 
                //default for everything except encoder
-               menuitem_encoder_session_overview.Visible = false;
-               menuitem_export_encoder_signal.Visible = false;
+               encoder_menuitem.Visible = false;
                menuitem_export_csv.Visible = true;
 
                hbox_other.Visible = false;
@@ -3299,8 +3301,7 @@ public partial class ChronoJumpWindow
                }
                else if(m == Constants.Menuitem_modes.POWERGRAVITATORY || m == 
Constants.Menuitem_modes.POWERINERTIAL) 
                {
-                       menuitem_encoder_session_overview.Visible = true;
-                       menuitem_export_encoder_signal.Visible = true;
+                       encoder_menuitem.Visible = true;
                        menuitem_export_csv.Visible = false;
 
                        notebook_sup.CurrentPage = 1;
@@ -3517,8 +3518,8 @@ public partial class ChronoJumpWindow
                if(! configChronojump.Compujump)
                        showWebcamCaptureContactsControls (m != Constants.Menuitem_modes.FORCESENSOR && m != 
Constants.Menuitem_modes.RUNSENCODER);
 
-               menuitem_force_sensor_open_folder.Visible = (m == Constants.Menuitem_modes.FORCESENSOR);
-               menuitem_force_sensor_check_version.Visible = (m == Constants.Menuitem_modes.FORCESENSOR);
+               force_sensor_menuitem.Visible = (m == Constants.Menuitem_modes.FORCESENSOR);
+
                menuitem_race_analyzer_open_folder.Visible = (m == Constants.Menuitem_modes.RUNSENCODER);
        }
 
@@ -7144,7 +7145,6 @@ LogB.Debug("mc finished 5");
                menuitem_export_csv.Sensitive = option;
                //menuitem_export_xml.Sensitive = option; not implemented yet
                menuitem_encoder_session_overview.Sensitive = option;
-
        }
        
        private void menuPersonSelectedSensitive(bool option)


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