[chronojump] EncoderConfiguration manage 95%. Read TODOs



commit c3a49184bc094d6f61b9d9559f35bfe1d1abcb00
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Jan 8 00:55:25 2017 +0100

    EncoderConfiguration manage 95%. Read TODOs

 chronojump.csproj                  |    3 +-
 glade/encoder_configuration.glade  | 2675 ++++++++++++++++++------------------
 src/Makefile.am                    |    1 +
 src/config.cs                      |   20 -
 src/constants.cs                   |    1 +
 src/encoder.cs                     |   44 +-
 src/gui/chronojump.cs              |    6 +-
 src/gui/encoder.cs                 |   55 +-
 src/gui/encoderConfiguration.cs    |  209 ++--
 src/gui/networks.cs                |   10 +-
 src/sqlite/encoder.cs              |  110 +--
 src/sqlite/encoderConfiguration.cs |  258 ++++
 src/sqlite/main.cs                 |   75 +-
 src/sqlite/preferences.cs          |    5 +-
 14 files changed, 1841 insertions(+), 1631 deletions(-)
---
diff --git a/chronojump.csproj b/chronojump.csproj
index 52efa23..3216ca4 100644
--- a/chronojump.csproj
+++ b/chronojump.csproj
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -922,6 +921,7 @@
     <Compile Include="src\oldCodeNeedToDBConvert\sqlite\session.cs" />
     <Compile Include="src\sqlite\country.cs" />
     <Compile Include="src\sqlite\encoder.cs" />
+    <Compile Include="src\sqlite\encoderConfiguration.cs" />
     <Compile Include="src\sqlite\event.cs" />
     <Compile Include="src\sqlite\executeAuto.cs" />
     <Compile Include="src\sqlite\jump.cs" />
@@ -1000,6 +1000,7 @@
     <Compile Include="src\gui\encoderOverview.cs" />
     <Compile Include="src\threshold.cs" />
     <Compile Include="src\gui\dialogThreshold.cs" />
+    <Compile Include="src\sqlite\encoderConfiguration.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="src\" />
diff --git a/glade/encoder_configuration.glade b/glade/encoder_configuration.glade
index d9c7555..9531520 100644
--- a/glade/encoder_configuration.glade
+++ b/glade/encoder_configuration.glade
@@ -10,506 +10,422 @@
     <property name="type_hint">dialog</property>
     <signal name="delete_event" handler="on_delete_event" swapped="no"/>
     <child>
-      <widget class="GtkVBox" id="vbox1">
+      <widget class="GtkHBox" id="hbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="spacing">12</property>
+        <property name="spacing">15</property>
         <child>
-          <widget class="GtkHBox" id="hbox1">
+          <widget class="GtkVBox" id="vbox_select_encoder">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="spacing">15</property>
+            <property name="spacing">12</property>
             <child>
-              <widget class="GtkVBox" id="vbox_select_encoder">
+              <widget class="GtkHButtonBox" id="hbuttonbox_top">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="spacing">12</property>
+                <property name="layout_style">edge</property>
                 <child>
-                  <widget class="GtkHBox" id="hbox_top">
+                  <widget class="GtkVBox" id="vbox5">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="spacing">20</property>
                     <child>
-                      <widget class="GtkHBox" id="hbox8">
+                      <widget class="GtkImage" id="image_encoder_linear">
+                        <property name="width_request">80</property>
+                        <property name="height_request">80</property>
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="spacing">20</property>
-                        <property name="homogeneous">True</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox5">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <child>
-                              <widget class="GtkImage" id="image_encoder_linear">
-                                <property name="width_request">80</property>
-                                <property name="height_request">80</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="stock">gtk-missing-image</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="radio_linear">
-                                <property name="label" translatable="yes">Linear</property>
-                                <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_radio_encoder_type_linear_toggled" 
swapped="no"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="padding">6</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox6">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <child>
-                              <widget class="GtkImage" id="image_encoder_rotary_friction">
-                                <property name="width_request">80</property>
-                                <property name="height_request">80</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="stock">gtk-missing-image</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="radio_rotary_friction">
-                                <property name="label" translatable="yes">Rotary friction</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">radio_linear</property>
-                                <signal name="toggled" 
handler="on_radio_encoder_type_rotary_friction_toggled" swapped="no"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="padding">6</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox7">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <child>
-                              <widget class="GtkImage" id="image_encoder_rotary_axis">
-                                <property name="width_request">80</property>
-                                <property name="height_request">80</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="stock">gtk-missing-image</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="radio_rotary_axis">
-                                <property name="label" translatable="yes">Rotary axis</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">radio_linear</property>
-                                <signal name="toggled" handler="on_radio_encoder_type_rotary_axis_toggled" 
swapped="no"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="padding">6</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
+                        <property name="stock">gtk-missing-image</property>
                       </widget>
                       <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkVBox" id="vbox10">
+                      <widget class="GtkHBox" id="hbox2">
+                        <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="spacing">10</property>
                         <child>
-                          <widget class="GtkLabel" id="label21">
+                          <widget class="GtkRadioButton" id="radio_linear">
+                            <property name="label" translatable="yes">Linear</property>
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Resistance</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_radio_encoder_type_linear_toggled" 
swapped="no"/>
                           </widget>
                           <packing>
-                            <property name="expand">False</property>
+                            <property name="expand">True</property>
                             <property name="fill">False</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">6</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkVBox" id="vbox6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <widget class="GtkImage" id="image_encoder_rotary_friction">
+                        <property name="width_request">80</property>
+                        <property name="height_request">80</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-missing-image</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="hbox3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
-                          <widget class="GtkRadioButton" id="radio_gravity">
-                            <property name="label" translatable="yes">Gravity</property>
+                          <widget class="GtkRadioButton" id="radio_rotary_friction">
+                            <property name="label" translatable="yes">Rotary friction</property>
                             <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_radio_gravity_toggled" swapped="no"/>
+                            <property name="group">radio_linear</property>
+                            <signal name="toggled" handler="on_radio_encoder_type_rotary_friction_toggled" 
swapped="no"/>
                           </widget>
                           <packing>
-                            <property name="expand">False</property>
+                            <property name="expand">True</property>
                             <property name="fill">False</property>
-                            <property name="position">1</property>
+                            <property name="position">0</property>
                           </packing>
                         </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">6</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkVBox" id="vbox7">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <widget class="GtkImage" id="image_encoder_rotary_axis">
+                        <property name="width_request">80</property>
+                        <property name="height_request">80</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-missing-image</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="hbox4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
-                          <widget class="GtkRadioButton" id="radio_inertia">
-                            <property name="label" translatable="yes">Inertia</property>
+                          <widget class="GtkRadioButton" id="radio_rotary_axis">
+                            <property name="label" translatable="yes">Rotary axis</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">radio_gravity</property>
-                            <signal name="toggled" handler="on_radio_inertia_toggled" swapped="no"/>
+                            <property name="group">radio_linear</property>
+                            <signal name="toggled" handler="on_radio_encoder_type_rotary_axis_toggled" 
swapped="no"/>
                           </widget>
                           <packing>
-                            <property name="expand">False</property>
+                            <property name="expand">True</property>
                             <property name="fill">False</property>
-                            <property name="position">2</property>
+                            <property name="position">0</property>
                           </packing>
                         </child>
                       </widget>
                       <packing>
-                        <property name="expand">True</property>
+                        <property name="expand">False</property>
                         <property name="fill">False</property>
+                        <property name="padding">6</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkVBox" id="vbox9">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <widget class="GtkVBox" id="vbox9">
+                      <widget class="GtkButton" id="button_manage_show">
+                        <property name="height_request">80</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <signal name="clicked" handler="on_button_manage_show_clicked" swapped="no"/>
                         <child>
-                          <widget class="GtkButton" id="button_manage_show">
-                            <property name="height_request">80</property>
+                          <widget class="GtkVBox" id="vbox1">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <signal name="clicked" handler="on_button_manage_show_clicked" swapped="no"/>
+                            <property name="can_focus">False</property>
                             <child>
-                              <widget class="GtkHBox" id="hbox9">
+                              <widget class="GtkLabel" id="label24">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="border_width">4</property>
-                                <property name="spacing">10</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label24">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">Manage</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkImage" id="image4">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="stock">gtk-go-forward</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
+                                <property name="label" translatable="yes">Manage</property>
                               </widget>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkImage" id="image4">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="stock">gtk-go-forward</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
                             </child>
                           </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
                         </child>
                       </widget>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
-                        <property name="position">2</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">0</property>
+                    <property name="position">3</property>
                   </packing>
                 </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">8</property>
                 <child>
-                  <widget class="GtkVBox" id="vbox2">
+                  <widget class="GtkHBox" id="hbox5">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">8</property>
                     <child>
-                      <widget class="GtkHBox" id="hbox4">
+                      <widget class="GtkImage" id="image_encoder_configuration">
+                        <property name="width_request">300</property>
+                        <property name="height_request">200</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="yalign">0</property>
+                        <property name="stock">gtk-missing-image</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVBox" id="vbox3">
+                        <property name="width_request">300</property>
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">8</property>
                         <child>
-                          <widget class="GtkImage" id="image_encoder_configuration">
-                            <property name="width_request">300</property>
-                            <property name="height_request">200</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="yalign">0</property>
-                            <property name="stock">gtk-missing-image</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox3">
-                            <property name="width_request">300</property>
+                          <widget class="GtkHBox" id="hbox6">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="spacing">8</property>
                             <child>
-                              <widget class="GtkHBox" id="hbox2">
+                              <widget class="GtkCheckButton" id="check_rotary_friction_inertia_on_axis">
+                                <property name="label" translatable="yes">Connected to axis</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                                <signal name="toggled" 
handler="on_check_rotary_friction_inertia_on_axis_toggled" swapped="no"/>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox7">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <child>
-                                  <widget class="GtkCheckButton" id="check_rotary_friction_inertia_on_axis">
-                                    <property name="label" translatable="yes">Connected to axis</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="draw_indicator">True</property>
-                                    <signal name="toggled" 
handler="on_check_rotary_friction_inertia_on_axis_toggled" swapped="no"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox3">
+                                  <widget class="GtkHBox" id="hbox11">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
+                                    <property name="spacing">10</property>
                                     <child>
-                                      <widget class="GtkHBox" id="hbox11">
+                                      <widget class="GtkButton" id="button_previous">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="spacing">10</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="xalign">0</property>
+                                        <signal name="clicked" handler="on_button_previous_clicked" 
swapped="no"/>
                                         <child>
-                                          <widget class="GtkButton" id="button_previous">
+                                          <widget class="GtkAlignment" id="alignment2">
                                             <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">False</property>
+                                            <property name="can_focus">False</property>
                                             <property name="xalign">0</property>
-                                            <signal name="clicked" handler="on_button_previous_clicked" 
swapped="no"/>
                                             <child>
-                                              <widget class="GtkAlignment" id="alignment2">
+                                              <widget class="GtkImage" id="image2988">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="xalign">0</property>
-                                                <child>
-                                                  <widget class="GtkImage" id="image2988">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="stock">gtk-media-previous</property>
-                                                    <property name="icon-size">3</property>
-                                                  </widget>
-                                                </child>
+                                                <property name="stock">gtk-media-previous</property>
+                                                <property name="icon-size">3</property>
                                               </widget>
                                             </child>
                                           </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                            <property name="position">0</property>
-                                          </packing>
                                         </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label_count">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="button_next">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="xalign">0</property>
+                                        <signal name="clicked" handler="on_button_next_clicked" 
swapped="no"/>
                                         <child>
-                                          <widget class="GtkLabel" id="label_count">
+                                          <widget class="GtkAlignment" id="alignment4">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="button_next">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">False</property>
                                             <property name="xalign">0</property>
-                                            <signal name="clicked" handler="on_button_next_clicked" 
swapped="no"/>
                                             <child>
-                                              <widget class="GtkAlignment" id="alignment4">
+                                              <widget class="GtkImage" id="image1">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="xalign">0</property>
-                                                <child>
-                                                  <widget class="GtkImage" id="image1">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="stock">gtk-media-next</property>
-                                                    <property name="icon-size">3</property>
-                                                  </widget>
-                                                </child>
+                                                <property name="stock">gtk-media-next</property>
+                                                <property name="icon-size">3</property>
                                               </widget>
                                             </child>
                                           </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                            <property name="position">2</property>
-                                          </packing>
                                         </child>
                                       </widget>
                                       <packing>
-                                        <property name="expand">True</property>
+                                        <property name="expand">False</property>
                                         <property name="fill">False</property>
-                                        <property name="position">0</property>
+                                        <property name="position">2</property>
                                       </packing>
                                     </child>
                                   </widget>
                                   <packing>
                                     <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                               </widget>
                               <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment_options">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="top_padding">8</property>
                             <child>
-                              <widget class="GtkAlignment" id="alignment_options">
+                              <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                                <property name="width_request">250</property>
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="top_padding">8</property>
+                                <property name="can_focus">True</property>
+                                <property name="hscrollbar_policy">automatic</property>
+                                <property name="vscrollbar_policy">automatic</property>
                                 <child>
-                                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                                    <property name="width_request">250</property>
+                                  <widget class="GtkViewport" id="viewport1">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="hscrollbar_policy">automatic</property>
-                                    <property name="vscrollbar_policy">automatic</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="shadow_type">none</property>
                                     <child>
-                                      <widget class="GtkViewport" id="viewport1">
+                                      <widget class="GtkVBox" id="vbox8">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="shadow_type">none</property>
+                                        <property name="spacing">8</property>
                                         <child>
