[Gtk-sharp-list] patch for glib/Object.cs

Petr Danecek danecek@ucl.cas.cz
04 Mar 2003 09:27:35 +0100


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

Hello,
I've updated glib/Object.cs so that RegisterGType can handle
deeper namespace levels. Is it ok this way?
Best regards,
pd


--=-ILVh0DRLBs8poQR7xNF3
Content-Disposition: attachment; filename=gtk-sharp.diff
Content-Type: text/x-patch; name=gtk-sharp.diff; charset=ISO-8859-2
Content-Transfer-Encoding: 7bit

Index: glib/Object.cs
===================================================================
RCS file: /cvs/public/gtk-sharp/glib/Object.cs,v
retrieving revision 1.41
diff -u -p -r1.41 Object.cs
--- glib/Object.cs	24 Feb 2003 06:39:29 -0000	1.41
+++ glib/Object.cs	4 Mar 2003 08:21:51 -0000
@@ -150,7 +150,7 @@ namespace GLib {
 				return null;
 			}
 			uint parent_gtype = (uint) pi.GetValue (null, null);
-			string name = t.Namespace + t.Name;
+			string name = t.Namespace.Replace(".", "_") + t.Name;
 			GtkSharp.ObjectManager.RegisterType (name, t.Namespace + t.Name, t.Assembly.GetName().Name);
 			return new GLib.Type (gtksharp_register_type (name, parent_gtype));
 		}

--=-ILVh0DRLBs8poQR7xNF3--