chronojump r460 - in trunk: . build/data glade src src/gui



Author: xaviblas
Date: Tue Feb 24 17:04:57 2009
New Revision: 460
URL: http://svn.gnome.org/viewvc/chronojump?rev=460&view=rev

Log:
Copy database available from preferences window
evaluator code added device


Modified:
   trunk/build/data/chronojump.prg
   trunk/build/data/chronojump_mini.prg
   trunk/changelog.txt
   trunk/glade/chronojump.glade
   trunk/src/constants.cs
   trunk/src/gui/evaluator.cs
   trunk/src/gui/preferences.cs

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	Tue Feb 24 17:04:57 2009
@@ -1,6 +1,4 @@
-TODO (sorted)
-
-1.- upload SEvaluator and edit it and re-upload
+TODO:
 
 Add Cabedo's tests
 Add Margaria
@@ -16,8 +14,19 @@
 
 do the ping gets real IP
 
-open explorer window with database dir and log dir
+if a ping to server gets more than 5s, then abort, specially on start. Can be
+a network problem
+
+
+
+upload SEvaluator and edit it and re-upload
+add chronopic and device code th SEvaluator and update the diagram
+Add device images
+
 
+24 feb 2009
+	Copy database available from preferences window
+	evaluator code added device
 
 19 feb 2009
 	doing evaluator code

Modified: trunk/glade/chronojump.glade
==============================================================================
--- trunk/glade/chronojump.glade	(original)
+++ trunk/glade/chronojump.glade	Tue Feb 24 17:04:57 2009
@@ -2447,6 +2447,24 @@
 			  <property name="fill">False</property>
 			</packing>
 		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="button_db_backup">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Make a copy of the database</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Backup database</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_db_backup_clicked" last_modification_time="Tue, 24 Feb 2009 13:16:23 GMT"/>
+			</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>
@@ -8469,7 +8487,7 @@
 		      <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="image3805">
+			<widget class="GtkImage" id="image3891">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -8490,7 +8508,7 @@
 		      <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="image3806">
+			<widget class="GtkImage" id="image3892">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-open</property>
 			  <property name="icon_size">1</property>
@@ -8511,7 +8529,7 @@
 		      <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="image3807">
+			<widget class="GtkImage" id="image3893">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -8533,7 +8551,7 @@
 		      <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="image3808">
+			<widget class="GtkImage" id="image3894">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -8561,7 +8579,7 @@
 		      <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="image3809">
+			<widget class="GtkImage" id="image3895">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-convert</property>
 			  <property name="icon_size">1</property>
@@ -8590,16 +8608,15 @@
 		  </child>
 
 		  <child>
-		    <widget class="GtkImageMenuItem" id="menuitem_preferences">
+		    <widget class="GtkImageMenuItem" id="menuitem_server">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Preferences</property>
+		      <property name="label" translatable="yes">_Server</property>
 		      <property name="use_underline">True</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="image3810">
+			<widget class="GtkImage" id="image3896">
 			  <property name="visible">True</property>
-			  <property name="stock">gtk-preferences</property>
+			  <property name="stock">gtk-connect</property>
 			  <property name="icon_size">1</property>
 			  <property name="xalign">0.5</property>
 			  <property name="yalign">0.5</property>
@@ -8607,20 +8624,6 @@
 			  <property name="ypad">0</property>
 			</widget>
 		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="separador6">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="menuitem_server">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Server (experimental)</property>
-		      <property name="use_underline">True</property>
 
 		      <child>
 			<widget class="GtkMenu" id="menuitem_server_menu">
@@ -8666,6 +8669,33 @@
 		  </child>
 
 		  <child>
+		    <widget class="GtkSeparatorMenuItem" id="separador6">
+		      <property name="visible">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkImageMenuItem" id="menuitem_preferences">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Preferences</property>
+		      <property name="use_underline">True</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="image3897">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-preferences</property>
+			  <property name="icon_size">1</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>
+		  </child>
+
+		  <child>
 		    <widget class="GtkSeparatorMenuItem" id="separador18">
 		      <property name="visible">True</property>
 		    </widget>