-                                          <widget class="GtkVBox" id="vbox8">
-                                            <property name="visible">True</property>
+                                          <widget class="GtkHBox" id="hbox_d">
                                             <property name="can_focus">False</property>
                                             <property name="spacing">8</property>
                                             <child>
-                                              <widget class="GtkHBox" id="hbox_d">
+                                              <widget class="GtkLabel" id="label2">
+                                                <property name="width_request">20</property>
+                                                <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">8</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label2">
-                                                    <property name="width_request">20</property>
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label">d</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkSpinButton" id="spin_d">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property 
name="primary_icon_activatable">False</property>
-                                                    <property 
name="secondary_icon_activatable">False</property>
-                                                    <property name="primary_icon_sensitive">True</property>
-                                                    <property name="secondary_icon_sensitive">True</property>
-                                                    <property name="adjustment">3.9999999999999996 0.5 80 
0.01 10 0</property>
-                                                    <property name="climb_rate">1</property>
-                                                    <property name="digits">2</property>
-                                                    <property name="snap_to_ticks">True</property>
-                                                    <property name="numeric">True</property>
-                                                    <property name="update_policy">if-valid</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="label6">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="label">cm</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
+                                                <property name="xalign">0</property>
+                                                <property name="label">d</property>
                                               </widget>
                                               <packing>
                                                 <property name="expand">False</property>
@@ -518,36 +434,77 @@
                                               </packing>
                                             </child>
                                             <child>
-                                              <widget class="GtkAlignment" id="alignment1">
+                                              <widget class="GtkSpinButton" id="spin_d">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="invisible_char">●</property>
+                                                <property name="primary_icon_activatable">False</property>
+                                                <property name="secondary_icon_activatable">False</property>
+                                                <property name="primary_icon_sensitive">True</property>
+                                                <property name="secondary_icon_sensitive">True</property>
+                                                <property name="adjustment">3.9999999999999996 0.5 80 0.01 
10 0</property>
+                                                <property name="climb_rate">1</property>
+                                                <property name="digits">2</property>
+                                                <property name="snap_to_ticks">True</property>
+                                                <property name="numeric">True</property>
+                                                <property name="update_policy">if-valid</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="label6">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
+                                                <property name="label">cm</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">2</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkAlignment" id="alignment1">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <child>
+                                              <widget class="GtkVBox" id="vbox_d">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="spacing">10</property>
                                                 <child>
-                                                  <widget class="GtkVBox" id="vbox_d">
+                                                  <widget class="GtkHBox" id="hbox10">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="spacing">10</property>
+                                                    <property name="spacing">8</property>
                                                     <child>
-                                                      <widget class="GtkHBox" id="hbox10">
+                                                      <widget class="GtkLabel" id="label1">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">False</property>
-                                                        <property name="spacing">8</property>
-                                                        <child>
-                                                          <widget class="GtkLabel" id="label1">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Number 
of anchorages</property>
-                                                          </widget>
-                                                          <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                          </packing>
-                                                        </child>
-                                                        <child>
-                                                          <widget class="GtkComboBox" id="combo_d_num">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="items">1
+                                                        <property name="label" translatable="yes">Number of 
anchorages</property>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="expand">False</property>
+                                                        <property name="fill">False</property>
+                                                        <property name="position">0</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <widget class="GtkComboBox" id="combo_d_num">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="items">1
 2
 3
 4
@@ -557,30 +514,7 @@
 8
 9
 10</property>
-                                                            <signal name="changed" 
handler="on_combo_d_num_changed" swapped="no"/>
-                                                          </widget>
-                                                          <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
-                                                          </packing>
-                                                        </child>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="expand">True</property>
-                                                        <property name="fill">True</property>
-                                                        <property name="position">0</property>
-                                                      </packing>
-                                                    </child>
-                                                    <child>
-                                                      <widget class="GtkLabel" id="label22">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">False</property>
-                                                        <property name="tooltip" translatable="yes">Average 
diameter (cm) of the cone or axis where the rope is wrapped on each anchorage.</property>
-                                                        <property name="xalign">0</property>
-                                                        <property name="label" translatable="yes">Average 
diameter (cm) of the cone or axis where the rope is wrapped on each anchorage.</property>
-                                                        <property name="ellipsize">end</property>
-                                                        <property name="max_width_chars">18</property>
+                                                        <signal name="changed" 
handler="on_combo_d_num_changed" swapped="no"/>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">False</property>
@@ -588,70 +522,22 @@
                                                         <property name="position">1</property>
                                                       </packing>
                                                     </child>
-                                                    <child>
-                                                      <widget class="GtkAlignment" id="alignment5">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">False</property>
-                                                        <property name="left_padding">12</property>
-                                                        <child>
-                                                          <widget class="GtkHBox" id="hbox_list_d">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">4</property>
-                                                            <child>
-                                                            <placeholder/>
-                                                            </child>
-                                                          </widget>
-                                                        </child>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="expand">True</property>
-                                                        <property name="fill">True</property>
-                                                        <property name="position">2</property>
-                                                      </packing>
-                                                    </child>
-                                                  </widget>
-                                                </child>
-                                              </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_D">
-                                                <property name="can_focus">False</property>
-                                                <property name="spacing">8</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label3">
-                                                    <property name="width_request">20</property>
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label">D</property>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
+                                                    <property name="expand">True</property>
+                                                    <property name="fill">True</property>
                                                     <property name="position">0</property>
                                                   </packing>
                                                 </child>
                                                 <child>
-                                                  <widget class="GtkSpinButton" id="spin_D">
+                                                  <widget class="GtkLabel" id="label22">
                                                     <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property 
name="primary_icon_activatable">False</property>
-                                                    <property 
name="secondary_icon_activatable">False</property>
-                                                    <property name="primary_icon_sensitive">True</property>
-                                                    <property name="secondary_icon_sensitive">True</property>
-                                                    <property name="adjustment">4 0 80 0.01 10 0</property>
-                                                    <property name="climb_rate">1</property>
-                                                    <property name="digits">2</property>
-                                                    <property name="snap_to_ticks">True</property>
-                                                    <property name="numeric">True</property>
-                                                    <property name="update_policy">if-valid</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="tooltip" translatable="yes">Average 
diameter (cm) of the cone or axis where the rope is wrapped on each anchorage.</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="label" translatable="yes">Average 
diameter (cm) of the cone or axis where the rope is wrapped on each anchorage.</property>
+                                                    <property name="ellipsize">end</property>
+                                                    <property name="max_width_chars">18</property>
                                                   </widget>
                                                   <packing>
                                                     <property name="expand">False</property>
@@ -660,373 +546,437 @@
                                                   </packing>
                                                 </child>
                                                 <child>
-                                                  <widget class="GtkLabel" id="label7">
+                                                  <widget class="GtkAlignment" id="alignment5">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="label">cm</property>
+                                                    <property name="left_padding">12</property>
+                                                    <child>
+                                                      <widget class="GtkHBox" id="hbox_list_d">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="spacing">4</property>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                      </widget>
+                                                    </child>
                                                   </widget>
                                                   <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
+                                                    <property name="expand">True</property>
+                                                    <property name="fill">True</property>
                                                     <property name="position">2</property>
                                                   </packing>
                                                 </child>
                                               </widget>
+                                            </child>
+                                          </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_D">
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">8</property>
+                                            <child>
+                                              <widget class="GtkLabel" id="label3">
+                                                <property name="width_request">20</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="xalign">0</property>
+                                                <property name="label">D</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkSpinButton" id="spin_D">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="invisible_char">●</property>
+                                                <property name="primary_icon_activatable">False</property>
+                                                <property name="secondary_icon_activatable">False</property>
+                                                <property name="primary_icon_sensitive">True</property>
+                                                <property name="secondary_icon_sensitive">True</property>
+                                                <property name="adjustment">4 0 80 0.01 10 0</property>
+                                                <property name="climb_rate">1</property>
+                                                <property name="digits">2</property>
+                                                <property name="snap_to_ticks">True</property>
+                                                <property name="numeric">True</property>
+                                                <property name="update_policy">if-valid</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="label7">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">cm</property>
+                                              </widget>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
                                                 <property name="position">2</property>
                                               </packing>
                                             </child>
+                                          </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_angle_push">
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">8</property>
                                             <child>
-                                              <widget class="GtkHBox" id="hbox_angle_push">
+                                              <widget class="GtkLabel" id="label4">
+                                                <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">8</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label4">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Push 
angle</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkSpinButton" id="spin_angle_push">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property 
name="primary_icon_activatable">False</property>
-                                                    <property 
name="secondary_icon_activatable">False</property>
-                                                    <property name="primary_icon_sensitive">True</property>
-                                                    <property name="secondary_icon_sensitive">True</property>
-                                                    <property name="adjustment">15 0 90 1 10 0</property>
-                                                    <property name="climb_rate">1</property>
-                                                    <property name="snap_to_ticks">True</property>
-                                                    <property name="numeric">True</property>
-                                                    <property name="update_policy">if-valid</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="label8">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="label">º</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
+                                                <property name="xalign">0</property>
+                                                <property name="label" translatable="yes">Push 
angle</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkSpinButton" id="spin_angle_push">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="invisible_char">●</property>
+                                                <property name="primary_icon_activatable">False</property>
+                                                <property name="secondary_icon_activatable">False</property>
+                                                <property name="primary_icon_sensitive">True</property>
+                                                <property name="secondary_icon_sensitive">True</property>
+                                                <property name="adjustment">15 0 90 1 10 0</property>
+                                                <property name="climb_rate">1</property>
+                                                <property name="snap_to_ticks">True</property>
+                                                <property name="numeric">True</property>
+                                                <property name="update_policy">if-valid</property>
                                               </widget>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="position">3</property>
+                                                <property name="position">1</property>
                                               </packing>
                                             </child>
                                             <child>
-                                              <widget class="GtkHBox" id="hbox_angle_weight">
+                                              <widget class="GtkLabel" id="label8">
+                                                <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">8</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label18">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Weight 
angle</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkSpinButton" id="spin_angle_weight">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property 
name="primary_icon_activatable">False</property>
-                                                    <property 
name="secondary_icon_activatable">False</property>
-                                                    <property name="primary_icon_sensitive">True</property>
-                                                    <property name="secondary_icon_sensitive">True</property>
-                                                    <property name="adjustment">90 0 90 1 10 0</property>
-                                                    <property name="climb_rate">1</property>
-                                                    <property name="snap_to_ticks">True</property>
-                                                    <property name="numeric">True</property>
-                                                    <property name="update_policy">if-valid</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="label19">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="label">º</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
+                                                <property name="label">º</property>
                                               </widget>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="position">4</property>
+                                                <property name="position">2</property>
                                               </packing>
                                             </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">3</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox_angle_weight">
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">8</property>
                                             <child>
-                                              <widget class="GtkHBox" id="hbox_inertia">
+                                              <widget class="GtkLabel" id="label18">
+                                                <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label5">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="tooltip" translatable="yes">Inertia 
momentum without extra weight</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Inertia 
M.</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkSpinButton" id="spin_inertia_machine">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="has_tooltip">True</property>
-                                                    <property name="tooltip">Inertia momentum without extra 
weight</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property name="invisible_char_set">True</property>
-                                                    <property 
name="primary_icon_activatable">False</property>
-                                                    <property 
name="secondary_icon_activatable">False</property>
-                                                    <property name="primary_icon_sensitive">True</property>
-                                                    <property name="secondary_icon_sensitive">True</property>
-                                                    <property name="adjustment">30 0 5000 1 10 0</property>
-                                                    <property name="climb_rate">1</property>
-                                                    <property name="snap_to_ticks">True</property>
-                                                    <property name="numeric">True</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="label9">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="label">Kg*cm^2</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
+                                                <property name="xalign">0</property>
+                                                <property name="label" translatable="yes">Weight 
angle</property>
                                               </widget>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="position">5</property>
+                                                <property name="position">0</property>
                                               </packing>
                                             </child>
                                             <child>
-                                              <widget class="GtkHBox" id="hbox_inertia_mass">
+                                              <widget class="GtkSpinButton" id="spin_angle_weight">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="invisible_char">●</property>
+                                                <property name="primary_icon_activatable">False</property>
+                                                <property name="secondary_icon_activatable">False</property>
+                                                <property name="primary_icon_sensitive">True</property>
+                                                <property name="secondary_icon_sensitive">True</property>
+                                                <property name="adjustment">90 0 90 1 10 0</property>
+                                                <property name="climb_rate">1</property>
+                                                <property name="snap_to_ticks">True</property>
+                                                <property name="numeric">True</property>
+                                                <property name="update_policy">if-valid</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="label19">
+                                                <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">4</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label31">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Mass of each 
extra load</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkSpinButton" id="spin_inertia_mass">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="has_tooltip">True</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property name="invisible_char_set">True</property>
-                                                    <property 
name="primary_icon_activatable">False</property>
-                                                    <property 
name="secondary_icon_activatable">False</property>
-                                                    <property name="primary_icon_sensitive">True</property>
-                                                    <property name="secondary_icon_sensitive">True</property>
-                                                    <property name="adjustment">30 0 4000 1 10 0</property>
-                                                    <property name="climb_rate">1</property>
-                                                    <property name="snap_to_ticks">True</property>
-                                                    <property name="numeric">True</property>
-                                                    <property name="update_policy">if-valid</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="label32">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="label">g</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
+                                                <property name="label">º</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">2</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">4</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox_inertia">
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">4</property>
+                                            <child>
+                                              <widget class="GtkLabel" id="label5">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="tooltip" translatable="yes">Inertia momentum 
without extra weight</property>
+                                                <property name="xalign">0</property>
+                                                <property name="label" translatable="yes">Inertia 
M.</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkSpinButton" id="spin_inertia_machine">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="has_tooltip">True</property>
+                                                <property name="tooltip">Inertia momentum without extra 
weight</property>
+                                                <property name="invisible_char">●</property>
+                                                <property name="invisible_char_set">True</property>
+                                                <property name="primary_icon_activatable">False</property>
+                                                <property name="secondary_icon_activatable">False</property>
+                                                <property name="primary_icon_sensitive">True</property>
+                                                <property name="secondary_icon_sensitive">True</property>
+                                                <property name="adjustment">30 0 5000 1 10 0</property>
+                                                <property name="climb_rate">1</property>
+                                                <property name="snap_to_ticks">True</property>
+                                                <property name="numeric">True</property>
                                               </widget>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="position">6</property>
