[chronojump] Test types can be deleted



commit c5caaa559f93064ad7c1d21a528de62833673c1f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Nov 22 00:23:51 2009 +0100

    Test types can be deleted
    Also started changing icons on menu to work on glade-3, check how they display on windows

 chronojump_server/bin/chronojumpServer.dll |  Bin 273920 -> 274944 bytes
 glade/chronojump.glade                     |  285 ++++++++++++++++++++++++++--
 src/exportSession.cs                       |    4 +-
 src/gui/chronojump.cs                      |   33 +++-
 src/gui/event.cs                           |   70 +++++++-
 src/gui/jump.cs                            |   93 ++++++---
 src/gui/person.cs                          |    2 +-
 src/gui/report.cs                          |    3 +
 src/gui/run.cs                             |   86 ++++++---
 src/report.cs                              |    4 +-
 src/server.cs                              |    4 +-
 src/sqlite/jump.cs                         |    7 +-
 src/sqlite/jumpRj.cs                       |   13 +-
 src/sqlite/jumpType.cs                     |   10 +
 src/sqlite/run.cs                          |    8 +-
 src/sqlite/runInterval.cs                  |   13 +-
 src/sqlite/runType.cs                      |   12 +-
 src/util.cs                                |    9 +-
 src/utilGtk.cs                             |    2 -
 19 files changed, 554 insertions(+), 104 deletions(-)
---
diff --git a/chronojump_server/bin/chronojumpServer.dll b/chronojump_server/bin/chronojumpServer.dll
index cd1cb86..3c5e68c 100755
Binary files a/chronojump_server/bin/chronojumpServer.dll and b/chronojump_server/bin/chronojumpServer.dll differ
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index ad0c191..88a661b 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -2733,8 +2733,8 @@ weight</property>
     </child>
   </widget>
   <widget class="GtkWindow" id="jumps_runs_more">
-    <property name="width_request">450</property>
-    <property name="height_request">300</property>
+    <property name="width_request">500</property>
+    <property name="height_request">350</property>
     <property name="visible">True</property>
     <property name="border_width">10</property>
     <property name="title" translatable="yes">More</property>
@@ -2744,7 +2744,8 @@ weight</property>
     <child>
       <widget class="GtkVBox" id="vbox26">
         <property name="visible">True</property>
-        <property name="spacing">6</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">10</property>
         <child>
           <widget class="GtkScrolledWindow" id="scrolledwindow12">
             <property name="visible">True</property>
@@ -2798,6 +2799,59 @@ weight</property>
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <widget class="GtkButton" id="button_close">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_button_cancel_clicked"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button_delete_type">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <signal name="clicked" handler="on_button_delete_type_clicked"/>
+                <child>
+                  <widget class="GtkHBox" id="hbox1">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImage" id="image1">
+                        <property name="visible">True</property>
+                        <property name="stock">gtk-delete</property>
+                      </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label_delete_type">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Delete type</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
           </widget>
           <packing>
             <property name="expand">False</property>
@@ -5486,6 +5540,7 @@ suitable for agility tests)</property>
     <child>
       <widget class="GtkVBox" id="vbox50">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">8</property>
         <child>
           <widget class="GtkLabel" id="label170">
@@ -5510,6 +5565,7 @@ suitable for agility tests)</property>
                 <child>
                   <widget class="GtkVBox" id="vbox108">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <child>
                       <widget class="GtkLabel" id="label175">
                         <property name="visible">True</property>
@@ -5819,20 +5875,56 @@ suitable for agility tests)</property>
                     <child>
                       <widget class="GtkVBox" id="vbox54">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
                           <widget class="GtkVButtonBox" id="vbuttonbox3">
                             <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">4</property>
                             <property name="layout_style">start</property>
                             <child>
                               <widget class="GtkButton" id="button_up">
-                                <property name="label">gtk-go-up</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="can_default">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="use_stock">True</property>
                                 <signal name="clicked" handler="on_button_up_clicked"/>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment2">
+                                    <property name="visible">True</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox2">
+                                        <property name="visible">True</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image2">
+                                            <property name="visible">True</property>
+                                            <property name="stock">gtk-go-up</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="label2">
+                                            <property name="visible">True</property>
+                                            <property name="label" translatable="yes">Up</property>
+                                            <property name="use_underline">True</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
@@ -5842,13 +5934,48 @@ suitable for agility tests)</property>
                             </child>
                             <child>
                               <widget class="GtkButton" id="button_down">
-                                <property name="label">gtk-go-down</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="can_default">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="use_stock">True</property>
+                                <property name="image_position">right</property>
                                 <signal name="clicked" handler="on_button_down_clicked"/>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment1">
+                                    <property name="visible">True</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox1">
+                                        <property name="visible">True</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image1">
+                                            <property name="visible">True</property>
+                                            <property name="stock">gtk-go-down</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="label1">
+                                            <property name="visible">True</property>
+                                            <property name="label" translatable="yes">Down</property>
+                                            <property name="use_underline">True</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
@@ -5957,13 +6084,46 @@ suitable for agility tests)</property>
                             </child>
                             <child>
                               <widget class="GtkButton" id="button_delete">
-                                <property name="label">gtk-remove</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="can_default">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="use_stock">True</property>
                                 <signal name="clicked" handler="on_button_delete_clicked"/>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment3">
+                                    <property name="visible">True</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox3">
+                                        <property name="visible">True</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image_report_delete">
+                                            <property name="visible">True</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="label3">
+                                            <property name="visible">True</property>
+                                            <property name="label" translatable="yes">Remove</property>
+                                            <property name="use_underline">True</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
@@ -6393,6 +6553,7 @@ suitable for agility tests)</property>
     <child>
       <widget class="GtkVBox" id="vbox69">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <child>
           <widget class="GtkMenuBar" id="menubar1">
             <property name="visible">True</property>
@@ -6894,9 +7055,47 @@ suitable for agility tests)</property>
                       <widget class="GtkImageMenuItem" id="menuitem_jump_type_add">
                         <property name="label">Add jump type</property>
                         <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
