Commit af18fc92 authored by Xavier de Blas's avatar Xavier de Blas

persons window use video on all systems

parent f791a738
......@@ -28,7 +28,7 @@ public class Config
public Preferences.MaximizedTypes Maximized;
public bool CustomButtons;
public bool UseVideo;
//public bool UseVideo;
public bool OnlyEncoderGravitatory;
public bool OnlyEncoderInertial;
public bool EncoderCaptureShowOnlyBars;
......
......@@ -2703,7 +2703,8 @@ public partial class ChronoJumpWindow
{
personAddModifyWin = PersonAddModifyWindow.Show(app1,
currentSession, new Person(-1),
preferences.digitsNumber, checkbutton_video, configChronojump.UseVideo,
//preferences.digitsNumber, checkbutton_video, configChronojump.UseVideo,
preferences.digitsNumber, checkbutton_video,
preferences.videoDevice
);
//-1 means we are adding a new person
......@@ -2829,7 +2830,8 @@ public partial class ChronoJumpWindow
LogB.Information("modify person");
personAddModifyWin = PersonAddModifyWindow.Show(app1, currentSession, currentPerson,
preferences.digitsNumber, checkbutton_video, configChronojump.UseVideo,
//preferences.digitsNumber, checkbutton_video, configChronojump.UseVideo,
preferences.digitsNumber, checkbutton_video,
preferences.videoDevice
);
personAddModifyWin.FakeButtonAccept.Clicked += new EventHandler(on_edit_current_person_accepted);
......
......@@ -5892,9 +5892,9 @@ public partial class ChronoJumpWindow
//image_encoder_width = UtilGtk.WidgetWidth(viewport_image_encoder_capture)-5;
//make graph half width of Chronojump window
//but if video is disabled, then make it wider because thegraph will be much taller
if(configChronojump.UseVideo)
image_encoder_width = Convert.ToInt32(UtilGtk.WidgetWidth(app1) / 2);
else
//if(configChronojump.UseVideo)
// image_encoder_width = Convert.ToInt32(UtilGtk.WidgetWidth(app1) / 2);
//else
image_encoder_width = Convert.ToInt32(UtilGtk.WidgetWidth(app1));
if(image_encoder_width < 100)
......
......@@ -889,7 +889,8 @@ public class PersonAddModifyWindow
//if we are adding a person, currentPerson.UniqueID it's -1
//if we are modifying a person, currentPerson.UniqueID is obviously it's ID
//showCapturePhoto is false on raspberry to not use camera
PersonAddModifyWindow (Gtk.Window parent, Session currentSession, Person currentPerson, bool showCapturePhoto)
//PersonAddModifyWindow (Gtk.Window parent, Session currentSession, Person currentPerson, bool showCapturePhoto)
PersonAddModifyWindow (Gtk.Window parent, Session currentSession, Person currentPerson)
{
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_win.glade", "person_win", null);
......@@ -929,10 +930,10 @@ public class PersonAddModifyWindow
image_photo_preview.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_photo_preview.png");
image_photo_do.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_photo_do.png");
if(UtilAll.GetOSEnum() == UtilAll.OperatingSystems.LINUX)
//if(UtilAll.GetOSEnum() == UtilAll.OperatingSystems.LINUX)
hbox_camera.Visible = true;
else
hbox_camera.Visible = showCapturePhoto;
//else
// hbox_camera.Visible = showCapturePhoto;
//delete a -1.png or -1.jpg added before on a new user where "accept" button was not pressed and window was closed
deleteOldPhotosIfAny(-1);
......@@ -1221,11 +1222,13 @@ public class PersonAddModifyWindow
static public PersonAddModifyWindow Show (Gtk.Window parent,
Session mySession, Person currentPerson, int pDN,
Gtk.CheckButton app1_checkbutton_video, bool showCapturePhoto,
//Gtk.CheckButton app1_checkbutton_video, bool showCapturePhoto,
Gtk.CheckButton app1_checkbutton_video,
string videoDevice)
{
if (PersonAddModifyWindowBox == null) {
PersonAddModifyWindowBox = new PersonAddModifyWindow (parent, mySession, currentPerson, showCapturePhoto);
//PersonAddModifyWindowBox = new PersonAddModifyWindow (parent, mySession, currentPerson, showCapturePhoto);
PersonAddModifyWindowBox = new PersonAddModifyWindow (parent, mySession, currentPerson);
}
PersonAddModifyWindowBox.pDN = pDN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment