[longomatch] Re-attach the video window with the same button
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Re-attach the video window with the same button
- Date: Thu, 8 Nov 2012 21:48:20 +0000 (UTC)
commit 86e4f5316667459828a52f0ccadd1e6e2e1b9704
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Nov 7 21:44:22 2012 +0100
Re-attach the video window with the same button
LongoMatch.Core/Handlers/Handlers.cs | 3 ++-
LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs | 9 +++++++--
LongoMatch.GUI.Multimedia/gtk-gui/objects.xml | 1 +
LongoMatch.GUI/Gui/MainWindow.cs | 3 ++-
.../gtk-gui/LongoMatch.Gui.MainWindow.cs | 1 +
LongoMatch.GUI/gtk-gui/gui.stetic | 1 +
6 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index 5fe2e04..876fcf2 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -133,5 +133,6 @@ namespace LongoMatch.Handlers
/* The plays filter was updated */
public delegate void FilterUpdatedHandler ();
-
+
+ public delegate void DetachPlayerHandler (bool detach);
}
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
index 9f6d87d..c2668e4 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
@@ -48,7 +48,7 @@ namespace LongoMatch.Gui
public event PrevButtonClickedHandler Prev;
public event LongoMatch.Handlers.DrawFrameHandler DrawFrame;
public event SeekEventHandler SeekEvent;
- public event EventHandler Detach;
+ public event DetachPlayerHandler Detach;
private const int THUMBNAIL_MAX_WIDTH = 100;
private LongoMatch.Video.Common.TickHandler tickHandler;
@@ -191,6 +191,11 @@ namespace LongoMatch.Gui
return ((Gtk.EventBox)player);
}
}
+
+ public bool Detached {
+ get;
+ set;
+ }
#endregion
#region Public methods
@@ -428,7 +433,7 @@ namespace LongoMatch.Gui
void EmitDetach () {
if (Detach != null)
- Detach(this, new EventArgs());
+ Detach(!Detached);
}
#endregion
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml b/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
index ba22494..d10f4ab 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
@@ -13,6 +13,7 @@
<itemgroup label="PlayerBin Properties">
<property name="Rate" />
<property name="ExpandLogo" />
+ <property name="Detached" />
</itemgroup>
</itemgroups>
<signals>
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index 7b36d86..a014805 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -122,7 +122,7 @@ namespace LongoMatch.Gui
player.SetLogo(System.IO.Path.Combine(Config.ImagesDir(),"background.png"));
player.LogoMode = true;
player.Tick += OnTick;
- player.Detach += (sender, e) => DetachPlayer(true);
+ player.Detach += DetachPlayer;
capturer.Visible = false;
capturer.Logo = System.IO.Path.Combine(Config.ImagesDir(),"background.png");
@@ -341,6 +341,7 @@ namespace LongoMatch.Gui
action = TaggingViewAction;
OnViewToggled(action, new EventArgs());
}
+ player.Detached = detach;
}
public void SetProject(Project project, ProjectType projectType, CaptureSettings props, PlaysFilter filter)
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
index 87abe98..ed612bc 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -240,6 +240,7 @@ namespace LongoMatch.Gui
this.player.Name = "player";
this.player.Rate = 1F;
this.player.ExpandLogo = true;
+ this.player.Detached = false;
this.videowidgetsbox.Add (this.player);
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.videowidgetsbox [this.player]));
w7.Position = 1;
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 888527f..f0593be 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -1935,6 +1935,7 @@
<property name="Events">ButtonPressMask</property>
<property name="Rate">1</property>
<property name="ExpandLogo">True</property>
+ <property name="Detached">False</property>
<signal name="Error" handler="OnPlayerbin1Error" />
<signal name="SegmentClosedEvent" handler="OnSegmentClosedEvent" />
</widget>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]