+                                                <property name="position">1</property>
                                               </packing>
                                             </child>
                                             <child>
-                                              <widget class="GtkHBox" id="hbox_inertia_length">
+                                              <widget class="GtkLabel" id="label9">
+                                                <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="tooltip" translatable="yes">Distance from 
the center of the axis
+                                                <property name="label">Kg*cm^2</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">2</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">5</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox_inertia_mass">
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">4</property>
+                                            <child>
+                                              <widget class="GtkLabel" id="label31">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="xalign">0</property>
+                                                <property name="label" translatable="yes">Mass of each extra 
load</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkSpinButton" id="spin_inertia_mass">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="has_tooltip">True</property>
+                                                <property name="invisible_char">●</property>
+                                                <property name="invisible_char_set">True</property>
+                                                <property name="primary_icon_activatable">False</property>
+                                                <property name="secondary_icon_activatable">False</property>
+                                                <property name="primary_icon_sensitive">True</property>
+                                                <property name="secondary_icon_sensitive">True</property>
+                                                <property name="adjustment">30 0 4000 1 10 0</property>
+                                                <property name="climb_rate">1</property>
+                                                <property name="snap_to_ticks">True</property>
+                                                <property name="numeric">True</property>
+                                                <property name="update_policy">if-valid</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="label32">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">g</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">2</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">6</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox_inertia_length">
+                                            <property name="can_focus">False</property>
+                                            <property name="tooltip" translatable="yes">Distance from the 
center of the axis
 to the center of the loads.</property>
-                                                <property name="spacing">4</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label20">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Distance: 
center-loads</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkSpinButton" id="spin_inertia_length">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="has_tooltip">True</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property 
name="primary_icon_activatable">False</property>
-                                                    <property 
name="secondary_icon_activatable">False</property>
-                                                    <property name="primary_icon_sensitive">True</property>
-                                                    <property name="secondary_icon_sensitive">True</property>
-                                                    <property name="adjustment">15 1 200 0.10000000000000001 
10 0</property>
-                                                    <property name="climb_rate">1</property>
-                                                    <property name="digits">1</property>
-                                                    <property name="snap_to_ticks">True</property>
-                                                    <property name="numeric">True</property>
-                                                    <property name="update_policy">if-valid</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="label29">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="label">cm</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
+                                            <property name="spacing">4</property>
+                                            <child>
+                                              <widget class="GtkLabel" id="label20">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="xalign">0</property>
+                                                <property name="label" translatable="yes">Distance: 
center-loads</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkSpinButton" id="spin_inertia_length">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="has_tooltip">True</property>
+                                                <property name="invisible_char">●</property>
+                                                <property name="primary_icon_activatable">False</property>
+                                                <property name="secondary_icon_activatable">False</property>
+                                                <property name="primary_icon_sensitive">True</property>
+                                                <property name="secondary_icon_sensitive">True</property>
+                                                <property name="adjustment">15 1 200 0.10000000000000001 10 
0</property>
+                                                <property name="climb_rate">1</property>
+                                                <property name="digits">1</property>
+                                                <property name="snap_to_ticks">True</property>
+                                                <property name="numeric">True</property>
+                                                <property name="update_policy">if-valid</property>
                                               </widget>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="position">7</property>
+                                                <property name="position">1</property>
                                               </packing>
                                             </child>
                                             <child>
-                                              <widget class="GtkHBox" id="hbox_gearedUp">
+                                              <widget class="GtkLabel" id="label29">
+                                                <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="spacing">8</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label23">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="tooltip" translatable="yes">Machine 
speed / Person speed ratio.
+                                                <property name="label">cm</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">2</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">7</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox_gearedUp">
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">8</property>
+                                            <child>
+                                              <widget class="GtkLabel" id="label23">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="tooltip" translatable="yes">Machine speed / 
Person speed ratio.
 Eg. value = 2, means person does twice force at half speed.</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Force 
multiplier</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkComboBox" id="combo_gearedUp">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="items">4
+                                                <property name="xalign">0</property>
+                                                <property name="label" translatable="yes">Force 
multiplier</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkComboBox" id="combo_gearedUp">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="items">4
 3
 2
 1/2
 1/3
 1/4</property>
-                                                  </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">8</property>
+                                                <property name="position">1</property>
                                               </packing>
                                             </child>
                                           </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">8</property>
+                                          </packing>
                                         </child>
                                       </widget>
                                     </child>
                                   </widget>
                                 </child>
                               </widget>
-                              <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
                             </child>
                           </widget>
                           <packing>
@@ -1039,365 +989,366 @@ Eg. value = 2, means person does twice force at half speed.</property>
                       <packing>
                         <property name="expand">True</property>
                         <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="hbox8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">8</property>
+                    <child>
+                      <widget class="GtkTextView" id="textview">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">False</property>
+                        <property name="editable">False</property>
+                        <property name="wrap_mode">word</property>
+                        <property name="cursor_visible">False</property>
+                        <property name="accepts_tab">False</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkHBox" id="hbox7">
+                      <widget class="GtkVBox" id="vbox_inertia_calcule">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">8</property>
                         <child>
-                          <widget class="GtkTextView" id="textview">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">False</property>
-                            <property name="editable">False</property>
-                            <property name="wrap_mode">word</property>
-                            <property name="cursor_visible">False</property>
-                            <property name="accepts_tab">False</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox_inertia_calcule">
+                          <widget class="GtkButton" id="button_encoder_capture_inertial_show">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">8</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="has_tooltip">True</property>
+                            <property name="tooltip" translatable="yes">Calcule inertial momentum</property>
+                            <signal name="clicked" handler="on_button_encoder_capture_inertial_show_clicked" 
swapped="no"/>
                             <child>
-                              <widget class="GtkButton" id="button_encoder_capture_inertial_show">
+                              <widget class="GtkHBox" id="hbox12">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="has_tooltip">True</property>
-                                <property name="tooltip" translatable="yes">Calcule inertial 
momentum</property>
-                                <signal name="clicked" 
handler="on_button_encoder_capture_inertial_show_clicked" swapped="no"/>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">10</property>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox5">
+                                  <widget class="GtkLabel" id="label14">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="spacing">10</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="label14">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">Calcule IM</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">True</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkImage" id="image2">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="stock">gtk-go-forward</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">True</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
+                                    <property name="label" translatable="yes">Calcule IM</property>
                                   </widget>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkImage" id="image2">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="stock">gtk-go-forward</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
                                 </child>
                               </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkButton" id="button_encoder_capture_inertial_accuracy">
-                                <property name="label" translatable="yes">Accuracy</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_capture_inertial_accuracy_clicked" swapped="no"/>
-                              </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">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="button_encoder_capture_inertial_accuracy">
+                            <property name="label" translatable="yes">Accuracy</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_capture_inertial_accuracy_clicked" swapped="no"/>
+                          </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">True</property>
+                        <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                   </widget>
                   <packing>
-                    <property name="expand">True</property>
+                    <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="padding">8</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
+              </widget>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">8</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkHButtonBox" id="hbuttonbox1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="layout_style">spread</property>
                 <child>
-                  <widget class="GtkHButtonBox" id="hbuttonbox1">
+                  <widget class="GtkButton" id="button_cancel">
+                    <property name="label">gtk-cancel</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="layout_style">spread</property>
-                    <child>
-                      <widget class="GtkButton" id="button_cancel">
-                        <property name="label">gtk-cancel</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="clicked" handler="on_button_cancel_clicked" swapped="no"/>
-                        <accelerator key="Escape" signal="clicked"/>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="button_accept">
-                        <property name="label">gtk-ok</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_stock">True</property>
-                        <signal name="clicked" handler="on_button_accept_clicked" swapped="no"/>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="pack_type">end</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                    <signal name="clicked" handler="on_button_cancel_clicked" swapped="no"/>
+                    <accelerator key="Escape" signal="clicked"/>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="button_accept">
+                    <property name="label">gtk-ok</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_stock">True</property>
+                    <signal name="clicked" handler="on_button_accept_clicked" swapped="no"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="pack_type">end</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="button_close">
+                    <property name="label">gtk-close</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                    <signal name="clicked" handler="on_button_close_clicked" swapped="no"/>
+                    <accelerator key="Escape" signal="clicked"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
               </widget>
               <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVSeparator" id="vseparator">
-                <property name="can_focus">False</property>
-              </widget>
-              <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="pack_type">end</property>
+                <property name="position">2</property>
               </packing>
             </child>
+          </widget>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkNotebook" id="notebook_side">
+            <property name="can_focus">True</property>
+            <property name="show_tabs">False</property>
             <child>
-              <widget class="GtkNotebook" id="notebook_side">
-                <property name="can_focus">True</property>
-                <property name="show_tabs">False</property>
+              <widget class="GtkVBox" id="vbox12">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">12</property>
                 <child>
-                  <widget class="GtkVBox" id="vbox12">
+                  <widget class="GtkFrame" id="frame2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="label_xalign">0</property>
+                    <property name="label_yalign">0.69999998807907104</property>
+                    <property name="shadow_type">out</property>
                     <child>
-                      <widget class="GtkFrame" id="frame2">
+                      <widget class="GtkHButtonBox" id="hbuttonbox3">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label_xalign">0</property>
-                        <property name="label_yalign">0.69999998807907104</property>
-                        <property name="shadow_type">out</property>
+                        <property name="border_width">8</property>
                         <child>
-                          <widget class="GtkHButtonBox" id="hbuttonbox3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="border_width">8</property>
-                            <child>
-                              <widget class="GtkButton" id="button_import">
-                                <property name="label" translatable="yes">Import</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <signal name="clicked" handler="on_button_import_clicked" swapped="no"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label27">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                          <widget class="GtkButton" id="button_import">
                             <property name="label" translatable="yes">Import</property>
-                            <property name="use_markup">True</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <signal name="clicked" handler="on_button_import_clicked" swapped="no"/>
                           </widget>
                           <packing>
-                            <property name="type">label_item</property>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
                           </packing>
                         </child>
                       </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label27">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Import</property>
+                        <property name="use_markup">True</property>
+                      </widget>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
+                        <property name="type">label_item</property>
                       </packing>
                     </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkAlignment" id="alignment6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <widget class="GtkAlignment" id="alignment6">
+                      <widget class="GtkVBox" id="vbox11">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="top_padding">10</property>
-                        <property name="bottom_padding">5</property>
+                        <property name="spacing">2</property>
                         <child>
-                          <widget class="GtkVBox" id="vbox11">
+                          <widget class="GtkLabel" id="label33">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="spacing">2</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Select</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="scr_treeview_select">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="shadow_type">in</property>
                             <child>
-                              <widget class="GtkLabel" id="label33">
+                              <widget class="GtkTreeView" id="treeview_select">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">Select</property>
+                                <property name="can_focus">True</property>
                               </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
                             </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox13">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
-                              <widget class="GtkScrolledWindow" id="scr_treeview_select">
+                              <widget class="GtkButton" id="button_delete">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="shadow_type">in</property>
+                                <property name="receives_default">True</property>
+                                <signal name="clicked" handler="on_button_delete_clicked" swapped="no"/>
                                 <child>
-                                  <widget class="GtkTreeView" id="treeview_select">
+                                  <widget class="GtkImage" id="image_delete">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="stock">gtk-missing-image</property>
+                                    <property name="icon-size">2</property>
                                   </widget>
                                 </child>
                               </widget>
                               <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="pack_type">end</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkHBox" id="hbox12">
+                              <widget class="GtkButton" id="button_duplicate">
+                                <property name="label" translatable="yes">Duplicate</property>
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <child>
-                                  <widget class="GtkButton" id="button_delete">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <signal name="clicked" handler="on_button_delete_clicked" swapped="no"/>
-                                    <child>
-                                      <widget class="GtkImage" id="image_delete">
-                                        <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>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="pack_type">end</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <signal name="clicked" handler="on_button_duplicate_clicked" swapped="no"/>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
-                                <property name="position">2</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
                           </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
                         </child>
                       </widget>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label_xalign">0</property>
+                    <property name="label_yalign">0.69999998807907104</property>
+                    <property name="shadow_type">out</property>
                     <child>
-                      <widget class="GtkFrame" id="frame1">
+                      <widget class="GtkVBox" id="vbox13">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label_xalign">0</property>
-                        <property name="label_yalign">0.69999998807907104</property>
-                        <property name="shadow_type">out</property>
+                        <property name="border_width">8</property>
+                        <property name="spacing">8</property>
                         <child>
-                          <widget class="GtkVBox" id="vbox13">
+                          <widget class="GtkVBox" id="vbox14">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="border_width">8</property>
-                            <property name="spacing">8</property>
+                            <property name="spacing">2</property>
                             <child>
