[grisbi-cvs] grisbi/src accueil.c, 1.197, 1.198 gsb_account_property.c, 1.42, 1.43 gsb_archive_config.c, 1.23, 1.24 gsb_assistant_archive.c, 1.32, 1.33 gsb_data_account.c, 1.75, 1.76 gsb_data_account.h, 1.34, 1.35 gsb_data_archive.c, 1.14, 1.15 gsb_data_archive.h, 1.6, 1.7 gsb_data_archive_store.c, 1.14, 1.15 gsb_data_transaction.c, 1.61, 1.62 gsb_data_transaction.h, 1.28, 1.29 gsb_file.c, 1.50, 1.51 gsb_file.h, 1.6, 1.7 gsb_file_load.c, 1.175, 1.176 gsb_real.c, 1.46, 1.47 gsb_real.h, 1.18, 1.19 gsb_real_cunit.c, 1.10, 1.11 gsb_transactions_list.c, 1.165, 1.166 gsb_transactions_list.h, 1.34, 1.35 main.c, 1.144, 1.145 navigation.c, 1.122, 1.123 transaction_list.c, 1.37, 1.38 transaction_list.h, 1.5, 1.6 transaction_model.c, 1.3, 1.4 utils_dates_cunit.c, 1.1, 1.2 utils_dates_cunit.h, 1.1, 1.2

Pierre Biava pbiava at users.sourceforge.net
Thu May 21 23:58:57 CEST 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8911/src

Modified Files:
	accueil.c gsb_account_property.c gsb_archive_config.c 
	gsb_assistant_archive.c gsb_data_account.c gsb_data_account.h 
	gsb_data_archive.c gsb_data_archive.h gsb_data_archive_store.c 
	gsb_data_transaction.c gsb_data_transaction.h gsb_file.c 
	gsb_file.h gsb_file_load.c gsb_real.c gsb_real.h 
	gsb_real_cunit.c gsb_transactions_list.c 
	gsb_transactions_list.h main.c navigation.c transaction_list.c 
	transaction_list.h transaction_model.c utils_dates_cunit.c 
	utils_dates_cunit.h 
Log Message:
Fixed display bug after creation an archive + mk_include + make update-po

Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- navigation.c	19 May 2009 18:24:58 -0000	1.122
+++ navigation.c	21 May 2009 21:58:55 -0000	1.123
@@ -39,7 +39,6 @@
 #include "./fenetre_principale.h"
 #include "./menu.h"
 #include "./etats_onglet.h"
-#include "./gsb_real.h"
 #include "./gsb_reconcile.h"
 #include "./gsb_scheduler_list.h"
 #include "./gsb_transactions_list.h"

Index: gsb_data_archive_store.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_archive_store.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- gsb_data_archive_store.c	27 Apr 2009 19:41:03 -0000	1.14
+++ gsb_data_archive_store.c	21 May 2009 21:58:55 -0000	1.15
@@ -1,9 +1,9 @@
 /* ************************************************************************** */
 /*                                                                            */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2008 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -70,7 +70,7 @@
 /*START_STATIC*/
 static  void _gsb_data_archive_store_free ( struct_store_archive *archive );
 static  struct_store_archive *gsb_data_archive_store_find_struct ( gint archive_number,
-								  gint account_number );
+                        gint account_number );
 static  gint gsb_data_archive_store_max_number ( void );
 static  gint gsb_data_archive_store_new ( void );
 /*END_STATIC*/
@@ -101,10 +101,10 @@
         GSList* tmp_list = archive_store_list;
         while ( tmp_list )
         {
-	    struct_store_archive *archive;
-	    archive = tmp_list -> data;
-	    tmp_list = tmp_list -> next;
-	    _gsb_data_archive_store_free ( archive );
+        struct_store_archive *archive;
+        archive = tmp_list -> data;
+        tmp_list = tmp_list -> next;
+        _gsb_data_archive_store_free ( archive );
         }
         g_slist_free ( archive_store_list );
     }
@@ -140,7 +140,7 @@
     struct_store_archive *archive;
 
     if ( !archive_ptr )
-	return 0;
+    return 0;
 
     archive = archive_ptr;
     archive_store_buffer = archive;
@@ -165,54 +165,55 @@
     tmp_list = gsb_data_transaction_get_complete_transactions_list ();
     while (tmp_list)
     {
-	gint transaction_number;
-	gint archive_number;
-
-	transaction_number = gsb_data_transaction_get_transaction_number (tmp_list -> data);
+    gint transaction_number;
+    gint archive_number;
 
-	/* we are not interested on children transactions */
-	if (gsb_data_transaction_get_mother_transaction_number (transaction_number))
-	{
-	    tmp_list = tmp_list -> next;
-	    continue;
-	}
+    transaction_number = gsb_data_transaction_get_transaction_number (tmp_list -> data);
 
-	archive_number = gsb_data_transaction_get_archive_number (transaction_number);
+    /* we are not interested on children transactions */
+    if (gsb_data_transaction_get_mother_transaction_number (transaction_number))
+    {
+        tmp_list = tmp_list -> next;
+        continue;
+    }
 
-	if (archive_number)
-	{
-	    struct_store_archive *archive;
-	    gint floating_point;
-	    gint account_number;
+    archive_number = gsb_data_transaction_get_archive_number (transaction_number);
 
-	    account_number = gsb_data_transaction_get_account_number (transaction_number);
-	    floating_point = gsb_data_currency_get_floating_point (gsb_data_account_get_currency (account_number));
-	    archive = gsb_data_archive_store_find_struct ( archive_number,
-							   account_number);
-	    if (archive)
-	    {
-		/* there is already a struct_store_archive for the same archive and the same account,
-		 * we increase the balance */
-		archive -> balance = gsb_real_add ( archive -> balance,
-						    gsb_data_transaction_get_adjusted_amount (transaction_number, floating_point));
-		archive -> nb_transactions++;
-	    }
-	    else
-	    {
-		/* there is no struct_store_archive for that transaction, we make a new one 
-		 * with the balance of the transaction as balance */
-		gint archive_store_number;
+    if (archive_number)
+    {
+        struct_store_archive *archive;
+        gint floating_point;
+        gint account_number;
+        account_number = gsb_data_transaction_get_account_number (transaction_number);
+        floating_point = gsb_data_currency_get_floating_point (
+                            gsb_data_account_get_currency (account_number) );
+        archive = gsb_data_archive_store_find_struct ( archive_number, account_number);
+        if (archive)
+        {
+        /* there is already a struct_store_archive for the same archive and the same account,
+         * we increase the balance */
+        archive -> balance = gsb_real_add ( archive -> balance,
+                                gsb_data_transaction_get_adjusted_amount (transaction_number,
+                                floating_point));
+        archive -> nb_transactions++;
+        }
+        else
+        {
+        /* there is no struct_store_archive for that transaction, we make a new one 
+         * with the balance of the transaction as balance */
+        gint archive_store_number;
 
-		archive_store_number = gsb_data_archive_store_new ();
-		archive = gsb_data_archive_store_get_structure (archive_store_number);
+        archive_store_number = gsb_data_archive_store_new ();
+        archive = gsb_data_archive_store_get_structure (archive_store_number);
 
-		archive -> archive_number = archive_number;
-		archive -> account_number = account_number;
-		archive -> balance = gsb_data_transaction_get_adjusted_amount (transaction_number, floating_point);
-		archive -> nb_transactions = 1;
-	    }
-	}
-	tmp_list = tmp_list -> next;
+        archive -> archive_number = archive_number;
+        archive -> account_number = account_number;
+        archive -> balance = gsb_data_transaction_get_adjusted_amount (
+                        transaction_number, floating_point);
+        archive -> nb_transactions = 1;
+        }
+    }
+    tmp_list = tmp_list -> next;
     }
 }
 
@@ -225,7 +226,7 @@
         return;
     g_free ( archive );
     if ( archive_store_buffer == archive )
-	archive_store_buffer = NULL;
+    archive_store_buffer = NULL;
 }
 
 /**
@@ -242,10 +243,10 @@
     archive = gsb_data_archive_store_get_structure ( archive_store_number );
 
     if (!archive)
-	return FALSE;
+    return FALSE;
 
     archive_store_list = g_slist_remove ( archive_store_list,
-					  archive );
+                      archive );
 
     _gsb_data_archive_store_free ( archive );
     return TRUE;
@@ -265,16 +266,16 @@
     tmp_list = archive_store_list;
     while (tmp_list)
     {
-	struct_store_archive *archive;
+    struct_store_archive *archive;
 
-	archive = tmp_list -> data;
-	tmp_list = tmp_list -> next;
-	if (archive -> archive_number == archive_number)
-	{
-	    archive_store_list = g_slist_remove ( archive_store_list,
-						  archive );
-	    _gsb_data_archive_store_free ( archive );
-	}
+    archive = tmp_list -> data;
+    tmp_list = tmp_list -> next;
+    if (archive -> archive_number == archive_number)
+    {
+        archive_store_list = g_slist_remove ( archive_store_list,
+                          archive );
+        _gsb_data_archive_store_free ( archive );
+    }
     }
     return TRUE;
 }
@@ -296,7 +297,7 @@
     archive = gsb_data_archive_store_get_structure ( archive_store_number );
 
     if (!archive)
-	return 0;
+    return 0;
 
     return archive -> archive_number;
 }
@@ -315,7 +316,7 @@
     archive = gsb_data_archive_store_get_structure ( archive_store_number );
 
     if (!archive)
-	return 0;
+    return 0;
 
     return archive -> account_number;
 }
@@ -335,7 +336,7 @@
     archive = gsb_data_archive_store_get_structure ( archive_store_number );
 
     if (!archive)
-	return null_real;
+    return null_real;
 
     return archive -> balance;
 }
@@ -354,7 +355,7 @@
     archive = gsb_data_archive_store_get_structure ( archive_store_number );
 
     if (!archive)
-	return 0;
+    return 0;
 
     return archive -> nb_transactions;
 }
@@ -373,29 +374,29 @@
     GSList *tmp;
 
     if (!archive_store_number)
-	return NULL;
+    return NULL;
 
     /* before checking all the archives, we check the buffer */
     if ( archive_store_buffer
-	 &&
-	 archive_store_buffer -> archive_store_number == archive_store_number )
-	return archive_store_buffer;
+     &&
+     archive_store_buffer -> archive_store_number == archive_store_number )
+    return archive_store_buffer;
 
     tmp = archive_store_list;
 
     while ( tmp )
     {
-	struct_store_archive *archive;
+    struct_store_archive *archive;
 
-	archive = tmp -> data;
+    archive = tmp -> data;
 
-	if ( archive -> archive_store_number == archive_store_number )
-	{
-	    archive_store_buffer = archive;
-	    return archive;
-	}
+    if ( archive -> archive_store_number == archive_store_number )
+    {
+        archive_store_buffer = archive;
+        return archive;
+    }
 
-	tmp = tmp -> next;
+    tmp = tmp -> next;
     }
     return NULL;
 }
@@ -416,14 +417,14 @@
 
     while ( tmp )
     {
-	struct_store_archive *archive;
+    struct_store_archive *archive;
 
-	archive = tmp -> data;
+    archive = tmp -> data;
 
-	if ( archive -> archive_store_number > number_tmp )
-	    number_tmp = archive -> archive_store_number;
+    if ( archive -> archive_store_number > number_tmp )
+        number_tmp = archive -> archive_store_number;
 
-	tmp = tmp -> next;
+    tmp = tmp -> next;
     }
     return number_tmp;
 }
@@ -438,23 +439,23 @@
  * \return a pointer to the found struct_store_archive or NULL
  * */
 static struct_store_archive *gsb_data_archive_store_find_struct ( gint archive_number,
-								  gint account_number )
+                        gint account_number )
 {
     GSList *tmp_list;
 
     tmp_list = archive_store_list;
     while (tmp_list)
     {
-	struct_store_archive *archive;
+    struct_store_archive *archive;
 
-	archive = tmp_list -> data;
+    archive = tmp_list -> data;
 
-	if (archive -> archive_number == archive_number
-	    &&
-	    archive -> account_number == account_number )
-	    return archive;
+    if (archive -> archive_number == archive_number
+        &&
+        archive -> account_number == account_number )
+        return archive;
 
-	tmp_list = tmp_list -> next;
+    tmp_list = tmp_list -> next;
     }
     return NULL;
 }
@@ -474,8 +475,8 @@
     archive = g_malloc0 ( sizeof ( struct_store_archive ));
     if (!archive)
     {
-	dialogue_error_memory ();
-	return 0;
+    dialogue_error_memory ();
+    return 0;
     }
     archive -> archive_store_number = gsb_data_archive_store_max_number () + 1;
 

Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- transaction_list.c	19 May 2009 18:24:58 -0000	1.37
+++ transaction_list.c	21 May 2009 21:58:55 -0000	1.38
@@ -1,6 +1,7 @@
 /* ************************************************************************** */
 /*                                                                            */
 /*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2008-2009 Pierre Biava (grisbi at pierre.biava.name)                 */
 /*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
@@ -43,7 +44,6 @@
 #include "./gsb_data_currency.h"
 #include "./gsb_data_transaction.h"
 #include "./utils_dates.h"
[...2266 lines suppressed...]
+    newsize = custom_list->num_rows * sizeof(CustomRecord*);
+    custom_list->rows = g_realloc(custom_list->rows, newsize);
+    custom_list->visibles_rows = g_realloc(custom_list->visibles_rows, newsize);
+
+    /* free the records */
+    for (i=TRANSACTION_LIST_ROWS_NB ; i ; i--)
+    {
+    if (record -> transaction_records[i-1] -> filtered_pos != -1)
+    {
+        path = gtk_tree_path_new ();
+        gtk_tree_path_append_index(path, record -> transaction_records[i-1] -> filtered_pos);
+        gtk_tree_model_row_deleted (GTK_TREE_MODEL(custom_list), path);
+        gtk_tree_path_free(path);
+    }
+    g_free (record -> transaction_records[i-1]);
+    }
+
+    return TRUE;
+}
+

Index: gsb_data_transaction.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_transaction.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- gsb_data_transaction.c	8 May 2009 09:35:10 -0000	1.61
+++ gsb_data_transaction.c	21 May 2009 21:58:55 -0000	1.62
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2008 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -42,6 +42,7 @@
 #include "./utils_dates.h"
 #include "./gsb_real.h"
 #include "./utils_str.h"
+#include "./transaction_list.h"
 #include "./include.h"
 #include "./gsb_real.h"
 /*END_INCLUDE*/
