[chronojump] encoder analyze signal or curves with checkbox



commit 3f63ad0cd31ae6d86ceacea1d6b55b3f825ba734
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Apr 3 20:20:00 2014 +0200

    encoder analyze signal or curves with checkbox

 glade/chronojump.glade                    |  327 +++++++++++++++++++++++------
 images/encoder-analyze-current-signal.png |  Bin 0 -> 532 bytes
 images/encoder-analyze-saved-curves.png   |  Bin 0 -> 520 bytes
 images/svg/icons.svg                      |  221 ++++++++++++++++----
 src/Makefile.am                           |    2 +
 src/constants.cs                          |    3 +
 src/gui/chronojump.cs                     |    6 +
 src/gui/encoder.cs                        |  187 ++++++++---------
 src/gui/encoderTreeviews.cs               |   14 +-
 9 files changed, 552 insertions(+), 208 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 12455dd..06e2a3e 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -6379,6 +6379,15 @@ Second Chronopic to platforms.</property>
                                                         <child>
                                                           <placeholder/>
                                                         </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">True</property>
@@ -6972,6 +6981,15 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             <child>
@@ -7701,6 +7719,15 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">2</property>
@@ -8189,6 +8216,15 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">4</property>
@@ -12043,6 +12079,9 @@ on current Chronojump version.</property>
                                                   </packing>
                                                 </child>
                                               </widget>
+                                              <packing>
+                                                <property name="y_options"/>
+                                              </packing>
                                             </child>
                                             <child>
                                               <widget class="GtkHBox" id="hbox95">
@@ -13191,18 +13230,54 @@ on current Chronojump version.</property>
                                                 </child>
                                                 <child>
                                                   <widget class="GtkHBox" id="hbox73">
+                                                    <property name="height_request">30</property>
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
                                                     <property name="spacing">12</property>
                                                     <child>
-                                                      <widget class="GtkRadioButton" 
id="radiobutton_encoder_analyze_data_current_signal">
-                                                        <property name="label" translatable="yes">Current 
signal</property>
+                                                      <widget class="GtkCheckButton" 
id="check_encoder_analyze_signal_or_curves">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="receives_default">False</property>
                                                         <property name="active">True</property>
-                                                        <property name="draw_indicator">True</property>
-                                                        <signal name="toggled" 
handler="on_radiobutton_encoder_analyze_data_current_signal_toggled" swapped="no"/>
+                                                        <property name="draw_indicator">False</property>
+                                                        <signal name="toggled" 
handler="on_check_encoder_analyze_signal_or_curves_toggled" swapped="no"/>
+                                                        <child>
+                                                          <widget class="GtkHBox" id="hbox72">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">4</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_encoder_analyze_current_signal">
+                                                            <property name="width_request">32</property>
+                                                            <property name="height_request">16</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            <property name="icon-size">2</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_encoder_analyze_saved_curves">
+                                                            <property name="width_request">32</property>
+                                                            <property name="height_request">16</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            <property name="icon-size">2</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                          </widget>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">False</property>
@@ -13211,33 +13286,35 @@ on current Chronojump version.</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkHBox" id="hbox89">
+                                                      <widget class="GtkLabel" 
id="label_encoder_analyze_current_signal">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">False</property>
+                                                        <property name="label" translatable="yes">Current 
signal</property>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="expand">False</property>
+                                                        <property name="fill">False</property>
+                                                        <property name="position">1</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <widget class="GtkLabel" 
id="label_encoder_analyze_saved_curves">
+                                                        <property name="can_focus">False</property>
+                                                        <property name="label" translatable="yes">Saved 
curves</property>
+                                                      </widget>
+                                                      <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_user_curves">
+                                                        <property name="sensitive">False</property>
+                                                        <property name="can_focus">False</property>
                                                         <property name="spacing">6</property>
                                                         <child>
-                                                          <widget class="GtkRadioButton" 
id="radiobutton_encoder_analyze_data_user_curves">
-                                                            <property name="label" translatable="yes">User 
curves</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property 
name="receives_default">False</property>
-                                                            <property name="draw_indicator">True</property>
-                                                            <property 
name="group">radiobutton_encoder_analyze_data_current_signal</property>
-                                                            <signal name="toggled" 
handler="on_radiobutton_encoder_analyze_data_user_curves_toggled" swapped="no"/>
-                                                          </widget>
-                                                          <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">0</property>
-                                                          </packing>
-                                                        </child>
-                                                        <child>
-                                                          <widget class="GtkHBox" 
id="hbox_encoder_user_curves">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">6</property>
-                                                            <child>
-                                                            <widget class="GtkHBox" 
id="hbox_encoder_user_curves_num">
+                                                          <widget class="GtkHBox" 
id="hbox_encoder_user_curves_num">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">2</property>
@@ -13305,67 +13382,60 @@ on current Chronojump version.</property>
                                                             <property name="position">4</property>
                                                             </packing>
                                                             </child>
-                                                            </widget>
-                                                            <packing>
+                                                          </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_encoder_analyze_data_select_curves">
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkButton" 
id="button_encoder_analyze_data_select_curves">
                                                             <property name="label" 
translatable="yes">Select</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
                                                             <signal name="clicked" 
