rem: if ( DEBUG ) printf ( "gsb_transactions_list_change_expanders, only_current_account =  %d\n", only_current_account );
add: devel_debug ( g_strdup_printf ("gsb_transactions_list_change_expanders, only_current_account =  %d", only_current_account ));
context: void gsb_transactions_list_change_expanders ( gint only_current_account ){    GtkTreeModel *tree_store;    GtkTreeIter iter;    if ( DEBUG )	printf ( "gsb_transactions_list_change_expanders, only_current_account =  %d\n", only_current_account );    tree_store = GTK_TREE_MODEL (gsb_transactions_list_get_store ());    if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( tree_store ),					 &iter ))    {	gint current_account;	gint iter_next_result = 0;	current_account = gsb_data_account_get_current_account ();  	do	{	    gint transaction_number;	    gint transaction_account_number;	    gpointer transaction;	    gpointer check_transaction;	    gint current_line;	    GtkTreeIter *new_mother_iter;	    GtkTreeIter *last_mother_iter;	    gint account_number_rows;	    /* 	    the current_line will contain 0, 1, 2 or 3 ; the line on the transaction */	    /* 		we are on */	    gtk_tree_model_get ( GTK_TREE_MODEL ( tree_store ),				 &iter,				 TRANSACTION_COL_NB_TRANSACTION_ADDRESS, &transaction,				 TRANSACTION_COL_NB_TRANSACTION_LINE, &current_line,				 -1 ); 	    transaction_number = gsb_data_transaction_get_transaction_number (transaction);	    transaction_account_number = gsb_data_transaction_get_account_number (transaction_number);	    /* we work only on breakdowns, so if not, go directly on the next transaction	     * check at the same time if the account is valid (when only current account) */	    	    if ( !gsb_data_transaction_get_breakdown_of_transaction (transaction_number)		 ||		 ( only_current_account		   &&		   transaction_account_number != current_account))	    {		gint i;		for ( i=0 ; i<4 ; i++ )		{		    iter_next_result = gtk_tree_model_iter_next ( GTK_TREE_MODEL ( tree_store ),								  &iter );		}		continue;	    }	    /* here we have to change the place of the expander, we just need to fill 	     * new_mother_iter and last_mother_iter and call gsb_transactions_list_swap_children */	    new_mother_iter = NULL;	    last_mother_iter = NULL;	    account_number_rows = gsb_data_account_get_nb_rows (transaction_account_number);	    check_transaction = transaction;	    while ( (!new_mother_iter		    ||		    !last_mother_iter)		    &&		    check_transaction == transaction)	    {		if ( current_line == (account_number_rows - 1))		{		    new_mother_iter = gtk_tree_iter_copy (&iter);		}				if ( gtk_tree_model_iter_has_child ( GTK_TREE_MODEL ( tree_store ),						     &iter ))		{		    last_mother_iter = gtk_tree_iter_copy (&iter);		}		/* go to the next iter but we want to stay in the same transaction */		iter_next_result = gtk_tree_model_iter_next ( GTK_TREE_MODEL ( tree_store ),							      &iter );		gtk_tree_model_get ( GTK_TREE_MODEL ( tree_store ),				     &iter,				     TRANSACTION_COL_NB_TRANSACTION_ADDRESS, &check_transaction,				     TRANSACTION_COL_NB_TRANSACTION_LINE, &current_line,				     -1 );	    }	    /* at this step if one of the 2 iters is NULL, it shows that we went to the next transaction	     * without fill the 2 iters... so problem... normally souldn't append */	    if ( (!new_mother_iter		  ||		  !last_mother_iter)		 &&		 check_transaction != transaction)	    {		printf ( "Should not append : in gsb_transactions_list_change_expanders, the function didn't\nfind the last or the new place of the expander of a breakdown of transaction...\n" );				/* we free the iter and simply continue */				if (new_mother_iter)		{		    gtk_tree_iter_free (new_mother_iter);		    new_mother_iter = NULL;		}		if (last_mother_iter)		{		    gtk_tree_iter_free (last_mother_iter);		    last_mother_iter = NULL;		}		continue;	    }	    /* i didn't succed to open an expander here if it was already opened,	     * so, the best way for now, we select the mother and it will be	     * automatickly closed */	    gsb_transactions_list_set_current_transaction ( transaction_number );	    /* the 2 iter are filled, we can swap the children */	    gsb_transactions_list_swap_children ( new_mother_iter,						  last_mother_iter );	    gtk_tree_iter_free (new_mother_iter);	    gtk_tree_iter_free (last_mother_iter);	    new_mother_iter = NULL;	    last_mother_iter = NULL;	    /* go to the next transaction */	    while ( check_transaction == transaction)	    {		iter_next_result = gtk_tree_model_iter_next ( GTK_TREE_MODEL ( tree_store ),							      &iter );		gtk_tree_model_get ( GTK_TREE_MODEL ( tree_store ),				     &iter,				     TRANSACTION_COL_NB_TRANSACTION_ADDRESS, &check_transaction,				     -1 );	    }	}	while (iter_next_result);    }}