-                              <widget class="GtkVBox" id="vbox14">
+                              <widget class="GtkLabel" id="label35">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="spacing">2</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label35">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Name</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="entry_save_name">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="invisible_char">●</property>
-                                    <property name="primary_icon_activatable">False</property>
-                                    <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
-                                    <signal name="changed" handler="on_entry_save_name_changed" 
swapped="no"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Name</property>
                               </widget>
                               <packing>
                                 <property name="expand">True</property>
@@ -1406,41 +1357,15 @@ Eg. value = 2, means person does twice force at half speed.</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkVBox" id="vbox15">
+                              <widget class="GtkEntry" id="entry_save_name">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">2</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label36">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Description</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="entry_save_description">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="invisible_char">●</property>
-                                    <property name="invisible_char_set">True</property>
-                                    <property name="primary_icon_activatable">False</property>
-                                    <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
-                                    <signal name="changed" handler="on_entry_save_description_changed" 
swapped="no"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">●</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <signal name="changed" handler="on_entry_save_name_changed" swapped="no"/>
                               </widget>
                               <packing>
                                 <property name="expand">True</property>
@@ -1448,461 +1373,499 @@ Eg. value = 2, means person does twice force at half speed.</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkVBox" id="vbox15">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">2</property>
                             <child>
-                              <widget class="GtkHButtonBox" id="hbuttonbox2">
+                              <widget class="GtkLabel" id="label36">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="spacing">20</property>
-                                <child>
-                                  <widget class="GtkButton" id="button_save">
-                                    <property name="label" translatable="yes">Save</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <signal name="clicked" handler="on_button_save_clicked" swapped="no"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Description</property>
                               </widget>
                               <packing>
                                 <property name="expand">True</property>
                                 <property name="fill">True</property>
-                                <property name="position">2</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkEntry" id="entry_save_description">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">●</property>
+                                <property name="invisible_char_set">True</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <signal name="changed" handler="on_entry_save_description_changed" 
swapped="no"/>
+                              </widget>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
                           </widget>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
                         </child>
                         <child>
-                          <widget class="GtkLabel" id="label34">
+                          <widget class="GtkHButtonBox" id="hbuttonbox2">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">Save</property>
-                            <property name="use_markup">True</property>
+                            <property name="spacing">20</property>
+                            <child>
+                              <widget class="GtkButton" id="button_save">
+                                <property name="label" translatable="yes">Save</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <signal name="clicked" handler="on_button_save_clicked" swapped="no"/>
+                              </widget>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
                           </widget>
                           <packing>
-                            <property name="type">label_item</property>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
                           </packing>
                         </child>
                       </widget>
+                    </child>
+                    <child>
+                      <placeholder/>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">2</property>
+                        <property name="type">label_item</property>
                       </packing>
                     </child>
                   </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label25">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label">page 1</property>
+              </widget>
+              <packing>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox_calcule_im">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">8</property>
+                <child>
+                  <widget class="GtkLabel" id="label15">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Calcule IM</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label25">
+                  <widget class="GtkImage" id="image_encoder_calcule_im">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="label">page 1</property>
+                    <property name="stock">gtk-missing-image</property>
                   </widget>
                   <packing>
-                    <property name="tab_fill">False</property>
-                    <property name="type">tab</property>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkVBox" id="vbox_calcule_im">
+                  <widget class="GtkTextView" id="textview_calcule_im">
+                    <property name="width_request">180</property>
                     <property name="visible">True</property>
+                    <property name="sensitive">False</property>
                     <property name="can_focus">False</property>
-                    <property name="spacing">8</property>
+                    <property name="editable">False</property>
+                    <property name="wrap_mode">word</property>
+                    <property name="cursor_visible">False</property>
+                    <property name="accepts_tab">False</property>
+                    <property name="text">Put a weight near the top and "sided". Record pendulum movement 
with encoder.</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkTable" id="table1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">3</property>
+                    <property name="column_spacing">6</property>
+                    <property name="row_spacing">6</property>
                     <child>
-                      <widget class="GtkLabel" id="label15">
+                      <widget class="GtkLabel" id="label10">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Calcule IM</property>
+                        <property name="xalign">0</property>
+                        <property name="label">Weight</property>
                       </widget>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
+                        <property name="x_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkImage" id="image_encoder_calcule_im">
+                      <widget class="GtkLabel" id="label12">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="stock">gtk-missing-image</property>
+                        <property name="xalign">0</property>
+                        <property name="label">Distance</property>
                       </widget>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkTextView" id="textview_calcule_im">
-                        <property name="width_request">180</property>
+                      <widget class="GtkLabel" id="label16">
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label">Duration</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkSpinButton" id="spin_im_weight_calcule">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">●</property>
+                        <property name="primary_icon_activatable">False</property>
+                        <property name="secondary_icon_activatable">False</property>
+                        <property name="primary_icon_sensitive">True</property>
+                        <property name="secondary_icon_sensitive">True</property>
+                        <property name="adjustment">30 10 4000 1 10 0</property>
+                        <property name="climb_rate">1</property>
+                        <property name="snap_to_ticks">True</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkSpinButton" id="spin_im_length_calcule">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">●</property>
+                        <property name="primary_icon_activatable">False</property>
+                        <property name="secondary_icon_activatable">False</property>
+                        <property name="primary_icon_sensitive">True</property>
+                        <property name="secondary_icon_sensitive">True</property>
+                        <property name="adjustment">15 1 200 0.10000000000000001 10 0</property>
+                        <property name="climb_rate">1</property>
+                        <property name="digits">1</property>
+                        <property name="snap_to_ticks">True</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkSpinButton" id="spin_im_duration_calcule">
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">●</property>
+                        <property name="primary_icon_activatable">False</property>
+                        <property name="secondary_icon_activatable">False</property>
+                        <property name="primary_icon_sensitive">True</property>
+                        <property name="secondary_icon_sensitive">True</property>
+                        <property name="adjustment">20 1 100 1 10 0</property>
+                        <property name="climb_rate">1</property>
+                        <property name="snap_to_ticks">True</property>
+                        <property name="numeric">True</property>
+                        <property name="update_policy">if-valid</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label11">
                         <property name="visible">True</property>
-                        <property name="sensitive">False</property>
                         <property name="can_focus">False</property>
-                        <property name="editable">False</property>
-                        <property name="wrap_mode">word</property>
-                        <property name="cursor_visible">False</property>
-                        <property name="accepts_tab">False</property>
-                        <property name="text">Put a weight near the top and "sided". Record pendulum 
movement with encoder.</property>
+                        <property name="tooltip" translatable="yes">grams</property>
+                        <property name="xalign">0</property>
+                        <property name="label">g</property>
                       </widget>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">2</property>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkTable" id="table1">
+                      <widget class="GtkLabel" id="label13">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="n_rows">3</property>
-                        <property name="n_columns">3</property>
-                        <property name="column_spacing">6</property>
-                        <property name="row_spacing">6</property>
-                        <child>
-                          <widget class="GtkLabel" id="label10">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label">Weight</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label12">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label">Distance</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label16">
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label">Duration</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkSpinButton" id="spin_im_weight_calcule">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">●</property>
-                            <property name="primary_icon_activatable">False</property>
-                            <property name="secondary_icon_activatable">False</property>
-                            <property name="primary_icon_sensitive">True</property>
-                            <property name="secondary_icon_sensitive">True</property>
-                            <property name="adjustment">30 10 4000 1 10 0</property>
-                            <property name="climb_rate">1</property>
-                            <property name="snap_to_ticks">True</property>
-                            <property name="numeric">True</property>
-                            <property name="update_policy">if-valid</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkSpinButton" id="spin_im_length_calcule">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">●</property>
-                            <property name="primary_icon_activatable">False</property>
-                            <property name="secondary_icon_activatable">False</property>
-                            <property name="primary_icon_sensitive">True</property>
-                            <property name="secondary_icon_sensitive">True</property>
-                            <property name="adjustment">15 1 200 0.10000000000000001 10 0</property>
-                            <property name="climb_rate">1</property>
-                            <property name="digits">1</property>
-                            <property name="snap_to_ticks">True</property>
-                            <property name="numeric">True</property>
-                            <property name="update_policy">if-valid</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkSpinButton" id="spin_im_duration_calcule">
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">●</property>
-                            <property name="primary_icon_activatable">False</property>
-                            <property name="secondary_icon_activatable">False</property>
-                            <property name="primary_icon_sensitive">True</property>
-                            <property name="secondary_icon_sensitive">True</property>
-                            <property name="adjustment">20 1 100 1 10 0</property>
-                            <property name="climb_rate">1</property>
-                            <property name="snap_to_ticks">True</property>
-                            <property name="numeric">True</property>
-                            <property name="update_policy">if-valid</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label11">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="tooltip" translatable="yes">grams</property>
-                            <property name="xalign">0</property>
-                            <property name="label">g</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label13">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="tooltip" translatable="yes">grams</property>
-                            <property name="xalign">0</property>
-                            <property name="label">cm</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label17">
-                            <property name="can_focus">False</property>
-                            <property name="tooltip" translatable="yes">grams</property>
-                            <property name="xalign">0</property>
-                            <property name="label">s</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
+                        <property name="tooltip" translatable="yes">grams</property>
+                        <property name="xalign">0</property>
+                        <property name="label">cm</property>
                       </widget>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkVBox" id="vbox4">
+                      <widget class="GtkLabel" id="label17">
+                        <property name="can_focus">False</property>
+                        <property name="tooltip" translatable="yes">grams</property>
+                        <property name="xalign">0</property>
+                        <property name="label">s</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkVBox" id="vbox4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <widget class="GtkHBox" id="hbox14">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">6</property>
                         <child>
-                          <widget class="GtkHBox" id="hbox6">
+                          <widget class="GtkButton" id="button_encoder_capture_inertial_do">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="has_tooltip">True</property>
+                            <signal name="clicked" handler="on_button_encoder_capture_inertial_do_clicked" 
swapped="no"/>
                             <child>
-                              <widget class="GtkButton" id="button_encoder_capture_inertial_do">
+                              <widget class="GtkHBox" id="hbox85">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="has_tooltip">True</property>
-                                <signal name="clicked" 
handler="on_button_encoder_capture_inertial_do_clicked" swapped="no"/>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox85">
+                                  <widget class="GtkImage" id="image10">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="spacing">6</property>
-                                    <child>
-                                      <widget class="GtkImage" id="image10">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="stock">gtk-apply</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label_button_encoder_capture_inertial_do">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">Capture</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">True</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
+                                    <property name="stock">gtk-apply</property>
                                   </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
                                 </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkButton" id="button_encoder_capture_inertial_cancel">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="has_tooltip">True</property>
-                                <signal name="clicked" 
handler="on_button_encoder_capture_inertial_cancel_clicked" swapped="no"/>
                                 <child>
-                                  <widget class="GtkImage" id="image3">
+                                  <widget class="GtkLabel" id="label_button_encoder_capture_inertial_do">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="stock">gtk-cancel</property>
+                                    <property name="label" translatable="yes">Capture</property>
                                   </widget>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
                                 </child>
                               </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
                             </child>
                           </widget>
                           <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkTable" id="table_im_machine_result">
-                            <property name="can_focus">False</property>
-                            <property name="n_columns">3</property>
-                            <property name="column_spacing">6</property>
-                            <property name="row_spacing">6</property>
-                            <child>
-                              <widget class="GtkLabel" id="label28">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="tooltip" translatable="yes">Number of weights</property>
-                                <property name="xalign">0</property>
-                                <property name="label">IM machine</property>
-                              </widget>
-                              <packing>
-                                <property name="x_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label30">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="tooltip" translatable="yes">Number of weights</property>
-                                <property name="xalign">0</property>
-                                <property name="label">Kg*cm^2</property>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">2</property>
-                                <property name="right_attach">3</property>
-                                <property name="x_options">GTK_FILL</property>
-                              </packing>
-                            </child>
+                          <widget class="GtkButton" id="button_encoder_capture_inertial_cancel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="has_tooltip">True</property>
+                            <signal name="clicked" 
handler="on_button_encoder_capture_inertial_cancel_clicked" swapped="no"/>
                             <child>
-                              <widget class="GtkLabel" id="label_im_result_disc">
+                              <widget class="GtkImage" id="image3">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
+                                <property name="stock">gtk-cancel</property>
                               </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                              </packing>
                             </child>
                           </widget>
                           <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
+                            <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">4</property>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment3">
-                        <property name="visible">True</property>
+                      <widget class="GtkTable" id="table_im_machine_result">
                         <property name="can_focus">False</property>
-                        <property name="top_padding">12</property>
+                        <property name="n_columns">3</property>
+                        <property name="column_spacing">6</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <widget class="GtkLabel" id="label28">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="tooltip" translatable="yes">Number of weights</property>
+                            <property name="xalign">0</property>
+                            <property name="label">IM machine</property>
+                          </widget>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
                         <child>
-                          <widget class="GtkLabel" id="label_im_feedback">
+                          <widget class="GtkLabel" id="label30">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
+                            <property name="tooltip" translatable="yes">Number of weights</property>
+                            <property name="xalign">0</property>
+                            <property name="label">Kg*cm^2</property>
                           </widget>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label_im_result_disc">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
                         </child>
                       </widget>
                       <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">5</property>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
                   </widget>
                   <packing>
-                    <property name="position">1</property>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label26">
+                  <widget class="GtkAlignment" id="alignment3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="label">page 2</property>
+                    <property name="top_padding">12</property>
+                    <child>
+                      <widget class="GtkLabel" id="label_im_feedback">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </widget>
+                    </child>
                   </widget>
                   <packing>
