Author: mkestner
Date: 2005-04-27 13:59:29 -0400 (Wed, 27 Apr 2005)
New Revision: 43671

Removed:
   trunk/monodoc/browser/Contributions.cs
   trunk/monodoc/browser/admin.cs
   trunk/monodoc/browser/admin.glade
Modified:
   trunk/monodoc/browser/ChangeLog
   trunk/monodoc/browser/Makefile.am
Log:

2005-04-27 Mike Kestner <[EMAIL PROTECTED]>

        * Makefile.am : removed the admin.exe targets.
        * admin.* : moved to mono-tools/monodoc-browser.


Modified: trunk/monodoc/browser/ChangeLog
===================================================================
--- trunk/monodoc/browser/ChangeLog     2005-04-27 17:45:29 UTC (rev 43670)
+++ trunk/monodoc/browser/ChangeLog     2005-04-27 17:59:29 UTC (rev 43671)
@@ -1,3 +1,8 @@
+2005-04-27 Mike Kestner <[EMAIL PROTECTED]>
+
+       * Makefile.am : removed the admin.exe targets.
+       * admin.* : moved to mono-tools/monodoc-browser.
+
 2005-04-22 Mike Kestner <[EMAIL PROTECTED]>
 
        * Makefile.am : removed the browser.exe targets. Use /package monodoc.