@@ -8679,7 +8709,7 @@
 		      <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="image3811">
+			<widget class="GtkImage" id="image3898">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-quit</property>
 			  <property name="icon_size">1</property>
@@ -8713,7 +8743,7 @@
 		      <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="image3812">
+			<widget class="GtkImage" id="image3899">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -8734,7 +8764,7 @@
 		      <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="image3813">
+			<widget class="GtkImage" id="image3900">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -8761,7 +8791,7 @@
 		      <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="image3814">
+			<widget class="GtkImage" id="image3901">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-open</property>
 			  <property name="icon_size">1</property>
@@ -8782,7 +8812,7 @@
 		      <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="image3815">
+			<widget class="GtkImage" id="image3902">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-open</property>
 			  <property name="icon_size">1</property>
@@ -8809,7 +8839,7 @@
 		      <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="image3816">
+			<widget class="GtkImage" id="image3903">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -8830,7 +8860,7 @@
 		      <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="image3817">
+			<widget class="GtkImage" id="image3904">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-index</property>
 			  <property name="icon_size">1</property>
@@ -8857,7 +8887,7 @@
 		      <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="image3818">
+			<widget class="GtkImage" id="image3905">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -8969,7 +8999,7 @@
 			      <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="image3819">
+				<widget class="GtkImage" id="image3906">
 				  <property name="visible">True</property>
 				  <property name="stock">gtk-add</property>
 				  <property name="icon_size">1</property>
@@ -8994,7 +9024,7 @@
 		      <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="image3820">
+			<widget class="GtkImage" id="image3907">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -9015,7 +9045,7 @@
 		      <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="image3821">
+			<widget class="GtkImage" id="image3908">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9081,7 +9111,7 @@
 			      <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="image3822">
+				<widget class="GtkImage" id="image3909">
 				  <property name="visible">True</property>
 				  <property name="stock">gtk-add</property>
 				  <property name="icon_size">1</property>
@@ -9106,7 +9136,7 @@
 		      <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="image3823">
+			<widget class="GtkImage" id="image3910">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -9127,7 +9157,7 @@
 		      <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="image3824">
+			<widget class="GtkImage" id="image3911">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-preferences</property>
 			  <property name="icon_size">1</property>
@@ -9148,7 +9178,7 @@
 		      <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="image3825">
+			<widget class="GtkImage" id="image3912">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9175,7 +9205,7 @@
 		      <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="image3826">
+			<widget class="GtkImage" id="image3913">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -9320,7 +9350,7 @@
 			      <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="image3827">
+				<widget class="GtkImage" id="image3914">
 				  <property name="visible">True</property>
 				  <property name="stock">gtk-add</property>
 				  <property name="icon_size">1</property>
@@ -9345,7 +9375,7 @@
 		      <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="image3828">
+			<widget class="GtkImage" id="image3915">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -9366,7 +9396,7 @@
 		      <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="image3829">
+			<widget class="GtkImage" id="image3916">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9441,7 +9471,7 @@
 			      <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="image3830">
+				<widget class="GtkImage" id="image3917">
 				  <property name="visible">True</property>
 				  <property name="stock">gtk-add</property>
 				  <property name="icon_size">1</property>
@@ -9466,7 +9496,7 @@
 		      <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="image3831">
+			<widget class="GtkImage" id="image3918">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-edit</property>
 			  <property name="icon_size">1</property>
@@ -9487,7 +9517,7 @@
 		      <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="image3832">
+			<widget class="GtkImage" id="image3919">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-preferences</property>
 			  <property name="icon_size">1</property>
@@ -9508,7 +9538,7 @@
 		      <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="image3833">
+			<widget class="GtkImage" id="image3920">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-remove</property>
 			  <property name="icon_size">1</property>
@@ -9535,7 +9565,7 @@
 		      <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="image3834">
+			<widget class="GtkImage" id="image3921">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-new</property>
 			  <property name="icon_size">1</property>
