[Mono-docs-list] window delete event for monodoc

Nick Drochak ndrochak@gol.com
21 Jan 2003 00:45:48 +0900


--=-anau3lGYI0c47srYbatQ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

Just like the debugger, monodoc needs the delete event hooked up. 
Here's a patch.

OK to commit this?

-- 
Nick D
<ndrochak at gol dot com>

--=-anau3lGYI0c47srYbatQ
Content-Disposition: attachment; filename=monodoc.patch
Content-Type: text/x-patch; name=monodoc.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: doctools/gtk-monodoc/main.cs
===================================================================
RCS file: /cvs/public/monodoc/doctools/gtk-monodoc/main.cs,v
retrieving revision 1.26
diff -u -r1.26 main.cs
--- doctools/gtk-monodoc/main.cs	10 Jan 2003 21:26:13 -0000	1.26
+++ doctools/gtk-monodoc/main.cs	20 Jan 2003 15:45:22 -0000
@@ -65,12 +65,21 @@
 	DocItem previous_item = DocItem.Empty;
 	XmlNode last_node = null;
 	
+	void Window_Delete (object obj, DeleteEventArgs args)
+	{
+		SignalArgs sa = (SignalArgs) args;
+		program.Quit();
+		sa.RetVal = true;
+	}
+
 	DocumentationEditor (string [] args)
 	{
 		program = new Program ("MonoDoc", "0.1", Modules.UI, args);
 		gxml = new Glade.XML (null, "gtk-monodoc.glade", null, null);
 
 		LoadWidgetPointers ();
+
+		main_window.DeleteEvent += new DeleteEventHandler (Window_Delete);
 
 		//
 		// Customize the TreeView

--=-anau3lGYI0c47srYbatQ--