Bug 8593 - Gtk#3, crash: gtk_tree_view_column_get_cell_renderers doesn't exist in Gtk3
Summary: Gtk#3, crash: gtk_tree_view_column_get_cell_renderers doesn't exist in Gtk3
Status: RESOLVED FIXED
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-11-26 05:52 UTC by Matteo Nardi
Modified: 2013-04-22 06:04 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Matteo Nardi 2012-11-26 05:52:19 UTC
I get a crash when I call the CellRenderers property in a TreeViewColumn.
 
In TreeViewColumn.cs [1], you call gtk_tree_view_column_get_cell_renderers, which no longer exists in Gtk3.
The right function call is gtk_cell_layout_get_cells [2]. Indeed, now Gtk# creates a Cells property in Gtk.TreeViewColumn which has the same signature and works just fine.

It is not clear to me whether or not the code you use to wrap gtk_tree_view_column_get_cell_renderers is still needed or not: it was added in a commit in 2004 [1] "manually wrap GList api using typed arrays"


[1] https://github.com/mono/gtk-sharp/blob/master/gtk/TreeViewColumn.cs
[2] http://developer.gnome.org/gtk3/3.2/GtkCellLayout.html#gtk-cell-layout-get-cells
[3] https://github.com/mono/gtk-sharp/commit/1e1574955319a70e941fddb3977c878f53a4efbe
Comment 1 Bertrand Lorentz 2013-04-21 07:59:57 UTC
Thank you for your bug report.

The code was added at the time when the generator didn't do the right thing for functions returning a GList. So it's been obsolete for some time now, and is now wrong because the native function is gone.

I've removed the TreeViewColumn.CellRenderers property in git master :
https://github.com/mono/gtk-sharp/commit/eb5e9c7b7

So this is fixed, but I can't close the bug myself, so feel free to mark it a RESOLVED / FIXED