handler="on_button_encoder_analyze_data_select_curves_clicked" swapped="no"/>
-                                                            </widget>
-                                                            <packing>
+                                                          </widget>
+                                                          <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
                                                             <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkHBox" 
id="hbox_encoder_analyze_data_compare">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">6</property>
-                                                            <child>
-                                                            <placeholder/>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">2</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_encoder_analyze_data_compare">
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkButton" 
id="button_encoder_analyze_data_compare">
                                                             <property name="label" 
translatable="yes">Compare to</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">True</property>
                                                             <signal name="clicked" 
handler="on_button_encoder_analyze_data_compare_clicked" swapped="no"/>
-                                                            </widget>
-                                                            <packing>
+                                                          </widget>
+                                                          <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">3</property>
-                                                            </packing>
+                                                            <property name="position">2</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkHBox" 
id="hbox_encoder_analyze_data_compare">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <placeholder/>
                                                             </child>
                                                           </widget>
                                                           <packing>
                                                             <property name="expand">True</property>
                                                             <property name="fill">True</property>
-                                                            <property name="position">1</property>
+                                                            <property name="position">3</property>
                                                           </packing>
                                                         </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">False</property>
                                                         <property name="fill">False</property>
-                                                        <property name="position">1</property>
+                                                        <property name="position">3</property>
                                                       </packing>
                                                     </child>
                                                   </widget>
@@ -13373,7 +13443,6 @@ on current Chronojump version.</property>
                                                     <property name="left_attach">1</property>
                                                     <property name="right_attach">2</property>
                                                     <property name="x_options">GTK_FILL</property>
-                                                    <property name="y_options"/>
                                                   </packing>
                                                 </child>
                                                 <child>
@@ -17419,6 +17488,15 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -17815,6 +17893,15 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -18621,6 +18708,24 @@ by you</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">True</property>
@@ -25232,6 +25337,60 @@ options</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -25899,6 +26058,7 @@ options</property>
                                   <widget class="GtkHBox" id="hbox28">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
+                                    <property name="spacing">8</property>
                                     <child>
                                       <widget class="GtkRadioButton" id="radiobutton_man">
                                         <property name="label" translatable="yes">man</property>
@@ -26199,6 +26359,15 @@ options</property>
                                 <child>
                                   <placeholder/>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                             </child>
                           </widget>
@@ -26654,6 +26823,15 @@ options</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -28414,6 +28592,15 @@ show elevation as:</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -28474,6 +28661,15 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -28549,6 +28745,15 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/images/encoder-analyze-current-signal.png b/images/encoder-analyze-current-signal.png
new file mode 100644
index 0000000..8e0a80b
Binary files /dev/null and b/images/encoder-analyze-current-signal.png differ
diff --git a/images/encoder-analyze-saved-curves.png b/images/encoder-analyze-saved-curves.png
new file mode 100644
index 0000000..ee890b8
Binary files /dev/null and b/images/encoder-analyze-saved-curves.png differ
diff --git a/images/svg/icons.svg b/images/svg/icons.svg
index cce2288..4542470 100644
--- a/images/svg/icons.svg
+++ b/images/svg/icons.svg
@@ -9,11 +9,11 @@
    xmlns="http://www.w3.org/2000/svg";
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
-   width="120"
-   height="100"
+   width="116.77551"
+   height="101.14973"
    id="svg2"
    version="1.1"
-   inkscape:version="0.48.3.1 r9886"
+   inkscape:version="0.48.4 r9939"
    sodipodi:docname="icons.svg"
    inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/together.png"
    inkscape:export-xdpi="90"
@@ -27,21 +27,23 @@
      borderopacity="1.0"
      inkscape:pageopacity="0"
      inkscape:pageshadow="2"
-     inkscape:zoom="8.45"
-     inkscape:cx="60"
-     inkscape:cy="50"
+     inkscape:zoom="5.5462335"
+     inkscape:cx="58.387756"
+     inkscape:cy="51.205922"
      inkscape:document-units="px"
      inkscape:current-layer="capa1"
      showgrid="false"
-     inkscape:window-width="1920"
-     inkscape:window-height="1027"
+     inkscape:window-width="1366"
+     inkscape:window-height="711"
      inkscape:window-x="0"
-     inkscape:window-y="25"
+     inkscape:window-y="27"
      inkscape:window-maximized="1"
      fit-margin-top="0"
      fit-margin-left="0"
      fit-margin-right="0"
-     fit-margin-bottom="0" />
+     fit-margin-bottom="0"
+     showguides="true"
+     inkscape:guide-bbox="true" />
   <metadata
      id="metadata7">
     <rdf:RDF>
@@ -58,48 +60,48 @@
      inkscape:label="Capa 1"
      inkscape:groupmode="layer"
      id="capa1"
-     transform="translate(62.833775,-964.9276)">
+     transform="translate(61.525543,-966.91272)">
     <text
        xml:space="preserve"
        
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
-       x="-61.202568"
-       y="1036.1465"
+       x="-52.289913"
+       y="1015.6473"
        id="text3938"
        sodipodi:linespacing="125%"><tspan
          sodipodi:role="line"
          id="tspan3940"
