rem: list_tmp = list_struct_accounts;
add: list_tmp = gsb_account_get_list_accounts ();
context: void supprimer_sous_imputation ( void ){    struct struct_imputation *imputation;    struct struct_sous_imputation *sous_imputation;    GtkCTreeNode *node;    gint ope_trouvee;    GSList *list_tmp;    node = GTK_CTREE_NODE ( ( GTK_CLIST ( arbre_imputation ) -> selection ) -> data );    sous_imputation = gtk_ctree_node_get_row_data ( GTK_CTREE ( arbre_imputation ),						    node );    node = GTK_CTREE_ROW ( ( GTK_CLIST ( arbre_imputation ) -> selection ) -> data ) -> parent;    imputation = gtk_ctree_node_get_row_data ( GTK_CTREE ( arbre_imputation ),					       node );    /* fait le tour des opés pour en trouver une qui a cette sous-catégorie */    ope_trouvee = 0;    list_tmp = list_struct_accounts;    while ( list_tmp )    {	gint i;	GSList *liste_tmp;	i = gsb_account_get_no_account ( list_tmp -> data );	liste_tmp = gsb_account_get_transactions_list (i);	while ( liste_tmp )	{	    struct structure_operation *operation;	    operation = liste_tmp -> data;	    if ( operation -> imputation == imputation -> no_imputation		 &&		 operation -> sous_imputation == sous_imputation -> no_sous_imputation )	    {		ope_trouvee = 1;		liste_tmp = NULL;		i = gsb_account_get_accounts_amount ();	    }	    else		liste_tmp = liste_tmp -> next;	}	list_tmp = list_tmp -> next;    }    if ( ope_trouvee )    {	GtkWidget *dialog;	GtkWidget *label;	gint resultat;	GtkWidget *separation;	GtkWidget *hbox;	GtkWidget *bouton_imputation_generique;	GtkWidget *combofix;	GSList *liste_combofix;	GSList *pointeur;	GSList *liste_tmp;	GtkWidget *bouton_transfert;	struct struct_imputation *nouvelle_imputation;	struct struct_sous_imputation *nouvelle_sous_imputation;	GSList *liste_imputation_credit;	GSList *liste_imputation_debit;	gchar **split_imputation;	gint nouveau_no_imputation = 0;	gint nouveau_no_sous_imputation = 0;	dialog = gtk_dialog_new_with_buttons ( _("Deleting a budgetary line"),					       GTK_WINDOW (window),					       GTK_DIALOG_MODAL,					       GTK_STOCK_CANCEL,1,					       GTK_STOCK_OK,0,					       NULL);	label = gtk_label_new ( COLON(_("Some transactions are still assigned to this sub-budgetary line.\n\nYou can")) );	gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ),			     label,			     FALSE,			     FALSE,			     0 );	separation = gtk_hseparator_new ( );	gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ),			     separation,			     FALSE,			     FALSE,			     0 );	/*       mise en place du choix tranfert vers un autre sous imputation */	hbox = gtk_hbox_new ( FALSE,			      5 );	gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ),			     hbox,			     FALSE,			     FALSE,			     0 );	bouton_transfert = gtk_radio_button_new_with_label ( NULL,							     COLON(_("Move the transactions to"))  );	gtk_box_pack_start ( GTK_BOX ( hbox ),			     bouton_transfert,			     FALSE,			     FALSE,			     0 );	pointeur = liste_struct_imputation;	liste_combofix = NULL;	liste_imputation_credit = NULL;	liste_imputation_debit = NULL;	while ( pointeur )	{	    struct struct_imputation *imputation;	    GSList *sous_pointeur;	    imputation = pointeur -> data;	    if ( imputation -> type_imputation )		liste_imputation_debit = g_slist_append ( liste_imputation_debit,							  g_strdup ( imputation -> nom_imputation ) );	    else		liste_imputation_credit = g_slist_append ( liste_imputation_credit,							   g_strdup ( imputation -> nom_imputation ) );	    sous_pointeur = imputation -> liste_sous_imputation;	    while ( sous_pointeur )	    {		struct struct_sous_imputation *sous_imputation_tmp;		sous_imputation_tmp = sous_pointeur -> data;		if ( sous_imputation_tmp -> no_sous_imputation != sous_imputation -> no_sous_imputation )		{		    if ( imputation -> type_imputation )			liste_imputation_debit = g_slist_append ( liste_imputation_debit,								  g_strconcat ( "\t",										sous_imputation_tmp -> nom_sous_imputation,										NULL ) );		    else			liste_imputation_credit = g_slist_append ( liste_imputation_credit,								   g_strconcat ( "\t",										 sous_imputation_tmp -> nom_sous_imputation,										 NULL ) );		}		sous_pointeur = sous_pointeur -> next;	    }	    pointeur = pointeur -> next;	}	/*   on ajoute les listes des crédits / débits à la liste du combofix du formulaire */	liste_combofix = g_slist_append ( liste_combofix,					  liste_imputation_debit );	liste_combofix = g_slist_append ( liste_combofix,					  liste_imputation_credit );	combofix = gtk_combofix_new_complex ( liste_combofix,					      TRUE,					      TRUE,					      TRUE,					      0 );	gtk_box_pack_start ( GTK_BOX ( hbox ),			     combofix,			     FALSE,			     FALSE,			     0 );	/*       mise en place du choix supprimer le imputation */	hbox = gtk_hbox_new ( FALSE,			      5 );	gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ),			     hbox,			     FALSE,			     FALSE,			     0 );	bouton_imputation_generique = gtk_radio_button_new_with_label ( gtk_radio_button_group ( GTK_RADIO_BUTTON ( bouton_transfert )),									PRESPACIFY(_("Just delete the sub-budgetary line.")) );	gtk_box_pack_start ( GTK_BOX ( hbox ),			     bouton_imputation_generique,			     FALSE,			     FALSE,			     0 );	gtk_widget_show_all ( dialog );retour_dialogue:	resultat = gtk_dialog_run ( GTK_DIALOG ( dialog ) );	if ( resultat )	{	    if ( resultat == 1 )		gtk_widget_destroy ( GTK_WIDGET ( dialog ) );	    return;	}	if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_transfert )) )	{	    if ( !strlen (gtk_combofix_get_text ( GTK_COMBOFIX ( combofix ))))	    {		dialogue_error ( _("Please enter a budgetary line!") );		goto retour_dialogue;	    }	    /* récupère les no de imputation et sous imputation */	    split_imputation = g_strsplit ( gtk_combofix_get_text ( GTK_COMBOFIX ( combofix )),					    " : ",					    2 );	    nouvelle_imputation = imputation_par_nom ( split_imputation[0],						       0,						       0,						       0 );	    if ( nouvelle_imputation )	    {		nouveau_no_imputation = nouvelle_imputation -> no_imputation;				nouvelle_sous_imputation = sous_imputation_par_nom ( nouvelle_imputation,								     split_imputation[1],								     0 );		if ( nouvelle_sous_imputation )		nouveau_no_sous_imputation = nouvelle_sous_imputation -> no_sous_imputation;		else		    nouveau_no_sous_imputation = 0;	    }	    else		nouveau_no_imputation = 0;	    g_strfreev ( split_imputation );	}	else	{	    nouveau_no_imputation = 0;	    nouveau_no_sous_imputation = 0;	}	/* on fait le tour des opés pour mettre le nouveau numéro de imputation et sous_imputation */	list_tmp = list_struct_accounts;	while ( list_tmp )	{	    gint i;	    i = gsb_account_get_no_account ( list_tmp -> data );	    liste_tmp = gsb_account_get_transactions_list (i);	    while ( liste_tmp )	    {		struct structure_operation *operation;		operation = liste_tmp -> data;		if ( operation -> imputation == imputation -> no_imputation		     &&		     operation -> sous_imputation == sous_imputation -> no_sous_imputation )		{		    operation -> imputation = nouveau_no_imputation;		    operation -> sous_imputation = nouveau_no_sous_imputation;		}		liste_tmp = liste_tmp -> next;	    }	    list_tmp = list_tmp -> next;	}	/* fait le tour des échéances pour mettre le nouveau numéro de imputation et sous_imputation  */	liste_tmp = liste_struct_echeances;	while ( liste_tmp )	{	    struct operation_echeance *echeance;	    echeance = liste_tmp -> data;	    if ( echeance -> imputation == imputation -> no_imputation		 &&		 echeance -> sous_imputation == sous_imputation -> no_sous_imputation )	    {		echeance -> imputation = nouveau_no_imputation;		echeance -> sous_imputation = nouveau_no_sous_imputation;		if ( !echeance -> imputation )		    echeance -> compte_virement = -1;	    }	    liste_tmp = liste_tmp -> next;	}	demande_mise_a_jour_tous_comptes ();	gtk_widget_destroy ( GTK_WIDGET ( dialog ) );    }    /* supprime dans la liste des imputation  */    imputation -> liste_sous_imputation = g_slist_remove ( imputation -> liste_sous_imputation,							   sous_imputation );    enleve_selection_ligne_imputation();    if ( mise_a_jour_combofix_imputation_necessaire )	mise_a_jour_combofix_imputation  ();    remplit_arbre_imputation ();    modification_fichier(TRUE);}