Re: [Mono-docs-list] The future of monodoc.dll

2008-03-22 Thread Mario Sopena Novales
Hi,

   I agree with Mike. More important than C# 2.0 sintantic sugar is
all the wrong things with the current monodoc API:

* two lookup alternatives (tree node and URL based)
* not a clear render pipeline: like Mike said, it does not expose XML,
but is is also has a rather strange way of dealing with editing and
its hardly extensible
* no easy way of installing new documentation (or updated one)
* Some minor capabilities to edit documentation of a project but no
easy way to reuse the monodoc remote documentation editing
capabilities with something not the mono project documentation
* Wrong way of handling with "installed documentation". There is no
way to deal with documentation packages. Instead, you are presented
with a list of possible documentation packages, some of them could be
installed, some of them not.

Mario

On 22/03/2008, Mike Kestner <[EMAIL PROTECTED]> wrote:
>
>  On Sat, 2008-03-22 at 09:47 -0400, Jonathan Pryor wrote:
>  > One of the things I'd like to do before the Mono 2.0 release is migrate
>  > monodoc.dll to use C# 2.0 features such as generics in the public API.
>  > For example, instead of Monodoc.Node.Nodes being an ArrayList, it should
>  > be an IEnumerable or IList, and Monodoc.Node should
>  > implement IComparable, etc.
>
>
> I guess my main question would be, why?  It doesn't save boxing
>  overhead, since Node is a reference type, right?  Seems like
>  considerable pain to avoid typing 'as Node' occasionally.
>
>  Unless the generics usage is necessary for a feature addition to a
>  consumer of the dll, I don't see the justification for breaking
>  stability.
>
>
>  > However, I'm not sure that this can actually be done, as monodoc.dll is
>  > installed into the GAC, and such an API change would break any existing
>  > clients on upgrade.
>
>
> In order to do it, you would need to install a new assembly version into
>  the GAC, and probably make a monodoc-2.0.pc which is
>  parallel-installable to the old version.
>
>
>  > Consequently, I thought I'd throw out another idea: #ifs and changing
>  > the assembly name.
>  >
>  > Instead of building just monodoc.dll, we could build both monodoc.dll
>  > and a Mono.Documentation.dll.  monodoc.dll would remain .NET 1.0
>  > compatible, Mono.Documentation.dll would be for .NET 2.0, and we could
>  > use #if's to keep the two separate:
>
>
> If we are really going to end up with two separate dlls, we probably
>  ought to spec out what we need for features in a new "engine" dll, and
>  implement them in as clean as possible a codebase.
>
>  For example, my new editor/viewer could probably benefit from an engine
>  node that exposes raw XML.  The current system is all about returning
>  html for obvious reasons.
>
>  I just don't see the real benefit in having a dual assembly setup if the
>  only difference between the versions is a little C# 2.0 sugar.
>
>
>  --
>  Mike Kestner <[EMAIL PROTECTED]>
>
>
>  ___
>  Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
>  http://lists.ximian.com/mailman/listinfo/mono-docs-list
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] [PATCH] Fixing namespace edit (#319116)

2008-02-22 Thread Mario Sopena Novales
Hi,

   I fixed all the indentation mess. More comments below:

On 22/02/2008, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> On Fri, 2008-02-22 at 18:08 +0100, Mario Sopena Novales wrote:
>  > Index: provider.cs
>  > ===
>  > --- provider.cs (revisión: 96411)
>  > +++ provider.cs (copia de trabajo)
>  > @@ -609,9 +609,13 @@
>  > }
>  > }
>  >
>  > -   public void PackXml (string fname, XmlDocument doc)
>  > +   public void PackXml (string fname, XmlDocument doc, string 
> real_path)
>  > {
>  > -   zip_output.PutNextEntry (new ZipEntry (fname));
>  > +ZipEntry entry = new ZipEntry (fname);
>  > +if (real_path != null)
>  > +entry.ExtraData = ConvertToArray(real_path);
>  > +
>  > +   zip_output.PutNextEntry (entry);
>
>  Please fix your indenting.
>
>  > Index: mono-ecma-css.xsl
>  > ===
>  > --- mono-ecma-css.xsl   (revisión: 96411)
>  > +++ mono-ecma-css.xsl   (copia de trabajo)
>  > @@ -684,7 +684,7 @@
>  >  mode="notoppara"/>
>  > 
>  > 
>  > -   [Edit]
>  > +   [ href="{monodoc:EditUrlNamespace (., $namespace, 'summary')}">Edit]
>
>  Any particular reason you don't want the '[' and ']' as part of the link
>  text?  I'd prefer to keep them as part of the link.

Because the other Edit links are like this, so I though it would be
better to keep all unified.


>
>  > Index: ecma-provider.cs
>  > ===
>  > --- ecma-provider.cs(revisión: 96411)
>  > +++ ecma-provider.cs(copia de trabajo)
>  > @@ -184,6 +184,7 @@
>  > if (File.Exists (ns_summary_file)) 
> {
>  > XmlDocument nsSummaryFile 
> = new XmlDocument ();
>  > nsSummaryFile.Load 
> (ns_summary_file);
>  > +namespace_realpath [tn] = ns_summary_file;
>
>  Fix indentation.
>
>  > @@ -869,16 +871,16 @@
>  >
>  > match_node = ns_node;
>  > string ns_name = nsurl.Substring (2);
>  > -
>  > -   XmlReader summary = GetNamespaceDocument (ns_name);
>  > -   if (summary == null)
>  > +
>  > +XmlDocument doc = GetHelpXmlWithChanges("xml.summary." + 
> ns_name);
>  > +if (doc == null)
>  > return null;
>
>  Shouldn't this fall-back to using GetNamspaceDocument() if
>  GetHelpXmlWithChanges() fails?

Well, the reason is that GetNamespaceDocument calls GetHelpXml() which
is a function copy&pasted to GetHelpXmlWithChanges except for the
later calling one extra method to detect whether there are changes and
applying them. In fact, I think we should remove
GetNamespaceDocument... well, I think the monodoc "library" need a
heavy refactoring because it is a little mess, I just don't find
enough free time to do it, ;-P


>
>  > @@ -1181,10 +1183,12 @@
>  > return "";
>  > }
>  >
>  > -   public string EditUrlNamespace (string ns, string section)
>  > +   public string EditUrlNamespace (XPathNodeIterator itr, 
> string ns, string section)
>  > {
>  > if (hs is EcmaUncompiledHelpSource)
>  > return "edit:file:" + 
> Path.Combine(((EcmaUncompiledHelpSource)hs).BasePath, ns + ".xml") + 
> "@/Namespace/Docs/" + section;
>  > +else if (itr.MoveNext ())
>  > +return EditingUtils.FormatEditUri(itr.Current.BaseURI, 
> "/elements/" + section);
>
>  Indentation.
>
>  Thanks,
>   - Jon



Thanks,  Mario
Index: provider.cs
===
--- provider.cs	(revisión: 96411)
+++ provider.cs	(copia de trabajo)
@@ -609,9 +609,13 @@
 		}	
 	}
 	
-	public void PackXml (string fname, XmlDocument doc)
-	{
-		zip_output.PutNextEntry (new ZipEntry (fname));
+	public void PackXml (string fname, XmlDocument doc, string real_path)
+	{ 
+		

Re: [Mono-docs-list] [PATCH] Fixing namespace edit (#319116)

2008-02-22 Thread Mario Sopena Novales
Ups,

  ;-P

On 22/02/2008, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> On Fri, 2008-02-22 at 13:16 +0100, Mario Sopena Novales wrote:
>  > Hi,
>  >
>  > the attached path fices the problem with namespaces that cannot be
>  > edited right now as states bug #319116.
>  >
>  > Unfortunately, you must rebuild the docs to see it working, because
>  > the editing infrastructure put some information on zip files for
>  > editing which is not present for namespaces unless you rebuild the doc
>  > with the patch.
>  >
>  > May I commit it?
>
>
> Insert missing patch here.  :-)
>
>   - Jon
>
>
>
Index: provider.cs
===
--- provider.cs	(revisión: 96411)
+++ provider.cs	(copia de trabajo)
@@ -609,9 +609,13 @@
 		}	
 	}
 	
-	public void PackXml (string fname, XmlDocument doc)
+	public void PackXml (string fname, XmlDocument doc, string real_path)
 	{
-		zip_output.PutNextEntry (new ZipEntry (fname));
+ZipEntry entry = new ZipEntry (fname);
+if (real_path != null)
+entry.ExtraData = ConvertToArray(real_path);
+
+		zip_output.PutNextEntry (entry);
 		XmlTextWriter xmlWriter = new XmlTextWriter (zip_output, Encoding.UTF8);
 		doc.WriteContentTo (xmlWriter);
 		xmlWriter.Flush ();
Index: mono-ecma-css.xsl
===
--- mono-ecma-css.xsl	(revisión: 96411)
+++ mono-ecma-css.xsl	(copia de trabajo)
@@ -684,7 +684,7 @@
 
 
 	
-	[Edit]
+	[Edit]
 
 			
 
@@ -696,7 +696,7 @@
 
 
 	
-	[Edit]
+	[Edit]
 
 
 			
Index: mono-ecma.xsl
===
--- mono-ecma.xsl	(revisión: 96411)
+++ mono-ecma.xsl	(copia de trabajo)
@@ -717,7 +717,7 @@
 
 
 	
-	[Edit]
+	[Edit]
 
 			
 
@@ -729,7 +729,7 @@
 
 
 	
-	[Edit]
+	[Edit]
 
 
 			
Index: ecma-provider.cs
===
--- ecma-provider.cs	(revisión: 96411)
+++ ecma-provider.cs	(copia de trabajo)
@@ -184,6 +184,7 @@
 	if (File.Exists (ns_summary_file)) {
 		XmlDocument nsSummaryFile = new XmlDocument ();
 		nsSummaryFile.Load (ns_summary_file);
+namespace_realpath [tn] = ns_summary_file;
 		
 		XmlNode ns_summary = nsSummaryFile.SelectSingleNode ("Namespace/Docs/summary");
 		if (ns_summary != null && ns_summary.InnerText != "To be added." && ns_summary.InnerText != "") {
@@ -291,7 +292,7 @@
 e.AppendChild (copy);
 elements.AppendChild (e);
 			}
-			hs.PackXml ("xml.summary." + ns, doc);
+			hs.PackXml ("xml.summary." + ns, doc,(string) namespace_realpath[ns]);
 		}
 		
 		
@@ -310,12 +311,13 @@
 summary.AppendChild (nsSummary.CreateElement("summary"));
 			
 		}
-		tree.HelpSource.PackXml ("mastersummary.xml", nsSummary);
+		tree.HelpSource.PackXml ("mastersummary.xml", nsSummary, null);
 	}
 	   
 	static Hashtable class_summaries = new Hashtable ();
 	static Hashtable namespace_summaries = new Hashtable ();
 	static Hashtable namespace_remarks = new Hashtable ();
+	static Hashtable namespace_realpath = new Hashtable ();
 	XmlDocument doc;
 	
 	void PopulateClass (string ns, Node ns_node, string file)
@@ -869,16 +871,16 @@
 
 			match_node = ns_node;
 			string ns_name = nsurl.Substring (2);
-			
-			XmlReader summary = GetNamespaceDocument (ns_name);
-			if (summary == null)
+
+XmlDocument doc = GetHelpXmlWithChanges("xml.summary." + ns_name);
+if (doc == null)
 return null;
 
 			XsltArgumentList args = new XsltArgumentList();
 			args.AddExtensionObject("monodoc:///extensions", ExtObject);
 			args.AddParam("show", "", "namespace");
 			args.AddParam("namespace", "", ns_name);
-			string s = Htmlize(new XPathDocument (summary), args);
+			string s = Htmlize(doc, args);
 			return BuildHtml (css_ecma_code, s); 
 
 		}
@@ -1181,10 +1183,12 @@
 			return "";
 		}
 
-		public string EditUrlNamespace (string ns, string section)
+		public string EditUrlNamespace (XPathNodeIterator itr, string ns, string section)
 		{
 			if (hs is EcmaUncompiledHelpSource)
 return "edit:file:" + Path.Combine(((EcmaUncompiledHelpSource)hs).BasePath, ns + ".xml") + "@/Namespace/Docs/" + section; 
+else if (itr.MoveNext ())
+return EditingUtils.FormatEditUri(itr.Current.BaseURI, "/elements/" + section);
 			return "";
 		}
 
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] Fixing namespace edit (#319116)

2008-02-22 Thread Mario Sopena Novales
Hi,

the attached path fices the problem with namespaces that cannot be
edited right now as states bug #319116.

Unfortunately, you must rebuild the docs to see it working, because
the editing infrastructure put some information on zip files for
editing which is not present for namespaces unless you rebuild the doc
with the patch.

May I commit it?

Reggards,  MarioS
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] mdoc: Introduction and RFC

2008-02-21 Thread Mario Sopena Novales
Hi,

   I also think it is a good Idea. Go ahead.



