add: enregistre_ope_au_retour = 1 ;
context: void edition_operation_ventilation ( void ){  struct struct_ope_ventil *operation;  GSList *liste_tmp;  /* on rcupre la struc de l'op de ventil, ou -1 si c'est une nouvelle */  operation = ligne_selectionnee_ventilation;  echap_formulaire_ventilation ();  /* dgrise ce qui est ncessaire */  clique_champ_formulaire_ventilation ();  gtk_object_set_data ( GTK_OBJECT ( widget_formulaire_ventilation[0] ),			"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[0] ) -> entry );      return;    }/*   l'op n'est pas -1, c'est une modif, on remplit les champs */  gtk_object_set_data ( GTK_OBJECT ( widget_formulaire_ventilation[0] ),			"adr_struct_ope",			operation );  /* mise en forme du montant */  if ( operation -> montant < 0 )    {      entree_prend_focus (widget_formulaire_ventilation[2] );      gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_ventilation[2] ),			   g_strdup_printf ( "%4.2f", -operation -> montant ));    }  else    {      entree_prend_focus (widget_formulaire_ventilation[3] );      gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_ventilation[3] ),			   g_strdup_printf ( "%4.2f", operation -> montant ));    }  /* si l'opration est releve, empche la modif du montant */  if ( operation -> pointe == 2 )    {      gtk_widget_set_sensitive ( widget_formulaire_ventilation[2],				 FALSE );      gtk_widget_set_sensitive ( widget_formulaire_ventilation[3],				 FALSE );    }  /* mise en forme des catgories */  if ( operation -> relation_no_operation )    {      /* c'est un virement */      GtkWidget *menu;      entree_prend_focus (widget_formulaire_ventilation[0] );      p_tab_nom_de_compte_variable = p_tab_nom_de_compte + operation -> relation_no_compte;      gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_ventilation[0] ),			      g_strconcat ( COLON(_("Transfer")),					    NOM_DU_COMPTE,					    NULL ));      /*       si la contre opration est releve, on dsensitive les montants et les categ */      /* seulement valable si ce virement existe dj */      if ( operation -> no_operation )	{	  struct structure_operation *contre_operation;	  contre_operation = g_slist_find_custom ( LISTE_OPERATIONS,						   GINT_TO_POINTER ( operation -> relation_no_operation ),						   (GCompareFunc) recherche_operation_par_no ) -> data;	  if ( contre_operation -> pointe == 2 )	    {	      gtk_widget_set_sensitive ( GTK_WIDGET ( widget_formulaire_ventilation[0] ),					 FALSE );	      gtk_widget_set_sensitive ( GTK_WIDGET ( widget_formulaire_ventilation[2] ),					 FALSE );	      gtk_widget_set_sensitive ( GTK_WIDGET ( widget_formulaire_ventilation[3] ),					 FALSE );	    }	}      /* on met le type de l'op associe */      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[5] ),				     menu );	  gtk_option_menu_set_history ( GTK_OPTION_MENU ( widget_formulaire_ventilation[5] ),					cherche_no_menu_type_associe ( operation -> no_type_associe,								       1 ));	  gtk_widget_show ( widget_formulaire_ventilation[5] );	}    }  else    {      liste_tmp = g_slist_find_custom ( liste_struct_categories,					GINT_TO_POINTER ( operation -> categorie ),					( GCompareFunc ) recherche_categorie_par_no );      if ( liste_tmp )	{	  GSList *liste_tmp_2;      	  entree_prend_focus (widget_formulaire_ventilation[0] );	  liste_tmp_2 = g_slist_find_custom ( (( struct struct_categ * )( liste_tmp -> data )) -> liste_sous_categ,					      GINT_TO_POINTER ( operation -> sous_categorie ),					      ( GCompareFunc ) recherche_sous_categorie_par_no );	  if ( liste_tmp_2 )	    gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_ventilation[0] ),				    g_strconcat ( (( struct struct_categ * )( liste_tmp -> data )) -> nom_categ,						  " : ",						  (( struct struct_sous_categ * )( liste_tmp_2 -> data )) -> nom_sous_categ,						  NULL ));	  else	    gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_ventilation[0] ),				    (( struct struct_categ * )( liste_tmp -> data )) -> nom_categ );      	}    }  /* mise en forme des notes */  if ( operation -> notes )    {      entree_prend_focus (widget_formulaire_ventilation[1] );      gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_ventilation[1] ),			   operation -> notes );    }  /* met en place l'imputation budgtaire */  liste_tmp = g_slist_find_custom ( liste_struct_imputation,				    GINT_TO_POINTER ( operation -> imputation ),				    ( GCompareFunc ) recherche_imputation_par_no );  if ( liste_tmp )    {      GSList *liste_tmp_2;      entree_prend_focus ( widget_formulaire_ventilation[4] );      liste_tmp_2 = g_slist_find_custom ( (( struct struct_imputation * )( liste_tmp -> data )) -> liste_sous_imputation,					  GINT_TO_POINTER ( operation -> sous_imputation ),					  ( GCompareFunc ) recherche_sous_imputation_par_no );      if ( liste_tmp_2 )	gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_ventilation[4] ),				g_strconcat ( (( struct struct_imputation * )( liste_tmp -> data )) -> nom_imputation,					      " : ",					      (( struct struct_sous_imputation * )( liste_tmp_2 -> data )) -> nom_sous_imputation,					      NULL ));      else	gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_ventilation[4] ),				(( struct struct_imputation * )( liste_tmp -> data )) -> nom_imputation );    }  /* met en place l'exercice */  gtk_option_menu_set_history (  GTK_OPTION_MENU ( widget_formulaire_ventilation[6] ),				 cherche_no_menu_exercice ( operation -> no_exercice,							    widget_formulaire_ventilation[6] ));  /* mise en place de la pice comptable */  if ( operation -> no_piece_comptable )    {      entree_prend_focus ( widget_formulaire_ventilation[7] );      gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_ventilation[7] ),			   operation -> no_piece_comptable );    }/*   on a fini de remplir le formulaire, on donne le focus  la date */  if ( GTK_WIDGET_SENSITIVE ( widget_formulaire_ventilation[0] ))    {      gtk_entry_select_region ( GTK_ENTRY ( GTK_COMBOFIX ( widget_formulaire_ventilation[0] ) -> entry ),				0,				-1);      gtk_widget_grab_focus ( GTK_COMBOFIX ( widget_formulaire_ventilation[0] ) -> entry );    }  else    {      gtk_entry_select_region ( GTK_ENTRY ( widget_formulaire_ventilation[1] ),				0,				-1);      gtk_widget_grab_focus ( widget_formulaire_ventilation[1] );    }}