blam r590 - trunk/src
- From: atoker svn gnome org
- To: svn-commits-list gnome org
- Subject: blam r590 - trunk/src
- Date: Sun, 15 Jun 2008 19:56:01 +0000 (UTC)
Author: atoker
Date: Sun Jun 15 19:56:01 2008
New Revision: 590
URL: http://svn.gnome.org/viewvc/blam?rev=590&view=rev
Log:
Open links with an external browser
Modified:
trunk/src/ItemView.cs
Modified: trunk/src/ItemView.cs
==============================================================================
--- trunk/src/ItemView.cs (original)
+++ trunk/src/ItemView.cs Sun Jun 15 19:56:01 2008
@@ -57,8 +57,18 @@
ProxyUpdatedCb ();
Proxy.Updated += ProxyUpdatedCb;
+ mMoz.NavigationRequested += delegate (object sender, NavigationRequestedArgs args) {
+ try {
+ Gnome.Url.Show(args.Request.Uri);
+ }
+ catch (Exception e) {
+ Console.WriteLine("Couldn't show URL: " + args.Request.Uri + e.Message);
+ }
+
+ args.RetVal = NavigationResponse.Ignore;
+ };
+
#if USE_GECKO
- mMoz.OpenUri += new OpenUriHandler (LinkClickedCb);
mMoz.DestroyBrowser += new EventHandler (TitleChangedCb);
mMoz.NetStart += new EventHandler (NetStartCb);
mMoz.NetStop += new EventHandler (NetStopCb);
@@ -154,20 +164,6 @@
mMoz.LoadString (theme.Render(replaces), "text/html", "utf8", "file://" + theme.Path + "/");
}
-#if USE_GECKO
- private void LinkClickedCb(object obj, OpenUriArgs args)
- {
- try {
- Gnome.Url.Show(args.AURI);
- }
- catch (Exception e) {
- Console.WriteLine("Couldn't show URL: " + args.AURI + e.Message);
- }
-
- args.RetVal = true;
- }
-#endif
-
private void SetFonts ()
{
string varFont = Conf.Get (Preference.VARIABLE_FONT, "Sans 12");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]