From 931d2e32037103231087a286b483e8ef42944535 Mon Sep 17 00:00:00 2001 From: Martin Willemoes Hansen Date: Mon, 2 Feb 2004 21:32:54 +0000 Subject: [PATCH] * sample/Subclass.cs: Added a DeleteEventHandler to the window widget, this way a user can properly quit the sample. svn path=/trunk/gtk-sharp/; revision=22711 --- ChangeLog | 2 ++ sample/Subclass.cs | 6 ++++++ 2 files changed, 8 insertions(+) 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 {