+                        <property name="use_stock">False</property>
                         <signal name="activate" handler="on_jump_type_add_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image5">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-new</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separador2">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem_jump_type_delete_simple">
+                        <property name="label">Delete simple jump type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_jump_type_delete_simple_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image1">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-delete</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem_jump_type_delete_reactive">
+                        <property name="label">Delete reactive jump type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_jump_type_delete_reactive_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image4">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-delete</property>
+                          </widget>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -7155,9 +7354,47 @@ suitable for agility tests)</property>
                       <widget class="GtkImageMenuItem" id="menuitem_run_type_add">
                         <property name="label">Add run type</property>
                         <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
+                        <property name="use_stock">False</property>
                         <signal name="activate" handler="on_run_type_add_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image6">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-new</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separador1">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem_run_type_delete_simple">
+                        <property name="label">Delete simple run type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_run_type_delete_simple_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image2">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-delete</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem_run_type_delete_intervallic">
+                        <property name="label">Delete intervallic run type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_run_type_delete_intervallic_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image3">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-delete</property>
+                          </widget>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -7349,6 +7586,7 @@ suitable for agility tests)</property>
         <child>
           <widget class="GtkVBox" id="vbox_principal">
             <property name="visible">True</property>
+            <property name="orientation">vertical</property>
             <child>
               <widget class="GtkHBox" id="hbox1">
                 <property name="visible">True</property>
@@ -7356,6 +7594,7 @@ suitable for agility tests)</property>
                   <widget class="GtkVBox" id="vbox65">
                     <property name="width_request">190</property>
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <child>
                       <widget class="GtkFrame" id="frame_persons">
                         <property name="visible">True</property>
@@ -7368,6 +7607,7 @@ suitable for agility tests)</property>
                             <child>
                               <widget class="GtkVBox" id="vbox66">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">4</property>
                                 <child>
                                   <widget class="GtkHBox" id="hbox126">
@@ -7591,6 +7831,7 @@ suitable for agility tests)</property>
                     <child>
                       <widget class="GtkVBox" id="vbox20">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
                           <widget class="GtkFrame" id="frame36">
                             <property name="visible">True</property>
@@ -7969,6 +8210,7 @@ suitable for agility tests)</property>
                     <child>
                       <widget class="GtkVBox" id="vbox21">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">2</property>
                         <child>
                           <widget class="GtkFrame" id="frame37">
@@ -8396,6 +8638,7 @@ suitable for agility tests)</property>
                     <child>
                       <widget class="GtkVBox" id="vbox34">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
                           <widget class="GtkFrame" id="frame38">
                             <property name="visible">True</property>
@@ -8892,6 +9135,7 @@ suitable for agility tests)</property>
                     <child>
                       <widget class="GtkVBox" id="vbox36">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
                           <widget class="GtkFrame" id="frame39">
                             <property name="visible">True</property>
@@ -9257,6 +9501,7 @@ suitable for agility tests)</property>
                     <child>
                       <widget class="GtkVBox" id="vbox93">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
                           <widget class="GtkFrame" id="frame22">
                             <property name="visible">True</property>
@@ -9428,6 +9673,7 @@ suitable for agility tests)</property>
                     <child>
                       <widget class="GtkVBox" id="vbox67">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
                           <widget class="GtkFrame" id="frame40">
                             <property name="visible">True</property>
@@ -9663,6 +9909,7 @@ suitable for agility tests)</property>
                     <child>
                       <widget class="GtkVBox" id="vbox169">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">4</property>
                         <child>
                           <widget class="GtkFrame" id="frame44">
@@ -10172,6 +10419,7 @@ suitable for agility tests)</property>
                             <child>
                               <widget class="GtkVBox" id="vbox171">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <child>
                                   <widget class="GtkButton" id="button_multi_chronopic_zoom">
                                     <property name="visible">True</property>
@@ -10981,6 +11229,7 @@ suitable for agility tests)</property>
             <property name="visible">True</property>
           </widget>
           <packing>
+            <property name="expand">False</property>
             <property name="position">2</property>
           </packing>
         </child>
@@ -14235,7 +14484,7 @@ Test&lt;/b&gt;</property>
                                       <widget class="GtkSpinButton" id="spinbutton_tf_greater">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="adjustment">0.59999996423699997 0 1 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
+                                        <property name="adjustment">0.59999998658880005 0 1 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
                                         <property name="climb_rate">1</property>
                                         <property name="digits">2</property>
                                         <property name="snap_to_ticks">True</property>
@@ -14254,7 +14503,7 @@ Test&lt;/b&gt;</property>
                                       <widget class="GtkSpinButton" id="spinbutton_tf_lower">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="adjustment">0.30000001192100001 0 1 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
+                                        <property name="adjustment">0.29999999329440002 0 1 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
                                         <property name="climb_rate">1</property>
                                         <property name="digits">2</property>
                                         <property name="snap_to_ticks">True</property>
@@ -14273,7 +14522,7 @@ Test&lt;/b&gt;</property>
                                       <widget class="GtkSpinButton" id="spinbutton_tc_greater">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="adjustment">0.30000001192100001 0 1 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
+                                        <property name="adjustment">0.29999999329440002 0 1 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
                                         <property name="climb_rate">1</property>
                                         <property name="digits">2</property>
                                         <property name="snap_to_ticks">True</property>
@@ -14292,7 +14541,7 @@ Test&lt;/b&gt;</property>
                                       <widget class="GtkSpinButton" id="spinbutton_tc_lower">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="adjustment">0.20000000298000001 0 1 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
+                                        <property name="adjustment">0.19999999552960002 0 1 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
                                         <property name="climb_rate">1</property>
                                         <property name="digits">2</property>
                                         <property name="snap_to_ticks">True</property>
@@ -14330,7 +14579,7 @@ Test&lt;/b&gt;</property>
                                       <widget class="GtkSpinButton" id="spinbutton_tf_tc_lower">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="adjustment">1 0 6 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
+                                        <property name="adjustment">0.99999997764800008 0 6 0.0099999997764800008 0.0099999997764800008 0.0099999997764800008</property>
                                         <property name="climb_rate">1</property>
                                         <property name="digits">2</property>
                                         <property name="snap_to_ticks">True</property>
