[longomatch] Gui: allow selecting multiple files in the video converter



commit 0d9e2e53e7123d2c81855b318d5de23e9a90677c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Mar 24 11:20:24 2013 +0100

    Gui: allow selecting multiple files in the video converter

 LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs 
b/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
index a9a3cbe..523ce82 100644
--- a/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
+++ b/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
@@ -70,14 +70,14 @@ namespace LongoMatch.Gui.Dialog
                
                protected void OnAddbuttonClicked (object sender, System.EventArgs e)
                {
-                       string path = GUIToolkit.Instance.OpenFile (Catalog.GetString("Add file"), null,
-                                                                   Config.HomeDir(), null, null);
+                       List<string> paths = GUIToolkit.Instance.OpenFiles (Catalog.GetString("Add file"), 
null,
+                                                                           Config.HomeDir(), null, null);
                        try {
-                               if (path == null)
-                                       return;
-                               MediaFile file = PreviewMediaFile.DiscoverFile(path);
-                               store.AppendValues (file);
-                               Files.Add (file);
+                               foreach (string path in paths) {
+                                       MediaFile file = PreviewMediaFile.DiscoverFile(path);
+                                       store.AppendValues (file);
+                                       Files.Add (file);
+                               }
                        } catch (Exception ex) {
                                GUIToolkit.Instance.ErrorMessage (ex.Message);
                        }


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