Deleted: trunk/monodoc/browser/Contributions.cs
===================================================================
--- trunk/monodoc/browser/Contributions.cs      2005-04-27 17:45:29 UTC (rev 
43670)
+++ trunk/monodoc/browser/Contributions.cs      2005-04-27 17:59:29 UTC (rev 
43671)
@@ -1,235 +0,0 @@
-// 
------------------------------------------------------------------------------
-//  <autogenerated>
-//      This code was generated by a tool.
-//      Mono Runtime Version: 1.1.4322.573
-// 
-//      Changes to this file may cause incorrect behavior and will be lost if 
-//      the code is regenerated.
-//  </autogenerated>
-// 
------------------------------------------------------------------------------
-
-
-/// <remarks/>
-/// <remarks>
-/// Web service for the MonoDoc contribution system
-/// </remarks>
-[System.Web.Services.WebServiceBinding(Name="ContributionsSoap",Namespace="http://tempuri.org/";),
-System.Diagnostics.DebuggerStepThroughAttribute(),
-System.ComponentModel.DesignerCategoryAttribute("code")]
-public class ContributionsSoap : 
System.Web.Services.Protocols.SoapHttpClientProtocol {
-
-    public ContributionsSoap () {
-        this.Url = "http://localhost:8080/server.asmx";;
-    }
-
-    /// <remarks>
-    /// Check the client/server version;  0 means that the server can consume 
your data
-    /// </remarks>
-    
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckVersion",RequestNamespace="http://tempuri.org/",ResponseNamespace="http://tempuri.org/",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
-    public virtual int CheckVersion(int version) {
-        System.Object[] results = this.Invoke("CheckVersion", new object[] {
-            version});
-        return ((int)(results[0]));
-    }
-
-    public virtual System.IAsyncResult BeginCheckVersion(int version, 
System.AsyncCallback callback, object asyncState) {
-        return this.BeginInvoke("CheckVersion", new object[] {
-            version}, callback, asyncState);
-    }
-
-    public virtual int EndCheckVersion(System.IAsyncResult asyncResult) {
-        System.Object[] results = this.EndInvoke(asyncResult);
-        return ((int)(results[0]));
-    }
-
-    /// <remarks>
-    /// Requests a registration for a login
-    /// </remarks>
-    
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Register",RequestNamespace="http://tempuri.org/",ResponseNamespace="http://tempuri.org/",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
-    public virtual int Register(string login) {
-        System.Object[] results = this.Invoke("Register", new object[] {
-            login});
-        return ((int)(results[0]));
-    }
-
-    public virtual System.IAsyncResult BeginRegister(string login, 
System.AsyncCallback callback, object asyncState) {
-        return this.BeginInvoke("Register", new object[] {
-            login}, callback, asyncState);
-    }
-
-    public virtual int EndRegister(System.IAsyncResult asyncResult) {
-        System.Object[] results = this.EndInvoke(asyncResult);
-        return ((int)(results[0]));
-    }
-
-    /// <remarks>
-    /// Returns the latest serial number used for a change on the server
-    /// </remarks>
-    
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSerial",RequestNamespace="http://tempuri.org/",ResponseNamespace="http://tempuri.org/",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
-    public virtual int GetSerial(string login, string password) {
-        System.Object[] results = this.Invoke("GetSerial", new object[] {
-            login,
-            password});
-        return ((int)(results[0]));
-    }
-
-    public virtual System.IAsyncResult BeginGetSerial(string login, string 
password, System.AsyncCallback callback, object asyncState) {
-        return this.BeginInvoke("GetSerial", new object[] {
-            login,
-            password}, callback, asyncState);
-    }
-
-    public virtual int EndGetSerial(System.IAsyncResult asyncResult) {
-        System.Object[] results = this.EndInvoke(asyncResult);
-        return ((int)(results[0]));
-    }
-
-    /// <remarks>
-    /// Submits a GlobalChangeSet as a contribution
-    /// </remarks>
-    
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Submit",RequestNamespace="http://tempuri.org/",ResponseNamespace="http://tempuri.org/",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
-    public virtual int Submit(string login, string password, 
System.Xml.XmlElement node) {
-        System.Object[] results = this.Invoke("Submit", new object[] {
-            login,
-            password,
-            node});
-        return ((int)(results[0]));
-    }
-
-    public virtual System.IAsyncResult BeginSubmit(string login, string 
password, System.Xml.XmlElement node, System.AsyncCallback callback, object 
asyncState) {
-        return this.BeginInvoke("Submit", new object[] {
-            login,
-            password,
-            node}, callback, asyncState);
-    }
-
-    public virtual int EndSubmit(System.IAsyncResult asyncResult) {
-        System.Object[] results = this.EndInvoke(asyncResult);
-        return ((int)(results[0]));
-    }
-
-    /// <remarks>
-    /// Obtains the list of pending contributions
-    /// </remarks>
-    
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPendingChanges",RequestNamespace="http://tempuri.org/",ResponseNamespace="http://tempuri.org/",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
-    public virtual PendingChange[] GetPendingChanges(string login, string 
password) {
-        System.Object[] results = this.Invoke("GetPendingChanges", new 
object[] {
-            login,
-            password});
-        return ((PendingChange[])(results[0]));
-    }
-
-    public virtual System.IAsyncResult BeginGetPendingChanges(string login, 
string password, System.AsyncCallback callback, object asyncState) {
-        return this.BeginInvoke("GetPendingChanges", new object[] {
-            login,
-            password}, callback, asyncState);
-    }
-
-    public virtual PendingChange[] EndGetPendingChanges(System.IAsyncResult 
asyncResult) {
-        System.Object[] results = this.EndInvoke(asyncResult);
-        return ((PendingChange[])(results[0]));
-    }
-
-    /// <remarks>
-    /// Obtains a change set for a user
-    /// </remarks>
-    
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/FetchContribution",RequestNamespace="http://tempuri.org/",ResponseNamespace="http://tempuri.org/",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
-    public virtual System.Xml.XmlElement FetchContribution(string login, 
string password, int person_id, int serial) {
-        System.Object[] results = this.Invoke("FetchContribution", new 
object[] {
-            login,
-            password,
-            person_id,
-            serial});
-        return ((System.Xml.XmlElement)(results[0]));
-    }
-
-    public virtual System.IAsyncResult BeginFetchContribution(string login, 
string password, int person_id, int serial, System.AsyncCallback callback, 
object asyncState) {
-        return this.BeginInvoke("FetchContribution", new object[] {
-            login,
-            password,
-            person_id,
-            serial}, callback, asyncState);
-    }
-
-    public virtual System.Xml.XmlElement 
EndFetchContribution(System.IAsyncResult asyncResult) {
-        System.Object[] results = this.EndInvoke(asyncResult);
-        return ((System.Xml.XmlElement)(results[0]));
-    }
-
-    /// <remarks>
-    /// ADMIN: Obtains the number of pending commits
-    /// </remarks>
-    
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetStatus",RequestNamespace="http://tempuri.org/",ResponseNamespace="http://tempuri.org/",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
-    public virtual Status GetStatus(string login, string password) {
-        System.Object[] results = this.Invoke("GetStatus", new object[] {
-            login,
-            password});
-        return ((Status)(results[0]));
-    }
-
-    public virtual System.IAsyncResult BeginGetStatus(string login, string 
password, System.AsyncCallback callback, object asyncState) {
-        return this.BeginInvoke("GetStatus", new object[] {
-            login,
-            password}, callback, asyncState);
-    }
-
-    public virtual Status EndGetStatus(System.IAsyncResult asyncResult) {
-        System.Object[] results = this.EndInvoke(asyncResult);
-        return ((Status)(results[0]));
-    }
-
-    /// <remarks>
-    /// ADMIN: Updates the status of a contribution
-    /// </remarks>
-    
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateStatus",RequestNamespace="http://tempuri.org/",ResponseNamespace="http://tempuri.org/",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
-    public virtual void UpdateStatus(string login, string password, int 
person_id, int contrib_id, int status) {
-        this.Invoke("UpdateStatus", new object[] {
-            login,
-            password,
-            person_id,
-            contrib_id,
-            status});
-    }
-
-    public virtual System.IAsyncResult BeginUpdateStatus(string login, string 
password, int person_id, int contrib_id, int status, System.AsyncCallback 
callback, object asyncState) {
-        return this.BeginInvoke("UpdateStatus", new object[] {
-            login,
-            password,
-            person_id,
-            contrib_id,
-            status}, callback, asyncState);
-    }
-
-    public virtual void EndUpdateStatus(System.IAsyncResult asyncResult) {
-        this.EndInvoke(asyncResult);
-    }
-}
-
-/// <remarks/>
-[System.Xml.Serialization.XmlType(Namespace="http://tempuri.org/";)]
-public class PendingChange {
-
-    /// <remarks/>
-    public string Login;
-
-    /// <remarks/>
-    public int ID;
-
-    /// <remarks/>
-    public int Serial;
-}
-
-/// <remarks/>
-[System.Xml.Serialization.XmlType(Namespace="http://tempuri.org/";)]
-public class Status {
-
-    /// <remarks/>
-    public int Contributions;
-
-    /// <remarks/>
-    public int Commited;
-
-    /// <remarks/>
-    public int Pending;
-}
-