diff --git a/src/exportSession.cs b/src/exportSession.cs
index 92e1cb9..a899614 100644
--- a/src/exportSession.cs
+++ b/src/exportSession.cs
@@ -165,9 +165,9 @@ public class ExportSession
 	{
 		myPersons = SqlitePersonSession.SelectCurrentSession(mySession.UniqueID, false, false); //not onlyIDAndName, not reversed
 		myJumps= SqliteJump.SelectJumps(mySession.UniqueID, -1, "", "");
-		myJumpsRj = SqliteJumpRj.SelectJumps(mySession.UniqueID, -1, "");
+		myJumpsRj = SqliteJumpRj.SelectJumps(mySession.UniqueID, -1, "", "");
 		myRuns= SqliteRun.SelectRuns(mySession.UniqueID, -1, "");
-		myRunsInterval = SqliteRunInterval.SelectRuns(mySession.UniqueID, -1);
+		myRunsInterval = SqliteRunInterval.SelectRuns(mySession.UniqueID, -1, "");
 		myReactionTimes = SqliteReactionTime.SelectReactionTimes(mySession.UniqueID, -1);
 		myPulses = SqlitePulse.SelectPulses(mySession.UniqueID, -1);
 		myMCs = SqliteMultiChronopic.SelectTests(mySession.UniqueID, -1);
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 04f82ba..5bf9e79 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -1328,7 +1328,7 @@ public class ChronoJumpWindow
 
 	private void fillTreeView_jumps_rj (string filter) {
 		string [] myJumps;
-		myJumps = SqliteJumpRj.SelectJumps(currentSession.UniqueID, -1, "");
+		myJumps = SqliteJumpRj.SelectJumps(currentSession.UniqueID, -1, "", "");
 		myTreeViewJumpsRj.Fill(myJumps, filter);
 
 		expandOrMinimizeTreeView((TreeViewEvent) myTreeViewJumpsRj, treeview_jumps_rj);
@@ -1466,7 +1466,7 @@ public class ChronoJumpWindow
 	}
 
 	private void fillTreeView_runs_interval (string filter) {
-		string [] myRuns = SqliteRunInterval.SelectRuns(currentSession.UniqueID, -1);
+		string [] myRuns = SqliteRunInterval.SelectRuns(currentSession.UniqueID, -1, "");
 		myTreeViewRunsInterval.Fill(myRuns, filter);
 		expandOrMinimizeTreeView((TreeViewEvent) myTreeViewRunsInterval, treeview_runs_interval);
 	}
@@ -3097,7 +3097,7 @@ Console.WriteLine("X");
 
 	private void on_button_more_clicked (object o, EventArgs args) 
 	{
-		jumpsMoreWin = JumpsMoreWindow.Show(app1);
+		jumpsMoreWin = JumpsMoreWindow.Show(app1, true);
 		jumpsMoreWin.Button_accept.Clicked += new EventHandler(on_more_jumps_accepted);
 		jumpsMoreWin.Button_selected.Clicked += new EventHandler(on_more_jumps_draw_image_test);
 	}
@@ -3302,7 +3302,7 @@ Console.WriteLine("X");
 	
 	private void on_button_more_rj_clicked (object o, EventArgs args) 
 	{
-		jumpsRjMoreWin = JumpsRjMoreWindow.Show(app1);
+		jumpsRjMoreWin = JumpsRjMoreWindow.Show(app1, true);
 		jumpsRjMoreWin.Button_accept.Clicked += new EventHandler(on_more_jumps_rj_accepted);
 		jumpsRjMoreWin.Button_selected.Clicked += new EventHandler(on_more_jumps_rj_draw_image_test);
 	}
@@ -3518,7 +3518,7 @@ Console.WriteLine("X");
 	
 	private void on_button_run_more_clicked (object o, EventArgs args) 
 	{
-		runsMoreWin = RunsMoreWindow.Show(app1);
+		runsMoreWin = RunsMoreWindow.Show(app1, true);
 		runsMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_accepted);
 		runsMoreWin.Button_selected.Clicked += new EventHandler(on_more_runs_draw_image_test);
 	}
@@ -3715,7 +3715,7 @@ Console.WriteLine("X");
 
 	private void on_button_run_interval_more_clicked (object o, EventArgs args) 
 	{
-		runsIntervalMoreWin = RunsIntervalMoreWindow.Show(app1);
+		runsIntervalMoreWin = RunsIntervalMoreWindow.Show(app1, true);
 		runsIntervalMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_interval_accepted);
 		runsIntervalMoreWin.Button_selected.Clicked += new EventHandler(on_more_runs_interval_draw_image_test);
 	}
@@ -4947,6 +4947,27 @@ Console.WriteLine("X");
 	}
 
 	/* ---------------------------------------------------------
+	 * ----------------  EVENTS TYPE DELETE --------------------
+	 *  --------------------------------------------------------
+	 */
+
+	private void on_jump_type_delete_simple_activate (object o, EventArgs args) {
+		jumpsMoreWin = JumpsMoreWindow.Show(app1, false); //delete jump type
+	}
+	
+	private void on_jump_type_delete_reactive_activate (object o, EventArgs args) {
+		jumpsRjMoreWin = JumpsRjMoreWindow.Show(app1, false); //delete jump type
+	}
+	
+	private void on_run_type_delete_simple_activate (object o, EventArgs args) {
+		runsMoreWin = RunsMoreWindow.Show(app1, false); //delete run type
+	}
+	
+	private void on_run_type_delete_intervallic_activate (object o, EventArgs args) {
+		runsIntervalMoreWin = RunsIntervalMoreWindow.Show(app1, false); //delete run type
+	}
+
+	/* ---------------------------------------------------------
 	 * ----------------  EVENTS REPAIR -------------------------
 	 *  --------------------------------------------------------
 	 */