-         x="-61.202568"
-         y="1036.1465"
+         x="-52.289913"
+         y="1015.6473"
          style="font-size:2px">encoder-analyze-eccon-together.png</tspan></text>
     <text
        xml:space="preserve"
        
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
-       x="-35.709064"
-       y="1038.7015"
+       x="-52.643112"
+       y="1042.9796"
        id="text3938-3"
        sodipodi:linespacing="125%"><tspan
          sodipodi:role="line"
          id="tspan3940-6"
-         x="-35.709064"
-         y="1038.7015"
+         x="-52.643112"
+         y="1042.9796"
          style="font-size:2px">encoder-analyze-eccon-separated.png</tspan></text>
     <text
        xml:space="preserve"
        
style="font-size:5.68163776px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
        x="-18.355436"
-       y="974.2597"
+       y="971.22943"
        id="text3963"
        sodipodi:linespacing="125%"><tspan
          sodipodi:role="line"
          id="tspan3965"
          x="-18.355436"
-         y="974.2597">all 16x16px</tspan></text>
+         y="971.22943">all 16x16px</tspan></text>
     <g
        id="g5297"
        
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-powerbars.png"
        inkscape:export-xdpi="89.989998"
        inkscape:export-ydpi="89.989998"
-       transform="translate(0,0.49890137)">
+       transform="translate(0,-13.226589)">
       <rect
          y="1003.4709"
          x="-58.672874"
@@ -126,7 +128,8 @@
        id="g5334"
        
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-single.png"
        inkscape:export-xdpi="89.989998"
-       inkscape:export-ydpi="89.989998">
+       inkscape:export-ydpi="89.989998"
+       transform="translate(0,-13.72549)">
       <rect
          y="1003.9698"
          x="14.208096"
@@ -155,7 +158,8 @@
        id="g5340"
        
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-nmp.png"
        inkscape:export-xdpi="89.989998"
-       inkscape:export-ydpi="89.989998">
+       inkscape:export-ydpi="89.989998"
+       transform="translate(0,-13.72549)">
       <rect
          y="1003.9698"
          x="39.249966"
@@ -193,67 +197,68 @@
        xml:space="preserve"
        
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
        x="-61.635895"
-       y="991.88202"
+       y="978.15656"
        id="text3938-3-5"
        sodipodi:linespacing="125%"><tspan
          sodipodi:role="line"
          id="tspan3940-6-4"
          x="-61.635895"
-         y="991.88202"
+         y="978.15656"
          style="font-size:2px">encoder-analyze-powerbars.png</tspan></text>
     <text
        xml:space="preserve"
        
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
        x="-42.645142"
-       y="995.52887"
+       y="981.80341"
        id="text3938-3-5-7"
        sodipodi:linespacing="125%"><tspan
          sodipodi:role="line"
          id="tspan3940-6-4-1"
          x="-42.645142"
-         y="995.52887"
+         y="981.80341"
          style="font-size:2px">encoder-analyze-cross.png</tspan></text>
     <text
        xml:space="preserve"
        
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
        x="-17.313906"
-       y="991.88202"
+       y="978.15656"
        id="text3938-3-5-7-5"
        sodipodi:linespacing="125%"><tspan
          sodipodi:role="line"
          id="tspan3940-6-4-1-9"
          x="-17.313906"
-         y="991.88202"
+         y="978.15656"
          style="font-size:2px">encoder-analyze-side.png</tspan></text>
     <text
        xml:space="preserve"
        
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
        x="9.081933"
-       y="995.52887"
+       y="981.80341"
        id="text3938-3-5-7-5-9"
        sodipodi:linespacing="125%"><tspan
          sodipodi:role="line"
          id="tspan3940-6-4-1-9-8"
          x="9.081933"
-         y="995.52887"
+         y="981.80341"
          style="font-size:2px">encoder-analyze-single.png</tspan></text>
     <text
        xml:space="preserve"
        
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
        x="28.738205"
-       y="991.88202"
+       y="978.15656"
        id="text3938-3-5-7-5-9-8"
        sodipodi:linespacing="125%"><tspan
          sodipodi:role="line"
          id="tspan3940-6-4-1-9-8-2"
          x="28.738205"
-         y="991.88202"
+         y="978.15656"
          style="font-size:2px">encoder-analyze-nmp.png</tspan></text>
     <g
        id="g5316"
        
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-side.png"
        inkscape:export-xdpi="89.989998"
-       inkscape:export-ydpi="89.989998">
+       inkscape:export-ydpi="89.989998"
+       transform="translate(0,-13.72549)">
       <rect
          y="1003.9698"
          x="-10.833775"
@@ -340,7 +345,8 @@
        id="g5559"
        
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-cross.png"
        inkscape:export-xdpi="89.989998"
-       inkscape:export-ydpi="89.989998">
+       inkscape:export-ydpi="89.989998"
+       transform="translate(0,-13.72549)">
       <rect
          y="1003.9698"
          x="-35.875648"
@@ -387,7 +393,7 @@
     </g>
     <g
        id="g3934-7"
-       transform="translate(4.7564761,-6.6968162)"
+       transform="translate(3.5087043,-28.265443)"
        
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-eccon-together.png"
        inkscape:export-xdpi="89.989998"
        inkscape:export-ydpi="89.989998">