-                    <property name="position">1</property>
-                    <property name="tab_fill">False</property>
-                    <property name="type">tab</property>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">5</property>
                   </packing>
                 </child>
               </widget>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label26">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label">page 2</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
               </packing>
             </child>
           </widget>
           <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </widget>
diff --git a/src/Makefile.am b/src/Makefile.am
index 99be950..468068c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -96,6 +96,7 @@ SOURCES = \
        sqlite/preferences.cs\
        sqlite/session.cs\
        sqlite/encoder.cs\
+       sqlite/encoderConfiguration.cs\
        sqlite/executeAuto.cs\
        sqlite/jump.cs\
        sqlite/jumpRj.cs\
diff --git a/src/config.cs b/src/config.cs
index 9539137..75a8ee9 100644
--- a/src/config.cs
+++ b/src/config.cs
@@ -38,7 +38,6 @@ public class Config
                                                        //because treeview will be in 2n page of notebook
        public bool PersonWinHide;
        public bool EncoderAnalyzeHide;
-       public EncoderConfiguration Econf;
        public SessionModeEnum SessionMode;
        public string RunScriptOnExit;
 
@@ -60,7 +59,6 @@ public class Config
                EncoderUpdateTreeViewWhileCapturing = true;
                PersonWinHide = false;
                EncoderAnalyzeHide = false;
-               Econf = null; 
                SessionMode = SessionModeEnum.STANDARD;
                RunScriptOnExit = "";
        }
@@ -105,19 +103,6 @@ public class Config
                                                PersonWinHide = true;
                                        else if(parts[0] == "EncoderAnalyzeHide" && 
Util.StringToBool(parts[1]))
                                                EncoderAnalyzeHide = true;
-                                       else if(parts[0] == "EncoderConfiguration")
-                                       {
-                                               string [] ecFull = parts[1].Split(new char[] {':'});
-                                               
if(Enum.IsDefined(typeof(Constants.EncoderConfigurationNames), ecFull[0])) 
-                                               { 
-                                                       //create object
-                                                       Econf = new EncoderConfiguration(
-                                                                       (Constants.EncoderConfigurationNames) 
-                                                                       
Enum.Parse(typeof(Constants.EncoderConfigurationNames), ecFull[0]) );
-                                                       //assign the rest of params
-                                                       Econf.ReadParamsFromSQL(ecFull);
-                                               }
-                                       }
                                        else if(parts[0] == "SessionMode" && 
Enum.IsDefined(typeof(SessionModeEnum), parts[1]))
                                                SessionMode = (SessionModeEnum) 
                                                        Enum.Parse(typeof(SessionModeEnum), parts[1]);
@@ -173,10 +158,6 @@ public class Config
 
        public override string ToString() 
        {
-               string econfStr = "";
-               if(Econf != null)
-                       econfStr = Econf.ToStringPretty();
-
                return(
                                "Maximized = " + Maximized.ToString() + "\n" +
                                "CustomButtons = " + CustomButtons.ToString() + "\n" +
@@ -188,7 +169,6 @@ public class Config
                                "EncoderUpdateTreeViewWhileCapturing = " + 
EncoderUpdateTreeViewWhileCapturing.ToString() + "\n" +
                                "PersonWinHide = " + PersonWinHide.ToString() + "\n" +
                                "EncoderAnalyzeHide = " + EncoderAnalyzeHide.ToString() + "\n" +
-                               "Econf = " + econfStr + "\n" +
                                "SessionMode = " + SessionMode.ToString() + "\n" +
                                "RunScriptOnExit = " + RunScriptOnExit.ToString() + "\n"
                      );
diff --git a/src/constants.cs b/src/constants.cs
index d7ee70a..4f2be96 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -571,6 +571,7 @@ public class Constants
        public static string ChronopicOne = Catalog.GetString("All tests available except MultiChronopic.");
        public static string ChronopicMore = Catalog.GetString("All tests available.");
 
+       public static string DefaultString = Catalog.GetString("Default");
        
        //levels of sport practice
        //int will go into person database
diff --git a/src/encoder.cs b/src/encoder.cs
index 70d11a0..d7315d2 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -1040,22 +1040,33 @@ public class EncoderBarsData {
 public class EncoderConfigurationSQLObject
 {
        public int uniqueID;
-       public string customName;
+       public Constants.EncoderGI encoderGI;
+       public bool active; //true or false. One true for each encoderGI (GRAVITATORY, INERTIAL)
+       public string name;
        public EncoderConfiguration encoderConfiguration;
        public string description;
 
-       public EncoderConfigurationSQLObject(int uniqueID, string customName,
+       public EncoderConfigurationSQLObject()
+       {
+               uniqueID = -1;
+       }
+
+       public EncoderConfigurationSQLObject(int uniqueID,
+                       Constants.EncoderGI encoderGI, bool active, string name,
                        EncoderConfiguration encoderConfiguration,
                        string description)
        {
                this.uniqueID = uniqueID;
-               this.customName = customName;
+               this.encoderGI = encoderGI;
+               this.active = active;
+               this.name = name;
                this.encoderConfiguration = encoderConfiguration;
                this.description = description;
        }
 
        //converts encoderConfiguration string from SQL
-       public EncoderConfigurationSQLObject(int uniqueID, string customName,
+       public EncoderConfigurationSQLObject(int uniqueID,
+                       Constants.EncoderGI encoderGI, bool active, string name,
                        string encoderConfigurationString,
                        string description)
        {
@@ -1066,7 +1077,9 @@ public class EncoderConfigurationSQLObject
                econf.ReadParamsFromSQL(strFull);
 
                this.uniqueID = uniqueID;
-               this.customName = customName;
+               this.encoderGI = encoderGI;
+               this.active = active;
+               this.name = name;
                this.encoderConfiguration = econf;
                this.description = description;
        }
@@ -1089,8 +1102,15 @@ public class EncoderConfigurationSQLObject
                                        continue;
 
                                uniqueID = -1;
-                               if(parts[0] == "customName" && parts[1] != "")
-                                       customName = parts[1];
+                               if(parts[0] == "encoderGI")
+                               {
+                                       if(Enum.IsDefined(typeof(Constants.EncoderGI), parts[1]))
+                                               encoderGI = (Constants.EncoderGI) 
Enum.Parse(typeof(Constants.EncoderGI), parts[1]);
+                               }
+                               if(parts[0] == "active" && parts[1] != "")
+                                       active = (parts[1] == "True");
+                               if(parts[0] == "name" && parts[1] != "")
+                                       name = parts[1];
                                else if(parts[0] == "EncoderConfiguration")
                                {
                                        string [] ecFull = parts[1].Split(new char[] {':'});
@@ -1117,7 +1137,9 @@ public class EncoderConfigurationSQLObject
                         idStr = "NULL";
 
                 return idStr +
-                        ", \"" + customName + "\"" +
+                        ", \"" + encoderGI.ToString() + "\"" +
+                        ", \"" + active.ToString() + "\"" +
+                        ", \"" + name + "\"" +
                         ", \"" + encoderConfiguration.ToStringOutput(EncoderConfiguration.Outputs.SQL) + 
"\"" +
                         ", \"" + description + "\"" +
                         ", \"\", \"\", \"\""; //future1, future2, future3
@@ -1527,12 +1549,6 @@ public class EncoderConfiguration
                return l;
        }
 
-       //called on capture, recalculate, load
-       public void SQLUpdate()
-       {
-               SqlitePreferences.Update("encoderConfiguration", this.ToStringOutput(Outputs.SQL), false);
-       }
-
        public enum Outputs { ROPTIONS, RCSV, SQL} 
        
        public string ToStringOutput(Outputs o) 
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 877520a..93acbbe 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3086,7 +3086,7 @@ public partial class ChronoJumpWindow
 
                                //change encoderConfigurationCurrent if needed
                                if(encoderConfigurationCurrent.has_inertia) {
-                                       encoderConfigurationCurrent = new EncoderConfiguration(); //LINEAR, 
not INERTIAL
+                                       encoderConfigurationCurrent = 
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.GRAVITATORY).encoderConfiguration;
                                        changed = true;
                                }
                                
@@ -3106,9 +3106,7 @@ public partial class ChronoJumpWindow
 
                                //change encoderConfigurationCurrent if needed
                                if(! encoderConfigurationCurrent.has_inertia) {
-                                       encoderConfigurationCurrent = new EncoderConfiguration(
-                                                       
Constants.EncoderConfigurationNames.ROTARYAXISINERTIAL);        
-                                       encoderConfigurationCurrent.SetInertialDefaultOptions();
+                                       encoderConfigurationCurrent = 
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.INERTIAL).encoderConfiguration;
                                        changed = true;
                                }
                                
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 05009eb..6ac88e6 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -382,7 +382,7 @@ public partial class ChronoJumpWindow
                encoder_pulsebar_analyze.Text = "";
 
                //read from SQL
-               encoderConfigurationCurrent = SqliteEncoder.LoadEncoderConfiguration(false);
+               encoderConfigurationCurrent = 
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.GRAVITATORY).encoderConfiguration;
                
                encoderCaptureListStore = new Gtk.ListStore (typeof (EncoderCurve));
                
@@ -425,12 +425,11 @@ public partial class ChronoJumpWindow
        }
 
 
-       void on_button_encoder_select_clicked (object o, EventArgs args) {
+       void on_button_encoder_select_clicked (object o, EventArgs args)
+       {
                encoder_configuration_win = EncoderConfigurationWindow.View(
-                               radio_menuitem_mode_power_gravitatory.Active, //false if inertial
-                               encoderConfigurationCurrent, 
-                               encoderConfigurationDefinedFromFile  //defined at chronojump_config.txt and 
only few changes can be done
-                               );
+                               currentEncoderGI,
+                               SqliteEncoderConfiguration.SelectActive(currentEncoderGI));
                encoder_configuration_win.Button_accept.Clicked += new 
EventHandler(on_encoder_configuration_win_accepted);
 
                //unregister eventHandler first, then register. This avoids to have registered twice
@@ -477,13 +476,6 @@ public partial class ChronoJumpWindow
                }
 
                label_encoder_selected.Text = encoderConfigurationCurrent.code;
-
-               //if there's a chronojump_config.txt, update it
-               if(encoderConfigurationDefinedFromFile)
-                       Config.UpdateField(
-                                       "EncoderConfiguration",
-                                       
encoderConfigurationCurrent.ToStringOutput(EncoderConfiguration.Outputs.SQL)
-                                       );
        }
        
        void on_combo_encoder_anchorage_changed (object o, EventArgs args) {
@@ -638,8 +630,8 @@ public partial class ChronoJumpWindow
 
                LogB.Debug("Calling encoderThreadStart for capture");
 
-               encoderConfigurationCurrent.SQLUpdate(); //record this encoderConfiguration to SQL for next 
Chronojump open
-
+               //record this encoderConfiguration to SQL for next Chronojump open
+               SqliteEncoderConfiguration.UpdateActive(false, currentEncoderGI, encoderConfigurationCurrent);
 
                needToCallPrepareEncoderGraphs = false;
                encoderProcessFinish = false;
@@ -904,8 +896,10 @@ public partial class ChronoJumpWindow
                on_button_encoder_capture_finish_clicked (o, args); 
        }
 
-       void on_button_encoder_recalculate_clicked (object o, EventArgs args) {
-               encoderConfigurationCurrent.SQLUpdate(); //record this encoderConfiguration to SQL for next 
Chronojump open
+       void on_button_encoder_recalculate_clicked (object o, EventArgs args)
+       {
+               //record this encoderConfiguration to SQL for next Chronojump open
+               SqliteEncoderConfiguration.UpdateActive(false, currentEncoderGI, encoderConfigurationCurrent);
                encoderCalculeCurves(encoderActions.CURVES);
        }
 
@@ -1309,6 +1303,30 @@ public partial class ChronoJumpWindow
                        
                                encoderConfigurationCurrent = eSQL.encoderConfiguration;
 
+                               //manage EncoderConfigurationSQLObject
+                               SqliteEncoderConfiguration.MarkAllAsUnactive(false, currentEncoderGI);
+                               EncoderConfigurationSQLObject econfSO = 
SqliteEncoderConfiguration.SelectByEconf(false, currentEncoderGI, eSQL.encoderConfiguration);
+
+                               //if user has deleted this econfSO, create it again
+                               if(econfSO.uniqueID == -1)
+                               {
+                                       string name = 
SqliteEncoderConfiguration.IfNameExistsAddSuffix(Catalog.GetString("Unnamed"), Catalog.GetString("copy"));
+
+                                       econfSO = new EncoderConfigurationSQLObject(
+                                                       -1,                             //uniqueID
+                                                       currentEncoderGI,               //encoderGI
+                                                       true,                           //active
+                                                       name,                           //name
+                                                       eSQL.encoderConfiguration,      //encoderConfiguration
+                                                       ""                              //description
+                                                       );
+                                       SqliteEncoderConfiguration.Insert(false, econfSO);
+                               } else {
+                                       //if exists on datbase mark and update sql row as active
+                                       econfSO.active = true;
+                                       SqliteEncoderConfiguration.Update(false, currentEncoderGI, 
econfSO.name, econfSO);
+                               }
+
                                encoderConfigurationGUIUpdate();
                        }
                }
