Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
fix the WebControl example
Browse files Browse the repository at this point in the history
svn path=/trunk/gtkmozembed-sharp/; revision=30482
  • Loading branch information
John Luke committed Jun 28, 2004
1 parent 2843480 commit 359a068
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
4 changes: 4 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2004-06-28 John Luke <jluke@cfl.rr.com>

* en/Gecko/WebControl.xml: fix the example

2004-06-25 Mike Kestner <mkestner@ximian.com>

* en/Gecko/*.xml : auto vm, handler, and args docage.
Expand Down
33 changes: 16 additions & 17 deletions doc/en/Gecko/WebControl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@
<para>
The following sample is a very minimal web browser.
</para>
<para>
Compile with: mcs GeckoTest.cs -pkg:gtk-sharp -pkg:gecko-sharp
</para>
<example>
<code language="C#">
using System;
using Gtk;
using GtkSharp;
using Gecko;

namespace GtkMozTest
namespace GeckoTest
{
class GtkMozTest
class GeckoTest
{
WebControl moz;
Entry entry;
Expand All @@ -37,28 +39,28 @@ namespace GtkMozTest

static void Main (string[] args)
{
new GtkMozTest ();
new GeckoTest ();
}

GtkMozTest ()
GeckoTest ()
{
Application.Init ();

Window win = new Window ("GtkMozTest");
Window win = new Window ("GeckoTest");
win.SetDefaultSize (800, 600);
win.DeleteEvent += new DeleteEventHandler (window_delete);

VBox vbox = new VBox (false, 1);
win.Add (vbox);

HBox tb = new HBox (true, 1);
Button btnBack = Button.NewFromStock (Gtk.Stock.GoBack);
Button btnBack = new Button (Gtk.Stock.GoBack);
btnBack.Clicked += new EventHandler (on_btnBack_clicked);
Button btnForward = Button.NewFromStock (Gtk.Stock.GoForward);
Button btnForward = new Button (Gtk.Stock.GoForward);
btnForward.Clicked += new EventHandler (on_btnForward_clicked);
Button btnStop = Button.NewFromStock (Gtk.Stock.Stop);
Button btnStop = new Button (Gtk.Stock.Stop);
btnStop.Clicked += new EventHandler (on_btnStop_clicked);
Button btnRefresh = Button.NewFromStock (Gtk.Stock.Refresh);
Button btnRefresh = new Button (Gtk.Stock.Refresh);
btnRefresh.Clicked += new EventHandler (on_btnRefresh_clicked);
tb.Add (btnBack);
tb.Add (btnForward);
Expand All @@ -83,8 +85,8 @@ namespace GtkMozTest

vbox.PackStart (hbox, false, false, 1);

moz = new WebControl ("/tmp/csharp", "GtkMozTest");
moz.LinkMessage += new EventHandler(on_moz_linkmessage);
moz = new WebControl ("/tmp/csharp", "GeckoTest");
moz.LinkMsg += new EventHandler(on_moz_linkmessage);
vbox.PackStart(moz, true, true, 1);

HBox hbox2 = new HBox (false, 1);
Expand Down Expand Up @@ -116,7 +118,7 @@ namespace GtkMozTest
void on_moz_linkmessage (object obj, EventArgs args)
{
sb.Pop (1);
sb.Push (1, moz.GeckoLinkMessage);
sb.Push (1, moz.LinkMessage);
}

void entry_activated (object obj, EventArgs args)
Expand Down Expand Up @@ -152,9 +154,6 @@ namespace GtkMozTest
}
</code>
</example>
<para>
Compile with: mcs GtkMozTest.cs -r gtk-sharp -r gecko-sharp
</para>
</remarks>
</Docs>
<Base>
Expand Down Expand Up @@ -1271,4 +1270,4 @@ namespace GtkMozTest
</Docs>
</Member>
</Members>
</Type>
</Type>

0 comments on commit 359a068

Please sign in to comment.