[chronojump] ec-together option in cross analysis



commit 4ca374924fdad591417c623894f84bd26fd73d7a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Mar 1 15:14:48 2013 +0100

    ec-together option in cross analysis

 glade/chronojump.glade |  101 ++++++++++++-----------------------------------
 src/gui/encoder.cs     |   33 ++++++----------
 2 files changed, 38 insertions(+), 96 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 98fb3da..68cd17e 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -13340,7 +13340,8 @@ on current Chronojump version.</property>
                                                   <packing>
                                                     <property name="top_attach">1</property>
                                                     <property name="bottom_attach">2</property>
-                                                    <property name="x_options">GTK_FILL</property>
+                                                    <property name="x_options"/>
+                                                    <property name="y_options">GTK_EXPAND</property>
                                                   </packing>
                                                 </child>
                                                 <child>
@@ -13431,6 +13432,23 @@ on current Chronojump version.</property>
                                                     <property name="can_focus">False</property>
                                                     <property name="spacing">12</property>
                                                     <child>
+                                                      <widget class="GtkCheckButton" 
id="check_encoder_analyze_eccon_together">
+                                                        <property name="label" translatable="yes">EC 
together</property>
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
+                                                        <property name="receives_default">False</property>
+                                                        <property name="tooltip" 
translatable="yes">Eccentric-concentric together</property>
+                                                        <property 
name="use_action_appearance">False</property>
+                                                        <property name="active">True</property>
+                                                        <property name="draw_indicator">True</property>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="expand">False</property>
+                                                        <property name="fill">False</property>
+                                                        <property name="position">0</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
                                                       <widget class="GtkHBox" 
id="hbox_encoder_analyze_curve_num">
                                                         <property name="can_focus">False</property>
                                                         <property name="spacing">6</property>
@@ -13464,7 +13482,7 @@ on current Chronojump version.</property>
                                                       <packing>
                                                         <property name="expand">False</property>
                                                         <property name="fill">False</property>
-                                                        <property name="position">0</property>
+                                                        <property name="position">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
@@ -13477,19 +13495,20 @@ on current Chronojump version.</property>
                                                       <packing>
                                                         <property name="expand">False</property>
                                                         <property name="fill">False</property>
-                                                        <property name="position">1</property>
+                                                        <property name="position">2</property>
                                                       </packing>
                                                     </child>
                                                     <child>
                                                       <widget class="GtkHBox" 
id="hbox_encoder_analyze_mean_or_max">
                                                         <property name="can_focus">False</property>
-                                                        <property name="spacing">6</property>
+                                                        <property name="spacing">4</property>
                                                         <child>
                                                           <widget class="GtkRadioButton" 
id="radiobutton_encoder_analyze_mean">
-                                                            <property name="label" translatable="yes">Mean 
values</property>
+                                                            <property name="label" 
translatable="yes">Mean</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property 
name="receives_default">False</property>
+                                                            <property name="tooltip" translatable="yes">Mean 
values</property>
                                                             <property 
name="use_action_appearance">False</property>
                                                             <property name="active">True</property>
                                                             <property name="draw_indicator">True</property>
@@ -13502,10 +13521,11 @@ on current Chronojump version.</property>
                                                         </child>
                                                         <child>
                                                           <widget class="GtkRadioButton" 
id="radiobutton_encoder_analyze_max">
-                                                            <property name="label" translatable="yes">Max 
values</property>
+                                                            <property name="label" 
translatable="yes">Max</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property 
name="receives_default">False</property>
+                                                            <property name="tooltip" translatable="yes">Max 
values</property>
                                                             <property 
name="use_action_appearance">False</property>
                                                             <property name="draw_indicator">True</property>
                                                             <property 
name="group">radiobutton_encoder_analyze_mean</property>
@@ -13520,75 +13540,6 @@ on current Chronojump version.</property>
                                                       <packing>
                                                         <property name="expand">False</property>
                                                         <property name="fill">False</property>
-                                                        <property name="position">2</property>
-                                                      </packing>
-                                                    </child>
-                                                    <child>
-                                                      <widget class="GtkHBox" 
id="hbox_encoder_analyze_eccon">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">False</property>
-                                                        <property name="spacing">6</property>
-                                                        <child>
-                                                          <widget class="GtkLabel" 
id="label_encoder_analyze_eccon">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="xalign">0</property>
-                                                            <property name="label" 
translatable="yes">Eccentric-concentric</property>
-                                                          </widget>
-                                                          <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                          </packing>
-                                                        </child>
-                                                        <child>
-                                                          <widget class="GtkHBox" 
id="hbox_encoder_analyze_eccon_dins">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">6</property>
-                                                            <child>
-                                                            <widget class="GtkRadioButton" 
id="radiobutton_encoder_eccon_together">
-                                                            <property name="label" 
translatable="yes">Together</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property 
name="receives_default">False</property>
-                                                            <property 
name="use_action_appearance">False</property>
-                                                            <property name="active">True</property>
-                                                            <property name="draw_indicator">True</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkRadioButton" 
id="radiobutton_encoder_eccon_separated">
-                                                            <property name="label" 
translatable="yes">Separated</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property 
name="receives_default">False</property>
-                                                            <property 
name="use_action_appearance">False</property>
-                                                            <property name="draw_indicator">True</property>
-                                                            <property 
name="group">radiobutton_encoder_eccon_together</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</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>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="expand">False</property>
-                                                        <property name="fill">False</property>
                                                         <property name="position">3</property>
                                                       </packing>
                                                     </child>
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index f749089..a37519f 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -83,9 +83,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.RadioButton radiobutton_encoder_analyze_single;
        [Widget] Gtk.RadioButton radiobutton_encoder_analyze_side;
        //[Widget] Gtk.RadioButton radiobutton_encoder_analyze_superpose;
