Author: joshua
Date: 2005-06-09 11:03:39 -0400 (Thu, 09 Jun 2005)
New Revision: 45707

Modified:
   trunk/monodoc/tools/ChangeLog
   trunk/monodoc/tools/monodocer.cs
Log:
2005-06-09  Joshua Tauberer  <[EMAIL PROTECTED]>

    * monodocer.cs : When documenting a single assembly,
      default the Title in index.xml to the name of the
      assembly.



Modified: trunk/monodoc/tools/ChangeLog
===================================================================
--- trunk/monodoc/tools/ChangeLog       2005-06-09 14:52:24 UTC (rev 45706)
+++ trunk/monodoc/tools/ChangeLog       2005-06-09 15:03:39 UTC (rev 45707)
@@ -1,3 +1,17 @@
+2005-06-09  Joshua Tauberer  <[EMAIL PROTECTED]>
+
+       * monodocer.cs : When documenting a single assembly,
+         default the Title in index.xml to the name of the
+         assembly.
+
+2005-06-04  Eric Butler  <[EMAIL PROTECTED]>
+
+       (copied from ChangeLog in parent directory)
+    * monodocer.cs
+               - Now exits with an exit code of 1 in the event of an error
+               - Added '-name' command line argument
+               - Use above argument for <Title> element
+
 2005-06-01  Joshua Tauberer <[EMAIL PROTECTED]>
 
        * monodocer.cs : Old index.xml files need to have new nodes

Modified: trunk/monodoc/tools/monodocer.cs
===================================================================
--- trunk/monodoc/tools/monodocer.cs    2005-06-09 14:52:24 UTC (rev 45706)
+++ trunk/monodoc/tools/monodocer.cs    2005-06-09 15:03:39 UTC (rev 45707)
@@ -53,7 +53,7 @@
                public bool ignoremembers = false;
 
                [Option("The {name} of the project this documentation is for.")]
-               public string name = "Untitled";
+               public string name;
        }
        
        private static int n(object o) {
@@ -303,7 +303,14 @@
                        index = CreateIndexStub();
                }
                
-               WriteElementInitialText(index.DocumentElement, "Title", name);
+               if (name == null) {
+                       string defaultTitle = "Untitled";
+                       if (assemblies.Length == 1)
+                               defaultTitle = assemblies[0].GetName().Name;
+                       WriteElementInitialText(index.DocumentElement, "Title", 
defaultTitle);
+               } else {
+                       WriteElementText(index.DocumentElement, "Title", name);
+               }
                
                XmlElement index_types = WriteElement(index.DocumentElement, 
"Types");
                XmlElement index_assemblies = 
WriteElement(index.DocumentElement, "Assemblies");

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to