[chronojump] 0.8.3.2



commit e7a3982cff14526ff3d089c623e41590c7157d23
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Apr 28 08:57:35 2009 +0200

    0.8.3.2
    multiChronopic:
    -controls changed
    -RunAnalysis now in multiChronopic treeview
    -if changed to simulated, disconnected all serial ports
    -info included in sessionLoad
    -info included in showAllPersonEvents
    
    -eventExecuteWin
    +4 cps are graphed (untested)
    +shown "cp1", "cp2", ...
    +eventExecuteWin, when a cp has event, painted discont lines for rest of cps
    +sync message done
    +done update
    
    -treeview
    +done treeview add
    +shown only needed cols (depending on num cps on db at that session, also manages ok Add with != cps)
    +unselectable users on treeview mc
    +show treeview mc first line
    +done edit, delete, showHideActionButtons,
    +sqlite update, sqlite delete
    +zoom done
    
    optimization on treeview run interval loading of data with variableDistancesString (less SQL calls)
    
    created gui/multiChronopic.cs
---
 Makefile                        |    4 +-
 TODO.txt                        |   42 +--
 build/data/chronojump.prg       |  Bin 2900992 -> 2908672 bytes
 build/data/chronojump_mini.prg  |  Bin 39936 -> 39936 bytes
 build/data/version.txt          |    2 +-
 changelog.txt                   |   56 +++
 glade/chronojump.glade          | 1022 +++++++++++++++++++--------------------
 src/execute/event.cs            |   11 +-
 src/execute/multiChronopic.cs   |   33 ++-
 src/execute/reactionTime.cs     |    2 +-
 src/gui/chronojump.cs           |  439 ++++++++++++------
 src/gui/event.cs                |   12 +-
 src/gui/eventExecute.cs         |   74 +++-
 src/gui/jump.cs                 |    6 +-
 src/gui/multiChronopic.cs       |  108 ++++
 src/gui/person.cs               |   10 +-
 src/gui/pulse.cs                |    2 +
 src/gui/reactionTime.cs         |    2 +
 src/gui/run.cs                  |    2 +
 src/gui/session.cs              |   19 +-
 src/multiChronopic.cs           |   51 ++-
 src/prepareEventGraphObjects.cs |    7 +-
 src/sqlite/main.cs              |   24 -
 src/sqlite/multiChronopic.cs    |   47 ++-
 src/sqlite/person.cs            |   25 +-
 src/sqlite/session.cs           |   26 +
 src/treeViewEvent.cs            |   22 +-
 src/treeViewJump.cs             |    9 -
 src/treeViewMultiChronopic.cs   |  171 +++++--
 src/treeViewPulse.cs            |   10 -
 src/treeViewRun.cs              |   15 +-
 version.txt                     |    2 +-
 32 files changed, 1375 insertions(+), 880 deletions(-)

diff --git a/Makefile b/Makefile
index ba7cd44..a7bd02e 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ CHRONOJUMP_SERVER = chronojump_server
 #--------Dependences of CHRONOJUMP
 
 
-CHRONOJUMP_DEP_GUI = src/gui/chronojump.cs src/gui/confirm.cs src/gui/error.cs src/gui/eventExecute.cs src/gui/eventGraphConfigure.cs src/gui/event.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/reactionTime.cs src/gui/pulse.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs src/gui/report.cs src/gui/about.cs src/gui/helpPorts.cs src/gui/dialogMessage.cs src/gui/dialogCalendar.cs src/gui/dialogImageTest.cs src/gui/language.cs src/gui/repetitiveConditions.cs src/gui/chronopicConnection.cs src/gui/convertWeight.cs src/gui/genericWindow.cs src/gui/splash.cs src/gui/server.cs src/gui/dialogServerStats.cs src/gui/evaluator.cs
+CHRONOJUMP_DEP_GUI = src/gui/chronojump.cs src/gui/confirm.cs src/gui/error.cs src/gui/eventExecute.cs src/gui/eventGraphConfigure.cs src/gui/event.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/reactionTime.cs src/gui/pulse.cs src/gui/multiChronopic.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs src/gui/report.cs src/gui/about.cs src/gui/helpPorts.cs src/gui/dialogMessage.cs src/gui/dialogCalendar.cs src/gui/dialogImageTest.cs src/gui/language.cs src/gui/repetitiveConditions.cs src/gui/chronopicConnection.cs src/gui/convertWeight.cs src/gui/genericWindow.cs src/gui/splash.cs src/gui/server.cs src/gui/dialogServerStats.cs src/gui/evaluator.cs
 
 CHRONOJUMP_DEP_STATS = src/statType.cs src/stats/main.cs src/stats/global.cs src/stats/sjCmjAbk.cs src/stats/sjCmjAbkPlus.cs src/stats/djIndex.cs src/stats/djQ.cs src/stats/rjIndex.cs src/stats/rjPotencyBosco.cs src/stats/rjEvolution.cs src/stats/ieIub.cs src/stats/fv.cs src/stats/potency.cs src/stats/rjAVGSD.cs
 
@@ -116,7 +116,7 @@ CHRONOJUMP_MINI_DEP = src/chronojump_mini.cs src/chronopic.cs src/util.cs src/lo
 
 #--------Dependences of CHRONOJUMP_SERVER
 