@@ -9615,7 +9645,7 @@
 		      <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="image3835">
+			<widget class="GtkImage" id="image3922">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-refresh</property>
 			  <property name="icon_size">1</property>
@@ -9636,7 +9666,7 @@
 		      <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="image3836">
+			<widget class="GtkImage" id="image3923">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-refresh</property>
 			  <property name="icon_size">1</property>
@@ -9704,7 +9734,7 @@
 		      <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="image3837">
+			<widget class="GtkImage" id="image3924">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-info</property>
 			  <property name="icon_size">1</property>
@@ -9740,7 +9770,7 @@
 		      <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="image3838">
+			<widget class="GtkImage" id="image3925">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-about</property>
 			  <property name="icon_size">1</property>
@@ -9767,7 +9797,7 @@
 		      <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="image3839">
+			<widget class="GtkImage" id="image3926">
 			  <property name="visible">True</property>
 			  <property name="stock">gtk-dialog-error</property>
 			  <property name="icon_size">1</property>
@@ -27168,7 +27198,7 @@
 		  <child>
 		    <widget class="GtkLabel" id="label660">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Select your Device</property>
+		      <property name="label" translatable="yes">Select the device you currently use</property>
 		      <property name="use_underline">False</property>
 		      <property name="use_markup">False</property>
 		      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -27201,121 +27231,7 @@
 		      <property name="column_spacing">4</property>
 
 		      <child>
-			<widget class="GtkRadioButton" id="radiobutton16">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Undefined</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="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="GtkRadioButton" id="radiobutton17">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Chronopic 1</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">radio_cp_undef</property>
-			</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>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkRadioButton" id="radiobutton18">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Chronopic 2</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">radio_cp_undef</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">2</property>
-			  <property name="bottom_attach">3</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkRadioButton" id="radiobutton19">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Chronopic 3</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">radio_cp_undef</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkRadioButton" id="radiobutton20">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Other. Specify:</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">radio_cp_undef</property>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkImage" id="image3851">
+			<widget class="GtkImage" id="image_contact_steel">
 			  <property name="visible">True</property>
 			  <property name="xalign">0.5</property>
 			  <property name="yalign">0.5</property>
@@ -27332,7 +27248,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkImage" id="image3852">
+			<widget class="GtkImage" id="image_contact_circuit">
 			  <property name="visible">True</property>
 			  <property name="xalign">0.5</property>
 			  <property name="yalign">0.5</property>
@@ -27350,7 +27266,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkImage" id="image3853">
+			<widget class="GtkImage" id="image_infrared">
 			  <property name="visible">True</property>
 			  <property name="xalign">0.5</property>
 			  <property name="yalign">0.5</property>
@@ -27368,16 +27284,16 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkButton" id="button36">
+			<widget class="GtkButton" id="button_zoom_contact_steel">
 			  <property name="visible">True</property>
 			  <property name="tooltip" translatable="yes">Expand image and show description</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_cp1_zoom_clicked" last_modification_time="Thu, 19 Feb 2009 15:29:41 GMT"/>
+			  <signal name="clicked" handler="on_button_contact_steel_zoom_clicked" last_modification_time="Tue, 24 Feb 2009 16:11:44 GMT"/>
 
 			  <child>
-			    <widget class="GtkImage" id="image3854">
+			    <widget class="GtkImage" id="image_zoom_contact_steel">
 			      <property name="visible">True</property>
 			      <property name="xalign">0.5</property>
 			      <property name="yalign">0.5</property>
@@ -27397,16 +27313,16 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkButton" id="button37">
+			<widget class="GtkButton" id="button_zoom_contact_circuit">
 			  <property name="visible">True</property>
 			  <property name="tooltip" translatable="yes">Expand image and show description</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_cp2_zoom_clicked" last_modification_time="Thu, 19 Feb 2009 15:29:53 GMT"/>
+			  <signal name="clicked" handler="on_button_contact_circuit_zoom_clicked" last_modification_time="Tue, 24 Feb 2009 16:11:56 GMT"/>
 
 			  <child>
