[chronojump] volumeOn and videoOn to main GUI



commit 05d4c3d77bb774f36329a966b5bb868fbd43c350
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Jan 13 00:47:41 2013 +0100

    volumeOn and videoOn to main GUI

 encoder/graph.R        |   21 +++-
 glade/chronojump.glade |  354 ++++++++++++++++++------------------------------
 src/gui/chronojump.cs  |   66 ++++++++--
 src/gui/preferences.cs |   67 +---------
 src/utilGtk.cs         |    6 +
 5 files changed, 215 insertions(+), 299 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index fcc1151..68802d2 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -964,8 +964,27 @@ print("----------------------------")
 		file=outputData1;
 		col1=rawdata
 		col2=rawdata.cumsum
-		df=data.frame(cbind(col1,col2))
+		#kn = kinematicsF (rawdata, mass, smoothingOne, g) #filter smoothingOne not good for all signal
+		knC1 = kinematicsF (rawdata[(curves[1,1]-500):curves[1,2]], mass, smoothingOne, g) #here filtering is good
+
+		#TODO: fer les altres curves
+		df=data.frame(cbind(
+				    col1[(curves[1,1]-500):curves[1,2]],col2[(curves[1,1]-500):curves[1,2]],
+				    #kn$speedy,kn$accely,kn$force,kn$power,
+				    knC1$speedy,knC1$accely,knC1$force,knC1$power))
+
+
+#TODO: bug, last 4 columns are shorter
+#TODO: tenir en compte el startH
+
+#		colnames(df)=c("Dist.", "Dist. +", 
+#			       "Speed", "Accel.", "Force", "Power",
+#			       "SpeedC1", "Accel.C1", "ForceC1", "PowerC1")
+
+#		print(head(df))
+
 		write.csv2(df, file=file, row.names=F)
+		#write.csv2(df, file=file, quotes=F)
 		print("Export done.")
 	}
 	dev.off()
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index b9a2a42..e93b3db 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -5785,7 +5785,124 @@ Second Chronopic to platforms.</property>
                                                         <property name="can_focus">False</property>
                                                         <property name="spacing">8</property>
                                                         <child>
-                                                          <widget class="GtkButton" id="button_execute_test">
+                                                          <widget class="GtkVBox" id="vbox33">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox105">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <widget class="GtkCheckButton" id="checkbutton_volume">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">False</property>
+                                                            <property name="tooltip" translatable="yes">Play sound (on / off)</property>
+                                                            <property name="use_action_appearance">False</property>
+                                                            <property name="relief">none</property>
+                                                            <property name="active">True</property>
+                                                            <property name="draw_indicator">False</property>
+                                                            <signal name="clicked" handler="on_checkbutton_volume_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkAlignment" id="alignment68">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xscale">0</property>
+                                                            <property name="yscale">0</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox144">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">2</property>
+                                                            <child>
+                                                            <widget class="GtkImage" id="image_volume">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="yalign">0.49000000953674316</property>
+                                                            <property name="icon-size">1</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkCheckButton" id="checkbutton_video">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">False</property>
+                                                            <property name="tooltip" translatable="yes">Record video (on / off)</property>
+                                                            <property name="use_action_appearance">False</property>
+                                                            <property name="relief">none</property>
+                                                            <property name="active">True</property>
+                                                            <property name="draw_indicator">False</property>
+                                                            <signal name="clicked" handler="on_checkbutton_video_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox106">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">2</property>
+                                                            <child>
+                                                            <widget class="GtkImage" id="image_video_yes">
+                                                            <property name="width_request">24</property>
+                                                            <property name="height_request">24</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="stock">gtk-media-record</property>
+                                                            <property name="icon-size">1</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkImage" id="image_video_no">
+                                                            <property name="width_request">24</property>
+                                                            <property name="height_request">24</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="stock">gtk-no</property>
+                                                            <property name="icon-size">1</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" id="button_execute_test">
                                                             <property name="height_request">60</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
