Re: gtk_tree_store_set
- From: Stefan Kost <ensonic hora-obscura de>
- To: The Saltydog <thesaltydog gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_tree_store_set
- Date: Thu, 28 Jul 2005 14:07:08 +0200
hi,
and why do you pass the guint64 to a slot of type G_TYPE_DOUBLE?
Either cast to (double) or use G_TTYPE_UINT64 for the column.
Apart its a good idea to use an enum for the columns ids ;)
Stefan
So what GTypes are those columns, ie. what does your gtk_tree_store_new() line
look like?
What type does your calc() function return? float? int? something else?
What type is g_fs.used?
gtk_tree_store_append(model,&firstiter,NULL);
gtk_tree_store_set(model,&firstiter,
0, "/", 1, "/",
3, (gfloat)((g_fs.used*100)/g_fs.total),
4, calc(g_fs.used), 5, g_fs.used,
7, -100,
-1);
This is tree_store_new:
GtkTreeStore * mdl = gtk_tree_store_new(10,
G_TYPE_STRING,
G_TYPE_STRING,
GDK_TYPE_PIXBUF,
G_TYPE_FLOAT,
G_TYPE_STRING,
G_TYPE_DOUBLE,
G_TYPE_STRING,
G_TYPE_INT,
G_TYPE_STRING,
G_TYPE_DOUBLE);
Function calc() returns a gchar* , while g_fs.used is a guint64.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]