-			    <widget class="GtkImage" id="image3855">
+			    <widget class="GtkImage" id="image_zoom_contact_circuit">
 			      <property name="visible">True</property>
 			      <property name="xalign">0.5</property>
 			      <property name="yalign">0.5</property>
@@ -27426,16 +27342,16 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkButton" id="button38">
+			<widget class="GtkButton" id="button_zoom_infrared">
 			  <property name="visible">True</property>
 			  <property name="tooltip" translatable="yes">Expand image and show description</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_cp3_zoom_clicked" last_modification_time="Thu, 19 Feb 2009 15:29:59 GMT"/>
+			  <signal name="clicked" handler="on_button_infrared_zoom_clicked" last_modification_time="Tue, 24 Feb 2009 16:12:05 GMT"/>
 
 			  <child>
-			    <widget class="GtkImage" id="image3856">
+			    <widget class="GtkImage" id="image_zoom_infrared">
 			      <property name="visible">True</property>
 			      <property name="xalign">0.5</property>
 			      <property name="yalign">0.5</property>
@@ -27455,7 +27371,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkEntry" id="entry6">
+			<widget class="GtkEntry" id="entry_device_other">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="editable">True</property>
@@ -27474,6 +27390,127 @@
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radio_device_other">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Other. Specify:</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="toggled" handler="on_radio_device_toggled" last_modification_time="Tue, 24 Feb 2009 16:22:47 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">4</property>
+			  <property name="bottom_attach">5</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radio_device_undef">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Undefined</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">radio_device_other</property>
+			  <signal name="toggled" handler="on_radio_device_toggled" last_modification_time="Tue, 24 Feb 2009 16:22:38 GMT"/>
+			</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="GtkRadioButton" id="radio_contact_steel">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Contact platform
+(tempered steel)</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">radio_device_other</property>
+			  <signal name="toggled" handler="on_radio_device_toggled" last_modification_time="Tue, 24 Feb 2009 16:22:38 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>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radio_contact_circuit">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Contact platform
+(circuit board)</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">radio_device_other</property>
+			  <signal name="toggled" handler="on_radio_device_toggled" last_modification_time="Tue, 24 Feb 2009 16:22:38 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">2</property>
+			  <property name="bottom_attach">3</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radio_infrared">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Infrared</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">radio_device_other</property>
+			  <signal name="toggled" handler="on_radio_device_toggled" last_modification_time="Tue, 24 Feb 2009 16:22:38 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">3</property>
+			  <property name="bottom_attach">4</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>

