[longomatch] Fix error handling in the media player/capturer



commit bb653ee092c54fb93727dadb2ea52ad5118e1937
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Jan 31 20:08:20 2013 +0100

    Fix error handling in the media player/capturer

 LongoMatch.GUI/Gui/MainWindow.cs |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index a2919ae..73a3048 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -290,6 +290,8 @@ namespace LongoMatch.Gui
 			guTimeline.UnitSelected += EmitUnitSelected;
 			guTimeline.UnitChanged += EmitUnitChanged;
 			
+			playercapturer.Error += OnMultimediaError;
+			
 			KeyPressEvent += (o, args) => (EmitKeyPressed(o, (int)args.Event.Key, (int)args.Event.Key));
  		}
 		
@@ -612,13 +614,6 @@ namespace LongoMatch.Gui
 		
 		#endregion
 
-		protected virtual void OnPlayerbin1Error(object o, string message)
-		{
-			MessagePopup.PopupMessage(this, MessageType.Info,
-			                          Catalog.GetString("The actual project will be closed due to an error in the media player:")+"\n" + message);
-			EmitCloseOpenedProject(true);
-		}
-
 		protected override bool OnKeyPressEvent(EventKey evnt)
 		{
 			Gdk.Key key = evnt.Key;
@@ -712,10 +707,10 @@ namespace LongoMatch.Gui
 			return true;
 		}
 
-		protected virtual void OnCapturerBinError(object o, string message)
+		protected virtual void OnMultimediaError(object o, string message)
 		{
-			MessagePopup.PopupMessage(this, MessageType.Info,
-				Catalog.GetString("An error occured in the video capturer and" +
+			MessagePopup.PopupMessage(this, MessageType.Error,
+				Catalog.GetString("The following error happened and" +
 				" the current project will be closed:")+"\n" + message);
 			EmitCloseOpenedProject(true);
 		}



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