Re: Valgrind questions

2011-11-29 Thread Stefan Sauer
On 10/07/2011 11:09 AM, Andrew Cowie wrote:
 On Tue, 2011-09-20 at 12:48 +0100, jcup...@gmail.com wrote:

 Ooop, thanks. I hadn't realised but I'd not updated the version on the
 website for a while. I've put my current one up now and it includes a
 thing for g_type_add_interface_static(), as you also found.
 Might it be a good idea to put the suppression file directly into the
 GTK sources, and perhaps even distribute it via the -dev / -devel
 packages for libgtk?
+1 and best but the name of the suppression file to a pkg-config
variable so that it is easy to check. if every lib does this one can
generate a valgrind wrapper for the project in configure :)

Stefan
 Might help the FAQ factor a bit if everyone can just be told to find The
 Suppression File in /usr/share/something...

 AfC
 Sydney


 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Can I develop gtk app in Mac OS X ?

2011-11-29 Thread xiaobo
I work between gnome and os x, sometime I will write my gnome app in Debian and 
,
when I change to OS X , can I continue to write my gnome app in OS X ?
 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk_tree_view_column_set_cell_data_func gives GTK-CRITICAL error

2011-11-29 Thread James Steward

Hi,

Wanting to display floats with a particular format in a tree view.

void render_float(GtkTreeViewColumn *column,
GtkCellRenderer   *renderer,
GtkTreeModel  *model,
GtkTreeIter   *iter,
gpointer   user_data)
{
gfloat  f;
gchar   buf[20];

int col = GPOINTER_TO_INT(user_data);

gtk_tree_model_get(model, iter, col, f, -1);

g_snprintf(buf, sizeof(buf), %.2f, f);

g_object_set(renderer, text, buf, NULL);
}

G_MODULE_EXPORT gboolean on_menu_show_results_activate(
GtkWidget *w,
GdkEvent *event,
gpointer user_data)
{

...

renderer = gtk_cell_renderer_text_new ();

col = gtk_tree_view_insert_column_with_attributes (
GTK_TREE_VIEW (view),
-1,
Title,
renderer,
text, i,
strikethrough, j,
background, k,
background-set, TRUE,
NULL);

gtk_tree_view_column_set_cell_data_func(
gtk_tree_view_get_column(GTK_TREE_VIEW(view), col),
renderer,
render_float,
GINT_TO_POINTER(i),
NULL);
...

}

When I run the app I get:

Gtk-CRITICAL **: gtk_cell_layout_set_cell_data_func: assertion 
`GTK_IS_CELL_LAYOUT (cell_layout)' failed


Can anyone spot what I've done wrong?  There's no compiler warnings, 
just this runtime error.


--
James.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list