[longomatch] Remove 'New' from the project type enum.



commit 3aedc71d84d4ba2f847126bede12df8801d8c015
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Mar 27 14:23:03 2010 +0100

    Remove 'New' from the project type enum.

 LongoMatch/Common/Enums.cs                       |    6 +++---
 LongoMatch/Gui/Component/ProjectDetailsWidget.cs |   14 +++++++-------
 LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs  |    4 ++--
 LongoMatch/Gui/MainWindow.cs                     |   14 +++++++-------
 LongoMatch/Handlers/EventsManager.cs             |   12 ++++++------
 LongoMatch/Utils/ProjectUtils.cs                 |    2 +-
 6 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/LongoMatch/Common/Enums.cs b/LongoMatch/Common/Enums.cs
index f97d5b9..ebcb45d 100644
--- a/LongoMatch/Common/Enums.cs
+++ b/LongoMatch/Common/Enums.cs
@@ -23,9 +23,9 @@ namespace LongoMatch.Common
 
 
 	public enum ProjectType {
-		NewCaptureProject,
-		NewFakeCaptureProject,
-		NewFileProject,
+		CaptureProject,
+		FakeCaptureProject,
+		FileProject,
 		EditProject,
 		None,
 	}
diff --git a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
index 22dccd6..338e1fe 100644
--- a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
@@ -66,17 +66,17 @@ namespace LongoMatch.Gui.Component
 			FillSections();
 			FillTeamsTemplate();
 
