rem: selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
add: selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (payment_method_treeview));
context: void supprimer_type_operation ( void ){    struct struct_type_ope *type_ope;    GtkTreeSelection * selection;    GSList *pointeur_tmp;    GSList *ope_a_changer;    GtkTreeIter iter;    gboolean good, visible;    /** First, we find related GtkTreeIter and stsruct_type_ope pointer. */    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));    good = gtk_tree_selection_get_selected (selection, NULL, &iter);    if ( good )    {	GSList *list_tmp_transactions;	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 			     PAYMENT_METHODS_VISIBLE_COLUMN, &visible,			     PAYMENT_METHODS_POINTER_COLUMN, &type_ope,			     -1 );	if ( ! type_ope )	    return;	/** We then put related operations in a temporary list */	list_tmp_transactions = gsb_data_transaction_get_transactions_list ();	ope_a_changer = NULL;	while ( list_tmp_transactions )	{	    gint transaction_number_tmp;	    transaction_number_tmp = gsb_data_transaction_get_transaction_number (list_tmp_transactions -> data);	    if ( gsb_data_transaction_get_account_number (transaction_number_tmp) == type_ope -> no_compte		 &&		 gsb_data_transaction_get_method_of_payment_number (transaction_number_tmp) == type_ope -> no_type)	    {		ope_a_changer = g_slist_append ( ope_a_changer,						 GINT_TO_POINTER (transaction_number_tmp));	    }	    list_tmp_transactions = list_tmp_transactions -> next;	}	/** If operations are related to this method, we have to ask for	  confirmation for this removal, as we need to change type of	  related operations.  This is of course not reversible.  */	if ( ope_a_changer )	{	    GtkWidget *dialog, *label, * option_menu, *separateur, *hbox, *menu;	    gint resultat, nouveau_type;	    dialog = gtk_dialog_new_with_buttons ( _("Delete a payment method"),						   (GtkWindow *) fenetre_preferences,						   GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,						   GTK_STOCK_CANCEL, GTK_RESPONSE_HELP,						   GTK_STOCK_OK, GTK_RESPONSE_OK,						   NULL );	    gtk_box_set_spacing ( GTK_BOX(GTK_DIALOG(dialog) -> vbox), 6 );	    label = gtk_label_new ( _("Some transactions still use that payment method.  As deletion of this method is irreversible, these transactions are to be associated with another payment method."));	    gtk_label_set_selectable ( GTK_LABEL (label), TRUE );	    gtk_label_set_line_wrap ( GTK_LABEL (label), TRUE );	    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ), label,				 FALSE, FALSE, 6 );	    separateur = gtk_hseparator_new ();	    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ),				 separateur,				 FALSE, FALSE, 0 );	    gtk_widget_show ( separateur );	    hbox = gtk_hbox_new ( FALSE, 6 );	    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ), hbox,				 FALSE, FALSE, 0 );	    label = gtk_label_new ( POSTSPACIFY(_("Associate transactions with")));	    gtk_box_pack_start ( GTK_BOX ( hbox ), label,				 FALSE, FALSE, 6 );	    option_menu = gtk_option_menu_new ();	    menu = gtk_menu_new ();	    pointeur_tmp = gsb_data_account_get_method_payment_list (type_ope -> no_compte);	    /** Then, we find neutral types of types the same sign and build a	      menu to choose among them */	    while ( pointeur_tmp )	    {		struct struct_type_ope *type;		GtkWidget *menu_item;		type = pointeur_tmp -> data;		if ( type -> no_type != type_ope -> no_type		     && ( type -> signe_type == type_ope -> signe_type			  || !type -> signe_type ))		{		    menu_item = gtk_menu_item_new_with_label ( type -> nom_type );		    gtk_object_set_data ( GTK_OBJECT ( menu_item ), "no_type",					  GINT_TO_POINTER ( type -> no_type ));		    gtk_menu_append ( GTK_MENU ( menu ), menu_item );		}		pointeur_tmp = pointeur_tmp -> next;	    }	    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( option_menu ), menu );	    gtk_box_pack_start ( GTK_BOX ( hbox ), option_menu,				 FALSE, FALSE, 0 );	    /** If no operation is available, do not give choice to	      user. */	    if ( !GTK_MENU_SHELL ( menu ) -> children )		gtk_widget_set_sensitive ( hbox, FALSE );	    gtk_widget_show_all ( GTK_WIDGET(dialog) );	    resultat = gtk_dialog_run ( GTK_DIALOG ( dialog ));	    if ( resultat != GTK_RESPONSE_OK )	    {		if ( GTK_IS_DIALOG ( dialog ))		    gtk_widget_destroy ( GTK_WIDGET(dialog) );		return;	    }	    /* Find new type */	    if ( GTK_MENU_SHELL ( menu ) -> children )		nouveau_type = GPOINTER_TO_INT ( gtk_object_get_data ( GTK_OBJECT ( GTK_OPTION_MENU ( option_menu ) -> menu_item ),								       "no_type" ));	    else		nouveau_type = 0;	    /* Then, we change type for related operations. */	    pointeur_tmp = ope_a_changer;	    while ( pointeur_tmp )	    {		gint transaction_number;		transaction_number = GPOINTER_TO_INT ( pointeur_tmp -> data );		gsb_data_transaction_set_method_of_payment_number ( transaction_number,								    nouveau_type );		pointeur_tmp = pointeur_tmp -> next;	    }	    gtk_widget_destroy ( GTK_WIDGET(dialog) );	}	/* Remove type from tree & memory */	gtk_tree_store_remove ( GTK_TREE_STORE(model), &iter );	gsb_data_account_set_method_payment_list ( type_ope -> no_compte,					      g_slist_remove ( gsb_data_account_get_method_payment_list (type_ope -> no_compte), type_ope ) );	/* If it was a default, change default */	switch (type_ope -> signe_type)	{	    case 1:			/* Debit */		if ( gsb_data_account_get_default_debit (type_ope -> no_compte) == type_ope -> no_type)		{		    gsb_data_account_set_default_debit ( type_ope -> no_compte,						    find_operation_type_by_type (type_ope->no_compte,										 type_ope->signe_type,										 type_ope->no_type));		}		break;	    case 2:			/* Credit */		if ( gsb_data_account_get_default_credit (type_ope -> no_compte) == type_ope -> no_type)		{		    gsb_data_account_set_default_credit ( type_ope -> no_compte,						     find_operation_type_by_type (type_ope->no_compte,										  type_ope->signe_type,										  type_ope->no_type));		}		break;	    default:		break;		/* Other */	}	free ( type_ope );	modification_fichier ( TRUE );	/* on retire le no de type dans la liste de tri et on réaffiche la liste */	/*       liste_tri_tmp[type_ope->no_compte] = g_slist_remove ( liste_tri_tmp[type_ope->no_compte], */	/* 							    GINT_TO_POINTER ( type_ope -> no_type )); */	/*       if ( !type_ope -> signe_type && neutres_inclus_tmp[type_ope->no_compte] ) */	/* 	liste_tri_tmp[type_ope->no_compte] = g_slist_remove ( liste_tri_tmp[type_ope->no_compte], */	/* 							      GINT_TO_POINTER ( -type_ope -> no_type )); */	/*       remplit_liste_tri_par_type ( type_ope->no_compte ); */	/*   si le type était par défaut, on met le défaut à 0 */    }}