rem: gtk_widget_grab_focus ( gsb_account_get_tree_view (current_account) );
add: gtk_widget_grab_focus ( gsb_transactions_list_get_tree_view()  );
context: gboolean gsb_form_finish_edition ( void ){    gint transaction_number;    gint new_transaction;    GSList *list_nb_parties;    GSList *list_tmp;    gint current_account;    /* get the number of the transaction, stored in the form (0 if new) */    transaction_number = gtk_object_get_data ( GTK_OBJECT ( formulaire ),					       "transaction_number_in_form" );    current_account = gsb_account_get_current_account ();    /* a new transaction is     * either transaction_number is 0 (normal transaction)     * either transaction_number is -2 (new breakdown daughter)     * */    if ( transaction_number	 &&	 transaction_number != -2 )	new_transaction = 0;    else	new_transaction = 1;    /* the current widget has to lose the focus to make all the changes if necessary */    gtk_widget_grab_focus ( gsb_account_get_tree_view (current_account) );        /* check if the datas are ok */    if ( !gsb_form_validate_form_transaction ( transaction_number ))	return FALSE;    /* if the party is a report, we make as transactions as the number of parties in the     * report. So we create a list with the party's numbers or -1 if it's a normal     * party */    list_nb_parties = gsb_form_get_parties_list_from_report ();    /* now we go throw the list */    list_tmp = list_nb_parties;    while ( list_tmp )    {	if ( list_tmp -> data == GINT_TO_POINTER ( -1 ) )	    /* it's a normal party, we set the list_tmp to NULL */	    list_tmp = NULL;	else	{	    /* it's a report, so each time we come here we set the parti's combofix to the	     * party of the report */	    if ( !list_tmp -> data )	    {		dialogue_error ( _("No third party selected for this report."));		return FALSE;	    }	    else	    {		gtk_combofix_set_text ( GTK_COMBOFIX ( widget_formulaire_par_element (TRANSACTION_FORM_PARTY) ),					tiers_name_by_no ( GPOINTER_TO_INT (list_tmp -> data), TRUE ));		/* if it's not the first party and the method of payment has to change its number (cheque),		 * we increase the number. as we are in a party's list, it's always a new transactio, 		 * so we know that it's not the first if transaction_number is not 0 */		if ( transaction_number )		{		    struct struct_type_ope *type;		    type = type_ope_par_no ( gsb_transaction_data_get_method_of_payment_number (transaction_number),					     current_account);		    if ( type			 &&			 type -> affiche_entree			 &&			 type -> numerotation_auto			 &&			 verifie_element_formulaire_existe ( TRANSACTION_FORM_CHEQUE ))			gtk_entry_set_text ( GTK_ENTRY ( widget_formulaire_par_element (TRANSACTION_FORM_CHEQUE) ),					     automatic_numbering_get_new_number ( type ));		}		list_tmp = list_tmp -> next;	    }	}	if ( new_transaction )	{	    /* it's a new transaction, we create it, and put the mother if necessary */	    gint mother_transaction;	    /* if transaction exists already, it's that we are on a white daughter of a breakdown,	     * so we keep the no of the mother */	    if ( transaction_number )		mother_transaction = gsb_transaction_data_get_mother_transaction_number (transaction_number);	    else		mother_transaction = 0;	    	    transaction_number = gsb_transaction_data_new_transaction (current_account);	    gsb_transaction_data_set_mother_transaction_number ( transaction_number,								 mother_transaction);	}	/* take the datas in the form, except the category */	gsb_form_take_datas_from_form ( transaction_number );	/* take the category and do the stuff with that (contra-transaction...) */	gsb_form_get_categories ( transaction_number,				  new_transaction );	if ( new_transaction )	    gsb_transactions_list_append_new_transaction ( gsb_transaction_data_get_pointer_to_transaction (transaction_number));	else	    gsb_transactions_list_update_transaction ( gsb_transaction_data_get_pointer_to_transaction (transaction_number));    }    /* on libère la liste des no tiers */    g_slist_free ( list_nb_parties );    /* if it's a reconciliation and we modify a transaction, check     * the amount of marked transactions */    if ( etat.equilibrage	 &&	 !new_transaction )	calcule_total_pointe_compte ( gsb_account_get_current_account () );    /* if it was a new transaction, do the stuff to do another new transaction */    if ( new_transaction )    {	GtkWidget *date_entry;	/* it was a new transaction, we save the last date entry */	date_entry = widget_formulaire_par_element (TRANSACTION_FORM_DATE);	last_date = g_strdup ( gtk_entry_get_text ( GTK_ENTRY ( date_entry )));	gsb_transactions_list_edit_current_transaction ();    }    else    {	formulaire_a_zero ();	if ( !etat.formulaire_toujours_affiche )	    gtk_widget_hide ( frame_droite_bas );    }    /* update the combofix's lists */    if ( mise_a_jour_combofix_tiers_necessaire )	mise_a_jour_combofix_tiers ();    if ( mise_a_jour_combofix_categ_necessaire )	mise_a_jour_combofix_categ ();    if ( mise_a_jour_combofix_imputation_necessaire )	mise_a_jour_combofix_imputation ();    /* show the warnings */    affiche_dialogue_soldes_minimaux ();    update_transaction_in_trees (gsb_transaction_data_get_pointer_to_transaction (transaction_number));    modification_fichier ( TRUE );    return FALSE;}