rem: if ( operation -> relation_no_operation )
add: if ( operation -> relation_no_operation && operation -> relation_no_compte != -1 )
context: void edition_operation_ventilation ( void ){    struct struct_ope_ventil *operation;    gchar *char_tmp;    /* on récupère la struc de l'opé de ventil, ou -1 si c'est une nouvelle */    operation = cherche_operation_ventilee_from_ligne (ligne_selectionnee_ventilation);    echap_formulaire_ventilation ();    /* dégrise ce qui est nécessaire */    clique_champ_formulaire_ventilation ();    gtk_object_set_data ( GTK_OBJECT ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ),			  "adr_struct_ope",			  operation );    /* si l'opé est -1, c'est que c'est une nouvelle opé */    if ( operation == GINT_TO_POINTER ( -1 ) )    {	gtk_widget_grab_focus ( GTK_COMBOFIX ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ) -> entry );	ligne_selectionnee_ventilation = -1;	return;    }    /*   l'opé n'est pas -1, c'est une modif, on remplit les champs */    gtk_object_set_data ( GTK_OBJECT ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ),			  "adr_struct_ope",			  operation );    /* mise en forme du montant */    if ( operation -> montant < 0 )    {	entree_prend_focus (widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_DEBIT] );	gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_DEBIT] ),			     g_strdup_printf ( "%4.2f", -operation -> montant ));    }    else    {	entree_prend_focus (widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CREDIT] );	gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CREDIT] ),			     g_strdup_printf ( "%4.2f", operation -> montant ));    }    /* si l'opération est relevée, empêche la modif du montant */    if ( operation -> pointe == 3 )    {	gtk_widget_set_sensitive ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_DEBIT],				   FALSE );	gtk_widget_set_sensitive ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CREDIT],				   FALSE );    }    /* mise en forme des catégories */    if ( operation -> relation_no_operation )    {	/* c'est un virement */	GtkWidget *menu;	entree_prend_focus (widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] );	p_tab_nom_de_compte_variable = p_tab_nom_de_compte + operation -> relation_no_compte;	gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ),				g_strconcat ( COLON(_("Transfer")),					      NOM_DU_COMPTE,					      NULL ));	/*       si la contre opération est relevée, on désensitive les montants et les categ */	/* seulement valable si ce virement existe déjà */	if ( operation -> no_operation )	{	    struct structure_operation *contre_operation;	    contre_operation = operation_par_no ( operation -> relation_no_operation,						  operation -> relation_no_compte );	    if ( contre_operation		 &&		 contre_operation -> pointe == 3 )	    {		gtk_widget_set_sensitive ( GTK_WIDGET ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ),					   FALSE );		gtk_widget_set_sensitive ( GTK_WIDGET ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_DEBIT] ),					   FALSE );		gtk_widget_set_sensitive ( GTK_WIDGET ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CREDIT] ),					   FALSE );	    }	}	/* on met le type de l'opé associée */	if ( operation -> montant < 0 )	    menu = creation_menu_types ( 2,					 operation -> relation_no_compte,					 2  );	else	    menu = creation_menu_types ( 1,					 operation -> relation_no_compte,					 2  );	if ( menu )	{	    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CONTRA] ),				       menu );	    gtk_option_menu_set_history ( GTK_OPTION_MENU ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CONTRA] ),					  cherche_no_menu_type_associe ( operation -> no_type_associe,									 1 ));	    gtk_widget_show ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CONTRA] );	}    }    else    {	gchar *char_tmp;	char_tmp = nom_categ_par_no ( operation -> categorie,				      operation -> sous_categorie );	if ( char_tmp )	{	    entree_prend_focus (widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] );	    gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ),				    char_tmp);	}    }    /* mise en forme des notes */    if ( operation -> notes )    {	entree_prend_focus (widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_NOTES] );	gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_NOTES] ),			     operation -> notes );    }    /* met en place l'imputation budgétaire */    char_tmp = nom_imputation_par_no ( operation -> imputation,				       operation -> sous_imputation );    if ( char_tmp )    {	entree_prend_focus ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_BUDGETARY] );	gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_BUDGETARY] ),				char_tmp );    }    /* met en place l'exercice */    gtk_option_menu_set_history (  GTK_OPTION_MENU ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_EXERCICE] ),				   cherche_no_menu_exercice ( operation -> no_exercice,							      widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_EXERCICE] ));    /* mise en place de la pièce comptable */    if ( operation -> no_piece_comptable )    {	entree_prend_focus ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_VOUCHER] );	gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_VOUCHER] ),			     operation -> no_piece_comptable );    }    /*   on a fini de remplir le formulaire, on donne le focus à la date */    if ( GTK_WIDGET_SENSITIVE ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ))    {	gtk_entry_select_region ( GTK_ENTRY ( GTK_COMBOFIX ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ) -> entry ),				  0,				  -1);	gtk_widget_grab_focus ( GTK_COMBOFIX ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_CATEGORY] ) -> entry );    }    else    {	gtk_entry_select_region ( GTK_ENTRY ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_NOTES] ),				  0,				  -1);	gtk_widget_grab_focus ( widget_formulaire_ventilation[TRANSACTION_BREAKDOWN_FORM_NOTES] );    }    enregistre_ope_au_retour = 1 ;}