@@ -410,7 +416,7 @@
        
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-eccon-separated.png"
        inkscape:export-xdpi="90"
        inkscape:export-ydpi="90"
-       transform="translate(6.8501188,-35.288491)">
+       transform="translate(-25.235443,-30.11915)">
       <rect
          y="1077.5193"
          x="-33.288647"
@@ -431,5 +437,144 @@
          d="m -32.538647,1084.354 c 3.738913,-0.2466 1.726774,6.0115 5.217008,5.8952"
          
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
 />
     </g>
+    <rect
+       style="fill:#ffffff;fill-opacity:0;fill-rule:nonzero;stroke:none"
+       id="rect3874-3-6"
+       width="16"
+       height="16"
+       x="16.194752"
+       y="1043.3712" />
+    <g
+       id="g3534"
+       
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-current-signal.png"
+       inkscape:export-xdpi="89.989998"
+       inkscape:export-ydpi="89.989998">
+      <g
+         transform="matrix(0.98482928,0,0,1,12.550989,-35.115823)"
+         id="g3328">
+        <path
+           
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           d="m 28.953238,1076.5652 c -3.4244,-0.1141 -1.398989,-9.8289 -5.7724,-9.4521"
+           id="path3792-5-2-9-0"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cc" />
+        <path
+           
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           d="m 17.908438,1076.5652 c 3.424402,-0.1141 1.398989,-9.8289 5.7724,-9.4521"
+           id="path3792-5-2-9-3"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cc" />
+        <path
+           
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           d="m 17.808289,1076.5652 c -3.424401,-0.1141 -0.797795,-10.8358 -9.870154,-9.7398"
+           id="path3792-5-2-9-0-9"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cc" />
+        <path
+           
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           d="m 29.053388,1076.5652 c 3.424401,-0.1141 0.797795,-10.8358 9.870155,-9.7398"
+           id="path3792-5-2-9-0-9-7"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cc" />
+      </g>
+      <rect
+         y="1028.5402"
+         x="19.626366"
+         height="16"
+         width="32"
+         id="rect2985-8-7-5-4"
+         style="fill:#ffffff;fill-opacity:0;fill-rule:nonzero;stroke:none" />
+    </g>
+    <g
+       id="g3394"
+       transform="translate(-18.253493,-48.977715)"
+       
inkscape:export-filename="/home/xavier/informatica/progs_meus/chronojump/chronojump/images/encoder-analyze-saved-curves.png"
+       inkscape:export-xdpi="89.989998"
+       inkscape:export-ydpi="89.989998">
+      <g
+         transform="translate(31.982074,21.270057)"
+         id="g3334">
+        <g
+           id="g3136-7"
+           transform="translate(8.8977778,14.775596)">
+          <g
+             id="g3119-6">
+            <path
+               
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+               d="m 23.236225,1077.7259 c 3.424401,-0.1141 1.398989,-9.8289 5.7724,-9.4521"
+               id="path3792-5-2-9-2"
+               inkscape:connector-curvature="0"
+               sodipodi:nodetypes="cc" />
+            <path
+               
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+               d="m 23.136076,1077.7259 c -3.424401,-0.1141 -1.398989,-9.8289 -5.7724,-9.4521"
+               id="path3792-5-2-9-0-5"
+               inkscape:connector-curvature="0"
+               sodipodi:nodetypes="cc" />
+          </g>
+        </g>
+        <g
+           id="g3136-9-9"
+           transform="translate(-8.6118289,14.775596)">
+          <g
+             id="g3119-4-7">
+            <path
+               
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+               d="m 23.236225,1077.7259 c 3.424401,-0.1141 1.398989,-9.8289 5.7724,-9.4521"
+               id="path3792-5-2-9-3-3"
+               inkscape:connector-curvature="0"
+               sodipodi:nodetypes="cc" />
+            <path
+               
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+               d="m 23.136076,1077.7259 c -3.424401,-0.1141 -1.398989,-9.8289 -5.7724,-9.4521"
+               id="path3792-5-2-9-0-9-2"
+               inkscape:connector-curvature="0"
+               sodipodi:nodetypes="cc" />
+          </g>
+        </g>
+      </g>
+      <rect
+         y="1101.0402"
+         x="39.311199"
+         height="16"
+         width="32"
+         id="rect2985-8-7-5-4-0"
+         style="fill:#ffffff;fill-opacity:0;fill-rule:nonzero;stroke:none" />
+    </g>
+    <text
+       xml:space="preserve"
+       
style="font-size:5.68163776px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="17.149948"
+       y="1018.4332"
+       id="text3963-7"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3965-7"
+         x="17.149948"
+         y="1018.4332">this 32x16px</tspan></text>
+    <text
+       xml:space="preserve"
+       
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="7.2725787"
+       y="1048.0208"
+       id="text3938-3-0"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3940-6-1"
+         x="7.2725787"
+         y="1048.0208"
+         style="font-size:2px">encoder-analyze-saved-curves.png</tspan></text>
+    <text
+       xml:space="preserve"
+       
style="font-size:10px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="6.4940448"
+       y="1024.1896"
+       id="text3938-3-0-8"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3940-6-1-8"
+         x="6.4940448"
+         y="1024.1896"
+         style="font-size:2px">encoder-analyze-current-signal.png</tspan></text>
   </g>
 </svg>