diff --git a/src/gui/event.cs b/src/gui/event.cs
index a7406cf..1a629b9 100644
--- a/src/gui/event.cs
+++ b/src/gui/event.cs
@@ -463,18 +463,14 @@ public class EditEventWindow
 	
 	void on_button_accept_clicked (object o, EventArgs args)
 	{
-		Log.WriteLine("a");
 		int eventID = Convert.ToInt32 ( label_event_id_value.Text );
-		Log.WriteLine("a2");
 		string myPerson = UtilGtk.ComboGetActive(combo_persons);
 		string [] myPersonFull = myPerson.Split(new char[] {':'});
 		
 		string myDesc = entry_description.Text;
 		
 
-		Log.WriteLine("b");
 		updateEvent(eventID, Convert.ToInt32(myPersonFull[0]), myDesc);
-		Log.WriteLine("c");
 
 		hideWindow();
 	}
@@ -500,17 +496,22 @@ public class EventMoreWindow
 	protected TreeStore store;
 	[Widget] protected Gtk.TreeView treeview_more;
 	[Widget] protected Gtk.Button button_accept;
+	[Widget] protected Gtk.Button button_delete_type;
+	[Widget] protected Gtk.Button button_cancel;
+	[Widget] protected Gtk.Button button_close;
 	protected Gtk.Window parent;
 
 	protected string selectedEventType;
 	protected string selectedEventName;
 	protected string selectedDescription;
 	public Gtk.Button button_selected;
+	
+	protected bool testOrDelete; //are we going to do a test or to delete a test type (test is true)
 
 	public EventMoreWindow () {
 	}
 
-	public EventMoreWindow (Gtk.Window parent) {
+	public EventMoreWindow (Gtk.Window parent, bool testOrDelete) {
 		/*
 		Glade.XML gladeXML;
 		gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jumps_runs_more", null);
@@ -532,7 +533,15 @@ public class EventMoreWindow
 		treeview_more.Model = store;
 		fillTreeView(treeview_more,store);
 
+		//when executing test: show accept and cancel
+		button_accept.Visible = testOrDelete;
+		button_cancel.Visible = testOrDelete;
+		//when deleting test type: show delete type and close
+		button_delete_type.Visible = ! testOrDelete;
+		button_close.Visible = ! testOrDelete;
+
 		button_accept.Sensitive = false;
+		button_delete_type.Sensitive = false;
 		 
 		treeview_more.Selection.Changed += onSelectionEntry;
 	}
@@ -568,6 +577,57 @@ public class EventMoreWindow
 	{
 	}
 	
+	void on_button_delete_type_clicked (object o, EventArgs args)
+	{
+		/*
+		//search for events of that type on db
+		if(selectedEventType == EventType.Types.JUMP.ToString())
+			tests = SqliteJump.SelectJumps(-1, -1, "", selectedEventName); 
+		else //RUN
+			tests = SqliteRun.SelectRuns(-1, -1, selectedEventName); 
+		*/
+		string [] tests = findTestTypesInSessions();
+
+		//this will be much better doing a select distinct(session) instead of using SelectJumps or Runs
+		ArrayList sessionValues = new ArrayList();
+		foreach(string t in tests) {
+			string [] tFull = t.Split(new char[] {':'});
+			Util.AddToArrayListIfNotExist(sessionValues, tFull[3]);
+		}
+
+		//if exist tell user to edit or delete them
+		if(tests.Length > 0) 
+			new DialogMessage(Constants.MessageTypes.WARNING, 
+					Catalog.GetString("There are tests of that type on database on sessions:") + "\n" +
+					Util.ArrayListToSingleString(sessionValues, ", ") + "\n\n" +
+					Catalog.GetString("please first edit or delete them."));
+		else {
+			ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you want to delete this test type?"), "", selectedEventName);
+			confirmWin.Button_accept.Clicked += new EventHandler(on_button_delete_type_accepted);
+		}
+	}
+	
+	protected void on_button_delete_type_accepted (object o, EventArgs args)
+	{
+		if(selectedEventType == EventType.Types.JUMP.ToString())
+			SqliteJumpType.Delete(selectedEventName);
+		else //RUN
+			SqliteRunType.Delete(selectedEventName);
+
+		TreeModel model;
+		TreeIter iter;
+		if (treeview_more.Selection.GetSelected (out model, out iter)) 
+			store.Remove(ref iter);
+
+		button_delete_type.Sensitive = false;
+	}
+
+	///this should be abstract
+	protected virtual string [] findTestTypesInSessions() {
+		string [] nothing = new String[0];
+		return nothing;
+	}
+	
 	//fired when something is selected for drawing on imageTest
 	public Button Button_selected
 	{
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index 32e38d2..24452b4 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -986,11 +986,15 @@ public class JumpsMoreWindow : EventMoreWindow
 	private bool selectedStartIn;
 	private bool selectedExtraWeight;
 
-	public JumpsMoreWindow (Gtk.Window parent) {
+	public JumpsMoreWindow (Gtk.Window parent, bool testOrDelete) {
 		Glade.XML gladeXML;
 		gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jumps_runs_more", null);
 		gladeXML.Autoconnect(this);
 		this.parent = parent;
+		this.testOrDelete = testOrDelete;
+		
+		if(!testOrDelete)
+			jumps_runs_more.Title = Catalog.GetString("Delete test type defined by user");
 		
 		//put an icon to window
 		UtilGtk.IconWindow(jumps_runs_more);
@@ -1003,10 +1007,10 @@ public class JumpsMoreWindow : EventMoreWindow
 		initializeThings();
 	}
 	
-	static public JumpsMoreWindow Show (Gtk.Window parent)
+	static public JumpsMoreWindow Show (Gtk.Window parent, bool testOrDelete)
 	{
 		if (JumpsMoreWindowBox == null) {
-			JumpsMoreWindowBox = new JumpsMoreWindow (parent);
+			JumpsMoreWindowBox = new JumpsMoreWindow (parent, testOrDelete);
 		}
 		JumpsMoreWindowBox.jumps_runs_more.Show ();
 		
@@ -1043,14 +1047,16 @@ public class JumpsMoreWindow : EventMoreWindow
 			JumpType tempType = new JumpType (myStringFull[1]);
 			string description  = getDescriptionLocalised(tempType, myStringFull[4]);
 
-
-			store.AppendValues (
-					//myStringFull[0], //don't display de uniqueID
-					myStringFull[1],	//name 
-					myStringFull[2], 	//startIn
-					myStringFull[3], 	//weight
-					description
-					);
+			//if we are going to execute: show all types
+			//if we are going to delete: show user defined types
+			if(testOrDelete || ! tempType.IsPredefined)
+				store.AppendValues (
+						//myStringFull[0], //don't display de uniqueID
+						myStringFull[1],	//name 
+						myStringFull[2], 	//startIn
+						myStringFull[3], 	//weight
+						description
+						);
 		}	
 	}
 
@@ -1072,15 +1078,21 @@ public class JumpsMoreWindow : EventMoreWindow
 			}
 			selectedDescription = (string) model.GetValue (iter, 3);
 
-			button_accept.Sensitive = true;
-			
-			//update graph image test on main window
-			button_selected.Click();
+			if(testOrDelete) {
+				button_accept.Sensitive = true;
+				//update graph image test on main window
+				button_selected.Click();
+			} else
+				button_delete_type.Sensitive = true;
 		}
 	}
 	
 	protected override void on_row_double_clicked (object o, Gtk.RowActivatedArgs args)
 	{
+		//return if we are to delete a test
+		if(!testOrDelete)
+			return;
+
 		TreeView tv = (TreeView) o;
 		TreeModel model;
 		TreeIter iter;
@@ -1101,6 +1113,10 @@ public class JumpsMoreWindow : EventMoreWindow
 		}
 	}
 	
