1
The code is giving invalid format string error when passing the Gtkcomboboxtext for a Gtkliststore.
Error: (System:18726): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
struct _list_prod{
GtkListStore *store;
GtkWidget *product;
GtkWidget *quantity;
};
void data_add_main_serv(GtkWidget *widget, gpointer gptr){
struct _list_prod *lp = (struct _list_prod*) gptr;
GtkTreeIter iter;
const char *prod = gtk_combo_box_text_get_active_text(lp->product);
gtk_list_store_append(lp->store, &iter);
gtk_list_store_set(lp->store, &iter, 0, prod, 1, gtk_entry_get_text(lp->quantity), NULL);
}
How can I fix this problem?