[longomatch/redesign3: 92/143] Implement ITemplateWidget in the CategoriesTemplateWidget
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign3: 92/143] Implement ITemplateWidget in the CategoriesTemplateWidget
- Date: Mon, 15 Aug 2011 22:52:55 +0000 (UTC)
commit 2e1e5ced206e916d4dd70fbce99f90d2e7790eff
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sun Mar 27 16:34:27 2011 +0200
Implement ITemplateWidget in the CategoriesTemplateWidget
LongoMatch/Gui/Component/ProjectTemplateWidget.cs | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
index f73a4e0..4b2ad7c 100644
--- a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
@@ -21,7 +21,9 @@ using System.Collections.Generic;
using System.IO;
using Gdk;
using Gtk;
+
using LongoMatch.Gui.Dialog;
+using LongoMatch.Interfaces;
using LongoMatch.IO;
using LongoMatch.Store;
using LongoMatch.Store.Templates;
@@ -34,7 +36,7 @@ namespace LongoMatch.Gui.Component
[System.ComponentModel.Category("LongoMatch")]
[System.ComponentModel.ToolboxItem(true)]
- public partial class ProjectTemplateWidget : Gtk.Bin
+ public partial class ProjectTemplateWidget : Gtk.Bin, ITemplateWidget<Categories>
{
private List<HotKey> hkList;
private Project project;
@@ -51,11 +53,11 @@ namespace LongoMatch.Gui.Component
set {
project = value;
if(project != null)
- Categories = project.Categories;
+ Template = project.Categories;
}
}
- public Categories Categories {
+ public Categories Template {
get {
return categories;
}
@@ -88,7 +90,7 @@ namespace LongoMatch.Gui.Component
}
private void UpdateModel() {
- Categories = Categories;
+ Template = Template;
}
private void AddCategory(int index) {
@@ -229,11 +231,11 @@ namespace LongoMatch.Gui.Component
"Do you want to overwrite it ?")
);
if(md.Run() == (int)ResponseType.Yes)
- Categories.Save(dialog.Text);
+ Template.Save(dialog.Text);
md.Destroy();
}
else
- Categories.Save(dialog.Text);
+ Template.Save(dialog.Text);
}
dialog.Destroy();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]