chronojump r434 - in trunk: . build/data glade src src/angle src/gui web/data web/html_created_no_edit



Author: xaviblas
Date: Thu Dec 25 02:54:58 2008
New Revision: 434
URL: http://svn.gnome.org/viewvc/chronojump?rev=434&view=rev

Log:
screen height to adapt to ultralaptops:
-app1 gets maximized
-stats use UtilGtk.ResizeIfNeeded(stats_window);

-on windows chronopic port is a spinbutton now
-export to csv, now separates with ';' and not with '; '
-export to spreadsheet help message not appears in report
-dialogMessage now centered on parent


Modified:
   trunk/build/data/chronojump.prg
   trunk/build/data/chronojump_mini.prg
   trunk/changelog.txt
   trunk/glade/chronojump.glade
   trunk/src/angle/changelog
   trunk/src/angle/kneeAngle.cpp
   trunk/src/angle/kneeAngleFunctions.cpp
   trunk/src/angle/kneeAngleGlobal.cpp
   trunk/src/angle/kneeAngleUtil.cpp
   trunk/src/exportSession.cs
   trunk/src/gui/chronojump.cs
   trunk/src/gui/dialogMessage.cs
   trunk/src/gui/preferences.cs
   trunk/src/gui/stats.cs
   trunk/src/report.cs
   trunk/src/utilGtk.cs
   trunk/web/data/languages.txt
   trunk/web/html_created_no_edit/faq_es.html
   trunk/web/html_created_no_edit/photocells_es.html

Modified: trunk/build/data/chronojump.prg
==============================================================================
Binary files. No diff available.

Modified: trunk/build/data/chronojump_mini.prg
==============================================================================
Binary files. No diff available.

Modified: trunk/changelog.txt
==============================================================================
--- trunk/changelog.txt	(original)
+++ trunk/changelog.txt	Thu Dec 25 02:54:58 2008
@@ -1,4 +1,12 @@
-
+25 dec 2008
+	screen height to adapt to ultralaptops:
+	-app1 gets maximized
+	-stats use UtilGtk.ResizeIfNeeded(stats_window);
+
+	-on windows chronopic port is a spinbutton now
+	-export to csv, now separates with ';' and not with '; '
+	-export to spreadsheet help message not appears in report
+	-dialogMessage now centered on parent
 
 2 dec 2008 (Major RELEASE 0.8 for Linux and windows)
 	installation:

Modified: trunk/glade/chronojump.glade
==============================================================================
--- trunk/glade/chronojump.glade	(original)
+++ trunk/glade/chronojump.glade	Thu Dec 25 02:54:58 2008
@@ -2163,6 +2163,76 @@
 		      <property name="fill">False</property>
 		    </packing>
 		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox_port_windows">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox283">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label533">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">COM</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">True</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="spin_com_windows">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">0</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">1 1 257 1 10 10</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">True</property>
+			  <property name="fill">False</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="padding">4</property>
@@ -4694,12 +4764,12 @@
 
 <widget class="GtkWindow" id="stats_window">
   <property name="border_width">10</property>
-  <property name="height_request">600</property>
   <property name="visible">True</property>
   <property name="title" translatable="yes">Chronojump Statistics window</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
+  <property name="default_height">600</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
@@ -8150,13 +8220,13 @@
 </widget>
 
 <widget class="GtkWindow" id="app1">
-  <property name="width_request">800</property>
-  <property name="height_request">600</property>
   <property name="visible">True</property>
   <property name="title" translatable="yes">Chronojump</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
+  <property name="default_width">800</property>
+  <property name="default_height">600</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
@@ -20351,642 +20421,6 @@
   </child>
 </widget>
 
-<widget class="GtkWindow" id="window1">
-  <property name="border_width">10</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Preferences</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">True</property>
-  <property name="resizable">False</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox103">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">4</property>
-
-      <child>
-	<widget class="GtkHBox" id="hbox231">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">6</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label454">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Language</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="GtkHBox" id="hbox232">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<placeholder/>
-	      </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">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator12">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox233">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">6</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label455">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Chronopic in</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">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="entry11">
-	      <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">20</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">10</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="button17">
-	      <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_help_clicked" last_modification_time="Sun, 07 May 2006 13:15:48 GMT"/>
-
-	      <child>
-		<widget class="GtkImage" id="image2212">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-help</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>
-	    </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">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="vbox104">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkRadioButton" id="radiobutton3">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Time from Chronopic is Ok</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="active">False</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="GtkHBox" id="hbox236">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">6</property>
-
-	      <child>
-		<widget class="GtkVBox" id="vbox105">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiobutton4">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Automatically add:</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiobutton3</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiobutton5">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Automatically subtract:</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiobutton3</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">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkSpinButton" id="spinbutton12">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="climb_rate">1</property>
-		  <property name="digits">0</property>
-		  <property name="numeric">True</property>
-		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-		  <property name="snap_to_ticks">True</property>
-		  <property name="wrap">False</property>
-		  <property name="adjustment">1 0 100 1 10 10</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label457">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">ms</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">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>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator13">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox234">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">6</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label456">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Decimal number</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</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="GtkSpinButton" id="spinbutton11">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">1</property>
-	      <property name="digits">0</property>
-	      <property name="numeric">False</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">False</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">1 0 3 1 10 10</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>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator14">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkCheckButton" id="checkbutton1">
-	  <property name="visible">True</property>
-	  <property name="tooltip" translatable="yes">If a reactive jump is limited by time, and time has running out, allow finish jump</property>
-	  <property name="can_focus">True</property>
-	  <property name="label" translatable="yes">Allow RJ's finish after time</property>
-	  <property name="use_underline">True</property>
-	  <property name="relief">GTK_RELIEF_NORMAL</property>
-	  <property name="focus_on_click">True</property>
-	  <property name="active">False</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="GtkCheckButton" id="checkbutton2">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="label" translatable="yes">Show height</property>
-	  <property name="use_underline">True</property>
-	  <property name="relief">GTK_RELIEF_NORMAL</property>
-	  <property name="focus_on_click">True</property>
-	  <property name="active">False</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="GtkCheckButton" id="checkbutton3">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="label" translatable="yes">Show initial speed</property>
-	  <property name="use_underline">True</property>
-	  <property name="relief">GTK_RELIEF_NORMAL</property>
-	  <property name="focus_on_click">True</property>
-	  <property name="active">False</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="GtkCheckButton" id="checkbutton4">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="label" translatable="yes">Prefer height over TF</property>
-	  <property name="use_underline">True</property>
-	  <property name="relief">GTK_RELIEF_NORMAL</property>
-	  <property name="focus_on_click">True</property>
-	  <property name="active">False</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="GtkCheckButton" id="checkbutton5">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="label" translatable="yes">Prefer m/s over Km/h</property>
-	  <property name="use_underline">True</property>
-	  <property name="relief">GTK_RELIEF_NORMAL</property>
-	  <property name="focus_on_click">True</property>
-	  <property name="active">False</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="GtkCheckButton" id="checkbutton6">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="label" translatable="yes">Show indexes between TF and TC</property>
-	  <property name="use_underline">True</property>
-	  <property name="relief">GTK_RELIEF_NORMAL</property>
-	  <property name="focus_on_click">True</property>
-	  <property name="active">False</property>
-	  <property name="inconsistent">False</property>
-	  <property name="draw_indicator">True</property>
-	  <signal name="clicked" handler="on_checkbutton_show_tv_tc_index_clicked" last_modification_time="Tue, 12 Sep 2006 23:35:11 GMT"/>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox235">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">6</property>
-
-	  <child>
-	    <widget class="GtkRadioButton" id="radiobutton1">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">QIndex</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="active">False</property>
-	      <property name="inconsistent">False</property>
-	      <property name="draw_indicator">True</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">10</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkRadioButton" id="radiobutton2">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">DjIndex</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="active">False</property>
-	      <property name="inconsistent">False</property>
-	      <property name="draw_indicator">True</property>
-	      <property name="group">radiobutton1</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">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHSeparator" id="hseparator15">
-	  <property name="visible">True</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkCheckButton" id="checkbutton7">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="label" translatable="yes">Confirm jump/run deletion</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="GtkHButtonBox" id="hbuttonbox36">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="button18">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_button_cancel_clicked" last_modification_time="Mon, 04 Oct 2004 17:29:59 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="button19">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <signal name="clicked" handler="on_button_accept_clicked" last_modification_time="Mon, 04 Oct 2004 17:29:52 GMT"/>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">5</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
 <widget class="GtkWindow" id="edit_event">
   <property name="border_width">10</property>
   <property name="visible">True</property>

