[longomatch] Fix empty dialogs recreating the widget
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix empty dialogs recreating the widget
- Date: Thu, 8 Nov 2012 21:48:30 +0000 (UTC)
commit 38792e7c76685b9409b2fcce566a05feeb979727
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Nov 7 22:23:15 2012 +0100
Fix empty dialogs recreating the widget
.../Gui/Component/ProjectDetailsWidget.cs | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
index b254c9f..e05e212 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
@@ -52,8 +52,7 @@ namespace LongoMatch.Gui.Component
ICategoriesTemplatesProvider tpc;
ITeamTemplatesProvider tpt;
- ITemplateWidget<Categories, Category> twc;
- ITemplateWidget<TeamTemplate, Player> twt;
+ ITemplatesService service;
ProjectType useType;
List<Device> videoDevices;
ListStore videoStandardList;
@@ -82,8 +81,7 @@ namespace LongoMatch.Gui.Component
set {
tpc = value.CategoriesTemplateProvider;
tpt = value.TeamTemplateProvider;
- twc = new CategoriesTemplateEditorWidget(value);
- twt = new TeamTemplateEditorWidget(tpt);
+ service = value;
FillCategories();
FillTeamsTemplate();
}
@@ -532,7 +530,8 @@ namespace LongoMatch.Gui.Component
protected virtual void OnEditbuttonClicked(object sender, System.EventArgs e)
{
- var editor = new TemplateEditorDialog<Categories, Category>(twc);
+ var editor = new TemplateEditorDialog<Categories, Category>(
+ new CategoriesTemplateEditorWidget(service));
editor.Template = Categories;
if (Use == ProjectType.EditProject) {
editor.Project = project;
@@ -542,7 +541,8 @@ namespace LongoMatch.Gui.Component
}
protected virtual void OnLocaltemplatebuttonClicked(object sender, System.EventArgs e) {
- var editor = new TemplateEditorDialog<TeamTemplate, Player>(twt);
+ var editor = new TemplateEditorDialog<TeamTemplate, Player>(
+ new TeamTemplateEditorWidget(tpt));
editor.Template = LocalTeamTemplate;
if (Use == ProjectType.EditProject) {
editor.Project = project;
@@ -552,7 +552,8 @@ namespace LongoMatch.Gui.Component
}
protected virtual void OnVisitorbuttonClicked(object sender, System.EventArgs e) {
- var editor = new TemplateEditorDialog<TeamTemplate, Player>(twt);
+ var editor = new TemplateEditorDialog<TeamTemplate, Player>(
+ new TeamTemplateEditorWidget(tpt));
editor.Template = VisitorTeamTemplate;
if (Use == ProjectType.EditProject) {
editor.Project = project;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]