[Gtk-sharp-list] gtkhtml namespace problem

Martin Willemoes Hansen mwh@sysrq.dk
Wed, 27 Aug 2003 10:20:03 +0200


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

On Tue, 2003-08-26 at 23:46, Mike Kestner wrote:
> On Tue, 2003-08-26 at 16:35, Martin Willemoes Hansen wrote:
> 
> > Umh would it not be easier to have a Gtk.HTML namespace? I mean could
> > that not be done with the current features of the generator?
> 
> But...
> 
>  Gtk.HTML.HTML html_widget = new Gtk.HTML.HTML ();
> 
> would suck.  :)  It's a small change to add an assembly tag to the
> namespace node.  We already add a libname attr.  And the generator
> change is tiny.  I think the beauty factor is worth the small amount of
> pain.  If you want, file a bug and I'll add the parser/generator stuff
> for the assembly tag.

Okay, here is a patch to modify the parser bit. Tell me what you think
of it.

Ill take a stab at the generator now.

-- 
Martin Willemoes Hansen

--------------------------------------------------------
E-Mail	mwh@sysrq.dk	Website	mwh.sysrq.dk
IRC     MWH, freenode.net
--------------------------------------------------------               


--=-18w6IT8ut4CfRytgmaY5
Content-Disposition: attachment; filename=AssemblyTag.diff
Content-Type: text/x-patch; name=AssemblyTag.diff; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Index: parser/gapi.pl
===================================================================
RCS file: /cvs/public/gtk-sharp/parser/gapi.pl,v
retrieving revision 1.1
diff -u -r1.1 gapi.pl
--- parser/gapi.pl	20 Aug 2002 20:35:42 -0000	1.1
+++ parser/gapi.pl	27 Aug 2003 08:31:12 -0000
@@ -28,10 +28,10 @@
 }
 
 foreach $entry (@srcs) {
-	($dir, $ns, $lib) = @$entry;
+	($dir, $ns, $assembly, $lib) = @$entry;
 	print "hi $ns\n";
 	$file = $files{$ns};
-	system ("gapi_pp.pl $dir | gapi2xml.pl $ns $file $lib");
+	system ("gapi_pp.pl $dir | gapi2xml.pl $ns $file $assembly $lib");
 }
 
 foreach $ns (keys (%files)) {
Index: parser/gapi2xml.pl
===================================================================
RCS file: /cvs/public/gtk-sharp/parser/gapi2xml.pl,v
retrieving revision 1.40
diff -u -r1.40 gapi2xml.pl
--- parser/gapi2xml.pl	15 Jul 2003 05:52:08 -0000	1.40
+++ parser/gapi2xml.pl	27 Aug 2003 08:31:12 -0000
@@ -12,12 +12,13 @@
 use XML::LibXML;
 use GAPI::Metadata;
 
-if (!$ARGV[2]) {
-	die "Usage: gapi_pp.pl <srcdir> | gapi2xml.pl <namespace> <outfile> <libname>\n";
+if (!$ARGV[3]) {
+	die "Usage: gapi_pp.pl <srcdir> | gapi2xml.pl <namespace> <outfile> <assembly> <libname>\n";
 }
 
 $ns = $ARGV[0];
-$libname = $ARGV[2];
+$assembly = $ARGV[2];
+$libname = $ARGV[3];
 
 ##############################################################
 # Check if the filename provided exists.  We parse existing files into
@@ -39,6 +40,7 @@
 
 $ns_elem = $doc->createElement('namespace');
 $ns_elem->setAttribute('name', $ns);
+$ns_elem->setAttribute('assembly', $assembly);
 $ns_elem->setAttribute('library', $libname);
 $root->appendChild($ns_elem);
 
Index: sources/gtk-sharp.sources
===================================================================
RCS file: /cvs/public/gtk-sharp/sources/gtk-sharp.sources,v
retrieving revision 1.20
diff -u -r1.20 gtk-sharp.sources
--- sources/gtk-sharp.sources	26 Aug 2003 21:35:28 -0000	1.20
+++ sources/gtk-sharp.sources	27 Aug 2003 08:31:12 -0000
@@ -1,18 +1,18 @@
-atk-1.2.4/atk Atk libatk-1.0-0.dll
-pango-1.2.3/pango Pango libpango-1.0-0.dll
-gtk+-2.2.2/gdk Gdk libgdk-win32-2.0-0.dll
-gtk+-2.2.2/gdk-pixbuf Gdk libgdk_pixbuf-2.0-0.dll
-gtk+-2.2.2/gtk Gtk libgtk-win32-2.0-0.dll
-libgnome-2.0.1/libgnome Gnome gnome-2
-libgnomecanvas-2.0.1/libgnomecanvas Gnome gnomecanvas-2
-libgnomeui-2.0.1/libgnomeui Gnome gnomeui-2
-libgnomeprint-2.2.1.3/libgnomeprint Gnome gnomeprint-2-2
-libgnomeprintui-2.2.1.3/libgnomeprintui Gnome gnomeprint-2-2
-libgnomeprintui-2.2.1.3/libgnomeprintui/gpaui Gnome gnomeprint-2.2
-gtkhtml-3.0.8/src Gtk gtkhtml-3.0
-libglade-2.0.0/glade Glade libglade-2.0-0.dll
-libart_lgpl-2.3.10 Art art_lgpl
-libgda-0.90.0/libgda Gda gda-2
-libgnomedb-0.90.0/libgnomedb GnomeDb gnomedb-2
-gstreamer-0.4.2/gst Gst gstreamer
-librsvg-2.0.1 Rsvg rsvg-2
+atk-1.2.4/atk Atk atk libatk-1.0-0.dll
+pango-1.2.3/pango Pango pango libpango-1.0-0.dll
+gtk+-2.2.2/gdk Gdk gdk libgdk-win32-2.0-0.dll
+gtk+-2.2.2/gdk-pixbuf Gdk gdk libgdk_pixbuf-2.0-0.dll
+gtk+-2.2.2/gtk Gtk gtk libgtk-win32-2.0-0.dll
+libgnome-2.0.1/libgnome Gnome gnome gnome-2
+libgnomecanvas-2.0.1/libgnomecanvas Gnome gnome gnomecanvas-2
+libgnomeui-2.0.1/libgnomeui Gnome gnome gnomeui-2
+libgnomeprint-2.2.1.3/libgnomeprint Gnome gnome gnomeprint-2-2
+libgnomeprintui-2.2.1.3/libgnomeprintui Gnome gnome gnomeprint-2-2
+libgnomeprintui-2.2.1.3/libgnomeprintui/gpaui Gnome gnome gnomeprint-2.2
+gtkhtml-3.0.8/src Gtk gtkhtml gtkhtml-3.0
+libglade-2.0.0/glade Glade glade libglade-2.0-0.dll
+libart_lgpl-2.3.10 Art art art_lgpl
+libgda-0.90.0/libgda Gda gda gda-2
+libgnomedb-0.90.0/libgnomedb GnomeDb gnomedb gnomedb-2
+gstreamer-0.4.2/gst Gst gst gstreamer
+librsvg-2.0.1 Rsvg rsvg rsvg-2

--=-18w6IT8ut4CfRytgmaY5--