@@ -55,18 +56,18 @@
 {
     /** @name general stuff */
     gint transaction_number;
-    gchar *transaction_id;				/**< filled by ofx */
+    gchar *transaction_id;              /**< filled by ofx */
     gint account_number;
     gsb_real transaction_amount;
     gint party_number;
     gchar *notes;
-    gint marked_transaction;				/**<  OPERATION_NORMALE=nothing, OPERATION_POINTEE=P, OPERATION_TELERAPPROCHEE=T, OPERATION_RAPPROCHEE=R */
-    gint archive_number;				/**< if it's an archived transaction, contains the number of the archive */
-    gshort automatic_transaction;			/**< 0=manual, 1=automatic (scheduled transaction) */
-    gint reconcile_number;				/**< the number of reconcile, carreful : can be filled without marked_transaction=OPERATION_RAPPROCHEE sometimes,
-    								it happen if the user did ctrl R to un-R the transaction, we keep reconcile_number because most of them
-								will re-R after the change, and that value will help the user to find wich statement it belong.
-								so always check marked_transaction before checking reconcile_number here */
+    gint marked_transaction;            /**<  OPERATION_NORMALE=nothing, OPERATION_POINTEE=P, OPERATION_TELERAPPROCHEE=T, OPERATION_RAPPROCHEE=R */
+    gint archive_number;                /**< if it's an archived transaction, contains the number of the archive */
+    gshort automatic_transaction;       /**< 0=manual, 1=automatic (scheduled transaction) */
+    gint reconcile_number;              /**< the number of reconcile, carreful : can be filled without marked_transaction=OPERATION_RAPPROCHEE sometimes,
+                                             it happen if the user did ctrl R to un-R the transaction, we keep reconcile_number because most of them
+                                             will re-R after the change, and that value will help the user to find wich statement it belong.
+                                             o always check marked_transaction before checking reconcile_number here */
     guint financial_year_number;
     gchar *voucher;
     gchar *bank_references;
@@ -77,7 +78,7 @@
 
     /** @name currency stuff */
     gint currency_number;
-    gint change_between_account_and_transaction;	/**< if 1 : 1 account_currency = (exchange_rate * amount) transaction_currency */
+    gint change_between_account_and_transaction;    /**< if 1 : 1 account_currency = (exchange_rate * amount) transaction_currency */
     gsb_real exchange_rate;
     gsb_real exchange_fees;
 
@@ -86,9 +87,9 @@
     gint sub_category_number;
     gint budgetary_number;
     gint sub_budgetary_number;
-    gint transaction_number_transfer;			/**< -1 for a transfer to a deleted account, the contra-transaction number else */
-    gint split_of_transaction;				/**< 1 if it's a split of transaction */
-    gint mother_transaction_number;			/**< for a split, the mother's transaction number */
+    gint transaction_number_transfer;   /**< -1 for a transfer to a deleted account, the contra-transaction number else */
+    gint split_of_transaction;          /**< 1 if it's a split of transaction */
+    gint mother_transaction_number;     /**< for a split, the mother's transaction number */
 
     /** @name method of payment */
     gint method_of_payment_number;
@@ -402,7 +403,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_transaction_id ( gint transaction_number,
-						   const gchar *transaction_id )
+                        const gchar *transaction_id )
 {
     struct_transaction *transaction;
 
@@ -452,7 +453,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_account_number ( gint transaction_number,
-						   gint no_account )
+                        gint no_account )
 {
     struct_transaction *transaction;
 
@@ -516,7 +517,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_date ( gint transaction_number,
-					 const GDate *date )
+                        const GDate *date )
 {
     struct_transaction *transaction;
 
@@ -585,7 +586,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_value_date ( gint transaction_number,
-					       const GDate *date )
+                        const GDate *date )
 {
     struct_transaction *transaction;
 
@@ -658,7 +659,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_amount ( gint transaction_number,
-					   gsb_real amount )
+                        gsb_real amount )
 {
     struct_transaction *transaction;
 
@@ -690,7 +691,7 @@
  * \return the amount of the transaction
  * */
 gsb_real gsb_data_transaction_get_adjusted_amount ( gint transaction_number,
-						    gint return_exponent )
+                        gint return_exponent )
 {
     struct_transaction *transaction;
 
@@ -718,8 +719,8 @@
  * \return the amount of the transaction
  * */
 gsb_real gsb_data_transaction_get_adjusted_amount_for_currency ( gint transaction_number,
-								 gint return_currency_number,
-								 gint return_exponent )
+                        gint return_currency_number,
+                        gint return_exponent )
 {
     struct_transaction *transaction;
     gsb_real amount = null_real;
@@ -809,7 +810,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_currency_number ( gint transaction_number,
-						    gint no_currency )
+                        gint no_currency )
 {
     struct_transaction *transaction;
 
@@ -878,7 +879,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_change_between ( gint transaction_number,
-						   gint value )
+                        gint value )
 {
     struct_transaction *transaction;
 
@@ -943,7 +944,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_exchange_rate ( gint transaction_number,
-						  gsb_real rate )
+                        gsb_real rate )
 {
     struct_transaction *transaction;
 
@@ -1006,7 +1007,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_exchange_fees ( gint transaction_number,
-						  gsb_real rate )
+                        gsb_real rate )
 {
     struct_transaction *transaction;
 
@@ -1070,7 +1071,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_party_number ( gint transaction_number,
-						 gint no_party )
+                        gint no_party )
 {
     struct_transaction *transaction;
 
@@ -1130,7 +1131,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_category_number ( gint transaction_number,
-						    gint no_category )
+                        gint no_category )
 {
     struct_transaction *transaction;
 
@@ -1172,7 +1173,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_sub_category_number ( gint transaction_number,
-							gint no_sub_category )
+                        gint no_sub_category )
 {
     struct_transaction *transaction;
 
@@ -1216,7 +1217,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_split_of_transaction ( gint transaction_number,
-							     gint is_split )
+                        gint is_split )
 {
     struct_transaction *transaction;
 
@@ -1259,7 +1260,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_notes ( gint transaction_number,
-					  const gchar *notes )
+                        const gchar *notes )
 {
     struct_transaction *transaction;
 
@@ -1312,7 +1313,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_method_of_payment_number ( gint transaction_number,
-							     gint number )
+                        gint number )
 {
     struct_transaction *transaction;
 
@@ -1370,7 +1371,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_method_of_payment_content ( gint transaction_number,
-							      const gchar *method_of_payment_content )
+                        const gchar *method_of_payment_content )
 {
     struct_transaction *transaction;
 
@@ -1424,7 +1425,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_marked_transaction ( gint transaction_number,
-						       gint marked_transaction )
+                        gint marked_transaction )
 {
     struct_transaction *transaction;
 
@@ -1488,14 +1489,14 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_archive_number ( gint transaction_number,
-						   gint archive_number )
+                        gint archive_number )
 {
     struct_transaction *transaction;
 
     transaction = gsb_data_transaction_get_transaction_by_no ( transaction_number);
 
     if ( !transaction )
-	return FALSE;
+    return FALSE;
 
     /* we choose to set or not the transaction to the transactions_list
      * if the archive_number of the transaction is 0 for now, it's already in that list,
@@ -1503,20 +1504,21 @@
      * else, according to the new value, we remove it or append it */
     if (transaction -> archive_number)
     {
-	/* that transaction was an archive, so it's only in the complete_transactions_list */
-	if  (!archive_number)
-	    /* the transaction was an archive, and we transform it as non archived transaction,
-	     * so we add it into the transactions_list */
-	    transactions_list = g_slist_append ( transactions_list,
-						 transaction );
+    /* that transaction was an archive, so it's only in the complete_transactions_list */
+    if  (!archive_number)
+        /* the transaction was an archive, and we transform it as non archived transaction,
+         * so we add it into the transactions_list */
+        transactions_list = g_slist_append ( transactions_list, transaction );
     }
     else
     {
-	/* the transaction was not an archive, so it's into the 2 lists,
-	 * if we transform it as an archive, we remove it from the transactions_list */
-	if (archive_number)
-	    transactions_list = g_slist_remove ( transactions_list,
-						 transaction );
+        /* the transaction was not an archive, so it's into the 2 lists,
+         * if we transform it as an archive, we remove it from the transactions_list */
+        if (archive_number)
+        {
+        transaction_list_remove_archive_transaction ( transaction_number );
+        transactions_list = g_slist_remove ( transactions_list, transaction );
+        }
     }
 
     transaction -> archive_number = archive_number;
@@ -1549,7 +1551,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_automatic_transaction ( gint transaction_number,
-							  gint automatic_transaction )
+                        gint automatic_transaction )
 {
     struct_transaction *transaction;
 
@@ -1591,7 +1593,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_reconcile_number ( gint transaction_number,
-						     gint reconcile_number )
+                        gint reconcile_number )
 {
     struct_transaction *transaction;
 
@@ -1650,7 +1652,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_financial_year_number ( gint transaction_number,
-							  gint financial_year_number )
+                        gint financial_year_number )
 {
     struct_transaction *transaction;
 
@@ -1689,7 +1691,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_budgetary_number ( gint transaction_number,
-						     gint budgetary_number )
+                        gint budgetary_number )
 {
     struct_transaction *transaction;
 
@@ -1727,7 +1729,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_sub_budgetary_number ( gint transaction_number,
-							 gint sub_budgetary_number )
+                        gint sub_budgetary_number )
 {
     struct_transaction *transaction;
 
@@ -1766,7 +1768,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_voucher ( gint transaction_number,
-					    const gchar *voucher )
+                        const gchar *voucher )
 {
     struct_transaction *transaction;
 
@@ -1821,7 +1823,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_bank_references ( gint transaction_number,
-						    const gchar *bank_references )
+                        const gchar *bank_references )
 {
     struct_transaction *transaction;
 
@@ -1872,7 +1874,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_contra_transaction_number ( gint transaction_number,
-							      gint transaction_number_transfer )
+                        gint transaction_number_transfer )
 {
     struct_transaction *transaction;
 
@@ -1945,7 +1947,7 @@
  * \return TRUE if ok
  * */
 gboolean gsb_data_transaction_set_mother_transaction_number ( gint transaction_number,
-							      gint mother_transaction_number )
+                        gint mother_transaction_number )
 {
     struct_transaction *transaction;
 
@@ -1973,7 +1975,7 @@
  * \return the number of the new transaction
  * */
 gint gsb_data_transaction_new_transaction_with_number ( gint no_account,
-							gint transaction_number )
+                        gint transaction_number )
 {
     struct_transaction *transaction;
 
@@ -2085,7 +2087,7 @@
  * \return TRUE if ok, FALSE else
  * */
 gboolean gsb_data_transaction_copy_transaction ( gint source_transaction_number,
-						 gint target_transaction_number )
+                        gint target_transaction_number )
 {
     struct_transaction *source_transaction;
     struct_transaction *target_transaction;
@@ -2332,7 +2334,7 @@
  * \return a GSList of the address/numbers of the children, NULL if no child
  * */
 GSList *gsb_data_transaction_get_children ( gint transaction_number,
-					    gboolean return_number)
+                        gboolean return_number)
 {
     struct_transaction *transaction;
     GSList *children_list = NULL;
@@ -2400,7 +2402,7 @@
  * \return the number of the transaction or 0 if not found
  * */
 gint gsb_data_transaction_find_by_payment_content ( const gchar *string,
-						    gint account_number )
+                        gint account_number )
 {
     GSList *tmp_list;
 
@@ -2508,7 +2510,7 @@
  * \return the number of the transaction if one is found, FALSE if none found, so can use it
  * */
 gint gsb_data_transaction_check_content_payment ( gint payment_number,
-						  gint number )
+                        gint number )
 {
     GSList *tmp_list;
 

Index: main.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- main.c	21 May 2009 09:42:53 -0000	1.144
+++ main.c	21 May 2009 21:58:55 -0000	1.145
@@ -50,6 +50,7 @@
 #include "./erreur.h"
 #include "./parse_cmdline.h"
 #include "./import.h"
+#include "./utils_dates_cunit.h"
 #include "./parse_cmdline.h"
 #include "./gsb_file_config.h"
 #include "./include.h"

Index: gsb_data_transaction.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_transaction.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- gsb_data_transaction.h	18 Feb 2009 20:49:52 -0000	1.28
+++ gsb_data_transaction.h	21 May 2009 21:58:55 -0000	1.29
@@ -19,18 +19,18 @@
 /* START_DECLARATION */
 gboolean gsb_data_transaction_add_archived_to_list ( gint transaction_number );
 gint gsb_data_transaction_check_content_payment ( gint payment_number,
-						  gint number );
+                        gint number );
 gboolean gsb_data_transaction_copy_transaction ( gint source_transaction_number,
-						 gint target_transaction_number );
+                        gint target_transaction_number );
 gint gsb_data_transaction_find_by_id ( gchar *id );
 gint gsb_data_transaction_find_by_payment_content ( const gchar *string,
-						    gint account_number );
+                        gint account_number );
 gint gsb_data_transaction_get_account_number ( gint transaction_number );
 gsb_real gsb_data_transaction_get_adjusted_amount ( gint transaction_number,
-						    gint return_exponent );
+                        gint return_exponent );
 gsb_real gsb_data_transaction_get_adjusted_amount_for_currency ( gint transaction_number,
-								 gint return_currency_number,
-								 gint return_exponent );
+                        gint return_currency_number,
+                        gint return_exponent );
 gsb_real gsb_data_transaction_get_amount ( gint transaction_number );
 gint gsb_data_transaction_get_archive_number ( gint transaction_number );
 gint gsb_data_transaction_get_automatic_transaction ( gint transaction_number );
@@ -39,7 +39,7 @@
 gint gsb_data_transaction_get_category_number ( gint transaction_number );
 gint gsb_data_transaction_get_change_between ( gint transaction_number );
 GSList *gsb_data_transaction_get_children ( gint transaction_number,
-					    gboolean return_number);
+                        gboolean return_number);
 GSList *gsb_data_transaction_get_complete_transactions_list ( void );
 gint gsb_data_transaction_get_contra_transaction_account ( gint transaction_number );
 gint gsb_data_transaction_get_contra_transaction_number ( gint transaction_number );
@@ -69,64 +69,64 @@
 gboolean gsb_data_transaction_init_variables ( void );
 gint gsb_data_transaction_new_transaction ( gint no_account );
 gint gsb_data_transaction_new_transaction_with_number ( gint no_account,
-							gint transaction_number );
+                        gint transaction_number );
 gint gsb_data_transaction_new_white_line ( gint mother_transaction_number);
 gboolean gsb_data_transaction_remove_transaction ( gint transaction_number );
 gboolean gsb_data_transaction_remove_transaction_without_check ( gint transaction_number );
 gboolean gsb_data_transaction_set_account_number ( gint transaction_number,
-						   gint no_account );
+                        gint no_account );
 gboolean gsb_data_transaction_set_amount ( gint transaction_number,
-					   gsb_real amount );
+                        gsb_real amount );
 gboolean gsb_data_transaction_set_archive_number ( gint transaction_number,
-						   gint archive_number );
+                        gint archive_number );
 gboolean gsb_data_transaction_set_automatic_transaction ( gint transaction_number,
-							  gint automatic_transaction );
+                        gint automatic_transaction );
 gboolean gsb_data_transaction_set_bank_references ( gint transaction_number,
-						    const gchar *bank_references );
+                        const gchar *bank_references );
 gboolean gsb_data_transaction_set_budgetary_number ( gint transaction_number,
-						     gint budgetary_number );
+                        gint budgetary_number );
 gboolean gsb_data_transaction_set_category_number ( gint transaction_number,
-						    gint no_category );
+                        gint no_category );
 gboolean gsb_data_transaction_set_change_between ( gint transaction_number,
-						   gint value );
+                        gint value );
 gboolean gsb_data_transaction_set_contra_transaction_number ( gint transaction_number,
-							      gint transaction_number_transfer );
+                        gint transaction_number_transfer );
 gboolean gsb_data_transaction_set_currency_number ( gint transaction_number,
-						    gint no_currency );
+                        gint no_currency );
 gboolean gsb_data_transaction_set_date ( gint transaction_number,
-					 const GDate *date );
+                        const GDate *date );
 gboolean gsb_data_transaction_set_exchange_fees ( gint transaction_number,
-						  gsb_real rate );
+                        gsb_real rate );
 gboolean gsb_data_transaction_set_exchange_rate ( gint transaction_number,
-						  gsb_real rate );
+                        gsb_real rate );
 gboolean gsb_data_transaction_set_financial_year_number ( gint transaction_number,
-							  gint financial_year_number );
+                        gint financial_year_number );
 gboolean gsb_data_transaction_set_marked_transaction ( gint transaction_number,
-						       gint marked_transaction );
+                        gint marked_transaction );
 gboolean gsb_data_transaction_set_method_of_payment_content ( gint transaction_number,
-							      const gchar *method_of_payment_content );
+                        const gchar *method_of_payment_content );
 gboolean gsb_data_transaction_set_method_of_payment_number ( gint transaction_number,
-							     gint number );
+                        gint number );
 gboolean gsb_data_transaction_set_mother_transaction_number ( gint transaction_number,
-							      gint mother_transaction_number );
+                        gint mother_transaction_number );
 gboolean gsb_data_transaction_set_notes ( gint transaction_number,
-					  const gchar *notes );
+                        const gchar *notes );
 gboolean gsb_data_transaction_set_party_number ( gint transaction_number,
-						 gint no_party );
+                        gint no_party );
 gboolean gsb_data_transaction_set_reconcile_number ( gint transaction_number,
-						     gint reconcile_number );
+                        gint reconcile_number );
 gboolean gsb_data_transaction_set_split_of_transaction ( gint transaction_number,
-							     gint is_split );
+                        gint is_split );
 gboolean gsb_data_transaction_set_sub_budgetary_number ( gint transaction_number,
-							 gint sub_budgetary_number );
+                        gint sub_budgetary_number );
 gboolean gsb_data_transaction_set_sub_category_number ( gint transaction_number,
-							gint no_sub_category );
+                        gint no_sub_category );
 gboolean gsb_data_transaction_set_transaction_id ( gint transaction_number,
-						   const gchar *transaction_id );
+                        const gchar *transaction_id );
 gboolean gsb_data_transaction_set_value_date ( gint transaction_number,
-					       const GDate *date );
+                        const GDate *date );
 gboolean gsb_data_transaction_set_voucher ( gint transaction_number,
-					    const gchar *voucher );
+                        const gchar *voucher );
 /* END_DECLARATION */
 
 