Modified: trunk/src/constants.cs
==============================================================================
--- trunk/src/constants.cs	(original)
+++ trunk/src/constants.cs	Tue Feb 24 17:04:57 2009
@@ -100,7 +100,7 @@
 	};
 	public static string [] Devices = {
 		UndefinedDefault + ":" + Catalog.GetString(UndefinedDefault), 
-		"Contact platform (tempered steel)" + ":" + Catalog.GetString("Contact platform (tempered steel)"),
+		"Contact platform (steel)" + ":" + Catalog.GetString("Contact platform (steel)"),
 		"Contact platform (circuit board)" + ":" + Catalog.GetString("Contact platform (circuit board)"),
 		"Infrared" + ":" + Catalog.GetString("Infrared"),
 		"Other" + ":" + Catalog.GetString("Other"),

Modified: trunk/src/gui/evaluator.cs
==============================================================================
--- trunk/src/gui/evaluator.cs	(original)
+++ trunk/src/gui/evaluator.cs	Tue Feb 24 17:04:57 2009
@@ -40,12 +40,12 @@
 	[Widget] Gtk.Label label_confiable;
 	[Widget] Gtk.TextView textview_comments;
 
+	//chronometer tab
 	[Widget] Gtk.RadioButton radio_cp_undef;
 	[Widget] Gtk.RadioButton radio_cp1;
 	[Widget] Gtk.RadioButton radio_cp2;
 	[Widget] Gtk.RadioButton radio_cp3;
 	[Widget] Gtk.RadioButton radio_cp_other;
-
 	[Widget] Gtk.Image image_cp1;
 	[Widget] Gtk.Image image_cp2;
 	[Widget] Gtk.Image image_cp3;
@@ -56,6 +56,23 @@
 	[Widget] Gtk.Button button_zoom_cp1;
 	[Widget] Gtk.Button button_zoom_cp2;
 	[Widget] Gtk.Button button_zoom_cp3;
+	
+	//devices tab
+	[Widget] Gtk.RadioButton radio_contact_steel;
+	[Widget] Gtk.RadioButton radio_contact_circuit;
+	[Widget] Gtk.RadioButton radio_infrared;
+	[Widget] Gtk.RadioButton radio_device_other;
+	[Widget] Gtk.Entry entry_device_other;
+	[Widget] Gtk.Image image_contact_steel;
+	[Widget] Gtk.Image image_contact_circuit;
+	[Widget] Gtk.Image image_infrared;
+	[Widget] Gtk.Image image_zoom_contact_steel;
+	[Widget] Gtk.Image image_zoom_contact_circuit;
+	[Widget] Gtk.Image image_zoom_infrared;
+	[Widget] Gtk.Button button_zoom_contact_steel;
+	[Widget] Gtk.Button button_zoom_contact_circuit;
+	[Widget] Gtk.Button button_zoom_infrared;
+
 
 	[Widget] Gtk.Button button_accept;
 	[Widget] Gtk.Button button_cancel;
@@ -121,8 +138,12 @@
 		image_zoom_cp1.Pixbuf = pixbuf;
 		image_zoom_cp2.Pixbuf = pixbuf;
 		image_zoom_cp3.Pixbuf = pixbuf;
+		image_zoom_contact_steel.Pixbuf = pixbuf;
+		image_zoom_contact_circuit.Pixbuf = pixbuf;
+		image_zoom_infrared.Pixbuf = pixbuf;
 		
 		cp_zoom_buttons_unsensitive();
+		device_zoom_buttons_unsensitive();
 	}
 	
 	private void createComboContinents() {
@@ -228,6 +249,28 @@
 		}
 	}
 	
+	private void device_zoom_buttons_unsensitive() {
+		button_zoom_contact_steel.Sensitive = false;
+		button_zoom_contact_circuit.Sensitive = false;
+		button_zoom_infrared.Sensitive = false;
+	}
+
+	private void on_radio_device_toggled(object o, EventArgs args) {
+		device_zoom_buttons_unsensitive();
+		
+		if(radio_device_other.Active)
+			entry_device_other.Sensitive = true;
+		else {
+			entry_device_other.Sensitive = false;
+			if(radio_contact_steel.Active) 
+				button_zoom_contact_steel.Sensitive = true;
+			else if(radio_contact_circuit.Active) 
+				button_zoom_contact_circuit.Sensitive = true;
+			else if(radio_infrared.Active) 
+				button_zoom_infrared.Sensitive = true;
+		}
+	}
+	
 	
 	private void on_entries_required_changed(object o, EventArgs args) {
 	}
@@ -244,6 +287,15 @@
 	private void on_button_cp3_zoom_clicked(object o, EventArgs args) {
 		new DialogImageTest("Chronopic 3", Util.GetImagePath(false) + Constants.FileNameChronopic3);
 	}