-CHRONOJUMP_SERVER_DEP = chronojump_server/chronojumpServerCSharp.cs src/sqlite/*.cs src/util.cs src/person.cs src/event.cs src/jump.cs src/run.cs src/pulse.cs src/reactionTime.cs src/session.cs src/eventType.cs src/jumpType.cs src/runType.cs src/pulseType.cs src/sport.cs src/constants.cs src/log.cs src/serverPing.cs src/serverEvaluator.cs chronojump_server/BCrypt.cs 
+CHRONOJUMP_SERVER_DEP = chronojump_server/chronojumpServerCSharp.cs src/sqlite/*.cs src/util.cs src/person.cs src/event.cs src/jump.cs src/run.cs src/pulse.cs src/reactionTime.cs src/multiChronopic.cs src/session.cs src/eventType.cs src/jumpType.cs src/runType.cs src/pulseType.cs src/sport.cs src/constants.cs src/log.cs src/serverPing.cs src/serverEvaluator.cs chronojump_server/BCrypt.cs 
 
 
 #--------Makefiles
diff --git a/TODO.txt b/TODO.txt
index 9e9d4be..b4ebd16 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,22 +1,17 @@
 TODO: 
 
-fix two bugs:
+fix two bugs (really difficult to reproduce):
 1.- the chronojump.cs findVersion (just do more tests check that the error is fixed easily)
 2.- the sqlite problem with the thread at start... need to explore more
 
-
 multiChronopic:
--on creation of array, clean the possible ':'
--treeview: show only needed cp cols (the arrayDone on multiChronopic construction should be different if cp num found changed,
-let's do a sqlite first to search if there are cp1, cp2, cp3, cp4, and create an int like cp1*0 + cp1*1 + cp1*2 + cp1*3
-if int is the same, then arrayDone will be true)
--treeview: after the load, do the "Add"
+-repair
 -tempTable
-
+-export
 
 new multichronopic tests:
-- optionally do that first time (waiting time) is now shown to anyone
-- padu runAnalysis (2cp)
+-do button enter
+- padu runAnalysis (2cp): out of jumpRj and going to multichronopic (also in menu)
 - discrimitative reaction time with two lights and two fotocells (or platforms)
 (4cp) when evaluator push left or right button, cp 1 or cp2 lights, person has to cross fotocell a or b (connected to cp 3, 4)
 better with only two chronopics, if evaluator push cp1, light1 gets on and person has tocross fotocell1 (or platform). Then with two we have all.
@@ -25,6 +20,8 @@ we can also have three or four to have more discriminative
 
 Add Cabedo's tests (not prioritary)
 
+server: study possible locks, see sqlite book
+
 add a link to the server page. Develop web stats and survey on web site. Maybe
 done by R script and calling to database
 http://cran.r-project.org/web/packages/RSQLite/index.html
@@ -60,31 +57,6 @@ fo it as to chrons. Record some stat data in another file
 just to know how xsp2 is working
 
 
-count time(s)  cp change diff same cp diff all cp
-1          10   1     IN           10          10
-2          15   2     IN           15           5
-3          20   1    OUT           10           5
-3          20   3     IN           20           0
-4          25   2    OUT           10           5
-5          30   3    OUT           10           5
-6          60   1     IN           40          30
-7          65   2     IN           40           5
-8          70   3     IN           40           5
-
-do like this:
-                     state  time change   time IN-IN time OUT-OUT
-count time(s)  cp1 cp2 cp3  cp1 cp2 cp3  cp1 cp2 cp3  cp1 cp2 cp3
-0           0  OUT OUT OUT 
-1          10   IN           10
-2          15       IN           15
-3          20  OUT      IN   10      20                20
-4          25  	   OUT           10                        25
-5          30          OUT           10                        30 
-6          60   IN           40           50
-7          65       IN           40           50
-8          70           IN           40           50
-
-
 merge databases
 
 
diff --git a/build/data/chronojump.prg b/build/data/chronojump.prg
index d3c9058..5cf92d3 100755
Binary files a/build/data/chronojump.prg and b/build/data/chronojump.prg differ
diff --git a/build/data/chronojump_mini.prg b/build/data/chronojump_mini.prg
index 21cca84..8a7972c 100755
Binary files a/build/data/chronojump_mini.prg and b/build/data/chronojump_mini.prg differ
diff --git a/build/data/version.txt b/build/data/version.txt
index 6031071..4810611 100644
--- a/build/data/version.txt
+++ b/build/data/version.txt
@@ -1 +1 @@
-0.8.3.1
+0.8.3.2
diff --git a/changelog.txt b/changelog.txt
index 960bcb3..aaa0fe9 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,34 @@
 CHANGELOG.txt
 
+28 apr 2009
+	0.8.3.2
+	multiChronopic:
+	-controls changed
+	-RunAnalysis now in multiChronopic treeview
+	-if changed to simulated, disconnected all serial ports
+	-info included in sessionLoad
+	-info included in showAllPersonEvents
+	
+	-eventExecuteWin
+	 +4 cps are graphed (untested)
+	 +shown "cp1", "cp2", ...
+	 +eventExecuteWin, when a cp has event, painted discont lines for rest of cps
+	 +sync message done
+	 +done update
+	
+	-treeview
+	 +done treeview add
+	 +shown only needed cols (depending on num cps on db at that session, also manages ok Add with != cps)
+	 +unselectable users on treeview mc
+	 +show treeview mc first line
+	 +done edit, delete, showHideActionButtons, 
+	 +sqlite update, sqlite delete
+	 +zoom done
+
+	 optimization on treeview run interval loading of data with variableDistancesString (less SQL calls)
+
+	created gui/multiChronopic.cs
+
 24 apr 2009
 	0.8.3.1
 	multiChronopic
@@ -110,6 +139,33 @@ CHANGELOG.txt
 	created src/sqlite/multiChronopic.cs
 	created src/treeViewMultiChronopic.cs
 
+	multiChronopic explanation
+
+	count time(s)  cp change diff same cp diff all cp
+	1          10   1     IN           10          10
+	2          15   2     IN           15           5
+	3          20   1    OUT           10           5
+	3          20   3     IN           20           0
+	4          25   2    OUT           10           5
+	5          30   3    OUT           10           5
+	6          60   1     IN           40          30
+	7          65   2     IN           40           5
+	8          70   3     IN           40           5
+	
+	do like this:
+	                     state  time change   time IN-IN time OUT-OUT
+	count time(s)  cp1 cp2 cp3  cp1 cp2 cp3  cp1 cp2 cp3  cp1 cp2 cp3
+	0           0  OUT OUT OUT 
+	1          10   IN           10
+	2          15       IN           15
+	3          20  OUT      IN   10      20                20
+	4          25  	   OUT           10                        25
+	5          30          OUT           10                        30 
+	6          60   IN           40           50
+	7          65       IN           40           50
+	8          70           IN           40           50
+
+
 	Fixed contants chronopic3 name (mistake on last svn ci)
 
 19 mar 2009
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 05f13a6..75b77eb 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -8616,7 +8616,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_new_activate" last_modification_time="Wed, 22 Sep 2004 23:55:11 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4171">
+			<widget class="GtkImage" id="image4234">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -8637,7 +8637,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_open_activate" last_modification_time="Wed, 22 Sep 2004 23:55:11 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4172">
+			<widget class="GtkImage" id="image4235">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-open</property>
 			  <property name="icon_size">1</property>
@@ -8658,7 +8658,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_edit_session_activate" last_modification_time="Tue, 26 Jul 2005 19:12:07 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4173">
+			<widget class="GtkImage" id="image4236">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -8680,7 +8680,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_delete_session_activate" last_modification_time="Thu, 28 Jul 2005 13:37:42 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4174">
+			<widget class="GtkImage" id="image4237">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -8708,7 +8708,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_export_session_activate" last_modification_time="Sat, 12 Feb 2005 21:57:07 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4175">
+			<widget class="GtkImage" id="image4238">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-convert</property>
 			  <property name="icon_size">1</property>
@@ -8743,7 +8743,7 @@ suitable for agility tests)</property>
 		      <property name="use_underline">True</property>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4176">
+			<widget class="GtkImage" id="image4239">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-connect</property>
 			  <property name="icon_size">1</property>
@@ -8811,7 +8811,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_preferences_activate" last_modification_time="Mon, 04 Oct 2004 19:19:19 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4177">
+			<widget class="GtkImage" id="image4240">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-preferences</property>
 			  <property name="icon_size">1</property>
@@ -8838,7 +8838,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_quit1_activate" last_modification_time="Wed, 22 Sep 2004 23:17:31 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4178">
+			<widget class="GtkImage" id="image4241">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-quit</property>
 			  <property name="icon_size">1</property>
@@ -8872,7 +8872,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_person_add_single_activate" last_modification_time="Thu, 18 Aug 2005 23:07:39 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4179">
+			<widget class="GtkImage" id="image4242">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -8893,7 +8893,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_person_add_multiple_activate" last_modification_time="Thu, 18 Aug 2005 23:01:23 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4180">
+			<widget class="GtkImage" id="image4243">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -8920,7 +8920,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_recuperate_person_activate" last_modification_time="Sun, 12 Dec 2004 00:40:31 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4181">
+			<widget class="GtkImage" id="image4244">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-open</property>
 			  <property name="icon_size">1</property>
@@ -8941,7 +8941,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_recuperate_persons_from_session_activate" last_modification_time="Tue, 26 Jul 2005 19:12:07 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4182">
+			<widget class="GtkImage" id="image4245">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-open</property>
 			  <property name="icon_size">1</property>
@@ -8968,7 +8968,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_edit_current_person_clicked" last_modification_time="Sun, 17 Oct 2004 11:43:33 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4183">
+			<widget class="GtkImage" id="image4246">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -8989,7 +8989,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_show_all_person_events_activate" last_modification_time="Mon, 29 Aug 2005 09:51:24 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4184">
+			<widget class="GtkImage" id="image4247">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-index</property>
 			  <property name="icon_size">1</property>
@@ -9016,7 +9016,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_delete_current_person_from_session_activate" last_modification_time="Thu, 28 Jul 2005 15:49:38 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4185">
+			<widget class="GtkImage" id="image4248">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9143,7 +9143,7 @@ suitable for agility tests)</property>
 			      <signal name="activate" handler="on_button_more_clicked" last_modification_time="Thu, 10 Mar 2005 18:52:25 GMT"/>
 
 			      <child internal-child="image">
-				<widget class="GtkImage" id="image4186">
+				<widget class="GtkImage" id="image4249">
 				  <property name="visible">True</property>
 				  <property name="stock">gtk-add</property>
 				  <property name="icon_size">1</property>
@@ -9168,7 +9168,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_edit_selected_jump_clicked" last_modification_time="Sun, 17 Oct 2004 11:47:42 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4187">
+			<widget class="GtkImage" id="image4250">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -9189,7 +9189,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_delete_selected_jump_clicked" last_modification_time="Tue, 19 Oct 2004 11:54:17 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4188">
+			<widget class="GtkImage" id="image4251">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9257,15 +9257,6 @@ suitable for agility tests)</property>
 			  </child>
 
 			  <child>
-			    <widget class="GtkMenuItem" id="menuitem_run_analysis">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Run analysis</property>
-			      <property name="use_underline">True</property>
-			      <signal name="activate" handler="on_rj_activate" last_modification_time="Tue, 17 Mar 2009 13:11:03 GMT"/>
-			    </widget>
-			  </child>
-
-			  <child>
 			    <widget class="GtkSeparatorMenuItem" id="separador20">
 			      <property name="visible">True</property>
 			    </widget>
@@ -9279,7 +9270,7 @@ suitable for agility tests)</property>
 			      <signal name="activate" handler="on_button_more_rj_clicked" last_modification_time="Fri, 11 Mar 2005 14:45:23 GMT"/>
 
 			      <child internal-child="image">
-				<widget class="GtkImage" id="image4189">
+				<widget class="GtkImage" id="image4252">
 				  <property name="visible">True</property>
 				  <property name="stock">gtk-add</property>
 				  <property name="icon_size">1</property>
@@ -9304,7 +9295,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_edit_selected_jump_rj_clicked" last_modification_time="Sun, 07 Nov 2004 17:37:37 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4190">
+			<widget class="GtkImage" id="image4253">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -9325,7 +9316,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_repair_selected_reactive_jump_clicked" last_modification_time="Wed, 07 Dec 2005 01:14:11 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4191">
+			<widget class="GtkImage" id="image4254">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-preferences</property>
 			  <property name="icon_size">1</property>
@@ -9346,7 +9337,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_delete_selected_jump_rj_clicked" last_modification_time="Sun, 07 Nov 2004 17:37:37 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4192">
+			<widget class="GtkImage" id="image4255">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9373,7 +9364,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_jump_type_add_activate" last_modification_time="Thu, 10 Mar 2005 18:52:25 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4193">
+			<widget class="GtkImage" id="image4256">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -9527,7 +9518,7 @@ suitable for agility tests)</property>
 			      <signal name="activate" handler="on_button_run_more_clicked" last_modification_time="Fri, 22 Apr 2005 14:37:06 GMT"/>
 
 			      <child internal-child="image">
-				<widget class="GtkImage" id="image4194">
+				<widget class="GtkImage" id="image4257">
 				  <property name="visible">True</property>
 				  <property name="stock">gtk-add</property>
 				  <property name="icon_size">1</property>
@@ -9552,7 +9543,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_edit_selected_run_clicked" last_modification_time="Fri, 22 Apr 2005 14:34:58 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4195">
+			<widget class="GtkImage" id="image4258">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -9573,7 +9564,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_delete_selected_run_clicked" last_modification_time="Fri, 22 Apr 2005 14:34:58 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4196">
+			<widget class="GtkImage" id="image4259">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9654,7 +9645,7 @@ suitable for agility tests)</property>
 			      <signal name="activate" handler="on_button_run_interval_more_clicked" last_modification_time="Tue, 16 Aug 2005 01:18:41 GMT"/>
 
 			      <child internal-child="image">
-				<widget class="GtkImage" id="image4197">
+				<widget class="GtkImage" id="image4260">
 				  <property name="visible">True</property>
 				  <property name="stock">gtk-add</property>
 				  <property name="icon_size">1</property>
@@ -9679,7 +9670,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_edit_selected_run_interval_clicked" last_modification_time="Tue, 16 Aug 2005 12:33:39 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4198">
+			<widget class="GtkImage" id="image4261">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -9700,7 +9691,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_repair_selected_run_interval_clicked" last_modification_time="Wed, 03 May 2006 15:15:38 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4199">
+			<widget class="GtkImage" id="image4262">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-preferences</property>
 			  <property name="icon_size">1</property>
@@ -9721,7 +9712,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_delete_selected_run_interval_clicked" last_modification_time="Tue, 16 Aug 2005 12:33:39 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4200">
+			<widget class="GtkImage" id="image4263">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9748,7 +9739,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_run_type_add_activate" last_modification_time="Fri, 22 Apr 2005 14:34:58 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4201">
+			<widget class="GtkImage" id="image4264">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -9806,6 +9797,30 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_button_pulse_custom_activate" last_modification_time="Sat, 28 Oct 2006 08:57:53 GMT"/>
 		    </widget>
 		  </child>
+
+		  <child>
+		    <widget class="GtkSeparatorMenuItem" id="separador22">
+		      <property name="visible">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="menuitem_multi_chronopic_start">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Multi Chronopic start</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_multi_chronopic_start_clicked" last_modification_time="Mon, 27 Apr 2009 16:34:48 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="menuitem_run_analysis">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Run analysis</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="on_multi_chronopic_start_clicked" last_modification_time="Mon, 27 Apr 2009 16:34:48 GMT"/>
+		    </widget>
+		  </child>
 		</widget>
 	      </child>
 	    </widget>
@@ -9828,7 +9843,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_menuitem_view_stats_activate" last_modification_time="Tue, 26 Jul 2005 23:54:29 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4202">
+			<widget class="GtkImage" id="image4265">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-refresh</property>
 			  <property name="icon_size">1</property>
@@ -9849,7 +9864,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_show_report_activate" last_modification_time="Tue, 06 Sep 2005 09:10:32 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4203">
+			<widget class="GtkImage" id="image4266">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-refresh</property>
 			  <property name="icon_size">1</property>
@@ -9917,7 +9932,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_menuitem_manual_activate" last_modification_time="Wed, 03 Oct 2007 23:31:41 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4204">
+			<widget class="GtkImage" id="image4267">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-info</property>
 			  <property name="icon_size">1</property>
@@ -9953,7 +9968,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_about1_activate" last_modification_time="Wed, 22 Sep 2004 23:17:31 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4205">
+			<widget class="GtkImage" id="image4268">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-about</property>
 			  <property name="icon_size">1</property>
@@ -9980,7 +9995,7 @@ suitable for agility tests)</property>
 		      <signal name="activate" handler="on_debug_crash_activate" last_modification_time="Thu, 23 Oct 2008 22:57:02 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image4206">
+			<widget class="GtkImage" id="image4269">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-dialog-error</property>
 			  <property name="icon_size">1</property>
@@ -11016,24 +11031,6 @@ suitable for agility tests)</property>
 					  </child>
 
 					  <child>
-					    <widget class="GtkButton" id="button_run_analysis">
-					      <property name="visible">True</property>
-					      <property name="can_focus">True</property>
-					      <property name="label" translatable="yes">Run analysis</property>
-					      <property name="use_underline">True</property>
-					      <property name="relief">GTK_RELIEF_NORMAL</property>
-					      <property name="focus_on_click">True</property>
-					      <signal name="clicked" handler="on_rj_activate" last_modification_time="Tue, 17 Mar 2009 13:07:59 GMT"/>
-					      <signal name="enter" handler="on_button_enter" last_modification_time="Wed, 02 May 2007 12:57:33 GMT"/>
-					    </widget>
-					    <packing>
-					      <property name="padding">0</property>
-					      <property name="expand">False</property>
-					      <property name="fill">False</property>
-					    </packing>
-					  </child>
-
-					  <child>
 					    <widget class="GtkAlignment" id="alignment_more_rj">
 					      <property name="visible">True</property>
 					      <property name="xalign">0.5</property>
@@ -13317,53 +13314,250 @@ suitable for agility tests)</property>
 				  <property name="spacing">0</property>
 
 				  <child>
-				    <widget class="GtkHBox" id="hbox322">
+				    <widget class="GtkHBox" id="hbox338">
 				      <property name="visible">True</property>
 				      <property name="homogeneous">False</property>
-				      <property name="spacing">11</property>
+				      <property name="spacing">0</property>
 
 				      <child>
-					<widget class="GtkHBox" id="hbox313">
+					<widget class="GtkTable" id="table_multi_chronopic_buttons">
 					  <property name="visible">True</property>
+					  <property name="n_rows">2</property>
+					  <property name="n_columns">2</property>
 					  <property name="homogeneous">False</property>
-					  <property name="spacing">4</property>
+					  <property name="row_spacing">2</property>
+					  <property name="column_spacing">10</property>
 
 					  <child>
-					    <widget class="GtkFrame" id="frame45">
+					    <widget class="GtkHBox" id="hbox348">
 					      <property name="visible">True</property>
-					      <property name="label_xalign">0</property>
-					      <property name="label_yalign">0.5</property>
-					      <property name="shadow_type">GTK_SHADOW_NONE</property>
+					      <property name="homogeneous">False</property>
+					      <property name="spacing">6</property>
 
 					      <child>
-						<widget class="GtkAlignment" id="alignment138">
+						<widget class="GtkLabel" id="label696">
 						  <property name="visible">True</property>
+						  <property name="label" translatable="yes">Total distance</property>
+						  <property name="use_underline">False</property>
+						  <property name="use_markup">False</property>
+						  <property name="justify">GTK_JUSTIFY_LEFT</property>
+						  <property name="wrap">False</property>
+						  <property name="selectable">False</property>
 						  <property name="xalign">0.5</property>
 						  <property name="yalign">0.5</property>
-						  <property name="xscale">1</property>
-						  <property name="yscale">1</property>
-						  <property name="top_padding">0</property>
-						  <property name="bottom_padding">0</property>
-						  <property name="left_padding">12</property>
-						  <property name="right_padding">0</property>
+						  <property name="xpad">0</property>
+						  <property name="ypad">0</property>
+						  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+						  <property name="width_chars">-1</property>
+						  <property name="single_line_mode">False</property>
+						  <property name="angle">0</property>
+						</widget>
+						<packing>
+						  <property name="padding">0</property>
+						  <property name="expand">False</property>
+						  <property name="fill">False</property>
+						</packing>
+					      </child>
+
+					      <child>
+						<widget class="GtkHBox" id="hbox349">
+						  <property name="visible">True</property>
+						  <property name="homogeneous">False</property>
+						  <property name="spacing">0</property>
 
 						  <child>
-						    <widget class="GtkTable" id="table66">
+						    <widget class="GtkEntry" id="entry_run_analysis_distance">
+						      <property name="visible">True</property>
+						      <property name="can_focus">True</property>
+						      <property name="editable">True</property>
+						      <property name="visibility">True</property>
+						      <property name="max_length">4</property>
+						      <property name="text" translatable="yes"></property>
+						      <property name="has_frame">True</property>
+						      <property name="invisible_char">â??</property>
+						      <property name="activates_default">False</property>
+						      <property name="width_chars">4</property>
+						    </widget>
+						    <packing>
+						      <property name="padding">0</property>
+						      <property name="expand">False</property>
+						      <property name="fill">True</property>
+						    </packing>
+						  </child>
+
+						  <child>
+						    <widget class="GtkLabel" id="label697">
+						      <property name="visible">True</property>
+						      <property name="label">cm</property>
+						      <property name="use_underline">False</property>
+						      <property name="use_markup">False</property>
+						      <property name="justify">GTK_JUSTIFY_LEFT</property>
+						      <property name="wrap">False</property>
+						      <property name="selectable">False</property>
+						      <property name="xalign">0.5</property>
+						      <property name="yalign">0.5</property>
+						      <property name="xpad">0</property>
+						      <property name="ypad">0</property>
+						      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+						      <property name="width_chars">-1</property>
+						      <property name="single_line_mode">False</property>
+						      <property name="angle">0</property>
+						    </widget>
+						    <packing>
+						      <property name="padding">0</property>
+						      <property name="expand">False</property>
+						      <property name="fill">False</property>
+						    </packing>
+						  </child>
+						</widget>
+						<packing>
+						  <property name="padding">0</property>
+						  <property name="expand">False</property>
+						  <property name="fill">True</property>
+						</packing>
+					      </child>
+					    </widget>
+					    <packing>
+					      <property name="left_attach">1</property>
+					      <property name="right_attach">2</property>
+					      <property name="top_attach">0</property>
+					      <property name="bottom_attach">1</property>
+					      <property name="x_options">fill</property>
+					    </packing>
+					  </child>
+
+					  <child>
+					    <widget class="GtkCheckButton" id="check_multi_sync">
+					      <property name="visible">True</property>
+					      <property name="can_focus">True</property>
+					      <property name="label" translatable="yes">Sychronize Chronopics</property>
+					      <property name="use_underline">True</property>
+					      <property name="relief">GTK_RELIEF_NORMAL</property>
+					      <property name="focus_on_click">True</property>
+					      <property name="active">True</property>
+					      <property name="inconsistent">False</property>
+					      <property name="draw_indicator">True</property>
+					    </widget>
+					    <packing>
+					      <property name="left_attach">0</property>
+					      <property name="right_attach">1</property>
+					      <property name="top_attach">0</property>
+					      <property name="bottom_attach">1</property>
+					      <property name="x_options">fill</property>
+					      <property name="y_options"></property>
+					    </packing>
+					  </child>
+
+					  <child>
+					    <widget class="GtkButton" id="button_multi_chronopic_start">
+					      <property name="visible">True</property>
+					      <property name="can_focus">True</property>
+					      <property name="label" translatable="yes">Multi Chronopic test</property>
+					      <property name="use_underline">True</property>
+					      <property name="relief">GTK_RELIEF_NORMAL</property>
+					      <property name="focus_on_click">True</property>
+					      <signal name="clicked" handler="on_multi_chronopic_start_clicked" last_modification_time="Mon, 27 Apr 2009 16:34:57 GMT"/>
+					    </widget>
+					    <packing>
+					      <property name="left_attach">0</property>
+					      <property name="right_attach">1</property>
+					      <property name="top_attach">1</property>
+					      <property name="bottom_attach">2</property>
+					      <property name="x_options">fill</property>
+					    </packing>
+					  </child>
+
+					  <child>
+					    <widget class="GtkButton" id="button_run_analysis">
+					      <property name="visible">True</property>
+					      <property name="can_focus">True</property>
+					      <property name="label" translatable="yes">Run analysis</property>
+					      <property name="use_underline">True</property>
+					      <property name="relief">GTK_RELIEF_NORMAL</property>
+					      <property name="focus_on_click">True</property>
+					      <signal name="clicked" handler="on_multi_chronopic_start_clicked" last_modification_time="Mon, 27 Apr 2009 16:36:02 GMT"/>
+					      <signal name="enter" handler="on_button_enter" last_modification_time="Wed, 02 May 2007 12:57:33 GMT"/>
+					    </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">fill</property>
+					    </packing>
+					  </child>
+					</widget>
+					<packing>
+					  <property name="padding">0</property>
+					  <property name="expand">False</property>
+					  <property name="fill">False</property>
+					</packing>
+				      </child>
+
+				      <child>
+					<widget class="GtkFrame" id="frame46">
+					  <property name="visible">True</property>
+					  <property name="label_xalign">0</property>
+					  <property name="label_yalign">0.5</property>
+					  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+					  <child>
+					    <widget class="GtkAlignment" id="alignment139">
+					      <property name="visible">True</property>
+					      <property name="xalign">0.5</property>
+					      <property name="yalign">0.5</property>
+					      <property name="xscale">1</property>
+					      <property name="yscale">1</property>
+					      <property name="top_padding">0</property>
+					      <property name="bottom_padding">0</property>
+					      <property name="left_padding">12</property>
+					      <property name="right_padding">0</property>
+
+					      <child>
+						<widget class="GtkHBox" id="hbox339">
+						  <property name="visible">True</property>
+						  <property name="homogeneous">False</property>
+						  <property name="spacing">12</property>
+
+						  <child>
+						    <widget class="GtkHBox" id="hbox340">
 						      <property name="visible">True</property>
-						      <property name="n_rows">1</property>
-						      <property name="n_columns">1</property>
 						      <property name="homogeneous">False</property>
-						      <property name="row_spacing">0</property>
-						      <property name="column_spacing">0</property>
+						      <property name="spacing">6</property>
 
 						      <child>
-							<widget class="GtkHBox" id="hbox337">
+							<widget class="GtkHBox" id="hbox341">
 							  <property name="visible">True</property>
 							  <property name="homogeneous">False</property>
-							  <property name="spacing">0</property>
+							  <property name="spacing">2</property>
+
+							  <child>
+							    <widget class="GtkLabel" id="label692">
+							      <property name="visible">True</property>
+							      <property name="label" translatable="yes">1</property>
+							      <property name="use_underline">False</property>
+							      <property name="use_markup">False</property>
+							      <property name="justify">GTK_JUSTIFY_LEFT</property>
+							      <property name="wrap">False</property>
+							      <property name="selectable">False</property>
+							      <property name="xalign">0.5</property>
+							      <property name="yalign">0.5</property>
+							      <property name="xpad">0</property>
+							      <property name="ypad">0</property>
+							      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+							      <property name="width_chars">-1</property>
+							      <property name="single_line_mode">False</property>
+							      <property name="angle">0</property>
+							    </widget>
+							    <packing>
+							      <property name="padding">0</property>
+							      <property name="expand">False</property>
+							      <property name="fill">False</property>
+							    </packing>
+							  </child>
 
 							  <child>
-							    <widget class="GtkVBox" id="vbox182">
+							    <widget class="GtkVBox" id="vbox185">
 							      <property name="visible">True</property>
 							      <property name="homogeneous">False</property>
 							      <property name="spacing">0</property>
@@ -13405,161 +13599,40 @@ suitable for agility tests)</property>
 							    <packing>
 							      <property name="padding">0</property>
 							      <property name="expand">False</property>
-							      <property name="fill">False</property>
+							      <property name="fill">True</property>
 							    </packing>
 							  </child>
 							</widget>
 							<packing>
-							  <property name="left_attach">0</property>
-							  <property name="right_attach">1</property>
-							  <property name="top_attach">0</property>
-							  <property name="bottom_attach">1</property>
-							  <property name="y_options">fill</property>
+							  <property name="padding">0</property>
+							  <property name="expand">True</property>
+							  <property name="fill">True</property>
 							</packing>
 						      </child>
-						    </widget>
-						  </child>
-						</widget>
-					      </child>
-
-					      <child>
-						<widget class="GtkLabel" id="label690">
-						  <property name="visible">True</property>
-						  <property name="label">&lt;b&gt;1st Chronopic&lt;/b&gt;</property>
-						  <property name="use_underline">False</property>
-						  <property name="use_markup">True</property>
-						  <property name="justify">GTK_JUSTIFY_LEFT</property>
-						  <property name="wrap">False</property>
-						  <property name="selectable">False</property>
-						  <property name="xalign">0.5</property>
-						  <property name="yalign">0.5</property>
-						  <property name="xpad">0</property>
-						  <property name="ypad">0</property>
-						  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-						  <property name="width_chars">-1</property>
-						  <property name="single_line_mode">False</property>
-						  <property name="angle">0</property>
-						</widget>
-						<packing>
-						  <property name="type">label_item</property>
-						</packing>
-					      </child>
-					    </widget>
-					    <packing>
-					      <property name="padding">0</property>
-					      <property name="expand">True</property>
-					      <property name="fill">True</property>
-					    </packing>
-					  </child>
-
-					  <child>
-					    <widget class="GtkFrame" id="frame_chronopic2">
-					      <property name="visible">True</property>
-					      <property name="label_xalign">0</property>
-					      <property name="label_yalign">0.5</property>
-					      <property name="shadow_type">GTK_SHADOW_NONE</property>
-
-					      <child>
-						<widget class="GtkAlignment" id="alignment131">
-						  <property name="visible">True</property>
-						  <property name="xalign">0.5</property>
-						  <property name="yalign">0.5</property>
-						  <property name="xscale">1</property>
-						  <property name="yscale">1</property>
-						  <property name="top_padding">0</property>
-						  <property name="bottom_padding">0</property>
-						  <property name="left_padding">0</property>
-						  <property name="right_padding">0</property>
-
-						  <child>
-						    <widget class="GtkTable" id="table62">
-						      <property name="visible">True</property>
-						      <property name="n_rows">1</property>
-						      <property name="n_columns">1</property>
-						      <property name="homogeneous">False</property>
-						      <property name="row_spacing">0</property>
-						      <property name="column_spacing">0</property>
 
 						      <child>
-							<widget class="GtkHBox" id="hbox310">
+							<widget class="GtkHBox" id="hbox342">
 							  <property name="visible">True</property>
 							  <property name="homogeneous">False</property>
-							  <property name="spacing">0</property>
-
-							  <child>
-							    <widget class="GtkHBox" id="hbox336">
-							      <property name="visible">True</property>
-							      <property name="homogeneous">False</property>
-							      <property name="spacing">0</property>
-
-							      <child>
-								<widget class="GtkVBox" id="vbox179">
-								  <property name="visible">True</property>
-								  <property name="homogeneous">False</property>
-								  <property name="spacing">0</property>
-
-								  <child>
-								    <widget class="GtkComboBox" id="combo_port_linux2">
-								      <property name="visible">True</property>
-								      <property name="items">/dev/ttyUSB?
-</property>
-								      <property name="add_tearoffs">False</property>
-								      <property name="focus_on_click">True</property>
-								    </widget>
-								    <packing>
-								      <property name="padding">0</property>
-								      <property name="expand">True</property>
-								      <property name="fill">True</property>
-								    </packing>
-								  </child>
-
-								  <child>
-								    <widget class="GtkComboBox" id="combo_port_windows2">
-								      <property name="visible">True</property>
-								      <property name="items">COM?</property>
-								      <property name="add_tearoffs">False</property>
-								      <property name="focus_on_click">True</property>
-								    </widget>
-								    <packing>
-								      <property name="padding">0</property>
-								      <property name="expand">True</property>
-								      <property name="fill">True</property>
-								    </packing>
-								  </child>
-								</widget>
-								<packing>
-								  <property name="padding">0</property>
-								  <property name="expand">True</property>
-								  <property name="fill">True</property>
-								</packing>
-							      </child>
-							    </widget>
-							    <packing>
-							      <property name="padding">0</property>
-							      <property name="expand">False</property>
-							      <property name="fill">False</property>
-							    </packing>
-							  </child>
+							  <property name="spacing">2</property>
 
 							  <child>
-							    <widget class="GtkButton" id="button_connect_cp2">
+							    <widget class="GtkLabel" id="label693">
 							      <property name="visible">True</property>
-							      <property name="can_focus">True</property>
-							      <property name="relief">GTK_RELIEF_NORMAL</property>
-							      <property name="focus_on_click">True</property>
-							      <signal name="clicked" handler="on_button_connect_cp_clicked" last_modification_time="Thu, 26 Mar 2009 15:06:25 GMT"/>
-
-							      <child>
-								<widget class="GtkImage" id="image4221">
-								  <property name="visible">True</property>
-								  <property name="stock">gtk-connect</property>
-								  <property name="icon_size">4</property>
-								  <property name="xalign">0.5</property>
-								  <property name="yalign">0.5</property>
-								  <property name="xpad">0</property>
-								  <property name="ypad">0</property>
-								</widget>
-							      </child>
+							      <property name="label" translatable="yes">2</property>
+							      <property name="use_underline">False</property>
+							      <property name="use_markup">False</property>
+							      <property name="justify">GTK_JUSTIFY_LEFT</property>
+							      <property name="wrap">False</property>
+							      <property name="selectable">False</property>
+							      <property name="xalign">0.5</property>
+							      <property name="yalign">0.5</property>
+							      <property name="xpad">0</property>
+							      <property name="ypad">0</property>
+							      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+							      <property name="width_chars">-1</property>
+							      <property name="single_line_mode">False</property>
+							      <property name="angle">0</property>
 							    </widget>
 							    <packing>
 							      <property name="padding">0</property>
@@ -13569,7 +13642,7 @@ suitable for agility tests)</property>
 							  </child>
 
 							  <child>
-							    <widget class="GtkVBox" id="vbox173">
+							    <widget class="GtkVBox" id="vbox186">
 							      <property name="visible">True</property>
 							      <property name="homogeneous">False</property>
 							      <property name="spacing">0</property>
@@ -13611,100 +13684,63 @@ suitable for agility tests)</property>
 							    <packing>
 							      <property name="padding">0</property>
 							      <property name="expand">False</property>
-							      <property name="fill">False</property>
+							      <property name="fill">True</property>
 							    </packing>
 							  </child>
 							</widget>
 							<packing>
-							  <property name="left_attach">0</property>
-							  <property name="right_attach">1</property>
-							  <property name="top_attach">0</property>
-							  <property name="bottom_attach">1</property>
-							  <property name="y_options">fill</property>
+							  <property name="padding">0</property>
+							  <property name="expand">True</property>
+							  <property name="fill">True</property>
 							</packing>
 						      </child>
-						    </widget>
-						  </child>
-						</widget>
-					      </child>
-
-					      <child>
-						<widget class="GtkLabel" id="label673">
-						  <property name="visible">True</property>
-						  <property name="label">&lt;b&gt;2nd&lt;/b&gt;</property>
-						  <property name="use_underline">False</property>
-						  <property name="use_markup">True</property>
-						  <property name="justify">GTK_JUSTIFY_LEFT</property>
-						  <property name="wrap">False</property>
-						  <property name="selectable">False</property>
-						  <property name="xalign">0.5</property>
-						  <property name="yalign">0.5</property>
-						  <property name="xpad">0</property>
-						  <property name="ypad">0</property>
-						  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-						  <property name="width_chars">-1</property>
-						  <property name="single_line_mode">False</property>
-						  <property name="angle">0</property>
-						</widget>
-						<packing>
-						  <property name="type">label_item</property>
-						</packing>
-					      </child>
-					    </widget>
-					    <packing>
-					      <property name="padding">0</property>
-					      <property name="expand">False</property>
-					      <property name="fill">True</property>
-					    </packing>
-					  </child>
-
-					  <child>
-					    <widget class="GtkFrame" id="frame_chronopic3">
-					      <property name="visible">True</property>
-					      <property name="label_xalign">0</property>
-					      <property name="label_yalign">0.5</property>
-					      <property name="shadow_type">GTK_SHADOW_NONE</property>
-
-					      <child>
-						<widget class="GtkAlignment" id="alignment135">
-						  <property name="visible">True</property>
-						  <property name="xalign">0.5</property>
-						  <property name="yalign">0.5</property>
-						  <property name="xscale">1</property>
-						  <property name="yscale">1</property>
-						  <property name="top_padding">0</property>
-						  <property name="bottom_padding">0</property>
-						  <property name="left_padding">0</property>
-						  <property name="right_padding">0</property>
-
-						  <child>
-						    <widget class="GtkTable" id="table64">
-						      <property name="visible">True</property>
-						      <property name="n_rows">1</property>
-						      <property name="n_columns">1</property>
-						      <property name="homogeneous">False</property>
-						      <property name="row_spacing">0</property>
-						      <property name="column_spacing">0</property>
 
 						      <child>
-							<widget class="GtkHBox" id="hbox323">
+							<widget class="GtkHBox" id="hbox343">
 							  <property name="visible">True</property>
 							  <property name="homogeneous">False</property>
-							  <property name="spacing">0</property>
+							  <property name="spacing">2</property>
+
+							  <child>
+							    <widget class="GtkLabel" id="label694">
+							      <property name="visible">True</property>
+							      <property name="label" translatable="yes">3</property>
+							      <property name="use_underline">False</property>
+							      <property name="use_markup">False</property>
+							      <property name="justify">GTK_JUSTIFY_LEFT</property>
+							      <property name="wrap">False</property>
+							      <property name="selectable">False</property>
+							      <property name="xalign">0.5</property>
+							      <property name="yalign">0.5</property>
+							      <property name="xpad">0</property>
+							      <property name="ypad">0</property>
+							      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+							      <property name="width_chars">-1</property>
+							      <property name="single_line_mode">False</property>
+							      <property name="angle">0</property>
+							    </widget>
+							    <packing>
+							      <property name="padding">0</property>
+							      <property name="expand">False</property>
+							      <property name="fill">False</property>
+							    </packing>
+							  </child>
 
 							  <child>
-							    <widget class="GtkVBox" id="vbox180">
+							    <widget class="GtkVBox" id="vbox187">
 							      <property name="visible">True</property>
 							      <property name="homogeneous">False</property>
 							      <property name="spacing">0</property>
 
 							      <child>
-								<widget class="GtkComboBox" id="combo_port_linux3">
+								<widget class="GtkImage" id="image_cp3_no">
 								  <property name="visible">True</property>
-								  <property name="items">/dev/ttyUSB?
-</property>
-								  <property name="add_tearoffs">False</property>
-								  <property name="focus_on_click">True</property>
+								  <property name="stock">gtk-no</property>
+								  <property name="icon_size">4</property>
+								  <property name="xalign">0.5</property>
+								  <property name="yalign">0.5</property>
+								  <property name="xpad">0</property>
+								  <property name="ypad">0</property>
 								</widget>
 								<packing>
 								  <property name="padding">0</property>
@@ -13714,11 +13750,14 @@ suitable for agility tests)</property>
 							      </child>
 
 							      <child>
-								<widget class="GtkComboBox" id="combo_port_windows3">
+								<widget class="GtkImage" id="image_cp3_yes">
 								  <property name="visible">True</property>
-								  <property name="items">COM?</property>
-								  <property name="add_tearoffs">False</property>
-								  <property name="focus_on_click">True</property>
+								  <property name="stock">gtk-yes</property>
+								  <property name="icon_size">4</property>
+								  <property name="xalign">0.5</property>
+								  <property name="yalign">0.5</property>
+								  <property name="xpad">0</property>
+								  <property name="ypad">0</property>
 								</widget>
 								<packing>
 								  <property name="padding">0</property>
@@ -13729,30 +13768,41 @@ suitable for agility tests)</property>
 							    </widget>
 							    <packing>
 							      <property name="padding">0</property>
-							      <property name="expand">True</property>
+							      <property name="expand">False</property>
 							      <property name="fill">True</property>
 							    </packing>
 							  </child>
+							</widget>
+							<packing>
+							  <property name="padding">0</property>
+							  <property name="expand">True</property>
+							  <property name="fill">True</property>
+							</packing>
+						      </child>
+
+						      <child>
+							<widget class="GtkHBox" id="hbox344">
+							  <property name="visible">True</property>
+							  <property name="homogeneous">False</property>
+							  <property name="spacing">2</property>
 
 							  <child>
-							    <widget class="GtkButton" id="button_connect_cp3">
+							    <widget class="GtkLabel" id="label695">
 							      <property name="visible">True</property>
-							      <property name="can_focus">True</property>
-							      <property name="relief">GTK_RELIEF_NORMAL</property>
-							      <property name="focus_on_click">True</property>
-							      <signal name="clicked" handler="on_button_connect_cp_clicked" last_modification_time="Thu, 26 Mar 2009 15:06:42 GMT"/>
-
-							      <child>
-								<widget class="GtkImage" id="image4222">
-								  <property name="visible">True</property>
-								  <property name="stock">gtk-connect</property>
-								  <property name="icon_size">4</property>
-								  <property name="xalign">0.5</property>
-								  <property name="yalign">0.5</property>
-								  <property name="xpad">0</property>
-								  <property name="ypad">0</property>
-								</widget>
-							      </child>
+							      <property name="label" translatable="yes">4</property>
+							      <property name="use_underline">False</property>
+							      <property name="use_markup">False</property>
+							      <property name="justify">GTK_JUSTIFY_LEFT</property>
+							      <property name="wrap">False</property>
+							      <property name="selectable">False</property>
+							      <property name="xalign">0.5</property>
+							      <property name="yalign">0.5</property>
+							      <property name="xpad">0</property>
+							      <property name="ypad">0</property>
+							      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+							      <property name="width_chars">-1</property>
+							      <property name="single_line_mode">False</property>
+							      <property name="angle">0</property>
 							    </widget>
 							    <packing>
 							      <property name="padding">0</property>
@@ -13762,13 +13812,13 @@ suitable for agility tests)</property>
 							  </child>
 
 							  <child>
-							    <widget class="GtkVBox" id="vbox177">
+							    <widget class="GtkVBox" id="vbox188">
 							      <property name="visible">True</property>
 							      <property name="homogeneous">False</property>
 							      <property name="spacing">0</property>
 
 							      <child>
-								<widget class="GtkImage" id="image_cp3_no">
+								<widget class="GtkImage" id="image_cp4_no">
 								  <property name="visible">True</property>
 								  <property name="stock">gtk-no</property>
 								  <property name="icon_size">4</property>
@@ -13785,7 +13835,7 @@ suitable for agility tests)</property>
 							      </child>
 
 							      <child>
-								<widget class="GtkImage" id="image_cp3_yes">
+								<widget class="GtkImage" id="image_cp4_yes">
 								  <property name="visible">True</property>
 								  <property name="stock">gtk-yes</property>
 								  <property name="icon_size">4</property>
@@ -13804,74 +13854,26 @@ suitable for agility tests)</property>
 							    <packing>
 							      <property name="padding">0</property>
 							      <property name="expand">False</property>
-							      <property name="fill">False</property>
+							      <property name="fill">True</property>
 							    </packing>
 							  </child>
 							</widget>
 							<packing>
-							  <property name="left_attach">0</property>
-							  <property name="right_attach">1</property>
-							  <property name="top_attach">0</property>
-							  <property name="bottom_attach">1</property>
-							  <property name="y_options">fill</property>
+							  <property name="padding">0</property>
+							  <property name="expand">True</property>
+							  <property name="fill">True</property>
 							</packing>
 						      </child>
 						    </widget>
+						    <packing>
+						      <property name="padding">0</property>
+						      <property name="expand">True</property>
+						      <property name="fill">True</property>
+						    </packing>
 						  </child>
-						</widget>
-					      </child>
-
-					      <child>
-						<widget class="GtkLabel" id="label685">
-						  <property name="visible">True</property>
-						  <property name="label">&lt;b&gt;3d&lt;/b&gt;</property>
-						  <property name="use_underline">False</property>
-						  <property name="use_markup">True</property>
-						  <property name="justify">GTK_JUSTIFY_LEFT</property>
-						  <property name="wrap">False</property>
-						  <property name="selectable">False</property>
-						  <property name="xalign">0.5</property>
-						  <property name="yalign">0.5</property>
-						  <property name="xpad">0</property>
-						  <property name="ypad">0</property>
-						  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-						  <property name="width_chars">-1</property>
-						  <property name="single_line_mode">False</property>
-						  <property name="angle">0</property>
-						</widget>
-						<packing>
-						  <property name="type">label_item</property>
-						</packing>
-					      </child>
-					    </widget>
-					    <packing>
-					      <property name="padding">0</property>
-					      <property name="expand">False</property>
-					      <property name="fill">True</property>
-					    </packing>
-					  </child>
-
-					  <child>
-					    <widget class="GtkFrame" id="frame_chronopic4">
-					      <property name="visible">True</property>
-					      <property name="label_xalign">0</property>
-					      <property name="label_yalign">0.5</property>
-					      <property name="shadow_type">GTK_SHADOW_NONE</property>
-
-					      <child>
-						<widget class="GtkAlignment" id="alignment137">
-						  <property name="visible">True</property>
-						  <property name="xalign">0.5</property>
-						  <property name="yalign">0.5</property>
-						  <property name="xscale">1</property>
-						  <property name="yscale">1</property>
-						  <property name="top_padding">0</property>
-						  <property name="bottom_padding">0</property>
-						  <property name="left_padding">0</property>
-						  <property name="right_padding">0</property>
 
 						  <child>
-						    <widget class="GtkTable" id="table65">
+						    <widget class="GtkTable" id="table67">
 						      <property name="visible">True</property>
 						      <property name="n_rows">1</property>
 						      <property name="n_columns">1</property>
@@ -13880,38 +13882,51 @@ suitable for agility tests)</property>
 						      <property name="column_spacing">0</property>
 
 						      <child>
-							<widget class="GtkHBox" id="hbox325">
+							<widget class="GtkHBox" id="hbox345">
 							  <property name="visible">True</property>
 							  <property name="homogeneous">False</property>
 							  <property name="spacing">0</property>
 
 							  <child>
-							    <widget class="GtkVBox" id="vbox181">
+							    <widget class="GtkHBox" id="hbox346">
 							      <property name="visible">True</property>
 							      <property name="homogeneous">False</property>
 							      <property name="spacing">0</property>
 
 							      <child>
-								<widget class="GtkComboBox" id="combo_port_linux4">
+								<widget class="GtkVBox" id="vbox189">
 								  <property name="visible">True</property>
-								  <property name="items">/dev/ttyUSB?
+								  <property name="homogeneous">False</property>
+								  <property name="spacing">0</property>
+
+								  <child>
+								    <widget class="GtkComboBox" id="combo_port_linux">
+								      <property name="visible">True</property>
+								      <property name="items">/dev/ttyUSB?
 </property>
-								  <property name="add_tearoffs">False</property>
-								  <property name="focus_on_click">True</property>
-								</widget>
-								<packing>
-								  <property name="padding">0</property>
-								  <property name="expand">True</property>
-								  <property name="fill">True</property>
-								</packing>
-							      </child>
+								      <property name="add_tearoffs">False</property>
+								      <property name="focus_on_click">True</property>
+								    </widget>
+								    <packing>
+								      <property name="padding">0</property>
+								      <property name="expand">True</property>
+								      <property name="fill">True</property>
+								    </packing>
+								  </child>
 
-							      <child>
-								<widget class="GtkComboBox" id="combo_port_windows4">
-								  <property name="visible">True</property>
-								  <property name="items">COM?</property>
-								  <property name="add_tearoffs">False</property>
-								  <property name="focus_on_click">True</property>
+								  <child>
+								    <widget class="GtkComboBox" id="combo_port_windows">
+								      <property name="visible">True</property>
+								      <property name="items">COM?</property>
+								      <property name="add_tearoffs">False</property>
+								      <property name="focus_on_click">True</property>
+								    </widget>
+								    <packing>
+								      <property name="padding">0</property>
+								      <property name="expand">True</property>
+								      <property name="fill">True</property>
+								    </packing>
+								  </child>
 								</widget>
 								<packing>
 								  <property name="padding">0</property>
@@ -13922,21 +13937,21 @@ suitable for agility tests)</property>
 							    </widget>
 							    <packing>
 							      <property name="padding">0</property>
-							      <property name="expand">True</property>
-							      <property name="fill">True</property>
+							      <property name="expand">False</property>
+							      <property name="fill">False</property>
 							    </packing>
 							  </child>
 
 							  <child>
-							    <widget class="GtkButton" id="button_connect_cp4">
+							    <widget class="GtkButton" id="button_connect_cp">
 							      <property name="visible">True</property>
 							      <property name="can_focus">True</property>
 							      <property name="relief">GTK_RELIEF_NORMAL</property>
 							      <property name="focus_on_click">True</property>
-							      <signal name="clicked" handler="on_button_connect_cp_clicked" last_modification_time="Thu, 26 Mar 2009 15:06:52 GMT"/>
+							      <signal name="clicked" handler="on_button_connect_cp_clicked" last_modification_time="Thu, 26 Mar 2009 15:06:25 GMT"/>
 
 							      <child>
-								<widget class="GtkImage" id="image4223">
+								<widget class="GtkImage" id="image4233">
 								  <property name="visible">True</property>
 								  <property name="stock">gtk-connect</property>
 								  <property name="icon_size">4</property>
@@ -13953,151 +13968,56 @@ suitable for agility tests)</property>
 							      <property name="fill">False</property>
 							    </packing>
 							  </child>
-
-							  <child>
-							    <widget class="GtkVBox" id="vbox178">
-							      <property name="visible">True</property>
-							      <property name="homogeneous">False</property>
-							      <property name="spacing">0</property>
-
-							      <child>
-								<widget class="GtkImage" id="image_cp4_no">
-								  <property name="visible">True</property>
-								  <property name="stock">gtk-no</property>
-								  <property name="icon_size">4</property>
-								  <property name="xalign">0.5</property>
-								  <property name="yalign">0.5</property>
-								  <property name="xpad">0</property>
-								  <property name="ypad">0</property>
-								</widget>
-								<packing>
-								  <property name="padding">0</property>
-								  <property name="expand">True</property>
-								  <property name="fill">True</property>
-								</packing>
-							      </child>
-
-							      <child>
-								<widget class="GtkImage" id="image_cp4_yes">
-								  <property name="visible">True</property>
-								  <property name="stock">gtk-yes</property>
-								  <property name="icon_size">4</property>
-								  <property name="xalign">0.5</property>
-								  <property name="yalign">0.5</property>
-								  <property name="xpad">0</property>
-								  <property name="ypad">0</property>
-								</widget>
-								<packing>
-								  <property name="padding">0</property>
-								  <property name="expand">True</property>
-								  <property name="fill">True</property>
-								</packing>
-							      </child>
-							    </widget>
-							    <packing>
-							      <property name="padding">0</property>
-							      <property name="expand">False</property>
-							      <property name="fill">False</property>
-							    </packing>
-							  </child>
 							</widget>
 							<packing>
 							  <property name="left_attach">0</property>
 							  <property name="right_attach">1</property>
 							  <property name="top_attach">0</property>
 							  <property name="bottom_attach">1</property>
+							  <property name="x_options">expand|shrink</property>
 							  <property name="y_options">fill</property>
 							</packing>
 						      </child>
 						    </widget>
+						    <packing>
+						      <property name="padding">0</property>
+						      <property name="expand">True</property>
+						      <property name="fill">True</property>
+						    </packing>
 						  </child>
 						</widget>
 					      </child>
-
-					      <child>
-						<widget class="GtkLabel" id="label688">
-						  <property name="visible">True</property>
-						  <property name="label">&lt;b&gt;4th&lt;/b&gt;</property>
-						  <property name="use_underline">False</property>
-						  <property name="use_markup">True</property>
-						  <property name="justify">GTK_JUSTIFY_LEFT</property>
-						  <property name="wrap">False</property>
-						  <property name="selectable">False</property>
-						  <property name="xalign">0.5</property>
-						  <property name="yalign">0.5</property>
-						  <property name="xpad">0</property>
-						  <property name="ypad">0</property>
-						  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-						  <property name="width_chars">-1</property>
-						  <property name="single_line_mode">False</property>
-						  <property name="angle">0</property>
-						</widget>
-						<packing>
-						  <property name="type">label_item</property>
-						</packing>
-					      </child>
-					    </widget>
-					    <packing>
-					      <property name="padding">0</property>
-					      <property name="expand">False</property>
-					      <property name="fill">True</property>
-					    </packing>
-					  </child>
-					</widget>
-					<packing>
-					  <property name="padding">0</property>
-					  <property name="expand">False</property>
-					  <property name="fill">False</property>
-					  <property name="pack_type">GTK_PACK_END</property>
-					</packing>
-				      </child>
-
-				      <child>
-					<widget class="GtkVBox" id="vbox184">
-					  <property name="visible">True</property>
-					  <property name="homogeneous">False</property>
-					  <property name="spacing">0</property>
-
-					  <child>
-					    <widget class="GtkCheckButton" id="check_multi_sync">
-					      <property name="visible">True</property>
-					      <property name="can_focus">True</property>
-					      <property name="label" translatable="yes">Sychronize Chronopics</property>
-					      <property name="use_underline">True</property>
-					      <property name="relief">GTK_RELIEF_NORMAL</property>
-					      <property name="focus_on_click">True</property>
-					      <property name="active">True</property>
-					      <property name="inconsistent">False</property>
-					      <property name="draw_indicator">True</property>
 					    </widget>
-					    <packing>
-					      <property name="padding">0</property>
-					      <property name="expand">False</property>
-					      <property name="fill">False</property>
-					    </packing>
 					  </child>
 
 					  <child>
-					    <widget class="GtkButton" id="button_multi_chronopic_start">
+					    <widget class="GtkLabel" id="label691">
 					      <property name="visible">True</property>
-					      <property name="can_focus">True</property>
-					      <property name="label" translatable="yes">Start</property>
-					      <property name="use_underline">True</property>
-					      <property name="relief">GTK_RELIEF_NORMAL</property>
-					      <property name="focus_on_click">True</property>
-					      <signal name="clicked" handler="on_button_multi_chronopic_start_clicked" last_modification_time="Tue, 24 Mar 2009 23:07:49 GMT"/>
+					      <property name="label" translatable="yes">&lt;b&gt;Connected Chronopics&lt;/b&gt;</property>
+					      <property name="use_underline">False</property>
+					      <property name="use_markup">True</property>
+					      <property name="justify">GTK_JUSTIFY_LEFT</property>
+					      <property name="wrap">False</property>
+					      <property name="selectable">False</property>
+					      <property name="xalign">0.5</property>
+					      <property name="yalign">0.5</property>
+					      <property name="xpad">0</property>
+					      <property name="ypad">0</property>
+					      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+					      <property name="width_chars">-1</property>
+					      <property name="single_line_mode">False</property>
+					      <property name="angle">0</property>
 					    </widget>
 					    <packing>
-					      <property name="padding">0</property>
-					      <property name="expand">True</property>
-					      <property name="fill">True</property>
+					      <property name="type">label_item</property>
 					    </packing>
 					  </child>
 					</widget>
 					<packing>
 					  <property name="padding">0</property>
-					  <property name="expand">True</property>
+					  <property name="expand">False</property>
 					  <property name="fill">True</property>
+					  <property name="pack_type">GTK_PACK_END</property>
 					</packing>
 				      </child>
 				    </widget>
@@ -14163,17 +14083,20 @@ suitable for agility tests)</property>
 			      <property name="spacing">0</property>
 
 			      <child>
-				<widget class="GtkButton" id="button31">
+				<widget class="GtkButton" id="button_multi_chronopic_zoom">
 				  <property name="visible">True</property>
 				  <property name="tooltip" translatable="yes">Change zoom (z)</property>
 				  <property name="can_focus">True</property>
 				  <property name="relief">GTK_RELIEF_NORMAL</property>
 				  <property name="focus_on_click">True</property>
+				  <signal name="clicked" handler="on_button_multi_chronopic_zoom_clicked" last_modification_time="Mon, 27 Apr 2009 11:06:41 GMT"/>
 				  <accelerator key="z" modifiers="0" signal="clicked"/>
 
 				  <child>
-				    <widget class="GtkImage" id="image4207">
+				    <widget class="GtkImage" id="image4224">
 				      <property name="visible">True</property>
+				      <property name="stock">gtk-zoom-fit</property>
+				      <property name="icon_size">1</property>
 				      <property name="xalign">0.5</property>
 				      <property name="yalign">0.5</property>
 				      <property name="xpad">0</property>
@@ -14189,12 +14112,13 @@ suitable for agility tests)</property>
 			      </child>
 
 			      <child>
-				<widget class="GtkButton" id="button32">
+				<widget class="GtkButton" id="button_edit_selected_multi_chronopic">
 				  <property name="visible">True</property>
 				  <property name="tooltip" translatable="yes">Edit selected (e)</property>
 				  <property name="can_focus">True</property>
 				  <property name="relief">GTK_RELIEF_NORMAL</property>
 				  <property name="focus_on_click">True</property>
+				  <signal name="clicked" handler="on_edit_selected_multi_chronopic_clicked" last_modification_time="Mon, 27 Apr 2009 10:51:29 GMT"/>
 				  <accelerator key="e" modifiers="0" signal="clicked"/>
 
 				  <child>
@@ -14217,16 +14141,17 @@ suitable for agility tests)</property>
 			      </child>
 
 			      <child>
-				<widget class="GtkButton" id="button33">
+				<widget class="GtkButton" id="button_delete_selected_multi_chronopic">
 				  <property name="visible">True</property>
 				  <property name="tooltip" translatable="yes">Delete selected (d)</property>
 				  <property name="can_focus">True</property>
 				  <property name="relief">GTK_RELIEF_NORMAL</property>
 				  <property name="focus_on_click">True</property>
+				  <signal name="clicked" handler="on_delete_selected_multi_chronopic_clicked" last_modification_time="Mon, 27 Apr 2009 10:53:24 GMT"/>
 				  <accelerator key="d" modifiers="0" signal="clicked"/>
 
 				  <child>
-				    <widget class="GtkImage" id="image4209">
+				    <widget class="GtkImage" id="image_multi_chronopic_delete">
 				      <property name="visible">True</property>
 				      <property name="xalign">0.5</property>
 				      <property name="yalign">0.5</property>
@@ -15817,6 +15742,31 @@ Test&lt;/b&gt;</property>
 	  </child>
 
 	  <child>
+	    <widget class="GtkLabel" id="label_sync_message">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
 	    <widget class="GtkImage" id="image_simulated_r">
 	      <property name="visible">True</property>
 	      <property name="stock">gtk-dialog-warning</property>
diff --git a/src/execute/event.cs b/src/execute/event.cs
index 5e0036a..898aada 100644
--- a/src/execute/event.cs
+++ b/src/execute/event.cs
@@ -55,6 +55,9 @@ public class EventExecute
 		JUMP, JUMPREACTIVE, RUN, RUNINTERVAL, PULSE, REACTIONTIME, MULTICHRONOPIC
 	}
 	protected eventType needUpdateGraphType;
+	
+	protected string syncMessage;
+	protected bool needShowSyncMessage;
 
 	//instances with the info to create
 	protected PrepareEventGraphJumpSimple prepareEventGraphJumpSimple; 
@@ -274,6 +277,12 @@ public class EventExecute
 			needSensitiveButtonFinish = false;
 		}
 		
+		if(needShowSyncMessage) {
+			eventExecuteWin.ShowSyncMessage(syncMessage);
+			needShowSyncMessage = false;
+		}
+		
+		
 		//check if it should finish by time
 		if(shouldFinishByTime()) {
 			finish = true;
@@ -387,7 +396,7 @@ public class EventExecute
 			case eventType.MULTICHRONOPIC:
 				Log.Write("update graph: MULTICHRONOPIC");
 				eventExecuteWin.PrepareMultiChronopicGraph(
-						prepareEventGraphMultiChronopic.timestamp, 
+						//prepareEventGraphMultiChronopic.timestamp, 
 						prepareEventGraphMultiChronopic.cp1StartedIn, 
 						prepareEventGraphMultiChronopic.cp2StartedIn, 
 						prepareEventGraphMultiChronopic.cp3StartedIn, 
diff --git a/src/execute/multiChronopic.cs b/src/execute/multiChronopic.cs
index 6bbfc7a..bde7e76 100644
--- a/src/execute/multiChronopic.cs
+++ b/src/execute/multiChronopic.cs
@@ -65,6 +65,9 @@ public class MultiChronopicExecute : EventExecute
 
 	static bool firstValue;
 	
+	private MultiChronopic multiChronopicDone;
+	
+	
 	public MultiChronopicExecute() {
 	}
 
@@ -151,6 +154,18 @@ public class MultiChronopicExecute : EventExecute
 	private void initValues() {
 		fakeButtonFinished = new Gtk.Button();
 		simulated = false;
+
+		cp1InStr = "";
+		cp1OutStr = "";
+		cp2InStr = "";
+		cp2OutStr = "";
+		cp3InStr = "";
+		cp3OutStr = "";
+		cp4InStr = "";
+		cp4OutStr = "";
+		
+		//initialize eventDone as a mc
+		eventDone = new MultiChronopic();
 	}
 	
 	public override void SimulateInitValues(Random randSent)
@@ -290,8 +305,11 @@ public class MultiChronopicExecute : EventExecute
 		inStr = ""; outStr = "";
 
 		syncStates syncing = syncStates.DONE;
-		if(syncFirst)
+		if(syncFirst) {
 			syncing = syncStates.NOTHING;
+			syncMessage = Catalog.GetString("Press Test button in all Chronopics simultaneously.");
+			needShowSyncMessage = true;
+		}
 
 		do {
 			ok = myCP.Read_event(out timestamp, out myPS);
@@ -311,10 +329,16 @@ public class MultiChronopicExecute : EventExecute
 						initializeTimer(); //this is for first Chronopic and only for simulated
 					}
 							
-					if(syncing == syncStates.NOTHING && myPS == Chronopic.Plataforma.ON && myLS == States.OFF) 
+					if(syncing == syncStates.NOTHING && myPS == Chronopic.Plataforma.ON && myLS == States.OFF) {
 						syncing = syncStates.CONTACTED;
-					else if (syncing == syncStates.CONTACTED && myPS == Chronopic.Plataforma.OFF && myLS == States.ON) 
+						syncMessage = Catalog.GetString("Release Test button in all Chronopics simultaneously.");
+						needShowSyncMessage = true;
+					}
+					else if (syncing == syncStates.CONTACTED && myPS == Chronopic.Plataforma.OFF && myLS == States.ON) {
 						syncing = syncStates.DONE;
+						syncMessage = Catalog.GetString("Synchronization done.");
+						needShowSyncMessage = true;
+					}
 					else {
 						needSensitiveButtonFinish = true;
 
@@ -331,7 +355,8 @@ public class MultiChronopicExecute : EventExecute
 							inEqual = "="; 
 						}
 
-						prepareEventGraphMultiChronopic = new PrepareEventGraphMultiChronopic(timestamp/1000.0, 
+						prepareEventGraphMultiChronopic = new PrepareEventGraphMultiChronopic(
+								//timestamp/1000.0, 
 								cp1StartedIn, cp2StartedIn, cp3StartedIn, cp4StartedIn,
 								cp1InStr, cp1OutStr, cp2InStr, cp2OutStr, cp3InStr, cp3OutStr, cp4InStr, cp4OutStr);
 						needUpdateGraphType = eventType.MULTICHRONOPIC;
diff --git a/src/execute/reactionTime.cs b/src/execute/reactionTime.cs
index 68b0f5d..7cd4b4f 100644
--- a/src/execute/reactionTime.cs
+++ b/src/execute/reactionTime.cs
@@ -63,7 +63,7 @@ public class ReactionTimeExecute : EventExecute
 		needUpdateGraph = false;
 		
 
-		//initialize eventDone as a ReactionTime		
+		//initialize eventDone as a ReactionTime	
 		eventDone = new ReactionTime();
 
 		//updateProgressBar = new UpdateProgressBar();
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 1bee321..4276c91 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -91,6 +91,9 @@ public class ChronoJumpWindow
 	[Widget] Gtk.Button button_delete_selected_pulse;
 	[Widget] Gtk.Button button_repair_selected_pulse;
 	
+	[Widget] Gtk.Button button_edit_selected_multi_chronopic;
+	[Widget] Gtk.Button button_delete_selected_multi_chronopic;
+	
 	//widgets for enable or disable
 	[Widget] Gtk.Button button_new;
 	[Widget] Gtk.Button button_open;
@@ -125,27 +128,20 @@ public class ChronoJumpWindow
 	[Widget] Gtk.Button button_run_interval_by_laps;
 	[Widget] Gtk.Button button_run_interval_by_time;
 	[Widget] Gtk.Button button_run_interval_unlimited;
-	[Widget] Gtk.Button button_run_analysis;
 	[Widget] Gtk.Button button_run_interval_mtgug;
 	[Widget] Gtk.Button button_reaction_time_execute;
 	[Widget] Gtk.Button button_pulse_free;
 	[Widget] Gtk.Button button_pulse_custom;
 	//[Widget] Gtk.Button button_pulse_more;
 
-	//multiChronopic	
+	//multiChronopic
+	[Widget] Gtk.Table table_multi_chronopic_buttons;
 	[Widget] Gtk.Button button_multi_chronopic_start;
-	[Widget] Gtk.Frame frame_chronopic2;
-	[Widget] Gtk.Frame frame_chronopic3;
-	[Widget] Gtk.Frame frame_chronopic4;
-	[Widget] Gtk.ComboBox combo_port_linux2;
-	[Widget] Gtk.ComboBox combo_port_windows2;
-	[Widget] Gtk.ComboBox combo_port_linux3;
-	[Widget] Gtk.ComboBox combo_port_windows3;
-	[Widget] Gtk.ComboBox combo_port_linux4;
-	[Widget] Gtk.ComboBox combo_port_windows4;
-	[Widget] Gtk.Button button_connect_cp2;
-	[Widget] Gtk.Button button_connect_cp3;
-	[Widget] Gtk.Button button_connect_cp4;
+	[Widget] Gtk.Button button_run_analysis;
+	[Widget] Gtk.ComboBox combo_port_linux;
+	[Widget] Gtk.ComboBox combo_port_windows;
+	[Widget] Gtk.Button button_connect_cp;
+
 	[Widget] Gtk.Image image_cp1_yes;
 	[Widget] Gtk.Image image_cp1_no;
 	[Widget] Gtk.Image image_cp2_yes;
@@ -239,6 +235,7 @@ public class ChronoJumpWindow
 	[Widget] Gtk.Image image_run_interval_delete;
 	[Widget] Gtk.Image image_reaction_time_delete;
 	[Widget] Gtk.Image image_pulse_delete;
+	[Widget] Gtk.Image image_multi_chronopic_delete;
 
 	[Widget] Gtk.Image image_jumps_zoom;
 	[Widget] Gtk.Image image_jumps_rj_zoom;
@@ -299,12 +296,14 @@ public class ChronoJumpWindow
 
 	private static Person currentPerson;
 	private static Session currentSession;
+	private static bool definedSession;
 	private static Jump currentJump;
 	private static JumpRj currentJumpRj;
 	private static Run currentRun;
 	private static RunInterval currentRunInterval;
 	private static ReactionTime currentReactionTime;
 	private static Pulse currentPulse;
+	private static MultiChronopic currentMultiChronopic;
 	
 	private static EventExecute currentEventExecute;
 
@@ -330,9 +329,7 @@ public class ChronoJumpWindow
 	JumpsRjMoreWindow jumpsRjMoreWin;
 	JumpExtraWindow jumpExtraWin; //for normal and repetitive jumps 
 	EditJumpWindow editJumpWin;
-	//EditEventWindow editJumpWin;
 	EditJumpRjWindow editJumpRjWin;
-	//EditEventWindow editJumpRjWin;
 	RepairJumpRjWindow repairJumpRjWin;
 	JumpTypeAddWindow jumpTypeAddWin;
 	
@@ -350,6 +347,8 @@ public class ChronoJumpWindow
 	PulseExtraWindow pulseExtraWin;
 	RepairPulseWindow repairPulseWin;
 	
+	EditMultiChronopicWindow editMultiChronopicWin;
+	
 	ConfirmWindowJumpRun confirmWinJumpRun;	//for deleting jumps and RJ jumps (and runs)
 	ErrorWindow errorWin;
 	StatsWindow statsWin;
@@ -509,6 +508,7 @@ public class ChronoJumpWindow
 
 		//We have no session, mark some widgets as ".Sensitive = false"
 		sensitiveGuiNoSession();
+		definedSession = false;
 		
 		//if(recuperatedString == "")
 			appbar2.Push ( 1, Catalog.GetString ("Ready.") );
@@ -557,6 +557,7 @@ public class ChronoJumpWindow
 		image_run_interval_delete.Pixbuf = pixbuf;
 		image_reaction_time_delete.Pixbuf = pixbuf;
 		image_pulse_delete.Pixbuf = pixbuf;
+		image_multi_chronopic_delete.Pixbuf = pixbuf;
 		
 		//zoom icons, done like this because there's one zoom icon created ad-hoc, 
 		//and is not nice that the other are different for an user theme change
@@ -855,12 +856,10 @@ public class ChronoJumpWindow
 					treeviewPulsesContextMenu(myPulse);
 				}
 			} else if(myTv == treeview_multi_chronopic) {
-				/*
-				if (myTreeViewPulses.EventSelectedID > 0) {
-					Pulse myPulse = SqlitePulse.SelectPulseData( myTreeViewPulses.EventSelectedID );
-					treeviewPulsesContextMenu(myPulse);
+				if (myTreeViewMultiChronopic.EventSelectedID > 0) {
+					MultiChronopic mc = SqliteMultiChronopic.SelectMultiChronopicData( myTreeViewMultiChronopic.EventSelectedID );
+					treeviewMultiChronopicContextMenu(mc);
 				}
-				*/
 			} else
 				Log.WriteLine(myTv.ToString());
 		}