Index: utils_dates_cunit.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_dates_cunit.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- utils_dates_cunit.h	21 May 2009 09:42:53 -0000	1.1
+++ utils_dates_cunit.h	21 May 2009 21:58:55 -0000	1.2
@@ -7,7 +7,7 @@
 /* END_INCLUDE_H */
 
 /* START_DECLARATION */
-CU_pSuite utils_dates_cunit_create_suite ( );
+CU_pSuite utils_dates_cunit_create_suite ( void );
 /* END_DECLARATION */
 
 #endif//_UTILS_DATES_CUNIT_H

Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- gsb_data_account.c	19 May 2009 18:24:58 -0000	1.75
+++ gsb_data_account.c	21 May 2009 21:58:55 -0000	1.76
@@ -124,11 +124,10 @@
 static gint gsb_data_account_max_number ( void );
 static gboolean gsb_data_account_set_default_sort_values ( gint account_number );
 static gboolean gsb_data_form_dup_sort_values ( gint origin_account,
-					 gint target_account );
+                        gint target_account );
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GtkWidget *detail_nom_compte;
 extern gsb_real null_real;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
 /*END_EXTERN*/
@@ -522,7 +521,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_nb_rows ( gint account_number,
-					gint nb_rows )
+                        gint nb_rows )
 {
     struct_account *account;
 
@@ -574,7 +573,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_r ( gint account_number,
-				  gboolean show_r )
+                        gboolean show_r )
 {
     struct_account *account;
 
@@ -615,7 +614,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_id ( gint account_number,
-				   const gchar *id )
+                        const gchar *id )
 {
     struct_account *account;
 
@@ -690,7 +689,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_kind ( gint account_number,
-				     kind_account account_kind )
+                        kind_account account_kind )
 {
     struct_account *account;
 
@@ -733,7 +732,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_name ( gint account_number,
-				     const gchar *name )
+                        const gchar *name )
 {
     struct_account *account;
 
@@ -797,7 +796,7 @@
  * \return balance or NULL if the account doesn't exist
  * */
 gsb_real gsb_data_account_get_init_balance ( gint account_number,
-					     gint floating_point )
+                        gint floating_point )
 {
     struct_account *account;
 
@@ -866,7 +865,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_mini_balance_wanted ( gint account_number,
-						    gsb_real balance )
+                        gsb_real balance )
 {
     struct_account *account;
 
@@ -909,7 +908,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_mini_balance_authorized ( gint account_number,
-							gsb_real balance )
+                        gsb_real balance )
 {
     struct_account *account;
 
@@ -1113,7 +1112,7 @@
  * \return  the element_number used to sort or 0 if the account doesn't exist
  * */
 gint gsb_data_account_get_element_sort ( gint account_number,
-					 gint no_column )
+                        gint no_column )
 {
     struct_account *account;
 
@@ -1148,8 +1147,8 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_element_sort ( gint account_number,
-					     gint no_column,
-					     gint element_number )
+                        gint no_column,
+                        gint element_number )
 {
     struct_account *account;
 
@@ -1253,7 +1252,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_mini_balance_wanted_message ( gint account_number,
-							    gboolean value )
+                        gboolean value )
 {
     struct_account *account;
 
@@ -1294,7 +1293,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_mini_balance_authorized_message ( gint account_number,
-								gboolean value )
+                        gboolean value )
 {
     struct_account *account;
 
@@ -1335,7 +1334,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_currency ( gint account_number,
-					 gint currency )
+                        gint currency )
 {
     struct_account *account;
 
@@ -1373,7 +1372,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_bank ( gint account_number,
-				     gint bank )
+                        gint bank )
 {
     struct_account *account;
 
@@ -1415,7 +1414,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_bank_branch_code ( gint account_number,
-						 const gchar *bank_branch_code )
+                        const gchar *bank_branch_code )
 {
     struct_account *account;
 
@@ -1463,7 +1462,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_bank_account_number ( gint account_number,
-						    const gchar *bank_account_number )
+                        const gchar *bank_account_number )
 {
     struct_account *account;
 
@@ -1512,7 +1511,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_bank_account_key ( gint account_number,
-						 const gchar *bank_account_key )
+                        const gchar *bank_account_key )
 {
     struct_account *account;
 
@@ -1556,7 +1555,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_closed_account ( gint account_number,
-					       gint closed_account )
+                        gint closed_account )
 {
     struct_account *account;
 
@@ -1598,7 +1597,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_comment ( gint account_number,
-					const gchar *comment )
+                        const gchar *comment )
 {
     struct_account *account;
 
@@ -1647,7 +1646,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_reconcile_sort_type ( gint account_number,
-						    gint sort_type )
+                        gint sort_type )
 {
     struct_account *account;
 
@@ -1694,7 +1693,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_sort_list ( gint account_number,
-					  GSList *list )
+                        GSList *list )
 {
     struct_account *account;
 
@@ -1718,7 +1717,7 @@
  * \return TRUE ok, FALSE problem
  * */
 gboolean gsb_data_account_sort_list_add ( gint account_number,
-					  gint payment_number )
+                        gint payment_number )
 {
     struct_account *account;
 
@@ -1742,7 +1741,7 @@
  * \return TRUE ok, FALSE problem
  * */
 gboolean gsb_data_account_sort_list_remove ( gint account_number,
-					     gint payment_number )
+                        gint payment_number )
 {
     struct_account *account;
 
@@ -1810,7 +1809,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_split_neutral_payment ( gint account_number,
-						      gint split_neutral_payment )
+                        gint split_neutral_payment )
 {
     struct_account *account;
 
@@ -1855,7 +1854,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_holder_name ( gint account_number,
-					    const gchar *holder_name )
+                        const gchar *holder_name )
 {
     struct_account *account;
 
@@ -1903,7 +1902,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_holder_address ( gint account_number,
-					       const gchar *holder_address )
+                        const gchar *holder_address )
 {
     struct_account *account;
 
@@ -1954,7 +1953,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_default_debit ( gint account_number,
-					      gint default_debit )
+                        gint default_debit )
 {
     struct_account *account;
 
@@ -1999,7 +1998,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_default_credit ( gint account_number,
-					       gint default_credit )
+                        gint default_credit )
 {
     struct_account *account;
 
@@ -2045,7 +2044,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_row_align ( gint account_number,
-					  gfloat row_align )
+                        gfloat row_align )
 {
     struct_account *account;
 
@@ -2090,7 +2089,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_sort_type ( gint account_number,
-					  gint sort_type )
+                        gint sort_type )
 {
     struct_account *account;
 
@@ -2137,7 +2136,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_sort_column ( gint account_number,
-					    gint sort_column )
+                        gint sort_column )
 {
     struct_account *account;
 
@@ -2182,7 +2181,7 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_form_organization ( gint account_number,
-						  gpointer form_organization )
+                        gpointer form_organization )
 {
     struct_account *account;
 
@@ -2258,7 +2257,7 @@
  * \return -1 if account_number_1 before, account_number_2, and +1 else, 0 if one of account doesn't exist
  * */
 gint gsb_data_account_compare_position ( gint account_number_1,
-					 gint account_number_2 )
+                        gint account_number_2 )
 {
     gint pos_1, pos_2;
     struct_account *account_1;
@@ -2290,7 +2289,7 @@
  * \return FALSE
  * */
 gboolean gsb_data_account_move_account ( gint account_number,
-					 gint dest_account_number )
+                        gint dest_account_number )
 {
     struct_account *account;
 
@@ -2379,7 +2378,7 @@
  * \return TRUE ok, FALSE problem
  * */
 gboolean gsb_data_form_dup_sort_values ( gint origin_account,
-					 gint target_account )
+                        gint target_account )
 {
     gint j;
     struct_account *origin_account_ptr;
@@ -2432,22 +2431,22 @@
  * \return TRUE, ok ; FALSE, problem
  * */
 gboolean gsb_data_account_set_name_icon ( gint account_number,
-					       const gchar *filename )
+                        const gchar *filename )
 {
     struct_account *account;
 
     account = gsb_data_account_get_structure ( account_number );
 
     if (!account )
-	return FALSE;
+    return FALSE;
 
     if ( account -> name_icon )
         g_free ( account -> name_icon );
 
     if (!filename || !strlen (filename))
-	account -> name_icon = NULL;
+    account -> name_icon = NULL;
     else
-	account -> name_icon = my_strdup (filename);
+    account -> name_icon = my_strdup (filename);
 
     return TRUE;
 }
@@ -2562,19 +2561,14 @@
 void gsb_data_account_change_account_icon ( GtkWidget *button, gpointer data )
 {
     GdkPixbuf * pixbuf;
-    GtkWidget *image, *bouton;
+    GtkWidget *image;
     gchar * name_icon;
     gchar * new_icon;
     gint current_account;
 
     devel_debug ( NULL );
 
-    if ( GTK_IS_BUTTON (button) == FALSE )
-        bouton = g_object_get_data ( G_OBJECT ( detail_nom_compte), "ac_icon_button" );
-    else
-        bouton = button;
-
-    image = gtk_button_get_image ( GTK_BUTTON ( bouton ) );
+    image = gtk_button_get_image ( GTK_BUTTON ( button ) );
     pixbuf = gtk_image_get_pixbuf ( GTK_IMAGE ( image ) );
     if ( pixbuf )
         name_icon = g_object_get_data ( G_OBJECT ( pixbuf ), "name_icon" );
@@ -2587,7 +2581,7 @@
         current_account = gsb_gui_navigation_get_current_account ();
         gsb_data_account_set_name_icon ( current_account, new_icon );
         image = gsb_data_account_get_account_icon_image ( current_account );
-        gtk_button_set_image ( GTK_BUTTON ( bouton ), image );
+        gtk_button_set_image ( GTK_BUTTON ( button ), image );
         gsb_gui_navigation_update_account ( current_account );
     }
 }

Index: utils_dates_cunit.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_dates_cunit.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- utils_dates_cunit.c	21 May 2009 09:42:53 -0000	1.1
+++ utils_dates_cunit.c	21 May 2009 21:58:55 -0000	1.2
@@ -2,10 +2,10 @@
 /*                                                                            */
 /*                                  utils_dates_cunit                         */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	          */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	                      */
+/*     Copyright (C)    2000-2007 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2008 Benjamin Drieu (bdrieu at april.org)	                      */
 /*                      2009 Mickaël Remars (grisbi at remars.com)               */
-/* 			http://www.grisbi.org				                              */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -32,10 +32,13 @@
 
 /* START_INCLUDE */
 #include "utils_dates_cunit.h"
-#include "utils_dates.h"
+#include "./utils_dates.h"
 /* END_INCLUDE */
 
 /* START_STATIC */
+static void utils_dates_cunit__gsb_parse_date_string ( void );
+static int utils_dates_cunit_clean_suite ( void );
+static int utils_dates_cunit_init_suite ( void );
 /* END_STATIC */
 
 /* START_EXTERN */
@@ -44,7 +47,7 @@
 /* The suite initialization function.
  * Returns zero on success, non-zero otherwise.
  */
-int utils_dates_cunit_init_suite(void)
+int utils_dates_cunit_init_suite ( void )
 {
     return 0;
 }
@@ -57,7 +60,7 @@
     return 0;
 }
 
-void utils_dates_cunit__gsb_parse_date_string(void)
+void utils_dates_cunit__gsb_parse_date_string ( void )
 {
     GDate *date = NULL;
     // invalid day
@@ -112,7 +115,7 @@
     CU_ASSERT_EQUAL(G_DATE_BAD_DAY, g_date_get_day(date));
 }
 
-CU_pSuite utils_dates_cunit_create_suite(void)
+CU_pSuite utils_dates_cunit_create_suite ( void )
 {
     CU_pSuite pSuite = CU_add_suite("utils_dates",
                                     utils_dates_cunit_init_suite,

Index: gsb_data_account.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- gsb_data_account.h	19 May 2009 18:24:58 -0000	1.34
+++ gsb_data_account.h	21 May 2009 21:58:55 -0000	1.35
@@ -26,7 +26,7 @@
 void gsb_data_account_change_account_icon ( GtkWidget *button, gpointer data );
 void gsb_data_account_colorize_current_balance ( gint account_number );
 gint gsb_data_account_compare_position ( gint account_number_1,
-					 gint account_number_2 );
+                        gint account_number_2 );
 gboolean gsb_data_account_delete ( gint account_number );
 gint gsb_data_account_first_number ( void );
 gint gsb_data_account_get_account_by_id ( const gchar *account_id );
@@ -47,13 +47,13 @@
 gint gsb_data_account_get_default_credit ( gint account_number );
 gint gsb_data_account_get_default_debit ( gint account_number );
 gint gsb_data_account_get_element_sort ( gint account_number,
-					 gint no_column );
+                        gint no_column );
 gpointer gsb_data_account_get_form_organization ( gint account_number );
 gchar *gsb_data_account_get_holder_address ( gint account_number );
 gchar *gsb_data_account_get_holder_name ( gint account_number );
 gchar *gsb_data_account_get_id ( gint account_number );
 gsb_real gsb_data_account_get_init_balance ( gint account_number,
-					     gint floating_point );
+                        gint floating_point );
 kind_account gsb_data_account_get_kind ( gint account_number );
 GSList *gsb_data_account_get_list_accounts ( void );
 gsb_real gsb_data_account_get_marked_balance ( gint account_number );