diff --git a/src/Makefile.am b/src/Makefile.am
index 2939197..fe0a3bc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -265,6 +265,8 @@ RESOURCES = \
        ../images/calendar.png,calendar.png \
        ../images/chronojump-logo-2013_320.png,chronojump-logo-2013_320.png \
        ../images/chronojump-logo-2013.png,chronojump-logo-2013.png \
+       ../images/encoder-analyze-current-signal.png,encoder-analyze-current-signal.png \
+       ../images/encoder-analyze-saved-curves.png,encoder-analyze-saved-curves.png \
        ../images/encoder-analyze-powerbars.png,encoder-analyze-powerbars.png \
        ../images/encoder-analyze-cross.png,encoder-analyze-cross.png \
        ../images/encoder-analyze-side.png,encoder-analyze-side.png \
diff --git a/src/constants.cs b/src/constants.cs
index 3ce02a1..5ad8e59 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -386,6 +386,9 @@ public class Constants
        public static string FileNameContactPlatformModular = "modular_platform_with_chronopic.jpg";
        public static string FileNameInfrared = "infrared.jpg";
        
+       public static string FileNameEncoderAnalyzeCurrentSignalIcon = "encoder-analyze-current-signal.png";
+       public static string FileNameEncoderAnalyzeSavedCurvesIcon = "encoder-analyze-saved-curves.png";
+
        public static string FileNameEncoderAnalyzePowerbarsIcon = "encoder-analyze-powerbars.png";
        public static string FileNameEncoderAnalyzeCrossIcon = "encoder-analyze-cross.png";
        public static string FileNameEncoderAnalyzeSideIcon = "encoder-analyze-side.png";
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index ba2b31d..5165ced 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -781,6 +781,12 @@ public partial class ChronoJumpWindow
                image_encoder_analyze_stats.Pixbuf = pixbuf;
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_delete.png");
                image_encoder_signal_delete.Pixbuf = pixbuf;
+               
+               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
Constants.FileNameEncoderAnalyzeCurrentSignalIcon);
+               image_encoder_analyze_current_signal.Pixbuf = pixbuf;
+               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
Constants.FileNameEncoderAnalyzeSavedCurvesIcon);
+               image_encoder_analyze_saved_curves.Pixbuf = pixbuf;
+
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
Constants.FileNameEncoderAnalyzePowerbarsIcon);
                image_encoder_analyze_powerbars.Pixbuf = pixbuf;
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
Constants.FileNameEncoderAnalyzeCrossIcon);
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index f12c185..ca433b9 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -88,8 +88,6 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Button button_encoder_analyze;
        [Widget] Gtk.Box hbox_encoder_analyze_progress;
        [Widget] Gtk.Button button_encoder_analyze_cancel;
-       [Widget] Gtk.RadioButton radiobutton_encoder_analyze_data_current_signal;
-       [Widget] Gtk.RadioButton radiobutton_encoder_analyze_data_user_curves;
        [Widget] Gtk.Box hbox_encoder_user_curves;
        [Widget] Gtk.Label label_encoder_user_curves_active_num;
        [Widget] Gtk.Label label_encoder_user_curves_all_num;
@@ -101,6 +99,12 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Button button_encoder_analyze_table_save;
        [Widget] Gtk.Button button_encoder_analyze_1RM_save;
 
+       [Widget] Gtk.CheckButton check_encoder_analyze_signal_or_curves;
+       [Widget] Gtk.Image image_encoder_analyze_current_signal;
+       [Widget] Gtk.Image image_encoder_analyze_saved_curves;
+       [Widget] Gtk.Label label_encoder_analyze_current_signal;
+       [Widget] Gtk.Label label_encoder_analyze_saved_curves;
+       
        [Widget] Gtk.RadioButton radiobutton_encoder_analyze_powerbars;
        [Widget] Gtk.RadioButton radiobutton_encoder_analyze_cross;
        [Widget] Gtk.RadioButton radiobutton_encoder_analyze_single;
@@ -635,44 +639,10 @@ public partial class ChronoJumpWindow
 
 
        private string getEncoderAnalysisOptions(bool captureOrAnalyze) {
-               /*
-                * OLD: now only first two rows: "p", and "l","li", ...
-                *
-                * analysisOptions, separated by ';'
-                * 1: "p" or "-". Propulsive or all
-                * 2: "l", "li", "rf" or "ra". Linear, linear inverted, rotatory friction, rotatory axes
-                * 3: "i" or "-". Inertial or not
-                * 4: inertial moment in Kgxcm^2 or "-".
-                * 5: diameter in cm (in GUI. the rest is in meters)
-                *
-                * eg:
-                * p;ra;i;100;4
-                * p;ra;-;-;4
-                * -;li;-;-;-
-                *
-                * TODO: not. 
-                * here only do the "p"
-                *
-                */
-
-
                string analysisOptions = "-";
                if(encoderPropulsive)
                        analysisOptions = "p";
 
-               /*
-               if(checkbutton_encoder_capture_inertial.Active) {
-                       if(captureOrAnalyze || radiobutton_encoder_analyze_data_current_signal.Active) 
-                       {
-                               if(radiobutton_encoder_capture_rotary.Active)
-                                       analysisOptions += ";ri";
-                               else    //(radiobutton_encoder_capture_linear.Active || 
checkbutton_encoder_capture_inverted.Active)
-                                       analysisOptions += ";li";
-                       } else 
-                               analysisOptions += ";-";
-               }
-               */
-
                return analysisOptions;
        }
 
