[chronojump] Disabled webcam support on crash.



commit 8e755317aa3e892765080c38d0ca5358f0843323
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Apr 18 16:27:13 2011 +0200

    Disabled webcam support on crash.

 glade/chronojump.glade |   30 +++++++++++++++++++++++++++---
 src/chronojump.cs      |    9 ++++++++-
 src/gui/preferences.cs |    9 +++++++--
 3 files changed, 42 insertions(+), 6 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index b23f339..e0c0b17 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -1891,7 +1891,7 @@
               <widget class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="border_width">7</property>
-                <property name="spacing">4</property>
+                <property name="spacing">12</property>
                 <child>
                   <widget class="GtkHBox" id="hbox1">
                     <property name="visible">True</property>
@@ -2021,9 +2021,30 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label_video">
+                      <widget class="GtkVBox" id="vbox2">
                         <property name="visible">True</property>
-                        <property name="xalign">0</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <widget class="GtkLabel" id="label_video">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                          </widget>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label_video_experimental">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">EXPERIMENTAL, Chronojump may crash.</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
                       </widget>
                       <packing>
                         <property name="position">1</property>
@@ -2035,6 +2056,9 @@
                     <property name="position">1</property>
                   </packing>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
               </widget>
               <packing>
                 <property name="position">1</property>
diff --git a/src/chronojump.cs b/src/chronojump.cs
index e7351ca..c880639 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -262,6 +262,7 @@ Log.WriteLine("doing backup");
 			}
 
 			Log.WriteLine ( Catalog.GetString ("tables already created") ); 
+		
 
 			//check for bad Rjs (activate if program crashes and you use it in the same db before v.0.41)
 			//SqliteJump.FindBadRjs();
@@ -328,8 +329,10 @@ Log.WriteLine("doing backup");
 			if( versionAvailableKnown.Length > 0 && new Version(versionAvailableKnown) > new Version(progVersion) ) 
 				messageToShowOnBoot += "\n" + Catalog.GetString("Chronojump crashed before.") + "\n" +
 				       Catalog.GetString("Please, update to new version: ") + versionAvailableKnown + "\n";
-			else
+			else {
 				messageToShowOnBoot += messageChrashedBefore;
+				SqlitePreferences.Update("videoOn", "False", false);
+			}
 		}
 		
 		
@@ -582,6 +585,10 @@ Console.WriteLine("--6--");
 			//windowsTextLog +
 			"\n\n" +	
 			Catalog.GetString("Your help is needed.") + "\n";
+
+	
+		messageChrashedBefore += "\n" + Catalog.GetString("Experimental webcam record has been disabled.") + "\n";
+
 
 		/*
 		 * This are the only outputs to Console. Other's use Log that prints to console and to log file
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 013d327..e84c139 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -66,6 +66,7 @@ public class PreferencesWindow {
 	[Widget] Gtk.Image image_video_yes;
 	[Widget] Gtk.Image image_video_no;
 	[Widget] Gtk.Label label_video;
+	[Widget] Gtk.Label label_video_experimental;
 
 //	[Widget] Gtk.Box hbox_language_row;
 //	[Widget] Gtk.Box hbox_combo_language;
@@ -222,10 +223,14 @@ public class PreferencesWindow {
 		image_video_yes.Visible = myVideo;
 		image_video_no.Visible = ! myVideo;
 		
-		if(myVideo)		
+		if(myVideo) {	
 			label_video.Text = Catalog.GetString("Enabled test video recording and person's snapshots.");
-		else
+			label_video_experimental.Visible = true;
+		}
+		else {
 			label_video.Text = Catalog.GetString("Disabled video and snapshots.");
+			label_video_experimental.Visible = false;
+		}
 	}
 	
 	private void on_checkbutton_video_clicked(object o, EventArgs args) {



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