@@ -1609,10 +1608,15 @@ public class ChronoJumpWindow
 
 	private void createTreeView_multi_chronopic (Gtk.TreeView tv) {
 		//myTreeViewMultiChronopic is a TreeViewMultiChronopic instance
-		myTreeViewMultiChronopic = new TreeViewMultiChronopic( tv, prefsDigitsNumber, TreeViewEvent.ExpandStates.MINIMIZED );
+		if(definedSession)
+			myTreeViewMultiChronopic = new TreeViewMultiChronopic( tv, prefsDigitsNumber, 
+					TreeViewEvent.ExpandStates.MINIMIZED, SqliteMultiChronopic.MaxCPs(currentSession.UniqueID) );
+		else
+			myTreeViewMultiChronopic = new TreeViewMultiChronopic( tv, prefsDigitsNumber, 
+					TreeViewEvent.ExpandStates.MINIMIZED, 2);
 
 		//the glade cursor_changed does not work on mono 1.2.5 windows
-//		tv.CursorChanged += on_treeview_multi_chronopic_cursor_changed; 
+		tv.CursorChanged += on_treeview_multi_chronopic_cursor_changed; 
 	}
 	
 	private void fillTreeView_multi_chronopic () {
@@ -1621,25 +1625,79 @@ public class ChronoJumpWindow
 		expandOrMinimizeTreeView((TreeViewEvent) myTreeViewMultiChronopic, treeview_multi_chronopic);
 	}
 	