@@ -5796,7 +5913,7 @@ Second Chronopic to platforms.</property>
                                                             <signal name="clicked" handler="on_button_execute_test_clicked" swapped="no"/>
                                                             <accelerator key="space" signal="clicked"/>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox33">
+                                                            <widget class="GtkVBox" id="vbox72">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <child>
@@ -5825,6 +5942,13 @@ Second Chronopic to platforms.</property>
                                                             </child>
                                                             </widget>
                                                             </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
                                                           </widget>
                                                           <packing>
                                                             <property name="expand">True</property>
@@ -5836,6 +5960,7 @@ Second Chronopic to platforms.</property>
                                                           <widget class="GtkVBox" id="vbox88">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox18">
                                                             <property name="visible">True</property>
@@ -6008,8 +6133,8 @@ Second Chronopic to platforms.</property>
                                                             </child>
                                                           </widget>
                                                           <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
                                                             <property name="position">2</property>
                                                           </packing>
                                                         </child>
@@ -23915,219 +24040,6 @@ options</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkVBox" id="vbox1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">7</property>
-                <property name="spacing">12</property>
-                <child>
-                  <widget class="GtkHBox" id="hbox1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">10</property>
-                    <child>
-                      <widget class="GtkCheckButton" id="checkbutton_volume">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="relief">none</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">False</property>
-                        <signal name="clicked" handler="on_checkbutton_volume_clicked" swapped="no"/>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment68">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xscale">0</property>
-                            <property name="yscale">0</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox144">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">2</property>
-                                <child>
-                                  <widget class="GtkImage" id="image_volume">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkLabel" id="label332">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="use_underline">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label_volume">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">10</property>
-                    <child>
-                      <widget class="GtkCheckButton" id="checkbutton_video">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="relief">none</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">False</property>
-                        <signal name="clicked" handler="on_checkbutton_video_clicked" swapped="no"/>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xscale">0</property>
-                            <property name="yscale">0</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox3">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">2</property>
-                                <child>
-                                  <widget class="GtkImage" id="image_video_yes">
-                                    <property name="width_request">24</property>
-                                    <property name="height_request">24</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="stock">gtk-media-record</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkImage" id="image_video_no">
-                                    <property name="width_request">24</property>
-                                    <property name="height_request">24</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="stock">gtk-no</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVBox" id="vbox2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <widget class="GtkLabel" id="label_video">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label_video_experimental">
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label">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="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Multimedia</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
               <widget class="GtkVBox" id="vbox122">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -24461,7 +24373,7 @@ show elevation as:</property>
                 </child>
               </widget>
               <packing>
-                <property name="position">2</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
@@ -24471,7 +24383,7 @@ show elevation as:</property>
                 <property name="label" translatable="yes">Show</property>
               </widget>
               <packing>
-                <property name="position">2</property>
+                <property name="position">1</property>
                 <property name="tab_fill">False</property>
                 <property name="type">tab</property>
               </packing>
@@ -24541,7 +24453,7 @@ show elevation as:</property>
                 </child>
               </widget>
               <packing>
-                <property name="position">3</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
@@ -24551,7 +24463,7 @@ show elevation as:</property>
                 <property name="label" translatable="yes">Other</property>
               </widget>
               <packing>
-                <property name="position">3</property>
+                <property name="position">2</property>
                 <property name="tab_fill">False</property>
                 <property name="type">tab</property>
               </packing>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 181c888..acc58c5 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -154,6 +154,13 @@ public partial class ChronoJumpWindow
 	[Widget] Gtk.Image image_simulated_warning;
 	//[Widget] Gtk.TextView textview_message_connected_chronopics;
 	//[Widget] Gtk.Image image_connected_chronopics;
+	
+	[Widget] Gtk.CheckButton checkbutton_volume;
+	[Widget] Gtk.Image image_volume;
+	[Widget] Gtk.CheckButton checkbutton_video;
+	[Widget] Gtk.Label label_video;
+	[Widget] Gtk.Image image_video_yes;
+	[Widget] Gtk.Image image_video_no;
 
 	//multiChronopic	
 	[Widget] Gtk.Button button_edit_selected_multi_chronopic;