-       [Widget] Gtk.Box hbox_encoder_analyze_eccon;
-       [Widget] Gtk.RadioButton radiobutton_encoder_eccon_both;
-       [Widget] Gtk.RadioButton radiobutton_encoder_eccon_together;
+       [Widget] Gtk.CheckButton check_encoder_analyze_eccon_together;
        [Widget] Gtk.Box hbox_encoder_analyze_curve_num;
        [Widget] Gtk.Box hbox_combo_encoder_analyze_curve_num_combo;
        [Widget] Gtk.ComboBox combo_encoder_analyze_curve_num_combo;
@@ -677,6 +675,7 @@ public partial class ChronoJumpWindow
                if(deletedOk) {
                        Sqlite.Delete(Constants.EncoderTable, Convert.ToInt32(encoderSignalUniqueID));
                        encoderSignalUniqueID = "-1";
+                       image_encoder_capture.Sensitive = false;
                        treeviewEncoderCaptureRemoveColumns();
                        encoderButtonsSensitive(encoderSensEnum.DONENOSIGNAL);
                        encoder_pulsebar_capture.Text = Catalog.GetString("Signal deleted");
@@ -1052,7 +1051,7 @@ public partial class ChronoJumpWindow
                        
                if(radiobutton_encoder_analyze_data_user_curves.Active) {
                        string myEccon = "ec";
-                       if(! radiobutton_encoder_eccon_together.Active)
+                       if(! check_encoder_analyze_eccon_together.Active)
                                myEccon = "ecS";
                        int myCurveNum = -1;
                        if(sendAnalysis == "single")
@@ -1211,8 +1210,8 @@ public partial class ChronoJumpWindow
                hbox_encoder_analyze_mean_or_max.Visible=false;
                encoderAnalysis="single";
                //together, mandatory
-               hbox_encoder_analyze_eccon.Visible=false;
-               radiobutton_encoder_eccon_together.Active = true;
+               check_encoder_analyze_eccon_together.Visible=false;
+               check_encoder_analyze_eccon_together.Active = true;
                label_encoder_analyze_side_max.Visible = false;
 
                encoderButtonsSensitive(encoderSensEnumStored);
@@ -1227,8 +1226,8 @@ public partial class ChronoJumpWindow
                encoderAnalysis="superpose";
                
                //together, mandatory
-               hbox_encoder_analyze_eccon.Visible=false;
-               radiobutton_encoder_eccon_together.Active = true;
+               check_encoder_analyze_eccon_together.Visible=false;
+               check_encoder_analyze_eccon_together.Active = true;
                
                encoderButtonsSensitive(encoderSensEnumStored);
        }
@@ -1241,8 +1240,8 @@ public partial class ChronoJumpWindow
                encoderAnalysis="side";
                
                //together, mandatory
-               hbox_encoder_analyze_eccon.Visible=false;
-               radiobutton_encoder_eccon_together.Active = true;
+               check_encoder_analyze_eccon_together.Visible=false;
+               check_encoder_analyze_eccon_together.Active = true;
 
                encoderButtonsSensitive(encoderSensEnumStored);
        }
@@ -1253,7 +1252,7 @@ public partial class ChronoJumpWindow
                hbox_encoder_analyze_mean_or_max.Visible=false;
                encoderAnalysis="powerBars";
                
-               hbox_encoder_analyze_eccon.Visible=true;
+               check_encoder_analyze_eccon_together.Visible=true;
                label_encoder_analyze_side_max.Visible = false;
 
                encoderButtonsSensitive(encoderSensEnumStored);
@@ -1266,7 +1265,7 @@ public partial class ChronoJumpWindow
                hbox_encoder_analyze_mean_or_max.Visible=true;
                encoderAnalysis="cross";
                
-               hbox_encoder_analyze_eccon.Visible=false;
+               check_encoder_analyze_eccon_together.Visible=true;
                label_encoder_analyze_side_max.Visible = false;
 
                encoderButtonsSensitive(encoderSensEnumStored);
@@ -1303,7 +1302,7 @@ public partial class ChronoJumpWindow
                                        encoderEcconTranslation) == "Concentric") 
                        return "c";
                else {
-                       if(forceEcconSeparated || ! radiobutton_encoder_eccon_together.Active)
+                       if(forceEcconSeparated || ! check_encoder_analyze_eccon_together.Active)
                                return "ecS";
                        else 
                                return "ec";
@@ -1414,14 +1413,6 @@ public partial class ChronoJumpWindow
 
        void on_combo_encoder_eccon_changed (object o, EventArgs args) 
        {
-               /*
-               if(Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_eccon),
-                                       encoderEcconTranslation) == "Concentric") {
-                       hbox_encoder_analyze_eccon.Sensitive=false;
-               } else if(radiobutton_encoder_analyze_powerbars.Active) {
-                       hbox_encoder_analyze_eccon.Sensitive=true;
-               }
-               */
        }
 
        void on_combo_encoder_analyze_cross_changed (object o, EventArgs args)


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