+	private void on_button_multi_chronopic_zoom_clicked (object o, EventArgs args) {
+		myTreeViewMultiChronopic.ExpandState = myTreeViewMultiChronopic.ZoomChange(myTreeViewMultiChronopic.ExpandState);
+		if(myTreeViewMultiChronopic.ExpandState == TreeViewEvent.ExpandStates.MINIMIZED)
+			treeview_multi_chronopic.CollapseAll();
+		else if(myTreeViewMultiChronopic.ExpandState == TreeViewEvent.ExpandStates.OPTIMAL) {
+			treeview_multi_chronopic.CollapseAll();
+			myTreeViewMultiChronopic.ExpandOptimal();
+		} else
+			treeview_multi_chronopic.ExpandAll();
+	}
+	
 	private void treeview_multi_chronopic_storeReset() {
 		myTreeViewMultiChronopic.RemoveColumns();
-		myTreeViewMultiChronopic = new TreeViewMultiChronopic( treeview_multi_chronopic, prefsDigitsNumber, 
-				myTreeViewMultiChronopic.ExpandState );
+		if(definedSession)
+			myTreeViewMultiChronopic = new TreeViewMultiChronopic( treeview_multi_chronopic, prefsDigitsNumber, 
+					myTreeViewMultiChronopic.ExpandState, SqliteMultiChronopic.MaxCPs(currentSession.UniqueID) );
+		else
+			myTreeViewMultiChronopic = new TreeViewMultiChronopic( treeview_multi_chronopic, prefsDigitsNumber, 
+					myTreeViewMultiChronopic.ExpandState, 2);
 	}
 
 	private void on_button_connect_cp_clicked (object o, EventArgs args) {
-		if(o == (object) button_connect_cp2) {
+		if(image_cp2_no.Visible)
 			currentCp = 2;
-		} else if(o == (object) button_connect_cp3) {
+		else if(image_cp3_no.Visible)
 			currentCp = 3;
-		} else if(o == (object) button_connect_cp4) {
+		else if(image_cp4_no.Visible)
 			currentCp = 4;
-		} else
-			return; //error
-		
 		prepareChronopicConnection();
 	}
 