+	protected override string [] findTestTypesInSessions() {
+		return SqliteJump.SelectJumps(-1, -1, "", selectedEventName); 
+	}
+	
 	void on_button_cancel_clicked (object o, EventArgs args)
 	{
 		JumpsMoreWindowBox.jumps_runs_more.Hide();
@@ -1155,12 +1171,16 @@ public class JumpsRjMoreWindow : EventMoreWindow
 	private double selectedLimitedValue;
 	private bool selectedUnlimited;
 	
-	public JumpsRjMoreWindow (Gtk.Window parent) {
+	public JumpsRjMoreWindow (Gtk.Window parent, bool testOrDelete) {
 		//the glade window is the same as jumps_more
 		Glade.XML gladeXML;
 		gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jumps_runs_more", null);
 		gladeXML.Autoconnect(this);
 		this.parent = parent;
+		this.testOrDelete = testOrDelete;
+		
+		if(!testOrDelete)
+			jumps_runs_more.Title = Catalog.GetString("Delete test type defined by user");
 		
 		//put an icon to window
 		UtilGtk.IconWindow(jumps_runs_more);
@@ -1177,10 +1197,10 @@ public class JumpsRjMoreWindow : EventMoreWindow
 		initializeThings();
 	}
 	
-	static public JumpsRjMoreWindow Show (Gtk.Window parent)
+	static public JumpsRjMoreWindow Show (Gtk.Window parent, bool testOrDelete)
 	{
 		if (JumpsRjMoreWindowBox == null) {
-			JumpsRjMoreWindowBox = new JumpsRjMoreWindow (parent);
+			JumpsRjMoreWindowBox = new JumpsRjMoreWindow (parent, testOrDelete);
 		}
 		JumpsRjMoreWindowBox.jumps_runs_more.Show ();
 		
@@ -1237,15 +1257,18 @@ public class JumpsRjMoreWindow : EventMoreWindow
 			JumpType tempType = new JumpType (myStringFull[1]);
 			string description  = getDescriptionLocalised(tempType, myStringFull[6]);
 
-			store.AppendValues (
-					//myStringFull[0], //don't display de uniqueID
-					myStringFull[1],	//name 
-					myLimiter,		//jumps or seconds		
-					myLimiterValue,		//? or exact value
-					myStringFull[2], 	//startIn
-					myStringFull[3], 	//weight
-					description
-					);
+			//if we are going to execute: show all types
+			//if we are going to delete: show user defined types
+			if(testOrDelete || ! tempType.IsPredefined)
+				store.AppendValues (
+						//myStringFull[0], //don't display de uniqueID
+						myStringFull[1],	//name 
+						myLimiter,		//jumps or seconds		
+						myLimiterValue,		//? or exact value
+						myStringFull[2], 	//startIn
+						myStringFull[3], 	//weight
+						description
+						);
 		}	
 	}
 
@@ -1289,14 +1312,21 @@ public class JumpsRjMoreWindow : EventMoreWindow
 			}
 			selectedDescription = (string) model.GetValue (iter, 5);
 
-			button_accept.Sensitive = true;
-			//update graph image test on main window
-			button_selected.Click();
+			if(testOrDelete) {
+				button_accept.Sensitive = true;
+				//update graph image test on main window
+				button_selected.Click();
+			} else
+				button_delete_type.Sensitive = true;
 		}
 	}
 	
 	protected override void on_row_double_clicked (object o, Gtk.RowActivatedArgs args)
 	{
+		//return if we are to delete a test
+		if(!testOrDelete)
+			return;
+
 		TreeView tv = (TreeView) o;
 		TreeModel model;
 		TreeIter iter;
@@ -1334,6 +1364,9 @@ public class JumpsRjMoreWindow : EventMoreWindow
 		}
 	}
 	
