All pastes #180615 Raw Edit

recup iter

public c v1 · immutable
#180615 ·published 2006-09-23 10:21 UTC
rendered paste body
/*Fonction qui retourne la selection d'une ligne*/void fct_selection(GtkTreeSelection *select){	GtkTreePath *path;	GtkTreeIter iter;	GtkTreeModel *model;	gchar *priority,*categorie,*todo,*ligne;	gint *bool;	//On recupere la selection	if (gtk_tree_selection_get_selected (select, &model, &iter))	{	//On recupere les champs	gtk_tree_model_get (model, &iter, TOGGLE_COLUMN, &bool, PRIORITY_COLUMN, &priority, CATEGORIE_COLUMN, &categorie, TODO_COLUMN, &todo, -1);	//Path via Iter pour recuperer le numero de ligne	path = gtk_tree_model_get_path(model,&iter);	ligne = gtk_tree_path_to_string(path);	g_print("LIGNE %s => ", ligne);	g_print ("%d %s  %s  %s\n", bool, priority, categorie, todo);	g_free (priority);	g_free (categorie);	g_free (todo);	gtk_tree_path_free (path);	}}