Modified: trunk/src/angle/changelog
==============================================================================
--- trunk/src/angle/changelog	(original)
+++ trunk/src/angle/changelog	Thu Dec 25 02:54:58 2008
@@ -1,3 +1,24 @@
+do that validation does the skin method and the black method, instead of
+having a black method full of validation things
+at end, validation should add compare code
+
+des 18
+
+	changee toe to not allow to be one pixel width (really bottom of the
+	pants), lowest width accepted is similar than initial  width
+
+	changed kneePointBack to be found from down to up, and x starts at position
+	in last row (this will help to find kneePointBack ok when there's lot of
+	flexion and biceps femoral is lower than kneePointBack
+
+	extension ask true again
+
+	working on three programModes integration
+	blackWithoutMarkers working
+	added kneeAngle_black_without.svg and kneeAngle_black_without.png
+	fixed backward
+
+
 nov 14
 	starting changelog here insted of being on Chronojump trunk
 	three modes only: blackOnlyMarkes and skinOnlyMarkers are the same

Modified: trunk/src/angle/kneeAngle.cpp
==============================================================================
--- trunk/src/angle/kneeAngle.cpp	(original)
+++ trunk/src/angle/kneeAngle.cpp	Thu Dec 25 02:54:58 2008
@@ -204,8 +204,10 @@
 	int programMode = menu(gui, font);
 	//printf("programMode: %d\n", programMode);
 	
-	if(programMode == skinOnlyMarkers)
+	if(programMode == skinOnlyMarkers || programMode == validation)
 		gui = cvLoadImage("kneeAngle_skin.png");
+	else
+		gui = cvLoadImage("kneeAngle_black_without.png");
 
 			
 	imageGuiResult(gui, "Starting... please wait.", font);
@@ -213,7 +215,10 @@
 
 	cvWaitKey(100); //to allow gui image be shown
 	
-	int minwidth = 0;
+	int kneeMinWidth = 0;
+
+	int kneeWidthAtExtension = 0;
+	int toeExtensionWidth = 0;
 	
 	bool foundAngle = false; //found angle on current frame
 	bool foundAngleOneTime = false; //found angle at least one time on the video
@@ -228,12 +233,15 @@
 					
 	bool askForMaxFlexion = false; //of false, no ask, and no auto end before jump
 
-	if(programMode == skinOnlyMarkers)
-		cvNamedWindow("threshold",1);
-	else {
+	if(programMode == validation) {
 		cvNamedWindow("holes",1);
+		cvNamedWindow("threshold",1);
 		cvNamedWindow("result",1);
-	}
+	} else if (programMode == skinOnlyMarkers)
+		cvNamedWindow("threshold",1);
+	else if (programMode == blackWithoutMarkers)
+		cvNamedWindow("result",1);
+	
 	
 
 
@@ -285,10 +293,12 @@
 	CvPoint kneeOld = pointToZero();
 	CvPoint toeOld = pointToZero();
 
+	/*
 	int upLegMarkedDist = 0;
 	int upLegMarkedDistMax = 0;
 	int downLegMarkedDist = 0;
 	int downLegMarkedDistMax = 0;
+	*/
 
 	int threshold;
 	int thresholdMax = 255;
@@ -304,8 +314,8 @@
 	int key;
 
 
-	//programMode == validation || programMode == blackAndMarkers
-	bool extensionDoIt = false; //currently we are not doing the extension thing
+	//programMode == validation || programMode == blackWithoutMarkers
+	bool extensionDoIt = true;
 	bool extensionCopyDone = false;
 	CvPoint kneeMarkedAtExtension = pointToZero();
 	CvPoint hipMarkedAtExtension = pointToZero();
@@ -431,7 +441,8 @@
 			extension =	cvCreateImage(cvGetSize(frame),IPL_DEPTH_8U,3);
 			extensionSeg =	cvCreateImage(cvGetSize(frame),IPL_DEPTH_8U,1);
 			extensionSegHoles =	cvCreateImage(cvGetSize(frame),IPL_DEPTH_8U,1);
-	
+
+			/* TODO: check this, as validation will need both thresolds */	
 			if(programMode == skinOnlyMarkers)
 				threshold = 150;
 			else {
@@ -451,7 +462,7 @@
 		 */
 
 
-		if(programMode == skinOnlyMarkers) 
+		if(programMode == skinOnlyMarkers || programMode == validation) 
 		{
 
 /* kalman */
@@ -575,14 +586,20 @@
 				reloadFrame = true;
 			}
 		} 
+		
+	//	cvWaitKey(0); ok
+		
+		/*
 		else { //not skinOnlyMarkers
 			do {
 				cvThreshold(gray,segmentedValidationHoles, threshold, thresholdMax,CV_THRESH_BINARY_INV);
+		*/
 
 				//create the largest contour image (stored on temp)
 				cvThreshold(gray,segmented,threshold,thresholdMax,CV_THRESH_BINARY_INV);
 				maxrect = findLargestContour(segmented, output, showContour);
 
+			/*
 				//search in output all the black places (pants) and 
 				//see if there's a hole in that pixel on segmentedValidationHoles
 				CvSeq* seqHolesEnd = findHoles(
@@ -600,6 +617,7 @@
 
 			threshold -= thresholdInc;
 		}
+		*/
 			
 		hipOld = hipMarked;
 		kneeOld = kneeMarked;
@@ -611,74 +629,90 @@
 		 */
 
 
-		if(pointIsNull(hipMarked) || pointIsNull(kneeMarked) || pointIsNull(toeMarked))
-			thetaMarked = -1;
-		else {
-			thetaMarked = findAngle2D(hipMarked, toeMarked, kneeMarked);
-			//store minThetaMarked if not marked to reload (bad detection, or first frame)
-			if(!reloadFrame && thetaMarked < minThetaMarked) 
-				minThetaMarked = thetaMarked;
-
+		if(programMode == skinOnlyMarkers || programMode == validation) 
+		{
+			if(pointIsNull(hipMarked) || pointIsNull(kneeMarked) || pointIsNull(toeMarked))
+				thetaMarked = -1;
+			else {
+				thetaMarked = findAngle2D(hipMarked, toeMarked, kneeMarked);
+				//store minThetaMarked if not marked to reload (bad detection, or first frame)
+				if(!reloadFrame && thetaMarked < minThetaMarked) {
+					minThetaMarked = thetaMarked;
+					cvCopy(frame_copy,result);
+					lowestAngleFrame = framesCount;
+				}
 
-			if(programMode == validation || programMode == blackAndMarkers)
-				cvRectangle(frame_copy,
-						cvPoint(maxrect.x,maxrect.y),
-						cvPoint(maxrect.x + maxrect.width, maxrect.y + maxrect.height),
-						CV_RGB(255,0,0),1,1);
 
+				/*
+				   if(programMode == validation || programMode == blackWithoutMarkers)
+				   cvRectangle(frame_copy,
+				   cvPoint(maxrect.x,maxrect.y),
+				   cvPoint(maxrect.x + maxrect.width, maxrect.y + maxrect.height),
+				   CV_RGB(255,0,0),1,1);
+				   */
 
-			upLegMarkedDist = getDistance(hipMarked, kneeMarked);
-			if(upLegMarkedDist > upLegMarkedDistMax)
-				upLegMarkedDistMax = upLegMarkedDist;
-			downLegMarkedDist = getDistance(toeMarked, kneeMarked);
-			if(downLegMarkedDist > downLegMarkedDistMax)
-				downLegMarkedDistMax = downLegMarkedDist;
 
-			CvPoint HT;
-			HT.y = kneeMarked.y;
-			HT.x = hipMarked.x;
 
-			double kneeZetaSide = sqrt( pow(upLegMarkedDistMax,2) - pow(upLegMarkedDist,2) );
-			double htKneeMarked = getDistance (HT, kneeMarked);
+				/*
+				 * NOT doing 3D calculations now
+				
+				 
+				CvPoint HT;
+				HT.y = kneeMarked.y;
+				HT.x = hipMarked.x;
 
-			double thetaABD = (180.0/M_PI)*atan( (double) kneeZetaSide / htKneeMarked );
+				
+				 upLegMarkedDist = getDistance(hipMarked, kneeMarked);
+				if(upLegMarkedDist > upLegMarkedDistMax)
+					upLegMarkedDistMax = upLegMarkedDist;
+				downLegMarkedDist = getDistance(toeMarked, kneeMarked);
+				if(downLegMarkedDist > downLegMarkedDistMax)
+					downLegMarkedDistMax = downLegMarkedDist;
+				
+					double kneeZetaSide = sqrt( pow(upLegMarkedDistMax,2) - pow(upLegMarkedDist,2) );
+				double htKneeMarked = getDistance (HT, kneeMarked);
 
-			double thetaRealFlex = findAngle3D(hipMarked, toeMarked, kneeMarked, 0, 0, -kneeZetaSide);
-			if(thetaRealFlex < minThetaRealFlex) 
-				minThetaRealFlex = thetaRealFlex;
+				double thetaABD = (180.0/M_PI)*atan( (double) kneeZetaSide / htKneeMarked );
 
+				double thetaRealFlex = findAngle3D(hipMarked, toeMarked, kneeMarked, 0, 0, -kneeZetaSide);
+				if(thetaRealFlex < minThetaRealFlex) 
+					minThetaRealFlex = thetaRealFlex;
+
+
+				if(programMode == skinOnlyMarkers) {
+					printOnScreen(output, font, CV_RGB(0,0,0), labelsAtLeft,
+							framesCount, threshold, 
+							(double) upLegMarkedDist *100 /upLegMarkedDistMax, 
+							(double) downLegMarkedDist *100 /downLegMarkedDistMax,
+							thetaMarked, minThetaMarked,
+							thetaABD, thetaRealFlex, minThetaRealFlex
+						     );
+					cvShowImage("toClick", frame_copy);
+					cvShowImage("threshold",output);
+
+					printf("%d;%d;%d;%d;%d;%d;%d;%.2f;%.2f;%.2f %d;%d %.2f;%.2f\n", 
+							framesCount, 
+							hipMarked.x, frame->height - hipMarked.y,
+							kneeMarked.x, frame-> height - kneeMarked.y,
+							toeMarked.x, frame->height - toeMarked.y,
+							thetaMarked, thetaABD, thetaRealFlex,
+							upLegMarkedDist, upLegMarkedDistMax, 
+							kneeZetaSide, htKneeMarked);
+				}
 
-			if(programMode == skinOnlyMarkers) {
-				printOnScreen(output, font, CV_RGB(0,0,0), labelsAtLeft,
+				printOnScreen(frame_copy, font, CV_RGB(255,255,255), labelsAtLeft,
 						framesCount, threshold, 
 						(double) upLegMarkedDist *100 /upLegMarkedDistMax, 
 						(double) downLegMarkedDist *100 /downLegMarkedDistMax,
 						thetaMarked, minThetaMarked,
 						thetaABD, thetaRealFlex, minThetaRealFlex
-						);
-				cvShowImage("toClick", frame_copy);
-				cvShowImage("threshold",output);
-			
-				printf("%d;%d;%d;%d;%d;%d;%d;%.2f;%.2f;%.2f %d;%d %.2f;%.2f\n", 
-						framesCount, 
-						hipMarked.x, frame->height - hipMarked.y,
-						kneeMarked.x, frame-> height - kneeMarked.y,
-						toeMarked.x, frame->height - toeMarked.y,
-						thetaMarked, thetaABD, thetaRealFlex,
-						upLegMarkedDist, upLegMarkedDistMax, 
-						kneeZetaSide, htKneeMarked);
-			}
-
-			printOnScreen(frame_copy, font, CV_RGB(255,255,255), labelsAtLeft,
-					framesCount, threshold, 
-					(double) upLegMarkedDist *100 /upLegMarkedDistMax, 
-					(double) downLegMarkedDist *100 /downLegMarkedDistMax,
-					thetaMarked, minThetaMarked,
-					thetaABD, thetaRealFlex, minThetaRealFlex
-					);
+					     );
+				*/
 
-			if( (programMode == validation || programMode == blackAndMarkers)
-					&& foundAngle) {
+				/*
+				   if( (programMode == validation || programMode == blackWithoutMarkers)
+				   && foundAngle) {
+				   */
 				/*
 				//print data
 				double thetaSup = findAngle2D(hipExpected, cvPoint(0,kneeExpected.y), kneeExpected);
@@ -700,38 +734,53 @@
 				avgThetaDiffPercent += abs(relError(thetaExpected, thetaMarked));
 				avgKneeDistance += getDistance(kneePoint, kneeMarked);
 				*/
-				framesDetected ++;
-			}
-
+				/*
+				   framesDetected ++;
+				   }
+				   */
 
-			if(programMode == validation || programMode == blackAndMarkers)
-				cvShowImage("result",frame_copy);
 
+				/*
+				   if(programMode == validation || programMode == blackWithoutMarkers)
+				   cvShowImage("result",frame_copy);
+				   */
 
-			//Finds the minimum angle between Hip to Knee line and Knee to Toe line
-			if(thetaRealFlex == minThetaRealFlex) {
-				cvCopy(frame_copy,result);
-				lowestAngleFrame = framesCount;
-			}
 
-			//exit if we are going up and soon jumping.
-			//toe will be lost
-			//detected if minThetaMarked is littler than thetaMarked, when thetaMarked is big
-			if(thetaMarked > 140 && 
-					minThetaMarked +10 < thetaMarked &&
-					askForMaxFlexion)
-			{
-				imageGuiAsk(gui, "Minimal flexion reached before. Ending. Accept?", "'y'es, 'n'o, 'N'o and no ask again", font);
-				int option = optionAccept(true);	
-				eraseGuiAsk(gui);
-				if(option==YES) {
-					printf("\ntm: %f, mtm: %f, frame: %d\n", thetaMarked, minThetaMarked, framesCount);
-					shouldEnd = true;
-				} else if(option==NEVER)
-					askForMaxFlexion = false;
+				//Finds the minimum angle between Hip to Knee line and Knee to Toe line
+				/*
+				if(thetaRealFlex == minThetaRealFlex) {
+					cvCopy(frame_copy,result);
+					lowestAngleFrame = framesCount;
+				}
+				*/
+				
+				cvShowImage("toClick", frame_copy);
+				cvShowImage("threshold",output);
+				
+				//exit if we are going up and soon jumping.
+				//toe will be lost
+				//detected if minThetaMarked is littler than thetaMarked, when thetaMarked is big
+				if(thetaMarked > 140 && 
+						minThetaMarked +10 < thetaMarked &&
+						askForMaxFlexion)
+				{
+					imageGuiResult(gui, "Min flex before. End?. 'y'es, 'n'o, 'N'ever", font);
+					int option = optionAccept(true);	
+					eraseGuiResult(gui, true);
+					if(option==YES) {
+						printf("\ntm: %f, mtm: %f, frame: %d\n", thetaMarked, minThetaMarked, framesCount);
+						shouldEnd = true;
+					} else if(option==NEVER)
+						askForMaxFlexion = false;
+				}
 			}
 		}
+				   
+
+		if(programMode == validation || programMode == blackWithoutMarkers)
+      			cvShowImage("result",frame_copy);
 
+//		cvWaitKey(0);  ok
 
 		CvPoint hipExpected;
 		CvPoint kneeExpected;
@@ -743,14 +792,18 @@
 		 * FIND POINTS
 		 */
 
-		if(programMode == validation || programMode == blackAndMarkers) 
+		if(programMode == validation || programMode == blackWithoutMarkers) 
 		{
 			CvPoint hipPointBack;
 			CvPoint kneePointBack;
 			CvPoint kneePointFront;
 
+//			cvWaitKey(0);  aqui:
+
 			hipPointBack = findHipPoint(output,maxrect);
 
+//			cvWaitKey(0);  abans
+
 			//provisionally ubicate hipPoint at horizontal 1/2
 			hipExpected.x = hipPointBack.x + (findWidth(output, hipPointBack, true) /2);
 			hipExpected.y = hipPointBack.y;
@@ -763,17 +816,34 @@
 					foundAngleOneTime); 
 
 			//toe
-			CvPoint toeExpected = findToePoint(output,maxrect,kneePointFront.x,kneePointFront.y);
+			int toeMinWidth;
+			if(kneeWidthAtExtension == 0)
+				toeMinWidth = findWidth(output, kneePointFront, false) / 2;
+			else
+				toeMinWidth = kneeWidthAtExtension / 2;
+			CvPoint toeExpected = findToePoint(output,maxrect,kneePointFront.x,kneePointFront.y, toeMinWidth);
+			
+			
+			crossPoint(frame_copy, hipPointBack, RED, MID);
+			crossPoint(frame_copy, hipExpected, BLUE, MID);
+			crossPoint(frame_copy, kneePointFront, GREY, MID);
+			crossPoint(frame_copy, kneePointBack, GREY, MID);
+			crossPoint(frame_copy, toeExpected, GREEN, MID);
+			cvShowImage("result",frame_copy);
+
 
+//		cvWaitKey(0); abans 
 
 			foundAngle = false;
-			if(minwidth == 0)
-				minwidth = kneePointFront.x - hipPointBack.x;
+			if(kneeMinWidth == 0)
+				kneeMinWidth = kneePointFront.x - hipPointBack.x;
 			else {
-				if((double)(kneePointFront.x- hipPointBack.x) > 1.15*minwidth && //or 1.05 or 1.15
+				if((double)(kneePointFront.x- hipPointBack.x) > 1.15*kneeMinWidth && //or 1.05 or 1.15
 						upperSimilarThanLower(hipExpected, kneePointFront, toeExpected)
-						&& !pointIsNull(hipMarked) && !pointIsNull(kneeMarked) && 
-						!pointIsNull(toeMarked))
+				  )
+						//this is for validation
+						//&& !pointIsNull(hipMarked) && !pointIsNull(kneeMarked) && 
+						//!pointIsNull(toeMarked))
 				{
 					if(foundAngleOneTime) {
 						foundAngle = true;
@@ -788,10 +858,10 @@
 						crossPoint(frame_copy, kneePointBack, GREY, MID);
 
 						cvShowImage("result",frame_copy);
-						imageGuiAsk(gui, "knee found. Accept?", "'n'o, 'y'es, 'f'orward, 'F'astForward, 'b'ackward, 'q'uit", font);
+						imageGuiResult(gui, "knee found. Accept? 'n'o, 'y'es", font);
 					
 						int option = optionAccept(false);	
-						eraseGuiAsk(gui);
+						eraseGuiResult(gui, true);
 
 						if(option==YES) {
 							printf("Accepted\n");
@@ -823,50 +893,52 @@
 									kneeCenterExtY, 
 									kneeCenterExtYPercent 
 									);				//debug
-							
-							/*
-							 * now print differences between:
-							 * CvPoint(kneeCenterExtX, kneePointFront.y) and kneeMarkedAtEXtension
-							 */
-							printf("marked at ext: x: %d, y: %d\n", kneeMarkedAtExtension.x, kneeMarkedAtExtension.y); //debug
-
-							//see the % of rectangle where kneeMarked is (at extension)
-							double kneeMarkedXPercent = 100 * (double)(kneeMarkedAtExtension.x - rectExt.x) / rectExt.width;
-							double kneeMarkedYPercent = 100 * (double)(kneeMarkedAtExtension.y - rectExt.y) / rectExt.height;
-
+				
 
+							if(validation) {	
+								/*
+								 * now print differences between:
+								 * CvPoint(kneeCenterExtX, kneePointFront.y) and kneeMarkedAtEXtension
+								 */
+								printf("marked at ext: x: %d, y: %d\n", kneeMarkedAtExtension.x, kneeMarkedAtExtension.y); //debug
+
+								//see the % of rectangle where kneeMarked is (at extension)
+								double kneeMarkedXPercent = 100 * (double)(kneeMarkedAtExtension.x - rectExt.x) / rectExt.width;
+								double kneeMarkedYPercent = 100 * (double)(kneeMarkedAtExtension.y - rectExt.y) / rectExt.height;
+							
+								cvLine(extension,
+										kneeMarkedAtExtension,
+										cvPoint(kneeCenterExtX, kneeCenterExtY),
+										WHITE,1,1);
+								
+								printf("knee diff: x: %.1f (%.1f%%), y: %.1f (%.1f%%)\n", 
+										kneeMarkedAtExtension.x - kneeCenterExtX,
+										kneeMarkedXPercent - kneeCenterExtXPercent,
+										kneeMarkedAtExtension.y - kneeCenterExtY,
+										kneeMarkedYPercent - kneeCenterExtYPercent);	
+
+
+								//hip
+								double hipMarkedX = hipMarkedAtExtension.x - kneeCenterExtX;
+								double hipMarkedXPercent = 100 * (double) hipMarkedX / rectExt.width;
+								printf("hip diff: x: %.1f (%.1f%%)\n", 
+										hipMarkedX,
+										hipMarkedXPercent
+								      );
+								cvLine(extension,
+										hipMarkedAtExtension,
+										cvPoint(kneeCenterExtX, hipMarkedAtExtension.y),
+										CV_RGB(128,128,128),1,1);
+							}
+							
 							cvRectangle(extension, 
 									cvPoint(rectExt.x, rectExt.y), 
 									cvPoint(rectExt.x + rectExt.width, rectExt.y + rectExt.height),
-									CV_RGB(255,0,255),1,8,0
+									MAGENTA,1,8,0
 									);
 							crossPoint(extension,cvPoint(rectExt.x + rectExt.width, kneePointFront.y), WHITE, MID);
 							crossPoint(extension,cvPoint(rectExt.x, kneePointBack.y), WHITE, MID);
 
-
-
-							printf("knee diff: x: %.1f (%.1f%%), y: %.1f (%.1f%%)\n", 
-									kneeMarkedAtExtension.x - kneeCenterExtX,
-									kneeMarkedXPercent - kneeCenterExtXPercent,
-									kneeMarkedAtExtension.y - kneeCenterExtY,
-									kneeMarkedYPercent - kneeCenterExtYPercent);	
-							
-							cvLine(extension,
-									kneeMarkedAtExtension,
-									cvPoint(kneeCenterExtX, kneeCenterExtY),
-									WHITE,1,1);
-							
-							//hip
-							double hipMarkedX = hipMarkedAtExtension.x - kneeCenterExtX;
-							double hipMarkedXPercent = 100 * (double) hipMarkedX / rectExt.width;
-							printf("hip diff: x: %.1f (%.1f%%)\n", 
-									hipMarkedX,
-									hipMarkedXPercent
-									);
-							cvLine(extension,
-									hipMarkedAtExtension,
-									cvPoint(kneeCenterExtX, hipMarkedAtExtension.y),
-									CV_RGB(128,128,128),1,1);
 							
 							//back
 							double backDistance = kneeCenterExtX - hipPointBackAtExtension.x;
@@ -880,7 +952,7 @@
 									cvPoint(kneeCenterExtX, hipPointBackAtExtension.y),
 									CV_RGB(128,128,128),1,1);
 							
-							cvShowImage("Extension Frame", extension);
+							showScaledImage(extension, "Extension frame");
 						} else {
 							foundAngle = false;
 							
@@ -897,7 +969,7 @@
 								cvSetCaptureProperty( capture, CV_CAP_PROP_POS_FRAMES, 
 										framesCount - backwardSpeed -1 );
 									
-								printf("backwarding ...\n");
+								imageGuiResult(gui, "Backwarding...", font);
 								continue;
 							} else if(option==QUIT) {
 								shouldEnd = true;
@@ -929,20 +1001,28 @@
 
 
 				int kneeWidth = kneePointFront.x - kneePointBack.x;
-				int kneeMarkedPosX = kneeWidth - (kneeMarked.x - kneePointBack.x);
-				double kneeMarkedPercentX = (double) kneeMarkedPosX * 100 / kneeWidth;
 				int kneeHeight = kneeWidth; //kneeHeight can be 0, best to use kneeWidth for percent, is more stable
 				int kneeHeightBoxDown = ( (kneePointFront.y + kneePointBack.y) /2 ) - (kneeHeight /2);
-				int kneeMarkedPosY = kneeHeight - (kneeMarked.y - kneeHeightBoxDown);
-				double kneeMarkedPercentY = (double) kneeMarkedPosY * 100 / kneeHeight;
+				
 				cvRectangle(frame_copy, 
 						cvPoint(kneePointBack.x, kneeHeightBoxDown), 
 						cvPoint(kneePointBack.x + kneeWidth, kneeHeightBoxDown + kneeHeight),
-						CV_RGB(255,0,255),1,8,0);
+						MAGENTA,1,8,0);
+
+				if(validation) {
+					int kneeMarkedPosX = kneeWidth - (kneeMarked.x - kneePointBack.x);
+					double kneeMarkedPercentX = (double) kneeMarkedPosX * 100 / kneeWidth;
+					int kneeMarkedPosY = kneeHeight - (kneeMarked.y - kneeHeightBoxDown);
+					double kneeMarkedPercentY = (double) kneeMarkedPosY * 100 / kneeHeight;
+					
+				}
+
+				/*
 				if(pointIsNull(hipMarked) || pointIsNull(kneeMarked) || pointIsNull(toeMarked))
 					thetaMarked = -1;
 				else
 					thetaMarked = findAngle2D(hipMarked, toeMarked, kneeMarked);
+					*/
 
 				// ------------ toe stuff ----------
 
@@ -953,7 +1033,7 @@
 				 * because the back part of kneepoint has gone up
 				 */
 
-				if(toePointWidth == -1) 
+				//if(toePointWidth == -1) 
 					toePointWidth = findWidth(output, toeExpected, false);
 				crossPoint(frame_copy, toeExpected, GREY, MID);
 
@@ -962,7 +1042,7 @@
 				
 				//printf("%d;%.2f;%.2f;%.2f\n", framesCount, thetaMarked, kneeMarkedPercentX, kneeMarkedPercentY);
 				double angleBack =findAngle2D(hipPointBack, cvPoint(toeExpected.x - toePointWidth, toeExpected.y), kneePointBack); 
-				printf("%d;%.2f;%.2f;%.2f\n", framesCount, angleBack, kneeMarkedPercentX, kneeMarkedPercentY);
+				//printf("%d;%.2f;%.2f;%.2f\n", framesCount, angleBack, kneeMarkedPercentX, kneeMarkedPercentY);
 				cvLine(frame_copy,hipPointBack, kneePointBack,CV_RGB(255,0,0),1,1);
 				cvLine(frame_copy,kneePointBack, cvPoint(toeExpected.x - toePointWidth, toeExpected.y),CV_RGB(255,0,0),1,1);
 
@@ -1023,9 +1103,9 @@
 				 */
 				if(extensionDoIt && ! foundAngleOneTime && ! extensionCopyDone) {
 					cvShowImage("result",frame_copy);
-					imageGuiAsk(gui, "Extension copy. Accept?", "'n'o, 'y'es, 'f'orward, 'F'astForward, 'b'ackward, 'q'uit", font);
+					imageGuiResult(gui, "Extension copy. Accept? 'n'o, 'y'es", font);
 					int option = optionAccept(false);
-					eraseGuiAsk(gui);
+					eraseGuiResult(gui, true);
 
 					if(option==YES) {
 						cvCopy(frame_copy, extension);
@@ -1035,12 +1115,16 @@
 
 						//cvCopy(segmentedValidationHoles, extensionSegHoles);
 						//printf("\nhere: x: %d, y: %d\n", kneeMarked.x, kneeMarked.y);
-						kneeMarkedAtExtension = kneeMarked;
-						hipMarkedAtExtension = hipMarked;
+						if(validation) {
+							kneeMarkedAtExtension = kneeMarked;
+							hipMarkedAtExtension = hipMarked;
+						}
+							
 						hipPointBackAtExtension = hipPointBack;
-						
-						cvNamedWindow("Extension Frame",1);
-						cvShowImage("Extension Frame", extension);
+
+						kneeWidthAtExtension = findWidth(output, kneePointFront, false);
+
+						showScaledImage(extension, "Extension frame");
 						
 						extensionCopyDone = true;
 					} else {
@@ -1057,7 +1141,7 @@
 							cvSetCaptureProperty( capture, CV_CAP_PROP_POS_FRAMES, 
 									framesCount - backwardSpeed -1 );
 							
-							printf("backwarding ...\n");
+							imageGuiResult(gui, "Backwarding...", font);
 							continue;
 						} else if(option==QUIT) {
 							shouldEnd = true;
@@ -1071,6 +1155,7 @@
 		}
 
 
+//		cvWaitKey(0);  falla abans 
 
 		/* 
 		 * 6
@@ -1113,7 +1198,16 @@
 			fastForward = true;
 			imageGuiResult(gui, "FastForwarding...", font);
 			cvWaitKey(50); //to print above message
-		} else if (key == 'j' || key == 'J') {
+		} else if (mouseClicked == BACKWARD) {
+			backward = true;
+
+			//try to go to previous (backwardspeed) frame
+			cvSetCaptureProperty( capture, CV_CAP_PROP_POS_FRAMES, 
+					framesCount - backwardSpeed -1 );
+
+			imageGuiResult(gui, "Backwarding...", font);
+			cvWaitKey(50); //to print above message
+		//} else if (key == 'j' || key == 'J') {
 			/*
 			//jump frames
 			printf("current frame: %d. Jump to: ", framesCount);
@@ -1131,8 +1225,8 @@
 			printf("jumping ...\n");
 			imageGuiResult(gui, "Jumping...", font);
 			*/
-		}
-		else if(mouseClicked == TGLOBALMORE || mouseClicked == TGLOBALLESS ||
+		//}
+		} else if(mouseClicked == TGLOBALMORE || mouseClicked == TGLOBALLESS ||
 			mouseClicked == THIPMORE || mouseClicked == THIPLESS ||
 			mouseClicked == TKNEEMORE || mouseClicked == TKNEELESS ||
 			mouseClicked == TTOEMORE || mouseClicked == TTOELESS)
@@ -1146,6 +1240,8 @@
 		{
 			if(!forcePause)
 				mouseClicked = UNDEFINED;  
+			if(key == 'p')
+				key = NULL;
 
 			forcePause = false;
 
@@ -1156,14 +1252,15 @@
 
 			bool done = false;
 			do {
-				cvWaitKey(50);
+				key = (char) cvWaitKey(50);
+				//cvWaitKey(50);
 			
 				if(mouseMultiplier)
 					mult = 10;
 				else
 					mult = 1;
 
-				if (mouseClicked == PLAYPAUSE) 
+				if (mouseClicked == PLAYPAUSE || key == 'p') 
 					done = true;
 		
 				else if(mouseClicked == quit || key == 27 || key == 'q') {
@@ -1217,7 +1314,8 @@
 						cvThreshold(gray,segmented,threshold,thresholdMax,CV_THRESH_BINARY_INV);
 						maxrect = findLargestContour(segmented, output, showContour);
 
-						updateHolesWin(segmentedValidationHoles);
+						if(validation)
+							updateHolesWin(segmentedValidationHoles);
 						
 						sprintf(label, "threshold: %d", threshold);
 						imageGuiResult(gui, label, font);
@@ -1430,9 +1528,9 @@
 				
 		}
 
-		if(programMode != skinOnlyMarkers) {
+		if(programMode == validation) 
 			updateHolesWin(segmentedValidationHoles);
-		}
+		
 		
 		mouseClicked = UNDEFINED;  
 
@@ -1444,7 +1542,7 @@
 		
 	imageGuiResult(gui, "Press any key to exit.", font);
 
-	if( (programMode == validation || programMode == blackAndMarkers) && foundAngleOneTime) 
+	if( (programMode == validation || programMode == blackWithoutMarkers) && foundAngleOneTime) 
 	{
 		avgThetaDiff = (double) avgThetaDiff / framesDetected;
 		avgThetaDiffPercent = (double) avgThetaDiffPercent / framesDetected;

Modified: trunk/src/angle/kneeAngleFunctions.cpp
==============================================================================
--- trunk/src/angle/kneeAngleFunctions.cpp	(original)
+++ trunk/src/angle/kneeAngleFunctions.cpp	Thu Dec 25 02:54:58 2008
@@ -218,10 +218,26 @@
 	int maxy2 = -1;
 	
 	bool foundNow = false;
-	for(int y=starty; y<endy; y++)
+
+	int startx;
+	int lastx = -1;
+
+	/*
+	changed kneePointBack to be found from down to up, and x starts at position
+	in last row (this will help to find kneePointBack ok when there's lot of
+	flexion and biceps femoral is lower than kneePointBack
+	*/
+
+	for(int y=endy; y>starty; y--)
 	{
 		uchar *srcdataptr = srcdata + y*img->width;
-		for(int x=0; x < kneePointFrontX; x++)
+
+		if(lastx != -1 && srcdataptr[lastx] > 0)
+			startx = lastx;
+		else
+			startx = 0;
+
+		for(int x=startx; x < kneePointFrontX; x++)
 		{
 			if(srcdataptr[x] > 0)
 			{
@@ -230,34 +246,6 @@
 					maxx = x;
 					maxy = y;
 					foundNow = true;
-	
-					/* DO THIS BY CONVEXITY DEFECTS. See opencv book, page 259
-					 */
-
-					/*
-					 * TODO: improve this, 
-					 * check as a sample:
-					 * ~/Desktop/opencv_validacio_blanquerna/tarda/38_xxx_salt5_m.MOV 
-					 * or apply also in above:
-					 * else if(foundNow && x==maxx) 
-
-					//search for a hidden upperRight popliteo (flexion of 50Â aprox)
-					//going up
-					int xSearch = x;
-					int ySearch = y-1;
-					uchar *srcdataptr2 = srcdata + ySearch*img->width;
-					while (srcdataptr2[xSearch] == 0) { //while there's white space up
-						//found air, at right there must be pants
-						while(srcdataptr2[xSearch ++] == 0) {
-							if(xSearch > x) {
-								maxx = xSearch;
-								maxy = ySearch;
-							}
-						}
-						ySearch --;
-						srcdataptr2 = srcdata + ySearch*img->width;
-					}
-					*/
 				}
 				else if(foundNow && x==maxx) {
 					maxx2 = x;
@@ -313,12 +301,11 @@
  * Toe point is a white pixel below the knee point and having minimum x coordinate
  * Returns the coordinate of the hip point
  */
-CvPoint findToePoint(IplImage *img,CvRect roirect,int startx,int starty)
+CvPoint findToePoint(IplImage *img,CvRect roirect,int startx,int starty, int toeMinWidth)
 {
 	CvPoint pt;
 	pt.x = 0; pt.y = 0;
 	
-	
 	/* if toe is in the image, is better to try to avoid it capturing above, if not then capture all
 	 * maybe force user to capture without toe, or ask and put a boolean
 	 */
@@ -342,7 +329,8 @@
 			{
 				if(x>startx)
 					break;
-				if(x<minx)
+				//if found a leftier pointm and the with of this toe is bigger than 1/2 of knee width at extension
+				if(x<minx && findWidth(img, cvPoint(x,y), false) >= toeMinWidth )
 				{
 					minx = x;
 					miny = y;
@@ -914,17 +902,8 @@
 	}
 
 	//show temp image (contour) little
-	if(showContour) {
-		cvNamedWindow("contour",1);
-		cvResize(temp, temp, CV_INTER_LINEAR);
-
-		double scale = 4;
-		//double scale = 1;
-		IplImage* tempSmall = cvCreateImage( cvSize( cvRound (img->width/scale), cvRound (img->height/scale)), 8, 1 );
-		cvResize( temp, tempSmall, CV_INTER_LINEAR );
-
-		cvShowImage("contour", tempSmall);
-	}
+	if(showContour) 
+		showScaledImage(temp, "contour");
 	
 	cvReleaseMemStorage(&storage);
 	cvReleaseImage(&tempcopy);
@@ -1238,7 +1217,7 @@
 				if(pointInsideRect(clicked, rval))
 					mouseClicked = validation;
 				else if(pointInsideRect(clicked, rbam))
-					mouseClicked = blackAndMarkers;
+					mouseClicked = blackWithoutMarkers;
 				else if(pointInsideRect(clicked, rsom))
 					mouseClicked = skinOnlyMarkers;
 				else if(pointInsideRect(clicked, rquit))
@@ -1289,9 +1268,10 @@
 					mouseClicked = FORWARD;
 				else if(pointInsideRect(clicked, rfastforward))
 					mouseClicked = FASTFORWARD;
-				if(pointInsideRect(clicked, rbackward))
+				else if(pointInsideRect(clicked, rbackward))
 					mouseClicked = BACKWARD;
 
+
 				else if(pointInsideRect(clicked, rhip))
 					mouseClicked = HIPMARK;
 				else if(pointInsideRect(clicked, rknee))
@@ -1318,7 +1298,7 @@
 				else if(pointInsideRect(clicked, rtgloballess))
 					mouseClicked = TGLOBALLESS;
 
-				if(pointInsideRect(clicked, rquit))
+				else if(pointInsideRect(clicked, rquit))
 					mouseClicked = QUIT;
 			}
 			break;
@@ -1370,11 +1350,7 @@
 }
 
 void updateHolesWin(IplImage *segmentedValidationHoles) {
-	double scale = 4;
-	IplImage* tempSmall = cvCreateImage( cvSize( cvRound (segmentedValidationHoles->width/scale), 
-				cvRound (segmentedValidationHoles->height/scale)), 8, 1 );
-	cvResize( segmentedValidationHoles, tempSmall, CV_INTER_LINEAR );
-	cvShowImage("holes",tempSmall);
+	showScaledImage(segmentedValidationHoles, "holes");
 }
 
 void printOnScreen(IplImage * img, CvFont font, CvScalar color, bool labelsAtLeft, 

Modified: trunk/src/angle/kneeAngleGlobal.cpp
==============================================================================
--- trunk/src/angle/kneeAngleGlobal.cpp	(original)
+++ trunk/src/angle/kneeAngleGlobal.cpp	Thu Dec 25 02:54:58 2008
@@ -68,9 +68,15 @@
 
 enum { SMALL = 1, MID = 2, BIG = 3 }; 
 
-//used on menu gui
-//currently validation and blackAndMarkers are synonymous (until statistical anylisys is not done)
-enum { quit = -2, undefined = -1, validation = 0, blackAndMarkers = 1, skinOnlyMarkers = 2}; 
+//used on menu gui and programMode
+//currently validation and blackWithoutMarkers are synonymous (until statistical anylisys is not done)
+/*
+ * validation uses markers and black pants to try to find relationship between both
+ * blackWithoutMarkers uses only black pants and finds the place where the markers should be
+ *    (when validation study for lots of people isdone)
+ * skinOnlyMarkers uses markers to find three points and angle (easiest)
+ */
+enum { quit = -2, undefined = -1, validation = 0, blackWithoutMarkers = 1, skinOnlyMarkers = 2}; 
 
 //used on gui
 enum { 

Modified: trunk/src/angle/kneeAngleUtil.cpp
==============================================================================
--- trunk/src/angle/kneeAngleUtil.cpp	(original)
+++ trunk/src/angle/kneeAngleUtil.cpp	Thu Dec 25 02:54:58 2008
@@ -450,5 +450,14 @@
 	cvShowImage("gui", gui);
 }
 
+void showScaledImage(IplImage * img, const char *title) {
+	cvNamedWindow(title, 1);
+	//double scale = 4;
+	double scale = 2;
+	IplImage* small = cvCreateImage( cvSize( cvRound (img->width/scale), cvRound (img->height/scale)), 8, img->nChannels );
+	cvResize( img, small, CV_INTER_LINEAR );
+	cvShowImage(title, small);
+}
+
 
 

Modified: trunk/src/exportSession.cs
==============================================================================
--- trunk/src/exportSession.cs	(original)
+++ trunk/src/exportSession.cs	Thu Dec 25 02:54:58 2008
@@ -45,6 +45,8 @@
 	protected int prefsDigitsNumber;
 	protected bool heightPreferred;
 	protected bool weightStatsPercent;
+					
+	protected string spreadsheetString;
 
 	public ExportSession() {
 	}
@@ -56,6 +58,8 @@
 		this.prefsDigitsNumber = prefsDigitsNumber;
 		myAppbar = mainAppbar;
 		
+		spreadsheetString = "";
+
 		checkFile("none");
 	}
 
@@ -100,7 +104,7 @@
 					printData();
 					closeWriter();
 
-					string myString = string.Format(Catalog.GetString("Saved to {0}\n\nWhen import from your spreadsheet (OpenOffice, R, MS Excel, ...)\nremember the separator character is semicolon: <b>;</b>"), fileName);
+					string myString = string.Format(Catalog.GetString("Saved to {0}"), fileName) + spreadsheetString;
 					new DialogMessage(Constants.MessageTypes.INFO, myString);
 				}
 			} 
@@ -132,7 +136,7 @@
 		printData();
 		closeWriter();
 				
-		string myString = string.Format(Catalog.GetString("Saved to {0}\n\nWhen import from your spreadsheet (OpenOffice, R, MS Excel, ...)\nremember the separator character is semicolon: <b>;</b>"), fileName);
+		string myString = string.Format(Catalog.GetString("Saved to {0}"), fileName) + spreadsheetString;
 		new DialogMessage(Constants.MessageTypes.INFO, myString);
 	}
 		
@@ -687,12 +691,15 @@
 
 public class ExportSessionCSV : ExportSession 
 {
-	
+
 	public ExportSessionCSV(Session mySession, Gtk.Window app1, Gtk.Statusbar mainAppbar, int prefsDigitsNumber) 
 	{
 		this.mySession = mySession;
 		this.prefsDigitsNumber = prefsDigitsNumber;
 		myAppbar = mainAppbar;
+	
+		spreadsheetString = "\n\n" + Catalog.GetString("When import from your spreadsheet (OpenOffice, R, MS Excel, ...)\nremember the separator character is semicolon: <b>;</b>");
+
 		checkFile("CSV");
 	}
 
@@ -704,8 +711,12 @@
 			//correctly separate the rows with no problems with decimals
 			//1 delete the ';'
 			exportData[i] = exportData[i].ToString().Replace(";", " ");
+			/*
 			//2 put '; ' as separator
 			exportData[i] = exportData[i].ToString().Replace(":", "; ");
+			*/
+			//2 put ';' as separator
+			exportData[i] = exportData[i].ToString().Replace(":", ";");
 
 			writer.WriteLine( exportData[i] );
 		}

Modified: trunk/src/gui/chronojump.cs
==============================================================================
--- trunk/src/gui/chronojump.cs	(original)
+++ trunk/src/gui/chronojump.cs	Thu Dec 25 02:54:58 2008
@@ -418,6 +418,15 @@
 
 		//show chronojump logo on down-left area
 		changeTestImage("", "", "LOGO");
+				
+		//new DialogMessage(Constants.MessageTypes.INFO, UtilGtk.ScreenHeightFitted(false).ToString() );
+
+		/*
+		int app1X, app1Y;
+		app1.GetSize(out app1X, out app1Y);
+		app1.Resize(app1X, UtilGtk.ScreenHeightFitted(true));
+		*/
+		app1.Maximize();
 
 		cpRunning = false;
 
@@ -449,6 +458,8 @@
 		createComboPulses();
 		createdStatsWin = false;
 
+
+
 		repetitiveConditionsWin = RepetitiveConditionsWindow.Create();
 
 		//We have no session, mark some widgets as ".Sensitive = false"

Modified: trunk/src/gui/dialogMessage.cs
==============================================================================
--- trunk/src/gui/dialogMessage.cs	(original)
+++ trunk/src/gui/dialogMessage.cs	Thu Dec 25 02:54:58 2008
@@ -32,7 +32,6 @@
 	[Widget] Gtk.Image image_info;
 	[Widget] Gtk.Image image_help;
 
-	//if ! isWarning, then it's an info
 	public DialogMessage (Constants.MessageTypes type, string message)
 	{
 		Glade.XML gladeXML;
@@ -45,16 +44,6 @@
 		//with this, user doesn't see a moving/changing creation window
 		dialog_message.Hide();	
 
-
-	/*	
-		if(isWarning) {
-			image_warning.Show();
-			image_info.Hide();
-		} else {
-			image_warning.Hide();
-			image_info.Show();
-		}
-		*/
 		switch (type) {
 			case Constants.MessageTypes.WARNING:
 				image_warning.Show();

Modified: trunk/src/gui/preferences.cs
==============================================================================
--- trunk/src/gui/preferences.cs	(original)
+++ trunk/src/gui/preferences.cs	Thu Dec 25 02:54:58 2008
@@ -33,6 +33,9 @@
 	[Widget] Gtk.Window preferences;
 
 	[Widget] Gtk.Entry entry_chronopic;
+	[Widget] Gtk.Box hbox_port_windows;
+	[Widget] Gtk.SpinButton spin_com_windows;
+
 	[Widget] Gtk.Label label_database;
 	[Widget] Gtk.Label label_database_temp;
 	[Widget] Gtk.Label label_logs;
@@ -73,8 +76,16 @@
 		//put an icon to window
 		UtilGtk.IconWindow(preferences);
 		
-		if(entryChronopic.Length > 0) {
-			entry_chronopic.Text = entryChronopic;
+		if(Util.IsWindows()) {
+			if(entryChronopic.Length > 0 && entryChronopic != Constants.ChronopicDefaultPortWindows) //default port windows is COM? (show a COM1)
+				spin_com_windows.Value =  Convert.ToInt32(entryChronopic.Substring(
+							3, entryChronopic.Length -3)); //eg: 'COM21', character 3 to end will be '21'
+			else
+				spin_com_windows.Value =  1;
+		} else {
+			if(entryChronopic.Length > 0) {
+				entry_chronopic.Text = entryChronopic;
+			}
 		}
 		
 		label_database.Text = Util.GetDatabaseDir() + System.IO.Path.DirectorySeparatorChar  + "chronojump.db";
@@ -85,13 +96,19 @@
 	
 	static public PreferencesWindow Show (string entryChronopic, int digitsNumber, bool showHeight, 
 			bool showInitialSpeed, bool showAngle, bool showQIndex, bool showDjIndex,
-			//bool askDeletion, bool heightPreferred, bool metersSecondsPreferred, string culture, bool allowFinishRjAfterTime)
 			bool askDeletion, bool weightStatsPercent, bool heightPreferred, bool metersSecondsPreferred, string language, bool allowFinishRjAfterTime)
 	{
 		if (PreferencesWindowBox == null) {
 			PreferencesWindowBox = new PreferencesWindow (entryChronopic);
 		}
 
+		if(Util.IsWindows()) {
+			PreferencesWindowBox.hbox_port_windows.Show();
+			PreferencesWindowBox.entry_chronopic.Hide();
+		} else {
+			PreferencesWindowBox.hbox_port_windows.Hide();
+			PreferencesWindowBox.entry_chronopic.Show();
+		}
 
 		PreferencesWindowBox.languageIni = language;
 		//if(Util.IsWindows())
@@ -233,7 +250,11 @@
 	{
 		/* the falses are for the dbcon that is not opened */
 
-		SqlitePreferences.Update("chronopicPort", entry_chronopic.Text.ToString(), false);
+		if(Util.IsWindows()) 
+			SqlitePreferences.Update("chronopicPort", "COM" + spin_com_windows.Text.ToString(), false);
+		else
+			SqlitePreferences.Update("chronopicPort", entry_chronopic.Text.ToString(), false);
+		
 		SqlitePreferences.Update("digitsNumber", spinbutton_decimals.Value.ToString(), false);
 		SqlitePreferences.Update("showHeight", PreferencesWindowBox.checkbutton_height.Active.ToString(), false);
 		SqlitePreferences.Update("showInitialSpeed", PreferencesWindowBox.checkbutton_initial_speed.Active.ToString(), false);

Modified: trunk/src/gui/stats.cs
==============================================================================
--- trunk/src/gui/stats.cs	(original)
+++ trunk/src/gui/stats.cs	Thu Dec 25 02:54:58 2008
@@ -162,6 +162,8 @@
 		gladeXML.Autoconnect(this);
 		this.parent = parent;
 		
+		UtilGtk.ResizeIfNeeded(stats_window);
+
 		//put an icon to window
 		UtilGtk.IconWindow(stats_window);
 

Modified: trunk/src/report.cs
==============================================================================
--- trunk/src/report.cs	(original)
+++ trunk/src/report.cs	Thu Dec 25 02:54:58 2008
@@ -51,6 +51,8 @@
 
 	private string progversion;
 	
+	
+	
 	public Report(int sessionID)
 	{
 		this.SessionID = sessionID;
@@ -62,6 +64,8 @@
 		ShowIntervalRuns = true;
 		ShowReactionTimes = true;
 		ShowPulses = true;
+	
+		spreadsheetString = "";
 
 		StatisticsData = new ArrayList(2);
 		
@@ -83,6 +87,8 @@
 		this.ShowPulses = showPulses;
 		this.StatisticsData = statisticsData;
 		
+		spreadsheetString = "";
+
 		mySession = SqliteSession.Select(sessionID.ToString());
 	}
 

Modified: trunk/src/utilGtk.cs
==============================================================================
--- trunk/src/utilGtk.cs	(original)
+++ trunk/src/utilGtk.cs	Thu Dec 25 02:54:58 2008
@@ -22,11 +22,32 @@
 using System;
 using System.Text; //StringBuilder
 using Gtk;
+using Gdk;
 
 //this class tries to be a space for methods that are used in different classes
 //only Gtk related methods (not used bu the server) this is the differnece with Util
 public class UtilGtk
 {
+	public static void ResizeIfNeeded(Gtk.Window win) {
+		int winX, winY;
+		win.GetSize(out winX, out winY);
+		int maxY = ScreenHeightFitted(true);
+		if(winY > maxY)
+			win.Resize(winX, maxY);
+	}
+
+	//(takes care)? of menu bar
+	public static int ScreenHeightFitted(bool fit) {
+		if(fit)
+			return ScreenHeight() -25;
+		else
+			return ScreenHeight();
+	}
+	
+	private static int ScreenHeight() {
+		//libmono-cairo2.0-cil
+		return Gdk.Display.Default.GetScreen(0).Height;
+	}
 
 	public static void IconWindow(Gtk.Window myWindow) {
 		Gdk.Pixbuf chronojumpIcon = new Gdk.Pixbuf (null, Constants.FileNameIcon);

Modified: trunk/web/data/languages.txt
==============================================================================
--- trunk/web/data/languages.txt	(original)
+++ trunk/web/data/languages.txt	Thu Dec 25 02:54:58 2008
@@ -1,5 +1,4 @@
 CatalÃ:_ca
-Deutsch:_de
 English:_en
 EspaÃol:_es
 FranÃais:_fr

Modified: trunk/web/html_created_no_edit/faq_es.html
==============================================================================
--- trunk/web/html_created_no_edit/faq_es.html	(original)
+++ trunk/web/html_created_no_edit/faq_es.html	Thu Dec 25 02:54:58 2008
@@ -21,7 +21,6 @@
 		<div id="sidebar">
 <ul>
 <li><a href="faq_ca.html">Catal&agrave;</a></li>
-<li>Deutsch (pending)</li>
 <li><a href="faq.html">English</a></li>
 <li id="currentLanguage">Espa&ntilde;ol</li>
 <li>Fran&ccedil;ais (pending)</li>

Modified: trunk/web/html_created_no_edit/photocells_es.html
==============================================================================
--- trunk/web/html_created_no_edit/photocells_es.html	(original)
+++ trunk/web/html_created_no_edit/photocells_es.html	Thu Dec 25 02:54:58 2008
@@ -21,7 +21,6 @@
 		<div id="sidebar">
 <ul>
 <li>Catal&agrave; (pending)</li>
-<li>Deutsch (pending)</li>
 <li>English (pending)</li>
 <li id="currentLanguage">Espa&ntilde;ol</li>
 <li>Fran&ccedil;ais (pending)</li>



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