On 21/02/2008, Joshua Tauberer <[EMAIL PROTECTED]> wrote:
>
> Hey, Jon.
>
> Why not just merge all of the tools into a mdoc.exe (with the new
> options parsing library to boot), rather than wrapping them all with a
> script?
>
> But otherwise I think it's a good idea.
>
>
> >   - `mdoc update' has *far* fewer options than monodocer, mostly because
> > I can't see the need for some monodocer options such as
> > -ignore_extra_docs (it should die now), -pretty (when don't you want
> > nicely formatted XML?), -name, -since, etc.
>
>
> I think I added -pretty because reformatting XML causes problems with
> version control. And I don't even recall what -name does.
>
> Josh
> ___
> Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-docs-list
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] monodoc Licensing

2008-02-01 Thread Mario Sopena Novales
Sorry for answering late but I was on vacation.

Fine for me too

On 25/01/2008, Eric Butler <[EMAIL PROTECTED]> wrote:
> Fine with me too.
>   - Eric
>
> Ben Maurer wrote:
> > Hi Jon,
> >
> > Long time, no talk. I hope you are doing well. MIT/X11 is fine for
> > anything I've written in monodoc.
> >
> > -b
> >
> > On Fri, 25 Jan 2008, Jonathan Pryor wrote:
> >
> >> Joshua et al,
> >>
> >> You wrote and contributed to the monodoc module & many related
> >> utilities, such as monodocer, monodocs2html, etc., in addition to
> >> monodoc/engine and related documentation providers.
> >>
> >> The monodoc module currently claims to be under the GPL, as does
> >> `monodocer --version` and monodocs2html.
> >>
> >> How would you feel about relicensing these contributions under MIT/X11?
> >>
> >> No major reason, aside from an eventual simplification of Mono's
> >> licensing policy from GPL/LGPL/MIT-X11 to LGPL/MIT-X11, and I don't see
> >> much reason to prevent non-GPL-compliant reuse of these libraries and
> >> apps...
> >>
> >> Thanks,
> >> - Jon
> >>
> >>
> >>
> >>
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] What to do about types in the root namespace?

2007-12-19 Thread Mario Sopena Novales
Hi,

   what about printing a big warning saying those classes A,B and C
won't be documented because they are not contained in a Namespace and
ignoring them when writing the documentation?

Mario

On 20/12/2007, Michael Hutchinson <[EMAIL PROTECTED]> wrote:
> On Dec 19, 2007 9:52 PM, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> > While trying to update the contents of monodoc/class, I ran into a
> > problem: Npgsql contains the following types in the root ("") namespace:
> > NpgsqlRowUpdatingEventArgs, and NpgsqlRowUpdatedEventArgs.
> >
> > The problem is twofold:
> >
> > 1. monodocer generates an error and exits if it sees such a type.
> > 2. What should Monodoc do with such a type?
> >
> > Assuming that telling the Npgsql authors to rename their types is
> > undesirable, we need a way to support types in the root namespace.
> ...
> > We could just say "Don't Do That," and be done with it. :-)
>
> Putting types in the root namespaces sounds to me like a Bad Thing,
> violating naming guidelines etc. IMO this isn't something that MonoDoc
> should care about -- if anything, it should throw an error (as it
> does) or ignore them.
>
> --
> Michael Hutchinson
> http://mjhutchinson.com
> ___
> Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-docs-list
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Differences between generic names in the documentation.

2007-12-15 Thread Mario Sopena Novales
Hi,

On 15/12/2007, Mike Kestner <[EMAIL PROTECTED]> wrote:
>
> On Sat, 2007-12-15 at 08:45 -0500, Jonathan Pryor wrote:
> > Mike: Didn't GtkHtml# always bind gtkhtml-3.0?  Or did it bind 2.x at
> > some point in time?
>
> The gtkhtml-sharp-2.0.pc points to bindings of gtkhtml from versions
> 3.0.10 through 3.12.  When the API broke in 3.14, we had to change some
> things, and now the gtkhtml-sharp-3.14.pc found in gnome-desktop-sharp
> points to bindings for gtkhtml-3.14.pc.

Well, I never looked at the C library but just at how monodoc browser
pointed to gtkhtml-sharp-2.0 and gtkhtml-sharp-3.14 and that made me
think gtkhtml-sharp-2.0 pointed to a 2.X series.

Then, it seems a problem of libgtkhtml for 3.14 onwards?


>
> That's probably the source of confusion.
> --
> Mike Kestner <[EMAIL PROTECTED]>
>
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Differences between generic names in the documentation.

2007-12-15 Thread Mario Sopena Novales
Hi,


On 12/12/2007, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> On Wed, 2007-12-12 at 05:57 -0500, Jonathan Pryor wrote:
> > On Sat, 2007-12-08 at 12:04 +0100, Valentin Sawadski wrote:
> > > But then again it seems that the browser uses the Test
> > > everywhere. Sometimes it gets parsed and will be displayed as Test
> > > but other times not and some ugly HTML-Entities are being shown as the
> > > class name.
> >
> > After looking into this further, I *think* this is a GTKHTML rendering
> > bug.
>
> Perfect test case:
>
> 1. Start Monodoc.
> 2. Click File -> Lookup URL, or type Ctrl+L.
> 3. Enter the URL: foo.bar
>
> It displays as "foo.bar" (i.e. no escaping is occurring), and
> if you hold your mouse over the link the target is "foo.bar".
>
> You can in fact change the URL to be:
>
> foo.bar
>
> Despite being invalid XML (is it even valid HTML?), GTKHTML displays it,
> and shows the desired target when you mouse over it (foo.bar), but it
> still shows "foo.bar" as the link text.  I can't find any way
> to get "foo.bar" as the link text. :-/
>
> (Not that a href of "foo.bar" helps anyway, as that's invalid XML,
> and thus cannot be used within the documentation.)
>
> So it's definitely a GTKHTML bug; no idea how to fix it.  This has also
> been reported:
>
> http://bugzilla.gnome.org/show_bug.cgi?id=340007
> http://bugzilla.gnome.org/show_bug.cgi?id=494315
> http://bugzilla.gnome.org/show_bug.cgi?id=498847
>
> The latter two were opened in November of this year.  The first one also
> seems applicable, and was opened in 2006.
>

  I couldn't reproduce the problem with rendering generics you are
talking about. I think this is related to the version of gtkhtml. I've
noticed I only have the old gtkhtml-2.0 and, maybe, this is a issue
with 3.14 (I've seen the bugs you reported are related to the 3X
series). Could you try to compile with old libgtkhtml-2.0 and see If
the problem is still there?

Maybe we should stick with the old 2.0 gtkhtml; by the way I don't
know what exactly gives us the 3X series, nor why it was enabled by
default?

> Sounds like the actual solution is to get Gecko working again.  Anyone
> know why it dies?

Well, it seems related to a change in monodoc script "configuring"
something to get the gecko library. In the bug report
(https://bugzilla.novell.com/show_bug.cgi?id=341815) Wade points to a
change made on r81537 but I can not try it myself because I don't have
OpenSUSE. Does removing these two lines (which I don't think are so
much useful) fixes the problem for you?

Mario


>
>  - Jon
>
>
> ___
> Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-docs-list
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Differences between generic names in the documentation.

2007-12-10 Thread Mario Sopena Novales
Hi,

On 10/12/2007, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> On Sat, 2007-12-08 at 11:03 -0500, Jonathan Pryor wrote:
>
> In short, we have a trade-off between a more useful (as far as I'm
> concerned) "show all overloads in the Members page" AND use a sensible
> set of characters to distinguish between type paramters and actual
> parameters, vs. a more language-agnostic "only show the Member name, and
> display overloads in a separate page," and in the separate page use ()
> to enclose *both* type parameters AND method parameters.
>
>  - Jon

my opinion is to stay as it is now for several reasons:

* The agnostic solution is just ugly (like esperanto, it wont work
because is not good enough for everybody)

* C# is the primary development language for Mono and almost everybody
programs in C# or, at least, understands C#. Besides that, all the
examples in the documentation are only in C# so we have already a
C#-ish documentation.

* In the future, as other languages take more specific weight, we can
add a "Language" menu that will translate generic, examples and
everything that needs to be done to be more language XX friendly.

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] monodoc search bar

2007-12-09 Thread Mario Sopena Novales
Hi,

  sorry my comment made you code a new patch. I tried both and, as you
said, with your first patch the findbar does not appears when you
don't have the newet gtkhtml-sharp lib. So, I will go with the first.

However, your patch needs to be in gnome-sharp before we apply it to
monodoc and we have to make sure the version we test is the one that
has your patch applied. So, once it gets in gnome-sharp, the check
should be GTKHTML_SHARP_3_X instead of GTKHTML_SHARP_3_14.

On 05/12/2007, Alvaro Ramirez <[EMAIL PROTECTED]> wrote:
> Hi Mario,
>
> > I think your patch misses if someone hits the Ctrl+F keystroke but
> > it does not have the gtkhtml-sharp version needed. It will be
> > presented with a useless findbar.
>
> hmmm... shouldn't be the case. If you build against older versions of
> gtkhtml, the menu items get hidden, which would prevent the key-bindings
> from working (??)
>
> #if (!GTKHTML_SHARP_3_14)
> ui ["find_separator"].Hide ();
> ui ["find_text"].Hide ();
> ui ["find_next"].Hide ();
> ui ["find_previous"].Hide ();
> #endif
>
>
> > We better avoid those situations
>
> The above seems to avoid the scenario you mentioned. In any case, I've
> added some more conditionals and removed the search bar from the
> container altogether (when building against older gtk-html). The
> downside to this is that browser.cs now has more #if's :( Have a look at
> the new patches. Let me know...
>
> Thanks,
>
> Alvaro
>
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Differences between generic names in the documentation.

2007-12-09 Thread Mario Sopena Novales
Hi,

On 08/12/2007, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> On Sat, 2007-12-08 at 12:04 +0100, Valentin Sawadski wrote:
> > I recently tried to work on the generics support in monodocer and
> > noticed that it has names one and the same type differently.

> >
> > But then again it seems that the browser uses the Test
> > everywhere. Sometimes it gets parsed and will be displayed as Test
> > but other times not and some ugly HTML-Entities are being shown as the
> > class name.
>
> These are bugs in the doc browser and should be fixed.
>

Can you provide samples, bugzilla report or point to a class/method/..
that is not rendered properly so I can try to fix it please.

Thanks!
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] monodoc search bar

2007-12-05 Thread Mario Sopena Novales
Hi,

   I think your patch misses if someone hits the Ctrl+F keystroke but
it does not have the gtkhtml-sharp version needed. It will be
presented with a useless findbar.

We better avoid those situations

Mario

On 05/12/2007, Alvaro Ramirez <[EMAIL PROTECTED]> wrote:
> Hiya Mike,
>
> > Because of some API stability issues, we will be moving gtkhtml-sharp
> > from gnome-sharp to the new gnome-desktop-sharp module in the next
> > release cycle.  This patch might be better applied against that module.
>
> Sounds good. Attached is now gnome-desktop-sharp.diff
>
> >
> > The other issue is one of dependency.  Is it okay for docbrowser to
> > depend on bleeding edge gtkhtml-sharp?
>
> Should be ok. I've now made it optional. There was already a check for
> bleeding edge gtkhtml-sharp (3.14) used for printing. If not present,
> the search bar is disabled.
>
> >  If not, you will probably need
> > to make this feature optional via configure magic to allow building
> > against older gtk-sharp/gnome-sharp releases.  At the very least, you
> > need to bump the configure version check in mono-tools to identify the
> > new dependency.
>
> Yup, you can build against older gtk-sharp/gnome-sharp releases, since
> the search bar is now optional. Have a look at the new patches.
>
> Thanks,
>
> Alvaro
>
> ___
> Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-docs-list
>
>
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Proposing a new documentation subsystem

2007-12-04 Thread Mario Sopena Novales
Hi,

   Jon replies are exactly what I meant. Nothing to add here.

  By the way, your changes about adding AssemblyInfo to every members
sounds good to me. The only problem I see is what to do with the
already  tag that we have. Does the implementation collide in
some way?

Mario

On 03/12/2007, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> On Mon, 2007-12-03 at 15:26 -0500, Miguel de Icaza wrote:
> > > I spoke with Lluis Sanchez about using Mono.Addins to extend the
> > > documentation system and it seems a good approach because we will get
> > > all the subsytem for documentation updates and managment (both for
> > > providers and for doc sources) for free.
> > >
> > > This will enable downloading new docs or providers without updating
> > > the whole monodoc system. We can also get rid of the several xml files
> > > needed to finally reach the documentation files and free monodoc
> > > subsytem of some managment code.
> >
> > Which kind of add-ins do you have in mind?
>
> I think he was suggesting that we bundle the XML docs *as* an add-in.
> (At least, this was my interpretation, and made me go "Cool!")  This
> would allow using the existing Mono.Addins infrastructure to update the
> documentation after installation time.
>
> So no format changes (beyond what I've already proposed), just a
> distribution model change.
>
> This sounds rational to me.
>
> > Supporting downloading updates is a pipeline issue more than an "add-in"
> > issue.   Sure, you can write an add-in, but the fundamental issues are:
> >
> >   * Someone needs to write the new docs (these happen at glacial
> > speeds)
>
> If we use add-ins as the package model and not the file format, this is
> a non-issue -- we use the existing docs, and write a program to compile
> the current (.source .tree .zip) file tuple into an add-in.
>
> >   * If the above were fixed (hundreds of new docs per day),
> > updating docs should just be part to the core Monodoc
> > functionality.
>
> Exactly, but Mono.Addins already has updating as a core part of its
> functionality, so using Mono.Addins as the *distribution* format would
> allow code reuse here.
>
>  - Jon
>
>
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Proposing a new documentation subsystem

2007-11-30 Thread Mario Sopena Novales
Hi,

On 25/11/2007, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> On Sun, 2007-11-25 at 13:56 +0100, Valentin Sawadski wrote:
> > On Sat, 2007-11-24 at 14:25 -0500, Jonathan Pryor wrote:
> > > On Sat, 2007-11-24 at 16:16 +0100, Valentin Sawadski wrote:
>
> > > Furthermore, monodoc *already* supports 3rd party assemblies -- this is
> > > how Gtk# and Mono.Fuse documentation, among other assemblies, is
> > > integrated into monodoc.
> >
> > I know that monodoc already supports 3rd party assemblies but I was
> > thinking of measures that would enable 3rd party developers also to
> > benefit from the documentation contribution.
> >
> > Which means some that the documentation might contain some kind of url
> > where contributions can be sent to. Apart from the current mono-only
> > contribution.
>
> This sounds easy enough -- extend the .source XML format to include a
> URL to send edits to.  Then the problem "merely" becomes one of
> documenting the transport format/protocol so that others can write
> servers to integrate with monodoc.  I believe the current protocol is
> SOAP based, so that may need to change
>
> > Another point of which I have been thinking would be to add 3rd party
> > documentation without having to rebuild the browser and all the sources.
>
> That's already possible.  Just add your (.source, .tree, .zip) set of
> files to your $lib/monodoc/sources directory, and restart monodoc.
> You're done.  Again, see how Gtk# and Mono.Fuse do things.
>
> > Someway that users only have to open http://3rdparty.com/docs in the
> > documentation browser and the browser downloads all the documentation
> > and integrates them into the database backend.
>
> This is a slightly different problem.  It should also be solvable by
> having the concept of a "local" sources directory in addition to the
> system sources directory, e.g. ~/.local/share/monodoc/sources/, nd have
> the local directory read before the system directory.  Again, solvable
> (though I don't know how difficult this would be).

I spoke with Lluis Sanchez about using Mono.Addins to extend the
documentation system and it seems a good approach because we will get
all the subsytem for documentation updates and managment (both for
providers and for doc sources) for free.

This will enable downloading new docs or providers without updating
the whole monodoc system. We can also get rid of the several xml files
needed to finally reach the documentation files and free monodoc
subsytem of some managment code.

Once I have something workable I will post here for further discussion.

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Documenting class libraries

2007-11-30 Thread Mario Sopena Novales
Hi Temi,

   sadly the documentation browser does not run in windows anymore. We
are hoping it will work in a future reselease also in windows.

Mario

On 06/10/2007, Temi Varghese <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am interested in documenting class libraries. Could someone suggest me how
> to do in Windows XP? The site says i need GTK# Documentation Browser, but i
> am not able to download it ( Mono 1.2.5.1_0 Setup) from the location
> specified. However, i downloaded SDK and Runtime. Is this all that is
> needed? If so, how do i carry forward from here.
>
> Thanks
> Temi
>
> ___
> Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-docs-list
>
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] Two bugfixes and css strikes back

2007-11-12 Thread Mario Sopena Novales
Hi guys,

   long time no code... well, I've come with a patch for
mono-tools/docbrowser that fixes 2 bugs (#324305 and #322097) and
resurrects the css-enabled documentation which was disabled by mistake
(I think so, I didn't call CSI to investigate further, :-P).

See what do you think and If I should commit the patch.
Index: browser.cs
===
--- browser.cs	(revisión: 89406)
+++ browser.cs	(copia de trabajo)
@@ -161,6 +161,7 @@
 	[Glade.Widget] public MenuItem cut1;
 	[Glade.Widget] public MenuItem paste1;
 	[Glade.Widget] public MenuItem print;
+	[Glade.Widget] public MenuItem close_tab;
 	public Notebook tabs_nb;
 	public Tab CurrentTab;
 	bool HoldCtrl;
@@ -383,6 +384,7 @@
 		search_tree.Model = search_store;
 		search_tree.AppendColumn ("Searches", new CellRendererText(), "text", 0);
 		search_tree.Selection.Changed += new EventHandler (ShowSearchResult);
+		search_tree.FocusOutEvent += new FocusOutEventHandler(LostFocus);
 
 		vbox1.ShowAll ();
 		search_vbox.ShowAll ();
@@ -394,6 +396,7 @@
 		CurrentTab = new Tab (this);
 		tabs_nb.AppendPage (CurrentTab, CurrentTab.TabLabel);
 		tabs_nb.ShowTabs = (tabs_nb.NPages > 1);
+		close_tab.Sensitive = (tabs_nb.NPages > 1);
 		tabs_nb.ShowAll (); //Needed to show the new tab
 		tabs_nb.CurrentPage = tabs_nb.PageNum (CurrentTab);
 		//Show root node
@@ -405,6 +408,14 @@
 		}
 		
 	}
+
+	void CloseTab ()
+	{
+		tabs_nb.RemovePage(tabs_nb.CurrentPage);
+		bool multiple_tabs = (tabs_nb.NPages > 1);
+		tabs_nb.ShowTabs = multiple_tabs;
+		close_tab.Sensitive = multiple_tabs;
+	}
 	
 	//Called when the user changes the active Tab
 	void ChangeTab(object o, SwitchPageArgs args) 
@@ -463,7 +474,16 @@
 		search_tree.Selection.SelectPath (p);
 		search_term.Editable = true;	
 	}
+
 	//
+	// Invoked when the search results panel losts focus
+	//
+	void LostFocus(object sender, FocusOutEventArgs a)
+	{
+		search_tree.Selection.UnselectAll();
+	}
+
+	//
 	// Invoked when the user click on one of the search results
 	//
 	void ShowSearchResult (object sender, EventArgs a)
@@ -1610,6 +1630,14 @@
 	{
 		AddTab();
 	}
+
+	//
+	// Invoked by Close Tab menu entry.
+	//
+	public void OnCloseTab (object sender, EventArgs a)
+	{
+		CloseTab();
+	}
 	
 }
 
@@ -2275,12 +2303,14 @@
 		if (browser.UseGecko) {
 			html = GetRenderer ("GeckoHtmlRender.dll", "Monodoc.GeckoHtmlRender", browser);
 			html_preview = GetRenderer ("GeckoHtmlRender.dll", "Monodoc.GeckoHtmlRender", browser);
+			HelpSource.use_css = true;
 		}
 		
 		if (html == null || html_preview == null) {
 			html = GetRenderer ("GtkHtmlHtmlRender.dll", "Monodoc.GtkHtmlHtmlRender", browser);
 			html_preview = GetRenderer ("GtkHtmlHtmlRender.dll", "Monodoc.GtkHtmlHtmlRender", browser);
 			browser.UseGecko = false;
+			HelpSource.use_css = false;
 		}
 
 		if (html == null || html_preview == null)
@@ -2389,7 +2419,7 @@
 		tabClose.Add(img);
 		tabClose.Relief = Gtk.ReliefStyle.None;
 		tabClose.SetSizeRequest (18, 18);
-		tabClose.Clicked += new EventHandler (OnTabClose);
+		tabClose.Clicked += new EventHandler (browser.OnCloseTab);
 		
 		//Icon showed when the Tab is in Edit Mode
 		EditImg = new Image (Stock.Convert, IconSize.SmallToolbar);
@@ -2538,11 +2568,6 @@
 			return false;
 		});
 	}
-	void OnTabClose (object sender, EventArgs a)
-	{
-		browser.tabs_nb.RemovePage(browser.tabs_nb.PageNum(this));
-		browser.tabs_nb.ShowTabs = (browser.tabs_nb.NPages > 1);
-	}
 	
 }
 }
Index: ChangeLog
=======
--- ChangeLog	(revisión: 89406)
+++ ChangeLog	(copia de trabajo)
@@ -1,3 +1,12 @@
+2007-11-10  Mario Sopena <[EMAIL PROTECTED]>
+	* browser.cs: 
+	  - fix #324305. Now, when search results panel lost focus,
+	unselects the selected search result
+	  - fix #322097. Solution based on the patch provided 
+	by [EMAIL PROTECTED]
+	  - Use CSS when gecko is used as renderer
+	
+
 2007-11-09  Wade Berrier  <[EMAIL PROTECTED]>
 
 	* AssemblyInfo.cs.in: use TOOLS_VERSION because it is
Index: browser.glade
===
--- browser.glade	(revisión: 89406)
+++ browser.glade	(copia de trabajo)
@@ -111,6 +111,28 @@
 		  
 
 		  
+		
+		  True
+		  _Close Tab
+		  True
+		  
+		  
+
+		  
+			
+			  True
+			  gtk-close
+			  1
+			  0.5
+			  0.5
+			  0
+			  0
+			
+		  
+		
+		  
+
+		  
 		
 		  True
 		  Quit
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Uploading Documentation

2006-08-27 Thread Mario Sopena
On 27/08/06, Jason Cozens <[EMAIL PROTECTED]> wrote:
Hi,During the week, about 5 days ago, I uploaded some documentation for theSystem.Collections.BitArray class. I had some problems with the firstupload so I then uploaded what I'd done in three uploads: constructors,
methods and properties. These uploads seemed to work. I'm unclear whathappens to the uploaded documentation. Can someone tell me?The documentation you uploaded  stays in the mono team servers until
someone reviews and approves it. After that, it is uploaded to the SVN
server.
 I'd like to add some more documentation using monodoc as I'm writingsome course notes and would like to link to the mono documentation.
What is your question exactly?Reggards,Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] PATCH for bug #76725

2006-04-17 Thread Mario Sopena
Hello,long time without coding so I've started with a simple patch. This solves the bug #76725 about the malformed Uri in monodoc. See: http://bugzilla.ximian.com/show_bug.cgi?id=76725
The patch is really simple as the solution was given by Sebastien in the same bug report. The steps followed where: compile a version of the classes without the hack for monodoc, check that monodoc crashes with the MalformedUriException, change the generation of the Uri and check that monodoc works again.
Now the hack can be reverted without breaking monodoc.Saludos, Mario Sopena
Index: engine/editing.cs
===
--- engine/editing.cs   (revision 59521)
+++ engine/editing.cs   (working copy)
@@ -65,8 +65,8 @@

XmlDocument d;

-   if (uSplit[0].StartsWith("monodoc://")) {
-   int prov = int.Parse (uSplit 
[0].Substring("monodoc://".Length));
+   if (uSplit[0].StartsWith("monodoc:///")) {
+   int prov = int.Parse (uSplit 
[0].Substring("monodoc:///".Length));
d = tree.GetHelpSourceFromId 
(prov).GetHelpXmlWithChanges (id);
} else if (uSplit[0].StartsWith("file:")) {
d = new XmlDocument();
@@ -87,8 +87,8 @@
string xp = uSplit [2];
string id =  uSplit [1];

-   if (uSplit[0].StartsWith("monodoc://")) {
-   int prov = int.Parse (uSplit 
[0].Substring("monodoc://".Length));
+   if (uSplit[0].StartsWith("monodoc:///")) {
+   int prov = int.Parse (uSplit 
[0].Substring("monodoc:///".Length));
HelpSource hs = tree.GetHelpSourceFromId (prov);

changes.AddChange (hs.Name, hs.GetRealPath 
(id), xp, node, node_url);
@@ -116,8 +116,8 @@
string xp = uSplit [2];
string id = uSplit [1];

-   if (uSplit[0].StartsWith("monodoc://")) {
-   int prov = int.Parse (uSplit 
[0].Substring("monodoc://".Length));
+   if (uSplit[0].StartsWith("monodoc:///")) {
+   int prov = int.Parse (uSplit 
[0].Substring("monodoc:///".Length));
HelpSource hs = tree.GetHelpSourceFromId (prov);

changes.RemoveChange (hs.Name, hs.GetRealPath 
(id), xp);
@@ -134,8 +134,8 @@
string xp = uSplit [2];
string id =  uSplit [1];

-   if (uSplit[0].StartsWith("monodoc://")) {
-   int prov = int.Parse (uSplit 
[0].Substring("monodoc://".Length));
+   if (uSplit[0].StartsWith("monodoc:///")) {
+   int prov = int.Parse (uSplit 
[0].Substring("monodoc:///".Length));
HelpSource hs = tree.GetHelpSourceFromId (prov);
hs.RenderPreviewDocs (new_node, w);
} else {
Index: engine/provider.cs
===
--- engine/provider.cs  (revision 59521)
+++ engine/provider.cs  (working copy)
@@ -470,7 +470,7 @@
ZipEntry entry = zip_file.GetEntry (id);
if (entry != null) {
Stream s = zip_file.GetInputStream (entry);
-   string url = "monodoc://" + SourceID + "@" + 
System.Web.HttpUtility.UrlEncode (id) + "@";
+   string url = "monodoc:///" + SourceID + "@" + 
System.Web.HttpUtility.UrlEncode (id) + "@";
return new XmlTextReader (url, s);
}
return null;
@@ -484,7 +484,7 @@
ZipEntry entry = zip_file.GetEntry (id);
if (entry != null) {
Stream s = zip_file.GetInputStream (entry);
-   string url = "monodoc://" + SourceID + "@" + 
System.Web.HttpUtility.UrlEncode (id) + "@";
+   string url = "monodoc:///" + SourceID + "@" + 
System.Web.HttpUtility.UrlEncode (id) + "@";
XmlReader r = new XmlTextReader (url, s);
XmlDocument r

Re: [Mono-docs-list] Adding MonoBasic documentation to MonoDoc

2005-12-27 Thread Mario Sopena
Hi,

   first of all, the "upload contributions" only works with
contributions done to the API docs and those contributions goes to the
main documentation server. You have to write your tutorial and perform
a normal installation or integrate it with the SVN (if it is
accepted).

For writing the tutorial I would recommend not to follow the C# Spec
but to write a nicer tutorial. Did someone tried to read it as a first
C#-text?? (it is not really very user newbie friendly) I guess, the
spec was put there because at the moment of releasing monodoc there
was nothing better around.

For the XML syntax you can use the one used in the C# Spec, the
deprecated monkeyguide syntax, wait until the wiki-like style is
finished or write one your own. I would recommend you to use the
monkeyguide syntax as it is the most tutorial alike syntax.

Good luck with your effort!!

Mario

2005/12/27, tiago <[EMAIL PROTECTED]>:
> Greetings!
>
> So, I was talking to a partner of mine on MonoBrasil (Alexandre
> Marcondes), who is an active member on the development of our Mono Basic
> compiler.
>
> We would appreciate instructions on how to add some documentation on
> MonoDoc quite similar to C#'s Language Specification, but about our
> MonoBasic implementation.
>
> I'll copy here the text of our conversation at #mono today.
>
> We would be very happy if anyone could correct/point us what to do to
> start with it.
>
> 
>
> (10:24:57) MonoNoSaint: Hey guys, I think you have seen my conversation
> with AlexMBas here, I guess.  So, what should we need/do to put into
> MonoDoc some documentation about MonoBasic?
> (10:27:33) MonoNoSaint: From what I can see on MonoDoc there are two
> specific titles on C#: the Language Specification and the Compiler Error
> Reference. Basically we could follow the same structure we see there, I
> guess... am I right?
> (10:30:00) AlexMBas: yes ...
> (10:30:38) AlexMBas: I was thinking of putting the MonoBASIC language
> specification first
> (10:31:22) AlexMBas: the monobasic compiler error references are not
> done yet ... but the syntax is almost all covered by the compiler
> (10:32:46) MonoNoSaint: I see...  I could write the text for the
> Specification.
> (10:33:32) MonoNoSaint: Is MonoBasic standardized the ECMA? I thought
> just  C# was...
> (10:33:36) MonoNoSaint: *by the*
> (10:34:55) AlexMBas: unfortunately just C# was
> (10:35:10) MonoNoSaint: I thought so...
> (10:35:14) AlexMBas: we would do something like the ECMA specification
> (10:35:16) MonoNoSaint: AlexMBas: So... do you already have a draft
> about this?
> (10:35:28) AlexMBas: to facilitate the access to the developers
> (10:35:30) AlexMBas: not yet
> (10:35:34) MonoNoSaint: Yep
> (10:35:46) AlexMBas: the monoBASIC team will help on this
> (10:36:02) MonoNoSaint: We could work together so.
> (10:36:35) AlexMBas: I was responsible of findind out how to add our
> docs to MonoDoc ...
> (10:36:43) MonoNoSaint: They could write the documentation in
> Portuguese, which they feel must comfortable. Then I could translate it
> to English...
> (10:37:09) AlexMBas: MonoNoSain1, yes, we could do that ... isn't there
> any problem ?
> (10:37:25) MonoNoSaint: of course not, perfect to me.
> (10:37:28) MonoNoSaint: :)
> (10:37:47) AlexMBas: I had thought on writing directly in english, but
> if the translation team could do this "reverse work"  it would be great
> (10:38:38) MonoNoSaint: We could start defining the topics to put there,
> taking the C# Language Specification as a model.
> (10:39:25) MonoNoSaint: So, all I imagine is necessary is ask here for
> someone to insert the nodes on the treeview (once we have the topics) on
> the left of MonoDoc.
> (10:40:04) MonoNoSaint: There is a "Upload Contributions" on the File
> menu. Then all I guess is necessary is to add the text and upload it.
> (10:40:46) MonoNoSaint: I'll copy this conversation of ours and post
> into the MonoDoc list, I sign it
> (10:40:47) AlexMBas: hey guys, who should me and MonoNoSain1 talk to in
> order to add a documentation tree to MonoDoc ?
> (10:40:57) MonoNoSaint: What do you think?
> (10:41:08) AlexMBas: MonoNoSain1, perfect for me
> (10:41:42) MonoNoSaint: Settled then. I'll copy it and ask for help.
> (10:43:22) MonoNoSaint: AlexMBas: Leave this with me so, I'll send a
> mail to them and CC it to you.
> (10:43:39) MonoNoSaint: As soon as I get the answer we talk again. OK?
> (10:47:49) AlexMBas: ok MonoNoSain1
> (10:48:07) MonoNoSaint: Perfect so.
>
> 
>
> So this is it. All your help will be very much appreciated.
>
> Thanks in advance!
>
> --
> Tiago Paranhos Lima ([EMAIL PROTECTED]) - "MonoNoSaint"
> Coordenador Projeto Documentação Mono Brasil
> Mono Brazil's Documentation Project Leader
>
> ICQ: 316519586
> MSN: [EMAIL PROTECTED]
>
> http://monodocbr.sl.org.br
> http://monobrasil.softwarelivre.org/
>
> ___
> Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/m

Re: [Mono-docs-list] Wiki Markup for ECMA documents.

2005-12-06 Thread Mario Sopena
Hola,

2005/12/6, Atsushi Eno <[EMAIL PROTECTED]>:
> Hola,
>
> After some sys.text.Encoding bugfixes, I wanted to have a break ;-)
>
> Am not sure what kind of transformations are actually wanted, so
> am putting as its initial draft. The output is like:
> http://monkey.workarea.jp/trans/mono/index.php/TestMonodocToMediaWiki
I think the idea (at least what I thought it was) was to transform not
the entire XML docs but what goes inside every section the user can
edit (say summary, remarks, ...). So, the XSLT should transform the
"example", "list", "table",  tags (the buttons that you can find
in the monodoc tool when you hit the Edit link) into something more
Wiki-like. And the other way around.

>
> My basic thought is, however, it hardly makes sense to write
> conversion stuff in XSLT (the stylesheet already became complicated
> enough, as compared to its purpose). Sys.xml tools would be much
> more useful.
> At least, we can't use XSLT for conversion from Wiki to ECMA.
> Things like scripting language would be helpful.
That's true. Wiki to XML would need some parsing stuff as XSLT only accept XML.

>
> (I also think that some kind of editor UI which is well-tailored for
> monodoc would be better.)
What are you exactly thinking (there is already the monodoc tool UI
for editing).

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Wiki Markup for ECMA documents.

2005-11-29 Thread Mario Sopena
Hello,

2005/11/27, Miguel de Icaza <[EMAIL PROTECTED]>:
> Hello,
> The trick of course is that I know very little about XSLT, and am
> wondering if a kind soul could whip up the code necessary to go from our
> ECMA XML to MediaWiki markup and back.
I can try to write something, I'm not an XSLT expert (say Joshua), but
I think I can cook something. The issue is that I've started a (new)
job and I have less and less time to code (*snif*).

Stay tuned.
Mario

>
> Miguel.
> --
> Miguel de Icaza <[EMAIL PROTECTED]>
> Novell, Inc.
> ___
> Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-docs-list
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] Problem finding Gecko library

2005-10-21 Thread Mario Sopena
Hi,

   I spoke with Wade Berrier (Novell) because people are having
problems when loading monodoc because Mono not finding libgtkmozembed.
Say problems, say not everybody that should is using Gecko.

We end up with a patch borrowed from monodevelop that finds the path
to libgtkmozembed and adds it to the LD_LIBRARY_PATH.

Thumbs up for commiting?

Mario
Index: mono-tools/configure.in
===
--- mono-tools/configure.in (revision 50843)
+++ mono-tools/configure.in (working copy)
@@ -46,6 +46,9 @@
 AC_SUBST(GECKO_SHARP_LIBS)
 AM_CONDITIONAL(ENABLE_GECKO, test "x$enable_gecko" = "xyes")
 
+MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
+AC_SUBST(MOZILLA_HOME)
+
 dnl Intl
 GETTEXT_PACKAGE=mono-tools
 AC_SUBST(GETTEXT_PACKAGE)
Index: mono-tools/docbrowser/monodoc.in
===
--- mono-tools/docbrowser/monodoc.in(revision 50843)
+++ mono-tools/docbrowser/monodoc.in(working copy)
@@ -6,6 +6,28 @@
 # [EMAIL PROTECTED] why oh why isn't it $sharedir/monodoc
 monodocdir=$prefix/lib/monodoc
 
+# discover mozilla home to set LD_LBIBRARY_PATH
+if test -n "$MOZILLA_FIVE_HOME"; then
+   MOZILLA_HOME=$MOZILLA_FIVE_HOME
+elif [ -f @MOZILLA_HOME@/chrome/comm.jar ]; then
+[EMAIL PROTECTED]@
+elif [ $(which mozilla) ] && grep MOZILLA_FIVE_HOME= "$(which mozilla)" > 
/dev/null ; then
+   MOZILLA_HOME=$(grep MOZILLA_FIVE_HOME= $(which mozilla) | cut -d '"' -f 
2)
+elif [ $(which firefox) ] && grep MOZILLA_FIVE_HOME= "$(which firefox)" > 
/dev/null ; then
+   MOZILLA_HOME=$(grep MOZILLA_FIVE_HOME= $(which firefox) | cut -d '"' -f 
2)
+else
+   echo "Cannot find mozilla installation directory. Please set 
MOZILLA_FIVE_HOME to your mozilla directory"
+   exit 1
+fi
+ 
+if [ -n $LD_LIBRARY_PATH ]; then
+   export LD_LIBRARY_PATH=$MOZILLA_HOME:$LD_LIBRARY_PATH
+else
+   export LD_LIBRARY_PATH=$MOZILLA_HOME
+fi
+
+export MOZILLA_FIVE_HOME=$MOZILLA_HOME
+
 case x$1 in
 x--assemble)
shift;
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Build Problems

2005-10-12 Thread Mario Sopena
Hello,

2005/10/12, Hector E. Gomez Morales <[EMAIL PROTECTED]>:
> Hi Mario:
>
>  And what about the issue that running make distclean in mono-tools deletes
> monodoc.in. After making make distclean the build is broken because the
> monodoc script can't be created.
that's probably a bug, I will investigate that.

>  I think I don't understand the full issue completely because what I
> understand is that for some reason monodoc uses gtk#1 and the last
> compatible version is for gecko-sharp is the 0.6. That situation was in
> July, so why monodoc has stayed with gtk#1 if monodoc upgraded to gtk#2 we
> could use the latest gecko-sharp and all the building issues will be well
> non-issues.
Well, mostly because gtk#1 targets gtk2.4 and gtk#2 targets gtk2.6,
which is not widely adopted yet. But, in my opinion, if you want to
develop mono, you have to spend some time with the building process;
if you just want to develop *with* mono, stay with the packages your
distribution ships. And I don't see a big problem here, just install
gtk#1 and gecko-sharp 0.6, you can have them in parallel with gtk#2
and gecko-sharp 2.

>  Or more concrete question if a patch is created that makes monodoc use only
> gtk#2 and gecko#2 will it be accepted to the tree? or is the use of gtk#1
> very needed.
That decision should be made by miguel I guess.

Mario.
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Possible patch for stealing the focus

2005-10-12 Thread Mario Sopena
Hello,

2005/10/12, Miguel de Icaza <[EMAIL PROTECTED]>:
> Hello,
>
> > The point is that the bug is hard to reproduce (at least, here occurs
> > only few times), so it's hard to say the patch solved the bug. Does
> > this bug happens often to you?? Please, try the patch and tell me if
> > it corrects the bug.
> >
> > Another thing is that I'm not sure the approach is valid, since it
> > makes the text area like a modal widget that has always the keyboard
> > focus while in edit mode. I think there is no problem with that, but
> > I'm not 100% confident, so I want your opinions.
>
> Have you tried setting the "CanFocus" property on the mozilla preview to
> "false"?

it sound weird, but I added a FocusIn event handler to the mozilla
preview and it wasn't recieving the lost focus. So I tried this
approach.

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] Possible patch for stealing the focus

2005-10-12 Thread Mario Sopena
Hey,

   I've compiled a possible patch for the bug about stealing the focus
when editing a node
(http://bugzilla.ximian.com/show_bug.cgi?id=76346).

The point is that the bug is hard to reproduce (at least, here occurs
only few times), so it's hard to say the patch solved the bug. Does
this bug happens often to you?? Please, try the patch and tell me if
it corrects the bug.

Another thing is that I'm not sure the approach is valid, since it
makes the text area like a modal widget that has always the keyboard
focus while in edit mode. I think there is no problem with that, but
I'm not 100% confident, so I want your opinions.

Mario
Index: browser.cs
===
--- browser.cs  (revision 51504)
+++ browser.cs  (working copy)
@@ -2184,6 +2184,12 @@
public System.Xml.XmlNode edit_node;
public string edit_url;

+   void FocusOut (object sender, FocusOutEventArgs args)
+   {
+   if (TabMode == Mode.Editor)
+   text_editor.GrabFocus ();   
+   }
+
public Tab(Browser br) 
{
 
@@ -2255,6 +2261,7 @@
text_editor.Buffer.Changed += new EventHandler 
(EditedTextChanged);
text_editor.WrapMode = WrapMode.Word;
sw.Add(text_editor);
+   text_editor.FocusOutEvent += new FocusOutEventHandler 
(FocusOut);

//
// XML editing buttons
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Build Problems

2005-10-12 Thread Mario Sopena
Hello,

2005/10/12, Hector E. Gomez Morales <[EMAIL PROTECTED]>:
>  So my question is this a conscious decision to use an older gtk-sharp and
> gecko-sharp to build the gui to monodoc?

yes, for the moment we want to stay at Gtk#1 for the reasons exposed here:
http://lists.ximian.com/pipermail/mono-devel-list/2005-July/013356.html

and gecko-sharp 0.6 is the latest version compatible with gtk# 1. Just
grab the packages from the download page and install both stacks.

Mario.
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] Monodoc. Fix rendering of masteroverview for monodocer output

2005-10-04 Thread Mario Sopena
Hey,

I don't know if someone has noticed that the master overview of
the docs produced by monodocer (and loaded via the --edit command)
doesn't show at all. Also, the link at the home page for that content
is broken.

This patch fix those issues, although the master overview showed is
just a list of  namespaces (without summary or remmarks).

Any comments before submitting?

Mario.
Index: engine/provider.cs
===
--- engine/provider.cs  (revision 51172)
+++ engine/provider.cs  (working copy)
@@ -895,7 +895,9 @@
foreach (string path in UncompiledHelpSources) {
EcmaUncompiledHelpSource hs = new 
EcmaUncompiledHelpSource(path);
root.help_sources.Add (hs);
-   Node hsn = root.CreateNode(hs.Name, 
"extra-help-source-" + hs.Name);
+   string epath = "extra-help-source-" + hs.Name;
+   Node hsn = root.CreateNode (hs.Name, "root:/" + epath);
+   root.name_to_hs [epath] = hs;
hsn.EnsureNodes ();
foreach (Node n in hs.Tree.Nodes){
hsn.AddNode (n);
Index: engine/ecma-provider.cs
===
--- engine/ecma-provider.cs (revision 51172)
+++ engine/ecma-provider.cs (working copy)
@@ -1005,7 +1005,7 @@
return Htmlize(ecma_xml, null);
}

-   static string Htmlize (IXPathNavigable ecma_xml, XsltArgumentList args)
+   public static string Htmlize (IXPathNavigable ecma_xml, 
XsltArgumentList args)
{
EnsureTransform ();

@@ -1842,7 +1842,32 @@
public override string GetText (string url, out Node match_node) {
if (url == "root:") {
match_node = null;
-   return null;
+   
+   //load index.xml
+   XmlDocument index = new XmlDocument ();
+   index.Load (Path.Combine (basedir.FullName, 
"index.xml"));
+   XmlNodeList nodes = index.SelectNodes 
("/Overview/Types/Namespace");
+   
+   //recreate masteroverview.xml
+   XmlDocument summary = new XmlDocument ();
+   XmlElement elements = summary.CreateElement 
("elements");
+   foreach (XmlNode node in nodes) {
+   XmlElement ns = summary.CreateElement 
("namespace");
+   XmlAttribute attr = summary.CreateAttribute 
("ns");
+   attr.Value = node.Attributes["Name"].Value;
+   ns.Attributes.Append (attr);
+   elements.AppendChild (ns);
+   }
+   summary.AppendChild (elements);
+
+   XmlReader reader = new XmlTextReader (new StringReader 
(summary.OuterXml));
+
+   //transform the recently created masteroverview.xml
+   XsltArgumentList args = new XsltArgumentList();
+   args.AddExtensionObject("monodoc://extensions", 
ExtObject);
+   args.AddParam("show", "", "masteroverview");
+   string s = EcmaHelpSource.Htmlize(new XPathDocument 
(reader), args);
+   return BuildHtml (css_ecma_code, s); 
}
return base.GetText(url, out match_node);
}
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Re: [Mono-dev] Monodoc

2005-10-04 Thread Mario Sopena
Hello,

2005/10/3, Joshua Tauberer <[EMAIL PROTECTED]>:
> Updating monodocer means having it be compiled with gmcs so it can
> reflect to get generics.  But, monodocer should really be changed to use
> Cecil (rather than reflection) first before doing this.  Does anyone
> know how Cecil is doing?  (The main reasons to not use reflection is
> that reflection doesn't give access to how attribute are constructed, so
> currently monodocer is making up something reasonable to display.)
>
> - Josh

I think Cecil doesn't support generics for the moment, but I'm sure
JBevain has them in his TODO. By the way, does someone think that a
GUI for monodocer (inside the browser, for example) could be useful?

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Re: msdn-browser/monodoc intergration

2005-09-24 Thread Mario Sopena
Hello,

2005/9/24, Ben Maurer <[EMAIL PROTECTED]>:
> get some idea of what it does. So why not make this process easier, by
> providing them a usable interface (IE, a treeview that doesn't suck in
> firefox)?
The reason are what Joshua already said. If the user has a great doc
(msdn) at hand, they will just move to look there and not to use mono
docs, because what they care is having a good doc and not where that
doc come from (well, most part of the users). But that is just my
opinion.

> > BTW, the msdn doc utility is incomplete, as you cannot click on the
> > links (and it won't be easy to fix);
>
> Shouldn't be all that hard. All I need to do is intercept the link click
> from gecko, load it, and sync the toc, all of which are actually pretty
> easy (there is data in the html pages for toc syncing).
I wast just not aware of the details.

>
> >  so it needs a lot of work before
> > being added.
>
> IMHO, this tool is useful today even without any more features. It is
> 10x faster for me to use my tool than it is to use firefox.

Hey, Ben, I think you took my email as an attack to the msnd doc,
which is not. I think is a great tool, I was just wondering if it
could have some negative effects including it on monodoc. Maybe it
will be better to keep separate. But maybe I'm wrong.
>
> >  Also, it is made with gtk#2 and we use gtk#1 in monodoc.
>
> Miguel has talked about bumping monodoc up to depend on gtk#2. Once we
> do this, I'd love to see the primary tree be moved to the new api. But
> for now, I could live with another tab.
hey, I would like to be aware of that. I think that will solve a bug in elabel!

Mario.
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] Fix for bug #54070

2005-09-21 Thread Mario Sopena
Hey,

this patch fixes the bug
http://bugzilla.ximian.com/show_bug.cgi?id=54070 by making the
documentation errors conditional.

If mcs is not found, a warning text is displayed and the errors arent built.

Any comment before commiting?

Mario
Index: monodoc/configure.in
===
--- monodoc/configure.in	(revision 50360)
+++ monodoc/configure.in	(working copy)
@@ -14,6 +14,8 @@
 AC_PATH_PROG(RUNTIME, mono, no)
 AC_PATH_PROG(CSC, mcs, no)
 
+AC_CHECK_FILE(../mcs, build_cserrors=yes, build_cserrors=no)
+AM_CONDITIONAL(BUILD_CSERRORS, test "x$build_cserrors" = "xyes")
 
 if test "x$GACUTIL" = "xno" ; then
 AC_MSG_ERROR([No gacutil tool found])
@@ -60,3 +62,10 @@
 scripts/mdvalidater
 scripts/mdcs2ecma
 ])
+
+if test "x$build_cserrors" = "xno" ; then
+	echo "---"
+	echo "The sources of the mono compiler (mcs) were not found."
+	echo "To include the COMPILER ERRORS in the documentation,"
+	echo "download the mcs sources and rerun autogen.sh"
+fi
Index: monodoc/class/Makefile.am
===
--- monodoc/class/Makefile.am	(revision 50360)
+++ monodoc/class/Makefile.am	(working copy)
@@ -1,5 +1,6 @@
 sourcesdir = $(libdir)/monodoc/sources
 
+if BUILD_CSERRORS
 sources_DATA = \
 	ecma334.tree ecma334.zip ecma334.source 		\
 	netdocs.tree netdocs.zip netdocs.source			\
@@ -7,6 +8,14 @@
 	cs-errors.tree cs-errors.zip cs-errors.source 		\
 	Mono.tree Mono.zip Mono.source \
 	Novell.source Novell.zip Novell.tree
+else
+sources_DATA = \
+	ecma334.tree ecma334.zip ecma334.source 		\
+	netdocs.tree netdocs.zip netdocs.source			\
+	nunit-docs.tree nunit-docs.zip nunit-docs.source	\
+	Mono.tree Mono.zip Mono.source \
+	Novell.source Novell.zip Novell.tree
+endif
 
 ASSEMBLER = ../engine/assembler.exe
 
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] msdn-browser/monodoc intergration

2005-09-20 Thread Mario Sopena
Hey,

2005/9/20, Rafael Ferreira <[EMAIL PROTECTED]>:
> Well that's 2 votes against 1 so I would have to give in to you guys. I
> would not want to waste time on something that would not make into
> monodoc anyways. I guess I'll just figure something else to tackle
> next.

I can help your there. Just pick one of the list:

- Rebuild the monkeyguide from the wiki pages
- Refine the searching ability
- Repair bookmarks
- Look for a bug to repair...there are not so much, but there are some
- One thing I would like to see every time we render an overview of a
class is a list of subclasses that implement it. For example, when
seeing System.IO.Stream, a list that points to MemoryStream,
FileStream, BufferedStream, 
- Working with uncompiled ecma documentation which has several
Namespaces doesnt work well
- Some namespace editing doesnt work well either

There are probably more things to dobut I can't remeber now. Just
don't forget to say in what are you working.

Mario.
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] msdn-browser/monodoc intergration

2005-09-19 Thread Mario Sopena
Hello,

2005/9/16, Rafael Ferreira <[EMAIL PROTECTED]>:
> yeah I see your point of view. But not having the documentation there
> can also just lead to the user popping a browser and going to msdn
> anyways, and by doing that he/she cannot add value to monodoc. Keeping
> the user inside monodoc increases the chance of contributions. In any
I'm not sure that is the case. I'm also more from the opinion of
Joshua, as I told to BenM on IRC. I do think the documentation in mono
is getting better but slowly, so we have to find ways to encourage
people to write docs, and that addition to monodoc will send an
ambiguous message to contributors

BTW, the msdn doc utility is incomplete, as you cannot click on the
links (and it won't be easy to fix); so it needs a lot of work before
being added. Also, it is made with gtk#2 and we use gtk#1 in monodoc.

Hey, but that is just my opinion.
Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] [PATCH] Monodoc. Workaround for a bug and index improvements

2005-09-19 Thread Mario Sopena
Hey,

2005/9/19, Rafael Ferreira <[EMAIL PROTECTED]>:
> Mario, no patch attached?
> 

  I did resent the patch, look that your filters didn't put my message
in the mono-devel list, as I sent also the patch there.

Sorry, I would like to post a link to my message, but the web mailing
list archive seems to be down for the moment.

Mario


> On Fri, 2005-09-16 at 16:36 +0200, Mario Sopena wrote:
> > Hello,
> >
> > We have a problem in Monodoc when showing big html code with
> > gecko. Monodoc hangs and do nothing (try to load the Gtk Namespace).
> > This is due to a bug in gtkmozembed
> > (https://bugzilla.mozilla.org/show_bug.cgi?id=245960). The workaround
> > I've implemented writes the html on disk and loads the file from it,
> > when the html code is big enough. The file is being writen to a temp
> > directory.
> > The only thing I'm not sure is whether I should myself delete what I
> > write there or if I can just leave that for the system (for the
> > moment, nothing is removed).
> >
> > The other thing that comes with this patch is a user-feature requested
> > by miguel. The index and the search_index require those index to be
> > create prior to use them. Right now, if they don't exist, a label is
> > showed telling you that you have to run a command in root to create
> > them.
> > With this patch, monodoc looks for the index also in the user dir, and
> > when it doesn't find them, it shows a panel with a progress bar that
> > lets you make them at that time. The index are created in another
> > Thread, so you can use monodoc while making them (specially the search
> > index is slow, well, around a minute in my machine).
> > To try the patch, remove your monodoc.index file and search_index dir
> > from the monodoc directory and run the patched monodoc.
> >
> > Hope you all enjoy it. Comments please?!?
> >
> > Mario
> > ___
> > Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-docs-list
> >
> 
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] Re: [Mono-dev] [PATCH] Monodoc. Workaround for a bug and index improvements

2005-09-19 Thread Mario Sopena
Hey

2005/9/18, James Willcox <[EMAIL PROTECTED]>:
> Mario,
> 
> I'd like to try the patch, but it seems you forgot to attach it :)
> 

wps, I'm sorry. :-P

> On Fri, 2005-09-16 at 16:36 +0200, Mario Sopena wrote:
> > Hello,
> >
> > We have a problem in Monodoc when showing big html code with
> > gecko. Monodoc hangs and do nothing (try to load the Gtk Namespace).
> > This is due to a bug in gtkmozembed
> > (https://bugzilla.mozilla.org/show_bug.cgi?id=245960). The workaround
> > I've implemented writes the html on disk and loads the file from it,
> > when the html code is big enough. The file is being writen to a temp
> > directory.
> > The only thing I'm not sure is whether I should myself delete what I
> > write there or if I can just leave that for the system (for the
> > moment, nothing is removed).
> >
> > The other thing that comes with this patch is a user-feature requested
> > by miguel. The index and the search_index require those index to be
> > create prior to use them. Right now, if they don't exist, a label is
> > showed telling you that you have to run a command in root to create
> > them.
> > With this patch, monodoc looks for the index also in the user dir, and
> > when it doesn't find them, it shows a panel with a progress bar that
> > lets you make them at that time. The index are created in another
> > Thread, so you can use monodoc while making them (specially the search
> > index is slow, well, around a minute in my machine).
> > To try the patch, remove your monodoc.index file and search_index dir
> > from the monodoc directory and run the patched monodoc.
> >
> > Hope you all enjoy it. Comments please?!?
> >
> > Mario
> > ___
> > Mono-devel-list mailing list
> > Mono-devel-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> 
>
Index: engine/provider.cs
===
--- engine/provider.cs	(revision 49928)
+++ engine/provider.cs	(working copy)
@@ -1261,7 +1261,14 @@
 	
 	public IndexReader GetIndex ()
 	{
-		return IndexReader.Load (Path.Combine (basedir, "monodoc.index"));
+		//try to load from basedir
+		string index_file = Path.Combine (basedir, "monodoc.index");
+		if (File.Exists (index_file))
+			return IndexReader.Load (index_file);
+		//then, try to load from config dir
+		index_file = Path.Combine (SettingsHandler.Path, "monodoc.index");
+		return IndexReader.Load (index_file);
+		
 	}
 
 	public static void MakeIndex ()
@@ -1276,17 +1283,35 @@
 			hs.PopulateIndex (index_maker);
 		}
 
-		index_maker.Save (Path.Combine (root.basedir, "monodoc.index"));
+		// if the user has no write permissions use config dir
+		string path = Path.Combine (root.basedir, "monodoc.index");
+		try {
+			index_maker.Save (path);
+		} catch (System.UnauthorizedAccessException) {
+			path = Path.Combine (SettingsHandler.Path, "monodoc.index");
+			try {
+index_maker.Save (path);
+			} catch (System.UnauthorizedAccessException) {
+Console.WriteLine ("Unable to write index file in {0}", Path.Combine (SettingsHandler.Path, "monodoc.index")); 
+return;
+			}
+		}
 
 		// No octal in C#, how lame is that
-		chmod (Path.Combine (root.basedir, "monodoc.index"), 0x1a4);
+		chmod (path, 0x1a4);
 		Console.WriteLine ("Documentation index updated");
 	}
 	
 	// Search Index
 	public SearchableIndex GetSearchIndex ()
 	{
-		return SearchableIndex.Load (Path.Combine (basedir, "search_index"));
+		//try to load from basedir
+		string index_file = Path.Combine (basedir, "search_index");
+		if (Directory.Exists (index_file))
+			return SearchableIndex.Load (index_file);
+		//then, try to load from config dir
+		index_file = Path.Combine (SettingsHandler.Path, "search_index");
+		return SearchableIndex.Load (index_file);
 	}
 
 	public static void MakeSearchIndex ()
@@ -1306,8 +1331,17 @@
 
 			writer = new IndexWriter(Lucene.Net.Store.FSDirectory.GetDirectory(dir, true), new StandardAnalyzer(), true);
 		} catch (UnauthorizedAccessException) {
-			Console.WriteLine ("You don't have permissions to wirte on " + dir);
-			return;
+			//try in the .config directory
+			try {
+dir = Path.Combine (SettingsHandler.Path, "search_index");
+if (!Directory.Exists (dir)) 
+	Directory.CreateDirectory (dir);
+
+writer = new IndexWriter(Lucene.Net.Store.FSDirectory.GetDirectory(dir, true), new StandardAnalyzer(), true);
+			} catch (UnauthorizedAccessException) {
+Console.WriteLine ("You don't have permissions to write on " + d

[Mono-docs-list] [PATCH] Monodoc. Workaround for a bug and index improvements

2005-09-16 Thread Mario Sopena
Hello,

We have a problem in Monodoc when showing big html code with
gecko. Monodoc hangs and do nothing (try to load the Gtk Namespace).
This is due to a bug in gtkmozembed
(https://bugzilla.mozilla.org/show_bug.cgi?id=245960). The workaround
I've implemented writes the html on disk and loads the file from it,
when the html code is big enough. The file is being writen to a temp
directory.
The only thing I'm not sure is whether I should myself delete what I
write there or if I can just leave that for the system (for the
moment, nothing is removed).

The other thing that comes with this patch is a user-feature requested
by miguel. The index and the search_index require those index to be
create prior to use them. Right now, if they don't exist, a label is
showed telling you that you have to run a command in root to create
them.
With this patch, monodoc looks for the index also in the user dir, and
when it doesn't find them, it shows a panel with a progress bar that
lets you make them at that time. The index are created in another
Thread, so you can use monodoc while making them (specially the search
index is slow, well, around a minute in my machine).
To try the patch, remove your monodoc.index file and search_index dir
from the monodoc directory and run the patched monodoc.

Hope you all enjoy it. Comments please?!?

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Monodoc print support patch - feedback needed.

2005-09-08 Thread Mario Sopena
Hey,

On 9/6/05, Rafael Ferreira <[EMAIL PROTECTED]> wrote:
> Mario,
> 
> here's the updated patch. It took me some time to get this to you
> because I updated my docbrowser and monodoc sources so I had to merge
> the printing patch upstream. This time I basically edited the
> browser.glade file by hand, adding only the needed entries.
> 
> Let me know what you could use a hand with next.

I took your patch and worked a little bit with it. This are the things
I've changed:

- Since we already have an abstraction for separing Gecko and GtkHTML
with IHtmlRender and the two implementations (Gtk and Gecko), I've
moved all the printing logic to them, so we can get rif of
IPrintManager and GtkHTMLPrintManager. I do think is more sane now. I
have used a Print method only with a parameter, the html code, because
when using css, the html code returned by the HelpSource already has
the css.

- The print menu item is only clickable when you are not editing a node

- I've encountered problems because the two kinds of Url presents in
monodoc (with your patch, the browser crashed when printing a node
which was accesed through the treeview). I think now it works.

- The ecma provider was not tracking well the use_css variable. Now,
it will print the html according to it. (For the moment, everything
without css)

- I've left out the thing with gnome-stock-about and gtk-about because
I'm not sure it's really important now, try to open a bug in bugzilla.

By the way, I think the monodoc section of bugzilla is forgoten and
unmaintained. Miguel, can you give me permission to deal with it?

Comments?

Mario
Index: browser/ChangeLog
===
--- browser/ChangeLog	(revision 49472)
+++ browser/ChangeLog	(working copy)
@@ -1,3 +1,6 @@
+2005-09-08 Mario Sopena Novales <[EMAIL PROTECTED]>
+	* ecma-provider.cs: Track use_css better
+	
 2005-09-05 Mario Sopena Novales <[EMAIL PROTECTED]>
 	Implement basic searching capabilities
 	* provider.cs: 
Index: browser/ecma-provider.cs
===
--- browser/ecma-provider.cs	(revision 49472)
+++ browser/ecma-provider.cs	(working copy)
@@ -1024,20 +1024,26 @@
 		ecma_transform.Transform (ecma_xml, args, w, null);
 	}
 	
+	static XslTransform ecma_transform_css, ecma_transform_no_css;
 	static void EnsureTransform ()
 	{
 		if (ecma_transform == null) {
-			ecma_transform = new XslTransform ();
+			ecma_transform_css = new XslTransform ();
+			ecma_transform_no_css = new XslTransform ();
 			Assembly assembly = System.Reflection.Assembly.GetCallingAssembly ();
-			Stream stream;
-			if (use_css) 
-stream = assembly.GetManifestResourceStream ("mono-ecma-css.xsl");
-			else 
-stream = assembly.GetManifestResourceStream ("mono-ecma.xsl");
-
+			
+			Stream stream = assembly.GetManifestResourceStream ("mono-ecma-css.xsl");
 			XmlReader xml_reader = new XmlTextReader (stream);
-			ecma_transform.Load (xml_reader, null, null);
-		}
+			ecma_transform_css.Load (xml_reader, null, null);
+			
+			stream = assembly.GetManifestResourceStream ("mono-ecma.xsl");
+			xml_reader = new XmlTextReader (stream);
+			ecma_transform_no_css.Load (xml_reader, null, null);
+		}
+		if (use_css)
+			ecma_transform = ecma_transform_css;
+		else
+			ecma_transform = ecma_transform_no_css;
 	}
 
 	// This ExtensionObject stuff is used to check at run time whether
Index: docbrowser/IHtmlRender.cs
===
--- docbrowser/IHtmlRender.cs	(revision 48726)
+++ docbrowser/IHtmlRender.cs	(working copy)
@@ -32,6 +32,8 @@
 	string Url { get; }
 
 	Widget HtmlPanel { get; }
+
+	void Print (string Html);
 }
 
 
Index: docbrowser/GeckoHtmlRender.cs
===
--- docbrowser/GeckoHtmlRender.cs	(revision 49195)
+++ docbrowser/GeckoHtmlRender.cs	(working copy)
@@ -2,6 +2,7 @@
 // GeckoHtmlRender.cs: Implementation of IHtmlRender that uses Gecko
 //
 // Author: Mario Sopena
+// Author:	Rafael Ferreira <[EMAIL PROTECTED]>
 //
 using System;
 using System.Text;
@@ -9,6 +10,7 @@
 using System.Collections;
 using Gecko;
 using Gtk;
+using Gnome;
 
 namespace Monodoc {
 public class GeckoHtmlRender : IHtmlRender {
@@ -152,5 +154,43 @@
 		return html.ToString();
 	}
 
+	public void Print (string Html) {
+		
+		if (Html == null) {
+			Console.WriteLine ("empty print");
+			return;
+		}
+
+		string Caption = "Monodoc Printing";
+
+		PrintJob pj = new PrintJob (PrintConfig.Default ());
+		PrintDialog dialog = new PrintDialog (pj, Caption, 0);
+
+		Gtk.HTML gtk_html = new Gtk.HTML (Html);
+		gtk_html.PrintSetMaster (pj);
+			
+		PrintContext ctx = pj.Context;
+		gtk_html.Print (ctx);
+
+		pj.Close ();
+
+		// hello user
+		int response = dialog.Run ();
+		
+		if (res

Re: [Mono-docs-list] Monodoc print support patch - feedback needed.

2005-09-04 Thread Mario Sopena
Hey,

 I was trying your patch and I realized that when using gecko and
printing, the results are ugly, because monodoc uses css for rendering
but you use Gtkhtml for printing, so, while we make gecko print, we
can disable css before printing and enable it later. Something like
this:

void on_print1_activate (object sender, EventArgs e) {
Node n; 
// desactivate css temporary 
if (UseGecko)
HelpSource.use_css = false;

// sending Html to the printed. 
print_manager.Print(help_tree.RenderUrl (CurrentUrl, out 
n),null,n.Caption);

if (UseGecko)
HelpSource.use_css = true;  
}

if you agree I can make the changes myself before applying the patch.

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Monodoc print support patch - feedback needed.

2005-09-01 Thread Mario Sopena
Hello,

On 9/1/05, Miguel de Icaza <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> > Mario,
> >
> > My comments are below:
> 
> Does this patch work in the presence of the Mozilla version?
> 
> If so, the code can go into SVN.

It seems it uses GtkHtml for printing in both cases, so, yes, it works
when you use mozilla for rendering, but prints the documentation in
the format showed by GtkHtml. Maybe with the work done by Michel for
the ASP.NET editor we can make mozilla print. I will investigate that.

But in the mean time I think we can use this solution.

Rafael, can you send me your complete name and email for the credits of monodoc?

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] Searching for Monodoc

2005-09-01 Thread Mario Sopena
Hey,

  A patch that I promised to send some time ago. The patch would
require that you download my own stripped version of Lucene from
here[1]. That version is just the Lucene you can download from
http://www.dotlucene.net/ but modified to be in a Monodoc.Lucene...
namespace, which let us keep monodoc.dll in the GAC without breaking
the Golden Rules [2].
 The process to make the index is similar to the actual index. The
important method is PopulateSearchableIndex which fills
SearchableDocuments that are added to the Lucene index. It is
implemented for the ecmaspec and the ecma providers.
 The SearchableDocuments have 5 fields:
- title: nice title to show to the user
- url: to retrieve the node later
- hottext: the most important bits in this node
- text: a big piece of text
- examples: the code examples found
The ones used for searching are the last 3 in the following order of
importance: hottext > text > examples.

 The important missing things  are:
- The modifications made by the user aren't added to the index
- Nodes added with the --edit parameter won't be searchable either
- Right now, the whole Lucene is compiled in monodoc. Will it be
better a lighter version of Lucene?

Comments please!

[1] http://personales.ya.com/msopena/Monodoc.Lucene.Net.tar.gz
[2] http://www.mono-project.com/Assemblies_and_the_GAC


search.tar.gz
Description: GNU Zip compressed data
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Monodoc print support patch - feedback needed.

2005-08-30 Thread Mario Sopena
Hello,

On 8/28/05, Rafael Ferreira <[EMAIL PROTECTED]> wrote:
> Hey everyone,
> 
> This patch creates a basic infrastructure for printing in monodoc. The
> patch is composed of:
> 
> * docbrowser.patch - Minor changes to browser.cs / browser.glade to add
> printing support
> * IPrintManager.cs - Printing interface to allow for different printing
> back ends
> * GtkHTMLPrintManager.cs - GtkHtml implementation of IPrintManager.cs

It's better to integrate everything in the patch file (just my
opinion). Just use svn add file_name for adding those .cs files and
then, when you make the patch, svn will integrate them. For the
Changelog, label the new files with the word added, so everyone will
know that file was added at that point (look at the other entries in
the Changelog).

Also, the diff to the glade file shows you are including a lots of things like:

+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0

that are probably automatically added by glade but are not necessary,
so try to leave them out. You have also some changes to some icons or
images..are those necessary? Can you explain why?

Mario

> 
> Currently the GtkHtml implementation is fully functional in all of its
> css-less glory. The lack of css support will cause the printed html to
> not look identical to the "on-screen" html if the user is using the
> gecko rendering engine. This can be easily corrected/improved by
> implementing a Gecko based print manager once gecko-sharp catches up to
> printing.
> 
> As always, feedback is appreciated.
> 
> - raf
> 
> 
> 
> 
> 
> 
> ___
> Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-docs-list
> 
> 
> 
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] Monodoc: Add contribution links to home page

2005-08-26 Thread Mario Sopena
Hi,

> "Restore" is less frightening than "Delete", but it works better for
> "changes" than for "additions" so I feel the
> The dialog helps filter unintended or not ready contributions (either
> "changes" and "additions"). I the dialog you'd need to have a way to
> "Restore/Delete" unintended contributions and other to "Select" those
> to be uploaded, as they may yeld different sets.
>
> This dialog, or some other derived from it, may help also in
> navigating through the "pending" contributions (the ones not yet ready
> to be uploaded) as the work on them may span many sessions inside the
> documentation browser.
>

I've added to the patch the dialog thing, to see an screenshot look
here: 
http://msopena.blogspot.com/2005/08/contributor-experiencetm-revisited.html

There is the possibility to:
- open selected contribution
- restore/delete selected contribution
- upload only the marked ones

Of course that only works with contributions writen after the patch.
The old ones are automatically sent in the first upload being made (at
least the program shows at the root page how many of those
contributions are left, as well as new contributions with a link).

I've tried several times the upload process and everything seems ok
(sorry if I have sent several mini-contributions to the docs).

Ok to commit?

Mario


monodoc.tar.gz
Description: GNU Zip compressed data
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] Monodoc: Add contribution links to home page

2005-08-22 Thread Mario Sopena
ons would be greatly apreciated. The procedure is easy, browse to the part of the documentation you want to contribute and click on the [Edit] link to start writing the documentation.");
+	sb.Append ("When you are happy with your changes, use the menu File-->Upload Contributions to upload your contributions to our server.");
+} else {
+	sb.Append (con.ToString ());
+	sb.Append ("Note: Only contributions made from now on will have a link");
+}
+sb.Append ("");
+return sb.ToString ();	
+			} else {
+if (home_cache == null) {
+	System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly (typeof (HelpSource));
+	Stream hp_stream = assembly.GetManifestResourceStream ("home.html");
+	home_cache = (new StreamReader (hp_stream)).ReadToEnd ();
+}
+StringBuilder sb = new StringBuilder (home_cache);
+// adjust fonts
+sb.Replace ("@@FONT_FAMILY@@", SettingsHandler.Settings.preferred_font_family);
+sb.Replace ("@@FONT_SIZE@@", SettingsHandler.Settings.preferred_font_size.ToString());
+//contributions
+if (chgs.Count == 0)
+	sb.Replace ("@@CONTRIB_DISP@@", "display: none;");
+else {
+	sb.Replace ("@@NO_CONTRIB_DISP@@", "display: none;");
+	sb.Replace ("@@CONTRIBS@@", con.ToString ());
+}
+	
+// load the url of nodes
+String add_str;
+StringBuilder urls = new StringBuilder ();
+foreach (Node n in Nodes) {
+	add_str = String.Format ("{1}", n.Element, n.Caption);
+	urls.Append (add_str);
+}
+sb.Replace ("@@API_DOCS@@", urls.ToString ());
+		
+return sb.ToString ();
+			}
 		} 
 		
 		if (url.StartsWith ("root:")) {
Index: browser/ChangeLog
===
--- browser/ChangeLog	(revision 48618)
+++ browser/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2005-08-22 Mario Sopena Novales <[EMAIL PROTECTED]>
+	* editing.cs: Add a new Attribute NodeUrl to Change
+	* provider.cs: Render root with Css and contribution links
+	* home.html: added. Template for the root
+	* ecma-provider.cs: new method GetNiceUrl to obtain "T:System.Object" urls
+	* Makefile.am: added the home.html file to the build process
+
 2005-08-17 Mario Sopena Novales <[EMAIL PROTECTED]>
 	* provider.cs: The preferred_font_family and the preferred_font_size
 	are now handled by the settings object
Index: browser/home.html
===
--- browser/home.html	(revision 0)
+++ browser/home.html	(revision 0)
@@ -0,0 +1,78 @@
+
+
+/* GENERAL */
+
+body, table {
+	font-family: @@FONT_FAMILY@@, sans-serif;
+	font-size: @@FONT_SIZE@@%;
+}
+
+#title {
+	width: 94%;
+	margin-left: 1%;
+	padding: 2%;
+	border: 2px solid black;
+	background: #b0c4de;
+	font-size: 140%;
+	font-weight: bold;
+	font-variant: small-caps;
+	text-align: center;
+	}
+
+/* ECMA BLOCK */
+#docs {
+	margin-bottom: 1em;
+}
+
+/* CONTRIBUTIONS */
+#contrib {
+	margin-top: 2em;
+	width: 98%;
+	margin-left: 1%;
+	color: black;
+	background: #fff3f3;
+	border: 1px solid #ffc9c9;
+	}
+#contribTitle {
+	text-align: left;
+	font-weight: bold;
+	padding: .4em;
+	font-size: 110%;
+}
+#contrib #content {
+	padding: .4em;
+}
+#some-contrib {
+	@@CONTRIB_DISP@@
+}
+#no-contrib {
+	@@NO_CONTRIB_DISP@@
+}
+#contrib p {
+	text-indent: 1em;
+	text-align: justify;
+	}
+
+
+
+Mono Documentation Library
+
+
+	
+	@@API_DOCS@@
+	
+
+
+
+	Contributions
+	
+		
+			@@CONTRIBS@@
+			Note: Only contributions made from now on will have a link 
+		
+		
+			You don't have any contribution yet.
+			The Documentation of the libraries is not complete and your contributions would be greatly apreciated. The procedure is easy, browse to the part of the documentation you want to contribute and click on the [Edit] link to start writing the documentation.
+			When you are happy with your changes, use the menu File-->Upload Contributions to upload your contributions to our server.
+	
+
Index: browser/ecma-provider.cs
===
--- browser/ecma-provider.cs	(revision 48386)
+++ browser/ecma-provider.cs	(working copy)
@@ -1332,6 +1332,49 @@
 	}
 	
 	//
+	// Obtain an URL of the type T:System.Object from the node
+	// 
+	public static string GetNiceUrl (Node node) {
+		if (node.Element.StartsWith("N:"))
+			return node.Element;
+		string name, full;
+		int bk_pos = node.Caption.IndexOf (' ');
+		// node from an overview
+		if (bk_pos != -1) {
+			name = node.Caption.Substring (0, bk_pos);
+			full = node.Parent.Caption + "." + name.Replace ('.', '+');
+			return "T:" + full;
+		}
+		// node that lists constructors, methods, fields, ...
+		if ((node.Caption == "Constructors") || (node.Caption 

[Mono-docs-list] [PATCH] Change the font size in monodoc

2005-08-17 Thread Mario Sopena
Hello,

I've added the possibility to change the font size to monodoc
browser. When monodoc uses gecko, it adds the usual menu items for
changing the font size (larger, smaller and normal) to the View menu.
The change is made through css and it is saved with the settings, so
you don't have to change every time you start the program.
   I've seen Miguel had deleted the FONT_SIZE property of the
css...because it was in px (?). Now font_size is set in %, but tell me
if there is a problem with this approach.

  ok to commit?

Mario
Index: browser/provider.cs
===
--- browser/provider.cs	(revision 48386)
+++ browser/provider.cs	(working copy)
@@ -375,14 +375,13 @@
 			System.Reflection.Assembly assembly = System.Reflection.Assembly.GetCallingAssembly ();
 			Stream str_css = assembly.GetManifestResourceStream ("base.css");
 			StringBuilder sb = new StringBuilder ((new StreamReader (str_css)).ReadToEnd());
-			sb.Replace ("@@FONT_FAMILY@@", preferred_font_family);
-			sb.Replace ("@@FONT_SIZE@@", preferred_font_size.ToString());
+			sb.Replace ("@@FONT_FAMILY@@", SettingsHandler.Settings.preferred_font_family);
+			sb.Replace ("@@FONT_SIZE@@", SettingsHandler.Settings.preferred_font_size.ToString());
 			css_code = sb.ToString ();
 			return css_code;
 		}
+		set { css_code = value; }
 	}
-	public static string preferred_font_family;
-	public static double preferred_font_size;
 
 	//
 	// The unique ID for this HelpSource.
Index: browser/base.css
===
--- browser/base.css	(revision 48386)
+++ browser/base.css	(working copy)
@@ -6,6 +6,7 @@
 
 body, table {
 	font-family: @@FONT_FAMILY@@, sans-serif;
+	font-size: @@FONT_SIZE@@%;
 }
 
 div.header {
Index: browser/settings.cs
===
--- browser/settings.cs	(revision 48386)
+++ browser/settings.cs	(working copy)
@@ -76,6 +76,11 @@
 		public int LastSeenVersion = -1;
 
 		public static bool RunningGUI = false;
+
+		// fonts for rendering
+		public string preferred_font_family;
+		public double preferred_font_size;
+
 	}
 }
 
Index: browser/ChangeLog
===
--- browser/ChangeLog	(revision 48386)
+++ browser/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2005-08-17 Mario Sopena Novales <[EMAIL PROTECTED]>
+	* provider.cs: The preferred_font_family and the preferred_font_size
+	are now handled by the settings object
+	* base.css: add a porcentual fontsize property
+	* settings.cs: added the preferred_font_family and the preferred_font_size
+
 2005-08-09 Mario Sopena Novales <[EMAIL PROTECTED]>
 	
 	* provider.cs: Added a BuildHtml function as the main point to render
Index: docbrowser/ChangeLog
===
--- docbrowser/ChangeLog	(revision 48386)
+++ docbrowser/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2005-08-17 Mario Sopena Novales <[EMAIL PROTECTED]>
+	* browser.cs: Added Menu Items for changing the font size when using 
+	gecko. Also added a Reload function.
+	* history.cs: Added a Count property
+
 2005-08-09 Mario Sopena Novales <[EMAIL PROTECTED]>
 	* browser.cs: 
 		- Allow render with CSS
Index: docbrowser/browser.cs
===
--- docbrowser/browser.cs	(revision 48386)
+++ docbrowser/browser.cs	(working copy)
@@ -126,6 +126,10 @@
 	public bool UseGecko;
 
 	[Glade.Widget] MenuItem bookmarksMenu;
+	[Glade.Widget] MenuItem view1;
+	MenuItem textLarger;
+	MenuItem textSmaller;
+	MenuItem textNormal;
 
 	[Glade.Widget] VBox help_container;
 	
@@ -216,6 +220,36 @@
 		tabs_nb.SwitchPage += new SwitchPageHandler(ChangeTab);
 		help_container.Add(tabs_nb);
 
+		if (UseGecko) {
+			// Add Menu entries for changing the font
+			Menu aux = (Menu) view1.Submenu;
+			MenuItem sep = new SeparatorMenuItem ();
+			sep.Show ();
+			aux.Append (sep);
+			AccelGroup accel = new AccelGroup ();
+			MainWindow.AddAccelGroup (accel);
+
+			textLarger = new MenuItem ("_Larger text");
+			textLarger.Activated += new EventHandler (TextLarger);
+			textLarger.Show ();
+			aux.Append (textLarger);
+			AccelKey ak = new AccelKey (Gdk.Key.plus, Gdk.ModifierType.ControlMask, AccelFlags.Visible);
+			textLarger.AddAccelerator ("activate", accel, ak);
+		
+			textSmaller = new MenuItem ("_Smaller text");
+			textSmaller.Activated += new EventHandler (TextSmaller);
+			textSmaller.Show ();
+			aux.Append (textSmaller);
+			ak = new AccelKey (Gdk.Key.minus, Gdk.ModifierType.ControlMask, AccelFlags.Visible);
+			textSmaller.AddAccelerator ("activate", accel, ak);
+	
+			textNormal = new MenuItem ("_Original size");
+			textNormal.Activated += new EventHandler (TextNormal);

Re: [Mono-docs-list] print support for monodoc

2005-08-17 Thread Mario Sopena
Hello,

> If this works, it would mean that the HTML printed out could potentially
> look different that what the user is seeing (if monodoc is using the
> gecko engine), but I personally don't think it is a big deal. My other
Well, you have to check that because it could be barely readable
without css (just disable the use of css in BuildHtml as an easy hack
to see the results). The problem is that AFAIK the GtkHTML is/would be
deprecated (and keeped only for the systems that don't have
gecko-sharp).

> option is to look into the Mozilla API and try to P/invoke something,
> I'm not totally opposed to this but I have not been able to find any
> good source of info on the gecko API.
There is a guy (Michael Hutchinson) in the Summer of Code which has
implemented a glue layer that lets you call javascript functions in
mozilla from c#. He uses that for the Asp.net editor he is working on.
If we apply that to monodoc browser, maybe it would be possible to use
javascript for printing. However, I really dont know if javascript
lets you printing, :-)

By the way, Miguel, can I enable the hack of Michael to Monodoc? it
could let us repare the selectAll/copy/paste thing but I dont want to
try it out until I'm sure it could go with monodoc (it could also
allow rafael to work on the printing in a more sane way).

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] [PATCH] css support for Monodoc

2005-08-13 Thread Mario Sopena
Hello,

On 8/11/05, Miguel de Icaza <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> >  I've finally finished the css support for monodoc. The initial css
> > design is not perfect but the code is there so everybody can start
> > playing with it. The css is implemented for the ECMA, ECMA-spec and
> > error providers.
> 
> You have a TODO item regarding configuration: Monodoc is currently using
> a very simple configuration system based on XML files, I would love to
> keep using this, I do not want to use GConf for storing the font values.
> 
> Miguel
> 

I know, I was just wondering if we could grab the font preferences of
the user through gconf (not using gconf for storing the monodoc
fonts). The idea was to try to load gconf (so not adding a dependency)
and, if it fails, use a predefined font (as it is now). But it was
probably an idea instead of a TODO.

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-dev] Re: [Mono-docs-list] [PATCH] css support for Monodoc

2005-08-12 Thread Mario Sopena
Hello,

On 8/11/05, Miguel de Icaza <[EMAIL PROTECTED]> wrote:
> Hey!
> 
> I have a question: is it possible to provide support for making the
> fonts larger/smaller in Monodoc with Mozilla?
> 
> Miguel.

It should be. I will post a patch for that as soon as possible.

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] css support for Monodoc

2005-08-09 Thread Mario Sopena
Hey,

 I've finally finished the css support for monodoc. The initial css
design is not perfect but the code is there so everybody can start
playing with it. The css is implemented for the ECMA, ECMA-spec and
error providers.

 Monodoc will use css when gecko is loaded and fall into plain html
(old code) when using gtkHtml. Also, I've modified the providers so
all of them use a new function called BuildHtml. This way the creation
of the final html is centralized, allowing a common css shared between
providers (and could allow also javascipt code or other things).

The patch is divided in two diffs, one for monodoc and one for mono-tools.

Comments please!

PD: The diffs are quite big because the xslt file for ecma-api is huge


css_support.tar.gz
Description: GNU Zip compressed data
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] print support for monodoc

2005-08-09 Thread Mario Sopena
Hello,

On 8/8/05, Miguel de Icaza <[EMAIL PROTECTED]> wrote:
> Hey,
>
> > I'm thinking about hacking print support for monodoc, but I have a few
> > simple questions:
> >
> > * Is there still interest in it?
> > * Is anyone else working on this?
> > * Any pointers?
>
> It might be simpler today to just call into Mozilla to print, with the
> new Mozilla support.

The gecko-sharp doesn't have direct printing support so it won't we so
easy to hack. BTW, good luck and report your progress.

MArio
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] [PATCH] Monodoc Gecko support improved

2005-07-29 Thread Mario Sopena
Hola,

On 7/30/05, Todd Berman <[EMAIL PROTECTED]> wrote:
> I am curious how this works. My copy of gecko# is 0.6, and it is built
> against gtk# 2.0, this prevents it from being used to built monodoc. So
> this check here doesn't work.
Where did you get this gecko# 0.6? Because the one in SVN is gecko#2
which requires gtk#2 and the gecko# 0.6 from tarballs require gtk#
1.0. AFAIK, gecko# should be built for gtk#1.0 and gecko#2 for gtk#2.

> 
> Is the plan to move monodoc to gtk# 2.0, or to stick with the gecko#
> version that is built against gtk# 1.0 (Which I think is 0.5, I believe
> 0.6 has always built against 2.0).

This was "discussed" before. Look here (post by Ben Maurer):
http://lists.ximian.com/pipermail/mono-devel-list/2005-July/013356.html

Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] Monodoc Gecko support improved

2005-07-29 Thread Mario Sopena
Hey everybody,

after being stucked for a couple of days because of a stupid error
that I made, I've finally added some improvements to the gecko patch.

* Gecko support is now only built when gecko-sharp is present
(GeckoHtmlRender.dll). Gecko-sharp is not a requirement now.

* The HtmlRender.cs is splitted in 3 files, the interface and the two
implementations: IHtmlRender.cs, GtkHtmlHtmlRender.cs,
GeckoHtmlRender.cs

* When monodoc is started, it tries to load the gecko renderer and if
it fails, it uses the gtkhtml.

* The "--gecko" option is changed to "--no-gecko" because gecko is
(should be) the default

*The GeckoHtmlRender has a new function, checkUrl, that tries to solve
the problem with gecko, who lower-case the scheme part of the url (the
part before the ':'), thus, breaking some URLs like
T:System.Activator.

Things that are left:
* the scrollbar showed is the gecko one
* copy/paste doesn't work
* anchor links (links to the same page) doesn't work either

ok to commit?

Mario.
Index: configure.in
===
--- configure.in	(revision 47406)
+++ configure.in	(working copy)
@@ -42,8 +42,9 @@
 #fi
 AC_SUBST(GTK_SHARP_LIBS)
 
-PKG_CHECK_MODULES(GECKO_SHARP, gecko-sharp = 0.6)
+PKG_CHECK_MODULES(GECKO_SHARP, gecko-sharp = 0.6, enable_gecko=yes, enable_gecko=no)
 AC_SUBST(GECKO_SHARP_LIBS)
+AM_CONDITIONAL(ENABLE_GECKO, test "x$enable_gecko" = "xyes")
 
 dnl Intl
 GETTEXT_PACKAGE=mono-tools
@@ -55,6 +56,7 @@
 GNUNIT_VERSION=0.5
 AC_SUBST(GNUNIT_VERSION)
 
+
 AC_OUTPUT([
 Makefile
 gnunit/Makefile
@@ -76,4 +78,9 @@
 echo "Configuration summary"
 echo ""
 echo "   * Installation prefix = $prefix"
+echo "   * gecko-sharp.dll = $enable_gecko"
 echo ""
+echo "  NOTE: if any of the above say 'no' you may install the"
+echo "corresponding development packages for them, rerun"
+echo "autogen.sh to include them in the build."
+echo ""
Index: ChangeLog
===
--- ChangeLog	(revision 47406)
+++ ChangeLog	(working copy)
@@ -1,3 +1,6 @@
+2005-08-30 Mario Sopena Novales <[EMAIL PROTECTED]>
+	* configure.in: make gecko-sharp dependency conditional
+
 2005-06-09 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
 	* configure.in: added GNUNIT_VERSION.
Index: docbrowser/IHtmlRender.cs
===
--- docbrowser/IHtmlRender.cs	(revision 0)
+++ docbrowser/IHtmlRender.cs	(revision 0)
@@ -0,0 +1,38 @@
+//
+// IHtmlRender.cs: Interface that abstracts the html render widget
+//
+// Author: Mario Sopena
+//
+using System;
+using Gtk;
+
+namespace Monodoc {
+public interface IHtmlRender {
+	// Jump to an anchor of the form 
+	void JumpToAnchor (string anchor_name);
+
+	//Copy to the clipboard the selcted text
+	void Copy ();
+
+	//Select all the text
+	void SelectAll ();
+
+	//Render the HTML code given
+	void Render (string html_code);
+
+	//Event fired when the use is over an Url
+	event EventHandler OnUrl;
+
+	//Event fired when the user clicks on a Link
+	event EventHandler UrlClicked;
+
+	// Variable that handles the info encessary for the events
+	// As every implementation of HtmlRender will have differents events
+	// we try to homogenize them with the variabel
+	string Url { get; }
+
+	Widget HtmlPanel { get; }
+}
+
+
+}
Index: docbrowser/GeckoHtmlRender.cs
===
--- docbrowser/GeckoHtmlRender.cs	(revision 0)
+++ docbrowser/GeckoHtmlRender.cs	(revision 0)
@@ -0,0 +1,156 @@
+//
+// GeckoHtmlRender.cs: Implementation of IHtmlRender that uses Gecko
+//
+// Author: Mario Sopena
+//
+using System;
+using System.Text;
+using System.IO;
+using System.Collections;
+using Gecko;
+using Gtk;
+
+namespace Monodoc {
+public class GeckoHtmlRender : IHtmlRender {
+	
+	//Images are cached in a temporal directory
+	Hashtable cache_imgs;
+	string tmpPath;
+
+	WebControl html_panel;
+	Viewport panel;
+	public Widget HtmlPanel {
+		get { return (Widget) panel; }
+	}
+
+	string url;
+	public string Url {
+		get { return url; }
+	}
+	RootTree help_tree;
+
+	public event EventHandler OnUrl;
+	public event EventHandler UrlClicked;
+
+	public GeckoHtmlRender (RootTree help_tree) 
+	{
+		this.help_tree = help_tree;
+		html_panel = new WebControl("/tmp/monodoc", "MonodocGecko"); //FIXME
+		html_panel.Show(); //due to Gecko bug
+		html_panel.OpenUri += OnOpenUri;
+		html_panel.LinkMsg += OnLinkMsg;
+		panel = new Viewport();
+		panel.Add (html_panel);
+		cache_imgs = new Hashtable();
+		tmpPath = Path.Combine (Path.GetTempPath(), "monodoc");
+	}
+
+	protected void OnOpenUri (object o, OpenUriArgs args)
+	{
+		url = CheckUrl (args.AURI);
+		if (UrlClicked != null)
+			Ur

Re: [Mono-docs-list] Contributing Apple Documentation to MonoDoc

2005-07-20 Thread Mario Sopena
Hello,

> > I wanted to do a toe-stepping check and ask if anyone has started, or
> > would have an issue with me working on cocoa-sharp class library
> > documentation for monodoc?

you probably know already, but just in case it helps, look here:

http://www.mono-project.com/Generating_Documentation
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] [PATCH] Add Gecko support

2005-07-19 Thread Mario Sopena
Hey guys,

> Now, one "cute" feature would be to autodect, this could be done by
> loading an assembly "MonoRenderGecko.dll" and "MonoRenderGtkHtml.dll",
> first you try loading the first and initting it from a `try' statement,
> if that fails, fall back to MonoRenderGkthtml.