@@ -76,81 +76,81 @@
 gint gsb_data_account_get_split_neutral_payment ( gint account_number );
 gboolean gsb_data_account_init_variables ( void );
 gboolean gsb_data_account_move_account ( gint account_number,
-					 gint dest_account_number );
+                        gint dest_account_number );
 gint gsb_data_account_new ( kind_account account_kind );
 gboolean gsb_data_account_reorder ( GSList *new_order );
 gint gsb_data_account_set_account_number ( gint account_number,
 					   gint new_no );
 gboolean gsb_data_account_set_balances_are_dirty ( gint account_number );
 gboolean gsb_data_account_set_bank ( gint account_number,
-				     gint bank );
+                        gint bank );
 gboolean gsb_data_account_set_bank_account_iban ( gint account_number, const gchar *iban );
 gboolean gsb_data_account_set_bank_account_key ( gint account_number,
-						 const gchar *bank_account_key );
+                        const gchar *bank_account_key );
 gboolean gsb_data_account_set_bank_account_number ( gint account_number,
-						    const gchar *bank_account_number );
+                        const gchar *bank_account_number );
 gboolean gsb_data_account_set_bank_branch_code ( gint account_number,
-						 const gchar *bank_branch_code );
+                        const gchar *bank_branch_code );
 gboolean gsb_data_account_set_closed_account ( gint account_number,
-					       gint closed_account );
+                        gint closed_account );
 gboolean gsb_data_account_set_comment ( gint account_number,
-					const gchar *comment );
+                        const gchar *comment );
 gboolean gsb_data_account_set_currency ( gint account_number,
-					 gint currency );
+                        gint currency );
 gboolean gsb_data_account_set_current_transaction_number ( gint account_number,
 							   gint transaction_number );
 gboolean gsb_data_account_set_default_credit ( gint account_number,
-					       gint default_credit );
+                        gint default_credit );
 gboolean gsb_data_account_set_default_debit ( gint account_number,
-					      gint default_debit );
+                        gint default_debit );
 gboolean gsb_data_account_set_element_sort ( gint account_number,
-					     gint no_column,
-					     gint element_number );
+                        gint no_column,
+                        gint element_number );
 gboolean gsb_data_account_set_form_organization ( gint account_number,
-						  gpointer form_organization );
+                        gpointer form_organization );
 gboolean gsb_data_account_set_holder_address ( gint account_number,
-					       const gchar *holder_address );
+                        const gchar *holder_address );
 gboolean gsb_data_account_set_holder_name ( gint account_number,
-					    const gchar *holder_name );
+                        const gchar *holder_name );
 gboolean gsb_data_account_set_id ( gint account_number,
-				   const gchar *id );
+                        const gchar *id );
 gboolean gsb_data_account_set_init_balance ( gint account_number,
 					     gsb_real balance );
 gboolean gsb_data_account_set_kind ( gint account_number,
-				     kind_account account_kind );
+                        kind_account account_kind );
 gboolean gsb_data_account_set_mini_balance_authorized ( gint account_number,
-							gsb_real balance );
+                        gsb_real balance );
 gboolean gsb_data_account_set_mini_balance_authorized_message ( gint account_number,
-								gboolean value );
+                        gboolean value );
 gboolean gsb_data_account_set_mini_balance_wanted ( gint account_number,
-						    gsb_real balance );
+                        gsb_real balance );
 gboolean gsb_data_account_set_mini_balance_wanted_message ( gint account_number,
-							    gboolean value );
+                        gboolean value );
 gboolean gsb_data_account_set_name ( gint account_number,
-				     const gchar *name );
+                        const gchar *name );
 gboolean gsb_data_account_set_name_icon ( gint account_number,
-					       const gchar *filename );
+                        const gchar *filename );
 gboolean gsb_data_account_set_nb_rows ( gint account_number,
-					gint nb_rows );
+                        gint nb_rows );
 gboolean gsb_data_account_set_r ( gint account_number,
-				  gboolean show_r );
+                        gboolean show_r );
 gboolean gsb_data_account_set_reconcile_sort_type ( gint account_number,
-						    gint sort_type );
+                        gint sort_type );
 gboolean gsb_data_account_set_row_align ( gint account_number,
-					  gfloat row_align );
+                        gfloat row_align );
 gboolean gsb_data_account_set_sort_column ( gint account_number,
-					    gint sort_column );
+                        gint sort_column );
 gboolean gsb_data_account_set_sort_list ( gint account_number,
-					  GSList *list );
+                        GSList *list );
 gboolean gsb_data_account_set_sort_type ( gint account_number,
-					  gint sort_type );
+                        gint sort_type );
 gboolean gsb_data_account_set_split_neutral_payment ( gint account_number,
-						      gint split_neutral_payment );
+                        gint split_neutral_payment );
 gboolean gsb_data_account_sort_list_add ( gint account_number,
-					  gint payment_number );
+                        gint payment_number );
 gboolean gsb_data_account_sort_list_free ( gint account_number );
 gboolean gsb_data_account_sort_list_remove ( gint account_number,
-					     gint payment_number );
+                        gint payment_number );
 /* END_DECLARATION */
 
 

Index: gsb_real.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- gsb_real.h	21 May 2009 09:04:48 -0000	1.18
+++ gsb_real.h	21 May 2009 21:58:55 -0000	1.19
@@ -21,16 +21,11 @@
                         gsb_real number_2 );
 gsb_real gsb_real_adjust_exponent ( gsb_real number,
                         gint return_exponent );
-gboolean gsb_real_normalize ( gsb_real *number_1,
-                        gsb_real *number_2 );
 gint gsb_real_cmp ( gsb_real number_1,
                         gsb_real number_2 );
 gsb_real gsb_real_div ( gsb_real number_1,
                         gsb_real number_2 );
 gsb_real gsb_real_double_to_real ( gdouble number );
-gsb_real gsb_real_raw_get_from_string ( const gchar *string,
-                                        const gchar *mon_thousands_sep,
-                                        const gchar *mon_decimal_point );
 gsb_real gsb_real_get_from_string ( const gchar *string );
 gchar *gsb_real_get_string ( gsb_real number );
 gchar *gsb_real_get_string_with_currency ( gsb_real number,
@@ -39,10 +34,14 @@
 gsb_real gsb_real_mul ( gsb_real number_1,
                         gsb_real number_2 );
 gsb_real gsb_real_new ( gint mantissa, gint exponent );
+gboolean gsb_real_normalize ( gsb_real *a, gsb_real *b );
 gsb_real gsb_real_opposite ( gsb_real number );
 gchar *gsb_real_raw_format_string (gsb_real number,
                         struct lconv *conv,
                         const gchar *currency_symbol );
+gsb_real gsb_real_raw_get_from_string ( const gchar *string,
+                                        const gchar *mon_thousands_sep,
+                                        const gchar *mon_decimal_point );
 gsb_real gsb_real_sub ( gsb_real number_1,
                         gsb_real number_2 );
 /* END_DECLARATION */

Index: gsb_assistant_archive.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_archive.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- gsb_assistant_archive.c	8 May 2009 17:21:15 -0000	1.32
+++ gsb_assistant_archive.c	21 May 2009 21:58:55 -0000	1.33
@@ -1,8 +1,9 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2007 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2008 Benjamin Drieu (bdrieu at april.org)                       */
+/*                      2008-2009 Pierre Biava (grisbi at pierre.biava.name)     */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -34,12 +35,14 @@
 #include "./gsb_assistant.h"
 #include "./gsb_calendar_entry.h"
 #include "./gsb_data_archive.h"
+#include "./gsb_data_archive_store.h"
 #include "./gsb_data_fyear.h"
 #include "./gsb_data_report.h"
 #include "./gsb_data_transaction.h"
 #include "./utils_dates.h"
 #include "./gsb_fyear.h"
 #include "./gsb_report.h"
+#include "./gsb_transactions_list.h"
 #include "./traitement_variables.h"
 #include "./utils_str.h"
 #include "./etats_calculs.h"
@@ -56,13 +59,13 @@
 static  GtkWidget *gsb_assistant_archive_page_menu ( GtkWidget *assistant );
 static  GtkWidget *gsb_assistant_archive_page_success ( void );
 static  gboolean gsb_assistant_archive_switch_to_archive_name ( GtkWidget *assistant,
-							       gint new_page );
+                        gint new_page );
 static  gboolean gsb_assistant_archive_switch_to_intro ( GtkWidget *assistant,
-							gint new_page );
+                        gint new_page );
 static  gboolean gsb_assistant_archive_switch_to_menu ( GtkWidget *assistant,
-						       gint new_page );
+                        gint new_page );
 static  gboolean gsb_assistant_archive_switch_to_succes ( GtkWidget *assistant,
-							 gint new_page );
+                        gint new_page );
 static  gboolean gsb_assistant_archive_update_labels ( GtkWidget *assistant );
 /*END_STATIC*/
 
@@ -558,7 +561,7 @@
  * \return FALSE
  * */
 static gboolean gsb_assistant_archive_switch_to_intro ( GtkWidget *assistant,
-							gint new_page )
+                        gint new_page )
 {
     /* enter into the intro page */
     gsb_assistant_change_button_next ( assistant,
@@ -579,7 +582,7 @@
  * \return FALSE
  * */
 static gboolean gsb_assistant_archive_switch_to_menu ( GtkWidget *assistant,
-						       gint new_page )
+                        gint new_page )
 {
     GSList *tmp_list;
     const GDate *date = NULL;
@@ -587,7 +590,7 @@
     /* enter into the menu page */
     gtk_label_set_text ( GTK_LABEL (label_archived), NULL );
     gsb_assistant_change_button_next ( assistant,
-				       GTK_STOCK_GO_FORWARD, GTK_RESPONSE_YES );
+                        GTK_STOCK_GO_FORWARD, GTK_RESPONSE_YES );
     gsb_assistant_archive_update_labels ( assistant );
 
     /* set the initial date to the first transaction in grisbi */
@@ -629,41 +632,41 @@
  * \return FALSE
  * */
 static gboolean gsb_assistant_archive_switch_to_archive_name ( GtkWidget *assistant,
-							       gint new_page )
+                        gint new_page )
 {
     gchar * string = NULL;
 
     gsb_assistant_change_button_next ( assistant,
-				       GTK_STOCK_APPLY, GTK_RESPONSE_YES );
+                    GTK_STOCK_APPLY, GTK_RESPONSE_YES );
 
     if ( GTK_WIDGET_IS_SENSITIVE (initial_date) )
     {
-	gchar * sdate, * fdate;
-	sdate = gsb_format_gdate ( gsb_calendar_entry_get_date (initial_date));
-	fdate = gsb_format_gdate (gsb_calendar_entry_get_date (final_date));
-	string = g_strdup_printf ( _("Archive from %s to %s"), sdate, fdate );
-	g_free ( sdate );
-	g_free ( fdate );
+    gchar * sdate, * fdate;
+    sdate = gsb_format_gdate ( gsb_calendar_entry_get_date (initial_date));
+    fdate = gsb_format_gdate (gsb_calendar_entry_get_date (final_date));
+    string = g_strdup_printf ( _("Archive from %s to %s"), sdate, fdate );
+    g_free ( sdate );
+    g_free ( fdate );
     }
     else if ( GTK_WIDGET_IS_SENSITIVE (financial_year_button) )
     {
-	gint fyear;
-	fyear = gsb_fyear_get_fyear_from_combobox ( financial_year_button, NULL );
-	string = g_strdup_printf ( _("Archive of financial year %s"), 
-				   gsb_data_fyear_get_name ( fyear ) );
+    gint fyear;
+    fyear = gsb_fyear_get_fyear_from_combobox ( financial_year_button, NULL );
+    string = g_strdup_printf ( _("Archive of financial year %s"), 
+                        gsb_data_fyear_get_name ( fyear ) );
     }
     else if ( GTK_WIDGET_IS_SENSITIVE (report_button) )
     {
-	gint report_number;
-	report_number = gsb_report_get_report_from_combobox (report_button);
-	string = g_strdup_printf ( _("Archive of report %s"), 
-				   gsb_data_report_get_report_name ( report_number ) );
+    gint report_number;
+    report_number = gsb_report_get_report_from_combobox (report_button);
+    string = g_strdup_printf ( _("Archive of report %s"), 
+                        gsb_data_report_get_report_name ( report_number ) );
     }
 
     if ( string )
     {
-	gtk_entry_set_text ( GTK_ENTRY ( name_entry ), string );
-	g_free ( string );
+    gtk_entry_set_text ( GTK_ENTRY ( name_entry ), string );
+    g_free ( string );
     }
 
     gsb_assistant_sensitive_button_next ( assistant, TRUE );
@@ -683,7 +686,7 @@
  * \return FALSE
  * */
 static gboolean gsb_assistant_archive_switch_to_succes ( GtkWidget *assistant,
-							 gint new_page )
+                        gint new_page )
 {
     /* if we come here, we are sure that :
      * there is a own name to the archive
@@ -699,76 +702,79 @@
      * with no transactions related. */
     if (!list_transaction_to_archive)
     {
-	gtk_widget_hide (vbox_congratulation);
-	gtk_widget_show (vbox_failed);
-	gsb_assistant_sensitive_button_prev ( assistant, TRUE );
-	gsb_assistant_sensitive_button_next ( assistant, FALSE );
-	return FALSE;
+    gtk_widget_hide (vbox_congratulation);
+    gtk_widget_show (vbox_failed);
+    gsb_assistant_sensitive_button_prev ( assistant, TRUE );
+    gsb_assistant_sensitive_button_next ( assistant, FALSE );
+    return FALSE;
     }
 
     /* first, create the archive */
     archive_number = gsb_data_archive_new (gtk_entry_get_text (GTK_ENTRY (name_entry)));
     if (!archive_number)
     {
-	gtk_widget_hide (vbox_congratulation);
-	gtk_widget_show (vbox_failed);
-	return FALSE;
+    gtk_widget_hide (vbox_congratulation);
+    gtk_widget_show (vbox_failed);
+    return FALSE;
     }
 
     gsb_assistant_change_button_next ( assistant,
-				       GTK_STOCK_CLOSE, GTK_RESPONSE_APPLY );
+                        GTK_STOCK_CLOSE, GTK_RESPONSE_APPLY );
 
     /* fill the archive */
     if (GTK_WIDGET_IS_SENSITIVE (initial_date))
     {
-	GDate *init_gdate;
-	GDate *final_gdate;
-	init_gdate = gsb_calendar_entry_get_date (initial_date);
-	final_gdate = gsb_calendar_entry_get_date (final_date);
+    GDate *init_gdate;
+    GDate *final_gdate;
+    init_gdate = gsb_calendar_entry_get_date (initial_date);
+    final_gdate = gsb_calendar_entry_get_date (final_date);
 
-	gsb_data_archive_set_beginning_date ( archive_number,
-					     init_gdate );
-	gsb_data_archive_set_end_date ( archive_number,
-					final_gdate );
-	g_date_free (init_gdate);
-	g_date_free (final_gdate);
+    gsb_data_archive_set_beginning_date ( archive_number, init_gdate );
+    gsb_data_archive_set_end_date ( archive_number, final_gdate );
+    g_date_free (init_gdate);
+    g_date_free (final_gdate);
     }
     if (GTK_WIDGET_IS_SENSITIVE (financial_year_button))
-	gsb_data_archive_set_fyear ( archive_number,
-				     gsb_fyear_get_fyear_from_combobox (financial_year_button,NULL));
+    gsb_data_archive_set_fyear ( archive_number,
+                        gsb_fyear_get_fyear_from_combobox (financial_year_button,NULL));
 
     if (GTK_WIDGET_IS_SENSITIVE (report_button))
     {
-	gint report_number;
+    gint report_number;
 
-	report_number = gsb_report_get_report_from_combobox (report_button);
+    report_number = gsb_report_get_report_from_combobox (report_button);
 
-	gsb_data_archive_set_report_title ( archive_number,
-					    etats_titre (report_number));
+    gsb_data_archive_set_report_title ( archive_number,
+                        etats_titre (report_number));
     }
 
     /* mark the transactions as archived */
     tmp_list = list_transaction_to_archive;
     while (tmp_list)
     {
-	gint transaction_number;
+    gint transaction_number;
 
-	transaction_number = gsb_data_transaction_get_transaction_number (tmp_list -> data);
-	gsb_data_transaction_set_archive_number ( transaction_number,
-						  archive_number );
-	tmp_list = tmp_list -> next;
+    transaction_number = gsb_data_transaction_get_transaction_number (tmp_list -> data);
+    gsb_data_transaction_set_archive_number ( transaction_number, archive_number );
+    tmp_list = tmp_list -> next;
     }
 
+    /* on recrée la liste des archives par compte */
+    gsb_data_archive_store_init_variables ();
+    gsb_data_archive_store_create_list ( );
+    gsb_transactions_list_fill_archive_store ( );
+
     /* set the message */