+	protected override string [] findTestTypesInSessions() {
+		return SqliteJumpRj.SelectJumps(-1, -1, "", selectedEventName); 
+	}
 	
 	void on_button_cancel_clicked (object o, EventArgs args)
 	{
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 5f11c55..d8abb2e 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -1378,7 +1378,7 @@ public class PersonAddModifyWindow
 			if(!adding && (int) spinbutton_weight.Value != weightIni) {
 				//see if this person has done jumps with weight
 				string [] myJumpsNormal = SqliteJump.SelectJumps(currentSession.UniqueID, personID, "withWeight", "");
-				string [] myJumpsReactive = SqliteJumpRj.SelectJumps(currentSession.UniqueID, personID, "withWeight");
+				string [] myJumpsReactive = SqliteJumpRj.SelectJumps(currentSession.UniqueID, personID, "withWeight", "");
 
 				if(myJumpsNormal.Length > 0 || myJumpsReactive.Length > 0) {
 					//create the convertWeight Window
diff --git a/src/gui/report.cs b/src/gui/report.cs
index 48b2668..d1e7914 100644
--- a/src/gui/report.cs
+++ b/src/gui/report.cs
@@ -48,6 +48,7 @@ public class ReportWindow {
 	[Widget] Gtk.CheckButton cb_pulses;
 	[Widget] Gtk.Image image_report_win_graph;
 	[Widget] Gtk.Image image_report_win_report;
+	[Widget] Gtk.Image image_report_delete;
 	
 	GenericWindow genericWin;
 	
@@ -124,6 +125,8 @@ public class ReportWindow {
 		image_report_win_graph.Pixbuf = pixbuf;
 		pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_task-assigned.png");
 		image_report_win_report.Pixbuf = pixbuf;
+		pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_delete.png");
+		image_report_delete.Pixbuf = pixbuf;
 	}
 	
 	private void createTreeView (Gtk.TreeView tv) {
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 50ce5cc..018f158 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -969,11 +969,15 @@ public class RunsMoreWindow : EventMoreWindow
 	
 	private double selectedDistance;
 	
-	RunsMoreWindow (Gtk.Window parent) {
+	RunsMoreWindow (Gtk.Window parent, bool testOrDelete) {
 		Glade.XML gladeXML;
 		gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jumps_runs_more", null);
 		gladeXML.Autoconnect(this);
 		this.parent = parent;
+		this.testOrDelete = testOrDelete;
+		
+		if(!testOrDelete)
+			jumps_runs_more.Title = Catalog.GetString("Delete test type defined by user");
 		
 		//put an icon to window
 		UtilGtk.IconWindow(jumps_runs_more);
@@ -985,10 +989,10 @@ public class RunsMoreWindow : EventMoreWindow
 		initializeThings();
 	}
 	
-	static public RunsMoreWindow Show (Gtk.Window parent)
+	static public RunsMoreWindow Show (Gtk.Window parent, bool testOrDelete)
 	{
 		if (RunsMoreWindowBox == null) {
-			RunsMoreWindowBox = new RunsMoreWindow (parent);
+			RunsMoreWindowBox = new RunsMoreWindow (parent, testOrDelete);
 		}
 		RunsMoreWindowBox.jumps_runs_more.Show ();
 		
@@ -1017,12 +1021,15 @@ public class RunsMoreWindow : EventMoreWindow
 			RunType tempType = new RunType (myStringFull[1]);
 			string description  = getDescriptionLocalised(tempType, myStringFull[3]);
 
-			store.AppendValues (
-					//myStringFull[0], //don't display the uniqueID
-					myStringFull[1],	//name 
-					myStringFull[2], 	//distance
-					description
-					);
+			//if we are going to execute: show all types
+			//if we are going to delete: show user defined types
+			if(testOrDelete || ! tempType.IsPredefined)
+				store.AppendValues (
+						//myStringFull[0], //don't display the uniqueID
+						myStringFull[1],	//name 
+						myStringFull[2], 	//distance
+						description
+						);
 		}	
 	}
 
@@ -1043,14 +1050,21 @@ public class RunsMoreWindow : EventMoreWindow
 			}
 			selectedDescription = (string) model.GetValue (iter, 2);
 			
-			button_accept.Sensitive = true;
-			//update graph image test on main window
-			button_selected.Click();
+			if(testOrDelete) {
+				button_accept.Sensitive = true;
+				//update graph image test on main window
+				button_selected.Click();
+			} else
+				button_delete_type.Sensitive = true;
 		}
 	}
 	
 	protected override void on_row_double_clicked (object o, Gtk.RowActivatedArgs args)
 	{
+		//return if we are to delete a test
+		if(!testOrDelete)
+			return;
+
 		TreeView tv = (TreeView) o;
 		TreeModel model;
 		TreeIter iter;
@@ -1070,6 +1084,9 @@ public class RunsMoreWindow : EventMoreWindow
 		}
 	}
 	
+	protected override string [] findTestTypesInSessions() {
+		return SqliteRun.SelectRuns(-1, -1, selectedEventName); 
+	}
 	void on_button_cancel_clicked (object o, EventArgs args)
 	{
 		RunsMoreWindowBox.jumps_runs_more.Hide();
@@ -1114,12 +1131,16 @@ public class RunsIntervalMoreWindow : EventMoreWindow
 	private bool selectedUnlimited;
 	private string selectedDistancesString;
 	
-	RunsIntervalMoreWindow (Gtk.Window parent) {
+	RunsIntervalMoreWindow (Gtk.Window parent, bool testOrDelete) {
 		//the glade window is the same as jumps_more
 		Glade.XML gladeXML;
 		gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jumps_runs_more", null);
 		gladeXML.Autoconnect(this);
 		this.parent = parent;
+		this.testOrDelete = testOrDelete;
+		
+		if(!testOrDelete)
+			jumps_runs_more.Title = Catalog.GetString("Delete test type defined by user");
 		
 		//put an icon to window
 		UtilGtk.IconWindow(jumps_runs_more);
@@ -1132,10 +1153,10 @@ public class RunsIntervalMoreWindow : EventMoreWindow
 		initializeThings();
 	}
 	
-	static public RunsIntervalMoreWindow Show (Gtk.Window parent)
+	static public RunsIntervalMoreWindow Show (Gtk.Window parent, bool testOrDelete)
 	{
 		if (RunsIntervalMoreWindowBox == null) {
-			RunsIntervalMoreWindowBox = new RunsIntervalMoreWindow (parent);
+			RunsIntervalMoreWindowBox = new RunsIntervalMoreWindow (parent, testOrDelete);
 		}
 		RunsIntervalMoreWindowBox.jumps_runs_more.Show ();
 		
@@ -1189,14 +1210,17 @@ public class RunsIntervalMoreWindow : EventMoreWindow
 			RunType tempType = new RunType (myStringFull[1]);
 			string description  = getDescriptionLocalised(tempType, myStringFull[6]);
 
-			store.AppendValues (
-					//myStringFull[0], //don't display de uniqueID
-					myStringFull[1],	//name 
-					distance,		
-					myLimiter,		//tracks or seconds or "unlimited"
-					myLimiterValue,		//? or exact value (or '-' in unlimited)
-					description
-					);
+			//if we are going to execute: show all types
+			//if we are going to delete: show user defined types
+			if(testOrDelete || ! tempType.IsPredefined)
+				store.AppendValues (
+						//myStringFull[0], //don't display de uniqueID
+						myStringFull[1],	//name 
+						distance,		
+						myLimiter,		//tracks or seconds or "unlimited"
+						myLimiterValue,		//? or exact value (or '-' in unlimited)
+						description
+						);
 		}	
 	}
 
@@ -1248,14 +1272,21 @@ public class RunsIntervalMoreWindow : EventMoreWindow
 		
 			selectedDescription = (string) model.GetValue (iter, 4);
 
-			button_accept.Sensitive = true;
-			//update graph image test on main window
-			button_selected.Click();
+			if(testOrDelete) {
+				button_accept.Sensitive = true;
+				//update graph image test on main window
+				button_selected.Click();
+			} else
+				button_delete_type.Sensitive = true;
 		}
 	}
 	
 	protected override void on_row_double_clicked (object o, Gtk.RowActivatedArgs args)
 	{
+		//return if we are to delete a test
+		if(!testOrDelete)
+			return;
+
 		TreeView tv = (TreeView) o;
 		TreeModel model;
 		TreeIter iter;
@@ -1296,6 +1327,9 @@ public class RunsIntervalMoreWindow : EventMoreWindow
 		}
 	}
 	
