[Gtk-sharp-list] GLib ListBase Append Convenience method
John Luke
jluke@cfl.rr.com
Tue, 05 Aug 2003 23:30:05 -0400
--=-BShuez4e3zZSPL0mN0iz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hello,
Here is a patch to add .Append (string item) convenience method to
gtk-sharp/glib/ListBase.cs for situations that someone would want to
create a simple List of strings (like for Gtk.Combo). Can I commit?
Thanks
--=-BShuez4e3zZSPL0mN0iz
Content-Disposition: attachment; filename=ListBase.diff
Content-Type: text/x-patch; name=ListBase.diff; charset=
Content-Transfer-Encoding: 7bit
Index: ListBase.cs
===================================================================
RCS file: /cvs/public/gtk-sharp/glib/ListBase.cs,v
retrieving revision 1.6
diff -u -r1.6 ListBase.cs
--- ListBase.cs 23 Jul 2003 17:19:20 -0000 1.6
+++ ListBase.cs 6 Aug 2003 03:37:59 -0000
@@ -85,6 +85,11 @@
{
list_ptr = Append (list_ptr, raw);
}
+
+ public void Append (string item)
+ {
+ this.Append (Marshal.StringToHGlobalAnsi(item));
+ }
public void Prepend (IntPtr raw)
{
--=-BShuez4e3zZSPL0mN0iz--