2002-10-04 Duncan Mak <duncan@ximian.com>
authorDuncan Mak <duncan@mono-cvs.ximian.com>
Fri, 4 Oct 2002 21:37:05 +0000 (21:37 -0000)
committerDuncan Mak <duncan@mono-cvs.ximian.com>
Fri, 4 Oct 2002 21:37:05 +0000 (21:37 -0000)
* main.cs (FileSelectionOk): Fix filename handling.
(OnQuitActivate): Added, so now we can properly quit from the
Quit menuitem.

svn path=/trunk/mcs/; revision=7992

mcs/doctools/gtk-monodoc/ChangeLog [new file with mode: 0644]
mcs/doctools/gtk-monodoc/gtk-monodoc.glade
mcs/doctools/gtk-monodoc/main.cs

diff --git a/mcs/doctools/gtk-monodoc/ChangeLog b/mcs/doctools/gtk-monodoc/ChangeLog
new file mode 100644 (file)
index 0000000..b142f98
--- /dev/null
@@ -0,0 +1,6 @@
+2002-10-04  Duncan Mak  <duncan@ximian.com>
+
+       * main.cs (FileSelectionOk): Fix filename handling.
+       (OnQuitActivate): Added, so now we can properly quit from the
+       Quit menuitem.
+
index ec934a0a4633a65619909c1bb884c4443cae79c8..2fada1c9df4fb44a05ceafdc08ba34e8f60a61f6 100644 (file)
@@ -7,6 +7,7 @@
 
 <widget class="GnomeApp" id="main-window">
   <property name="visible">True</property>
+  <property name="title" translatable="yes">Gtk-monodoc</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
@@ -72,6 +73,7 @@
                        <widget class="GtkImageMenuItem" id="quit1">
                          <property name="visible">True</property>
                          <property name="stock_item">GNOMEUIINFO_MENU_EXIT_ITEM</property>
+                         <signal name="activate" handler="OnQuitActivate" last_modification_time="Fri, 04 Oct 2002 21:11:57 GMT"/>
                        </widget>
                      </child>
                    </widget>
index ba01962a6f2dc20d3d7aee2731f860a665db4d35..b8aeabbe956ae0b4a7f64974684ba4bed360b863 100644 (file)
@@ -3,8 +3,11 @@
 //
 // Authors:
 //   Miguel de Icaza (miguel@ximian.com)
+//   Duncan Mak (duncan@ximian.com)
 //
 // (C) 2002 Ximian, Inc.
+//
+
 using GLib;
 using Gtk;
 using Gdk;
@@ -20,6 +23,7 @@ using System.Collections;
 using Mono.Document.Library;
 
 class DocumentationEditor {
+
        static void Main (string[] args)
        {
                DocumentationEditor de = new DocumentationEditor (args);
@@ -97,6 +101,11 @@ class DocumentationEditor {
                fsel_window.ShowAll ();
        }
 
+       void OnQuitActivate (object sender, EventArgs a)
+       {
+               program.Quit ();
+       }
+
        void OnAboutActivate (object sender, EventArgs a)
        {
                Pixbuf pixbuf = new Pixbuf (null, "mono.png");
@@ -104,7 +113,7 @@ class DocumentationEditor {
                About about = new About ("Mono Documentation Editor", "0.1",
                                         "Copyright (C) 2002 Ximian, Inc.",
                                         "",
-                                        new string [] { "Miguel de Icaza (miguel@ximian.com)" },
+                                        new string [] { "Miguel de Icaza (miguel@ximian.com)", "Duncan Mak (duncan@ximian.com" },
                                         new string [] { },
                                         "", pixbuf);
                about.Run ();
@@ -123,11 +132,12 @@ class DocumentationEditor {
                // Pull out all the namespaces first
                //
                namespaces = new Hashtable ();
-               
+
                foreach (DocType type in parser.DocTypes){
                        string ns = type.Namespace;
 
                        Hashtable h;
+
                        if (!namespaces.Contains (ns)){
                                h = new Hashtable ();
                                namespaces [ns] = h;
@@ -196,7 +206,7 @@ class DocumentationEditor {
        
        void FileSelectionOk (object o, EventArgs args)
        {
-               string filename = fsel_window.SelectionEntry.Text;
+               string filename = fsel_window.Filename;
 
                if (File.Exists (filename)){
                        DocParser parser = new DocParser (filename);