[banshee/gio-hardware] [Banshee.Web] Add silent Open override
- From: Alex Launi <alexlauni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/gio-hardware] [Banshee.Web] Add silent Open override
- Date: Fri, 13 Aug 2010 15:25:28 +0000 (UTC)
commit 91c7ef6ca03fcc989a70f132f328788b4c6baae9
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Aug 10 17:06:57 2010 -0700
[Banshee.Web] Add silent Open override
src/Core/Banshee.Services/Banshee.Web/Browser.cs | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Web/Browser.cs b/src/Core/Banshee.Services/Banshee.Web/Browser.cs
index e76af48..4881c90 100644
--- a/src/Core/Banshee.Services/Banshee.Web/Browser.cs
+++ b/src/Core/Banshee.Services/Banshee.Web/Browser.cs
@@ -49,6 +49,11 @@ namespace Banshee.Web
public static bool Open (string url)
{
+ return Open (url, true);
+ }
+
+ public static bool Open (string url, bool showErrors)
+ {
try {
url = Uri.EscapeUriString (url);
if (open_handler != null) {
@@ -58,9 +63,11 @@ namespace Banshee.Web
return true;
}
} catch(Exception e) {
- Log.Warning (Catalog.GetString ("Could not launch URL"),
- String.Format (Catalog.GetString ("{0} could not be opened: {1}\n\n " +
- "Check your 'Preferred Applications' settings."), url, e.Message), true);
+ if (showErrors) {
+ Log.Warning (Catalog.GetString ("Could not launch URL"),
+ String.Format (Catalog.GetString ("{0} could not be opened: {1}\n\n " +
+ "Check your 'Preferred Applications' settings."), url, e.Message), true);
+ }
return false;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]