[longomatch] Hide menus options for live projects



commit 907452af737dc4db282e52073dcd1c54b2ce92e8
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Mar 6 23:24:37 2010 +0100

    Hide menus options for live projects

 LongoMatch/Gui/MainWindow.cs |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 0427e22..0b9a28e 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -164,7 +164,7 @@ namespace LongoMatch.Gui
 				visitorplayerslisttreewidget.SetTeam(project.VisitorTeamTemplate,project.GetVisitorTeamModel());
 				tagstreewidget1.Project = project;				
 				buttonswidget1.Sections = project.Sections;
-				MakeActionsSensitive(true);
+				MakeActionsSensitive(true,projectType);
 				ShowWidgets();
 				hkManager.Sections=project.Sections;
 				KeyPressEvent += hotkeysListener;
@@ -199,18 +199,19 @@ namespace LongoMatch.Gui
 			noteswidget1.Visible = false;
 			SaveDB();
 			selectedTimeNode = null;
-			MakeActionsSensitive(false);
+			MakeActionsSensitive(false, projectType);
 			hkManager.Sections = null;
 			KeyPressEvent -= hotkeysListener;
 		}
 
-		private void MakeActionsSensitive(bool sensitive) {
+		private void MakeActionsSensitive(bool sensitive, ProjectType projectType) {
+			bool sensitive2 = sensitive && projectType == ProjectType.NewFileProject;
 			CloseProjectAction.Sensitive=sensitive;
 			SaveProjectAction.Sensitive = sensitive;
-			CaptureModeAction.Sensitive = sensitive;
-			AnalyzeModeAction.Sensitive = sensitive;
-			ExportProjectToCSVFileAction.Sensitive = sensitive;
-			HideAllWidgetsAction.Sensitive=sensitive;
+			CaptureModeAction.Sensitive = sensitive2;
+			AnalyzeModeAction.Sensitive = sensitive2;
+			ExportProjectToCSVFileAction.Sensitive = sensitive2;
+			HideAllWidgetsAction.Sensitive=sensitive2;
 		}
 
 		private void ShowWidgets() {



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