+	private void on_treeview_multi_chronopic_cursor_changed (object o, EventArgs args) {
+		Log.WriteLine("Cursor changed");
+		// don't select if it's a person, 
+		// is for not confusing with the person treeviews that controls who does events
+		if (myTreeViewMultiChronopic.EventSelectedID == 0) {
+			myTreeViewMultiChronopic.Unselect();
+			showHideActionEventButtons(false, "MultiChronopic"); //hide
+		} else if (myTreeViewMultiChronopic.EventSelectedID == -1) {
+			myTreeViewMultiChronopic.SelectHeaderLine();
+			showHideActionEventButtons(true, "MultiChronopic");
+		} else {
+			showHideActionEventButtons(true, "MultiChronopic"); //show
+		}
+	}
+
+	private void treeviewMultiChronopicContextMenu(MultiChronopic mc) {
+		Menu myMenu = new Menu ();
+		Gtk.MenuItem myItem;
+
+		myItem = new MenuItem ( Catalog.GetString("Edit selected") + " " + mc.Type + " (" + mc.PersonName + ")");
+		myItem.Activated += on_edit_selected_multi_chronopic_clicked;
+		myMenu.Attach( myItem, 0, 1, 0, 1 );
+
+		/*
+		myItem = new MenuItem ( Catalog.GetString("Repair selected") + " " + mc.Type + " (" + mc.PersonName + ")");
+		myItem.Activated += on_repair_selected_multi_chronopic_clicked;
+		myMenu.Attach( myItem, 0, 1, 1, 2 );
+		*/
+		
+		Gtk.SeparatorMenuItem mySep = new SeparatorMenuItem();
+		//myMenu.Attach( mySep, 0, 1, 2, 3 );
+		myMenu.Attach( mySep, 0, 1, 1, 2 );
+
+		myItem = new MenuItem ( Catalog.GetString("Delete selected") + " " + mc.Type + " (" + mc.PersonName + ")");
+		myItem.Activated += on_delete_selected_multi_chronopic_clicked;
+		//myMenu.Attach( myItem, 0, 1, 3, 4 );
+		myMenu.Attach( myItem, 0, 1, 2, 3 );
+
+		myMenu.Popup();
+		myMenu.ShowAll();
+	}
+
 
 
 
@@ -1711,52 +1769,28 @@ public class ChronoJumpWindow
 
 	private void createComboMultiChronopic() 
 	{
-		button_multi_chronopic_start.Sensitive = false;
-
-		frame_chronopic2.Sensitive = false;
-		frame_chronopic3.Sensitive = false;
-		frame_chronopic4.Sensitive = false;
-			
-		button_connect_cp2.Sensitive = false;
-		button_connect_cp3.Sensitive = false;
-		button_connect_cp4.Sensitive = false;
-		
+		table_multi_chronopic_buttons.Sensitive = false;
+		button_connect_cp.Sensitive = false;
 		image_cp1_yes.Hide();
 		image_cp2_yes.Hide();
 		image_cp3_yes.Hide();
 		image_cp4_yes.Hide();
 
 		if(Util.IsWindows()) {
-			combo_port_linux2.Hide();
-			combo_port_linux3.Hide();
-			combo_port_linux4.Hide();
-		
+			combo_port_windows.Sensitive = false;
+			combo_port_linux.Hide();
 			string [] comboWindowsOptions = new string[257];
 			for (int count = 0, i=1; i <= 257; i ++)
 				comboWindowsOptions[i-1] = "COM" + i;
 
-			UtilGtk.ComboUpdate(combo_port_windows2, comboWindowsOptions, comboWindowsOptions[0]);
-			UtilGtk.ComboUpdate(combo_port_windows3, comboWindowsOptions, comboWindowsOptions[0]);
-			UtilGtk.ComboUpdate(combo_port_windows4, comboWindowsOptions, comboWindowsOptions[0]);
-			
-			combo_port_windows2.Changed += new EventHandler (on_combo_multi_chronopic_changed);
-			combo_port_windows3.Changed += new EventHandler (on_combo_multi_chronopic_changed);
-			combo_port_windows4.Changed += new EventHandler (on_combo_multi_chronopic_changed);
+			UtilGtk.ComboUpdate(combo_port_windows, comboWindowsOptions, comboWindowsOptions[0]);
+			combo_port_windows.Changed += new EventHandler (on_combo_multi_chronopic_changed);
 		} else {
-			combo_port_windows2.Hide();
-			combo_port_windows3.Hide();
-			combo_port_windows4.Hide();
-
-			UtilGtk.ComboUpdate(combo_port_linux2, Constants.ComboPortLinuxOptions, Constants.ComboPortLinuxOptions[0]);
-			combo_port_linux2.Active = 0; //first option
-			UtilGtk.ComboUpdate(combo_port_linux3, Constants.ComboPortLinuxOptions, Constants.ComboPortLinuxOptions[0]);
-			combo_port_linux3.Active = 0; //first option
-			UtilGtk.ComboUpdate(combo_port_linux4, Constants.ComboPortLinuxOptions, Constants.ComboPortLinuxOptions[0]);
-			combo_port_linux4.Active = 0; //first option
-		
-			combo_port_linux2.Changed += new EventHandler (on_combo_multi_chronopic_changed);
-			combo_port_linux3.Changed += new EventHandler (on_combo_multi_chronopic_changed);
-			combo_port_linux4.Changed += new EventHandler (on_combo_multi_chronopic_changed);
+			combo_port_linux.Sensitive = false;
+			combo_port_windows.Hide();
+			UtilGtk.ComboUpdate(combo_port_linux, Constants.ComboPortLinuxOptions, Constants.ComboPortLinuxOptions[0]);
+			combo_port_linux.Active = 0; //first option
+			combo_port_linux.Changed += new EventHandler (on_combo_multi_chronopic_changed);
 		}
 	}
 
@@ -1832,20 +1866,8 @@ public class ChronoJumpWindow
 				UtilGtk.ComboGetActive(combo) == Constants.ChronopicDefaultPortLinux) 
 			portOk = false;
 
-		if (o == combo_port_linux2) 
-			button_connect_cp2.Sensitive = portOk;
-		if (o == combo_port_linux3) 
-			button_connect_cp3.Sensitive = portOk;
-		if (o == combo_port_linux4) 
-			button_connect_cp4.Sensitive = portOk;
-
-		if (o == combo_port_windows2) 
-			button_connect_cp2.Sensitive = portOk;
-		if (o == combo_port_windows3) 
-			button_connect_cp3.Sensitive = portOk;
-		if (o == combo_port_windows4) 
-			button_connect_cp4.Sensitive = portOk;
-
+		if (o == combo_port_linux || o == combo_port_windows) 
+			button_connect_cp.Sensitive = portOk;
 	}
 	
 
@@ -1921,6 +1943,7 @@ public class ChronoJumpWindow
 			//show hidden widgets
 			sensitiveGuiNoSession();
 			sensitiveGuiYesSession();
+			definedSession = true;
 
 			//for sure, jumpsExists is false, because we create a new session
 
@@ -1983,6 +2006,7 @@ public class ChronoJumpWindow
 		//show hidden widgets
 		sensitiveGuiNoSession();
 		sensitiveGuiYesSession();
+		definedSession = true;
 		
 		button_edit_current_person.Sensitive = false;
 		menuitem_edit_current_person.Sensitive = false;
@@ -2013,6 +2037,7 @@ public class ChronoJumpWindow
 		SqliteSession.DeleteWithJumps(currentSession.UniqueID.ToString());
 		
 		sensitiveGuiNoSession();
+		definedSession = false;
 		app1.Title = progName + "";
 	}
 
@@ -2230,20 +2255,52 @@ public class ChronoJumpWindow
 		if(menuitem_simulated.Active) {
 			Log.WriteLine("RadioSimulated - ACTIVE");
 			simulated = true;
-Log.WriteLine("sqli start");
 			SqlitePreferences.Update("simulated", simulated.ToString(), false);
-Log.WriteLine("sqli end");
 
 			//close connection with chronopic if initialized
 			if(cpRunning) {
 				sp.Close();
+					
+				image_cp1_no.Show();
+				image_cp1_yes.Hide();
+				//close connection with other chronopics on multiChronopic
+				if(image_cp2_yes.Visible) {
+					sp2.Close();
+					image_cp2_no.Show();
+					image_cp2_yes.Hide();
+				}
+				if(image_cp3_yes.Visible) {
+					sp3.Close();
+					image_cp3_no.Show();
+					image_cp3_yes.Hide();
+				}
+				if(image_cp4_yes.Visible) {
+					sp4.Close();
+					image_cp4_no.Show();
+					image_cp4_yes.Hide();
+				}
+				table_multi_chronopic_buttons.Sensitive = false;
+				combo_port_windows.Sensitive = false;
+				combo_port_linux.Sensitive = false;
+		
+				//regenerate combos (maybe some ports have been deleted on using before going to simulated)
+				if(Util.IsWindows()) {
+					string [] comboWindowsOptions = new string[257];
+					for (int count = 0, i=1; i <= 257; i ++)
+						comboWindowsOptions[i-1] = "COM" + i;
+					UtilGtk.ComboUpdate(combo_port_windows, comboWindowsOptions, comboWindowsOptions[0]);
+				} else {
+					UtilGtk.ComboUpdate(combo_port_linux, Constants.ComboPortLinuxOptions, Constants.ComboPortLinuxOptions[0]);
+					combo_port_linux.Active = 0; //first option
+				}
 			}
-Log.WriteLine("cpclosed");
+			Log.WriteLine("cpclosed");
 			cpRunning = false;
 		}
 		else
 			Log.WriteLine("RadioSimulated - INACTIVE");
-Log.WriteLine("all done");
+		
+		Log.WriteLine("all done");
 	}
 	
 	void on_radiobutton_chronopic (object o, EventArgs args)
@@ -2291,7 +2348,6 @@ Log.WriteLine("all done");
 		if(currentCp == 1) {
 			simulated = false;
 			SqlitePreferences.Update("simulated", simulated.ToString(), false);
-		
 			if(cpRunning)
 				return;
 		}
@@ -2299,84 +2355,76 @@ Log.WriteLine("all done");
 		string message = "";
 		string myPort = "";
 		bool success = false;
+			
+		if(currentCp == 1) 
+			myPort = chronopicPort;
+		else {
+			if(Util.IsWindows()) 
+				myPort = UtilGtk.ComboGetActive(combo_port_windows);
+			else
+				myPort = UtilGtk.ComboGetActive(combo_port_linux);
+		}
 
 		if(currentCp == 1) {
-			cp = chronopicInit(cp, out sp, platformState, chronopicPort, out message, out success);
+			cp = chronopicInit(cp, out sp, platformState, myPort, out message, out success);
 			if(success) {
 				image_cp1_no.Hide();
 				image_cp1_yes.Show();
-				button_multi_chronopic_start.Sensitive = true;
-				frame_chronopic2.Sensitive = true;
-				//disallow selection of that port for other chronopics
-				UtilGtk.ComboDelThisValue(combo_port_linux2, chronopicPort);
-				UtilGtk.ComboDelThisValue(combo_port_linux3, chronopicPort);
-				UtilGtk.ComboDelThisValue(combo_port_linux4, chronopicPort);
-
 			} else {
 				image_cp1_no.Show();
 				image_cp1_yes.Hide();
-				button_multi_chronopic_start.Sensitive = false;
-				//allow to connect next chronopic
-				frame_chronopic2.Sensitive = false;
 			}
 		}
 		else if(currentCp == 2) {
-			if(Util.IsWindows()) 
-				myPort = UtilGtk.ComboGetActive(combo_port_windows2);
-			else
-				myPort = UtilGtk.ComboGetActive(combo_port_linux2);
 			cp2 = chronopicInit(cp2, out sp2, platformState2, myPort, out message, out success);
 			if(success) {
 				image_cp2_no.Hide();
 				image_cp2_yes.Show();
-				combo_port_linux2.Sensitive = false;
-				combo_port_windows2.Sensitive = false;
-				button_connect_cp2.Sensitive = false;
-				//allow to connect next chronopic
-				frame_chronopic3.Sensitive = true;
-				//disallow selection of that port for other chronopics
-				UtilGtk.ComboDelThisValue(combo_port_linux3, myPort);
-				UtilGtk.ComboDelThisValue(combo_port_linux4, myPort);
 			} 
 		}
 		else if(currentCp == 3) {
-			if(Util.IsWindows()) 
-				myPort = UtilGtk.ComboGetActive(combo_port_windows3);
-			else
-				myPort = UtilGtk.ComboGetActive(combo_port_linux3);
 			cp3 = chronopicInit(cp3, out sp3, platformState3, myPort, out message, out success);
 			if(success) {
 				image_cp3_no.Hide();
 				image_cp3_yes.Show();
-				combo_port_linux3.Sensitive = false;
-				combo_port_windows3.Sensitive = false;
-				button_connect_cp3.Sensitive = false;
-				//allow to connect next chronopic
-				frame_chronopic4.Sensitive = true;
-				//disallow selection of that port for other chronopics
-				UtilGtk.ComboDelThisValue(combo_port_linux4, myPort);
 			} 
 		}
 		else if(currentCp == 4) {
-			if(Util.IsWindows()) 
-				myPort = UtilGtk.ComboGetActive(combo_port_windows4);
-			else
-				myPort = UtilGtk.ComboGetActive(combo_port_linux4);
 			cp4 = chronopicInit(cp4, out sp4, platformState4, myPort, out message, out success);
 			if(success) {
 				image_cp4_no.Hide();
 				image_cp4_yes.Show();
-				combo_port_linux4.Sensitive = false;
-				combo_port_windows4.Sensitive = false;
-				button_connect_cp4.Sensitive = false;
+				button_connect_cp.Sensitive = false;
 			} 
 		}
+		
 
 		Log.WriteLine(string.Format("wait_chronopic_start {0}", message));
 			
 		if(success) {
 			updateChronopicWinValuesState= true; //connected
 			updateChronopicWinValuesMessage= message;
+				
+			if(currentCp >= 2) 
+				table_multi_chronopic_buttons.Sensitive = true;
+	
+			//disallow selection of that port for other chronopics
+			//and change sensitiveness of combo port 
+			if(Util.IsWindows()) {
+				UtilGtk.ComboDelThisValue(combo_port_windows, myPort);
+				combo_port_windows.Active = 0; //first option
+				if(currentCp < 4)
+					combo_port_windows.Sensitive = true;
+				else
+					combo_port_windows.Sensitive = false;
+			} else {
+				UtilGtk.ComboDelThisValue(combo_port_linux, myPort);
+				combo_port_linux.Active = 0; //first option
+				if(currentCp < 4)
+					combo_port_linux.Sensitive = true;
+				else
+					combo_port_linux.Sensitive = false;
+			}
 		} else {
 			updateChronopicWinValuesState= false; //disconnected
 			updateChronopicWinValuesMessage= message;
@@ -2727,6 +2775,23 @@ Log.WriteLine("all done");
 		} else {
 			//call write here, because if done in execute/MultiChronopic, will be called n times if n chronopics are working
 			currentEventExecute.MultiChronopicWrite(false);
+			currentMultiChronopic = (MultiChronopic) currentEventExecute.EventDone;
+Console.WriteLine("W");
+		
+
+			//if this multichronopic has more chronopics than other in session, then reload treeview, else simply add
+			if(currentMultiChronopic.MaxCPs() != SqliteMultiChronopic.MaxCPs(currentSession.UniqueID)) {
+				treeview_multi_chronopic_storeReset();
+				fillTreeView_multi_chronopic();
+			} else
+				myTreeViewMultiChronopic.Add(currentPerson.Name, currentMultiChronopic);
+Console.WriteLine("X");
+			
+			//since 0.7.4.1 when test is done, treeview select it. action event button have to be shown 
+			showHideActionEventButtons(true, "MultiChronopic"); //show
+		
+			//unhide buttons for delete last test
+			sensitiveGuiYesEvent();
 		}
 	}
 		
@@ -2815,6 +2880,11 @@ Log.WriteLine("all done");
 			currentEventType = new PulseType("Free");
 		} else 	if(o == (object) button_pulse_custom) {
 			currentEventType = new PulseType("Custom");
+		//multiChronopic
+		} else 	if(o == (object) button_multi_chronopic_start) {
+			return;
+		} else 	if(o == (object) button_run_analysis) {
+			return;
 		}
 
 		changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
@@ -3157,16 +3227,6 @@ Log.WriteLine("all done");
 
 			//in this jump type, don't ask for limit of jumps or seconds
 			on_rj_accepted(o, args);
-		} else if(o == (object) button_run_analysis || o == (object) menuitem_run_analysis) 
-		{
-			//ATTENTION: run analysis is considered a reactive jump
-			//because all tc and tf's have to be recorded
-			currentJumpType = new JumpType(Constants.RunAnalysisName);
-
-			//on_rj_accepted(o, args);
-			//need to ask for horizontal distance between photocells
-			jumpExtraWin = JumpExtraWindow.Show(app1, currentJumpType);
-			jumpExtraWin.Button_accept.Clicked += new EventHandler(on_rj_accepted);
 		}
 	}
 	private void on_rj_accepted (object o, EventArgs args) 
@@ -3484,7 +3544,6 @@ Log.WriteLine("all done");
 			showHideActionEventButtons(true, "Run"); //show
 		
 			if(createdStatsWin) {
-				//statsWin.FillTreeView_stats(false, false);
 				statsWin.ShowUpdateStatsButton();
 			}
 		
@@ -3973,8 +4032,7 @@ Log.WriteLine("all done");
 	 *  --------------------------------------------------------
 	 */
 
-
-	private void on_button_multi_chronopic_start_clicked (object o, EventArgs args) {
+	private void on_multi_chronopic_start_clicked (object o, EventArgs args) {
 		Log.WriteLine("multi chronopic accepted");
 
 		//used by cancel and finish
@@ -4045,6 +4103,26 @@ Log.WriteLine("all done");
 
 	private void on_multi_chronopic_finished (object o, EventArgs args) {
 		currentEventExecute.FakeButtonFinished.Clicked -= new EventHandler(on_multi_chronopic_finished);
+
+/*		
+		if ( ! currentEventExecute.Cancel ) {
+Console.WriteLine("V");
+			currentMultiChronopic = (MultiChronopic) currentEventExecute.EventDone;
+Console.WriteLine("W");
+			
+			myTreeViewMultiChronopic.Add(currentPerson.Name, currentMultiChronopic);
+Console.WriteLine("X");
+			
+			//since 0.7.4.1 when test is done, treeview select it. action event button have to be shown 
+			showHideActionEventButtons(true, "MultiChronopic"); //show
+		
+			//unhide buttons for delete last test
+			sensitiveGuiYesEvent();
+		}
+		
+		//unhide buttons that allow doing another test
+		sensitiveGuiEventDone();
+		*/
 	}
 		
 
@@ -4092,6 +4170,22 @@ Log.WriteLine("all done");
 				case EventType.Types.REACTIONTIME:
 					eventExecuteWin.PrepareReactionTimeGraph(currentReactionTime.Time);
 					break;
+				case EventType.Types.MULTICHRONOPIC:
+					eventExecuteWin.PrepareMultiChronopicGraph(
+						//currentMultiChronopic.timestamp, 
+						Util.IntToBool(currentMultiChronopic.Cp1StartedIn), 
+						Util.IntToBool(currentMultiChronopic.Cp2StartedIn), 
+						Util.IntToBool(currentMultiChronopic.Cp3StartedIn), 
+						Util.IntToBool(currentMultiChronopic.Cp4StartedIn), 
+						currentMultiChronopic.Cp1InStr, 
+						currentMultiChronopic.Cp1OutStr,
+						currentMultiChronopic.Cp2InStr, 
+						currentMultiChronopic.Cp2OutStr,
+						currentMultiChronopic.Cp3InStr, 
+						currentMultiChronopic.Cp3OutStr,
+						currentMultiChronopic.Cp4InStr, 
+						currentMultiChronopic.Cp4OutStr);
+					break;
 			}
 		}
 		catch {
@@ -4320,7 +4414,36 @@ Log.WriteLine("all done");
 		//}
 	}
 	