@@ -830,12 +837,18 @@ public partial class ChronoJumpWindow
 			volumeOn = true;
 		else 
 			volumeOn = false;
+		
+		UtilGtk.ColorsCheckOnlyPrelight(checkbutton_volume);
+		changeVolumeButton(volumeOn);
 
 		if ( SqlitePreferences.Select("videoOn") == "True" ) 
 			videoOn = true;
 		else 
 			videoOn = false;
 
+		UtilGtk.ColorsCheckOnlyPrelight(checkbutton_video);
+		changeVideoButton(videoOn);
+
 
 		//load preferences, update radios, but not update database
 		update_sqlite_at_runs_speed_radios = false;
@@ -2561,7 +2574,9 @@ public partial class ChronoJumpWindow
 				prefsDigitsNumber, showHeight, showPower, showInitialSpeed, showAngle, showQIndex, showDjIndex, 
 				askDeletion, weightPercentPreferred, heightPreferred, metersSecondsPreferred,
 				//System.Threading.Thread.CurrentThread.CurrentUICulture.ToString(),
-				SqlitePreferences.Select("language"), volumeOn, videoOn);
+				SqlitePreferences.Select("language")
+				//, volumeOn, videoOn
+				);
 		myWin.Button_accept.Clicked += new EventHandler(on_preferences_accepted);
 	}
 
@@ -2646,16 +2661,6 @@ public partial class ChronoJumpWindow
 		//if(Util.IsWindows()) 
 		//	languageChange();
 		
-		if ( SqlitePreferences.Select("volumeOn") == "True" ) 
-			volumeOn = true;
-		 else 
-			volumeOn = false;
-		
-		 if ( SqlitePreferences.Select("videoOn") == "True" ) 
-			videoOn = true;
-		 else 
-			videoOn = false;
-
 
 		if(repetitiveConditionsWin != null)
 			repetitiveConditionsWin.VolumeOn = volumeOn;
@@ -2702,6 +2707,45 @@ public partial class ChronoJumpWindow
 		}
 	}
 	
