[chronojump] Better gui on new/edit session
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Better gui on new/edit session
- Date: Thu, 21 Jul 2016 14:46:41 +0000 (UTC)
commit 74e520fe93a4510ae6caeef8e2891ca79bac67f0
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jul 21 16:42:32 2016 +0200
Better gui on new/edit session
src/gui/chronojump.cs | 6 +++++-
src/gui/session.cs | 8 ++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 8520a40..b6f95fe 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2544,6 +2544,8 @@ public partial class ChronoJumpWindow
if(sessionAddEditWin.CurrentSession != null)
{
currentSession = sessionAddEditWin.CurrentSession;
+ sessionAddEditWin.HideAndNull();
+
//serverUniqueID is undefined until session is updated
currentSession.ServerUniqueID = Constants.ServerUndefinedID;
@@ -2572,7 +2574,7 @@ public partial class ChronoJumpWindow
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);
@@ -2590,6 +2592,8 @@ public partial class ChronoJumpWindow
if(sessionAddEditWin.CurrentSession != null)
{
currentSession = sessionAddEditWin.CurrentSession;
+ sessionAddEditWin.HideAndNull();
+
app1.Title = progName + " - " + currentSession.Name;
if(createdStatsWin) {
diff --git a/src/gui/session.cs b/src/gui/session.cs
index 3eedc79..6cb053b 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -570,8 +570,6 @@ public class SessionAddEditWindow {
string myString = string.Format(Catalog.GetString("Session: '{0}' exists. Please, use
another name"), Util.RemoveTildeAndColonAndDot(entry_name.Text) );
ErrorWindow.Show(myString);
} else {
- FakeButtonAccept.Click();
-
int sportID;
if(radiobutton_diff_sports.Active)
sportID = Constants.SportUndefinedID;
@@ -612,7 +610,13 @@ public class SessionAddEditWindow {
sportID, speciallityID, levelID,
currentSession.Comments);
}
+
+ FakeButtonAccept.Click();
+ }
+ }
+ public void HideAndNull() {
+ if (SessionAddEditWindowBox != null) {
SessionAddEditWindowBox.session_add_edit.Hide();
SessionAddEditWindowBox = null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]