+	private void on_edit_selected_multi_chronopic_clicked (object o, EventArgs args) {
+		notebook_change(6);
+		Log.WriteLine("Edit selected multi chronopic");
+		//1.- check that there's a line selected
+		//2.- check that this line is a jump and not a person (check also if it's not a individual RJ, the pass the parent RJ)
+		if (myTreeViewMultiChronopic.EventSelectedID > 0) {
+			//3.- obtain the data of the selected test
+			MultiChronopic mc = SqliteMultiChronopic.SelectMultiChronopicData( myTreeViewMultiChronopic.EventSelectedID );
+			eventOldPerson = mc.PersonID;
+		
+			//4.- edit this jump
+			editMultiChronopicWin = EditMultiChronopicWindow.Show(app1, mc, prefsDigitsNumber);
+			editMultiChronopicWin.Button_accept.Clicked += new EventHandler(on_edit_selected_multi_chronopic_accepted);
+		}
+	}
 
+	private void on_edit_selected_multi_chronopic_accepted (object o, EventArgs args) {
+		Log.WriteLine("edit selected multi chronopic accepted");
+	
+		MultiChronopic mc = SqliteMultiChronopic.SelectMultiChronopicData( myTreeViewMultiChronopic.EventSelectedID );
+		
+		//if person changed, fill treeview again, if not, only update it's line
+		if(eventOldPerson == mc.PersonID) 
+			myTreeViewMultiChronopic.Update(mc);
+		else {
+			treeview_multi_chronopic_storeReset();
+			fillTreeView_multi_chronopic();
+		}
+	}
+	
 	/* ---------------------------------------------------------
 	 * ----------------  EVENTS DELETE -------------------------
 	 *  --------------------------------------------------------
@@ -4527,6 +4650,35 @@ Log.WriteLine("all done");
 		*/
 	}
 
+	private void on_delete_selected_multi_chronopic_clicked (object o, EventArgs args) {
+		notebook_change(6);
+		Log.WriteLine("delete selected multi chronopic");
+		//1.- check that there's a line selected
+		//2.- check that this line is a test and not a person (check also if it's not a individual mc, then pass the parent mc)
+		if (myTreeViewMultiChronopic.EventSelectedID > 0) {
+			//3.- display confirmwindow of deletion 
+			if (askDeletion) {
+				confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want to delete selected test?"), 
+						"", "jump", myTreeViewMultiChronopic.EventSelectedID);
+				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_multi_chronopic_accepted);
+			} else {
+				on_delete_selected_multi_chronopic_accepted(o, args);
+			}
+		}
+	}
+	
+	private void on_delete_selected_multi_chronopic_accepted (object o, EventArgs args) {
+		Log.WriteLine("accept delete selected multi chronopic");
+		
+		SqliteMultiChronopic.Delete( (myTreeViewMultiChronopic.EventSelectedID).ToString() );
+		
+		appbar2.Push( 1, Catalog.GetString ( "Deleted multi chronopic" ));
+	
+		myTreeViewMultiChronopic.DelEvent(myTreeViewMultiChronopic.EventSelectedID);
+		showHideActionEventButtons(false, "MultiChronopic");
+	}
+	
+
 
 
 	/* ---------------------------------------------------------
@@ -4662,6 +4814,10 @@ Log.WriteLine("all done");
 		*/
 	}
 
+	private void on_repair_selected_multi_chronopic_clicked (object o, EventArgs args) {
+		notebook_change(6);
+		Log.WriteLine("Repair selected multichronopic");
+	}
 	
 
 	/* ---------------------------------------------------------
@@ -4965,6 +5121,11 @@ Log.WriteLine("all done");
 			button_repair_selected_pulse.Sensitive = show;
 			success = true;
 		} 
+		if (type == "ALL" || type == "MultiChronopic") {
+			button_edit_selected_multi_chronopic.Sensitive = show;
+			button_delete_selected_multi_chronopic.Sensitive = show;
+			success = true;
+		} 
 		if (!success) {
 			Log.WriteLine(string.Format("Error in showHideActionEventButtons, type: {0}", type));
 		}
diff --git a/src/gui/event.cs b/src/gui/event.cs
index ba74fce..603d316 100644
--- a/src/gui/event.cs
+++ b/src/gui/event.cs
@@ -83,6 +83,7 @@ public class EditEventWindow
 	protected string entryWeight = "0"; //used to record the % for old person if we change it
 	protected string entryAngle = "0";
 
+	protected bool showType;
 	protected bool showTv;
 	protected bool showTc;
 	protected bool showFall;
@@ -94,6 +95,7 @@ public class EditEventWindow
 	protected bool showAngle;
 
 	protected string eventBigTypeString = "a test";
+	protected bool headerShowDecimal = true;
 
 	protected int oldPersonID; //used to record the % for old person if we change it
 
@@ -127,6 +129,7 @@ public class EditEventWindow
 }
 	
 	protected virtual void initializeValues () {
+		showType = true;
 		showTv = true;
 		showTc = true;
 		showFall = true;
@@ -219,6 +222,11 @@ public class EditEventWindow
 		entry_description.Text = Util.RemoveNewLine(temp);
 
 		createComboEventType(myEvent);
+		
+		if(! showType) {
+			label_type_title.Hide();
+			combo_eventType.Hide();
+		}
 
 		string [] persons = SqlitePersonSession.SelectCurrentSession(myEvent.SessionID, true, false); //onlyIDAndName, not reversed
 		combo_persons = ComboBox.NewText();
@@ -236,7 +244,9 @@ public class EditEventWindow
 
 		System.Globalization.NumberFormatInfo localeInfo = new System.Globalization.NumberFormatInfo();
 		localeInfo = System.Globalization.NumberFormatInfo.CurrentInfo;
-		label_header.Text = string.Format(Catalog.GetString("Use this window to edit a {0}.\n(decimal separator: '{1}')"), eventBigTypeString, localeInfo.NumberDecimalSeparator);
+		label_header.Text = string.Format(Catalog.GetString("Use this window to edit a {0}."), eventBigTypeString);
+		if(headerShowDecimal)
+			label_header.Text += string.Format(Catalog.GetString("\n(decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
 	}
 
 		
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index a490a86..554cb9a 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -42,6 +42,7 @@ public class EventExecuteWindow
 	[Widget] Gtk.Label label_simulated;
 	[Widget] Gtk.Image image_simulated_l;
 	[Widget] Gtk.Image image_simulated_r;
+	[Widget] Gtk.Label label_sync_message;
 	
 	[Widget] Gtk.ProgressBar progressbar_event;
 	[Widget] Gtk.ProgressBar progressbar_time;
@@ -445,6 +446,10 @@ public class EventExecuteWindow
 	public void ButtonFinishMakeSensitive() {
 		button_finish.Sensitive = true;
 	}
+
+	public void ShowSyncMessage(string str) {
+		label_sync_message.Text = str;
+	}
 		
 	private void clearProgressBars() 
 	{
@@ -913,7 +918,8 @@ public class EventExecuteWindow
 	}
 	
 	// multi chronopic 
-	public void PrepareMultiChronopicGraph(double timestamp, 
+	public void PrepareMultiChronopicGraph(
+			//double timestamp, 
 			bool cp1StartedIn, bool cp2StartedIn, bool cp3StartedIn, bool cp4StartedIn,
 			string cp1InStr, string cp1OutStr, string cp2InStr, string cp2OutStr, 
 			string cp3InStr, string cp3OutStr, string cp4InStr, string cp4OutStr) { 
@@ -926,12 +932,16 @@ public class EventExecuteWindow
 		double maxValue = 0;
 		int topMargin = 10;
 		//if max value of graph is automatic
+		/*
 		if(eventGraphConfigureWin.Max == -1) 
-			maxValue = timestamp; //TODO: delete this, is not used here
+			//maxValue = timestamp; //TODO: delete this, is not used here
 		else {
-			maxValue = eventGraphConfigureWin.Max; //TODO
+			//maxValue = eventGraphConfigureWin.Max; //TODO
 			topMargin = 0;
 		}
+		*/
+		if(eventGraphConfigureWin.Max != -1) 
+			topMargin = 0;
 			
 		//search MIN 
 		double minValue = 1000;
@@ -950,7 +960,8 @@ public class EventExecuteWindow
 				*/
 
 		//paint graph
-		paintMultiChronopic (drawingarea, timestamp, 
+		paintMultiChronopic (drawingarea, 
+				//timestamp, 
 				cp1StartedIn, cp2StartedIn, cp3StartedIn, cp4StartedIn,
 				cp1InStr, cp1OutStr, cp2InStr, cp2OutStr, cp3InStr, cp3OutStr, cp4InStr, cp4OutStr, 
 				maxValue, minValue, topMargin, bottomMargin);
@@ -1467,8 +1478,14 @@ public class EventExecuteWindow
 		return ( ancho * ( (timeOld + time) / timeTotal) ) -rightMargin;
 	}
 
+	int yCp1Out = 20;
+	int yCp2Out = 90;
+	int yCp3Out = 160;
+	int yCp4Out = 230;
+
 	//TODO: fix this method
-	private void paintMultiChronopic (Gtk.DrawingArea drawingarea, double timestamp, 
+	private void paintMultiChronopic (Gtk.DrawingArea drawingarea, 
+			//double timestamp, 
 			bool cp1StartedIn, bool cp2StartedIn, bool cp3StartedIn, bool cp4StartedIn,
 			string cp1InStr, string cp1OutStr, string cp2InStr, string cp2OutStr, 
 			string cp3InStr, string cp3OutStr, string cp4InStr, string cp4OutStr, 
@@ -1501,14 +1518,16 @@ public class EventExecuteWindow
 		erasePaint(drawingarea);
 
 		//writeMarginsText(maxValue, minValue, alto);
+		writeCpNames();
 
 		//check now here that we will have not division by zero problems
-		if(maxValue - minValue <= 0) 
-			return;
+		//if(maxValue - minValue <= 0) 
+		//	return;
 
-		paintMultiChronopic2 (ancho, cp1StartedIn, cp1InStr, cp1OutStr, timeTotal, 30,20);
-		paintMultiChronopic2 (ancho, cp2StartedIn, cp2InStr, cp2OutStr, timeTotal, 100,90);
-		paintMultiChronopic2 (ancho, cp3StartedIn, cp3InStr, cp3OutStr, timeTotal, 170,180);
+		paintMultiChronopic2 (ancho, cp1StartedIn, cp1InStr, cp1OutStr, timeTotal, yCp1Out +10, yCp1Out);
+		paintMultiChronopic2 (ancho, cp2StartedIn, cp2InStr, cp2OutStr, timeTotal, yCp2Out +10, yCp2Out);
+		paintMultiChronopic2 (ancho, cp3StartedIn, cp3InStr, cp3OutStr, timeTotal, yCp3Out +10, yCp3Out);
+		paintMultiChronopic2 (ancho, cp4StartedIn, cp4InStr, cp4OutStr, timeTotal, yCp4Out +10, yCp4Out);
 
 		graphProgress = phasesGraph.DONE; 
 	}
@@ -1523,6 +1542,8 @@ public class EventExecuteWindow
 		int heightEnd;
 		Gdk.GC penStart;
 		Gdk.GC penEnd;
+		Gdk.GC penStartDiscont;
+		Gdk.GC penEndDiscont;
 		string [] cpStart;
 		string [] cpEnd;
 		
@@ -1531,6 +1552,8 @@ public class EventExecuteWindow
 			cpEnd =   cpOutStr.Split(new char[] {'='});
 			penStart = pen_rojo;
 			penEnd = pen_azul;
+			penStartDiscont = pen_rojo_discont;
+			penEndDiscont = pen_azul_discont;
 			heightStart = h1;
 			heightEnd = h2;
 		}
@@ -1539,25 +1562,25 @@ public class EventExecuteWindow
 			cpEnd =   cpInStr.Split(new char[] {'='});
 			penStart = pen_azul;
 			penEnd = pen_rojo;
+			penStartDiscont = pen_azul_discont;
+			penEndDiscont = pen_rojo_discont;
 			heightStart = h2;
 			heightEnd = h1;
 		}
 		ticks = cpStart.Length;
 		double timeOld = 0;
 		double xOld = 0;
+		bool lastCpIsStart = true;
 
 		Console.WriteLine("\n(A) cpInStr:*{0}*, cpOutStr:*{1}*", cpInStr, cpOutStr);
 
-		/*
-		   int maxTcTfs = 10; if(cp1_i.Length > maxTcTfs) cp1_i = Util.DeleteFirstStrings(cp1_i, maxTcTfs); if(cp1_o.Length > maxTcTfs) cp1_o = Util.DeleteFirstStrings(cp1_o, maxTcTfs); cp1InStr = Util.StringArrayToString(cp1_i, "="); cp1OutStr = Util.StringArrayToString(cp1_o, "="); Console.WriteLine("(B) cp1InStr:*{0}*, cp1OutStr:*{1}*", cp1InStr, cp1OutStr);
-		   */
-
 		for(int i=0; i < ticks; i++) { 
 			if(cpStart.Length > i) {
 				double x = multiChronopicGetX(ancho, Convert.ToDouble(cpStart[i]), timeOld, timeTotal);
 				pixmap.DrawLine(penStart, Convert.ToInt32(xOld), heightStart, Convert.ToInt32(x), heightStart);
 				timeOld += Convert.ToDouble(cpStart[i]);
 				xOld = x;
+				lastCpIsStart = true;
 			}
 
 			if(cpEnd.Length > i) {
@@ -1565,8 +1588,21 @@ public class EventExecuteWindow
 				pixmap.DrawLine(penEnd, Convert.ToInt32(xOld), heightEnd, Convert.ToInt32(x), heightEnd);
 				timeOld += Convert.ToDouble(cpEnd[i]);
 				xOld = x;
+				lastCpIsStart = false;
 			}
 		}
+		
+		/*
+		   the chronopic that received last event, it's painted and arrives at right end of graph
+		   following code allows to paint line also on other chronopics
+		   in order to show all updated four cps after any cp change
+		   */
+		if(timeOld < timeTotal) { //this cp didn't received last event
+			if(lastCpIsStart)
+				pixmap.DrawLine(penStartDiscont, Convert.ToInt32(xOld), heightStart, Convert.ToInt32(ancho-rightMargin), heightStart);
+			else
+				pixmap.DrawLine(penEndDiscont, Convert.ToInt32(xOld), heightEnd, Convert.ToInt32(ancho-rightMargin), heightEnd);
+		}
 	}
 
 
@@ -1614,6 +1650,16 @@ public class EventExecuteWindow
 									//and text goes down from the baseline, and will not be seen
 	}
 		
+	private void writeCpNames() {
+		layout.SetMarkup("cp1");
+		pixmap.DrawLayout (pen_gris, 0, yCp1Out -20, layout);
+		layout.SetMarkup("cp2");
+		pixmap.DrawLayout (pen_gris, 0, yCp2Out -20, layout);
+		layout.SetMarkup("cp3");
+		pixmap.DrawLayout (pen_gris, 0, yCp3Out -20, layout);
+		layout.SetMarkup("cp4");
+		pixmap.DrawLayout (pen_gris, 0, yCp4Out -20, layout);
+	}
 			
 	private void hideButtons() {
 		button_cancel.Sensitive = false;
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index bc7f4f7..20dc83a 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -80,6 +80,7 @@ public class EditJumpWindow : EditEventWindow
 	}
 	
 	protected override void initializeValues () {
+		showType = true;
 		showTv = true;
 		showTc= true;
 		showFall = true;
@@ -302,6 +303,7 @@ public class EditJumpRjWindow : EditJumpWindow
 	}
 	
 	protected override void initializeValues () {
+		showType = true;
 		showTv = false;
 		showTc = false;
 		showFall = true;
@@ -813,7 +815,8 @@ public class JumpExtraWindow
 		if (JumpExtraWindowBox == null) {
 			JumpExtraWindowBox = new JumpExtraWindow (parent);
 		}
-		
+	
+	/*	
 		if(myJumpType.Name == Constants.RunAnalysisName) {
 			hideRepetitiveData();	
 			hideWeightData();	
@@ -830,6 +833,7 @@ public class JumpExtraWindow
 
 			return JumpExtraWindowBox;
 		}
+		*/
 		
 		if(myJumpType.IsRepetitive) {
 			string jumpsName = Catalog.GetString("jumps");
diff --git a/src/gui/multiChronopic.cs b/src/gui/multiChronopic.cs
new file mode 100644
index 0000000..5bb30be
--- /dev/null
+++ b/src/gui/multiChronopic.cs
@@ -0,0 +1,108 @@
+/*
+ * 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
+ *
+ * Xavier de Blas: 
+ */
+
+using System;
+using Gtk;
+using Glade;
+using System.Text; //StringBuilder
+using System.Collections; //ArrayList
+
+using System.Threading;
+using Mono.Unix;
+
+
+
+//--------------------------------------------------------
+//---------------- EDIT MULTI CHRONOPIC WIDGET -----------
+//--------------------------------------------------------
+
+public class EditMultiChronopicWindow : EditEventWindow
+{
+	static EditMultiChronopicWindow EditMultiChronopicWindowBox;
+
+	EditMultiChronopicWindow (Gtk.Window parent) {
+		Glade.XML gladeXML;
+		gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "edit_event", null);
+		gladeXML.Autoconnect(this);
+		this.parent 	= parent;
+		
+		//put an icon to window
+		UtilGtk.IconWindow(edit_event);
+	
+		eventBigTypeString = Catalog.GetString("multi chronopic");
+		headerShowDecimal = false;
+	}
+
+	static new public EditMultiChronopicWindow Show (Gtk.Window parent, Event myEvent, int pDN)
+	{
+		if (EditMultiChronopicWindowBox == null) {
+			EditMultiChronopicWindowBox = new EditMultiChronopicWindow (parent);
+		}
+
+		EditMultiChronopicWindowBox.pDN = pDN;
+		
+		EditMultiChronopicWindowBox.initializeValues();
+
+		EditMultiChronopicWindowBox.fillDialog (myEvent);
+
+		EditMultiChronopicWindowBox.edit_event.Show ();
+
+		return EditMultiChronopicWindowBox;
+	}
+	
+	protected override void initializeValues () {
+		headerShowDecimal = false;
+		showType = false;
+		showTv = false;
+		showTc= false;
+		showFall = false;
+		showDistance = false;
+		showTime = false;
+		showSpeed = false;
+		showWeight = false;
+		showLimited = false;
+	}
+
+	protected override void updateEvent(int eventID, int personID, string description) {
+		SqliteMultiChronopic.Update(eventID, personID, description);
+	}
+
+	protected override void on_button_cancel_clicked (object o, EventArgs args)
+	{
+		EditMultiChronopicWindowBox.edit_event.Hide();
+		EditMultiChronopicWindowBox = null;
+	}
+	
+	protected override void on_delete_event (object o, DeleteEventArgs args)
+	{
+		EditMultiChronopicWindowBox.edit_event.Hide();
+		EditMultiChronopicWindowBox = null;
+	}
+	
+	protected override void hideWindow() {
+		EditMultiChronopicWindowBox.edit_event.Hide();
+		EditMultiChronopicWindowBox = null;
+	}
+
+}
+
+
+
+
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 31ed987..9c414e5 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -1608,7 +1608,7 @@ public class PersonShowAllEventsWindow {
 		createComboPersons(sessionID, currentPerson.UniqueID.ToString(), currentPerson.Name);
 		createTreeView(treeview_person_show_all_events);
 		store = new TreeStore( typeof (string), typeof (string), typeof (string), typeof (string), 
-				typeof (string), typeof(string), typeof(string), typeof(string), typeof(string) );
+				typeof (string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string) );
 		treeview_person_show_all_events.Model = store;
 		fillTreeView(treeview_person_show_all_events,store, currentPerson.UniqueID);
 	}
