[longomatch] Set a the default background in plays



commit ce94380fa8e014838750e0f486f8844ef04fe5b3
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Mar 31 19:12:51 2014 +0200

    Set a the default background in plays

 .../Gui/Component/CategoriesTemplateEditor.cs      |   12 ++++++------
 .../Gui/Component/ProjectDetailsWidget.cs          |    9 +++++++++
 2 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs 
b/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
index 39ca345..5576484 100644
--- a/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
@@ -166,8 +166,8 @@ namespace LongoMatch.Gui.Component
                        fieldBox = new HBox ();
                        fReset = new Button (Catalog.GetString ("Reset"));
                        fReset.Clicked += (sender, e) => {
-                               Template.FieldBackground = null;
-                               SetFieldImage (null);
+                               Template.FieldBackground = Config.FieldBackground;
+                               SetFieldImage (Template.FieldBackground.Value);
                                };
                        febox.ButtonPressEvent += OnFieldImageClicked;                  
                        fieldImage = new Gtk.Image ();
@@ -177,8 +177,8 @@ namespace LongoMatch.Gui.Component
                        halfFieldBox = new HBox ();
                        hfReset = new Button (Catalog.GetString ("Reset"));
                        hfReset.Clicked += (sender, e) => {
-                               Template.HalfFieldBackground = null;
-                               SetHalfFieldImage (null);
+                               Template.HalfFieldBackground = Config.HalfFieldBackground;
+                               SetHalfFieldImage (Template.HalfFieldBackground.Value);
                                };
                        hfebox.ButtonPressEvent += OnHalfFieldImageClicked;
                        halffieldImage = new Gtk.Image();
@@ -188,8 +188,8 @@ namespace LongoMatch.Gui.Component
                        goalBox = new HBox ();
                        gReset = new Button (Catalog.GetString ("Reset"));
                        gReset.Clicked += (sender, e) => {
-                               Template.GoalBackground = null;
-                               SetGoalImage (null);
+                               Template.GoalBackground = Config.GoalBackground;
+                               SetGoalImage (Template.GoalBackground.Value);
                                };
                        gebox.ButtonPressEvent += OnGoalImageClicked;                   
                        goalImage = new Gtk.Image();
diff --git a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs 
b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
index 0f38f66..6468366 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
@@ -335,6 +335,15 @@ namespace LongoMatch.Gui.Component
                                                MatchDate = Date
                                        };
 
+                                       if (Categories.FieldBackground == null) {
+                                               Categories.FieldBackground =Config.FieldBackground;
+                                       }
+                                       if (Categories.HalfFieldBackground == null) {
+                                               Categories.HalfFieldBackground = Config.HalfFieldBackground;
+                                       }
+                                       if (Categories.GoalBackground == null) {
+                                               Categories.GoalBackground = Config.GoalBackground;
+                                       }
                                        return new Project {
                                                Description = desc,
                                                Categories = Categories,


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