Guest
November 11th, 2006, 03:19 AM
I wanna get on and actually do something, but I can't figure out what i'm doing wrong.
Basically i'm building a tree view (Just simple text colum of all the compiz plugins).
Fo some reason this doesn't work:
void plugins_loop(gchar * dir) {
GtkTreeIter *iter;
gchar string[100];
strcpy(string, "my string");
/* Append a row and fill in some data */
gtk_list_store_append (store, iter);
gtk_list_store_set (store, iter,
COL_NAME, string,
-1);
}
butthis works fine:
void plugins_loop(gchar * dir) {
GtkTreeIter *iter;
/* Append a row and fill in some data */
gtk_list_store_append (store, iter);
gtk_list_store_set (store, iter,
COL_NAME, "Test",
-1);
}
with the first example the text is not displayed properly and i get Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text(). Anyone know where i'm going wrong?
Basically i'm building a tree view (Just simple text colum of all the compiz plugins).
Fo some reason this doesn't work:
void plugins_loop(gchar * dir) {
GtkTreeIter *iter;
gchar string[100];
strcpy(string, "my string");
/* Append a row and fill in some data */
gtk_list_store_append (store, iter);
gtk_list_store_set (store, iter,
COL_NAME, string,
-1);
}
butthis works fine:
void plugins_loop(gchar * dir) {
GtkTreeIter *iter;
/* Append a row and fill in some data */
gtk_list_store_append (store, iter);
gtk_list_store_set (store, iter,
COL_NAME, "Test",
-1);
}
with the first example the text is not displayed properly and i get Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text(). Anyone know where i'm going wrong?