-    string = g_strdup_printf ( _("Archive '%s' was successfully created and %d transactions out of %d were archived.\n\n"),
-			       gsb_data_archive_get_name (archive_number),
-			       g_slist_length (list_transaction_to_archive),
-			       g_slist_length (list_transaction_to_archive) +
-			       g_slist_length (gsb_data_transaction_get_transactions_list ()));
+    string = g_strdup_printf ( _("Archive '%s' was successfully created and %d transactions "
+                                 "out of %d were archived.\n\n"),
+                        gsb_data_archive_get_name (archive_number),
+                        g_slist_length (list_transaction_to_archive),
+                        g_slist_length (list_transaction_to_archive) +
+                        g_slist_length (gsb_data_transaction_get_transactions_list ()));
 
     buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (congratulations_view));
     gtk_text_buffer_get_iter_at_mark ( buffer, &iter, 
-				       gtk_text_buffer_get_mark ( buffer, "status" ) );
+                        gtk_text_buffer_get_mark ( buffer, "status" ) );
     gtk_text_buffer_insert ( buffer, &iter, string, strlen(string) );
 
     g_free (string);
@@ -781,18 +787,13 @@
     list_transaction_to_archive = NULL;
 
     /* erase all the previous entries */
-    gtk_entry_set_text ( GTK_ENTRY (name_entry),
-			 "" );
-    gtk_entry_set_text ( GTK_ENTRY (initial_date),
-			 "" );
-    gtk_entry_set_text ( GTK_ENTRY (final_date),
-			 "" );
+    gtk_entry_set_text ( GTK_ENTRY (name_entry), "" );
+    gtk_entry_set_text ( GTK_ENTRY (initial_date), "" );
+    gtk_entry_set_text ( GTK_ENTRY (final_date), "" );
 
     /* propose to go in one or another way */
-    gsb_assistant_sensitive_button_prev ( assistant,
-					  TRUE );
-    gsb_assistant_sensitive_button_next ( assistant,
-					  TRUE );
+    gsb_assistant_sensitive_button_prev ( assistant, TRUE );
+    gsb_assistant_sensitive_button_next ( assistant, TRUE );
 
     if ( etat.modification_fichier == 0 )
         modification_fichier ( TRUE );
@@ -819,83 +820,82 @@
     
     /* erase the last list of transactions to archive */
     if (gtk_notebook_get_current_page (GTK_NOTEBOOK(notebook)) == ARCHIVE_ASSISTANT_MENU
-	&&
-	list_transaction_to_archive)
+    &&
+    list_transaction_to_archive)
     {
-	g_slist_free (list_transaction_to_archive);
-	list_transaction_to_archive = NULL;
+    g_slist_free (list_transaction_to_archive);
+    list_transaction_to_archive = NULL;
     }
 
     /* ok for now the choice is on initial/final date */
     if ( gtk_notebook_get_current_page (GTK_NOTEBOOK(notebook)) == ARCHIVE_ASSISTANT_MENU &&
-	 GTK_WIDGET_IS_SENSITIVE (initial_date))
+    GTK_WIDGET_IS_SENSITIVE (initial_date))
     {
-	GDate *init_gdate;
-	GDate *final_gdate;
-	init_gdate = gsb_calendar_entry_get_date (initial_date);
-	final_gdate = gsb_calendar_entry_get_date (final_date);
-	string = NULL;
+    GDate *init_gdate;
+    GDate *final_gdate;
+    init_gdate = gsb_calendar_entry_get_date (initial_date);
+    final_gdate = gsb_calendar_entry_get_date (final_date);
+    string = NULL;
 
-	if (!strlen ( gtk_entry_get_text (GTK_ENTRY (initial_date))))
-	    string = my_strdup (_("<span foreground=\"red\">Please fill the initial date</span>"));
-	if (!string
-	    &&
-	    !strlen ( gtk_entry_get_text (GTK_ENTRY (final_date))))
-	    string = my_strdup (_("<span foreground=\"red\">Please fill the final date</span>"));
-	if ( !string
-	     &&
-	     init_gdate
-	     &&
-	     final_gdate
-	     &&
-	     g_date_compare (init_gdate, final_gdate) > 0 )
-	    string = my_strdup (_("<span foreground=\"red\">The initial date is after the final date</span>"));
-	if ( !string
-	     &&
-	     !init_gdate)
-	    string = my_strdup (_("<span foreground=\"red\">The initial date is not valid.</span>"));
-	if ( !string
-	     &&
-	     !final_gdate)
-	    string = my_strdup (_("<span foreground=\"red\">The final date is not valid</span>"));
-	if ( !string
-	     &&
-	     gsb_data_archive_get_from_date (init_gdate))
-	    string = my_strdup (_("<span foreground=\"red\">The initial date belongs already to an archive.</span>"));
-	if ( !string
-	     &&
-	     gsb_data_archive_get_from_date (final_gdate))
-	    string = my_strdup (_("<span foreground=\"red\">The final date belongs already to an archive.</span>"));
+    if (!strlen ( gtk_entry_get_text (GTK_ENTRY (initial_date))))
+        string = my_strdup (_("<span foreground=\"red\">Please fill the initial date</span>"));
+    if (!string
+        &&
+        !strlen ( gtk_entry_get_text (GTK_ENTRY (final_date))))
+        string = my_strdup (_("<span foreground=\"red\">Please fill the final date</span>"));
+    if ( !string
+         &&
+         init_gdate
+         &&
+         final_gdate
+         &&
+         g_date_compare (init_gdate, final_gdate) > 0 )
+        string = my_strdup (_("<span foreground=\"red\">The initial date is after the final date</span>"));
+    if ( !string
+         &&
+         !init_gdate)
+        string = my_strdup (_("<span foreground=\"red\">The initial date is not valid.</span>"));
+    if ( !string
+         &&
+         !final_gdate )
+        string = my_strdup (_("<span foreground=\"red\">The final date is not valid</span>"));
+    if ( !string
+         &&
+         gsb_data_archive_get_from_date (init_gdate) )
+        string = my_strdup (_("<span foreground=\"red\">The initial date belongs already to an archive.</span>"));
+    if ( !string
+         &&
+         gsb_data_archive_get_from_date (final_gdate) )
+        string = my_strdup (_("<span foreground=\"red\">The final date belongs already to an archive.</span>"));
 
-	if (string)
-	{
-	    gtk_label_set_markup ( GTK_LABEL (label_archived),
-				   string );
-	    g_free (string);
-	    gsb_assistant_sensitive_button_next ( assistant, FALSE );
-	    return FALSE;
-	}
+    if (string)
+    {
+        gtk_label_set_markup ( GTK_LABEL (label_archived), string );
+        g_free (string);
+        gsb_assistant_sensitive_button_next ( assistant, FALSE );
+        return FALSE;
+    }
 
-	/* the dates are ok */
-	tmp_list = gsb_data_transaction_get_transactions_list ();
-	while (tmp_list)
-	{
-	    gint transaction_number;
-	    transaction_number = gsb_data_transaction_get_transaction_number (tmp_list -> data);
+    /* the dates are ok */
+    tmp_list = gsb_data_transaction_get_transactions_list ();
+    while (tmp_list)
+    {
+        gint transaction_number;
+        transaction_number = gsb_data_transaction_get_transaction_number (tmp_list -> data);
 
-	    if ( g_date_compare ( init_gdate,
-				  gsb_data_transaction_get_date (transaction_number)) <= 0
-		 &&
-		 g_date_compare ( final_gdate,
-				  gsb_data_transaction_get_date (transaction_number)) >= 0 )
-		/* the transaction is into the dates, we append its address to the list to archive
-		 * we could use gsb_assistant_archive_add_transaction_to_list but it's a lost of time
-		 * because all the linked transactions will be taken because we work with dates,
-		 * so don't use that function and add the transaction directly */
-		list_transaction_to_archive = g_slist_append ( list_transaction_to_archive,
-							       tmp_list -> data );
-	    tmp_list = tmp_list -> next;
-	}
+        if ( g_date_compare ( init_gdate,
+                        gsb_data_transaction_get_date (transaction_number)) <= 0
+         &&
+         g_date_compare ( final_gdate,
+                        gsb_data_transaction_get_date (transaction_number)) >= 0 )
+        /* the transaction is into the dates, we append its address to the list to archive
+         * we could use gsb_assistant_archive_add_transaction_to_list but it's a lost of time
+         * because all the linked transactions will be taken because we work with dates,
+         * so don't use that function and add the transaction directly */
+        list_transaction_to_archive = g_slist_append ( list_transaction_to_archive,
+                        tmp_list -> data );
+        tmp_list = tmp_list -> next;
+    }
     }
 
     /* ok for now the choice is on fyear */
@@ -1018,9 +1018,9 @@
 /**
  * add a transaction (in fact is pointer) to the list of transactions wich will be archived
  * add too all the linked transactions with it
- * 	ie : 	the contra-transfer if exists
- * 		if child, the mother and the other children
- * 		if split, the children
+ *  ie :    the contra-transfer if exists
+ *      if child, the mother and the other children
+ *      if split, the children
  *
  * prevent multiple entry of the transaction, so can just call that function,
  * 	the same transaction won't be added several times
@@ -1034,16 +1034,16 @@
 {
     gint transaction_number;
 
-    if (!transaction_pointer
-	||
-	!(transaction_number = gsb_data_transaction_get_transaction_number (transaction_pointer)))
-	return;
+    if ( !transaction_pointer
+     ||
+     !(transaction_number = gsb_data_transaction_get_transaction_number (transaction_pointer)) )
+    return;
 
     /* add the transaction itself */
-    if (!g_slist_find ( list_transaction_to_archive,
-			transaction_pointer ))
-	list_transaction_to_archive = g_slist_append ( list_transaction_to_archive,
-						       transaction_pointer );
+    if ( !g_slist_find ( list_transaction_to_archive,
+                        transaction_pointer ) )
+    list_transaction_to_archive = g_slist_append ( list_transaction_to_archive,
+                        transaction_pointer );
 
     /* check for contra-transaction */
     gsb_assistant_archive_add_contra_transaction_to_list (transaction_number);
@@ -1075,22 +1075,26 @@
     if (transaction_number <= 0)
 	return;
 
-    contra_transaction_number = gsb_data_transaction_get_contra_transaction_number (transaction_number);
+    contra_transaction_number = gsb_data_transaction_get_contra_transaction_number (
+                        transaction_number);
     if (contra_transaction_number > 0)
     {
 	gpointer contra_transaction_pointer;
 
-	contra_transaction_pointer = gsb_data_transaction_get_pointer_of_transaction (contra_transaction_number);
+	contra_transaction_pointer = gsb_data_transaction_get_pointer_of_transaction (
+                        contra_transaction_number);
 
 	/* add the contra-transaction */
-	if (!g_slist_find ( list_transaction_to_archive,
-			    contra_transaction_pointer ))
+	if ( !g_slist_find ( list_transaction_to_archive,
+			    contra_transaction_pointer ) )
 	    list_transaction_to_archive = g_slist_append ( list_transaction_to_archive,
 							   contra_transaction_pointer );
 
 	/* if the contra-transaction is a child of split,
 	 * we need to add the split and all children to the list */
-	gsb_assistant_archive_add_children_to_list (gsb_data_transaction_get_mother_transaction_number (contra_transaction_number));
+	gsb_assistant_archive_add_children_to_list (
+                        gsb_data_transaction_get_mother_transaction_number (
+                        contra_transaction_number) );
     }
     return;
 }

Index: gsb_real.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- gsb_real.c	21 May 2009 09:18:19 -0000	1.46
+++ gsb_real.c	21 May 2009 21:58:55 -0000	1.47
@@ -2,7 +2,7 @@
 /*                                                                            */
 /*                                  gsb_real                                  */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	          */
+/*     Copyright (C)    2000-2007 Cédric Auger (cedric at grisbi.org)            */
 /*          2003-2008 Benjamin Drieu (bdrieu at april.org)	                      */
 /*                      2009 Pierre Biava (grisbi at pierre.biava.name)          */
 /*                      2009 Mickaël Remars (grisbi at remars.com)               */
@@ -37,8 +37,6 @@
 /*START_INCLUDE*/
 #include "gsb_real.h"
 #include "./gsb_data_currency.h"
-#include "./gsb_data_transaction.h"
-#include "./utils_str.h"
 /*END_INCLUDE*/
 
 gsb_real null_real = { 0 , 0 };
@@ -54,6 +52,9 @@
                         gint currency_number,
                         gboolean show_symbol );
 static gsb_real gsb_real_get_from_string_normalized ( const gchar *string, gint default_exponent );
+static void gsb_real_grow_exponent( gsb_real *num, guint target_exponent );
+static void gsb_real_minimize_exponent ( gsb_real *num );
+static void gsb_real_raw_minimize_exponent ( gint64 *mantissa, gint *exponent );
 static gdouble gsb_real_real_to_double ( gsb_real number );
 /*END_STATIC*/
 

Index: gsb_archive_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_archive_config.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- gsb_archive_config.c	8 May 2009 17:21:15 -0000	1.23
+++ gsb_archive_config.c	21 May 2009 21:58:55 -0000	1.24
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2007 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2008 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -68,14 +68,14 @@
 
 /*START_STATIC*/
 static  gboolean gsb_archive_config_delete_archive ( GtkWidget *button,
-						    GtkWidget *tree_view );
+                        GtkWidget *tree_view );
 static  gboolean gsb_archive_config_destroy_archive ( GtkWidget *button,
-						     GtkWidget *tree_view );
+                        GtkWidget *tree_view );
 static  void gsb_archive_config_fill_list ( GtkListStore *store );
 static  gboolean gsb_archive_config_name_changed ( GtkWidget *entry,
-						  GtkWidget *tree_view );
+                        GtkWidget *tree_view );
 static  gboolean gsb_archive_config_select ( GtkTreeSelection *selection,
-					    GtkWidget *paddingbox );
+                        GtkWidget *paddingbox );
 /*END_STATIC*/
 
 /*START_EXTERN*/
@@ -347,7 +347,7 @@
  * \return FALSE
  */
 static gboolean gsb_archive_config_select ( GtkTreeSelection *selection,
-					    GtkWidget *paddingbox )
+                        GtkWidget *paddingbox )
 {
     GtkTreeIter iter;
     gboolean good;
@@ -395,7 +395,7 @@
  * \return FALSE
  */
 static gboolean gsb_archive_config_name_changed ( GtkWidget *entry,
-						  GtkWidget *tree_view )
+                        GtkWidget *tree_view )
 {
     GtkTreeSelection *selection;
     GtkTreeIter iter;
@@ -435,7 +435,7 @@
  * \return FALSE
  * */
 static gboolean gsb_archive_config_delete_archive ( GtkWidget *button,
-						    GtkWidget *tree_view )
+                        GtkWidget *tree_view )
 {
     GtkTreeSelection *selection;
     GtkTreeIter iter;
@@ -446,37 +446,41 @@
 
     if (good)
     {
-	GtkTreeModel *model;
-	gint archive_number;
+    GtkTreeModel *model;
+    gint archive_number;
 
-	model = gtk_tree_view_get_model ( GTK_TREE_VIEW (tree_view));
-	gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
-			     ARCHIVES_NUMBER, &archive_number,
-			     -1 );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW (tree_view));
+    gtk_tree_model_get ( GTK_TREE_MODEL(model), &iter, 
+                        ARCHIVES_NUMBER, &archive_number,
+                        -1 );
 
-	if (!archive_number)
-	    return FALSE;
+    if (!archive_number)
+        return FALSE;
 
