[chronojump] person show all events allow select others (lateral view) or not (top view)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] person show all events allow select others (lateral view) or not (top view)
- Date: Tue, 20 Feb 2018 12:11:36 +0000 (UTC)
commit 276d7c0ffa79b5bcb22da32fb41c2ca09d0a0114
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Feb 20 13:10:53 2018 +0100
person show all events allow select others (lateral view) or not (top view)
glade/person_show_all_events.glade | 16 ++++++++++++++--
src/gui/chronojump.cs | 4 ++--
src/gui/person.cs | 32 ++++++++++++++++++++++++--------
3 files changed, 40 insertions(+), 12 deletions(-)
---
diff --git a/glade/person_show_all_events.glade b/glade/person_show_all_events.glade
index cb550d8..4190e44 100644
--- a/glade/person_show_all_events.glade
+++ b/glade/person_show_all_events.glade
@@ -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>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 35a4719..24929da 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -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)
{
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 8da8f4a..47e18dd 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]