+	private void on_button_contact_steel_zoom_clicked(object o, EventArgs args) {
+		//new DialogImageTest("Contact platform (tempered steel)", Util.GetImagePath(false) + Constants.FileNameChronopic1);
+	}
+	private void on_button_contact_circuit_zoom_clicked(object o, EventArgs args) {
+		//new DialogImageTest("Contact platform (circuit board)", Util.GetImagePath(false) + Constants.FileNameChronopic1);
+	}
+	private void on_button_infrared_zoom_clicked(object o, EventArgs args) {
+		//new DialogImageTest("Infrared", Util.GetImagePath(false) + Constants.FileNameChronopic1);
+	}
 
 	void on_button_change_date_clicked (object o, EventArgs args)
 	{

Modified: trunk/src/gui/preferences.cs
==============================================================================
--- trunk/src/gui/preferences.cs	(original)
+++ trunk/src/gui/preferences.cs	Tue Feb 24 17:04:57 2009
@@ -19,6 +19,7 @@
  */
 
 using System;
+using System.IO;
 using Gtk;
 using Glade;
 //using Gnome;
@@ -269,6 +270,83 @@
 		PreferencesWindowBox = null;
 	}
 	
+	string fileDB;
+	string fileCopy;
+	Gtk.FileChooserDialog fc;
+	void on_button_db_backup_clicked (object o, EventArgs args)
+	{
+		System.IO.FileInfo file1 = new System.IO.FileInfo(label_database.Text); //potser cal una arrobar abans (a windows)
+		System.IO.FileInfo file2 = new System.IO.FileInfo(label_database_temp.Text); //potser cal una arrobar abans (a windows)
+		fileDB = "";
+
+		long length1 = 0;
+		if(file1.Exists)
+			length1 = file1.Length;
+		long length2 = 0;
+		if(file2.Exists)
+			length2 = file2.Length;
+		
+		if(length1 == 0 && length2 == 0) 
+			new DialogMessage(Constants.MessageTypes.WARNING, Catalog.GetString("Error. Cannot find database."));
+		else if(length1 > length2)
+			fileDB = label_database.Text;
+		else
+			fileDB = label_database_temp.Text;
+
+		fc = new Gtk.FileChooserDialog(Catalog.GetString("Copy database to:"),
+				preferences,
+				FileChooserAction.SelectFolder,
+				Catalog.GetString("Cancel"),ResponseType.Cancel,
+				Catalog.GetString("Copy"),ResponseType.Accept
+				);
+
+		if (fc.Run() == (int)ResponseType.Accept) 
+		{
+			fileCopy = fc.Filename + Path.DirectorySeparatorChar + "chronojump_copy.db";
+			try {
+				fc.Hide ();
+				if (File.Exists(fileCopy)) {
+					Log.WriteLine(string.Format("File {0} exists with attributes {1}, created at {2}", 
+								fileCopy, File.GetAttributes(fileCopy), File.GetCreationTime(fileCopy)));
+					Log.WriteLine("Overwrite...");
+					ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you want to overwrite file: "), fileCopy);
+					confirmWin.Button_accept.Clicked += new EventHandler(on_overwrite_file_accepted);
+				} else {
+					File.Copy(fileDB, fileCopy);
+					string myString = string.Format(Catalog.GetString("Copied to {0}"), fileCopy);
+					new DialogMessage(Constants.MessageTypes.INFO, myString);
+				}
+			} 
+			catch {
+				string myString = string.Format(Catalog.GetString("Cannot copy to file {0} "), fileCopy);
+				new DialogMessage(Constants.MessageTypes.WARNING, myString);
+			}
+		}
+		else {
+			fc.Hide ();
+			return ;
+		}
+		
+		//Don't forget to call Destroy() or the FileChooserDialog window won't get closed.
+		fc.Destroy();
+		
+	}
+	
+	private void on_overwrite_file_accepted(object o, EventArgs args)
+	{
+		try {
+			File.Delete(fileCopy);
+			File.Copy(fileDB, fileCopy);
+			fc.Hide ();
+			string myString = string.Format(Catalog.GetString("Copied to {0}"), fileCopy);
+			new DialogMessage(Constants.MessageTypes.INFO, myString);
+		} catch {
+			string myString = string.Format(Catalog.GetString("Cannot copy to file {0} "), fileCopy);
+			new DialogMessage(Constants.MessageTypes.WARNING, myString);
+		}
+	}
+		
+
 	void on_button_accept_clicked (object o, EventArgs args)
 	{
 		/* the falses are for the dbcon that is not opened */



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