-	gchar* tmpstr = g_strdup_printf (_("Warning, you are about the delete the archive \"%s\".\n\nIf you continue, all the transactions linked to that archive will loose the link and will begin again not archived.\nAll the informations about that archive will be destroyed.\n\nDo you want to continue ?"),
-						    gsb_data_archive_get_name (archive_number));
-	if (!question_yes_no_hint (_("Deleting an archive"), tmpstr , GTK_RESPONSE_CANCEL ))
-	{
-            g_free ( tmpstr );
-	    return FALSE;
-	}
+    gchar* tmpstr = g_strdup_printf (
+                        _("Warning, you are about the delete the archive \"%s\".\n\n"
+                          "If you continue, all the transactions linked to that archive "
+                          "will loose the link and will begin again not archived.\n"
+                          "All the informations about that archive will be destroyed.\n\n"
+                          "Do you want to continue ?"),
+                        gsb_data_archive_get_name (archive_number) );
+    if (!question_yes_no_hint (_("Deleting an archive"), tmpstr , GTK_RESPONSE_CANCEL ))
+    {
+        g_free ( tmpstr );
+        return FALSE;
+    }
         g_free ( tmpstr );
 
-	/* ok, now we delete the archive */
-	/* first step, we show it in the lists */
-	gsb_transactions_list_restore_archive (archive_number, FALSE);
+    /* ok, now we delete the archive */
+    /* first step, we show it in the lists */
+    gsb_transactions_list_restore_archive (archive_number, FALSE);
 
-	/* now we remove the link of all the transactions and the archive itself */
-	gsb_data_archive_remove (archive_number);
+    /* now we remove the link of all the transactions and the archive itself */
+    gsb_data_archive_remove (archive_number);
 
-	/* remove from the list */
-	gtk_list_store_remove ( GTK_LIST_STORE (model),
-				&iter );
-	if ( etat.modification_fichier == 0 )
+    /* remove from the list */
+    gtk_list_store_remove ( GTK_LIST_STORE (model), &iter );
+    if ( etat.modification_fichier == 0 )
         modification_fichier ( TRUE );
     }
     return FALSE;
@@ -493,7 +497,7 @@
  * \return FALSE
  * */
 static gboolean gsb_archive_config_destroy_archive ( GtkWidget *button,
-						     GtkWidget *tree_view )
+                        GtkWidget *tree_view )
 {
     GtkTreeSelection *selection;
     GtkTreeIter iter;
@@ -517,9 +521,17 @@
 	if (!archive_number)
 	    return FALSE;
 
-	gchar* tmpstr = g_strdup_printf (_("Warning, you are about the delete the archive \"%s\" and its associated transactions.\n\nIf you continue, all the transactions linked to that archive will be deleted and the initials amounts of the accounts will be adjusted.\nAll the informations about that archive will be destroyed.\nYou should have at least exported that archive into another file...\n\nAre you sure you want to continue ?"),
-						    gsb_data_archive_get_name (archive_number));
-	if (!question_yes_no_hint (_("Deleting an archive and its transactions"), tmpstr, GTK_RESPONSE_CANCEL ))
+	gchar* tmpstr = g_strdup_printf (
+                        _("Warning, you are about the delete the archive \"%s\" and its "
+                          "associated transactions.\n\nIf you continue, all the transactions "
+                          "linked to that archive will be deleted and the initials amounts "
+                          "of the accounts will be adjusted.\nAll the informations about "
+                          "that archive will be destroyed.\nYou should have at least exported "
+                          "that archive into another file...\n\nAre you sure you want to "
+                          "continue ?"),
+                        gsb_data_archive_get_name (archive_number) );
+	if (!question_yes_no_hint ( _("Deleting an archive and its transactions"),
+                        tmpstr, GTK_RESPONSE_CANCEL ) )
 	{
 	    g_free ( tmpstr );
 	    return FALSE;
@@ -541,8 +553,8 @@
 		/* change the initial amount of the corresponding account */
 		account_number = gsb_data_archive_store_get_account_number (archive_store_number);
 		gsb_data_account_set_init_balance ( account_number,
-						    gsb_real_add ( gsb_data_account_get_init_balance (account_number, -1),
-								   gsb_data_archive_store_get_balance (archive_store_number)));
+                        gsb_real_add ( gsb_data_account_get_init_balance (account_number, -1),
+                        gsb_data_archive_store_get_balance (archive_store_number)));
 
 		/* remove the archive store */
 		tmp_list = tmp_list -> next;

Index: accueil.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.c,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -d -r1.197 -r1.198
--- accueil.c	27 Apr 2009 19:41:03 -0000	1.197
+++ accueil.c	21 May 2009 21:58:55 -0000	1.198
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*            2003-2008 Benjamin Drieu (bdrieu at april.org)                     */
+/*             http://www.grisbi.org                                          */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -53,8 +53,8 @@
 /*START_STATIC*/
 static gboolean gsb_main_page_click_on_account ( gint *account_number );
 static gboolean saisie_echeance_accueil ( GtkWidget *event_box,
-				   GdkEventButton *event,
-				   gint scheduled_number );
+                        GdkEventButton *event,
+                        gint scheduled_number );
 static void update_fin_comptes_passifs ( gboolean force );
 static void update_liste_comptes_accueil ( gboolean force );
 static void update_liste_echeances_auto_accueil ( gboolean force );
@@ -293,8 +293,8 @@
 /*        Fonction appelée lorsqu'on clicke sur une échéance à saisir        */
 /* ************************************************************************* */
 gboolean saisie_echeance_accueil ( GtkWidget *event_box,
-				   GdkEventButton *event,
-				   gint scheduled_number )
+                        GdkEventButton *event,
+                        gint scheduled_number )
 {
     GtkWidget *parent_save, *dialog, *hbox;
     gint result;

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- gsb_file_load.c	19 May 2009 18:24:58 -0000	1.175
+++ gsb_file_load.c	21 May 2009 21:58:55 -0000	1.176
@@ -91,17 +91,17 @@
 static void gsb_file_load_currency_link ( const gchar **attribute_names,
                         const gchar **attribute_values );
 static void gsb_file_load_end_element_before_0_6 ( GMarkupParseContext *context,
-					    const gchar *element_name,
-					    gpointer user_data,
-					    GError **error);
+                        const gchar *element_name,
+                        gpointer user_data,
+                        GError **error);
 static void gsb_file_load_financial_year ( const gchar **attribute_names,
                         const gchar **attribute_values );
 static void gsb_file_load_general_part ( const gchar **attribute_names,
                         const gchar **attribute_values );
 static void gsb_file_load_general_part_before_0_6 ( GMarkupParseContext *context,
-					    const gchar *text );
+                        const gchar *text );
 static gint gsb_file_load_get_new_payment_number ( gint account_number,
-					    gint payment_number );
+                        gint payment_number );
 static void gsb_file_load_import_rule ( const gchar **attribute_names,
                         const gchar **attribute_values );
 static void gsb_file_load_logo_accueil ( const gchar **attribute_names,
@@ -115,9 +115,9 @@
 static void gsb_file_load_reconcile ( const gchar **attribute_names,
                         const gchar **attribute_values );
 static void gsb_file_load_report_part_before_0_6 ( GMarkupParseContext *context,
-					    const gchar *text );
+                        const gchar *text );
 static void gsb_file_load_scheduled_transactions ( const gchar **attribute_names,
-					    const gchar **attribute_values );
+                        const gchar **attribute_values );
 static gboolean gsb_file_load_set_last_reconcile_data ( gint account_number,
                         GDate *final_date,
                         gsb_real final_balance );
@@ -129,15 +129,15 @@
                         GError **error);
 static void gsb_file_load_start_element_before_0_6 ( GMarkupParseContext *context,
                         const gchar *element_name,
-					    const gchar **attribute_names,
-					    const gchar **attribute_values,
-					    gpointer user_data,
-					    GError **error);
+                        const gchar **attribute_names,
+                        const gchar **attribute_values,
+                        gpointer user_data,
+                        GError **error);
 static void gsb_file_load_text_element_before_0_6 ( GMarkupParseContext *context,
-					    const gchar *text,
-					    gsize text_len,  
-					    gpointer user_data,
-					    GError **error);
+                        const gchar *text,
+                        gsize text_len,  
+                        gpointer user_data,
+                        GError **error);
 static void gsb_file_load_transactions ( const gchar **attribute_names,
                         const gchar **attribute_values );
 static gboolean gsb_file_load_update_previous_version ( void );
@@ -2055,7 +2055,7 @@
  *
  * */
 void gsb_file_load_scheduled_transactions ( const gchar **attribute_names,
-					    const gchar **attribute_values )
+                        const gchar **attribute_values )
 {
     gint i=0;
     gint scheduled_number = 0;
@@ -3050,45 +3050,45 @@
     GDate *date;
 
     if ( !attribute_names[i] )
-	return;
+    return;
 
     archive_number = gsb_data_archive_new (NULL);
 
     do
     {
-	/* 	we test at the beginning if the attribute_value is NULL, if yes, */
-	/* 	   go to the next */
-	if ( !strcmp (attribute_values[i],
-		      "(null)"))
-	{
-	    i++;
-	    continue;
-	}
+    /* 	we test at the beginning if the attribute_value is NULL, if yes, */
+    /* 	   go to the next */
+    if ( !strcmp (attribute_values[i],
+                "(null)"))
+    {
+        i++;
+        continue;
+    }
 
-	if ( !strcmp ( attribute_names[i],
-		       "Nb" ))
-	{
-	    archive_number = gsb_data_archive_set_new_number (archive_number,
-							      utils_str_atoi (attribute_values[i]));
-	    i++;
-	    continue;
-	}
+    if ( !strcmp ( attribute_names[i],
+                "Nb" ))
+    {
+        archive_number = gsb_data_archive_set_new_number (archive_number,
+                                utils_str_atoi (attribute_values[i]));
+        i++;
+        continue;
+    }
 
-	if ( !strcmp ( attribute_names[i],
-		       "Na" ))
-	{
-	    gsb_data_archive_set_name ( archive_number,
-					attribute_values[i]);
-	    i++;
-	    continue;
-	}
+    if ( !strcmp ( attribute_names[i],
+                "Na" ))
+    {
+        gsb_data_archive_set_name ( archive_number,
+                    attribute_values[i]);
+        i++;
+        continue;
+    }
 
-	if ( !strcmp ( attribute_names[i],
-		       "Bdte" ))
-	{
-	    date = gsb_parse_date_string_safe (attribute_values[i]);
-	    gsb_data_archive_set_beginning_date ( archive_number,
-						 date );
+    if ( !strcmp ( attribute_names[i],
+                "Bdte" ))
+    {
+        date = gsb_parse_date_string_safe (attribute_values[i]);
+        gsb_data_archive_set_beginning_date ( archive_number,
+                            date );
 	    if ( date )
 		g_date_free (date);
 	    i++;
@@ -4404,10 +4404,10 @@
 }
 void gsb_file_load_start_element_before_0_6 ( GMarkupParseContext *context,
                         const gchar *element_name,
-					    const gchar **attribute_names,
-					    const gchar **attribute_values,
-					    gpointer user_data,
-					    GError **error)
+                        const gchar **attribute_names,
+                        const gchar **attribute_values,
+                        gpointer user_data,
+                        GError **error)
 {
     /* the first time we come here, we check if it's a grisbi file */
     gchar **pointeur_char;
@@ -5530,9 +5530,9 @@
 
 
 void gsb_file_load_end_element_before_0_6 ( GMarkupParseContext *context,
-					    const gchar *element_name,
-					    gpointer user_data,
-					    GError **error)
+                        const gchar *element_name,
+                        gpointer user_data,
+                        GError **error)
 {
     /* when it's the end of an element, we set it in the split structure to 0 */
 
@@ -5548,10 +5548,10 @@
 }
 
 void gsb_file_load_text_element_before_0_6 ( GMarkupParseContext *context,
-					    const gchar *text,
-					    gsize text_len,  
-					    gpointer user_data,
-					    GError **error)
+                        const gchar *text,
+                        gsize text_len,  
+                        gpointer user_data,
+                        GError **error)
 {
     /* we come here for all text element, we split here to go
      * on the necessary function to work with that element */
@@ -5568,7 +5568,7 @@
 }
 
 void gsb_file_load_general_part_before_0_6 ( GMarkupParseContext *context,
-					    const gchar *text )
+                        const gchar *text )
 {
     const gchar *element_name;
 
@@ -6197,7 +6197,7 @@
 
 
 void gsb_file_load_report_part_before_0_6 ( GMarkupParseContext *context,
-					    const gchar *text )
+                        const gchar *text )
 {
     const gchar *element_name;
 
@@ -7787,7 +7787,7 @@
  * \return the new number of payment or 0 if not found
  * */
 gint gsb_file_load_get_new_payment_number ( gint account_number,
-					    gint payment_number )
+                        gint payment_number )
 {
     GSList *tmp_list;
     

Index: transaction_list.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- transaction_list.h	19 Oct 2008 20:00:28 -0000	1.5
+++ transaction_list.h	21 May 2009 21:58:55 -0000	1.6
@@ -14,15 +14,15 @@
 gint transaction_list_get_n_children ( gint transaction_number );
 gboolean transaction_list_redraw ( void );
 gboolean transaction_list_remove_archive ( gint archive_number );
+gboolean transaction_list_remove_archive_transaction ( gint transaction_number );
 gboolean transaction_list_remove_transaction ( gint transaction_number );
-void transaction_list_set ( GtkTreeIter *iter,
-			    ... );
+void transaction_list_set ( GtkTreeIter *iter, ... );
 void transaction_list_set_balances ( void );
 gboolean transaction_list_show_toggle_mark ( gboolean show );
 gboolean transaction_list_update_cell ( gint cell_col,
-					gint cell_line );
+                        gint cell_line );
 gboolean transaction_list_update_column ( gint column,
-					  GValue *value );
+                        GValue *value );
 gboolean transaction_list_update_element ( gint element_number );
 gboolean transaction_list_update_transaction ( gint transaction_number );
 /* END_DECLARATION */

Index: transaction_model.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_model.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- transaction_model.c	2 Oct 2008 22:11:23 -0000	1.3
+++ transaction_model.c	21 May 2009 21:58:55 -0000	1.4
@@ -1,7 +1,7 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */

Index: gsb_transactions_list.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- gsb_transactions_list.h	17 May 2009 15:53:25 -0000	1.34
+++ gsb_transactions_list.h	21 May 2009 21:58:55 -0000	1.35
@@ -39,29 +39,30 @@
 
 /* START_DECLARATION */
 gboolean clone_selected_transaction ( GtkWidget *menu_item,
-				      gpointer null );
+                        gpointer null );
 GtkWidget *creation_fenetre_operations ( void );
 gint find_element_col ( gint element_number );
 gint find_element_col_split ( gint element_number );
 gint find_element_line ( gint element_number );
 gchar *gsb_transactions_get_category_real_name ( gint transaction_number );
 gboolean gsb_transactions_list_append_new_transaction ( gint transaction_number,
-							gboolean update_tree_view );
+                        gboolean update_tree_view );
 gboolean gsb_transactions_list_delete_transaction ( gint transaction_number,
                         gint show_warning );
 gboolean gsb_transactions_list_delete_transaction_from_tree_view ( gint transaction_number );
 gboolean gsb_transactions_list_edit_current_transaction ( void );
 gboolean gsb_transactions_list_edit_transaction ( gint transaction_number );
 gboolean gsb_transactions_list_edit_transaction_by_pointer ( gint *transaction_number );
+gboolean gsb_transactions_list_fill_archive_store ( void );
 gfloat gsb_transactions_list_get_row_align ( void );
 GtkWidget *gsb_transactions_list_get_tree_view (void);
 gchar *gsb_transactions_list_grep_cell_content ( gint transaction_number,
-						 gint cell_content_number );
+                        gint cell_content_number );
 gboolean gsb_transactions_list_key_press ( GtkWidget *widget,
-					   GdkEventKey *ev );
+                        GdkEventKey *ev );
 GtkWidget *gsb_transactions_list_make_gui_list ( void );
 gboolean gsb_transactions_list_restore_archive ( gint archive_number,
-						 gboolean show_warning );
+                        gboolean show_warning );
 void gsb_transactions_list_selection_changed ( gint new_selected_transaction );
 gboolean gsb_transactions_list_set_row_align ( gfloat row_align );
 void gsb_transactions_list_set_visible_rows_number ( gint rows_number );
