[chronojump] Session menu shows different things depending on mode



commit 20c82b64c797495040ed42d81544717de725b533
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jun 9 13:42:40 2016 +0200

    Session menu shows different things depending on mode

 glade/chronojump.glade |   91 ++++++++++++++++++++++++++++++++++-------------
 src/gui/chronojump.cs  |   18 ++++++++--
 2 files changed, 81 insertions(+), 28 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 5651444..1c52c7f 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -100,18 +100,22 @@
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkMenuItem" id="menuitem_encoder_session_overview">
+                      <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="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"/>
+                        <property name="tooltip" translatable="yes">Export set to CSV 
(Spreadsheet)</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_button_encoder_export_all_curves_clicked" 
swapped="no"/>
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkSeparatorMenuItem" id="separador10">
+                      <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>
@@ -133,23 +137,6 @@
                       </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>
-                        <signal name="activate" handler="on_button_encoder_export_all_curves_clicked" 
swapped="no"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image65">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="stock">gtk-convert</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
                       <widget class="GtkMenuItem" id="menuitem_export_xml">
                         <property name="sensitive">False</property>
                         <property name="can_focus">False</property>
@@ -16539,6 +16526,9 @@ on current Chronojump version.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -21237,6 +21227,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -22416,6 +22409,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -24087,6 +24083,9 @@ by you</property>
               <placeholder/>
             </child>
             <child>
+              <placeholder/>
+            </child>
+            <child>
               <widget class="GtkButton" id="button_video_url">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -24815,6 +24814,9 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -37855,6 +37857,24 @@ options</property>
                             <child>
                               <placeholder/>
                             </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -40534,6 +40554,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -41780,9 +41812,6 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                       <placeholder/>
                                     </child>
                                     <child>
-                                      <placeholder/>
-                                    </child>
-                                    <child>
                                       <widget class="GtkLabel" id="label218">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
@@ -42961,6 +42990,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                     <child>
                                       <placeholder/>
                                     </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
                                   </widget>
                                 </child>
                               </widget>
@@ -47026,6 +47058,9 @@ It starts before and arrives there with some speed.</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -47869,6 +47904,9 @@ It starts before and arrives there with some speed.</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -48727,6 +48765,9 @@ It starts before and arrives there with some speed.</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index d35939d..0eb86c0 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3024,18 +3024,30 @@ public partial class ChronoJumpWindow
                menuitem_mode_selected_other.Visible = false;
                        
                LogB.Information("MODE", m.ToString());
+               
+               //default for everythong except encoder 
+               menuitem_encoder_session_overview.Visible = false;
+               menuitem_export_encoder_signal.Visible = false;
+               menuitem_export_csv.Visible = true;
 
-               if(m == menuitem_modes.JUMPS) {
+               if(m == menuitem_modes.JUMPS) 
+               {
                        notebook_sup.CurrentPage = 0;
                        notebook_sup_contacts.CurrentPage = 0;
                        menuitem_mode_selected_jumps.Visible = true;
                        radio_mode_jumps_small.Active = true;
-               } else if(m == menuitem_modes.RUNS) {
+               } else if(m == menuitem_modes.RUNS) 
+               {
                        notebook_sup.CurrentPage = 0;
                        notebook_sup_contacts.CurrentPage = 1;
                        menuitem_mode_selected_runs.Visible = true;
                        radio_mode_runs_small.Active = true;
-               } else if(m == menuitem_modes.POWERGRAVITATORY || m == menuitem_modes.POWERINERTIAL) {
+               } else if(m == menuitem_modes.POWERGRAVITATORY || m == menuitem_modes.POWERINERTIAL) 
+               {
+                       menuitem_encoder_session_overview.Visible = true;
+                       menuitem_export_encoder_signal.Visible = true;
+                       menuitem_export_csv.Visible = false;
+                       
                        //on OSX R is not installed by default. Check if it's installed. Needed for encoder
                        if( UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX &&
                                        ! Util.FileExists(Constants.ROSX) )


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