#include ONCE "window9.bi"

sub DeleteItemListView(iGadget as Long , iItem as Long)
	
	dim as any ptr widgetlist = GadgetId(iGadget)
	
	dim as GtkListStore ptr liststore
	
	dim as GtkTreeIter iter
	
	dim as Long iRet
	
	liststore = cast(any ptr , gtk_tree_view_get_model(widgetlist))		
	
	dim as GtkTreeSelection ptr selection = gtk_tree_view_get_selection (widgetlist)
	
	dim as GtkTreePath ptr path = gtk_tree_path_new_from_indices(iItem, -1)
	
	if path then
		
		gtk_tree_model_get_iter(cast(any ptr,liststore) , @iter , path)
		
		gtk_tree_path_free(path)
		
		if iter.stamp then
			
			gtk_list_store_remove(liststore  , @iter)
			
		EndIf			
		
	EndIf		
	
End Sub