Diego Elio “Flameeyes” Pettenò wrote:
> 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 went ahead and committed the patch to the 2.12 branch (the code in 
trunk/2.90 is correct). Thank you very much for the fix and the test case.
> 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?
>   
You can use the Linux dll if you fix the calling convention by using the 
gapi-cdecl-insert script in the Gtk# 2.12 repo (or just wait for 2.12.10).


Christian
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to