Modified: trunk/monodoc/browser/Makefile.am
===================================================================
--- trunk/monodoc/browser/Makefile.am   2005-04-27 17:45:29 UTC (rev 43670)
+++ trunk/monodoc/browser/Makefile.am   2005-04-27 17:59:29 UTC (rev 43671)
@@ -38,18 +38,12 @@
 dump_sources      = \
        $(srcdir)/dump.cs 
 
-admin_sources = \
-       $(srcdir)/admin.cs              \
-       $(srcdir)/Contributions.cs
-
 validate_sources = \
        $(srcdir)/validate.cs
 
 cs2ecma_sources = \
        $(srcdir)/cs2ecma.cs
 
-browser_assemblies = -pkg:gtkhtml-sharp -pkg:glade-sharp -r:System.Web.Services
-
 EXTRA_DIST = \
        $(monodoc_sources) $(assembler_sources) \
        $(dump_sources)                         \
@@ -59,14 +53,11 @@
        ecmaspec-html.xsl mod.cs                \
        AssemblyInfo.cs.in $(cs2ecma_sources)
 
-monodoc_FILES = assembler.exe normalize.exe admin.exe validate.exe cs2ecma.exe
+monodoc_FILES = assembler.exe normalize.exe validate.exe cs2ecma.exe
 
 assembler.exe: $(assembler_sources) monodoc.dll
        $(CSC) /debug /out:assembler.exe $(assembler_sources) 
-r:ICSharpCode.SharpZipLib.dll -r:./monodoc.dll
 
-admin.exe: $(admin_sources) $(srcdir)/admin.glade monodoc.dll
-       $(CSC) -debug -out:admin.exe $(admin_sources) 
-resource:$(srcdir)/admin.glade,admin.glade -r:./monodoc.dll 
$(browser_assemblies) -r:System.Drawing
-
 dump.exe: $(dump_sources) monodoc.dll
        $(CSC) -debug -out:dump.exe $(dump_sources)  
-r:ICSharpCode.SharpZipLib.dll -r:./monodoc.dll
 
@@ -88,12 +79,6 @@
 monodoc.dll.config: $(srcdir)/monodoc.dll.config.in Makefile
        if sed 's,@''monodoc_refdir@,$(monodoc_refdir),' 
$(srcdir)/monodoc.dll.config.in > [EMAIL PROTECTED]; then mv [EMAIL PROTECTED] 
$@; else rm -f [EMAIL PROTECTED] ; exit 1; fi
 
-b: browser.exe
-       MONO_PATH=. mono --debug browser.exe
-
-c: admin.exe
-       MONO_PATH=. mono --debug admin.exe
-
 mod.exe: mod.cs monodoc.dll
        $(CSC) $(srcdir)/mod.cs -r:./monodoc.dll -out:mod.exe
 

