[longomatch/newui: 151/157] Add a function to clear the player information from the widgets and use it.
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/newui: 151/157] Add a function to clear the player information from the widgets and use it.
- Date: Mon, 1 Sep 2014 09:54:04 +0000 (UTC)
commit 88ac43cb6a7b7219ebc4935b4eb11c82bd89afbe
Author: Julien Moutte <julien fluendo com>
Date: Fri Aug 29 18:48:37 2014 +0200
Add a function to clear the player information from the widgets and use it.
LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
index 3c3db3f..2774ae4 100644
--- a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
@@ -91,6 +91,7 @@ namespace LongoMatch.Gui.Component
ignoreChanges = false;
Edited = false;
// Start with disabled widget until something get selected
+ ClearPlayerFrame ();
playerframe.Sensitive = false;
}
}
@@ -201,6 +202,24 @@ namespace LongoMatch.Gui.Component
mailentry.Text = p.Mail ?? "";
playerimage.Pixbuf = PlayerPhoto (p);
}
+
+ void ClearPlayerFrame () {
+ ignoreChanges = true;
+
+ nameentry.Text = "";
+ lastnameentry.Text = "";
+ nicknameentry.Text = "";
+ positionentry.Text = "";
+ numberspinbutton.Value = 0;
+ heightspinbutton.Value = 0;
+ weightspinbutton.Value = 0;
+ nationalityentry.Text = "";
+ bdaydatepicker.Date = new DateTime ();
+ mailentry.Text = "";
+ playerimage.Pixbuf = playerimage.Pixbuf = IconTheme.Default.LoadIcon
("longomatch-player-pic", 45, IconLookupFlags.ForceSvg);
+
+ ignoreChanges = false;
+ }
void ParseTactics () {
try {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]