@@ -69,18 +70,18 @@
 						   gint scheduled_number );
 gboolean gsb_transactions_list_switch_expander ( gint transaction_number );
 gboolean gsb_transactions_list_transaction_visible ( gpointer transaction_ptr,
-						     gint account_number,
-						     gint line_in_transaction,
-						     gint what_is_line );
+                        gint account_number,
+                        gint line_in_transaction,
+                        gint what_is_line );
 gboolean gsb_transactions_list_update_transaction ( gint transaction_number );
 void gsb_transactions_list_update_tree_view ( gint account_number,
-					      gboolean keep_selected_transaction );
+                        gboolean keep_selected_transaction );
 void mise_a_jour_affichage_r ( gboolean show_r );
 void move_selected_operation_to_account_nb ( gint *account );
 gboolean new_transaction ();
 void remove_transaction ();
 void schedule_selected_transaction ();
 gsb_real solde_debut_affichage ( gint account_number,
-				 gint floating_point);
+                        gint floating_point);
 /* END_DECLARATION */
 #endif

Index: gsb_data_archive.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_archive.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gsb_data_archive.h	30 Sep 2008 22:28:49 -0000	1.6
+++ gsb_data_archive.h	21 May 2009 21:58:55 -0000	1.7
@@ -19,16 +19,16 @@
 gint gsb_data_archive_new ( const gchar *name );
 gboolean gsb_data_archive_remove ( gint archive_number );
 gboolean gsb_data_archive_set_beginning_date ( gint archive_number,
-					      const GDate *date );
+                        const GDate *date );
 gboolean gsb_data_archive_set_end_date ( gint archive_number,
-					 const GDate *date );
+                        const GDate *date );
 gboolean gsb_data_archive_set_fyear ( gint archive_number,
-				      gint fyear_number );
+                        gint fyear_number );
 gboolean gsb_data_archive_set_name ( gint archive_number,
-				     const gchar *name );
+                        const gchar *name );
 gint gsb_data_archive_set_new_number ( gint archive_number,
-				       gint new_no_archive );
+                        gint new_no_archive );
 gboolean gsb_data_archive_set_report_title ( gint archive_number,
-					     const gchar *report_title );
+                        const gchar *report_title );
 /* END_DECLARATION */
 #endif

Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- gsb_file.c	17 May 2009 15:53:25 -0000	1.50
+++ gsb_file.c	21 May 2009 21:58:55 -0000	1.51
@@ -171,22 +171,22 @@
     /* Create main widget. */
     gsb_status_message ( _("Creating main window"));
     gtk_box_pack_start ( GTK_BOX ( window_vbox_principale), create_main_widget(),
-			 TRUE, TRUE, 0 );
+                        TRUE, TRUE, 0 );
 
     /* create the model */
     if (!transaction_list_create ())
     {
-	dialogue_error (_("The model of the list couldn't be created... Bad things will happen very soon..."));
-	return;
+    dialogue_error (_("The model of the list couldn't be created... Bad things will happen very soon..."));
+    return;
     }
 
     /* Create transaction list. */
     tree_view_widget = gsb_transactions_list_make_gui_list ();
     gtk_box_pack_start ( GTK_BOX ( tree_view_vbox ),
-			 tree_view_widget,
-			 TRUE,
-			 TRUE,
-			 0 );
+                tree_view_widget,
+                TRUE,
+                TRUE,
+                0 );
     gtk_widget_show ( tree_view_widget );
 
 
@@ -328,7 +328,7 @@
  * \return FALSE
  * */
 gboolean gsb_file_open_direct_menu ( GtkMenuItem *item,
-				     gint *file_number_ptr )
+                        gint *file_number_ptr )
 {
     /* continue only if can close the current file */
     if ( !gsb_file_close() )
@@ -371,44 +371,59 @@
 
     if ( gsb_file_load_open_file (filename))
     {
-	/* the file has been opened succesfully */
-	/* we make a backup if necessary */
-	if ( etat.sauvegarde_demarrage )
-	    gsb_file_save_backup();
+        /* the file has been opened succesfully */
+        /* we make a backup if necessary */
+        if ( etat.sauvegarde_demarrage )
+            gsb_file_save_backup();
     }
     else
     {
-	/* Loading failed. */
-	gsb_status_message ( _("Failed to load accounts") );
+        /* Loading failed. */
+        gsb_status_message ( _("Failed to load accounts") );
 
-	if ( etat.sauvegarde_demarrage || etat.make_backup || etat.make_backup_every_minutes )
-	{
-	    gchar *tmpstr = g_strdup_printf ( _("Error loading file '%s'"), filename);
-	    gchar *tmpstr2 = g_strdup_printf ( _("Grisbi was unable to load file. You should find the last backups in '%s', they are saved with date and time into their name so you should find easily the last backup saved.\nPlease contact the Grisbi's team on devel at listes.grisbi.org to find what happened to you current file."),
-					       gsb_file_get_backup_path ());
-	    dialogue_error_hint ( tmpstr2, tmpstr );
-	    g_free ( tmpstr );
-	    g_free ( tmpstr2 );
-	    gsb_status_stop_wait ( TRUE );
-	    return FALSE;
-	}
-	else
-	{
-	    gchar *tmpstr = g_strdup_printf ( _("Error loading file '%s'"), filename);
-	    gchar *tmpstr2;
+        if ( etat.sauvegarde_demarrage || etat.make_backup || etat.make_backup_every_minutes )
+        {
+            gchar *tmpstr = g_strdup_printf ( _("Error loading file '%s'"), filename);
+            gchar *tmpstr2 = g_strdup_printf ( 
+                                _("Grisbi was unable to load file. You should find the last "
+                                  "backups in '%s', they are saved with date and time into "
+                                  "their name so you should find easily the last backup "
+                                  "saved.\n"
+                                  "Please contact the Grisbi's team on devel at listes.grisbi.org "
+                                  "to find what happened to you current file."),
+                                gsb_file_get_backup_path ());
+            dialogue_error_hint ( tmpstr2, tmpstr );
+            g_free ( tmpstr );
+            g_free ( tmpstr2 );
+            gsb_status_stop_wait ( TRUE );
+            return FALSE;
+        }
+        else
+        {
+            gchar *tmpstr = g_strdup_printf ( _("Error loading file '%s'"), filename);
+            gchar *tmpstr2;
 
-	    if (gsb_file_get_backup_path ())
-		tmpstr2 = g_strdup_printf ( _("Grisbi was unable to load file and the backups seem not to be activated... This is a bad thing.\nYour backup path is '%s', try to find if earlier you had some backups in there ?\nPlease contact the Grisbi's team on devel at listes.grisbi.org to find what happened to you current file."),
-					    gsb_file_get_backup_path ());
-	    else
-		tmpstr2 = my_strdup ( _("Grisbi was unable to load file and the backups seem not to be activated... This is a bad thing.\nPlease contact the Grisbi's team on devel at listes.grisbi.org to find what happened to you current file."));
+            if (gsb_file_get_backup_path ())
+            tmpstr2 = g_strdup_printf ( 
+                            _("Grisbi was unable to load file and the backups seem not to "
+                              "be activated... This is a bad thing.\nYour backup path is '%s', "
+                              "try to find if earlier you had some backups in there ?\n"
+                              "Please contact the Grisbi's team on devel at listes.grisbi.org "
+                              "to find what happened to you current file."),
+                            gsb_file_get_backup_path ());
+            else
+            tmpstr2 = my_strdup ( _("Grisbi was unable to load file and the backups seem not "
+                                    "to be activated... This is a bad thing.\n"
+                                    "Please contact the Grisbi's team on "
+                                    "devel at listes.grisbi.org to find what happened to you "
+                                    "current file."));
 
-	    dialogue_error_hint ( tmpstr2, tmpstr );
-	    g_free ( tmpstr );
-	    g_free ( tmpstr2 );
-	    gsb_status_stop_wait ( TRUE );
-	    return FALSE;
-	}
+            dialogue_error_hint ( tmpstr2, tmpstr );
+            g_free ( tmpstr );
+            g_free ( tmpstr2 );
+            gsb_status_stop_wait ( TRUE );
+            return FALSE;
+        }
     }
 
     /* ok, here the file or backup is loaded */
@@ -436,18 +451,20 @@
 	account_number = gsb_data_account_get_no_account ( list_tmp -> data );
 
 	/* set the minimum balances to be shown or not */
-	value = gsb_real_cmp ( gsb_data_account_get_current_balance (account_number), gsb_data_account_get_mini_balance_authorized (account_number)) == -1;
-		gsb_data_account_set_mini_balance_authorized_message ( account_number, value);
-			value = gsb_real_cmp ( gsb_data_account_get_current_balance (account_number), gsb_data_account_get_mini_balance_wanted (account_number)) == -1;
-				gsb_data_account_set_mini_balance_wanted_message ( account_number, value);
+	value = gsb_real_cmp ( gsb_data_account_get_current_balance (account_number), 
+                          gsb_data_account_get_mini_balance_authorized (account_number) ) == -1;
+    gsb_data_account_set_mini_balance_authorized_message ( account_number, value);
+    value = gsb_real_cmp ( gsb_data_account_get_current_balance (account_number),
+                          gsb_data_account_get_mini_balance_wanted (account_number) ) == -1;
+    gsb_data_account_set_mini_balance_wanted_message ( account_number, value);
 	list_tmp = list_tmp -> next;
     }
 
     /* update the main page */
     mise_a_jour_accueil (TRUE);
 
-    /* for now, the flag for modification of the file is ok, but the menu couldn't be set as sensitive/unsensitive
-     * so do it now */
+    /* for now, the flag for modification of the file is ok, but the menu couldn't be set
+     * as sensitive/unsensitive so do it now */
     modification_fichier (etat.modification_fichier != 0);
 
     gsb_status_message ( _("Done") );
@@ -626,7 +643,7 @@
  * \return FALSE
  * */
 gboolean gsb_file_automatic_backup_start ( GtkWidget *checkbutton,
-					   gpointer null )
+                        gpointer null )
 {
     devel_debug_int (etat.make_backup_every_minutes);
 
@@ -662,7 +679,7 @@
  * \return FALSE
  * */
 gboolean gsb_file_automatic_backup_change_time ( GtkWidget *spinbutton,
-						 gpointer null )
+                        gpointer null )
 {
     devel_debug_int (etat.make_backup_nb_minutes);
 

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- gsb_transactions_list.c	19 May 2009 18:24:58 -0000	1.165
+++ gsb_transactions_list.c	21 May 2009 21:58:55 -0000	1.166
@@ -73,36 +73,35 @@
 static gboolean gsb_gui_change_cell_content ( GtkWidget * item, gint *element_ptr );
 static GtkWidget *gsb_gui_create_cell_contents_menu ( int x, int y );
 static gboolean gsb_transactions_list_button_press ( GtkWidget *tree_view,
-					      GdkEventButton *ev,
-					      gpointer null );
+                        GdkEventButton *ev,
+                        gpointer null );
 static gboolean gsb_transactions_list_change_sort_column ( GtkTreeViewColumn *tree_view_column,
-						    gint *column_ptr );
+                        gint *column_ptr );
 static gboolean gsb_transactions_list_change_sort_type ( GtkWidget *menu_item,
-						  gint *no_column );
+                        gint *no_column );
 static gboolean gsb_transactions_list_check_mark ( gint transaction_number );
 static gint gsb_transactions_list_choose_reconcile ( gint account_number,
                         gint selected_reconcile_number );
 static  gboolean gsb_transactions_list_clone_template ( GtkWidget *menu_item,
-						       gpointer null );
+                        gpointer null );
 static gint gsb_transactions_list_clone_transaction ( gint transaction_number,
-					       gint mother_transaction_number );
+                        gint mother_transaction_number );
 static GtkWidget *gsb_transactions_list_create_tree_view ( GtkTreeModel *model );
 static void gsb_transactions_list_create_tree_view_columns ( void );
-static gboolean gsb_transactions_list_fill_archive_store ( void );
 static gboolean gsb_transactions_list_fill_model ( void );
 static gboolean gsb_transactions_list_move_transaction_to_account ( gint transaction_number,
-							     gint target_account );
+                        gint target_account );
 static void gsb_transactions_list_set_tree_view (GtkWidget *tree_view);
 static gboolean gsb_transactions_list_size_allocate ( GtkWidget *tree_view,
-					       GtkAllocation *allocation,
-					       gpointer null );
+                        GtkAllocation *allocation,
+                        gpointer null );
 static gboolean gsb_transactions_list_switch_R_mark ( gint transaction_number );
 static gboolean gsb_transactions_list_switch_mark ( gint transaction_number );
 static gboolean gsb_transactions_list_title_column_button_press ( GtkWidget *button,
-							   GdkEventButton *ev,
-							   gint *no_column );
+                        GdkEventButton *ev,
+                        gint *no_column );
 static gboolean move_selected_operation_to_account ( GtkMenuItem * menu_item,
-					      gpointer null );
+                        gpointer null );
 static void popup_transaction_context_menu ( gboolean full, int x, int y );
 static gint schedule_transaction ( gint transaction_number );
 static void update_titres_tree_view ( void );
@@ -218,7 +217,7 @@
  * \return
  * */
 void gsb_transactions_list_update_tree_view ( gint account_number,
-					      gboolean keep_selected_transaction )
+                        gboolean keep_selected_transaction )
 {
     gint selected_transaction;
 
@@ -291,14 +290,14 @@
     /* we add the tree view in a scrolled window which will be returned */
     scrolled_window = gtk_scrolled_window_new ( NULL, NULL );
     gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
+                        GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
     gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-					  GTK_SHADOW_IN );
+                        GTK_SHADOW_IN );
 
     /* and now we can create the tree_view */
-    tree_view = gsb_transactions_list_create_tree_view (GTK_TREE_MODEL (transaction_model_get_model ()));
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			tree_view );
+    tree_view = gsb_transactions_list_create_tree_view ( GTK_TREE_MODEL (
+                        transaction_model_get_model ()) );
+    gtk_container_add ( GTK_CONTAINER ( scrolled_window ), tree_view );
 
     /* we save the values */
     gsb_transactions_list_set_tree_view (tree_view);
@@ -527,7 +526,10 @@
 	 * wich didn't find their mother. show them now */
 	if (orphan_child_transactions)
 	{
-	    gchar *message = _("Some children didn't find their mother in the list, this shouldn't happen and there is probably a bug behind that. Please contact the Grisbi team.\n\nThe concerned children number are :\n");
+	    gchar *message = _("Some children didn't find their mother in the list, this "
+                           "shouldn't happen and there is probably a bug behind that. "
+                           "Please contact the Grisbi team.\n\nThe concerned children "
+                           "number are :\n");
 	    gchar *string_1;
 	    gchar *string_2;
 
@@ -569,12 +571,12 @@
     tmp_list = gsb_data_archive_store_get_archives_list ();
     while (tmp_list)
     {
-	gint archive_store_number;
+    gint archive_store_number;
 
-	/* get the store archive struct */
-	archive_store_number = gsb_data_archive_store_get_number (tmp_list -> data);
-	transaction_list_append_archive (archive_store_number);
-	tmp_list = tmp_list -> next;
+    /* get the store archive struct */
+    archive_store_number = gsb_data_archive_store_get_number (tmp_list -> data);
+    transaction_list_append_archive (archive_store_number);
+    tmp_list = tmp_list -> next;
     }
     return FALSE;
 }
