[chronojump] gui change (cont)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] gui change (cont)
- Date: Thu, 17 Mar 2011 19:43:11 +0000 (UTC)
commit 1fdcc1e1c3fdcd073898cea7c8120015322dd0fd
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Mar 17 20:42:15 2011 +0100
gui change (cont)
glade/chronojump.glade | 515 ++++++++++++++++++++++++++++++------------------
src/gui/chronojump.cs | 76 ++++----
src/gui/person.cs | 1 +
3 files changed, 365 insertions(+), 227 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 0cc0e94..18bf3c8 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -5916,8 +5916,6 @@ suitable for agility tests)</property>
<child>
<widget class="GtkTreeView" id="treeview_person_show_all_events">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
<property name="headers_clickable">False</property>
</widget>
</child>
@@ -17244,133 +17242,6 @@ by you</property>
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="menu_persons">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Person</property>
- <property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="menu_persons_menu">
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_person_add_single">
- <property name="label" translatable="yes">New person</property>
- <property name="visible">True</property>
- <property name="use_stock">False</property>
- <signal name="activate" handler="on_person_add_single_activate"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image43">
- <property name="visible">True</property>
- <property name="stock">gtk-new</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_person_add_multiple">
- <property name="label" translatable="yes">New persons (multiple)</property>
- <property name="visible">True</property>
- <property name="use_stock">False</property>
- <signal name="activate" handler="on_person_add_multiple_activate"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image13">
- <property name="visible">True</property>
- <property name="stock">gtk-new</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkSeparatorMenuItem" id="separador11">
- <property name="visible">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_recuperate_person">
- <property name="label" translatable="yes">Load person</property>
- <property name="visible">True</property>
- <property name="use_stock">False</property>
- <signal name="activate" handler="on_recuperate_person_activate"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image20">
- <property name="visible">True</property>
- <property name="stock">gtk-open</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_recuperate_persons_from_session">
- <property name="label" translatable="yes">Load persons from other session</property>
- <property name="visible">True</property>
- <property name="use_stock">False</property>
- <signal name="activate" handler="on_recuperate_persons_from_session_activate"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image14">
- <property name="visible">True</property>
- <property name="stock">gtk-open</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkSeparatorMenuItem" id="separador9">
- <property name="visible">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_edit_current_person">
- <property name="label" translatable="yes">_Edit current person</property>
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">False</property>
- <signal name="activate" handler="on_edit_current_person_clicked"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image15">
- <property name="visible">True</property>
- <property name="stock">gtk-edit</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_show_all_person_events">
- <property name="label" translatable="yes">_Show all tests of current person</property>
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">False</property>
- <signal name="activate" handler="on_show_all_person_events_activate"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image16">
- <property name="visible">True</property>
- <property name="stock">gtk-find</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkSeparatorMenuItem" id="separador12">
- <property name="visible">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="menuitem_delete_current_person_from_session">
- <property name="label" translatable="yes">_Delete current person from this session</property>
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">False</property>
- <signal name="activate" handler="on_delete_current_person_from_session_activate"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image17">
- <property name="visible">True</property>
- <property name="stock">gtk-delete</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
<widget class="GtkMenuItem" id="menu_jumps">
<property name="visible">True</property>
<property name="label" translatable="yes">_Jump</property>
@@ -18368,7 +18239,7 @@ by you</property>
<widget class="GtkHBox" id="hbox126">
<property name="visible">True</property>
<child>
- <widget class="GtkButton" id="button_create_per">
+ <widget class="GtkButton" id="button_person_add_single">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -18389,17 +18260,18 @@ by you</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_recup_per">
+ <widget class="GtkButton" id="button_person_add_multiple">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">Load person</property>
- <signal name="clicked" handler="on_recuperate_person_activate"/>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">New person</property>
+ <signal name="clicked" handler="on_person_add_multiple_clicked"/>
<child>
- <widget class="GtkImage" id="image1471">
+ <widget class="GtkImage" id="image15">
<property name="visible">True</property>
- <property name="stock">gtk-open</property>
+ <property name="stock">gtk-new</property>
</widget>
</child>
</widget>
@@ -18410,17 +18282,18 @@ by you</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_edit_current_person">
+ <widget class="GtkButton" id="button_recuperate_person">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">Edit selected person (p)</property>
- <signal name="clicked" handler="on_edit_current_person_clicked"/>
- <accelerator key="p" signal="clicked"/>
+ <property name="can_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Load person</property>
+ <signal name="clicked" handler="on_recuperate_person_clicked"/>
<child>
- <widget class="GtkImage" id="image1977">
+ <widget class="GtkImage" id="image1471">
<property name="visible">True</property>
- <property name="stock">gtk-edit</property>
+ <property name="stock">gtk-open</property>
</widget>
</child>
</widget>
@@ -18431,16 +18304,18 @@ by you</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_show_all_person_events">
+ <widget class="GtkButton" id="button_recuperate_persons_from_session">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">show all tests of this person</property>
- <signal name="clicked" handler="on_show_all_person_events_activate"/>
+ <property name="can_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Load person</property>
+ <signal name="clicked" handler="on_recuperate_persons_from_session_clicked"/>
<child>
- <widget class="GtkImage" id="image1188">
+ <widget class="GtkImage" id="image16">
<property name="visible">True</property>
- <property name="stock">gtk-dialog-info</property>
+ <property name="stock">gtk-open</property>
</widget>
</child>
</widget>
@@ -18478,70 +18353,122 @@ by you</property>
</packing>
</child>
<child>
- <widget class="GtkEventBox" id="eventbox_image_test">
+ <widget class="GtkVBox" id="vbox12">
<property name="visible">True</property>
<child>
- <widget class="GtkVBox" id="vbox_image_test">
+ <widget class="GtkVBox" id="vbox13">
<property name="visible">True</property>
<child>
- <widget class="GtkHBox" id="hbox_image_test">
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Current person</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_current_person">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">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">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox16">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkButton" id="button_edit_current_person">
<property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Edit selected person (p)</property>
+ <signal name="clicked" handler="on_edit_current_person_clicked"/>
+ <accelerator key="p" signal="clicked"/>
<child>
- <widget class="GtkLabel" id="label_image_test">
+ <widget class="GtkImage" id="image1977">
<property name="visible">True</property>
- <property name="use_markup">True</property>
- <property name="ellipsize">end</property>
- <property name="width_chars">15</property>
+ <property name="stock">gtk-edit</property>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</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_show_all_person_events">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">show all tests of this person</property>
+ <signal name="clicked" handler="on_show_all_person_events_activate"/>
<child>
- <widget class="GtkAlignment" id="alignment106">
+ <widget class="GtkImage" id="image1188">
<property name="visible">True</property>
- <property name="xalign">1</property>
- <child>
- <widget class="GtkButton" id="button_image_test_zoom">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="on_button_image_test_zoom_clicked"/>
- <child>
- <widget class="GtkImage" id="image_test_zoom">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- </child>
+ <property name="stock">gtk-dialog-info</property>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkImage" id="image_test">
+ <widget class="GtkButton" id="button_delete_current_person">
<property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">New person</property>
+ <signal name="clicked" handler="on_delete_current_person_from_session_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image53">
+ <property name="visible">True</property>
+ <property name="stock">gtk-remove</property>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="position">1</property>
+ <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="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
@@ -20240,9 +20167,212 @@ Chronopic</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label8">
+ <widget class="GtkTable" id="table3">
<property name="visible">True</property>
- <property name="label" translatable="yes">a</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="left_padding">6</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Options</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEventBox" id="eventbox_image_test">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox_image_test">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkHBox" id="hbox_image_test">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label_image_test">
+ <property name="visible">True</property>
+ <property name="use_markup">True</property>
+ <property name="ellipsize">end</property>
+ <property name="width_chars">15</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment106">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <child>
+ <widget class="GtkButton" id="button_image_test_zoom">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_button_image_test_zoom_clicked"/>
+ <child>
+ <widget class="GtkImage" id="image_test_zoom">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage" id="image_test">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox11">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkHBox" id="hbox14">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="label">chronopic info</property>
+ </widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="label">button
+chronopic
+window</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="label">button execute test
+(auto clicked if no options)</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox15">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="label">progressbars</property>
+ </widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="label">control
+of execution</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="label">barplot of
+the test done</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label">data of
+the test done</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="position">1</property>
@@ -21741,7 +21871,13 @@ Chronopic</property>
<child>
<widget class="GtkLabel" id="label10">
<property name="visible">True</property>
- <property name="label" translatable="yes">c</property>
+ <property name="label">pending
+stats window
+will be here
+except for:
+-reaction times
+-pulses
+-multiChronopic</property>
</widget>
<packing>
<property name="position">2</property>
@@ -21761,7 +21897,8 @@ Chronopic</property>
<child>
<widget class="GtkLabel" id="label11">
<property name="visible">True</property>
- <property name="label" translatable="yes">d</property>
+ <property name="label">pending
+Here it will be server stuff</property>
</widget>
<packing>
<property name="position">3</property>
@@ -21770,7 +21907,7 @@ Chronopic</property>
<child>
<widget class="GtkLabel" id="label_server">
<property name="visible">True</property>
- <property name="label" translatable="yes">Server</property>
+ <property name="label">Server</property>
</widget>
<packing>
<property name="position">3</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 361ce77..dab8b4f 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -86,7 +86,6 @@ public class ChronoJumpWindow
[Widget] Gtk.ComboBox combo_pulses;
//menus
- [Widget] Gtk.MenuItem menu_persons;
[Widget] Gtk.MenuItem menu_jumps;
[Widget] Gtk.MenuItem menu_runs;
[Widget] Gtk.MenuItem menu_other;
@@ -99,15 +98,10 @@ public class ChronoJumpWindow
[Widget] Gtk.MenuItem menuitem_export_xml;
//menu person
- [Widget] Gtk.MenuItem menuitem_person_add_single;
- [Widget] Gtk.MenuItem menuitem_person_add_multiple;
- [Widget] Gtk.MenuItem menuitem_recuperate_person;
- [Widget] Gtk.MenuItem menuitem_recuperate_persons_from_session;
- [Widget] Gtk.MenuItem menuitem_edit_current_person;
- [Widget] Gtk.MenuItem menuitem_show_all_person_events;
- [Widget] Gtk.MenuItem menuitem_delete_current_person_from_session;
[Widget] Gtk.Button button_edit_current_person;
[Widget] Gtk.Button button_show_all_person_events;
+ [Widget] Gtk.Button button_delete_current_person;
+ [Widget] Gtk.Label label_current_person;
//tests
//jumps
@@ -223,8 +217,10 @@ public class ChronoJumpWindow
[Widget] Gtk.Button button_new;
[Widget] Gtk.Button button_open;
[Widget] Gtk.Frame frame_persons;
- [Widget] Gtk.Button button_recup_per;
- [Widget] Gtk.Button button_create_per;
+ [Widget] Gtk.Button button_recuperate_person;
+ [Widget] Gtk.Button button_recuperate_persons_from_session;
+ [Widget] Gtk.Button button_person_add_single;
+ [Widget] Gtk.Button button_person_add_multiple;
[Widget] Gtk.Button button_free;
[Widget] Gtk.Button button_sj;
@@ -890,6 +886,8 @@ public 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;
return true;
} else {
return false;
@@ -912,6 +910,8 @@ public 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;
}
}
@@ -931,7 +931,7 @@ public class ChronoJumpWindow
myMenu.Attach( mySep, 0, 1, 2, 3 );
myItem = new MenuItem ( string.Format(Catalog.GetString("Delete {0} from this session"),myPerson.Name));
- myItem.Activated += on_delete_current_person_from_session_activate;
+ myItem.Activated += on_delete_current_person_from_session_clicked;
myMenu.Attach( myItem, 0, 1, 3, 4 );
myMenu.Popup();
@@ -2050,10 +2050,8 @@ public class ChronoJumpWindow
//for sure, jumpsExists is false, because we create a new session
button_edit_current_person.Sensitive = false;
- menuitem_edit_current_person.Sensitive = false;
- menuitem_delete_current_person_from_session.Sensitive = false;
button_show_all_person_events.Sensitive = false;
- menuitem_show_all_person_events.Sensitive = false;
+ button_delete_current_person.Sensitive = false;
//update report
report.SessionID = currentSession.UniqueID;
@@ -2115,10 +2113,8 @@ public class ChronoJumpWindow
definedSession = true;
button_edit_current_person.Sensitive = false;
- menuitem_edit_current_person.Sensitive = false;
- menuitem_delete_current_person_from_session.Sensitive = false;
button_show_all_person_events.Sensitive = false;
- menuitem_show_all_person_events.Sensitive = false;
+ button_delete_current_person.Sensitive = false;
//if there are persons
if(foundPersons) {
@@ -2168,7 +2164,7 @@ public class ChronoJumpWindow
* --------------------------------------------------------
*/
- private void on_recuperate_person_activate (object o, EventArgs args) {
+ private void on_recuperate_person_clicked (object o, EventArgs args) {
Log.WriteLine("recuperate person");
personRecuperateWin = PersonRecuperateWindow.Show(app1, currentSession, prefsDigitsNumber);
personRecuperateWin.FakeButtonDone.Clicked += new EventHandler(on_recuperate_person_accepted);
@@ -2177,6 +2173,8 @@ public class ChronoJumpWindow
private void on_recuperate_person_accepted (object o, EventArgs args) {
currentPerson = personRecuperateWin.CurrentPerson;
currentPersonSession = SqlitePersonSession.Select(currentPerson.UniqueID, currentSession.UniqueID);
+ label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
+ label_current_person.UseMarkup = true;
myTreeViewPersons.Add(currentPerson.UniqueID.ToString(), currentPerson.Name);
@@ -2189,7 +2187,7 @@ public class ChronoJumpWindow
}
}
- private void on_recuperate_persons_from_session_activate (object o, EventArgs args) {
+ private void on_recuperate_persons_from_session_clicked (object o, EventArgs args) {
Log.WriteLine("recuperate persons from other session");
personsRecuperateFromOtherSessionWin = PersonsRecuperateFromOtherSessionWindow.Show(app1, currentSession);
personsRecuperateFromOtherSessionWin.FakeButtonDone.Clicked += new EventHandler(on_recuperate_persons_from_session_accepted);
@@ -2198,6 +2196,9 @@ public class ChronoJumpWindow
private void on_recuperate_persons_from_session_accepted (object o, EventArgs args) {
currentPerson = personsRecuperateFromOtherSessionWin.CurrentPerson;
currentPersonSession = SqlitePersonSession.Select(currentPerson.UniqueID, currentSession.UniqueID);
+ label_current_person.Text = "<b>" + currentPerson.Name + "</b>";
+ label_current_person.UseMarkup = true;
+
treeview_persons_storeReset();
fillTreeView_persons();
int rowToSelect = findRowOfCurrentPerson(treeview_persons, treeview_persons_store, currentPerson);
@@ -2224,6 +2225,8 @@ public 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;
myTreeViewPersons.Add(currentPerson.UniqueID.ToString(), currentPerson.Name);
//when adding new person, photos cannot be recorded as currentPerson.UniqueID
@@ -2247,7 +2250,7 @@ public class ChronoJumpWindow
}
//show spinbutton window asking for how many people to create
- private void on_person_add_multiple_activate (object o, EventArgs args) {
+ private void on_person_add_multiple_clicked (object o, EventArgs args) {
genericWin = GenericWindow.Show(Catalog.GetString("Select number of persons to add"), Constants.GenericWindowShow.SPININT);
genericWin.SetSpinRange(1.0, 40.0);
genericWin.Button_accept.Clicked += new EventHandler(on_person_add_multiple_prepared);
@@ -2264,6 +2267,8 @@ public 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;
treeview_persons_storeReset();
fillTreeView_persons();
int rowToSelect = findRowOfCurrentPerson(treeview_persons, treeview_persons_store, currentPerson);
@@ -2292,6 +2297,8 @@ public 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;
treeview_persons_storeReset();
fillTreeView_persons();
@@ -2323,7 +2330,7 @@ public class ChronoJumpWindow
}
- private void on_delete_current_person_from_session_activate (object o, EventArgs args) {
+ private void on_delete_current_person_from_session_clicked (object o, EventArgs args) {
Log.WriteLine("delete current person from this session");
ConfirmWindow confirmWin = ConfirmWindow.Show(
Catalog.GetString("Are you sure you want to delete the current person and all his/her tests (jumps, runs, pulses, ...) from this session?\n(His/her personal data and tests in other sessions will remain intact)"), "",
@@ -5144,21 +5151,11 @@ Console.WriteLine("X");
//menuitem_export_xml.Sensitive = option; not implemented yet
}
- private void menuPersonSensitive(bool option)
- {
- menuitem_person_add_single.Sensitive = option;
- menuitem_person_add_multiple.Sensitive = option;
- menuitem_recuperate_person.Sensitive = option;
- menuitem_recuperate_persons_from_session.Sensitive = option;
- }
-
private void menuPersonSelectedSensitive(bool option)
{
- menuitem_edit_current_person.Sensitive = option;
- menuitem_show_all_person_events.Sensitive = option;
- menuitem_delete_current_person_from_session.Sensitive = option;
button_edit_current_person.Sensitive = option;
button_show_all_person_events.Sensitive = option;
+ button_delete_current_person.Sensitive = option;
}
private void menuJumpsSensitive(bool option)
@@ -5213,7 +5210,6 @@ Console.WriteLine("X");
//menuitems
menuSessionSensitive(false);
- menuPersonSensitive(false);
menuPersonSelectedSensitive(false);
menuJumpsSensitive(false);
menuRunsSensitive(false);
@@ -5222,9 +5218,12 @@ Console.WriteLine("X");
vbox_image_test.Sensitive = false;
frame_persons.Sensitive = false;
- button_recup_per.Sensitive = false;
- button_create_per.Sensitive = false;
+ button_recuperate_person.Sensitive = false;
+ button_recuperate_persons_from_session.Sensitive = false;
+ button_person_add_single.Sensitive = false;
+ button_person_add_multiple.Sensitive = false;
button_edit_current_person.Sensitive = false;
+ button_delete_current_person.Sensitive = false;
//notebooks
notebook_execute.Sensitive = false;
@@ -5239,11 +5238,12 @@ Console.WriteLine("X");
private void sensitiveGuiYesSession () {
vbox_image_test.Sensitive = true;
frame_persons.Sensitive = true;
- button_recup_per.Sensitive = true;
- button_create_per.Sensitive = true;
+ button_recuperate_person.Sensitive = true;
+ button_recuperate_persons_from_session.Sensitive = true;
+ button_person_add_single.Sensitive = true;
+ button_person_add_multiple.Sensitive = true;
menuSessionSensitive(true);
- menuPersonSensitive(true);
menuToolsSensitive(true);
changeTestImage("", "", "LOGO");
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 80be205..a4b966f 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -326,6 +326,7 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
//put an icon to window
UtilGtk.IconWindow(person_recuperate);
+ person_recuperate.Title = Catalog.GetString("Load persons from other session");
//this class doesn't allow to search by name
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]