[longomatch/fakelive] Hide menus options for live projects
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/fakelive] Hide menus options for live projects
- Date: Mon, 15 Mar 2010 21:44:26 +0000 (UTC)
commit 5dd52588cb206e7ad168e7cc9bd3da276e46a241
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]