-			this.Use=ProjectType.NewFileProject;
+			this.Use=ProjectType.FileProject;
 		}
 
 		public ProjectType Use {
 			set {
-				if (value == ProjectType.NewFileProject  || value == ProjectType.EditProject
-				    || value == ProjectType.NewFakeCaptureProject) {
+				if (value == ProjectType.FileProject  || value == ProjectType.EditProject
+				    || value == ProjectType.FakeCaptureProject) {
 					videobitratelabel.Visible = false;
 					bitratespinbutton.Visible = false;					
 				}
-				if (value == ProjectType.NewFakeCaptureProject) {
+				if (value == ProjectType.FakeCaptureProject) {
 					label6.Visible = false;
 					hbox4.Visible = false;
 				}
@@ -252,10 +252,10 @@ namespace LongoMatch.Gui.Component
 
 		public Project GetProject() {
 			if (useType != ProjectType.EditProject) {
-				if (Filename == "" && useType == ProjectType.NewFileProject)
+				if (Filename == "" && useType == ProjectType.FileProject)
 					return null;
 				else {
-					if (useType == ProjectType.NewFakeCaptureProject){
+					if (useType == ProjectType.FakeCaptureProject){
 						mFile = new PreviewMediaFile();
 						mFile.FilePath = Constants.FAKE_PROJECT;
 						mFile.Fps = 25;
@@ -343,7 +343,7 @@ namespace LongoMatch.Gui.Component
 		{
 			FileChooserDialog fChooser = null;
 
-			if (this.useType == ProjectType.NewCaptureProject) {
+			if (this.useType == ProjectType.CaptureProject) {
 				fChooser = new FileChooserDialog(Catalog.GetString("Save File as..."),
 				                                 (Gtk.Window)this.Toplevel,
 				                                 FileChooserAction.Save,
diff --git a/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs b/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs
index e4c5bfa..6583c8c 100644
--- a/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs
+++ b/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs
@@ -34,9 +34,9 @@ namespace LongoMatch.Gui.Dialog
 		public ProjectType Type{
 			get{
 				if (fromfileradiobutton.Active)
-					return ProjectType.NewFileProject;
+					return ProjectType.FileProject;
 				else
-					return ProjectType.NewFakeCaptureProject;
+					return ProjectType.FakeCaptureProject;
 				
 			}
 		}
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 18e24c0..0202069 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -117,7 +117,7 @@ namespace LongoMatch.Gui
 			eManager.OpenedProject = project;
 			eManager.OpenedProjectType = projectType;
 			if (project!=null) {
-				if (projectType == ProjectType.NewFileProject){
+				if (projectType == ProjectType.FileProject){
 					// Check if the file associated to the project exists
 					if (!File.Exists(project.File.FilePath)) {
 						MessagePopup.PopupMessage(this, MessageType.Warning,
@@ -184,7 +184,7 @@ namespace LongoMatch.Gui
 			if (save)
 				SaveProject();
 			
-			if (projectType != ProjectType.NewFileProject){
+			if (projectType != ProjectType.FileProject){
 				playerbin1.Visible = true;
 				eManager.Capturer = null;
 				if (capturerBin != null)
@@ -214,7 +214,7 @@ namespace LongoMatch.Gui
 		}
 
 		private void MakeActionsSensitive(bool sensitive, ProjectType projectType) {
-			bool sensitive2 = sensitive && projectType == ProjectType.NewFileProject;
+			bool sensitive2 = sensitive && projectType == ProjectType.FileProject;
 			CloseProjectAction.Sensitive=sensitive;
 			SaveProjectAction.Sensitive = sensitive;
 			CaptureModeAction.Sensitive = sensitive2;
@@ -249,9 +249,9 @@ namespace LongoMatch.Gui
 		}
 
 		private void SaveProject() {
-			if (openedProject != null && projectType == ProjectType.NewFileProject) {
+			if (openedProject != null && projectType == ProjectType.FileProject) {
 				MainClass.DB.UpdateProject(openedProject);
-			} else if (projectType == ProjectType.NewFakeCaptureProject)
+			} else if (projectType == ProjectType.FakeCaptureProject)
 				ProjectUtils.SaveFakeLiveProject(openedProject, this);
 		}
 		
@@ -262,7 +262,7 @@ namespace LongoMatch.Gui
 			if (openedProject == null)
 				return true;
 			
-			if (projectType == ProjectType.NewFileProject){
+			if (projectType == ProjectType.FileProject){
 				MessageDialog md = new MessageDialog(this, DialogFlags.Modal, 
 				                                     MessageType.Question, ButtonsType.OkCancel,
 				                                     Catalog.GetString("Do you want to close the current project?"));
@@ -331,7 +331,7 @@ namespace LongoMatch.Gui
 				project = opd.GetSelection();
 			opd.Destroy();
 			if (project != null)
-				SetProject(MainClass.DB.GetProject(project.File), ProjectType.NewFileProject);
+				SetProject(MainClass.DB.GetProject(project.File), ProjectType.FileProject);
 		}
 		
 		protected virtual void OnSaveProjectActionActivated(object sender, System.EventArgs e)
diff --git a/LongoMatch/Handlers/EventsManager.cs b/LongoMatch/Handlers/EventsManager.cs
index 0e20df1..5dcfde9 100644
--- a/LongoMatch/Handlers/EventsManager.cs
+++ b/LongoMatch/Handlers/EventsManager.cs
@@ -164,8 +164,8 @@ namespace LongoMatch
 			stop = pos + stopTime;
 			fStart = (start < new Time(0)) ? new Time(0) : start;
 			
-			if (projectType == ProjectType.NewFakeCaptureProject || 
-			    projectType == ProjectType.NewCaptureProject){
+			if (projectType == ProjectType.FakeCaptureProject || 
+			    projectType == ProjectType.CaptureProject){
 				fStop = stop;					
 			}
 			else {
@@ -179,7 +179,7 @@ namespace LongoMatch
 			Pixbuf miniature;
 			MediaTimeNode tn;
 		
-			miniature = projectType == ProjectType.NewFakeCaptureProject ?
+			miniature = projectType == ProjectType.FakeCaptureProject ?
 				null : player.CurrentMiniatureFrame;
 			tn = openedProject.AddTimeNode(section, start, stop,miniature);
 			treewidget.AddPlay(tn,section);
@@ -225,8 +225,8 @@ namespace LongoMatch
 		public virtual void OnNewMark(int i) {
 			Time pos;
 			
-			if (projectType == ProjectType.NewFakeCaptureProject || 
-			    projectType == ProjectType.NewCaptureProject)
+			if (projectType == ProjectType.FakeCaptureProject || 
+			    projectType == ProjectType.CaptureProject)
 				pos =  new Time((int)capturer.CurrentTime);
 			else 
 				pos = new Time((int)player.CurrentTime);
@@ -298,7 +298,7 @@ namespace LongoMatch
 			foreach (int player in tNode.VisitorPlayers)
 				visitorPlayersList.DeleteTimeNode(tNode,player);
 			openedProject.DeleteTimeNode(tNode,section);
-			if (projectType == ProjectType.NewFileProject){
+			if (projectType == ProjectType.FileProject){
 				this.player.CloseActualSegment();
 				MainClass.DB.UpdateProject(openedProject);
 			}
diff --git a/LongoMatch/Utils/ProjectUtils.cs b/LongoMatch/Utils/ProjectUtils.cs
index 0aa0a16..3e71fc7 100644
--- a/LongoMatch/Utils/ProjectUtils.cs
+++ b/LongoMatch/Utils/ProjectUtils.cs
@@ -210,7 +210,7 @@ namespace LongoMatch.Utils
 				}
 				response = npd.Run();
 			}				
-			if (projectType == ProjectType.NewFileProject) 
+			if (projectType == ProjectType.FileProject) 
 				/* We can safelly add the project since we already checked if 
 				 * it can can added */
 				MainClass.DB.AddProject(project);



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