[chronojump] Overview win: on select this person it closes win



commit fd2ec444f92b5e1640a0967179846efeec821400
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sat Jan 16 07:52:45 2021 +0100

    Overview win: on select this person it closes win

 src/gui/app1/chronojump.cs |  2 +-
 src/gui/overview.cs        | 14 +++++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 2bded4d2..c82e25ac 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -2735,7 +2735,7 @@ public partial class ChronoJumpWindow
                        selectRowTreeView_persons(treeview_persons,
                                        myTreeViewPersons.FindRow(overviewWin.SelectedPersonID));
 
-                       overviewWin.Button_select_this_person_make_unsensitive();
+                       overviewWin.HideAndNull();
                }
        }
 
diff --git a/src/gui/overview.cs b/src/gui/overview.cs
index c1142970..c3736c5e 100644
--- a/src/gui/overview.cs
+++ b/src/gui/overview.cs
@@ -148,10 +148,14 @@ public abstract class OverviewWindow
                return new TreeStore(typeof (string), typeof (string), typeof (string), typeof (string), 
typeof (string)); //personID (hidden), person name, sex, exercise, sets
        }
 
-       public void Button_select_this_person_make_unsensitive()
+       public void HideAndNull ()
+       {
+               on_button_close_clicked (new object (), new EventArgs ());
+       }
+       protected virtual void on_button_close_clicked (object o, EventArgs args)
        {
-               button_select_this_person.Sensitive = false;
        }
+
        public Button Button_select_this_person
        {
                set { button_select_this_person = value; }
@@ -275,7 +279,7 @@ public class EncoderOverviewWindow : OverviewWindow
                return s;
        }
 
-       void on_button_close_clicked (object o, EventArgs args)
+       protected override void on_button_close_clicked (object o, EventArgs args)
        {
                EncoderOverviewWindowBox.overview_win.Hide();
                EncoderOverviewWindowBox = null;
@@ -335,7 +339,7 @@ public class ForceSensorOverviewWindow : OverviewWindow
                return SqliteForceSensor.SelectSessionOverviewSets(false, sessionID);
        }
 
-       void on_button_close_clicked (object o, EventArgs args)
+       protected override void on_button_close_clicked (object o, EventArgs args)
        {
                ForceSensorOverviewWindowBox.overview_win.Hide();
                ForceSensorOverviewWindowBox = null;
@@ -395,7 +399,7 @@ public class RunEncoderOverviewWindow : OverviewWindow
                return SqliteRunEncoder.SelectSessionOverviewSets(false, sessionID);
        }
 
-       void on_button_close_clicked (object o, EventArgs args)
+       protected override void on_button_close_clicked (object o, EventArgs args)
        {
                RunEncoderOverviewWindowBox.overview_win.Hide();
                RunEncoderOverviewWindowBox = null;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]