[longomatch] Fix errors closing projects without anything recorded
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix errors closing projects without anything recorded
- Date: Sun, 10 Nov 2013 16:36:20 +0000 (UTC)
commit a5970eca1e2a761de9799c3b7aea8b0c9ce351a2
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sun Nov 10 17:35:01 2013 +0100
Fix errors closing projects without anything recorded
LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs | 3 ++-
LongoMatch.GUI/Gui/MainWindow.cs | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs b/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
index 02d9f52..311718f 100644
--- a/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
@@ -26,9 +26,10 @@ namespace LongoMatch.Gui.Dialog
public partial class EndCaptureDialog : Gtk.Dialog
{
- public EndCaptureDialog()
+ public EndCaptureDialog(string filepath)
{
this.Build();
+ savebutton.Visible = System.IO.File.Exists (filepath);
}
protected virtual void OnQuit(object sender, System.EventArgs e)
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index 53d5e0d..54c81b2 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -543,7 +543,7 @@ namespace LongoMatch.Gui
}
/* Capture project */
- dialog = new EndCaptureDialog();
+ dialog = new EndCaptureDialog(openedProject.Description.File.FilePath);
dialog.TransientFor = (Gtk.Window)this.Toplevel;
res = dialog.Run();
dialog.Destroy();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]