[longomatch] Implement different behaviour depending on MultiCamera support.



commit 225887406adcee654e2019b966a02ffd061270c4
Author: Julien Moutte <julien fluendo com>
Date:   Thu Apr 9 17:20:48 2015 +0200

    Implement different behaviour depending on MultiCamera support.
    
    The widget will now detect that multi camera is supported or not and adapt the behaviour accordingly. 
Without multi camera support we should show only one media file info and hide the resync button.

 LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs 
b/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
index 020f188..4beda46 100644
--- a/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
@@ -88,6 +88,9 @@ namespace LongoMatch.Gui.Panel
                        
                        projectlistwidget1.ShowList = true;
 
+                       // Only visible when multi camera is supported. Indeed periods can be edited in the 
timeline of the project.
+                       resyncbutton.Visible = Config.SupportsMultiCamera;
+
                        SetStyle ();
                }
 
@@ -142,7 +145,14 @@ namespace LongoMatch.Gui.Panel
 
                        resyncbutton.Sensitive = project.Description.FileSet.Count > 1;
 
-                       foreach (MediaFile mf in project.Description.FileSet) {
+                       int max = project.Description.FileSet.Count;
+                       // Cap to one media file for non multi camera version
+                       if (!Config.SupportsMultiCamera) {
+                               max = Math.Min (max, 1);
+                       }
+
+                       for (int i = 0; i < max; i++) {
+                               MediaFile mf = project.Description.FileSet [i];
                                VideoFileInfo vfi = new VideoFileInfo ();
 
                                vfi.SetMediaFileSet (project.Description.FileSet, mf);


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