Deleted: trunk/monodoc/browser/admin.cs
===================================================================
--- trunk/monodoc/browser/admin.cs      2005-04-27 17:45:29 UTC (rev 43670)
+++ trunk/monodoc/browser/admin.cs      2005-04-27 17:59:29 UTC (rev 43671)
@@ -1,494 +0,0 @@
-//
-// admin.cs: Mono collaborative documentation adminsitration tool.
-//
-// Author:
-//   Miguel de Icaza
-//
-// (C) 2003 Novell, Inc.
-//
-using Gtk;
-using GtkSharp;
-using Glade;
-using System;
-using System.IO;
-using System.Xml;
-using System.Collections;
-using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-namespace Monodoc {
-class AdminDriver {
-       static int Main (string [] args)
-       {
-               bool real_server = true;
-               
-               if (Environment.GetEnvironmentVariable ("MONODOCTESTING") != 
null)
-                       real_server = false;
-               
-               Settings.RunningGUI = true;
-               Application.Init ();
-               Admin admin = new Admin (real_server);
-               Application.Run ();
-               return 0;
-       }
-}
-
-
-
-class Admin {
-       Glade.XML ui;
-       [Widget] Window main_window;
-       [Widget] ScrolledWindow container, review_container;
-       [Widget] Statusbar statusbar;
-       [Widget] Notebook notebook;
-       [Widget] TextView text_ondisk;
-       [Widget] TextView text_diff;
-       [Widget] TextView text_current;
-       uint contextid;
-       
-       HTML html, html_review;
-       
-       ContributionsSoap d;
-       string login = SettingsHandler.Settings.Email;
-       string pass = SettingsHandler.Settings.Key;
-       PendingChange [] changes;
-       
-       public Admin (bool real_server)
-       {
-               LoadProviders ();
-               ui = new Glade.XML (null, "admin.glade", "main_window", null);
-               ui.Autoconnect (this);
-               contextid = statusbar.GetContextId ("");
-               
-               main_window.DeleteEvent += new DeleteEventHandler 
(OnDeleteEvent);
-               d = new ContributionsSoap ();
-               if (real_server)
-                       d.Url = "http://www.go-mono.com/docs/server.asmx";;
-               
-               html = new HTML ();
-                html.LinkClicked += new LinkClickedHandler (LinkClicked);
-               html.Show ();
-               html.SetSizeRequest (700, 500);
-               container.Add (html);
-
-               html_review = new HTML ();
-               html_review.LinkClicked += new LinkClickedHandler 
(ReviewLinkClicked);
-               html_review.Show ();
-               review_container.Add (html_review);
-       }
-
-       bool Decouple (string prefix, string url, out int id, out int serial)
-       {
-               if (!url.StartsWith (prefix)){
-                       id = 0;
-                       serial = 0;
-                       return false;
-               }
-
-               string rest = url.Substring (prefix.Length);
-               int p = rest.IndexOf ('$');
-               string sid = rest.Substring (0, p);
-               string sserial = rest.Substring (p+1);
-
-               id = int.Parse (sid);
-               serial = int.Parse (sserial);
-               
-               return true;
-       }
-       
-        void LinkClicked (object o, LinkClickedArgs args)
-       {
-               string url = args.Url;
-               int id, serial;
-
-               Console.WriteLine ("Got: " + url);
-               if (Decouple ("review:", url, out id, out serial)){
-                       RenderReview (id, serial);
-                       return;
-               }
-
-               Console.WriteLine ("Unhandled url: " + url);
-       }
-
-       class FileAction {
-               public GlobalChangeset globalset;
-               public DocSetChangeset docset;
-               public FileChangeset fileset;
-               
-               public FileAction (GlobalChangeset gs, DocSetChangeset ds, 
FileChangeset fs)
-               {
-                       globalset = gs;
-                       docset = ds;
-                       fileset = fs;
-               }
-       }
-
-       class ItemAction {
-               public GlobalChangeset globalset;
-               public DocSetChangeset docset;
-               public FileChangeset fileset;
-               public Change change;
-               
-               public ItemAction (GlobalChangeset gs, DocSetChangeset ds, 
FileChangeset fs, Change c)
-               {
-                       globalset = gs;
-                       docset = ds;
-                       fileset = fs;
-                       change = c;
-               }
-       }
-       
-       void ApplyFile (FileAction fa)
-       {
-               XmlDocument d = LoadDocument (fa.docset, fa.fileset.RealFile);
-
-               foreach (Change c in fa.fileset.Changes){
-                       XmlNode old = d.SelectSingleNode (c.XPath);
-                       if (old != null)
-                               old.ParentNode.ReplaceChild (d.ImportNode 
(c.NewNode, true), old);
-                       
-               }
-               SaveDocument (d, fa.docset, fa.fileset);
-       }
-
-       void ApplyItem (ItemAction fa)
-       {
-               XmlDocument d = LoadDocument (fa.docset, fa.fileset.RealFile);
-
-               XmlNode old = d.SelectSingleNode (fa.change.XPath);
-               if (old != null)
-                       old.ParentNode.ReplaceChild (d.ImportNode 
(fa.change.NewNode, true), old);
-
-               SaveDocument (d, fa.docset, fa.fileset);
-       }
-
-       static void WriteNode (string file, string str)
-       {
-               using (FileStream s = File.Create (file)){
-                       using (StreamWriter sw = new StreamWriter (s)){
-                               sw.Write (str);
-                       }
-               }
-       }
-       
-       void DiffChangeItem (ItemAction fa)
-       {
-               XmlDocument d = LoadDocument (fa.docset, fa.fileset.RealFile);
-
-               XmlNode orig = d.SelectSingleNode (fa.change.XPath);
-               XmlNode newn = fa.change.NewNode;
-
-               text_ondisk.Buffer.Text = orig.InnerXml;
-               text_current.Buffer.Text = newn.InnerXml;
-
-               WriteNode ("/tmp/file-1", orig.InnerXml);
-               WriteNode ("/tmp/file-2", newn.InnerXml);
-               
-               Process diffp = new Process ();
-               diffp.StartInfo.FileName = "diff";
-               diffp.StartInfo.Arguments = "-uw /tmp/file-1 /tmp/file-2";
-               diffp.StartInfo.UseShellExecute = false;
-               diffp.StartInfo.RedirectStandardOutput = true;
-               diffp.Start ();
-               
-               text_diff.Buffer.Text = "=" + diffp.StandardOutput.ReadToEnd ();
-               diffp.WaitForExit ();
-       }
-       
-       void SaveDocument (XmlDocument d, DocSetChangeset docset, FileChangeset 
fileset)
-       {
-               string basedir = (string) providers [docset.DocSet];
-               string file = basedir + "/" + fileset.RealFile;
-               
-               d.Save (file);
-               RenderReview (current_id, current_serial);
-       }
-       
-       void ReviewLinkClicked (object o, LinkClickedArgs args)
-       {
-               string url = args.Url;
-               int id, serial;
-
-               if (Decouple ("flag-done:", url, out id, out serial)){
-                       d.UpdateStatus (login, pass, id, serial, 1);
-                       notebook.Page = 0;
-                       return;
-               }
-
-               if (url.StartsWith ("apply-file:")){
-                       string rest = url.Substring (11);
-                       
-                       ApplyFile ((FileAction) action_map [Int32.Parse 
(rest)]);
-                       return;
-               }
-
-               if (url.StartsWith ("apply-change:")){
-                       string rest = url.Substring (13);
-                       
-                       ApplyItem ((ItemAction) action_map [Int32.Parse 
(rest)]);
-                       return;
-               }
-
-               if (url.StartsWith ("diff-change:")){
-                       string rest = url.Substring (12);
-                       DiffChangeItem ((ItemAction) action_map [Int32.Parse 
(rest)]);
-                       
-                       notebook.Page = 2;
-               }
-               
-               Console.WriteLine ("Unhandled url: " + url);
-       }
-       
-       Hashtable cache = new Hashtable ();
-       
-       GlobalChangeset LoadReview (int id, int serial)
-       {
-               string key = String.Format ("{0}:{1}", id, serial);
-               if (cache [key] != null)
-                       return (GlobalChangeset) cache [key];
-
-               //
-               // Download contribution
-               //
-               XmlNode n = d.FetchContribution (login, pass, id, serial);
-
-               //
-               // Parse into GlobalChangeset
-               //
-               XmlDocument doc = new XmlDocument ();
-               doc.AppendChild (doc.ImportNode (n, true));
-               XmlNodeReader r = new XmlNodeReader (doc);
-               GlobalChangeset s;
-               try {
-                       s = (GlobalChangeset) 
GlobalChangeset.serializer.Deserialize (r);
-               } catch (Exception e) {
-                       Console.WriteLine ("Error: " + e);
-                       Status = "Invalid contribution obtained from server: " 
+ key;
-                       return null;
-               }
-               
-               cache [key] = s;
-               return s;
-       }
-
-       Hashtable action_map;
-       int current_id, current_serial;
-
-       //
-       // Renders the id/serial representation for review by the administrator.
-       //
-       void RenderReview (int id, int serial)
-       {
-               current_id = id;
-               current_serial = serial;
-               
-               notebook.Page = 1;
-
-               GlobalChangeset globalset;
-               globalset = LoadReview (id, serial);
-
-               HTMLStream s = html_review.Begin ("text/html");
-               s.Write ("<html><body>");
-               if (globalset == null){
-                       s.Write ("No data found");
-                       html_review.End (s, HTMLStreamStatus.Ok);
-                       return;
-               }
-
-               int key = 0;
-               action_map = new Hashtable ();
-               
-               //
-               // First make sure we dont have sources that we dont know about,
-               // so a contribution can not be flagged as done by accident
-               //
-               bool allow_flag_as_done = true;
-               foreach (DocSetChangeset docset in globalset.DocSetChangesets){
-                       if (!providers.Contains (docset.DocSet)){
-                               s.Write (String.Format ("<font 
color='red'>Warning: Skipping {0}</font>", docset.DocSet));
-                               allow_flag_as_done = false;
-                               continue;
-                       }
-               }
-
-               if (allow_flag_as_done)
-                       s.Write (String.Format ("<h1>Changes: <a 
href=\"flag-done:{0}${1}\">[Flag as Done]</a></h1>", id, serial));
-
-               foreach (DocSetChangeset docset in globalset.DocSetChangesets){
-                       if (!providers.Contains (docset.DocSet))
-                               continue;
-                       
-                       if (docset == null){
-                               s.Write ("Null?");
-                               continue;
-                       }
-                       string ds;
-
-                       ds = String.Format ("<table width='100%' 
bgcolor='#aabbaa'><tr><td>Docset: {0}</td></tr></table>", docset.DocSet);
-                       foreach (FileChangeset fileset in 
docset.FileChangesets){
-                               string fs, es = null;
-
-                               fs = String.Format ("<h3><a 
href=\"apply-file:{0}\">[Apply]</a> File: {1} <br><blockquote>",
-                                                   key, fileset.RealFile);
-                               
-                               action_map [key++] = new FileAction (globalset, 
docset, fileset);
-
-                               if (fileset.RealFile == null){
-                                       s.Write (String.Format ("Warning: 
invalid contribution, its missing filename"));
-                                       continue;
-                               }
-                               XmlDocument d = LoadDocument (docset, 
fileset.RealFile);
-                               
-                               foreach (Change c in fileset.Changes){
-                                       XmlNode orig = d.SelectSingleNode 
(c.XPath);
-                                       XmlNode newn = c.NewNode;
-
-                                       if (orig == null){
-                                               s.Write (String.Format 
("Warning, node {0} does not exist", c.XPath));
-                                               continue;
-                                       }
-
-                                       if (ds != null) { s.Write (ds); ds = 
null; }
-                                       if (fs != null) { s.Write (fs); fs = 
null; es = "</blockquote>"; }
-
-                                       string original_text = orig.InnerXml;
-                                       string new_text = c.NewNode.InnerXml;
-
-                                       if (original_text == new_text){
-                                               //s.Write 
("<b>Applied</b><br>");
-                                               continue;
-                                       }
-                                       
-                                       int p = c.XPath.LastIndexOf ("/");
-                                       s.Write (String.Format ("<a 
href=\"diff-change:{0}\">[Diff]</a>", key));
-                                       s.Write (String.Format ("<a 
href=\"apply-change:{0}\">[Apply]</a>: {1} ", key, c.XPath));
-                                       if (c.FromVersion != 
RootTree.MonodocVersion)
-                                               s.Write ("<b>FROM OLD 
VERSION</b>");
-                                       action_map [key++] = new ItemAction 
(globalset, docset, fileset, c);
-                                       s.Write ("<table border=1 
width=100%><tr bgcolor=grey><td width=50%>Current</td><td width=50%>New</td>");
-
-                                       s.Write ("<tr>");
-                                       s.Write (String.Format ("<td>{0}</td>", 
Htmlize (original_text)));
-                                       
-                                       s.Write ("<td>");
-                                       s.Write (Htmlize (new_text));
-                                       s.Write ("</td></tr>");
-                                       s.Write ("</table>");
-                               }
-                               if (es != null) s.Write (es);
-                       }
-               }
-               s.Write ("</body></html>");
-               html_review.End (s, HTMLStreamStatus.Ok);
-       }
-
-       //
-       // Colorizes the ECMA XML documentation into some pretty HTML
-       //
-       string Htmlize (string s)
-       {
-               string r = s.Replace ("<", "&lt;").Replace (">", 
"&gt;</font>").Replace ("&lt;", "<font color='blue'>&lt;").Replace
-                       ("/para&gt;</font>", "para&gt;</font><p>");
-               return r;
-       }
-
-       //
-       // Loads the `file' from a DocSetChangeset
-       //
-       XmlDocument LoadDocument (DocSetChangeset ds, string file)
-       {
-               XmlDocument d = new XmlDocument ();
-               string basedir = (string) providers [ds.DocSet];
-               d.Load (basedir + "/" + file);
-               return d;
-       }
-
-       void OnDeleteEvent (object o, DeleteEventArgs args)
-       {
-               Application.Quit ();
-       }
-
-       void RenderChanges ()
-       {
-               notebook.Page = 0;
-               HTMLStream s = html.Begin ("text/html");
-               if (changes != null){
-                       s.Write ("<h1>Pending Changes</h1>");
-                       int i = 0;
-                       foreach (PendingChange ch in changes){
-                               s.Write (String.Format ("{3}: <a 
href=\"review:{0}${1}\">{2}</a><br>", ch.ID, ch.Serial, ch.Login, i++));
-                       }
-               } else {
-                       s.Write ("<h1>No pending changes on the server</h1>");
-               }
-               html.End (s, HTMLStreamStatus.Ok);
-       }
-       
-       void OnCheckUpdatesClicked (object o, EventArgs args)
-       {
-               Status = "Loading";
-               try {
-                       changes = d.GetPendingChanges (login, pass);
-                       if (changes == null)
-                               Status = "No changes available";
-                       else
-                               Status = "Changes loaded: " + changes.Length + 
" contributions";
-                       RenderChanges ();
-               } catch (Exception e){
-                       Status = "There was a failure trying to fetch the 
status from the server";
-                       Console.WriteLine (e);
-               }
-       }
-
-       string Status {
-               set {
-                       statusbar.Pop (contextid);
-                       statusbar.Push (contextid, value);
-               }
-       }
-
-       Hashtable providers = new Hashtable ();
-       public void LoadProviders ()
-       {
-               string config_dir = Environment.GetFolderPath 
(Environment.SpecialFolder.ApplicationData);
-               string monodoc_dir = System.IO.Path.Combine (config_dir, 
"monodoc");
-               string settings_file = System.IO.Path.Combine (monodoc_dir, 
"providers.xml");
-
-               XmlSerializer ser = new XmlSerializer (typeof (Providers));
-               Providers p;
-               if (File.Exists (settings_file))
-                       p = (Providers) ser.Deserialize (new XmlTextReader 
(settings_file));
-               else {
-                       Console.WriteLine ("File {0} does not exist", 
settings_file);
-                       Console.WriteLine ("Format is:");
-                       Console.WriteLine (@"<Providers 
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""; 
xmlns:xsd=""http://www.w3.org/2001/XMLSchema"";>
-  <Location Name=""netdocs"" Path=""/cvs/monodoc/class""/>
-</Providers>
-");
-
-                       
-                       Environment.Exit (1);
-                       return;
-               }
-
-               for (int i = 0; i < p.Locations.Length; i++){
-                       providers [p.Locations [i].Name] = p.Locations [i].Path;
-               }
-       }
-}
-
-///
-/// Configuration Loading
-///
-public class ProviderLocation {
-       [XmlAttribute] public string Name;
-       [XmlAttribute] public string Path;
-}
-
-public class Providers {
-       [XmlElement ("Location", typeof (ProviderLocation))]
-       public ProviderLocation [] Locations;
-}
-
-}

Deleted: trunk/monodoc/browser/admin.glade
===================================================================
--- trunk/monodoc/browser/admin.glade   2005-04-27 17:45:29 UTC (rev 43670)
+++ trunk/monodoc/browser/admin.glade   2005-04-27 17:59:29 UTC (rev 43671)
@@ -1,450 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
-
-<glade-interface>
-
-<widget class="GtkWindow" id="main_window">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Monodoc Admin Tool.</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-       <widget class="GtkHBox" id="hbox1">
-         <property name="visible">True</property>
-         <property name="homogeneous">False</property>
-         <property name="spacing">0</property>
-
-         <child>
-           <widget class="GtkButton" id="button1">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="label" translatable="yes">Check Server 
Updates.</property>
-             <property name="use_underline">True</property>
-             <property name="relief">GTK_RELIEF_NORMAL</property>
-             <property name="focus_on_click">True</property>
-             <signal name="clicked" handler="OnCheckUpdatesClicked" 
last_modification_time="Thu, 06 Nov 2003 18:49:34 GMT"/>
-           </widget>
-           <packing>
-             <property name="padding">0</property>
-             <property name="expand">False</property>
-             <property name="fill">False</property>
-           </packing>
-         </child>
-
-         <child>
-           <placeholder/>
-         </child>
-
-         <child>
-           <placeholder/>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkNotebook" id="notebook">
-         <property name="visible">True</property>
-         <property name="can_focus">True</property>
-         <property name="show_tabs">True</property>
-         <property name="show_border">False</property>
-         <property name="tab_pos">GTK_POS_TOP</property>
-         <property name="scrollable">False</property>
-         <property name="enable_popup">False</property>
-
-         <child>
-           <widget class="GtkScrolledWindow" id="container">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-             <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-             <property name="shadow_type">GTK_SHADOW_NONE</property>
-             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-             <child>
-               <placeholder/>
-             </child>
-           </widget>
-           <packing>
-             <property name="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label1">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Pending</property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">False</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-           </widget>
-           <packing>
-             <property name="type">tab</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkScrolledWindow" id="review_container">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-             <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-             <property name="shadow_type">GTK_SHADOW_NONE</property>
-             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-             <child>
-               <placeholder/>
-             </child>
-           </widget>
-           <packing>
-             <property name="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label2">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Contribution</property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">False</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-           </widget>
-           <packing>
-             <property name="type">tab</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkVBox" id="vbox2">
-             <property name="visible">True</property>
-             <property name="homogeneous">False</property>
-             <property name="spacing">0</property>
-
-             <child>
-               <widget class="GtkHBox" id="hbox2">
-                 <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
-
-                 <child>
-                   <widget class="GtkFrame" id="frame6">
-                     <property name="visible">True</property>
-                     <property name="label_xalign">0</property>
-                     <property name="label_yalign">0.5</property>
-                     <property name="shadow_type">GTK_SHADOW_NONE</property>
-
-                     <child>
-                       <widget class="GtkAlignment" id="alignment6">
-                         <property name="visible">True</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xscale">1</property>
-                         <property name="yscale">1</property>
-                         <property name="top_padding">0</property>
-                         <property name="bottom_padding">0</property>
-                         <property name="left_padding">12</property>
-                         <property name="right_padding">0</property>
-
-                         <child>
-                           <widget class="GtkScrolledWindow" 
id="scrolledwindow4">
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                             <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                             <property 
name="shadow_type">GTK_SHADOW_NONE</property>
-                             <property 
name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                             <child>
-                               <widget class="GtkTextView" id="text_ondisk">
-                                 <property name="visible">True</property>
-                                 <property name="can_focus">True</property>
-                                 <property name="editable">True</property>
-                                 <property name="overwrite">False</property>
-                                 <property name="accepts_tab">True</property>
-                                 <property 
name="justification">GTK_JUSTIFY_LEFT</property>
-                                 <property 
name="wrap_mode">GTK_WRAP_WORD</property>
-                                 <property 
name="cursor_visible">True</property>
-                                 <property 
name="pixels_above_lines">0</property>
-                                 <property 
name="pixels_below_lines">0</property>
-                                 <property 
name="pixels_inside_wrap">0</property>
-                                 <property name="left_margin">0</property>
-                                 <property name="right_margin">0</property>
-                                 <property name="indent">0</property>
-                                 <property name="text" 
translatable="yes"></property>
-                               </widget>
-                             </child>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-
-                     <child>
-                       <widget class="GtkLabel" id="label9">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">&lt;b&gt;On 
Disk&lt;/b&gt;</property>
-                         <property name="use_underline">False</property>
-                         <property name="use_markup">True</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                       <packing>
-                         <property name="type">label_item</property>
-                       </packing>
-                     </child>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkFrame" id="frame7">
-                     <property name="visible">True</property>
-                     <property name="label_xalign">0</property>
-                     <property name="label_yalign">0.5</property>
-                     <property name="shadow_type">GTK_SHADOW_NONE</property>
-
-                     <child>
-                       <widget class="GtkAlignment" id="alignment7">
-                         <property name="visible">True</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xscale">1</property>
-                         <property name="yscale">1</property>
-                         <property name="top_padding">0</property>
-                         <property name="bottom_padding">0</property>
-                         <property name="left_padding">12</property>
-                         <property name="right_padding">0</property>
-
-                         <child>
-                           <widget class="GtkScrolledWindow" 
id="scrolledwindow5">
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                             <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                             <property 
name="shadow_type">GTK_SHADOW_NONE</property>
-                             <property 
name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                             <child>
-                               <widget class="GtkTextView" id="text_diff">
-                                 <property name="visible">True</property>
-                                 <property name="can_focus">True</property>
-                                 <property name="editable">True</property>
-                                 <property name="overwrite">False</property>
-                                 <property name="accepts_tab">True</property>
-                                 <property 
name="justification">GTK_JUSTIFY_LEFT</property>
-                                 <property 
name="wrap_mode">GTK_WRAP_WORD</property>
-                                 <property 
name="cursor_visible">True</property>
-                                 <property 
name="pixels_above_lines">0</property>
-                                 <property 
name="pixels_below_lines">0</property>
-                                 <property 
name="pixels_inside_wrap">0</property>
-                                 <property name="left_margin">0</property>
-                                 <property name="right_margin">0</property>
-                                 <property name="indent">0</property>
-                                 <property name="text" 
translatable="yes"></property>
-                               </widget>
-                             </child>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-
-                     <child>
-                       <widget class="GtkLabel" id="label10">
-                         <property name="visible">True</property>
-                         <property name="label" 
translatable="yes">&lt;b&gt;Diff&lt;/b&gt;</property>
-                         <property name="use_underline">False</property>
-                         <property name="use_markup">True</property>
-                         <property name="justify">GTK_JUSTIFY_LEFT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                       <packing>
-                         <property name="type">label_item</property>
-                       </packing>
-                     </child>
-                   </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
-                   </packing>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkFrame" id="frame5">
-                 <property name="visible">True</property>
-                 <property name="label_xalign">0</property>
-                 <property name="label_yalign">0.5</property>
-                 <property name="shadow_type">GTK_SHADOW_NONE</property>
-
-                 <child>
-                   <widget class="GtkAlignment" id="alignment5">
-                     <property name="visible">True</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xscale">1</property>
-                     <property name="yscale">1</property>
-                     <property name="top_padding">0</property>
-                     <property name="bottom_padding">0</property>
-                     <property name="left_padding">12</property>
-                     <property name="right_padding">0</property>
-
-                     <child>
-                       <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                         <property name="visible">True</property>
-                         <property name="can_focus">True</property>
-                         <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                         <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                         <property 
name="shadow_type">GTK_SHADOW_NONE</property>
-                         <property 
name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-                         <child>
-                           <widget class="GtkTextView" id="text_current">
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property name="editable">True</property>
-                             <property name="overwrite">False</property>
-                             <property name="accepts_tab">True</property>
-                             <property 
name="justification">GTK_JUSTIFY_LEFT</property>
-                             <property 
name="wrap_mode">GTK_WRAP_WORD</property>
-                             <property name="cursor_visible">True</property>
-                             <property name="pixels_above_lines">0</property>
-                             <property name="pixels_below_lines">0</property>
-                             <property name="pixels_inside_wrap">0</property>
-                             <property name="left_margin">0</property>
-                             <property name="right_margin">0</property>
-                             <property name="indent">0</property>
-                             <property name="text" 
translatable="yes"></property>
-                           </widget>
-                         </child>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkLabel" id="label8">
-                     <property name="visible">True</property>
-                     <property name="label" 
translatable="yes">&lt;b&gt;Current&lt;/b&gt;</property>
-                     <property name="use_underline">False</property>
-                     <property name="use_markup">True</property>
-                     <property name="justify">GTK_JUSTIFY_LEFT</property>
-                     <property name="wrap">False</property>
-                     <property name="selectable">False</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xpad">0</property>
-                     <property name="ypad">0</property>
-                   </widget>
-                   <packing>
-                     <property name="type">label_item</property>
-                   </packing>
-                 </child>
-               </widget>
-               <packing>
-                 <property name="padding">0</property>
-                 <property name="expand">True</property>
-                 <property name="fill">True</property>
-               </packing>
-             </child>
-           </widget>
-           <packing>
-             <property name="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label3">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">Viewer</property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">False</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-           </widget>
-           <packing>
-             <property name="type">tab</property>
-           </packing>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkStatusbar" id="statusbar">
-         <property name="visible">True</property>
-         <property name="has_resize_grip">True</property>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-</glade-interface>

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

Reply via email to