[chronojump] Session add/edit on main window
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Session add/edit on main window
- Date: Wed, 15 Apr 2020 09:13:01 +0000 (UTC)
commit f0975817498a2733ec6ad44b067c4b9f72506dc3
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Apr 15 11:11:45 2020 +0200
Session add/edit on main window
glade/app1.glade | 816 +++++++++++++++++++++++++++++++++-
glade/session_add_edit.glade | 628 --------------------------
po/POTFILES.in | 3 +-
src/Makefile.am | 3 +-
src/gui/app1/chronojump.cs | 111 ++---
src/gui/app1/session/loadAndImport.cs | 11 -
src/gui/app1/session/main.cs | 12 +
src/gui/session/addEdit.cs | 690 ----------------------------
8 files changed, 876 insertions(+), 1398 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 3687ec89..08861a5a 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -24912,6 +24912,12 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -35006,6 +35012,12 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -36616,7 +36628,8 @@ then click this button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="label_yalign">1</property>
+ <property name="shadow_type">in</property>
<child>
<widget class="GtkViewport" id="viewport9">
<property name="visible">True</property>
@@ -37261,7 +37274,8 @@ then click this button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="label_yalign">1</property>
+ <property name="shadow_type">in</property>
<child>
<widget class="GtkViewport" id="viewport10">
<property name="visible">True</property>
@@ -37601,6 +37615,804 @@ then click this button.</property>
<property name="type">tab</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox_session_add_edit">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkVBox" id="vbox108">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkVBox" id="vbox205">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">30</property>
+ <child>
+ <widget class="GtkFrame" id="frame18">
+ <property name="width_request">500</property>
+ <property name="height_request">450</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">1</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <widget class="GtkViewport" id="viewport11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">4</property>
+ <child>
+ <widget class="GtkVBox" id="vbox206">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">20</property>
+ <property name="spacing">30</property>
+ <child>
+ <widget class="GtkNotebook" id="notebook3">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tab_hborder">10</property>
+ <property name="tab_vborder">4</property>
+ <child>
+ <widget class="GtkVBox" id="vbox207">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkTable" id="table13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">8</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <widget class="GtkLabel" id="app1sae_label_name">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"
translatable="yes">Name</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label501">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"
translatable="yes">Place</property>
+ </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"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="app1sae_entry_name">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property
name="activates_default">True</property>
+ <property
name="invisible_char_set">True</property>
+ <property
name="primary_icon_activatable">False</property>
+ <property
name="secondary_icon_activatable">False</property>
+ <property
name="primary_icon_sensitive">True</property>
+ <property
name="secondary_icon_sensitive">True</property>
+ <signal name="changed"
handler="app1sae_on_entries_required_changed" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry"
id="app1sae_entry_place">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property
name="activates_default">True</property>
+ <property
name="invisible_char_set">True</property>
+ <property
name="primary_icon_activatable">False</property>
+ <property
name="secondary_icon_activatable">False</property>
+ <property
name="primary_icon_sensitive">True</property>
+ <property
name="secondary_icon_sensitive">True</property>
+ <signal name="changed"
handler="app1sae_on_entry_place_changed" swapped="no"/>
+ </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>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label504">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"
translatable="yes">Date</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox374">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">4</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="app1sae_label_date">
+ <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="app1sae_button_change_date">
+ <property name="label"
translatable="yes">change</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked"
handler="app1sae_on_button_change_date_clicked" swapped="no"/>
+ </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="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</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="hbox404">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkLabel" id="label507">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label"
translatable="yes">Comments</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow"
id="scrolledwindow13">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="hscrollbar_policy">automatic</property>
+ <property
name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <widget class="GtkTextView"
id="app1sae_textview_comments">
+ <property name="height_request">60</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label508">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Session data</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow"
id="scrolledwindow14">
+ <property name="height_request">0</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="hscrollbar_policy">automatic</property>
+ <property
name="vscrollbar_policy">automatic</property>
+ <child>
+ <widget class="GtkViewport" id="viewport12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkVBox" id="vbox210">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">20</property>
+ <child>
+ <widget class="GtkVBox" id="vbox209">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkHBox" id="hbox389">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkLabel" id="label505">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label"
translatable="yes">Sport</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="app1sae_radiobutton_diff_sports">
+ <property name="label"
translatable="yes">Different sports</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="app1sae_on_radiobutton_sports_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="app1sae_radiobutton_same_sport">
+ <property name="label" translatable="yes">All
the same</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property
name="group">app1sae_radiobutton_diff_sports</property>
+ <signal name="toggled"
handler="app1sae_on_radiobutton_sports_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="app1sae_hbox_sports">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkImage"
id="image_sport_undefined">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-no</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="app1sae_hbox_combo_sports">
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="app1sae_button_sport_add">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="tooltip" translatable="yes">Add
new sport</property>
+ <signal name="clicked"
handler="app1sae_on_button_sport_add_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkImage" id="image2988">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-add</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</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="GtkVBox"
id="app1sae_vbox_speciallity">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkHBox" id="hbox394">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkLabel"
id="app1sae_label_speciallity">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label"
translatable="yes">Specialty</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="app1sae_radiobutton_diff_speciallities">
+ <property name="label"
translatable="yes">Different specialties</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="app1sae_on_radiobutton_speciallities_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="app1sae_radiobutton_same_speciallity">
+ <property name="label" translatable="yes">All
the same</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property
name="group">app1sae_radiobutton_diff_speciallities</property>
+ <signal name="toggled"
handler="app1sae_on_radiobutton_speciallities_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="app1sae_hbox_speciallities">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkImage"
id="image_speciallity_undefined">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-no</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="app1sae_hbox_combo_speciallities">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="app1sae_vbox_level">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkHBox" id="hbox402">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkLabel"
id="app1sae_label_level">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label"
translatable="yes">Level</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="app1sae_radiobutton_diff_levels">
+ <property name="label"
translatable="yes">Different levels</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="app1sae_on_radiobutton_levels_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="app1sae_radiobutton_same_level">
+ <property name="label" translatable="yes">All
the same</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property
name="group">app1sae_radiobutton_diff_levels</property>
+ <signal name="toggled"
handler="app1sae_on_radiobutton_levels_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="app1sae_hbox_levels">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkImage"
id="image_level_undefined">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-no</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="app1sae_hbox_combo_levels">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</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>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label509">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Person's data</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHButtonBox"
id="app1sae_hbuttonbox_delete_accept_cancel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
+ <widget class="GtkButton"
id="app1sae_button_cancel">
+ <property name="label">gtk-cancel</property>
+ <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="use_stock">True</property>
+ <signal name="clicked"
handler="app1sae_on_button_cancel_clicked" swapped="no"/>
+ <accelerator key="Escape" signal="clicked"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="app1sae_button_accept">
+ <property name="label">gtk-ok</property>
+ <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="use_stock">True</property>
+ <signal name="clicked"
handler="app1sae_on_button_accept_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox_session_more5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label502">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Session</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label503">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">/</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox93">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel"
id="app1sae_label_session_add">
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Add</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="app1sae_label_session_edit">
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Edit</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label500">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">new/edit</property>
+ </widget>
+ <packing>
+ <property name="position">6</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 352bb6a1..d68e981e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -35,7 +35,6 @@ glade/repair_sub_event.glade
glade/repetitive_conditions.glade
glade/report_window.glade
glade/run_type_add.glade
-glade/session_add_edit.glade
glade/session_upload.glade
glade/splash_window.glade
glade/stats_select_sessions.glade
@@ -70,6 +69,7 @@ src/gui/app1/jumpsWeightFVProfile.cs
src/gui/app1/pulse.cs
src/gui/app1/reactionTime.cs
src/gui/app1/run.cs
+src/gui/app1/session/addEdit.cs
src/gui/app1/session/loadAndImport.cs
src/gui/chronopic.cs
src/gui/chronopicRegister.cs
@@ -109,7 +109,6 @@ src/gui/runEncoder.cs
src/gui/runType.cs
src/gui/sendLog.cs
src/gui/server.cs
-src/gui/session/addEdit.cs
src/gui/session/selectStats.cs
src/gui/splash.cs
src/gui/sprint.cs
diff --git a/src/Makefile.am b/src/Makefile.am
index 3a887c09..8f17c839 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,6 +18,7 @@ SOURCES = \
gui/app1/forceSensor.cs\
gui/app1/forceSensorAnalyze.cs\
gui/app1/session/delete.cs\
+ gui/app1/session/addEdit.cs\
gui/app1/session/loadAndImport.cs\
gui/app1/session/main.cs\
gui/app1/jump.cs\
@@ -67,7 +68,6 @@ SOURCES = \
gui/person/showAllEvents.cs\
gui/preferences.cs\
gui/sendLog.cs\
- gui/session/addEdit.cs\
gui/session/selectStats.cs\
gui/stats.cs\
gui/presentation.cs\
@@ -298,7 +298,6 @@ RESOURCES = \
../glade/repetitive_conditions.glade \
../glade/report_window.glade \
../glade/run_type_add.glade \
- ../glade/session_add_edit.glade \
../glade/session_upload.glade \
../glade/splash_window.glade \
../glade/stats_select_sessions.glade \
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 826ef2ef..4226280b 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -438,7 +438,6 @@ public partial class ChronoJumpWindow
//windows needed
ChronopicRegisterWindow chronopicRegisterWin;
PreferencesWindow preferencesWin;
- SessionAddEditWindow sessionAddEditWin;
PersonRecuperateWindow personRecuperateWin;
PersonsRecuperateFromOtherSessionWindow personsRecuperateFromOtherSessionWin;
PersonAddModifyWindow personAddModifyWin;
@@ -2373,11 +2372,12 @@ public partial class ChronoJumpWindow
* --------------------------------------------------------
*/
- private void on_new_activate (object o, EventArgs args) {
+ private void on_new_activate (object o, EventArgs args)
+ {
LogB.Information("new session");
- sessionAddEditWin = SessionAddEditWindow.Show(app1, new Session());
- sessionAddEditWin.FakeButtonAccept.Clicked -= new EventHandler(on_new_session_accepted);
- sessionAddEditWin.FakeButtonAccept.Clicked += new EventHandler(on_new_session_accepted);
+ app1s_notebook_sup_entered_from = notebook_sup.CurrentPage;
+ notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.SESSION);
+ sessionAddEditShow (true);
}
private void setApp1Title(string sessionName, Constants.Menuitem_modes mode)
@@ -2419,56 +2419,51 @@ public partial class ChronoJumpWindow
app1.Title = title;
}
- private void on_new_session_accepted (object o, EventArgs args) {
- if(sessionAddEditWin.CurrentSession != null)
- {
- currentSession = sessionAddEditWin.CurrentSession;
- sessionAddEditWin.HideAndNull();
+ private void on_new_session_accepted ()
+ {
+ //serverUniqueID is undefined until session is updated
+ currentSession.ServerUniqueID = Constants.ServerUndefinedID;
- //serverUniqueID is undefined until session is updated
- currentSession.ServerUniqueID = Constants.ServerUndefinedID;
+ setApp1Title(currentSession.Name, current_menuitem_mode);
- setApp1Title(currentSession.Name, current_menuitem_mode);
+ if(createdStatsWin) {
+ stats_win_initializeSession();
+ }
- if(createdStatsWin) {
- stats_win_initializeSession();
- }
-
- resetAllTreeViews(false, true, false); //fill, resetPersons, fillPersons
+ resetAllTreeViews(false, true, false); //fill, resetPersons, fillPersons
- vbox_manage_persons.Visible = true;
- arrow_manage_persons_up.Visible = true;
- arrow_manage_persons_down.Visible = false;
+ vbox_manage_persons.Visible = true;
+ arrow_manage_persons_up.Visible = true;
+ arrow_manage_persons_down.Visible = false;
- //show hidden widgets
- sensitiveGuiNoSession();
- sensitiveGuiYesSession();
+ //show hidden widgets
+ sensitiveGuiNoSession();
+ sensitiveGuiYesSession();
- if( ! configChronojump.PersonWinHide) {
- alignment_buttons_menu_and_persons.Visible = true;
- //on_radio_show_persons_clicked (new object (), new EventArgs ());
- radio_show_persons.Active = true;
- }
+ if( ! configChronojump.PersonWinHide) {
+ alignment_buttons_menu_and_persons.Visible = true;
+ //on_radio_show_persons_clicked (new object (), new EventArgs ());
+ radio_show_persons.Active = true;
+ }
- definedSession = true;
+ definedSession = true;
- //for sure, jumpsExists is false, because we create a new session
+ //for sure, jumpsExists is false, because we create a new session
- hbox_persons_bottom_photo.Sensitive = false;
- hbox_persons_bottom_no_photo.Sensitive = false;
- label_top_person_name.Text = "";
-
- //update report
- report.SessionID = currentSession.UniqueID;
- report.StatisticsRemove();
- try {
- reportWin.FillTreeView();
- } catch {} //reportWin is still not created, not need to Fill again
-
- //feedback (more in 1st session created)
- string feedbackLoadUsers = Catalog.GetString ("Session created, now add or load
persons.");
- new DialogMessage(Constants.MessageTypes.INFO, feedbackLoadUsers);
- }
+ hbox_persons_bottom_photo.Sensitive = false;
+ hbox_persons_bottom_no_photo.Sensitive = false;
+ label_top_person_name.Text = "";
+
+ //update report
+ report.SessionID = currentSession.UniqueID;
+ report.StatisticsRemove();
+ try {
+ reportWin.FillTreeView();
+ } catch {} //reportWin is still not created, not need to Fill again
+
+ //feedback (more in 1st session created)
+ string feedbackLoadUsers = Catalog.GetString ("Session created, now add or load persons.");
+ new DialogMessage(Constants.MessageTypes.INFO, feedbackLoadUsers);
}
private void on_edit_session_activate (object o, EventArgs args)
@@ -2478,27 +2473,17 @@ public partial class ChronoJumpWindow
if(currentSession.Name == Constants.SessionSimulatedName)
new DialogMessage(Constants.MessageTypes.INFO, Constants.SessionProtectedStr());
else {
- sessionAddEditWin = SessionAddEditWindow.Show(app1, currentSession);
- sessionAddEditWin.FakeButtonAccept.Clicked -= new
EventHandler(on_edit_session_accepted);
- sessionAddEditWin.FakeButtonAccept.Clicked += new
EventHandler(on_edit_session_accepted);
-
- //disabled on edit, now has its own window
- //sessionAddEditWin.FakeButtonDelete.Clicked -= new
EventHandler(on_delete_session_activate);
- //sessionAddEditWin.FakeButtonDelete.Clicked += new
EventHandler(on_delete_session_activate);
+ notebook_sup.CurrentPage = Convert.ToInt32(notebook_sup_pages.SESSION);
+ sessionAddEditShow (false);
}
}
- private void on_edit_session_accepted (object o, EventArgs args) {
- if(sessionAddEditWin.CurrentSession != null)
- {
- currentSession = sessionAddEditWin.CurrentSession;
- sessionAddEditWin.HideAndNull();
-
- setApp1Title(currentSession.Name, current_menuitem_mode);
+ private void on_edit_session_accepted ()
+ {
+ setApp1Title(currentSession.Name, current_menuitem_mode);
- if(createdStatsWin) {
- stats_win_initializeSession();
- }
+ if(createdStatsWin) {
+ stats_win_initializeSession();
}
}
diff --git a/src/gui/app1/session/loadAndImport.cs b/src/gui/app1/session/loadAndImport.cs
index b1246a88..0a0f3cfa 100644
--- a/src/gui/app1/session/loadAndImport.cs
+++ b/src/gui/app1/session/loadAndImport.cs
@@ -41,7 +41,6 @@ public partial class ChronoJumpWindow
private TreeStore app1s_store;
private string app1s_selected;
private string app1s_import_file_path;
- private int app1s_notebook_sup_entered_from; //to store from which page we entered (to return at it)
[Widget] Gtk.Label app1s_label_select;
@@ -507,16 +506,6 @@ public partial class ChronoJumpWindow
app1s_notebook.CurrentPage = i;
}
- private void notebook_supSetOldPage()
- {
- notebook_sup.CurrentPage = app1s_notebook_sup_entered_from;
-
- //but if it is start page, ensure notebook_mode_selector is 0
- if(notebook_sup.CurrentPage == Convert.ToInt32(notebook_sup_pages.START))
- notebook_mode_selector.CurrentPage = 0;
- }
-
-
// ---- notebook page 1 buttons ----
void app1s_on_button_cancel1_clicked (object o, EventArgs args)
{
diff --git a/src/gui/app1/session/main.cs b/src/gui/app1/session/main.cs
index 3ffcbd69..cadab855 100644
--- a/src/gui/app1/session/main.cs
+++ b/src/gui/app1/session/main.cs
@@ -71,7 +71,9 @@ public partial class ChronoJumpWindow
public const int app1s_PAGE_IMPORT_CONFIRM = 3;
public const int app1s_PAGE_IMPORT_RESULT = 4;
public const int app1s_PAGE_DELETE_CONFIRM = 5;
+ public const int app1s_PAGE_ADD_EDIT = 6;
+ private int app1s_notebook_sup_entered_from; //to store from which page we entered (to return at it)
// ---- notebook page 0 buttons ----
void app1s_on_button_close0_clicked (object o, EventArgs args)
@@ -79,4 +81,14 @@ public partial class ChronoJumpWindow
menus_sensitive_import_not_danger(true);
notebook_supSetOldPage();
}
+
+ private void notebook_supSetOldPage()
+ {
+ notebook_sup.CurrentPage = app1s_notebook_sup_entered_from;
+
+ //but if it is start page, ensure notebook_mode_selector is 0
+ if(notebook_sup.CurrentPage == Convert.ToInt32(notebook_sup_pages.START))
+ notebook_mode_selector.CurrentPage = 0;
+ }
+
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]