I was adding the "cuteness" but ended up with some doubts (caused also
by a mail from BenM saying the requeriment for gecko is proably to
hard). Now, at compile time, it is *required* to have gecko-sharp and
gtkhtml-sharp. I was wondering which possibility do you think is
better :

 * Make gecko-sharp conditional (compile time) so, we end up with
MonoRenderGecko.dll if it is present. In this case,
MonoRenderGtkHtml.dll will not be necessary and we can add that
Renderer to the browser.exe, so if it fails to load the Gecko library,
it uses the GtkHtml in the same assembly.

 * Make both conditional (but at least require one). In this case, we
build both assemblies (GtkHtmlRender.dll and GeckoRender.dll) and
decide in runtime which use, with preference for Gecko.

 * Just as it is now, requiring both and building both assemblies
(GtkHtmlRender.dll and GeckoRender.dll) and at runtime take Gecko as
default.

I'm inclined for the first one or probably the second one, but before
dealing again with autotools I want to be sure.

Reggards, Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] [PATCH] Add Gecko support

2005-07-09 Thread Mario Sopena
Hello, 
there is a fast way. Just download the tarball from Beagle:
http://beaglewiki.org/Installing_prerequisites. Then, you just need to
add to gecko-sharp.dll.config a line pointing to the libgtkmozembed
(didn't know why the tarball don't have it). In my case was:


That worked for me.
Mario

On 7/9/05, Joshua Tauberer <[EMAIL PROTECTED]> wrote:
> Hey, Mario.  Normally I'd chime in with comments, but I haven't gotten
> gecko-sharp working yet on my box.  Just from reading the patch it looks
> good, though.
> 
> --
> - Joshua Tauberer
> 
> http://taubz.for.net
> 
> ** Nothing Unreal Exists **
> 
> 
>
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] [PATCH] Add Gecko support

2005-07-08 Thread Mario Sopena
Hello guys,

 As part of the Summer of Code I will be adding
some enhancements to monodoc, The first of those it's Gecko support for
rendering. The Patch sent actually support both rendering engines,
gecko and gtkhtml. The idea is to keep compatibility in the proccess of
getting gecko (that's what Miguel said ;-).
 The rendering is moved to an Interface, called
IHtmlRender, which has two implementations, one with Gecko and the
other with GtkHtml. The last one is a mere copy/paste of the old code.
The implementation with Gecko has some limitations at this point:

 * The scrollbars drawed are mozilla-themed and not gtk. Don't know why yet.
 * Copy/Paste/Select All, does not work with
gecko. I hope that gets solved once Michael (also from the Summer of
Code) finish his work with Mozilla
 * The default fonts are so big for me
 * The inner anchors (

Apart from those, everything works ;-). The contreversy with the images
loading in gecko some months before in the list was solved writting
those images in a temporary directory and puting the URL in the html
code generated. The first approach was to use the technique of Beagle,
encoding the images in Base64 (as in the mail) and puting that in the
src attribute of the images. The problem was that Gecko freezed if
you gave him html code bigger than 64 KB (see Beagle bug #158767). For
some pages of the Mono-Handbook, sticking the images there grew the
code so much that the limit was reached and monodoc freezed. So, I
changed the way the images were loaded to the cache based (It's not so
nice but it works).

Well, that's all I think. Ah! for test the gecko support, call monodoc with --gecko option (if not the GtkHtml render is used).

Mario.




Changelog
Description: Binary data
Index: configure.in
===
--- configure.in	(revision 46818)
+++ configure.in	(working copy)
@@ -42,6 +42,9 @@
 #fi
 AC_SUBST(GTK_SHARP_LIBS)
 
+PKG_CHECK_MODULES(GECKO_SHARP, gecko-sharp=0.6)
+AC_SUBST(GECKO_SHARP_LIBS)
+
 dnl Intl
 GETTEXT_PACKAGE=mono-tools
 AC_SUBST(GETTEXT_PACKAGE)
Index: docbrowser/browser.cs
===
--- docbrowser/browser.cs	(revision 46818)
+++ docbrowser/browser.cs	(working copy)
@@ -24,6 +24,7 @@
 	static int Main (string [] args)
 	{
 		string topic = null;
+		bool useGecko = false;
 		
 		for (int i = 0; i < args.Length; i++){
 			switch (args [i]){
@@ -80,6 +81,9 @@
 i++;
 break;
 
+			case "--gecko":
+useGecko = true;
+break;
 			default:
 topic = args [i];
 break;
@@ -91,7 +95,7 @@
 		
 		Settings.RunningGUI = true;
 		Application.Init ();
-		Browser browser = new Browser ();
+		Browser browser = new Browser (useGecko);
 		
 		if (topic != null)
 			browser.LoadUrl (topic);
@@ -119,6 +123,7 @@
 	public Notebook tabs_nb;
 	public Tab CurrentTab;
 	bool HoldCtrl;
+	public bool UseGecko;
 
 	[Glade.Widget] MenuItem bookmarksMenu;
 
@@ -165,8 +170,9 @@
 
 	public ArrayList bookList;
 
-	public Browser ()
+	public Browser (bool UseGecko)
 	{
+		this.UseGecko = UseGecko;
 		ui = new Glade.XML (null, "browser.glade", "window1", null);
 		ui.Autoconnect (this);
 
@@ -274,7 +280,7 @@
 		bar_style.SetBackgroundGC (StateType.Normal, MainWindow.Style.BackgroundGCs[1]);
 	}
 
-	Stream GetResourceImage (string name)
+	public Stream GetResourceImage (string name)
 	{
 		Assembly assembly = System.Reflection.Assembly.GetCallingAssembly ();
 		System.IO.Stream s = assembly.GetManifestResourceStream (name);
@@ -317,12 +323,12 @@
 		}
 	}
 	
-	public void LinkClicked (object o, LinkClickedArgs args)
+	public void LinkClicked (object o, EventArgs args)
 	{
 		if (HoldCtrl)
 			AddTab();
 
-		LoadUrl (args.Url);
+		LoadUrl (CurrentTab.html.Url);
 	}
 
 	private System.Xml.XmlNode edit_node;
@@ -376,12 +382,7 @@
 	{
 		CurrentUrl = url;
 
-		Gtk.HTMLStream stream = CurrentTab.html.Begin ("text/html");
-
-		stream.Write ("");
-		stream.Write (text);
-		stream.Write ("");
-		CurrentTab.html.End (stream, HTMLStreamStatus.Ok);
+		CurrentTab.html.Render("" + text + "");
 		if (matched_node != null) {
 			if (tree_browser.SelectedNode != matched_node)
 tree_browser.ShowNode (matched_node);
@@ -431,9 +432,9 @@
 	// Invoked when the mouse is over a link
 	//
 	string last_url = "";
-	public void OnUrlMouseOver (object o, OnUrlArgs args)
+	public void OnUrlMouseOver (object o, EventArgs args)
 	{
-		string new_url = args.Url;
+		string new_url = CurrentTab.html.Url;
 
 		if (new_url == null)
 			new_url = "";
@@ -1808,10 +1809,10 @@
 class Tab : Notebook {
 	
 	// Our HTML preview during editing.
-	public HTML html_preview;
+	public IHtmlRender html_preview;
 	
 	// Where we render the contents
-	public HTML html;
+	public IHtmlRender html;
 	
 	public TextView text_editor;
 	public Mode Tab_mode;
@@ -1843,16 +1844,18 @@
 		// First Page
 		//
 		ScrolledWindow html_container = new ScrolledWindow();
+		html_container.

Re: [Mono-docs-list] Re: [Mono-devel-list] patch for bug#57748

2005-06-14 Thread Mario Sopena
Hola,On 6/13/05, Joshua Tauberer <[EMAIL PROTECTED]> wrote:
Heh, okay, okay, here we go...Rafael Ferreira wrote:> Would you like to remove the plugins tab completely or just have a label> instead of the list?My preference would be to remove it alltogether.

Just a suggestion in form of ASCII art:

--
|   [Mono
icon] 
Monodoc 1.0.6         
   |  
|   [Mono
icon]   
|
|   [Mono icon]   The Mono Documentation Library viewer   |
|       |
| 
| 
|    Author
1  
Author 
|
|    Author
2  
Author 
|
|   
...  
|
|   _   |
| 
|
| 
[OK button] |
---
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Re: PATCH: resubmit

2005-06-14 Thread Mario Sopena Novales
Hola,

Cita de Rafael Ferreira <[EMAIL PROTECTED]>:

> Hey Joshua,
>
> Ah also, I have a patch to the bookmarking logic that makes it behave
> more like a web browser (where the "Add/Edit bookmark" options are
> always available). I'll send that to you next.

I sent a miniPatch some time ago that fixed that... but no one seemed to care. I
resubmit it.

Cheers, Mario
-- 
Index: browser.cs
===
--- browser.cs	(revisión: 42036)
+++ browser.cs	(copia de trabajo)
@@ -122,6 +122,8 @@
 	bool HoldCtrl;
 
 	[Glade.Widget] MenuItem bookmarksMenu;
+	[Glade.Widget] MenuItem add_bookmark1;
+	[Glade.Widget] MenuItem edit_bookmarks1;
 
 	[Glade.Widget] VBox help_container;
 	
@@ -1166,6 +1168,8 @@
 		foreach (Widget w in aux.Children)
 			aux.Remove (w);
 
+		aux.Append(add_bookmark1);
+		aux.Append(edit_bookmarks1);
 
 		if (bookList.Count > 0) {
 			MenuItem aux2 = new SeparatorMenuItem ();


Changelog
Description: Binary data
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] MonkeyGuide and Monodoc futures.

2005-03-31 Thread Mario Sopena
Hello,

On Wed, 30 Mar 2005 11:03:37 -0500, Miguel de Icaza <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I want to move Monodoc to use Mozilla instead of GtkHTML so we can
> start using CSS and remove all the hacks on our code that does css-like
> transformations into HTML.

Is the hack from Zac Bowling the starting point?

> the GUI tools will be moved into a new module for Gtk# based tools
> (still no name for it).
> 
Let me try a few:
- boring: GtkTools, GtkToolbox, #Tools, MonoTk
- obvious: MonoTools, MonoGtk, MonoVisual (VisualMono?? XD )
- funny: PlatanoTools, MonkeyToolkit, Monitools, Monomatic

Saludos, Mario
___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] Bookmarks patch

2005-03-21 Thread Mario Sopena
Hello,

  This is a really little patch for the annoying menu entries that
disappear from the Bookmarks menu when you add a new bookmark.

Ok to commit?

Mario
Index: browser.cs
===
--- browser.cs	(revisión: 42036)
+++ browser.cs	(copia de trabajo)
@@ -122,6 +122,8 @@
 	bool HoldCtrl;
 
 	[Glade.Widget] MenuItem bookmarksMenu;
+	[Glade.Widget] MenuItem add_bookmark1;
+	[Glade.Widget] MenuItem edit_bookmarks1;
 
 	[Glade.Widget] VBox help_container;
 	
@@ -1166,6 +1168,8 @@
 		foreach (Widget w in aux.Children)
 			aux.Remove (w);
 
+		aux.Append(add_bookmark1);
+		aux.Append(edit_bookmarks1);
 
 		if (bookList.Count > 0) {
 			MenuItem aux2 = new SeparatorMenuItem ();


Changelog
Description: Binary data


[Mono-docs-list] Monodoc patches policy

2005-02-01 Thread Mario Sopena Novales

Hi guys,

   I had written a little patch for letting Monodoc to connect through a proxy.
The problem is that it uses the GConf to get the proxy settings. Right now,
monodoc only works in Gnome (because gtkhtml) but as soon as the patch from Zac
Bowling let us run it in other platforms what will be the solution?

* Configure the proxy through a command line parameter?
* Use preprocessing?
* Detect the system in which application is running and configure it
dinamically?

I think the cleanest is the first one. Something like --proxy=http:// Any
suggestions?

On the other hand, has anyone started any effort to let monodoc search the
documentation? I've read somewhere that it would be nice to use Lucene. I'm
looking it but I don't want to duplicate anyones work.

Mario


___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] Proxy patch

2005-01-25 Thread Mario Sopena Novales
Hi guys,
because I'm behind a proxy right now I couldn't upload my contributions
to monodoc, so I've added support for a proxy. It looks in
the /system/http_proxy registry key. That works for me but I've not
tested in other places.

Mario

2005-01-25 Mario Sopena novales <[EMAIL PROTECTED]>

* browser/Contributions.cs: Look in GConf for a proxy and use it

* browser/Makefile.am: Add a reference for gconf-sharp
Index: Contributions.cs
===
--- Contributions.cs	(revision 38046)
+++ Contributions.cs	(working copy)
@@ -18,8 +18,18 @@
 System.ComponentModel.DesignerCategoryAttribute("code")]
 public class ContributionsSoap : System.Web.Services.Protocols.SoapHttpClientProtocol {
 
+static string PROXY_HOST = "/system/http_proxy/host";
+static string PROXY_PORT = "/system/http_proxy/port";
+static string USE_PROXY = "/system/http_proxy/use_http_proxy";
+
 public ContributionsSoap () {
 this.Url = "http://localhost:8080/server.asmx";;
+	//Looks in GConf for a proxy
+	GConf.Client gconf = new GConf.Client();
+	string proxy = (string) gconf.Get (PROXY_HOST) + ":" + (int) gconf.Get (PROXY_PORT);
+	bool use_proxy = (bool) gconf.Get(USE_PROXY);	
+	if (use_proxy)
+		System.Net.GlobalProxySelection.Select = new System.Net.WebProxy(proxy, true);
 }
 
 /// 
Index: Makefile.am
===
--- Makefile.am	(revision 38046)
+++ Makefile.am	(working copy)
@@ -60,7 +60,7 @@
 cs2ecma_sources = \
 	$(srcdir)/cs2ecma.cs
 
-browser_assemblies = -pkg:gtkhtml-sharp -pkg:glade-sharp -r:System.Web.Services
+browser_assemblies = -pkg:gtkhtml-sharp -pkg:glade-sharp -pkg:gconf-sharp -r:System.Web.Services
 
 EXTRA_DIST = \
 	$(monodoc_sources) $(assembler_sources) \


[Mono-docs-list] Tab Navigation

2005-01-19 Thread Mario Sopena Novales




Hi,
    I've returned with my patch to tab navigation. Summarizing everything:

    * Added Tab feature to Monodoc by adding a new Tab class that manage everything.
    * Move the related code from Browser to Tab class
    * Delete all the related GUI from browser.glade
    * Add support for ctrl-click, ctrl-pageup and pagedown to add and move between tabs
    * Tab shows more informative names like "Button: Memebers" or "Button: Events"
    * Add a CurrentTab variable to acces the GUI of the tab from the browser class
    * Add an active property in history so only one history (from all the tabs) responds to the buttons

I've added a ChangeLog with the Patch. If it is too sort (or too long) I will rewrite it. I had never done one.

Two thing remains:

    * I couldn't add a right-click for new Tab feature. That was because gtkHtml throws only LinkClicked events when a link is left-clicked. One idea that I had was to catch ButtonPressEvent from Widget class and when it was due to a right-click, then, throw a new ButtonPressed with the same coordinates but faking a left-clicked, so deceiving gtkHtml. But I couldn't make it. Any ideas?

    * I hold the Active property in history in spite of what Miguel told me. I think it makes sense there is one active history (from the active tab at that moment), so it can be tested when Backclicked or Fordwardclicked are called if that history event is the active and proceed or return where is not. What is a little confusing is that when you set a tab active, it makes the fordward or backward buttons active or not. But I think for that where the properties made, to hold more processing than setting a variable. Anyways, I thought more solutions, but no one seemed to me better.

And that is all. Well, Happy new year to everybody (a little late, but here it is). XD
Mario




TabsPatch.tar.gz
Description: application/compressed-tar


Re: [Mono-docs-list] Monkeyguide crossreferences to API doc?

2005-01-17 Thread Mario Sopena




Hello,

    I think that is already done. Did you test it? I mean, for example,
a piece of the Button.xml is:
That is, it can hold most any other standard . The most commonly used child is the 

And that is well formated to:
That is, it can hold most any other standard Widget. The most commonly used child is the Label.
On the other hand, the piece of text you make an example of:

   A  would be a typical drag-and-drop
without the source data being deleted while  would be just like  but the source data will be 'suggested'
  

Wouldn't some of those DragAction.Move be a DragAction.Copy or
something??

Mario


___
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Tab Navigation

2004-12-13 Thread Mario Sopena Novales
Hi,
I have some considerations to some of the comments you made:

>   * For the tab feature to be useful, it would be better if
> middle-clicking on a link would open a new tab, to mimic
> Firefox and also control-click

I think the ctrl-click is easy, but the middle-click needs a little
trick. I have already tried, but the LinkClicked event is only raised
when the user click with the left-button. For a middle button we should
use the ButtonPressed from the Widget or something I'm trying to figure.
Any ideas?

>   * The [+] icon should probably disappear, there is no
> need for this really.
> 

I have no problem with this, but Joshua said me: "The New Tab tool
should be on the toolbar too." Which I interpreted with that button.

>   * Instead of the hack in `Active', I would rather have a 
> method called `UpdateButtonStatus', which is what the
> method really does.

Hoping not to be a pain in the neck I disagree with that statement. The
main reason for Active is that only one history responds to the events
raised (because every history is registered as listener for the
buttons). The fact that the buttons should be updated is a consequence
of making a Tab active and not the reason. But, ok, you have the last
word.

Mario.

___
Mono-docs-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Tab Navigation

2004-12-12 Thread Mario Sopena Novales
Hi,
  I worked in my Tabs patch. Besides the coding part (I think the patches are
nicer now, thanks Joshua) this is what I have added:

* A Button on the left of the arrows for adding a Tab
* The new Tabs shows the root page
* Tabs are displayed with less height
* Tab shows better names, for example: "Button: Memebers", "Button: Events" for
general sections and when displaying a specific method, property, and so on:
"Button.Label" or "Button.Clicked". Also, when the name is large than 35
characters, it is trimmed, for example: "ButtonPressEventArgs.ButtonPressEve
..."

I think that is all.



patchTabs.tar.gz
Description: GNU Zip compressed data


[Mono-docs-list] Hello, I have, finally, ended up with my Not-so-good-not-so-bad implementation of Tabs for Monodoc. I attach a patch, for browser.cs, browser.glade and hisotry.cs (I'm not sure if this is the proper way to do so).

2004-11-17 Thread Mario Sopena Novales
It is my first contribution (to an open source project also) so be kind, but 
very critic. I have learnt yet enough from Gtk (I have never played with it 
before) to re-implement all the Tabs code in a proper way (that anyone should 
point) , unless I have made it right (did I?). :)

Visually, you have a new Menu Entry in the File Menu (or Ctrl+T) to open a new 
Tab. The Tabs are what anyone should expect, but I have added a little icon to 
differenciate between Editing and Viewing modes. I couldn't add the "Click with 
the Middle button on a Link to open a Tab" feature. I didn't know how to get 
that from the HTML Widget (any help please?).

Following is and explanation of what I have made to the sources. So, 
heartbrokens, please abstain. In brief, I made a new class, called Tab, that 
manages everything that happens in a Tab . So I have moved there all the GUI 
elements for editing or displaying a page (deleting from the glade file and 
implementing in pure code. I tried to extract from the glade file, but I 
couldn't). This object takes care also of the events when editing a page. I 
have just added an addTab and ChangeTab methods to the browser class, and a 
variable CurrentTab that is used everywhere you need to refer a GUI element or 
the history from a Tab (for example, when rendering, or when a node is 
selected, etc.). 

In the history.cs file, I have just added a Property called Active, that 
prevents all the histories of all the Tabs to respond to the Back or Forward 
Buttons (is this a good one Miguel?). 

Multiples Tabs of pages patch
MIME-Version: 1.0
Content-Type: multipart/mixed; 
boundary="-MOQ1100738050b334ddde1b1e40e2f4747ed1b8d41db1"
User-Agent: Internet Messaging Program (IMP) 3.2.6
X-Originating-IP: 129.13.186.1

This message is in MIME format.

---MOQ1100738050b334ddde1b1e40e2f4747ed1b8d41db1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Hello,
 I have, finally, ended up with my Not-so-good-not-so-bad implementation of Tabs
for Monodoc. I attach a patch for browser.cs, browser.glade and hisotry.cs (I'm
not sure if this is the proper way to do so).

It is my first contribution (to an open source project also) so be kind, but
very critic. I have learnt yet enough from Gtk (I have never played with it
before) to re-implement all the Tabs code in a proper way (that anyone should
point) , unless I have made it right (did I?). :)

Visually, you have a new Menu Entry in the File Menu (or Ctrl+T) to open a new
Tab. The Tabs are what anyone should expect, but I have added a little icon to
differenciate between Editing and Viewing modes. I couldn't add the "Click with
the Middle button on a Link to open a Tab" feature. I didn't know how to get
that from the HTML Widget (any help please?).

Following is and explanation of what I have made to the sources. So,
heartbrokens, please abstain. In brief, I made a new class, called Tab, that
manages everything that happens in a Tab . So I have moved there all the GUI
elements for editing or displaying a page (deleting from the glade file and
implementing in pure code. I tried to extract from the glade file, but I
couldn't). This object takes care also of the events when editing a page. I
have just added an addTab and ChangeTab methods to the browser class, and a
variable CurrentTab that is used everywhere you need to refer a GUI element or
the history from a Tab (for example, when rendering, or when a node is
selected, etc.).

In the history.cs file, I have just added a Property called Active, that
prevents all the histories of all the Tabs to respond to the Back or Forward
Buttons (is this a good one Miguel?).

And That's all folks!
Mario



---MOQ1100738050b334ddde1b1e40e2f4747ed1b8d41db1
Content-Type: application/x-gzip; name="TabsPatch.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="TabsPatch.tar.gz"

H4sIAM/sm0EAA+w8+3PjNs791fkreL6ZO2fsKH7nnWnizXZzTbI7m7Rpp+14ZIuJ1ciSP0lONt3p
//7hQUrUw46ddu8xd243tkgQBAEQBEFQozB4imRojSPLce/uvvoSn2ar2ez3u1814bOT+242e51m
Z+erVrPV7e/0e51WH+ChqPOVaH4RanKfeRTboRBfTe3QDZbAvVT/H/o59x35aV+MEjXYOPrjn42P
g2tx53pyX2xPAz+gP04w3lbdbKfdNR43QhmHrnx0/XsRwlfkBr5oWa3m3gZqpNiai62Qnk0qt7a2
jMdKX1zLmWg3m13R6ux3W/vtpthC7aowpnq9boK3dsVV8MjwzeZ+a2+/u8vwG19/LbZAGRs7os5f
X3+9ISq/bwj4f2Nr7NlRJE4Zk/i8Uc8VCID9xrMdaf1weSHm7gE+xw/Wres7wZO4tF2ff2LFdfzs
STGyw2GEvw5U33uNdhc7h+8m9/4To7x1nXsZ/yJm85HnjoXC+URfrYMi3E0o5feufAK23slQ+mM5
jKFoGeQoCB5A0x8U4FYe8HocBp4nHdX3JJ56w3HgxzAuGZbBx3Y8j2CIItK/SqBO53EMQh/Z44fh
iH43xF0QPtmho54PNur5Rq4fy9C3vfI+FoOv0lmBQWd+HD4DDpgsQ4m/S2AGEzl+uJT+/DyWUyEd
NwaVLpNLFjCaBCDCiQzdWDpTOR3JMHqx0TiYToGOqAx9AjQLolgBljA9BbOjWLaWsawENKm7CmKJ
WiNiexQN/VGm8sYeicE8BN2L4SfQuoRarXoRlgC9QPH2Nv0RZ8DLINQFOQQJAaSMtu8MJYEPfVVR
MvYb+SkmfY/hh4JfUdtnaKPkk6n19UqRd9+fBp/ERHozE7Bk+GePwBuERTMgRw2tY6MSwV7YI+mJ
aD6K3diTQw8fldHodhotNBqdvUafbQYaHufB+uB+Gs3vhDLAwxk9IiVbFWVG3rkRjP5ZTPhbc17c
gkpK8STBegBJoYgnUuBYUO0A4t0NGDjkSNLg/TwUVKpYJJx5iEZdzQTLbKTZiI2F/oB0BSK6kHfx
1gQkKSLXkdq4RlTJw+2zf

[Mono-docs-list] Tab Navigation

2004-11-12 Thread Mario Sopena Novales
Hallo guys!
  I've posted a week or so saying I was working on displaying multiples tabs on
a page (thanks Joshua). In the way of getting it I have found something in the
code of monodoc I dislike. The actual implementation of the History.

There is an object History that is supposed to managed the history (any magic
here), but for me makes no sense that this object shall manage too the code of
the buttons back and forward. Shouldn't the events of the buttons been managed
by the browser itself? For me makes sense that the History was an object that
manages only history data (a real abstraction of a history) and not GUI data
too.

Besides that, what is suppose that the class PageVisit should do? It is only for
letting the object History to call the browser to actualize himself? Isn't this
a mess or I'm missing something? If the implementation of the History were
managing only history data, and the browser, GUI data, I think the browser could
actualize himself. What do you think? I'm missing the point?

Ok, at this point, somebody is thinking what the h... smokes this guy? Well, I,
actually, don't smoke, but all of this comes from my implementation of tabs. I
want to make a Tab object (and a list of them) that manages all of the data
related to a tab (his history and a reference to the areas for rendering the
content by the moment). With the actual implementation of history I'm not
pretty sure of how to do that.

That's all. If anyone has arrived here, please post an answer (or send me money,
it's up to you).

Bye!

Mario Sopena

-- 

___
Mono-docs-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-docs-list


[Mono-docs-list] A question on Tabs

2004-11-06 Thread Mario Sopena Novales
Hi,
this is my first post. I've started struggling with the source of Monodoc
trying to get a functional tab navigation. If I  got a decent solution I will
post here. But, for the moment I just have a question.

Wich Label should I use for the Tabs? When Monodoc shows a Class, I can obtain
an url like T:Gtk.Notebook from which I can take the name Notebook. But what
about when Monodoc is showing a page from the Mono Handbook, for example,
because the url could be something like  xhtml:mgrand_1406324299.html. Not
really much self-explanatory. I'm missing something? Should I get the info from
the XML. And if it is so, How?

That is all. Thanks,
Mario Sopena
___
Mono-docs-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-docs-list