[gnome-subtitles] Code cleanup. Don't check if the thread was terminated when opening an url.



commit b8590a0f739f1bf1cf7a6a09c4d73b6048406f80
Author: Pedro Castro <pedro gnomesubtitles org>
Date:   Sat Mar 10 11:33:04 2012 +0000

    Code cleanup. Don't check if the thread was terminated when opening an url.

 src/GnomeSubtitles/Core/Util.cs |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/src/GnomeSubtitles/Core/Util.cs b/src/GnomeSubtitles/Core/Util.cs
index 0d087fa..013b638 100644
--- a/src/GnomeSubtitles/Core/Util.cs
+++ b/src/GnomeSubtitles/Core/Util.cs
@@ -133,26 +133,24 @@ public class Util {
 			SetSpinButtonAdjustment(spinButton, 0, toNegate);
 	}
 	
-	public static bool OpenUrl (string url) {
+	public static void OpenUrl (string url) {
 		if ((url == null) || (url == String.Empty))
-			return false;
+			return;
 
 		try {
-			Process process = Process.Start(url);
-			Thread.Sleep(250);
-			return (!process.HasExited);
+			Process.Start(url);
 		}
-		catch (Exception) {
-			return false;
+		catch (Exception e) {
+			Console.Error.WriteLine("Caught exception when trying to open url [{0}]: {1}", url, e);
 		}
 	}
 	
-	public static bool OpenSendEmail (string email) {
-		return OpenUrl("mailto:"; + email);
+	public static void OpenSendEmail (string email) {
+		OpenUrl("mailto:"; + email);
 	}
 
-	public static bool OpenBugReport () {
-		return OpenUrl("http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-subtitles";);
+	public static void OpenBugReport () {
+		OpenUrl("http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-subtitles";);
 	}
 	
 	public static bool IsPathValid (TreePath path) {



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