@@ -1320,7 +1338,8 @@ public partial class ChronoJumpWindow
                //LogB.Information(UtilEncoder.CompressSignal(UtilEncoder.GetEncoderDataTempFileName()));
 
                if(success) {   
-                       encoderConfigurationCurrent.SQLUpdate(); //record this encoderConfiguration to SQL 
for next Chronojump open
+                       //record this encoderConfiguration to SQL for next Chronojump open
+                       SqliteEncoderConfiguration.UpdateActive(false, currentEncoderGI, 
encoderConfigurationCurrent);
 
                        //force a recalculate but not save the curve (we are loading)
                        encoderCalculeCurves(encoderActions.LOAD);
diff --git a/src/gui/encoderConfiguration.cs b/src/gui/encoderConfiguration.cs
index 7a018a5..5a3ee8b 100644
--- a/src/gui/encoderConfiguration.cs
+++ b/src/gui/encoderConfiguration.cs
@@ -38,10 +38,7 @@ public class EncoderConfigurationWindow
        [Widget] Gtk.RadioButton radio_linear;
        [Widget] Gtk.RadioButton radio_rotary_friction;
        [Widget] Gtk.RadioButton radio_rotary_axis;
-       
-       [Widget] Gtk.RadioButton radio_gravity;
-       [Widget] Gtk.RadioButton radio_inertia;
-       
+
        [Widget] Gtk.CheckButton check_rotary_friction_inertia_on_axis;
        [Widget] Gtk.HBox hbox_top;
        [Widget] Gtk.Alignment alignment_options;
@@ -91,7 +88,6 @@ public class EncoderConfigurationWindow
        [Widget] Gtk.ComboBox combo_gearedUp;
                
        [Widget] Gtk.Box vbox_select_encoder;
-       [Widget] Gtk.VSeparator vseparator;
        [Widget] Gtk.Notebook notebook_side;
        [Widget] Gtk.TreeView treeview_select;
        [Widget] Gtk.Image image_delete;
@@ -117,15 +113,14 @@ public class EncoderConfigurationWindow
        ArrayList list;
        int listCurrent = 0; //current item on list
        Pixbuf pixbuf;
-       bool definedInConfig;
 
-       EncoderConfigurationWindow (bool definedInConfig) {
+       Constants.EncoderGI encoderGI;
+
+       EncoderConfigurationWindow () {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "encoder_configuration.glade", 
"encoder_configuration", "chronojump");
                gladeXML.Autoconnect(this);
                
-               this.definedInConfig = definedInConfig;
-               
                //three encoder types   
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameEncoderTypeLinear);
                image_encoder_linear.Pixbuf = pixbuf;
@@ -142,39 +137,19 @@ public class EncoderConfigurationWindow
                //put an icon to window
                UtilGtk.IconWindow(encoder_configuration);
        }
-       
-       static public EncoderConfigurationWindow View (bool gravitatory, EncoderConfiguration ec, bool 
definedInConfig) 
-       {
-               /*
-                * if we are on gravitatory but ec is inertial, then put definedInConfig as false
-                * and create a new ec that suits
-                */
-               if(ec.has_inertia == gravitatory) {
-                       definedInConfig = false;
-                       if(gravitatory)
-                               ec = new EncoderConfiguration(); //LINEAR, not inertial
-                       else {
-                               ec = new 
EncoderConfiguration(Constants.EncoderConfigurationNames.ROTARYAXISINERTIAL);
-                               ec.SetInertialDefaultOptions();
-                       }
-               }
 
+       static public EncoderConfigurationWindow View (Constants.EncoderGI encoderGI, 
EncoderConfigurationSQLObject econfSO)
+       {
                if (EncoderConfigurationWindowBox == null) {
-                       EncoderConfigurationWindowBox = new EncoderConfigurationWindow (definedInConfig);
+                       EncoderConfigurationWindowBox = new EncoderConfigurationWindow ();
                }
 
-               EncoderConfigurationWindowBox.updateGUIFromEncoderConfiguration(ec);
-
-               //id definedInConfig then only few things can change
-               if(definedInConfig) {
-                       EncoderConfigurationWindowBox.hbox_top.Visible = false;
-                       EncoderConfigurationWindowBox.check_rotary_friction_inertia_on_axis.Visible = false;
-                       EncoderConfigurationWindowBox.alignment_options.Visible = false;
-                       EncoderConfigurationWindowBox.vbox_inertia_calcule.Visible = false;
-               }
+               EncoderConfigurationWindowBox.encoderGI = encoderGI;
+               EncoderConfigurationWindowBox.updateGUIFromEncoderConfiguration(econfSO.encoderConfiguration);
 
                EncoderConfigurationWindowBox.createAndFillTreeView(
-                               SqliteEncoder.SelectEncoderConfiguration(false, ! gravitatory, "")); //all
+                               SqliteEncoderConfiguration.Select(false, encoderGI, ""), //all
+                               econfSO);
 
                EncoderConfigurationWindowBox.encoder_configuration.Show ();
                return EncoderConfigurationWindowBox;
@@ -190,11 +165,6 @@ public class EncoderConfigurationWindow
                else    //linear
                        radio_linear.Active = true;
 
-               if(! ec.has_inertia)
-                       radio_gravity.Active = true;
-               else
-                       radio_inertia.Active = true;
-
                check_rotary_friction_inertia_on_axis.Active = ec.rotaryFrictionOnAxis;
 
                initializeList(ec.type, ec.has_inertia, ec.rotaryFrictionOnAxis, ec.position);
@@ -206,52 +176,31 @@ public class EncoderConfigurationWindow
                                ec.inertiaMachine, ec.extraWeightGrams, ec.extraWeightLength,
                                ec.has_gearedDown, ec.GearedUpDisplay());
        }
-       
+
        private void on_radio_encoder_type_linear_toggled (object obj, EventArgs args) {
                if(radio_linear.Active)
                        initializeList(Constants.EncoderType.LINEAR, 
-                                       radio_inertia.Active, false, 0);
+                                       encoderGI == Constants.EncoderGI.INERTIAL, false, 0);
        }
        private void on_radio_encoder_type_rotary_friction_toggled (object obj, EventArgs args) {
                if(radio_rotary_friction.Active)
                        initializeList(Constants.EncoderType.ROTARYFRICTION, 
-                                       radio_inertia.Active, 
-                                       (radio_inertia.Active && 
check_rotary_friction_inertia_on_axis.Active), 
+                                       encoderGI == Constants.EncoderGI.INERTIAL,
+                                       (encoderGI == Constants.EncoderGI.INERTIAL && 
check_rotary_friction_inertia_on_axis.Active),
                                        0);
        }
        private void on_radio_encoder_type_rotary_axis_toggled (object obj, EventArgs args) {
                if(radio_rotary_axis.Active)
                        initializeList(Constants.EncoderType.ROTARYAXIS, 
-                                       radio_inertia.Active, false, 0);
-       }
-       
-       private void on_radio_gravity_toggled (object obj, EventArgs args) {
-               if(radio_gravity.Active) {
-                       if(radio_linear.Active)
-                               initializeList(Constants.EncoderType.LINEAR, false, false, 0);
-                       else if(radio_rotary_friction.Active)
-                               initializeList(Constants.EncoderType.ROTARYFRICTION, false, false, 0);
-                       else //(radio_rotary_axis.Active)
-                               initializeList(Constants.EncoderType.ROTARYAXIS, false, false, 0);
-               }
-       }
-       private void on_radio_inertia_toggled (object obj, EventArgs args) {
-               if(radio_inertia.Active) {
-                       if(radio_linear.Active)
-                               initializeList(Constants.EncoderType.LINEAR, true, false, 0);
-                       else if(radio_rotary_friction.Active)
-                               initializeList(Constants.EncoderType.ROTARYFRICTION, true, 
check_rotary_friction_inertia_on_axis.Active,  0);
-                       else //(radio_rotary_axis.Active)
-                               initializeList(Constants.EncoderType.ROTARYAXIS, true, false, 0);
-               }
+                                       encoderGI == Constants.EncoderGI.INERTIAL, false, 0);
        }
 
        private void check_rotary_friction_inertia_on_axis_is_visible() {
-               check_rotary_friction_inertia_on_axis.Visible = (radio_rotary_friction.Active && ! 
radio_gravity.Active);
+               check_rotary_friction_inertia_on_axis.Visible = (radio_rotary_friction.Active && encoderGI == 
Constants.EncoderGI.INERTIAL);
        }
        
        private void on_check_rotary_friction_inertia_on_axis_toggled (object obj, EventArgs args) {
-               on_radio_inertia_toggled(obj, args);
+               initializeList(Constants.EncoderType.ROTARYFRICTION, true, 
check_rotary_friction_inertia_on_axis.Active, 0);
        }
        
 
@@ -309,7 +258,7 @@ public class EncoderConfigurationWindow
                hbox_inertia.Visible = ec.has_inertia;
                hbox_inertia_mass.Visible = ec.has_inertia;
                hbox_inertia_length.Visible = ec.has_inertia;
-               vbox_inertia_calcule.Visible = (ec.has_inertia && ! definedInConfig);
+               vbox_inertia_calcule.Visible = ec.has_inertia;
                
                hbox_gearedUp.Visible = ec.has_gearedDown;
                if(ec.has_gearedDown)
@@ -529,8 +478,6 @@ public class EncoderConfigurationWindow
                sideMode = newSideMode;
 
                //change gui
-               vseparator.Visible = (sideMode != sideModes.HIDDEN);
-
                if(sideMode == sideModes.MANAGE)
                        notebook_side.CurrentPage = 0;
                else if(sideMode == sideModes.CAPTUREINERTIAL)
@@ -559,14 +506,19 @@ public class EncoderConfigurationWindow
         */
 
        TreeStore store;
-       private void createAndFillTreeView(List<EncoderConfigurationSQLObject> list)
+       int colName = 0;
+       int colDescription = 1;
+
+       private void createAndFillTreeView(List<EncoderConfigurationSQLObject> list, 
EncoderConfigurationSQLObject currentSO)
        {
                createTreeView();
                store = getStore();
                treeview_select.Model = store;
 
                foreach (EncoderConfigurationSQLObject econfSO in list)
-                       store.AppendValues (new string[]{ econfSO.customName, econfSO.description });
+                       store.AppendValues (new string[]{ econfSO.name, econfSO.description });
+
+               UtilGtk.TreeviewSelectRowWithName(treeview_select, store, colName, currentSO.name, true);
 
                Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_delete.png");
                image_delete.Pixbuf = pixbuf;
@@ -585,26 +537,36 @@ public class EncoderConfigurationWindow
                return new TreeStore(typeof (string), typeof (string));
        }
 
-       private void onTVSelectionChanged (object o, EventArgs args)
+       private string getSelectedName()
        {
                TreeModel model;
                TreeIter iter;
 
-               string selectedName = "";
-               if (((TreeSelection)o).GetSelected(out model, out iter))
-                       selectedName = (string) model.GetValue (iter, 0);
+               if (treeview_select.Selection.GetSelected(out model, out iter))
+                       return (string) model.GetValue (iter, colName);
 
+               return "";
+       }
+
+       private void onTVSelectionChanged (object o, EventArgs args)
+       {
+               string selectedName = getSelectedName();
                if(selectedName == "")
                        return;
 
-               List<EncoderConfigurationSQLObject> list = SqliteEncoder.SelectEncoderConfiguration(
-                               false, radio_inertia.Active, selectedName);
+               List<EncoderConfigurationSQLObject> list = SqliteEncoderConfiguration.Select(false, 
encoderGI, selectedName);
                if(list != null && list.Count == 1)
                {
                        EncoderConfigurationSQLObject econfSO = list[0];
-                       entry_save_name.Text = econfSO.customName;
+                       entry_save_name.Text = econfSO.name;
                        entry_save_description.Text = econfSO.description;
 
+                       //mark all as unactive
+                       SqliteEncoderConfiguration.MarkAllAsUnactive(false, encoderGI);
+                       econfSO.active = true;
+                       //mark this as active
+                       SqliteEncoderConfiguration.Update(false, encoderGI, selectedName, econfSO);
+
                        
EncoderConfigurationWindowBox.updateGUIFromEncoderConfiguration(econfSO.encoderConfiguration);
                }
        }
@@ -640,12 +602,17 @@ public class EncoderConfigurationWindow
                                if (contents != null && contents != "")
                                {
                                        EncoderConfigurationSQLObject econfSO = new 
EncoderConfigurationSQLObject(contents);
-                                       if(econfSO.customName != null && econfSO.customName != "") //TODO: 
check if name exists
+                                       if(econfSO.name != null && econfSO.name != "") //TODO: check if name 
exists
                                        {
-                                               //TODO: add depending on inertial. If doesn't match show 
error message
-                                               SqliteEncoder.InsertEncoderConfiguration(false, econfSO);
-                                               store.AppendValues (new string[]{ econfSO.customName, 
econfSO.description });
-                                               UtilGtk.TreeviewSelectRowWithName(treeview_select, store, 0, 
econfSO.customName, true);
+                                               //add more suffixes until name is unique
+                                               econfSO.name = 
SqliteEncoderConfiguration.IfNameExistsAddSuffix(econfSO.name, Catalog.GetString("copy"));
+
+                                               SqliteEncoderConfiguration.MarkAllAsUnactive(false, 
encoderGI);
+                                               econfSO.active = true;
+                                               SqliteEncoderConfiguration.Insert(false, econfSO);
+
+                                               store.AppendValues (new string[]{ econfSO.name, 
econfSO.description });
+                                               UtilGtk.TreeviewSelectRowWithName(treeview_select, store, 
colName, econfSO.name, true);
                                        }
                                }
                        }
@@ -658,19 +625,67 @@ public class EncoderConfigurationWindow
                fc.Destroy();
        }
 
