diff --git a/ChangeLog b/ChangeLog index b2942cc9d..2c1477df5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ * generator/ManualGen.cs: Ditto * generator/SignalHandler.cs: Ditto * generator/StringGen.cs: Ditto + * sample/Subclass.cs: Added a DeleteEventHandler to the window widget, + this way a user can properly quit the sample. 2004-02-02 Mike Kestner diff --git a/sample/Subclass.cs b/sample/Subclass.cs index 6e1a2c899..a4ebbc43a 100755 --- a/sample/Subclass.cs +++ b/sample/Subclass.cs @@ -17,12 +17,18 @@ namespace GtkSamples { { Application.Init (); Window win = new Window ("Button Tester"); + win.DeleteEvent += new DeleteEventHandler (Quit); Button btn = new MyButton (); win.Add (btn); win.ShowAll (); Application.Run (); return 0; } + + static void Quit (object sender, DeleteEventArgs args) + { + Application.Quit(); + } } public class MyButton : Gtk.Button {