@@ -600,7 +602,7 @@
  * \return FALSE
  * */
 gboolean gsb_transactions_list_append_new_transaction ( gint transaction_number,
-							gboolean update_tree_view )
+                        gboolean update_tree_view )
 {
     gint account_number;
 
@@ -657,7 +659,7 @@
  * \return a newly allocated string which represent the content of the transaction, or NULL
  * */
 gchar *gsb_transactions_list_grep_cell_content ( gint transaction_number,
-						 gint cell_content_number )
+                        gint cell_content_number )
 {
     gint account_currency;
 
@@ -1036,7 +1038,7 @@
 /* soit le solde initial - les opés R si elles ne sont pas affichées */
 /******************************************************************************/
 gsb_real solde_debut_affichage ( gint account_number,
-				 gint floating_point)
+                        gint floating_point)
 {
     gsb_real solde;
     GSList *list_tmp_transactions;
@@ -1082,8 +1084,8 @@
  * \return normally TRUE to block the signal, if we are outside the tree_view, FALSE
  * */
 gboolean gsb_transactions_list_button_press ( GtkWidget *tree_view,
-					      GdkEventButton *ev,
-					      gpointer null )
+                        GdkEventButton *ev,
+                        gpointer null )
 {
     GtkTreeIter iter;
     GtkTreeModel *model;
@@ -1212,7 +1214,7 @@
 /* gère le clavier sur la liste des opés */
 /******************************************************************************/
 gboolean gsb_transactions_list_key_press ( GtkWidget *widget,
-					   GdkEventKey *ev )
+                        GdkEventKey *ev )
 {
     gint account_number;
     gint transaction_number;
@@ -2296,7 +2298,7 @@
  * \return FALSE
  */
 gboolean clone_selected_transaction ( GtkWidget *menu_item,
-				      gpointer null )
+                        gpointer null )
 {
     gint new_transaction_number;
 
@@ -2324,7 +2326,7 @@
  * \return FALSE
  * */
 static gboolean gsb_transactions_list_clone_template ( GtkWidget *menu_item,
-						       gpointer null )
+                        gpointer null )
 {
     gint new_transaction_number;
 
@@ -2354,7 +2356,7 @@
  * \return the number newly created transaction.
  */
 gint gsb_transactions_list_clone_transaction ( gint transaction_number,
-					       gint mother_transaction_number )
+                        gint mother_transaction_number )
 {
     gint new_transaction_number;
 
@@ -2416,7 +2418,7 @@
  * \return FALSE
  */
 gboolean move_selected_operation_to_account ( GtkMenuItem * menu_item,
-					      gpointer null )
+                        gpointer null )
 {
     gint target_account, source_account;
     gchar *string;
@@ -2503,7 +2505,7 @@
  * return TRUE if ok
  */
 gboolean gsb_transactions_list_move_transaction_to_account ( gint transaction_number,
-							     gint target_account )
+                        gint target_account )
 {
     gint source_account;
     gint contra_transaction_number;
@@ -2783,8 +2785,8 @@
  * \return FALSE
  * */
 gboolean gsb_transactions_list_title_column_button_press ( GtkWidget *button,
-							   GdkEventButton *ev,
-							   gint *no_column )
+                        GdkEventButton *ev,
+                        gint *no_column )
 {
     GtkWidget *menu, *menu_item;
     gint i;
@@ -2899,7 +2901,7 @@
  * \return FALSE
  * */
 gboolean gsb_transactions_list_change_sort_type ( GtkWidget *menu_item,
-						  gint *no_column )
+                        gint *no_column )
 {
     gint column_number;
     gint account_number;
@@ -2942,7 +2944,7 @@
  * \return FALSE
  * */
 gboolean gsb_transactions_list_change_sort_column ( GtkTreeViewColumn *tree_view_column,
-						    gint *column_ptr )
+                        gint *column_ptr )
 {
     GtkSortType sort_type;
     gint current_column;
@@ -3142,9 +3144,9 @@
  * \return TRUE if the transaction should be shown, FALSE else
  * */
 gboolean gsb_transactions_list_transaction_visible ( gpointer transaction_ptr,
-						     gint account_number,
-						     gint line_in_transaction,
-						     gint what_is_line )
+                        gint account_number,
+                        gint line_in_transaction,
+                        gint what_is_line )
 {
     gint transaction_number;
     gint r_shown;
@@ -3271,7 +3273,7 @@
  * \return FALSE
  * */
 gboolean gsb_transactions_list_restore_archive ( gint archive_number,
-						 gboolean show_warning )
+                        gboolean show_warning )
 {
     GSList *tmp_list;
     gint account_number;
@@ -3284,8 +3286,8 @@
 
     orphan_child_transactions = NULL;
 
-    /* second step, we add all the archived transactions of that archive into the transactions_list
-     * and into the store */
+    /* second step, we add all the archived transactions of that archive into the
+     * transactions_list and into the store */
     tmp_list = gsb_data_transaction_get_complete_transactions_list ();
     while (tmp_list)
     {
@@ -3371,8 +3373,8 @@
  * \return FALSE
  * */
 gboolean gsb_transactions_list_size_allocate ( GtkWidget *tree_view,
-					       GtkAllocation *allocation,
-					       gpointer null )
+                        GtkAllocation *allocation,
+                        gpointer null )
 {
     gint i;
 

Index: gsb_file.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gsb_file.h	21 Oct 2008 21:16:36 -0000	1.6
+++ gsb_file.h	21 May 2009 21:58:55 -0000	1.7
@@ -6,9 +6,9 @@
 
 /* START_DECLARATION */
 gboolean gsb_file_automatic_backup_change_time ( GtkWidget *spinbutton,
-						 gpointer null );
+                        gpointer null );
 gboolean gsb_file_automatic_backup_start ( GtkWidget *checkbutton,
-					   gpointer null );
+                        gpointer null );
 gboolean gsb_file_close ( void );
 const gchar *gsb_file_get_backup_path ( void );
 const gchar *gsb_file_get_last_path ( void );
@@ -16,7 +16,7 @@
 gboolean gsb_file_new_finish ( void );
 void gsb_file_new_gui ( void );
 gboolean gsb_file_open_direct_menu ( GtkMenuItem *item,
-				     gint *file_number_ptr );
+                        gint *file_number_ptr );
 gboolean gsb_file_open_file ( gchar *filename );
 gboolean gsb_file_open_menu ( void );
 void gsb_file_remove_name_from_opened_list ( gchar *filename );

Index: gsb_data_archive.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_archive.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- gsb_data_archive.c	30 Sep 2008 15:32:22 -0000	1.14
+++ gsb_data_archive.c	21 May 2009 21:58:55 -0000	1.15
@@ -1,9 +1,9 @@
 /* ************************************************************************** */
 /*                                                                            */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2007 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2007 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2007 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -224,15 +224,15 @@
     archive = g_malloc0 ( sizeof ( struct_archive ));
     if (!archive)
     {
-	dialogue_error_memory ();
-	return 0;
+    dialogue_error_memory ();
+    return 0;
     }
     archive -> archive_number = gsb_data_archive_max_number () + 1;
 
     if (name)
-	archive -> archive_name = my_strdup (name);
+    archive -> archive_name = my_strdup (name);
     else 
-	archive -> archive_name = NULL;
+    archive -> archive_name = NULL;
 
     archive_list = g_slist_append ( archive_list, archive );
     archive_buffer = archive;
@@ -312,14 +312,14 @@
  * \return the new number or 0 if the archive doen't exist
  * */
 gint gsb_data_archive_set_new_number ( gint archive_number,
-				       gint new_no_archive )
+                        gint new_no_archive )
 {
     struct_archive *archive;
 
     archive = gsb_data_archive_get_structure ( archive_number );
 
     if (!archive)
-	return 0;
+    return 0;
 
     archive -> archive_number = new_no_archive;
     return new_no_archive;
@@ -374,7 +374,7 @@
  * \return TRUE if ok or FALSE if problem
  * */
 gboolean gsb_data_archive_set_name ( gint archive_number,
-				     const gchar *name )
+                        const gchar *name )
 {
     struct_archive *archive;
 
@@ -425,7 +425,7 @@
  * \return TRUE if ok or FALSE if problem
  * */
 gboolean gsb_data_archive_set_beginning_date ( gint archive_number,
-					      const GDate *date )
+                        const GDate *date )
 {
     struct_archive *archive;
 
@@ -475,7 +475,7 @@
  * \return TRUE if ok or FALSE if problem
  * */
 gboolean gsb_data_archive_set_end_date ( gint archive_number,
-					 const GDate *date )
+                        const GDate *date )
 {
     struct_archive *archive;
 
@@ -523,7 +523,7 @@
  * \return TRUE if ok or FALSE if problem
  * */
 gboolean gsb_data_archive_set_fyear ( gint archive_number,
-				      gint fyear_number )
+                        gint fyear_number )
 {
     struct_archive *archive;
 
@@ -567,7 +567,7 @@
  * \return TRUE if ok or FALSE if problem
  * */
 gboolean gsb_data_archive_set_report_title ( gint archive_number,
-					     const gchar *report_title )
+                        const gchar *report_title )
 {
     struct_archive *archive;
 

Index: gsb_real_cunit.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real_cunit.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- gsb_real_cunit.c	21 May 2009 09:04:48 -0000	1.10
+++ gsb_real_cunit.c	21 May 2009 21:58:55 -0000	1.11
@@ -33,12 +33,18 @@
 /* START_INCLUDE */
 #include "gsb_real_cunit.h"
 #include "./gsb_real.h"
+#include "./gsb_real.h"
 /* END_INCLUDE */
 
 /* START_STATIC */
 static void gsb_real_cunit__gsb_real_add ( void );
 static void gsb_real_cunit__gsb_real_get_from_string ( void );
+static void gsb_real_cunit__gsb_real_mul();
+static void gsb_real_cunit__gsb_real_normalize();
 static void gsb_real_cunit__gsb_real_raw_format_string ( void );
+static void gsb_real_cunit__gsb_real_raw_get_from_string();
+static void gsb_real_cunit__gsb_real_raw_get_from_string__locale();
+static void gsb_real_cunit__gsb_real_sub();
 static int gsb_real_cunit_clean_suite ( void );
 static int gsb_real_cunit_init_suite ( void );
 /* END_STATIC */

Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- gsb_account_property.c	19 May 2009 18:24:58 -0000	1.42
+++ gsb_account_property.c	21 May 2009 21:58:55 -0000	1.43
@@ -38,7 +38,6 @@
 #include "./dialog.h"
 #include "./gsb_account.h"
 #include "./gsb_autofunc.h"
-#include "./gsb_automem.h"
 #include "./gsb_bank.h"
 #include "./utils_buttons.h"
 #include "./gsb_currency.h"
@@ -49,10 +48,8 @@
 #include "./utils_editables.h"
 #include "./gsb_form.h"
 #include "./gsb_form_scheduler.h"
-#include "./fenetre_principale.h"
 #include "./navigation.h"
 #include "./menu.h"
-#include "./gsb_real.h"
 #include "./gsb_scheduler_list.h"
 #include "./main.h"
 #include "./traitement_variables.h"
@@ -64,7 +61,6 @@
 #include "./transaction_list.h"
 #include "./structures.h"
 #include "./gsb_transactions_list.h"
-#include "./utils_buttons.h"
 #include "./accueil.h"
 #include "./gsb_data_transaction.h"
 #include "./gsb_form_scheduler.h"
@@ -193,7 +189,6 @@
     GtkWidget *label, *scrolled_window_text, *paddingbox;
     GtkSizeGroup * size_group;
     GtkWidget *align;
-    //~ GtkWidget *hbox_account, *vbox_account, *button = NULL;
 
     devel_debug ( NULL );
 
@@ -226,31 +221,10 @@
 
     /* création de la ligne des détails du compte */
     paddingbox = new_paddingbox_with_title (vbox, FALSE, _("Account details"));
-    //~ paddingbox = new_paddingbox_with_title (vbox, TRUE, _("Account details"));
     
-    //~ hbox_account = hbox = gtk_hbox_new ( FALSE, 6 );
-    //~ gtk_box_pack_start ( GTK_BOX(paddingbox), hbox_account, FALSE, FALSE, 0 );
-
-    /* Ajout d'un sélecteur d'icône pour les comptes */
-    //~ align = gtk_alignment_new (0.5,0.5,0.5,0.5);
-    //~ gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), align );
-    //~ gtk_box_pack_start ( GTK_BOX(hbox_account), align, FALSE, FALSE, 0);
-
-    //~ button = gsb_automem_imagefile_button_new ( GSB_BUTTON_ICON,
-                        //~ NULL,
-                        //~ "ac_bank.png",
-                        //~ G_CALLBACK(gsb_data_account_change_account_icon),
-                        //~ button );
-    //~ gtk_widget_set_size_request ( button, -1, 40 );
-    //~ gtk_container_add (GTK_CONTAINER (align), button);
-
-    //~ vbox_account = gtk_vbox_new ( FALSE, 5 );
-    //~ gtk_box_pack_start ( GTK_BOX(hbox_account), vbox_account, TRUE, TRUE, 0);
-
-    /* création de la ligne du nom du compte */
+   /* création de la ligne du nom du compte */
     hbox = gtk_hbox_new ( FALSE, 6 );
     gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
-    //~ gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
 
     label = gtk_label_new ( COLON(_("Account name")) );
     gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -267,12 +241,10 @@
                         "destroy",
                         G_CALLBACK ( gtk_widget_destroyed),
                         &detail_nom_compte );
-    //~ g_object_set_data ( G_OBJECT ( detail_nom_compte), "ac_icon_button", button);
 
     /* create the box of kind of account */
     hbox = gtk_hbox_new ( FALSE, 6 );
     gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
-    //~ gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
 
     label = gtk_label_new ( COLON(_("Account type")) );
     gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -295,7 +267,6 @@
     /* create the currency line */
     hbox = gtk_hbox_new ( FALSE, 6 );
     gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
-    //~ gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
 
     label = gtk_label_new ( COLON(_("Account currency")) );
     gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -326,7 +297,6 @@
                         G_CALLBACK ( gtk_widget_destroyed),
                         &detail_compte_cloture );
     gtk_box_pack_start ( GTK_BOX(paddingbox), detail_compte_cloture, FALSE, FALSE, 0 );
-    //~ gtk_box_pack_start ( GTK_BOX ( vbox_account ), detail_compte_cloture, FALSE, FALSE, 0 );
 
     /* set the callback for the button_icon */
     g_signal_connect ( G_OBJECT (bouton_icon ),
@@ -700,8 +670,6 @@
     /* modification pour mettre à jour l'icône du sélecteur d'icône du compte */
     image = gsb_data_account_get_account_icon_image ( current_account );
     gtk_button_set_image ( GTK_BUTTON ( bouton_icon ), image );
-    //~ gtk_button_set_image ( GTK_BUTTON ( g_object_get_data ( 
-                        //~ G_OBJECT ( detail_nom_compte), "ac_icon_button" ) ), image );
 
     gsb_autofunc_currency_set_currency_number (detail_devise_compte,
                         gsb_data_account_get_currency (current_account), current_account);
@@ -831,8 +799,8 @@
         gsb_menu_update_accounts_in_menus ();
 
         /* update the name of accounts in form */
-        gsb_account_update_combo_list ( gsb_form_scheduler_get_element_widget (SCHEDULED_FORM_ACCOUNT),
-                        FALSE );
+        gsb_account_update_combo_list ( gsb_form_scheduler_get_element_widget (
+                        SCHEDULED_FORM_ACCOUNT), FALSE );
 
         /* Replace trees contents. */
         remplit_arbre_categ ();
@@ -844,8 +812,6 @@
         gsb_gui_navigation_update_account ( account_number );
         image = gsb_data_account_get_account_icon_image ( account_number );
         gtk_button_set_image ( GTK_BUTTON ( bouton_icon ), image );
-        //~ gtk_button_set_image ( GTK_BUTTON ( g_object_get_data ( 
-                        //~ G_OBJECT ( detail_nom_compte), "ac_icon_button" ) ), image );
         gsb_form_clean(gsb_form_get_account_number ());
         break;
 



More information about the cvs mailing list