@@ -1236,7 +1206,7 @@ public partial class ChronoJumpWindow
                        //force a recalculate but not save the curve (we are loading)
                        encoderCalculeCurves(encoderActions.LOAD);
                
-                       radiobutton_encoder_analyze_data_current_signal.Active = true;
+                       check_encoder_analyze_signal_or_curves.Active = true;
 
                        encoderButtonsSensitive(encoderSensEnumStored);
                } else 
@@ -1738,7 +1708,8 @@ public partial class ChronoJumpWindow
 
                //if userCurves and no data, return
                //TODO: fix this, because curves should be active except in the single curve mode
-               if(radiobutton_encoder_analyze_data_user_curves.Active) {
+               if( ! check_encoder_analyze_signal_or_curves.Active)    //saved curves
+               {
                        ArrayList data = SqliteEncoder.Select(
                                        false, -1, currentPerson.UniqueID, currentSession.UniqueID, "curve", 
false);
                        if(data.Count == 0) {
@@ -2176,7 +2147,8 @@ public partial class ChronoJumpWindow
                if(sendAnalysis == "powerBars" || sendAnalysis == "single" || sendAnalysis == "side")
                        analysisVariables = getAnalysisVariables(sendAnalysis);
 
-               if(radiobutton_encoder_analyze_data_user_curves.Active) {
+               if( ! check_encoder_analyze_signal_or_curves.Active)    //saved curves
+               {
                        string myEccon = "ec";
                        if(! check_encoder_analyze_eccon_together.Active)
                                myEccon = "ecS";
@@ -2403,7 +2375,7 @@ Log.WriteLine(str);
 
                //show mass in title except if it's curves because then can be different mass
                //string massString = "-(" + Util.ConvertToPoint(findMass(true)) + "Kg)";
-               //if(radiobutton_encoder_analyze_data_user_curves.Active)
+               //if( ! check_encoder_analyze_signal_or_curves.Active)  //saved curves
                //      massString = "";
 
                string titleStr = Util.ChangeSpaceAndMinusForUnderscore(currentPerson.Name);
@@ -2412,70 +2384,80 @@ Log.WriteLine(str);
                        titleStr = "Neuromuscular Profile" + "-" + titleStr;
                else {
                        //on signal show encoder exercise, but not in curves because every curve can be of a 
different exercise
-                       if( ! radiobutton_encoder_analyze_data_user_curves.Active)
+                       if(check_encoder_analyze_signal_or_curves.Active)       //current signal
                                titleStr += "-" + 
Util.ChangeSpaceAndMinusForUnderscore(UtilGtk.ComboGetActive(combo_encoder_exercise));
                }
 
                UtilEncoder.RunEncoderGraph(titleStr, encoderStruct, encoderAnalysis == 
"neuromuscularProfile");
        }
        
-       private void on_radiobutton_encoder_analyze_data_current_signal_toggled (object obj, EventArgs args) {
-               int rows = UtilGtk.CountRows(encoderCaptureListStore);
+       private void on_check_encoder_analyze_signal_or_curves_toggled (object obj, EventArgs args) {
+               bool signal = check_encoder_analyze_signal_or_curves.Active;
 
-               //button_encoder_analyze.Sensitive = encoderTimeStamp != null;
-               
-               bool analyze_sensitive = (rows > 0);
-               if(analyze_sensitive && radiobutton_encoder_analyze_side.Active) {
-                       analyze_sensitive = curvesNumOkToSideCompare();
-                       label_encoder_analyze_side_max.Visible = ! analyze_sensitive;
-               }
-               button_encoder_analyze.Sensitive = analyze_sensitive;
+               if(signal) 
+               {
+                       int rows = UtilGtk.CountRows(encoderCaptureListStore);
+
+                       //button_encoder_analyze.Sensitive = encoderTimeStamp != null;
+
+                       bool analyze_sensitive = (rows > 0);
+                       if(analyze_sensitive && radiobutton_encoder_analyze_side.Active) {
+                               analyze_sensitive = curvesNumOkToSideCompare();
+                               label_encoder_analyze_side_max.Visible = ! analyze_sensitive;
+                       }
+                       button_encoder_analyze.Sensitive = analyze_sensitive;
+
+                       hbox_encoder_user_curves.Visible = false;
 
-               hbox_encoder_user_curves.Sensitive = false;
+                       if(ecconLast != "c")
+                               rows = rows / 2;
+
+                       string [] activeCurvesList;
+                       if(rows == 0)
+                               activeCurvesList = Util.StringToStringArray("");
+                       else {
+                               activeCurvesList = new String[rows];
+                               for(int i=0; i < rows; i++)
+                                       activeCurvesList[i] = (i+1).ToString();
+                       }
 
-               if(ecconLast != "c")
-                       rows = rows / 2;
+                       UtilGtk.ComboUpdate(combo_encoder_analyze_curve_num_combo, activeCurvesList, "");
+                       combo_encoder_analyze_curve_num_combo.Active = 
+                               UtilGtk.ComboMakeActive(combo_encoder_analyze_curve_num_combo, 
activeCurvesList[0]);
 
-               string [] activeCurvesList;
-               if(rows == 0)
-                       activeCurvesList = Util.StringToStringArray("");
+                       radiobutton_encoder_analyze_powerbars.Sensitive = true;
+                       radiobutton_encoder_analyze_single.Sensitive = true;
+                       radiobutton_encoder_analyze_side.Sensitive = true;
+                       update_neuromuscular_profile_sensitiveness();
+               } 
                else {
-                       activeCurvesList = new String[rows];
-                       for(int i=0; i < rows; i++)
-                               activeCurvesList[i] = (i+1).ToString();
-               }
-       
-               UtilGtk.ComboUpdate(combo_encoder_analyze_curve_num_combo, activeCurvesList, "");
-               combo_encoder_analyze_curve_num_combo.Active = 
-                       UtilGtk.ComboMakeActive(combo_encoder_analyze_curve_num_combo, activeCurvesList[0]);
-               
-               radiobutton_encoder_analyze_powerbars.Sensitive = true;
-               radiobutton_encoder_analyze_single.Sensitive = true;
-               radiobutton_encoder_analyze_side.Sensitive = true;
-               update_neuromuscular_profile_sensitiveness();
-       }
-       private void on_radiobutton_encoder_analyze_data_user_curves_toggled (object obj, EventArgs args) {
-               if(currentPerson != null) {
-                       ArrayList data = SqliteEncoder.Select(
-                                       false, -1, currentPerson.UniqueID, currentSession.UniqueID, "curve", 
false);
-                       int activeCurvesNum = getActiveCurvesNum(data);
-                       updateComboEncoderAnalyzeCurveNum(data, activeCurvesNum);       
-               }
-               
-               bool analyze_sensitive = (currentPerson != null && 
-                       UtilGtk.ComboGetActive(combo_encoder_analyze_curve_num_combo) != "");
-               if(analyze_sensitive && radiobutton_encoder_analyze_side.Active) {
-                       analyze_sensitive = curvesNumOkToSideCompare();
-                       label_encoder_analyze_side_max.Visible = ! analyze_sensitive;
+                       if(currentPerson != null) {
+                               ArrayList data = SqliteEncoder.Select(
+                                               false, -1, currentPerson.UniqueID, currentSession.UniqueID, 
"curve", false);
+                               int activeCurvesNum = getActiveCurvesNum(data);
+                               updateComboEncoderAnalyzeCurveNum(data, activeCurvesNum);       
+                       }
+
+                       bool analyze_sensitive = (currentPerson != null && 
+                                       UtilGtk.ComboGetActive(combo_encoder_analyze_curve_num_combo) != "");
+                       if(analyze_sensitive && radiobutton_encoder_analyze_side.Active) {
+                               analyze_sensitive = curvesNumOkToSideCompare();
+                               label_encoder_analyze_side_max.Visible = ! analyze_sensitive;
+                       }
+                       button_encoder_analyze.Sensitive = analyze_sensitive;
+
+                       hbox_encoder_user_curves.Visible = currentPerson != null;
+
+                       radiobutton_encoder_analyze_powerbars.Sensitive = true;
+                       radiobutton_encoder_analyze_single.Sensitive = true;
+                       radiobutton_encoder_analyze_side.Sensitive = true;
+                       update_neuromuscular_profile_sensitiveness();
                }
-               button_encoder_analyze.Sensitive = analyze_sensitive;
-               
-               hbox_encoder_user_curves.Sensitive = currentPerson != null;
-               
-               radiobutton_encoder_analyze_powerbars.Sensitive = true;
-               radiobutton_encoder_analyze_single.Sensitive = true;
-               radiobutton_encoder_analyze_side.Sensitive = true;
-               update_neuromuscular_profile_sensitiveness();
+
+               image_encoder_analyze_current_signal.Visible    = signal;
+               label_encoder_analyze_current_signal.Visible    = signal;
+               image_encoder_analyze_saved_curves.Visible      = ! signal;
+               label_encoder_analyze_saved_curves.Visible      = ! signal;
        }
 
        private string getAnalysisVariables(string encoderAnalysis) 
@@ -2645,7 +2627,7 @@ Log.WriteLine(str);
        
        private void update_neuromuscular_profile_sensitiveness() {
                //neuromuscular only sensitive on signal and ecc/con
-               if(radiobutton_encoder_analyze_data_current_signal.Active &&
+               if(check_encoder_analyze_signal_or_curves.Active &&     //current signal
                                Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_eccon),
                                        encoderEcconTranslation) == Constants.EccentricConcentric
                  )
@@ -2683,13 +2665,13 @@ Log.WriteLine(str);
 
 
        private bool curvesNumOkToSideCompare() {
-               if(radiobutton_encoder_analyze_data_current_signal.Active && 
+               if(check_encoder_analyze_signal_or_curves.Active &&     //current signal
                                (
                                        (ecconLast == "c" && UtilGtk.CountRows(encoderCaptureListStore) <= 
12) ||
                                        (ecconLast != "c" && UtilGtk.CountRows(encoderCaptureListStore) <= 24)
                                ) )
                        return true;
-               else if(radiobutton_encoder_analyze_data_user_curves.Active &&
+               else if( ! check_encoder_analyze_signal_or_curves.Active &&     //saved curves
                                Convert.ToInt32(label_encoder_user_curves_active_num.Text) <= 12)
                        return true;
 
@@ -3259,7 +3241,8 @@ Log.WriteLine(str);
                
                label_encoder_user_curves_all_num.Text = data.Count.ToString();
        
-               if(radiobutton_encoder_analyze_data_current_signal.Active) {
+               if(check_encoder_analyze_signal_or_curves.Active)       //current signal
+               {
                        int rows = UtilGtk.CountRows(encoderCaptureListStore);
                        if(ecconLast != "c")
                                rows = rows / 2;
@@ -3313,8 +3296,8 @@ Log.WriteLine(str);
                //other dependencies
                //c5 True needs 
                //      (signal && treeviewEncoder has rows) || 
-               //      (! radiobutton_encoder_analyze_data_current_signal.Active && user has curves))
-               //c6 True needs radiobutton_encoder_analyze_data_user_curves.Active
+               //      (! check_encoder_analyze_signal_or_curves.Active && user has curves))
+               //c6 True needs ! check_encoder_analyze_signal_or_curves.Active
 
                if(option != encoderSensEnum.PROCESSINGCAPTURE && option != encoderSensEnum.PROCESSINGR)
                        encoderSensEnumStored = option;
@@ -3377,10 +3360,10 @@ Log.WriteLine(str);
                        (
                         Util.IntToBool(table[5]) && 
                         (
-                         (radiobutton_encoder_analyze_data_current_signal.Active && 
+                         (check_encoder_analyze_signal_or_curves.Active &&
                           UtilGtk.CountRows(encoderCaptureListStore) > 0) 
                          ||
-                         (radiobutton_encoder_analyze_data_user_curves.Active && 
+                         ( ! check_encoder_analyze_signal_or_curves.Active &&
                           Convert.ToInt32(label_encoder_user_curves_all_num.Text) >0)
                          )
                         );
@@ -3391,8 +3374,8 @@ Log.WriteLine(str);
                        label_encoder_analyze_side_max.Visible = false;
                button_encoder_analyze.Sensitive = analyze_sensitive;
 
-               hbox_encoder_user_curves.Sensitive = 
-                       (Util.IntToBool(table[6]) && radiobutton_encoder_analyze_data_user_curves.Active);
+               hbox_encoder_user_curves.Visible = 
+                       (Util.IntToBool(table[6]) && ! check_encoder_analyze_signal_or_curves.Active);
                
                button_encoder_capture_cancel.Sensitive = Util.IntToBool(table[7]);
                button_encoder_analyze_cancel.Sensitive = Util.IntToBool(table[7]);
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index cb20156..a4e4f87 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -180,12 +180,12 @@ public partial class ChronoJumpWindow
                ArrayList curvesData = new ArrayList();
                string exerciseName = "";
                double displacedMass = 0; 
-               if(radiobutton_encoder_analyze_data_user_curves.Active) {
-                       curvesData = SqliteEncoder.Select(
-                                       false, -1, currentPerson.UniqueID, currentSession.UniqueID, "curve", 
true);
-               } else {        //current signal
+               if(check_encoder_analyze_signal_or_curves.Active) {     //current signal
                        exerciseName = UtilGtk.ComboGetActive(combo_encoder_exercise);
                        displacedMass = findMass(Constants.MassType.DISPLACED);
+               } else {                                                //user curves
+                       curvesData = SqliteEncoder.Select(
+                                       false, -1, currentPerson.UniqueID, currentSession.UniqueID, "curve", 
true);
                }
 
                string line;
@@ -205,7 +205,7 @@ public partial class ChronoJumpWindow
                                cells = fixDecimals(cells);
                                
                                
-                               if(radiobutton_encoder_analyze_data_user_curves.Active) {
+                               if(! check_encoder_analyze_signal_or_curves.Active) {   //user curves
                                        /*
                                        EncoderSQL eSQL = (EncoderSQL) curvesData[curvesCount];
                                        exerciseName = eSQL.exerciseName;
@@ -512,7 +512,7 @@ public partial class ChronoJumpWindow
        {
                EncoderCurve curve = (EncoderCurve) model.GetValue (iter, 0);
                
-               if(radiobutton_encoder_analyze_data_current_signal.Active && findEccon(false) == "ecS") 
+               if(check_encoder_analyze_signal_or_curves.Active && findEccon(false) == "ecS") 
                {
                        string phase = "e";
                        bool isEven = Util.IsEven(Convert.ToInt32(curve.N));
@@ -522,7 +522,7 @@ public partial class ChronoJumpWindow
                        (cell as Gtk.CellRendererText).Text = 
                                decimal.Truncate((Convert.ToInt32(curve.N) +1) /2).ToString() + phase;
                }
-               else if(radiobutton_encoder_analyze_data_current_signal.Active && findEccon(false) == "ceS") 
+               else if(check_encoder_analyze_signal_or_curves.Active && findEccon(false) == "ceS") 
                {
                        string phase = "c";
                        bool isEven = Util.IsEven(Convert.ToInt32(curve.N));


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