[longomatch] Force lgm extension for exported projects



commit 5c8050a5c7db56bb6ffd0effc989a3f3eed55432
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Sep 15 17:10:08 2014 +0200

    Force lgm extension for exported projects
    
    Also propse a default name with the title of the project

 LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs 
b/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
index a9ea448..b89ead2 100644
--- a/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
@@ -176,11 +176,15 @@ namespace LongoMatch.Gui.Panel
                {
                        if (loadedProject != null) {
                                string filename = gkit.SaveFile (
-                                       Catalog.GetString("Export project"),
-                                       null, Config.HomeDir, Constants.PROJECT_NAME,
-                                       new string[] {Constants.PROJECT_EXT});
-                               Serializer.Save(loadedProject, filename);
-                       }                       
+                                       Catalog.GetString ("Export project"),
+                                       loadedProject.Description.Title + Constants.PROJECT_EXT,
+                                       Config.HomeDir, Constants.PROJECT_NAME,
+                                       new string[] { Constants.PROJECT_EXT });
+                               if (filename != null) {
+                                       filename = System.IO.Path.ChangeExtension (filename, 
Constants.PROJECT_EXT);
+                                       Serializer.Save(loadedProject, filename);
+                               }
+                       }
                }
 
                void HandleDateChanged (object sender, EventArgs e)


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