+       //TODO: button_save sensitive only when name != "" && != of the others
        void on_button_save_clicked (object o, EventArgs args)
        {
+               string selectedName = getSelectedName();
+               if(selectedName == "")
+                       return;
+
                //save_update when changing any value
                //and when exiting with ok dialogMessage asking for save
 
+               //update SQL
                EncoderConfiguration econfOnGUI = GetAcceptedValues();
-               EncoderConfigurationSQLObject econfSO = new EncoderConfigurationSQLObject(
-                               -1, entry_save_name.Text.ToString(), econfOnGUI, 
entry_save_description.Text.ToString());
-               SqliteEncoder.InsertEncoderConfiguration(false, econfSO);
+               EncoderConfigurationSQLObject econfSO = new EncoderConfigurationSQLObject(-1,
+                               encoderGI, true, entry_save_name.Text.ToString(),
+                               econfOnGUI, entry_save_description.Text.ToString());
+
+               SqliteEncoderConfiguration.Update(false, encoderGI, selectedName, econfSO);
+
+               //update GUI
+               TreeModel model;
+               TreeIter iter = new TreeIter();
+               treeview_select.Selection.GetSelected (out model, out iter);
+               store.SetValue (iter, colName, entry_save_name.Text);
+               store.SetValue (iter, colDescription, entry_save_description.Text);
+       }
+
+       void on_button_duplicate_clicked (object o, EventArgs args)
+       {
+               string selectedName = getSelectedName();
+               if(selectedName == "")
+                       return;
+
+               List<EncoderConfigurationSQLObject> list = SqliteEncoderConfiguration.Select(false, 
encoderGI, selectedName);
+               if(list != null && list.Count == 1)
+               {
+                       EncoderConfigurationSQLObject econfSO = list[0];
+                       econfSO.uniqueID = -1; //to be entered as null and not repeat the uniqueID
+
+                       //add a suffix
+                       econfSO.name += "_"  + Catalog.GetString("copy");
+                       //add more suffixes until name is unique
+                       econfSO.name = SqliteEncoderConfiguration.IfNameExistsAddSuffix(econfSO.name, 
Catalog.GetString("copy"));
+
+                       SqliteEncoderConfiguration.MarkAllAsUnactive(false, encoderGI);
+                       econfSO.active = true;
+                       SqliteEncoderConfiguration.Insert(false, econfSO);
+
+                       store.AppendValues (new string[]{ econfSO.name, econfSO.description });
+                       UtilGtk.TreeviewSelectRowWithName(treeview_select, store, colName, econfSO.name, 
true);
+               }
        }
 
+       //TODO: cannot delete if only there's the only on this encoderGI
        void on_button_delete_clicked (object o, EventArgs args)
        {
+               string selectedName = getSelectedName();
+               if(selectedName == "")
+                       return;
+
+               UtilGtk.RemoveRow(treeview_select, store);
+               Sqlite.DeleteFromName(false, Constants.EncoderConfigurationTable, "name", selectedName);
        }
 
        /*
@@ -691,7 +706,6 @@ public class EncoderConfigurationWindow
        public void Button_encoder_capture_inertial_do_chronopic_ok () 
        {
                vbox_select_encoder.Visible = false;
-               vseparator.Visible = false;
                button_encoder_capture_inertial_do.Sensitive = false;
 
                //adapt capture, cancel and finish      
@@ -709,7 +723,6 @@ public class EncoderConfigurationWindow
        public void Button_encoder_capture_inertial_do_ended (double imResult, string message) 
        {
                vbox_select_encoder.Visible = true;
-               vseparator.Visible = true;
                button_encoder_capture_inertial_do.Sensitive = true;
                
                //adapt capture, cancel and finish      
@@ -747,15 +760,24 @@ public class EncoderConfigurationWindow
         * <--------------- end of side content area / capture inertial ----
         */
 
+       private void on_button_close_clicked (object o, EventArgs args)
+       {
+               //TODO:
+               //if changed:
+               //confirmwindow to save or cancel
+       }
 
        private void on_button_cancel_clicked (object o, EventArgs args)
        {
+               //TODO: remove button_cancel
                EncoderConfigurationWindowBox.encoder_configuration.Hide();
                EncoderConfigurationWindowBox = null;
        }
        
        private void on_button_accept_clicked (object o, EventArgs args)
        {
+               //TODO: remove button_accept (but continue managing call on gui/encoder.cs)
+               //managed on gui/encoder.cs
                EncoderConfigurationWindowBox.encoder_configuration.Hide();
        }
        
@@ -765,7 +787,10 @@ public class EncoderConfigurationWindow
        
                if(capturing)
                        button_encoder_capture_inertial_cancel.Click();
-                       
+
+               //TODO:
+               //call on_button_close_clicked
+
                EncoderConfigurationWindowBox.encoder_configuration.Hide();
                EncoderConfigurationWindowBox = null;
        }
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index ccc92e9..62aaa48 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -59,7 +59,6 @@ public partial class ChronoJumpWindow
        private Config.AutodetectPortEnum configAutodetectPort = Config.AutodetectPortEnum.ACTIVE;
 
        private enum linuxTypeEnum { NOTLINUX, LINUX, RASPBERRY, NETWORKS }
-       private bool encoderConfigurationDefinedFromFile = false;
        private bool encoderUpdateTreeViewWhileCapturing = true;
                
        private void configInit() 
@@ -145,14 +144,7 @@ public partial class ChronoJumpWindow
                if(config.EncoderAnalyzeHide) {
                        hbox_encoder_sup_capture_analyze_two_buttons.Visible = false;
                }
-               
-               if(config.Econf != null) {
-                       encoderConfigurationDefinedFromFile = true;
-                       encoderConfigurationCurrent = config.Econf;
-                       encoderConfigurationGUIUpdate();
-                       //TODO: allow to see full data, but don't allow to change it (Open window content as 
unsensitive)
-               }
-               
+
                if(config.SessionMode == Config.SessionModeEnum.UNIQUE) 
                {
                        main_menu.Visible = false;
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index c3d376f..c112193 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -37,7 +37,7 @@ class SqliteEncoder : Sqlite
        /*
         * create and initialize tables
         */
-       
+
        protected internal static void createTableEncoder()
        {
                dbcmd.CommandText = 
@@ -1107,112 +1107,4 @@ class SqliteEncoder : Sqlite
 
                return -1;
        }
-
-       /*
-        * EncoderConfiguration
-        */
-
-       //called on startup to load last encoderConfiguration
-       public static EncoderConfiguration LoadEncoderConfiguration(bool dbconOpened)
-       {
-               string ecStr = SqlitePreferences.Select("encoderConfiguration", dbconOpened);
-               
-               //1.5.1 and previous don't store encoderConfiguration on SqlitePreferences
-               if(ecStr == null || ecStr.Length == 0 || ecStr == "0" || ecStr == "")
-                       return new EncoderConfiguration(); 
-
-               string [] ecStrFull = ecStr.Split(new char[] {':'});
-
-               //create object
-               EncoderConfiguration ec = new EncoderConfiguration(
-                               (Constants.EncoderConfigurationNames) 
-                               Enum.Parse(typeof(Constants.EncoderConfigurationNames), ecStrFull[0]) );
-
-               //assign the rest of params
-               ec.ReadParamsFromSQL(ecStrFull);
-
-               return ec;
-       }
-
-
-       /*
-        * EncoderConfiguration table
-        */
-
-       protected internal static void createTableEncoderConfiguration()
-       {
-               dbcmd.CommandText =
-                       "CREATE TABLE " + Constants.EncoderConfigurationTable + " ( " +
-                       "uniqueID INTEGER PRIMARY KEY, " +
-                       "customName TEXT, " +           //name given by the user
-                       "encoderConfiguration TEXT, " + //text separated by ':'
-                       "description TEXT, " +
-                       "future1 TEXT, " +
-                       "future2 TEXT, " +
-                       "future3 TEXT )";
-               dbcmd.ExecuteNonQuery();
-
-               //on convert database sets the sqlite/preferences/encoderConfiguration as "default" encoder 
configuration
-               EncoderConfiguration econfOnPreferences = LoadEncoderConfiguration(true);
-
-               InsertEncoderConfiguration(true,
-                               new EncoderConfigurationSQLObject(
-                                       -1 , Catalog.GetString("Default"), econfOnPreferences, "")
-                               );
-       }
-
-       public static void InsertEncoderConfiguration(bool dbconOpened, EncoderConfigurationSQLObject econfSO)
-       {
-               openIfNeeded(dbconOpened);
-
-               dbcmd.CommandText = "INSERT INTO " + Constants.EncoderConfigurationTable +
-                       " (uniqueID, customName, encoderConfiguration, description, future1, future2, 
future3)" +
-                       " VALUES (" + econfSO.ToSQLInsert() + ")";
-               LogB.SQL(dbcmd.CommandText.ToString());
-               dbcmd.ExecuteNonQuery();
-
-               closeIfNeeded(dbconOpened);
-       }
-
-       //pass customName = "" to select all
-       public static List<EncoderConfigurationSQLObject> SelectEncoderConfiguration(
-                       bool dbconOpened, bool inertial, string customName)
-       {
-               openIfNeeded(dbconOpened);
-
-               string whereStr = "";
-               if(customName != "")
-                       whereStr = " WHERE customName = \"" + customName + "\"";
-
-               dbcmd.CommandText = "SELECT * FROM " + Constants.EncoderConfigurationTable + whereStr;
-               LogB.SQL(dbcmd.CommandText.ToString());
-               dbcmd.ExecuteNonQuery();
-
-               List<EncoderConfigurationSQLObject> list = new List<EncoderConfigurationSQLObject>();
-               SqliteDataReader reader;
-               reader = dbcmd.ExecuteReader();
-               while(reader.Read())
-               {
-                       string [] strFull = reader[2].ToString().Split(new char[] {':'});
-                       EncoderConfiguration econf = new EncoderConfiguration(
-                                       (Constants.EncoderConfigurationNames)
-                                       Enum.Parse(typeof(Constants.EncoderConfigurationNames), strFull[0]) );
-                       econf.ReadParamsFromSQL(strFull);
-
-                       EncoderConfigurationSQLObject econfSO = new EncoderConfigurationSQLObject(
-                                       Convert.ToInt32(reader[0].ToString()),  //uniqueID
-                                       reader[1].ToString(),                   //customName
-                                       econf,                                  //encoderConfiguration
-                                       reader[3].ToString()                    //description
-                                       );
-
-                       if(inertial == econf.has_inertia)
-                               list.Add(econfSO);
-               }
-
-               reader.Close();
-               closeIfNeeded(dbconOpened);
-
-               return list;
-       }
 }