+	protected override string [] findTestTypesInSessions() {
+		return SqliteRunInterval.SelectRuns(-1, -1, selectedEventName); 
+	}
 	
 	void on_button_cancel_clicked (object o, EventArgs args)
 	{
diff --git a/src/report.cs b/src/report.cs
index d03df67..7948ab8 100644
--- a/src/report.cs
+++ b/src/report.cs
@@ -123,13 +123,13 @@ public class Report : ExportSession
 			myJumps= SqliteJump.SelectJumps(sessionID, -1, "", "");
 		}
 		if(ShowReactiveJumps) {
-			myJumpsRj = SqliteJumpRj.SelectJumps(sessionID, -1, "");
+			myJumpsRj = SqliteJumpRj.SelectJumps(sessionID, -1, "", "");
 		}
 		if(ShowSimpleRuns) {
 			myRuns= SqliteRun.SelectRuns(sessionID, -1, "");
 		}
 		if (ShowIntervalRuns) {
-			myRunsInterval = SqliteRunInterval.SelectRuns(sessionID, -1);
+			myRunsInterval = SqliteRunInterval.SelectRuns(sessionID, -1, "");
 		}
 		if(ShowReactionTimes) {
 			myReactionTimes= SqliteReactionTime.SelectReactionTimes(sessionID, -1);
diff --git a/src/server.cs b/src/server.cs
index c6b8009..82a9bb5 100644
--- a/src/server.cs
+++ b/src/server.cs
@@ -312,7 +312,7 @@ public class Server
 				countE = 0;					
 				countS = 0;					
 
-				string [] jumpsRj = SqliteJumpRj.SelectJumps(currentSession.UniqueID, person.UniqueID, "");
+				string [] jumpsRj = SqliteJumpRj.SelectJumps(currentSession.UniqueID, person.UniqueID, "", "");
 				foreach(string myJump in jumpsRj) {
 					string [] js = myJump.Split(new char[] {':'});
 					//select jump
@@ -396,7 +396,7 @@ public class Server
 				countE = 0;					
 				countS = 0;					
 
-				string [] runsI = SqliteRunInterval.SelectRuns(currentSession.UniqueID, person.UniqueID);
+				string [] runsI = SqliteRunInterval.SelectRuns(currentSession.UniqueID, person.UniqueID, "");
 				foreach(string myRun in runsI) {
 					string [] js = myRun.Split(new char[] {':'});
 					//select run
diff --git a/src/sqlite/jump.cs b/src/sqlite/jump.cs
index b4ef5d1..a165c19 100644
--- a/src/sqlite/jump.cs
+++ b/src/sqlite/jump.cs
@@ -88,10 +88,15 @@ class SqliteJump : Sqlite
 		return myLast;
 	}
 	
+	//if all sessions, put -1 in sessionID
 	//if all persons, put -1 in personID
 	//if all types put, "" in filterType
 	public static string[] SelectJumps(int sessionID, int personID, string filterWeight, string filterType) 
 	{
+		string filterSessionString = "";
+		if(sessionID != -1)
+			filterSessionString = " AND jump.sessionID == " + sessionID;
+
 		string filterPersonString = "";
 		if(personID != -1)
 			filterPersonString = " AND person.uniqueID == " + personID;
@@ -108,7 +113,7 @@ class SqliteJump : Sqlite
 		dbcmd.CommandText = "SELECT person.name, jump.*, personSessionWeight.weight " +
 			" FROM person, jump, personSessionWeight " +
 			" WHERE person.uniqueID == jump.personID " + 
-			" AND jump.sessionID == " + sessionID + 
+			filterSessionString +
 			filterPersonString +
 			filterWeightString +
 			filterTypeString +
diff --git a/src/sqlite/jumpRj.cs b/src/sqlite/jumpRj.cs
index fa34bbb..ed9f6a7 100644
--- a/src/sqlite/jumpRj.cs
+++ b/src/sqlite/jumpRj.cs
@@ -87,8 +87,12 @@ class SqliteJumpRj : SqliteJump
 		return myLast;
 	}
 
-	public new static string[] SelectJumps(int sessionID, int personID, string filterWeight) 
+	public new static string[] SelectJumps(int sessionID, int personID, string filterWeight, string filterType) 
 	{
+		string filterSessionString = "";
+		if(sessionID != -1)
+			filterSessionString = " AND jumpRj.sessionID == " + sessionID;
+
 		string filterPersonString = "";
 		if(personID != -1)
 			filterPersonString = " AND person.uniqueID == " + personID;
@@ -97,13 +101,18 @@ class SqliteJumpRj : SqliteJump
 		if(filterWeight == "withWeight")
 			filterWeightString = " AND jumpRj.weight != 0 ";
 
+		string filterTypeString = "";
+		if(filterType != "")
+			filterTypeString = " AND jumpRj.type == '" + filterType + "' ";
+
 		dbcon.Open();
 		dbcmd.CommandText = "SELECT person.name, jumpRj.*, personSessionWeight.weight " +
 			" FROM person, jumpRj, personSessionWeight " +
 			" WHERE person.uniqueID == jumpRj.personID" + 
-			" AND jumpRj.sessionID == " + sessionID + 
+			filterSessionString +
 			filterPersonString +
 			filterWeightString +
+			filterTypeString +
 			" AND personSessionWeight.personID == person.uniqueID " +
 			" AND personSessionWeight.sessionID == jumpRj.sessionID " +
 			" ORDER BY upper(person.name), jumpRj.uniqueID";
diff --git a/src/sqlite/jumpType.cs b/src/sqlite/jumpType.cs
index 605f73f..f6160f9 100644
--- a/src/sqlite/jumpType.cs
+++ b/src/sqlite/jumpType.cs
@@ -433,5 +433,15 @@ class SqliteJumpType : Sqlite
 		dbcmd.ExecuteNonQuery();
 		//dbcon.Close();
 	}
+	
+	public static void Delete(string name)
+	{
+		dbcon.Open();
+		dbcmd.CommandText = "Delete FROM " + Constants.JumpTypeTable +
+			" WHERE name == '" + name + "'";
+		Log.WriteLine(dbcmd.CommandText.ToString());
+		dbcmd.ExecuteNonQuery();
+		dbcon.Close();
+	}
 
 }	
diff --git a/src/sqlite/run.cs b/src/sqlite/run.cs
index 925758c..dacef33 100644
--- a/src/sqlite/run.cs
+++ b/src/sqlite/run.cs
@@ -80,13 +80,19 @@ class SqliteRun : Sqlite
 		return myLast;
 	}
 	
