[Gtk-sharp-list] [PATCH] Fix custom CellRenderer creation
Diego
Diego
Mon Oct 19 05:24:15 EDT 2009
Hi,
While I was working on creating a custom cell renderer for a project of
mine, I found that once I tried to override the Render method, and
simply call the base one, the program would crash with an error in the
native code.
The attached patch makes custom CellRenderer behave, although it might
be a bit hackish: the other functions that use "ref Gtk.Rectangle" for
the native call also have it in the managed interface, but since I
didn't want to change the interface (which I'm pretty sure would be a
bad thing™) I kept the ref only in the subsequent call. It *should* be
fine since the rectangles shouldn't be modified as far as I can see.
I'm also attaching a simple testcase, if you're interested in seeing
what the problem is.
I also have another problem here: how do I make sure the Windows gtk#
also have this applied? Should I rebuild it myself, or using the .dll
file built on (Gentoo) Linux with that patch should be enough?
Thanks,
--
Diego Elio Pettenò — “Flameeyes”
http://blog.flameeyes.eu/
If you found a .asc file in this mail and know not what it is,
it's a GnuPG digital signature: http://www.gnupg.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtk-sharp-2.12.9-cellrenderer.patch
Type: text/x-patch
Size: 2510 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20091019/07c2162b/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MainWindow.cs
Type: text/x-csharp
Size: 1193 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20091019/07c2162b/attachment-0001.bin
More information about the Gtk-sharp-list
mailing list