[Gtk-sharp-list] [PATCH] Fix custom CellRenderer creation

Andy York andy at brdstudio.net
Mon Oct 19 08:21:03 EDT 2009


I have been working on this with no success as well, I was attempting to 
use Gdk.Drawable as my base instead of inheriting from a CellRenderer. 
Because the CellRenderer seems to be just a drawing of text, image, etc. 
I didn't feel there is much benefit to inheriting from a CellRenderer. 
But I am not very good with Gtk yet so that could be completely wrong.

I'm looking forward to learning the answer to this as well, but I have a 
feeling is simply involves writing text on a Drawable area.

SpoodyGoon

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'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,
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.422 / Virus Database: 270.14.21/2445 - Release Date: 10/19/09 06:40:00
>


-- 

Andy York (aka Spoody Goon)
Jobs: Guitarist, gamer, programmer, irritating brother, general evil 
(evil costs extra)
Web Site: http://www.brdstudio.net
Email: andy at brdstudo.net <mailto:andy at brdstudo.net>

Please Note: Proper Email Forwarding Use BCC 
<http://www.brdstudio.net/bccforward.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20091019/25b14580/attachment.html 


More information about the Gtk-sharp-list mailing list