[longomatch] Never hide the close button in the player in live



commit 318e0a39232b431f1ba62d699f12110b280c1c85
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Nov 30 19:37:48 2014 +0100

    Never hide the close button in the player in live

 LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs         |   13 +++++++++++--
 LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs |    2 ++
 LongoMatch.GUI.Multimedia/gtk-gui/objects.xml      |    1 +
 3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
index c96818e..c1cce16 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
@@ -206,6 +206,11 @@ namespace LongoMatch.Gui
                                detachbutton.Visible = vscale1.Visible = !value;
                        }
                }
+
+               public bool CloseAlwaysVisible {
+                       get;
+                       set;
+               }
                
                #endregion
                #region Public methods
@@ -248,7 +253,9 @@ namespace LongoMatch.Gui
 
                public void ResetGui ()
                {
-                       closebutton.Hide ();
+                       if (!CloseAlwaysVisible) {
+                               closebutton.Hide ();
+                       }
                        SetSensitive ();
                        timescale.Value = 0;
                        timelabel.Text = "";
@@ -380,7 +387,9 @@ namespace LongoMatch.Gui
                public void CloseSegment ()
                {
                        ImageLoaded = false;
-                       closebutton.Hide ();
+                       if (!CloseAlwaysVisible) {
+                               closebutton.Hide ();
+                       }
                        segment.Start = new Time (-1);
                        segment.Stop = new Time (int.MaxValue);
                        SetScaleValue (SCALE_FPS);
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs 
b/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
index c8ed49a..dec6bbb 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
@@ -78,8 +78,10 @@ namespace LongoMatch.Gui
                                if (mode == PlayerOperationMode.Player) {
                                        ShowPlayer();
                                        playerbin.Compact = false;
+                                       playerbin.CloseAlwaysVisible = false;
                                } else {
                                        ShowCapturer();
+                                       playerbin.CloseAlwaysVisible = true;
                                        playerbin.Compact = true;
                                }
                                Log.Debug ("CapturerPlayer setting mode " + value);
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml b/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
index 717a220..354c89c 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
@@ -11,6 +11,7 @@
     <itemgroups>
       <itemgroup label="IPlayerBin Properties">
         <property name="Sensitive" />
+        <property name="CloseAlwaysVisible" />
       </itemgroup>
     </itemgroups>
     <signals>


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