[banshee] MeeGo: Pause video on window close (bgo#646048)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] MeeGo: Pause video on window close (bgo#646048)
- Date: Tue, 29 Mar 2011 15:25:31 +0000 (UTC)
commit 7678591407d130ac23ccbe8f9097be15759d66af
Author: Zhou Ting <ting z zhou intel com>
Date: Wed Mar 30 00:23:37 2011 +0800
MeeGo: Pause video on window close (bgo#646048)
Signed-off-by: Gabriel Burt <gabriel burt gmail com>
src/Clients/Nereid/Nereid/PlayerInterface.cs | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/Clients/Nereid/Nereid/PlayerInterface.cs b/src/Clients/Nereid/Nereid/PlayerInterface.cs
index 9669fdd..cb9ebb0 100644
--- a/src/Clients/Nereid/Nereid/PlayerInterface.cs
+++ b/src/Clients/Nereid/Nereid/PlayerInterface.cs
@@ -251,7 +251,14 @@ namespace Nereid
TooltipText = Catalog.GetString ("Close")
};
- close_button.Clicked += (o, e) => Hide ();
+ close_button.Clicked += (o, e) => {
+ if (ServiceManager.PlayerEngine.IsPlaying () &&
+ (ServiceManager.PlayerEngine.CurrentState != PlayerState.Paused) &&
+ ServiceManager.PlayerEngine.CurrentTrack.HasAttribute (TrackMediaAttributes.VideoStream)) {
+ ServiceManager.PlayerEngine.Pause ();
+ }
+ Hide ();
+ };
close_button.ShowAll ();
ActionService.PopulateToolbarPlaceholder (header_toolbar, "/HeaderToolbar/ClosePlaceholder", close_button);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]