diff --git a/src/sqlite/encoderConfiguration.cs b/src/sqlite/encoderConfiguration.cs
new file mode 100644
index 0000000..8d873cf
--- /dev/null
+++ b/src/sqlite/encoderConfiguration.cs
@@ -0,0 +1,258 @@
+/*
+ * This file is part of ChronoJump
+ *
+ * ChronoJump is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or   
+ *    (at your option) any later version.
+ *    
+ * ChronoJump is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+ *    GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Copyright (C) 2017   Xavier de Blas <xaviblas gmail com> 
+ */
+
+using System;
+using System.Data;
+using System.Collections.Generic; //List<T>
+using Mono.Data.Sqlite;
+
+
+class SqliteEncoderConfiguration : Sqlite
+{
+       /*
+       public SqliteEncoderConfiguration() {
+       }
+       
+       ~SqliteEncoderConfiguration() {}
+       */
+
+       /*
+        * EncoderConfiguration table
+        */
+
+       protected internal static void createTableEncoderConfiguration()
+       {
+               dbcmd.CommandText =
+                       "CREATE TABLE " + Constants.EncoderConfigurationTable + " ( " +
+                       "uniqueID INTEGER PRIMARY KEY, " +
+                       "encoderGI TEXT, " +
+                       "active TEXT, " +               //TRUE or FALSE (one TRUE for GRAVITATORY and one for 
INERTIAL)
+                       "name TEXT, " + 
+                       "encoderConfiguration TEXT, " + //text separated by ':'
+                       "description TEXT, " +
+                       "future1 TEXT, " +
+                       "future2 TEXT, " +
+                       "future3 TEXT )";
+               dbcmd.ExecuteNonQuery();
+       }
+
+       protected internal static void insertDefault(Constants.EncoderGI encoderGI)
+       {
+               //note DefaultString will not be translated because gettext is changed after this inserts
+               if(encoderGI == Constants.EncoderGI.GRAVITATORY)
+                       Insert(true,
+                                       new EncoderConfigurationSQLObject(
+                                               -1 , encoderGI, true, Constants.DefaultString, new 
EncoderConfiguration(), "") //LINEAR, not inertial
+                                       );
+               else if(encoderGI == Constants.EncoderGI.INERTIAL)
+               {
+                       EncoderConfiguration ec = new 
EncoderConfiguration(Constants.EncoderConfigurationNames.ROTARYAXISINERTIAL);
+                       ec.SetInertialDefaultOptions();
+                       Insert(true,
+                                       new EncoderConfigurationSQLObject(
+                                               -1 , encoderGI, true, Constants.DefaultString, ec, "")
+                                       );
+               }
+               else
+                       LogB.Error("SqliteEncoderConfiguration.insertDefault with an ALL erroneous value");
+       }
+       public static void Insert(bool dbconOpened, EncoderConfigurationSQLObject econfSO)
+       {
+               openIfNeeded(dbconOpened);
+
+               dbcmd.CommandText = "INSERT INTO " + Constants.EncoderConfigurationTable +
+                       " (uniqueID, encoderGI, active, name, encoderConfiguration, description, future1, 
future2, future3)" +
+                       " VALUES (" + econfSO.ToSQLInsert() + ")";
+               LogB.SQL(dbcmd.CommandText.ToString());
+               dbcmd.ExecuteNonQuery();
+
+               closeIfNeeded(dbconOpened);
+       }
+
+       public static string IfNameExistsAddSuffix(string name, string suffix)
+       {
+               if(Sqlite.Exists(false, Constants.EncoderConfigurationTable, name))
+               {
+                       do {
+                               name += "_" + suffix;
+                       } while (Sqlite.Exists(false, Constants.EncoderConfigurationTable, name));
+               }
+               return name;
+       }
+
+       //called on capture, recalculate, load
+       public static void UpdateActive(bool dbconOpened, Constants.EncoderGI encoderGI, EncoderConfiguration 
econf)
+       {
+               openIfNeeded(dbconOpened);
+
+               dbcmd.CommandText = "UPDATE " + Constants.EncoderConfigurationTable +
+                       " SET encoderConfiguration = \"" + 
econf.ToStringOutput(EncoderConfiguration.Outputs.SQL) + "\"" +
+                       " WHERE encoderGI = \"" + encoderGI.ToString() + "\"" +
+                       " AND active = \"True\"";
+               LogB.SQL(dbcmd.CommandText.ToString());
+               dbcmd.ExecuteNonQuery();
+
+               closeIfNeeded(dbconOpened);
+       }
+
+       //called on gui/encoderConfiguration.cs when click on save
+       //also on load set
+       public static void Update(bool dbconOpened, Constants.EncoderGI encoderGI, string oldName, 
EncoderConfigurationSQLObject econfSO)
+       {
+               openIfNeeded(dbconOpened);
+
+               dbcmd.CommandText = "UPDATE " + Constants.EncoderConfigurationTable +
+                       " SET active = \"" + econfSO.active + "\", name = \"" + econfSO.name + "\", " +
+                       " encoderConfiguration = \"" + 
econfSO.encoderConfiguration.ToStringOutput(EncoderConfiguration.Outputs.SQL) + "\", " +
+                       " description = \"" + econfSO.description + "\"" +
+                       " WHERE name = \"" + oldName + "\" AND encoderGI = \"" + encoderGI.ToString() + "\"";
+               LogB.SQL(dbcmd.CommandText.ToString());
+               dbcmd.ExecuteNonQuery();
+
+               closeIfNeeded(dbconOpened);
+       }
+
+       public static void MarkAllAsUnactive(bool dbconOpened, Constants.EncoderGI encoderGI)
+       {
+               openIfNeeded(dbconOpened);
+
+               dbcmd.CommandText = "UPDATE " + Constants.EncoderConfigurationTable +
+                       " SET active = \"False\"" +
+                       " WHERE encoderGI = \"" + encoderGI.ToString() + "\"";
+               LogB.SQL(dbcmd.CommandText.ToString());
+               dbcmd.ExecuteNonQuery();
+
+               closeIfNeeded(dbconOpened);
+       }
+
+       //pass customName = "" to select all
+       public static List<EncoderConfigurationSQLObject> Select(bool dbconOpened, Constants.EncoderGI 
encoderGI, string name)
+       {
+               openIfNeeded(dbconOpened);
+
+               string nameStr = "";
+               if(name != "")
+                       nameStr = " AND name = \"" + name + "\"";
+
+               dbcmd.CommandText = "SELECT * FROM " + Constants.EncoderConfigurationTable +
+                       " WHERE encoderGI = \"" + encoderGI.ToString() + "\"" + nameStr;
+               LogB.SQL(dbcmd.CommandText.ToString());
+               dbcmd.ExecuteNonQuery();
+
+               List<EncoderConfigurationSQLObject> list = new List<EncoderConfigurationSQLObject>();
+               SqliteDataReader reader;
+               reader = dbcmd.ExecuteReader();
+               while(reader.Read())
+               {
+                       string [] strFull = reader[4].ToString().Split(new char[] {':'});
+                       EncoderConfiguration econf = new EncoderConfiguration(
+                                       (Constants.EncoderConfigurationNames)
+                                       Enum.Parse(typeof(Constants.EncoderConfigurationNames), strFull[0]) );
+                       econf.ReadParamsFromSQL(strFull);
+                       
+                       EncoderConfigurationSQLObject econfSO = new EncoderConfigurationSQLObject(
+                                       Convert.ToInt32(reader[0].ToString()),  //uniqueID
+                                       encoderGI,                              //encoderGI
+                                       reader[2].ToString() == "True",         //active
+                                       reader[3].ToString(),                   //name
+                                       econf,                                  //encoderConfiguration
+                                       reader[5].ToString()                    //description
+                                       );
+
+                       list.Add(econfSO);
+               }
+
+               reader.Close();
+               closeIfNeeded(dbconOpened);
+
+               return list;
+       }
+       
+       public static EncoderConfigurationSQLObject SelectActive (Constants.EncoderGI encoderGI) 
+       {
+               Sqlite.Open();
+
+               dbcmd.CommandText = "SELECT * FROM " + Constants.EncoderConfigurationTable +
+                       " WHERE encoderGI = \"" + encoderGI.ToString() + "\" AND active = \"True\"";
+               LogB.SQL(dbcmd.CommandText.ToString());
+               dbcmd.ExecuteNonQuery();
+               
+               SqliteDataReader reader;
+               reader = dbcmd.ExecuteReader();
+
+               EncoderConfigurationSQLObject econfSO = new EncoderConfigurationSQLObject();
+       
+               if(reader.Read())
+               {
+                       string [] strFull = reader[4].ToString().Split(new char[] {':'});
+                       EncoderConfiguration econf = new EncoderConfiguration(
+                                       (Constants.EncoderConfigurationNames)
+                                       Enum.Parse(typeof(Constants.EncoderConfigurationNames), strFull[0]) );
+                       econf.ReadParamsFromSQL(strFull);
+                                       
+                       econfSO = new EncoderConfigurationSQLObject(
+                                       Convert.ToInt32(reader[0].ToString()),  //uniqueID
+                                       encoderGI,                              //encoderGI
+                                       true,                                   //active
+                                       reader[3].ToString(),                   //name
+                                       econf,                                  //encoderConfiguration
+                                       reader[5].ToString()                    //description
+                                       );
+               }
+               reader.Close();
+               Sqlite.Close();
+
+               return econfSO;
+       }
+
+       //called on load signal
+       //if does not found any encoderConfiguration then return one with -1 as uniqueID
+       public static EncoderConfigurationSQLObject SelectByEconf (bool dbconOpened, Constants.EncoderGI 
encoderGI, EncoderConfiguration econf) 
+       {
+               openIfNeeded(dbconOpened);
+
+               dbcmd.CommandText = "SELECT * FROM " + Constants.EncoderConfigurationTable + 
+                       " WHERE encoderGI = \"" + encoderGI.ToString() + "\"" +
+                       " AND encoderConfiguration = \"" + 
econf.ToStringOutput(EncoderConfiguration.Outputs.SQL) + "\"";
+               LogB.SQL(dbcmd.CommandText.ToString());
+               dbcmd.ExecuteNonQuery();
+
+               SqliteDataReader reader;
+               reader = dbcmd.ExecuteReader();
+
+               EncoderConfigurationSQLObject econfSO = new EncoderConfigurationSQLObject();
+
+               if(reader.Read())
+               {
+                       econfSO = new EncoderConfigurationSQLObject(
+                                       Convert.ToInt32(reader[0].ToString()),  //uniqueID
+                                       encoderGI,                              //encoderGI
+                                       true,                                   //active
+                                       reader[3].ToString(),                   //name
+                                       econf,                                  //encoderConfiguration
+                                       reader[5].ToString()                    //description
+                                       );
+               }
+               reader.Close();
+               Sqlite.Close();
+
+               return econfSO;
+       }
+}
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 5bedaa8..bfb1126 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -123,7 +123,7 @@ class Sqlite
        /*
         * Important, change this if there's any update to database
         */
-       static string lastChronojumpDatabaseVersion = "1.35";
+       static string lastChronojumpDatabaseVersion = "1.37";
 
        public Sqlite() {
        }
@@ -2000,17 +2000,72 @@ class Sqlite
                                SqlitePreferences.Insert ("thresholdRuns", "10");
                                SqlitePreferences.Insert ("thresholdOther", "50");
 
-                               currentVersion = updateVersion("1.34");
+                               //jump directly to 1.36 because 1.34 has a first implementation of 
encoderConfiguration (not released)
+                               //1.35 deletes it
+                               //1.36 creates new encoderConfiguration ------------------------>
+                               currentVersion = updateVersion("1.36");
                        }
                        if(currentVersion == "1.34") {
+                               //1.36 creates new encoderConfiguration ------------------------>
+                               currentVersion = updateVersion("1.36");
+
+                               /*
                                LogB.SQL("Added encoderConfiguration table");
 
-                               SqliteEncoder.createTableEncoderConfiguration();
+                               SqliteEncoderConfiguration.createTableEncoderConfiguration();
 
                                currentVersion = updateVersion("1.35");
+                               */
+                       }
+                       if(currentVersion == "1.35") {
+                               LogB.SQL("Deleted encoderConfiguration table");
+
+                               dropTable(Constants.EncoderConfigurationTable);
+
+                               currentVersion = updateVersion("1.36");
                        }
+                       if(currentVersion == "1.36")
+                       {
+                               LogB.SQL("Deleted encoderConfiguration variable. Added encoderConfiguration 
table (1.36)");
+
+                               //1 create table
+                               SqliteEncoderConfiguration.createTableEncoderConfiguration();
+
+                               //2 load encoderConfiguration from SQL
+                               string ecStr = SqlitePreferences.Select("encoderConfiguration", true);
+                               string [] ecStrFull = ecStr.Split(new char[] {':'});
+
+                               //2.a create object
+                               EncoderConfiguration econfOnPreferences = new EncoderConfiguration(
+                                               (Constants.EncoderConfigurationNames)
+                                               Enum.Parse(typeof(Constants.EncoderConfigurationNames), 
ecStrFull[0]) );
 
+                               //2b assign the rest of params
+                               econfOnPreferences.ReadParamsFromSQL(ecStrFull);
 
+                               //3 insert default configurations
+                               if(econfOnPreferences.has_inertia)
+                               {
+                                       SqliteEncoderConfiguration.Insert(true,
+                                                       new EncoderConfigurationSQLObject(
+                                                               -1, Constants.EncoderGI.INERTIAL, true, 
Constants.DefaultString, econfOnPreferences, "")
+                                                       );
+                                       
SqliteEncoderConfiguration.insertDefault(Constants.EncoderGI.GRAVITATORY);
+                               }
+                               else
+                               {
+                                       SqliteEncoderConfiguration.Insert(true,
+                                                       new EncoderConfigurationSQLObject(
+                                                               -1, Constants.EncoderGI.GRAVITATORY, true, 
Constants.DefaultString, econfOnPreferences, "")
+                                                       );
+                                       
SqliteEncoderConfiguration.insertDefault(Constants.EncoderGI.INERTIAL);
+                               }
+
+                               //4 delete "encoderConfiguration" variable from SQL
+                               DeleteFromName(true, Constants.PreferencesTable, "encoderConfiguration");
+
+                               currentVersion = updateVersion("1.37");
+                       }
 
                        // --- add more updates here
                
@@ -2152,7 +2207,11 @@ class Sqlite
                SqliteEncoder.createTableEncoderExercise();
                SqliteEncoder.initializeTableEncoderExercise();
                SqliteEncoder.createTable1RM();
-               SqliteEncoder.createTableEncoderConfiguration();
+
+               //encoderConfiguration
+               SqliteEncoderConfiguration.createTableEncoderConfiguration();
+               SqliteEncoderConfiguration.insertDefault(Constants.EncoderGI.GRAVITATORY);
+               SqliteEncoderConfiguration.insertDefault(Constants.EncoderGI.INERTIAL);
 
                //sports
                creationRate ++;
@@ -3114,13 +3173,17 @@ LogB.SQL("5" + tableName);
        }
 
 
-       public static void DeleteFromName(bool dbconOpened, string tableName, string name)
+       public static void DeleteFromName(bool dbconOpened, string tableName, string searchName)
+       {
+               DeleteFromName(dbconOpened, tableName, "name", searchName);
+       }
+       public static void DeleteFromName(bool dbconOpened, string tableName, string colName, string 
searchName)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
 
                dbcmd.CommandText = "DELETE FROM " + tableName +
-                       " WHERE name == \"" + name + "\"";
+                       " WHERE " + colName + " = \"" + searchName + "\"";
                LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
                
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 562e161..3f44fbc 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -109,8 +109,9 @@ class SqlitePreferences : Sqlite
                                Insert ("encoderAutoSaveCurve", 
Constants.EncoderAutoSaveCurve.BEST.ToString(), dbcmdTr); 
                                Insert ("email", "", dbcmdTr);
                                
-                               //last encoderConfiguration, to be used on next session
-                               Insert ("encoderConfiguration", new 
EncoderConfiguration().ToStringOutput(EncoderConfiguration.Outputs.SQL), dbcmdTr);
+                               //removed on 1.37
+                               //Insert ("encoderConfiguration", new 
EncoderConfiguration().ToStringOutput(EncoderConfiguration.Outputs.SQL), dbcmdTr);
+
                        }
                        tr.Commit();
                }


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