[longomatch] Prompt to close the project even if it's a file project
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Prompt to close the project even if it's a file project
- Date: Sat, 27 Mar 2010 22:51:16 +0000 (UTC)
commit bf552037396cdfed08bbd5df9f55115eab6339f1
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Mar 27 14:09:25 2010 +0100
Prompt to close the project even if it's a file project
LongoMatch/Gui/MainWindow.cs | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index bbee960..18e24c0 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -259,10 +259,20 @@ namespace LongoMatch.Gui
int res;
EndCaptureDialog dialog;
- if (projectType == ProjectType.None ||
- projectType == ProjectType.NewFileProject){
- CloseOpenedProject(true);
+ if (openedProject == null)
return true;
+
+ if (projectType == ProjectType.NewFileProject){
+ MessageDialog md = new MessageDialog(this, DialogFlags.Modal,
+ MessageType.Question, ButtonsType.OkCancel,
+ Catalog.GetString("Do you want to close the current project?"));
+ res = md.Run();
+ md.Destroy();
+ if (res == (int)ResponseType.Ok){
+ CloseOpenedProject(true);
+ return true;
+ }
+ return false;
}
dialog = new EndCaptureDialog();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]