[longomatch/redesign] Remove teams' players lists from the project



commit 77d358a939fc4d4d2781f0b3003bb28d2369ecc5
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Jan 30 13:45:37 2011 +0100

    Remove teams' players lists from the project
    
    This info is now part of tags in each play

 LongoMatch/Gui/MainWindow.cs                |    2 --
 LongoMatch/Gui/TreeView/ListTreeViewBase.cs |    6 ++++--
 LongoMatch/Handlers/EventsManager.cs        |    2 ++
 LongoMatch/IO/CSVExport.cs                  |    5 +----
 LongoMatch/Store/Play.cs                    |   27 ---------------------------
 LongoMatch/Store/Project.cs                 |   23 -----------------------
 6 files changed, 7 insertions(+), 58 deletions(-)
---
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 10478cd..78d2c5f 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -181,8 +181,6 @@ namespace LongoMatch.Gui
 			tagstreewidget1.ProjectIsLive = isLive;
 			playlistwidget2.Stop();
 			treewidget1.Project=project;
-			localplayerslisttreewidget.SetTeam(project.LocalTeamTemplate,project.GetLocalTeamModel());
-			visitorplayerslisttreewidget.SetTeam(project.VisitorTeamTemplate,project.GetVisitorTeamModel());
 			tagstreewidget1.Project = project;				
 			buttonswidget1.Categories = project.Categories;
 			hkManager.Categories=project.Categories;
diff --git a/LongoMatch/Gui/TreeView/ListTreeViewBase.cs b/LongoMatch/Gui/TreeView/ListTreeViewBase.cs
index ca3bea5..09ee894 100644
--- a/LongoMatch/Gui/TreeView/ListTreeViewBase.cs
+++ b/LongoMatch/Gui/TreeView/ListTreeViewBase.cs
@@ -261,7 +261,8 @@ namespace LongoMatch.Gui.Component
 					c.Background = "white";
 					c.CellBackground = "white";
 				}
-				c.Markup = mtn.ToString(teams_name[(int)mtn.Team]);
+				// FIXME
+				//c.Markup = mtn.ToString(teams_name[(int)mtn.Team]);
 			}else if (o is Player) {
 				c.Background = "white";
 				c.CellBackground = "white";
@@ -368,7 +369,8 @@ namespace LongoMatch.Gui.Component
 			TreePath[] paths = Selection.GetSelectedRows();
 			for (int i=0; i<paths.Length; i++){	
 					Play tNode = (Play)GetValueFromPath(paths[i]);
-					tNode.Team = team;
+					//FIXME
+					//tNode.Team = team;
 			}
 		}
 
diff --git a/LongoMatch/Handlers/EventsManager.cs b/LongoMatch/Handlers/EventsManager.cs
index f458427..ce42b4e 100644
--- a/LongoMatch/Handlers/EventsManager.cs
+++ b/LongoMatch/Handlers/EventsManager.cs
@@ -454,6 +454,7 @@ namespace LongoMatch
 		}
 
 		protected virtual void OnPlayersTagged(Play tNode, Team team) {
+		/*
 			PlayersSelectionDialog dialog = new PlayersSelectionDialog();
 			if (team == Team.LOCAL) {
 				dialog.SetPlayersInfo(openedProject.LocalTeamTemplate);
@@ -473,6 +474,7 @@ namespace LongoMatch
 				}
 			}
 			dialog.Destroy();
+			*/
 		}
 	}
 }
