Author: mhutch
Date: 2007-12-03 16:47:34 -0500 (Mon, 03 Dec 2007)
New Revision: 90599
Modified:
trunk/monodevelop/Extras/GeckoWebBrowser/ChangeLog
trunk/monodevelop/Extras/GeckoWebBrowser/GeckoWebBrowser.cs
trunk/monodevelop/Extras/GeckoWebBrowser/GeckoWebBrowser.mdp
trunk/monodevelop/Extras/GeckoWebBrowser/gtk-gui/gui.stetic
Log:
* GeckoWebBrowser.cs: Workaround for On{Event} overridable methods not
executing even though events are fired. Partial fix for "Bug 345423
- project is not a registered protocol".
Modified: trunk/monodevelop/Extras/GeckoWebBrowser/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/GeckoWebBrowser/ChangeLog 2007-12-03 21:39:19 UTC
(rev 90598)
+++ trunk/monodevelop/Extras/GeckoWebBrowser/ChangeLog 2007-12-03 21:47:34 UTC
(rev 90599)
@@ -1,3 +1,9 @@
+2007-12-03 Michael Hutchinson <[EMAIL PROTECTED]>
+
+ * GeckoWebBrowser.cs: Workaround for On{Event} overridable methods not
+ executing even though events are fired. Partial fix for "Bug 345423 -
+ project is not a registered protocol".
+
2007-11-30 Michael Hutchinson <[EMAIL PROTECTED]>
* MonoDevelop.WebBrowsers.GeckoWebBrowser.addin.xml,
Modified: trunk/monodevelop/Extras/GeckoWebBrowser/GeckoWebBrowser.cs
===================================================================
--- trunk/monodevelop/Extras/GeckoWebBrowser/GeckoWebBrowser.cs 2007-12-03
21:39:19 UTC (rev 90598)
+++ trunk/monodevelop/Extras/GeckoWebBrowser/GeckoWebBrowser.cs 2007-12-03
21:47:34 UTC (rev 90599)
@@ -44,7 +44,27 @@
public GeckoWebBrowser ()
{
WebControl.SetProfilePath ("/tmp", "MonoDevelop");
+
+ //FIXME: On{Event} doesn't fire
this.ExposeEvent += exposeHandler;
+ this.OpenUri += delegate (object o, OpenUriArgs args) {
+ args.RetVal = OnLocationChanging (args.AURI);
+ };
+ this.LocChange += delegate (object sender, EventArgs e)
{
+ OnLocationChanged ();
+ };
+ this.Progress += delegate (object sender, ProgressArgs
e) {
+ OnLoadingProgressChanged (e.Curprogress /
e.Maxprogress);
+ };
+ this.ECMAStatus += delegate {
+ OnJSStatusChanged ();
+ };
+ this.LinkStatusChanged += delegate {
+ OnLinkStatusChanged ();
+ };
+ this.TitleChange += delegate {
+ OnTitleChanged ();
+ };
}
//FIXME: OnExposeEvent doesn't fire, but ExposeEvent does
@@ -173,48 +193,43 @@
public event StatusMessageChangedHandler LinkStatusChanged;
public event LoadingProgressChangedHandler
LoadingProgressChanged;
- protected override bool OnOpenUri (string aURI)
+ protected virtual bool OnLocationChanging (string aURI)
{
LocationChangingEventArgs args = new
LocationChangingEventArgs (aURI, false);
args.SuppressChange = false;
if (LocationChanging != null)
LocationChanging (this, args);
- return base.OnOpenUri (aURI) || args.SuppressChange;
+ return args.SuppressChange;
}
- protected override void OnLocChange ()
+ protected virtual void OnLocationChanged ()
{
if (LocationChanged != null)
LocationChanged (this, new
LocationChangedEventArgs (null));
- base.OnLocChange ();
}
- protected override void OnProgress (int curprogress, int
maxprogress)
+ protected virtual void OnLoadingProgressChanged (float progress)
{
if (LoadingProgressChanged != null)
- LoadingProgressChanged (this, new
LoadingProgressChangedEventArgs (curprogress / maxprogress));
- base.OnProgress (curprogress, maxprogress);
+ LoadingProgressChanged (this, new
LoadingProgressChangedEventArgs (progress));
}
- protected override void OnECMAStatus ()
+ protected virtual void OnJSStatusChanged ()
{
if (JSStatusChanged != null)
JSStatusChanged (this, new
StatusMessageChangedEventArgs (base.JsStatus));
- base.OnECMAStatus ();
}
- protected override void OnLinkMsg ()
+ protected virtual void OnLinkStatusChanged ()
{
if (LinkStatusChanged != null)
LinkStatusChanged (this, new
StatusMessageChangedEventArgs (base.LinkMessage));
- base.OnLinkMsg ();
}
- protected override void OnTitleChange ()
+ protected virtual void OnTitleChanged ()
{
if (TitleChanged != null)
TitleChanged (this, new TitleChangedEventArgs
(base.Title));
- base.OnTitleChange ();
}
}
}
Modified: trunk/monodevelop/Extras/GeckoWebBrowser/GeckoWebBrowser.mdp
===================================================================
--- trunk/monodevelop/Extras/GeckoWebBrowser/GeckoWebBrowser.mdp
2007-12-03 21:39:19 UTC (rev 90598)
+++ trunk/monodevelop/Extras/GeckoWebBrowser/GeckoWebBrowser.mdp
2007-12-03 21:47:34 UTC (rev 90599)
@@ -23,15 +23,17 @@
<File name="Makefile.am" subtype="Code" buildaction="Nothing" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp,
Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp,
Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Gac" localcopy="True" refto="gecko-sharp,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=ccf7d78a55e9f021" />
<ProjectReference type="Project" localcopy="False"
refto="MonoDevelop.Core.Gui" />
<ProjectReference type="Gac" localcopy="True" refto="Mono.Posix,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
<ProjectReference type="Project" localcopy="False"
refto="MonoDevelop.Core" />
- <ProjectReference type="Gac" localcopy="True" refto="glib-sharp,
Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp,
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp,
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="glib-sharp,
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="pango-sharp,
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="atk-sharp,
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
</References>
- <GtkDesignInfo gtkVersion="2.10.2" />
+ <GtkDesignInfo gtkVersion="2.8.3" />
<MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True"
RelativeMakefileName="Makefile.am" BuildTargetName="" CleanTargetName=""
SyncReferences="True" IsAutotoolsProject="True" RelativeConfigureInPath="../..">
<BuildFilesVar Sync="True" Name="FILES" />
<DeployFilesVar />
Modified: trunk/monodevelop/Extras/GeckoWebBrowser/gtk-gui/gui.stetic
===================================================================
--- trunk/monodevelop/Extras/GeckoWebBrowser/gtk-gui/gui.stetic 2007-12-03
21:39:19 UTC (rev 90598)
+++ trunk/monodevelop/Extras/GeckoWebBrowser/gtk-gui/gui.stetic 2007-12-03
21:47:34 UTC (rev 90599)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<stetic-interface>
<configuration>
- <target-gtk-version>2.10.2</target-gtk-version>
+ <target-gtk-version>2.8.3</target-gtk-version>
</configuration>
</stetic-interface>
\ No newline at end of file
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches