[chronojump] Fixed 647865 - windows: Check hang on exit



commit aa4c913e131d64825251659ed5e99c5e508d857b
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Apr 20 12:50:08 2011 +0200

    Fixed 647865 - windows: Check hang on exit

 src/gui/chronojump.cs |   17 +++++++++++------
 src/gui/chronopic.cs  |   15 +++++++--------
 2 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index a603a8c..71c02e0 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -372,7 +372,7 @@ public partial class ChronoJumpWindow
 
 	private bool normalGUI; //false means small gui
 
-	int chronopicCancelledTimes = 0;
+	//int chronopicCancelledTimes = 0;
 
 	//const int statusbarID = 1;
 
@@ -2083,14 +2083,17 @@ public partial class ChronoJumpWindow
 
 
 	private void on_quit1_activate (object o, EventArgs args) {
+		/*
 		if(chronopicCancelledTimes > 0 && Util.IsWindows()) {
-		//if(chronopicCancelledTimes > 0) {
 			confirmWinJumpRun = ConfirmWindowJumpRun.Show( 
 					Catalog.GetString("Attention, current version of Chronojump gets hanged on exit\nif user has cancelled detection of Chronopic."),
 					Catalog.GetString("Sorry, you will have to close Chronojump using CTRL + ALT + DEL."));
 			confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_quit2_activate);
 		} else
 			on_quit2_activate(new object(), new EventArgs());
+		
+		*/
+		on_quit2_activate(new object(), new EventArgs());
 	}
 		
 
@@ -2117,8 +2120,8 @@ public partial class ChronoJumpWindow
 		Log.WriteLine("Bye3!");
 		Application.Quit();
 		Log.WriteLine("Bye4!");
-		Environment.Exit(Environment.ExitCode);
-		Log.WriteLine("Bye5!");
+		//Environment.Exit(Environment.ExitCode);
+		//Log.WriteLine("Bye5!");
 	}
 	
 	/* ---------------------------------------------------------
@@ -3874,7 +3877,7 @@ Console.WriteLine("X");
 		}
 
 		chronopicWin = ChronopicWindow.Create(cpd, recreate, volumeOn);
-		chronopicWin.FakeButtonCancelled.Clicked += new EventHandler(on_chronopic_window_cancelled);
+		//chronopicWin.FakeButtonCancelled.Clicked += new EventHandler(on_chronopic_window_cancelled);
 		chronopicLabels(0);
 	}
 
@@ -3884,11 +3887,13 @@ Console.WriteLine("X");
 		chronopicWin.FakeWindowDone.Clicked += new EventHandler(on_chronopic_window_connected_or_done);
 	}
 
-		
+	
+	/*	
 	private void on_chronopic_window_cancelled (object o, EventArgs ags) {
 		chronopicWin.FakeButtonCancelled.Clicked -= new EventHandler(on_chronopic_window_cancelled);
 		chronopicCancelledTimes ++;
 	}
+	*/
 
 	/*	
 	private void chronopicWindowReload(object o, EventArgs args) {
diff --git a/src/gui/chronopic.cs b/src/gui/chronopic.cs
index 0be91b8..cdea466 100644
--- a/src/gui/chronopic.cs
+++ b/src/gui/chronopic.cs
@@ -88,7 +88,7 @@ public class ChronopicWindow
 	bool needUpdateChronopicWin;
 	bool updateChronopicWinValuesState;
 	string updateChronopicWinValuesMessage;
-	Gtk.Button fakeButtonCancelled;
+	//Gtk.Button fakeButtonCancelled;
 
 	[Widget] Gtk.Button fakeConnectionButton; //raised when chronopic detection ended
 	[Widget] Gtk.Button fakeWindowDone; //raised when chronopic detection ended
@@ -236,7 +236,7 @@ Log.WriteLine("bbb");
 		image_cp3_yes.Hide();
 		image_cp4_yes.Hide();
 		
-		fakeButtonCancelled = new Gtk.Button();
+		//fakeButtonCancelled = new Gtk.Button();
 	}
 	
 	//check if user has disconnected chronopic or port has changed
@@ -748,7 +748,7 @@ Log.WriteLine("bbb");
 
 	private void on_chronopic_cancelled (object o, EventArgs args) {
 		Log.WriteLine("cancelled-----");
-		fakeButtonCancelled.Click(); //just to show message of crashing on windows exiting
+		//fakeButtonCancelled.Click(); //just to show message of crashing on windows exiting
 		
 		cpDoing.AbortFlush = true;
 
@@ -756,7 +756,7 @@ Log.WriteLine("bbb");
 		//thread.Abort();
 		//http://stackoverflow.com/questions/2853072/thread-does-not-abort-on-application-closing
 		//Log.Write(thread.ThreadState.ToString());
-		thread.IsBackground = true;
+		//thread.IsBackground = true;
 		
 		//try to solve windows problems when a chronopic detection was cancelled
 		//Log.Write(thread.ThreadState.ToString());
@@ -767,7 +767,6 @@ Log.WriteLine("bbb");
 		updateChronopicWinValuesState= false; //disconnected
 		updateChronopicWinValuesMessage= Catalog.GetString("Cancelled by user");
 		needUpdateChronopicWin = true;
-			
 	}
 	
 	void on_button_close_clicked (object o, EventArgs args)
@@ -841,8 +840,8 @@ Log.WriteLine("bbb");
 	}
 	*/
 
-	public Gtk.Button FakeButtonCancelled {
-		get { return fakeButtonCancelled; }
-	}
+	//public Gtk.Button FakeButtonCancelled {
+	//	get { return fakeButtonCancelled; }
+	//}
 
 }



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