diff --git a/LongoMatch/IO/CSVExport.cs b/LongoMatch/IO/CSVExport.cs
index cb40ce3..d1909f2 100644
--- a/LongoMatch/IO/CSVExport.cs
+++ b/LongoMatch/IO/CSVExport.cs
@@ -131,10 +131,9 @@ namespace LongoMatch.IO
 		
 		private void WriteCatagoriesData(TextWriter tx, Dictionary<Tag, List<Play>> tagsDic){
 			// Write Tags table
-			tx.WriteLine(String.Format("{0};{1};{2};{3};{4};{5}",
+			tx.WriteLine(String.Format("{0};{1};{2};{3};{4}",
 			             Catalog.GetString("Tag"),
 			             Catalog.GetString("Name"),
-			             Catalog.GetString("Team"),
 			             Catalog.GetString("StartTime"),
 			             Catalog.GetString("StopTime"),
 			             Catalog.GetString("Duration")));
@@ -144,7 +143,6 @@ namespace LongoMatch.IO
 				foreach (Play tn in pair.Value) {
 					tx.WriteLine("\""+pair.Key.Value+"\";\""+
 					             tn.Name+"\";\""+
-					             tn.Team+"\";\""+
 					             tn.Start.ToMSecondsString()+"\";\""+
 					             tn.Stop.ToMSecondsString()+"\";\""+
 					             (tn.Stop-tn.Start).ToMSecondsString()+"\"");
@@ -173,7 +171,6 @@ namespace LongoMatch.IO
 					tx.WriteLine("\""+pair.Key.Name+"\";\""+
 					             sectionName+"\";\""+
 					             tn.Name+"\";\""+
-					             tn.Team+"\";\""+
 					             tn.Start.ToMSecondsString()+"\";\""+
 					             tn.Stop.ToMSecondsString()+"\";\""+
 					             (tn.Stop-tn.Start).ToMSecondsString()+"\"");
diff --git a/LongoMatch/Store/Play.cs b/LongoMatch/Store/Play.cs
index b8a4f2d..0239ab0 100644
--- a/LongoMatch/Store/Play.cs
+++ b/LongoMatch/Store/Play.cs
@@ -38,8 +38,6 @@ namespace LongoMatch.Store
 
 		#region Constructors
 		public Play(){
-			LocalPlayers = new List<Player>();
-			VisitorPlayers = new List<Player>();
 			Drawings = new DrawingsList();
 			Tags = new List<Tag>();
 		}
@@ -58,11 +56,6 @@ namespace LongoMatch.Store
 		public string Notes {get; set;}
 
 		/// <summary>
-		/// The <see cref="LongoMatch.TimeNode.Team"/> associated to this play
-		/// </summary>
-		public Team Team {get; set;}
-
-		/// <summary>
 		/// Video framerate in frames per second. This value is taken from the
 		/// video file properties and used to translate from seconds
 		/// to frames: second 100 is equivalent to frame 100*fps
@@ -102,16 +95,6 @@ namespace LongoMatch.Store
 		public bool Selected {get; set;}
 	
 		/// <summary>
-		/// Gets a list of players for the local team 
-		/// </summary>
-		public List<Player> LocalPlayers {get; set;}
-	
-		/// <summary>
-		/// Gets a list of players for the visitor team 
-		/// </summary>
-		public List<Player> VisitorPlayers {get; set;}
-
-		/// <summary>
 		/// List of drawings for this play
 		/// </summary>
 		public DrawingsList Drawings {get; set;}
@@ -169,10 +152,6 @@ namespace LongoMatch.Store
 			return (frame>=StartFrame && frame<StopFrame);
 		}
 
-		public bool HasPlayer(Player player){
-			return LocalPlayers.Contains(player) || VisitorPlayers.Contains(player);
-		}
-		
 		/// <summary>
 		/// Adds a new tag to the play 
 		/// </summary>
@@ -203,16 +182,10 @@ namespace LongoMatch.Store
 				tags[i] = Tags[i].Value;
 			
 			return  "<b>"+Catalog.GetString("Name")+": </b>"+Name+"\n"+
-				    "<b>"+Catalog.GetString("Team")+": </b>"+team+"\n"+
 					"<b>"+Catalog.GetString("Start")+": </b>"+Start.ToMSecondsString()+"\n"+
 					"<b>"+Catalog.GetString("Stop")+": </b>"+Stop.ToMSecondsString()+"\n"+
 					"<b>"+Catalog.GetString("Tags")+": </b>"+ String.Join(" ; ", tags);
 		}
-		
-		public override string ToString(){
-			return ToString(Team.ToString());
-		}
-
 		#endregion
 	}
 }
diff --git a/LongoMatch/Store/Project.cs b/LongoMatch/Store/Project.cs
index a2a06ee..765df63 100644
--- a/LongoMatch/Store/Project.cs
+++ b/LongoMatch/Store/Project.cs
@@ -134,7 +134,6 @@ namespace LongoMatch.Store
 				Start = start,
 				Stop = stop,
 				Category = category,
-				Team = Team.NONE,
 				Notes = "",
 				Miniature = miniature,
 				Fps = fps,
@@ -227,28 +226,6 @@ namespace LongoMatch.Store
 			return dataFileListStore;
 		}
 
-		/// <summary>
-		/// Returns a <see cref="Gtk.TreeStore"/> for the local team in which players
-		///  are root nodes and their respectives tagged plays child nodes
-		/// </summary>
-		/// <returns>
-		/// A <see cref="TreeStore"/>
-		/// </returns>
-		public TreeStore GetLocalTeamModel() {
-			return GetTeamModel(LocalTeamTemplate);
-		}
-
-		/// <summary>
-		/// Returns a <see cref="Gtk.TreeStore"/> for the visitor team in which players
-		///  are root nodes and their respectives tagged plays child nodes
-		/// </summary>
-		/// <returns>
-		/// A <see cref="TreeStore"/>
-		/// </returns>
-		public TreeStore GetVisitorTeamModel() {
-			return GetTeamModel(VisitorTeamTemplate);
-		}
-
 		public bool Equals(Project project) {
 			if (project == null)
 				return false;



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