[longomatch/fakelive: 14/24] Show a warning message before stopping the capture



commit dc74030eaaf35783e98ab45c58031ab81dffb789
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Feb 18 00:38:41 2010 +0100

    Show a warning message before stopping the capture

 CesarPlayer/Gui/CapturerBin.cs |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/CesarPlayer/Gui/CapturerBin.cs b/CesarPlayer/Gui/CapturerBin.cs
index 7602197..8027ec6 100644
--- a/CesarPlayer/Gui/CapturerBin.cs
+++ b/CesarPlayer/Gui/CapturerBin.cs
@@ -23,6 +23,7 @@ using Gtk;
 using LongoMatch.Video;
 using LongoMatch.Video.Capturer;
 using LongoMatch.Video.Utils;
+using Mono.Unix;
 
 namespace LongoMatch.Gui
 {
@@ -114,10 +115,15 @@ namespace LongoMatch.Gui
 
 		protected virtual void OnStopbuttonClicked (object sender, System.EventArgs e)
 		{
-			Stop();
-			recbutton.Visible = true;
-			pausebutton.Visible = false;
-			stopbutton.Visible = false;
+			MessageDialog md = new MessageDialog((Window)this.Toplevel, DialogFlags.Modal, MessageType.Question, ButtonsType.YesNo,
+			                                     Catalog.GetString("You choosed stopping the current capture."+"\n"+
+			                                                       "Do you want to proceed?"));
+			if (md.Run() == (int)ResponseType.Yes){
+				Stop();
+				recbutton.Visible = true;
+				pausebutton.Visible = false;
+				stopbutton.Visible = false;
+			}
 		}				
 		
 		protected virtual void OnTick (int ellapsedTime){



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