Commit 276d7c0f authored by Xavier de Blas's avatar Xavier de Blas

person show all events allow select others (lateral view) or not (top view)

parent 5a12372f
......@@ -38,12 +38,12 @@
<widget class="GtkHBox" id="hbox105">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<property name="spacing">10</property>
<child>
<widget class="GtkLabel" id="label166">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Person</property>
<property name="label" translatable="yes">Person:</property>
</widget>
<packing>
<property name="expand">False</property>
......@@ -65,6 +65,18 @@
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label_person_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</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>
......
......@@ -2783,7 +2783,7 @@ public partial class ChronoJumpWindow
private void on_show_all_person_events_activate (object o, EventArgs args) {
PersonShowAllEventsWindow.Show(app1, currentSession.UniqueID, currentPerson);
PersonShowAllEventsWindow.Show(app1, currentSession.UniqueID, currentPerson, true);
}
......@@ -2860,7 +2860,7 @@ public partial class ChronoJumpWindow
private void on_button_top_person_show_all_events (object o, EventArgs args)
{
Person thisPerson = personSelectWin.SelectedPerson;
PersonShowAllEventsWindow.Show(app1, currentSession.UniqueID, thisPerson);
PersonShowAllEventsWindow.Show(app1, currentSession.UniqueID, thisPerson, false);
}
private void on_button_top_person_delete_person(object o, EventArgs args)
{
......
......@@ -2491,24 +2491,27 @@ public class PersonAddMultipleWindow {
}
//show all events (jumps and runs) of a person in different sessions
public class PersonShowAllEventsWindow {
public class PersonShowAllEventsWindow
{
[Widget] Gtk.Window person_show_all_events;
[Widget] Gtk.CheckButton checkbutton_only_current_session;
TreeStore store;
[Widget] Gtk.Label label_person;
[Widget] Gtk.TreeView treeview_person_show_all_events;
[Widget] Gtk.Box hbox_combo_persons;
[Widget] Gtk.ComboBox combo_persons;
TreeStore store;
static PersonShowAllEventsWindow PersonShowAllEventsWindowBox;
protected int sessionID;
protected Person currentPerson;
PersonShowAllEventsWindow (Gtk.Window parent, int sessionID, Person currentPerson) {
PersonShowAllEventsWindow (Gtk.Window parent, int sessionID, Person currentPerson)
{
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_show_all_events.glade", "person_show_all_events", "chronojump");
gladeXML.Autoconnect(this);
......@@ -2519,7 +2522,8 @@ public class PersonShowAllEventsWindow {
person_show_all_events.Parent = parent;
this.sessionID = sessionID;
this.currentPerson = currentPerson;
label_person.Text = currentPerson.Name;
createComboPersons(sessionID, currentPerson.UniqueID.ToString(), currentPerson.Name);
createTreeView(treeview_person_show_all_events);
store = new TreeStore( typeof (string), typeof (string), typeof (string), typeof (string),
......@@ -2529,11 +2533,23 @@ public class PersonShowAllEventsWindow {
fillTreeView(treeview_person_show_all_events,store, currentPerson.UniqueID);
}
static public PersonShowAllEventsWindow Show (Gtk.Window parent, int sessionID, Person currentPerson)
static public PersonShowAllEventsWindow Show (Gtk.Window parent, int sessionID, Person currentPerson, bool allowChangePerson)
{
if (PersonShowAllEventsWindowBox == null) {
PersonShowAllEventsWindowBox = new PersonShowAllEventsWindow (parent, sessionID, currentPerson);
}
if(allowChangePerson)
{
PersonShowAllEventsWindowBox.checkbutton_only_current_session.Visible = true;
PersonShowAllEventsWindowBox.hbox_combo_persons.Visible = true;
PersonShowAllEventsWindowBox.label_person.Visible = false;
} else {
PersonShowAllEventsWindowBox.checkbutton_only_current_session.Visible = false;
PersonShowAllEventsWindowBox.hbox_combo_persons.Visible = false;
PersonShowAllEventsWindowBox.label_person.Visible = true;
}
PersonShowAllEventsWindowBox.person_show_all_events.Show ();
return PersonShowAllEventsWindowBox;
......
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