[chronojump] New config: EncoderNameAndCapture
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] New config: EncoderNameAndCapture
- Date: Tue, 16 Jun 2015 15:04:48 +0000 (UTC)
commit 3c7777dbd9979411099e202585f28341a045aaa8
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jun 16 17:04:12 2015 +0200
New config: EncoderNameAndCapture
glade/chronojump.glade | 151 ++++++++++++++++++++++++++++++++++++++++++++++++
src/config.cs | 5 ++
src/gui/chronojump.cs | 28 +++++-----
src/gui/networks.cs | 12 ++++
4 files changed, 182 insertions(+), 14 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index bd33a28..541a9b8 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -7985,6 +7985,12 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -8991,6 +8997,12 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
<child>
@@ -10249,6 +10261,12 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">2</property>
@@ -11148,6 +11166,12 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -15348,6 +15372,43 @@ on current Chronojump version.</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox_encoder_person">
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
+ <widget class="GtkLabel" id="label_encoder_person_name">
+ <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="GtkButton"
id="button_encoder_person_change">
+ <property name="label"
translatable="yes">Change</property>
+ <property name="width_request">80</property>
+ <property name="height_request">40</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</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">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -22391,6 +22452,12 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -23195,6 +23262,12 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -24491,6 +24564,12 @@ by you</property>
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkButton" id="button_video_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -24844,6 +24923,12 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -35435,6 +35520,42 @@ options</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -37619,6 +37740,12 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -38461,6 +38588,12 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -41293,6 +41426,12 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -41761,6 +41900,12 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -42244,6 +42389,12 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/config.cs b/src/config.cs
index 34c9db3..e5003e8 100644
--- a/src/config.cs
+++ b/src/config.cs
@@ -32,6 +32,7 @@ public class Config
public bool UseVideo;
public AutodetectPortEnum AutodetectPort;
public bool OnlyEncoder;
+ public bool EncoderNameAndCapture;
public EncoderConfiguration Econf;
public SessionModeEnum SessionMode;
public string RunScriptOnExit;
@@ -43,6 +44,7 @@ public class Config
UseVideo = true;
AutodetectPort = AutodetectPortEnum.ACTIVE;
OnlyEncoder = false;
+ EncoderNameAndCapture = false;
Econf = null;
SessionMode = SessionModeEnum.STANDARD;
RunScriptOnExit = "";
@@ -78,6 +80,8 @@ public class Config
Enum.Parse(typeof(AutodetectPortEnum), parts[1]);
else if(parts[0] == "OnlyEncoder" && Util.StringToBool(parts[1]))
OnlyEncoder = true;
+ else if(parts[0] == "EncoderNameAndCapture" &&
Util.StringToBool(parts[1]))
+ EncoderNameAndCapture = true;
else if(parts[0] == "EncoderConfiguration")
{
string [] ecFull = parts[1].Split(new char[] {':'});
@@ -113,6 +117,7 @@ public class Config
"UseVideo = " + UseVideo.ToString() + "\n" +
"AutodetectPort = " + AutodetectPort.ToString() + "\n" +
"OnlyEncoder = " + OnlyEncoder.ToString() + "\n" +
+ "EncoderNameAndCapture = " + EncoderNameAndCapture.ToString() + "\n" +
"Econf = " + econfStr + "\n" +
"SessionMode = " + SessionMode.ToString() + "\n" +
"RunScriptOnExit = " + RunScriptOnExit.ToString() + "\n"
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 3908510..919555f 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -1091,14 +1091,20 @@ public partial class ChronoJumpWindow
string selectedID = (string) model.GetValue (iter, 0); //ID, Name
currentPerson = SqlitePerson.Select(Convert.ToInt32(selectedID));
currentPersonSession = SqlitePersonSession.Select(Convert.ToInt32(selectedID),
currentSession.UniqueID);
- label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
- label_current_person.UseMarkup = true;
+ label_person_change();
return true;
} else {
return false;
}
}
+
+ void label_person_change() {
+ label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
+ label_current_person.UseMarkup = true;
+ label_encoder_person_name.Text = "<b>" + currentPerson.Name + "</b>";
+ label_encoder_person_name.UseMarkup = true;
+ }
private void treeview_persons_storeReset() {
myTreeViewPersons.RemoveColumns();
@@ -1116,8 +1122,7 @@ public partial class ChronoJumpWindow
currentPerson = SqlitePerson.Select(Convert.ToInt32(selectedID));
currentPersonSession = SqlitePersonSession.Select(Convert.ToInt32(selectedID),
currentSession.UniqueID);
- label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
- label_current_person.UseMarkup = true;
+ label_person_change();
encoderPersonChanged();
}
@@ -2584,8 +2589,7 @@ public partial class ChronoJumpWindow
LogB.Information("here!!!");
currentPerson = personRecuperateWin.CurrentPerson;
currentPersonSession = personRecuperateWin.CurrentPersonSession;
- label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
- label_current_person.UseMarkup = true;
+ label_person_change();
myTreeViewPersons.Add(currentPerson.UniqueID.ToString(), currentPerson.Name);
@@ -2607,8 +2611,7 @@ public partial class ChronoJumpWindow
private void on_recuperate_persons_from_session_accepted (object o, EventArgs args) {
currentPerson = personsRecuperateFromOtherSessionWin.CurrentPerson;
currentPersonSession = personsRecuperateFromOtherSessionWin.CurrentPersonSession;
- label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
- label_current_person.UseMarkup = true;
+ label_person_change();
treeview_persons_storeReset();
fillTreeView_persons();
@@ -2637,8 +2640,7 @@ public partial class ChronoJumpWindow
{
currentPerson = personAddModifyWin.CurrentPerson;
currentPersonSession = SqlitePersonSession.Select(currentPerson.UniqueID,
currentSession.UniqueID);
- label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
- label_current_person.UseMarkup = true;
+ label_person_change();
myTreeViewPersons.Add(currentPerson.UniqueID.ToString(), currentPerson.Name);
//when adding new person, photos cannot be recorded as currentPerson.UniqueID
@@ -2682,8 +2684,7 @@ public partial class ChronoJumpWindow
{
currentPerson = personAddMultipleWin.CurrentPerson;
currentPersonSession = SqlitePersonSession.Select(currentPerson.UniqueID,
currentSession.UniqueID);
- label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
- label_current_person.UseMarkup = true;
+ label_person_change();
treeview_persons_storeReset();
fillTreeView_persons();
int rowToSelect = myTreeViewPersons.FindRow(currentPerson.UniqueID);
@@ -2718,8 +2719,7 @@ public partial class ChronoJumpWindow
{
currentPerson = personAddModifyWin.CurrentPerson;
currentPersonSession = SqlitePersonSession.Select(currentPerson.UniqueID,
currentSession.UniqueID);
- label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
- label_current_person.UseMarkup = true;
+ label_person_change();
treeview_persons_storeReset();
fillTreeView_persons();
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 0b7c956..33fa7d9 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -38,6 +38,12 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Entry entry_raspberry_extra_weight;
[Widget] Gtk.Box hbox_encoder_capture_extra_mass_no_raspberry;
[Widget] Gtk.Box hbox_encoder_capture_extra_mass_raspberry;
+
+ //config.EncoderNameAndCapture
+ [Widget] Gtk.Box hbox_encoder_person;
+ [Widget] Gtk.Label label_encoder_person_name;
+ [Widget] Gtk.Button button_encoder_person_change;
+
private bool useVideo = true;
private Config.AutodetectPortEnum configAutodetectPort = Config.AutodetectPortEnum.ACTIVE;
@@ -70,6 +76,12 @@ public partial class ChronoJumpWindow
if(config.OnlyEncoder)
select_menuitem_mode_toggled(menuitem_modes.POWER);
+ if(config.EncoderNameAndCapture) {
+ vbox_persons.Visible = false;
+ hbox_encoder_sup_capture_analyze_two_buttons.Visible = false;
+ hbox_encoder_person.Visible = true;
+ }
+
if(config.Econf != null) {
encoderConfigurationCurrent = config.Econf;
encoderConfigurationGUIUpdate();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]