+	//if all sessions, put -1 in sessionID
 	//if all persons, put -1 in personID
 	//if all types, put "" in filterType
 	public static string[] SelectRuns(int sessionID, int personID, string filterType) 
 	{
+		string filterSessionString = "";
+		if(sessionID != -1)
+			filterSessionString = " AND run.sessionID == " + sessionID;
+
 		string filterPersonString = "";
 		if(personID != -1)
 			filterPersonString = " AND person.uniqueID == " + personID;
+
 		string filterTypeString = "";
 		if(filterType != "")
 			filterTypeString = " AND run.type == '" + filterType + "' " ;
@@ -95,7 +101,7 @@ class SqliteRun : Sqlite
 		dbcmd.CommandText = "SELECT person.name, run.* " +
 			" FROM person, run " +
 			" WHERE person.uniqueID == run.personID" + 
-			" AND run.sessionID == " + sessionID + 
+			filterSessionString +
 			filterPersonString +
 			filterTypeString +
 			" ORDER BY upper(person.name), run.uniqueID";
diff --git a/src/sqlite/runInterval.cs b/src/sqlite/runInterval.cs
index 0b80600..2656346 100644
--- a/src/sqlite/runInterval.cs
+++ b/src/sqlite/runInterval.cs
@@ -81,18 +81,27 @@ class SqliteRunInterval : SqliteRun
 		return myLast;
 	}
 
-	public new static string[] SelectRuns(int sessionID, int personID) 
+	public new static string[] SelectRuns(int sessionID, int personID, string filterType) 
 	{
+		string filterSessionString = "";
+		if(sessionID != -1)
+			filterSessionString = " AND runInterval.sessionID == " + sessionID;
+
 		string filterPersonString = "";
 		if(personID != -1)
 			filterPersonString = " AND person.uniqueID == " + personID;
 
+		string filterTypeString = "";
+		if(filterType != "")
+			filterTypeString = " AND runInterval.type == '" + filterType + "' " ;
+
 		dbcon.Open();
 		dbcmd.CommandText = "SELECT person.name, runInterval.* " +
 			" FROM person, runInterval " +
 			" WHERE person.uniqueID == runInterval.personID" + 
-			" AND runInterval.sessionID == " + sessionID + 
+			filterSessionString +
 			filterPersonString +
+			filterTypeString +
 			" ORDER BY upper(person.name), runInterval.uniqueID";
 		
 		Log.WriteLine(dbcmd.CommandText.ToString());
diff --git a/src/sqlite/runType.cs b/src/sqlite/runType.cs
index 7b192a1..d32c8bc 100644
--- a/src/sqlite/runType.cs
+++ b/src/sqlite/runType.cs
@@ -250,6 +250,17 @@ class SqliteRunType : Sqlite
 	}
 
 
+	public static void Delete(string name)
+	{
+		dbcon.Open();
+		dbcmd.CommandText = "Delete FROM " + Constants.RunTypeTable +
+			" WHERE name == '" + name + "'";
+		Log.WriteLine(dbcmd.CommandText.ToString());
+		dbcmd.ExecuteNonQuery();
+		dbcon.Close();
+	}
+
+
 }	
 
 class SqliteRunIntervalType : SqliteRunType
@@ -447,5 +458,4 @@ class SqliteRunIntervalType : SqliteRunType
 		SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "MTGUG", "mtgug.png", true);
 	}
 
-
 }
diff --git a/src/util.cs b/src/util.cs
index fddcd2e..dada29c 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -875,10 +875,13 @@ public class Util
 		}
 	}
 			
-	public static string ArrayListToSingleString (ArrayList myArrayList) {
+	public static string ArrayListToSingleString (ArrayList myArrayList, string sep) {
 		string myString = "";
-		foreach (string str in myArrayList) 
-			myString += str + "\n";
+		string sepUsed = "";
+		foreach (string str in myArrayList) { 
+			myString += sepUsed + str;
+			sepUsed =  sep;
+		}
 
 		return myString;
 	}
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 15c2bf3..f263082 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -156,8 +156,6 @@ public class UtilGtk
 		return "";
 	}
 
-
-
 	public static int IdColumnCompare (TreeModel model, TreeIter iter1, TreeIter iter2)     {
 		int val1 = 0;
 		int val2 = 0;



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