@@ -1653,7 +1653,7 @@ public class PersonShowAllEventsWindow {
 		string myText = UtilGtk.ComboGetActive(combo_persons);
 		if(myText != "") {
 			store = new TreeStore( typeof (string), typeof (string), typeof (string), typeof (string), 
-					typeof (string), typeof(string), typeof(string), typeof(string), typeof(string) );
+					typeof (string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string) );
 			treeview_person_show_all_events.Model = store;
 			
 			string [] myStringFull = myText.Split(new char[] {':'});
@@ -1675,7 +1675,6 @@ public class PersonShowAllEventsWindow {
 	protected void createTreeView (Gtk.TreeView tv) {
 		tv.HeadersVisible=true;
 		int count = 0;
-
 		tv.AppendColumn ( Catalog.GetString ("Session name"), new CellRendererText(), "text", count++);
 		tv.AppendColumn ( Catalog.GetString ("Place"), new CellRendererText(), "text", count++);
 		tv.AppendColumn ( Catalog.GetString ("Date\n"), new CellRendererText(), "text", count++);
@@ -1685,17 +1684,18 @@ public class PersonShowAllEventsWindow {
 		tv.AppendColumn ( Catalog.GetString ("Runs\ninterval"), new CellRendererText(), "text", count++);
 		tv.AppendColumn ( Catalog.GetString ("Reaction\ntime"), new CellRendererText(), "text", count++);
 		tv.AppendColumn ( Catalog.GetString ("Pulses"), new CellRendererText(), "text", count++);
+		tv.AppendColumn ( Catalog.GetString ("MultiChronopic"), new CellRendererText(), "text", count++);
 	}
 	
 	protected void fillTreeView (Gtk.TreeView tv, TreeStore store, int personID) {
 		ArrayList myEvents;
-		//myEvents = SqlitePerson.SelectAllPersonEvents(currentPerson.UniqueID); 
 		myEvents = SqlitePerson.SelectAllPersonEvents(personID); 
 
 		foreach (string myEvent in myEvents) {
 			string [] myStr = myEvent.Split(new char[] {':'});
 
-			store.AppendValues (myStr[0], myStr[1], myStr[2], myStr[3], myStr[4], myStr[5], myStr[6], myStr[7], myStr[8]);
+			store.AppendValues (myStr[0], myStr[1], myStr[2], myStr[3], myStr[4], myStr[5], 
+					myStr[6], myStr[7], myStr[8], myStr[9]);
 		}
 	}
 	
diff --git a/src/gui/pulse.cs b/src/gui/pulse.cs
index f91e62b..8e1a1a9 100644
--- a/src/gui/pulse.cs
+++ b/src/gui/pulse.cs
@@ -47,6 +47,7 @@ public class EditPulseWindow : EditEventWindow
 		UtilGtk.IconWindow(edit_event);
 	
 		eventBigTypeString = Catalog.GetString("pulse");
+		headerShowDecimal = false;
 	}
 
 	static new public EditPulseWindow Show (Gtk.Window parent, Event myEvent, int pDN)
@@ -67,6 +68,7 @@ public class EditPulseWindow : EditEventWindow
 	}
 	
 	protected override void initializeValues () {
+		showType = true;
 		showTv = false;
 		showTc= false;
 		showFall = false;
diff --git a/src/gui/reactionTime.cs b/src/gui/reactionTime.cs
index dc6174f..1dc01aa 100644
--- a/src/gui/reactionTime.cs
+++ b/src/gui/reactionTime.cs
@@ -69,6 +69,8 @@ public class EditReactionTimeWindow : EditEventWindow
 	}
 	
 	protected override void initializeValues () {
+		headerShowDecimal = false;
+		showType = false;
 		showTv = false;
 		showTc= false;
 		showFall = false;
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 9124e75..36b839b 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -72,6 +72,7 @@ public class EditRunWindow : EditEventWindow
 	}
 	
 	protected override void initializeValues () {
+		showType = true;
 		showTv = false;
 		showTc= false;
 		showFall = false;
@@ -244,6 +245,7 @@ public class EditRunIntervalWindow : EditRunWindow
 	}
 	
 	protected override void initializeValues () {
+		showType = true;
 		showTv = false;
 		showTc= false;
 		showFall = false;
diff --git a/src/gui/session.cs b/src/gui/session.cs
index 9163060..29da87d 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -667,7 +667,7 @@ public class SessionLoadWindow {
 		store = new TreeStore(typeof (string), typeof (string), typeof (string), typeof (string), 
 				typeof (string), typeof (string), typeof (string), typeof (string), typeof(string), 
 				typeof (string), typeof (string), typeof (string),
-				typeof (string), typeof (string), typeof (string) );
+				typeof (string), typeof (string), typeof (string), typeof(string) );
 		treeview_session_load.Model = store;
 		fillTreeView(treeview_session_load,store);
 
@@ -704,6 +704,7 @@ public class SessionLoadWindow {
 		tv.AppendColumn ( Catalog.GetString ("Runs interval"), new CellRendererText(), "text", count++);
 		tv.AppendColumn ( Catalog.GetString ("Reaction time"), new CellRendererText(), "text", count++);
 		tv.AppendColumn ( Catalog.GetString ("Pulses"), new CellRendererText(), "text", count++);
+		tv.AppendColumn ( Catalog.GetString ("MultiChronopic"), new CellRendererText(), "text", count++);
 		tv.AppendColumn ( Catalog.GetString ("Comments"), new CellRendererText(), "text", count++);
 	}
 	
@@ -739,6 +740,7 @@ public class SessionLoadWindow {
 					myStringFull[12], 	//number of runsInterval x session
 					myStringFull[13], 	//number of reaction times x session
 					myStringFull[14], 	//number of pulses x session
+					myStringFull[15], 	//number of multiChronopics x session
 					myStringFull[7]		//description of session
 					);
 		}	
@@ -775,8 +777,7 @@ public class SessionLoadWindow {
 
 	void on_button_accept_clicked (object o, EventArgs args)
 	{
-		if(selected != "-1")
-		{
+		if(selected != "-1") {
 			currentSession = SqliteSession.Select (selected);
 			SessionLoadWindowBox.session_load.Hide();
 			SessionLoadWindowBox = null;
@@ -797,19 +798,13 @@ public class SessionLoadWindow {
 
 	public Button Button_accept 
 	{
-		set {
-			button_accept = value;	
-		}
-		get {
-			return button_accept;
-		}
+		set { button_accept = value; }
+		get { return button_accept; }
 	}
 	
 	public Session CurrentSession 
 	{
-		get {
-			return currentSession;
-		}
+		get { return currentSession; }
 	}
 
 }
diff --git a/src/multiChronopic.cs b/src/multiChronopic.cs
index 37717ca..57220d7 100644
--- a/src/multiChronopic.cs
+++ b/src/multiChronopic.cs
@@ -73,6 +73,29 @@ public class MultiChronopic : Event
 	
 		arrayDone = false;
 	}
+	
+	//used to select a event at SqliteMultiChronopic.SelectMultiChronopicData and at Sqlite.convertTables
+	public MultiChronopic(string [] eventString) {
+		this.uniqueID = Convert.ToInt32(eventString[0]);
+		this.personID = Convert.ToInt32(eventString[1]);
+		this.sessionID = Convert.ToInt32(eventString[2]);
+		this.type = eventString[3].ToString();
+		this.cp1StartedIn = Convert.ToInt32(eventString[4]);
+		this.cp2StartedIn = Convert.ToInt32(eventString[5]);
+		this.cp3StartedIn = Convert.ToInt32(eventString[6]);
+		this.cp4StartedIn = Convert.ToInt32(eventString[7]);
+		this.cp1InStr = eventString[8];
+		this.cp1OutStr = eventString[9];
+		this.cp2InStr = eventString[10];
+		this.cp2OutStr = eventString[11];
+		this.cp3InStr = eventString[12];
+		this.cp3OutStr = eventString[13];
+		this.cp4InStr = eventString[14];
+		this.cp4OutStr = eventString[15];
+		this.description = eventString[16];
+		this.simulated = Convert.ToInt32(eventString[17]);
+	}
+
 
 	public override int InsertAtDB (bool dbconOpened, string tableName) {
 		return SqliteMultiChronopic.Insert(dbconOpened, tableName, 
@@ -89,26 +112,34 @@ public class MultiChronopic : Event
 
 	public ArrayList AsArrayList(int pDN) 
 	{
+//Console.WriteLine("A");
 		if(arrayDone)
 			return array;
 		
+//Console.WriteLine("B");
 		ArrayList returnArray = new ArrayList(1);
 		string [] returnLine = new String[20];
 
+//Console.WriteLine("B1");
 		string [] cp1InFull = this.Cp1InStr.Split(new char[] {'='});
+//Console.WriteLine("B2");
 		string [] cp1OutFull = this.Cp1OutStr.Split(new char[] {'='});
 		string [] cp2InFull = this.Cp2InStr.Split(new char[] {'='});
 		string [] cp2OutFull = this.Cp2OutStr.Split(new char[] {'='});
+//Console.WriteLine("B3");
 		string [] cp3InFull = this.Cp3InStr.Split(new char[] {'='});
+//Console.WriteLine("B4");
 		string [] cp3OutFull = this.Cp3OutStr.Split(new char[] {'='});
 		string [] cp4InFull = this.Cp4InStr.Split(new char[] {'='});
 		string [] cp4OutFull = this.Cp4OutStr.Split(new char[] {'='});
 
+//Console.WriteLine("B5");
 		bool ended = false;
 		bool cp1NextIn = Util.IntToBool(this.Cp1StartedIn);
 		bool cp2NextIn = Util.IntToBool(this.Cp2StartedIn);
 		bool cp3NextIn = Util.IntToBool(this.Cp3StartedIn);
 		bool cp4NextIn = Util.IntToBool(this.Cp4StartedIn);
+//Console.WriteLine("B6");
 		double cp1NextTime;
 		double cp2NextTime;
 		double cp3NextTime;
@@ -127,6 +158,7 @@ public class MultiChronopic : Event
 		double cp2Sum = 0;
 		double cp3Sum = 0;
 		double cp4Sum = 0;
+//Console.WriteLine("B7");
 						
 		double rt1InRecorded = 0;
 		double rt1OutRecorded = 0;
@@ -141,6 +173,8 @@ public class MultiChronopic : Event
 		double oobefore = -1;
 
 		int lineCount = 0;
+//Console.WriteLine("C");
+		
 		while(! ended) {
 			int nextCp = -1;
 
@@ -178,6 +212,7 @@ public class MultiChronopic : Event
 				cp4NextTime = 99999;
 
 
+//Console.WriteLine("D");
 			if(cp1NextTime == 99999 && cp2NextTime == 99999 && cp3NextTime == 99999 && cp4NextTime == 99999)
 				ended = true;
 			else {
@@ -206,6 +241,7 @@ public class MultiChronopic : Event
 							nextCp = 4;
 					}
 				}
+//Console.WriteLine("E");
 
 				int pos=0;
 				double thisTime = 0;
@@ -309,13 +345,17 @@ public class MultiChronopic : Event
 						returnLine[count++] = "";
 				}
 
-				returnLine[count++] = ""; //description column
+				returnLine[count++] = ""; //description column (unused because this array if for eg. treeview subLines)
 				returnLine[count++] = "-1"; //mark to non select here, select first line 
 				returnArray.Add(Util.StringArrayToString(returnLine, ":"));
+//Console.WriteLine("F");
 			}
+//Console.WriteLine("G");
 		}
+//Console.WriteLine("H");
 		array = returnArray;
 		arrayDone = true;
+//Console.WriteLine("I");
 		return array;
 	}
 	
@@ -399,6 +439,15 @@ public class MultiChronopic : Event
 					Util.GetNumberOfJumps(str, false)).ToString();
 	}
 
+	public int MaxCPs() {
+		if(cp3InStr == "" && cp3OutStr == "")
+			return 2;
+		else if(cp4InStr == "" && cp4OutStr == "")
+			return 3;
+		else
+			return 4;
+	}
+
 
 	public int Cp1StartedIn {
 		get { return cp1StartedIn; }
diff --git a/src/prepareEventGraphObjects.cs b/src/prepareEventGraphObjects.cs
index 0e2caf6..8ec9f59 100644
--- a/src/prepareEventGraphObjects.cs
+++ b/src/prepareEventGraphObjects.cs
@@ -123,7 +123,7 @@ public class PrepareEventGraphReactionTime {
 }
 
 public class PrepareEventGraphMultiChronopic {
-	public double timestamp;
+	//public double timestamp;
 	public string cp1InStr;
 	public string cp1OutStr;
 	public string cp2InStr;
@@ -140,11 +140,12 @@ public class PrepareEventGraphMultiChronopic {
 	public PrepareEventGraphMultiChronopic() {
 	}
 
-	public PrepareEventGraphMultiChronopic(double timestamp, 
+	public PrepareEventGraphMultiChronopic(
+			//double timestamp, 
 			bool cp1StartedIn, bool cp2StartedIn, bool cp3StartedIn, bool cp4StartedIn,
 			string cp1InStr, string cp1OutStr, string cp2InStr, string cp2OutStr, 
 			string cp3InStr, string cp3OutStr, string cp4InStr, string cp4OutStr) {
-		this.timestamp = timestamp;
+		//this.timestamp = timestamp;
 		this.cp1StartedIn = cp1StartedIn; 
 		this.cp2StartedIn = cp2StartedIn; 
 		this.cp3StartedIn = cp3StartedIn; 
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 266993f..c7318e4 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -1053,30 +1053,6 @@ class Sqlite
 		return exists;
 	}
 
-	/*	
-	public static bool Exists(string tableName, int findID)
-	{
-		dbcon.Open();
-		dbcmd.CommandText = "SELECT * FROM " + tableName + 
-			" WHERE uniqueID == '" + findID + "'" ;
-		Log.WriteLine(dbcmd.CommandText.ToString());
-		
-		SqliteDataReader reader;
-		reader = dbcmd.ExecuteReader();
-	
-		bool exists = new bool();
-		exists = false;
-		
-		if (reader.Read()) {
-			exists = true;
-		}
-		Log.WriteLine(string.Format("id exists = {0}", exists.ToString()));
-
-		dbcon.Close();
-		return exists;
-	}
-	*/
-	
 	/* 
 	 * temp data stuff
 	 */
diff --git a/src/sqlite/multiChronopic.cs b/src/sqlite/multiChronopic.cs
index 73b6eff..0fbe923 100644
--- a/src/sqlite/multiChronopic.cs
+++ b/src/sqlite/multiChronopic.cs
@@ -168,12 +168,11 @@ class SqliteMultiChronopic : Sqlite
 		return myEvents;
 	}
 
-	/*
-	public static ReactionTime SelectReactionTimeData(int uniqueID)
+	public static MultiChronopic SelectMultiChronopicData(int uniqueID)
 	{
 		dbcon.Open();
 
-		dbcmd.CommandText = "SELECT * FROM " + Constants.ReactionTimeTable + " WHERE uniqueID == " + uniqueID;
+		dbcmd.CommandText = "SELECT * FROM " + Constants.MultiChronopicTable + " WHERE uniqueID == " + uniqueID;
 		
 		Log.WriteLine(dbcmd.CommandText.ToString());
 
@@ -183,18 +182,45 @@ class SqliteMultiChronopic : Sqlite
 		reader = dbcmd.ExecuteReader();
 		reader.Read();
 		
-		ReactionTime myRT = new ReactionTime(DataReaderToStringArray(reader, 7));
+		MultiChronopic mc = new MultiChronopic(DataReaderToStringArray(reader, 18));
 	
 		dbcon.Close();
-		return myRT;
+		return mc;
 	}
+
+	public static int MaxCPs(int sessionID)
+	{
+		dbcon.Open();
+		int maxCPs = 2;
+
+		dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.MultiChronopicTable + 
+			" WHERE (cp3InStr != \"\" OR cp3OutStr != \"\") AND sessionID == " + sessionID;
+		Log.WriteLine(dbcmd.CommandText.ToString());
 		
-	public static void Update(int eventID, string type, string time, int personID, string description)
+		SqliteDataReader reader;
+		reader = dbcmd.ExecuteReader();
+		if (reader.Read()) {
+			maxCPs = 3;
+		}
+		reader.Close();
+
+		dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.MultiChronopicTable + 
+			" WHERE (cp4InStr != \"\" OR cp4OutStr != \"\") AND sessionID == " + sessionID;
+		Log.WriteLine(dbcmd.CommandText.ToString());
+		
+		reader = dbcmd.ExecuteReader();
+		if (reader.Read()) {
+			maxCPs = 4;
+		}
+		
+		dbcon.Close();
+		return maxCPs;
+	}
+
+	public static void Update(int eventID, int personID, string description)
 	{
 		dbcon.Open();
-		dbcmd.CommandText = "UPDATE " + Constants.ReactionTimeTable + " SET personID = " + personID + 
-			", type = '" + type +
-			"', time = " + Util.ConvertToPoint(time) +
+		dbcmd.CommandText = "UPDATE " + Constants.MultiChronopicTable + " SET personID = " + personID + 
 			", description = '" + description +
 			"' WHERE uniqueID == " + eventID ;
 		Log.WriteLine(dbcmd.CommandText.ToString());
@@ -205,10 +231,9 @@ class SqliteMultiChronopic : Sqlite
 	public static void Delete(string uniqueID)
 	{
 		dbcon.Open();
-		dbcmd.CommandText = "Delete FROM " + Constants.ReactionTimeTable + " WHERE uniqueID == " + uniqueID;
+		dbcmd.CommandText = "Delete FROM " + Constants.MultiChronopicTable + " WHERE uniqueID == " + uniqueID;
 		Log.WriteLine(dbcmd.CommandText.ToString());
 		dbcmd.ExecuteNonQuery();
 		dbcon.Close();
 	}
-	*/
 }
diff --git a/src/sqlite/person.cs b/src/sqlite/person.cs
index c78cbfd..ebbed79 100644
--- a/src/sqlite/person.cs
+++ b/src/sqlite/person.cs
@@ -250,6 +250,7 @@ finishForeach:
 		ArrayList arrayRunsInterval = new ArrayList(2);
 		ArrayList arrayRTs = new ArrayList(2);
 		ArrayList arrayPulses = new ArrayList(2);
+		ArrayList arrayMCs = new ArrayList(2);
 	
 		dbcon.Open();
 		
@@ -334,6 +335,17 @@ finishForeach:
 		}
 		reader.Close();
 	
+		//pulses
+		dbcmd.CommandText = "SELECT sessionID, count(*) FROM multiChronopic WHERE personID = " + personID +
+			" GROUP BY sessionID ORDER BY sessionID";
+		Log.WriteLine(dbcmd.CommandText.ToString());
+		
+		reader = dbcmd.ExecuteReader();
+		while(reader.Read()) {
+			arrayMCs.Add ( reader[0].ToString() + ":" + reader[1].ToString() );
+		}
+		reader.Close();
+	
 	
 		dbcon.Close();
 		
@@ -345,6 +357,7 @@ finishForeach:
 		string tempRunsInterval;
 		string tempRTs;
 		string tempPulses;
+		string tempMCs;
 		bool found; 	//using found because a person can be loaded in a session 
 				//but whithout having done any event yet
 
@@ -357,6 +370,7 @@ finishForeach:
 			tempRunsInterval = "";
 			tempRTs = "";
 			tempPulses = "";
+			tempMCs = "";
 			found = false;
 			
 			foreach (string myJumps in arrayJumps) {
@@ -413,6 +427,15 @@ finishForeach:
 				}
 			}
 			
+			foreach (string myMCs in arrayMCs) {
+				string [] myStr = myMCs.Split(new char[] {':'});
+				if(myStrSession[0] == myStr[0]) {
+					tempMCs = myStr[1];
+					found = true;
+					break;
+				}
+			}
+			
 
 
 			//if has events, write it's data
@@ -421,7 +444,7 @@ finishForeach:
 						myStrSession[3] + ":" + tempJumps + ":" + 	//sessionDate, jumps
 						tempJumpsRj + ":" + tempRuns + ":" + 		//jumpsRj, Runs
 						tempRunsInterval + ":" + tempRTs + ":" + 	//runsInterval, Reaction times
-						tempPulses);					//pulses
+						tempPulses + ":" + tempMCs);			//pulses, MultiChronopic
 			}
 		}
 
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index 3e65a82..e0578bc 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -348,6 +348,21 @@ class SqliteSession : Sqlite
 		}
 		reader_pulses.Close();
 	