+	private void changeVolumeButton(bool myVolume) {
+		Pixbuf pixbuf;
+		if(myVolume) 
+			pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "audio-volume-high.png");
+		else 
+			pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "audio-volume-muted.png");
+		
+		image_volume.Pixbuf = pixbuf;
+	}
+	
+	private void on_checkbutton_volume_clicked(object o, EventArgs args) {
+		if(checkbutton_volume.Active) {
+			volumeOn = true;
+			SqlitePreferences.Update("volumeOn", "True", false);
+		} else {
+			volumeOn = false;
+			SqlitePreferences.Update("volumeOn", "False", false);
+		}
+		changeVolumeButton(checkbutton_volume.Active);
+	}
+
+	
+	private void changeVideoButton(bool myVideo) {
+		image_video_yes.Visible = myVideo;
+		image_video_no.Visible = ! myVideo;
+	}
+	
+	private void on_checkbutton_video_clicked(object o, EventArgs args) {
+		if(checkbutton_video.Active) {
+			videoOn = true;
+			SqlitePreferences.Update("videoOn", "True", false);
+		} else {
+			videoOn = false;
+			SqlitePreferences.Update("videoOn", "False", false);
+		}
+		changeVideoButton(checkbutton_video.Active);
+	}
+	
+
 	private void on_cancel_clicked (object o, EventArgs args) 
 	{
 		Console.WriteLine("cancel clicked one");
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index eacb9c4..e5f7a7c 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -58,15 +58,6 @@ public class PreferencesWindow {
 	[Widget] Gtk.RadioButton radio_weight_kg;
 	[Widget] Gtk.TextView textview_power;
 
-	[Widget] Gtk.CheckButton checkbutton_volume;
-	[Widget] Gtk.CheckButton checkbutton_video;
-	[Widget] Gtk.Image image_volume;
-	[Widget] Gtk.Label label_volume;
-	[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;
 //	[Widget] Gtk.ComboBox combo_language;
@@ -100,7 +91,7 @@ public class PreferencesWindow {
 	static public PreferencesWindow Show (int digitsNumber, bool showHeight, bool showPower,  
 			bool showInitialSpeed, bool showAngle, bool showQIndex, bool showDjIndex,
 			bool askDeletion, bool weightStatsPercent, bool heightPreferred, bool metersSecondsPreferred, 
-			string language, bool volumeOn, bool videoOn)
+			string language)
 	{
 		if (PreferencesWindowBox == null) {
 			PreferencesWindowBox = new PreferencesWindow ();
@@ -177,67 +168,11 @@ public class PreferencesWindow {
 		else 
 			PreferencesWindowBox.radio_speed_km.Active = true; 
 		
-		UtilGtk.ColorsCheck(PreferencesWindowBox.checkbutton_volume);
-		PreferencesWindowBox.checkbutton_volume.Active = volumeOn;
-		PreferencesWindowBox.on_checkbutton_volume_clicked(new object(), new EventArgs());
-		
-		UtilGtk.ColorsCheck(PreferencesWindowBox.checkbutton_video);
-		PreferencesWindowBox.checkbutton_video.Active = videoOn;
-		PreferencesWindowBox.on_checkbutton_video_clicked(new object(), new EventArgs());
 
 		PreferencesWindowBox.preferences.Show ();
 		return PreferencesWindowBox;
 	}
 	
-	private void changeVolumeButton(bool myVolume) {
-		Pixbuf pixbuf;
-		if(myVolume) {
-			pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "audio-volume-high.png");
-			label_volume.Text = Catalog.GetString("Sound activated.");
-		} else {
-			pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "audio-volume-muted.png");
-			label_volume.Text = Catalog.GetString("No Sound.");
-		}
-		image_volume.Pixbuf = pixbuf;
-	}
-	
-	private void on_checkbutton_volume_clicked(object o, EventArgs args) {
-		if(checkbutton_volume.Active) {
-			SqlitePreferences.Update("volumeOn", "True", false);
-			label_volume.Text = Catalog.GetString("Sound activated.");
-		} else {
-			SqlitePreferences.Update("volumeOn", "False", false);
-			label_volume.Text = Catalog.GetString("No Sound.");
-		}
-		changeVolumeButton(checkbutton_volume.Active);
-	}
-
-	private void changeVideoButton(bool myVideo) {
-		image_video_yes.Visible = myVideo;
-		image_video_no.Visible = ! myVideo;
-		
-		if(myVideo) {	
-			label_video.Text = Catalog.GetString("Enabled test video recording and person's snapshots.");
-			//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) {
-		if(checkbutton_video.Active) {
-			SqlitePreferences.Update("videoOn", "True", false);
-			label_video.Text = Catalog.GetString("Enabled test video recording and person's snapshots.");
-		} else {
-			SqlitePreferences.Update("videoOn", "False", false);
-			label_video.Text = Catalog.GetString("Disabled video and snapshots.");
-		}
-		changeVideoButton(checkbutton_video.Active);
-	}
-
-	
 	private void createComboLanguage(string myLanguageCode) {
 		/*
 		combo_language = ComboBox.NewText ();
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 31ed231..b122c6f 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -251,6 +251,12 @@ public class UtilGtk
 		c.ModifyBg(StateType.Prelight, BLUE_CLEAR);
 	}
 
+	public static void ColorsCheckOnlyPrelight(Gtk.CheckButton c) {
+		c.ModifyBg(StateType.Normal, WHITE);
+		c.ModifyBg(StateType.Active, WHITE);
+		c.ModifyBg(StateType.Prelight, BLUE_CLEAR);
+	}
+
 
 	private static Gdk.Color chronopicViewportDefaultBg;
 	private static Gdk.Color chronopicLabelsDefaultFg;



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