+		//select multichronopic of each session
+		dbcmd.CommandText = "SELECT sessionID, count(*) FROM " + Constants.MultiChronopicTable + 
+			" GROUP BY sessionID ORDER BY sessionID";
+		Log.WriteLine(dbcmd.CommandText.ToString());
+		dbcmd.ExecuteNonQuery();
+
+		SqliteDataReader reader_mcs;
+		reader_mcs = dbcmd.ExecuteReader();
+		ArrayList myArray_mcs = new ArrayList(2);
+		
+		while(reader_mcs.Read()) {
+			myArray_mcs.Add (reader_mcs[0].ToString() + ":" + reader_mcs[1].ToString() + ":" );
+		}
+		reader_mcs.Close();
+	
 		
 		//close database connection
 		dbcon.Close();
@@ -440,6 +455,17 @@ class SqliteSession : Sqlite
 			}
 			if (!found) { lineNotReadOnly  = lineNotReadOnly + ":0"; }
 
+			//add multiChronopic for each session
+			found = false;
+			foreach (string line_mcs in myArray_mcs) {
+				string [] myStringFull = line_mcs.Split(new char[] {':'});
+				if(myStringFull[0] == mixingSessionID) {
+					lineNotReadOnly  = lineNotReadOnly + ":" + myStringFull[1];
+					found = true;
+				}
+			}
+			if (!found) { lineNotReadOnly  = lineNotReadOnly + ":0"; }
+
 			
 			mySessions [count++] = lineNotReadOnly;
 		}
diff --git a/src/treeViewEvent.cs b/src/treeViewEvent.cs
index 5c81671..417e674 100644
--- a/src/treeViewEvent.cs
+++ b/src/treeViewEvent.cs
@@ -202,9 +202,6 @@ public class TreeViewEvent
 			TreeIter iter2;
 			store.GetIterFromString(out iter2, pathStringZero);
 			treeview.Selection.SelectIter(iter2);
-
-			//Log.WriteLine("iter" + store.GetPath(iter).ToString());
-			//Log.WriteLine("iter2" + store.GetPath(iter2).ToString());
 		}
 	}
 
@@ -220,11 +217,20 @@ public class TreeViewEvent
 		}
 	}
 
-	public virtual ExpandStates ZoomChange(ExpandStates myExpand) {
-		if(myExpand == ExpandStates.MINIMIZED)
-			return ExpandStates.MAXIMIZED;
-		else
-			return ExpandStates.MINIMIZED;
+	public ExpandStates ZoomChange(ExpandStates myExpand) {
+		if(treeviewHasTwoLevels) {
+			if(myExpand == ExpandStates.MINIMIZED)
+				return ExpandStates.OPTIMAL;
+			else if(myExpand == ExpandStates.OPTIMAL)
+				return ExpandStates.MAXIMIZED;
+			else
+				return ExpandStates.MINIMIZED;
+		} else {
+			if(myExpand == ExpandStates.MINIMIZED)
+				return ExpandStates.MAXIMIZED;
+			else
+				return ExpandStates.MINIMIZED;
+		}
 	}
 
 	public void Add (string personName, System.Object newEvent)
diff --git a/src/treeViewJump.cs b/src/treeViewJump.cs
index 41c0931..40a1771 100644
--- a/src/treeViewJump.cs
+++ b/src/treeViewJump.cs
@@ -477,13 +477,4 @@ public class TreeViewJumpsRj : TreeViewJumps
 		return myStringFull.Length; 
 	} 
 			
-	public override ExpandStates ZoomChange(ExpandStates myExpand) {
-		if(myExpand == ExpandStates.MINIMIZED)
-			return ExpandStates.OPTIMAL;
-		else if(myExpand == ExpandStates.OPTIMAL)
-			return ExpandStates.MAXIMIZED;
-		else
-			return ExpandStates.MINIMIZED;
-	}
-
 }
diff --git a/src/treeViewMultiChronopic.cs b/src/treeViewMultiChronopic.cs
index adfceae..2742bc9 100644
--- a/src/treeViewMultiChronopic.cs
+++ b/src/treeViewMultiChronopic.cs
@@ -28,16 +28,27 @@ using Mono.Unix;
 public class TreeViewMultiChronopic : TreeViewEvent
 {
 	protected string personName = Catalog.GetString("Person");
+	private int maxCPs;
 
 	public TreeViewMultiChronopic ()
 	{
 	}
-	
+
+/*	
+	//session is not created or loaded yet, graph multiChronopic treeview with columns for two chronopics
 	public TreeViewMultiChronopic (Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState)
 	{
+		TreeViewMultiChronopic (treeview, newPrefsDigitsNumber, expandState, 2);
+	}
+	*/
+
+	//session is created or loaded, we know maxCPs will be written
+	public TreeViewMultiChronopic (Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState, int maxCPs)
+	{
 		this.treeview = treeview;
 		pDN = newPrefsDigitsNumber;
 		this.expandState = expandState;
+		this.maxCPs = maxCPs;
 
 		treeviewHasTwoLevels = true;
 		dataLineNamePosition = 0; //position of name in the data to be printed
@@ -47,14 +58,31 @@ public class TreeViewMultiChronopic : TreeViewEvent
 		dataLineTypePosition = -1; //position of type in the data to be printed
 		allEventsName = "";
 		
+		if(maxCPs == 2) 
+			columnsString = new string[]{ personName, 
+				Catalog.GetString("Time"), 
+				Catalog.GetString("State") + "\nCP1", "\nCP2",
+				Catalog.GetString("Change") + "\nCP1", "\nCP2",
+				Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2",
+				Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2",
+				descriptionName};
+		else if (maxCPs == 3) 
+			columnsString = new string[]{ personName, 
+				Catalog.GetString("Time"), 
+				Catalog.GetString("State") + "\nCP1", "\nCP2", "\nCP3",
+				Catalog.GetString("Change") + "\nCP1", "\nCP2", "\nCP3",
+				Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", "\nCP3",
+				Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", "\nCP3",
+				descriptionName};
+		else  // ==4
+			columnsString = new string[]{ personName, 
+				Catalog.GetString("Time"), 
+				Catalog.GetString("State") + "\nCP1", "\nCP2", "\nCP3", "\nCP4",
+				Catalog.GetString("Change") + "\nCP1", "\nCP2", "\nCP3", "\nCP4",
+				Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", "\nCP3", "\nCP4",
+				Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", "\nCP3", "\nCP4",
+				descriptionName};
 
-		columnsString = new string[]{personName, 
-			Catalog.GetString("Time"), 
-			Catalog.GetString("State") + "\nCP1", "\nCP2", "\nCP3", "\nCP4",
-			Catalog.GetString("Change") + "\nCP1", "\nCP2", "\nCP3", "\nCP4",
-			Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", "\nCP3", "\nCP4",
-			Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", "\nCP3", "\nCP4",
-			descriptionName};
 
 		eventIDColumn = columnsString.Length ; //column where the uniqueID of event will be (and will be hidded). 
 		store = getStore(columnsString.Length +1); //+1 because, eventID is not show in last col
@@ -87,37 +115,50 @@ public class TreeViewMultiChronopic : TreeViewEvent
 	protected override string [] getLineToStore(System.Object myObject)
 	{
 		MultiChronopic mc = (MultiChronopic)myObject;
+		ArrayList array = mc.AsArrayList(pDN);
 		
-		string title = mc.Type;
+		string title;
+		//title = mc.Type; //currently ""
+
+		title = "CPs: " + getCpsString(mc);
+		title += "; n: " + array.Count.ToString();
 		if(mc.Simulated == Constants.Simulated)
 			title += " (s) ";
 
 		//string myTypeComplet = title + "(" + newRunI.DistanceInterval + "x" + Util.GetLimitedRounded(newRunI.Limited, pDN) + ")";
 		
-		string [] myData = new String [getColsNum()];
+		string [] myData = new String [19+1];
 		int count = 0;
-		//myData[count++] = myTypeComplet;
 		myData[count++] = title;
-		myData[count++] = ""; //time
-		myData[count++] = ""; //state
-		myData[count++] = "";
-		myData[count++] = "";
-		myData[count++] = "";
-		myData[count++] = "";//change
-		myData[count++] = "";
-		myData[count++] = "";
-		myData[count++] = "";
-		myData[count++] = "";//in-in
-		myData[count++] = "";
-		myData[count++] = "";
-		myData[count++] = "";
-		myData[count++] = "";//out-out
-		myData[count++] = "";
-		myData[count++] = "";
-		myData[count++] = "";
+		
+		for(int i=0; i<17;i++) 
+			myData[count++] = "";
+		
 		myData[count++] = mc.Description;
 		myData[count++] = mc.UniqueID.ToString();
-		return myData;
+		return deleteCols(myData, maxCPs);
+	}
+	
+	private string getCpsString(MultiChronopic mc) {	
+		string cpsStr = "";
+		string sep = "";
+		if(mc.Cp1InStr.Length + mc.Cp1OutStr.Length > 0) {
+			cpsStr += sep + "1";
+			sep = ", ";
+		}
+		if(mc.Cp2InStr.Length + mc.Cp2OutStr.Length > 0) {
+			cpsStr += sep + "2";
+			sep = ", ";
+		}
+		if(maxCPs >= 3 && mc.Cp3InStr.Length + mc.Cp3OutStr.Length > 0) {
+			cpsStr += sep + "3";
+			sep = ", ";
+		}
+		if(maxCPs == 4 && mc.Cp4InStr.Length + mc.Cp4OutStr.Length > 0) {
+			cpsStr += sep + "4";
+			sep = ", ";
+		}
+		return cpsStr;
 	}
 
 	protected override int getNumOfSubEvents(System.Object myObject)
@@ -126,55 +167,62 @@ public class TreeViewMultiChronopic : TreeViewEvent
 
 		int cp1 = Util.GetNumberOfJumps(mc.Cp1InStr,false) + Util.GetNumberOfJumps(mc.Cp1OutStr,false);
 		int cp2 = Util.GetNumberOfJumps(mc.Cp2InStr,false) + Util.GetNumberOfJumps(mc.Cp2OutStr,false);
-		int cp3 = Util.GetNumberOfJumps(mc.Cp3InStr,false) + Util.GetNumberOfJumps(mc.Cp3OutStr,false);
-		int cp4 = Util.GetNumberOfJumps(mc.Cp4InStr,false) + Util.GetNumberOfJumps(mc.Cp4OutStr,false);
+
+		int cp3 = 0;
+		if(maxCPs >= 3)
+			cp3 = Util.GetNumberOfJumps(mc.Cp3InStr,false) + Util.GetNumberOfJumps(mc.Cp3OutStr,false);
+		int cp4 = 0;
+		if(maxCPs == 4)
+			cp4 = Util.GetNumberOfJumps(mc.Cp4InStr,false) + Util.GetNumberOfJumps(mc.Cp4OutStr,false);
 
 		return 1 + cp1 + cp2 + cp3 +cp4; //first "1+" is for the row with the initial data
 	} 
 	
 	//no total here
 	protected override void addStatisticInfo(TreeIter iterDeep, System.Object myObject) {
-		//store.AppendValues(iterDeep, printTotal(myObject, getColsNum()));
-		store.AppendValues(iterDeep, printAVG(myObject, getColsNum()));
-		store.AppendValues(iterDeep, printSD(myObject, getColsNum()));
+		//store.AppendValues(iterDeep, printTotal(myObject, 19+1));
+		store.AppendValues(iterDeep, printAVG(myObject, 19+1));
+		store.AppendValues(iterDeep, printSD(myObject, 19+1));
 	}
 	
 	protected override string [] printAVG(System.Object myObject, int cols) {
 		MultiChronopic mc = (MultiChronopic)myObject;
 		string [] averages = mc.Statistics(true, pDN); //first boolean is averageOrSD
 		
-		string [] myData = new String [getColsNum()];
+		string [] myData = new String [19+1];
 		int count = 0;
 		myData[count++] = Catalog.GetString("AVG");
-		for(int i=0; i<9;i++)
+		
+		for(int i=0; i<9;i++) 
 			myData[count++] = "";
 
-		for(int i=0; i<8;i++)
+		for(int i=0; i<8;i++) 
 			myData[count++] = cleanZeroOrMinus(Util.TrimDecimals( averages[i], pDN ));
-		
+
 		myData[count++] = ""; //desc
 		myData[count++] = "-1"; //mark to non select here, select first line 
 		
-		return myData;
+		return deleteCols(myData, maxCPs);
 	}
 
 	protected override string [] printSD(System.Object myObject, int cols) {
 		MultiChronopic mc = (MultiChronopic)myObject;
 		string [] sds = mc.Statistics(false, pDN); //first boolean is averageOrSD
 		
-		string [] myData = new String [getColsNum()];
+		string [] myData = new String [19+1];
 		int count = 0;
 		myData[count++] = Catalog.GetString("SD");
-		for(int i=0; i<9;i++)
+		
+		for(int i=0; i<9;i++) 
 			myData[count++] = "";
-
-		for(int i=0; i<8;i++)
-			myData[count++] = cleanZeroOrMinus(Util.TrimDecimals( sds[i], pDN ));
 		
+		for(int i=0; i<8;i++) 
+			myData[count++] = cleanZeroOrMinus(Util.TrimDecimals( sds[i], pDN ));
+
 		myData[count++] = ""; //desc
 		myData[count++] = "-1"; //mark to non select here, select first line 
 		
-		return myData;
+		return deleteCols(myData, maxCPs);
 	}
 
 
@@ -190,7 +238,7 @@ public class TreeViewMultiChronopic : TreeViewEvent
 		MultiChronopic mc = (MultiChronopic)myObject;
 
 		//write line for treeview
-		string [] myData = new String [getColsNum()];
+		string [] myData = new String [19+1];
 
 		string [] cp1InFull = mc.Cp1InStr.Split(new char[] {'='});
 		string [] cp1OutFull = mc.Cp1OutStr.Split(new char[] {'='});
@@ -210,16 +258,39 @@ public class TreeViewMultiChronopic : TreeViewEvent
 			myData[count++] = Util.BoolToInOut(Util.IntToBool(mc.Cp2StartedIn));
 			myData[count++] = Util.BoolToInOut(Util.IntToBool(mc.Cp3StartedIn));
 			myData[count++] = Util.BoolToInOut(Util.IntToBool(mc.Cp4StartedIn));
-			for(int i=0; i<12;i++)
+
+			for(int i=0; i<12;i++) 
 				myData[count++] = "";
-				
+
 			myData[count++] = ""; //description column
 			myData[count++] = "-1"; //mark to non select here, select first line 
-			return myData;
+			return deleteCols(myData, maxCPs);
 		} else {
 			ArrayList array = mc.AsArrayList(pDN);
-			return array[lineCount-1].ToString().Split(new char[] {':'});
+			return deleteCols( array[lineCount-1].ToString().Split(new char[] {':'} ), maxCPs );
+		}
+
+	}
+
+	private string [] deleteCols(string [] s1, int maxCPs) {
+		if(maxCPs == 2) {
+			string [] s2 = new String[11+1];
+			for(int i=0, count=0; i < s1.Length; i++) {
+				if(i != 4 && i != 5 && i != 8 && i != 9 && i != 12 && i != 13 && i != 16 && i != 17)
+					s2[count++] = s1[i];
+			}
+			return s2;
+		}
+		else if(maxCPs == 3) {
+			string [] s2 = new String[15+1];
+			for(int i=0, count=0; i < s1.Length; i++) {
+				if(i != 5 && i != 9 && i != 13 && i != 17)
+					s2[count++] = s1[i];
+			}
+			return s2;
 		}
+		else //maxCPs == 4
+			return s1;
 
 	}
 	
diff --git a/src/treeViewPulse.cs b/src/treeViewPulse.cs
index 91eca3c..ed6f1dc 100644
--- a/src/treeViewPulse.cs
+++ b/src/treeViewPulse.cs
@@ -222,15 +222,5 @@ public class TreeViewPulses : TreeViewEvent
 
 		return errorCount / (double) times.Length;
 	}
-
-	public override ExpandStates ZoomChange(ExpandStates myExpand) {
-		if(myExpand == ExpandStates.MINIMIZED)
-			return ExpandStates.OPTIMAL;
-		else if(myExpand == ExpandStates.OPTIMAL)
-			return ExpandStates.MAXIMIZED;
-		else
-			return ExpandStates.MINIMIZED;
-	}
-
 	
 }
diff --git a/src/treeViewRun.cs b/src/treeViewRun.cs
index 9984fa8..45e159e 100644
--- a/src/treeViewRun.cs
+++ b/src/treeViewRun.cs
@@ -113,6 +113,8 @@ public class TreeViewRuns : TreeViewEvent
 
 public class TreeViewRunsInterval : TreeViewRuns
 {
+	RunType runType;
+
 	public TreeViewRunsInterval (Gtk.TreeView treeview, int newPrefsDigitsNumber, bool metersSecondsPreferred, ExpandStates expandState)
 	{
 		this.treeview = treeview;
@@ -154,6 +156,8 @@ public class TreeViewRunsInterval : TreeViewRuns
 		myRunI.Description = myStringOfData[10].ToString();
 		myRunI.Simulated = Convert.ToInt32(myStringOfData[12].ToString());
 		//speed is not needed to define
+			
+		runType = SqliteRunIntervalType.SelectAndReturnRunIntervalType(myRunI.Type);
 		
 		return myRunI;
 	}
@@ -202,7 +206,7 @@ public class TreeViewRunsInterval : TreeViewRuns
 		int count = 0;
 		
 		if(newRunI.DistanceInterval == -1) {
-			RunType runType = SqliteRunIntervalType.SelectAndReturnRunIntervalType(newRunI.Type);
+			//RunType runType = SqliteRunIntervalType.SelectAndReturnRunIntervalType(newRunI.Type);
 			myData[count++] = (lineCount + 1).ToString() +  
 				" (" + Util.GetRunIVariableDistancesStringRow(runType.DistancesString, lineCount).ToString() + "m)";
 			
@@ -299,13 +303,4 @@ public class TreeViewRunsInterval : TreeViewRuns
 		return myData;
 	}
 	
-	public override ExpandStates ZoomChange(ExpandStates myExpand) {
-		if(myExpand == ExpandStates.MINIMIZED)
-			return ExpandStates.OPTIMAL;
-		else if(myExpand == ExpandStates.OPTIMAL)
-			return ExpandStates.MAXIMIZED;
-		else
-			return ExpandStates.MINIMIZED;
-	}
-
 }
diff --git a/version.txt b/version.txt
index 6031071..4810611 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-0.8.3.1
+0.8.3.2



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