[grisbi-cvs] [SCM] grisbi branch, grisbi-gtk3, updated. upstream_version_0_9_4-117-g0b82a64

Pierre Biava nobody at users.sourceforge.net
Sun Dec 18 22:27:48 CET 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, grisbi-gtk3 has been updated
       via  0b82a64ec5edec7aa36fc4fb143b99a20d3475ee (commit)
       via  23fd3efe2b70d9caa46f54335dd11965878172a2 (commit)
       via  37495ed9166940b1eb4c8e2a7cd975f5bc8fe590 (commit)
      from  e5dadb354d2cbb230eae4d0cfb5ddebd0317e6ea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0b82a64ec5edec7aa36fc4fb143b99a20d3475ee
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Dec 18 22:18:45 2011 +0100

    Rewrote the configuration part of the reports

commit 23fd3efe2b70d9caa46f54335dd11965878172a2
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Dec 18 20:52:31 2011 +0100

    deleting browse_file function

commit 37495ed9166940b1eb4c8e2a7cd975f5bc8fe590
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Dec 18 20:17:31 2011 +0100

    deleting files go-optionmenu and go-charmap-sel

-----------------------------------------------------------------------

Changes:
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c5a9b51..3830ee2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -18,6 +18,7 @@ src/erreur.c
 src/etats_affiche.c
 src/etats_calculs.c
 src/etats_config.c
+src/etats_config_ui.c
 src/etats_csv.c
 src/etats_gtktable.c
 src/etats_html.c
@@ -142,4 +143,5 @@ src/utils_font.c
 src/utils_operations.c
 src/utils_str.c
 [type: gettext/glade]src/ui/bet_graph.ui
+[type: gettext/glade]src/ui/etats_config.ui
 share/grisbi.desktop.in
diff --git a/src/Makefile.am b/src/Makefile.am
index be30e36..a6c706b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,6 +31,7 @@ libgrisbi_la_SOURCES = \
 	etats_affiche.c		\
 	etats_calculs.c		\
 	etats_config.c		\
+	etats_config_ui.c \
 	etats_csv.c		\
 	etats_gtktable.c	\
 	etats_html.c		\
@@ -41,8 +42,6 @@ libgrisbi_la_SOURCES = \
 	fenetre_principale.c	\
 	file_obfuscate.c	\
 	file_obfuscate_qif.c	\
-	go-charmap-sel.c	\
-	go-optionmenu.c		\
 	grisbi_osx.c \
 	gsb_account.c		\
 	gsb_account_property.c	\
@@ -184,8 +183,6 @@ libgrisbi_la_SOURCES = \
 	etats_html.h            \
 	export.h                \
 	export_csv.h            \
-	go-charmap-sel.h        \
-	go-optionmenu.h         \
 	grisbi_osx.h \
 	gsb_account.h		\
 	gsb_account_property.h	\
@@ -265,6 +262,7 @@ libgrisbi_la_SOURCES = \
 	dialog.h		\
 	etats_calculs.h		\
 	etats_config.h		\
+	etats_config_ui.h		\
 	etats_gtktable.h	\
 	etats.h			\
 	etats_onglet.h		\
diff --git a/src/etats_affiche.c b/src/etats_affiche.c
index 98904c4..4271a71 100644
--- a/src/etats_affiche.c
+++ b/src/etats_affiche.c
@@ -2345,7 +2345,7 @@ gint etat_affiche_affiche_totaux_sous_jaccent ( gint origine,
 
     /* on doit partir du bout de la liste pour revenir vers la structure demandée */
     
-    pointeur_glist = g_slist_reverse (g_slist_copy ( gsb_data_report_get_sorting_type (current_report_number)));
+    pointeur_glist = g_slist_reverse (g_slist_copy ( gsb_data_report_get_sorting_type_list (current_report_number)));
 
     while ( GPOINTER_TO_INT ( pointeur_glist -> data ) != origine )
     {
diff --git a/src/etats_calculs.c b/src/etats_calculs.c
index 47eff39..0995913 100644
--- a/src/etats_calculs.c
+++ b/src/etats_calculs.c
@@ -85,51 +85,54 @@ extern gint ancien_tiers_etat;
 
 
 /*START_EXTERN*/
-extern gint ancien_compte_etat;
-extern gint ancienne_categ_etat;
-extern gint ancienne_categ_speciale_etat;
-extern gint ancienne_ib_etat;
-extern gint ancienne_sous_categ_etat;
-extern gint ancienne_sous_ib_etat;
-extern gint changement_de_groupe_etat;
-extern GDate *date_debut_periode;
-extern gint debut_affichage_etat;
-extern gint devise_categ_etat;
-extern gint devise_compte_en_cours_etat;
-extern gint devise_generale_etat;
-extern gint devise_ib_etat;
-extern gint devise_tiers_etat;
-extern gint exo_en_cours_etat;
 extern struct struct_etat_affichage gtktable_affichage;
 extern gint ligne_debut_partie;
-extern gsb_real montant_categ_etat;
-extern gsb_real montant_compte_etat;
-extern gsb_real montant_exo_etat;
-extern gsb_real montant_ib_etat;
-extern gsb_real montant_periode_etat;
-extern gsb_real montant_sous_categ_etat;
-extern gsb_real montant_sous_ib_etat;
-extern gsb_real montant_tiers_etat;
 extern gint nb_colonnes;
-extern gint nb_ope_categ_etat;
-extern gint nb_ope_compte_etat;
-extern gint nb_ope_exo_etat;
-extern gint nb_ope_general_etat;
-extern gint nb_ope_ib_etat;
-extern gint nb_ope_partie_etat;
-extern gint nb_ope_periode_etat;
-extern gint nb_ope_sous_categ_etat;
-extern gint nb_ope_sous_ib_etat;
-extern gint nb_ope_tiers_etat;
-extern const gchar *nom_categ_en_cours;
-extern const gchar *nom_compte_en_cours;
-extern const gchar *nom_ib_en_cours;
-extern const gchar *nom_ss_categ_en_cours;
-extern const gchar *nom_ss_ib_en_cours;
-extern const gchar *nom_tiers_en_cours;
 extern gsb_real null_real;
 /*END_EXTERN*/
 
+/* VARIABLES À TRAITER */
+gint ancienne_ib_etat;
+gint ancienne_sous_ib_etat;
+gint ancienne_categ_etat;
+gint ancienne_categ_speciale_etat;
+gint ancienne_sous_categ_etat;
+gint ancien_compte_etat;
+gsb_real montant_categ_etat;
+gsb_real montant_sous_categ_etat;
+gsb_real montant_ib_etat;
+gsb_real montant_sous_ib_etat;
+gsb_real montant_compte_etat;
+gsb_real montant_tiers_etat;
+gsb_real montant_periode_etat;
+gsb_real montant_exo_etat;
+gint nb_ope_categ_etat;
+gint nb_ope_sous_categ_etat;
+gint nb_ope_ib_etat;
+gint nb_ope_sous_ib_etat;
+gint nb_ope_compte_etat;
+gint nb_ope_tiers_etat;
+gint nb_ope_periode_etat;
+gint nb_ope_exo_etat;
+gint nb_ope_general_etat;
+gint nb_ope_partie_etat;
+GDate *date_debut_periode;
+gint exo_en_cours_etat;
+gint changement_de_groupe_etat;
+gint debut_affichage_etat;
+gint devise_compte_en_cours_etat;
+gint devise_categ_etat;
+gint devise_ib_etat;
+gint devise_tiers_etat;
+gint devise_generale_etat;
+
+const gchar *nom_categ_en_cours;
+const gchar *nom_ss_categ_en_cours;
+const gchar *nom_ib_en_cours;
+const gchar *nom_ss_ib_en_cours;
+const gchar *nom_compte_en_cours;
+const gchar *nom_tiers_en_cours;
+
 
 /*****************************************************************************************************/
 void affichage_etat ( gint report_number, struct struct_etat_affichage * affichage,
@@ -276,7 +279,7 @@ GSList *recupere_opes_etat ( gint report_number )
 
 		if ( !gsb_data_report_get_account_use_chosen (report_number)
 		     ||
-		     g_slist_index ( gsb_data_report_get_account_numbers (report_number),
+		     g_slist_index ( gsb_data_report_get_account_numbers_list (report_number),
 				     GINT_TO_POINTER ( i )) != -1 )
 		{
 		    GSList *list_tmp_transactions;
@@ -349,7 +352,7 @@ GSList *recupere_opes_etat ( gint report_number )
 
 	if ( !gsb_data_report_get_account_use_chosen (report_number)
 	     ||
-	     g_slist_index ( gsb_data_report_get_account_numbers (report_number),
+	     g_slist_index ( gsb_data_report_get_account_numbers_list (report_number),
 			     GINT_TO_POINTER ( i )) != -1 )
 	{
 	    /* 	  le compte est bon, passe à la suite de la sélection */
@@ -616,7 +619,7 @@ GSList *recupere_opes_etat ( gint report_number )
 				/*    si on ne détaille pas les comptes, on ne cherche pas, l'opé est refusée */
 				if ( gsb_data_report_get_account_use_chosen (report_number))
 				{
-				    if ( g_slist_index ( gsb_data_report_get_account_numbers (report_number),
+				    if ( g_slist_index ( gsb_data_report_get_account_numbers_list (report_number),
 							 GINT_TO_POINTER ( gsb_data_transaction_get_contra_transaction_account ( transaction_number_tmp))) != -1 )
 					goto operation_refusee;
 				}
@@ -627,7 +630,7 @@ GSList *recupere_opes_etat ( gint report_number )
 			    {
 				/* on inclut l'opé que si le compte de virement est dans la liste */
 
-				if ( g_slist_index ( gsb_data_report_get_transfer_account_numbers (report_number),
+				if ( g_slist_index ( gsb_data_report_get_transfer_account_numbers_list (report_number),
 						     GINT_TO_POINTER ( gsb_data_transaction_get_contra_transaction_account ( transaction_number_tmp))) == -1 )
 				    goto operation_refusee;
 
@@ -652,7 +655,7 @@ GSList *recupere_opes_etat ( gint report_number )
 			/* it's a normal categ (or not categ) */
 			gsb_data_report_get_category_detail_used (report_number)
 			&&
-			!gsb_data_report_check_categ_budget_in_report (gsb_data_report_get_category_struct (report_number),
+			!gsb_data_report_check_categ_budget_in_report (gsb_data_report_get_category_struct_list (report_number),
 								       gsb_data_transaction_get_category_number (transaction_number_tmp),
 								       gsb_data_transaction_get_sub_category_number (transaction_number_tmp)))
 			goto operation_refusee;
@@ -661,7 +664,7 @@ GSList *recupere_opes_etat ( gint report_number )
 		    /* check the buget */
 		    if ((gsb_data_report_get_budget_detail_used (report_number)
 			 &&
-			 !gsb_data_report_check_categ_budget_in_report (gsb_data_report_get_budget_struct (report_number),
+			 !gsb_data_report_check_categ_budget_in_report (gsb_data_report_get_budget_struct_list (report_number),
 									gsb_data_transaction_get_budgetary_number (transaction_number_tmp),
 									gsb_data_transaction_get_sub_budgetary_number (transaction_number_tmp))))
 			goto operation_refusee;
@@ -669,7 +672,7 @@ GSList *recupere_opes_etat ( gint report_number )
 		    /* vérification du tiers */
 		    if ( gsb_data_report_get_payee_detail_used (report_number)
 			 &&
-			 g_slist_index ( gsb_data_report_get_payee_numbers (report_number),
+			 g_slist_index ( gsb_data_report_get_payee_numbers_list (report_number),
 					 GINT_TO_POINTER ( gsb_data_transaction_get_party_number ( transaction_number_tmp))) == -1 )
 			goto operation_refusee;
 
@@ -1428,7 +1431,7 @@ gint classement_liste_opes_etat ( gpointer transaction_1, gpointer transaction_2
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
-    pointeur = gsb_data_report_get_sorting_type (current_report_number);
+    pointeur = gsb_data_report_get_sorting_type_list (current_report_number);
 
 classement_suivant:
 
@@ -1978,7 +1981,7 @@ void etape_finale_affichage_etat ( GSList *ope_selectionnees,
     liste_ope_revenus = NULL;
     liste_ope_depenses = NULL;
     pointeur_tmp = ope_selectionnees;
-    pointeur_glist = gsb_data_report_get_sorting_type (current_report_number);
+    pointeur_glist = gsb_data_report_get_sorting_type_list (current_report_number);
 
     if ( gsb_data_report_get_split_credit_debit (current_report_number))
     {
@@ -2350,7 +2353,7 @@ pas_decalage:
 
 	    transaction_number = gsb_data_transaction_get_transaction_number (pointeur_tmp -> data);
 
-	    pointeur_glist = gsb_data_report_get_sorting_type (current_report_number);
+	    pointeur_glist = gsb_data_report_get_sorting_type_list (current_report_number);
 
 	    while ( pointeur_glist )
 	    {
@@ -2531,14 +2534,15 @@ pas_decalage:
 						     ligne,
 						     1 );
 
-	ligne = etat_affiche_affiche_totaux_sous_jaccent ( GPOINTER_TO_INT ( gsb_data_report_get_sorting_type (current_report_number)-> data ),
-							   ligne );
+	ligne = etat_affiche_affiche_totaux_sous_jaccent ( GPOINTER_TO_INT (
+                        gsb_data_report_get_sorting_type_list (current_report_number)-> data ),
+                        ligne );
 
 
 	/* on ajoute le total de la structure racine */
 
 
-	switch ( GPOINTER_TO_INT ( gsb_data_report_get_sorting_type (current_report_number)-> data ))
+	switch ( GPOINTER_TO_INT ( gsb_data_report_get_sorting_type_list (current_report_number)-> data ))
 	{
 	    case 1:
 		ligne = etat_affiche_affiche_total_categories ( ligne );
@@ -2601,7 +2605,7 @@ void denote_struct_sous_jaccentes ( gint origine )
     /* on peut partir du bout de la liste pour revenir vers la structure demandée */
     /* gros vulgaire copier coller de la fonction précédente */
 
-    pointeur_glist = g_slist_reverse (g_slist_copy ( gsb_data_report_get_sorting_type (current_report_number)));
+    pointeur_glist = g_slist_reverse (g_slist_copy ( gsb_data_report_get_sorting_type_list (current_report_number)));
 
     while ( GPOINTER_TO_INT ( pointeur_glist -> data ) != origine )
     {
diff --git a/src/etats_config.c b/src/etats_config.c
index ff4c27b..db3e294 100644
--- a/src/etats_config.c
+++ b/src/etats_config.c
@@ -1,10 +1,9 @@
 /* ************************************************************************** */
-/* Ce fichier s'occupe de la configuration des états                          */
-/*                      etats_config.c                                        */
 /*                                                                            */
 /*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
-/*          2006-2008 Benjamin Drieu (bdrieu at april.org)                       */
-/*          http://www.grisbi.org/                                            */
+/*                      2003-2008 Benjamin Drieu (bdrieu at april.org)           */
+/*          2008-2011 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      */
@@ -22,19 +21,23 @@
 /*                                                                            */
 /* ************************************************************************** */
 
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
-#include "include.h"
 #include <glib/gi18n.h>
+#include <gtk/gtk.h>
+
 
 /*START_INCLUDE*/
 #include "etats_config.h"
-#include "etats_calculs.h"
-#include "tiers_onglet.h"
-#include "utils.h"
 #include "dialog.h"
+#include "etats_calculs.h"
+#include "etats_config.h"
+#include "etats_config_ui.h"
+#include "etats_onglet.h"
+#include "fenetre_principale.h"
 #include "gsb_calendar_entry.h"
 #include "gsb_currency.h"
 #include "gsb_data_account.h"
@@ -43,7428 +46,3757 @@
 #include "gsb_data_fyear.h"
 #include "gsb_data_payee.h"
 #include "gsb_data_payment.h"
-#include "gsb_data_report_amout_comparison.h"
 #include "gsb_data_report.h"
+#include "gsb_data_report_amout_comparison.h"
 #include "gsb_data_report_text_comparison.h"
 #include "gsb_file.h"
 #include "gsb_form_widget.h"
+#include "navigation.h"
+#include "structures.h"
+#include "utils.h"
+#include "utils_buttons.h"
 #include "utils_dates.h"
+#include "utils_gtkbuilder.h"
 #include "utils_real.h"
-#include "navigation.h"
-#include "gsb_real.h"
-#include "traitement_variables.h"
 #include "utils_str.h"
-#include "structures.h"
-#include "fenetre_principale.h"
 #include "erreur.h"
 /*END_INCLUDE*/
 
+
 /*START_STATIC*/
-static void ajoute_ligne_liste_comparaisons_montants_etat ( gint last_amount_comparison_number );
-static void ajoute_ligne_liste_comparaisons_textes_etat ( gint last_text_comparison_number );
-static void change_comparaison_montant ( GtkWidget *menu_item,
-				  gint amount_comparison_number );
-static void change_comparaison_texte ( GtkWidget *menu_item,
-				gint text_comparison_number );
-static gint classement_alphabetique_tree ( GtkWidget *tree,
-                        GtkCListRow *ligne_1,
-                        GtkCListRow *ligne_2 );
-static void click_bas_classement_etat ( void );
-static void click_haut_classement_etat ( void );
-static void click_liste_etat ( GtkCList *liste,
-			GdkEventButton *evenement,
-			gint origine );
-static GtkWidget *cree_bouton_champ ( gint text_comparison_number );
-static GtkWidget *cree_bouton_comparateur_montant ( gint amount_comparison_number );
-static GtkWidget *cree_bouton_comparateur_texte ( gint text_comparison_number );
-static GtkWidget *cree_bouton_lien ( GtkWidget *hbox );
-static GtkWidget *cree_bouton_lien_lignes_comparaison ( void );
-static GtkWidget *cree_bouton_operateur_txt ( gint text_comparison_number );
-static GtkWidget *cree_ligne_comparaison_montant ( gint amount_comparison_number );
-static GtkWidget *cree_ligne_comparaison_texte ( gint text_comparison_number );
-static void etat_option_menu_changed (GtkWidget *optionmenu, GtkWidget *user_data);
-static GtkWidget *onglet_affichage_etat_devises ( void );
-static GtkWidget *onglet_affichage_etat_divers ( void );
-static GtkWidget *onglet_affichage_etat_generalites ( void );
-static GtkWidget *onglet_affichage_etat_operations ( void );
-static GtkWidget *onglet_etat_categories ( void );
-static GtkWidget *onglet_etat_comptes ( void );
-static GtkWidget *onglet_etat_dates ( void );
-static GtkWidget *onglet_etat_divers ( void );
-static GtkWidget *onglet_etat_ib ( void );
-static GtkWidget *onglet_etat_mode_paiement ( void );
-static GtkWidget *onglet_etat_montant ( void );
-static GtkWidget *onglet_etat_texte ( void );
-static GtkWidget *onglet_etat_tiers ( void );
-static GtkWidget *onglet_etat_virements ( void );
-static GtkWidget *page_data_grouping ( void );
-static GtkWidget *page_data_separation ( void );
-static void recuperation_info_perso_etat ( void );
-static void remplissage_liste_comptes_etats ( void );
-static void remplissage_liste_comptes_virements ( void );
-static void remplissage_liste_exo_etats ( void );
-static void remplissage_liste_modes_paiement_etats ( void );
-static void remplissage_liste_tiers_etats ( void );
-static void remplit_liste_comparaisons_montants_etat ( void );
-static void remplit_liste_comparaisons_textes_etat ( void );
-static gboolean report_config_budget_select_all ( GtkWidget *button,
-						  gboolean *select_ptr );
-static gboolean report_config_budget_select_type ( GtkWidget *button,
-						   gboolean *type_ptr );
-static GSList *report_config_categ_budget_get_selected ( gboolean is_categ );
-static gboolean report_config_categ_budget_toggled ( GtkCellRendererToggle *radio_renderer,
-						     gchar *path_str,
-						     GtkTreeStore *store );
-static gboolean report_config_category_select_all ( GtkWidget *button,
-						    gboolean *select_ptr );
-static gboolean report_config_category_select_type ( GtkWidget *button,
-						     gboolean *type_ptr );
-static void report_config_category_toggle_categ ( struct_categ_budget_sel *categ_budget_struct,
-						  gboolean is_categ );
-static void report_config_category_update_treeview ( gboolean is_categ );
-static GtkWidget *report_config_create_categ_budget_list ( void );
-static gboolean report_config_fill_categ_budget_list ( gboolean is_categ );
-static gboolean report_config_mix_select_all ( GtkTreeModel *model,
-					       gboolean toggle_value );
-static gboolean report_config_mix_select_type ( gboolean is_categ,
-						gboolean type );
-static void report_config_mixed_list_add_div ( gboolean is_categ,
-					       const gchar *name,
-					       gint number );
-static void report_config_mixed_list_add_sub_div ( gboolean is_categ,
-						   const gchar *name,
-						   gint number );
-static gboolean report_tree_selectable_func (GtkTreeSelection *selection,
-				      GtkTreeModel *model,
-				      GtkTreePath *path,
-				      gboolean path_currently_selected,
-				      gpointer data);
-static gboolean report_tree_update_style ( gint * page_number );
-static gboolean report_tree_update_style_iterator ( GtkTreeModel * tree_model,
-					     GtkTreePath *path,
-					     GtkTreeIter *iter,
-					     gpointer data );
-static gboolean report_tree_view_selection_changed ( GtkTreeSelection *selection,
-					      GtkTreeModel *model );
-static void retire_ligne_liste_comparaisons_montants_etat ( gint last_amount_comparison_number );
-static void retire_ligne_liste_comparaisons_textes_etat ( gint last_text_comparison_number );
-static void selectionne_devise_categ_etat_courant ( void );
-static void selectionne_devise_ib_etat_courant ( void );
-static void selectionne_devise_tiers_etat_courant ( void );
-static void selectionne_liste_comptes_etat_courant ( void );
-static void selectionne_liste_exo_etat_courant ( void );
-static void selectionne_liste_modes_paiement_etat_courant ( void );
-static void selectionne_liste_tiers_etat_courant ( void );
-static void selectionne_liste_virements_etat_courant ( void );
-static void selectionne_partie_liste_compte_etat ( gint *type_compte );
-static void selectionne_partie_liste_compte_vir_etat ( gint *type_compte );
-static void sensitive_hbox_fonction_bouton_txt ( gint text_comparison_number );
+static gboolean etats_config_initialise_dialog_from_etat ( gint report_number );
+static void etats_config_initialise_onglet_affichage_devises ( gint report_number );
+static void etats_config_initialise_onglet_affichage_generalites ( gint report_number );
+static void etats_config_initialise_onglet_affichage_operations ( gint report_number );
+static void etats_config_initialise_onglet_affichage_titres ( gint report_number );
+
+static void etats_config_initialise_onglet_comptes ( gint report_number );
+static void etats_config_initialise_onglet_data_grouping ( gint report_number );
+static void etats_config_initialise_onglet_data_separation ( gint report_number );
+static void etats_config_initialise_onglet_divers ( gint report_number );
+static void etats_config_initialise_onglet_mode_paiement ( gint report_number );
+static void etats_config_initialise_onglet_montants ( gint report_number );
+static void etats_config_initialise_onglet_periode ( gint report_number );
+static void etats_config_initialise_onglet_textes ( gint report_number );
+static void etats_config_initialise_onglet_tiers ( gint report_number );
+static void etats_config_initialise_onglet_virements ( gint report_number );
+static void etats_config_initialise_onglet_categ_budget ( gint report_number,
+                        gboolean is_categ );
+
+static gboolean etats_config_onglet_categ_budget_fill_model ( GtkTreeModel *model,
+                        gboolean is_categ );
+static GSList *etats_config_onglet_categ_budget_get_selected ( const gchar *treeview_name );
+static void etats_config_onglet_categ_budget_init_treeview ( const gchar *treeview_name,
+                            GSList *tmp_list );
+static gint etats_config_onglet_categ_budget_sort_function ( GtkTreeModel *model,
+                        GtkTreeIter *iter_1,
+                        GtkTreeIter *iter_2,
+                        gpointer ptr );
+static GSList *etats_config_onglet_data_grouping_get_list ( gint report_number );
+static gboolean etats_config_onglet_data_grouping_update_model ( gint report_number );
+
+static void etats_config_onglet_montants_ajoute_ligne_liste_comparaisons ( gint last_amount_comparison_number );
+static void etats_config_onglet_montants_get_buttons_add_remove ( GtkWidget *parent,
+                        gint text_comparison_number );
+static GtkWidget *etats_config_onglet_montants_new_comparison_line ( GtkWidget *parent,
+                        gint amount_comparison_number,
+                        gint with_link );
+static void etats_config_onglet_montants_remplit_liste_comparaisons ( gint report_number );
+static void etats_config_onglet_montants_retire_ligne_liste_comparaisons ( gint last_amount_comparison_number );
+
+static void etats_config_onglet_texte_ajoute_ligne_liste_comparaisons ( gint last_text_comparison_number );
+static void etats_config_combo_lien_nombre_2_changed ( GtkComboBox *combo,
+                        GtkWidget *widget );
+static void etats_config_onglet_texte_combo_texte_changed ( GtkComboBox *combo,
+                        gpointer data );
+static void etats_config_onglet_texte_get_buttons_add_remove ( GtkWidget *parent,
+                        gint text_comparison_number );
+static GtkWidget *etats_config_onglet_texte_new_comparison_line ( GtkWidget *parent,
+                        gint last_text_comparison_number,
+                        gint with_link );
+static void etats_config_onglet_texte_remplit_liste_comparaisons ( gint report_number );
+static void etats_config_onglet_texte_retire_ligne_liste_comparaisons ( gint last_text_comparison_number );
+static void etats_config_onglet_texte_sensitive_hbox_fonction_bouton_txt ( gint text_comparison_number );
+
+static gboolean etats_config_recupere_info_to_etat ( gint report_number );
+static void etats_config_recupere_info_onglet_affichage_devises ( gint report_number );
+static void etats_config_recupere_info_onglet_affichage_generalites ( gint report_number );
+static void etats_config_recupere_info_onglet_affichage_operations ( gint report_number );
+static void etats_config_recupere_info_onglet_affichage_titres ( gint report_number );
+static void etats_config_recupere_info_onglet_comptes ( gint report_number );
+static void etats_config_recupere_info_onglet_data_grouping ( gint report_number );
+static void etats_config_recupere_info_onglet_data_separation ( gint report_number );
+static void etats_config_recupere_info_onglet_divers ( gint report_number );
+static void etats_config_recupere_info_onglet_mode_paiement ( gint report_number );
+static void etats_config_recupere_info_onglet_montants ( gint report_number );
+static void etats_config_recupere_info_onglet_periode ( gint report_number );
+static void etats_config_recupere_info_onglet_textes ( gint report_number );
+static void etats_config_recupere_info_onglet_tiers ( gint report_number );
+static void etats_config_recupere_info_onglet_virements ( gint report_number );
+static void etats_config_recupere_info_onglet_categ_budget ( gint report_number,
+                        gboolean is_categ );
+
+/**********************************************************************************************************************/
+static GtkWidget *etats_config_onglet_etat_montant ( void );
+
+static void etats_config_onglet_etat_combo_set_model ( GtkWidget *combo,
+                        gchar **tab );
 /*END_STATIC*/
 
-/* the def of the columns in the categ and budget list
- * to filter by categ and budget */
+
+/*START_EXTERN*/
+/*END_EXTERN*/
+
+
+/* last_report */
+static gint last_report = -1;
+
+/* the def of the columns in the categ and budget list to filter by categ and budget */
 enum
 {
-    REPORT_CATEG_BUDGET_LIST_NAME = 0,
-    REPORT_CATEG_BUDGET_LIST_ACTIVE,
-    REPORT_CATEG_BUDGET_LIST_ACTIVATABLE,
-    REPORT_CATEG_BUDGET_LIST_NUMBER,
-    REPORT_CATEG_BUDGET_LIST_SUB_NUMBER,
+    GSB_ETAT_CATEG_BUDGET_LIST_NAME = 0,
+    GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE,
+    GSB_ETAT_CATEG_BUDGET_LIST_ACTIVATABLE,
+    GSB_ETAT_CATEG_BUDGET_LIST_NUMBER,
+    GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER,
 
-    REPORT_CATEG_BUDGET_LIST_NB,
+    GSB_ETAT_CATEG_BUDGET_LIST_NB,
 };
 
-enum report_tree_columns {
-    REPORT_TREE_TEXT_COLUMN,
-    REPORT_TREE_PAGE_COLUMN,
-    REPORT_TREE_BOLD_COLUMN,
-    REPORT_TREE_ITALIC_COLUMN,
-    REPORT_TREE_NUM_COLUMNS,
+
+static gchar *champs_type_recherche_texte[] =
+{
+    N_("payee"),
+    N_("payee information"),
+    N_("category"),
+    N_("sub-category"),
+    N_("budgetary line"),
+    N_("sub-budgetary line"),
+    N_("note"),
+    N_("bank reference"),
+    N_("voucher"),
+    N_("cheque number"),
+    N_("reconciliation reference"),
+    NULL
 };
 
 
+static gchar *champs_operateur_recherche_texte[] =
+{
+    N_("contains"),
+    N_("doesn't contain"),
+    N_("begins with"),
+    N_("ends with"),
+    N_("is empty"),
+    N_("isn't empty"),
+    NULL
+};
+
 
+static gchar *champs_lien_lignes_comparaison[] =
+{
+    N_("and"),
+    N_("or"),
+    N_("except"),
+    NULL
+};
 
-/***********************************/
-/* fichier etats_config.c */
-/***********************************/
-
-static gchar *liste_plages_dates[] = {
-    N_("All"),
-    N_("Custom"),
-    N_("Total to now"),
-    N_("Current month"),
-    N_("Current year"),
-    N_("Current month to now"),
-    N_("Current year to now"),
-    N_("Previous month"),
-    N_("Previous year"),
-    N_("Last 30 days"),
-    N_("Last 3 months"),
-    N_("Last 6 months"),
-    N_("Last 12 months"),
-    NULL };
-
-static gchar *jours_semaine[] = {
-    N_("Monday"),
-    N_("Tuesday"),
-    N_("Wednesday"),
-    N_("Thursday"),
-    N_("Friday"),
-    N_("Saturday"),
-    N_("Sunday"),
-    NULL };
-
-static GtkWidget *entree_nom_etat = NULL;
-static GtkWidget *liste_type_classement_etat = NULL;
-static GtkWidget *bouton_opes_r_et_non_r_etat = NULL;
-static GtkWidget *bouton_opes_non_r_etat = NULL;
-static GtkWidget *bouton_opes_r_etat = NULL;
-static GtkWidget *bouton_afficher_opes = NULL;
-static GtkWidget *bouton_afficher_nb_opes = NULL;
-static GtkWidget *bouton_afficher_date_opes = NULL;
-static GtkWidget *bouton_afficher_value_date_opes = NULL;
-static GtkWidget *bouton_afficher_tiers_opes = NULL;
-static GtkWidget *bouton_afficher_categ_opes = NULL;
-static GtkWidget *bouton_afficher_sous_categ_opes = NULL;
-static GtkWidget *bouton_afficher_ib_opes = NULL;
-static GtkWidget *bouton_afficher_sous_ib_opes = NULL;
-static GtkWidget *bouton_afficher_notes_opes = NULL;
-static GtkWidget *bouton_afficher_pc_opes = NULL;
-static GtkWidget *bouton_afficher_infobd_opes = NULL;
-static GtkWidget *bouton_afficher_no_ope = NULL;
-static GtkWidget *bouton_afficher_type_ope = NULL;
-static GtkWidget *bouton_afficher_no_rappr = NULL;
-static GtkWidget *bouton_afficher_no_cheque = NULL;
-static GtkWidget *bouton_afficher_exo_opes = NULL;
-static GtkWidget *bouton_pas_detailler_ventilation = NULL;
-static GtkWidget *bouton_separer_revenus_depenses = NULL;
-static GtkWidget *bouton_devise_general_etat = NULL;
-static GtkWidget *bouton_inclure_dans_tiers = NULL;
-static GtkWidget *bouton_afficher_titres_colonnes = NULL;
-static GtkWidget *bouton_titre_changement = NULL;
-static GtkWidget *bouton_titre_en_haut = NULL;
-static GtkWidget *bouton_choix_classement_ope_etat = NULL;
-static GtkWidget *bouton_rendre_ope_clickables = NULL;
-static GtkWidget *vbox_show_transactions = NULL;
-
-static GtkWidget *radio_button_utilise_exo = NULL;
-static GtkWidget *radio_button_utilise_dates = NULL;
-static GtkWidget *liste_exo_etat = NULL;
-static GtkWidget *vbox_generale_exo_etat = NULL;
-static GtkWidget *bouton_exo_tous = NULL;
-static GtkWidget *bouton_exo_courant = NULL;
-static GtkWidget *bouton_exo_precedent = NULL;
-static GtkWidget *bouton_detaille_exo_etat = NULL;
-static GtkWidget *bouton_separe_exo_etat = NULL;
-static GtkWidget *liste_plages_dates_etat = NULL;
-static GtkWidget *entree_date_init_etat = NULL;
-static GtkWidget *entree_date_finale_etat = NULL;
-static GtkWidget *vbox_utilisation_exo = NULL;
-static GtkWidget *vbox_utilisation_date = NULL;
-static GtkWidget *bouton_separe_plages_etat = NULL;
-static GtkWidget *bouton_type_separe_plages_etat = NULL;
-static GtkWidget *bouton_debut_semaine = NULL;
-
-static GtkWidget *liste_comptes_etat = NULL;
-static GtkWidget *bouton_detaille_comptes_etat = NULL;
-static GtkWidget *vbox_generale_comptes_etat = NULL;
-static GtkWidget *bouton_regroupe_ope_compte_etat = NULL;
-static GtkWidget *bouton_affiche_sous_total_compte = NULL;
-static GtkWidget *bouton_afficher_noms_comptes = NULL;
-
-static GtkWidget *bouton_inclusion_virements_actifs_etat = NULL;
-static GtkWidget *bouton_inclusion_virements_hors_etat = NULL;
-static GtkWidget *bouton_non_inclusion_virements = NULL;
-static GtkWidget *bouton_inclusion_virements_perso = NULL;
-static GtkWidget *liste_comptes_virements = NULL;
-static GtkWidget *bouton_exclure_non_virements_etat = NULL;
-static GtkWidget *hbox_liste_comptes_virements = NULL;
-
-static GtkWidget *button_group_by_categ = NULL;
-static GtkWidget *button_detail_categ = NULL;
-static GtkWidget *hbox_detaille_categ_etat = NULL;
-static GtkWidget *bouton_afficher_sous_categ = NULL;
-static GtkWidget *tree_view_categ = NULL;
-static GtkWidget *bouton_affiche_sous_total_categ = NULL;
-static GtkWidget *bouton_affiche_sous_total_sous_categ = NULL;
-static GtkWidget *bouton_devise_categ_etat = NULL;
-static GtkWidget *bouton_afficher_pas_de_sous_categ = NULL;
-static GtkWidget *bouton_afficher_noms_categ = NULL;
-
-static GtkWidget *bouton_utilise_ib_etat = NULL;
-static GtkWidget *bouton_detaille_ib_etat = NULL;
-static GtkWidget *hbox_detaille_ib_etat = NULL;
-static GtkWidget *tree_view_budget = NULL;
-static GtkWidget *bouton_afficher_sous_ib = NULL;
-static GtkWidget *bouton_affiche_sous_total_ib = NULL;
-static GtkWidget *bouton_affiche_sous_total_sous_ib = NULL;
-static GtkWidget *bouton_devise_ib_etat = NULL;
-static GtkWidget *bouton_afficher_pas_de_sous_ib = NULL;
-static GtkWidget *bouton_afficher_noms_ib = NULL;
-
-static GtkWidget *bouton_utilise_tiers_etat = NULL;
-static GtkWidget *bouton_detaille_tiers_etat = NULL;
-static GtkWidget *hbox_detaille_tiers_etat = NULL;
-static GtkWidget *liste_tiers_etat = NULL;
-static GtkWidget *bouton_affiche_sous_total_tiers = NULL;
-static GtkWidget *bouton_devise_tiers_etat = NULL;
-static GtkWidget *bouton_afficher_noms_tiers = NULL;
-
-static GtkWidget *bouton_utilise_texte = NULL;
-static GtkWidget *vbox_generale_textes_etat = NULL;
-static GtkWidget *liste_textes_etat = NULL;
-
-static GtkWidget *bouton_utilise_montant = NULL;
-static GtkWidget *vbox_generale_montants_etat = NULL;
-static GtkWidget *liste_montants_etat = NULL;
-static GtkWidget *bouton_devise_montant_etat = NULL;
-static GtkWidget *bouton_exclure_ope_nulles_etat = NULL;
-
-gint ancienne_ib_etat;
-gint ancienne_sous_ib_etat;
-gint ancienne_categ_etat;
-gint ancienne_categ_speciale_etat;
-gint ancienne_sous_categ_etat;
-gint ancien_compte_etat;
-gsb_real montant_categ_etat;
-gsb_real montant_sous_categ_etat;
-gsb_real montant_ib_etat;
-gsb_real montant_sous_ib_etat;
-gsb_real montant_compte_etat;
-gsb_real montant_tiers_etat;
-gsb_real montant_periode_etat;
-gsb_real montant_exo_etat;
-gint nb_ope_categ_etat;
-gint nb_ope_sous_categ_etat;
-gint nb_ope_ib_etat;
-gint nb_ope_sous_ib_etat;
-gint nb_ope_compte_etat;
-gint nb_ope_tiers_etat;
-gint nb_ope_periode_etat;
-gint nb_ope_exo_etat;
-gint nb_ope_general_etat;
-gint nb_ope_partie_etat;
-GDate *date_debut_periode;
-gint exo_en_cours_etat;
-gint changement_de_groupe_etat;
-gint debut_affichage_etat;
-gint devise_compte_en_cours_etat;
-gint devise_categ_etat;
-gint devise_ib_etat;
-gint devise_tiers_etat;
-gint devise_generale_etat;
-
-const gchar *nom_categ_en_cours;
-const gchar *nom_ss_categ_en_cours;
-const gchar *nom_ib_en_cours;
-const gchar *nom_ss_ib_en_cours;
-const gchar *nom_compte_en_cours;
-const gchar *nom_tiers_en_cours;
-
-static GtkWidget *bouton_detaille_mode_paiement_etat = NULL;
-static GtkWidget *vbox_mode_paiement_etat = NULL;
-static GtkWidget *liste_mode_paiement_etat = NULL;
-
-
-static GtkTreeStore * report_tree_model = NULL;
-static GtkWidget * report_tree_view = NULL;
-
-/** globals used to speed up the category/budget list
- * and clarify the code */
-static GtkTreeModel *model_categ;
-static GtkTreeModel *model_budget;
-static GtkTreeIter parent_iter;
 
 
-/*START_EXTERN*/
-extern GtkWidget *notebook_config_etat;
-extern GtkWidget *notebook_etats;
-/*END_EXTERN*/
+/*
+static gchar *champs_comparateur_montant[] =
+{
+    N_("equal"),
+    N_("less than"),
+    N_("less than or equal"),
+    N_("greater than"),
+    N_("greater than or equal"),
+    N_("different from"),
+    N_("null"),
+    N_("not null"),
+    N_("positive"),
+    N_("negative"),
+    NULL
+};
+*/
+
+static gchar *champs_comparateur_nombre[] =
+{
+    N_("equal"),
+    N_("less than"),
+    N_("less than or equal"),
+    N_("greater than"),
+    N_("greater than or equal"),
+    N_("different from"),
+    N_("the biggest"),
+    NULL
+};
+
+
+static gchar *champs_lien_nombre_2[] =
+{
+    N_("and"),
+    N_("or"),
+    N_("except"),
+    N_("stop"),
+    NULL
+};
+
+static gchar *champs_comparateur_montant[] =
+{
+    N_("equal"),
+    N_("less than"),
+    N_("less than or equal"),
+    N_("greater than"),
+    N_("greater than or equal"),
+    N_("different from"),
+    N_("null"),
+    N_("not null"),
+    N_("positive"),
+    N_("negative"),
+    NULL
+};
 
 
+/*END*/
 
-/******************************************************************************/
-/* Fontion personnalistation_etat */
-/* affiche la fenetre de personnalisation */
-/******************************************************************************/
-void personnalisation_etat (void)
+/**
+ * affiche la fenetre de personnalisation
+ *
+ * \param
+ *
+ * \return
+ */
+void etats_config_personnalisation_etat ( void )
 {
-    GtkWidget * dialog, *sw, *paned;
+    GtkWidget *dialog;
     GtkWidget *notebook_general;
-    GtkCTreeNode *parent;
-    GSList *list_tmp;
-    gint current_report_number, page = 0;
-    GtkTreeViewColumn *column;
-    GtkCellRenderer *cell;
-    GtkTreeIter iter, iter2;
-    GtkTreeSelection *selection ;
+    gint current_report_number;
+
+    devel_debug (NULL);
 
-    if ( !(current_report_number = gsb_gui_navigation_get_current_report()))
-	return;
+    if ( !( current_report_number = gsb_gui_navigation_get_current_report ( ) ) )
+        return;
 
     notebook_general = gsb_gui_get_general_notebook ( );
-    if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general ) ) != GSB_REPORTS_PAGE )
+    if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
         gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
-    dialog = gtk_dialog_new_with_buttons ( _("Report properties"),
-					   GTK_WINDOW ( run.window ),
-					   GTK_DIALOG_MODAL,
-					   GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-					   GTK_STOCK_OK, GTK_RESPONSE_OK,
-					   NULL );
-
-    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
-    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), TRUE );
-
-    /* Create model */
-    report_tree_model = gtk_tree_store_new ( REPORT_TREE_NUM_COLUMNS,
-					     G_TYPE_STRING,
-					     G_TYPE_INT,
-					     G_TYPE_INT,
-					     G_TYPE_INT );
-    /* Create container + TreeView */
-    sw = gtk_scrolled_window_new (NULL, NULL);
-    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
-					 GTK_SHADOW_IN);
-    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
-				    GTK_POLICY_NEVER,
-				    GTK_POLICY_AUTOMATIC);
-    report_tree_view = gtk_tree_view_new();
-    gtk_tree_view_set_model (GTK_TREE_VIEW (report_tree_view),
-			     GTK_TREE_MODEL (report_tree_model));
-    g_object_unref (G_OBJECT(report_tree_model));
-
-    /* Make column */
-    cell = gtk_cell_renderer_text_new ();
-    column =
-	gtk_tree_view_column_new_with_attributes ("Categories",
-						  cell,
-						  "text", REPORT_TREE_TEXT_COLUMN,
-						  "weight", REPORT_TREE_BOLD_COLUMN,
-						  "style", REPORT_TREE_ITALIC_COLUMN,
-						  NULL);
-    gtk_tree_view_append_column (GTK_TREE_VIEW (report_tree_view),
-				 GTK_TREE_VIEW_COLUMN (column));
-    gtk_tree_view_set_headers_visible ( GTK_TREE_VIEW (report_tree_view), FALSE );
-
-    /* Handle select */
-    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (report_tree_view));
-    g_signal_connect (selection, "changed",
-		      ((GCallback) report_tree_view_selection_changed),
-		      report_tree_model);
-
-    /* Choose which entries will be selectable */
-    gtk_tree_selection_set_select_function ( selection, report_tree_selectable_func,
-					     NULL, NULL );
-
-    /* Put the tree in the scroll */
-    gtk_container_add (GTK_CONTAINER (sw), report_tree_view);
-
-    /* expand all rows after the treeview widget has been realized */
-    g_signal_connect (report_tree_view, "realize",
-		      ((GCallback)gtk_tree_view_expand_all), NULL);
-
-    paned = gtk_hpaned_new();
-    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ), paned,
-			 TRUE, TRUE, 0 );
-    gtk_box_set_spacing ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ), 6 );
-    gtk_container_set_border_width ( GTK_CONTAINER ( paned ), 0 );
-
-    gtk_paned_add1(GTK_PANED(paned), sw);
-
-    /* on commence par créer le notebook parent de la config des états */
-    notebook_config_etat = gtk_notebook_new ();
-    gtk_paned_add2(GTK_PANED(paned), notebook_config_etat );
-
-    gtk_notebook_set_show_tabs ( GTK_NOTEBOOK ( notebook_config_etat ),
-				 FALSE );
-    gtk_notebook_set_show_border ( GTK_NOTEBOOK ( notebook_config_etat ),
-				   FALSE );
-    gtk_container_set_border_width ( GTK_CONTAINER ( notebook_config_etat ), 0 );
-
-    /* on ajoute les onglets dans l'onglet de base correspondant */
-
-    /* remplissage de l'onglet de sélection */
-
-
-    /* Display subtree */
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter, NULL);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter,
-			REPORT_TREE_TEXT_COLUMN, _("Data selection"),
-			REPORT_TREE_PAGE_COLUMN, -1,
-			REPORT_TREE_BOLD_COLUMN, 800,
-			-1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_dates (),
-			       gtk_label_new ( _("Dates") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Dates"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_virements (),
-			       gtk_label_new ( _("Transfers") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Transfers"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_comptes (),
-			       gtk_label_new ( _("Accounts") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Accounts"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_tiers (),
-			       gtk_label_new ( _("Payee") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Payee"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_categories (),
-			       gtk_label_new ( _("Categories") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Categories"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_ib (),
-			       gtk_label_new ( _("Budgetary lines") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Budgetary lines"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_texte (),
-			       gtk_label_new ( _("Texts") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Texts"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_montant (),
-			       gtk_label_new ( _("Amounts") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Amounts"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_mode_paiement (),
-			       gtk_label_new ( _("Payment methods") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Payment methods"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_etat_divers (),
-			       gtk_label_new ( _("Misc.") ) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Miscellaneous"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-
-    /* remplissage de l'onglet d'organisation */
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter, NULL);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter,
-			REPORT_TREE_TEXT_COLUMN, _("Data organization"),
-			REPORT_TREE_PAGE_COLUMN, -1,
-			REPORT_TREE_BOLD_COLUMN, 800, -1);
-
-    /* Data grouping */
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter );
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Data grouping"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       page_data_grouping(),
-			       gtk_label_new (_("Data grouping")) );
-
-    /* Data separation */
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Data separation"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       page_data_separation(),
-			       gtk_label_new (_("Data separation")) );
-
-    /* remplissage de l'onglet d'affichage */
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter, NULL);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter,
-			REPORT_TREE_TEXT_COLUMN, _("Data display"),
-			REPORT_TREE_PAGE_COLUMN, -1,
-			REPORT_TREE_BOLD_COLUMN, 800, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_affichage_etat_generalites (),
-			       gtk_label_new (_("Generalities")) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Generalities"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_affichage_etat_divers (),
-			       gtk_label_new (_("Titles")) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Titles"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_affichage_etat_operations (),
-			       gtk_label_new (_("Transactions")) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Transactions"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook_config_etat ),
-			       onglet_affichage_etat_devises (),
-			       gtk_label_new (_("Currencies")) );
-    gtk_tree_store_append (GTK_TREE_STORE (report_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (report_tree_model), &iter2,
-			REPORT_TREE_TEXT_COLUMN, _("Currencies"),
-			REPORT_TREE_PAGE_COLUMN, page++,
-			REPORT_TREE_BOLD_COLUMN, 400, -1);
-
-
-    /* on va maintenant remplir toutes les infos de l'état */
-
-    /* onglet généralités */
-
-    /* on met le name de l'état */
-    gtk_entry_set_text ( GTK_ENTRY ( entree_nom_etat ),
-			 gsb_data_report_get_report_name (current_report_number) );
-
-    /* on remplit le ctree en fonction du classement courant */
-
-    list_tmp = gsb_data_report_get_sorting_type (current_report_number);
-    parent = NULL;
-    gtk_clist_clear ( GTK_CLIST ( liste_type_classement_etat ));
-
-    while ( list_tmp )
-    {
-	gchar *text[1];
-
-	text[0] = NULL;
-
-	switch ( GPOINTER_TO_INT ( list_tmp -> data ))
-	{
-	    case 1:
-		text[0] = _("Category");
-		break;
-
-	    case 3:
-		text[0] = _("Budgetary line");
-		break;
-
-	    case 5:
-		text[0] = _("Account");
-		break;
-
-	    case 6:
-		text[0] = _("Payee");
-		break;
-
-	}
-
-	if ( text[0] )
-	{
-	    parent = gtk_ctree_insert_node ( GTK_CTREE ( liste_type_classement_etat ),
-					     parent,
-					     NULL,
-					     text,
-					     5,
-					     NULL,
-					     NULL,
-					     NULL,
-					     NULL,
-					     FALSE,
-					     TRUE );
-	    gtk_ctree_node_set_row_data ( GTK_CTREE ( liste_type_classement_etat ),
-					  GTK_CTREE_NODE ( parent ),
-					  list_tmp -> data );
-	}
-
-	list_tmp = list_tmp -> next;
-    }
+    /* Création de la fenetre de dialog */
+    dialog = etats_config_ui_create_dialog ( );
+    if ( dialog == NULL )
+        return;
 
-    gtk_clist_select_row ( GTK_CLIST ( liste_type_classement_etat ),
-			   0,
-			   0 );
+    /* initialisation des données de la fenetre de dialog */
+    etats_config_initialise_dialog_from_etat ( current_report_number );
 
-    if ( gsb_data_report_get_show_r (current_report_number))
-    {
-	if ( gsb_data_report_get_show_r (current_report_number) == 1 )
-	    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_opes_non_r_etat ),
-					   TRUE );
-	else
-	    if (gsb_data_report_get_show_r (current_report_number))
-		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_opes_r_etat ),
-					       TRUE );
-    }
-    else
-	gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_opes_r_et_non_r_etat ),
-				       TRUE );
-
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_opes ),
-				   gsb_data_report_get_show_report_transactions (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_nb_opes ),
-				   gsb_data_report_get_show_report_transaction_amount (current_report_number));
-
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_no_ope ),
-				   gsb_data_report_get_show_report_transaction_number (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_date_opes ),
-				   gsb_data_report_get_show_report_date (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_value_date_opes ),
-				   gsb_data_report_get_show_report_value_date (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_tiers_opes ),
-				   gsb_data_report_get_show_report_payee (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_categ_opes ),
-				   gsb_data_report_get_show_report_category (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_sous_categ_opes ),
-				   gsb_data_report_get_show_report_sub_category (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_type_ope ),
-				   gsb_data_report_get_show_report_method_of_payment (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_ib_opes ),
-				   gsb_data_report_get_show_report_budget (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_sous_ib_opes ),
-				   gsb_data_report_get_show_report_sub_budget (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_no_cheque ),
-				   gsb_data_report_get_show_report_method_of_payment_content (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_notes_opes ),
-				   gsb_data_report_get_show_report_note (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_pc_opes ),
-				   gsb_data_report_get_show_report_voucher (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_no_rappr ),
-				   gsb_data_report_get_show_report_marked (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_infobd_opes ),
-				   gsb_data_report_get_show_report_bank_references (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_pas_detailler_ventilation ),
-				   gsb_data_report_get_not_detail_split (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_separer_revenus_depenses ),
-				   gsb_data_report_get_split_credit_debit (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_exo_opes ),
-				   gsb_data_report_get_show_report_financial_year (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_titres_colonnes ),
-				   gsb_data_report_get_column_title_show (current_report_number));
-
-    gtk_option_menu_set_history ( GTK_OPTION_MENU ( bouton_choix_classement_ope_etat ),
-				  gsb_data_report_get_sorting_report (current_report_number));
-
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_rendre_ope_clickables ),
-				   gsb_data_report_get_report_can_click (current_report_number));
-
-    if ( !gsb_data_report_get_column_title_type (current_report_number))
-	gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_titre_en_haut ),
-				       TRUE );
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_inclure_dans_tiers ),
-				   gsb_data_report_get_append_in_payee (current_report_number));
-
-    /* on rend insensitif les sous qque choses si nécessaire */
-    sens_desensitive_pointeur ( bouton_afficher_opes,
-				vbox_show_transactions );
-    sens_desensitive_pointeur ( bouton_afficher_categ_opes,
-				bouton_afficher_sous_categ_opes );
-    sens_desensitive_pointeur ( bouton_afficher_ib_opes,
-				bouton_afficher_sous_ib_opes );
-    sens_desensitive_pointeur ( bouton_afficher_titres_colonnes,
-				bouton_titre_changement );
-    sens_desensitive_pointeur ( bouton_afficher_titres_colonnes,
-				bouton_titre_en_haut );
-
-    /* mise en forme de la devise */
-    gsb_currency_set_combobox_history ( bouton_devise_general_etat,
-					gsb_data_report_get_currency_general (current_report_number));
-
-    /* onglet dates */
-
-
-    if ( gsb_data_report_get_use_financial_year (current_report_number))
-    {
-	gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( radio_button_utilise_exo ),
-				       TRUE );
-	gtk_widget_set_sensitive ( vbox_utilisation_date,
-				   FALSE );
-    }
-    else
-	gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( radio_button_utilise_dates ),
-				       TRUE );
+    gtk_widget_show ( dialog );
 
-    sens_desensitive_pointeur ( radio_button_utilise_exo,
-				bouton_separe_exo_etat );
+    /* on se repositionne sur le dernier onglet si on a le même rapport */
+    if ( current_report_number == last_report )
+        etats_config_ui_left_panel_tree_view_select_last_page ( );
 
-    if ( gsb_data_report_get_financial_year_type (current_report_number) == 3 )
-	gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_exo_etat ),
-				       TRUE );
-    else
+    switch ( gtk_dialog_run ( GTK_DIALOG ( dialog ) ) )
     {
-	gtk_widget_set_sensitive ( vbox_generale_exo_etat,
-				   FALSE );
-
-	if ( gsb_data_report_get_financial_year_type (current_report_number))
-	{
-	    if ( gsb_data_report_get_financial_year_type (current_report_number) == 1 )
-		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_exo_courant ),
-					       TRUE );
-	    else
-		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_exo_precedent ),
-					       TRUE );
-	}
-	else
-	    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_exo_tous ),
-					   TRUE );
-    }
+        case GTK_RESPONSE_OK:
+            etats_config_recupere_info_to_etat ( current_report_number );
+            last_report = current_report_number;
+            break;
 
+        default:
+            break;
+    }
 
-    /* on sélectionne les exercices */
+    etats_config_ui_free_all_var ( );
 
-    selectionne_liste_exo_etat_courant ();
+    gtk_widget_destroy ( dialog );
+}
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_separe_exo_etat ),
-				   gsb_data_report_get_financial_year_split (current_report_number));
 
-    /* on sélectionne la plage de date */
+/**
+ * Initialise la boite de dialogue propriétés de l'état.
+ *
+ * \param
+ *
+ * \return
+ */
+gboolean etats_config_initialise_dialog_from_etat ( gint report_number )
+{
+    /* onglet période */
+    etats_config_initialise_onglet_periode ( report_number );
 
-    gtk_clist_select_row ( GTK_CLIST ( liste_plages_dates_etat ),
-			   gsb_data_report_get_date_type (current_report_number),
-			   0 );
+    /* onglet virements */
+    etats_config_initialise_onglet_virements ( report_number );
 
-    if ( gsb_data_report_get_date_type (current_report_number) != 1 )
-    {
-	gtk_widget_set_sensitive ( entree_date_init_etat,
-				   FALSE );
-	gtk_widget_set_sensitive ( entree_date_finale_etat,
-				   FALSE );
-    }
-    else
-    {
-	gtk_widget_set_sensitive ( entree_date_init_etat,
-				   TRUE );
-	gtk_widget_set_sensitive ( entree_date_finale_etat,
-				   TRUE );
-    }
+    /* onglet comptes */
+    etats_config_initialise_onglet_comptes ( report_number );
 
-    /* on remplit les dates perso si elles existent */
+    /* onglet tiers */
+    etats_config_initialise_onglet_tiers ( report_number );
 
-    if ( gsb_data_report_get_personal_date_start (current_report_number))
-	gsb_calendar_entry_set_date ( entree_date_init_etat,
-				      gsb_data_report_get_personal_date_start (current_report_number));
+    /* onglet Categories */
+    etats_config_initialise_onglet_categ_budget ( report_number, TRUE );
 
-    if ( gsb_data_report_get_personal_date_end (current_report_number))
-	gsb_calendar_entry_set_date ( entree_date_finale_etat,
-				      gsb_data_report_get_personal_date_end (current_report_number));
+    /* onglet Budgets */
+    etats_config_initialise_onglet_categ_budget ( report_number, FALSE );
 
-    /* on remplit les détails de la séparation des dates */
-    if ( gsb_data_report_get_period_split (current_report_number))
-    {
-	gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_separe_plages_etat ),
-				       TRUE );
-	if (gtk_option_menu_get_history ( GTK_OPTION_MENU ( bouton_type_separe_plages_etat )) == 1)
-        gtk_widget_set_sensitive ( bouton_debut_semaine,
-				   TRUE );
-    else
-        gtk_widget_set_sensitive ( bouton_debut_semaine,
-				   FALSE );
-    }
-    else
-    {
-	gtk_widget_set_sensitive ( bouton_type_separe_plages_etat,
-				   FALSE );
-	gtk_widget_set_sensitive ( bouton_debut_semaine,
-				   FALSE );
-    }
+    /* onglet Textes */
+    etats_config_initialise_onglet_textes ( report_number );
 
-    gtk_option_menu_set_history ( GTK_OPTION_MENU ( bouton_type_separe_plages_etat ),
-				  gsb_data_report_get_period_split_type (current_report_number));
-    gtk_option_menu_set_history ( GTK_OPTION_MENU ( bouton_debut_semaine ),
-				  gsb_data_report_get_period_split_day (current_report_number));
+    /* onglet Montants */
+    etats_config_initialise_onglet_montants ( report_number );
 
-    /* onglet comptes */
+    /* onglet modes de paiement */
+    etats_config_initialise_onglet_mode_paiement ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_comptes_etat ),
-				   gsb_data_report_get_account_use_chosen (current_report_number));
+    /* onglet divers */
+    etats_config_initialise_onglet_divers ( report_number );
 
-    sens_desensitive_pointeur ( bouton_detaille_comptes_etat,
-				vbox_generale_comptes_etat );
+    /* onglet data grouping */
+    etats_config_initialise_onglet_data_grouping ( report_number );
 
+    /* onglet data separation */
+    etats_config_initialise_onglet_data_separation ( report_number );
 
-    selectionne_liste_comptes_etat_courant ();
+    /* onglet generalites */
+    etats_config_initialise_onglet_affichage_generalites ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_regroupe_ope_compte_etat ),
-				   gsb_data_report_get_account_group_reports (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_compte ),
-				   gsb_data_report_get_account_show_amount (current_report_number));
+    /* onglet titres */
+    etats_config_initialise_onglet_affichage_titres ( report_number );
 
-    sens_desensitive_pointeur ( bouton_regroupe_ope_compte_etat,
-				bouton_affiche_sous_total_compte );
+    /* onglet opérations */
+    etats_config_initialise_onglet_affichage_operations ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_comptes ),
-				   gsb_data_report_get_account_show_name (current_report_number));
+    /* onglet devises */
+    etats_config_initialise_onglet_affichage_devises ( report_number );
 
+    /* return */
+    return TRUE;
+}
 
-    /* onglet virements */
 
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+gboolean etats_config_recupere_info_to_etat ( gint report_number )
+{
+    /* onglet période */
+    etats_config_recupere_info_onglet_periode ( report_number );
 
-    if ( gsb_data_report_get_transfer_choice (current_report_number))
-    {
-	if ( gsb_data_report_get_transfer_choice (current_report_number)== 1 )
-	    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_inclusion_virements_actifs_etat ),
-					   TRUE );
-	else
-	{
-	    if ( gsb_data_report_get_transfer_choice (current_report_number)== 2 )
-		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_inclusion_virements_hors_etat ),
-					       TRUE );
-	    else
-		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_inclusion_virements_perso ),
-					       TRUE );
-	}
-    }
-    else
-    {
-	gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_non_inclusion_virements ),
-				       TRUE );
-	gtk_widget_set_sensitive ( bouton_exclure_non_virements_etat,
-				   FALSE );
-    }
+    /* onglet virements */
+    etats_config_recupere_info_onglet_virements ( report_number );
 
-    sens_desensitive_pointeur ( bouton_inclusion_virements_perso,
-				hbox_liste_comptes_virements );
+    /* onglet comptes */
+    etats_config_recupere_info_onglet_comptes ( report_number );
 
-    selectionne_liste_virements_etat_courant ();
+    /* onglet tiers */
+    etats_config_recupere_info_onglet_tiers ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_exclure_non_virements_etat ),
-				   gsb_data_report_get_transfer_reports_only (current_report_number));
+    /* onglet Categories */
+    etats_config_recupere_info_onglet_categ_budget ( report_number, TRUE );
 
+    /* onglet Budgets */
+    etats_config_recupere_info_onglet_categ_budget ( report_number, FALSE );
 
-    /* onglet catégories */
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button_group_by_categ ),
-				   gsb_data_report_get_category_used (current_report_number));
+    /* onglet Textes */
+    etats_config_recupere_info_onglet_textes ( report_number );
 
-    sens_desensitive_pointeur ( button_group_by_categ,
-				bouton_affiche_sous_total_categ );
-    sens_desensitive_pointeur ( button_group_by_categ,
-				bouton_afficher_sous_categ );
-    sens_desensitive_pointeur ( button_group_by_categ,
-				bouton_affiche_sous_total_sous_categ );
-    sens_desensitive_pointeur ( button_group_by_categ,
-				bouton_afficher_pas_de_sous_categ );
-    sens_desensitive_pointeur ( button_group_by_categ,
-				bouton_afficher_noms_categ );
+    /* onglet Montants */
+    etats_config_recupere_info_onglet_montants ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button_detail_categ ),
-				   gsb_data_report_get_category_detail_used (current_report_number));
+    /* onglet mode de paiement */
+    etats_config_recupere_info_onglet_mode_paiement ( report_number );
 
-    sens_desensitive_pointeur ( button_detail_categ,
-				hbox_detaille_categ_etat );
+    /* onglet modes divers */
+    etats_config_recupere_info_onglet_divers ( report_number );
 
-    /* select the categories and sub-categories */
-    report_config_category_update_treeview (TRUE);
+    /* onglet modes data grouping */
+    etats_config_recupere_info_onglet_data_grouping ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_categ ),
-				   gsb_data_report_get_category_show_category_amount (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_sous_categ ),
-				   gsb_data_report_get_category_show_sub_category (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_sous_categ ),
-				   gsb_data_report_get_category_show_sub_category_amount (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_pas_de_sous_categ ),
-				   gsb_data_report_get_category_show_without_category (current_report_number));
+    /* onglet modes data separation */
+    etats_config_recupere_info_onglet_data_separation ( report_number );
 
+    /* onglet generalites */
+    etats_config_recupere_info_onglet_affichage_generalites ( report_number );
 
-    /* mise en forme de la devise */
+    /* onglet titres */
+    etats_config_recupere_info_onglet_affichage_titres ( report_number );
 
-    selectionne_devise_categ_etat_courant ();
+    /* onglet opérations */
+    etats_config_recupere_info_onglet_affichage_operations ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_categ ),
-				   gsb_data_report_get_category_show_name (current_report_number));
+    /* onglet devises */
+    etats_config_recupere_info_onglet_affichage_devises ( report_number );
 
+    /* update the payee combofix in the form, to add that report if asked */
+    if ( gsb_data_report_get_append_in_payee ( report_number ) )
+        gsb_form_widget_update_payee_combofix ( );
 
-    /* onglet ib */
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_ib_etat ),
-				   gsb_data_report_get_budget_used (current_report_number));
+    /* on avertit grisbi de la modification à enregistrer */
+    gsb_file_set_modified ( TRUE );
 
-    sens_desensitive_pointeur ( bouton_utilise_ib_etat,
-				bouton_affiche_sous_total_ib );
-    sens_desensitive_pointeur ( bouton_utilise_ib_etat,
-				bouton_afficher_sous_ib );
-    sens_desensitive_pointeur ( bouton_utilise_ib_etat,
-				bouton_affiche_sous_total_sous_ib );
-    sens_desensitive_pointeur ( bouton_utilise_ib_etat,
-				bouton_afficher_pas_de_sous_ib );
-    sens_desensitive_pointeur ( bouton_utilise_ib_etat,
-				bouton_afficher_noms_ib );
+    /* on réaffiche l'état */
+    rafraichissement_etat ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_ib_etat ),
-				   gsb_data_report_get_budget_detail_used (current_report_number));
+    /* on repasse à la 1ère page du notebook */
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( etats_onglet_get_notebook_etats ( ) ), 0 );
+    gtk_widget_set_sensitive ( gsb_gui_navigation_get_tree_view ( ), TRUE );
 
-    sens_desensitive_pointeur ( bouton_detaille_ib_etat,
-				hbox_detaille_ib_etat );
+    gsb_gui_navigation_update_report ( report_number );
 
-    /* select the budgets and sub-budgets */
-    report_config_category_update_treeview (FALSE);
+    /* return */
+    return TRUE;
+}
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_ib ),
-				   gsb_data_report_get_budget_show_budget_amount (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_sous_ib ),
-				   gsb_data_report_get_budget_show_sub_budget (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_sous_ib ),
-				   gsb_data_report_get_budget_show_sub_budget_amount (current_report_number));
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_pas_de_sous_ib ),
-				   gsb_data_report_get_budget_show_without_budget (current_report_number));
+/*ONGLET_PERIODE*/
+/**
+ * Initialise les informations de l'onglet periode
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_periode ( gint report_number )
+{
+    if ( gsb_data_report_get_use_financial_year ( report_number ) )
+    {
+        gint financial_year_type;
 
-    /* mise en forme de la devise */
+        etats_config_ui_toggle_button_set_actif ( "radio_button_utilise_exo", TRUE );
 
-    selectionne_devise_ib_etat_courant ();
+        financial_year_type = gsb_data_report_get_financial_year_type ( report_number );
+        etats_config_ui_buttons_radio_set_active_index ( "bouton_exo_tous", financial_year_type );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_ib ),
-				   gsb_data_report_get_budget_show_name (current_report_number));
+        if ( financial_year_type == 3 )
+            etats_config_ui_tree_view_select_rows_from_list (
+                                gsb_data_report_get_financial_year_list ( report_number ),
+                                "treeview_exer",
+                                1 );
+    }
+    else
+    {
+        etats_config_ui_toggle_button_set_actif ( "radio_button_utilise_dates", TRUE );
+        etats_config_ui_tree_view_select_single_row ( "treeview_dates",
+                        gsb_data_report_get_date_type ( report_number ) );
 
-    /* onglet tiers */
+        if ( gsb_data_report_get_date_type ( report_number ) != 1 )
+            etats_config_ui_onglet_periode_date_interval_sensitive ( FALSE );
+        else
+        {
+            GDate *date;
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_tiers_etat ),
-				   gsb_data_report_get_payee_used (current_report_number));
+            etats_config_ui_onglet_periode_date_interval_sensitive ( TRUE );
 
-    sens_desensitive_pointeur ( bouton_utilise_tiers_etat,
-				bouton_afficher_noms_tiers );
-    sens_desensitive_pointeur ( bouton_utilise_tiers_etat,
-				bouton_affiche_sous_total_tiers );
+            /* on initialise le type de date à sélectionner */
+            etats_config_ui_toggle_button_set_actif ( "button_sel_value_date",
+                                gsb_data_report_get_date_select_value ( report_number ) );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_tiers_etat ),
-				   gsb_data_report_get_payee_detail_used (current_report_number));
+            /* on remplit les dates perso si elles existent */
+            if ( ( date = gsb_data_report_get_personal_date_start ( report_number ) ) )
+                gsb_calendar_entry_set_date (
+                                etats_config_ui_widget_get_widget_by_name ( "hbox_date_init",
+                                "entree_date_init_etat" ),
+                                date );
 
-    sens_desensitive_pointeur ( bouton_detaille_tiers_etat,
-				hbox_detaille_tiers_etat );
+            if ( ( date = gsb_data_report_get_personal_date_end ( report_number ) ) )
+            gsb_calendar_entry_set_date (
+                                etats_config_ui_widget_get_widget_by_name ( "hbox_date_finale",
+                                "entree_date_finale_etat" ),
+                                date );
+        }
+    }
+}
 
 
-    /* on sélectionne les tiers choisies */
+/**
+ * Récupère les informations de l'onglet periode
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_periode ( gint report_number )
+{
+    gint active;
+
+    active = etats_config_ui_toggle_button_get_actif ( "radio_button_utilise_exo" );
+    gsb_data_report_set_use_financial_year ( report_number, active );
+
+    if ( !active )
+    {
+        gint item_selected;
+
+        /* Check that custom dates are OK, but only if custom date range
+         * has been selected. */
+        if ( ( item_selected = etats_config_ui_tree_view_get_single_row_selected ( "treeview_dates" ) ) == 1 )
+        {
+            GtkWidget *entry;
+
+            gsb_data_report_set_date_select_value ( report_number,
+                                etats_config_ui_toggle_button_get_actif ( "button_sel_value_date" ) );
+
+            entry = etats_config_ui_widget_get_widget_by_name ( "hbox_date_init", "entree_date_init_etat" );
+            if ( !gsb_date_check_entry ( entry ) )
+            {
+                gchar *text;
+                gchar *hint;
+
+                text = g_strdup ( _("Grisbi can't parse date.  For a list of date formats"
+                                    " that Grisbi can use, refer to Grisbi manual.") );
+                hint = g_strdup_printf ( _("Invalid initial date '%s'"),
+                                gtk_entry_get_text ( GTK_ENTRY ( entry ) ) );
+                dialogue_error_hint ( text, hint );
+                g_free ( text );
+                g_free ( hint );
+
+                return;
+            }
+            else
+                gsb_data_report_set_personal_date_start ( report_number,
+                                gsb_calendar_entry_get_date ( entry ) );
+
+            entry = etats_config_ui_widget_get_widget_by_name ( "hbox_date_finale", "entree_date_finale_etat" );
+            if ( !gsb_date_check_entry ( entry ) )
+            {
+                gchar *text;
+                gchar *hint;
+
+                text = g_strdup ( _("Grisbi can't parse date.  For a list of date formats"
+                                    " that Grisbi can use, refer to Grisbi manual.") );
+                hint = g_strdup_printf ( _("Invalid final date '%s'"),
+                                gtk_entry_get_text ( GTK_ENTRY ( entry ) ) );
+                dialogue_error_hint ( text, hint );
+                g_free ( text );
+                g_free ( hint );
+
+                return;
+            }
+            else
+                gsb_data_report_set_personal_date_end ( report_number,
+                                gsb_calendar_entry_get_date ( entry ) );
+        }
+        else
+            gsb_data_report_set_date_type ( report_number, item_selected );
+    }
+    else
+    {
+        gint index;
 
-    selectionne_liste_tiers_etat_courant();
+        index = etats_config_ui_buttons_radio_get_active_index ( "bouton_exo_tous" );
+        gsb_data_report_set_financial_year_type ( report_number, index );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_tiers ),
-				   gsb_data_report_get_payee_show_payee_amount (current_report_number));
+        if ( index == 3 )
+        {
+            gsb_data_report_free_financial_year_list ( report_number );
+            gsb_data_report_set_financial_year_list ( report_number,
+                                etats_config_ui_tree_view_get_list_rows_selected ( "treeview_exer" ) );
+            if ( utils_tree_view_all_rows_are_selected ( GTK_TREE_VIEW (
+             etats_config_ui_widget_get_widget_by_name ( "treeview_exer", NULL ) ) ) )
+            {
+                gchar *text;
+                gchar *hint;
 
-    /* mise en forme de la devise */
+                hint = g_strdup ( _("Performance issue.") );
+                text = g_strdup ( _("All financial years have been selected.  Grisbi will run "
+                                "faster without the \"Detail financial years\" option activated.") );
 
-    selectionne_devise_tiers_etat_courant ();
+                dialogue_special ( GTK_MESSAGE_INFO, make_hint ( hint, text ) );
+                etats_config_ui_toggle_button_set_actif ( "bouton_exo_tous", FALSE );
+                gsb_data_report_set_financial_year_type ( report_number, 0 );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_tiers ),
-				   gsb_data_report_get_payee_show_name (current_report_number));
+                g_free ( text );
+                g_free ( hint );
+            }
+        }
+    }
+}
 
-    /*  onglet texte */
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_texte ),
-				   gsb_data_report_get_text_comparison_used (current_report_number));
-    sens_desensitive_pointeur ( bouton_utilise_texte,
-				vbox_generale_textes_etat );
-    remplit_liste_comparaisons_textes_etat ();
+/**
+ * retourne la liste des exercices
+ *
+ * \param
+ *
+ * \return un GtkTreeModel
+ */
+GtkTreeModel *etats_config_onglet_periode_get_model_exercices ( void )
+{
+    GtkListStore *list_store;
+    GSList *list_tmp;
 
+    list_store = gtk_list_store_new ( 2, G_TYPE_STRING, G_TYPE_INT );
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE ( list_store ),
+                        0, GTK_SORT_ASCENDING );
 
-    /* onglet montant */
+    /* on remplit la liste des exercices */
+    list_tmp = gsb_data_fyear_get_fyears_list ();
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_montant ),
-				   gsb_data_report_get_amount_comparison_used (current_report_number));
-    gsb_currency_set_combobox_history ( bouton_devise_montant_etat,
-					gsb_data_report_get_amount_comparison_currency (current_report_number));
-    sens_desensitive_pointeur ( bouton_utilise_montant,
-				vbox_generale_montants_etat );
-    remplit_liste_comparaisons_montants_etat ();
+    while ( list_tmp )
+    {
+        GtkTreeIter iter;
+        gchar *name;
+        gint fyear_number;
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_exclure_ope_nulles_etat ),
-				   gsb_data_report_get_amount_comparison_only_report_non_null (current_report_number));
+        fyear_number = gsb_data_fyear_get_no_fyear ( list_tmp -> data );
 
-    /* onglet modes de paiement */
+        name = my_strdup ( gsb_data_fyear_get_name ( fyear_number ) );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_mode_paiement_etat ),
-				   gsb_data_report_get_method_of_payment_used (current_report_number));
+        gtk_list_store_append ( list_store, &iter );
+        gtk_list_store_set ( list_store, &iter, 0, name, 1, fyear_number, -1 );
 
-    sens_desensitive_pointeur ( bouton_detaille_mode_paiement_etat,
-				vbox_mode_paiement_etat );
+        if ( name )
+            g_free ( name );
+    
+        list_tmp = list_tmp -> next;
+    }
 
-    selectionne_liste_modes_paiement_etat_courant ();
+    return GTK_TREE_MODEL ( list_store );
+}
 
-    gtk_widget_show_all ( dialog );
 
-    switch ( gtk_dialog_run ( GTK_DIALOG(dialog) ) )
-    {
-	case GTK_RESPONSE_OK:
-	    recuperation_info_perso_etat ();
-	    break;
+/**
+ * ajoute les entrées pour saisir les dates personnalisées
+ *
+ * \param
+ *
+ * \return
+ */
+void etats_config_onglet_periode_make_calendar_entry ( void )
+{
+    GtkWidget *hbox;
+    GtkWidget *entry;
 
-	default:
-	    break;
-    }
+    hbox =  etats_config_ui_widget_get_widget_by_name ( "hbox_date_init", NULL );
+    entry = gsb_calendar_entry_new ( FALSE );
+    gtk_widget_set_size_request ( entry, 100, -1 );
+    g_object_set_data ( G_OBJECT ( hbox ), "entree_date_init_etat", entry );
+    gtk_box_pack_end ( GTK_BOX ( hbox ), entry, FALSE, FALSE, 0 );
 
-    gtk_widget_destroy ( dialog );
+    hbox =  etats_config_ui_widget_get_widget_by_name ( "hbox_date_finale", NULL );
+    entry = gsb_calendar_entry_new ( FALSE );
+    gtk_widget_set_size_request ( entry, 100, -1 );
+    g_object_set_data ( G_OBJECT ( hbox ), "entree_date_finale_etat", entry );
+    gtk_box_pack_end ( GTK_BOX ( hbox ), entry, FALSE, FALSE, 0 );
 }
 
 
-
+/*ONGLET_VIREMENTS*/
 /**
+ * Initialise les informations de l'onglet virements
  *
+ * \param report_number
  *
- *
+ * \return
  */
-gboolean report_tree_view_selection_changed ( GtkTreeSelection *selection,
-					      GtkTreeModel *model )
+void etats_config_initialise_onglet_virements ( gint report_number )
 {
-    GtkTreeIter iter;
-    gint selected;
+    gint index;
 
-    if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
-	return(FALSE);
+    index = gsb_data_report_get_transfer_choice ( report_number );
+    etats_config_ui_buttons_radio_set_active_index ( "bouton_non_inclusion_virements", index );
 
-    gtk_tree_model_get ( model, &iter, 1, &selected, -1 );
-    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_config_etat ), selected);
+    if ( index == 3 )
+    {
+        etats_config_ui_tree_view_select_rows_from_list (
+                                gsb_data_report_get_transfer_account_numbers_list ( report_number ),
+                                "treeview_virements",
+                                1 );
+        if ( g_slist_length ( gsb_data_report_get_account_numbers_list ( report_number ) ) )
+        {
+            utils_togglebutton_set_label_position_unselect (
+                                etats_config_ui_widget_get_widget_by_name (
+                                "togglebutton_select_all_virements", NULL ),
+                                G_CALLBACK ( etats_config_ui_onglet_comptes_select_unselect ),
+                                etats_config_ui_widget_get_widget_by_name ( "treeview_virements", NULL ) );
+        }
+    }
 
-    return FALSE;
+    if ( index > 0 )
+    {
+        etats_config_ui_widget_set_sensitive ( "bouton_exclure_non_virements_etat", TRUE );
+        etats_config_ui_toggle_button_set_actif ( "bouton_exclure_non_virements_etat",
+                                gsb_data_report_get_transfer_reports_only ( report_number ) );
+    }
+    else
+        etats_config_ui_widget_set_sensitive ( "bouton_exclure_non_virements_etat", FALSE );
 }
 
 
-
-gboolean report_tree_selectable_func (GtkTreeSelection *selection,
-				      GtkTreeModel *model,
-				      GtkTreePath *path,
-				      gboolean path_currently_selected,
-				      gpointer data)
+/**
+ * Récupère les informations de l'onglet virements
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_virements ( gint report_number )
 {
-    GtkTreeIter iter;
-    gint selectable;
+    gint index;
 
-    gtk_tree_model_get_iter ( model, &iter, path );
-    gtk_tree_model_get ( model, &iter, 1, &selectable, -1 );
+    index = etats_config_ui_buttons_radio_get_active_index ( "bouton_non_inclusion_virements" );
+    gsb_data_report_set_transfer_choice ( report_number, index );
 
-    return ( selectable != -1 );
-}
+    if ( index == 3 )
+    {
+        gsb_data_report_free_transfer_account_numbers_list ( report_number );
+        gsb_data_report_set_transfer_account_numbers_list ( report_number,
+                            etats_config_ui_tree_view_get_list_rows_selected ( "treeview_virements" ) );
+    }
 
+    gsb_data_report_set_transfer_reports_only ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_exclure_non_virements_etat" ) );
+}
 
 
-/******************************************************************************/
-void selectionne_liste_exo_etat_courant ( void )
+/*ONGLET_COMPTES*/
+/**
+ * Initialise les informations de l'onglet comptes
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_comptes ( gint report_number )
 {
-    GSList *pointeur_sliste;
-    gint current_report_number;
+    gint active;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
-
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_exo_etat ));
+    active = gsb_data_report_get_account_use_chosen ( report_number );
+    etats_config_ui_toggle_button_set_actif ( "bouton_detaille_comptes_etat", active );
 
-    pointeur_sliste = gsb_data_report_get_financial_year_list (current_report_number);
-
-    while ( pointeur_sliste )
+    if ( active )
     {
-	gint row;
-
-	row = gtk_clist_find_row_from_data ( GTK_CLIST ( liste_exo_etat ),
-					     pointeur_sliste -> data );
-	gtk_clist_select_row ( GTK_CLIST ( liste_exo_etat ),
-			       row,
-			       0 );
-	pointeur_sliste = pointeur_sliste -> next;
+        etats_config_ui_tree_view_select_rows_from_list (
+                                gsb_data_report_get_account_numbers_list ( report_number ),
+                                "treeview_comptes",
+                                1 );
+
+        if ( g_slist_length ( gsb_data_report_get_account_numbers_list ( report_number ) ) )
+            utils_togglebutton_set_label_position_unselect (
+                                etats_config_ui_widget_get_widget_by_name (
+                                "togglebutton_select_all_comptes", NULL ),
+                                G_CALLBACK ( etats_config_ui_onglet_comptes_select_unselect ),
+                                etats_config_ui_widget_get_widget_by_name ( "treeview_comptes", NULL ) );
     }
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void selectionne_liste_comptes_etat_courant ( void )
+
+/**
+ * Récupère les informations de l'onglet comptes
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_comptes ( gint report_number )
 {
-    GSList *pointeur_sliste;
-    gint current_report_number;
+    gint active;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    active = etats_config_ui_toggle_button_get_actif ( "bouton_detaille_comptes_etat" );
+    gsb_data_report_set_account_use_chosen ( report_number, active );
 
+    if ( active )
+    {
+        gsb_data_report_free_account_numbers_list ( report_number );
 
-    if ( !liste_comptes_etat )
-	return;
+        if ( utils_tree_view_all_rows_are_selected ( GTK_TREE_VIEW (
+         etats_config_ui_widget_get_widget_by_name ( "treeview_comptes", NULL ) ) ) )
+        {
+            gchar *text;
+            gchar *hint;
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_comptes_etat ));
+            hint = g_strdup ( _("Performance issue.") );
+            text = g_strdup ( _("All accounts have been selected.  Grisbi will run "
+                            "faster without the \"Detail accounts used\" option activated") );
 
-    pointeur_sliste = gsb_data_report_get_account_numbers (current_report_number);
+            dialogue_special ( GTK_MESSAGE_INFO, make_hint ( hint, text ) );
+            etats_config_ui_toggle_button_set_actif ( "gsb_data_report_set_account_use_chosen", FALSE );
+            gsb_data_report_set_account_use_chosen ( report_number, FALSE );
 
-    while ( pointeur_sliste )
-    {
-	gtk_clist_select_row ( GTK_CLIST ( liste_comptes_etat ),
-			       gtk_clist_find_row_from_data ( GTK_CLIST ( liste_comptes_etat ),
-							      pointeur_sliste -> data ),
-			       0 );
-	pointeur_sliste = pointeur_sliste -> next;
+            g_free ( text );
+            g_free ( hint );
+        }
+        else
+            gsb_data_report_set_account_numbers_list ( report_number,
+                            etats_config_ui_tree_view_get_list_rows_selected ( "treeview_comptes" ) );
     }
 }
-/******************************************************************************/
-
-/******************************************************************************/
-void selectionne_liste_virements_etat_courant ( void )
-{
-    GSList *pointeur_sliste;
-    gint current_report_number;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
 
+/**
+ * retourne la liste des comptes dans un GtkTreeModel
+ *
+ * \return model
+ */
+GtkTreeModel *etats_config_onglet_get_liste_comptes ( void )
+{
+    GtkListStore *list_store;
+    GSList *list_tmp;
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_comptes_virements ));
+    list_store = gtk_list_store_new ( 2, G_TYPE_STRING, G_TYPE_INT );
 
-    pointeur_sliste = gsb_data_report_get_transfer_account_numbers (current_report_number);
+    /* on remplit la liste des exercices */
+    list_tmp = gsb_data_account_get_list_accounts ( );
 
-    while ( pointeur_sliste )
+    while ( list_tmp )
     {
-	gtk_clist_select_row ( GTK_CLIST ( liste_comptes_virements ),
-			       gtk_clist_find_row_from_data ( GTK_CLIST ( liste_comptes_virements ),
-							      pointeur_sliste -> data ),
-			       0 );
-	pointeur_sliste = pointeur_sliste -> next;
-    }
-}
+        GtkTreeIter iter;
+        gchar *name;
+        gint account_number;
 
+        account_number = gsb_data_account_get_no_account ( list_tmp -> data );
 
+        name = my_strdup ( gsb_data_account_get_name ( account_number ) );
 
-void selectionne_devise_categ_etat_courant ( void )
-{
-    gint current_report_number;
+        gtk_list_store_append ( list_store, &iter );
+        gtk_list_store_set ( list_store, &iter, 0, name, 1, account_number, -1 );
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+        if ( name )
+            g_free ( name );
+    
+        list_tmp = list_tmp -> next;
+    }
 
-    gsb_currency_set_combobox_history ( bouton_devise_categ_etat,
-					gsb_data_report_get_category_currency (current_report_number));
+    return GTK_TREE_MODEL ( list_store );
 }
-/******************************************************************************/
 
 
-/******************************************************************************/
-void selectionne_devise_ib_etat_courant ( void )
+/**
+ *
+ *
+ *
+ */
+void etats_config_onglet_select_partie_liste_comptes ( GtkWidget *tree_view,
+                        gint type_compte )
 {
-    gint current_report_number;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
-    gsb_currency_set_combobox_history ( bouton_devise_ib_etat,
-					gsb_data_report_get_budget_currency (current_report_number));
-}
-/******************************************************************************/
+        GtkTreeModel *model;
+        GtkTreeIter iter;
+        GtkTreeSelection *selection;
 
-/******************************************************************************/
-void selectionne_liste_tiers_etat_courant ( void )
-{
-    GSList *pointeur_sliste;
-    gint current_report_number;
+        selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+        model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+        if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
+            return;
 
+        do
+        {
+            gint account_number;
 
-    if ( !liste_tiers_etat )
-	return;
+            gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, 1, &account_number, -1 );
+            if ( gsb_data_account_get_kind ( account_number ) == type_compte )
+                gtk_tree_selection_select_iter ( selection, &iter );
+        }
+        while (gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
+}
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_tiers_etat ));
+/*ONGLET_TIERS*/
+/**
+ * Initialise les informations de l'onglet tiers
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_tiers ( gint report_number )
+{
+    gint active;
 
-    pointeur_sliste = gsb_data_report_get_payee_numbers (current_report_number);
+    active = gsb_data_report_get_payee_detail_used ( report_number );
+    etats_config_ui_toggle_button_set_actif ( "bouton_detaille_tiers_etat", active );
 
-    while ( pointeur_sliste )
+    if ( active )
     {
-	gtk_clist_select_row ( GTK_CLIST ( liste_tiers_etat ),
-			       gtk_clist_find_row_from_data ( GTK_CLIST ( liste_tiers_etat ),
-							      pointeur_sliste -> data ),
-			       0 );
-	pointeur_sliste = pointeur_sliste -> next;
+        etats_config_ui_tree_view_select_rows_from_list (
+                                gsb_data_report_get_payee_numbers_list ( report_number ),
+                                "treeview_tiers",
+                                1 );
+
+        if ( g_slist_length ( gsb_data_report_get_payee_numbers_list ( report_number ) ) )
+            utils_togglebutton_set_label_position_unselect (
+                                etats_config_ui_widget_get_widget_by_name (
+                                "togglebutton_select_all_tiers", NULL ),
+                                NULL,
+                                etats_config_ui_widget_get_widget_by_name ( "treeview_tiers", NULL ) );
     }
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void selectionne_devise_tiers_etat_courant ( void )
+
+/**
+ *
+ *
+ *
+ */
+GtkTreeModel *etats_config_onglet_get_liste_tiers ( void )
 {
-    gint current_report_number;
+    GtkListStore *list_store;
+    GSList *list_tmp;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
-    gsb_currency_set_combobox_history ( bouton_devise_tiers_etat,
-					gsb_data_report_get_payee_currency (current_report_number));
-}
-/******************************************************************************/
+    list_store = gtk_list_store_new ( 2, G_TYPE_STRING, G_TYPE_INT );
 
-/******************************************************************************/
-void recuperation_info_perso_etat ( void )
-{
-    GSList *comparison_list;
-    GList *list_tmp;
-    const gchar *pointeur_char;
-    gint i;
-    gint amount_comparison_number;
-    gint current_report_number;
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE ( list_store ),
+                        0, GTK_SORT_ASCENDING );
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    /* on remplit la liste des tiers */
+    list_tmp = gsb_data_payee_get_payees_list ( );
 
-    /* Check that custom dates are OK, but only if custom date range
-     * has been selected. */
-    if ( GPOINTER_TO_INT ( GTK_CLIST ( liste_plages_dates_etat ) -> selection -> data ) == 1 &&
-	 !gsb_date_check_entry ( entree_date_init_etat ) )
+    while ( list_tmp )
     {
-	dialogue_error_hint ( _("Grisbi can't parse date.  For a list of date formats that Grisbi can use, refer to Grisbi manual."),
-			      g_strdup_printf ( _("Invalid initial date '%s'"),
-						gtk_entry_get_text(GTK_ENTRY(entree_date_init_etat)) ) );
-	return;
-    }
+        GtkTreeIter iter;
+        gchar *name;
+        gint payee_number;
 
-    if ( GPOINTER_TO_INT ( GTK_CLIST ( liste_plages_dates_etat ) -> selection -> data ) == 1 &&
-	 !gsb_date_check_entry (entree_date_finale_etat ) )
-    {
-	dialogue_error_hint ( _("Grisbi can't parse date.  For a list of date formats that Grisbi can use, refer to Grisbi manual."),
-			      g_strdup_printf ( _("Invalid final date '%s'"),
-						gtk_entry_get_text(GTK_ENTRY(entree_date_finale_etat)) ) );
-	return;
-    }
+        payee_number = gsb_data_payee_get_no_payee ( list_tmp -> data );
 
+        name = my_strdup ( gsb_data_payee_get_name ( payee_number, FALSE ) );
 
-    /* on récupère maintenant toutes les données */
-    /* récupération du name du rapport */
+        gtk_list_store_append ( list_store, &iter );
+        gtk_list_store_set ( list_store, &iter, 0, name, 1, payee_number, -1 );
 
-    pointeur_char = gtk_entry_get_text ( GTK_ENTRY ( entree_nom_etat ));
-
-    if ( strlen ( pointeur_char )
-	 &&
-	 strcmp ( pointeur_char,
-		  gsb_data_report_get_report_name (current_report_number) ))
-    {
-	gsb_data_report_set_report_name ( current_report_number,
-					  pointeur_char );
+        if ( name )
+            g_free ( name );
+    
+        list_tmp = list_tmp -> next;
     }
 
-    /* récupération du type de classement */
+    return GTK_TREE_MODEL ( list_store );
+}
 
-    g_slist_free ( gsb_data_report_get_sorting_type (current_report_number));
 
-    gsb_data_report_set_sorting_type ( current_report_number,
-				       NULL );
+/**
+ * Récupère les informations de l'onglet tiers
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_tiers ( gint report_number )
+{
+    gint active;
 
-    for ( i=0 ; i<GTK_CLIST ( liste_type_classement_etat ) -> rows ; i++ )
+    active = etats_config_ui_toggle_button_get_actif ( "bouton_detaille_tiers_etat" );
+    gsb_data_report_set_payee_detail_used ( report_number, active );
+    if ( active )
     {
-	gint no;
-
-	no = GPOINTER_TO_INT ( gtk_ctree_node_get_row_data ( GTK_CTREE ( liste_type_classement_etat ),
-							     gtk_ctree_node_nth ( GTK_CTREE ( liste_type_classement_etat ),
-										  i )));
-
-	gsb_data_report_set_sorting_type ( current_report_number,
-					   g_slist_append ( gsb_data_report_get_sorting_type (current_report_number),
-							    GINT_TO_POINTER ( no )));
-
-	/* rajoute les ss categ et ss ib */
-
-	if ( no == 1 )
-	    gsb_data_report_set_sorting_type ( current_report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (current_report_number),
-								GINT_TO_POINTER ( 2 )));
-	if ( no == 3 )
-	    gsb_data_report_set_sorting_type ( current_report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (current_report_number),
-								GINT_TO_POINTER ( 4 )));
-    }
+        gsb_data_report_free_payee_numbers_list ( report_number );
 
-    /* récupération de l'affichage ou non des R */
+        if ( utils_tree_view_all_rows_are_selected ( GTK_TREE_VIEW (
+         etats_config_ui_widget_get_widget_by_name ( "treeview_tiers", NULL ) ) ) )
+        {
+            gchar *text;
+            gchar *hint;
 
-    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_opes_r_et_non_r_etat )) )
-	gsb_data_report_set_show_r ( current_report_number,
-				     0 );
-    else
-    {
-	if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_opes_non_r_etat )) )
-	    gsb_data_report_set_show_r ( current_report_number,
-					 1 );
-	else
-	    gsb_data_report_set_show_r ( current_report_number,
-					 2 );
-    }
+            hint = g_strdup ( _("Performance issue.") );
+            text = g_strdup ( _("All payees have been selected.  Grisbi will run "
+                            "faster without the \"Detail payees used\" option activated.") );
 
-    /* récupération de l'affichage des opés */
-
-    gsb_data_report_set_show_report_transactions ( current_report_number,
-						   gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_opes )));
-    gsb_data_report_set_show_report_transaction_amount ( current_report_number,
-							 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_nb_opes )));
-
-    gsb_data_report_set_show_report_transaction_number ( current_report_number,
-							 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_no_ope )));
-    gsb_data_report_set_show_report_date ( current_report_number,
-					   gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_date_opes )));
-    gsb_data_report_set_show_report_value_date ( current_report_number,
-						 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_value_date_opes )));
-    gsb_data_report_set_show_report_payee ( current_report_number,
-					    gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_tiers_opes )));
-    gsb_data_report_set_show_report_category ( current_report_number,
-					       gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_categ_opes )));
-    gsb_data_report_set_show_report_sub_category ( current_report_number,
-						   gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_sous_categ_opes )));
-    gsb_data_report_set_show_report_method_of_payment ( current_report_number,
-							gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_type_ope )));
-    gsb_data_report_set_show_report_budget ( current_report_number,
-					     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_ib_opes )));
-    gsb_data_report_set_show_report_sub_budget ( current_report_number,
-						 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_sous_ib_opes )));
-    gsb_data_report_set_show_report_method_of_payment_content ( current_report_number,
-								gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_no_cheque )));
-    gsb_data_report_set_show_report_note ( current_report_number,
-					   gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_notes_opes )));
-    gsb_data_report_set_show_report_voucher ( current_report_number,
-					      gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_pc_opes )));
-    gsb_data_report_set_show_report_marked ( current_report_number,
-					     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_no_rappr )));
-    gsb_data_report_set_show_report_bank_references ( current_report_number,
-						      gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_infobd_opes )));
-    gsb_data_report_set_not_detail_split ( current_report_number,
-					       gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_pas_detailler_ventilation )));
-    gsb_data_report_set_split_credit_debit ( current_report_number,
-					     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_separer_revenus_depenses )));
-    gsb_data_report_set_show_report_financial_year ( current_report_number,
-						     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_exo_opes )));
-    gsb_data_report_set_column_title_show ( current_report_number,
-					    gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_titres_colonnes )));
-    gsb_data_report_set_column_title_type ( current_report_number,
-					    gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_titre_changement )));
-
-    gsb_data_report_set_sorting_report ( current_report_number,
-					 GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU ( bouton_choix_classement_ope_etat ) -> menu_item ),
-										 "no_classement" )));
-
-    gsb_data_report_set_report_can_click ( current_report_number,
-					   gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_rendre_ope_clickables )));
-
-    gsb_data_report_set_currency_general ( current_report_number,
-					   gsb_currency_get_currency_from_combobox (bouton_devise_general_etat));
-    gsb_data_report_set_append_in_payee ( current_report_number,
-					  gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_inclure_dans_tiers )));
-
-
-    /* récupération des dates */
-
-    gsb_data_report_set_use_financial_year ( current_report_number,
-					     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( radio_button_utilise_exo )));
-
-    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_exo_tous )) )
-	gsb_data_report_set_financial_year_type ( current_report_number,
-						  0 );
-    else
-    {
-	if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_exo_courant )) )
-	    gsb_data_report_set_financial_year_type ( current_report_number,
-						      1 );
-	else
-	{
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_exo_precedent )) )
-		gsb_data_report_set_financial_year_type ( current_report_number,
-							  2 );
-	    else
-		gsb_data_report_set_financial_year_type ( current_report_number,
-							  3 );
-	}
-    }
+            dialogue_special ( GTK_MESSAGE_INFO, make_hint ( hint, text ) );
+            etats_config_ui_toggle_button_set_actif ( "togglebutton_select_all_tiers", FALSE );
+            gsb_data_report_set_payee_detail_used ( report_number, FALSE );
 
-    if ( gsb_data_report_get_financial_year_list (current_report_number))
-    {
-	g_slist_free ( gsb_data_report_get_financial_year_list (current_report_number));
-	gsb_data_report_set_financial_year_list ( current_report_number,
-						  NULL );
+            g_free ( text );
+            g_free ( hint );
+        }
+        else
+            gsb_data_report_set_payee_numbers_list ( report_number,
+                            etats_config_ui_tree_view_get_list_rows_selected ( "treeview_tiers" ) );
     }
+}
 
-    list_tmp = GTK_CLIST ( liste_exo_etat ) -> selection;
-
-    while ( list_tmp )
-    {
-	gsb_data_report_set_financial_year_list ( current_report_number,
-						  g_slist_append ( gsb_data_report_get_financial_year_list (current_report_number),
-								   gtk_clist_get_row_data ( GTK_CLIST ( liste_exo_etat ),
-											    GPOINTER_TO_INT ( list_tmp -> data ))));
-	list_tmp = list_tmp -> next;
-    }
 
-    /*   si tous les exos ont été sélectionnés, on met bouton_detaille_exo_etat à 0 (plus rapide) */
+/*ONGLET_CATEGORIES BUDGETS*/
+/**
+ * Initialise les informations des onglets catégories ou budgets
+ *
+ * \param report_number
+ * \param is_categ TRUE = Categories FALSE = Budgets
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_categ_budget ( gint report_number,
+                        gboolean is_categ )
+{
+    gint active;
+    gchar *checkbutton_name;
+    gchar *button_name;
+    gchar *treeview_name;
+    GSList *tmp_list;
 
-    if ( ( g_list_length ( GTK_CLIST ( liste_exo_etat ) -> selection )
-	   ==
-	   GTK_CLIST ( liste_exo_etat ) -> rows )
-	 &&
-	 gsb_data_report_get_financial_year_type (current_report_number) == 3 )
+    if ( is_categ )
     {
-	dialogue_special ( GTK_MESSAGE_INFO,
-			   make_hint ( _("Performance issue."),
-				       _("All financial years have been selected.  Grisbi will run faster without the \"Detail financial years\" option activated.") ) );
-	gsb_data_report_set_financial_year_type ( current_report_number,
-						  0 );
+        active = gsb_data_report_get_category_detail_used ( report_number );
+        checkbutton_name = g_strdup ( "bouton_detaille_categ_etat" );
+        treeview_name = g_strdup ( "treeview_categ" );
+        button_name = g_strdup ( "togglebutton_select_all_categ" );
+        tmp_list = gsb_data_report_get_category_struct_list ( report_number );
     }
-
-
-    gsb_data_report_set_financial_year_split ( current_report_number,
-					       gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_separe_exo_etat )));
-
-    gsb_data_report_set_date_type ( current_report_number,
-				    GPOINTER_TO_INT ( GTK_CLIST ( liste_plages_dates_etat ) -> selection -> data ));
-
-    gsb_data_report_set_personal_date_start ( current_report_number,
-					      gsb_calendar_entry_get_date (entree_date_init_etat));
-    gsb_data_report_set_personal_date_end ( current_report_number,
-					    gsb_calendar_entry_get_date (entree_date_finale_etat));
-
-    gsb_data_report_set_period_split ( current_report_number,
-				       gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_separe_plages_etat )));
-    gsb_data_report_set_period_split_type ( current_report_number,
-					    GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU ( bouton_type_separe_plages_etat ) -> menu_item ),
-										    "type" )));
-    gsb_data_report_set_period_split_day ( current_report_number,
-					   GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU ( bouton_debut_semaine ) -> menu_item ),
-										   "day" )));
-
-    /* récupération des comptes */
-
-    gsb_data_report_set_account_use_chosen ( current_report_number,
-					     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_comptes_etat )));
-
-    if ( gsb_data_report_get_account_numbers (current_report_number))
+    else
     {
-	g_slist_free ( gsb_data_report_get_account_numbers (current_report_number));
-	gsb_data_report_set_account_numbers ( current_report_number,
-					      NULL );
+        active = gsb_data_report_get_budget_detail_used ( report_number );
+        checkbutton_name = g_strdup ( "bouton_detaille_budget_etat" );
+        treeview_name = g_strdup ( "treeview_budget" );
+        button_name = g_strdup ( "togglebutton_select_all_budget" );
+        tmp_list = gsb_data_report_get_budget_struct_list ( report_number );
     }
 
-    list_tmp = GTK_CLIST ( liste_comptes_etat ) -> selection;
+    etats_config_ui_toggle_button_set_actif ( checkbutton_name, active );
 
-    while ( list_tmp )
+    if ( active )
     {
-	gsb_data_report_set_account_numbers ( current_report_number,
-					      g_slist_append ( gsb_data_report_get_account_numbers (current_report_number),
-							       gtk_clist_get_row_data ( GTK_CLIST ( liste_comptes_etat ),
-											GPOINTER_TO_INT ( list_tmp -> data ))));
-	list_tmp = list_tmp -> next;
-    }
-
-    /*   si tous les comptes ont été sélectionnés, on met utilise_detail_comptes à 0 (plus rapide) */
+        etats_config_onglet_categ_budget_init_treeview ( treeview_name, tmp_list );
 
-    if ( ( g_list_length ( GTK_CLIST ( liste_comptes_etat ) -> selection )
-	   ==
-	   GTK_CLIST ( liste_comptes_etat ) -> rows )
-	 &&
-	 gsb_data_report_get_account_use_chosen (current_report_number))
-    {
-	dialogue_special ( GTK_MESSAGE_INFO,
-			   make_hint ( _("Performance issue."),
-				       _("All accounts have been selected.  Grisbi will run faster without the \"Detail accounts used\" option activated.") ) );
-	gsb_data_report_set_account_use_chosen ( current_report_number,
-						 0 );
+        if ( g_slist_length ( tmp_list ) )
+            utils_togglebutton_set_label_position_unselect (
+                                etats_config_ui_widget_get_widget_by_name (
+                                button_name, NULL ),
+                                G_CALLBACK ( etats_config_ui_onglet_categ_budget_check_uncheck_all ),
+                                etats_config_ui_widget_get_widget_by_name ( treeview_name, NULL ) );
     }
 
-    gsb_data_report_set_account_group_reports ( current_report_number,
-						gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_regroupe_ope_compte_etat )));
-    gsb_data_report_set_account_show_amount ( current_report_number,
-					      gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_compte )));
-    gsb_data_report_set_account_show_name ( current_report_number,
-					    gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_comptes )));
+    g_free ( checkbutton_name );
+    g_free ( treeview_name );
+    g_free ( button_name );
+}
 
 
-    /* récupération des virements */
+/**
+ * Récupère les informations des onglets catégories ou budgets
+ *
+ * \param report_number
+ * \param is_categ TRUE = Categories FALSE = Budgets
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_categ_budget ( gint report_number,
+                        gboolean is_categ )
+{
+    gint active;
+    gchar *treeview_name;
 
-    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_inclusion_virements_actifs_etat )))
-	gsb_data_report_set_transfer_choice ( current_report_number,
-					      1 );
-    else
-	if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_inclusion_virements_hors_etat )))
-	    gsb_data_report_set_transfer_choice ( current_report_number,
-						  2 );
-	else
-	{
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_non_inclusion_virements )))
-		gsb_data_report_set_transfer_choice ( current_report_number,
-						      0 );
-	    else
-		gsb_data_report_set_transfer_choice ( current_report_number,
-						      3 );
-	}
-
-    if ( gsb_data_report_get_transfer_account_numbers (current_report_number))
+    if ( is_categ )
     {
-	g_slist_free ( gsb_data_report_get_transfer_account_numbers (current_report_number));
-	gsb_data_report_set_transfer_account_numbers ( current_report_number,
-						       NULL );
-    }
+        active = etats_config_ui_toggle_button_get_actif ( "bouton_detaille_categ_etat" );
+        treeview_name = g_strdup ( "treeview_categ" );
 
-    list_tmp = GTK_CLIST ( liste_comptes_virements ) -> selection;
-
-    while ( list_tmp )
-    {
-	gsb_data_report_set_transfer_account_numbers ( current_report_number,
-						       g_slist_append ( gsb_data_report_get_transfer_account_numbers (current_report_number),
-									gtk_clist_get_row_data ( GTK_CLIST ( liste_comptes_virements ),
-												 GPOINTER_TO_INT ( list_tmp -> data ))));
-	list_tmp = list_tmp -> next;
+        gsb_data_report_set_category_detail_used ( report_number, active );
+        if ( active )
+        {
+            gsb_data_report_set_category_struct_list ( report_number,
+                                etats_config_onglet_categ_budget_get_selected ( treeview_name ) );
+        }
     }
+    else
+    {
+        active = etats_config_ui_toggle_button_get_actif ( "bouton_detaille_budget_etat" );
+        treeview_name = g_strdup ( "treeview_budget" );
 
-    gsb_data_report_set_transfer_reports_only ( current_report_number,
-						gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_exclure_non_virements_etat )));
+        gsb_data_report_set_budget_detail_used ( report_number, active );
+        if ( active )
+        {
+            gsb_data_report_set_budget_struct_list ( report_number,
+                                etats_config_onglet_categ_budget_get_selected ( treeview_name ) );
+        }
+    }
 
+    g_free ( treeview_name );
+}
 
-    /* get the categories */
-    gsb_data_report_set_category_used ( current_report_number,
-					gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button_group_by_categ )));
 
-    gsb_data_report_set_category_detail_used ( current_report_number,
-					       gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button_detail_categ )));
+/**
+ * create the category/budget list for reports
+ * it's a tree with categories/budget and sub-categories/budgets,
+ * and a check-button to select them
+ *
+ * \param
+ *
+ * \return a GtkWidget : the GtkTreeView
+ * */
+GtkTreeModel *etats_config_onglet_categ_budget_get_model ( gboolean is_categ )
+{
+    GtkTreeStore *store;
 
-    gsb_data_report_set_category_struct (current_report_number, report_config_categ_budget_get_selected (TRUE));
+    store = gtk_tree_store_new ( GSB_ETAT_CATEG_BUDGET_LIST_NB,
+                        G_TYPE_STRING,          /* GSB_ETAT_CATEG_BUDGET_LIST_NAME */
+                        G_TYPE_BOOLEAN,         /* GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE */
+                        G_TYPE_BOOLEAN,         /* GSB_ETAT_CATEG_BUDGET_LIST_ACTIVATABLE */
+                        G_TYPE_INT,             /* GSB_ETAT_CATEG_BUDGET_LIST_NUMBER */
+                        G_TYPE_INT );           /* GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER */
 
-    /* if all was selected, remove the category_detail_used */
-    if (!gsb_data_report_get_category_struct (current_report_number))
-	gsb_data_report_set_category_detail_used ( current_report_number,
-						   FALSE );
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE ( store ),
+                        GSB_ETAT_CATEG_BUDGET_LIST_NAME, GTK_SORT_ASCENDING );
 
-    gsb_data_report_set_category_show_category_amount ( current_report_number,
-							gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_categ )));
-    gsb_data_report_set_category_show_sub_category ( current_report_number,
-						     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_sous_categ )));
-    gsb_data_report_set_category_show_sub_category_amount ( current_report_number,
-							    gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_sous_categ )));
-    gsb_data_report_set_category_show_without_category ( current_report_number,
-							 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_pas_de_sous_categ )));
+    gtk_tree_sortable_set_sort_func ( GTK_TREE_SORTABLE ( store ),
+                        GSB_ETAT_CATEG_BUDGET_LIST_NAME,
+                        (GtkTreeIterCompareFunc) etats_config_onglet_categ_budget_sort_function,
+                        GINT_TO_POINTER ( is_categ ),
+                        NULL );
 
-    gsb_data_report_set_category_currency ( current_report_number,
-					    gsb_currency_get_currency_from_combobox (bouton_devise_categ_etat));
-    gsb_data_report_set_category_show_name ( current_report_number,
-					     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_categ )));
+    etats_config_onglet_categ_budget_fill_model ( GTK_TREE_MODEL ( store ), is_categ );
 
+    /* return */
+    return GTK_TREE_MODEL ( store );
+}
 
-    /* get the budget */
-    gsb_data_report_set_budget_used ( current_report_number,
-				      gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_ib_etat )));
 
-    gsb_data_report_set_budget_detail_used ( current_report_number,
-					     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_ib_etat )));
+/**
+ * callback if we toggle a checkbox in the category/budget list
+ * if we toggle a div, toggle all the sub-div
+ * if we toggle a sub-div, toggle also the div
+ *
+ * \param radio_renderer
+ * \param path          the string of path
+ * \param store         the GtkTreeStore of categ/budget
+ *
+ * \return FALSE
+ * */
+gboolean etats_config_onglet_categ_budget_toggled ( GtkCellRendererToggle *radio_renderer,
+                        gchar *path_str,
+                        GtkTreeStore *store )
+{
+    GtkTreePath *path;
+    GtkTreeIter iter;
+    GtkTreeIter iter_children;
+    gboolean toggle_value;
 
-    gsb_data_report_set_budget_struct (current_report_number, report_config_categ_budget_get_selected (FALSE));
+    g_return_val_if_fail (path_str != NULL, FALSE);
+    g_return_val_if_fail (store != NULL && GTK_IS_TREE_STORE (store), FALSE);
 
-    /* if all was selected, remove the budget_detail_used */
-    if (!gsb_data_report_get_budget_struct (current_report_number))
-	gsb_data_report_set_budget_detail_used ( current_report_number,
-						 FALSE );
+    /* first get the iter and the value of the checkbutton */
+    path = gtk_tree_path_new_from_string (path_str);
+    gtk_tree_model_get_iter ( GTK_TREE_MODEL ( store ), &iter, path );
+    gtk_tree_model_get ( GTK_TREE_MODEL ( store ),
+                        &iter,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, &toggle_value,
+                        -1 );
 
-    gsb_data_report_set_budget_show_budget_amount ( current_report_number,
-						    gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_ib )));
-    gsb_data_report_set_budget_show_sub_budget ( current_report_number,
-						 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (bouton_afficher_sous_ib)));
-    gsb_data_report_set_budget_show_sub_budget_amount ( current_report_number,
-							gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_sous_ib )));
-    gsb_data_report_set_budget_show_without_budget ( current_report_number,
-						     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_pas_de_sous_ib )));
+    /* ok, we invert the button */
+    toggle_value = !toggle_value;
 
-    gsb_data_report_set_budget_currency ( current_report_number,
-					  gsb_currency_get_currency_from_combobox (bouton_devise_ib_etat));
-    gsb_data_report_set_budget_show_name ( current_report_number,
-					   gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_ib )));
+    gtk_tree_store_set ( GTK_TREE_STORE ( store ),
+                        &iter,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
+                        -1 );
 
+    /* if we are on a mother, we set the same value to all the children */
+    if (gtk_tree_model_iter_children ( GTK_TREE_MODEL ( store ), &iter_children, &iter ) )
+    {
+        /* we are on the children */
+        do
+            gtk_tree_store_set ( GTK_TREE_STORE (store),
+                        &iter_children,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
+                        -1 );
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( store ), &iter_children ) );
+    }
 
+    /* if we are activating a child, activate the mother */
+    if (toggle_value
+     &&
+     gtk_tree_model_iter_parent ( GTK_TREE_MODEL ( store ), &iter_children, &iter ) )
+        gtk_tree_store_set ( GTK_TREE_STORE ( store ),
+                        &iter_children,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
+                        -1 );
 
-    /*   récupération des tiers */
+    gtk_tree_path_free ( path );
 
-    gsb_data_report_set_payee_used ( current_report_number,
-				     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_tiers_etat )));
+    return FALSE;
+}
 
-    gsb_data_report_set_payee_detail_used ( current_report_number,
-					    gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_tiers_etat )));
 
-    if ( gsb_data_report_get_payee_numbers (current_report_number))
-    {
-	g_slist_free ( gsb_data_report_get_payee_numbers (current_report_number));
-	gsb_data_report_set_payee_numbers ( current_report_number,
-					    NULL );
-    }
+/**
+ * check or uncheck all the budgets or categories
+ *
+ * \param model         the model to fill (is model_categ or model_budget
+ * \param select_ptr    TRUE or FALSE to select/unselect all
+ *
+ * \return FALSE
+ * */
+void etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( GtkTreeModel *model,
+                        gboolean toggle_value )
+{
+    GtkTreeIter parent_iter;
 
-    list_tmp = GTK_CLIST ( liste_tiers_etat ) -> selection;
+    if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &parent_iter ) )
+        return;
 
-    while ( list_tmp )
+    do
     {
-	gsb_data_report_set_payee_numbers ( current_report_number,
-					    g_slist_append ( gsb_data_report_get_payee_numbers (current_report_number),
-							     gtk_clist_get_row_data ( GTK_CLIST ( liste_tiers_etat ),
-										      GPOINTER_TO_INT ( list_tmp -> data ))));
-	list_tmp = list_tmp -> next;
-    }
+        GtkTreeIter iter_children;
 
-    /*   si tous les tiers ont été sélectionnés, on met utilise_detail_tiers à 0 (plus rapide) */
+        gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                        &parent_iter,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
+                        -1 );
 
-    if ( ( g_list_length ( GTK_CLIST ( liste_tiers_etat ) -> selection )
-	   ==
-	   GTK_CLIST ( liste_tiers_etat ) -> rows )
-	 &&
-	 gsb_data_report_get_payee_detail_used (current_report_number))
-    {
-	dialogue_special ( GTK_MESSAGE_INFO,
-			   make_hint ( _("Performance issue."),
-				       _("All payees have been selected.  Grisbi will run faster without the \"Detail payees used\" option activated.") ) );
-	gsb_data_report_set_payee_detail_used ( current_report_number,
-						0 );
+        if ( gtk_tree_model_iter_children ( GTK_TREE_MODEL ( model ), &iter_children, &parent_iter ) )
+        {
+            /* we are on the children */
+            do
+                gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                        &iter_children,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
+                        -1 );
+            while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter_children ) );
+        }
     }
+    while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &parent_iter ) );
+}
 
-    gsb_data_report_set_payee_show_payee_amount ( current_report_number,
-						  gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_tiers )));
 
-    gsb_data_report_set_payee_currency ( current_report_number,
-					 gsb_currency_get_currency_from_combobox (bouton_devise_tiers_etat));
-    gsb_data_report_set_payee_show_name ( current_report_number,
-					  gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_tiers )));
+/**
+ *
+ *
+ *
+ */
+gboolean etats_config_onglet_categ_budget_select_partie_liste ( GtkWidget *button,
+                        GdkEventButton *event,
+                        GtkWidget *tree_view )
+{
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    gboolean is_categ;
+    gboolean type_div;
 
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
+    if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
+        return FALSE;
 
-    /* récupération du texte */
+    etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( model, FALSE );
 
-    gsb_data_report_set_text_comparison_used ( current_report_number,
-					       gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_texte )));
+    is_categ = GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( button ), "is_categ" ) );
+    type_div = GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( button ), "type_div" ) );
 
-    /* récupération de la liste des comparaisons de texte */
-    /*   il y a au moins une structure de créée, si celle si a l'entrée txt et 2 montants vides, */
-    /* c'est qu'il n'y a aucune liste */
+    do
+    {
+        gint div_number;
+
+        gtk_tree_model_get ( GTK_TREE_MODEL ( model ),
+                        &iter,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, &div_number,
+                        -1 );
+
+        /* we always select without categories/budget ?? set yes by default */
+        if ( !div_number
+         ||
+         (is_categ && ( gsb_data_category_get_type ( div_number ) == type_div ) )
+         ||
+         (!is_categ && ( gsb_data_budget_get_type ( div_number ) == type_div ) ) )
+        {
+            GtkTreeIter iter_children;
+
+            gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                        &iter,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, TRUE,
+                        -1 );
+
+            if ( gtk_tree_model_iter_children ( GTK_TREE_MODEL ( model ), &iter_children, &iter ) )
+            {
+                /* we are on the children */
+                do
+                    gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                                &iter_children,
+                                GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, TRUE,
+                                -1 );
+
+                while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter_children ) );
+            }
+        }
+    }
+    while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
 
-    /*     text_comparison_number = GPOINTER_TO_INT (gsb_data_report_get_text_comparison_list (current_report_number)-> data); */
+    return FALSE;
+}
 
-    /* on a rentré au moins une comparaison */
-    /* on rempli les champs de la structure */
 
-    comparison_list = gsb_data_report_get_text_comparison_list (current_report_number);
+/**
+ * fill the categories selection list for report
+ *
+ * \param model
+ * \param is_categ  TRUE for category, FALSE for budget
+ *
+ * \return FALSE
+ * */
+gboolean etats_config_onglet_categ_budget_fill_model ( GtkTreeModel *model,
+                        gboolean is_categ )
+{
+    GtkTreeIter parent_iter;
+    GtkTreeIter child_iter;
+    GSList *list_tmp;
+    gchar *name;
+    gchar *without_name;
+    gchar *without_sub_name;
 
-    while ( comparison_list )
+    if ( is_categ )
     {
-	const gchar *string;
-	gint text_comparison_number;
-
-	text_comparison_number = GPOINTER_TO_INT (comparison_list -> data);
-
-	if ( gsb_data_report_text_comparison_get_button_link (text_comparison_number))
-	    gsb_data_report_text_comparison_set_link_to_last_text_comparison ( text_comparison_number,
-									       GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_link (text_comparison_number)) -> menu_item ),
-														       "no_lien" )));
-	else
-	    gsb_data_report_text_comparison_set_link_to_last_text_comparison ( text_comparison_number,
-									       -1 );
-
-	gsb_data_report_text_comparison_set_field ( text_comparison_number,
-						    GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_field (text_comparison_number)) -> menu_item ),
-											    "no_champ" )));
-	gsb_data_report_text_comparison_set_use_text ( text_comparison_number,
-						       gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number))));
-	gsb_data_report_text_comparison_set_operator ( text_comparison_number,
-						       GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_operator (text_comparison_number)) -> menu_item ),
-											       "no_operateur" )));
-
-	string = gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)));
-	gsb_data_report_text_comparison_set_text ( text_comparison_number,
-						   string );
-
-	gsb_data_report_text_comparison_set_first_comparison ( text_comparison_number,
-							       GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_first_comparison (text_comparison_number)) -> menu_item ),
-												       "no_comparateur" )));
-	gsb_data_report_text_comparison_set_link_first_to_second_part ( text_comparison_number,
-									GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_link_first_to_second_part (text_comparison_number)) -> menu_item ),
-														"no_lien" )));
-	gsb_data_report_text_comparison_set_second_comparison ( text_comparison_number,
-								GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_second_comparison (text_comparison_number)) -> menu_item ),
-													"no_comparateur" )));
-	gsb_data_report_text_comparison_set_first_amount ( text_comparison_number,
-							   utils_str_atoi ( gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_text_comparison_get_entry_first_amount (text_comparison_number)))));
-	gsb_data_report_text_comparison_set_second_amount ( text_comparison_number,
-							    utils_str_atoi (gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_text_comparison_get_entry_second_amount (text_comparison_number)))));
-
-	comparison_list = comparison_list -> next;
-    }
-
-    /* récupération du montant */
-
-    gsb_data_report_set_amount_comparison_used ( current_report_number,
-						 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_montant )));
-    gsb_data_report_set_amount_comparison_currency ( current_report_number,
-						     gsb_currency_get_currency_from_combobox (bouton_devise_montant_etat));
+        list_tmp = gsb_data_category_get_categories_list ( );
 
-    /* récupération de la liste des comparaisons de montant */
-    /*   il y a au moins une structure de créé, si celle si a les 2 montants vides, */
-    /* c'est qu'il n'y a aucune liste */
+        gtk_tree_store_clear ( GTK_TREE_STORE ( model ) );
 
-    amount_comparison_number = GPOINTER_TO_INT (gsb_data_report_get_amount_comparison_list (current_report_number)-> data);
-
-    if ( g_slist_length ( gsb_data_report_get_amount_comparison_list (current_report_number)) == 1
-	 &&
-	 !strlen ( gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number))))
-	 &&
-	 !strlen ( gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number))))
-	 &&
-	 GTK_WIDGET_SENSITIVE (gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number))
-	 &&
-	 GTK_WIDGET_SENSITIVE (gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number)))
-    {
-	g_slist_free ( gsb_data_report_get_amount_comparison_list (current_report_number));
-	gsb_data_report_set_amount_comparison_list ( current_report_number,
-						     NULL );
+        without_name = _("No category");
+        without_sub_name = _("No subcategory");
     }
     else
     {
-	/* on a rentré au moins une comparaison */
-	/* on rempli les champs de la structure */
-
-	GSList *comparison_list;
-
-	comparison_list = gsb_data_report_get_amount_comparison_list (current_report_number);
-
-	while ( comparison_list )
-	{
-	    amount_comparison_number = GPOINTER_TO_INT (comparison_list -> data);
-
-	    if ( gsb_data_report_amount_comparison_get_button_link (amount_comparison_number))
-		gsb_data_report_amount_comparison_set_link_to_last_amount_comparison ( amount_comparison_number,
-										       GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_link (amount_comparison_number)) -> menu_item ),
-															       "no_lien" )));
-	    else
-		gsb_data_report_amount_comparison_set_link_to_last_amount_comparison ( amount_comparison_number,
-										       -1 );
-
-	    gsb_data_report_amount_comparison_set_first_comparison ( amount_comparison_number,
-								     GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_first_comparison (amount_comparison_number)) -> menu_item ),
-													     "no_comparateur" )));
-
-	    gsb_data_report_amount_comparison_set_link_first_to_second_part ( amount_comparison_number,
-									      GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_link_first_to_second_part (amount_comparison_number)) -> menu_item ),
-														      "no_lien" )));
-	    gsb_data_report_amount_comparison_set_second_comparison ( amount_comparison_number,
-								      GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_second_comparison (amount_comparison_number)) -> menu_item ),
-													      "no_comparateur" )));
-	    gsb_data_report_amount_comparison_set_first_amount ( amount_comparison_number,
-								 utils_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number)))));
-	    gsb_data_report_amount_comparison_set_second_amount ( amount_comparison_number,
-								  utils_real_get_from_string (gtk_entry_get_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number)))));
-
-	    comparison_list = comparison_list -> next;
-	}
-    }
-
-    gsb_data_report_set_amount_comparison_only_report_non_null ( current_report_number,
-								 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_exclure_ope_nulles_etat )));
-
-    /* récupération des modes de paiement */
+        list_tmp = gsb_data_budget_get_budgets_list ( );
+        gtk_tree_store_clear ( GTK_TREE_STORE ( model ) );
 
-    gsb_data_report_set_method_of_payment_used ( current_report_number,
-						 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_mode_paiement_etat )));
-
-    if ( gsb_data_report_get_method_of_payment_list (current_report_number))
-    {
-	g_slist_free ( gsb_data_report_get_method_of_payment_list (current_report_number));
-	gsb_data_report_set_method_of_payment_list ( current_report_number,
-						     NULL );
+        without_name = _("No budgetary line");
+        without_sub_name = _("No sub-budgetary line");
     }
 
-    list_tmp = GTK_CLIST ( liste_mode_paiement_etat ) -> selection;
-
     while ( list_tmp )
     {
-	gsb_data_report_set_method_of_payment_list ( current_report_number,
-						     g_slist_append ( gsb_data_report_get_method_of_payment_list (current_report_number),
-								      gtk_clist_get_row_data ( GTK_CLIST ( liste_mode_paiement_etat ),
-											       GPOINTER_TO_INT ( list_tmp -> data ))));
-	list_tmp = list_tmp -> next;
+        gint div_number;
+        GSList *tmp_list_sub_div;
+
+        /* get the category to append */
+        if ( is_categ )
+        {
+            div_number = gsb_data_category_get_no_category ( list_tmp -> data );
+            name = gsb_data_category_get_name (div_number, 0, NULL );
+            tmp_list_sub_div = gsb_data_category_get_sub_category_list ( div_number );
+        }
+        else
+        {
+            div_number = gsb_data_budget_get_no_budget ( list_tmp -> data );
+            name = gsb_data_budget_get_name ( div_number, 0, NULL );
+            tmp_list_sub_div = gsb_data_budget_get_sub_budget_list ( div_number );
+        }
+
+        /* append to the model */
+            gtk_tree_store_append ( GTK_TREE_STORE ( model ), &parent_iter, NULL );
+            gtk_tree_store_set (GTK_TREE_STORE ( model ),
+                                &parent_iter,
+                                GSB_ETAT_CATEG_BUDGET_LIST_NAME, name,
+                                GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, div_number,
+                                GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, -1,
+                                GSB_ETAT_CATEG_BUDGET_LIST_ACTIVATABLE, TRUE,
+                                -1 );
+
+        g_free (name);
+
+        /* append the sub categories */
+        while (tmp_list_sub_div)
+        {
+            gint sub_div_number;
+
+            if ( is_categ )
+            {
+                sub_div_number = gsb_data_category_get_no_sub_category ( tmp_list_sub_div -> data );
+                name = gsb_data_category_get_sub_category_name ( div_number, sub_div_number, NULL );
+            }
+            else
+            {
+                sub_div_number = gsb_data_budget_get_no_sub_budget ( tmp_list_sub_div -> data );
+                name = gsb_data_budget_get_sub_budget_name ( div_number, sub_div_number, NULL );
+            }
+
+            /* append to the model */
+            gtk_tree_store_append ( GTK_TREE_STORE ( model ), &child_iter, &parent_iter );
+            gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                                &child_iter,
+                                GSB_ETAT_CATEG_BUDGET_LIST_NAME, name,
+                                GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, -1,
+                                GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, sub_div_number,
+                                GSB_ETAT_CATEG_BUDGET_LIST_ACTIVATABLE, TRUE,
+                                -1 );
+
+            g_free (name);
+
+            tmp_list_sub_div = tmp_list_sub_div -> next;
+        }
+
+        /* append without sub-div */
+            gtk_tree_store_append ( GTK_TREE_STORE ( model ), &child_iter, &parent_iter );
+            gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                                &child_iter,
+                                GSB_ETAT_CATEG_BUDGET_LIST_NAME, without_sub_name,
+                                GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, -1,
+                                GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, 0,
+                                GSB_ETAT_CATEG_BUDGET_LIST_ACTIVATABLE, TRUE,
+                                -1 );
+
+        list_tmp = list_tmp -> next;
     }
 
-    /*   si tous les modes de paiement ont été sélectionnés, on met utilise_mode_paiement à 0 (plus rapide) */
-
-    if ( ( g_list_length ( GTK_CLIST ( liste_mode_paiement_etat ) -> selection )
-	   ==
-	   GTK_CLIST ( liste_mode_paiement_etat ) -> rows )
-	 &&
-	 gsb_data_report_get_method_of_payment_used (current_report_number))
-    {
-	dialogue_special ( GTK_MESSAGE_INFO,
-			   make_hint ( _("Performance issue."),
-				       _("All methods of payment have been selected.  Grisbi will run faster without the \"Detail methods of payment used\" option activated.") ) );
-	gsb_data_report_set_method_of_payment_used ( current_report_number,
-						     0 );
-    }
-
-    /* update the payee combofix in the form, to add that report if asked */
-    gsb_form_widget_update_payee_combofix ();
-
-    gsb_file_set_modified ( TRUE );
-    /* on réaffiche l'état */
-
-    rafraichissement_etat ( gsb_gui_navigation_get_current_report ());
-
-    /* on repasse à la 1ère page du notebook */
-    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_etats ),
-			    0 );
-    gtk_widget_set_sensitive ( gsb_gui_navigation_get_tree_view ( ), TRUE );
-
-    gsb_gui_navigation_update_report ( gsb_gui_navigation_get_current_report ());
-}
-/******************************************************************************/
-
-
-
-/**
- * If applicable, update report navigation tree style to reflect which
- * pages have been changed.
- *
- * \param page_number	Page that contained an interface element just
- *			changed that triggered this event.
- *
- * \return		FALSE
- */
-gboolean report_tree_update_style ( gint * page_number )
-{
-
-    gtk_tree_model_foreach ( GTK_TREE_MODEL(report_tree_model),
-			     (GtkTreeModelForeachFunc) report_tree_update_style_iterator,
-			     GINT_TO_POINTER ( page_number ) );
+    /* append without div and sub-div*/
+    gtk_tree_store_append ( GTK_TREE_STORE ( model ), &parent_iter, NULL );
+    gtk_tree_store_set (GTK_TREE_STORE ( model ),
+                        &parent_iter,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NAME, without_name,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, 0,
+                        GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, -1,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVATABLE, TRUE,
+                        -1 );
+
+    gtk_tree_store_append ( GTK_TREE_STORE ( model ), &child_iter, &parent_iter );
+    gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                        &child_iter,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NAME, without_sub_name,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, -1,
+                        GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, 0,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVATABLE, TRUE,
+                        -1 );
 
     return FALSE;
 }
 
 
-
 /**
- * Iterator that iterates over the report tree model and updates
- * iter of report that is equal to `data'.
  *
- * \param tree_model	Pointer to the model of the navigation tree.
- * \param path		Not used.
- * \param iter		Current iter to test.
- * \param data		Page to be updated.
  *
- * \return TRUE if this iter matches.
+ *
  */
-gboolean report_tree_update_style_iterator ( GtkTreeModel * tree_model,
-					     GtkTreePath *path,
-					     GtkTreeIter *iter,
-					     gpointer data )
+gint etats_config_onglet_categ_budget_sort_function ( GtkTreeModel *model,
+                        GtkTreeIter *iter_1,
+                        GtkTreeIter *iter_2,
+                        gpointer ptr )
 {
-    gint page_number = GPOINTER_TO_INT(data);
-    gint iter_page_number;
-    gint italic = FALSE;
+    gchar *name_1;
+    gchar *name_2;
+    gchar *without_name;
+    gchar *without_sub_name;
+    gint number_1;
+    gint number_2;
+    gint sub_number_1;
+    gint sub_number_2;
+    gint return_value = 0;
+    gboolean is_categ;
 
-    gtk_tree_model_get ( tree_model, iter, REPORT_TREE_PAGE_COLUMN, &iter_page_number, -1 );
+    is_categ = GPOINTER_TO_INT ( ptr );
 
-    if ( iter_page_number != page_number )
+    if ( is_categ )
     {
-	return FALSE;
+        without_name = _("No category");
+        without_sub_name = _("No subcategory");
     }
-
-    switch ( iter_page_number )
+    else
     {
-	/* rien pour l'instant */
-	break;
-
-	case 1:
-	    /* page des virements */
-	    if ( !gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_non_inclusion_virements )))
-		italic = TRUE;
-	    break;
-
-	case 2:
-	    /* page des comptes */
-
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_comptes_etat )))
-		italic = TRUE;
-	    break;
-
-	case 3:
-	    /* page des tiers */
-
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_tiers_etat )))
-		italic = TRUE;
-	    break;
-
-	case 4:
-	    /* page des catégories */
-
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button_detail_categ )))
-		italic = TRUE;
-	    break;
-
-	case 5:
-	    /* page des ib */
-
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_ib_etat )))
-		italic = TRUE;
-	    break;
-
-	case 6:
-	    /* page des textes */
-
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_texte )))
-		italic = TRUE;
-	    break;
-
-	case 7:
-	    /* page des montants */
-
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_montant ))
-		 ||
-		 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_exclure_ope_nulles_etat )))
-		italic = TRUE;
-	    break;
-
-	case 8:
-	    /* page des modes de paiement */
-
-	    if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_mode_paiement_etat )))
-		italic = TRUE;
-	    break;
-
-	case 9:
-	    /* page des divers */
-
-	    if ( !gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_opes_r_et_non_r_etat ))
-		 ||
-		 gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_pas_detailler_ventilation )))
-		italic = TRUE;
-	    break;
+        without_name = _("No budgetary line");
+        without_sub_name = _("No sub-budgetary line");
     }
 
-    gtk_tree_store_set ( GTK_TREE_STORE ( tree_model ),
-			 iter, REPORT_TREE_ITALIC_COLUMN, italic,
-			 -1 );
-
-    return TRUE;
-}
+    /* first, we sort by date (col 0) */
+    gtk_tree_model_get ( model,
+                        iter_1,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NAME, &name_1,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, &number_1,
+                        GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, &sub_number_1,
+                        -1 );
 
+    gtk_tree_model_get ( model,
+                        iter_2,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NAME, &name_2,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, &number_2,
+                        GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, &sub_number_2,
+                        -1 );
 
 
-GtkWidget *onglet_etat_dates ( void )
-{
-    GtkWidget *scrolled_window, *separateur, *vbox;
-    GtkWidget *hbox, *label, *frame, *hbox_onglet;
-    GtkWidget *vbox_onglet;
-    gchar **plages_dates;
-    gint i;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Date selection"), "scheduler.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    hbox_onglet = gtk_hbox_new ( FALSE,
-				 5 );
-    gtk_widget_show ( hbox_onglet );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox_onglet,
-			 TRUE,
-			 TRUE,
-			 0 );
-
-
-    /* mise en place de la plage de dates */
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_onglet ),
-			 vbox,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    radio_button_utilise_dates = gtk_radio_button_new_with_label ( NULL,
-								   _("Use dates ranges") );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 radio_button_utilise_dates,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( radio_button_utilise_dates );
-
-    /* on met en dessous une liste avec les plages de date proposées */
-
-    frame = gtk_frame_new (NULL);
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 frame,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( frame );
-
-    vbox_utilisation_date = gtk_vbox_new ( FALSE, 5 );
-    gtk_container_set_border_width ( GTK_CONTAINER ( vbox_utilisation_date ),
-				     10 );
-    gtk_container_add ( GTK_CONTAINER ( frame ),
-			vbox_utilisation_date );
-    gtk_widget_show ( vbox_utilisation_date );
-
-    /* on met la connection pour rendre sensitif cette frame */
-
-    g_signal_connect ( G_OBJECT ( radio_button_utilise_dates ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 vbox_utilisation_date );
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( vbox_utilisation_date ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-
-    liste_plages_dates_etat = gtk_clist_new ( 1 );
-    gtk_clist_set_column_auto_resize ( GTK_CLIST ( liste_plages_dates_etat ),
-				       0,
-				       TRUE );
-    g_signal_connect ( G_OBJECT ( liste_plages_dates_etat ),
-			 "button_press_event",
-			 G_CALLBACK ( click_liste_etat ),
-			 NULL );
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			liste_plages_dates_etat );
-    gtk_widget_show ( liste_plages_dates_etat );
-
-    /* on remplit la liste des dates */
-
-    plages_dates = liste_plages_dates;
-
-    i = 0;
-
-    while ( plages_dates[i] )
+    if ( number_1 != -1 && number_2 != -1 && number_1 - number_2 )
     {
-	gint row;
-	gchar * plage = _(plages_dates[i]);
+        if ( number_1 == 0 )
+            return_value = -1;
+        else if ( number_2 == 0 )
+            return_value = 1;
+        else
+            return_value =  strcmp ( g_utf8_collate_key ( name_1, -1 ),
+                        g_utf8_collate_key ( name_2, -1 ) );
 
-	row = gtk_clist_append ( GTK_CLIST ( liste_plages_dates_etat ),
-				   &plage );
-	i++;
+        if ( name_1) g_free ( name_1);
+        if ( name_2) g_free ( name_2);
     }
 
-    /* séparation gauche-droite */
-
-    separateur = gtk_vseparator_new ();
-    gtk_box_pack_start ( GTK_BOX ( hbox_onglet ),
-			 separateur,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( separateur );
-
-
-    /*   on met en forme la partie de droite : utilisation des exercices */
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_onglet ),
-			 vbox,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    radio_button_utilise_exo = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( radio_button_utilise_dates )),
-								 _("Use financial years") );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 radio_button_utilise_exo,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( radio_button_utilise_exo );
-
-    /* on met la liste des exos sous ce radio button */
-
-    frame = gtk_frame_new ( FALSE );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 frame,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( frame );
-
-
-    /* on met la connection pour rendre sensitif cette frame */
-
-    g_signal_connect ( G_OBJECT (radio_button_utilise_exo ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 frame );
-
-    vbox_utilisation_exo = gtk_vbox_new ( FALSE, 5 );
-    gtk_container_set_border_width ( GTK_CONTAINER ( vbox_utilisation_exo ),
-				     10 );
-    gtk_container_add ( GTK_CONTAINER ( frame ),
-			vbox_utilisation_exo );
-    gtk_widget_show ( vbox_utilisation_exo );
-
-
-    /*   on met le détail, exo courant ou précédent */
-
-    bouton_exo_tous = gtk_radio_button_new_with_label ( NULL,
-							_("All financial years"));
-    gtk_box_pack_start ( GTK_BOX ( vbox_utilisation_exo ),
-			 bouton_exo_tous,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_exo_tous );
-
-    bouton_exo_courant = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_exo_tous )),
-							   _("Current financial year"));
-    gtk_box_pack_start ( GTK_BOX ( vbox_utilisation_exo ),
-			 bouton_exo_courant,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_exo_courant );
-
-    bouton_exo_precedent = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_exo_tous )),
-							     _("Former financial year"));
-    gtk_box_pack_start ( GTK_BOX ( vbox_utilisation_exo ),
-			 bouton_exo_precedent,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_exo_precedent );
-
-
-
-    bouton_detaille_exo_etat = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_exo_tous )),
-								 _("Detail financial years") );
-    gtk_box_pack_start ( GTK_BOX ( vbox_utilisation_exo ),
-			 bouton_detaille_exo_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_detaille_exo_etat );
-
-    vbox_generale_exo_etat = gtk_vbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_utilisation_exo ),
-			 vbox_generale_exo_etat,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox_generale_exo_etat );
-
-    g_signal_connect ( G_OBJECT ( bouton_detaille_exo_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 vbox_generale_exo_etat );
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( vbox_generale_exo_etat ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    liste_exo_etat = gtk_clist_new ( 1 );
-    gtk_clist_set_selection_mode ( GTK_CLIST ( liste_exo_etat ),
-				   GTK_SELECTION_MULTIPLE );
-    gtk_clist_set_column_auto_resize ( GTK_CLIST ( liste_exo_etat ),
-				       0,
-				       TRUE );
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			liste_exo_etat );
-    gtk_widget_show ( liste_exo_etat );
-
-    /* on remplit la liste des exercices */
+    if ( return_value )
+        return return_value;
 
-    remplissage_liste_exo_etats ();
-
-
-    /* on met ensuite la date perso de début */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_utilisation_date ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    label = gtk_label_new ( _("Initial date: ") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    entree_date_init_etat = gsb_calendar_entry_new (FALSE);
-    gtk_widget_set_size_request ( entree_date_init_etat,
-			   100,
-			   -1 );
-    gtk_box_pack_end ( GTK_BOX ( hbox ),
-		       entree_date_init_etat,
-		       FALSE,
-		       FALSE,
-		       0 );
-    gtk_widget_show ( entree_date_init_etat );
-
-    /* on met ensuite la date perso de fin */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_utilisation_date ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    label = gtk_label_new ( _("Final date: ") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    entree_date_finale_etat = gsb_calendar_entry_new (FALSE);
-    gtk_widget_set_size_request ( entree_date_finale_etat,
-			   100,
-			   -1 );
-    gtk_box_pack_end ( GTK_BOX ( hbox ),
-		       entree_date_finale_etat,
-		       FALSE,
-		       FALSE,
-		       0 );
-    gtk_widget_show ( entree_date_finale_etat );
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
-
-/******************************************************************************/
-/* vérifie où l'on clique et empèche la désélection de row */
-/******************************************************************************/
-void click_liste_etat ( GtkCList *liste,
-			GdkEventButton *evenement,
-			gint origine )
-{
-    gint colonne, x, y;
-    gint row;
-
-    /*   origine = 0 si ça vient des dates, dans ce cas on sensitive les entrées init et fin */
-    /* origine = 1 si ça vient du choix de type de classement */
-
-
-    g_signal_stop_emission_by_name ( G_OBJECT ( liste ),
-				   "button_press_event");
-
-    /* Récupération des coordonnées de la souris */
-
-    gdk_window_get_pointer ( GTK_CLIST ( liste ) -> clist_window,
-			     &x,
-			     &y,
-			     FALSE );
-
-    gtk_clist_get_selection_info ( GTK_CLIST ( liste ),
-				   x,
-				   y,
-				   &row,
-				   &colonne);
-
-    if ( GTK_CLIST ( liste ) -> selection
-	 &&
-	 GPOINTER_TO_INT ( GTK_CLIST ( liste ) -> selection -> data ) == row )
-	return;
+    if ( sub_number_1 == 0 )
+            return_value = -1;
+    else if ( sub_number_2 == 0 )
+            return_value = 1;
+    else
+        return_value =  strcmp ( g_utf8_collate_key ( name_1, -1 ),
+                        g_utf8_collate_key ( name_2, -1 ) );
 
-    gtk_clist_select_row ( GTK_CLIST ( liste ),
-			   row,
-			   0 );
+    if ( name_1) g_free ( name_1);
+    if ( name_2) g_free ( name_2);
 
-    if ( !origine )
-    {
-	if ( row == 1 )
-	{
-	    gtk_widget_set_sensitive ( entree_date_init_etat,
-				       TRUE );
-	    gtk_widget_set_sensitive ( entree_date_finale_etat,
-				       TRUE );
-	}
-	else
-	{
-	    gtk_widget_set_sensitive ( entree_date_init_etat,
-				       FALSE );
-	    gtk_widget_set_sensitive ( entree_date_finale_etat,
-				       FALSE );
-	}
-    }
+    return return_value;
 }
-/******************************************************************************/
 
 
-/******************************************************************************/
-void remplissage_liste_exo_etats ( void )
+/**
+ * get all the selected categ and sub-categ and place them in a list of struct_categ_budget_sel
+ * to be saved in the report
+ *
+ * \param is_categ  TRUE for categ, FALSE for budget
+ *
+ * \return a GSList of struct_categ_budget_sel or NULL if all the categories/sub-categ were selected
+ *          to avoid to filter by categ, to improve speed
+ * */
+GSList *etats_config_onglet_categ_budget_get_selected ( const gchar *treeview_name )
 {
-    GSList *list_tmp;
-
-    if ( !liste_exo_etat )
-	return;
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeIter parent_iter;
+    gboolean all_selected = TRUE;
+    GSList *tmp_list = NULL;
 
-    gtk_clist_clear ( GTK_CLIST ( liste_exo_etat ) );
+    /* on récupère le modèle */
+    tree_view = etats_config_ui_widget_get_widget_by_name ( treeview_name, NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
-    list_tmp = gsb_data_fyear_get_fyears_list ();
+    if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &parent_iter ) )
+        return NULL;
 
-    while ( list_tmp )
+    do
     {
-	gint fyear_number;
-	gchar *name[1];
-	gint row;
+        gint div_number;
+        gboolean active;
+        struct_categ_budget_sel *categ_budget_struct;
+        GtkTreeIter iter_children;
+
+        gtk_tree_model_get (GTK_TREE_MODEL (model),
+                        &parent_iter,
+                        GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, &div_number,
+                        GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, &active,
+                        -1 );
+        if (!active)
+        {
+            all_selected = FALSE;
+            continue;
+        }
+
+        /* ok, we are on a selected category/budget, create and fill the structure */
+        categ_budget_struct = g_malloc0 ( sizeof ( struct_categ_budget_sel ) );
+
+        categ_budget_struct -> div_number = div_number;
+        tmp_list = g_slist_append ( tmp_list, categ_budget_struct );
+
+        /* check the children */
+        if (gtk_tree_model_iter_children ( GTK_TREE_MODEL (model), &iter_children, &parent_iter))
+        {
+            /* we are on the children */
+            do
+            {
+                gint sub_div_number;
+
+                gtk_tree_model_get (GTK_TREE_MODEL (model),
+                                &iter_children,
+                                GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, &sub_div_number,
+                                GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, &active,
+                                -1 );
+                if (active)
+                    categ_budget_struct -> sub_div_numbers = g_slist_append (
+                                                                categ_budget_struct -> sub_div_numbers,
+                                                                GINT_TO_POINTER ( sub_div_number ) );
+                else
+                    all_selected = FALSE;
+            }
+            while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter_children ) );
+        }
+    }
+    while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &parent_iter ) );
 
-	fyear_number = gsb_data_fyear_get_no_fyear (list_tmp -> data);
-
-	name[0] = my_strdup (gsb_data_fyear_get_name (fyear_number));
+    /* if all is selected, erase the new list and set an info message */
+    if ( all_selected )
+    {
+        if ( strcmp ( treeview_name, "treeview_categ" ) == 0 )
+            dialogue_special ( GTK_MESSAGE_INFO,
+                        make_hint ( _("Performance issue."),
+                        _("All categories have been selected.  Grisbi will run faster without "
+                        "the \"Detail categories used\" option activated.") ) );
+        else
+            dialogue_special ( GTK_MESSAGE_INFO,
+                        make_hint ( _("Performance issue."),
+                        _("All budgets have been selected.  Grisbi will run faster without the "
+                        "\"Detail budgets used\" option activated.") ) );
 
-	/* TODO dOm : when is the memory used by name freed ?*/
-	row = gtk_clist_append ( GTK_CLIST ( liste_exo_etat ),
-				   name );
-	gtk_clist_set_row_data ( GTK_CLIST ( liste_exo_etat ),
-				 row,
-				 GINT_TO_POINTER (fyear_number));
+        etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( model, FALSE );
+        gsb_data_report_free_categ_budget_struct_list ( tmp_list );
 
-	list_tmp = list_tmp -> next;
+        tmp_list = NULL;
     }
+    return tmp_list;
 }
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *onglet_etat_comptes ( void )
-{
-    GtkWidget *scrolled_window;
-    GtkWidget *bouton;
-    GtkWidget *vbox;
-    GtkWidget *label;
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Account selection"), "ac_bank.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    /* on met dans la partie de gauche une liste contenant les comptes à */
-    /* sélectionner */
-
-    bouton_detaille_comptes_etat = gtk_check_button_new_with_label ( _("Select transactions only for given accounts"));
-    g_signal_connect_swapped ( G_OBJECT ( bouton_detaille_comptes_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 2 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 bouton_detaille_comptes_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_detaille_comptes_etat );
-
-    vbox_generale_comptes_etat = gtk_vbox_new ( FALSE,
-						5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 vbox_generale_comptes_etat,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox_generale_comptes_etat );
-
-
-    g_signal_connect ( G_OBJECT ( bouton_detaille_comptes_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 vbox_generale_comptes_etat );
-
-    label = gtk_label_new ( _("Select the accounts included in the report: ") );
-	gtk_misc_set_padding ( GTK_MISC ( label ), 3, 0 );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.0 );
-
-    gtk_box_pack_start ( GTK_BOX ( vbox_generale_comptes_etat ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_generale_comptes_etat ),
-			 hbox,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    liste_comptes_etat = gtk_clist_new ( 1 );
-    gtk_clist_set_selection_mode ( GTK_CLIST ( liste_comptes_etat ),
-				   GTK_SELECTION_MULTIPLE );
-    gtk_clist_set_column_auto_resize ( GTK_CLIST ( liste_comptes_etat ),
-				       0,
-				       TRUE );
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			liste_comptes_etat );
-    gtk_widget_show ( liste_comptes_etat );
-
-    /* on remplit la liste des comptes */
-
-    remplissage_liste_comptes_etats ();
-
-
-    /*   sur la partie de droite, on met les boutons (dé)sélectionner tout */
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 vbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    bouton = gtk_button_new_with_label ( _("Select all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( gtk_clist_select_all ),
-				G_OBJECT  ( liste_comptes_etat ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Unselect all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( gtk_clist_unselect_all ),
-				G_OBJECT  ( liste_comptes_etat ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Select bank accounts") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( selectionne_partie_liste_compte_etat ),
-				GINT_TO_POINTER ( 0 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Select cash accounts") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( selectionne_partie_liste_compte_etat ),
-				GINT_TO_POINTER ( 1 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Select liabilities accounts") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( selectionne_partie_liste_compte_etat ),
-				GINT_TO_POINTER ( 2 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Select assets accounts") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( selectionne_partie_liste_compte_etat ),
-				GINT_TO_POINTER ( 3 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
 
-/******************************************************************************/
-void remplissage_liste_comptes_etats ( void )
+/**
+ * toggle the categories and sub-categories selected
+ *
+ * \param is_categ  TRUE for categ, FALSE for budgets
+ *
+ * \return
+ * */
+void etats_config_onglet_categ_budget_init_treeview ( const gchar *treeview_name,
+                            GSList *tmp_list )
 {
-    GSList *list_tmp;
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeIter parent_iter;
 
-    if ( !liste_comptes_etat )
-	return;
+    /* on récupère le modèle */
+    tree_view = etats_config_ui_widget_get_widget_by_name ( treeview_name, NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
-    gtk_clist_clear ( GTK_CLIST ( liste_comptes_etat ) );
+    etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( model, FALSE );
 
-   list_tmp = gsb_data_account_get_list_accounts ();
+    if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &parent_iter ) )
+        return;
 
-    while ( list_tmp )
+    while ( tmp_list )
     {
-	gint i;
-	gchar *name[1];
-	gint row;
-
-
-	i = gsb_data_account_get_no_account ( list_tmp -> data );
-
-	name[0] = gsb_data_account_get_name (i);
-
-	row = gtk_clist_append ( GTK_CLIST ( liste_comptes_etat ),
-				   name );
-
-	gtk_clist_set_row_data ( GTK_CLIST ( liste_comptes_etat ),
-				 row,
-				 GINT_TO_POINTER (i));
-	list_tmp = list_tmp -> next;
-    }
-}
-/******************************************************************************/
-
-/******************************************************************************/
-void selectionne_partie_liste_compte_etat ( gint *type_compte )
+        struct_categ_budget_sel *categ_budget_struct = tmp_list -> data;
+
+        do
+        {
+            gint div_number;
+
+            gtk_tree_model_get ( GTK_TREE_MODEL ( model ),
+                                &parent_iter,
+                                GSB_ETAT_CATEG_BUDGET_LIST_NUMBER, &div_number,
+                                -1 );
+
+            /* we check the children only if the category is selected */
+            if ( div_number == categ_budget_struct -> div_number )
+            {
+                gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                                &parent_iter,
+                                GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, TRUE,
+                                -1 );
+
+                if ( categ_budget_struct -> sub_div_numbers )
+                {
+                    GtkTreeIter iter_child;
+
+                    if ( gtk_tree_model_iter_children ( GTK_TREE_MODEL ( model ), &iter_child, &parent_iter ) )
+                    {
+                        do
+                        {
+                            gint sub_div_number;
+
+                            gtk_tree_model_get ( GTK_TREE_MODEL ( model ),
+                                                &iter_child,
+                                                GSB_ETAT_CATEG_BUDGET_LIST_SUB_NUMBER, &sub_div_number,
+                                                -1 );
+
+                            if  ( g_slist_find ( categ_budget_struct -> sub_div_numbers,
+                             GINT_TO_POINTER ( sub_div_number ) ) )
+                                gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                                                &iter_child,
+                                                GSB_ETAT_CATEG_BUDGET_LIST_ACTIVE, TRUE,
+                                                -1 );
+                        }
+                        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter_child ) );
+                    }
+                }
+                /* we have found the category, can stop here */
+                break;
+            }
+        }
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &parent_iter ) );
+
+        tmp_list = tmp_list -> next;
+    }
+}
+
+
+/*ONGLET_TEXTES*/
+/**
+ * Initialise les informations de l'onglet textes
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_textes ( gint report_number )
 {
-    gint i;
-
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_comptes_etat ));
-
-    for ( i=0 ; i<gsb_data_account_get_accounts_amount () ; i++ )
-    {
-	gint no_compte;
-
-	no_compte = GPOINTER_TO_INT ( gtk_clist_get_row_data ( GTK_CLIST ( liste_comptes_etat ),
-							       i ));
+    /* on affiche ou pas le choix des textes */
+    etats_config_ui_toggle_button_set_actif ( "bouton_utilise_texte",
+                        gsb_data_report_get_text_comparison_used ( report_number ) );
 
-	if ( gsb_data_account_get_kind (no_compte) == GPOINTER_TO_INT ( type_compte ))
-	    gtk_clist_select_row ( GTK_CLIST ( liste_comptes_etat ),
-				   i,
-				   0 );
-    }
+    /* on remplit la liste des lignes de recherche */
+    etats_config_onglet_texte_remplit_liste_comparaisons ( report_number );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *onglet_etat_virements ( void )
-{
-    GtkWidget *scrolled_window;
-    GtkWidget *vbox_onglet;
-    GtkWidget *vbox;
-    GtkWidget *bouton;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Transfers"), "transfer.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    /*   on met les boutons d'inclusion ou non des virements */
-
-    bouton_non_inclusion_virements = gtk_radio_button_new_with_label ( NULL,
-								       _("Do not include transfers") );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 bouton_non_inclusion_virements,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_non_inclusion_virements );
-
-    bouton_inclusion_virements_actifs_etat = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_non_inclusion_virements )),
-									       _("Include transfers from or to assets or liabilities accounts") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_inclusion_virements_actifs_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 1 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 bouton_inclusion_virements_actifs_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_inclusion_virements_actifs_etat );
-
-    bouton_inclusion_virements_hors_etat = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_non_inclusion_virements )),
-									     _("Include transfers from or to accounts not in this report") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_inclusion_virements_hors_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 1 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 bouton_inclusion_virements_hors_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_inclusion_virements_hors_etat );
-
-    bouton_inclusion_virements_perso = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_non_inclusion_virements )),
-									 _("Include transfers from or to these accounts") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_inclusion_virements_perso ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 1 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 bouton_inclusion_virements_perso,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_inclusion_virements_perso );
-
-    hbox_liste_comptes_virements = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox_liste_comptes_virements,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( hbox_liste_comptes_virements );
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( hbox_liste_comptes_virements ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    liste_comptes_virements = gtk_clist_new ( 1 );
-    gtk_clist_set_selection_mode ( GTK_CLIST ( liste_comptes_virements ),
-				   GTK_SELECTION_MULTIPLE );
-    gtk_clist_set_column_auto_resize ( GTK_CLIST ( liste_comptes_virements ),
-				       0,
-				       TRUE );
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			liste_comptes_virements );
-    gtk_widget_show ( liste_comptes_virements );
-
-    /* on remplit la liste des comptes */
-    remplissage_liste_comptes_virements ();
-
-    /*   sur la partie de droite, on met les boutons (dé)sélectionner tout */
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_liste_comptes_virements ),
-			 vbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    bouton = gtk_button_new_with_label ( _("Select all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( gtk_clist_select_all ),
-				G_OBJECT  ( liste_comptes_virements ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Unselect all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( gtk_clist_unselect_all ),
-				G_OBJECT  ( liste_comptes_virements ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Select bank accounts") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( selectionne_partie_liste_compte_vir_etat ),
-				GINT_TO_POINTER ( 0 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Select cash accounts") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( selectionne_partie_liste_compte_vir_etat ),
-				GINT_TO_POINTER ( 1 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Select liabilities accounts") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( selectionne_partie_liste_compte_vir_etat ),
-				GINT_TO_POINTER ( 2 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Select assets accounts") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( selectionne_partie_liste_compte_vir_etat ),
-				GINT_TO_POINTER ( 3 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    g_signal_connect ( G_OBJECT ( bouton_inclusion_virements_perso ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 hbox_liste_comptes_virements );
-
-
-    /* on rajoute le bouton exclure les opé non virement */
-
-    bouton_exclure_non_virements_etat = gtk_check_button_new_with_label ( _("Exclude the transactions which are not transfers") );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 bouton_exclure_non_virements_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_exclure_non_virements_etat );
-
-    g_signal_connect ( G_OBJECT ( bouton_inclusion_virements_perso ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_exclure_non_virements_etat );
-    g_signal_connect ( G_OBJECT ( bouton_inclusion_virements_hors_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_exclure_non_virements_etat );
-    g_signal_connect ( G_OBJECT ( bouton_inclusion_virements_actifs_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_exclure_non_virements_etat );
-
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
 
-/******************************************************************************/
-void remplissage_liste_comptes_virements ( void )
+/**
+ * Récupère les informations de l'onglet textes
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_textes ( gint report_number )
 {
-    GSList *list_tmp;
-
-    if ( !liste_comptes_virements )
-	return;
+    GSList *comparison_list;
 
-    gtk_clist_clear ( GTK_CLIST ( liste_comptes_virements ) );
+    /* on récupère le choix des textes */
+    gsb_data_report_set_text_comparison_used ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_utilise_texte" ) );
 
-    list_tmp = gsb_data_account_get_list_accounts ();
+    /* récupération de la liste des comparaisons de texte */
+    /* on a rentré au moins une comparaison */
+    /* on rempli les champs de la structure */
+    comparison_list = gsb_data_report_get_text_comparison_list ( report_number );
 
-    while ( list_tmp )
+    while ( comparison_list )
     {
-	gint i;
-	gchar *name[1];
-	gint row;
-
-	i = gsb_data_account_get_no_account ( list_tmp -> data );
-
-	name[0] = gsb_data_account_get_name (i);
-
-	row = gtk_clist_append ( GTK_CLIST ( liste_comptes_virements ),
-				   name );
-
-	gtk_clist_set_row_data ( GTK_CLIST ( liste_comptes_virements ),
-				 row,
-				 GINT_TO_POINTER (i));
-	list_tmp = list_tmp -> next;
+        const gchar *string;
+        gint text_comparison_number;
+
+        text_comparison_number = GPOINTER_TO_INT ( comparison_list -> data );
+
+        if ( gsb_data_report_text_comparison_get_button_link ( text_comparison_number ) )
+            gsb_data_report_text_comparison_set_link_to_last_text_comparison ( text_comparison_number,
+                        gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                        gsb_data_report_text_comparison_get_button_link ( text_comparison_number ) ) ) );
+        else
+            gsb_data_report_text_comparison_set_link_to_last_text_comparison ( text_comparison_number, -1 );
+
+        gsb_data_report_text_comparison_set_field ( text_comparison_number,
+                                gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_field (
+                                text_comparison_number ) ) ) );
+
+        gsb_data_report_text_comparison_set_use_text ( text_comparison_number,
+                                gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (
+                                gsb_data_report_text_comparison_get_button_use_text (
+                                text_comparison_number ) ) ) );
+        gsb_data_report_text_comparison_set_operator ( text_comparison_number,
+                                gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_operator (
+                                text_comparison_number ) ) ) );
+
+        string = gtk_entry_get_text ( GTK_ENTRY (
+                                gsb_data_report_text_comparison_get_entry_text ( text_comparison_number ) ) );
+        gsb_data_report_text_comparison_set_text ( text_comparison_number, string );
+
+        gsb_data_report_text_comparison_set_first_comparison ( text_comparison_number,
+                                gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_first_comparison (
+                                text_comparison_number ) ) ) );
+
+        gsb_data_report_text_comparison_set_link_first_to_second_part ( text_comparison_number,
+                                gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_link_first_to_second_part (
+                                text_comparison_number ) ) ) );
+        gsb_data_report_text_comparison_set_second_comparison ( text_comparison_number,
+                                gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_second_comparison (
+                                text_comparison_number ) ) ) );
+        gsb_data_report_text_comparison_set_first_amount ( text_comparison_number,
+                                utils_str_atoi ( gtk_entry_get_text ( GTK_ENTRY (
+                                gsb_data_report_text_comparison_get_entry_first_amount (
+                                text_comparison_number ) ) ) ) );
+        gsb_data_report_text_comparison_set_second_amount ( text_comparison_number,
+                                utils_str_atoi (gtk_entry_get_text ( GTK_ENTRY (
+                                gsb_data_report_text_comparison_get_entry_second_amount (
+                                text_comparison_number ) ) ) ) );
+
+        comparison_list = comparison_list -> next;
     }
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void selectionne_partie_liste_compte_vir_etat ( gint *type_compte )
+
+/**
+ * remplit la liste des comparaisons de texte
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_onglet_texte_remplit_liste_comparaisons ( gint report_number )
 {
-    gint i;
+    GtkWidget *lignes;
+    GSList *tmp_list;
+    gchar *tmp_str;
+    gboolean multi_lignes = FALSE;
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_comptes_virements ));
+    /* on commence par effacer les anciennes lignes */
+    lignes = etats_config_ui_widget_get_widget_by_name ( "liste_textes_etat", NULL );
+    gtk_container_foreach ( GTK_CONTAINER ( lignes ), ( GtkCallback ) gtk_widget_destroy, NULL );
 
-    for ( i=0 ; i<gsb_data_account_get_accounts_amount () ; i++ )
+    tmp_list = gsb_data_report_get_text_comparison_list ( report_number );
+    /*   s'il n'y a rien dans la liste, on met juste une row vide */
+    if ( !tmp_list )
     {
-	gint no_compte;
-
-	no_compte = GPOINTER_TO_INT ( gtk_clist_get_row_data ( GTK_CLIST ( liste_comptes_virements ),
-							       i ));
-
-	if ( gsb_data_account_get_kind (no_compte) == GPOINTER_TO_INT ( type_compte ))
-	    gtk_clist_select_row ( GTK_CLIST ( liste_comptes_virements ),
-				   i,
-				   0 );
+        etats_config_onglet_texte_ajoute_ligne_liste_comparaisons ( 0 );
+        return;
     }
-}
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *onglet_etat_categories ( void )
-{
-    GtkWidget *vbox;
-    GtkWidget *label;
-    GtkWidget *scrolled_window;
-    GtkWidget *bouton;
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Categories"), "categories.png" );
-    gtk_widget_show ( vbox_onglet );
-    /* on propose de détailler les categ utilisées */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    button_detail_categ = gtk_check_button_new_with_label ( _("Detail categories") );
-    g_signal_connect_swapped ( G_OBJECT ( button_detail_categ ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 4 ));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 button_detail_categ,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( button_detail_categ );
-
-
-    /* mise en place de la liste et des boutons de détaillage */
-    hbox_detaille_categ_etat = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox_detaille_categ_etat,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( hbox_detaille_categ_etat );
-
-    g_signal_connect ( G_OBJECT ( button_detail_categ ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 hbox_detaille_categ_etat );
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_detaille_categ_etat ),
-			 vbox,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    label = gtk_label_new ( _("Select categories to include: ") );
-	gtk_misc_set_padding ( GTK_MISC ( label ), 3, 0 );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.0 );
-
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    /* add the categories list */
-    tree_view_categ = report_config_create_categ_budget_list ();
-    model_categ = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view_categ));
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			tree_view_categ );
-    gtk_widget_show ( tree_view_categ );
-
-    /* fill the list */
-    report_config_fill_categ_budget_list (TRUE);
-
-    /*   sur la partie de droite, on met les boutons (dé)sélectionner tout */
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_detaille_categ_etat ),
-			 vbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    bouton = gtk_button_new_with_label ( _("Select all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT (bouton),
-		       "clicked",
-		       G_CALLBACK (report_config_category_select_all),
-		       GINT_TO_POINTER (TRUE));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Unselect all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT (bouton),
-		       "clicked",
-		       G_CALLBACK (report_config_category_select_all),
-		       GINT_TO_POINTER (FALSE));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Income categories") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT (bouton),
-		       "clicked",
-		       G_CALLBACK (report_config_category_select_type),
-		       GINT_TO_POINTER (FALSE));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Outgoing categories") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT (bouton),
-		       "clicked",
-		       G_CALLBACK (report_config_category_select_type),
-		       GINT_TO_POINTER (TRUE));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    return ( vbox_onglet );
+    /* on fait le tour de la liste des comparaisons de texte, ajoute une row
+     * et la remplit à chaque fois */
+    while ( tmp_list )
+    {
+        gint text_comparison_number;
+        GtkWidget *widget;
+
+        text_comparison_number = GPOINTER_TO_INT ( tmp_list -> data );
+
+        /* on crée la row et remplit les widget de la structure */
+        widget = etats_config_onglet_texte_new_comparison_line ( lignes, text_comparison_number, multi_lignes );
+        gsb_data_report_text_comparison_set_vbox_line ( text_comparison_number, widget );
+
+        /* on remplit maintenant les widget avec les valeurs de la stucture */
+        /* on rajoute le && si plusieurs lignes */
+        if ( gsb_data_report_text_comparison_get_link_to_last_text_comparison ( text_comparison_number ) != -1
+         &&
+         tmp_list != gsb_data_report_get_text_comparison_list ( report_number ) )
+        {
+            gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_link ( text_comparison_number ) ),
+                                gsb_data_report_text_comparison_get_link_to_last_text_comparison (
+                                text_comparison_number ) );
+        }
+
+        gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_field ( text_comparison_number ) ),
+                                gsb_data_report_text_comparison_get_field ( text_comparison_number ) );
+        gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_operator ( text_comparison_number ) ),
+                                gsb_data_report_text_comparison_get_operator ( text_comparison_number ) );
+
+        if ( gsb_data_report_text_comparison_get_text ( text_comparison_number ) )
+            gtk_entry_set_text ( GTK_ENTRY (
+                                gsb_data_report_text_comparison_get_entry_text ( text_comparison_number ) ),
+                                gsb_data_report_text_comparison_get_text ( text_comparison_number ) );
+
+        gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_first_comparison (
+                                text_comparison_number ) ),
+                                gsb_data_report_text_comparison_get_first_comparison ( text_comparison_number ) );
+        gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_link_first_to_second_part (
+                                text_comparison_number ) ),
+                                gsb_data_report_text_comparison_get_link_first_to_second_part (
+                                text_comparison_number ) );
+        gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                                gsb_data_report_text_comparison_get_button_second_comparison (
+                                text_comparison_number ) ),
+                                gsb_data_report_text_comparison_get_second_comparison ( text_comparison_number ) );
+
+        tmp_str = utils_str_itoa ( gsb_data_report_text_comparison_get_first_amount ( text_comparison_number ) );
+        gtk_entry_set_text ( GTK_ENTRY (
+                                gsb_data_report_text_comparison_get_entry_first_amount (
+                                text_comparison_number ) ),
+                                tmp_str );
+        g_free ( tmp_str );
+
+        tmp_str = utils_str_itoa ( gsb_data_report_text_comparison_get_second_amount ( text_comparison_number ) );
+        gtk_entry_set_text ( GTK_ENTRY (
+                                gsb_data_report_text_comparison_get_entry_second_amount (
+                                text_comparison_number ) ),
+                                tmp_str );
+        g_free ( tmp_str );
+
+        if ( gsb_data_report_text_comparison_get_use_text ( text_comparison_number ) )
+            gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (
+                                gsb_data_report_text_comparison_get_button_use_text ( text_comparison_number ) ),
+                                TRUE );
+        else
+            gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (
+                                gsb_data_report_text_comparison_get_button_use_number ( text_comparison_number ) ),
+                                TRUE );
+
+        /* on désensitive tous ce qui est nécessaire */
+        if ( gsb_data_report_text_comparison_get_field ( text_comparison_number ) == 8
+             ||
+             gsb_data_report_text_comparison_get_field ( text_comparison_number ) == 9
+             ||
+             gsb_data_report_text_comparison_get_field ( text_comparison_number ) == 10 )
+        {
+            /* 	  on est sur un chq ou une pc */
+            /* on rend sensitif les check button et la hbox correspondante */
+            sensitive_widget ( NULL, gsb_data_report_text_comparison_get_button_use_text (
+                                text_comparison_number ) );
+            sensitive_widget ( NULL, gsb_data_report_text_comparison_get_button_use_number (
+                                text_comparison_number ) );
+            etats_config_onglet_texte_sensitive_hbox_fonction_bouton_txt (
+                                text_comparison_number );
+        }
+        else
+        {
+            desensitive_widget ( NULL, gsb_data_report_text_comparison_get_button_use_text (
+                                text_comparison_number ) );
+            desensitive_widget (NULL, gsb_data_report_text_comparison_get_button_use_number (
+                                text_comparison_number ) );
+            desensitive_widget (NULL, gsb_data_report_text_comparison_get_hbox_cheque (
+                                text_comparison_number ) );
+            sensitive_widget (NULL, gsb_data_report_text_comparison_get_hbox_text (
+                                text_comparison_number ) );
+        }
+
+        /* on sensitive/désensitive l'entrée txt*/
+        if ( gsb_data_report_text_comparison_get_operator ( text_comparison_number ) >= 4 )
+            desensitive_widget (NULL, gsb_data_report_text_comparison_get_entry_text (
+                                text_comparison_number ) );
+
+        /* on sensitive/désensitive les entrées de montant si nécessaire */
+        if ( gsb_data_report_text_comparison_get_first_comparison ( text_comparison_number ) == 6 )
+            desensitive_widget (NULL, gsb_data_report_text_comparison_get_entry_first_amount (
+                                text_comparison_number ) );
+
+        if ( gsb_data_report_text_comparison_get_second_comparison ( text_comparison_number ) == 6 )
+            desensitive_widget (NULL, gsb_data_report_text_comparison_get_entry_second_amount (
+                                text_comparison_number ) );
+
+        /* on sensitive/désensitive la hbox_2 si nécessaire */
+        if ( gsb_data_report_text_comparison_get_link_first_to_second_part ( text_comparison_number ) == 3 )
+            desensitive_widget (NULL, gsb_data_report_text_comparison_get_hbox_second_part (
+                                text_comparison_number ) );
+
+        gtk_widget_show ( widget );
+
+        multi_lignes = TRUE;
+        tmp_list = tmp_list -> next;
+    }
 }
 
 
-
 /**
- * create the category/budget list for reports
- * it's a tree with categories/budget and sub-categories/budgets,
- * and a check-button to select them
  *
- * \param
  *
- * \return a GtkWidget : the GtkTreeView
- * */
-static GtkWidget *report_config_create_categ_budget_list ( void )
+ *
+ */
+void etats_config_onglet_texte_sensitive_hbox_fonction_bouton_txt ( gint text_comparison_number )
 {
-    GtkWidget *tree_view;
-    GtkTreeStore *store;
-    GtkTreeViewColumn *column;
-    GtkCellRenderer *cell_renderer;
-    GtkCellRenderer *radio_renderer;
-
-    store = gtk_tree_store_new ( REPORT_CATEG_BUDGET_LIST_NB,
-				 G_TYPE_STRING,
-				 G_TYPE_BOOLEAN,
-				 G_TYPE_BOOLEAN,
-				 G_TYPE_INT,
-				 G_TYPE_INT );
-    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE (store),
-					   REPORT_CATEG_BUDGET_LIST_NAME, GTK_SORT_ASCENDING );
-
-    column = gtk_tree_view_column_new ();
-
-    /* create the toggle button part */
-    radio_renderer = gtk_cell_renderer_toggle_new ();
-    g_object_set ( G_OBJECT (radio_renderer),
-		   "xalign", 0.0,
-		   NULL );
-    gtk_tree_view_column_pack_start ( column,
-				      radio_renderer,
-				      FALSE );
-    gtk_tree_view_column_set_attributes (column,
-					 radio_renderer,
-					 "active", REPORT_CATEG_BUDGET_LIST_ACTIVE,
-					 "activatable", REPORT_CATEG_BUDGET_LIST_ACTIVATABLE,
-					 NULL);
-    g_signal_connect ( G_OBJECT (radio_renderer),
-		       "toggled",
-		       G_CALLBACK (report_config_categ_budget_toggled),
-		       store );
-
-    /* create the text part */
-    cell_renderer = gtk_cell_renderer_text_new ();
-    g_object_set ( G_OBJECT (cell_renderer),
-		   "xalign", 0.0,
-		   NULL );
-    gtk_tree_view_column_pack_start ( column,
-				      cell_renderer,
-				      TRUE );
-    gtk_tree_view_column_set_attributes (column,
-					 cell_renderer,
-					 "text", REPORT_CATEG_BUDGET_LIST_NAME,
-					 NULL );
-
-    /* create the tree view */
-    tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
-    gtk_tree_view_append_column ( GTK_TREE_VIEW (tree_view),
-				  column );
-    gtk_tree_view_set_headers_visible ( GTK_TREE_VIEW (tree_view),
-					FALSE );
-    return tree_view;
+    sens_desensitive_pointeur ( gsb_data_report_text_comparison_get_button_use_text ( text_comparison_number ),
+                        gsb_data_report_text_comparison_get_hbox_text ( text_comparison_number ) );
+    sens_desensitive_pointeur ( gsb_data_report_text_comparison_get_button_use_number ( text_comparison_number ),
+                        gsb_data_report_text_comparison_get_hbox_cheque ( text_comparison_number ) );
 }
 
-
 /**
- * fill the categories selection list for report
+ * ajoute une ligne de recherche de texte à la liste des lignes de recherche de texte
  *
- * \param is_categ	TRUE for category, FALSE for budget
+ *\first_line   première ligne ou ligne supplémentaire
  *
- * \return FALSE
- * */
-static gboolean report_config_fill_categ_budget_list ( gboolean is_categ )
+ *\return la nouvelle ligne
+ */
+void etats_config_onglet_texte_ajoute_ligne_liste_comparaisons ( gint last_text_comparison_number )
 {
-    GSList *list_tmp;
-    gchar *name;
-    gchar *without_name, *without_sub_name;
+    GtkWidget *lignes;
+    GtkWidget *widget;
+    gint text_comparison_number;
+    gint position;
+    gint current_report_number;
 
-    if (is_categ)
-    {
-	list_tmp = gsb_data_category_get_categories_list ();
-	gtk_tree_store_clear (GTK_TREE_STORE (model_categ));
-	without_name = _("Empty category");
-	without_sub_name = _("Empty sub-category");
-    }
+    lignes = etats_config_ui_widget_get_widget_by_name ( "liste_textes_etat", NULL );
+    current_report_number = gsb_gui_navigation_get_current_report ();
+
+    /* on récupère tout de suite la position à laquelle il faut insérer la row */
+    if ( last_text_comparison_number )
+        position = g_slist_index ( gsb_data_report_get_text_comparison_list ( current_report_number ),
+                                GINT_TO_POINTER ( last_text_comparison_number ) ) + 1;
     else
-    {
-	list_tmp = gsb_data_budget_get_budgets_list ();
-	gtk_tree_store_clear (GTK_TREE_STORE (model_budget));
-	without_name = _("Empty budget");
-	without_sub_name = _("Empty sub-budget");
-    }
+        position = 0;
 
-    while ( list_tmp )
-    {
-	gint div_number;
-	GSList *tmp_list_sub_div;
-
-	/* get the category to append */
-	if (is_categ)
-	{
-	    div_number = gsb_data_category_get_no_category ( list_tmp -> data );
-	    name = gsb_data_category_get_name (div_number, 0, NULL );
-	    tmp_list_sub_div = gsb_data_category_get_sub_category_list (div_number);
-	}
-	else
-	{
-	    div_number = gsb_data_budget_get_no_budget ( list_tmp -> data );
-	    name = gsb_data_budget_get_name (div_number, 0, NULL );
-	    tmp_list_sub_div = gsb_data_budget_get_sub_budget_list (div_number);
-	}
-
-	/* append to the model */
-	report_config_mixed_list_add_div (is_categ, name, div_number);
-	g_free (name);
-
-	/* append the sub categories */
-	while (tmp_list_sub_div)
-	{
-	    gint sub_div_number;
-
-	    if (is_categ)
-	    {
-		sub_div_number = gsb_data_category_get_no_sub_category (tmp_list_sub_div -> data);
-		name = gsb_data_category_get_sub_category_name (div_number, sub_div_number, NULL);
-	    }
-	    else
-	    {
-		sub_div_number = gsb_data_budget_get_no_sub_budget (tmp_list_sub_div -> data);
-		name = gsb_data_budget_get_sub_budget_name (div_number, sub_div_number, NULL);
-	    }
-
-	    /* append to the model */
-	    report_config_mixed_list_add_sub_div (is_categ, name, sub_div_number);
-	    g_free (name);
-	    tmp_list_sub_div = tmp_list_sub_div -> next;
-	}
-
-	/* append without sub-div */
-	report_config_mixed_list_add_sub_div (is_categ, without_sub_name, 0);
-	list_tmp = list_tmp -> next;
-    }
-    /* append without div and sub-div*/
-    report_config_mixed_list_add_div (is_categ, without_name, 0);
-    report_config_mixed_list_add_sub_div (is_categ, without_sub_name, 0);
+    /* on commence par créer une structure vide */
+    text_comparison_number = gsb_data_report_text_comparison_new ( 0 );
+    gsb_data_report_text_comparison_set_report_number ( text_comparison_number,
+                        current_report_number );
 
-    return FALSE;
+    /* on crée la row et remplit les widget de la structure */
+    widget = etats_config_onglet_texte_new_comparison_line ( lignes, text_comparison_number, TRUE );
+    gsb_data_report_text_comparison_set_vbox_line ( text_comparison_number, widget );
+
+    /* on vire le lien de la row s'il n'y a pas encore de liste (cad si c'est la 1ère row) */
+    if ( !gsb_data_report_get_text_comparison_list ( current_report_number ) )
+    {
+        gtk_widget_destroy ( gsb_data_report_text_comparison_get_button_link ( text_comparison_number ) );
+        gsb_data_report_text_comparison_set_button_link ( text_comparison_number, NULL );
+    }
+
+    /* par défaut, le bouton bouton_lien_1_2 est sur stop */
+    widget = gsb_data_report_text_comparison_get_button_link_first_to_second_part ( text_comparison_number );
+    gtk_combo_box_set_active ( GTK_COMBO_BOX ( widget ), 3 );
+    gsb_data_report_text_comparison_set_link_first_to_second_part ( text_comparison_number, 3 );
+    gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_hbox_second_part (
+                        text_comparison_number ),
+                        FALSE );
+
+    /* par défaut, la row de chq est non sensitive */
+    gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_button_use_text (
+                        text_comparison_number ),
+                        FALSE );
+    gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_button_use_number (
+                        text_comparison_number ),
+                        FALSE );
+    gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_hbox_cheque (
+                        text_comparison_number ),
+                        FALSE );
+
+    /* on met la structure dans la liste à la position demandée */
+    gsb_data_report_set_text_comparison_list ( current_report_number,
+                        g_slist_insert ( gsb_data_report_get_text_comparison_list ( current_report_number ),
+                        GINT_TO_POINTER ( text_comparison_number ),
+                        position ) );
+
+    /* on met la row à sa place dans la liste */
+    gtk_box_reorder_child ( GTK_BOX ( lignes ),
+                        gsb_data_report_text_comparison_get_vbox_line ( text_comparison_number ),
+                        position );
 }
 
 
 /**
- * append the div given in param to the categ/budget list
- * this place parent_iter on the place of the div appended
+ * crée une ligne de recherche de texte
  *
- * \param is_categ 	TRUE for categ, FALSE for budget
- * \param name
- * \param number
+ *\parent       vbox qui contiendra toutes les lignes
+ *\first_line   première ligne ou ligne supplémentaire
  *
- * \return
- * */
-static void report_config_mixed_list_add_div ( gboolean is_categ,
-					       const gchar *name,
-					       gint number )
+ *\return la nouvelle ligne
+ */
+GtkWidget *etats_config_onglet_texte_new_comparison_line ( GtkWidget *parent,
+                        gint text_comparison_number,
+                        gint with_link )
 {
-    GtkTreeModel *model;
+    GtkWidget *vbox;
+    GtkWidget *hbox;
+    GtkWidget *hbox_1;
+    GtkWidget *hbox_2;
+    GtkWidget *combo;
+    GtkWidget *label;
+    GtkWidget *button;
+    GtkWidget *entry;
+    GtkWidget *radio_1;
+    GtkWidget *radio_2;
 
-    if (is_categ)
-	model = model_categ;
-    else
-	model = model_budget;
-    gtk_tree_store_append ( GTK_TREE_STORE (model),
-			    &parent_iter,
-			    NULL );
-    gtk_tree_store_set (GTK_TREE_STORE (model),
-			&parent_iter,
-			REPORT_CATEG_BUDGET_LIST_NAME, name,
-			REPORT_CATEG_BUDGET_LIST_NUMBER, number,
-			REPORT_CATEG_BUDGET_LIST_SUB_NUMBER, -1,
-			REPORT_CATEG_BUDGET_LIST_ACTIVATABLE, TRUE,
-			-1 );
-}
+    /* la vbox qui contient la ligne complète */
+    vbox = gtk_vbox_new ( FALSE, 5 );
 
-/**
- * append the sub-div given in param to the categ/budget list
- *
- * \param is_categ 	TRUE for categ, FALSE for budget
- * \param name
- * \param number
- *
- * \return
- * */
-static void report_config_mixed_list_add_sub_div ( gboolean is_categ,
-						   const gchar *name,
-						   gint number )
-{
-    GtkTreeModel *model;
-    GtkTreeIter child_iter;
+    /* la première hbox pour le type de donnée concernée */
+    hbox = gtk_hbox_new ( FALSE, 5 );
+    gtk_box_pack_start ( GTK_BOX ( vbox ), hbox, FALSE, FALSE, 0 );
 
-    if (is_categ)
-	model = model_categ;
-    else
-	model = model_budget;
-    gtk_tree_store_append ( GTK_TREE_STORE (model),
-			    &child_iter,
-			    &parent_iter );
-    gtk_tree_store_set (GTK_TREE_STORE (model),
-			&child_iter,
-			REPORT_CATEG_BUDGET_LIST_NAME, name,
-			REPORT_CATEG_BUDGET_LIST_NUMBER, -1,
-			REPORT_CATEG_BUDGET_LIST_SUB_NUMBER, number,
-			REPORT_CATEG_BUDGET_LIST_ACTIVATABLE, TRUE,
-			-1 );
-}
+    /* on crée le premier lien ne sert pas si c'est la première ligne */
+    if ( with_link )
+    {
+        combo = utils_combo_box_make_from_string_array ( champs_lien_lignes_comparaison );
+        gsb_data_report_text_comparison_set_button_link ( text_comparison_number, combo );
+        gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 5 );
+    }
 
+    label = gtk_label_new ( _("Transactions whose ") );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 5 );
 
-/**
- * callback if we toggle a checkbox in the category/budget list
- * if we toggle a div, toggle all the sub-div
- * if we toggle a sub-div, toggle also the div
- *
- * \param radio_renderer
- * \param path			the string of path
- * \param store			the GtkTreeStore of categ/budget
- *
- * \return FALSE
- * */
-static gboolean report_config_categ_budget_toggled ( GtkCellRendererToggle *radio_renderer,
-						     gchar *path_str,
-						     GtkTreeStore *store )
-{
-    GtkTreePath *path;
-    GtkTreeIter iter;
-    GtkTreeIter iter_children;
-    gboolean toggle_value;
+    /* avant de créer le bouton des champs, on doit créer hbox_txt, hbox_chq et les 2 check button */
+    gsb_data_report_text_comparison_set_hbox_text ( text_comparison_number,
+                        gtk_hbox_new ( FALSE, 5 ) );
+    gsb_data_report_text_comparison_set_hbox_cheque ( text_comparison_number,
+                        gtk_hbox_new ( FALSE, 5 ) );
 
-    g_return_val_if_fail (path_str != NULL, FALSE);
-    g_return_val_if_fail (store != NULL && GTK_IS_TREE_STORE (store), FALSE);
+    /* on crée le radio bouton de sélection entre les deux types de recherche caché par défaut */
+    radio_1 = gtk_radio_button_new ( NULL );
+    gsb_data_report_text_comparison_set_button_use_text ( text_comparison_number,radio_1 );
 
-    /* first get the iter and the value of the checkbutton */
-    path = gtk_tree_path_new_from_string (path_str);
-    gtk_tree_model_get_iter ( GTK_TREE_MODEL (store),
-			      &iter, path );
-    gtk_tree_model_get ( GTK_TREE_MODEL (store),
-			 &iter,
-			 REPORT_CATEG_BUDGET_LIST_ACTIVE, &toggle_value,
-			 -1 );
+    radio_2 = gtk_radio_button_new_from_widget ( GTK_RADIO_BUTTON ( radio_1 ) );
+    gsb_data_report_text_comparison_set_button_use_number ( text_comparison_number, radio_2 );
 
-    /* ok, we invert the button */
-    toggle_value = !toggle_value;
+    /* on crée et initialise le combobox du type de choix pour la recherche de texte */
+    combo = utils_combo_box_make_from_string_array ( champs_type_recherche_texte );
+    gsb_data_report_text_comparison_set_button_field ( text_comparison_number, combo );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
 
-    gtk_tree_store_set ( GTK_TREE_STORE (store),
-			 &iter,
-			 REPORT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
-			 -1 );
+    /* on définit l'action a faire lorsque l'on change le choix du combobox */
+    g_signal_connect ( G_OBJECT ( combo ),
+                        "changed",
+                        G_CALLBACK ( etats_config_onglet_texte_combo_texte_changed ),
+                        GINT_TO_POINTER ( text_comparison_number ) );
 
-    /* if we are on a mother, we set the same value to all the children */
-    if (gtk_tree_model_iter_children ( GTK_TREE_MODEL (store), &iter_children, &iter))
-    {
-	/* we are on the children */
-	do
-	    gtk_tree_store_set ( GTK_TREE_STORE (store),
-				 &iter_children,
-				 REPORT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
-				 -1 );
-	while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter_children));
-    }
+    /* la suite se met dans hbox_txt en 2ème row */
+    hbox = gtk_hbox_new ( FALSE, 5 );
+    gtk_box_pack_start ( GTK_BOX ( vbox ), hbox, FALSE, FALSE, 0 );
 
-    /* if we are activating a child, activate the mother */
-    if (toggle_value &&
-	gtk_tree_model_iter_parent (GTK_TREE_MODEL (store), &iter_children, &iter))
-	gtk_tree_store_set ( GTK_TREE_STORE (store),
-			     &iter_children,
-			     REPORT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
-			     -1 );
-
-    gtk_tree_path_free (path);
-    return FALSE;
-}
+    label = gtk_label_new ( NULL );
+    gtk_widget_set_size_request ( label, 12, -1 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0 );
 
+    /* on met le check button utilisé en cas de champ à no */
+    button = gsb_data_report_text_comparison_get_button_use_text ( text_comparison_number );
+    hbox_1 = gsb_data_report_text_comparison_get_hbox_text ( text_comparison_number );
 
-/**
- * select or unselect all the categories
- *
- * \param button
- * \param select_ptr	TRUE or FALSE to select/unselect all
- *
- * \return FALSE
- * */
-static gboolean report_config_category_select_all ( GtkWidget *button,
-						    gboolean *select_ptr )
-{
-    return (report_config_mix_select_all (model_categ, GPOINTER_TO_INT (select_ptr)));
-}
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        hbox_1 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
 
+    /* on met maintenant le comparateur txt */
+    gtk_box_pack_start ( GTK_BOX ( hbox ), hbox_1, FALSE, FALSE, 0 );
 
+    /* avant de créer l'opérateur, on doit créer l'entrée de txt */
+    entry = gtk_entry_new ( );
+    gsb_data_report_text_comparison_set_entry_text ( text_comparison_number, entry );
 
-/**
- * select or unselect all the budgets
- *
- * \param button
- * \param select_ptr	TRUE or FALSE to select/unselect all
- *
- * \return FALSE
- * */
-static gboolean report_config_budget_select_all ( GtkWidget *button,
-						  gboolean *select_ptr )
-{
-    return (report_config_mix_select_all (model_budget, GPOINTER_TO_INT (select_ptr)));
-}
+    combo = utils_combo_box_make_from_string_array ( champs_operateur_recherche_texte );
+    gsb_data_report_text_comparison_set_button_operator ( text_comparison_number, combo );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), combo, FALSE, FALSE, 0 );
+    g_signal_connect ( G_OBJECT ( combo ),
+                        "changed",
+                        G_CALLBACK ( sensitive_widget ),
+                        entry );
 
+    /* on peut maintenant mettre l'entrée de txt */
+    gtk_widget_set_size_request ( entry, 150, -1 );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), entry, FALSE, FALSE, 0 );
 
+    /* on crée maintenant la 2ème row qui concerne les tests de chq */
+    hbox = gtk_hbox_new ( FALSE, 5 );
+    gtk_box_pack_start ( GTK_BOX ( vbox ), hbox, FALSE, FALSE, 0 );
 
-/**
- * select or unselect all the budgets or categories
- *
- * \param model		the model to fill (is model_categ or model_budget
- * \param select_ptr	TRUE or FALSE to select/unselect all
- *
- * \return FALSE
- * */
-static gboolean report_config_mix_select_all ( GtkTreeModel *model,
-					       gboolean toggle_value )
-{
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &parent_iter))
-	return FALSE;
+    label = gtk_label_new ( NULL );
+    gtk_widget_set_size_request ( label, 12, -1 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0 );
 
-    do
-    {
-	GtkTreeIter iter_children;
-
-	gtk_tree_store_set ( GTK_TREE_STORE (model),
-			     &parent_iter,
-			     REPORT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
-			     -1 );
-
-	if (gtk_tree_model_iter_children ( GTK_TREE_MODEL (model), &iter_children, &parent_iter))
-	{
-	    /* we are on the children */
-	    do
-		gtk_tree_store_set ( GTK_TREE_STORE (model),
-				     &iter_children,
-				     REPORT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
-				     -1 );
-	    while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter_children));
-	}
-    }
-    while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &parent_iter));
-    return FALSE;
-}
+    /* on met le check button utilisé en cas de champ à no */
+    button = gsb_data_report_text_comparison_get_button_use_number ( text_comparison_number );
+    hbox_1 = gsb_data_report_text_comparison_get_hbox_cheque ( text_comparison_number );
 
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        hbox_1 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
 
-/**
- * select the income or outgoing categories
- *
- * \param button
- * \param type_ptr	FALSE to income categories, TRUE for outgoing categories
- *
- * \return FALSE
- * */
-static gboolean report_config_category_select_type ( GtkWidget *button,
-						     gboolean *type_ptr )
+    /* mise en place de la hbox des montants de chq */
+    gtk_box_pack_start ( GTK_BOX ( hbox ), hbox_1, FALSE, FALSE, 0 );
 
-{
-    return (report_config_mix_select_type (TRUE, GPOINTER_TO_INT (type_ptr)));
-}
+    label = gtk_label_new ( _("is ") );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), label, FALSE, FALSE, 0 );
 
-/**
- * select the income or outgoing budget
- *
- * \param button
- * \param type_ptr	FALSE to income budgets, TRUE for outgoing budgets
- *
- * \return FALSE
- * */
-static gboolean report_config_budget_select_type ( GtkWidget *button,
-						   gboolean *type_ptr )
-{
-    return (report_config_mix_select_type (FALSE, GPOINTER_TO_INT (type_ptr)));
-}
+    /* on crée et initialise le combobox pour la première comparaison de nombre */
+    combo = utils_combo_box_make_from_string_array ( champs_comparateur_nombre );
+    gsb_data_report_text_comparison_set_button_first_comparison ( text_comparison_number, combo );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), combo, FALSE, FALSE, 0 );
 
-/**
- * select the income or outgoing categories or budget
- *
- * \param is_categ	TRUE for category, FALSE for budget
- * \param type		FALSE to income item, TRUE for outgoing item
- *
- * \return FALSE
- * */
-static gboolean report_config_mix_select_type ( gboolean is_categ,
-						gboolean type )
+    label = gtk_label_new ( _("to") );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), label, FALSE, FALSE, 0 );
+
+    /* on crée le champs texte pour entrer la première comparaison */
+    entry = gtk_entry_new ( );
+    gtk_widget_set_size_request ( entry, 100, -1 );
+    gsb_data_report_text_comparison_set_entry_first_amount ( text_comparison_number, entry );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), entry, FALSE, FALSE, 0 );
+
+    /* on crée et initialise le combobox pour autoriser la seconde comparaison de nombre */
+    combo = utils_combo_box_make_from_string_array ( champs_lien_nombre_2 );
+    gsb_data_report_text_comparison_set_button_link_first_to_second_part ( text_comparison_number, combo );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), combo, FALSE, FALSE, 0 );
+
+    /* on crée la hbox pour la deuxième partie de la comparaison*/
+    hbox_2 = gtk_hbox_new ( FALSE, 5 );
+    gsb_data_report_text_comparison_set_hbox_second_part ( text_comparison_number, hbox_2 );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), hbox_2, FALSE, FALSE, 0 );
+
+    /* maintenant que hbox_2 est définie on met le signal lorsque l'on change le choix du combobox */
+    g_signal_connect ( G_OBJECT ( combo ),
+                        "changed",
+                        G_CALLBACK ( etats_config_combo_lien_nombre_2_changed ),
+                        hbox_2 );
 
-{
-    GtkTreeModel *model;
-    GtkTreeIter iter;
+    /* on peut maintenant ajouter dans hbox_partie_2 */
+    /* on crée et initialise le combobox pour la seconde comparaison de nombre */
+    combo = utils_combo_box_make_from_string_array ( champs_comparateur_nombre );
+    gtk_widget_set_size_request ( entry, 100, -1 );
+    gsb_data_report_text_comparison_set_button_second_comparison ( text_comparison_number, combo );
+    gtk_box_pack_start ( GTK_BOX ( hbox_2 ), combo, FALSE, FALSE, 0 );
+
+    label = gtk_label_new ( _("at") );
+    gtk_box_pack_start ( GTK_BOX ( hbox_2 ), label, FALSE, FALSE, 0 );
 
-    if (is_categ)
-	model = model_categ;
-    else
-	model = model_budget;
+    /* on crée le champs texte pour entrer la seconde comparaison */
+    entry = gtk_entry_new ( );
+    gsb_data_report_text_comparison_set_entry_second_amount ( text_comparison_number, entry );
+    gtk_box_pack_start ( GTK_BOX ( hbox_2 ), entry, FALSE, FALSE, 0 );
 
-    report_config_mix_select_all (model, FALSE);
+    /* on ajoute le bouton ajouter une nouvelle ligne */
+    etats_config_onglet_texte_get_buttons_add_remove ( hbox, text_comparison_number );
 
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter))
-	return FALSE;
+    /* on met la ligne complète (vbox) dans son parent */
+    gtk_box_pack_start ( GTK_BOX ( parent ), vbox, FALSE, FALSE, 0 );
+    gtk_widget_show_all ( vbox );
 
-    do
-    {
-	gint div_number;
-
-	gtk_tree_model_get (GTK_TREE_MODEL (model),
-			    &iter,
-			    REPORT_CATEG_BUDGET_LIST_NUMBER, &div_number,
-			    -1 );
-
-	/* we always select without categories/budget ?? set yes by default */
-	if ( !div_number
-	     ||
-	     (is_categ && (gsb_data_category_get_type (div_number) == type))
-	     ||
-	     (!is_categ && (gsb_data_budget_get_type (div_number) == type)))
-	{
-	    GtkTreeIter iter_children;
-
-	    gtk_tree_store_set ( GTK_TREE_STORE (model),
-				 &iter,
-				 REPORT_CATEG_BUDGET_LIST_ACTIVE, TRUE,
-				 -1 );
-
-	    if (gtk_tree_model_iter_children ( GTK_TREE_MODEL (model), &iter_children, &iter))
-	    {
-		/* we are on the children */
-		do
-		    gtk_tree_store_set ( GTK_TREE_STORE (model),
-					 &iter_children,
-					 REPORT_CATEG_BUDGET_LIST_ACTIVE, TRUE,
-					 -1 );
-		while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter_children));
-	    }
-	}
-    }
-    while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter));
-    return FALSE;
+    /* return */
+    return vbox;
 }
 
 
 /**
- * get all the selected categ and sub-categ and place them in a list of struct_categ_budget_sel
- * to be saved in the report
  *
- * \param is_categ	TRUE for categ, FALSE for budget
  *
- * \return a GSList of struct_categ_budget_sel or NULL if all the categories/sub-categ were selected
- * 		to avoid to filter by categ, to improve speed
- * */
-static GSList *report_config_categ_budget_get_selected ( gboolean is_categ )
+ *
+ */
+void etats_config_onglet_texte_get_buttons_add_remove ( GtkWidget *parent,
+                        gint text_comparison_number )
 {
-    GtkTreeModel *model;
-    gboolean all_selected = TRUE;
-    GSList *tmp_list = NULL;
+    GtkWidget *alignement;
+    GtkWidget *button;
 
-    if (is_categ)
-	model = model_categ;
-    else
-	model = model_budget;
+    alignement = gtk_alignment_new ( 0.3, 0, 0, 0 );
+    gtk_widget_show ( alignement );
+    gtk_box_pack_start ( GTK_BOX ( parent ), alignement, TRUE, TRUE, 0 );
 
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &parent_iter))
-	return NULL;
+    button = gtk_button_new_with_label ( _("Add") );
+    gtk_widget_show ( button );
+    gtk_button_set_relief ( GTK_BUTTON ( button ), GTK_RELIEF_NONE );
 
-    do
-    {
-	gint div_number;
-	gboolean active;
-	struct_categ_budget_sel *categ_budget_struct;
-	GtkTreeIter iter_children;
-
-	gtk_tree_model_get (GTK_TREE_MODEL (model),
-			    &parent_iter,
-			    REPORT_CATEG_BUDGET_LIST_NUMBER, &div_number,
-			    REPORT_CATEG_BUDGET_LIST_ACTIVE, &active,
-			    -1 );
-	if (!active)
-	{
-	    all_selected = FALSE;
-	    continue;
-	}
-
-	/* ok, we are on a selected category/budget, create and fill the structure */
-	categ_budget_struct = g_malloc0 (sizeof (struct_categ_budget_sel));
-
-	categ_budget_struct -> div_number = div_number;
-	tmp_list = g_slist_append (tmp_list, categ_budget_struct);
-
-	/* check the children */
-	if (gtk_tree_model_iter_children ( GTK_TREE_MODEL (model), &iter_children, &parent_iter))
-	{
-	    /* we are on the children */
-	    do
-	    {
-		gint sub_div_number;
-
-		gtk_tree_model_get (GTK_TREE_MODEL (model),
-				    &iter_children,
-				    REPORT_CATEG_BUDGET_LIST_SUB_NUMBER, &sub_div_number,
-				    REPORT_CATEG_BUDGET_LIST_ACTIVE, &active,
-				    -1 );
-		if (active)
-		    categ_budget_struct -> sub_div_numbers = g_slist_append ( categ_budget_struct -> sub_div_numbers,
-									      GINT_TO_POINTER (sub_div_number));
-		else
-		    all_selected = FALSE;
-	    }
-	    while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter_children));
-	}
-    }
-    while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &parent_iter));
+    g_signal_connect_swapped ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_config_onglet_texte_ajoute_ligne_liste_comparaisons ),
+                        GINT_TO_POINTER ( text_comparison_number ) );
 
-    /* if all is selected, erase the new list and set an info message */
-    if (all_selected)
-    {
-	if (is_categ)
-	    dialogue_special ( GTK_MESSAGE_INFO,
-			       make_hint ( _("Performance issue."),
-					   _("All categories have been selected.  Grisbi will run faster without the \"Detail categories used\" option activated.")));
-	else
-	    dialogue_special ( GTK_MESSAGE_INFO,
-			       make_hint ( _("Performance issue."),
-					   _("All budgets have been selected.  Grisbi will run faster without the \"Detail budgets used\" option activated.")));
-
-	report_config_mix_select_all (model, FALSE);
-	gsb_data_report_free_categ_budget_struct (tmp_list);
-	tmp_list = NULL;
-    }
-    return tmp_list;
+    gtk_container_add ( GTK_CONTAINER ( alignement ), button );
+
+    alignement = gtk_alignment_new ( 0.3, 0, 0, 0 );
+    gtk_widget_show ( alignement );
+    gtk_box_pack_start ( GTK_BOX ( parent ), alignement, TRUE, TRUE, 0 );
+
+    button = gtk_button_new_with_label ( _("Remove") );
+    gtk_button_set_relief ( GTK_BUTTON ( button ), GTK_RELIEF_NONE );
+
+    g_signal_connect_swapped ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_config_onglet_texte_retire_ligne_liste_comparaisons ),
+                        GINT_TO_POINTER ( text_comparison_number ) );
+
+    gtk_container_add ( GTK_CONTAINER ( alignement ), button );
 }
 
 
 /**
- * toggle the categories and sub-categories selected
+ * Supprime une ligne de comparaison de texte
  *
- * \param is_categ	TRUE for categ, FALSE for budgets
+ * \param last_text_comparison_number
  *
  * \return
- * */
-static void report_config_category_update_treeview ( gboolean is_categ )
+ */
+void etats_config_onglet_texte_retire_ligne_liste_comparaisons ( gint last_text_comparison_number )
 {
-    GSList *tmp_list;
     gint current_report_number;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    current_report_number = gsb_gui_navigation_get_current_report ( );
 
-    if (is_categ)
-    {
-	report_config_mix_select_all (model_categ, FALSE);
-	tmp_list = gsb_data_report_get_category_struct (current_report_number);
-    }
-    else
-    {
-	report_config_mix_select_all (model_budget, FALSE);
-	tmp_list = gsb_data_report_get_budget_struct (current_report_number);
-    }
+    /* il faut qu'il y ai plus d'une row affichée */
+    if ( g_slist_length ( gsb_data_report_get_text_comparison_list ( current_report_number ) ) < 2 )
+        return;
 
-    while ( tmp_list )
+    /* on commence par supprimer la row dans la liste */
+    gtk_widget_destroy ( gsb_data_report_text_comparison_get_vbox_line ( last_text_comparison_number ) );
+
+    /* si la structure qu'on retire est la 1ère, on vire le widget de lient */
+    if ( !g_slist_index ( gsb_data_report_get_text_comparison_list ( current_report_number ),
+     GINT_TO_POINTER ( last_text_comparison_number ) ) )
     {
-	struct_categ_budget_sel *categ_budget_struct = tmp_list -> data;
-	report_config_category_toggle_categ (categ_budget_struct, is_categ);
-	tmp_list = tmp_list -> next;
+        gint text_comparison_number;
+
+        text_comparison_number = GPOINTER_TO_INT ( gsb_data_report_get_text_comparison_list (
+                                    current_report_number)-> next -> data ) ;
+        gtk_widget_destroy ( gsb_data_report_text_comparison_get_button_link ( text_comparison_number ) );
+        gsb_data_report_text_comparison_set_button_link ( text_comparison_number, NULL );
     }
+
+    /* et on retire la struct de la sliste */
+    gsb_data_report_set_text_comparison_list ( current_report_number,
+                        g_slist_remove ( gsb_data_report_get_text_comparison_list ( current_report_number ),
+                        GINT_TO_POINTER ( last_text_comparison_number ) ) );
 }
 
+
 /**
- * get a struct_categ_budget_sel and toggle on the tree view the corresponding category
- * and the sub-categories
+ * Rend sensitif la ligne en fonction du choix du combo_box
  *
- * \param categ_budget_struct	a struct_categ_budget_sel
- * \param is_categ		TRUE for categ, FALSE for budget
+ * \param combo_box
+ * \param number gpointer sur text_comparison_number
  *
  * \return
- * */
-static void report_config_category_toggle_categ ( struct_categ_budget_sel *categ_budget_struct,
-						  gboolean is_categ )
+ */
+void etats_config_onglet_texte_combo_texte_changed ( GtkComboBox *combo,
+                        gpointer data )
 {
-    GtkTreeModel *model;
-
-    if (is_categ)
-	model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view_categ));
-    else
-	model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view_budget));
+    gint index;
+    gint text_comparison_number;
 
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &parent_iter))
-	return;
+    text_comparison_number = GPOINTER_TO_INT ( data );
 
-    do
+    index = gtk_combo_box_get_active ( combo );
+    if ( index == 8 || index == 9 || index == 10 )
     {
-	gint div_number;
-
-	gtk_tree_model_get ( GTK_TREE_MODEL (model),
-			     &parent_iter,
-			     REPORT_CATEG_BUDGET_LIST_NUMBER, &div_number,
-			     -1 );
-
-	/* we check the children only if the category is selected */
-	if (div_number == categ_budget_struct -> div_number)
-	{
-	    gtk_tree_store_set ( GTK_TREE_STORE (model),
-				 &parent_iter,
-				 REPORT_CATEG_BUDGET_LIST_ACTIVE, TRUE,
-				 -1 );
-	    if (categ_budget_struct -> sub_div_numbers)
-	    {
-		GtkTreeIter iter_child;
-		if (gtk_tree_model_iter_children (GTK_TREE_MODEL (model), &iter_child, &parent_iter))
-		    do
-		    {
-			gint sub_div_number;
-
-			gtk_tree_model_get ( GTK_TREE_MODEL (model),
-					     &iter_child,
-					     REPORT_CATEG_BUDGET_LIST_SUB_NUMBER, &sub_div_number,
-					     -1 );
-			if (g_slist_find (categ_budget_struct -> sub_div_numbers, GINT_TO_POINTER (sub_div_number)))
-			    gtk_tree_store_set ( GTK_TREE_STORE (model),
-						 &iter_child,
-						 REPORT_CATEG_BUDGET_LIST_ACTIVE, TRUE,
-						 -1 );
-		    }
-		    while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter_child));
-	    }
-	    /* we have found the category, can stop here */
-	    break;
-	}
-    }
-    while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &parent_iter));
-}
+        gtk_toggle_button_set_active ( gsb_data_report_text_comparison_get_button_use_text (
+                                text_comparison_number ), FALSE );
+        gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_button_use_text (
+                                text_comparison_number ), FALSE );
+        gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_hbox_text (
+                                text_comparison_number ), FALSE );
 
+        gtk_toggle_button_set_active ( gsb_data_report_text_comparison_get_button_use_number (
+                                text_comparison_number ), TRUE );
+        gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_button_use_number (
+                                text_comparison_number ), TRUE );
+        gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_hbox_cheque (
+                                text_comparison_number ), TRUE );
+    }
+    else
+    {
+        gtk_toggle_button_set_active ( gsb_data_report_text_comparison_get_button_use_text (
+                                text_comparison_number ), TRUE );
+        gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_button_use_text (
+                                text_comparison_number ), TRUE );
+        gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_hbox_text (
+                                text_comparison_number ), TRUE );
 
-GtkWidget *onglet_etat_ib ( void )
-{
-    GtkWidget *vbox;
-    GtkWidget *label;
-    GtkWidget *scrolled_window;
-    GtkWidget *bouton;
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Budgetary lines"), "budgetary_lines.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-
-    bouton_detaille_ib_etat = gtk_check_button_new_with_label ( _("Detail budgetary lines") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_detaille_ib_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 5 ));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_detaille_ib_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_detaille_ib_etat );
-
-
-    /* mise en place de la liste et des boutons de détaillage */
-
-    hbox_detaille_ib_etat = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox_detaille_ib_etat,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( hbox_detaille_ib_etat );
-
-    g_signal_connect ( G_OBJECT ( bouton_detaille_ib_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 hbox_detaille_ib_etat );
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_detaille_ib_etat ),
-			 vbox,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    label = gtk_label_new ( _("Select the budgetary lines to include in the report: ") );
-	gtk_misc_set_padding ( GTK_MISC ( label ), 3, 0 );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.0 );
-
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    /* add the budget list */
-    tree_view_budget = report_config_create_categ_budget_list ();
-    model_budget = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view_budget));
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			tree_view_budget );
-    gtk_widget_show ( tree_view_budget );
-
-    /* fill the list */
-    report_config_fill_categ_budget_list (FALSE);
-
-    /*   sur la partie de droite, on met les boutons (dé)sélectionner tout */
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_detaille_ib_etat ),
-			 vbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    bouton = gtk_button_new_with_label ( _("Select all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT (bouton),
-		       "clicked",
-		       G_CALLBACK (report_config_budget_select_all),
-		       GINT_TO_POINTER (TRUE));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Unselect all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT (bouton),
-		       "clicked",
-		       G_CALLBACK (report_config_budget_select_all),
-		       GINT_TO_POINTER (FALSE));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Income budget lines") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT (bouton),
-		       "clicked",
-		       G_CALLBACK (report_config_budget_select_type),
-		       GINT_TO_POINTER (FALSE));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Outgoing budget lines") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT (bouton),
-		       "clicked",
-		       G_CALLBACK (report_config_budget_select_type),
-		       GINT_TO_POINTER (TRUE));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    return ( vbox_onglet );
+        gtk_toggle_button_set_active ( gsb_data_report_text_comparison_get_button_use_number (
+                                text_comparison_number ), FALSE );
+        gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_button_use_number (
+                                text_comparison_number ), FALSE );
+        gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_hbox_cheque (
+                                text_comparison_number ), FALSE );
+    }
 }
 
 
-
+/*ONGLET_MONTANTS*/
 /**
- * create the budget widget to select them in a list
+ * Initialise les informations de l'onglet montants
  *
- * \param
+ * \param report_number
  *
- * \return the GtkWidget
- * */
-GtkWidget *onglet_etat_tiers ( void )
+ * \return
+ */
+void etats_config_initialise_onglet_montants ( gint report_number )
 {
-    GtkWidget *hbox;
-    GtkWidget *vbox;
-    GtkWidget *label;
-    GtkWidget *scrolled_window;
-    GtkWidget *bouton;
-    GtkWidget *vbox_onglet;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Payees"), "payees.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    bouton_detaille_tiers_etat = gtk_check_button_new_with_label ( _("Detail payees") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_detaille_tiers_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 3 ));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_detaille_tiers_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_detaille_tiers_etat );
-
-
-    /* mise en place de la liste et des boutons de détaillage */
-
-    hbox_detaille_tiers_etat = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox_detaille_tiers_etat,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( hbox_detaille_tiers_etat );
-
-    g_signal_connect ( G_OBJECT ( bouton_detaille_tiers_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 hbox_detaille_tiers_etat );
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_detaille_tiers_etat ),
-			 vbox,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    label = gtk_label_new ( _("Select payees to include in this report: ") );
-	gtk_misc_set_padding ( GTK_MISC ( label ), 3, 0 );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.0 );
-
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    liste_tiers_etat = gtk_clist_new ( 1 );
-    gtk_clist_set_selection_mode ( GTK_CLIST ( liste_tiers_etat ),
-				   GTK_SELECTION_MULTIPLE );
-    gtk_clist_set_column_auto_resize ( GTK_CLIST ( liste_tiers_etat ),
-				       0,
-				       TRUE );
-    gtk_clist_set_compare_func ( GTK_CLIST ( liste_tiers_etat ),
-				 (GtkCListCompareFunc) classement_alphabetique_tree );
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			liste_tiers_etat );
-    gtk_widget_show ( liste_tiers_etat );
-
-    /* on va remplir la liste avec les tiers */
-
-    remplissage_liste_tiers_etats ();
-
-    /*   sur la partie de droite, on met les boutons (dé)sélectionner tout */
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox_detaille_tiers_etat ),
-			 vbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    bouton = gtk_button_new_with_label ( _("Select all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( gtk_clist_select_all ),
-				G_OBJECT  ( liste_tiers_etat ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Unselect all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( gtk_clist_unselect_all ),
-				G_OBJECT  ( liste_tiers_etat ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-
-    return ( vbox_onglet );
-}
+    /* on affiche ou pas le choix des montants */
+    etats_config_ui_toggle_button_set_actif ( "bouton_utilise_montant",
+                        gsb_data_report_get_amount_comparison_used ( report_number ) );
 
+    /* on remplit la liste des lignes de recherche */
+    etats_config_onglet_montants_remplit_liste_comparaisons ( report_number );
+}
 
 
-/******************************************************************************/
-void remplissage_liste_tiers_etats ( void )
+/**
+ * Récupère les informations de l'onglet montants
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_montants ( gint report_number )
 {
-    GSList *payee_list;
-
-    if ( !liste_tiers_etat )
-	return;
+    gint amount_comparison_number;
 
-    devel_debug (NULL);
+    /* on récupère le choix des montants */
+    gsb_data_report_set_amount_comparison_used ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_utilise_montant" ) );
 
-    gtk_clist_clear ( GTK_CLIST ( liste_tiers_etat ) );
+    /* récupération de la liste des comparaisons de montant */
+    /*   il y a au moins une structure de créé, si celle si a les 2 montants vides, */
+    /* c'est qu'il n'y a aucune liste */
+    amount_comparison_number = GPOINTER_TO_INT ( gsb_data_report_get_amount_comparison_list (
+                                report_number )-> data );
+
+    if ( g_slist_length ( gsb_data_report_get_amount_comparison_list ( report_number ) ) == 1
+     &&
+     !strlen ( gtk_entry_get_text ( GTK_ENTRY ( gsb_data_report_amount_comparison_get_entry_first_amount (
+     amount_comparison_number ) ) ) )
+     &&
+     !strlen ( gtk_entry_get_text ( GTK_ENTRY ( gsb_data_report_amount_comparison_get_entry_second_amount (
+     amount_comparison_number ) ) ) )
+     &&
+     gtk_widget_get_sensitive ( gsb_data_report_amount_comparison_get_entry_first_amount (
+     amount_comparison_number ) )
+     &&
+     gtk_widget_get_sensitive ( gsb_data_report_amount_comparison_get_entry_second_amount (
+     amount_comparison_number ) ) )
+    {
+        g_slist_free ( gsb_data_report_get_amount_comparison_list ( report_number ) );
+        gsb_data_report_set_amount_comparison_list ( report_number, NULL );
+    }
+    else
+    {
+        /* on a rentré au moins une comparaison */
+        /* on rempli les champs de la structure */
+        GSList *comparison_list;
 
-    payee_list = gsb_data_payee_get_payees_list();
+        comparison_list = gsb_data_report_get_amount_comparison_list ( report_number );
 
-    while ( payee_list )
-    {
-	gint payee_number;
-	gchar *name[1];
-	gint row;
+        while ( comparison_list )
+        {
+            amount_comparison_number = GPOINTER_TO_INT ( comparison_list -> data );
 
-	payee_number = gsb_data_payee_get_no_payee ( payee_list -> data );
+            if ( gsb_data_report_amount_comparison_get_button_link ( amount_comparison_number ) )
+                gsb_data_report_amount_comparison_set_link_to_last_amount_comparison ( amount_comparison_number,
+                                gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                                gsb_data_report_amount_comparison_get_button_link (
+                                amount_comparison_number ) ) ) );
+            else
+                gsb_data_report_amount_comparison_set_link_to_last_amount_comparison (
+                                amount_comparison_number,
+                                -1 );
 
-	name[0] = my_strdup (gsb_data_payee_get_name (payee_number,
-						     TRUE ));
+            gsb_data_report_amount_comparison_set_first_comparison ( amount_comparison_number,
+                        gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                        gsb_data_report_amount_comparison_get_button_first_comparison (
+                        amount_comparison_number ) ) ) );
 
-	row = gtk_clist_append ( GTK_CLIST ( liste_tiers_etat ),
-				 name );
+            gsb_data_report_amount_comparison_set_link_first_to_second_part ( amount_comparison_number,
+                        gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                        gsb_data_report_amount_comparison_get_button_link_first_to_second_part (
+                        amount_comparison_number ) ) ) );
+            gsb_data_report_amount_comparison_set_second_comparison ( amount_comparison_number,
+                        gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                        gsb_data_report_amount_comparison_get_button_second_comparison (
+                        amount_comparison_number ) ) ) );
 
-	gtk_clist_set_row_data ( GTK_CLIST ( liste_tiers_etat ),
-				 row,
-				 GINT_TO_POINTER (payee_number));
+            gsb_data_report_amount_comparison_set_first_amount ( amount_comparison_number,
+                        utils_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY (
+                        gsb_data_report_amount_comparison_get_entry_first_amount (
+                        amount_comparison_number ) ) ) ) );
+            gsb_data_report_amount_comparison_set_second_amount ( amount_comparison_number,
+                        utils_real_get_from_string ( gtk_entry_get_text ( GTK_ENTRY (
+                        gsb_data_report_amount_comparison_get_entry_second_amount (
+                        amount_comparison_number ) ) ) ) );
 
-	payee_list = payee_list -> next;
+            comparison_list = comparison_list -> next;
+        }
     }
 
-    gtk_clist_sort ( GTK_CLIST ( liste_tiers_etat ));
+    gsb_data_report_set_amount_comparison_only_report_non_null ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_exclure_ope_nulles_etat" ) );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *onglet_etat_texte ( void )
-{
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-    GtkWidget *scrolled_window;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Transaction content"), "text.png" );
-    gtk_widget_show ( vbox_onglet );
-
-
-    /* on commence par créer le choix d'utiliser le montant */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    bouton_utilise_texte = gtk_check_button_new_with_label ( _("Select transactions according to content") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_utilise_texte ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 6 ));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_utilise_texte,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_utilise_texte );
-
-    vbox_generale_textes_etat = gtk_vbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 vbox_generale_textes_etat,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox_generale_textes_etat );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_texte ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 vbox_generale_textes_etat );
-
-
-    /* on va ensuite créer la liste qui contiendra les critères */
-    /* le remplissage ou la row vide se mettent plus tard */
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( vbox_generale_textes_etat ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    liste_textes_etat = gtk_vbox_new ( FALSE, 5 );
-    gtk_scrolled_window_add_with_viewport ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-					    liste_textes_etat );
-    gtk_widget_show ( liste_textes_etat );
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
 
-/******************************************************************************/
-void remplit_liste_comparaisons_textes_etat ( void )
+/**
+ * remplit la liste des comparaisons de montants
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_onglet_montants_remplit_liste_comparaisons ( gint report_number )
 {
+    GtkWidget *lignes;
     GSList *list_tmp;
-    gint current_report_number;
-	gchar* tmpstr;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
-
-
-    list_tmp = gsb_data_report_get_text_comparison_list (current_report_number);
-
-
-    /* commence par effacer l'ancienne liste */
-
-    while ( GTK_BOX ( liste_textes_etat ) -> children )
-	gtk_container_remove ( GTK_CONTAINER ( liste_textes_etat ),
-			       (( GtkBoxChild *) ( GTK_BOX ( liste_textes_etat ) -> children -> data )) -> widget );
+    gchar* tmp_str;
+    gboolean multi_lignes = FALSE;
 
+    /* on commence par effacer les anciennes lignes */
+    lignes = etats_config_ui_widget_get_widget_by_name ( "liste_montants_etat", NULL );
+    gtk_container_foreach ( GTK_CONTAINER ( lignes ), ( GtkCallback ) gtk_widget_destroy, NULL );
 
+    list_tmp = gsb_data_report_get_amount_comparison_list ( report_number );
     /*   s'il n'y a rien dans la liste, on met juste une row vide */
-
     if ( !list_tmp )
     {
-	ajoute_ligne_liste_comparaisons_textes_etat (0);
-	return;
+        etats_config_onglet_montants_ajoute_ligne_liste_comparaisons ( 0 );
+        return;
     }
 
-    /*   on fait le tour de la liste des comparaisons de texte, ajoute une row */
-    /* et la remplit à chaque fois */
-
+    /* on fait le tour de la liste des comparaisons de montant, ajoute une row
+     * et la remplit à chaque fois */
     while ( list_tmp )
     {
-	gint text_comparison_number;
-	GtkWidget *widget;
-
-	text_comparison_number = GPOINTER_TO_INT (list_tmp -> data);
-
-	/* on crée la row et remplit les widget de la structure */
-
-	widget = cree_ligne_comparaison_texte (text_comparison_number);
-	gsb_data_report_text_comparison_set_vbox_line ( text_comparison_number,
-							widget );
-	gtk_box_pack_start ( GTK_BOX ( liste_textes_etat ),
-			     widget,
-			     FALSE,
-			     FALSE,
-			     0 );
-	gtk_widget_show ( widget );
-
-	/* on remplit maintenant les widget avec les valeurs de la stucture */
-
-	/*       s'il n'y a pas de lien avec la struct précédente, on le vire */
-	/* on rajoute le && car parfois le bouton de lien se met quand même en 1ère row */
-
-	if ( gsb_data_report_text_comparison_get_link_to_last_text_comparison (text_comparison_number) != -1
-	     &&
-	     list_tmp != gsb_data_report_get_text_comparison_list (current_report_number))
-	    gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_link (text_comparison_number)),
-					  gsb_data_report_text_comparison_get_link_to_last_text_comparison (text_comparison_number));
-	else
-	{
-	    gtk_widget_destroy (gsb_data_report_text_comparison_get_button_link (text_comparison_number));
-	    gsb_data_report_text_comparison_set_button_link ( text_comparison_number,
-							      NULL);
-	}
-
-
-	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_field (text_comparison_number)),
-				      gsb_data_report_text_comparison_get_field (text_comparison_number));
-	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_operator (text_comparison_number)),
-				      gsb_data_report_text_comparison_get_operator (text_comparison_number));
-
-	if (gsb_data_report_text_comparison_get_text (text_comparison_number))
-	    gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)),
-				 gsb_data_report_text_comparison_get_text (text_comparison_number));
-
-	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_first_comparison (text_comparison_number)),
-				      gsb_data_report_text_comparison_get_first_comparison (text_comparison_number));
-	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_link_first_to_second_part (text_comparison_number)),
-				      gsb_data_report_text_comparison_get_link_first_to_second_part (text_comparison_number));
-	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_second_comparison (text_comparison_number)),
-				      gsb_data_report_text_comparison_get_second_comparison (text_comparison_number));
-
-	tmpstr = utils_str_itoa (gsb_data_report_text_comparison_get_first_amount (text_comparison_number));
-	gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_text_comparison_get_entry_first_amount (text_comparison_number)), tmpstr);
-	g_free ( tmpstr );
-
-	tmpstr = utils_str_itoa (gsb_data_report_text_comparison_get_second_amount (text_comparison_number));
-	gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_text_comparison_get_entry_second_amount (text_comparison_number)), tmpstr);
-	g_free ( tmpstr );
-
-	if (gsb_data_report_text_comparison_get_use_text (text_comparison_number))
-	    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)),
-					   TRUE );
-	else
-	    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)),
-					   TRUE );
-
-
-	/* on désensitive tous ce qui est nécessaire */
-
-	if ( gsb_data_report_text_comparison_get_field (text_comparison_number) == 8
-	     ||
-	     gsb_data_report_text_comparison_get_field (text_comparison_number) == 9
-	     ||
-	     gsb_data_report_text_comparison_get_field (text_comparison_number) == 10 )
-	{
-	    /* 	  on est sur un chq ou une pc */
-	    /* on rend sensitif les check button et la hbox correspondante */
-
-	    sensitive_widget (NULL, gsb_data_report_text_comparison_get_button_use_text (text_comparison_number));
-	    sensitive_widget (NULL, gsb_data_report_text_comparison_get_button_use_number (text_comparison_number));
-	    sensitive_hbox_fonction_bouton_txt (text_comparison_number);
-	}
-	else
-	{
-	    desensitive_widget (NULL, gsb_data_report_text_comparison_get_button_use_text (text_comparison_number));
-	    desensitive_widget (NULL, gsb_data_report_text_comparison_get_button_use_number (text_comparison_number));
-	    desensitive_widget (NULL, gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number));
-	    sensitive_widget (NULL, gsb_data_report_text_comparison_get_hbox_text (text_comparison_number));
-	}
-	/* on sensitive/désensitive l'entrée txt*/
-
-	if ( gsb_data_report_text_comparison_get_operator (text_comparison_number) >= 4 )
-	    desensitive_widget (NULL, gsb_data_report_text_comparison_get_entry_text (text_comparison_number));
-
-	/* on sensitive/désensitive les entrées de montant si nécessaire */
-
-	if ( gsb_data_report_text_comparison_get_first_comparison (text_comparison_number) == 6 )
-	    desensitive_widget (NULL, gsb_data_report_text_comparison_get_entry_first_amount (text_comparison_number));
-
-	if ( gsb_data_report_text_comparison_get_second_comparison (text_comparison_number) == 6 )
-	    desensitive_widget (NULL, gsb_data_report_text_comparison_get_entry_second_amount (text_comparison_number));
-
-	/* on sensitive/désensitive la hbox_2 si nécessaire */
-
-	if ( gsb_data_report_text_comparison_get_link_first_to_second_part (text_comparison_number) == 3 )
-	    desensitive_widget (NULL, gsb_data_report_text_comparison_get_hbox_second_part (text_comparison_number));
-
-	list_tmp = list_tmp -> next;
+        gint amount_comparison_number;
+        GtkWidget *hbox;
+
+        amount_comparison_number = GPOINTER_TO_INT ( list_tmp -> data );
+        hbox = etats_config_onglet_montants_new_comparison_line ( lignes, amount_comparison_number, multi_lignes );
+
+        /* on crée la row et remplit les widget de la structure */
+        gsb_data_report_amount_comparison_set_hbox_line ( amount_comparison_number, hbox );
+
+        /* on remplit maintenant les widget avec les valeurs de la stucture */
+        /* s'il n'y a pas de lien avec la struct précédente, on le vire
+         * on rajoute le && car parfois le bouton de lien se met quand même en 1ère row */
+
+        if ( gsb_data_report_amount_comparison_get_link_to_last_amount_comparison ( amount_comparison_number ) != -1
+         &&
+         list_tmp != gsb_data_report_get_amount_comparison_list ( report_number ) )
+        {
+            gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                        gsb_data_report_amount_comparison_get_button_link ( amount_comparison_number ) ),
+                        gsb_data_report_amount_comparison_get_link_to_last_amount_comparison (
+                        amount_comparison_number ) );
+        }
+
+        gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                        gsb_data_report_amount_comparison_get_button_first_comparison (
+                        amount_comparison_number ) ),
+                        gsb_data_report_amount_comparison_get_first_comparison ( amount_comparison_number ) );
+        gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                        gsb_data_report_amount_comparison_get_button_link_first_to_second_part (
+                        amount_comparison_number ) ),
+                        gsb_data_report_amount_comparison_get_link_first_to_second_part (
+                        amount_comparison_number ) );
+        gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                        gsb_data_report_amount_comparison_get_button_second_comparison (
+                        amount_comparison_number ) ),
+                        gsb_data_report_amount_comparison_get_second_comparison (
+                        amount_comparison_number ) );
+
+        tmp_str = utils_real_get_string ( gsb_data_report_amount_comparison_get_first_amount (
+                        amount_comparison_number ) );
+        gtk_entry_set_text ( GTK_ENTRY ( gsb_data_report_amount_comparison_get_entry_first_amount (
+                        amount_comparison_number ) ),
+                        tmp_str );
+        g_free ( tmp_str );
+
+        tmp_str = utils_real_get_string ( gsb_data_report_amount_comparison_get_second_amount (
+                        amount_comparison_number ) );
+        gtk_entry_set_text ( GTK_ENTRY ( gsb_data_report_amount_comparison_get_entry_second_amount (
+                        amount_comparison_number ) ),
+                        tmp_str );
+        g_free ( tmp_str );
+
+        /* on sensitive/désensitive les entrées si nécessaire */
+        if ( gsb_data_report_amount_comparison_get_first_comparison ( amount_comparison_number ) > 5 )
+            desensitive_widget ( NULL, gsb_data_report_amount_comparison_get_entry_first_amount (
+                        amount_comparison_number ) );
+        else
+            sensitive_widget ( NULL, gsb_data_report_amount_comparison_get_entry_first_amount (
+                        amount_comparison_number ) );
+
+        if ( gsb_data_report_amount_comparison_get_second_comparison ( amount_comparison_number ) > 5 )
+            desensitive_widget ( NULL, gsb_data_report_amount_comparison_get_entry_second_amount (
+                        amount_comparison_number ) );
+        else
+            sensitive_widget ( NULL, gsb_data_report_amount_comparison_get_entry_second_amount (
+                        amount_comparison_number ) );
+
+        /* on sensitive/désensitive la hbox_2 si nécessaire */
+        if ( gsb_data_report_amount_comparison_get_link_first_to_second_part ( amount_comparison_number ) == 3 )
+            desensitive_widget ( NULL, gsb_data_report_amount_comparison_get_hbox_second_part (
+                        amount_comparison_number ) );
+        else
+            sensitive_widget ( NULL, gsb_data_report_amount_comparison_get_hbox_second_part (
+                        amount_comparison_number ) );
+
+        list_tmp = list_tmp -> next;
     }
 }
-/******************************************************************************/
 
-/******************************************************************************/
-/* cette fonction ajoute une row vierge */
-/* si ancien_comp_textes n'est pas nul, la row est insérée juste après celle de l'argument */
-/******************************************************************************/
 
-void ajoute_ligne_liste_comparaisons_textes_etat ( gint last_text_comparison_number )
+/**
+ * ajoute une ligne de recherche de montant à la liste des lignes de recherche de montant
+ *
+ *\first_line   première ligne ou ligne supplémentaire
+ *
+ *\return la nouvelle ligne
+ */
+void etats_config_onglet_montants_ajoute_ligne_liste_comparaisons ( gint last_amount_comparison_number )
 {
-    gint text_comparison_number;
+    GtkWidget *lignes;
+    GtkWidget *widget;
+    gint amount_comparison_number;
     gint position;
     gint current_report_number;
-    GtkWidget *widget;
 
+    lignes = etats_config_ui_widget_get_widget_by_name ( "liste_montants_etat", NULL );
     current_report_number = gsb_gui_navigation_get_current_report ();
 
     /* on récupère tout de suite la position à laquelle il faut insérer la row */
-
-    if ( last_text_comparison_number )
-	position = g_slist_index ( gsb_data_report_get_text_comparison_list (current_report_number),
-				   GINT_TO_POINTER (last_text_comparison_number)) + 1;
+    if ( last_amount_comparison_number )
+        position = g_slist_index ( gsb_data_report_get_amount_comparison_list ( current_report_number ),
+                                GINT_TO_POINTER ( last_amount_comparison_number ) ) + 1;
     else
-	position = 0;
+        position = 0;
 
     /* on commence par créer une structure vide */
-
-    text_comparison_number = gsb_data_report_text_comparison_new (0);
-    gsb_data_report_text_comparison_set_report_number ( text_comparison_number,
-							current_report_number );
+    amount_comparison_number = gsb_data_report_amount_comparison_new ( 0 );
+    gsb_data_report_amount_comparison_set_report_number ( amount_comparison_number,
+                        current_report_number);
 
     /* on crée la row et remplit les widget de la structure */
+    widget = etats_config_onglet_montants_new_comparison_line ( lignes, amount_comparison_number, TRUE );
+    gsb_data_report_amount_comparison_set_hbox_line ( amount_comparison_number, widget );
 
-    widget = cree_ligne_comparaison_texte (text_comparison_number);
-    gsb_data_report_text_comparison_set_vbox_line ( text_comparison_number,
-						    widget );
-    gtk_box_pack_start ( GTK_BOX ( liste_textes_etat ),
-			 widget,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( widget );
-
-    /* on vire le lien de la row s'il n'y a pas encore de liste */
-    /*   (cad si c'est la 1ère row) */
-
-    if ( !gsb_data_report_get_text_comparison_list (current_report_number))
+    /* on vire le lien de la row s'il n'y a pas encore de liste (cad si c'est la 1ère row) */
+    if ( !gsb_data_report_get_amount_comparison_list ( current_report_number ) )
     {
-	gtk_widget_destroy (gsb_data_report_text_comparison_get_button_link (text_comparison_number));
-	gsb_data_report_text_comparison_set_button_link ( text_comparison_number,
-							  NULL );
+        gtk_widget_destroy ( gsb_data_report_amount_comparison_get_button_link ( amount_comparison_number ) );
+        gsb_data_report_amount_comparison_set_button_link ( amount_comparison_number, NULL );
     }
 
     /*   par défaut, le bouton bouton_lien_1_2 est sur stop */
-
-    gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_link_first_to_second_part (text_comparison_number)),
-				  3 );
-    gsb_data_report_text_comparison_set_link_first_to_second_part ( text_comparison_number,
-								    3 );
-    gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_hbox_second_part (text_comparison_number),
-			       FALSE );
-
-
-    /*   par défaut, la row de chq est non sensitive */
-
-    gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_button_use_text (text_comparison_number),
-			       FALSE );
-    gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_button_use_number (text_comparison_number),
-			       FALSE );
-    gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number),
-			       FALSE );
-
+    gtk_combo_box_set_active ( GTK_COMBO_BOX (
+                        gsb_data_report_amount_comparison_get_button_link_first_to_second_part (
+                        amount_comparison_number ) ),
+                        3 );
+    gsb_data_report_amount_comparison_set_link_first_to_second_part ( amount_comparison_number, 3 );
+    gtk_widget_set_sensitive ( gsb_data_report_amount_comparison_get_hbox_second_part (
+                        amount_comparison_number ),
+                        FALSE );
 
     /* on met la structure dans la liste à la position demandée */
-
-    gsb_data_report_set_text_comparison_list ( current_report_number,
-					       g_slist_insert ( gsb_data_report_get_text_comparison_list (current_report_number),
-								GINT_TO_POINTER (text_comparison_number),
-								position ));
+    gsb_data_report_set_amount_comparison_list ( current_report_number,
+                        g_slist_insert ( gsb_data_report_get_amount_comparison_list ( current_report_number ),
+                        GINT_TO_POINTER ( amount_comparison_number ),
+                        position ) );
 
 
     /* on met la row à sa place dans la liste */
-
-    gtk_box_reorder_child ( GTK_BOX ( liste_textes_etat ),
-			    gsb_data_report_text_comparison_get_vbox_line (text_comparison_number),
-			    position );
+    gtk_box_reorder_child ( GTK_BOX ( lignes ),
+                        gsb_data_report_amount_comparison_get_hbox_line ( amount_comparison_number ),
+                        position );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-/* crée la hbox de la row et la renvoie */
-/* remplie en même temps les widget de la struct envoyée en argument, sauf hbox_ligne */
-/******************************************************************************/
-GtkWidget *cree_ligne_comparaison_texte ( gint text_comparison_number )
+
+/**
+ * crée une ligne de recherche de montant
+ *
+ *\parent       vbox qui contiendra toutes les lignes
+ *\first_line   première ligne ou ligne supplémentaire
+ *
+ *\return la nouvelle ligne
+ */
+GtkWidget *etats_config_onglet_montants_new_comparison_line ( GtkWidget *parent,
+                        gint amount_comparison_number,
+                        gint with_link )
 {
-    GtkWidget *vbox;
-    GtkWidget *label;
-    GtkWidget *bouton;
     GtkWidget *hbox;
+    GtkWidget *hbox_2;
+    GtkWidget *label;
+    GtkWidget *entry;
+    GtkWidget *combo;
 
-    /*   on laisse les infos vides, on met juste les boutons et les labels */
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-
-
-    /* création de la 1ère row */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-
-    gsb_data_report_text_comparison_set_button_link ( text_comparison_number,
-						      cree_bouton_lien_lignes_comparaison ());
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 gsb_data_report_text_comparison_get_button_link (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-
-    label = gtk_label_new ( _("Transactions whose ") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    /*   avant de créer le bouton des champs, on doit créer hbox_txt, hbox_chq et les 2 check button */
-
-    gsb_data_report_text_comparison_set_hbox_text ( text_comparison_number,
-						    gtk_hbox_new ( FALSE,
-								   5 ));
-    gsb_data_report_text_comparison_set_hbox_cheque ( text_comparison_number,
-						      gtk_hbox_new ( FALSE,
-								     5 ));
-    gsb_data_report_text_comparison_set_button_use_text ( text_comparison_number,
-							  gtk_radio_button_new ( NULL ));
-    gsb_data_report_text_comparison_set_button_use_number ( text_comparison_number,
-							    gtk_radio_button_new ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON(gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)))));
-
-    gsb_data_report_text_comparison_set_button_field ( text_comparison_number,
-						       cree_bouton_champ ( text_comparison_number ));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 gsb_data_report_text_comparison_get_button_field (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-
-    /* la suite se met dans hbox_txt */
-    /* en 2ème row */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    label = gtk_label_new ( NULL );
-    gtk_widget_set_size_request ( label,
-			   12,
-			   -1 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    /* on met le check button utilisé en cas de champ à no */
-
-    g_signal_connect ( G_OBJECT ( gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 gsb_data_report_text_comparison_get_hbox_text (text_comparison_number));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 gsb_data_report_text_comparison_get_button_use_text (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( gsb_data_report_text_comparison_get_button_use_text (text_comparison_number));
-
-
-    /* on met maintenant le comparateur txt */
-
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 gsb_data_report_text_comparison_get_hbox_text (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number));
+    hbox = gtk_hbox_new ( FALSE, 5 );
 
-    /* avant de créer l'opérateur, on doit créer l'entrée de txt */
+    /* on crée le premier lien ne sert pas si c'est la première ligne */
+    if ( with_link )
+    {
+        combo = utils_combo_box_make_from_string_array ( champs_lien_lignes_comparaison );
+        gsb_data_report_amount_comparison_set_button_link ( amount_comparison_number, combo );
+        gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 5 );
+    }
 
-    gsb_data_report_text_comparison_set_entry_text ( text_comparison_number,
-						     gtk_entry_new ());
+    label = gtk_label_new ( _("Transactions with an amount of") );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0 );
 
-    gsb_data_report_text_comparison_set_button_operator ( text_comparison_number,
-							  cree_bouton_operateur_txt (text_comparison_number));
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)),
-			 gsb_data_report_text_comparison_get_button_operator (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
+    /* on crée et initialise le premier combobox de comparaison de montant */
+    combo = utils_combo_box_make_from_string_array ( champs_comparateur_montant );
+    gsb_data_report_amount_comparison_set_button_first_comparison ( amount_comparison_number, combo );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
 
-    /* on peut maintenant mettre l'entrée de txt */
+    label = gtk_label_new ( _("to") );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0 );
+
+    /* on ajoute l'entry pour la saisie du premier montant */
+    entry = gtk_entry_new ( );
+    gtk_widget_set_size_request ( entry, 100, -1 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), entry, FALSE, FALSE, 0 );
+    gsb_data_report_amount_comparison_set_entry_first_amount ( amount_comparison_number, entry );
+
+    /* on crée le bouton de lien pour la deuxième partie de la comparaison*/
+    combo = utils_combo_box_make_from_string_array ( champs_lien_nombre_2 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
+    gsb_data_report_amount_comparison_set_button_link_first_to_second_part ( amount_comparison_number, combo );
+
+    /* the hbox is created in hbox_2 and is used later */
+    hbox_2 = gtk_hbox_new ( FALSE, 5 );
+    gsb_data_report_amount_comparison_set_hbox_second_part ( amount_comparison_number, hbox_2 );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), hbox_2, FALSE, FALSE, 0 );
+
+    /* maintenant que hbox_2 est définie on met le signal lorsque l'on change le choix du combobox */
+    g_signal_connect ( G_OBJECT ( combo ),
+                        "changed",
+                        G_CALLBACK ( etats_config_combo_lien_nombre_2_changed ),
+                        hbox_2 );
 
-    gtk_widget_set_size_request ( gsb_data_report_text_comparison_get_entry_text (text_comparison_number),
-			   150,
-			   -1 );
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)),
-			 gsb_data_report_text_comparison_get_entry_text (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show (gsb_data_report_text_comparison_get_entry_text (text_comparison_number));
+    /* on peut maintenant ajouter dans comp_montants -> hbox_partie_2 */
+    combo = utils_combo_box_make_from_string_array ( champs_comparateur_montant );
+    gsb_data_report_amount_comparison_set_button_second_comparison ( amount_comparison_number, combo );
+    gtk_box_pack_start ( GTK_BOX ( hbox_2 ), combo, FALSE, FALSE, 0 );
 
+    label = gtk_label_new ( _("to") );
+    gtk_box_pack_start ( GTK_BOX ( hbox_2 ), label, FALSE, FALSE, 0 );
 
-    /* on crée maintenant la 2ème row qui concerne les tests de chq */
+    /* on ajoute l'entry pour la saisie du premier montant */
+    entry = gtk_entry_new ( );
+    gtk_widget_set_size_request ( entry, 100, -1 );
+    gtk_box_pack_start ( GTK_BOX ( hbox_2 ), entry, FALSE, FALSE, 0 );
+    gsb_data_report_amount_comparison_set_entry_second_amount ( amount_comparison_number, entry );
 
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
+    /* on ajoute le bouton ajouter une nouvelle ligne */
+    etats_config_onglet_montants_get_buttons_add_remove ( hbox, amount_comparison_number );
 
-    label = gtk_label_new ( NULL );
-    gtk_widget_set_size_request ( label,
-			   12,
-			   -1 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
+    /* on met la ligne complète (vbox) dans son parent */
+    gtk_box_pack_start ( GTK_BOX ( parent ), hbox, FALSE, FALSE, 0 );
+    gtk_widget_show_all ( hbox );
 
+    /* return */
+    return hbox;
+}
 
-    /* on met le check button utilisé en cas de champ à no */
 
-    g_signal_connect ( G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 gsb_data_report_text_comparison_get_button_use_number (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number));
+/**
+ *
+ *
+ *
+ */
+void etats_config_onglet_montants_get_buttons_add_remove ( GtkWidget *parent,
+                        gint text_comparison_number )
+{
+    GtkWidget *alignement;
+    GtkWidget *button;
 
+    alignement = gtk_alignment_new ( 0.3, 0, 0, 0 );
+    gtk_widget_show ( alignement );
+    gtk_box_pack_start ( GTK_BOX ( parent ), alignement, TRUE, TRUE, 0 );
 
-    /* mise en place de la hbox des montants de chq */
+    button = gtk_button_new_with_label ( _("Add") );
+    gtk_widget_show ( button );
+    gtk_button_set_relief ( GTK_BUTTON ( button ), GTK_RELIEF_NONE );
 
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number));
+    g_signal_connect_swapped ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_config_onglet_montants_ajoute_ligne_liste_comparaisons ),
+                        GINT_TO_POINTER ( text_comparison_number ) );
 
+    gtk_container_add ( GTK_CONTAINER ( alignement ), button );
 
-    label = gtk_label_new ( _("is ") );
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    gsb_data_report_text_comparison_set_button_first_comparison ( text_comparison_number,
-								  cree_bouton_comparateur_texte (text_comparison_number));
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)),
-			 gsb_data_report_text_comparison_get_button_first_comparison (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-
-    label = gtk_label_new ( _("to"));
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    gsb_data_report_text_comparison_set_entry_first_amount ( text_comparison_number,
-							     gtk_entry_new ());
-    gtk_widget_set_size_request ( gsb_data_report_text_comparison_get_entry_first_amount (text_comparison_number),
-			   100,
-			   -1 );
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)),
-			 gsb_data_report_text_comparison_get_entry_first_amount (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show (gsb_data_report_text_comparison_get_entry_first_amount (text_comparison_number));
-
-
-    /* la fonction cree_bouton_lien_montant va se servir de hbox_partie_2 */
-    /* il faut donc créer celle ci avant l'appel de la fonction */
-
-    gsb_data_report_text_comparison_set_hbox_second_part ( text_comparison_number,
-							   gtk_hbox_new ( FALSE,
-									  5 ));
-
-    /* on crée alors le bouton de lien */
-
-    gsb_data_report_text_comparison_set_button_link_first_to_second_part ( text_comparison_number,
-									   cree_bouton_lien (gsb_data_report_text_comparison_get_hbox_second_part (text_comparison_number)));
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)),
-			 gsb_data_report_text_comparison_get_button_link_first_to_second_part (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-
-    /* on ajoute la hbox2 */
-
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)),
-			 gsb_data_report_text_comparison_get_hbox_second_part (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show (gsb_data_report_text_comparison_get_hbox_second_part (text_comparison_number));
+    alignement = gtk_alignment_new ( 0.3, 0, 0, 0 );
+    gtk_widget_show ( alignement );
+    gtk_box_pack_start ( GTK_BOX ( parent ), alignement, TRUE, TRUE, 0 );
 
-    /* on peut maintenant ajouter dans hbox_partie_2 */
+    button = gtk_button_new_with_label ( _("Remove") );
+    gtk_button_set_relief ( GTK_BUTTON ( button ), GTK_RELIEF_NONE );
 
-    gsb_data_report_text_comparison_set_button_second_comparison ( text_comparison_number,
-								   cree_bouton_comparateur_texte (text_comparison_number));
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_second_part (text_comparison_number)),
-			 gsb_data_report_text_comparison_get_button_second_comparison (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
+    g_signal_connect_swapped ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_config_onglet_montants_retire_ligne_liste_comparaisons ),
+                        GINT_TO_POINTER ( text_comparison_number ) );
 
-    label = gtk_label_new ( _("to") );
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_second_part (text_comparison_number)),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    gsb_data_report_text_comparison_set_entry_second_amount ( text_comparison_number,
-							      gtk_entry_new ());
-    gtk_widget_set_size_request ( gsb_data_report_text_comparison_get_entry_second_amount (text_comparison_number),
-			   100,
-			   -1 );
-    gtk_box_pack_start ( GTK_BOX (gsb_data_report_text_comparison_get_hbox_second_part (text_comparison_number)),
-			 gsb_data_report_text_comparison_get_entry_second_amount (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show (gsb_data_report_text_comparison_get_entry_second_amount (text_comparison_number));
-
-    /* on met les bouton ajouter et supprimer */
-
-    bouton = gtk_button_new_with_label ( _("Add"));
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT ( bouton ),
-			       "clicked",
-			       G_CALLBACK ( ajoute_ligne_liste_comparaisons_textes_etat ),
-			       GINT_TO_POINTER (text_comparison_number));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Remove"));
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT ( bouton ),
-			       "clicked",
-			       G_CALLBACK ( retire_ligne_liste_comparaisons_textes_etat ),
-			       GINT_TO_POINTER (text_comparison_number));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-
-    return ( vbox );
+    gtk_container_add ( GTK_CONTAINER ( alignement ), button );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void retire_ligne_liste_comparaisons_textes_etat ( gint last_text_comparison_number )
+void etats_config_onglet_montants_retire_ligne_liste_comparaisons ( gint last_amount_comparison_number )
 {
-    gint current_report_number;
+     gint current_report_number;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
     /* il faut qu'il y ai plus d'une row affichée */
-
-    if ( g_slist_length ( gsb_data_report_get_text_comparison_list (current_report_number)) < 2 )
-	return;
+    if ( g_slist_length ( gsb_data_report_get_amount_comparison_list ( current_report_number ) ) < 2 )
+        return;
 
     /* on commence par supprimer la row dans la liste */
-
-    gtk_widget_destroy (gsb_data_report_text_comparison_get_vbox_line (last_text_comparison_number));
+    gtk_widget_destroy ( gsb_data_report_amount_comparison_get_hbox_line ( last_amount_comparison_number ) );
 
     /* si la structure qu'on retire est la 1ère, on vire le widget de lient */
-
-    if ( !g_slist_index ( gsb_data_report_get_text_comparison_list (current_report_number),
-			  GINT_TO_POINTER (last_text_comparison_number)))
+    if ( !g_slist_index ( gsb_data_report_get_amount_comparison_list ( current_report_number ),
+     GINT_TO_POINTER ( last_amount_comparison_number ) ) )
     {
-	gint text_comparison_number;
+        gint amount_comparison_number;
 
-	text_comparison_number = GPOINTER_TO_INT (gsb_data_report_get_text_comparison_list (current_report_number)-> next -> data);
-	gtk_widget_destroy (gsb_data_report_text_comparison_get_button_link (text_comparison_number));
-	gsb_data_report_text_comparison_set_button_link ( text_comparison_number,
-							  NULL );
+        amount_comparison_number = GPOINTER_TO_INT ( gsb_data_report_get_amount_comparison_list (
+                        current_report_number )-> next -> data );
+        gtk_widget_destroy ( gsb_data_report_amount_comparison_get_button_link ( amount_comparison_number ) );
+        gsb_data_report_amount_comparison_set_button_link ( amount_comparison_number, NULL );
     }
 
     /* et on retire la struct de la sliste */
-
-    gsb_data_report_set_text_comparison_list ( current_report_number,
-					       g_slist_remove ( gsb_data_report_get_text_comparison_list (current_report_number),
-								GINT_TO_POINTER (last_text_comparison_number)));
-}
-/******************************************************************************/
-
-/******************************************************************************/
-/* cette fonction crée un option_menu avec les noms de champs de txt, et rend (non-)sensitif */
-/* la hbox correspondante ( txt ou chq ) */
-/* il faut donc que hbox_txt,  hbox_chq et les 2 check button soient déjà créées */
-/******************************************************************************/
-GtkWidget *cree_bouton_champ ( gint text_comparison_number )
-{
-    GtkWidget *bouton;
-    GtkWidget *menu;
-    GtkWidget *menu_item;
-
-    /*   pour chaque item, on désensitive les check button et la row des tests de no, et */
-    /* on rend sensitif la row des test en txt */
-    /*     sauf pour les items à no (chq et pc) où on rend sensitif les check button et la */
-    /*     row correspondans au check button, et désensitive celle où le check button n'est pas */
-    /* mis */
-
-    bouton = gtk_option_menu_new ();
-    gtk_widget_show ( bouton );
-
-    menu = gtk_menu_new ();
-
-    menu_item = gtk_menu_item_new_with_label ( _("payee"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 0 ));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( gtk_toggle_button_set_active ),
-				G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("payee information"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 1 ));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( gtk_toggle_button_set_active ),
-				G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("category"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 2 ));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( gtk_toggle_button_set_active ),
-				G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("sub-category"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 3 ));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( gtk_toggle_button_set_active ),
-				G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("budgetary line"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 4 ));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( gtk_toggle_button_set_active ),
-				G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("sub-budgetary line"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 5 ));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( gtk_toggle_button_set_active ),
-				G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("note"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 6 ));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( gtk_toggle_button_set_active ),
-				G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("bank reference"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 7 ));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( gtk_toggle_button_set_active ),
-				G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("voucher"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 8 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-			       "activate",
-			       G_CALLBACK ( sensitive_hbox_fonction_bouton_txt ),
-			       GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-
-    menu_item = gtk_menu_item_new_with_label ( _("cheque number"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 9 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( sensitive_hbox_fonction_bouton_txt ),
-				GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("reconciliation reference"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_champ",
-			  GINT_TO_POINTER ( 10 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_text (text_comparison_number)));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_button_use_number (text_comparison_number)));
-    g_signal_connect_swapped ( G_OBJECT ( menu_item ),
-				"activate",
-				G_CALLBACK ( sensitive_hbox_fonction_bouton_txt ),
-				GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton ),
-			       menu );
-    gtk_widget_show ( menu );
-
-    return ( bouton );
-}
-/******************************************************************************/
-
-/******************************************************************************/
-/* cette fonction est appellée lorsqu'on sélectionne un champ de texte à no */
-/* elle rend sensitif la hbox correspondant au check button */
-/******************************************************************************/
-void sensitive_hbox_fonction_bouton_txt ( gint text_comparison_number )
-{
-    sens_desensitive_pointeur ( gsb_data_report_text_comparison_get_button_use_text (text_comparison_number),
-				gsb_data_report_text_comparison_get_hbox_text (text_comparison_number));
-    sens_desensitive_pointeur ( gsb_data_report_text_comparison_get_button_use_number (text_comparison_number),
-				gsb_data_report_text_comparison_get_hbox_cheque (text_comparison_number));
-}
-/******************************************************************************/
-
-/******************************************************************************/
-/* cette fonction crée un option_menu avec contient, ne contient pas ... */
-/******************************************************************************/
-GtkWidget *cree_bouton_operateur_txt ( gint text_comparison_number )
-{
-    GtkWidget *bouton;
-    GtkWidget *menu;
-    GtkWidget *menu_item;
-
-    bouton = gtk_option_menu_new ();
-    gtk_widget_show ( bouton );
-
-    menu = gtk_menu_new ();
-
-    menu_item = gtk_menu_item_new_with_label ( _("contains"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_operateur",
-			  GINT_TO_POINTER ( 0 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("doesn't contain"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_operateur",
-			  GINT_TO_POINTER ( 1 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("begins with"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_operateur",
-			  GINT_TO_POINTER ( 2 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("ends with"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_operateur",
-			  GINT_TO_POINTER ( 3 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("is empty"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_operateur",
-			  GINT_TO_POINTER ( 4 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("isn't empty"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_operateur",
-			  GINT_TO_POINTER ( 5 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT (gsb_data_report_text_comparison_get_entry_text (text_comparison_number)));
-    gtk_widget_show ( menu_item );
-
-
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton ),
-			       menu );
-    gtk_widget_show ( menu );
-
-    return ( bouton );
+    gsb_data_report_set_amount_comparison_list ( current_report_number,
+                        g_slist_remove ( gsb_data_report_get_amount_comparison_list ( current_report_number ),
+                        GINT_TO_POINTER ( last_amount_comparison_number ) ) );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *onglet_etat_montant ( void )
-{
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-    GtkWidget *scrolled_window;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Amount"), "amount.png" );
-    gtk_widget_show ( vbox_onglet );
-
-
-    /* on commence par créer le choix d'utiliser le montant */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    bouton_utilise_montant = gtk_check_button_new_with_label ( _("Select the transactions by amount") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_utilise_montant ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 7 ));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_utilise_montant,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_utilise_montant );
-
-    vbox_generale_montants_etat = gtk_vbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 vbox_generale_montants_etat,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox_generale_montants_etat );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_montant ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 vbox_generale_montants_etat );
-
-
-
-    /* on va ensuite créer la liste qui contiendra les critères */
-    /* le remplissage ou la row vide se mettent plus tard */
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( vbox_generale_montants_etat ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    liste_montants_etat = gtk_vbox_new ( FALSE, 5 );
-    gtk_scrolled_window_add_with_viewport ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-					    liste_montants_etat );
-    gtk_widget_show ( liste_montants_etat );
-
-
-    /* on rajoute le bouton exclure les opé dont le montant est nul */
-
-    bouton_exclure_ope_nulles_etat = gtk_check_button_new_with_label ( _("Exclude the transactions with a null amount") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_exclure_ope_nulles_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 7 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 bouton_exclure_ope_nulles_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_exclure_ope_nulles_etat );
-
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
 
-/******************************************************************************/
-void remplit_liste_comparaisons_montants_etat ( void )
+/*ONGLET_MODE_PAIEMENT*/
+/**
+ * Initialise les informations de l'onglet modes de paiement
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_mode_paiement ( gint report_number )
 {
-    GSList *list_tmp;
-    gint current_report_number;
-	gchar* tmpstr;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
-
-
-    list_tmp = gsb_data_report_get_amount_comparison_list (current_report_number);
-
-
-    /* commence par effacer l'ancienne liste */
-
-    while ( GTK_BOX ( liste_montants_etat ) -> children )
-	gtk_container_remove ( GTK_CONTAINER ( liste_montants_etat ),
-			       (( GtkBoxChild *) ( GTK_BOX ( liste_montants_etat ) -> children -> data )) -> widget );
+    gint active;
 
+    active = gsb_data_report_get_method_of_payment_used ( report_number );
+    etats_config_ui_toggle_button_set_actif ( "bouton_detaille_mode_paiement_etat", active );
 
-    /*   s'il n'y a rien dans la liste, on met juste une row vide */
-
-    if ( !list_tmp )
-    {
-	ajoute_ligne_liste_comparaisons_montants_etat (0);
-	return;
-    }
-
-    /*   on fait le tour de la liste des comparaisons de montant, ajoute une row */
-    /* et la remplit à chaque fois */
-
-    while ( list_tmp )
+    if ( active )
     {
-	gint amount_comparison_number;
-	GtkWidget *hbox;
+        etats_config_ui_onglet_mode_paiement_select_rows_from_list (
+                                gsb_data_report_get_method_of_payment_list ( report_number ),
+                                "treeview_mode_paiement" );
 
-	amount_comparison_number = GPOINTER_TO_INT (list_tmp -> data);
-	hbox = cree_ligne_comparaison_montant (amount_comparison_number);
-
-	/* on crée la row et remplit les widget de la structure */
-
-	gsb_data_report_amount_comparison_set_hbox_line ( amount_comparison_number,
-							  hbox);
-	gtk_box_pack_start ( GTK_BOX ( liste_montants_etat ),
-			     hbox,
-			     FALSE,
-			     FALSE,
-			     0 );
-	gtk_widget_show ( hbox );
-
-	/* on remplit maintenant les widget avec les valeurs de la stucture */
-
-	/*       s'il n'y a pas de lien avec la struct précédente, on le vire */
-	/* on rajoute le && car parfois le bouton de lien se met quand même en 1ère row */
-
-	if ( gsb_data_report_amount_comparison_get_link_to_last_amount_comparison (amount_comparison_number) != -1
-	     &&
-	     list_tmp != gsb_data_report_get_amount_comparison_list (current_report_number))
-	    gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_link (amount_comparison_number)),
-					  gsb_data_report_amount_comparison_get_link_to_last_amount_comparison (amount_comparison_number));
-	else
-	{
-	    gtk_widget_destroy (gsb_data_report_amount_comparison_get_button_link (amount_comparison_number));
-	    gsb_data_report_amount_comparison_set_button_link ( amount_comparison_number,
-								NULL );
-	}
-
-
-	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_first_comparison (amount_comparison_number)),
-				      gsb_data_report_amount_comparison_get_first_comparison (amount_comparison_number));
-	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_link_first_to_second_part (amount_comparison_number)),
-				      gsb_data_report_amount_comparison_get_link_first_to_second_part (amount_comparison_number));
-	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_second_comparison (amount_comparison_number)),
-				      gsb_data_report_amount_comparison_get_second_comparison (amount_comparison_number));
-
-	tmpstr = utils_real_get_string (gsb_data_report_amount_comparison_get_first_amount (amount_comparison_number));
-	gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number)), tmpstr);
-	g_free ( tmpstr );
+        if ( g_slist_length ( gsb_data_report_get_method_of_payment_list ( report_number ) ) )
+            utils_togglebutton_set_label_position_unselect (
+                                etats_config_ui_widget_get_widget_by_name (
+                                "togglebutton_select_all_mode_paiement", NULL ),
+                                NULL,
+                                etats_config_ui_widget_get_widget_by_name ( "treeview_mode_paiement", NULL ) );
+    }
+}
 
-	tmpstr = utils_real_get_string (gsb_data_report_amount_comparison_get_second_amount (amount_comparison_number));
-	gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number)), tmpstr);
-	g_free ( tmpstr );
 
-	/* on sensitive/désensitive les entrées si nécessaire */
+/**
+ * Récupère les informations de l'onglet mode de paiement
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_mode_paiement ( gint report_number )
+{
+    gint active;
 
-	if ( gsb_data_report_amount_comparison_get_first_comparison (amount_comparison_number) > 5 )
-	    desensitive_widget (NULL, gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number));
-	else
-	    sensitive_widget (NULL, gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number));
+    active = etats_config_ui_toggle_button_get_actif ( "bouton_detaille_mode_paiement_etat" );
+    gsb_data_report_set_method_of_payment_used ( report_number, active );
+    if ( active )
+    {
+        gsb_data_report_free_method_of_payment_list ( report_number );
 
-	if ( gsb_data_report_amount_comparison_get_second_comparison (amount_comparison_number) > 5 )
-	    desensitive_widget (NULL, gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number));
-	else
-	    sensitive_widget (NULL, gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number));
+        if ( utils_tree_view_all_rows_are_selected ( GTK_TREE_VIEW (
+         etats_config_ui_widget_get_widget_by_name ( "treeview_mode_paiement", NULL ) ) ) )
+        {
+            gchar *text;
+            gchar *hint;
 
+            hint = g_strdup ( _("Performance issue.") );
+            text = g_strdup ( _("All methods of payment have been selected.  Grisbi will run "
+                            "faster without the \"Detail methods of payment used\" option activated.") );
 
-	/* on sensitive/désensitive la hbox_2 si nécessaire */
+            dialogue_special ( GTK_MESSAGE_INFO, make_hint ( hint, text ) );
+            etats_config_ui_toggle_button_set_actif ( "togglebutton_select_all_mode_paiement", FALSE );
+            gsb_data_report_set_method_of_payment_used ( report_number, 0 );
 
-	if ( gsb_data_report_amount_comparison_get_link_first_to_second_part (amount_comparison_number) == 3 )
-	    desensitive_widget (NULL, gsb_data_report_amount_comparison_get_hbox_second_part (amount_comparison_number));
-	else
-	    sensitive_widget (NULL, gsb_data_report_amount_comparison_get_hbox_second_part (amount_comparison_number));
+            g_free ( text );
+            g_free ( hint );
+        }
+        else
+            gsb_data_report_set_method_of_payment_list ( report_number,
+                            etats_config_ui_onglet_mode_paiement_get_list_rows_selected (
+                            "treeview_mode_paiement" ) );
 
-	list_tmp = list_tmp -> next;
     }
 }
-/******************************************************************************/
 
-/******************************************************************************/
-/* cette fonction ajoute une row vierge */
-/* si ancien_comp_montants n'est pas nul, la row est insérée juste après celle de l'argument */
-/******************************************************************************/
 
-void ajoute_ligne_liste_comparaisons_montants_etat ( gint last_amount_comparison_number )
+/**
+ *
+ *
+ *
+ */
+GtkTreeModel *etats_config_onglet_mode_paiement_get_model ( void )
 {
-    gint position;
-    gint current_report_number;
-    gint amount_comparison_number;
-    GtkWidget *hbox;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
-
-
-    /* on récupère tout de suite la position à laquelle il faut insérer la row */
+    GtkListStore *list_store;
+    GSList *liste_nom_types = NULL;
+    GSList *list_tmp;
 
-    if ( last_amount_comparison_number )
-	position = g_slist_index ( gsb_data_report_get_amount_comparison_list (current_report_number),
-				   GINT_TO_POINTER (last_amount_comparison_number)) + 1;
-    else
-	position = 0;
+    list_store = gtk_list_store_new ( 2, G_TYPE_STRING, G_TYPE_INT );
 
-    /* on commence par créer une structure vide */
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE ( list_store ),
+                        0, GTK_SORT_ASCENDING );
 
-    amount_comparison_number = gsb_data_report_amount_comparison_new (0);
-    gsb_data_report_amount_comparison_set_report_number ( amount_comparison_number,
-							  current_report_number);
+    /* create a list of unique names */
+    list_tmp = gsb_data_payment_get_payments_list ( );
 
-    /* on crée la row et remplit les widget de la structure */
+    while ( list_tmp )
+    {
+        GtkTreeIter iter;
+        gchar *name;
+        gint payment_number;
 
-    hbox = cree_ligne_comparaison_montant (amount_comparison_number);
-    gsb_data_report_amount_comparison_set_hbox_line ( amount_comparison_number,
-						      hbox);
-    gtk_box_pack_start ( GTK_BOX ( liste_montants_etat ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
+        payment_number = gsb_data_payment_get_number (list_tmp -> data);
+        name = my_strdup ( gsb_data_payment_get_name ( payment_number ) );
 
-    /* on vire le lien de la row s'il n'y a pas encore de liste */
-    /*   (cad si c'est la 1ère row) */
+        if ( !g_slist_find_custom ( liste_nom_types,
+                        name,
+                        ( GCompareFunc ) cherche_string_equivalente_dans_slist ) )
+        {
+            liste_nom_types = g_slist_append ( liste_nom_types, name );
+            gtk_list_store_append ( list_store, &iter );
+            gtk_list_store_set ( list_store, &iter, 0, name, 1, payment_number, -1 );
+        }
+        else
+            g_free ( name );
 
-    if ( !gsb_data_report_get_amount_comparison_list (current_report_number))
-    {
-	gtk_widget_destroy (gsb_data_report_amount_comparison_get_button_link (amount_comparison_number));
-	gsb_data_report_amount_comparison_set_button_link ( amount_comparison_number,
-							    NULL );
+        list_tmp = list_tmp -> next;
     }
 
-    /*   par défaut, le bouton bouton_lien_1_2 est sur stop */
+    /* on libère la mémoire utilisée par liste_nom_types */
+    g_slist_foreach ( liste_nom_types, ( GFunc ) g_free, NULL );
+    g_slist_free ( liste_nom_types );
 
-    gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_link_first_to_second_part (amount_comparison_number)),
-				  3 );
-    gsb_data_report_amount_comparison_set_link_first_to_second_part ( amount_comparison_number,
-								      3 );
-    gtk_widget_set_sensitive ( gsb_data_report_amount_comparison_get_hbox_second_part (amount_comparison_number),
-			       FALSE );
+    /* return */
+    return GTK_TREE_MODEL ( list_store );
+}
 
-    /* on met la structure dans la liste à la position demandée */
 
-    gsb_data_report_set_amount_comparison_list ( current_report_number,
-						 g_slist_insert ( gsb_data_report_get_amount_comparison_list (current_report_number),
-								  GINT_TO_POINTER (amount_comparison_number),
-								  position ));
+/*ONGLET_DIVERS*/
+/**
+ * Initialise les informations de l'onglet divers
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_divers ( gint report_number )
+{
+    gint index;
 
+    index = gsb_data_report_get_show_m ( report_number );
+    etats_config_ui_buttons_radio_set_active_index ( "radiobutton_marked_all", index );
 
-    /* on met la row à sa place dans la liste */
+    etats_config_ui_toggle_button_set_actif ( "checkbutton_marked_P",
+                        gsb_data_report_get_show_p ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "checkbutton_marked_R",
+                        gsb_data_report_get_show_r ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "checkbutton_marked_T",
+                        gsb_data_report_get_show_t ( report_number ) );
 
-    gtk_box_reorder_child ( GTK_BOX ( liste_montants_etat ),
-			    gsb_data_report_amount_comparison_get_hbox_line (amount_comparison_number),
-			    position );
+    etats_config_ui_toggle_button_set_actif ( "bouton_pas_detailler_ventilation",
+                        gsb_data_report_get_not_detail_split ( report_number ) );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-/* crée la hbox de la row et la renvoie */
-/* remplie en même temps les widget de la struct envoyée en argument, sauf hbox_ligne */
-/******************************************************************************/
-GtkWidget *cree_ligne_comparaison_montant ( gint amount_comparison_number )
+
+/**
+ * Récupère les informations de l'onglet divers
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_divers ( gint report_number )
 {
-    GtkWidget *hbox;
-    GtkWidget *label;
-    GtkWidget *bouton;
-    GtkWidget *widget;
-    GtkWidget *widget_1;
+    gint index;
 
-    /*   on laisse les infos vides, on met juste les boutons et les labels */
+    index = etats_config_ui_buttons_radio_get_active_index ( "radiobutton_marked_all" );
+    gsb_data_report_set_show_m ( report_number, index );
 
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
+    gsb_data_report_set_show_p ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "checkbutton_marked_P" ) );
+    gsb_data_report_set_show_r ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "checkbutton_marked_R" ) );
+    gsb_data_report_set_show_t ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "checkbutton_marked_T" ) );
 
-    widget = cree_bouton_lien_lignes_comparaison ();
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 widget,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gsb_data_report_amount_comparison_set_button_link ( amount_comparison_number,
-							widget );
+    gsb_data_report_set_not_detail_split ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_pas_detailler_ventilation" ) );
+}
 
-    label = gtk_label_new ( _("Transactions with an amount of") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    widget = cree_bouton_comparateur_montant (amount_comparison_number);
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 widget,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gsb_data_report_amount_comparison_set_button_first_comparison ( amount_comparison_number,
-								    widget );
-
-    label = gtk_label_new ( _("to"));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    widget = gtk_entry_new ();
-    gtk_widget_set_size_request ( widget,
-			   50,
-			   -1 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 widget,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( widget );
-    gsb_data_report_amount_comparison_set_entry_first_amount ( amount_comparison_number,
-							       widget);
-
-    /* la fonction cree_bouton_lien va se servir de comp_montants -> hbox_partie_2 */
-    /* il faut donc créer celle ci avant l'appel de la fonction */
-    /* the hbox is created in widget_1 and is used later */
-
-    widget_1 = gtk_hbox_new ( FALSE,
-			      5 );
-
-    /* on crée alors le bouton de lien */
-
-    widget = cree_bouton_lien ( widget_1 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 widget,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gsb_data_report_amount_comparison_set_button_link_first_to_second_part ( amount_comparison_number,
-									     widget);
-
-    /* on ajoute la hbox2 */
-
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 widget_1,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( widget_1 );
-    gsb_data_report_amount_comparison_set_hbox_second_part ( amount_comparison_number,
-							     widget_1);
 
-    /* on peut maintenant ajouter dans comp_montants -> hbox_partie_2 */
+/*ONGLET_DATA_GROUPING*/
+/**
+ * Initialise les informations de l'onglet groupement des données
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_data_grouping ( gint report_number )
+{
+    etats_config_ui_toggle_button_set_actif ( "bouton_regroupe_ope_compte_etat",
+                        gsb_data_report_get_account_group_reports ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_utilise_tiers_etat",
+                        gsb_data_report_get_payee_used ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_group_by_categ",
+                        gsb_data_report_get_category_used ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_utilise_ib_etat",
+                        gsb_data_report_get_budget_used ( report_number ) );
 
-    widget = cree_bouton_comparateur_montant ( amount_comparison_number );
-    gtk_box_pack_start ( GTK_BOX ( widget_1 ),
-			 widget,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gsb_data_report_amount_comparison_set_button_second_comparison ( amount_comparison_number,
-								     widget);
-
-    label = gtk_label_new ( _("to"));
-    gtk_box_pack_start ( GTK_BOX ( widget_1 ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    widget = gtk_entry_new ();
-    gtk_widget_set_size_request ( widget,
-			   50,
-			   -1 );
-    gtk_box_pack_start ( GTK_BOX ( widget_1 ),
-			 widget,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( widget );
-    gsb_data_report_amount_comparison_set_entry_second_amount ( amount_comparison_number,
-								widget);
-
-    /* on met les bouton ajouter et supprimer */
-
-    bouton = gtk_button_new_with_label ( _("Add"));
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT (bouton),
-			       "clicked",
-			       G_CALLBACK (ajoute_ligne_liste_comparaisons_montants_etat),
-			       GINT_TO_POINTER (amount_comparison_number));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Remove"));
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT (bouton),
-			       "clicked",
-			       G_CALLBACK (retire_ligne_liste_comparaisons_montants_etat),
-			       GINT_TO_POINTER (amount_comparison_number));
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    return ( hbox );
+    etats_config_onglet_data_grouping_update_model ( report_number );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-/* cette fonction crée un option_menu avec et/ou/sauf */
-/******************************************************************************/
-GtkWidget *cree_bouton_lien_lignes_comparaison ( void )
-{
-    GtkWidget *bouton;
-    GtkWidget *menu;
-    GtkWidget *menu_item;
-
-    bouton = gtk_option_menu_new ();
-    gtk_widget_show ( bouton );
-
-    menu = gtk_menu_new ();
-
-    menu_item = gtk_menu_item_new_with_label ( _("and"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_lien",
-			  GINT_TO_POINTER ( 0 ));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("or"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_lien",
-			  GINT_TO_POINTER ( 1 ));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("except"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_lien",
-			  GINT_TO_POINTER ( 2 ));
-    gtk_widget_show ( menu_item );
-
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton ),
-			       menu );
-    gtk_widget_show ( menu );
-
-    return ( bouton );
-}
-/******************************************************************************/
 
-/******************************************************************************/
-/* cette fonction crée un option_menu avec =,<,<=,>,>=, nul, non nul, positif, nég */
-/******************************************************************************/
-GtkWidget *cree_bouton_comparateur_montant ( gint amount_comparison_number )
-{
-    GtkWidget *bouton;
-    GtkWidget *menu;
-    GtkWidget *menu_item;
-
-    bouton = gtk_option_menu_new ();
-    gtk_widget_show ( bouton );
-
-    menu = gtk_menu_new ();
-
-    menu_item = gtk_menu_item_new_with_label ( _("equal"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 0 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("less than"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 1 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("less than or equal"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 2 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("greater than"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 3 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("greater than or equal"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 4 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("different from"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 5 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("null"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 6 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("not null"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 7 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("positive"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 8 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("negative"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 9 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_montant ),
-		       GINT_TO_POINTER (amount_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton ),
-			       menu );
-    gtk_widget_show ( menu );
-
-    return ( bouton );
-}
-/******************************************************************************/
-
-/******************************************************************************/
-/* cette fonction rend sensitive ou non l'entrée après le label après l'option menu du menu_item en argument */
-/* donc si on choisit nul, non nul, pos ou nég, on grise l'entrée */
-/******************************************************************************/
-void change_comparaison_montant ( GtkWidget *menu_item,
-				  gint amount_comparison_number )
+/**
+ * Récupère les informations de l'onglet groupement des données
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_data_grouping ( gint report_number )
 {
-    gint sensitif;
+    gsb_data_report_set_account_group_reports ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_regroupe_ope_compte_etat" ) );
+    gsb_data_report_set_payee_used ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_utilise_tiers_etat" ) );
+    gsb_data_report_set_category_used ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_group_by_categ" ) );
+    gsb_data_report_set_budget_used ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_utilise_ib_etat" ) );
 
-    switch ( GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( menu_item ),
-						     "no_comparateur" )))
-    {
-	case 6:
-	case 7:
-	case 8:
-	case 9:
+    /* on récupère les données servant au tri des données pour l'affichage */
+    gsb_data_report_free_sorting_type_list ( report_number );
+    gsb_data_report_set_sorting_type_list ( report_number,
+                        etats_config_onglet_data_grouping_get_list ( report_number ) );
+}
 
-	    sensitif = 0;
-	    break;
 
-	default:
+/**
+ * Update le modèle avec les données sauvegardées
+ *
+ * \param report_number
+ *
+ * \return TRUE
+ */
+gboolean etats_config_onglet_data_grouping_update_model ( gint report_number )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GSList *tmp_list;
+    gint i = 0;
 
-	    sensitif = 1;
-    }
+    tree_view = etats_config_ui_widget_get_widget_by_name ( "treeview_data_grouping", NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
-    if ( gtk_menu_get_attach_widget ( GTK_MENU ( menu_item -> parent ))
-	 ==
-	 gsb_data_report_amount_comparison_get_button_first_comparison (amount_comparison_number))
-	gtk_widget_set_sensitive ( gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number),
-				   sensitif );
-    else
-	gtk_widget_set_sensitive ( gsb_data_report_amount_comparison_get_entry_second_amount (amount_comparison_number),
-				   sensitif );
-}
-/******************************************************************************/
+    /* on reset le model */
+    gtk_list_store_clear ( GTK_LIST_STORE ( model ) );
 
-/******************************************************************************/
-/* cette fonction crée un option_menu avec =,<,<=,>,>= */
-/******************************************************************************/
-GtkWidget *cree_bouton_comparateur_texte ( gint text_comparison_number )
-{
-    GtkWidget *bouton;
-    GtkWidget *menu;
-    GtkWidget *menu_item;
-
-    bouton = gtk_option_menu_new ();
-    gtk_widget_show ( bouton );
-
-    menu = gtk_menu_new ();
-
-    menu_item = gtk_menu_item_new_with_label ( _("equal"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 0 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_texte ),
-		       GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("less than"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 1 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_texte ),
-		       GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("less than or equal"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 2 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_texte ),
-		       GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("greater than"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 3 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_texte ),
-		       GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("greater than or equal"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 4 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_texte ),
-		       GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("different from"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 5 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_texte ),
-		       GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("the biggest"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_comparateur",
-			  GINT_TO_POINTER ( 6 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-		       "activate",
-		       G_CALLBACK ( change_comparaison_texte ),
-		       GINT_TO_POINTER (text_comparison_number));
-    gtk_widget_show ( menu_item );
-
-
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton ),
-			       menu );
-    gtk_widget_show ( menu );
-
-    return ( bouton );
-}
-/******************************************************************************/
-
-/******************************************************************************/
-/* cette fonction rend sensitive ou non l'entrée après le label après l'option menu du menu_item en argument */
-/* donc si on choisit nul, non nul, pos ou nég, on grise l'entrée */
-/******************************************************************************/
-void change_comparaison_texte ( GtkWidget *menu_item,
-				gint text_comparison_number )
-{
-    gint sensitif;
+    /* on remplit la liste des données */
+    tmp_list = gsb_data_report_get_sorting_type_list ( report_number );
 
-    if ( GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( menu_item ),
-						 "no_comparateur" )) == 6 )
-	sensitif = 0;
-    else
-	sensitif = 1;
+    while ( tmp_list )
+    {
+        GtkTreeIter iter;
+        gchar *string = NULL;
+        gint type_data;
 
+        type_data = GPOINTER_TO_INT ( tmp_list->data );
 
-    if ( gtk_menu_get_attach_widget ( GTK_MENU ( menu_item -> parent )) ==  gsb_data_report_text_comparison_get_button_first_comparison (text_comparison_number))
-	gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_entry_first_amount (text_comparison_number),
-				   sensitif );
-    else
-	gtk_widget_set_sensitive ( gsb_data_report_text_comparison_get_entry_second_amount (text_comparison_number),
-				   sensitif );
-}
-/******************************************************************************/
+        string = etats_config_onglet_data_grouping_get_string ( type_data, i );
+        if ( !string )
+        {
+            tmp_list = tmp_list->next;
+            continue;
+        }
 
-/******************************************************************************/
-/* cette fonction crée un option_menu avec et/ou/aucun */
-/******************************************************************************/
+        gtk_list_store_append ( GTK_LIST_STORE ( model ), &iter );
+        gtk_list_store_set ( GTK_LIST_STORE ( model ), &iter, 0, string, 1, i, 2, type_data, -1 );
 
-GtkWidget *cree_bouton_lien ( GtkWidget *hbox )
-{
-    GtkWidget *bouton;
-    GtkWidget *menu;
-    GtkWidget *menu_item;
-
-    bouton = gtk_option_menu_new ();
-    gtk_widget_show ( bouton );
-
-    menu = gtk_menu_new ();
-
-    menu_item = gtk_menu_item_new_with_label ( _("and"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_lien",
-			  GINT_TO_POINTER ( 0 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT ( hbox ));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("or"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_lien",
-			  GINT_TO_POINTER ( 1 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT ( hbox ));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("except"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_lien",
-			  GINT_TO_POINTER ( 2 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( sensitive_widget ),
-			 G_OBJECT ( hbox ));
-    gtk_widget_show ( menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("stop"));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_lien",
-			  GINT_TO_POINTER ( 3 ));
-    g_signal_connect ( G_OBJECT ( menu_item ),
-			 "activate",
-			 G_CALLBACK ( desensitive_widget ),
-			 G_OBJECT ( hbox ));
-    gtk_widget_show ( menu_item );
-
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton ),
-			       menu );
-    gtk_widget_show ( menu );
-
-    gtk_option_menu_set_history ( GTK_OPTION_MENU ( bouton ),
-				  3 );
-    return ( bouton );
-}
-/******************************************************************************/
+        g_free ( string );
 
+        i++;
+        tmp_list = tmp_list->next;
+    }
 
+    /* return */
+    return TRUE;
+}
 
-/******************************************************************************/
-void retire_ligne_liste_comparaisons_montants_etat ( gint last_amount_comparison_number )
+/**
+ * retourne une chaine de caractère formatée en fonction du type de donnée
+ * et de la position dans la liste
+ *
+ * \param type_data     type de donnée : 1 Categ, 3 IB, 5 Account, 6 Payee.
+ * \param pos           numéro de ligne dans le modèle
+ *
+ * \return NULL or a formatted string
+ */
+gchar *etats_config_onglet_data_grouping_get_string ( gint type_data,
+                        gint pos )
 {
-     gint current_report_number;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    gchar *string = NULL;
+    gchar *text = NULL;
 
-    /* il faut qu'il y ai plus d'une row affichée */
+    switch ( type_data )
+    {
+        case 1:
+        text = g_strdup ( _("Category") );
+        break;
 
-    if ( g_slist_length ( gsb_data_report_get_amount_comparison_list (current_report_number)) < 2 )
-	return;
+        case 3:
+        text = g_strdup ( _("Budgetary line") );
+        break;
 
-    /* on commence par supprimer la row dans la liste */
+        case 5:
+        text = g_strdup ( _("Account") );
+        break;
 
-    gtk_widget_destroy ( gsb_data_report_amount_comparison_get_hbox_line (last_amount_comparison_number));
+        case 6:
+        text = g_strdup ( _("Payee") );
+        break;
+    }
 
-    /* si la structure qu'on retire est la 1ère, on vire le widget de lient */
+    if ( !text )
+        return NULL;
 
-    if ( !g_slist_index ( gsb_data_report_get_amount_comparison_list (current_report_number),
-			  GINT_TO_POINTER (last_amount_comparison_number)))
+    if ( pos <= 0 )
+        string = text;
+    else if ( pos == 1 )
     {
-	gint amount_comparison_number;
-
-	amount_comparison_number = GPOINTER_TO_INT (gsb_data_report_get_amount_comparison_list (current_report_number)-> next -> data);
-	gtk_widget_destroy ( gsb_data_report_amount_comparison_get_button_link (amount_comparison_number));
-	gsb_data_report_amount_comparison_set_button_link ( amount_comparison_number,
-							    NULL );
+        string = g_strconcat ( "\t", text, NULL );
+        g_free ( text );
+    }
+    else if ( pos == 2 )
+    {
+        string = g_strconcat ( "\t\t", text, NULL );
+        g_free ( text );
+    }
+    else if ( pos == 3 )
+    {
+        string = g_strconcat ( "\t\t\t", text, NULL );
+        g_free ( text );
     }
 
-    /* et on retire la struct de la sliste */
-
-    gsb_data_report_set_amount_comparison_list ( current_report_number,
-						 g_slist_remove ( gsb_data_report_get_amount_comparison_list (current_report_number),
-								  GINT_TO_POINTER (last_amount_comparison_number)));
+    return string;
 }
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *onglet_etat_divers ( void )
+/**
+ * return la liste des données par ordre de tri
+ *
+ * \param report_number
+ *
+ * \return a GSList
+ * */
+GSList *etats_config_onglet_data_grouping_get_list ( gint report_number )
 {
-    GtkWidget *vbox_onglet;
-    GtkWidget *frame;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Miscellaneous"), "generalities.png" );
-    gtk_widget_show ( vbox_onglet );
-
-
-
-    /* on peut sélectionner les opé R ou non R */
-    frame = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Reconciled transactions") );
-
-    bouton_opes_r_et_non_r_etat = gtk_radio_button_new_with_label ( NULL,
-								    _("Select all transactions") );
-    gtk_box_pack_start ( GTK_BOX ( frame ),
-			 bouton_opes_r_et_non_r_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_opes_r_et_non_r_etat );
-
-    bouton_opes_non_r_etat = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_opes_r_et_non_r_etat )),
-							       _("Select unreconciled transactions") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_opes_non_r_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 9 ));
-    gtk_box_pack_start ( GTK_BOX ( frame ),
-			 bouton_opes_non_r_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_opes_non_r_etat );
-
-    bouton_opes_r_etat = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_opes_r_et_non_r_etat )),
-							   _("Select reconciled transactions") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_opes_r_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 9 ));
-    gtk_box_pack_start ( GTK_BOX ( frame ),
-			 bouton_opes_r_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_opes_r_etat );
-
-    frame = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Split of transactions detail") );
-
-    bouton_pas_detailler_ventilation = gtk_check_button_new_with_label ( _("Do not detail split of transactions") );
-    g_signal_connect_swapped ( G_OBJECT ( bouton_pas_detailler_ventilation ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 9 ));
-    gtk_box_pack_start ( GTK_BOX ( frame ),
-			 bouton_pas_detailler_ventilation,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_pas_detailler_ventilation );
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    GSList *tmp_list = NULL;
 
-/******************************************************************************/
-GtkWidget *page_data_grouping ( void )
-{
-    GtkWidget *hbox;
-    GtkWidget *scrolled_window;
-    GtkWidget *vbox;
-    GtkWidget *fleche;
-    GtkWidget *vbox_onglet;
-    GtkWidget * paddingbox;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Data grouping"), "organization.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    /* choix de ce qu'on utilise dans le classement */
-
-    paddingbox = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Group transactions") );
-
-    bouton_regroupe_ope_compte_etat = gtk_check_button_new_with_label ( _("Group transactions by account") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_regroupe_ope_compte_etat, FALSE, FALSE, 0 );
-
-    bouton_utilise_tiers_etat = gtk_check_button_new_with_label ( _("Group transactions by payee") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_utilise_tiers_etat, FALSE, FALSE, 0 );
-
-    button_group_by_categ = gtk_check_button_new_with_label ( _("Group transactions by category") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button_group_by_categ, FALSE, FALSE, 0 );
-
-    bouton_utilise_ib_etat = gtk_check_button_new_with_label ( _("Group transactions by budgetary line") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_utilise_ib_etat, FALSE, FALSE, 0 );
-
-    /* choix du type de classement */
-
-    paddingbox = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Group level organisation") );
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_container_set_border_width ( GTK_CONTAINER ( hbox ), 5 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 hbox,
-			 TRUE,
-			 TRUE,
-			 0 );
-
-    gtk_widget_show ( hbox );
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-
-    liste_type_classement_etat = gtk_ctree_new ( 1, 0 );
-    gtk_clist_set_column_auto_resize ( GTK_CLIST ( liste_type_classement_etat ),
-				       0,
-				       TRUE );
-    gtk_ctree_set_line_style ( GTK_CTREE ( liste_type_classement_etat ),
-			       GTK_CTREE_LINES_NONE );
-    gtk_ctree_set_expander_style ( GTK_CTREE ( liste_type_classement_etat ),
-				   GTK_CTREE_EXPANDER_NONE );
-
-    g_signal_connect ( G_OBJECT ( liste_type_classement_etat ),
-			 "button_press_event",
-			 G_CALLBACK ( click_liste_etat ),
-			 GINT_TO_POINTER (1) );
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			liste_type_classement_etat );
-    gtk_widget_show ( liste_type_classement_etat );
-
-    /* on place ici les flèches sur le côté de la liste */
-
-    vbox = gtk_vbutton_box_new ();
-
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 vbox,
-			 FALSE,
-			 FALSE,
-			 0);
-
-    fleche = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
-    gtk_button_set_relief ( GTK_BUTTON ( fleche ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT ( fleche ),
-			 "clicked",
-			 G_CALLBACK ( click_haut_classement_etat ),
-			 NULL );
-    gtk_container_add ( GTK_CONTAINER ( vbox ),
-			fleche  );
-
-    fleche = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
-    gtk_button_set_relief ( GTK_BUTTON ( fleche ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect ( G_OBJECT ( fleche ),
-			 "clicked",
-			 G_CALLBACK ( click_bas_classement_etat ),
-			 NULL);
-    gtk_container_add ( GTK_CONTAINER ( vbox ),
-			fleche  );
-    gtk_widget_show_all ( vbox );
+    tree_view = etats_config_ui_widget_get_widget_by_name ( "treeview_data_grouping", NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
-    return vbox_onglet;
-}
+    if ( gtk_tree_model_get_iter_first ( model, &iter ) )
+    {
+        do
+        {
+            gint type_data;
 
+            gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, 2, &type_data, -1 );
+            tmp_list = g_slist_append ( tmp_list, GINT_TO_POINTER ( type_data ) );
 
-GtkWidget *page_data_separation ( void )
-{
-    GtkWidget *label;
-    GtkWidget *vbox_onglet;
-    GtkWidget *menu;
-    GtkWidget *menu_item;
-	GtkWidget *table;
-    GtkWidget * paddingbox;
-    gint i;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Data separation"), "organization.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    /* choix de ce qu'on utilise dans le classement */
-    paddingbox = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Data separation") );
-
-    /* on permet la séparation des revenus et des dépenses */
-    bouton_separer_revenus_depenses = gtk_check_button_new_with_label ( _("Split incomes and outgoings") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_separer_revenus_depenses, FALSE, FALSE, 0 );
-
-    /* on permet la séparation par exercice */
-    bouton_separe_exo_etat = gtk_check_button_new_with_label ( _("Split by financial year") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_separe_exo_etat, FALSE, FALSE, 0 );
-    g_signal_connect ( G_OBJECT ( radio_button_utilise_exo ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_separe_exo_etat );
-
-    bouton_separe_plages_etat = gtk_check_button_new_with_label ( _("Split by period") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_separe_plages_etat, FALSE, FALSE, 0 );
-
-    /* on permet ensuite la séparation des résultats par période */
-    paddingbox = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Separation by period") );
-
-    table = gtk_table_new ( 2, 2, FALSE );
-    gtk_table_set_col_spacings ( GTK_TABLE ( table ), 5 );
-    gtk_table_set_row_spacings ( GTK_TABLE ( table ), 5 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), table, TRUE, TRUE, 5 );
-
-    label = gtk_label_new ( _("Separation by time period: ") );
-    gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
-    gtk_label_set_justify ( GTK_LABEL (label), GTK_JUSTIFY_LEFT );
-    gtk_table_attach ( GTK_TABLE ( table ), label,
-		       0, 1, 0, 1, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
-
-    /* add split button by day, week... */
-    bouton_type_separe_plages_etat = gtk_option_menu_new ();
-    g_signal_connect ( G_OBJECT (bouton_separe_plages_etat),
-		       "toggled",
-		       G_CALLBACK (sens_desensitive_pointeur),
-		       bouton_type_separe_plages_etat );
-
-    gtk_table_attach ( GTK_TABLE ( table ), bouton_type_separe_plages_etat,
-		       1, 2, 0, 1, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
-
-    menu = gtk_menu_new ();
-    menu_item = gtk_menu_item_new_with_label ( _("Day") );
-    g_object_set_data ( G_OBJECT ( menu_item ), "type", NULL );
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ), menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("Week") );
-    g_object_set_data ( G_OBJECT ( menu_item ), "type", GINT_TO_POINTER (1) );
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ), menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("Month") );
-    g_object_set_data ( G_OBJECT ( menu_item ), "type", GINT_TO_POINTER (2) );
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ), menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("Year") );
-    g_object_set_data ( G_OBJECT ( menu_item ), "type", GINT_TO_POINTER (3));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ), menu_item );
-
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton_type_separe_plages_etat ), menu );
-
-    /* add beginning day of the week */
-    label = gtk_label_new ( _("Beginning of week: ") );
-    gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
-    gtk_label_set_justify ( GTK_LABEL (label), GTK_JUSTIFY_LEFT );
-    gtk_table_attach ( GTK_TABLE ( table ), label,
-		       0, 1, 1, 2, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
-
-    bouton_debut_semaine = gtk_option_menu_new ();
-    g_signal_connect ( G_OBJECT (bouton_separe_plages_etat),
-		       "toggled",
-		       G_CALLBACK (sens_desensitive_pointeur),
-		       bouton_debut_semaine );
-
-    gtk_table_attach ( GTK_TABLE ( table ), bouton_debut_semaine,
-		       1, 2, 1, 2, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
-
-    menu = gtk_menu_new ();
-
-    i = 0;
-
-    while ( jours_semaine[i] )
-    {
-	menu_item = gtk_menu_item_new_with_label ( _(jours_semaine[i]) );
-	g_object_set_data ( G_OBJECT ( menu_item ), "day", GINT_TO_POINTER (i));
-	gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ), menu_item );
-	i++;
+            /* on ajoute les sous catégories ici */
+            if ( type_data == 1 )
+            {
+                tmp_list = g_slist_append ( tmp_list, GINT_TO_POINTER ( 2 ) );
+            }
+            /* et les sous imputations ici */
+            else if ( type_data == 3 )
+            {
+                tmp_list = g_slist_append ( tmp_list, GINT_TO_POINTER ( 4 ) );
+            }
+        }
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
+
+        return tmp_list;
     }
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton_debut_semaine ), menu );
-
-    /* on connecte le signal "changed" au bouton bouton_type_separe_plages_etat
-     * pour rendre insensible le choix du jour de la semaine pour les choix
-     * autres que la semaine. On le met ici pour que l'initialisation se fasse
-     * proprement */
-    g_signal_connect ( G_OBJECT ( bouton_type_separe_plages_etat ), 
-                  "changed",
-		          G_CALLBACK ( etat_option_menu_changed ), 
-                  bouton_debut_semaine );
-
-    return ( vbox_onglet );
+
+    /* return */
+    return NULL;
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void click_haut_classement_etat ( void )
+/**
+ * déplace un item suite à un drag and drop dans le tree_view
+ *
+ * \param src_pos           position avant
+ * \param src_type_data     type de donnée
+ * \param dst_pos           position après drag and drop
+ *
+ * \return
+ * */
+void etats_config_onglet_data_grouping_move_in_list ( gint src_pos,
+                        gint src_type_data,
+                        gint dst_pos )
 {
-    GtkCTreeNode *node_parent;
-    GtkCTreeNode *node;
-    GtkCTreeNode *node_enfant;
-    GtkCTreeNode *nouveau_parent;
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GSList *tmp_list;
+    gint report_number;
+    gint i = 0;
 
-    node = GTK_CLIST ( liste_type_classement_etat )->selection -> data;
+    report_number = gsb_gui_navigation_get_current_report ( );
+    tmp_list = g_slist_copy ( gsb_data_report_get_sorting_type_list ( report_number ) );
 
-    /*   si on est au niveau 1, peut pas plus haut */
+    /* on supprime les sous categ et les sous IB */
+    tmp_list = g_slist_remove ( tmp_list, GINT_TO_POINTER ( 4 ) );
+    tmp_list = g_slist_remove ( tmp_list, GINT_TO_POINTER ( 2 ) );
 
-    if ( GTK_CTREE_ROW ( node ) -> level == 1 )
-	return;
+    /* on supprime la donnée à la position initiale */
+    tmp_list = g_slist_remove ( tmp_list, GINT_TO_POINTER ( src_type_data ) );
 
-    node_parent = GTK_CTREE_ROW ( GTK_CLIST ( liste_type_classement_etat )->selection -> data )->parent;
-    node_enfant = GTK_CTREE_ROW ( GTK_CLIST ( liste_type_classement_etat )->selection -> data )->children;
+    /* on insère la donnée à la position finale */
+    tmp_list = g_slist_insert ( tmp_list, GINT_TO_POINTER ( src_type_data ), dst_pos );
 
-    nouveau_parent = GTK_CTREE_ROW ( node_parent )->parent;
+    tree_view = etats_config_ui_widget_get_widget_by_name ( "treeview_data_grouping", NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
-    /* on remonte le node */
+    /* on reset le model */
+    gtk_list_store_clear ( GTK_LIST_STORE ( model ) );
 
-    gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-		     node,
-		     nouveau_parent,
-		     NULL );
+    while ( tmp_list )
+    {
+        GtkTreeIter iter;
+        gchar *string = NULL;
+        gint type_data;
+        gpointer ptr;
 
-    /* on descend celui du dessus */
+        ptr = tmp_list->data;
+        type_data = GPOINTER_TO_INT ( ptr );
 
-    gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-		     node_parent,
-		     node,
-		     NULL );
+        string = etats_config_onglet_data_grouping_get_string ( type_data, i );
 
-    /* on attache l'enfant à son nouveau parent */
+        gtk_list_store_append ( GTK_LIST_STORE ( model ), &iter );
+        gtk_list_store_set ( GTK_LIST_STORE ( model ), &iter, 0, string, 1, i, 2, type_data, -1 );
 
-    if ( node_enfant )
-	gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-			 node_enfant,
-			 node_parent,
-			 NULL );
+        g_free ( string );
 
-    gtk_ctree_expand_recursive ( GTK_CTREE ( liste_type_classement_etat ),
-				 node );
+        i++;
+        tmp_list = tmp_list->next;
+    }
 }
-/******************************************************************************/
-
-/******************************************************************************/
-void click_bas_classement_etat ( void )
-{
-    GtkCTreeNode *node_parent;
-    GtkCTreeNode *node;
-    GtkCTreeNode *node_enfant;
-    GtkCTreeNode *node_enfant_enfant;
 
-    node = GTK_CLIST ( liste_type_classement_etat )->selection -> data;
 
-    /*   si on est au niveau 4, peut pas plus bas */
+/*ONGLET_DATA_SEPARATION*/
+/**
+ * Initialise les informations de l'onglet separation des données
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_data_separation ( gint report_number )
+{
+    GtkWidget *combo_1;
+    GtkWidget *combo_2;
 
-    if ( GTK_CTREE_ROW ( node ) -> level == 4 )
-	return;
+    etats_config_ui_toggle_button_set_actif ( "bouton_separer_revenus_depenses",
+                        gsb_data_report_get_split_credit_debit ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_separe_exo_etat",
+                        gsb_data_report_get_financial_year_split ( report_number ) );
 
-    node_parent = GTK_CTREE_ROW ( GTK_CLIST ( liste_type_classement_etat )->selection -> data )->parent;
-    node_enfant = GTK_CTREE_ROW ( GTK_CLIST ( liste_type_classement_etat )->selection -> data )->children;
+    /* on initialise le combo bouton_type_separe_plages_etat */
+    combo_1 = etats_config_ui_widget_get_widget_by_name ( "bouton_type_separe_plages_etat", NULL );
+    gtk_combo_box_set_active ( GTK_COMBO_BOX ( combo_1 ),
+                        gsb_data_report_get_period_split_type ( report_number ) );
 
-    node_enfant_enfant = GTK_CTREE_ROW ( node_enfant )->children;
+    /* on initialise le combo bouton_debut_semaine */
+    combo_2 = etats_config_ui_widget_get_widget_by_name ( "bouton_debut_semaine", NULL );
+    gtk_combo_box_set_active ( GTK_COMBO_BOX ( combo_2 ),
+                        gsb_data_report_get_period_split_day ( report_number ) );
 
-    /* on remonte le node enfant */
+    if ( gsb_data_report_get_period_split ( report_number ) )
+    {
+        GtkWidget *button;
 
-    gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-		     node_enfant,
-		     node_parent,
-		     NULL );
+        button = etats_config_ui_widget_get_widget_by_name ( "bouton_separe_plages_etat", NULL );
+        etats_config_ui_toggle_button_set_actif ( "bouton_separe_plages_etat", TRUE );
+        sens_desensitive_pointeur ( button,
+                        etats_config_ui_widget_get_widget_by_name ( "paddingbox_data_separation2", NULL ) );
 
-    /* on descend le node */
+        if ( gtk_combo_box_get_active ( GTK_COMBO_BOX ( combo_1 ) ) == 1 )
+            gtk_widget_set_sensitive ( combo_2, TRUE );
+    }
+}
 
-    gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-		     node,
-		     node_enfant,
-		     NULL );
 
-    /* on attache l'enfant de l'enfant à son nouveau parent */
+/**
+ * Récupère les informations de l'onglet separation des données
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_data_separation ( gint report_number )
+{
+    gsb_data_report_set_split_credit_debit ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_separer_revenus_depenses" ) );
+    gsb_data_report_set_financial_year_split ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_separe_exo_etat" ) );
+    gsb_data_report_set_period_split ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_separe_plages_etat" ) );
 
-    if ( node_enfant_enfant )
-	gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-			 node_enfant_enfant,
-			 node,
-			 NULL );
+    /* récupère des index des GtkComboBox */
+    gsb_data_report_set_period_split_type ( report_number,
+                        gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                        etats_config_ui_widget_get_widget_by_name ( "bouton_type_separe_plages_etat", NULL ) ) ) );
 
-    gtk_ctree_expand_recursive ( GTK_CTREE ( liste_type_classement_etat ),
-				 node );
+    gsb_data_report_set_period_split_day ( report_number,
+                        gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                        etats_config_ui_widget_get_widget_by_name ( "bouton_debut_semaine", NULL ) ) ) );
 }
 
 
-
-GtkWidget *onglet_affichage_etat_generalites ( void )
+/**
+ * fonction de callback appellée quand on change le type de période
+ *
+ * \param combo         le GtkComboBox qui change
+ * \param widget        le widget qu'on rend sensible ou pas.
+ *
+ * \return
+ */
+void etats_config_onglet_data_separation_combo_changed ( GtkComboBox *combo,
+                        GtkWidget *widget )
 {
-    GtkWidget *label;
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Generalities"), "generalities.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    /* choix du name du rapport */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    label = gtk_label_new ( _("Report name: ") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    entree_nom_etat = gtk_entry_new ();
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 entree_nom_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( entree_nom_etat );
-
-
-    /* afficher ou non le nb d'opés avec les totaux */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    bouton_afficher_nb_opes = gtk_check_button_new_with_label ( 
-                        _("Display the number of transactions with the totals") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_afficher_nb_opes,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_nb_opes );
-
-    /* mise en place du bouton pour faire apparaitre l'état dans la liste des tiers */
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    bouton_inclure_dans_tiers = gtk_check_button_new_with_label ( _("Consider the payees of this report as a multiple payee.") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_inclure_dans_tiers,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_inclure_dans_tiers );
-
-    return ( vbox_onglet );
-}
+    gint report_number;
 
+    report_number = gsb_gui_navigation_get_current_report ( );
+    if ( gsb_data_report_get_period_split ( report_number ) )
+    {
+        if ( gtk_combo_box_get_active ( GTK_COMBO_BOX ( combo ) ) == 1 )
+            gtk_widget_set_sensitive ( widget, TRUE );
+        else
+            gtk_widget_set_sensitive ( widget, FALSE );
+    }
+}
 
 
+/*ONGLET_AFFICHAGE_GENERALITES*/
 /**
+ * Initialise les informations de l'onglet généraités
  *
+ * \param report_number
  *
- *
- *
+ * \return
  */
-GtkWidget *onglet_affichage_etat_operations ( void )
+void etats_config_initialise_onglet_affichage_generalites ( gint report_number )
 {
-    GtkWidget * table, * vbox_onglet, * menu, * menu_item, * paddingbox;
+    gtk_entry_set_text ( GTK_ENTRY ( etats_config_ui_widget_get_widget_by_name ( "entree_nom_etat", NULL ) ),
+                        gsb_data_report_get_report_name ( report_number ) );
 
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Transactions display"), "transdisplay.png" );
-    gtk_widget_show ( vbox_onglet );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_nb_opes",
+                        gsb_data_report_get_show_report_transaction_amount ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_inclure_dans_tiers",
+                        gsb_data_report_get_append_in_payee ( report_number ) );
+}
 
-    /* afficher ou non les opés */
 
-    bouton_afficher_opes = gtk_check_button_new_with_label ( _("Display transactions") );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), bouton_afficher_opes, FALSE, FALSE, 0 );
+/**
+ * Récupère les informations de l'onglet généralités
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_affichage_generalites ( gint report_number )
+{
+    const gchar *text;
 
-    vbox_show_transactions = gtk_vbox_new (FALSE, 0);
-    gtk_box_pack_start ( GTK_BOX (vbox_onglet),
-			 vbox_show_transactions,
-			 FALSE, FALSE, 0);
-    g_signal_connect ( G_OBJECT (bouton_afficher_opes),
-		       "toggled",
-		       G_CALLBACK (sens_desensitive_pointeur),
-		       vbox_show_transactions );
+    /* on récupère le nom de l'état */
+    text = gtk_entry_get_text ( GTK_ENTRY (
+                        etats_config_ui_widget_get_widget_by_name ( "entree_nom_etat", NULL ) ) );
 
-    /* demande les détails affichés dans les opérations */
-    paddingbox = new_paddingbox_with_title ( vbox_show_transactions, FALSE,
-                        _("Include following information") );
-    /* connection pour rendre sensitif la frame */
-    table = gtk_table_new ( 12, 3, FALSE );
-    gtk_box_pack_start ( GTK_BOX (paddingbox), table, FALSE, FALSE, 0 );
+    if ( strlen ( text )
+     &&
+     strcmp ( text, gsb_data_report_get_report_name ( report_number ) ) )
+    {
+        gsb_data_report_set_report_name ( report_number, text );
+    }
 
-    bouton_afficher_no_ope = gtk_check_button_new_with_label ( _("transaction number") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_no_ope, 0, 1, 0, 1 );
+    /* on récupère les autres informations */
+    gsb_data_report_set_show_report_transaction_amount ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_nb_opes" ) );
+    gsb_data_report_set_append_in_payee ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_inclure_dans_tiers" ) );
+}
 
-    bouton_afficher_date_opes = gtk_check_button_new_with_label ( _("date") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_date_opes, 1, 2, 0, 1 );
 
-    bouton_afficher_value_date_opes = gtk_check_button_new_with_label ( _("value date") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_value_date_opes, 2, 3, 0, 1 );
+/*ONGLET_AFFICHAGE_TITLES*/
+/**
+ * Initialise les informations de l'onglet titres
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_affichage_titres ( gint report_number )
+{
+    GtkWidget *button;
+    GtkWidget *widget;
 
-    bouton_afficher_tiers_opes = gtk_check_button_new_with_label ( _("payee") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_tiers_opes, 0, 1, 1, 2 );
+    /* données des comptes */
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_noms_comptes",
+                        gsb_data_report_get_account_show_name ( report_number ) );
 
-    bouton_afficher_categ_opes = gtk_check_button_new_with_label ( _("category") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_categ_opes, 1, 2, 1, 2 );
+    button = etats_config_ui_widget_get_widget_by_name ( "bouton_regroupe_ope_compte_etat", NULL );
 
-    bouton_afficher_sous_categ_opes = gtk_check_button_new_with_label ( _("sub-category") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_sous_categ_opes, 2, 3, 1, 2 );
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_affiche_sous_total_compte", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+                        gsb_data_report_get_account_show_amount ( report_number ) );
 
-    bouton_afficher_ib_opes = gtk_check_button_new_with_label ( _("budgetary line") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_ib_opes, 0, 1, 2, 3 );
+    /* données des tiers */
+    button = etats_config_ui_widget_get_widget_by_name ( "bouton_utilise_tiers_etat", NULL );
 
-    bouton_afficher_sous_ib_opes = gtk_check_button_new_with_label ( _("sub-budgetary line") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_sous_ib_opes, 1, 2, 2, 3 );
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_afficher_noms_tiers", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+                        gsb_data_report_get_payee_show_name ( report_number ) );
 
-    bouton_afficher_notes_opes = gtk_check_button_new_with_label ( _("notes") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_notes_opes, 2, 3, 2, 3 );
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_affiche_sous_total_tiers", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+                        gsb_data_report_get_payee_show_payee_amount ( report_number ) );
 
-    bouton_afficher_type_ope = gtk_check_button_new_with_label ( _("method of payment") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_type_ope, 0, 1, 3, 4 );
-
-    bouton_afficher_no_cheque = gtk_check_button_new_with_label ( _("cheque/transfer number") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_no_cheque, 1, 2, 3, 4 );
+    /* données des catégories */
+    button = etats_config_ui_widget_get_widget_by_name ( "bouton_group_by_categ", NULL );
 
-    bouton_afficher_pc_opes = gtk_check_button_new_with_label ( _("voucher") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_pc_opes, 2, 3, 3, 4 );
-
-    bouton_afficher_exo_opes = gtk_check_button_new_with_label ( _("financial year") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_exo_opes, 2, 3, 4, 5 );
-
-    bouton_afficher_infobd_opes = gtk_check_button_new_with_label ( _("bank reference") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_infobd_opes, 0, 1, 4, 5 );
-
-    bouton_afficher_no_rappr = gtk_check_button_new_with_label ( _("reconciliation reference") );
-    gtk_table_attach_defaults ( GTK_TABLE ( table ), bouton_afficher_no_rappr, 1, 2, 4, 5  );
-
-
-    /* on propose d'afficher le titre des colonnes */
-    paddingbox = new_paddingbox_with_title ( vbox_show_transactions, FALSE, _("Columns") );
-
-    bouton_afficher_titres_colonnes = gtk_check_button_new_with_label ( _("Display column titles") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_afficher_titres_colonnes, FALSE, FALSE, 0 );
-
-    bouton_titre_changement = gtk_radio_button_new_with_label ( NULL, _("every section") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_titre_changement, FALSE, FALSE, 0 );
-
-    bouton_titre_en_haut = gtk_radio_button_new_with_label ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( bouton_titre_changement )),
-							     _("at the top of the report") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_titre_en_haut, FALSE, FALSE, 0 );
-
-
-    /* mise en place du type de classement des opés */
-    paddingbox = new_paddingbox_with_title ( vbox_show_transactions, FALSE, _("Sort transactions by") );
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_afficher_noms_categ", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_category_show_name ( report_number ) );
 
-    bouton_choix_classement_ope_etat = gtk_option_menu_new ();
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_choix_classement_ope_etat, FALSE, FALSE, 0 );
-
-    menu = gtk_menu_new ();
-
-    menu_item = gtk_menu_item_new_with_label ( _("date"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 0 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("value date"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 1 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("transaction number"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 2 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("payee"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 3 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("category"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 4 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("budgetary line"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 5 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("note"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 6 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("method of payment"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 7 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("cheque/transfer number"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 8 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("voucher"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 9 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("bank reference"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 10 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    menu_item = gtk_menu_item_new_with_label ( _("reconciliation reference"));
-    g_object_set_data ( G_OBJECT ( menu_item ),
-			  "no_classement",
-			  GINT_TO_POINTER ( 11 ));
-    gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ),
-		      menu_item );
-
-    gtk_option_menu_set_menu ( GTK_OPTION_MENU ( bouton_choix_classement_ope_etat ),
-			       menu );
-
-
-    /* on propose de rendre clickable le détails des opérations */
-    paddingbox = new_paddingbox_with_title ( vbox_show_transactions, FALSE, _("Clickable transactions") );
-
-    bouton_rendre_ope_clickables = gtk_check_button_new_with_label ( _("Make transactions clickable"));
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), bouton_rendre_ope_clickables, FALSE, FALSE, 0 );
-
-
-    /* on met les connexions */
-    g_signal_connect ( G_OBJECT ( bouton_afficher_categ_opes ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_sous_categ_opes );
-    g_signal_connect ( G_OBJECT ( bouton_afficher_ib_opes ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_sous_ib_opes );
-    g_signal_connect ( G_OBJECT ( bouton_afficher_titres_colonnes ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_titre_changement );
-    g_signal_connect ( G_OBJECT ( bouton_afficher_titres_colonnes ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_titre_en_haut );
-
-    gtk_widget_show_all ( vbox_onglet );
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_affiche_sous_total_categ", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_category_show_category_amount ( report_number ) );
 
-/******************************************************************************/
-GtkWidget *onglet_affichage_etat_devises ( void )
-{
-    GtkWidget *label;
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Totals currencies"), "currencies.png" );
-    gtk_widget_show ( vbox_onglet );
-
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    label = gtk_label_new ( _("General totals currency: ") );
-    gtk_misc_set_alignment ( GTK_MISC ( label ),
-			     0,
-			     0.5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( label );
-
-    bouton_devise_general_etat = gsb_currency_make_combobox (FALSE);
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_devise_general_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_devise_general_etat );
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-
-    label = gtk_label_new ( _("Payees currency: ") );
-    gtk_misc_set_alignment ( GTK_MISC ( label ),
-			     0,
-			     0.5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( label );
-
-    bouton_devise_tiers_etat = gsb_currency_make_combobox (FALSE);
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_devise_tiers_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_devise_tiers_etat );
-
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    label = gtk_label_new ( _("Categories currency: ") );
-    gtk_misc_set_alignment ( GTK_MISC ( label ),
-			     0,
-			     0.5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( label );
-
-
-    bouton_devise_categ_etat = gsb_currency_make_combobox (FALSE);
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_devise_categ_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_devise_categ_etat );
-
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    label = gtk_label_new ( _("Budgetary lines currency: ") );
-    gtk_misc_set_alignment ( GTK_MISC ( label ),
-			     0,
-			     0.5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( label );
-
-    bouton_devise_ib_etat = gsb_currency_make_combobox (FALSE);
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_devise_ib_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_devise_ib_etat );
-
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    label = gtk_label_new ( _("Amount comparison currency: ") );
-    gtk_misc_set_alignment ( GTK_MISC ( label ),
-			     0,
-			     0.5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( label );
-
-    bouton_devise_montant_etat = gsb_currency_make_combobox (FALSE);
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 bouton_devise_montant_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_devise_montant_etat );
-
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_afficher_sous_categ", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_category_show_sub_category ( report_number ) );
 
-/******************************************************************************/
-GtkWidget *onglet_affichage_etat_divers ( void )
-{
-    GtkWidget *vbox_onglet;
-    GtkWidget *paddingbox;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Titles"), "title.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    /* mise en place de la paddingbox des comptes */
-    paddingbox = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Accounts") );
-
-    /* on permet d'afficher le name du compte */
-    bouton_afficher_noms_comptes = gtk_check_button_new_with_label ( _("Display account name") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_afficher_noms_comptes,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_noms_comptes );
-
-
-    /* on permet d'afficher un ss total lors de chgt de compte */
-    /* activé uniquement si on a regroupé les opés par compte */
-
-    bouton_affiche_sous_total_compte = gtk_check_button_new_with_label ( _("Display a sub-total for each account") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_affiche_sous_total_compte,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_affiche_sous_total_compte );
-
-    g_signal_connect ( G_OBJECT ( bouton_regroupe_ope_compte_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_affiche_sous_total_compte );
-
-    /* mise en place de la paddingbox des tiers */
-
-    paddingbox = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Payee") );
-
-    /* permet d'afficher le name du tiers, activé uniquement si on utilise les tiers */
-    bouton_afficher_noms_tiers = gtk_check_button_new_with_label ( _("Display payee's name") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_afficher_noms_tiers,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_noms_tiers );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_tiers_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_noms_tiers );
-
-    /* permet d'afficher un ss total lors de chgt de tiers */
-    /* activé uniquement si on utilise les tiers */
-
-    bouton_affiche_sous_total_tiers = gtk_check_button_new_with_label ( 
-                        _("Display a sub-total for each payee") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_affiche_sous_total_tiers,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_affiche_sous_total_tiers );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_tiers_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_affiche_sous_total_tiers );
-
-
-    /* mise en place de la paddingbox des catégories */
-    paddingbox = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Categories") );
-
-    /* affichage possible du name de la categ */
-    bouton_afficher_noms_categ = gtk_check_button_new_with_label ( _("Display the (sub)category's name") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_afficher_noms_categ,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_noms_categ );
-
-    g_signal_connect ( G_OBJECT ( button_group_by_categ ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_noms_categ );
-
-    /* permet d'afficher un sous total lors de chgt de categ */
-    /* activé uniquement si on utilise les categ */
-
-    bouton_affiche_sous_total_categ = gtk_check_button_new_with_label ( _("Display a sub-total for each category") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_affiche_sous_total_categ,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_affiche_sous_total_categ );
-
-    g_signal_connect ( G_OBJECT ( button_group_by_categ ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_affiche_sous_total_categ );
-
-    /* mise en place du bouton pour afficher les sous categ */
-
-    bouton_afficher_sous_categ = gtk_check_button_new_with_label ( _("Display sub-categories") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_afficher_sous_categ,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_sous_categ );
-
-    g_signal_connect ( G_OBJECT ( button_group_by_categ ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_sous_categ );
-
-
-    bouton_affiche_sous_total_sous_categ = gtk_check_button_new_with_label ( _("Display a sub-total for each sub-category") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_affiche_sous_total_sous_categ,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_affiche_sous_total_sous_categ );
-
-    g_signal_connect ( G_OBJECT ( button_group_by_categ ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_affiche_sous_total_sous_categ );
-
-
-    bouton_afficher_pas_de_sous_categ = gtk_check_button_new_with_label ( _("Display \" No sub-category\" if none") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_afficher_pas_de_sous_categ,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_pas_de_sous_categ );
-
-    g_signal_connect ( G_OBJECT ( button_group_by_categ ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_pas_de_sous_categ );
-
-
-    /* mise en place de la paddingbox des ib */
-    paddingbox = new_paddingbox_with_title ( vbox_onglet, FALSE, _("Budgetary lines") );
-
-    bouton_afficher_noms_ib = gtk_check_button_new_with_label ( _("Display the (sub-)budget line name") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_afficher_noms_ib,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_noms_ib );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_ib_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_noms_ib );
-
-    /* permet d'afficher un sous total lors de chgt d'ib */
-    /* activé uniquement si on utilise les ib */
-
-    bouton_affiche_sous_total_ib = gtk_check_button_new_with_label ( _("Display a sub-total for each budgetary line") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_affiche_sous_total_ib,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_affiche_sous_total_ib );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_ib_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_affiche_sous_total_ib );
-
-    /* mise en place du bouton pour afficher les sous categ */
-
-    bouton_afficher_sous_ib = gtk_check_button_new_with_label ( _("Display sub-budget lines") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_afficher_sous_ib,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_sous_ib );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_ib_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_sous_ib );
-
-    bouton_affiche_sous_total_sous_ib = gtk_check_button_new_with_label ( _("Display a sub-total for each sub-budget line") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_affiche_sous_total_sous_ib,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_affiche_sous_total_sous_ib );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_ib_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_affiche_sous_total_sous_ib );
-
-
-    bouton_afficher_pas_de_sous_ib = gtk_check_button_new_with_label ( _("Display \"No sub-budgetary line\" if none") );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ),
-			 bouton_afficher_pas_de_sous_ib,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_afficher_pas_de_sous_ib );
-
-    g_signal_connect ( G_OBJECT ( bouton_utilise_ib_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 bouton_afficher_pas_de_sous_ib );
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_affiche_sous_total_sous_categ", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_category_show_sub_category_amount ( report_number ) );
 
-/******************************************************************************/
-GtkWidget *onglet_etat_mode_paiement ( void )
-{
-    GtkWidget *scrolled_window;
-    GtkWidget *bouton;
-    GtkWidget *vbox;
-    GtkWidget *label;
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Payment methods"), "payment.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    /* on met dans la partie de gauche une liste contenant les modes de paiement à */
-    /* sélectionner */
-
-    bouton_detaille_mode_paiement_etat = gtk_check_button_new_with_label ( _("Select the transactions by method of payment"));
-    g_signal_connect_swapped ( G_OBJECT ( bouton_detaille_mode_paiement_etat ),
-				"toggled",
-				G_CALLBACK ( report_tree_update_style ),
-				GINT_TO_POINTER ( 8 ));
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 bouton_detaille_mode_paiement_etat,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton_detaille_mode_paiement_etat );
-
-    vbox_mode_paiement_etat = gtk_vbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 vbox_mode_paiement_etat,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( vbox_mode_paiement_etat );
-
-
-    g_signal_connect ( G_OBJECT ( bouton_detaille_mode_paiement_etat ),
-			 "toggled",
-			 G_CALLBACK ( sens_desensitive_pointeur ),
-			 vbox_mode_paiement_etat );
-
-    label = gtk_label_new ( _("Select methods of payment to include: ") );
-	gtk_misc_set_padding ( GTK_MISC ( label ), 3, 0 );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.0 );
-
-    gtk_box_pack_start ( GTK_BOX ( vbox_mode_paiement_etat ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
-
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_mode_paiement_etat ),
-			 hbox,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-    scrolled_window = gtk_scrolled_window_new ( FALSE,
-						FALSE );
-    gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW ( scrolled_window ),
-				     GTK_POLICY_AUTOMATIC,
-				     GTK_POLICY_AUTOMATIC );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 scrolled_window,
-			 TRUE,
-			 TRUE,
-			 0 );
-    gtk_widget_show ( scrolled_window );
-
-    liste_mode_paiement_etat = gtk_clist_new ( 1 );
-    gtk_clist_set_selection_mode ( GTK_CLIST ( liste_mode_paiement_etat ),
-				   GTK_SELECTION_MULTIPLE );
-    gtk_clist_set_column_auto_resize ( GTK_CLIST ( liste_mode_paiement_etat ),
-				       0,
-				       TRUE );
-    gtk_container_add ( GTK_CONTAINER ( scrolled_window ),
-			liste_mode_paiement_etat );
-    gtk_widget_show ( liste_mode_paiement_etat );
-
-    /* on remplit la liste des comptes */
-
-    remplissage_liste_modes_paiement_etats ();
-
-
-
-    /*   sur la partie de droite, on met les boutons (dé)sélectionner tout */
-
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 vbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( vbox );
-
-    bouton = gtk_button_new_with_label ( _("Select all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( gtk_clist_select_all ),
-				G_OBJECT  ( liste_mode_paiement_etat ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-    bouton = gtk_button_new_with_label ( _("Unselect all") );
-	gtk_button_set_alignment ( GTK_BUTTON ( bouton ), 0.1, 0.0 );
-    gtk_button_set_relief ( GTK_BUTTON ( bouton ),
-			    GTK_RELIEF_NONE );
-    g_signal_connect_swapped ( G_OBJECT  ( bouton ),
-				"clicked",
-				G_CALLBACK ( gtk_clist_unselect_all ),
-				G_OBJECT  ( liste_mode_paiement_etat ));
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 bouton,
-			 TRUE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( bouton );
-
-
-    return ( vbox_onglet );
-}
-/******************************************************************************/
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_afficher_pas_de_sous_categ", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_category_show_without_category ( report_number ) );
 
-/******************************************************************************/
-void remplissage_liste_modes_paiement_etats ( void )
-{
-    GSList *liste_nom_types = NULL;
-    GSList *list_tmp;
+    /* données des IB */
+    button = etats_config_ui_widget_get_widget_by_name ( "bouton_utilise_ib_etat", NULL );
 
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_afficher_noms_ib", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_budget_show_name ( report_number ) );
 
-    if ( !liste_comptes_etat )
-	return;
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_affiche_sous_total_ib", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_budget_show_budget_amount ( report_number ) );
 
-    gtk_clist_clear ( GTK_CLIST ( liste_mode_paiement_etat ) );
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_afficher_sous_ib", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_budget_show_sub_budget ( report_number ) );
 
-    /* create a list of unique names */
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_affiche_sous_total_sous_ib", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_budget_show_sub_budget_amount ( report_number ) );
 
-    list_tmp = gsb_data_payment_get_payments_list ();
+    widget = etats_config_ui_widget_get_widget_by_name ( "bouton_afficher_pas_de_sous_ib", NULL );
+    sens_desensitive_pointeur ( button, widget );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ),
+				   gsb_data_report_get_budget_show_without_budget ( report_number ) );
+}
 
-    while (list_tmp)
-    {
-	gint payment_number;
 
-	payment_number = gsb_data_payment_get_number (list_tmp -> data);
+/**
+ * Récupère les informations de l'onglet titres
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_affichage_titres ( gint report_number )
+{
+    /* données des comptes */
+    gsb_data_report_set_account_show_name ( report_number,
+					    etats_config_ui_toggle_button_get_actif ( "bouton_afficher_noms_comptes" ) );
+    gsb_data_report_set_account_show_amount ( report_number,
+					    etats_config_ui_toggle_button_get_actif ( "bouton_affiche_sous_total_compte" ) );
+
+    /* données des tiers */
+    gsb_data_report_set_payee_show_name ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_noms_tiers" ) );
+    gsb_data_report_set_payee_show_payee_amount ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_sous_total_tiers" ) );
+
+    /* données des catégories */
+    gsb_data_report_set_category_show_name ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_noms_categ" ) );
+    gsb_data_report_set_category_show_category_amount ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_affiche_sous_total_categ" ) );
+    gsb_data_report_set_category_show_sub_category ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_sous_categ" ) );
+    gsb_data_report_set_category_show_sub_category_amount ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_affiche_sous_total_categ" ) );
+    gsb_data_report_set_category_show_without_category ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_pas_de_sous_categ" ) );
+
+    /* données des IB */
+    gsb_data_report_set_budget_show_name ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_noms_ib" ) );
+    gsb_data_report_set_budget_show_budget_amount ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_affiche_sous_total_ib" ) );
+    gsb_data_report_set_budget_show_sub_budget ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_sous_ib" ) );
+    gsb_data_report_set_budget_show_sub_budget_amount ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_affiche_sous_total_ib" ) );
+    gsb_data_report_set_budget_show_without_budget ( report_number,
+					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_pas_de_sous_ib" ) );
+}
+
+
+/*ONGLET_AFFICHAGE_OPERATIONS*/
+/**
+ * Initialise les informations de l'onglet opérations
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_affichage_operations ( gint report_number )
+{
+    GtkWidget *combo;
+
+    /* on affiche ou pas le choix des données des opérations */
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_opes",
+                        gsb_data_report_get_show_report_transactions ( report_number ) );
+
+    /* données des opérations à afficher */
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_no_ope",
+                        gsb_data_report_get_show_report_transaction_number ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_date_opes",
+                        gsb_data_report_get_show_report_date ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_value_date_opes",
+                        gsb_data_report_get_show_report_value_date ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_tiers_opes",
+                        gsb_data_report_get_show_report_payee ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_categ_opes",
+                        gsb_data_report_get_show_report_category ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_sous_categ_opes",
+                        gsb_data_report_get_show_report_sub_category ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_ib_opes",
+                        gsb_data_report_get_show_report_budget ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_sous_ib_opes",
+                        gsb_data_report_get_show_report_sub_budget ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_notes_opes",
+                        gsb_data_report_get_show_report_note ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_type_ope",
+                        gsb_data_report_get_show_report_method_of_payment ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_no_cheque",
+                        gsb_data_report_get_show_report_method_of_payment_content ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_pc_opes",
+                        gsb_data_report_get_show_report_voucher ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_exo_opes",
+                        gsb_data_report_get_show_report_financial_year ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_infobd_opes",
+                        gsb_data_report_get_show_report_bank_references ( report_number ) );
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_no_rappr",
+                        gsb_data_report_get_show_report_marked ( report_number ) );
+
+    /* affichage des titres des colonnes */
+    etats_config_ui_toggle_button_set_actif ( "bouton_afficher_titres_colonnes",
+                        gsb_data_report_get_column_title_show ( report_number ) );
+
+    if ( !gsb_data_report_get_column_title_type ( report_number ) )
+        etats_config_ui_toggle_button_set_actif ( "bouton_titre_en_haut", TRUE );
+
+    /* sélectionner le type de classement des opérations */
+    combo = etats_config_ui_widget_get_widget_by_name ( "bouton_choix_classement_ope_etat", NULL );
+    gtk_combo_box_set_active ( GTK_COMBO_BOX ( combo ),
+                        gsb_data_report_get_sorting_report ( report_number ) );
+
+    /* rendre les opérations cliquables */
+    etats_config_ui_toggle_button_set_actif ( "bouton_rendre_ope_clickables",
+                        gsb_data_report_get_report_can_click ( report_number ) );
+}
 
-	if ( !g_slist_find_custom ( liste_nom_types,
-				    gsb_data_payment_get_name (payment_number),
-				    (GCompareFunc) cherche_string_equivalente_dans_slist ))
-	    liste_nom_types = g_slist_append ( liste_nom_types,
-					       my_strdup (gsb_data_payment_get_name (payment_number)));
 
-	list_tmp = list_tmp -> next;
-    }
+/**
+ * Récupère les informations de l'onglet opérations
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_affichage_operations ( gint report_number )
+{
+    GtkWidget *combo;
+
+    gsb_data_report_set_show_report_transactions ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_opes" ) );
+
+    /* données des opérations */
+    gsb_data_report_set_show_report_transaction_number ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_no_ope" ) );
+    gsb_data_report_set_show_report_date ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_date_opes" ) );
+    gsb_data_report_set_show_report_value_date ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_value_date_opes" ) );
+    gsb_data_report_set_show_report_payee ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_tiers_opes" ) );
+    gsb_data_report_set_show_report_category ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_categ_opes" ) );
+    gsb_data_report_set_show_report_sub_category ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_sous_categ_opes" ) );
+    gsb_data_report_set_show_report_budget ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_ib_opes" ) );
+    gsb_data_report_set_show_report_sub_budget ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_sous_ib_opes" ) );
+    gsb_data_report_set_show_report_note ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_notes_opes" ) );
+    gsb_data_report_set_show_report_method_of_payment ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_type_ope" ) );
+    gsb_data_report_set_show_report_method_of_payment_content ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_no_cheque" ) );
+    gsb_data_report_set_show_report_voucher ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_pc_opes" ) );
+    gsb_data_report_set_show_report_financial_year ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_exo_opes" ) );
+    gsb_data_report_set_show_report_bank_references ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_infobd_opes" ) );
+    gsb_data_report_set_show_report_marked ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_no_rappr" ) );
+
+    /* titres des colonnes */
+    gsb_data_report_set_column_title_show ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_afficher_titres_colonnes" ) );
+
+    gsb_data_report_set_column_title_type ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_titre_changement" ) );
+
+    /* type de classement des opérations */
+    combo = etats_config_ui_widget_get_widget_by_name ( "bouton_choix_classement_ope_etat", NULL );
+    gsb_data_report_set_sorting_report ( report_number,
+                        gtk_combo_box_get_active ( GTK_COMBO_BOX ( combo ) ) );
+
+    /* opérations cliquables */
+    gsb_data_report_set_report_can_click ( report_number,
+                        etats_config_ui_toggle_button_get_actif ( "bouton_rendre_ope_clickables" ) );
+}
+
+
+/*ONGLET_AFFICHAGE_DEVISES*/
+/**
+ * Initialise les informations de l'onglet devises
+ *
+ * \param report_number
+ *
+ * \return
+ */
+void etats_config_initialise_onglet_affichage_devises ( gint report_number )
+{
+    GtkWidget *button;
 
-    /* sort and set that list in the clist and associate the name to the row */
-    liste_nom_types = g_slist_sort ( liste_nom_types, (GCompareFunc) my_strcasecmp );
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_general_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_currency_general ( report_number ) );
 
-    list_tmp = liste_nom_types;
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_tiers_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_payee_currency ( report_number ) );
 
-    while ( list_tmp )
-    {
-	gint row;
-	gchar * string = list_tmp -> data;
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_categ_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_category_currency ( report_number ) );
 
-	row = gtk_clist_append ( GTK_CLIST ( liste_mode_paiement_etat ),
-				 &string );
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_ib_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_budget_currency ( report_number ) );
 
-	gtk_clist_set_row_data ( GTK_CLIST ( liste_mode_paiement_etat ),
-				 row,
-				 list_tmp -> data );
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_montant_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_amount_comparison_currency ( report_number ) );
 
-	list_tmp = list_tmp -> next;
-    }
 }
-/******************************************************************************/
 
 
-
-/******************************************************************************/
-void selectionne_liste_modes_paiement_etat_courant ( void )
+/**
+ * Récupère les informations de l'onglet devises
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+void etats_config_recupere_info_onglet_affichage_devises ( gint report_number )
 {
-    gint i;
-    gint current_report_number;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
-
+    GtkWidget *button;
 
-    if ( !liste_comptes_etat )
-	return;
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_general_etat", "button" );
+    gsb_data_report_set_currency_general ( report_number,
+                        gsb_currency_get_currency_from_combobox ( button ) );
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_mode_paiement_etat ));
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_tiers_etat", "button" );
+    gsb_data_report_set_payee_currency ( report_number,
+                        gsb_currency_get_currency_from_combobox ( button ) );
 
-    if ( !gsb_data_report_get_method_of_payment_list (current_report_number))
-	return;
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_categ_etat", "button" );
+    gsb_data_report_set_category_currency ( report_number,
+                        gsb_currency_get_currency_from_combobox ( button ) );
 
-    /* on fait le tour de la liste pour voir s'il y a un état sélectionné */
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_ib_etat", "button" );
+    gsb_data_report_set_budget_currency ( report_number,
+                        gsb_currency_get_currency_from_combobox ( button ) );
 
-    for ( i=0 ; i < GTK_CLIST ( liste_mode_paiement_etat ) -> rows ; i++ )
-    {
-	if ( g_slist_find_custom ( gsb_data_report_get_method_of_payment_list (current_report_number),
-				   gtk_clist_get_row_data ( GTK_CLIST ( liste_mode_paiement_etat ),
-							    i ),
-				   (GCompareFunc) cherche_string_equivalente_dans_slist ))
-	    gtk_clist_select_row ( GTK_CLIST ( liste_mode_paiement_etat ),
-				   i,
-				   0 );
-    }
-}
-/******************************************************************************/
+    button = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_montant_etat", "button" );
+    gsb_data_report_set_amount_comparison_currency ( report_number,
+                        gsb_currency_get_currency_from_combobox ( button ) );
 
-/******************************************************************************/
-void etat_option_menu_changed (GtkWidget *optionmenu, GtkWidget *user_data)
-{
-    gint current_report_number = gsb_gui_navigation_get_current_report();
-    if ( gsb_data_report_get_period_split (current_report_number))
-    {
-    if (gtk_option_menu_get_history ( GTK_OPTION_MENU ( optionmenu )) == 1)
-        gtk_widget_set_sensitive ( user_data, TRUE );
-    else
-        gtk_widget_set_sensitive ( user_data, FALSE );
-    }
 }
 
 
-/******************************************************************************/
-
-gint classement_alphabetique_tree ( GtkWidget *tree,
-                        GtkCListRow *ligne_1,
-                        GtkCListRow *ligne_2 )
+/**
+ * ajoute les combobox pour les devises
+ *
+ * \param
+ *
+ * \return
+ */
+void etats_config_onglet_affichage_devises_make_combobox ( void )
+{
+    GtkWidget *hbox;
+    GtkWidget *button;
+
+    hbox = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_general_etat", NULL );
+    button = gsb_currency_make_combobox (FALSE);
+    g_object_set_data ( G_OBJECT ( hbox ), "button", button );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
+
+    hbox = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_tiers_etat", NULL );
+    button = gsb_currency_make_combobox (FALSE);
+    g_object_set_data ( G_OBJECT ( hbox ), "button", button );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
+
+    hbox = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_categ_etat", NULL );
+    button = gsb_currency_make_combobox (FALSE);
+    g_object_set_data ( G_OBJECT ( hbox ), "button", button );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
+
+    hbox = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_ib_etat", NULL );
+    button = gsb_currency_make_combobox (FALSE);
+    g_object_set_data ( G_OBJECT ( hbox ), "button", button );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
+
+    hbox = etats_config_ui_widget_get_widget_by_name ( "hbox_devise_montant_etat", NULL );
+    button = gsb_currency_make_combobox (FALSE);
+    g_object_set_data ( G_OBJECT ( hbox ), "button", button );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
+}
+/*COMMON_FUNCTIONS*/
+/**
+ * Rend sensitif la suite de la comparaison de numéro
+ *
+ * \param combo_box
+ * \param widget widget à rendre sensitif
+ *
+ * \return
+ */
+void etats_config_combo_lien_nomb sensitif  de numéro  , FALSE, 0 );  tant_etat", NULL );  " );   );  ;  ethod of payment"));  ment )),    ),  mparison_number))  umber)) -> menu_item ),  item ),   ’x-c+  ã\ÿ  €Oc+           Ø\ÿ         ÐÖ\ÿ  k€c+  6                    è     è!     è!      â\ÿ  ã\ÿ  x4-c+           Ù\ÿ          ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ         À/‘c+  ujc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          x4-c+           Ù\ÿ          Ð×\ÿ  k€c+  à!     à!      â\ÿ  ã\ÿ  Hþc+          àÙ\ÿ         ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ  Ðâ\ÿ  Èâ\ÿ  8‹1c+  Œp˜        ã\ÿ  ujc+  €Šc+                  àÙ\ÿ         °Ø\ÿ  k€c+          G       H   I       J   K           M   N   O       P    â\ÿ  ã\ÿ  Hµãc+          €Û\ÿ         ’bc+          †€c+   â\ÿ         0/‘c+  ujc+   @-c+   éÀc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          Hµãc+          €Û\ÿ 
         ÀÙ\ÿ  k€c+  8µãc+          €Û\ÿ         ðÙ\ÿ  k€c+  (µãc+          €Û\ÿ          Ú\ÿ  k€c+  µãc+          €Û\ÿ         PÚ\ÿ  k€c+  	       ¨.‘c+  ujc+         ¨)‘c+  ÐÔ\ÿ          Š8Ác+  eic+         Ø$‘c+  ðÚ\ÿ          y8Ác+  eic+           ‘c+   Û\ÿ          Z8Ác+  eic+  ØäÀc+   @-c+   éÀc+    ‘c+  ØD-c+  Ø$‘c+  ¨)‘c+  €Šc+          8‹1c+                        ­Œc+  ã\ÿ  p{Àc+          ÐÜ\ÿ           Û\ÿ  k€c+      5   6   7   8   :   <   =   >       ?       @   B   D        â\ÿ  ã\ÿ  ୉c+                 ã\ÿ  ujc+         …1c+  PÛ\ÿ          ­Œc+  eic+  …1c+          Õ_ at fÆS         Qöl±íÁÃXc+  ã\ÿ  ୉c+          àÝ\ÿ         °Ü\ÿ  k€c+  u]ÞÓ	4Q ÷U^Qʉ§ ¶uª¹ñìò*ēv â\ÿ  ã\ÿ  HþUc+          D’c+          Pä\ÿ  ¦Pôc+  ¦Pôc+         –c+  ßâ\ÿ  ä\ÿ  Èâ\ÿ  0ß\ÿ  O-c+  ujc+  ØD-c+  å\ÿ  ¢Pôc+  `ä\ÿ          ðß\
 ÿ                 ÿÿÿÿÿÿÿÿ¢Pôc+          ã\ÿ                 re_2_changed ( GtkComboBox *combo,
+                        GtkWidget *widget )
 {
-    return g_utf8_collate ( ligne_1->cell->u.text, ligne_2->cell->u.text );
+    gint index;
+
+    index = gtk_combo_box_get_active ( combo );
+    if ( index == 3 )
+        gtk_widget_set_sensitive ( widget, FALSE );
+    else
+        gtk_widget_set_sensitive ( widget, TRUE );
 }
 
 
+/**
+ *
+ *
+ *
+ */
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/etats_config.h b/src/etats_config.h
index c3a40b0..e8ccdbb 100644
--- a/src/etats_config.h
+++ b/src/etats_config.h
@@ -1,17 +1,52 @@
-#ifndef _ETATS_CONFIG_H
-#define _ETATS_CONFIG_H (1)
+#ifndef ETATS_CONFIG_H
+#define ETATS_CONFIG_H (1)
+
+#define TEXT_NORMAL (0<<0)
+#define TEXT_BOLD   (1<<0)
+#define TEXT_ITALIC (1<<1)
+#define TEXT_HUGE   (1<<2)
+#define TEXT_LARGE  (1<<3)
+#define TEXT_SMALL  (1<<4)
 
-#define TEXT_NORMAL	(0<<0)
-#define TEXT_BOLD	(1<<0)
-#define TEXT_ITALIC	(1<<1)
-#define TEXT_HUGE	(1<<2)
-#define TEXT_LARGE	(1<<3)
-#define TEXT_SMALL	(1<<4)
 
 /* START_INCLUDE_H */
 /* END_INCLUDE_H */
 
 /* START_DECLARATION */
-void personnalisation_etat (void);
+void etats_config_onglet_affichage_devises_make_combobox ( void );
+
+GtkTreeModel *etats_config_onglet_categ_budget_get_model ( gboolean is_categ );
+gboolean etats_config_onglet_categ_budget_select_partie_liste ( GtkWidget *button,
+                        GdkEventButton *event,
+                        GtkWidget *tree_view );
+gboolean etats_config_onglet_categ_budget_toggled ( GtkCellRendererToggle *radio_renderer,
+                        gchar *path_str,
+                        GtkTreeStore *store );
+void etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( GtkTreeModel *model,
+                        gboolean toggle_value );
+
+gchar *etats_config_onglet_data_grouping_get_string ( gint type_data,
+                        gint pos );
+void etats_config_onglet_data_grouping_move_in_list ( gint src_pos,
+                        gint src_type_data,
+                        gint dst_pos );
+
+void etats_config_onglet_data_separation_combo_changed ( GtkComboBox *combo,
+                        GtkWidget *widget );
+
+GtkTreeModel *etats_config_onglet_periode_get_model_exercices ( void );
+void etats_config_onglet_periode_make_calendar_entry ( void );
+
+GtkTreeModel *etats_config_onglet_get_liste_comptes ( void );
+GtkTreeModel *etats_config_onglet_get_liste_tiers ( void );
+
+GtkTreeModel *etats_config_onglet_mode_paiement_get_model ( void );
+
+void etats_config_onglet_select_partie_liste_comptes ( GtkWidget *tree_view,
+                        gint type_compte );
+
+void etats_config_personnalisation_etat ( void );
 /* END_DECLARATION */
-#endif
+
+
+#endif /* ETATS_CONFIG_H */
diff --git a/src/etats_config_ui.c b/src/etats_config_ui.c
new file mode 100644
index 0000000..ec10ff9
--- /dev/null
+++ b/src/etats_config_ui.c
@@ -0,0 +1,3387 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*                      2003-2008 Benjamin Drieu (bdrieu at april.org)           */
+/*          2008-2011 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      */
+/*  the Free Software Foundation; either version 2 of the License, or         */
+/*  (at your option) any later version.                                       */
+/*                                                                            */
+/*  This program is distributed in the hope that it will be useful,           */
+/*  but WITHOUT ANY WARRANTY; without even the implied warranty of            */
+/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
+/*  GNU General Public License for more details.                              */
+/*                                                                            */
+/*  You should have received a copy of the GNU General Public License         */
+/*  along with this program; if not, write to the Free Software               */
+/*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+/*                                                                            */
+/* ************************************************************************** */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+
+
+/*START_INCLUDE*/
+#include "etats_config_ui.h"
+#include "etats_config.h"
+#include "structures.h"
+#include "utils.h"
+#include "utils_buttons.h"
+#include "utils_gtkbuilder.h"
+#include "utils_str.h"
+#include "erreur.h"
+/*END_INCLUDE*/
+
+
+/*START_STATIC*/
+static void etats_config_ui_left_panel_add_line ( GtkTreeStore *tree_model,
+                        GtkTreeIter *iter,
+                        GtkWidget *notebook,
+                        GtkWidget *child,
+                        const gchar *title,
+                        gint page );
+GtkWidget *etats_config_ui_left_panel_create_tree_view ( void );
+static void etats_config_ui_left_panel_notebook_change_page ( GtkNotebook *notebook,
+                        gpointer npage,
+                        gint page,
+                        gpointer user_data );
+static void etats_config_ui_left_panel_populate_tree_model ( GtkTreeStore *tree_model,
+                        GtkWidget *notebook );
+static gboolean etats_config_ui_left_panel_tree_view_selectable_func (GtkTreeSelection *selection,
+                        GtkTreeModel *model,
+                        GtkTreePath *path,
+                        gboolean path_currently_selected,
+                        gpointer data);
+static gboolean etats_config_ui_left_panel_tree_view_selection_changed ( GtkTreeSelection *selection,
+                        gpointer data );
+static gboolean etats_config_ui_left_panel_tree_view_update_style ( GtkWidget *button,
+                        gint *page_number );
+static GtkWidget *etats_config_ui_onglet_affichage_devises_create_page ( gint page );
+static GtkWidget *etats_config_ui_onglet_affichage_generalites_create_page ( gint page );
+static GtkWidget *etats_config_ui_onglet_affichage_operations_create_page ( gint page );
+static GtkWidget *etats_config_ui_onglet_affichage_titles_create_page ( gint page );
+
+static GtkWidget *etats_config_ui_onglet_budgets_create_page ( gint page );
+static void etats_config_ui_onglet_categ_budget_init_buttons_select_unselect ( gchar *name,
+                        GtkWidget *tree_view,
+                        gboolean is_categ );
+static GtkWidget *etats_config_ui_onglet_categ_budget_tree_view_create ( gboolean is_categ );
+static GtkWidget *etats_config_ui_onglet_categories_create_page ( gint page );
+static GtkWidget *etats_config_ui_onglet_comptes_create_page ( gint page );
+static void etats_config_ui_onglet_comptes_init_buttons_choix_utilisation_virements ( gint page );
+static void etats_config_ui_onglet_comptes_init_buttons_selection ( gchar *name,
+                        GtkWidget *tree_view );
+static void etats_config_ui_onglet_data_grouping_button_clicked ( GtkWidget *button,
+                        gpointer data );
+static GtkWidget *etats_config_ui_onglet_data_grouping_create_page ( gint page );
+static gboolean etats_config_ui_onglet_data_grouping_drag_data_get ( GtkTreeDragSource *drag_source,
+                        GtkTreePath *path,
+                        GtkSelectionData *selection_data );
+static gboolean etats_config_ui_onglet_data_grouping_drag_data_received ( GtkTreeDragDest * drag_dest,
+                        GtkTreePath *dest_path,
+                        GtkSelectionData *selection_data );
+static gboolean etats_config_ui_onglet_data_grouping_drop_possible ( GtkTreeDragDest *drag_dest,
+                        GtkTreePath *dest_path,
+                        GtkSelectionData *selection_data );
+static gboolean etats_config_ui_onglet_data_grouping_init_tree_view ( void );
+static void etats_config_ui_onglet_data_grouping_selection_changed ( GtkTreeSelection *selection,
+                        GtkWidget *tree_view );
+static GtkWidget *etats_config_ui_onglet_data_separation_create_page ( gint page );
+
+static GtkWidget *etats_config_ui_onglet_divers_create_page ( gint page );
+static gboolean etats_config_ui_onglet_divers_update_style_left_panel ( GtkWidget *button,
+                        gint *page_number );
+static GtkWidget *etats_config_ui_onglet_mode_paiement_create_page ( gint page );
+static GtkWidget *etats_config_ui_onglet_montants_create_page ( gint page );
+static GtkWidget *etats_config_ui_onglet_periode_create_page ( gint page );
+static GtkTreeModel *etats_config_ui_onglet_periode_get_liste_dates ( void );
+static gboolean etats_config_ui_onglet_periode_selection_dates_changed ( GtkTreeSelection *selection,
+                        GtkWidget *widget );
+static gboolean etats_config_ui_onglet_periode_update_style_left_panel ( GtkWidget *button,
+                        gint *page_number );
+static GtkWidget *etats_config_ui_onglet_textes_create_page ( gint page );
+static GtkWidget *etats_config_ui_onglet_tiers_create_page ( gint page );
+static void etats_config_ui_onglet_tiers_entry_delete_text ( GtkEditable *editable,
+                        gint start_pos,
+                        gint end_pos,
+                        GtkWidget *tree_view );
+static void etats_config_ui_onglet_tiers_search_iter_from_entry ( const gchar *text,
+                        GtkTreeView *tree_view,
+                        gint sens );
+static void etats_config_ui_onglet_tiers_entry_insert_text ( GtkEditable *editable,
+                        gchar *new_text,
+                        gint new_text_length,
+                        gpointer position,
+                        GtkWidget *tree_view );
+static gboolean etats_config_ui_onglet_tiers_select_first_last_item ( GtkWidget *button,
+                        GdkEventButton *event,
+                        gpointer ptr_sens );
+static gboolean etats_config_ui_onglet_tiers_select_prev_next_item ( GtkWidget *button,
+                        GdkEventButton *event,
+                        gpointer ptr_sens );
+static void etats_config_ui_onglet_tiers_selection_changed ( GtkTreeSelection *selection,
+                        gpointer user_data );
+static gboolean etats_config_ui_onglet_tiers_show_first_row_selected ( GtkWidget *tree_view,
+                        GdkEventVisibility  *event,
+                        gpointer   user_data);
+static void etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( gint show_left,
+                        gint show_right );
+static GtkWidget *etats_config_ui_onglet_virements_create_page ( gint page );
+
+static void etats_config_ui_toggle_button_init_button_expand ( gchar *name,
+                        GtkWidget *tree_view );
+
+static void etats_config_ui_tree_view_init ( const gchar *treeview_name,
+                        GtkTreeModel *(*function) ( void ),
+                        GtkSelectionMode type_selection,
+                        GCallback selection_callback );
+static GtkWidget *etats_config_ui_tree_view_new_with_model ( const gchar *treeview_name,
+                        GtkTreeModel *model );
+
+
+/*END_STATIC*/
+
+
+/*START_EXTERN*/
+/*END_EXTERN*/
+
+
+/*START_GLOBAL_VARIABLES*/
+/* definition of the columns of model for the left panel  */
+enum left_panel_tree_columns
+{
+    LEFT_PANEL_TREE_TEXT_COLUMN,
+    LEFT_PANEL_TREE_PAGE_COLUMN,
+    LEFT_PANEL_TREE_BOLD_COLUMN,
+    LEFT_PANEL_TREE_ITALIC_COLUMN,
+    LEFT_PANEL_TREE_NUM_COLUMNS,
+};
+
+/* liste des plages de date possibles */
+static gchar *etats_config_liste_plages_dates[] =
+{
+    N_("All"),
+    N_("Custom"),
+    N_("Total to now"),
+    N_("Current month"),
+    N_("Current year"),
+    N_("Current month to now"),
+    N_("Current year to now"),
+    N_("Previous month"),
+    N_("Previous year"),
+    N_("Last 30 days"),
+    N_("Last 3 months"),
+    N_("Last 6 months"),
+    N_("Last 12 months"),
+    NULL,
+};
+
+
+static gchar *jours_semaine[] =
+{
+    N_("Monday"),
+    N_("Tuesday"),
+    N_("Wednesday"),
+    N_("Thursday"),
+    N_("Friday"),
+    N_("Saturday"),
+    N_("Sunday"),
+    NULL,
+};
+
+
+static gchar *data_separation_periodes[] =
+{
+    N_("Day"),
+    N_("Week"),
+    N_("Month"),
+    N_("Year"),
+    NULL,
+};
+
+
+/* données de classement des opérations */
+static gchar *etats_config_ui_classement_operations[] =
+{
+    N_("date"),
+    N_("value date"),
+    N_("transaction number"),
+    N_("payee"),
+    N_("category"),
+    N_("budgetary line"),
+    N_("note"),
+    N_("method of payment"),
+    N_("cheque/transfer number"),
+    N_("voucher"),
+    N_("bank reference"),
+    N_("reconciliation reference"),
+    NULL,
+};
+
+
+/* builder */
+static GtkBuilder *etats_config_builder = NULL;
+
+/* mémorisation du togglebutton utilisé servira à remplacer son label */
+GtkToggleButton *prev_togglebutton = NULL;
+
+/* variables utilisées pour la gestion des tiers*/
+GtkTreePath *tiers_selected = NULL;
+
+/* gint last_page */
+static gint last_page;
+
+/*END_GLOBAL_VARIABLES*/
+
+/*GENERAL*/
+/**
+ * Création de la fenêtre de dialog
+ *
+ * \param
+ *
+ * \return dialog widget
+ */
+GtkWidget *etats_config_ui_create_dialog ( void )
+{
+    GtkWidget *dialog = NULL;
+    GtkWidget *tree_view;
+
+    devel_debug (NULL);
+
+    /* Creation d'un nouveau GtkBuilder */
+    etats_config_builder = gtk_builder_new ( );
+
+    if ( etats_config_builder == NULL )
+        return NULL;
+
+    /* Chargement du XML dans etats_config_builder */
+    if ( !utils_gtkbuilder_merge_ui_data_in_builder ( etats_config_builder, "etats_config.ui" ) )
+        return NULL;
+
+    /* Recuparation d'un pointeur sur la fenetre. */
+    dialog = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "config_etats_dialog" ) );
+    gtk_window_set_transient_for ( GTK_WINDOW ( dialog ), GTK_WINDOW ( run.window ) );
+
+    /* Recupération d'un pointeur sur le gtk_tree_view. */
+    tree_view = etats_config_ui_left_panel_create_tree_view ( );
+
+    /* return widget */
+    return dialog;
+}
+
+
+/**
+ * free the gtk_builder
+ *
+ *
+ *
+ * */
+void etats_config_ui_free_all_var ( void )
+{
+    g_object_unref ( G_OBJECT ( etats_config_builder ) );
+}
+
+/*LEFT_PANEL*/
+/**
+ * création du tree_view qui liste les onglets de la fenêtre de dialogue
+ *
+ *
+ *\return tree_view or NULL;
+ * */
+GtkWidget *etats_config_ui_left_panel_create_tree_view ( void )
+{
+    GtkWidget *tree_view = NULL;
+    GtkWidget *notebook;
+    GtkTreeStore *model = NULL;
+    GtkTreeViewColumn *column;
+    GtkCellRenderer *cell;
+    GtkTreeSelection *selection;
+
+    devel_debug (NULL);
+
+    /* Création du model */
+    model = gtk_tree_store_new ( LEFT_PANEL_TREE_NUM_COLUMNS,
+                        G_TYPE_STRING,  /* LEFT_PANEL_TREE_TEXT_COLUMN */
+                        G_TYPE_INT,     /* LEFT_PANEL_TREE_PAGE_COLUMN */
+                        G_TYPE_INT,     /* LEFT_PANEL_TREE_BOLD_COLUMN */
+                        G_TYPE_INT );   /* LEFT_PANEL_TREE_ITALIC_COLUMN */
+
+    /* Create container + TreeView */
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_left_panel" ) );
+    gtk_tree_view_set_model ( GTK_TREE_VIEW ( tree_view ), GTK_TREE_MODEL ( model ) );
+    g_object_unref ( G_OBJECT ( model ) );
+
+    /* set the color of selected row */
+    utils_set_tree_view_selection_and_text_color ( tree_view );
+
+    /* make column */
+    cell = gtk_cell_renderer_text_new ( );
+    column = gtk_tree_view_column_new_with_attributes ( "Categories",
+                        cell,
+                        "text", LEFT_PANEL_TREE_TEXT_COLUMN,
+                        "weight", LEFT_PANEL_TREE_BOLD_COLUMN,
+                        "style", LEFT_PANEL_TREE_ITALIC_COLUMN,
+                        NULL );
+    gtk_tree_view_column_set_sizing ( GTK_TREE_VIEW_COLUMN ( column ), GTK_TREE_VIEW_COLUMN_FIXED );
+    gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ), GTK_TREE_VIEW_COLUMN ( column ) );
+
+    /* Handle select */
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+    g_signal_connect ( selection,
+                        "changed",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_selection_changed ),
+                        NULL );
+
+    /* Choose which entries will be selectable */
+    gtk_tree_selection_set_select_function ( selection,
+                        etats_config_ui_left_panel_tree_view_selectable_func, NULL, NULL );
+
+    /* expand all rows after the treeview widget has been realized */
+    g_signal_connect ( tree_view,
+                        "realize",
+                        G_CALLBACK ( utils_tree_view_set_expand_all_and_select_path_realize ),
+                        "0:0" );
+
+    /* initialisation du notebook pour les pages de la configuration */
+    notebook = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "notebook_config_etat" ) );
+    gtk_notebook_set_show_tabs ( GTK_NOTEBOOK ( notebook ), FALSE );
+    gtk_notebook_set_show_border ( GTK_NOTEBOOK ( notebook ), FALSE );
+    gtk_container_set_border_width ( GTK_CONTAINER ( notebook ), 0 );
+
+    /* remplissage du paned gauche */
+    etats_config_ui_left_panel_populate_tree_model ( model, notebook );
+
+    /* on met la connexion pour mémoriser la dernière page utilisée */
+    g_signal_connect_after ( notebook,
+                        "switch-page",
+                        G_CALLBACK ( etats_config_ui_left_panel_notebook_change_page ),
+                        NULL );
+
+    /* show all widgets */
+    gtk_widget_show_all ( tree_view );
+
+
+    return tree_view;
+}
+
+
+/**
+ * remplit le model pour la configuration des états
+ *
+ * \param
+ * \param
+ *
+ * \return
+ * */
+void etats_config_ui_left_panel_populate_tree_model ( GtkTreeStore *tree_model,
+                        GtkWidget *notebook )
+{
+    GtkWidget *widget;
+    GtkTreeIter iter;
+    gint page = 0;
+
+    /* append group page */
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, NULL, NULL, _("Data selection"), -1 );
+
+    /* append page Dates */
+    widget = etats_config_ui_onglet_periode_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Dates"), page );
+    page++;
+
+    /* append page Transferts */
+    widget = etats_config_ui_onglet_virements_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Transfers"), page );
+    page++;
+
+    /* append page Accounts */
+    widget = etats_config_ui_onglet_comptes_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Accounts"), page );
+    page++;
+
+    /* append page Payee */
+    widget = etats_config_ui_onglet_tiers_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Payee"), page );
+    page++;
+
+    /* append page Categories */
+    widget = etats_config_ui_onglet_categories_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Categories"), page );
+    page++;
+
+    /* append page Budgetary lines */
+    widget = etats_config_ui_onglet_budgets_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Budgetary lines"), page );
+    page++;
+
+    /* append page Texts */
+    widget = etats_config_ui_onglet_textes_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Texts"), page );
+    page++;
+
+    /* append page Amounts */
+    widget = etats_config_ui_onglet_montants_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Amounts"), page );
+    page++;
+
+    /* append page Payment methods */
+    widget = etats_config_ui_onglet_mode_paiement_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Payment methods"), page );
+    page++;
+
+    /* append page Misc. */
+    widget = etats_config_ui_onglet_divers_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Miscellaneous"), page );
+    page++;
+
+    /* remplissage de l'onglet d'organisation */
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, NULL, NULL, _("Data organization"), -1 );
+
+    /* Data grouping */
+    widget = etats_config_ui_onglet_data_grouping_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Data grouping"), page );
+    page++;
+
+    /* Data separation */
+    widget = etats_config_ui_onglet_data_separation_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Data separation"), page );
+    page++;
+
+    /* remplissage de l'onglet d'affichage */
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, NULL, NULL, _("Data display"), -1 );
+
+    /* append page Generalities */
+    widget = etats_config_ui_onglet_affichage_generalites_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Generalities"), page );
+    page++;
+
+    /* append page divers */
+    widget = etats_config_ui_onglet_affichage_titles_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Titles"), page );
+    page++;
+
+    /* append page Transactions */
+    widget = etats_config_ui_onglet_affichage_operations_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Transactions"), page );
+    page++;
+
+    /* append page Currencies */
+    widget = etats_config_ui_onglet_affichage_devises_create_page ( page );
+    etats_config_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Currencies"), page );
+
+    /* fin de fonction */
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+gboolean etats_config_ui_left_panel_tree_view_selection_changed ( GtkTreeSelection *selection,
+                        gpointer data )
+{
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    gint selected;
+
+    if (! gtk_tree_selection_get_selected ( selection, &model, &iter ) )
+        return(FALSE);
+
+    gtk_tree_model_get ( model, &iter, 1, &selected, -1 );
+
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK (
+                        gtk_builder_get_object ( etats_config_builder, "notebook_config_etat" ) ),
+                        selected );
+
+    /* return */
+    return FALSE;
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+gboolean etats_config_ui_left_panel_tree_view_selectable_func (GtkTreeSelection *selection,
+                        GtkTreeModel *model,
+                        GtkTreePath *path,
+                        gboolean path_currently_selected,
+                        gpointer data )
+{
+    GtkTreeIter iter;
+    gint selectable;
+
+    gtk_tree_model_get_iter ( model, &iter, path );
+    gtk_tree_model_get ( model, &iter, 1, &selectable, -1 );
+
+    return ( selectable != -1 );
+}
+
+
+/**
+ * ajoute une ligne dans le tree_model du panel de gauche
+ *
+ *
+ *
+ * */
+void etats_config_ui_left_panel_add_line ( GtkTreeStore *tree_model,
+                        GtkTreeIter *iter,
+                        GtkWidget *notebook,
+                        GtkWidget *child,
+                        const gchar *title,
+                        gint page )
+{
+    GtkTreeIter iter2;
+
+    if ( page == -1 )
+    {
+        /* append page groupe */
+        gtk_tree_store_append ( GTK_TREE_STORE ( tree_model ), iter, NULL );
+        gtk_tree_store_set (GTK_TREE_STORE ( tree_model ), iter,
+                        LEFT_PANEL_TREE_TEXT_COLUMN, title,
+                        LEFT_PANEL_TREE_PAGE_COLUMN, -1,
+                        LEFT_PANEL_TREE_BOLD_COLUMN, 800,
+                        -1 );
+    }
+    else
+    {
+        /* append page onglet*/
+        gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook ),
+                        child,
+                        gtk_label_new ( title ) );
+
+        gtk_tree_store_append (GTK_TREE_STORE ( tree_model ), &iter2, iter );
+        gtk_tree_store_set (GTK_TREE_STORE ( tree_model ), &iter2,
+                        LEFT_PANEL_TREE_TEXT_COLUMN, title,
+                        LEFT_PANEL_TREE_PAGE_COLUMN, page,
+                        LEFT_PANEL_TREE_BOLD_COLUMN, 400,
+                        -1);
+    }
+}
+
+
+/**
+ * If applicable, update report navigation tree style to reflect which
+ * pages have been changed.
+ *
+ * \param page_number Page that contained an interface element just
+ *                      changed that triggered this event.
+ *
+ * \return      FALSE
+ */
+gboolean etats_config_ui_left_panel_tree_view_update_style ( GtkWidget *button,
+                        gint *page_number )
+{
+    gint iter_page_number;
+
+    iter_page_number = GPOINTER_TO_INT ( page_number );
+
+    if ( iter_page_number )
+    {
+        GtkWidget *tree_view;
+        GtkTreeModel *model;
+        GtkTreeIter parent_iter;
+        gint active;
+        gboolean italic = 0;
+
+        tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_left_panel" ) );
+        model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+        active = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button ) );
+        italic = active;
+
+        if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &parent_iter ) )
+            return FALSE;
+
+        do
+        {
+            GtkTreeIter iter;
+
+            if ( gtk_tree_model_iter_children ( GTK_TREE_MODEL ( model ), &iter, &parent_iter ) )
+            {
+                do
+                {
+                    gint page;
+
+                    gtk_tree_model_get (GTK_TREE_MODEL ( model ),
+                                &iter,
+                                LEFT_PANEL_TREE_PAGE_COLUMN, &page,
+                                -1 );
+
+                    if ( page == iter_page_number )
+                        gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                                &iter,
+                                LEFT_PANEL_TREE_ITALIC_COLUMN, italic,
+                                -1 );
+                }
+                while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
+            }
+        }
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &parent_iter ) );
+
+        return TRUE;
+    }
+
+    /* return */
+    return FALSE;
+}
+
+
+/**
+ * selectionne une page
+ *
+ * \param
+ *
+ * \return
+ */
+gboolean etats_config_ui_left_panel_tree_view_select_last_page ( void )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeIter parent_iter;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_left_panel" ) );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+
+    if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &parent_iter ) )
+        return FALSE;
+
+    do
+    {
+        GtkTreeIter iter;
+
+        if ( gtk_tree_model_iter_children ( GTK_TREE_MODEL ( model ), &iter, &parent_iter ) )
+        {
+            do
+            {
+                gint page;
+
+                gtk_tree_model_get (GTK_TREE_MODEL ( model ),
+                                &iter,
+                                LEFT_PANEL_TREE_PAGE_COLUMN, &page,
+                                -1 );
+
+                if ( page == last_page )
+                {
+                    GtkTreeSelection *sel;
+
+                    sel = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+                    gtk_tree_selection_select_iter ( sel, &iter );
+                    gtk_notebook_set_current_page ( GTK_NOTEBOOK (
+                                gtk_builder_get_object ( etats_config_builder, "notebook_config_etat" ) ),
+                                page );
+                    break;
+                }
+            }
+            while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
+        }
+    }
+    while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &parent_iter ) );
+
+    /* return */
+    return FALSE;
+}
+
+
+void etats_config_ui_left_panel_notebook_change_page ( GtkNotebook *notebook,
+                        gpointer npage,
+                        gint page,
+                        gpointer user_data )
+{
+    last_page = page;
+}
+/*RIGHT_PANEL : ONGLET_PERIODE*/
+/**
+ * Création de la page de détermination de la période de requête
+ *
+ * \param
+ *
+ * \return la page
+ */
+GtkWidget *etats_config_ui_onglet_periode_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_periode" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Date selection"), "scheduler.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    /* on traite la partie gauche de l'onglet dates */
+    etats_config_ui_tree_view_init ( "treeview_dates",
+                        etats_config_ui_onglet_periode_get_liste_dates,
+                        GTK_SELECTION_SINGLE,
+                        G_CALLBACK ( etats_config_ui_onglet_periode_selection_dates_changed ) );
+
+    gtk_container_set_border_width ( GTK_CONTAINER (
+                        gtk_builder_get_object ( etats_config_builder, "vbox_utilisation_date" ) ),
+                        10 );
+
+    /* on initialise les entrées pour les dates personnalisées */
+    etats_config_onglet_periode_make_calendar_entry (  );
+
+    etats_config_ui_onglet_periode_date_interval_sensitive ( FALSE );
+
+    /* on traite la partie droite de l'onglet dates */
+    etats_config_ui_tree_view_init ( "treeview_exer",
+                        etats_config_onglet_periode_get_model_exercices,
+                        GTK_SELECTION_MULTIPLE,
+                        NULL );
+    gtk_container_set_border_width ( GTK_CONTAINER (
+                        gtk_builder_get_object ( etats_config_builder, "vbox_utilisation_exo" ) ),
+                        10 );
+
+    button = utils_gtkbuilder_get_widget_by_name ( etats_config_builder,
+                        "radio_button_utilise_dates", NULL );
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_periode_update_style_left_panel ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour rendre sensitif la frame vbox_utilisation_date */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_utilisation_date" ) );
+
+    button = utils_gtkbuilder_get_widget_by_name ( etats_config_builder,
+                        "radio_button_utilise_exo", NULL );
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_periode_update_style_left_panel ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour rendre sensitif la frame vbox_utilisation_exo */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_utilisation_exo" ) );
+
+    /* on connecte les signaux nécessaires pour gérer la sélection de l'exercice */
+    g_signal_connect ( G_OBJECT ( utils_gtkbuilder_get_widget_by_name ( etats_config_builder,
+                        "bouton_detaille_exo_etat", NULL ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "sw_exer" ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    return vbox_onglet;
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+GtkTreeModel *etats_config_ui_onglet_periode_get_liste_dates ( void )
+{
+    GtkListStore *list_store;
+
+    list_store = utils_list_store_create_from_string_array ( etats_config_liste_plages_dates );
+
+    /* return */
+    return GTK_TREE_MODEL ( list_store );
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+gboolean etats_config_ui_onglet_periode_selection_dates_changed ( GtkTreeSelection *selection,
+                        GtkWidget *widget )
+{
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    gint selected;
+
+    if ( !gtk_tree_selection_get_selected ( selection, &model, &iter ) )
+        return FALSE;
+
+    gtk_tree_model_get ( model, &iter, 1, &selected, -1 );
+    etats_config_ui_onglet_periode_date_interval_sensitive ( selected );
+
+    /* on regarde si on utilise des dates personalisées */
+    etats_config_ui_onglet_periode_update_style_left_panel ( NULL, 0 );
+
+    return TRUE;
+}
+
+
+/**
+ * rend accessible ou nom l'ensemble des données de date configurables
+ *
+ * \param TRUE rend sensible FALSE rend insensible les données
+ *
+ * \return
+ */
+void etats_config_ui_onglet_periode_date_interval_sensitive ( gboolean show )
+{
+    if ( show > 1 )
+        show = 0;
+
+        etats_config_ui_widget_set_sensitive ( "hbox_select_dates", show );
+        gtk_widget_set_sensitive ( utils_gtkbuilder_get_widget_by_name ( etats_config_builder,
+                        "hbox_date_init", "entree_date_init_etat" ), show );
+        gtk_widget_set_sensitive ( utils_gtkbuilder_get_widget_by_name ( etats_config_builder,
+                        "hbox_date_finale", "entree_date_finale_etat" ), show );
+}
+
+
+/**
+ * If applicable, update report navigation tree style to reflect which
+ * pages have been changed.
+ *
+ * \param page_number Page that contained an interface element just
+ *                      changed that triggered this event.
+ *
+ * \return      FALSE
+ */
+gboolean etats_config_ui_onglet_periode_update_style_left_panel ( GtkWidget *button,
+                        gint *page_number )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    gchar *path_string;
+    gchar *tmp_str;
+    gint index;
+    gint iter_page_number;
+
+    iter_page_number = GPOINTER_TO_INT ( page_number );
+
+    index = etats_config_ui_buttons_radio_get_active_index ( "radio_button_utilise_exo" );
+
+    if ( index == 0 )
+    {
+        if ( etats_config_ui_tree_view_get_single_row_selected ( "treeview_dates" ) == 1 )
+        index = 1;
+    }
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_left_panel" ) );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+
+    tmp_str = utils_str_itoa ( iter_page_number );
+    path_string = g_strconcat ("0:", tmp_str, NULL );
+
+    gtk_tree_model_get_iter_from_string ( GTK_TREE_MODEL ( model ), &iter, path_string );
+    gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                        &iter,
+                        LEFT_PANEL_TREE_ITALIC_COLUMN, index,
+                        -1 );
+
+    g_free ( tmp_str );
+    g_free ( path_string );
+
+    /* return */
+    return FALSE;
+}
+
+/*RIGHT_PANEL : ONGLET_VIREMENTS*/
+/**
+ * Création de l'onglet virements
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_virements_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *tree_view;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_virements" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Transfers"), "transfer.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    etats_config_ui_widget_set_sensitive ( "hbox_liste_comptes_virements", FALSE );
+
+    /* on crée la liste des comptes */
+    etats_config_ui_tree_view_init ( "treeview_virements",
+                        etats_config_onglet_get_liste_comptes,
+                        GTK_SELECTION_MULTIPLE,
+                        NULL );
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_virements" ) );
+
+    /* on initialise les boutons pour sensibiliser bouton_exclure_non_virements_etat et la liste des comptes */
+    etats_config_ui_onglet_comptes_init_buttons_choix_utilisation_virements ( page );
+
+    /* on initialise les boutons pour sélectionner tout ou partie des comptes */
+    etats_config_ui_onglet_comptes_init_buttons_selection ( "virements", tree_view );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/**
+ * Initialise les boutons pour sensibiliser bouton_exclure_non_virements_etat
+ *  et la liste des comptes.
+ *
+ * \param
+ *
+ * \return
+ */
+void etats_config_ui_onglet_comptes_init_buttons_choix_utilisation_virements ( gint page )
+{
+    GtkWidget *button;
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder,
+                        "bouton_inclusion_virements_actifs_etat" ) );
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+    /* on connecte le signal pour gérer la sensibilité du bouton bouton_bouton_inclusion_virements_actifs_etat */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_exclure_non_virements_etat" ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder,
+                        "bouton_inclusion_virements_hors_etat" ) );
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+    /* on connecte le signal pour gérer la sensibilité du bouton_inclusion_virements_hors_etat */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_exclure_non_virements_etat" ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder,
+                        "bouton_inclusion_virements_perso" ) );
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+    /* on connecte le signal pour gérer la sensibilité du bouton_inclusion_virements_perso */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_exclure_non_virements_etat" ) );
+
+    /* on connecte le signal pour gérer l'affichage de la liste des comptes */
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object ( etats_config_builder,
+                        "bouton_inclusion_virements_perso" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "hbox_liste_comptes_virements" ) );
+}
+
+
+/*RIGHT_PANEL : ONGLET_COMPTES*/
+/**
+ * Création de l'onglet comptes
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_comptes_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+    GtkWidget *tree_view;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_comptes" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Account selection"), "ac_bank.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    etats_config_ui_widget_set_sensitive ( "vbox_generale_comptes_etat", FALSE );
+
+    /* on crée la liste des comptes */
+    etats_config_ui_tree_view_init ( "treeview_comptes",
+                        etats_config_onglet_get_liste_comptes,
+                        GTK_SELECTION_MULTIPLE,
+                        NULL );
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_comptes" ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_detaille_comptes_etat" ) );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour rendre sensitif la vbox_generale_comptes_etat */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_generale_comptes_etat" ) );
+
+    /* on met la connection pour sélectionner une partie des comptes */
+    etats_config_ui_onglet_comptes_init_buttons_selection ( "comptes", tree_view );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/**
+ * Initialise les boutons de sélection des comptes
+ *
+ * \param suffixe du bouton
+ * \param tree_view
+ *
+ * \return
+ */
+void etats_config_ui_onglet_comptes_init_buttons_selection ( gchar *name,
+                        GtkWidget *tree_view )
+{
+    GtkWidget *button;
+    gchar *tmp_str;
+
+    /* bouton select unselect all*/
+    tmp_str = g_strconcat ( "togglebutton_select_all_", name, NULL );
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), FALSE );
+    g_object_set_data ( G_OBJECT ( button ), "type_compte", GINT_TO_POINTER ( -9 ) );
+    g_free ( tmp_str );
+
+    tmp_str = g_strconcat ( "hbox_toggle_select_all_", name, NULL );
+    g_object_set_data ( G_OBJECT ( button ), "hbox_select_all",
+                        gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    g_free ( tmp_str );
+
+    tmp_str = g_strconcat ( "hbox_toggle_unselect_all_", name, NULL );
+    g_object_set_data ( G_OBJECT ( button ), "hbox_unselect_all",
+                        gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_comptes_select_unselect ),
+                        tree_view );
+
+    /* bouton_bank */
+    tmp_str = g_strconcat ( "button_bank_", name, NULL );
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), FALSE );
+    g_object_set_data ( G_OBJECT ( button ), "type_compte", GINT_TO_POINTER ( 0 ) );
+    g_signal_connect ( G_OBJECT  ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_comptes_select_unselect ),
+                        tree_view );
+    g_free ( tmp_str );
+
+    /* bouton_cash */
+    tmp_str = g_strconcat ( "button_cash_", name, NULL );
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), FALSE );
+    g_object_set_data ( G_OBJECT ( button ), "type_compte", GINT_TO_POINTER ( 1 ) );
+    g_signal_connect ( G_OBJECT  ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_comptes_select_unselect ),
+                        tree_view );
+    g_free ( tmp_str );
+
+    /* button_liabilities */
+    tmp_str = g_strconcat ( "button_liabilities_", name, NULL );
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), FALSE );
+    g_object_set_data ( G_OBJECT ( button ), "type_compte", GINT_TO_POINTER ( 2 ) );
+    g_signal_connect ( G_OBJECT  ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_comptes_select_unselect ),
+                        tree_view );
+    g_free ( tmp_str );
+
+    /* "button_assets */
+    tmp_str = g_strconcat ( "button_assets_", name, NULL );
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), FALSE );
+    g_object_set_data ( G_OBJECT ( button ), "type_compte", GINT_TO_POINTER ( 3 ) );
+    g_signal_connect ( G_OBJECT  ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_comptes_select_unselect ),
+                        tree_view );
+    g_free ( tmp_str );
+}
+
+
+/**
+ * select or unselect all the rows of treeview
+ *
+ * \param toggle_button
+ * \param tree_view
+ *
+ * \return
+ * */
+void etats_config_ui_onglet_comptes_select_unselect ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view )
+{
+    GtkTreeSelection *selection;
+    gboolean toggle;
+    gint type_compte;
+
+    type_compte = GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( togglebutton ), "type_compte" ) );
+    toggle = gtk_toggle_button_get_active ( togglebutton );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+
+    /* on mémorise l'état du bouton après changement d'état du bouton précédent */
+    if ( prev_togglebutton && prev_togglebutton != togglebutton )
+        utils_togglebutton_change_label_select_unselect ( GTK_TOGGLE_BUTTON ( prev_togglebutton ), FALSE );
+    else
+        prev_togglebutton = NULL;
+    prev_togglebutton = togglebutton;
+
+    switch ( type_compte )
+    {
+    case -9:
+        {
+            utils_togglebutton_select_unselect_all_rows ( togglebutton, tree_view );
+            break;
+        }
+    default:
+        {
+            gtk_tree_selection_unselect_all ( selection );
+            if ( toggle )
+                etats_config_onglet_select_partie_liste_comptes ( tree_view, type_compte );
+            utils_togglebutton_change_label_select_unselect ( GTK_TOGGLE_BUTTON ( togglebutton ), toggle );
+        }
+    }
+}
+
+
+/*RIGHT_PANEL : ONGLET_TIERS*/
+/**
+ * Création de l'onglet Tiers
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_tiers_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *tree_view;
+    GtkWidget *entry;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_tiers" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Payees"), "payees.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    etats_config_ui_widget_set_sensitive ( "vbox_detaille_tiers_etat", FALSE );
+
+    /* on crée la liste des tiers */
+    etats_config_ui_tree_view_init ( "treeview_tiers",
+                        etats_config_onglet_get_liste_tiers,
+                        GTK_SELECTION_MULTIPLE,
+                        NULL );
+
+    /* on ajoute un callback pour aller au premier item sélectionné */
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_tiers" ) );
+    g_signal_connect ( G_OBJECT ( tree_view ),
+                        "visibility-notify-event",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_show_first_row_selected ),
+                        NULL );
+    /* on supprime la recherche intégrée */
+    gtk_tree_view_set_enable_search ( GTK_TREE_VIEW ( tree_view ), FALSE );
+
+    /* on rend les boutons premier, précédent, suivant et dernier actifs */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "button_tiers_premier" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_select_first_last_item ),
+                        GINT_TO_POINTER ( GDK_LEFTBUTTON ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "button_tiers_precedent" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_select_prev_next_item ),
+                        GINT_TO_POINTER ( GDK_LEFTBUTTON ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "button_tiers_suivant" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_select_prev_next_item ),
+                        GINT_TO_POINTER ( GDK_RIGHTBUTTON ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "button_tiers_dernier" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_select_first_last_item ),
+                        GINT_TO_POINTER ( GDK_RIGHTBUTTON ) );
+
+    /* on rend insensible les bouton premier et précédent car on est positionné sur le 1er item sélectionné */
+    etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( FALSE, -1 );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_detaille_tiers_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+    /* on met la connection pour rendre sensitif la vbox_generale_comptes_etat */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_detaille_tiers_etat" ) );
+
+    /* on met la connection pour (dé)sélectionner tous les tiers */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "togglebutton_select_all_tiers" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( utils_togglebutton_select_unselect_all_rows ),
+                        tree_view );
+
+    entry = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "search_entry_tiers" ) );
+    g_signal_connect ( G_OBJECT ( entry ),
+                        "insert-text",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_entry_insert_text ),
+                        tree_view );
+    g_signal_connect ( G_OBJECT ( entry ),
+                        "delete-text",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_entry_delete_text ),
+                        tree_view );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/**
+ * Gestion des flêches de déplacement des tiers sélextionnés
+ *
+ * \param button
+ * \param event
+ * \param un pointeur donnant le sens de déplacement GDK_LEFTBUTTON et GDK_RIGHTBUTTON
+ *
+ * \return
+ */
+gboolean etats_config_ui_onglet_tiers_select_prev_next_item ( GtkWidget *button,
+                        GdkEventButton *event,
+                        gpointer ptr_sens )
+{
+    GtkWidget *tree_view;
+    GtkTreeSelection *selection;
+    GtkTreePath *start_path;
+    GtkTreePath *end_path;
+    GtkTreePath *first_path;
+    GtkTreePath *last_path;
+    GtkTreePath *path = NULL;
+    GList *liste;
+    gint sens;
+    gint nbre_selections;
+    gboolean find = FALSE;
+    gboolean return_value = FALSE;
+
+    sens = GPOINTER_TO_INT ( ptr_sens );
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_tiers" ) );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+
+    liste = gtk_tree_selection_get_selected_rows ( selection, NULL );
+    if ( liste == NULL )
+    {
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( FALSE, FALSE );
+        return FALSE;
+    }
+    nbre_selections = g_list_length (liste );
+
+    first_path = g_list_nth_data ( liste, 0 );
+    last_path = g_list_nth_data ( liste, nbre_selections - 1 );
+
+    liste = g_list_find_custom ( liste, tiers_selected, ( GCompareFunc ) gtk_tree_path_compare );
+
+    if ( gtk_tree_view_get_visible_range ( GTK_TREE_VIEW ( tree_view ), &start_path, &end_path ) )
+    {
+        while ( liste )
+        {
+            path = ( GtkTreePath * ) liste->data;
+
+            if ( gtk_tree_selection_path_is_selected ( selection, path ) )
+            {
+                if ( sens == GDK_LEFTBUTTON )
+                {
+                    if ( gtk_tree_path_compare ( start_path, path ) <= 0 )
+                    {
+                        liste = liste->prev;
+                        continue;
+                    }
+                    else if ( gtk_tree_path_compare ( path, tiers_selected ) != 0 )
+                    {
+                        gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), path, NULL, FALSE, 0., 0. );
+                        tiers_selected = path;
+                        find = TRUE;
+                        break;
+                    }
+                }
+                else
+                {
+                    if ( gtk_tree_path_compare ( path, end_path ) <= 0 )
+                    {
+                        liste = liste->next;
+                        continue;
+                    }
+                    else if ( gtk_tree_path_compare ( path, tiers_selected ) != 0 )
+                    {
+                        gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), path, NULL, FALSE, 0., 0. );
+                        tiers_selected = path;
+                        find = TRUE;
+                        break;
+                    }
+                }
+            }
+
+            if ( sens == GDK_LEFTBUTTON )
+                liste = liste->prev;
+            else
+                liste = liste->next;
+        }
+
+        gtk_tree_path_free ( start_path );
+        gtk_tree_path_free ( end_path );
+
+        if ( find )
+            return_value = TRUE;
+    }
+
+    if ( !find )
+    {
+        liste = gtk_tree_selection_get_selected_rows ( selection, NULL );
+        if ( liste == NULL )
+            return FALSE;
+
+        if ( sens == GDK_LEFTBUTTON )
+            liste = g_list_first ( liste );
+        else
+            liste = g_list_last ( liste );
+
+        path = ( GtkTreePath * ) liste->data;
+        gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), path, NULL, FALSE, 0., 0. );
+        tiers_selected = path;
+
+        return_value = TRUE;
+    }
+
+    if ( gtk_tree_path_compare ( path, first_path ) == 0 )
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( FALSE, -1 );
+    else
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( TRUE, -1 );
+
+    if ( gtk_tree_path_compare ( path, last_path ) == 0 )
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( -1, FALSE );
+    else
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( -1, TRUE );
+
+    /* return */
+    return return_value;
+}
+
+
+/**
+ * Gestion des flèches de déplacement des tiers sélextionnés
+ *
+ * \param button
+ * \param event
+ * \param un pointeur donnant le sens de déplacement GDK_LEFTBUTTON et GDK_RIGHTBUTTON
+ *
+ * \return
+ */
+gboolean etats_config_ui_onglet_tiers_select_first_last_item ( GtkWidget *button,
+                        GdkEventButton *event,
+                        gpointer ptr_sens )
+{
+    GtkWidget *tree_view;
+    GtkTreeSelection *selection;
+    GtkTreePath *first_path;
+    GtkTreePath *last_path;
+    GList *liste;
+    gint sens;
+    gint nbre_selections;
+
+    sens = GPOINTER_TO_INT ( ptr_sens );
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_tiers" ) );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+
+    liste = gtk_tree_selection_get_selected_rows ( selection, NULL );
+    if ( liste == NULL )
+    {
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( FALSE, FALSE );
+        return FALSE;
+    }
+    nbre_selections = g_list_length (liste );
+
+    first_path = g_list_nth_data ( liste, 0 );
+    last_path = g_list_nth_data ( liste, nbre_selections - 1 );
+
+    if ( sens == GDK_LEFTBUTTON )
+    {
+        gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), first_path, NULL, FALSE, 0., 0. );
+        tiers_selected = first_path;
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( FALSE, TRUE );
+    }
+    else
+    {
+        gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), last_path, NULL, FALSE, 0., 0. );
+        tiers_selected = last_path;
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( TRUE, FALSE );
+    }
+
+    return TRUE;
+}
+/**
+ * positionne le tree_view sur le premier tiers sélectionné
+ *
+ * \param tree_view
+ * \param event
+ * \param user_data = NULL
+ *
+ * \return
+ */
+gboolean etats_config_ui_onglet_tiers_show_first_row_selected ( GtkWidget *tree_view,
+                        GdkEventVisibility  *event,
+                        gpointer user_data)
+{
+    GtkTreeSelection *selection;
+    GtkTreePath *start_path;
+    GtkTreePath *end_path;
+    GList *liste;
+
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+    liste = gtk_tree_selection_get_selected_rows ( selection, NULL );
+    if ( liste )
+        tiers_selected = ( GtkTreePath * ) liste->data;
+    else
+    {
+        /* on ajoute un callback pour gérer le changement de sélection */
+        g_signal_connect ( G_OBJECT ( selection ),
+                        "changed",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_selection_changed ),
+                        NULL );
+
+        return FALSE;
+    }
+
+    if ( gtk_tree_view_get_visible_range ( GTK_TREE_VIEW ( tree_view ), &start_path, &end_path ) )
+    {
+        if ( tiers_selected && gtk_tree_path_compare ( tiers_selected, end_path ) == 1 )
+            gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), tiers_selected, NULL, FALSE, 0., 0. );
+
+        gtk_tree_path_free ( start_path );
+        gtk_tree_path_free ( end_path );
+    }
+    else if ( tiers_selected )
+        gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), tiers_selected, NULL, FALSE, 0., 0. );
+
+    /* on ajoute un callback pour gérer le changement de sélection */
+    g_signal_connect ( G_OBJECT ( selection ),
+                        "changed",
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_selection_changed ),
+                        NULL );
+
+    return TRUE;
+}
+
+
+/**
+ * fonction de callback de changement de sélection
+ *
+ * \param selection
+ * \param NULL
+ *
+ * \return
+ */
+void etats_config_ui_onglet_tiers_selection_changed ( GtkTreeSelection *selection,
+                        gpointer user_data )
+{
+    GtkTreeView *tree_view;
+    GtkTreePath *start_path;
+    GtkTreePath *end_path;
+    GtkTreePath *path = NULL;
+    GList *liste;
+
+    tree_view = gtk_tree_selection_get_tree_view ( selection );
+
+    /* on récupère la liste des libnes sélectionnées */
+    liste = gtk_tree_selection_get_selected_rows ( selection, NULL );
+
+    /* on change la sensibilité des boutons de navigation si nécessaire */
+    if ( g_list_length ( liste ) > 1 )
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( TRUE, TRUE );
+    else
+        etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( FALSE, FALSE );
+
+    /* on positionne le tree_view sur la ligne sélectionnée visible la plus proche */
+    if ( gtk_tree_view_get_visible_range ( GTK_TREE_VIEW ( tree_view ), &start_path, &end_path ) )
+    {
+        while ( liste )
+        {
+            path = ( GtkTreePath * ) liste->data;
+
+            if ( gtk_tree_selection_path_is_selected ( selection, path ) )
+            {
+                if ( gtk_tree_path_compare ( start_path, path ) <= 0
+                 &&
+                 gtk_tree_path_compare ( path, end_path ) <= 0 )
+                {
+                    if ( gtk_tree_path_compare ( path, tiers_selected ) == 0 )
+                    {
+                        liste = liste->next;
+                        continue;
+                    }
+                    tiers_selected = path;
+                    break;
+                }
+            }
+            liste = liste->next;
+        }
+
+        /* free the path */
+        gtk_tree_path_free ( start_path );
+        gtk_tree_path_free ( end_path );
+    }
+}
+
+
+/**
+ * gère la sensibilité des boutons premier,précédent, suivant et dernier pour les tiers
+ *
+ * \param show left buttons 0 = insensitif 1 = sensitif -1 = sans changement
+ * \param show right buttons 0 = insensitif 1 = sensitif -1 = sans changement
+ *
+ * \return
+ */
+void etats_config_ui_onglet_tiers_show_hide_prev_next_buttons ( gint show_left,
+                        gint show_right )
+{
+    if ( show_left >= 0 )
+    {
+        etats_config_ui_widget_set_sensitive ( "button_tiers_premier", show_left );
+        etats_config_ui_widget_set_sensitive ( "button_tiers_precedent", show_left );
+    }
+    if ( show_right >= 0 )
+    {
+        etats_config_ui_widget_set_sensitive ( "button_tiers_suivant", show_right );
+        etats_config_ui_widget_set_sensitive ( "button_tiers_dernier", show_right );
+    }
+}
+
+
+/**
+ * Fonction de CALLBACK pour la recherche de tiers
+ *
+ * \param editable
+ * \param new_test
+ * \param longueur ajoutée
+ * \param position de l'ajout
+ * \param tree_view pour la recherche
+ *
+ * \return
+ */
+void etats_config_ui_onglet_tiers_entry_insert_text ( GtkEditable *editable,
+                        gchar *new_text,
+                        gint new_text_length,
+                        gpointer position,
+                        GtkWidget *tree_view )
+{
+    gchar *text;
+
+    /* on bloque l'appel de la fonction */
+    g_signal_handlers_block_by_func ( G_OBJECT ( editable ),
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_entry_insert_text ),
+                        tree_view );
+
+    gtk_editable_insert_text ( editable, new_text, new_text_length, position );
+
+    /* on lance la recherche de la chaine */
+    text = gtk_editable_get_chars ( editable, 0, -1 );
+    etats_config_ui_onglet_tiers_search_iter_from_entry ( text, GTK_TREE_VIEW ( tree_view ), GDK_RIGHTBUTTON );
+
+    /* on débloque l'appel de la fonction */
+    g_signal_handlers_unblock_by_func ( G_OBJECT ( editable ),
+                        G_CALLBACK ( etats_config_ui_onglet_tiers_entry_insert_text ),
+                        tree_view );
+    /* evite d'écrire en double dans l'entry */
+    g_signal_stop_emission_by_name ( editable, "insert_text" );
+}
+
+/**
+ * Fonction de CALLBACK pour la recherche de tiers
+ *
+ * \param editable
+ * \param début du caractère supprimé
+ * \param fin du caractère supprimé
+ * \param tree_view pour la recherche
+ *
+ * \return
+ */
+void etats_config_ui_onglet_tiers_entry_delete_text ( GtkEditable *editable,
+                        gint start_pos,
+                        gint end_pos,
+                        GtkWidget *tree_view )
+{
+    gchar *text;
+
+    text = gtk_editable_get_chars ( editable, 0, start_pos );
+    etats_config_ui_onglet_tiers_search_iter_from_entry ( text, GTK_TREE_VIEW ( tree_view ), GDK_LEFTBUTTON );
+}
+
+
+/**
+ * Fonction de de recherche de tiers
+ *
+ * \param text à rechercher
+ * \param tree_view pour la recherche
+ *
+ * \return
+ */
+void etats_config_ui_onglet_tiers_search_iter_from_entry ( const gchar *text,
+                        GtkTreeView *tree_view,
+                        gint sens)
+{
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    GtkTreePath *path;
+    gint index = 1;
+    gint longueur;
+
+    if ( !text || strlen ( text ) == 0 )
+        return;
+
+    model = gtk_tree_view_get_model ( tree_view );
+    path = gtk_tree_path_new_first ( );
+
+    if ( !gtk_tree_model_get_iter ( model, &iter, path ) )
+        return;
+
+    do
+    {
+        gchar *str;
+        gchar *tmp_str;
+
+        gtk_tree_model_get ( model, &iter, 0, &str, -1 );
+
+        longueur = g_utf8_strlen ( text, -1 );
+        tmp_str = g_strndup ( str, longueur );
+
+        if ( strcmp (  g_utf8_casefold ( tmp_str, -1 ),  g_utf8_casefold ( text, -1 ) ) == 0 )
+        {
+            gtk_tree_view_scroll_to_cell ( GTK_TREE_VIEW ( tree_view ), path, NULL, TRUE, 0.0, 0.0 );
+            break;
+        }
+        if ( path )
+        {
+            gtk_tree_path_next ( path );
+            if ( !gtk_tree_model_get_iter ( model, &iter, path ) )
+                index--;
+        }
+    }
+    /*termine la boucle si la lettre n'existe pas */
+    while ( index );
+}
+
+
+/*RIGHT_PANEL : ONGLET_CATEGORIES*/
+/**
+ * Création de l'onglet Catégories
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_categories_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *tree_view;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_categories" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Categories"), "categories.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    etats_config_ui_widget_set_sensitive ( "vbox_detaille_categ_etat", FALSE );
+
+    /* on crée la liste des catégories */
+    tree_view = etats_config_ui_onglet_categ_budget_tree_view_create ( TRUE );
+
+    /* on met la connection pour rendre sensitif la vbox_detaille_categ_etat */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_detaille_categ_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_detaille_categ_etat" ) );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour déplier replier les catégories */
+    etats_config_ui_toggle_button_init_button_expand ( "categ", tree_view );
+
+    /* on met la connection pour (dé)sélectionner tout ou partie des catégories */
+    etats_config_ui_onglet_categ_budget_init_buttons_select_unselect ( "categ", tree_view, TRUE );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_BUDGETS*/
+/**
+ * Création de l'onglet Budgets
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_budgets_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+    GtkWidget *tree_view;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_ib" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Budgetary lines"), "budgetary_lines.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    etats_config_ui_widget_set_sensitive ( "vbox_detaille_budget_etat", FALSE );
+
+    /* on crée la liste des IB */
+    tree_view = etats_config_ui_onglet_categ_budget_tree_view_create ( FALSE );
+
+    /* on met la connection pour rendre sensitif la hbox_detaille_budget_etat */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_detaille_budget_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        utils_gtkbuilder_get_widget_by_name ( etats_config_builder, "vbox_detaille_budget_etat", NULL ) );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour déplier replier les IB */
+    etats_config_ui_toggle_button_init_button_expand ( "budget", tree_view );
+
+    /* on met la connection pour sélectionner tout ou partie des IB */
+    etats_config_ui_onglet_categ_budget_init_buttons_select_unselect ( "budget", tree_view, FALSE );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/**
+ * create the category/budget list for reports
+ * it's a tree with categories/budget and sub-categories/budgets,
+ * and a check-button to select them
+ *
+ * \param
+ *
+ * \return a GtkWidget : the GtkTreeView
+ * */
+GtkWidget *etats_config_ui_onglet_categ_budget_tree_view_create ( gboolean is_categ )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeViewColumn *column;
+    GtkCellRenderer *cell_renderer;
+    GtkCellRenderer *radio_renderer;
+    gchar *treeview_name;
+
+    /* get the model */
+    model = etats_config_onglet_categ_budget_get_model ( is_categ );
+
+    if ( is_categ )
+        treeview_name = g_strdup ( "treeview_categ" );
+    else
+        treeview_name = g_strdup ( "treeview_budget" );
+
+    /* create the tree view */
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, treeview_name ) );
+    gtk_tree_view_set_headers_visible ( GTK_TREE_VIEW ( tree_view ), FALSE );
+
+    /* set the color of selected row */
+    utils_set_tree_view_selection_and_text_color ( tree_view );
+
+    if ( model )
+    {
+        gtk_tree_view_set_model ( GTK_TREE_VIEW ( tree_view ), model );
+        g_object_unref ( G_OBJECT ( model ) );
+    }
+
+    /* create the column */
+    column = gtk_tree_view_column_new ();
+
+    /* create the toggle button part */
+    radio_renderer = gtk_cell_renderer_toggle_new ();
+    g_object_set ( G_OBJECT ( radio_renderer ), "xalign", 0.0, NULL );
+
+    gtk_tree_view_column_pack_start ( column,
+                        radio_renderer,
+                        FALSE );
+    gtk_tree_view_column_set_attributes ( column,
+                        radio_renderer,
+                        "active", 1,
+                        "activatable", 2,
+                        NULL);
+    g_signal_connect ( G_OBJECT ( radio_renderer ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_onglet_categ_budget_toggled ),
+                        model );
+
+    /* create the text part */
+    cell_renderer = gtk_cell_renderer_text_new ( );
+    g_object_set ( G_OBJECT ( cell_renderer ),
+                        "xalign", 0.0,
+                        NULL );
+    gtk_tree_view_column_pack_start ( column,
+                        cell_renderer,
+                        TRUE );
+    gtk_tree_view_column_set_attributes (column,
+                        cell_renderer,
+                        "text", 0,
+                        NULL );
+
+    gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ), column );
+
+    g_free ( treeview_name );
+
+    return tree_view;
+}
+
+
+/**
+ * initialisation des boutons de sélection des catégories
+ *
+ * \param suffixe name of widgets
+ * \param tree_view
+ *
+ * \return
+ * */
+void etats_config_ui_onglet_categ_budget_init_buttons_select_unselect ( gchar *name,
+                        GtkWidget *tree_view,
+                        gboolean is_categ )
+{
+    GtkWidget *button;
+    gchar *tmp_str;
+
+    tmp_str = g_strconcat ( "togglebutton_select_all_", name, NULL );
+    button = utils_gtkbuilder_get_widget_by_name ( etats_config_builder, tmp_str, NULL );
+    g_signal_connect ( G_OBJECT  ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_categ_budget_check_uncheck_all ),
+                        tree_view );
+    g_free ( tmp_str );
+
+    tmp_str = g_strconcat ( "button_income_", name, NULL );
+    button = utils_gtkbuilder_get_widget_by_name ( etats_config_builder, tmp_str, NULL );
+    g_object_set_data ( G_OBJECT ( button ), "is_categ", GINT_TO_POINTER ( is_categ ) );
+    g_object_set_data ( G_OBJECT ( button ), "type_div", GINT_TO_POINTER ( FALSE ) );
+    g_signal_connect ( G_OBJECT  ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_config_onglet_categ_budget_select_partie_liste ),
+                        tree_view );
+    g_free ( tmp_str );
+
+    tmp_str = g_strconcat ( "button_outgoing_", name, NULL );
+    button = utils_gtkbuilder_get_widget_by_name ( etats_config_builder, tmp_str, NULL );
+    g_object_set_data ( G_OBJECT ( button ), "is_categ", GINT_TO_POINTER ( is_categ ) );
+    g_object_set_data ( G_OBJECT ( button ), "type_div", GINT_TO_POINTER ( TRUE ) );
+    g_signal_connect ( G_OBJECT  ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_config_onglet_categ_budget_select_partie_liste ),
+                        tree_view );
+    g_free ( tmp_str );
+}
+
+
+/**
+ * coche ou décoche toutes les cases du tree_view
+ *
+ * \param toggle_button
+ * \param tree_view
+ *
+ * \return
+ * */
+void etats_config_ui_onglet_categ_budget_check_uncheck_all ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view )
+{
+    GtkTreeModel *model;
+    gchar *label;
+    gboolean toggle;
+
+    toggle = gtk_toggle_button_get_active ( togglebutton );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+
+    etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( model, toggle );
+
+    if ( ( toggle ) )
+        label = g_strdup ( _("Unselect all") );
+    else
+        label = g_strdup ( _("Select all") );
+
+    gtk_button_set_label ( GTK_BUTTON ( togglebutton ), label );
+}
+
+
+/*RIGHT_PANEL : ONGLET_TEXTES*/
+/**
+ * Création de l'onglet recherche de textes
+ *
+ * \param gint page
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_textes_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_texte" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Transaction content"), "text.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_utilise_texte" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour rendre sensitif la vbox_generale_textes_etat */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_generale_textes_etat" ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* on retourne la vbox */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_MONTANTS*/
+/**
+ * Création de l'onglet recherche de montants
+ *
+ * \param gint page
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_montants_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    devel_debug (NULL);
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_montant" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Amount"), "amount.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_utilise_montant" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour rendre sensitif la vbox_generale_textes_etat */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_generale_montants_etat" ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* on retourne la vbox */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_MODE_PAIEMENT*/
+/**
+ * Création de l'onglet moyens de paiement
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_mode_paiement_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *tree_view;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_mode_paiement" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Payment methods"), "payment.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    etats_config_ui_widget_set_sensitive ( "vbox_mode_paiement_etat", FALSE );
+
+    /* on crée la liste des moyens de paiement */
+    etats_config_ui_tree_view_init ( "treeview_mode_paiement",
+                        etats_config_onglet_mode_paiement_get_model,
+                        GTK_SELECTION_MULTIPLE,
+                        NULL );
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_mode_paiement" ) );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_detaille_mode_paiement_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour rendre sensitif la vbox_generale_comptes_etat */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_mode_paiement_etat" ) );
+
+    /* on met la connection pour (dé)sélectionner tous les tiers */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder,
+                        "togglebutton_select_all_mode_paiement" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( utils_togglebutton_select_unselect_all_rows ),
+                        tree_view );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    return vbox_onglet;
+}
+
+
+/**
+ * Sélectionne les iters en fonction des données de la liste
+ *
+ * \param liste des lignes à sélectionner
+ * \param nom du tree_view concerné
+ *
+ * \return
+ */
+void etats_config_ui_onglet_mode_paiement_select_rows_from_list ( GSList *liste,
+                        const gchar *treeview_name )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    GSList *tmp_list;
+
+    if ( !liste )
+        return;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, treeview_name ) );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+
+    if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
+    {
+        do
+        {
+            gchar *tmp_str;
+
+            gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, 0, &tmp_str, -1 );
+
+            tmp_list = liste;
+            while ( tmp_list )
+            {
+                gchar *str;
+                
+                str = tmp_list -> data;
+
+                if ( strcmp ( str, tmp_str ) == 0 )
+                    gtk_tree_selection_select_iter ( GTK_TREE_SELECTION ( selection ), &iter );
+
+                tmp_list = tmp_list -> next;
+            }
+            g_free ( tmp_str );
+        }
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
+    }
+}
+
+
+/**
+ * récupère la liste des libellés des item sélectionnés
+ *
+ * \param nom du tree_view
+ *
+ * \return numéro de la ligne sélectionnée
+ */
+GSList *etats_config_ui_onglet_mode_paiement_get_list_rows_selected ( const gchar *treeview_name )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    GSList *tmp_list = NULL;
+    GList *rows_list;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, treeview_name ) );
+    if ( !tree_view )
+        return NULL;
+
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+    rows_list = gtk_tree_selection_get_selected_rows ( selection, &model );
+    while ( rows_list )
+    {
+        GtkTreePath *path;
+        gchar *tmp_str;
+
+        path = rows_list->data;
+
+        gtk_tree_model_get_iter ( model, &iter, path) ;
+        gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, 0, &tmp_str, -1 );
+
+        tmp_list = g_slist_append ( tmp_list, tmp_str );
+        
+        gtk_tree_path_free ( path );
+        rows_list = rows_list->next;
+    }
+    g_list_free ( rows_list );
+
+    return tmp_list;
+}
+
+
+/*RIGHT_PANEL : ONGLET_DIVERS*/
+/**
+ * Création de l'onglet Divers
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_divers_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "onglet_etat_divers" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Miscellaneous"), "generalities.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "radiobutton_marked" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_divers_update_style_left_panel ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour rendre sensitif la vbox_marked_buttons */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_marked_buttons" ) );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "radiobutton_marked_No_R" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_divers_update_style_left_panel ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_pas_detailler_ventilation" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_onglet_divers_update_style_left_panel ),
+                        GINT_TO_POINTER ( page ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    return vbox_onglet;
+}
+
+
+/**
+ * If applicable, update report navigation tree style to reflect which
+ * pages have been changed.
+ *
+ * \param page_number Page that contained an interface element just
+ *                      changed that triggered this event.
+ *
+ * \return      FALSE
+ */
+gboolean etats_config_ui_onglet_divers_update_style_left_panel ( GtkWidget *button,
+                        gint *page_number )
+{
+    gint active;
+    gint index;
+
+    index = etats_config_ui_buttons_radio_get_active_index ( "radiobutton_marked_all" );
+    active = etats_config_ui_toggle_button_get_actif ( "bouton_pas_detailler_ventilation" );
+
+    if ( GTK_IS_RADIO_BUTTON ( button ) )
+    {
+        if ( active == 0 )
+            etats_config_ui_left_panel_tree_view_update_style ( button, page_number );
+    }
+    else
+    {
+        if ( index == 0 )
+            etats_config_ui_left_panel_tree_view_update_style ( button, page_number );
+    }
+
+    return TRUE;
+}
+
+
+/*RIGHT_PANEL : ONGLET_DATA_GROUPING*/
+/**
+ * Création de l'onglet groupement des donnés
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_data_grouping_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "page_data_grouping" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Data grouping"), "organization.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    etats_config_ui_onglet_data_grouping_init_tree_view ( );
+
+    /* on met la connection pour modifier l'ordre des données dans le tree_view data_grouping */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "button_data_grouping_up" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_config_ui_onglet_data_grouping_button_clicked ),
+                        GINT_TO_POINTER ( GSB_UP ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "button_data_grouping_down" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_config_ui_onglet_data_grouping_button_clicked ),
+                        GINT_TO_POINTER ( GSB_DOWN ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/**
+ * crée un nouveau tree_view initialisé avec model.
+ * le modèle comporte 3 colonnes : G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT
+ * le tree_view n'affiche que la colonne texte.
+ *
+ * \return the tree_wiew
+ */
+gboolean etats_config_ui_onglet_data_grouping_init_tree_view ( void )
+{
+    GtkWidget *tree_view;
+    GtkListStore *store;
+    GtkTreeSelection *selection;
+    GtkTreeViewColumn *column;
+    GtkCellRenderer *cell;
+    GtkTreeDragDestIface *dst_iface;
+    GtkTreeDragSourceIface *src_iface;
+    static GtkTargetEntry row_targets[] =
+    {
+        { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, 0 }
+    };
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_data_grouping" ) );
+    if ( !tree_view )
+        return FALSE;
+
+    /* colonnes du list_store :
+     *  1 : chaine affichée
+     *  2 : numéro de ligne dans le modèle
+     *  3 : type de donnée : 1 Categ, 3 IB, 5 Account, 6 Payee.
+     */
+    store = gtk_list_store_new ( 3, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT );
+    gtk_tree_view_set_model ( GTK_TREE_VIEW ( tree_view ), GTK_TREE_MODEL ( store ) );
+    g_object_unref ( G_OBJECT ( store ) );
+
+    utils_set_tree_view_selection_and_text_color ( tree_view );
+
+    /* set the column */
+    cell = gtk_cell_renderer_text_new ( );
+
+    column = gtk_tree_view_column_new_with_attributes ( NULL,
+                        cell,
+                        "text", 0,
+                        NULL);
+    gtk_tree_view_column_set_sizing ( GTK_TREE_VIEW_COLUMN ( column ), GTK_TREE_VIEW_COLUMN_FIXED );
+    gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
+                        GTK_TREE_VIEW_COLUMN ( column ) );
+    gtk_tree_view_column_set_resizable ( column, TRUE );
+
+    /* Enable drag & drop */
+    gtk_tree_view_enable_model_drag_source ( GTK_TREE_VIEW ( tree_view ),
+                        GDK_BUTTON1_MASK,
+                        row_targets,
+                        1,
+                        GDK_ACTION_MOVE );
+    gtk_tree_view_enable_model_drag_dest ( GTK_TREE_VIEW ( tree_view ),
+                        row_targets,
+                        1,
+                        GDK_ACTION_MOVE );
+    gtk_tree_view_set_reorderable ( GTK_TREE_VIEW (tree_view), TRUE );
+
+    dst_iface = GTK_TREE_DRAG_DEST_GET_IFACE ( store );
+    if ( dst_iface )
+    {
+        dst_iface -> drag_data_received = &etats_config_ui_onglet_data_grouping_drag_data_received;
+        dst_iface -> row_drop_possible = &etats_config_ui_onglet_data_grouping_drop_possible;
+    }
+
+    src_iface = GTK_TREE_DRAG_SOURCE_GET_IFACE ( store );
+    if ( src_iface )
+    {
+        gtk_selection_add_target ( tree_view,
+                      GDK_SELECTION_PRIMARY,
+                      GDK_SELECTION_TYPE_ATOM,
+                      1 );
+        src_iface -> drag_data_get = &etats_config_ui_onglet_data_grouping_drag_data_get;
+    }
+
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+    g_signal_connect ( G_OBJECT ( selection ),
+                        "changed",
+                        G_CALLBACK ( etats_config_ui_onglet_data_grouping_selection_changed ),
+                        tree_view );
+
+    /* return */
+    return TRUE;
+}
+
+
+/**
+ * callback when treeview_data_grouping receive a drag and drop signal
+ *
+ * \param drag_dest
+ * \param dest_path
+ * \param selection_data
+ *
+ * \return FALSE
+ */
+gboolean etats_config_ui_onglet_data_grouping_drag_data_received ( GtkTreeDragDest *drag_dest,
+                        GtkTreePath *dest_path,
+                        GtkSelectionData *selection_data )
+{
+    if ( dest_path && selection_data )
+    {
+        GtkTreeModel *model;
+        GtkTreeIter src_iter;
+        GtkTreeIter dest_iter;
+        GtkTreePath *src_path;
+        gint src_pos = 0;
+        gint dest_pos;
+        gint src_type_data;
+        gint dest_type_data;
+
+        /* On récupère le model et le path d'origine */
+        gtk_tree_get_row_drag_data ( selection_data, &model, &src_path );
+        
+        /* On récupère les données des 2 lignes à modifier */
+        if ( gtk_tree_model_get_iter ( model, &src_iter, src_path ) )
+            gtk_tree_model_get ( model, &src_iter, 1, &src_pos, 2, &src_type_data, -1 );
+
+        if ( gtk_tree_model_get_iter ( model, &dest_iter, dest_path ) )
+            gtk_tree_model_get ( model, &dest_iter, 1, &dest_pos, 2, &dest_type_data, -1 );
+        else
+            return FALSE;
+
+        /* on met à jour la liste des types pour le tri de données */
+        etats_config_onglet_data_grouping_move_in_list ( src_pos,
+                        src_type_data,
+                        dest_pos );
+
+        return TRUE;
+    }
+
+    /* return */
+    return FALSE;
+}
+
+
+/**
+ * Fill the drag & drop structure with the path of selected column.
+ * This is an interface function called from GTK, much like a callback.
+ *
+ * \param drag_source       Not used.
+ * \param path              Original path for the gtk selection.
+ * \param selection_data    A pointer to the drag & drop structure.
+ *
+ * \return FALSE, to allow future processing by the callback chain.
+ */
+gboolean etats_config_ui_onglet_data_grouping_drag_data_get ( GtkTreeDragSource *drag_source,
+                        GtkTreePath *path,
+                        GtkSelectionData *selection_data )
+{
+    if ( path )
+    {
+        GtkWidget *tree_view;
+        GtkTreeModel *model;
+
+        tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_data_grouping" ) );
+        model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+
+        gtk_tree_set_row_drag_data ( selection_data, GTK_TREE_MODEL ( model ), path );
+    }
+
+    return FALSE;
+}
+/**
+ * Checks the validity of the change of position
+ * This is an interface function called from GTK, much like a callback.
+ *
+ * \param drag_dest         Not used.
+ * \param path              Original path for the gtk selection.
+ * \param selection_data    A pointer to the drag & drop structure.
+ *
+ * \return FALSE, to allow future processing by the callback chain.
+ */
+gboolean etats_config_ui_onglet_data_grouping_drop_possible ( GtkTreeDragDest *drag_dest,
+                        GtkTreePath *dest_path,
+                        GtkSelectionData *selection_data )
+{
+    GtkTreePath *orig_path;
+    GtkTreeModel *model;
+    gint src_pos;
+    gint dst_pos = 0;
+    GtkTreeIter iter;
+
+    gtk_tree_get_row_drag_data ( selection_data, &model, &orig_path );
+
+    if ( gtk_tree_model_get_iter ( model, &iter, orig_path ) )
+        gtk_tree_model_get ( model, &iter, 1, &src_pos, -1 );
+
+    if ( gtk_tree_model_get_iter ( model, &iter, dest_path ) )
+        gtk_tree_model_get ( model, &iter, 1, &dst_pos, -1 );
+
+    if ( dst_pos < 0 || dst_pos > 3 )
+        return FALSE;
+
+    if ( src_pos != dst_pos )
+        return TRUE;
+    else
+        return FALSE;
+}
+
+
+/**
+ * callback when a button receive a clicked signal
+ *
+ * \param the button
+ * \param a pointer for the direction of movement
+ *
+ * \return
+ */
+void etats_config_ui_onglet_data_grouping_button_clicked ( GtkWidget *button,
+                        gpointer data )
+{
+    GtkWidget *tree_view;
+    GtkTreeSelection *selection;
+    GtkTreeModel *model;
+    GtkTreeIter orig_iter;
+
+    /* On récupère le model et le path d'origine */
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "treeview_data_grouping" ) );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+
+    if ( gtk_tree_selection_get_selected ( selection, &model, &orig_iter ) )
+    {
+        GtkTreeIter dest_iter;
+        GtkTreePath *path;
+        gchar *string = NULL;
+        gint orig_pos = 0;
+        gint dest_pos;
+        gint orig_type_data;
+        gint dest_type_data;
+        gint sens;
+
+        sens = GPOINTER_TO_INT ( data );
+
+        path = gtk_tree_model_get_path ( model, &orig_iter );
+
+        /* On récupère les données des 2 lignes à modifier */
+        gtk_tree_model_get ( model, &orig_iter, 1, &orig_pos, 2, &orig_type_data, -1 );
+
+        if ( sens == GSB_UP )
+            gtk_tree_path_prev ( path );
+        else
+            gtk_tree_path_next ( path );
+            
+        if ( gtk_tree_model_get_iter ( model, &dest_iter, path ) )
+            gtk_tree_model_get ( model, &dest_iter, 1, &dest_pos, 2, &dest_type_data, -1 );
+        else
+            return;
+        /* on met à jour la ligne de destination */
+        string = etats_config_onglet_data_grouping_get_string ( orig_type_data, dest_pos );
+        gtk_list_store_set ( GTK_LIST_STORE ( model ), &dest_iter, 0, string, 2, orig_type_data, -1 );
+
+        g_free ( string );
+
+        /* on met à jour la ligne d'origine */
+        string = etats_config_onglet_data_grouping_get_string ( dest_type_data, orig_pos );
+        gtk_list_store_set ( GTK_LIST_STORE ( model ), &orig_iter, 0, string, 2, dest_type_data, -1 );
+
+        /* on garde la sélection sur le même iter */
+        gtk_tree_selection_select_path ( selection, path );
+
+        g_free ( string );
+    }
+}
+
+
+/**
+ * fonction de callback de changement de sélection
+ *
+ * \param selection
+ * \param NULL
+ *
+ * \return
+ */
+void etats_config_ui_onglet_data_grouping_selection_changed ( GtkTreeSelection *selection,
+                        GtkWidget *tree_view )
+{
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+
+    if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
+    {
+        gint pos;
+
+        gtk_tree_model_get ( model, &iter, 1, &pos, -1 );
+        switch ( pos )
+        {
+            case 0:
+                desensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_config_builder, "button_data_grouping_up" ) ) );
+                sensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_config_builder, "button_data_grouping_down" ) ) );
+                break;
+            case 3:
+                sensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_config_builder, "button_data_grouping_up" ) ) );
+                desensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_config_builder, "button_data_grouping_down" ) ) );
+                break;
+            default:
+                sensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_config_builder, "button_data_grouping_up" ) ) );
+                sensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_config_builder, "button_data_grouping_down" ) ) );
+                break;
+        }
+    }
+}
+
+
+/*RIGHT_PANEL : ONGLET_DATA_SEPARATION*/
+/**
+ * Création de l'onglet séparation des donnés
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_data_separation_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkComboBox *combo_1;
+    GtkComboBox *combo_2;
+    GtkTreeModel *model;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "page_data_separation" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Data separation"), "organization.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    /* on met la connexion pour la séparation par exercice avec le bouton radio_button_utilise_exo */
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object ( etats_config_builder, "radio_button_utilise_exo" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_separe_exo_etat" ) );
+
+    /* on met la connexion pour rendre sensible la boite avec le bouton bouton_type_separe_plages_etat */
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object ( etats_config_builder, "bouton_separe_plages_etat" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "paddingbox_data_separation2" ) );
+
+    /* on crée le bouton avec les pérodes pour la séparation de l'état */
+    model = GTK_TREE_MODEL ( utils_list_store_create_from_string_array ( data_separation_periodes ) );
+    combo_1 = GTK_COMBO_BOX ( gtk_builder_get_object ( etats_config_builder, "bouton_type_separe_plages_etat" ) );
+    gtk_combo_box_set_model ( combo_1, model );
+    utils_gtk_combo_box_set_text_renderer ( GTK_COMBO_BOX ( combo_1 ), 0 );
+
+    model = GTK_TREE_MODEL ( utils_list_store_create_from_string_array ( jours_semaine ) );
+    combo_2 = GTK_COMBO_BOX ( gtk_builder_get_object ( etats_config_builder, "bouton_debut_semaine" ) );
+    gtk_combo_box_set_model ( combo_2, model );
+    utils_gtk_combo_box_set_text_renderer ( GTK_COMBO_BOX ( combo_2 ), 0 );
+
+    /* on connecte le signal "changed" au bouton bouton_type_separe_plages_etat
+     * pour rendre insensible le choix du jour de la semaine pour les choix
+     * autres que la semaine. On le met ici pour que l'initialisation se fasse
+     * proprement */
+    g_signal_connect ( G_OBJECT ( combo_1 ),
+                        "changed",
+                        G_CALLBACK ( etats_config_onglet_data_separation_combo_changed ),
+                        combo_2 );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_AFFICHAGE_GENERALITES*/
+/**
+ * Création de l'onglet affichage des generalites
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_affichage_generalites_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "affichage_etat_generalites" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Generalities"), "generalities.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_AFFICHAGE_TITLES*/
+/**
+ * Création de l'onglet affichage de diverses données
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_affichage_titles_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "affichage_etat_titles" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Titles"), "title.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    /* on met les connexions pour sensibiliser désensibiliser les données associées */
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object ( etats_config_builder, "bouton_regroupe_ope_compte_etat" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_affiche_sous_total_compte" ) );
+
+    /* affichage possible des tiers */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_utilise_tiers_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_afficher_noms_tiers" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_affiche_sous_total_tiers" ) );
+
+    /* affichage possible des categories */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_group_by_categ" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_afficher_noms_categ" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_affiche_sous_total_categ" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_afficher_sous_categ" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_affiche_sous_total_sous_categ" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_afficher_pas_de_sous_categ" ) );
+
+    /* affichage possible des ib */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_utilise_ib_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_afficher_noms_ib" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_affiche_sous_total_ib" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_afficher_sous_ib" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_affiche_sous_total_sous_ib" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "bouton_afficher_pas_de_sous_ib" ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_AFFICHAGE_OPERATIONS*/
+/**
+ * Création de l'onglet affichage de opérations
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_affichage_operations_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+    GtkComboBox *combo;
+    GtkTreeModel *model;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "affichage_etat_operations" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Transactions display"), "transdisplay.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "bouton_afficher_opes" ) );
+    /* on met la connection pour changer le style de la ligne du panneau de gauche */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_config_ui_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour rendre sensitif la vbox_show_transactions */
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_config_builder, "vbox_show_transactions" ) );
+
+    /* on crée le bouton avec les types de classement des opérations */
+    model = GTK_TREE_MODEL ( utils_list_store_create_from_string_array ( etats_config_ui_classement_operations ) );
+    combo = GTK_COMBO_BOX ( gtk_builder_get_object ( etats_config_builder, "bouton_choix_classement_ope_etat" ) );
+    gtk_combo_box_set_model ( combo, model );
+    utils_gtk_combo_box_set_text_renderer ( GTK_COMBO_BOX ( combo ), 0 );
+
+    /* on met les connexions */
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object (
+                        etats_config_builder, "bouton_afficher_categ_opes" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object (
+                        etats_config_builder, "bouton_afficher_sous_categ_opes" ) );
+
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object (
+                        etats_config_builder, "bouton_afficher_ib_opes" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object (
+                        etats_config_builder, "bouton_afficher_sous_ib_opes" ) );
+
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object (
+                        etats_config_builder, "bouton_afficher_titres_colonnes" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object (
+                        etats_config_builder, "bouton_titre_changement" ) );
+
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object (
+                        etats_config_builder, "bouton_afficher_titres_colonnes" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object (
+                        etats_config_builder, "bouton_titre_en_haut" ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_AFFICHAGE_DEVISES*/
+/**
+ * Création de l'onglet affichage des devises
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_onglet_affichage_devises_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, "affichage_etat_devises" ) );
+
+    vbox = new_vbox_with_title_and_icon ( _("Totals currencies"), "currencies.png" );
+
+    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ), vbox, FALSE, FALSE, 0 );
+    gtk_box_reorder_child ( GTK_BOX ( vbox_onglet ), vbox, 0 );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    etats_config_onglet_affichage_devises_make_combobox ( );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    return vbox_onglet;
+}
+
+
+/*FONCTIONS UTILITAIRES COMMUNES*/
+/**
+ * retourne l'index du radiobutton actif.
+ *
+ * \param nom du radio_button
+ *
+ * \return index bouton actif
+ */
+gint etats_config_ui_buttons_radio_get_active_index ( const gchar *button_name )
+{
+    GtkWidget *radio_button;
+    GSList *liste;
+    GSList *tmp_list;
+    gint index = 0;
+
+    radio_button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, button_name ) );
+
+    liste = g_slist_copy ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( radio_button ) ) );
+    tmp_list = g_slist_reverse ( liste );
+
+    while ( tmp_list )
+    {
+        GtkWidget *button;
+
+        button = tmp_list->data;
+        if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button ) ) )
+            break;
+
+        index++;
+        tmp_list = tmp_list->next;
+    }
+
+    g_slist_free ( liste );
+
+    return index;
+}
+
+/**
+ * rend actif le button qui correspond à l'index passé en paramètre.
+ *
+ * \param nom du radio_button
+ * \param index du bouton à rendre actif
+ *
+ * \return index bouton actif
+ */
+void etats_config_ui_buttons_radio_set_active_index ( const gchar *button_name,
+                        gint index )
+{
+    GtkWidget *radio_button;
+    GSList *liste;
+    GSList *tmp_list;
+
+    radio_button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, button_name ) );
+
+    liste = g_slist_copy ( gtk_radio_button_get_group ( GTK_RADIO_BUTTON ( radio_button ) ) );
+    tmp_list = g_slist_reverse ( liste );
+
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( g_slist_nth_data ( tmp_list, index ) ), TRUE );
+
+    g_slist_free ( liste );
+}
+
+
+/**
+ * initialise le bouton expand collapse all
+ *
+ * \param suffixe name
+ * \param tree_view
+ *
+ * \return
+ */
+void etats_config_ui_toggle_button_init_button_expand ( gchar *name,
+                        GtkWidget *tree_view )
+{
+    GtkWidget *button;
+    gchar *tmp_str;
+
+    tmp_str = g_strconcat ( "togglebutton_expand_", name, NULL );
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    g_free ( tmp_str );
+
+    tmp_str = g_strconcat ( "hbox_toggle_expand_", name, NULL );
+    g_object_set_data ( G_OBJECT ( button ), "hbox_expand",
+                        gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+    g_free ( tmp_str );
+
+    tmp_str = g_strconcat ( "hbox_toggle_collapse_", name, NULL );
+    g_object_set_data ( G_OBJECT ( button ), "hbox_collapse",
+                        gtk_builder_get_object ( etats_config_builder, tmp_str ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( utils_togglebutton_collapse_expand_all_rows ),
+                        tree_view );
+}
+
+
+/**
+ * retourne l'état du togglebutton dont le nom est passé en paramètre.
+ *
+ * \param widget name
+ *
+ * \return activ
+ */
+gboolean etats_config_ui_toggle_button_get_actif ( const gchar *button_name )
+{
+    GtkWidget *button = NULL;
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, button_name ) );
+    if ( !button )
+        return FALSE;
+
+    /* return */
+    return gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button ) );
+}
+
+
+/**
+ *  Positionne letogglebutton demandé par son nom en fonction de actif
+ *
+ *\param widget name
+ *\param actif
+ *
+ * \return TRUE if success FALSE otherwise
+ */
+gboolean etats_config_ui_toggle_button_set_actif ( const gchar *button_name,
+                        gboolean actif )
+{
+    GtkWidget *button = NULL;
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, button_name ) );
+    if ( !button )
+        return FALSE;
+
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), actif );
+
+    return TRUE;
+}
+
+
+/**
+ * crée un nouveau tree_view initialisé avec model.
+ * le modèle comporte deux colonnes : G_TYPE_STRING, G_TYPE_INT
+ * le tree_view n'affiche que la colonne texte.
+ *
+ * \return the tree_wiew
+ */
+GtkWidget *etats_config_ui_tree_view_new_with_model ( const gchar *treeview_name,
+                        GtkTreeModel *model )
+{
+    GtkWidget *tree_view;
+    GtkCellRenderer *cell;
+    GtkTreeViewColumn *column;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, treeview_name ) );
+    if ( !tree_view )
+        return NULL;
+
+    gtk_tree_view_set_model ( GTK_TREE_VIEW ( tree_view ), GTK_TREE_MODEL ( model ) );
+    g_object_unref ( G_OBJECT ( model ) );
+
+    utils_set_tree_view_selection_and_text_color ( tree_view );
+
+    /* set the column */
+    cell = gtk_cell_renderer_text_new ( );
+
+    column = gtk_tree_view_column_new_with_attributes ( NULL,
+                        cell,
+                        "text", 0,
+                        NULL);
+    gtk_tree_view_column_set_sizing ( GTK_TREE_VIEW_COLUMN ( column ), GTK_TREE_VIEW_COLUMN_FIXED );
+    gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
+                        GTK_TREE_VIEW_COLUMN ( column ) );
+    gtk_tree_view_column_set_resizable ( column, TRUE );
+
+    return tree_view;
+}
+
+
+/**
+ * récupère l'index l'iter selectionné
+ *
+ * \param nom du tree_view
+ *
+ * \return numéro de la ligne sélectionnée
+ */
+gint etats_config_ui_tree_view_get_single_row_selected ( const gchar *treeview_name )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, treeview_name ) );
+    if ( !tree_view )
+        return -1;
+
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+
+    if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
+    {
+        gint index;
+
+        gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, 1, &index, -1 );
+
+        return index;
+    }
+    return -1;
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+void etats_config_ui_tree_view_select_single_row ( const gchar *treeview_name,
+                        gint numero )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, treeview_name ) );
+    if ( !tree_view )
+        return;
+
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+
+    if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
+    {
+        do
+        {
+            gint index;
+
+            gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, 1, &index, -1 );
+
+            if ( numero == index )
+            {
+                gtk_tree_selection_select_iter ( GTK_TREE_SELECTION ( selection ), &iter );
+                break;
+            }
+        }
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
+    }
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_config_ui_widget_get_widget_by_name ( const gchar *parent_name,
+                        const gchar *child_name )
+{
+    return utils_gtkbuilder_get_widget_by_name ( etats_config_builder, parent_name, child_name );
+}
+
+
+/**
+ * récupère l'index l'iter selectionné
+ *
+ * \param nom du tree_view
+ *
+ * \return numéro de la ligne sélectionnée
+ */
+GSList *etats_config_ui_tree_view_get_list_rows_selected ( const gchar *treeview_name )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    GSList *tmp_list = NULL;
+    GList *rows_list;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, treeview_name ) );
+    if ( !tree_view )
+        return NULL;
+
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+    rows_list = gtk_tree_selection_get_selected_rows ( selection, &model );
+    while ( rows_list )
+    {
+        GtkTreePath *path;
+        gint index;
+
+        path = rows_list->data;
+
+        gtk_tree_model_get_iter ( model, &iter, path) ;
+        gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, 1, &index, -1 );
+
+        tmp_list = g_slist_append ( tmp_list, GINT_TO_POINTER ( index ) );
+        
+        gtk_tree_path_free ( path );
+        rows_list = rows_list->next;
+    }
+    g_list_free ( rows_list );
+
+    return tmp_list;
+}
+
+
+/**
+ * initialise le tree_view avec son modèle et son type de sélection
+ *
+ * \param
+ *
+ * \return
+ */
+void etats_config_ui_tree_view_init ( const gchar *treeview_name,
+                        GtkTreeModel *(*function) ( void ),
+                        GtkSelectionMode type_selection,
+                        GCallback selection_callback )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+
+    /* on récupère le model par appel à function */
+    model = function ( );
+
+    tree_view = etats_config_ui_tree_view_new_with_model ( treeview_name, GTK_TREE_MODEL ( model ) );
+    gtk_tree_view_set_fixed_height_mode ( GTK_TREE_VIEW ( tree_view ), TRUE );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+    gtk_tree_selection_set_mode ( selection, type_selection );
+
+    if ( selection_callback )
+        g_signal_connect ( G_OBJECT ( selection ),
+                        "changed",
+                        G_CALLBACK ( selection_callback ),
+                        NULL );
+}
+
+
+/**
+ * Sélectionne les iters en fonction des données de la liste
+ *
+ * \param liste des lignes à sélectionner
+ * \param nom du tree_view concerné
+ * \param numéro de la colonne contenant la donnée testée
+ *
+ * \return
+ */
+void etats_config_ui_tree_view_select_rows_from_list ( GSList *liste,
+                        const gchar *treeview_name,
+                        gint column )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+    GtkTreeIter iter;
+    GSList *tmp_list;
+
+    if ( !liste )
+        return;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, treeview_name ) );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+
+    if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
+    {
+        do
+        {
+            gint tmp_number;
+
+            gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, column, &tmp_number, -1 );
+
+            tmp_list = liste;
+            while ( tmp_list )
+            {
+                gint result;
+                
+                result = GPOINTER_TO_INT ( tmp_list -> data );
+
+                if ( result == tmp_number )
+                    gtk_tree_selection_select_iter ( GTK_TREE_SELECTION ( selection ), &iter );
+
+                tmp_list = tmp_list -> next;
+            }
+        }
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
+    }
+}
+
+
+/**
+ *  rend sensible le widget demandé par son nom en fonction de sensible
+ *
+ *\param widget name
+ *\param sensitive
+ *
+ * \return TRUE if success FALSE otherwise
+ */
+gboolean etats_config_ui_widget_set_sensitive ( const gchar *widget_name,
+                        gboolean sensitive )
+{
+    GtkWidget *widget = NULL;
+
+    widget = GTK_WIDGET ( gtk_builder_get_object ( etats_config_builder, widget_name ) );
+    if ( !widget )
+        return FALSE;
+
+    gtk_widget_set_sensitive ( widget, sensitive );
+
+    return TRUE;
+}
+
+
+/*END_PRIVATE_FUNCTIONS*/
+/* Local Variables: */
+/* c-basic-offset: 4 */
+/* End: */
+
diff --git a/src/etats_config_ui.h b/src/etats_config_ui.h
new file mode 100644
index 0000000..37ae449
--- /dev/null
+++ b/src/etats_config_ui.h
@@ -0,0 +1,42 @@
+#ifndef GSB_ETATS_CONFIG_UI_H
+#define GSB_ETATS_CONFIG_UI_H (1)
+
+/* START_INCLUDE_H */
+/* END_INCLUDE_H */
+
+/* START_DECLARATION */
+GtkWidget *etats_config_ui_create_dialog ( void );
+gint etats_config_ui_buttons_radio_get_active_index ( const gchar *button_name );
+void etats_config_ui_buttons_radio_set_active_index ( const gchar *button_name,
+                        gint index );
+void etats_config_ui_free_all_var ( void );
+gboolean etats_config_ui_left_panel_tree_view_select_last_page ( void );
+
+void etats_config_ui_onglet_categ_budget_check_uncheck_all ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view );
+void etats_config_ui_onglet_comptes_select_unselect ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view );
+GSList *etats_config_ui_onglet_mode_paiement_get_list_rows_selected ( const gchar *treeview_name );
+void etats_config_ui_onglet_mode_paiement_select_rows_from_list ( GSList *liste,
+                        const gchar *treeview_name );
+void etats_config_ui_onglet_periode_date_interval_sensitive ( gboolean show );
+
+GSList *etats_config_ui_tree_view_get_list_rows_selected ( const gchar *treeview_name );
+gint etats_config_ui_tree_view_get_single_row_selected ( const gchar *treeview_name );
+void etats_config_ui_tree_view_select_rows_from_list ( GSList *liste,
+                        const gchar *treeview_name,
+                        gint column );
+void etats_config_ui_tree_view_select_single_row ( const gchar *treeview_name,
+                        gint numero );
+
+gboolean etats_config_ui_toggle_button_get_actif ( const gchar *widget_name );
+gboolean etats_config_ui_toggle_button_set_actif ( const gchar *widget_name,
+     ean etats_config_ui_toggle_button_set_actif ( const gchar *widget_name,    ame );    w_name );     ) );  ) );   ),  ;  );  ment )),    ),  mparison_number))  umber)) -> menu_item ),  item ),   ’x-c+  ã\ÿ  €Oc+           Ø\ÿ         ÐÖ\ÿ  k€c+  6                    è     è!     è!      â\ÿ  ã\ÿ  x4-c+           Ù\ÿ          ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ         À/‘c+  ujc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          x4-c+           Ù\ÿ          Ð×\ÿ  k€c+  à!     à!      â\ÿ  ã\ÿ  Hþc+          àÙ\ÿ         ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ  Ðâ\ÿ  Èâ\ÿ  8‹1c+  Œp˜        ã\ÿ  ujc+  €Šc+                  àÙ\ÿ         °Ø\ÿ  k€c+          G       H   I       J   K           M   N   O       P    â\ÿ  ã\ÿ  Hµãc+          €Û\ÿ         ’bc+          †€c+   â\ÿ         0/‘c+  ujc+   @-c+   éÀc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          Hµãc+          €Û\ÿ 
         ÀÙ\ÿ  k€c+  8µãc+          €Û\ÿ         ðÙ\ÿ  k€c+  (µãc+          €Û\ÿ          Ú\ÿ  k€c+  µãc+          €Û\ÿ         PÚ\ÿ  k€c+  	       ¨.‘c+  ujc+         ¨)‘c+  ÐÔ\ÿ          Š8Ác+  eic+         Ø$‘c+  ðÚ\ÿ          y8Ác+  eic+           ‘c+   Û\ÿ          Z8Ác+  eic+  ØäÀc+   @-c+   éÀc+    ‘c+  ØD-c+  Ø$‘c+  ¨)‘c+  €Šc+          8‹1c+                        ­Œc+  ã\ÿ  p{Àc+          ÐÜ\ÿ           Û\ÿ  k€c+      5   6   7   8   :   <   =   >       ?       @   B   D        â\ÿ  ã\ÿ  ୉c+                 ã\ÿ  ujc+         …1c+  PÛ\ÿ          ­Œc+  eic+  …1c+          Õ_ at fÆS         Qöl±íÁÃXc+  ã\ÿ  ୉c+          àÝ\ÿ         °Ü\ÿ  k€c+  u]ÞÓ	4Q ÷U^Qʉ§ ¶uª¹ñìò*ēv â\ÿ  ã\ÿ  HþUc+          D’c+          Pä\ÿ  ¦Pôc+  ¦Pôc+         –c+  ßâ\ÿ  ä\ÿ  Èâ\ÿ  0ß\ÿ  O-c+  ujc+  ØD-c+  å\ÿ  ¢Pôc+  `ä\ÿ          ðß\
 ÿ                 ÿÿÿÿÿÿÿÿ¢Pôc+          ã\ÿ                                     gboolean actif );
+GtkWidget *etats_config_ui_widget_get_widget_by_name ( const gchar *parent_name,
+                        const gchar *child_name );
+gboolean etats_config_ui_widget_set_sensitive ( const gchar *widget_name,
+                        gboolean sensitive );
+/* END_DECLARATION */
+
+
+#endif /* GSB_ETATS_CONFIG_UI_H */
diff --git a/src/etats_onglet.c b/src/etats_onglet.c
index 55e68e3..b5e40d5 100644
--- a/src/etats_onglet.c
+++ b/src/etats_onglet.c
@@ -35,23 +35,23 @@
 /*START_INCLUDE*/
 #include "etats_onglet.h"
 #include "etats_calculs.h"
+#include "etats_config.h"
 #include "dialog.h"
-#include "utils_file_selection.h"
+#include "fenetre_principale.h"
 #include "gsb_automem.h"
-#include "gsb_data_report_amout_comparison.h"
 #include "gsb_data_report.h"
+#include "gsb_data_report_amout_comparison.h"
 #include "gsb_file.h"
 #include "gsb_file_others.h"
-#include "navigation.h"
 #include "gsb_report.h"
 #include "gsb_status.h"
+#include "navigation.h"
+#include "print_report.h"
+#include "structures.h"
 #include "traitement_variables.h"
 #include "utils.h"
-#include "etats_config.h"
-#include "print_report.h"
 #include "utils_files.h"
-#include "structures.h"
-#include "fenetre_principale.h"
+#include "utils_file_selection.h"
 #include "erreur.h"
 /*END_INCLUDE*/
 
@@ -75,7 +75,7 @@ static GtkWidget *bouton_dupliquer_etat = NULL;
 GtkWidget *scrolled_window_etat = NULL;          /* contient l'état en cours */
 gint nb_colonnes;
 gint ligne_debut_partie;
-GtkWidget *notebook_etats = NULL;
+static GtkWidget *notebook_etats = NULL;
 GtkWidget *notebook_config_etat = NULL;
 static GtkWidget *reports_toolbar = NULL;
 
@@ -194,7 +194,7 @@ GtkWidget *gsb_gui_create_report_toolbar ( void )
     bouton_personnaliser_etat = gsb_automem_stock_button_new ( etat.display_toolbar,
 							      GTK_STOCK_PROPERTIES,
 							      _("Properties"),
-							      G_CALLBACK (personnalisation_etat),
+							      G_CALLBACK ( etats_config_personnalisation_etat ),
 							      NULL ),
     gtk_widget_set_tooltip_text ( GTK_WIDGET (bouton_personnaliser_etat),
 				  _("Edit selected report") );
@@ -342,23 +342,23 @@ gboolean ajout_etat ( void )
 
 	    /*   le classement de base est 1-2-3-4-5-6 */
 
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 1 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 2 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 3 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 4 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 5 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 6 )));
 
 	    gsb_data_report_set_transfer_choice ( report_number,
@@ -404,23 +404,23 @@ gboolean ajout_etat ( void )
 
 	    /*   le classement de base est 1-2-3-4-5-6 (cf structure.h) */
 
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 1 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 2 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 3 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 4 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 5 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 6 )));
 
 
@@ -463,23 +463,23 @@ gboolean ajout_etat ( void )
 
 	    /*   le classement de base est 1-2-3-4-5-6 (cf structure.h) */
 
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 1 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 2 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 3 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 4 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 5 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 6 )));
 
 
@@ -529,23 +529,23 @@ gboolean ajout_etat ( void )
 
 	    /*   le classement de base est 1-2-3-4-5-6  */
 
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 1 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 2 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 3 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 4 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 5 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 6 )));
 
 	    /*   les devises sont à 1 (euro) */
@@ -603,23 +603,23 @@ gboolean ajout_etat ( void )
 
 	    /*   le classement de base est 1-2-3-4-5-6 (cf structure.h) */
 
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 1 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 2 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 3 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 4 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 5 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 6 )));
 
 	    /*   les devises sont à 1 (euro) */
@@ -679,23 +679,23 @@ gboolean ajout_etat ( void )
 
 	    /*   le classement de base est 1-2-3-4-5-6  */
 
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 6 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 1 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 2 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 3 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 4 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 5 )));
 
 
@@ -768,23 +768,23 @@ gboolean ajout_etat ( void )
 
 	    /*   le classement de base est 1-2-3-4-5-6  */
 
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 1 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 2 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 3 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 4 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 5 )));
-	    gsb_data_report_set_sorting_type ( report_number,
-					       g_slist_append ( gsb_data_report_get_sorting_type (report_number),
+	    gsb_data_report_set_sorting_type_list ( report_number,
+					       g_slist_append ( gsb_data_report_get_sorting_type_list (report_number),
 								GINT_TO_POINTER ( 6 )));
 
 	    /*   les devises sont à 1 (euro) */
@@ -857,7 +857,7 @@ gboolean ajout_etat ( void )
     gsb_gui_navigation_add_report ( report_number );
     gsb_gui_update_gui_to_report ( report_number );
 
-    personnalisation_etat ();
+    etats_config_personnalisation_etat ();
     gsb_file_set_modified ( TRUE );
 
     return FALSE;
@@ -1269,11 +1269,22 @@ void dupliquer_etat ( void )
     gsb_gui_navigation_add_report (report_number);
     gsb_gui_update_gui_to_report ( report_number );
 
-    personnalisation_etat ();
+    etats_config_personnalisation_etat ();
     gsb_file_set_modified ( TRUE );
 }
 
 
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+GtkWidget *etats_onglet_get_notebook_etats ( void )
+{
+    return notebook_etats;
+}
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/etats_onglet.h b/src/etats_onglet.h
index 31a4b44..e84cb56 100644
--- a/src/etats_onglet.h
+++ b/src/etats_onglet.h
@@ -11,6 +11,7 @@
 gboolean ajout_etat ( void );
 GtkWidget *creation_onglet_etats ( void );
 void efface_etat ( void );
+GtkWidget *etats_onglet_get_notebook_etats ( void );
 void gsb_gui_unsensitive_report_widgets ();
 void gsb_gui_update_gui_to_report ( gint report_number );
 void gsb_gui_update_reports_toolbar ( void );
diff --git a/src/go-charmap-sel.c b/src/go-charmap-sel.c
deleted file mode 100644
index 66eb3a6..0000000
--- a/src/go-charmap-sel.c
+++ /dev/null
@@ -1,759 +0,0 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * A charmap selector widget.
- *
- *  Copyright (C) 2003-2005 Andreas J. Guelzow
- *
- *  based on code by:
- *  Copyright (C) 2000 Marco Pesenti Gritti
- *  from the galeon code base
- *
- *  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
- *  the Free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "include.h"
-#include <glib/gi18n.h>
-
-/*START_INCLUDE*/
-#include "go-charmap-sel.h"
-#include "go-optionmenu.h"
-#include "utils_str.h"
-/*END_INCLUDE*/
-
-struct cb_find_entry {
-	const char *enc;
-	gboolean found;
-	int i;
-	GSList *path;
-};
-
-/*START_STATIC*/
-static void cb_find_entry (GtkMenuItem *w, struct cb_find_entry *cl);
-static int charset_order (const void *_a, const void *_b);
-static void cs_build_menu (GOCharmapSel *cs);
-static void cs_class_init (GtkWidgetClass *widget_klass);
-static void cs_emphasize_label (GtkLabel *label);
-static void cs_get_property (GObject     *object,
-		 guint        prop_id,
-		 GValue      *value,
-		 GParamSpec  *pspec);
-static void cs_init (GOCharmapSel *cs);
-static gboolean cs_mnemonic_activate (GtkWidget *w, gboolean group_cycling);
-static void cs_set_property (GObject      *object,
-		 guint         prop_id,
-		 const GValue *value,
-		 GParamSpec   *pspec);
-static void encodings_changed_cb (GOOptionMenu *optionmenu, GOCharmapSel *cs);
-static char const * get_locale_encoding_name (GOCharmapSel *cs);
-static const char * go_charmap_sel_get_encoding_name (G_GNUC_UNUSED GOCharmapSel *cs,
-				    const char *encoding);
-static gboolean iconv_supported (const char *to, const char *from);
-static int lgroups_order (const void *_a, const void *_b);
-static void set_menu_to_default (GOCharmapSel *cs, gint item);
-/*END_STATIC*/
-
-/*START_EXTERN*/
-/*END_EXTERN*/
-
-
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkseparatormenuitem.h>
-#include <string.h>
-#include <stdlib.h>
-
-#define CS(x) GO_CHARMAP_SEL (x)
-
-#define CHARMAP_NAME_KEY "Name of Character Encoding"
-
-
-/* name -> CharsetInfo* mapping */
-static GHashTable *encoding_hash;
-
-struct _GOCharmapSel {
-	GtkHBox box;
-	GOOptionMenu *encodings;
-	GtkMenu *encodings_menu;
-	GOCharmapSelTestDirection test;
-};
-
-typedef struct {
-	GtkHBoxClass parent_class;
-
-	gboolean (* charmap_changed) (GOCharmapSel *cs, char const *new_charmap);
-} GOCharmapSelClass;
-
-
-typedef GOCharmapSel Cs;
-typedef GOCharmapSelClass CsClass;
-
-/* Signals we emit */
-enum {
-	CHARMAP_CHANGED,
-	LAST_SIGNAL
-};
-
-enum {
-	PROP_0,
-	PROP_TEST_DIRECTION
-};
-
-#define	GSF_CLASS_FULL(name, prefix, base_init, base_finalize, \
-			   class_init, class_finalize, instance_init, parent_type, \
-		       abstract, interface_decl) \
-GType									\
-prefix ## _get_type (void)						\
-{									\
-	static GType type = 0;						\
-	if (type == 0) {						\
-		static GTypeInfo const object_info = {			\
-			sizeof (name ## Class),				\
-			(GBaseInitFunc) base_init,			\
-			(GBaseFinalizeFunc) base_finalize,		\
-			(GClassInitFunc) class_init,			\
-			(GClassFinalizeFunc) class_finalize,		\
-			NULL,	/* class_data */			\
-			sizeof (name),					\
-			0,	/* n_preallocs */			\
-			(GInstanceInitFunc) instance_init,		\
-			NULL						\
-		};							\
-		type = g_type_register_static (parent_type, #name,	\
-			&object_info, (GTypeFlags) abstract);		\
-		interface_decl						\
-	}								\
-	return type;							\
-}
-#define	GSF_CLASS(name, prefix, class_init, instance_init, parent) \
-	GSF_CLASS_FULL(name, prefix, NULL, NULL, class_init, NULL, \
-				instance_init, parent, 0, {})
-GSF_CLASS (GOCharmapSel, go_charmap_sel,
-	   cs_class_init, cs_init, GTK_TYPE_HBOX)
-
-/* ------------------------------------------------------------------------- */
-
-typedef enum {
-	LG_ARABIC,
-	LG_BALTIC,
-	LG_CENTRAL_EUROPEAN,
-	LG_CHINESE,
-	LG_CYRILLIC,
-	LG_GREEK,
-	LG_HEBREW,
-	LG_INDIAN,
-	LG_JAPANESE,
-	LG_KOREAN,
-	LG_TURKISH,
-	LG_UNICODE,
-	LG_VIETNAMESE,
-	LG_WESTERN,
-	LG_OTHER,
-	LG_LAST
-} LanguageGroup;
-
-typedef struct {
-        char const *group_name;
-	LanguageGroup const lgroup;
-	/* Generated stuff follows.  */
-	char *collate_key;
-} LGroupInfo;
-
-static LGroupInfo lgroups[] = {
-	{N_("Arabic"), LG_ARABIC},
-	{N_("Baltic"), LG_BALTIC},
-	{N_("Central European"), LG_CENTRAL_EUROPEAN},
-	{N_("Chinese"), LG_CHINESE},
-	{N_("Cyrillic"), LG_CYRILLIC},
-	{N_("Greek"), LG_GREEK},
-	{N_("Hebrew"), LG_HEBREW},
-	{N_("Indian"), LG_INDIAN},
-	{N_("Japanese"), LG_JAPANESE},
-	{N_("Korean"), LG_KOREAN},
-	{N_("Turkish"), LG_TURKISH},
-	{N_("Unicode"), LG_UNICODE},
-	{N_("Vietnamese"), LG_VIETNAMESE},
-	{N_("Western"), LG_WESTERN},
-	{N_("Other"), LG_OTHER},
-	{NULL, LG_LAST}
-};
-
-static int lgroups_order (const void *_a, const void *_b)
-{
-	const LGroupInfo *a = (const LGroupInfo *)_a;
-	const LGroupInfo *b = (const LGroupInfo *)_b;
-
-	return strcmp (a->collate_key, b->collate_key);
-}
-
-/* ------------------------------------------------------------------------- */
-
-typedef enum {
-     CI_MINOR,
-     CI_MAJOR
-} CharsetImportance;
-
-typedef struct {
-	gchar const *charset_title;
-	gchar const *aliases;
-	LanguageGroup const lgroup;
-	CharsetImportance const imp;
-	/* Generated stuff follows.  */
-	char *collate_key;
-	char *to_utf8_iconv_name, *from_utf8_iconv_name;
-} CharsetInfo;
-
-static CharsetInfo charset_trans_array[] = {
-	{N_("Arabic (IBM-864)"),                  "IBM864",                LG_ARABIC, CI_MINOR},
-	{N_("Arabic (IBM-864-I)"),                "IBM864i",               LG_ARABIC, CI_MINOR},
-	{N_("Arabic (ISO-8859-6)"),               "ISO-8859-6",            LG_ARABIC, CI_MINOR},
-	{N_("Arabic (ISO-8859-6-E)"),             "ISO-8859-6-E",          LG_ARABIC, CI_MINOR},
-
-	{N_("Arabic (ISO-8859-6-I)"),             "ISO-8859-6-I",          LG_ARABIC, CI_MINOR},
-	{N_("Arabic (MacArabic)"),                "x-mac-arabic",          LG_ARABIC, CI_MINOR},
-	{N_("Arabic (Windows-1256)"),             "windows-1256",          LG_ARABIC, CI_MINOR},
-	{N_("Armenian (ARMSCII-8)"),              "armscii-8", 	           LG_OTHER, CI_MINOR},
-	{N_("Baltic (ISO-8859-13)"),              "ISO-8859-13",           LG_BALTIC, CI_MINOR},
-	{N_("Baltic (ISO-8859-4)"),               "ISO-8859-4",            LG_BALTIC, CI_MINOR},
-	{N_("Baltic (Windows-1257)"),             "windows-1257",          LG_BALTIC, CI_MINOR},
-	{N_("Celtic (ISO-8859-14)"),              "ISO-8859-14",           LG_OTHER, CI_MINOR},
-	{N_("Central European (IBM-852)"),        "IBM852",                LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Central European (ISO-8859-2)"),     "ISO-8859-2",	           LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Central European (MacCE)"),          "x-mac-ce",              LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Central European (Windows-1250)"),   "windows-1250",          LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Chinese Simplified (GB18030)"),      "gb18030",               LG_CHINESE, CI_MINOR},
-	{N_("Chinese Simplified (GB2312)"),       "GB2312",                LG_CHINESE, CI_MINOR},
-	{N_("Chinese Simplified (GBK)"),          "x-gbk",                 LG_CHINESE, CI_MINOR},
-	{N_("Chinese Simplified (HZ)"),           "HZ-GB-2312",	           LG_CHINESE, CI_MINOR},
-	{N_("Chinese Simplified (Windows-936)"),  "windows-936",           LG_CHINESE, CI_MINOR},
-	{N_("Chinese Traditional (Big5)"),        "Big5",                  LG_CHINESE, CI_MINOR},
-	{N_("Chinese Traditional (Big5-HKSCS)"),  "Big5-HKSCS",	           LG_CHINESE, CI_MINOR},
-	{N_("Chinese Traditional (EUC-TW)"),      "x-euc-tw",              LG_CHINESE, CI_MINOR},
-	{N_("Croatian (MacCroatian)"),            "x-mac-croatian",        LG_CENTRAL_EUROPEAN, CI_MINOR},
-	{N_("Cyrillic (IBM-855)"),                "IBM855",                LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (ISO-8859-5)"),             "ISO-8859-5",	           LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (ISO-IR-111)"),             "ISO-IR-111",	           LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (KOI8-R)"),                 "KOI8-R",                LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (MacCyrillic)"),            "x-mac-cyrillic",        LG_CYRILLIC, CI_MINOR},
-	{N_("Cyrillic (Windows-1251)"),           "windows-1251",          LG_CYRILLIC, CI_MINOR},
-	{N_("Russian (CP-866)"),                  "IBM866",                LG_CYRILLIC, CI_MINOR},
-	{N_("Ukrainian (KOI8-U)"),                "KOI8-U",                LG_CYRILLIC, CI_MINOR},
-	{N_("Ukrainian (MacUkrainian)"),          "x-mac-ukrainian",       LG_CYRILLIC, CI_MINOR},
-	{N_("English (ASCII)"),                   "ANSI_X3.4-1968#ASCII",  LG_WESTERN, CI_MAJOR},
-	{N_("Farsi (MacFarsi)"),                  "x-mac-farsi",           LG_OTHER, CI_MINOR},
-	{N_("Georgian (GEOSTD8)"),                "geostd8",               LG_OTHER, CI_MINOR},
-	{N_("Greek (ISO-8859-7)"),                "ISO-8859-7",            LG_GREEK, CI_MINOR},
-	{N_("Greek (MacGreek)"),                  "x-mac-greek",           LG_GREEK, CI_MINOR},
-	{N_("Greek (Windows-1253)"),              "windows-1253",          LG_GREEK, CI_MINOR},
-	{N_("Gujarati (MacGujarati)"),            "x-mac-gujarati",        LG_INDIAN, CI_MINOR},
-	{N_("Gurmukhi (MacGurmukhi)"),            "x-mac-gurmukhi",        LG_INDIAN, CI_MINOR},
-	{N_("Hebrew (IBM-862)"),                  "IBM862",                LG_HEBREW, CI_MINOR},
-	{N_("Hebrew (ISO-8859-8-E)"),             "ISO-8859-8-E",          LG_HEBREW, CI_MINOR},
-	{N_("Hebrew (ISO-8859-8-I)"),             "ISO-8859-8-I",          LG_HEBREW, CI_MINOR},
-	{N_("Hebrew (MacHebrew)"),                "x-mac-hebrew",          LG_HEBREW, CI_MINOR},
-	{N_("Hebrew (Windows-1255)"),             "windows-1255",          LG_HEBREW, CI_MINOR},
-	{N_("Hindi (MacDevanagari)"),             "x-mac-devanagari",      LG_INDIAN, CI_MINOR},
-	{N_("Icelandic (MacIcelandic)"),          "x-mac-icelandic",       LG_OTHER, CI_MINOR},
-	{N_("Japanese (EUC-JP)"),                 "EUC-JP",                LG_JAPANESE, CI_MINOR},
-	{N_("Japanese (ISO-2022-JP)"),            "ISO-2022-JP",           LG_JAPANESE, CI_MINOR},
-	{N_("Japanese (Shift_JIS)"),              "Shift_JIS",             LG_JAPANESE, CI_MINOR},
-	{N_("Korean (EUC-KR)"),                   "EUC-KR",                LG_KOREAN, CI_MINOR},
-	{N_("Korean (ISO-2022-KR)"),              "ISO-2022-KR",           LG_KOREAN, CI_MINOR},
-	{N_("Korean (JOHAB)"),                    "x-johab",               LG_KOREAN, CI_MINOR},
-	{N_("Korean (UHC)"),                      "x-windows-949",         LG_KOREAN, CI_MINOR},
-	{N_("Nordic (ISO-8859-10)"),              "ISO-8859-10",           LG_OTHER, CI_MINOR},
-	{N_("Romanian (MacRomanian)"),            "x-mac-romanian",        LG_OTHER, CI_MINOR},
-	{N_("Romanian (ISO-8859-16)"),            "ISO-8859-16",           LG_OTHER, CI_MINOR},
-	{N_("South European (ISO-8859-3)"),       "ISO-8859-3",            LG_OTHER, CI_MINOR},
-	{N_("Thai (TIS-620)"),                    "TIS-620",               LG_OTHER, CI_MINOR},
-	{N_("Turkish (IBM-857)"),                 "IBM857",                LG_TURKISH, CI_MINOR},
-	{N_("Turkish (ISO-8859-9)"),              "ISO-8859-9",            LG_TURKISH, CI_MINOR},
-	{N_("Turkish (MacTurkish)"),              "x-mac-turkish",         LG_TURKISH, CI_MINOR},
-	{N_("Turkish (Windows-1254)"),            "windows-1254",          LG_TURKISH, CI_MINOR},
-	{N_("Unicode (UTF-7)"),                   "UTF-7",                 LG_UNICODE, CI_MINOR},
-	{N_("Unicode (UTF-8)"),                   "UTF-8",                 LG_UNICODE, CI_MAJOR},
-	{N_("Unicode (UTF-16BE)"),                "UTF-16BE",              LG_UNICODE, CI_MINOR},
-	{N_("Unicode (UTF-16LE)"),                "UTF-16LE",              LG_UNICODE, CI_MINOR},
-	{N_("Unicode (UTF-32BE)"),                "UTF-32BE",              LG_UNICODE, CI_MINOR},
-	{N_("Unicode (UTF-32LE)"),                "UTF-32LE",              LG_UNICODE, CI_MINOR},
-	{N_("User Defined"),                      "x-user-defined",        LG_OTHER, CI_MINOR},
-	{N_("Vietnamese (TCVN)"),                 "x-viet-tcvn5712",       LG_VIETNAMESE, CI_MINOR},
-	{N_("Vietnamese (VISCII)"),               "VISCII",                LG_VIETNAMESE, CI_MINOR},
-	{N_("Vietnamese (VPS)"),                  "x-viet-vps",            LG_VIETNAMESE, CI_MINOR},
-	{N_("Vietnamese (Windows-1258)"),         "windows-1258",          LG_VIETNAMESE, CI_MINOR},
-	{N_("Visual Hebrew (ISO-8859-8)"),        "ISO-8859-8",            LG_HEBREW, CI_MINOR},
-	{N_("Western (IBM-850)"),                 "IBM850",                LG_WESTERN, CI_MINOR},
-	{N_("Western (ISO-8859-1)"),              "ISO-8859-1",            LG_WESTERN, CI_MAJOR},
-	{N_("Western (ISO-8859-15)"),             "ISO-8859-15",           LG_WESTERN, CI_MINOR},
-	{N_("Western (MacRoman)"),                "x-mac-roman",           LG_WESTERN, CI_MINOR},
-	{N_("Western (Windows-1252)"),            "windows-1252",          LG_WESTERN, CI_MINOR},
-	/* charsets without possibly translatable names */
-	{"T61.8bit",                              "T61.8bit",              LG_OTHER, CI_MINOR},
-	{"x-imap4-modified-utf7",                 "x-imap4-modified-utf7", LG_UNICODE, CI_MINOR},
-	{"x-u-escaped",                           "x-u-escaped",           LG_OTHER, CI_MINOR},
-	{NULL,                                    NULL,                    LG_LAST, 0}
-};
-
-static int charset_order (const void *_a, const void *_b)
-{
-	const CharsetInfo *a = (const CharsetInfo *)_a;
-	const CharsetInfo *b = (const CharsetInfo *)_b;
-
-	if (a->lgroup != b->lgroup)
-		return (int)b->lgroup - (int)a->lgroup;
-
-	if (a->imp != b->imp)
-		return (int)b->imp - (int)a->imp;
-
-	return strcmp (a->collate_key, b->collate_key);
-}
-
-/* ------------------------------------------------------------------------- */
-
-static guint cs_signals[LAST_SIGNAL] = { 0 };
-
-static void cs_set_property      (GObject          *object,
-				  guint             prop_id,
-				  const GValue     *value,
-				  GParamSpec       *pspec);
-
-static void cs_get_property      (GObject          *object,
-				  guint             prop_id,
-				  GValue           *value,
-				  GParamSpec       *pspec);
-
-static gboolean iconv_supported (const char *to, const char *from)
-{
-	GIConv ic = g_iconv_open (to, from);
-	if (ic == NULL || ic == (GIConv)-1)
-		return FALSE;
-
-	g_iconv_close (ic);
-	return TRUE;
-}
-
-const char * go_charmap_sel_get_encoding_name (G_GNUC_UNUSED GOCharmapSel *cs,
-				    const char *encoding)
-{
-	CharsetInfo const *ci;
-
-	g_return_val_if_fail (encoding != NULL, NULL);
-
-	ci = g_hash_table_lookup (encoding_hash, encoding);
-	return ci ? _(ci->charset_title) : NULL;
-}
-
-static char const * get_locale_encoding_name (GOCharmapSel *cs)
-{
-	char const *locale_encoding;
-	char const *name;
-
-	g_get_charset (&locale_encoding);
-	name = go_charmap_sel_get_encoding_name (cs, locale_encoding);
-	return name ? name : locale_encoding;
-}
-
-static void encodings_changed_cb (GOOptionMenu *optionmenu, GOCharmapSel *cs)
-{
-	g_return_if_fail (IS_GO_CHARMAP_SEL (cs));
-	g_return_if_fail (optionmenu == cs->encodings);
-
-	g_signal_emit (G_OBJECT (cs),
-		       cs_signals[CHARMAP_CHANGED],
-		       0,
-		       go_charmap_sel_get_encoding (cs));
-}
-
-static void set_menu_to_default (GOCharmapSel *cs, gint item)
-{
-	GSList sel = { GINT_TO_POINTER (item - 1), NULL};
-
-	g_return_if_fail (cs != NULL && IS_GO_CHARMAP_SEL (cs));
-
-	go_option_menu_set_history (cs->encodings, &sel);
-}
-
-static gboolean cs_mnemonic_activate (GtkWidget *w, gboolean group_cycling)
-{
-	GOCharmapSel *cs = GO_CHARMAP_SEL (w);
-	gtk_widget_grab_focus (GTK_WIDGET (cs->encodings));
-	return TRUE;
-}
-
-static void cs_emphasize_label (GtkLabel *label)
-{
-	char *text = g_strconcat ("<b>", gtk_label_get_label (label), "</b>", NULL);
-
-	gtk_label_set_use_underline (label, FALSE);
-	gtk_label_set_use_markup (label, TRUE);
-	gtk_label_set_label (label, text);
-	g_free (text);
-}
-
-static void cs_init (GOCharmapSel *cs)
-{
-	cs->test = GO_CHARMAP_SEL_TO_UTF8;
-
-	/* There is a problem in mk_include as we access
-	 * go_option_menu_get_type(); through a macro.  So, KEEP this
-	 * comment to make mk_include happy.  --benj  */
-	cs->encodings = GO_OPTION_MENU (go_option_menu_new ());
-
-	g_signal_connect (G_OBJECT (cs->encodings), "changed",
-                          G_CALLBACK (encodings_changed_cb), cs);
-        gtk_box_pack_start (GTK_BOX (cs), GTK_WIDGET (cs->encodings),
-                            TRUE, TRUE, 0);
-}
-
-
-static void cs_build_menu (GOCharmapSel *cs)
-{
-        GtkWidget *item;
-	GtkMenu *menu;
-	LGroupInfo const *lgroup = lgroups;
-	gint lg_cnt = 0;
-
-        menu = GTK_MENU (gtk_menu_new ());
-
-	while (lgroup->group_name) {
-		CharsetInfo const *charset_trans;
-		GtkMenu *submenu;
-		gint cnt = 0;
-
-		item = gtk_menu_item_new_with_label (_(lgroup->group_name));
-
-		submenu = GTK_MENU (gtk_menu_new ());
-		charset_trans = charset_trans_array;
-
-		while (charset_trans->lgroup != LG_LAST) {
-			GtkWidget *subitem;
-			if (charset_trans->lgroup == lgroup->lgroup) {
-				const char *name = (cs->test == GO_CHARMAP_SEL_TO_UTF8)
-					? charset_trans->to_utf8_iconv_name
-					: charset_trans->from_utf8_iconv_name;
-				if (name) {
-					subitem = gtk_check_menu_item_new_with_label
-						(_(charset_trans->charset_title));
-					gtk_widget_show (subitem);
-					gtk_menu_shell_append ( GTK_MENU_SHELL (submenu), subitem );
-					if (charset_trans->imp == CI_MAJOR)
-						cs_emphasize_label (GTK_LABEL (gtk_bin_get_child (GTK_BIN (subitem))));
-					g_object_set_data (G_OBJECT (subitem), CHARMAP_NAME_KEY,
-							   (gpointer)name);
-					cnt++;
-				} else if (0) {
-					g_print ("Unsupported: %s\n", charset_trans->aliases);
-				}
-			}
-			charset_trans++;
-		}
-		if (cnt > 0) {
-			gtk_menu_item_set_submenu ( GTK_MENU_ITEM (item), GTK_WIDGET (submenu) );
-			gtk_widget_show (item);
-			gtk_menu_shell_append ( GTK_MENU_SHELL (menu), item );
-			lg_cnt++;
-		} else {
-			g_object_unref (item);
-		}
-                lgroup++;
-        }
-	item = gtk_separator_menu_item_new ();
-	gtk_widget_show (item);
-	gtk_menu_shell_append ( GTK_MENU_SHELL (menu), item );
-	lg_cnt++;
-
-	{
-		char *locale_encoding_menu_title = g_strconcat (_("Locale: "),
-							      get_locale_encoding_name (cs),
-							      NULL);
-		item = gtk_check_menu_item_new_with_label (locale_encoding_menu_title);
-		g_free (locale_encoding_menu_title);
-		gtk_widget_show (item);
-		gtk_menu_shell_append ( GTK_MENU_SHELL (menu), item );
-		lg_cnt++;
-		cs_emphasize_label (GTK_LABEL (gtk_bin_get_child (GTK_BIN (item))));
-	}
-
-	go_option_menu_set_menu (cs->encodings, GTK_WIDGET (menu));
-	cs->encodings_menu = menu;
-	set_menu_to_default (cs, lg_cnt);
-}
-
-static void cs_class_init (GtkWidgetClass *widget_klass)
-{
-	CharsetInfo *ci;
-	size_t i;
-
-	GObjectClass *gobject_class = G_OBJECT_CLASS (widget_klass);
-	widget_klass->mnemonic_activate = cs_mnemonic_activate;
-
-	gobject_class->set_property = cs_set_property;
-	gobject_class->get_property = cs_get_property;
-
-	cs_signals[CHARMAP_CHANGED] =
-		g_signal_new ("charmap_changed",
-			      GO_CHARMAP_SEL_TYPE,
-			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (GOCharmapSelClass, charmap_changed),
-			      NULL, NULL,
-			      g_cclosure_marshal_VOID__POINTER,
-			      G_TYPE_NONE, 1, G_TYPE_POINTER);
-
-	g_object_class_install_property (gobject_class,
-					 PROP_TEST_DIRECTION,
-					 g_param_spec_uint ("TestDirection",
-							    _("Conversion Direction"),
-							    _("This value determines which iconv test to perform."),
-							    (guint)GO_CHARMAP_SEL_TO_UTF8,
-							    (guint)GO_CHARMAP_SEL_FROM_UTF8,
-							    (guint)GO_CHARMAP_SEL_TO_UTF8,
-							    G_PARAM_READWRITE));
-
-	/* ---------------------------------------- */
-	/* Sort the groups by translated name.  */
-
-	for (i = 0; i < G_N_ELEMENTS (lgroups) - 2; i++) {
-		const char *cgroup_name = lgroups[i].group_name;
-		const char *group_name = _(cgroup_name);
-		lgroups[i].collate_key = g_utf8_collate_key (group_name, -1);
-		if (!lgroups[i].collate_key) {
-			g_warning ("Failed to generate collation key for [%s] [%s]",
-				   cgroup_name, group_name);
-			if ( lgroups[i].collate_key ) 
-			     g_free ( lgroups[i].collate_key );
-			lgroups[i].collate_key = my_strdup (group_name);
-		}
-	}
-	qsort (lgroups, G_N_ELEMENTS (lgroups) - 2, sizeof (lgroups[0]),
-	       lgroups_order);
-	for (i = 0; i < G_N_ELEMENTS (lgroups) - 2; i++) {
-		g_free (lgroups[i].collate_key);
-		lgroups[i].collate_key = NULL;
-	}
-
-	/* ---------------------------------------- */
-	/* Sort charsets by group/importance/title.  */
-
-	for (i = 0; i < G_N_ELEMENTS (charset_trans_array) - 1; i++) {
-		const char *ctitle = charset_trans_array[i].charset_title;
-		const char *title = _(ctitle);
-		charset_trans_array[i].collate_key = g_utf8_collate_key (title, -1);
-		if (!charset_trans_array[i].collate_key) {
-			g_warning ("Failed to generate collation key for [%s] [%s]",
-				   ctitle, title);
-			if ( charset_trans_array[i].collate_key ) 
-			    g_free ( charset_trans_array[i].collate_key );
-			charset_trans_array[i].collate_key = my_strdup (title);
-		}
-	}
-	qsort (charset_trans_array, G_N_ELEMENTS (charset_trans_array) - 1,
-	       sizeof (charset_trans_array[0]), charset_order);
-	for (i = 0; i < G_N_ELEMENTS (charset_trans_array) - 1; i++) {
-		g_free (charset_trans_array[i].collate_key);
-		charset_trans_array[i].collate_key = NULL;
-	}
-
-	/* ---------------------------------------- */
-
-	encoding_hash =
-		g_hash_table_new_full (g_str_hash,
-				       g_str_equal,
-				       (GDestroyNotify)g_free,
-				       NULL);
-
-	for (ci = charset_trans_array; ci->charset_title; ci++) {
-		const char *aliases = ci->aliases;
-		char *autoaliases = NULL;
-
-		if (strchr (aliases, '#') == 0) {
-			/* Sigh.  This sucks quite a lot.  */
-			if (strncmp (aliases, "ISO-", 4) == 0) {
-				autoaliases =
-					g_strconcat (aliases,
-						     "#ISO", aliases + 4,
-						     "#ISO_", aliases + 4,
-						     NULL);
-			}
-
-			if (autoaliases)
-				aliases = autoaliases;
-		}
-
-		ci->to_utf8_iconv_name = ci->from_utf8_iconv_name = NULL;
-		while (aliases) {
-			const char *sep = strchr (aliases, '#');
-			char *alias;
-
-			if (sep) {
-				alias = g_strndup (aliases, sep - aliases);
-				aliases = sep + 1;
-			} else {
-				alias = my_strdup (aliases);
-				aliases = NULL;
-			}
-
-			if (ci->to_utf8_iconv_name == NULL &&
-			    iconv_supported ("UTF-8", alias)) {
-			        if ( ci->to_utf8_iconv_name )
-				    g_free ( ci->to_utf8_iconv_name );
-				ci->to_utf8_iconv_name = my_strdup (alias);
-			}
-
-			if (ci->from_utf8_iconv_name == NULL &&
-			    iconv_supported (alias, "UTF-8")) {
-				if ( ci->from_utf8_iconv_name )
-				    g_free ( ci->from_utf8_iconv_name );
-				ci->from_utf8_iconv_name = my_strdup (alias);
-			}
-
-			g_hash_table_insert (encoding_hash, alias, ci);
-		}
-
-		g_free (autoaliases);
-	}
-}
-
-GtkWidget * go_charmap_sel_new (GOCharmapSelTestDirection test)
-{
-	return g_object_new (GO_CHARMAP_SEL_TYPE, "TestDirection", test, NULL);
-}
-
-gchar const * go_charmap_sel_get_encoding (GOCharmapSel *cs)
-{
-    GtkMenuItem *selection;
-    char const *locale_encoding;
-    char const *encoding;
-
-    g_get_charset (&locale_encoding);
-
-    g_return_val_if_fail (IS_GO_CHARMAP_SEL (cs), locale_encoding);
-
-    selection = GTK_MENU_ITEM (go_option_menu_get_history (cs->encodings));
-    encoding = (char const *) g_object_get_data (G_OBJECT (selection),
-						 CHARMAP_NAME_KEY);
-    return encoding ? encoding : locale_encoding;
-}
-
-static void cb_find_entry (GtkMenuItem *w, struct cb_find_entry *cl)
-{
-	GtkWidget *sub;
-
-	if (cl->found)
-		return;
-
-	sub = gtk_menu_item_get_submenu (w);
-	if (sub) {
-		GSList *tmp = cl->path = g_slist_prepend (cl->path, GINT_TO_POINTER (cl->i));
-		cl->i = 0;
-
-		gtk_container_foreach (GTK_CONTAINER (sub), (GtkCallback)cb_find_entry, cl);
-		if (cl->found)
-			return;
-		
-		cl->i = GPOINTER_TO_INT (cl->path->data);
-		cl->path = cl->path->next;
-		g_slist_free_1 (tmp);
-	} else {
-		const char *this_enc =
-			g_object_get_data (G_OBJECT (w), CHARMAP_NAME_KEY);
-		if (this_enc && strcmp (this_enc, cl->enc) == 0) {
-			cl->found = TRUE;
-			cl->path = g_slist_prepend (cl->path, GINT_TO_POINTER (cl->i));
-			cl->path = g_slist_reverse (cl->path);
-			return;
-		}
-	}
-	cl->i++;
-}
-
-/* 
- * TODO dOm : this function seems not to be used :
- * warning: ‘go_charmap_sel_set_encoding’ defined but not used
- * Is it possible to remove it ? */
-gboolean go_charmap_sel_set_encoding (GOCharmapSel *cs, const char *enc)
-{
-	struct cb_find_entry cl;
-	CharsetInfo const *ci;
-
-	g_return_val_if_fail (IS_GO_CHARMAP_SEL (cs), FALSE);
-	g_return_val_if_fail (enc != NULL, FALSE);
-
-	ci = g_hash_table_lookup (encoding_hash, enc);
-	if (!ci)
-		return FALSE;
-
-	enc = ci->to_utf8_iconv_name;
-	if (!enc)
-		return FALSE;
-
-	cl.enc = enc;
-	cl.found = FALSE;
-	cl.i = 0;
-	cl.path = NULL;
-
-	gtk_container_foreach (GTK_CONTAINER (cs->encodings_menu),
-			       (GtkCallback)cb_find_entry,
-			       &cl);
-	if (!cl.found)
-		return FALSE;
-
-	go_option_menu_set_history (cs->encodings, cl.path);
-	g_slist_free (cl.path);
-
-	return TRUE;
-}
-
-
-static void cs_set_property (GObject      *object,
-		 guint         prop_id,
-		 const GValue *value,
-		 GParamSpec   *pspec)
-{
-	GOCharmapSel *cs = GO_CHARMAP_SEL (object);
-
-	switch (prop_id) {
-	case PROP_TEST_DIRECTION:
-		cs->test = g_value_get_uint (value);
-		cs_build_menu (cs);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-
-static void cs_get_property (GObject     *object,
-		 guint        prop_id,
-		 GValue      *value,
-		 GParamSpec  *pspec)
-{
-	GOCharmapSel *cs = GO_CHARMAP_SEL (object);
-
-	switch (prop_id) {
-	case PROP_TEST_DIRECTION:
-		g_value_set_uint (value, (guint)cs->test);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
diff --git a/src/go-charmap-sel.h b/src/go-charmap-sel.h
deleted file mode 100644
index f9f8809..0000000
--- a/src/go-charmap-sel.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Copyright (C) 2003 Andreas J. Guelzow
- *
- *  based on code by:
- *  Copyright (C) 2000 Marco Pesenti Gritti
- *  from the galeon code base
- *
- *  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
- *  the Free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#ifndef _GO_CHARMAP_SEL_H_
-#define _GO_CHARMAP_SEL_H_
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-#define GO_CHARMAP_SEL_TYPE        (go_charmap_sel_get_type ())
-#define GO_CHARMAP_SEL(obj)        (G_TYPE_CHECK_INSTANCE_CAST((obj), GO_CHARMAP_SEL_TYPE, GOCharmapSel))
-#define IS_GO_CHARMAP_SEL(obj)     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GO_CHARMAP_SEL_TYPE))
-
-typedef struct _GOCharmapSel GOCharmapSel;
-
-typedef enum {
-	GO_CHARMAP_SEL_TO_UTF8 = 0,
-	GO_CHARMAP_SEL_FROM_UTF8
-} GOCharmapSelTestDirection;
-
-/* START_INCLUDE_H */
-/* END_INCLUDE_H */
-
-/* START_DECLARATION */
-gchar const * go_charmap_sel_get_encoding (GOCharmapSel *cs);
-GtkWidget * go_charmap_sel_new (GOCharmapSelTestDirection test);
-gboolean go_charmap_sel_set_encoding (GOCharmapSel *cs, const char *enc);
-/* END_DECLARATION */
-
-G_END_DECLS
-
-#endif /* _GO_CHARMAP_SEL_H_ */
diff --git a/src/go-optionmenu.c b/src/go-optionmenu.c
deleted file mode 100644
index f59c499..0000000
--- a/src/go-optionmenu.c
+++ /dev/null
@@ -1,1079 +0,0 @@
-/*
- * go-optionmenu.c
- *
- * Copyright (C) 2002 Andreas J. Guelzow <aguelzow at taliesin.ca>
- *
- * based extensively on:
- *
- * GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * Modified by the GTK+ Team and others 1997-2000.  See the GTK AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
- * USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "include.h"
-#include <glib/gi18n.h>
-
-/*START_INCLUDE*/
-#include "go-optionmenu.h"
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gdk/gdkkeysyms.h>
-/*END_INCLUDE*/
-
-/*START_STATIC*/
-static void connect_menu_signals (GtkMenu *menu, gpointer data);
-static void connect_menu_signals_to_submenu (GtkMenuItem *item, gpointer data);
-static gint go_option_menu_button_press (GtkWidget      *widget,
-			      GdkEventButton *event);
-static void go_option_menu_calc_size (GOOptionMenu *option_menu);
-static void go_option_menu_changed (GOOptionMenu *option_menu);
-static GType go_option_menu_child_type (GtkContainer       *container);
-static void go_option_menu_class_init (GOOptionMenuClass *class);
-static void go_option_menu_destroy (GtkObject *object);
-static void go_option_menu_detacher (GtkWidget     *widget,
-				     GtkMenu	*menu) ;
-static gint go_option_menu_expose (GtkWidget      *widget,
-			GdkEventExpose *event);
-static void go_option_menu_get_property (GObject            *object,
-				   guint               prop_id,
-				   GValue             *value,
-				   GParamSpec         *pspec);
-static void go_option_menu_get_props (GOOptionMenu       *option_menu,
-			   GOOptionMenuProps  *props);
-static void go_option_menu_hide_all (GtkWidget *widget);
-static void go_option_menu_init (GOOptionMenu *option_menu);
-static void go_option_menu_item_destroy_cb (GtkWidget     *widget,
-				 GOOptionMenu *option_menu);
-static void go_option_menu_item_state_changed_cb (GtkWidget      *widget,
-				       GtkStateType    previous_state,
-				       GOOptionMenu  *option_menu);
-static gint go_option_menu_key_press (GtkWidget   *widget,
-			   GdkEventKey *event);
-static gboolean go_option_menu_mnemonic_activate (GtkWidget *widget,
-				   gboolean   group_cycling);
-static void go_option_menu_paint (GtkWidget    *widget,
-		       GdkRectangle *area);
-static void go_option_menu_position (GtkMenu  *menu,
-			  gint     *x,
-			  gint     *y,
-			  gboolean *push_in,
-			  gpointer  user_data);
-static void go_option_menu_remove_contents (GOOptionMenu *option_menu);
-static void go_option_menu_remove_menu (GOOptionMenu *option_menu);
-static gint go_option_menu_scroll_event (GtkWidget          *widget,
-			      GdkEventScroll     *event);
-static void go_option_menu_select_first_sensitive (GOOptionMenu *option_menu);
-static void go_option_menu_selection_done (GtkMenu  *menu,
-				GOOptionMenu *option_menu);
-static void go_option_menu_set_property (GObject            *object,
-			      guint               prop_id,
-			      const GValue       *value,
-			      GParamSpec         *pspec);
-static void go_option_menu_show_all (GtkWidget *widget);
-static void go_option_menu_size_allocate (GtkWidget     *widget,
-				    GtkAllocation *allocation);
-static void go_option_menu_size_request (GtkWidget      *widget,
-				   GtkRequisition *requisition);
-static void go_option_menu_update_contents (GOOptionMenu *option_menu, GtkMenu *menu);
-static void go_option_menu_update_contents_real (GOOptionMenu *option_menu, 
-					   GtkMenu *menu, GtkMenuItem *menu_item);
-/*END_STATIC*/
-
-/*START_EXTERN*/
-/*END_EXTERN*/
-
-
-static void go_option_menu_class_init      (GOOptionMenuClass *klass);
-static void go_option_menu_init            (GOOptionMenu      *option_menu);
-static void go_option_menu_destroy         (GtkObject          *object);
-static void go_option_menu_set_property    (GObject            *object,
-						  guint               prop_id,
-						  const GValue       *value,
-						  GParamSpec         *pspec);
-static void go_option_menu_get_property    (GObject            *object,
-						  guint               prop_id,
-						  GValue             *value,
-						  GParamSpec         *pspec);
-static void go_option_menu_size_request    (GtkWidget          *widget,
-						  GtkRequisition     *requisition);
-static void go_option_menu_size_allocate   (GtkWidget          *widget,
-						  GtkAllocation      *allocation);
-static void go_option_menu_paint           (GtkWidget          *widget,
-						  GdkRectangle       *area);
-static gint go_option_menu_expose          (GtkWidget          *widget,
-						  GdkEventExpose     *event);
-static gint go_option_menu_button_press    (GtkWidget          *widget,
-						  GdkEventButton     *event);
-static gint go_option_menu_key_press       (GtkWidget          *widget,
-						  GdkEventKey        *event);
-static void go_option_menu_selection_done  (GtkMenu            *menu,
-						  GOOptionMenu *option_menu);
-static void go_option_menu_update_contents (GOOptionMenu *option_menu, GtkMenu *menu);
-static void go_option_menu_remove_contents (GOOptionMenu *option_menu);
-static void go_option_menu_calc_size       (GOOptionMenu *option_menu);
-static void go_option_menu_position        (GtkMenu            *menu,
-						  gint               *x,
-						  gint               *y,
-						  gint               *scroll_offet,
-						  gpointer            user_data);
-static void go_option_menu_show_all        (GtkWidget          *widget);
-static void go_option_menu_hide_all        (GtkWidget          *widget);
-static gboolean go_option_menu_mnemonic_activate (GtkWidget    *widget,
-							gboolean      group_cycling);
-static GType go_option_menu_child_type   (GtkContainer       *container);
-static gint go_option_menu_scroll_event    (GtkWidget          *widget,
-						  GdkEventScroll     *event);
-
-enum
-{
-  CHANGED,
-  LAST_SIGNAL
-};
-
-enum
-{
-  PROP_0,
-  PROP_MENU,
-  LAST_PROP
-};
-
-static const GOOptionMenuProps default_props = {
-  TRUE,
-  { 7, 13 },
-  { 7, 5, 2, 2 },		/* Left, right, top, bottom */
-  1,
-  0
-};
-
-static GtkButtonClass *parent_class = NULL;
-static guint           signals[LAST_SIGNAL] = { 0 };
-
-
-GType go_option_menu_get_type (void)
-{
-  static GType option_menu_type = 0;
-
-  if (!option_menu_type)
-    {
-      static const GTypeInfo option_menu_info =
-      {
-	sizeof (GOOptionMenuClass),
-	NULL,		/* base_init */
-	NULL,		/* base_finalize */
-	(GClassInitFunc) go_option_menu_class_init,
-	NULL,		/* class_finalize */
-	NULL,		/* class_data */
-	sizeof (GOOptionMenu),
-	0,		/* n_preallocs */
-	(GInstanceInitFunc) go_option_menu_init,
-      };
-
-      option_menu_type =
-	g_type_register_static (GTK_TYPE_BUTTON, "GOOptionMenu",
-				&option_menu_info, 0);
-    }
-
-  return option_menu_type;
-}
-
-static void go_option_menu_class_init (GOOptionMenuClass *class)
-{
-  GObjectClass *gobject_class;
-  GtkObjectClass *object_class;
-  GtkWidgetClass *widget_class;
-  GtkButtonClass *button_class;
-  GtkContainerClass *container_class;
-
-  gobject_class = (GObjectClass*) class;
-  object_class = (GtkObjectClass*) class;
-  widget_class = (GtkWidgetClass*) class;
-  button_class = (GtkButtonClass*) class;
-  container_class = (GtkContainerClass*) class;
-
-  parent_class = g_type_class_peek_parent (class);
-
-  signals[CHANGED] =
-    g_signal_new ("changed",
-                  G_OBJECT_CLASS_TYPE (class),
-                  G_SIGNAL_RUN_LAST,
-                  G_STRUCT_OFFSET (GOOptionMenuClass, changed),
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__VOID,
-                  G_TYPE_NONE, 0);
-
-  gobject_class->set_property = go_option_menu_set_property;
-  gobject_class->get_property = go_option_menu_get_property;
-  object_class->destroy = go_option_menu_destroy;
-  
-  widget_class->size_request = go_option_menu_size_request;
-  widget_class->size_allocate = go_option_menu_size_allocate;
-  widget_class->expose_event = go_option_menu_expose;
-  widget_class->button_press_event = go_option_menu_button_press;
-  widget_class->key_press_event = go_option_menu_key_press;
-  widget_class->scroll_event = go_option_menu_scroll_event;
-  widget_class->show_all = go_option_menu_show_all;
-  widget_class->hide_all = go_option_menu_hide_all;
-  widget_class->mnemonic_activate = go_option_menu_mnemonic_activate;
-
-  container_class->child_type = go_option_menu_child_type;
-
-  g_object_class_install_property (gobject_class,
-                                   PROP_MENU,
-                                   g_param_spec_object ("menu",
-                                                        _("Menu"),
-                                                        _("The menu of options"),
-                                                        GTK_TYPE_MENU,
-                                                        G_PARAM_READABLE | G_PARAM_WRITABLE));
-  
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_boxed ("indicator_size",
-							       _("Indicator Size"),
-							       _("Size of dropdown indicator"),
-							       GTK_TYPE_REQUISITION,
-							       G_PARAM_READABLE));
-  gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_boxed ("indicator_spacing",
-							       _("Indicator Spacing"),
-							       _("Spacing around indicator"),
-							       GTK_TYPE_BORDER,
-							       G_PARAM_READABLE));
-}
-
-static GType go_option_menu_child_type (GtkContainer       *container)
-{
-  return G_TYPE_NONE;
-}
-
-static void go_option_menu_init (GOOptionMenu *option_menu)
-{
-  GTK_WIDGET_SET_FLAGS (option_menu, GTK_CAN_FOCUS);
-  GTK_WIDGET_UNSET_FLAGS (option_menu, GTK_CAN_DEFAULT | GTK_RECEIVES_DEFAULT);
-
-  option_menu->menu = NULL;
-  option_menu->select_menu = NULL;
-  option_menu->menu_item = NULL;
-  option_menu->old_menu_item = NULL;
-  option_menu->last_signaled_menu_item = NULL;
-  option_menu->selection = NULL;
-  option_menu->new_selection = TRUE;
-  option_menu->width = 0;
-  option_menu->height = 0;
-}
-
-GtkWidget* go_option_menu_new (void)
-{
-  return g_object_new (GO_TYPE_OPTION_MENU, NULL);
-}
-
-/* TODO dOm : this function seems not to be used. Is it possible to remove it ?
-GtkWidget* go_option_menu_get_menu (GOOptionMenu *option_menu)
-{
-  g_return_val_if_fail (GO_IS_OPTION_MENU (option_menu), NULL);
-
-  return option_menu->menu;
-}
-*/
-
-static void go_option_menu_detacher (GtkWidget     *widget,
-				     GtkMenu	*menu) 
-{
-  GOOptionMenu *option_menu;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (widget));
-
-  option_menu = GO_OPTION_MENU (widget);
-  g_return_if_fail (option_menu->menu == (GtkWidget*) menu);
-
-  go_option_menu_remove_contents (option_menu);
-  g_signal_handlers_disconnect_by_func (option_menu->menu,
-					go_option_menu_selection_done,
-					option_menu);
-  g_signal_handlers_disconnect_by_func (option_menu->menu,
-					go_option_menu_calc_size,
-					option_menu);
-  
-  option_menu->menu = NULL;
-  g_object_notify (G_OBJECT (option_menu), "menu");
-}
-
-static void connect_menu_signals (GtkMenu *menu, gpointer data);
-
-static void connect_menu_signals_to_submenu (GtkMenuItem *item, gpointer data)
-{
-	GtkMenu *menu = GTK_MENU(gtk_menu_item_get_submenu (item));
-	
-	if (menu)
-		connect_menu_signals (menu, data);
-}
-
-
-static void connect_menu_signals (GtkMenu *menu, gpointer data)
-{
-	GList *children;
-	
-	g_signal_connect_after (menu, "selection_done",
-				G_CALLBACK (go_option_menu_selection_done),
-				data);
-	children = gtk_container_get_children (GTK_CONTAINER(menu));
-	g_list_foreach (children, (GFunc)connect_menu_signals_to_submenu, data);
-	g_list_free (children);
-}
-
-
-void go_option_menu_set_menu (GOOptionMenu *option_menu,
-			       GtkWidget *menu)
-{
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-  g_return_if_fail (GTK_IS_MENU (menu));
-
-  if (option_menu->menu != menu)
-    {
-      go_option_menu_remove_menu (option_menu);
-
-      option_menu->menu = menu;
-      gtk_menu_attach_to_widget (GTK_MENU (menu),
-				 GTK_WIDGET (option_menu),
-				 go_option_menu_detacher);
-
-      go_option_menu_calc_size (option_menu);
-
-      connect_menu_signals (GTK_MENU(option_menu->menu), option_menu);
-      
-      g_signal_connect_swapped (option_menu->menu, "size_request",
-				G_CALLBACK (go_option_menu_calc_size),
-				option_menu);
-
-      if (GTK_WIDGET (option_menu)->parent)
-	gtk_widget_queue_resize (GTK_WIDGET (option_menu));
-
-      go_option_menu_update_contents (option_menu, NULL);
-      
-      g_object_notify (G_OBJECT (option_menu), "menu");
-    }
-}
-
-void go_option_menu_remove_menu (GOOptionMenu *option_menu)
-{
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->menu)
-    {
-      if (GTK_MENU_SHELL (option_menu->menu)->active)
-	g_signal_emit_by_name (option_menu->menu, "cancel", 0);
-      
-      gtk_menu_detach (GTK_MENU (option_menu->menu));
-    }
-}
-
-void go_option_menu_set_history (GOOptionMenu *option_menu, GSList *selection)
-{
-  GtkWidget *item;
-  
-  g_return_if_fail (selection != NULL);
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->menu)
-    {
-	    GtkMenu *menu = GTK_MENU(option_menu->menu);
-	    
-	    while (selection->next) {
-		    GList *children = gtk_container_get_children (GTK_CONTAINER(menu));
-		    gint index = GPOINTER_TO_INT (selection->data);
-		    item = GTK_WIDGET(g_list_nth_data (children, index));
-		    menu = GTK_MENU(gtk_menu_item_get_submenu (GTK_MENU_ITEM(item)));
-		    selection = selection->next;
-		    g_list_free (children);
-	    }
-	    
-	    gtk_menu_set_active (menu,  GPOINTER_TO_INT (selection->data));
-	    item = gtk_menu_get_active (menu);
-	    if (item != option_menu->menu_item)
-		    go_option_menu_update_contents (option_menu, menu);
-	    g_slist_free (option_menu->selection);
-	    option_menu->selection = g_slist_copy (selection);
-    }
-}
-
-/**
- * go_option_menu_get_history:
- * @option_menu: a #GOOptionMenu
- * 
- * Retrieves the currently selected menu item. The menu
- * items are numbered from top to bottom, starting with 0. 
- * 
- * Return value: the selected menu_item
- **/
-
-GtkWidget * go_option_menu_get_history (GOOptionMenu *option_menu)
-{
-     return GTK_WIDGET(option_menu->menu_item);
-}
-
-
-
-
-static void go_option_menu_set_property (GObject            *object,
-			      guint               prop_id,
-			      const GValue       *value,
-			      GParamSpec         *pspec)
-{
-  GOOptionMenu *option_menu = GO_OPTION_MENU (object);
-
-  switch (prop_id)
-    {
-    case PROP_MENU:
-      go_option_menu_set_menu (option_menu, g_value_get_object (value));
-      break;
-      
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-static void go_option_menu_get_property (GObject            *object,
-				   guint               prop_id,
-				   GValue             *value,
-				   GParamSpec         *pspec)
-{
-  GOOptionMenu *option_menu = GO_OPTION_MENU (object);
-
-  switch (prop_id)
-    {
-    case PROP_MENU:
-      g_value_set_object (value, option_menu->menu);
-      break;
-      
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-static void go_option_menu_destroy (GtkObject *object)
-{
-  GOOptionMenu *option_menu;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (object));
-
-  option_menu = GO_OPTION_MENU (object);
-
-  if (option_menu->selection) {
-	  g_slist_free (option_menu->selection);
-	  option_menu->selection = NULL;
-  }
-
-  if (option_menu->menu)
-    gtk_widget_destroy (option_menu->menu);
-
-  if (GTK_OBJECT_CLASS (parent_class)->destroy)
-    (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void go_option_menu_get_props (GOOptionMenu       *option_menu,
-			   GOOptionMenuProps  *props)
-{
-  GtkRequisition *indicator_size;
-  GtkBorder *indicator_spacing;
-  
-  gtk_widget_style_get (GTK_WIDGET (option_menu),
-			"indicator_size", &indicator_size,
-			"indicator_spacing", &indicator_spacing,
-			"interior_focus", &props->interior_focus,
-			"focus_line_width", &props->focus_width,
-			"focus_padding", &props->focus_pad,
-			NULL);
-
-  if (indicator_size)
-    props->indicator_size = *indicator_size;
-  else
-    props->indicator_size = default_props.indicator_size;
-
-  if (indicator_spacing)
-    props->indicator_spacing = *indicator_spacing;
-  else
-    props->indicator_spacing = default_props.indicator_spacing;
-
-  g_free (indicator_size);
-  g_free (indicator_spacing);
-}
-
-static void go_option_menu_size_request (GtkWidget      *widget,
-				   GtkRequisition *requisition)
-{
-  GOOptionMenu *option_menu = GO_OPTION_MENU (widget);
-  GOOptionMenuProps props;
-  gint tmp;
-  GtkRequisition child_requisition = { 0, 0 };
-      
-  go_option_menu_get_props (option_menu, &props);
- 
-  if (GTK_BIN (option_menu)->child && GTK_WIDGET_VISIBLE (GTK_BIN (option_menu)->child))
-    {
-      gtk_widget_size_request (GTK_BIN (option_menu)->child, &child_requisition);
-
-      requisition->width += child_requisition.width;
-      requisition->height += child_requisition.height;
-    }
-  
-  requisition->width = ((GTK_CONTAINER (widget)->border_width +
-			 GTK_WIDGET (widget)->style->xthickness + props.focus_pad) * 2 +
-			MAX (child_requisition.width, option_menu->width) +
- 			props.indicator_size.width +
- 			props.indicator_spacing.left + props.indicator_spacing.right +
-			CHILD_LEFT_SPACING + CHILD_RIGHT_SPACING + props.focus_width * 2);
-  requisition->height = ((GTK_CONTAINER (widget)->border_width +
-			  GTK_WIDGET (widget)->style->ythickness + props.focus_pad) * 2 +
-			 MAX (child_requisition.height, option_menu->height) +
-			 CHILD_TOP_SPACING + CHILD_BOTTOM_SPACING + props.focus_width * 2);
-
-  tmp = (requisition->height - MAX (child_requisition.height, option_menu->height) +
-	 props.indicator_size.height + props.indicator_spacing.top + props.indicator_spacing.bottom);
-  requisition->height = MAX (requisition->height, tmp);
-}
-
-static void go_option_menu_size_allocate (GtkWidget     *widget,
-				    GtkAllocation *allocation)
-{
-  GtkWidget *child;
-  GtkButton *button = GTK_BUTTON (widget);
-  GtkAllocation child_allocation;
-  GOOptionMenuProps props;
-  gint border_width;
-    
-  go_option_menu_get_props (GO_OPTION_MENU (widget), &props);
-  border_width = GTK_CONTAINER (widget)->border_width;
-
-  widget->allocation = *allocation;
-  if (GTK_WIDGET_REALIZED (widget))
-    gdk_window_move_resize (button->event_window,
-			    allocation->x + border_width, allocation->y + border_width,
-			    allocation->width - border_width * 2, allocation->height - border_width * 2);
-
-  child = GTK_BIN (widget)->child;
-  if (child && GTK_WIDGET_VISIBLE (child))
-    {
-      gint xthickness = GTK_WIDGET (widget)->style->xthickness;
-      gint ythickness = GTK_WIDGET (widget)->style->ythickness;
-      
-      child_allocation.x = widget->allocation.x + border_width + xthickness + props.focus_width + props.focus_pad + CHILD_LEFT_SPACING;
-      child_allocation.y = widget->allocation.y + border_width + ythickness + props.focus_width + props.focus_pad + CHILD_TOP_SPACING;
-      child_allocation.width = MAX (1, allocation->width - (border_width + xthickness + props.focus_width + props.focus_pad) * 2 -
-				    props.indicator_size.width - props.indicator_spacing.left - props.indicator_spacing.right -
-				    CHILD_LEFT_SPACING - CHILD_RIGHT_SPACING);
-      child_allocation.height = MAX (1, allocation->height - (border_width + ythickness + props.focus_width + props.focus_pad) * 2 -
-				     CHILD_TOP_SPACING - CHILD_BOTTOM_SPACING);
-
-      if (gtk_widget_get_direction (GTK_WIDGET (widget)) == GTK_TEXT_DIR_RTL) 
-	child_allocation.x += props.indicator_size.width + props.indicator_spacing.left + props.indicator_spacing.right;
-
-      gtk_widget_size_allocate (child, &child_allocation);
-    }
-}
-
-static void go_option_menu_paint (GtkWidget    *widget,
-		       GdkRectangle *area)
-{
-  GdkRectangle button_area;
-  GOOptionMenuProps props;
-  gint border_width;
-  gint tab_x;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (widget));
-  g_return_if_fail (area != NULL);
-
-  if (GTK_WIDGET_DRAWABLE (widget))
-    {
-      border_width = GTK_CONTAINER (widget)->border_width;
-      go_option_menu_get_props (GO_OPTION_MENU (widget), &props);
-
-      button_area.x = widget->allocation.x + border_width;
-      button_area.y = widget->allocation.y + border_width;
-      button_area.width = widget->allocation.width - 2 * border_width;
-      button_area.height = widget->allocation.height - 2 * border_width;
-
-      if (!props.interior_focus && GTK_WIDGET_HAS_FOCUS (widget))
-	{
-	  button_area.x += props.focus_width + props.focus_pad;
-	  button_area.y += props.focus_width + props.focus_pad;
-	  button_area.width -= 2 * (props.focus_width + props.focus_pad);
-	  button_area.height -= 2 * (props.focus_width + props.focus_pad);
-	}
-      
-      gtk_paint_box (widget->style, widget->window,
-		     GTK_WIDGET_STATE (widget), GTK_SHADOW_OUT,
-		     area, widget, "optionmenu",
-		     button_area.x, button_area.y,
-		     button_area.width, button_area.height);
-      
-      if (gtk_widget_get_direction (GTK_WIDGET (widget)) == GTK_TEXT_DIR_RTL) 
-	tab_x = button_area.x + props.indicator_spacing.right + 
-	  widget->style->xthickness;
-      else
-	tab_x = button_area.x + button_area.width - 
-	  props.indicator_size.width - props.indicator_spacing.right -
-	  widget->style->xthickness;
-
-      gtk_paint_tab (widget->style, widget->window,
-		     GTK_WIDGET_STATE (widget), GTK_SHADOW_OUT,
-		     area, widget, "optionmenutab",
-		     tab_x,
-		     button_area.y + (button_area.height - props.indicator_size.height) / 2,
-		     props.indicator_size.width, props.indicator_size.height);
-      
-      if (GTK_WIDGET_HAS_FOCUS (widget))
-	{
-	  if (props.interior_focus)
-	    {
-	      button_area.x += widget->style->xthickness + props.focus_pad;
-	      button_area.y += widget->style->ythickness + props.focus_pad;
-	      button_area.width -= 2 * (widget->style->xthickness + props.focus_pad) +
-		      props.indicator_spacing.left +
-		      props.indicator_spacing.right +
-		      props.indicator_size.width;
-	      button_area.height -= 2 * (widget->style->ythickness + props.focus_pad);
-	      if (gtk_widget_get_direction (GTK_WIDGET (widget)) == GTK_TEXT_DIR_RTL) 
-		button_area.x += props.indicator_spacing.left +
-		  props.indicator_spacing.right +
-		  props.indicator_size.width;
-	    }
-	  else
-	    {
-	      button_area.x -= props.focus_width + props.focus_pad;
-	      button_area.y -= props.focus_width + props.focus_pad;
-	      button_area.width += 2 * (props.focus_width + props.focus_pad);
-	      button_area.height += 2 * (props.focus_width + props.focus_pad);
-	    }
-	    
-	  gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
-			   area, widget, "button",
-			   button_area.x, 
-			   button_area.y, 
-			   button_area.width,
-			   button_area.height);
-	}
-    }
-}
-
-static gint go_option_menu_expose (GtkWidget      *widget,
-			GdkEventExpose *event)
-{
-  g_return_val_if_fail (GO_IS_OPTION_MENU (widget), FALSE);
-  g_return_val_if_fail (event != NULL, FALSE);
-
-  if (GTK_WIDGET_DRAWABLE (widget))
-    {
-      go_option_menu_paint (widget, &event->area);
-
-      if (GTK_BIN (widget)->child)
-	gtk_container_propagate_expose (GTK_CONTAINER (widget),
-					GTK_BIN (widget)->child,
-					event);
-    }
-
-  return FALSE;
-}
-
-static gint go_option_menu_button_press (GtkWidget      *widget,
-			      GdkEventButton *event)
-{
-  GOOptionMenu *option_menu;
-  GtkWidget *menu_item;
-
-  g_return_val_if_fail (GO_IS_OPTION_MENU (widget), FALSE);
-  g_return_val_if_fail (event != NULL, FALSE);
-
-  option_menu = GO_OPTION_MENU (widget);
-
-  if ((event->type == GDK_BUTTON_PRESS) &&
-      (event->button == 1))
-    {
-	    option_menu->new_selection = TRUE;
-	    option_menu->old_menu_item = option_menu->menu_item;
-	    go_option_menu_remove_contents (option_menu);
-	    gtk_menu_popup (GTK_MENU (option_menu->menu), NULL, NULL,
-			    go_option_menu_position, option_menu,
-			    event->button, event->time);
-	    menu_item = gtk_menu_get_active (GTK_MENU (option_menu->menu));
-	    if (menu_item)
-		    gtk_menu_shell_select_item (GTK_MENU_SHELL (option_menu->menu), menu_item);
-	    else
-		    gtk_menu_shell_select_item (GTK_MENU_SHELL (option_menu->select_menu), 
-						option_menu->old_menu_item);
-		    
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
-static gint go_option_menu_key_press (GtkWidget   *widget,
-			   GdkEventKey *event)
-{
-  GOOptionMenu *option_menu;
-  GtkWidget *menu_item;
-
-  g_return_val_if_fail (GO_IS_OPTION_MENU (widget), FALSE);
-  g_return_val_if_fail (event != NULL, FALSE);
-
-  option_menu = GO_OPTION_MENU (widget);
-
-  switch (event->keyval)
-    {
-    case GDK_KP_Space:
-    case GDK_space:
-	    option_menu->new_selection= TRUE;
-	    option_menu->old_menu_item = option_menu->menu_item;
-	    go_option_menu_remove_contents (option_menu);
-	    gtk_menu_popup (GTK_MENU (option_menu->menu), NULL, NULL,
-			    go_option_menu_position, option_menu,
-			    0, event->time);
-	    menu_item = gtk_menu_get_active (GTK_MENU (option_menu->menu));
-	    if (menu_item)
-		    gtk_menu_shell_select_item (GTK_MENU_SHELL (option_menu->menu), menu_item);
-	    else
-		    gtk_menu_shell_select_item (GTK_MENU_SHELL (option_menu->select_menu), 
-						option_menu->old_menu_item);
-	    return TRUE;
-    }
-  
-  return FALSE;
-}
-
-static void go_option_menu_selection_done (GtkMenu  *menu,
-				GOOptionMenu *option_menu)
-{
-  g_return_if_fail (menu != NULL);
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  go_option_menu_update_contents (option_menu, menu);
-}
-
-static void go_option_menu_changed (GOOptionMenu *option_menu)
-{
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->last_signaled_menu_item && GTK_IS_CHECK_MENU_ITEM(option_menu->last_signaled_menu_item))
-	  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(option_menu->last_signaled_menu_item),
-					  FALSE);
-  
-  option_menu->last_signaled_menu_item = option_menu->menu_item;
-  if (option_menu->last_signaled_menu_item
-      && GTK_IS_CHECK_MENU_ITEM(option_menu->last_signaled_menu_item))
-          gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(option_menu->last_signaled_menu_item),
-					  TRUE);
-  
-  g_signal_emit (option_menu, signals[CHANGED], 0);
-}
-
-static void go_option_menu_select_first_sensitive (GOOptionMenu *option_menu)
-{
-}
-
-static void go_option_menu_item_state_changed_cb (GtkWidget      *widget,
-				       GtkStateType    previous_state,
-				       GOOptionMenu  *option_menu)
-{
-  GtkWidget *child = GTK_BIN (option_menu)->child;
-
-  if (child && GTK_WIDGET_SENSITIVE (child) != GTK_WIDGET_IS_SENSITIVE (widget))
-    gtk_widget_set_sensitive (child, GTK_WIDGET_IS_SENSITIVE (widget));
-}
-
-static void go_option_menu_item_destroy_cb (GtkWidget     *widget,
-				 GOOptionMenu *option_menu)
-{
-  GtkWidget *child = GTK_BIN (option_menu)->child;
-
-  if (child)
-    {
-      g_object_ref (child);
-      go_option_menu_remove_contents (option_menu);
-      gtk_widget_destroy (child);
-      g_object_unref (child);
-
-      go_option_menu_select_first_sensitive (option_menu);
-    }
-}
-
-static void go_option_menu_update_contents_real (GOOptionMenu *option_menu, 
-					   GtkMenu *menu, GtkMenuItem *menu_item)
-{
-	GtkWidget *child;
-	GtkRequisition child_requisition;
-
-	g_return_if_fail (option_menu != NULL);
-	g_return_if_fail (menu_item != NULL);
-	g_return_if_fail (menu != NULL);
-	
-	go_option_menu_remove_contents (option_menu);
-	option_menu->menu_item = GTK_WIDGET(menu_item);
-	option_menu->old_menu_item = NULL;
-	option_menu->select_menu = GTK_WIDGET(menu);
-	g_object_ref (option_menu->menu_item);
-	child = GTK_BIN (option_menu->menu_item)->child;
-	if (child)
-	{
-		if (!GTK_WIDGET_IS_SENSITIVE (option_menu->menu_item))
-			gtk_widget_set_sensitive (child, FALSE);
-		gtk_widget_reparent (child, GTK_WIDGET (option_menu));
-	}
-	
-	g_signal_connect (option_menu->menu_item, "state_changed",
-			  G_CALLBACK (go_option_menu_item_state_changed_cb), option_menu);
-	g_signal_connect (option_menu->menu_item, "destroy",
-			  G_CALLBACK (go_option_menu_item_destroy_cb), option_menu);
-	
-	gtk_widget_size_request (child, &child_requisition);
-	gtk_widget_size_allocate (GTK_WIDGET (option_menu),
-				  &(GTK_WIDGET (option_menu)->allocation));
-	
-	if (GTK_WIDGET_DRAWABLE (option_menu))
-		gtk_widget_queue_draw (GTK_WIDGET (option_menu));
-}
-
-
-
-static void go_option_menu_update_contents (GOOptionMenu *option_menu, GtkMenu *menu)
-{
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->menu)
-  {
-	  GtkWidget *old_item = option_menu->menu_item;
-	  GtkWidget *new_item;
-	  
-	  new_item = menu ? gtk_menu_get_active (menu) :
-		  gtk_menu_get_active (GTK_MENU(option_menu->menu));
-	  
- 	  if (new_item && !gtk_menu_item_get_submenu (GTK_MENU_ITEM(new_item))) {
-		  g_slist_free (option_menu->selection);
-		  option_menu->selection = NULL;
-		  
-		  go_option_menu_update_contents_real (option_menu, 
-							     menu ? menu : GTK_MENU(option_menu->menu), 
-							     GTK_MENU_ITEM(new_item));
-	  } else {
-		  if (option_menu->old_menu_item)
-			  go_option_menu_update_contents_real (option_menu, 
-								     GTK_MENU(option_menu->select_menu), 
-								     GTK_MENU_ITEM(option_menu->old_menu_item));
-	  }
-	  if (new_item && !(gtk_menu_item_get_submenu (GTK_MENU_ITEM(new_item)) && option_menu->new_selection)) {
-		  GList *children = gtk_container_get_children (GTK_CONTAINER(menu ? menu : GTK_MENU(option_menu->menu)));
-		  option_menu->selection = g_slist_prepend(option_menu->selection, 
-							   GINT_TO_POINTER(g_list_position
-									   (children, g_list_find (children, new_item))));
-		  g_list_free (children);
-		  option_menu->new_selection = FALSE;
-	  }
-	  
-	  if (old_item != option_menu->menu_item)
-		  go_option_menu_changed (option_menu);
-  }
-}
-
-static void go_option_menu_remove_contents (GOOptionMenu *option_menu)
-{
-  GtkWidget *child;
-  
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  if (option_menu->menu_item)
-    {
-      child = GTK_BIN (option_menu)->child;
-  
-      if (child)
-	{
-	  gtk_widget_set_sensitive (child, TRUE);
-	  gtk_widget_reparent (child, option_menu->menu_item);
-	}
-
-      g_signal_handlers_disconnect_by_func (option_menu->menu_item,
-					    go_option_menu_item_state_changed_cb,
-					    option_menu);				     
-      g_signal_handlers_disconnect_by_func (option_menu->menu_item,
-					    go_option_menu_item_destroy_cb,
-					    option_menu);
-      g_object_unref (option_menu->menu_item);
-      option_menu->menu_item = NULL;
-    }
-}
-
-static void go_option_menu_calc_size (GOOptionMenu *option_menu)
-{
-  GtkWidget *child;
-  GList *children;
-  GtkRequisition child_requisition;
-  gint old_width = option_menu->width;
-  gint old_height = option_menu->height;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (option_menu));
-
-  option_menu->width = 0;
-  option_menu->height = 0;
-
-  if (option_menu->menu)
-    {
-      children = GTK_MENU_SHELL (option_menu->menu)->children;
-      while (children)
-	{
-	  child = children->data;
-	  children = children->next;
-
-	  if (GTK_WIDGET_VISIBLE (child))
-	    {
-	      GtkWidget *inner = GTK_BIN (child)->child;
-
-	      if (inner)
-		{
-		  gtk_widget_size_request (inner, &child_requisition);
-
-		  option_menu->width = MAX (option_menu->width, child_requisition.width);
-		  option_menu->height = MAX (option_menu->height, child_requisition.height);
-		}
-	    }
-	}
-    }
-
-  if (old_width != option_menu->width || old_height != option_menu->height)
-    gtk_widget_queue_resize (GTK_WIDGET (option_menu));
-}
-
-static void go_option_menu_position (GtkMenu  *menu,
-			  gint     *x,
-			  gint     *y,
-			  gboolean *push_in,
-			  gpointer  user_data)
-{
-  GOOptionMenu *option_menu;
-  GtkWidget *active;
-  GtkWidget *child;
-  GtkWidget *widget;
-  GtkRequisition requisition;
-  GList *children;
-  gint screen_width;
-  gint menu_xpos;
-  gint menu_ypos;
-  gint menu_width;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (user_data));
-
-  option_menu = GO_OPTION_MENU (user_data);
-  widget = GTK_WIDGET (option_menu);
-
-  gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition);
-  menu_width = requisition.width;
-
-  active = gtk_menu_get_active (GTK_MENU (option_menu->menu));
-  gdk_window_get_origin (widget->window, &menu_xpos, &menu_ypos);
-
-  menu_xpos += widget->allocation.x;
-  menu_ypos += widget->allocation.y + widget->allocation.height / 2 - 2;
-
-  if (active != NULL)
-    {
-      gtk_widget_get_child_requisition (active, &requisition);
-      menu_ypos -= requisition.height / 2;
-    }
-
-  children = GTK_MENU_SHELL (option_menu->menu)->children;
-  while (children)
-    {
-      child = children->data;
-
-      if (active == child)
-	break;
-
-      if (GTK_WIDGET_VISIBLE (child))
-	{
-	  gtk_widget_get_child_requisition (child, &requisition);
-	  menu_ypos -= requisition.height;
-	}
-
-      children = children->next;
-    }
-
-  screen_width = gdk_screen_get_width (gtk_widget_get_screen (widget));
-  
-  if (menu_xpos < 0)
-    menu_xpos = 0;
-  else if ((menu_xpos + menu_width) > screen_width)
-    menu_xpos -= ((menu_xpos + menu_width) - screen_width);
-
-  *x = menu_xpos;
-  *y = menu_ypos;
-  *push_in = TRUE;
-}
-
-
-static void go_option_menu_show_all (GtkWidget *widget)
-{
-  GtkContainer *container;
-  GOOptionMenu *option_menu;
-  
-  g_return_if_fail (GO_IS_OPTION_MENU (widget));
-  container = GTK_CONTAINER (widget);
-  option_menu = GO_OPTION_MENU (widget);
-
-  gtk_widget_show  OPTION_MENU (widget);  get));  dget)  );  (widget));   )  ;  K_MENU(option_menu->menu)));  ht;  .focus_pad) * 2 -        ),  mparison_number))  umber)) -> menu_item ),  item ),   ’x-c+  ã\ÿ  €Oc+           Ø\ÿ         ÐÖ\ÿ  k€c+  6                    è     è!     è!      â\ÿ  ã\ÿ  x4-c+           Ù\ÿ          ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ         À/‘c+  ujc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          x4-c+           Ù\ÿ          Ð×\ÿ  k€c+  à!     à!      â\ÿ  ã\ÿ  Hþc+          àÙ\ÿ         ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ  Ðâ\ÿ  Èâ\ÿ  8‹1c+  Œp˜        ã\ÿ  ujc+  €Šc+                  àÙ\ÿ         °Ø\ÿ  k€c+          G       H   I       J   K           M   N   O       P    â\ÿ  ã\ÿ  Hµãc+          €Û\ÿ         ’bc+          †€c+   â\ÿ         0/‘c+  ujc+   @-c+   éÀc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          Hµãc+          €Û\ÿ 
         ÀÙ\ÿ  k€c+  8µãc+          €Û\ÿ         ðÙ\ÿ  k€c+  (µãc+          €Û\ÿ          Ú\ÿ  k€c+  µãc+          €Û\ÿ         PÚ\ÿ  k€c+  	       ¨.‘c+  ujc+         ¨)‘c+  ÐÔ\ÿ          Š8Ác+  eic+         Ø$‘c+  ðÚ\ÿ          y8Ác+  eic+           ‘c+   Û\ÿ          Z8Ác+  eic+  ØäÀc+   @-c+   éÀc+    ‘c+  ØD-c+  Ø$‘c+  ¨)‘c+  €Šc+          8‹1c+                        ­Œc+  ã\ÿ  p{Àc+          ÐÜ\ÿ           Û\ÿ  k€c+      5   6   7   8   :   <   =   >       ?       @   B   D        â\ÿ  ã\ÿ  ୉c+                 ã\ÿ  ujc+         …1c+  PÛ\ÿ          ­Œc+  eic+  …1c+          Õ_ at fÆS         Qöl±íÁÃXc+  ã\ÿ  ୉c+          àÝ\ÿ         °Ü\ÿ  k€c+  u]ÞÓ	4Q ÷U^Qʉ§ ¶uª¹ñìò*ēv â\ÿ  ã\ÿ  HþUc+          D’c+          Pä\ÿ  ¦Pôc+  ¦Pôc+         –c+  ßâ\ÿ  ä\ÿ  Èâ\ÿ  0ß\ÿ  O-c+  ujc+  ØD-c+  å\ÿ  ¢Pôc+  `ä\ÿ          ðß\
 ÿ                 ÿÿÿÿÿÿÿÿ¢Pôc+          ã\ÿ                 (widget);
-  gtk_container_foreach (container, (GtkCallback) gtk_widget_show_all, NULL);
-  if (option_menu->menu)
-    gtk_widget_show_all (option_menu->menu);
-  if (option_menu->menu_item)
-    gtk_widget_show_all (option_menu->menu_item);
-  if (option_menu->last_signaled_menu_item)
-    gtk_widget_show_all (option_menu->last_signaled_menu_item);
-  if (option_menu->select_menu)
-	  gtk_widget_show_all (option_menu->select_menu);
-}
-
-
-static void go_option_menu_hide_all (GtkWidget *widget)
-{
-  GtkContainer *container;
-
-  g_return_if_fail (GO_IS_OPTION_MENU (widget));
-  container = GTK_CONTAINER (widget);
-
-  gtk_widget_hide (widget);
-  gtk_container_foreach (container, (GtkCallback) gtk_widget_hide_all, NULL);
-}
-
-static gboolean go_option_menu_mnemonic_activate (GtkWidget *widget,
-				   gboolean   group_cycling)
-{
-  gtk_widget_grab_focus (widget);
-  return TRUE;
-}
-
-static gint go_option_menu_scroll_event (GtkWidget          *widget,
-			      GdkEventScroll     *event)
-{
-  return TRUE;
-}
diff --git a/src/go-optionmenu.h b/src/go-optionmenu.h
deleted file mode 100644
index 04c1a38..0000000
--- a/src/go-optionmenu.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* 
- * go-optionmenu.h
- *
- * Copyright (C) 2002-2005 Andreas J. Guelzow <aguelzow at taliesin.ca>
- *
- * based extensively on:
- *
- * GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * Modified by the GTK+ Team and others 1997-2000.  See the GTK AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- *
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
- * USA.
- */
-
-#ifndef _GO_OPTIONMENU_H_
-#define _GO_OPTIONMENU_H_
-
-
-#include <gdk/gdk.h>
-#include <gtk/gtkbutton.h>
-
-G_BEGIN_DECLS
-
-#define GO_TYPE_OPTION_MENU              (go_option_menu_get_type ())
-#define GO_OPTION_MENU(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GO_TYPE_OPTION_MENU, GOOptionMenu))
-#define GO_OPTION_MENU_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GO_TYPE_OPTION_MENU, GOOptionMenuClass))
-#define GO_IS_OPTION_MENU(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GO_TYPE_OPTION_MENU))
-#define GO_IS_OPTION_MENU_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GO_TYPE_OPTION_MENU))
-#define GO_OPTION_MENU_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GO_TYPE_OPTION_MENU, GOOptionMenuClass))
-
-
-/* START_INCLUDE_H */
-/* END_INCLUDE_H */
-
-typedef struct _GOOptionMenu       GOOptionMenu;
-typedef struct _GOOptionMenuClass  GOOptionMenuClass;
-
-struct _GOOptionMenu
-{
-	GtkButton button;
-	
-	GtkWidget *menu;
-	GtkWidget *select_menu;
-	GtkWidget *menu_item;
-	GtkWidget *old_menu_item;
-
-	GtkWidget *last_signaled_menu_item;
-
-	GSList *selection;
-	gboolean new_selection;
-	
-	guint16 width;
-	guint16 height;
-};
-
-struct _GOOptionMenuClass
-{
-  GtkButtonClass parent_class;
-
-  void (*changed) (GOOptionMenu *option_menu);
-
-  /* Padding for future expansion */
-  void (*_gtk_reserved1) (void);
-  void (*_gtk_reserved2) (void);
-  void (*_gtk_reserved3) (void);
-  void (*_gtk_reserved4) (void);
-};
-
-
-#define CHILD_LEFT_SPACING        4
-#define CHILD_RIGHT_SPACING       1
-#define CHILD_TOP_SPACING         1
-#define CHILD_BOTTOM_SPACING      1
-
-typedef struct _GOOptionMenuProps GOOptionMenuProps;
-
-struct _GOOptionMenuProps
-{
-  gboolean interior_focus;
-  GtkRequisition indicator_size;
-  GtkBorder indicator_spacing;
-  gint focus_width;
-  gint focus_pad;
-};
-
-
-/* START_DECLARATION */
-GtkWidget * go_option_menu_get_history (GOOptionMenu *option_menu);
-GType go_option_menu_get_type (void);
-GtkWidget* go_option_menu_new (void);
-void go_option_menu_set_history (GOOptionMenu *option_menu, GSList *selection);
-void go_option_menu_set_menu (GOOptionMenu *option_menu,
-			       GtkWidget *menu);
-/* END_DECLARATION */
-
-
-G_END_DECLS
-
-#endif /* _GO_OPTIONMENU_H_ */
diff --git a/src/gsb_data_report.c b/src/gsb_data_report.c
index 2b70f32..03f17fc 100644
--- a/src/gsb_data_report.c
+++ b/src/gsb_data_report.c
@@ -2,9 +2,10 @@
 /*                                                                            */
 /*                                  gsb_data_report                           */
 /*                                                                            */
-/*     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)                       */
+/*          2008-2011 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      */
@@ -43,8 +44,8 @@
 #include "utils_str.h"
 /*END_INCLUDE*/
 
-/** \struct
- * describe an report 
+/** \struct_report
+ * describe an report
  * */
 typedef struct
 {
@@ -53,7 +54,10 @@ typedef struct
     gchar *report_name;
     
     /** @name what we show of the transactions */
-    gint show_r;         /**< 0=all the reports, 1=report not marked R, 2=report marked R */
+    gint show_m;                                    /**< 0=all transactions, 1=report marked, 2=report non marked R */
+    gint show_p;                                    /**< 0=report not marked P, 1=report marked P */
+    gint show_r;                                    /**< 0=report not marked R, 1=report marked R */
+    gint show_t;                                    /**< 0=report not marked T, 1=report marked T */
     gint show_report_transactions;
     gint show_report_transaction_amount;
     gint show_report_date;
@@ -73,33 +77,38 @@ typedef struct
     gint show_report_financial_year;
 
     /** @name stuff showed in the report */
-    gint sorting_report;     /**< 0=date, 1=tr number, 2=payee, 3=categ, 4=budget, 5=notes, 6=method payment, 7=method paym content, 8=voucher, 9=bank ref, 10=marked number */
+    gint sorting_report;                            /**< 0=date, 1=tr number, 2=payee, 3=categ, 4=budget, 5=notes, 6=method payment, 7=method paym content, 8=voucher, 9=bank ref, 10=marked number */
 
     gint not_detail_split;
     gint split_credit_debit;
 
     gint currency_general;
     gint column_title_show;
-    gint column_title_type;		/* 0 = botton, 1 = each section */
-    gint append_in_payee;		/* TRUE : the name of the report will be in the payee list */
-    gint report_can_click;		/* TRUE : we can click on the reports */
+    gint column_title_type;                         /* 0 = botton, 1 = each section */
+    gint append_in_payee;                           /* TRUE : the name of the report will be in the payee list */
+    gint report_can_click;                          /* TRUE : we can click on the reports */
 
 
     /** @name period part of the report */
-    gint use_financial_year;         /* TRUE : use the financial year, FALSE : use the dates */
-
-    gint financial_year_type;   /* 0=all, 1=current, 2=last, 3=personnal */
-    GSList *financial_year_list;            /* list of the numbers of financials years used */
-    gint financial_year_split;       /* TRUE : split by financial year */
-
-    gint date_type;       /* 0=perso, 1=all ... */
+    /** exercices */
+    gint use_financial_year;                        /* TRUE : use the financial year, FALSE : use the dates */
+    gint financial_year_type;                       /* 0=all, 1=current, 2=last, 3=personnal */
+    GSList *financial_year_list;                    /* list of the numbers of financials years used */
+    gint financial_year_split;                      /* TRUE : split by financial year */
+
+    /** dates */
+    gint date_type;                                 /* 0=perso, 1=all ... */
+    gint date_select_value;                         /* 0=date (default), 1=value date */
     GDate *personal_date_start;
     GDate *personal_date_end;
-    gint period_split;       /* TRUE : split by period */
-    gint period_split_type;        /*  0=day, 1=week, 2=month, 3=year */
-    gint period_split_day;           /* 0 = monday ... */
 
-    GSList *sorting_type;  /* list of numbers : 1=categ,2=sub-categ,3=budget,4=sub-budget,5=account,6=payee */
+    /** affichage */
+    gint period_split;                              /* TRUE : split by period */
+    gint period_split_type;                         /* 0=day, 1=week, 2=month, 3=year */
+    gint period_split_day;                          /* 0 = monday ... */
+
+    /** à compléter  */
+    GSList *sorting_type;                           /* list of numbers : 1=categ,2=sub-categ,3=budget,4=sub-budget,5=account,6=payee */
 
     /** @name account part of the report */
     gint account_use_chosen;
@@ -109,14 +118,14 @@ typedef struct
     gint account_show_name;
 
     /** @name transfer part of the report */
-    gint transfer_choice;   /* 0: no transfer / 1: transfers only on liabilities and assets accounts/2:transfer outside the report/3:perso */
+    gint transfer_choice;                           /* 0: no transfer / 1: transfers only on liabilities and assets accounts/2:transfer outside the report/3:perso */
     GSList *transfer_account_numbers;
     gint transfer_reports_only;
 
     /** @name category part of the report */
     gint category_used;
     gint category_detail_used;
-    GSList *categ_select_struct;		/* list of struct_categ_budget_sel containing the selected categories and sub-categories */
+    GSList *categ_select_struct;                    /* list of struct_categ_budget_sel containing the selected categories and sub-categories */
     gint category_show_sub_category;
     gint category_show_category_amount;
     gint category_show_sub_category_amount;
@@ -127,7 +136,7 @@ typedef struct
     /** @name budget part of the report */
     gint budget_used;
     gint budget_detail_used;
-    GSList *budget_select_struct;		/* list of struct_categ_budget_sel containing the selected budgets and sub-budgets */
+    GSList *budget_select_struct;                   /* list of struct_categ_budget_sel containing the selected budgets and sub-budgets */
     gint budget_show_sub_budget;
     gint budget_show_budget_amount;
     gint budget_show_sub_budget_amount;
@@ -182,7 +191,7 @@ static struct_report *report_buffer;
 
 /**
  * set the reports global variables to NULL, usually when we init all the global variables
- * 
+ *
  * \param none
  *
  * \return FALSE
@@ -207,11 +216,11 @@ gboolean gsb_data_report_init_variables ( void )
 
 
 /**
- * return a pointer on the g_slist of reports 
+ * return a pointer on the g_slist of reports
  * carrefull : it's not a copy, so we must not free or change it
- * 
+ *
  * \param none
- * 
+ *
  * \return a g_slist on the reports
  * */
 GSList *gsb_data_report_get_report_list ( void )
@@ -223,11 +232,11 @@ GSList *gsb_data_report_get_report_list ( void )
 
 
 /**
- * return a pointer on the report which the number is in the parameter. 
+ * return a pointer on the report which the number is in the parameter.
  * that report is stored in the buffer
- * 
+ *
  * \param report_number
- * 
+ *
  * \return a pointer to the report, NULL if not found
  * */
 struct_report *gsb_data_report_get_structure ( gint report_number )
@@ -268,9 +277,9 @@ struct_report *gsb_data_report_get_structure ( gint report_number )
 /**
  * get the number of the report and save the pointer in the buffer
  * which will increase the speed later
- * 
+ *
  * \param report_pointer a pointer to a report
- * 
+ *
  * \return the number of the report
  * */
 gint gsb_data_report_get_report_number ( gpointer report_pointer )
@@ -292,7 +301,7 @@ gint gsb_data_report_get_report_number ( gpointer report_pointer )
 
 
 /** find and return the last number of report
- * 
+ *
  * \param none
  *
  * \return last number of report
@@ -398,9 +407,9 @@ static void _gsb_data_report_free ( struct_report *report )
     g_slist_free (report -> sorting_type);
     g_slist_free (report -> account_numbers);
     g_slist_free (report -> transfer_account_numbers);
-    gsb_data_report_free_categ_budget_struct (report -> categ_select_struct);
+    gsb_data_report_free_categ_budget_struct_list (report -> categ_select_struct);
     report -> categ_select_struct = NULL;
-    gsb_data_report_free_categ_budget_struct (report -> budget_select_struct);
+    gsb_data_report_free_categ_budget_struct_list (report -> budget_select_struct);
     report -> budget_select_struct = NULL;
     g_slist_free (report -> payee_numbers);
     g_slist_free (report -> method_of_payment_list);
@@ -443,9 +452,9 @@ gboolean gsb_data_report_remove ( gint no_report )
 /**
  * return the number of the report found by its name
  * that report is stored in the buffer
- * 
+ *
  * \param name
- * 
+ *
  * \return the number of the report or 0 if not found
  * */
 gint gsb_data_report_get_report_by_name ( const gchar *name )
@@ -485,7 +494,7 @@ gint gsb_data_report_get_report_by_name ( const gchar *name )
 
 /**
  * get the  report_name
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the report_name  of the report, -1 if problem
@@ -502,16 +511,16 @@ gchar *gsb_data_report_get_report_name ( gint report_number )
     return report -> report_name;
 }
 
-/** 
+/**
  * set the report_name
- * 
+ *
  * \param report_number number of the report
  * \param report_name
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_report_name ( gint report_number,
-					   const gchar *report_name )
+                        const gchar *report_name )
 {
     struct_report *report;
 
@@ -530,52 +539,8 @@ gboolean gsb_data_report_set_report_name ( gint report_number,
 
 
 /**
- * get the  show_r
- * 
- * \param report_number the number of the report
- *
- * \return the show_r  of the report, -1 if problem
- * */
-gint gsb_data_report_get_show_r ( gint report_number )
-{
-    struct_report *report;
-
-    report = gsb_data_report_get_structure (report_number);
-
-    if ( !report )
-	return -1;
-
-    return report -> show_r;
-}
-
-/** 
- * set the show_r
- * 
- * \param report_number number of the report
- * \param show_r
- *
- * \return TRUE if ok
- * */
-gboolean gsb_data_report_set_show_r ( gint report_number,
-				      gint show_r )
-{
-    struct_report *report;
-
-    report = gsb_data_report_get_structure (report_number);
-
-    if ( !report )
-	return FALSE;
-
-    report -> show_r = show_r;
-
-    return TRUE;
-}
-
-
-
-/**
  * get the  show_report_transactions
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_transactions  of the report, -1 if problem
@@ -592,16 +557,16 @@ gint gsb_data_report_get_show_report_transactions ( gint report_number )
     return report -> show_report_transactions;
 }
 
-/** 
+/**
  * set the show_report_transactions
- * 
+ *
  * \param report_number number of the report
  * \param show_report_transactions
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_transactions ( gint report_number,
-							gint show_report_transactions )
+                        gint show_report_transactions )
 {
     struct_report *report;
 
@@ -618,7 +583,7 @@ gboolean gsb_data_report_set_show_report_transactions ( gint report_number,
 
 /**
  * get the  show_report_transaction_amount
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_transaction_amount  of the report, -1 if problem
@@ -635,16 +600,16 @@ gint gsb_data_report_get_show_report_transaction_amount ( gint report_number )
     return report -> show_report_transaction_amount;
 }
 
-/** 
+/**
  * set the show_report_transaction_amount
- * 
+ *
  * \param report_number number of the report
  * \param show_report_transaction_amount
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_transaction_amount ( gint report_number,
-							      gint show_report_transaction_amount )
+                        gint show_report_transaction_amount )
 {
     struct_report *report;
 
@@ -661,7 +626,7 @@ gboolean gsb_data_report_set_show_report_transaction_amount ( gint report_number
 
 /**
  * get the  show_report_date
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_date  of the report, -1 if problem
@@ -678,16 +643,16 @@ gint gsb_data_report_get_show_report_date ( gint report_number )
     return report -> show_report_date;
 }
 
-/** 
+/**
  * set the show_report_date
- * 
+ *
  * \param report_number number of the report
  * \param show_report_date
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_date ( gint report_number,
-						gint show_report_date )
+                        gint show_report_date )
 {
     struct_report *report;
 
@@ -703,7 +668,7 @@ gboolean gsb_data_report_set_show_report_date ( gint report_number,
 
 /**
  * get the  show_report_value_date
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_value_date  of the report, -1 if problem
@@ -720,16 +685,16 @@ gint gsb_data_report_get_show_report_value_date ( gint report_number )
     return report -> show_report_value_date;
 }
 
-/** 
+/**
  * set the show_report_value_date
- * 
+ *
  * \param report_number number of the report
  * \param show_report_value_date
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_value_date ( gint report_number,
-						      gint show_report_value_date )
+                        gint show_report_value_date )
 {
     struct_report *report;
 
@@ -746,7 +711,7 @@ gboolean gsb_data_report_set_show_report_value_date ( gint report_number,
 
 /**
  * get the  show_report_payee
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  show_report_payee of the report, -1 if problem
@@ -763,16 +728,16 @@ gint gsb_data_report_get_show_report_payee ( gint report_number )
     return report -> show_report_payee;
 }
 
-/** 
+/**
  * set the show_report_payee
- * 
+ *
  * \param report_number number of the report
  * \param show_report_payee
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_payee ( gint report_number,
-						 gint show_report_payee )
+                        gint show_report_payee )
 {
     struct_report *report;
 
@@ -789,7 +754,7 @@ gboolean gsb_data_report_set_show_report_payee ( gint report_number,
 
 /**
  * get the  show_report_category
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_category  of the report, -1 if problem
@@ -806,16 +771,16 @@ gint gsb_data_report_get_show_report_category ( gint report_number )
     return report -> show_report_category;
 }
 
-/** 
+/**
  * set the show_report_category
- * 
+ *
  * \param report_number number of the report
  * \param show_report_category
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_category ( gint report_number,
-						    gint show_report_category )
+                        gint show_report_category )
 {
     struct_report *report;
 
@@ -832,7 +797,7 @@ gboolean gsb_data_report_set_show_report_category ( gint report_number,
 
 /**
  * get the  show_report_sub_category
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_sub_category  of the report, -1 if problem
@@ -849,16 +814,16 @@ gint gsb_data_report_get_show_report_sub_category ( gint report_number )
     return report -> show_report_sub_category;
 }
 
-/** 
+/**
  * set the show_report_sub_category
- * 
+ *
  * \param report_number number of the report
  * \param show_report_sub_category
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_sub_category ( gint report_number,
-							gint show_report_sub_category )
+                        gint show_report_sub_category )
 {
     struct_report *report;
 
@@ -875,7 +840,7 @@ gboolean gsb_data_report_set_show_report_sub_category ( gint report_number,
 
 /**
  * get the  show_report_budget
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_budget  of the report, -1 if problem
@@ -892,16 +857,16 @@ gint gsb_data_report_get_show_report_budget ( gint report_number )
     return report -> show_report_budget;
 }
 
-/** 
+/**
  * set the show_report_budget
- * 
+ *
  * \param report_number number of the report
  * \param show_report_budget
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_budget ( gint report_number,
-						  gint show_report_budget )
+                        gint show_report_budget )
 {
     struct_report *report;
 
@@ -918,7 +883,7 @@ gboolean gsb_data_report_set_show_report_budget ( gint report_number,
 
 /**
  * get the  show_report_sub_budget
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  show_report_sub_budget of the report, -1 if problem
@@ -935,16 +900,16 @@ gint gsb_data_report_get_show_report_sub_budget ( gint report_number )
     return report -> show_report_sub_budget;
 }
 
-/** 
+/**
  * set the show_report_sub_budget
- * 
+ *
  * \param report_number number of the report
  * \param show_report_sub_budget
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_sub_budget ( gint report_number,
-						      gint show_report_sub_budget )
+                        gint show_report_sub_budget )
 {
     struct_report *report;
 
@@ -961,7 +926,7 @@ gboolean gsb_data_report_set_show_report_sub_budget ( gint report_number,
 
 /**
  * get the  show_report_note
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_note  of the report, -1 if problem
@@ -978,16 +943,16 @@ gint gsb_data_report_get_show_report_note ( gint report_number )
     return report -> show_report_note;
 }
 
-/** 
+/**
  * set the show_report_note
- * 
+ *
  * \param report_number number of the report
  * \param show_report_note
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_note ( gint report_number,
-						gint show_report_note )
+                        gint show_report_note )
 {
     struct_report *report;
 
@@ -1004,7 +969,7 @@ gboolean gsb_data_report_set_show_report_note ( gint report_number,
 
 /**
  * get the  show_report_voucher
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_voucher  of the report, -1 if problem
@@ -1021,16 +986,16 @@ gint gsb_data_report_get_show_report_voucher ( gint report_number )
     return report -> show_report_voucher;
 }
 
-/** 
+/**
  * set the show_report_voucher
- * 
+ *
  * \param report_number number of the report
  * \param show_report_voucher
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_voucher ( gint report_number,
-						   gint show_report_voucher )
+                        gint show_report_voucher )
 {
     struct_report *report;
 
@@ -1047,7 +1012,7 @@ gboolean gsb_data_report_set_show_report_voucher ( gint report_number,
 
 /**
  * get the  show_report_bank_references
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_bank_references  of the report, -1 if problem
@@ -1064,16 +1029,16 @@ gint gsb_data_report_get_show_report_bank_references ( gint report_number )
     return report -> show_report_bank_references;
 }
 
-/** 
+/**
  * set the show_report_bank_references
- * 
+ *
  * \param report_number number of the report
  * \param show_report_bank_references
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_bank_references ( gint report_number,
-							   gint show_report_bank_references )
+                        gint show_report_bank_references )
 {
     struct_report *report;
 
@@ -1090,7 +1055,7 @@ gboolean gsb_data_report_set_show_report_bank_references ( gint report_number,
 
 /**
  * get the  show_report_transaction_number
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_transaction_number  of the report, -1 if problem
@@ -1107,16 +1072,16 @@ gint gsb_data_report_get_show_report_transaction_number ( gint report_number )
     return report -> show_report_transaction_number;
 }
 
-/** 
+/**
  * set the show_report_transaction_number
- * 
+ *
  * \param report_number number of the report
  * \param show_report_transaction_number
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_transaction_number ( gint report_number,
-							      gint show_report_transaction_number )
+                        gint show_report_transaction_number )
 {
     struct_report *report;
 
@@ -1133,7 +1098,7 @@ gboolean gsb_data_report_set_show_report_transaction_number ( gint report_number
 
 /**
  * get the  show_report_method_of_payment
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  show_report_method_of_payment of the report, -1 if problem
@@ -1150,16 +1115,16 @@ gint gsb_data_report_get_show_report_method_of_payment ( gint report_number )
     return report -> show_report_method_of_payment;
 }
 
-/** 
+/**
  * set the show_report_method_of_payment
- * 
+ *
  * \param report_number number of the report
  * \param show_report_method_of_payment
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_method_of_payment ( gint report_number,
-							     gint show_report_method_of_payment )
+                        gint show_report_method_of_payment )
 {
     struct_report *report;
 
@@ -1176,7 +1141,7 @@ gboolean gsb_data_report_set_show_report_method_of_payment ( gint report_number,
 
 /**
  * get the  show_report_method_of_payment_content
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_method_of_payment_content  of the report, -1 if problem
@@ -1193,16 +1158,16 @@ gint gsb_data_report_get_show_report_method_of_payment_content ( gint report_num
     return report -> show_report_method_of_payment_content;
 }
 
-/** 
+/**
  * set the show_report_method_of_payment_content
- * 
+ *
  * \param report_number number of the report
  * \param show_report_method_of_payment_content
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_method_of_payment_content ( gint report_number,
-								     gint show_report_method_of_payment_content )
+                        gint show_report_method_of_payment_content )
 {
     struct_report *report;
 
@@ -1219,7 +1184,7 @@ gboolean gsb_data_report_set_show_report_method_of_payment_content ( gint report
 
 /**
  * get the  show_report_marked
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_marked  of the report, -1 if problem
@@ -1236,16 +1201,16 @@ gint gsb_data_report_get_show_report_marked ( gint report_number )
     return report -> show_report_marked;
 }
 
-/** 
+/**
  * set the show_report_marked
- * 
+ *
  * \param report_number number of the report
  * \param show_report_marked
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_marked ( gint report_number,
-						  gint show_report_marked )
+                        gint show_report_marked )
 {
     struct_report *report;
 
@@ -1262,7 +1227,7 @@ gboolean gsb_data_report_set_show_report_marked ( gint report_number,
 
 /**
  * get the  show_report_financial_year
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the show_report_financial_year  of the report, -1 if problem
@@ -1279,16 +1244,16 @@ gint gsb_data_report_get_show_report_financial_year ( gint report_number )
     return report -> show_report_financial_year;
 }
 
-/** 
+/**
  * set the show_report_financial_year
- * 
+ *
  * \param report_number number of the report
  * \param show_report_financial_year
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_show_report_financial_year ( gint report_number,
-							  gint show_report_financial_year )
+                        gint show_report_financial_year )
 {
     struct_report *report;
 
@@ -1305,7 +1270,7 @@ gboolean gsb_data_report_set_show_report_financial_year ( gint report_number,
 
 /**
  * get the  sorting_report
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the sorting_report  of the report, -1 if problem
@@ -1322,16 +1287,16 @@ gint gsb_data_report_get_sorting_report ( gint report_number )
     return report -> sorting_report;
 }
 
-/** 
+/**
  * set the sorting_report
- * 
+ *
  * \param report_number number of the report
  * \param sorting_report
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_sorting_report ( gint report_number,
-					      gint sorting_report )
+                        gint sorting_report )
 {
     struct_report *report;
 
@@ -1348,7 +1313,7 @@ gboolean gsb_data_report_set_sorting_report ( gint report_number,
 
 /**
  * get the  not_detail_split
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the not_detail_split  of the report, -1 if problem
@@ -1365,16 +1330,16 @@ gint gsb_data_report_get_not_detail_split ( gint report_number )
     return report -> not_detail_split;
 }
 
-/** 
+/**
  * set the not_detail_split
- * 
+ *
  * \param report_number number of the report
  * \param not_detail_split
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_not_detail_split ( gint report_number,
-						    gint not_detail_split )
+                        gint not_detail_split )
 {
     struct_report *report;
 
@@ -1391,7 +1356,7 @@ gboolean gsb_data_report_set_not_detail_split ( gint report_number,
 
 /**
  * get the  split_credit_debit
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the split_credit_debit  of the report, -1 if problem
@@ -1408,16 +1373,16 @@ gint gsb_data_report_get_split_credit_debit ( gint report_number )
     return report -> split_credit_debit;
 }
 
-/** 
+/**
  * set the split_credit_debit
- * 
+ *
  * \param report_number number of the report
  * \param split_credit_debit
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_split_credit_debit ( gint report_number,
-						  gint split_credit_debit )
+                        gint split_credit_debit )
 {
     struct_report *report;
 
@@ -1434,7 +1399,7 @@ gboolean gsb_data_report_set_split_credit_debit ( gint report_number,
 
 /**
  * get the  currency_general
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  currency_general of the report, -1 if problem
@@ -1451,16 +1416,16 @@ gint gsb_data_report_get_currency_general ( gint report_number )
     return report -> currency_general;
 }
 
-/** 
+/**
  * set the currency_general
- * 
+ *
  * \param report_number number of the report
  * \param currency_general
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_currency_general ( gint report_number,
-						gint currency_general )
+                        gint currency_general )
 {
     struct_report *report;
 
@@ -1477,7 +1442,7 @@ gboolean gsb_data_report_set_currency_general ( gint report_number,
 
 /**
  * get the  column_title_show
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the column_title_show  of the report, -1 if problem
@@ -1494,16 +1459,16 @@ gint gsb_data_report_get_column_title_show ( gint report_number )
     return report -> column_title_show;
 }
 
-/** 
+/**
  * set the column_title_show
- * 
+ *
  * \param report_number number of the report
  * \param column_title_show
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_column_title_show ( gint report_number,
-						 gint column_title_show )
+                        gint column_title_show )
 {
     struct_report *report;
 
@@ -1520,7 +1485,7 @@ gboolean gsb_data_report_set_column_title_show ( gint report_number,
 
 /**
  * get the  column_title_type
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the column_title_type  of the report, -1 if problem
@@ -1537,7 +1502,7 @@ gint gsb_data_report_get_column_title_type ( gint report_number )
     return report -> column_title_type;
 }
 
-/** 
+/**
  * set the column_title_type
  * 
  * \param report_number number of the report
@@ -1546,7 +1511,7 @@ gint gsb_data_report_get_column_title_type ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_column_title_type ( gint report_number,
-						 gint column_title_type )
+                        gint column_title_type )
 {
     struct_report *report;
 
@@ -1563,7 +1528,7 @@ gboolean gsb_data_report_set_column_title_type ( gint report_number,
 
 /**
  * get the  append_in_payee
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  append_in_payee of the report, -1 if problem
@@ -1580,16 +1545,16 @@ gint gsb_data_report_get_append_in_payee ( gint report_number )
     return report -> append_in_payee;
 }
 
-/** 
+/**
  * set the append_in_payee
- * 
+ *
  * \param report_number number of the report
  * \param append_in_payee
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_append_in_payee ( gint report_number,
-					       gint append_in_payee )
+                        gint append_in_payee )
 {
     struct_report *report;
 
@@ -1606,7 +1571,7 @@ gboolean gsb_data_report_set_append_in_payee ( gint report_number,
 
 /**
  * get the  report_can_click
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the report_can_click  of the report, -1 if problem
@@ -1623,16 +1588,16 @@ gint gsb_data_report_get_report_can_click ( gint report_number )
     return report -> report_can_click;
 }
 
-/** 
+/**
  * set the report_can_click
- * 
+ *
  * \param report_number number of the report
  * \param report_can_click
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_report_can_click ( gint report_number,
-						gint report_can_click )
+                        gint report_can_click )
 {
     struct_report *report;
 
@@ -1649,7 +1614,7 @@ gboolean gsb_data_report_set_report_can_click ( gint report_number,
 
 /**
  * get the  use_financial_year
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the use_financial_year  of the report, -1 if problem
@@ -1666,16 +1631,16 @@ gint gsb_data_report_get_use_financial_year ( gint report_number )
     return report -> use_financial_year;
 }
 
-/** 
+/**
  * set the use_financial_year
- * 
+ *
  * \param report_number number of the report
  * \param use_financial_year
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_use_financial_year ( gint report_number,
-						  gint use_financial_year )
+                        gint use_financial_year )
 {
     struct_report *report;
 
@@ -1692,7 +1657,7 @@ gboolean gsb_data_report_set_use_financial_year ( gint report_number,
 
 /**
  * get the  financial_year_type
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the financial_year_type  of the report, -1 if problem
@@ -1709,16 +1674,16 @@ gint gsb_data_report_get_financial_year_type ( gint report_number )
     return report -> financial_year_type;
 }
 
-/** 
+/**
  * set the financial_year_type
- * 
+ *
  * \param report_number number of the report
  * \param financial_year_type
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_financial_year_type ( gint report_number,
-						   gint financial_year_type )
+                        gint financial_year_type )
 {
     struct_report *report;
 
@@ -1735,7 +1700,7 @@ gboolean gsb_data_report_set_financial_year_type ( gint report_number,
 
 /**
  * get the  financial_year_split
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the financial_year_split  of the report, -1 if problem
@@ -1752,16 +1717,16 @@ gint gsb_data_report_get_financial_year_split ( gint report_number )
     return report -> financial_year_split;
 }
 
-/** 
+/**
  * set the financial_year_split
- * 
+ *
  * \param report_number number of the report
  * \param financial_year_split
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_financial_year_split ( gint report_number,
-						    gint financial_year_split )
+                        gint financial_year_split )
 {
     struct_report *report;
 
@@ -1778,7 +1743,7 @@ gboolean gsb_data_report_set_financial_year_split ( gint report_number,
 
 /**
  * get the  date_type
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the date_type  of the report, -1 if problem
@@ -1795,16 +1760,16 @@ gint gsb_data_report_get_date_type ( gint report_number )
     return report -> date_type;
 }
 
-/** 
+/**
  * set the date_type
- * 
+ *
  * \param report_number number of the report
  * \param date_type
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_date_type ( gint report_number,
-					 gint date_type )
+                        gint date_type )
 {
     struct_report *report;
 
@@ -1821,7 +1786,7 @@ gboolean gsb_data_report_set_date_type ( gint report_number,
 
 /**
  * get the  personal_date_start
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the personal_date_start  of the report, -1 if problem
@@ -1838,16 +1803,16 @@ GDate *gsb_data_report_get_personal_date_start ( gint report_number )
     return report -> personal_date_start;
 }
 
-/** 
+/**
  * set the personal_date_start
- * 
+ *
  * \param report_number number of the report
  * \param personal_date_start
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_personal_date_start ( gint report_number,
-						   GDate *personal_date_start )
+                        GDate *personal_date_start )
 {
     struct_report *report;
 
@@ -1863,7 +1828,7 @@ gboolean gsb_data_report_set_personal_date_start ( gint report_number,
 
 /**
  * get the  personal_date_end
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the personal_date_end  of the report, -1 if problem
@@ -1880,16 +1845,16 @@ GDate *gsb_data_report_get_personal_date_end ( gint report_number )
     return report -> personal_date_end;
 }
 
-/** 
+/**
  * set the personal_date_end
- * 
+ *
  * \param report_number number of the report
  * \param personal_date_end
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_personal_date_end ( gint report_number,
-						 GDate *personal_date_end )
+                        GDate *personal_date_end )
 {
     struct_report *report;
 
@@ -1906,7 +1871,7 @@ gboolean gsb_data_report_set_personal_date_end ( gint report_number,
 
 /**
  * get the  period_split
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the period_split  of the report, -1 if problem
@@ -1923,16 +1888,16 @@ gint gsb_data_report_get_period_split ( gint report_number )
     return report -> period_split;
 }
 
-/** 
+/**
  * set the period_split
- * 
+ *
  * \param report_number number of the report
  * \param period_split
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_period_split ( gint report_number,
-					    gint period_split )
+                        gint period_split )
 {
     struct_report *report;
 
@@ -1949,7 +1914,7 @@ gboolean gsb_data_report_set_period_split ( gint report_number,
 
 /**
  * get the  period_split_type
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the period_split_type  of the report, -1 if problem
@@ -1966,16 +1931,16 @@ gint gsb_data_report_get_period_split_type ( gint report_number )
     return report -> period_split_type;
 }
 
-/** 
+/**
  * set the period_split_type
- * 
+ *
  * \param report_number number of the report
  * \param period_split_type
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_period_split_type ( gint report_number,
-						 gint period_split_type )
+                        gint period_split_type )
 {
     struct_report *report;
 
@@ -1992,7 +1957,7 @@ gboolean gsb_data_report_set_period_split_type ( gint report_number,
 
 /**
  * get the  period_split_day
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the period_split_day  of the report, -1 if problem
@@ -2009,16 +1974,16 @@ gint gsb_data_report_get_period_split_day ( gint report_number )
     return report -> period_split_day;
 }
 
-/** 
+/**
  * set the period_split_day
- * 
+ *
  * \param report_number number of the report
  * \param period_split_day
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_period_split_day ( gint report_number,
-						gint period_split_day )
+                        gint period_split_day )
 {
     struct_report *report;
 
@@ -2035,7 +2000,7 @@ gboolean gsb_data_report_set_period_split_day ( gint report_number,
 
 /**
  * get the  account_use_chosen
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the account_use_chosen  of the report, -1 if problem
@@ -2052,16 +2017,16 @@ gint gsb_data_report_get_account_use_chosen ( gint report_number )
     return report -> account_use_chosen;
 }
 
-/** 
+/**
  * set the account_use_chosen
- * 
+ *
  * \param report_number number of the report
  * \param account_use_chosen
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_account_use_chosen ( gint report_number,
-						   gint account_use_chosen )
+                        gint account_use_chosen )
 {
     struct_report *report;
 
@@ -2078,7 +2043,7 @@ gboolean gsb_data_report_set_account_use_chosen ( gint report_number,
 
 /**
  * get the  account_group_reports
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the account_group_reports  of the report, -1 if problem
@@ -2095,16 +2060,16 @@ gint gsb_data_report_get_account_group_reports ( gint report_number )
     return report -> account_group_reports;
 }
 
-/** 
+/**
  * set the account_group_reports
- * 
+ *
  * \param report_number number of the report
  * \param account_group_reports
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_account_group_reports ( gint report_number,
-						     gint account_group_reports )
+                        gint account_group_reports )
 {
     struct_report *report;
 
@@ -2121,7 +2086,7 @@ gboolean gsb_data_report_set_account_group_reports ( gint report_number,
 
 /**
  * get the  account_show_amount
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the account_show_amount  of the report, -1 if problem
@@ -2138,16 +2103,16 @@ gint gsb_data_report_get_account_show_amount ( gint report_number )
     return report -> account_show_amount;
 }
 
-/** 
+/**
  * set the account_show_amount
- * 
+ *
  * \param report_number number of the report
  * \param account_show_amount
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_account_show_amount ( gint report_number,
-						   gint account_show_amount )
+                        gint account_show_amount )
 {
     struct_report *report;
 
@@ -2164,7 +2129,7 @@ gboolean gsb_data_report_set_account_show_amount ( gint report_number,
 
 /**
  * get the  account_show_name
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the account_show_name  of the report, -1 if problem
@@ -2181,16 +2146,16 @@ gint gsb_data_report_get_account_show_name ( gint report_number )
     return report -> account_show_name;
 }
 
-/** 
+/**
  * set the account_show_name
- * 
+ *
  * \param report_number number of the report
  * \param account_show_name
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_account_show_name ( gint report_number,
-						 gint account_show_name )
+                        gint account_show_name )
 {
     struct_report *report;
 
@@ -2207,7 +2172,7 @@ gboolean gsb_data_report_set_account_show_name ( gint report_number,
 
 /**
  * get the  transfer_choice
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the transfer_choice  of the report, -1 if problem
@@ -2224,16 +2189,16 @@ gint gsb_data_report_get_transfer_choice ( gint report_number )
     return report -> transfer_choice;
 }
 
-/** 
+/**
  * set the transfer_choice
- * 
+ *
  * \param report_number number of the report
  * \param transfer_choice
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_transfer_choice ( gint report_number,
-					       gint transfer_choice )
+                        gint transfer_choice )
 {
     struct_report *report;
 
@@ -2250,7 +2215,7 @@ gboolean gsb_data_report_set_transfer_choice ( gint report_number,
 
 /**
  * get the  transfer_reports_only
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the transfer_reports_only  of the report, -1 if problem
@@ -2267,16 +2232,16 @@ gint gsb_data_report_get_transfer_reports_only ( gint report_number )
     return report -> transfer_reports_only;
 }
 
-/** 
+/**
  * set the transfer_reports_only
- * 
+ *
  * \param report_number number of the report
  * \param transfer_reports_only
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_transfer_reports_only ( gint report_number,
-						     gint transfer_reports_only )
+                        gint transfer_reports_only )
 {
     struct_report *report;
 
@@ -2293,7 +2258,7 @@ gboolean gsb_data_report_set_transfer_reports_only ( gint report_number,
 
 /**
  * get the  category_used
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the category_used  of the report, -1 if problem
@@ -2310,16 +2275,16 @@ gint gsb_data_report_get_category_used ( gint report_number )
     return report -> category_used;
 }
 
-/** 
+/**
  * set the category_used
- * 
+ *
  * \param report_number number of the report
  * \param category_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_used ( gint report_number,
-					     gint category_used )
+                        gint category_used )
 {
     struct_report *report;
 
@@ -2335,8 +2300,8 @@ gboolean gsb_data_report_set_category_used ( gint report_number,
 
 
 /**
- * get the category_detail_used 
- * 
+ * get the category_detail_used
+ *
  * \param report_number the number of the report
  *
  * \return the category_detail_used  of the report, -1 if problem
@@ -2353,16 +2318,16 @@ gint gsb_data_report_get_category_detail_used ( gint report_number )
     return report -> category_detail_used;
 }
 
-/** 
+/**
  * set the category_detail_used
- * 
+ *
  * \param report_number number of the report
  * \param category_detail_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_detail_used ( gint report_number,
-						    gint category_detail_used )
+                        gint category_detail_used )
 {
     struct_report *report;
 
@@ -2379,7 +2344,7 @@ gboolean gsb_data_report_set_category_detail_used ( gint report_number,
 
 /**
  * get the  category_show_sub_category
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the category_show_sub_category  of the report, -1 if problem
@@ -2396,16 +2361,16 @@ gint gsb_data_report_get_category_show_sub_category ( gint report_number )
     return report -> category_show_sub_category;
 }
 
-/** 
+/**
  * set the category_show_sub_category
- * 
+ *
  * \param report_number number of the report
  * \param category_show_sub_category
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_show_sub_category ( gint report_number,
-							  gint category_show_sub_category )
+                        gint category_show_sub_category )
 {
     struct_report *report;
 
@@ -2422,7 +2387,7 @@ gboolean gsb_data_report_set_category_show_sub_category ( gint report_number,
 
 /**
  * get the  category_show_category_amount
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  category_show_category_amount of the report, -1 if problem
@@ -2439,16 +2404,16 @@ gint gsb_data_report_get_category_show_category_amount ( gint report_number )
     return report -> category_show_category_amount;
 }
 
-/** 
+/**
  * set the category_show_category_amount
- * 
+ *
  * \param report_number number of the report
  * \param category_show_category_amount
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_show_category_amount ( gint report_number,
-							     gint category_show_category_amount )
+                        gint category_show_category_amount )
 {
     struct_report *report;
 
@@ -2465,7 +2430,7 @@ gboolean gsb_data_report_set_category_show_category_amount ( gint report_number,
 
 /**
  * get the  category_show_sub_category_amount
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the category_show_sub_category_amount  of the report, -1 if problem
@@ -2484,14 +2449,14 @@ gint gsb_data_report_get_category_show_sub_category_amount ( gint report_number
 
 /** 
  * set the category_show_sub_category_amount
- * 
+ *
  * \param report_number number of the report
  * \param category_show_sub_category_amount
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_show_sub_category_amount ( gint report_number,
-								 gint category_show_sub_category_amount )
+                        gint category_show_sub_category_amount )
 {
     struct_report *report;
 
@@ -2509,7 +2474,7 @@ gboolean gsb_data_report_set_category_show_sub_category_amount ( gint report_num
 
 /**
  * get the  category_currency
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the category_currency  of the report, -1 if problem
@@ -2526,16 +2491,16 @@ gint gsb_data_report_get_category_currency ( gint report_number )
     return report -> category_currency;
 }
 
-/** 
+/**
  * set the category_currency
- * 
+ *
  * \param report_number number of the report
  * \param category_currency
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_currency ( gint report_number,
-						 gint category_currency )
+                        gint category_currency )
 {
     struct_report *report;
 
@@ -2552,7 +2517,7 @@ gboolean gsb_data_report_set_category_currency ( gint report_number,
 
 /**
  * get the  category_show_without_category
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the category_show_without_category  of the report, -1 if problem
@@ -2569,16 +2534,16 @@ gint gsb_data_report_get_category_show_without_category ( gint report_number )
     return report -> category_show_without_category;
 }
 
-/** 
+/**
  * set the category_show_without_category
- * 
+ *
  * \param report_number number of the report
  * \param category_show_without_category
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_show_without_category ( gint report_number,
-							      gint category_show_without_category )
+                        gint category_show_without_category )
 {
     struct_report *report;
 
@@ -2595,7 +2560,7 @@ gboolean gsb_data_report_set_category_show_without_category ( gint report_number
 
 /**
  * get the  category_show_name
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the category_show_name  of the report, -1 if problem
@@ -2612,16 +2577,16 @@ gint gsb_data_report_get_category_show_name ( gint report_number )
     return report -> category_show_name;
 }
 
-/** 
+/**
  * set the category_show_name
- * 
+ *
  * \param report_number number of the report
  * \param category_show_name
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_show_name ( gint report_number,
-						  gint category_show_name )
+                        gint category_show_name )
 {
     struct_report *report;
 
@@ -2638,7 +2603,7 @@ gboolean gsb_data_report_set_category_show_name ( gint report_number,
 
 /**
  * get the  budget_used
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the budget_used  of the report, -1 if problem
@@ -2655,16 +2620,16 @@ gint gsb_data_report_get_budget_used ( gint report_number )
     return report -> budget_used;
 }
 
-/** 
+/**
  * set the budget_used
- * 
+ *
  * \param report_number number of the report
  * \param budget_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_used ( gint report_number,
-					   gint budget_used )
+                        gint budget_used )
 {
     struct_report *report;
 
@@ -2681,7 +2646,7 @@ gboolean gsb_data_report_set_budget_used ( gint report_number,
 
 /**
  * get the  budget_detail_used
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  budget_detail_used of the report, -1 if problem
@@ -2698,16 +2663,16 @@ gint gsb_data_report_get_budget_detail_used ( gint report_number )
     return report -> budget_detail_used;
 }
 
-/** 
+/**
  * set the budget_detail_used
- * 
+ *
  * \param report_number number of the report
  * \param budget_detail_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_detail_used ( gint report_number,
-						  gint budget_detail_used )
+                        gint budget_detail_used )
 {
     struct_report *report;
 
@@ -2724,7 +2689,7 @@ gboolean gsb_data_report_set_budget_detail_used ( gint report_number,
 
 /**
  * get the  budget_show_sub_budget
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the budget_show_sub_budget  of the report, -1 if problem
@@ -2741,16 +2706,16 @@ gint gsb_data_report_get_budget_show_sub_budget ( gint report_number )
     return report -> budget_show_sub_budget;
 }
 
-/** 
+/**
  * set the budget_show_sub_budget
- * 
+ *
  * \param report_number number of the report
  * \param budget_show_sub_budget
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_show_sub_budget ( gint report_number,
-						      gint budget_show_sub_budget )
+                        gint budget_show_sub_budget )
 {
     struct_report *report;
 
@@ -2767,7 +2732,7 @@ gboolean gsb_data_report_set_budget_show_sub_budget ( gint report_number,
 
 /**
  * get the  budget_show_budget_amount
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the budget_show_budget_amount  of the report, -1 if problem
@@ -2784,16 +2749,16 @@ gint gsb_data_report_get_budget_show_budget_amount ( gint report_number )
     return report -> budget_show_budget_amount;
 }
 
-/** 
+/**
  * set the budget_show_budget_amount
- * 
+ *
  * \param report_number number of the report
  * \param budget_show_budget_amount
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_show_budget_amount ( gint report_number,
-							 gint budget_show_budget_amount )
+                        gint budget_show_budget_amount )
 {
     struct_report *report;
 
@@ -2809,7 +2774,7 @@ gboolean gsb_data_report_set_budget_show_budget_amount ( gint report_number,
 
 /**
  * get the  budget_show_sub_budget_amount
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the budget_show_sub_budget_amount  of the report, -1 if problem
@@ -2826,16 +2791,16 @@ gint gsb_data_report_get_budget_show_sub_budget_amount ( gint report_number )
     return report -> budget_show_sub_budget_amount;
 }
 
-/** 
+/**
  * set the budget_show_sub_budget_amount
- * 
+ *
  * \param report_number number of the report
  * \param budget_show_sub_budget_amount
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_show_sub_budget_amount ( gint report_number,
-							 gint budget_show_sub_budget_amount )
+                        gint budget_show_sub_budget_amount )
 {
     struct_report *report;
 
@@ -2854,7 +2819,7 @@ gboolean gsb_data_report_set_budget_show_sub_budget_amount ( gint report_number,
 
 /**
  * get the  budget_currency
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the budget_currency  of the report, -1 if problem
@@ -2871,16 +2836,16 @@ gint gsb_data_report_get_budget_currency ( gint report_number )
     return report -> budget_currency;
 }
 
-/** 
+/**
  * set the budget_currency
- * 
+ *
  * \param report_number number of the report
  * \param budget_currency
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_currency ( gint report_number,
-					       gint budget_currency )
+                        gint budget_currency )
 {
     struct_report *report;
 
@@ -2897,7 +2862,7 @@ gboolean gsb_data_report_set_budget_currency ( gint report_number,
 
 /**
  * get the  budget_show_without_budget
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the budget_show_without_budget  of the report, -1 if problem
@@ -2914,16 +2879,16 @@ gint gsb_data_report_get_budget_show_without_budget ( gint report_number )
     return report -> budget_show_without_budget;
 }
 
-/** 
+/**
  * set the budget_show_without_budget
- * 
+ *
  * \param report_number number of the report
  * \param budget_show_without_budget
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_show_without_budget ( gint report_number,
-							  gint budget_show_without_budget )
+                        gint budget_show_without_budget )
 {
     struct_report *report;
 
@@ -2940,7 +2905,7 @@ gboolean gsb_data_report_set_budget_show_without_budget ( gint report_number,
 
 /**
  * get the  budget_show_name
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the budget_show_name  of the report, -1 if problem
@@ -2957,16 +2922,16 @@ gint gsb_data_report_get_budget_show_name ( gint report_number )
     return report -> budget_show_name;
 }
 
-/** 
+/**
  * set the budget_show_name
- * 
+ *
  * \param report_number number of the report
  * \param budget_show_name
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_show_name ( gint report_number,
-						gint budget_show_name )
+                        gint budget_show_name )
 {
     struct_report *report;
 
@@ -2983,7 +2948,7 @@ gboolean gsb_data_report_set_budget_show_name ( gint report_number,
 
 /**
  * get the  payee_used
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  payee_used of the report, -1 if problem
@@ -3000,16 +2965,16 @@ gint gsb_data_report_get_payee_used ( gint report_number )
     return report -> payee_used;
 }
 
-/** 
+/**
  * set the payee_used
- * 
+ *
  * \param report_number number of the report
  * \param payee_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_payee_used ( gint report_number,
-					  gint payee_used )
+                        gint payee_used )
 {
     struct_report *report;
 
@@ -3026,7 +2991,7 @@ gboolean gsb_data_report_set_payee_used ( gint report_number,
 
 /**
  * get the  payee_detail_used
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  payee_detail_used of the report, -1 if problem
@@ -3043,16 +3008,16 @@ gint gsb_data_report_get_payee_detail_used ( gint report_number )
     return report -> payee_detail_used;
 }
 
-/** 
+/**
  * set the payee_detail_used
- * 
+ *
  * \param report_number number of the report
  * \param payee_detail_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_payee_detail_used ( gint report_number,
-						 gint payee_detail_used )
+                        gint payee_detail_used )
 {
     struct_report *report;
 
@@ -3069,7 +3034,7 @@ gboolean gsb_data_report_set_payee_detail_used ( gint report_number,
 
 /**
  * get the  payee_show_payee_amount
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the payee_show_payee_amount  of the report, -1 if problem
@@ -3086,16 +3051,16 @@ gint gsb_data_report_get_payee_show_payee_amount ( gint report_number )
     return report -> payee_show_payee_amount;
 }
 
-/** 
+/**
  * set the payee_show_payee_amount
- * 
+ *
  * \param report_number number of the report
  * \param payee_show_payee_amount
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_payee_show_payee_amount ( gint report_number,
-						       gint payee_show_payee_amount )
+                        gint payee_show_payee_amount )
 {
     struct_report *report;
 
@@ -3112,7 +3077,7 @@ gboolean gsb_data_report_set_payee_show_payee_amount ( gint report_number,
 
 /**
  * get the  payee_currency
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the payee_currency  of the report, -1 if problem
@@ -3129,16 +3094,16 @@ gint gsb_data_report_get_payee_currency ( gint report_number )
     return report -> payee_currency;
 }
 
-/** 
+/**
  * set the payee_currency
- * 
+ *
  * \param report_number number of the report
  * \param payee_currency
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_payee_currency ( gint report_number,
-					      gint payee_currency )
+                        gint payee_currency )
 {
     struct_report *report;
 
@@ -3155,7 +3120,7 @@ gboolean gsb_data_report_set_payee_currency ( gint report_number,
 
 /**
  * get the  payee_show_name
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the payee_show_name  of the report, -1 if problem
@@ -3172,16 +3137,16 @@ gint gsb_data_report_get_payee_show_name ( gint report_number )
     return report -> payee_show_name;
 }
 
-/** 
+/**
  * set the payee_show_name
- * 
+ *
  * \param report_number number of the report
  * \param payee_show_name
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_payee_show_name ( gint report_number,
-					       gint payee_show_name )
+                        gint payee_show_name )
 {
     struct_report *report;
 
@@ -3198,7 +3163,7 @@ gboolean gsb_data_report_set_payee_show_name ( gint report_number,
 
 /**
  * get the  text_comparison_used
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the text_comparison_used  of the report, -1 if problem
@@ -3215,16 +3180,16 @@ gint gsb_data_report_get_text_comparison_used ( gint report_number )
     return report -> text_comparison_used;
 }
 
-/** 
+/**
  * set the text_comparison_used
- * 
+ *
  * \param report_number number of the report
  * \param text_comparison_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_text_comparison_used ( gint report_number,
-						    gint text_comparison_used )
+                        gint text_comparison_used )
 {
     struct_report *report;
 
@@ -3241,7 +3206,7 @@ gboolean gsb_data_report_set_text_comparison_used ( gint report_number,
 
 /**
  * get the  amount_comparison_used
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the  amount_comparison_used of the report, -1 if problem
@@ -3258,16 +3223,16 @@ gint gsb_data_report_get_amount_comparison_used ( gint report_number )
     return report -> amount_comparison_used;
 }
 
-/** 
+/**
  * set the amount_comparison_used
- * 
+ *
  * \param report_number number of the report
  * \param amount_comparison_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_amount_comparison_used ( gint report_number,
-						      gint amount_comparison_used )
+                        gint amount_comparison_used )
 {
     struct_report *report;
 
@@ -3284,7 +3249,7 @@ gboolean gsb_data_report_set_amount_comparison_used ( gint report_number,
 
 /**
  * get the  amount_comparison_currency
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the amount_comparison_currency  of the report, -1 if problem
@@ -3301,16 +3266,16 @@ gint gsb_data_report_get_amount_comparison_currency ( gint report_number )
     return report -> amount_comparison_currency;
 }
 
-/** 
+/**
  * set the amount_comparison_currency
- * 
+ *
  * \param report_number number of the report
  * \param amount_comparison_currency
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_amount_comparison_currency ( gint report_number,
-							  gint amount_comparison_currency )
+                        gint amount_comparison_currency )
 {
     struct_report *report;
 
@@ -3327,7 +3292,7 @@ gboolean gsb_data_report_set_amount_comparison_currency ( gint report_number,
 
 /**
  * get the  amount_comparison_only_report_non_null
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the amount_comparison_only_report_non_null  of the report, -1 if problem
@@ -3344,16 +3309,16 @@ gint gsb_data_report_get_amount_comparison_only_report_non_null ( gint report_nu
     return report -> amount_comparison_only_report_non_null;
 }
 
-/** 
+/**
  * set the amount_comparison_only_report_non_null
- * 
+ *
  * \param report_number number of the report
  * \param amount_comparison_only_report_non_null
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_amount_comparison_only_report_non_null ( gint report_number,
-								      gint amount_comparison_only_report_non_null )
+                        gint amount_comparison_only_report_non_null )
 {
     struct_report *report;
 
@@ -3369,7 +3334,7 @@ gboolean gsb_data_report_set_amount_comparison_only_report_non_null ( gint repor
 
 /**
  * get the  method_of_payment_used
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the method_of_payment_used  of the report, -1 if problem
@@ -3386,16 +3351,16 @@ gint gsb_data_report_get_method_of_payment_used ( gint report_number )
     return report -> method_of_payment_used;
 }
 
-/** 
+/**
  * set the method_of_payment_used
- * 
+ *
  * \param report_number number of the report
  * \param method_of_payment_used
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_method_of_payment_used ( gint report_number,
-						      gint method_of_payment_used )
+                        gint method_of_payment_used )
 {
     struct_report *report;
 
@@ -3411,8 +3376,29 @@ gboolean gsb_data_report_set_method_of_payment_used ( gint report_number,
 
 
 /**
+ * free the financial_year_list
+ *
+ * \param report_number number of the report
+ *
+ * \return
+ * */
+void gsb_data_report_free_financial_year_list ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return;
+    if ( report -> financial_year_list )
+        g_slist_free ( report -> financial_year_list );
+    report -> financial_year_list = NULL;
+}
+
+
+/**
  * get the  financial_year_list
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the financial_year_list  of the report, -1 if problem
@@ -3429,16 +3415,16 @@ GSList *gsb_data_report_get_financial_year_list ( gint report_number )
     return report -> financial_year_list;
 }
 
-/** 
+/**
  * set the financial_year_list
- * 
+ *
  * \param report_number number of the report
  * \param financial_year_list
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_financial_year_list ( gint report_number,
-						   GSList *financial_year_list )
+                        GSList *financial_year_list )
 {
     struct_report *report;
 
@@ -3452,14 +3438,15 @@ gboolean gsb_data_report_set_financial_year_list ( gint report_number,
     return TRUE;
 }
 
+
 /**
  * get the  sorting_type
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the sorting_type  of the report, -1 if problem
  * */
-GSList *gsb_data_report_get_sorting_type ( gint report_number )
+GSList *gsb_data_report_get_sorting_type_list ( gint report_number )
 {
     struct_report *report;
 
@@ -3471,16 +3458,16 @@ GSList *gsb_data_report_get_sorting_type ( gint report_number )
     return report -> sorting_type;
 }
 
-/** 
+/**
  * set the sorting_type
- * 
+ *
  * \param report_number number of the report
  * \param sorting_type
  *
  * \return TRUE if ok
  * */
-gboolean gsb_data_report_set_sorting_type ( gint report_number,
-					    GSList *sorting_type )
+gboolean gsb_data_report_set_sorting_type_list ( gint report_number,
+                        GSList *sorting_type )
 {
     struct_report *report;
 
@@ -3496,12 +3483,12 @@ gboolean gsb_data_report_set_sorting_type ( gint report_number,
 
 /**
  * get the  account_numbers
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the account_numbers  of the report, -1 if problem
  * */
-GSList *gsb_data_report_get_account_numbers ( gint report_number )
+GSList *gsb_data_report_get_account_numbers_list ( gint report_number )
 {
     struct_report *report;
 
@@ -3513,16 +3500,16 @@ GSList *gsb_data_report_get_account_numbers ( gint report_number )
     return report -> account_numbers;
 }
 
-/** 
+/**
  * set the account_numbers
- * 
+ *
  * \param report_number number of the report
  * \param account_numbers
  *
  * \return TRUE if ok
  * */
-gboolean gsb_data_report_set_account_numbers ( gint report_number,
-					       GSList *account_numbers )
+gboolean gsb_data_report_set_account_numbers_list ( gint report_number,
+                        GSList *account_numbers )
 {
     struct_report *report;
 
@@ -3538,12 +3525,12 @@ gboolean gsb_data_report_set_account_numbers ( gint report_number,
 
 /**
  * get the  transfer_account_numbers
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the transfer_account_numbers  of the report, -1 if problem
  * */
-GSList *gsb_data_report_get_transfer_account_numbers ( gint report_number )
+GSList *gsb_data_report_get_transfer_account_numbers_list ( gint report_number )
 {
     struct_report *report;
 
@@ -3555,16 +3542,16 @@ GSList *gsb_data_report_get_transfer_account_numbers ( gint report_number )
     return report -> transfer_account_numbers;
 }
 
-/** 
+/**
  * set the transfer_account_numbers
- * 
+ *
  * \param report_number number of the report
  * \param transfer_account_numbers
  *
  * \return TRUE if ok
  * */
-gboolean gsb_data_report_set_transfer_account_numbers ( gint report_number,
-							GSList *transfer_account_numbers )
+gboolean gsb_data_report_set_transfer_account_numbers_list ( gint report_number,
+                        GSList *transfer_account_numbers )
 {
     struct_report *report;
 
@@ -3581,13 +3568,13 @@ gboolean gsb_data_report_set_transfer_account_numbers ( gint report_number,
 
 /**
  * return the list of struct_categ_budget_sel
- * 	containing the selected categories and sub-categories
- * 
+ * containing the selected categories and sub-categories
+ *
  * \param report_number the number of the report
  *
  * \return the categ_select_struct  of the report, -1 if problem
  * */
-GSList *gsb_data_report_get_category_struct ( gint report_number )
+GSList *gsb_data_report_get_category_struct_list ( gint report_number )
 {
     struct_report *report;
 
@@ -3599,18 +3586,18 @@ GSList *gsb_data_report_get_category_struct ( gint report_number )
     return report -> categ_select_struct;
 }
 
-/** 
+/**
  * set the list of struct_categ_budget_sel
  * this is a list of struct_categ_budget_sel
  * if there were a previous category struct list, we free it before
- * 
+ *
  * \param report_number number of the report
  * \param categ_select_struct
  *
  * \return TRUE if ok
  * */
-gboolean gsb_data_report_set_category_struct ( gint report_number,
-					       GSList *categ_select_struct )
+gboolean gsb_data_report_set_category_struct_list ( gint report_number,
+                        GSList *categ_select_struct )
 {
     struct_report *report;
 
@@ -3620,7 +3607,7 @@ gboolean gsb_data_report_set_category_struct ( gint report_number,
 	return FALSE;
 
     if (report -> categ_select_struct)
-	gsb_data_report_free_categ_budget_struct (report -> categ_select_struct);
+	gsb_data_report_free_categ_budget_struct_list (report -> categ_select_struct);
 
     report -> categ_select_struct = categ_select_struct;
 
@@ -3634,23 +3621,24 @@ gboolean gsb_data_report_set_category_struct ( gint report_number,
  *
  * \return TRUE if ok
  * */
-gboolean gsb_data_report_free_categ_budget_struct (GSList *categ_budget_sel_list)
+void gsb_data_report_free_categ_budget_struct_list (GSList *categ_budget_sel_list)
 {
     GSList *tmp_list;
 
     tmp_list = categ_budget_sel_list;
     while (tmp_list)
     {
-	struct_categ_budget_sel *categ_budget_struct;
+        struct_categ_budget_sel *categ_budget_struct;
 
-	categ_budget_struct = tmp_list -> data;
-	if (categ_budget_struct -> sub_div_numbers)
-	    g_slist_free (categ_budget_struct -> sub_div_numbers);
-	g_free (categ_budget_struct);
-	tmp_list = tmp_list -> next;
+        categ_budget_struct = tmp_list -> data;
+        if (categ_budget_struct -> sub_div_numbers)
+            g_slist_free (categ_budget_struct -> sub_div_numbers);
+        g_free (categ_budget_struct);
+        tmp_list = tmp_list -> next;
     }
     g_slist_free (categ_budget_sel_list);
-    return TRUE;
+
+    
 }
 
 /**
@@ -3687,13 +3675,13 @@ GSList *gsb_data_report_copy_categ_budget_struct (GSList *orig_categ_budget_list
 
 /**
  * return the list of struct_categ_budget_sel
- * 	containing the selected budgets and sub-budgets
- * 
+ * containing the selected budgets and sub-budgets
+ *
  * \param report_number the number of the report
  *
  * \return the categ_select_struct  of the report, -1 if problem
  * */
-GSList *gsb_data_report_get_budget_struct ( gint report_number )
+GSList *gsb_data_report_get_budget_struct_list ( gint report_number )
 {
     struct_report *report;
 
@@ -3709,14 +3697,14 @@ GSList *gsb_data_report_get_budget_struct ( gint report_number )
  * set the list of budgets struct
  * this is a list of struct_categ_budget_sel
  * if there were a previous budget struct list, we free it before
- * 
+ *
  * \param report_number number of the report
  * \param categ_select_struct
  *
  * \return TRUE if ok
  * */
-gboolean gsb_data_report_set_budget_struct ( gint report_number,
-					     GSList *budget_select_struct )
+gboolean gsb_data_report_set_budget_struct_list ( gint report_number,
+                        GSList *budget_select_struct )
 {
     struct_report *report;
 
@@ -3726,7 +3714,7 @@ gboolean gsb_data_report_set_budget_struct ( gint report_number,
 	return FALSE;
 
     if (report -> budget_select_struct)
-	gsb_data_report_free_categ_budget_struct (report -> budget_select_struct);
+	gsb_data_report_free_categ_budget_struct_list (report -> budget_select_struct);
 
     report -> budget_select_struct = budget_select_struct;
 
@@ -3734,15 +3722,36 @@ gboolean gsb_data_report_set_budget_struct ( gint report_number,
 }
 
 
+/**
+ * free the payee_numbers_list
+ *
+ * \param report_number number of the report
+ *
+ * \return
+ * */
+void gsb_data_report_free_payee_numbers_list ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return;
+    if ( report -> payee_numbers )
+        g_slist_free ( report -> payee_numbers );
+
+    report -> payee_numbers = NULL;
+}
+
 
 /**
  * get the  payee_numbers
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the payee_numbers  of the report, -1 if problem
  * */
-GSList *gsb_data_report_get_payee_numbers ( gint report_number )
+GSList *gsb_data_report_get_payee_numbers_list ( gint report_number )
 {
     struct_report *report;
 
@@ -3754,16 +3763,16 @@ GSList *gsb_data_report_get_payee_numbers ( gint report_number )
     return report -> payee_numbers;
 }
 
-/** 
+/**
  * set the payee_numbers
- * 
+ *
  * \param report_number number of the report
  * \param payee_numbers
  *
  * \return TRUE if ok
  * */
-gboolean gsb_data_report_set_payee_numbers ( gint report_number,
-					     GSList *payee_numbers )
+gboolean gsb_data_report_set_payee_numbers_list ( gint report_number,
+                        GSList *payee_numbers )
 {
     struct_report *report;
 
@@ -3779,7 +3788,7 @@ gboolean gsb_data_report_set_payee_numbers ( gint report_number,
 
 /**
  * get the  text_comparison_list
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the text_comparison_list  of the report, -1 if problem
@@ -3796,16 +3805,16 @@ GSList *gsb_data_report_get_text_comparison_list ( gint report_number )
     return report -> text_comparison_list;
 }
 
-/** 
+/**
  * set the text_comparison_list
- * 
+ *
  * \param report_number number of the report
  * \param text_comparison_list
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_text_comparison_list ( gint report_number,
-						    GSList *text_comparison_list )
+                        GSList *text_comparison_list )
 {
     struct_report *report;
 
@@ -3821,7 +3830,7 @@ gboolean gsb_data_report_set_text_comparison_list ( gint report_number,
 
 /**
  * get the  amount_comparison_list
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the amount_comparison_list  of the report, -1 if problem
@@ -3838,16 +3847,16 @@ GSList *gsb_data_report_get_amount_comparison_list ( gint report_number )
     return report -> amount_comparison_list;
 }
 
-/** 
+/**
  * set the amount_comparison_list
- * 
+ *
  * \param report_number number of the report
  * \param amount_comparison_list
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_amount_comparison_list ( gint report_number,
-						      GSList *amount_comparison_list )
+                        GSList *amount_comparison_list )
 {
     struct_report *report;
 
@@ -3864,7 +3873,7 @@ gboolean gsb_data_report_set_amount_comparison_list ( gint report_number,
 /**
  * get the  method_of_payment_list
  * this is a list of string of method of payment we want to see in the report
- * 
+ *
  * \param report_number the number of the report
  *
  * \return the method_of_payment_list  of the report, -1 if problem
@@ -3881,16 +3890,16 @@ GSList *gsb_data_report_get_method_of_payment_list ( gint report_number )
     return report -> method_of_payment_list;
 }
 
-/** 
+/**
  * set the method_of_payment_list
- * 
+ *
  * \param report_number number of the report
  * \param method_of_payment_list
  *
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_method_of_payment_list ( gint report_number,
-						      GSList *method_of_payment_list )
+                        GSList *method_of_payment_list )
 {
     struct_report *report;
 
@@ -4001,7 +4010,7 @@ gint gsb_data_report_dup ( gint report_number )
  * \return -1 if report_number_1 before, report_number_2, and +1 else, 0 if one of report doesn't exist
  * */
 gint gsb_data_report_compare_position ( gint report_number_1,
-					gint report_number_2 )
+                        gint report_number_2 )
 {
     gint pos_1, pos_2;
     struct_report *report_1;
@@ -4033,7 +4042,7 @@ gint gsb_data_report_compare_position ( gint report_number_1,
  * \return FALSE
  * */
 gboolean gsb_data_report_move_report ( gint report_number,
-				       gint dest_report_number )
+                        gint dest_report_number )
 {
     struct_report *report;
 
@@ -4086,8 +4095,8 @@ gboolean gsb_data_report_move_report ( gint report_number,
  * \return TRUE : the couple categ/sub-categ or budget/sub-budget exist, FALSE : it is not in that report
  * */
 gboolean gsb_data_report_check_categ_budget_in_report ( GSList *list_struct_report,
-							gint div_number,
-							gint sub_div_number )
+                        gint div_number,
+                        gint sub_div_number )
 {
     GSList *tmp_list;
 
@@ -4113,6 +4122,313 @@ gboolean gsb_data_report_check_categ_budget_in_report ( GSList *list_struct_repo
 }
 
 
+/**
+ * get the date_select_value
+ *
+ * \param report_number the number of the report
+ *
+ * \return the date_select_value, -1 if problem
+ * */
+gint gsb_data_report_get_date_select_value ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return -1;
+
+    return report -> date_select_value;
+}
+
+/**
+ * set the date_select_value
+ *
+ * \param report_number number of the report
+ * \param date_select_value
+ *
+ * \return TRUE if ok
+ * */
+gboolean gsb_data_report_set_date_select_value ( gint report_number,
+                        gint date_select_value )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return FALSE;
+
+    report -> date_select_value = date_select_value;
+
+    return TRUE;
+}
+
+
+/**
+ * get the  show_m
+ *
+ * \param report_number the number of the report
+ *
+ * \return the show_m  of the report, -1 if problem
+ * */
+gint gsb_data_report_get_show_m ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return -1;
+
+    return report -> show_m;
+}
+
+
+/**
+ * set the show_m
+ *
+ * \param report_number number of the report
+ * \param show_m
+ *
+ * \return TRUE if ok
+ * */
+gboolean gsb_data_report_set_show_m ( gint report_number,
+                        gint show_m )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return FALSE;
+
+    report -> show_m = show_m;
+
+    return TRUE;
+}
+
+
+/**
+ * get the  show_p
+ *
+ * \param report_number the number of the report
+ *
+ * \return the show_p  of the report, -1 if problem
+ * */
+gint gsb_data_report_get_show_p ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return -1;
+
+    return report -> show_p;
+}
+
+/**
+ * set the show_p
+ *
+ * \param report_number number of the report
+ * \param show_p
+ *
+ * \return TRUE if ok
+ * */
+gboolean gsb_data_report_set_show_p ( gint report_number,
+                        gint show_p )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return FALSE;
+
+    report -> show_p = show_p;
+
+    return TRUE;
+}
+
+
+/**
+ * get the  show_r
+ *
+ * \param report_number the number of the report
+ *
+ * \return the show_r  of the report, -1 if problem
+ * */
+gint gsb_data_report_get_show_r ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return -1;
+
+    return report -> show_r;
+}
+
+/**
+ * set the show_r
+ *
+ * \param report_number number of the report
+ * \param show_r
+ *
+ * \return TRUE if ok
+ * */
+gboolean gsb_data_report_set_show_r ( gint report_number,
+                        gint show_r )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return FALSE;
+
+    report -> show_r = show_r;
+
+    return TRUE;
+}
+
+
+/**
+ * get the  show_t
+ *
+ * \param report_number the number of the report
+ *
+ * \return the show_t  of the report, -1 if problem
+ * */
+gint gsb_data_report_get_show_t ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return -1;
+
+    return report -> show_t;
+}
+
+
+/**
+ * set the show_t
+ *
+ * \param report_number number of the report
+ * \param show_t
+ *
+ * \return TRUE if ok
+ * */
+gboolean gsb_data_report_set_show_t ( gint report_number,
+                        gint show_t )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return FALSE;
+
+    report -> show_t = show_t;
+
+    return TRUE;
+}
+
+
+/**
+ * free the account_numbers_list
+ *
+ * \param report_number number of the report
+ *
+ * \return
+ * */
+void gsb_data_report_free_account_numbers_list ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return;
+    if ( report -> account_numbers )
+        g_slist_free ( report -> account_numbers );
+    report -> account_numbers = NULL;
+}
+
+
+/**
+ * free the transfert_account_numbers_list
+ *
+ * \param report_number number of the report
+ *
+ * \return
+ * */
+void gsb_data_report_free_transfer_account_numbers_list ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return;
+    if ( report -> account_numbers )
+        g_slist_free ( report -> transfer_account_numbers );
+    report -> transfer_account_numbers = NULL;
+}
+
+
+/**
+ * free the method_of_payment_list
+ *
+ * \param report_number number of the report
+ *
+ * \return
+ * */
+void gsb_data_report_free_method_of_payment_list ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return;
+
+    if ( report->method_of_payment_list )
+        g_slist_free ( report->method_of_payment_list );
+
+    report->method_of_payment_list = NULL;
+}
+
+
+/**
+ * free the sorting_type_list
+ *
+ * \param report_number number of the report
+ *
+ * \return
+ * */
+void gsb_data_report_free_sorting_type_list ( gint report_number )
+{
+    struct_report *report;
+
+    report = gsb_data_report_get_structure ( report_number );
+
+    if ( !report )
+        return;
+
+    if ( report->sorting_type )
+        g_slist_free ( report->sorting_type );
+
+    report->sorting_type = NULL;
+}
+
 
+/* Local Variables: */
+/* c-basic-offset:  */   = NULL;  ting_type );  ort_number );  r )  r )  ber )  SList *list_struct_repo    ted budgets and sub-budgets */  s */  he report/3:perso */  9=bank ref, 10=marked number */  -c+  ã\ÿ  €Oc+           Ø\ÿ         ÐÖ\ÿ  k€c+  6                    è     è!     è!      â\ÿ  ã\ÿ  x4-c+           Ù\ÿ          ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ         À/‘c+  ujc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          x4-c+           Ù\ÿ          Ð×\ÿ  k€c+  à!     à!      â\ÿ  ã\ÿ  Hþc+          àÙ\ÿ         ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ  Ðâ\ÿ  Èâ\ÿ  8‹1c+  Œp˜        ã\ÿ  ujc+  €Šc+                  àÙ\ÿ         °Ø\ÿ  k€c+          G       H   I       J   K           M   N   O       P    â\ÿ  ã\ÿ  Hµãc+          €Û\ÿ         ’bc+          †€c+   â\ÿ         0/‘c+  ujc+   @-c+   éÀc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          Hµãc+          €Û\ÿ 
         ÀÙ\ÿ  k€c+  8µãc+          €Û\ÿ         ðÙ\ÿ  k€c+  (µãc+          €Û\ÿ          Ú\ÿ  k€c+  µãc+          €Û\ÿ         PÚ\ÿ  k€c+  	       ¨.‘c+  ujc+         ¨)‘c+  ÐÔ\ÿ          Š8Ác+  eic+         Ø$‘c+  ðÚ\ÿ          y8Ác+  eic+           ‘c+   Û\ÿ          Z8Ác+  eic+  ØäÀc+   @-c+   éÀc+    ‘c+  ØD-c+  Ø$‘c+  ¨)‘c+  €Šc+          8‹1c+                        ­Œc+  ã\ÿ  p{Àc+          ÐÜ\ÿ           Û\ÿ  k€c+      5   6   7   8   :   <   =   >       ?       @   B   D        â\ÿ  ã\ÿ  ୉c+                 ã\ÿ  ujc+         …1c+  PÛ\ÿ          ­Œc+  eic+  …1c+          Õ_ at fÆS         Qöl±íÁÃXc+  ã\ÿ  ୉c+          àÝ\ÿ         °Ü\ÿ  k€c+  u]ÞÓ	4Q ÷U^Qʉ§ ¶uª¹ñìò*ēv â\ÿ  ã\ÿ  HþUc+          D’c+          Pä\ÿ  ¦Pôc+  ¦Pôc+         –c+  ßâ\ÿ  ä\ÿ  Èâ\ÿ  0ß\ÿ  O-c+  ujc+  ØD-c+  å\ÿ  ¢Pôc+  `ä\ÿ          ðß\
 ÿ                 ÿÿÿÿÿÿÿÿ¢Pôc+          ã\ÿ                  4 */
+/* End: */
 
 
diff --git a/src/gsb_data_report.h b/src/gsb_data_report.h
index ac434c5..e7c117d 100644
--- a/src/gsb_data_report.h
+++ b/src/gsb_data_report.h
@@ -21,14 +21,20 @@ typedef struct
 
 /* START_DECLARATION */
 gboolean gsb_data_report_check_categ_budget_in_report ( GSList *list_struct_report,
-							gint div_number,
-							gint sub_div_number );
+                        gint div_number,
+                        gint sub_div_number );
 gint gsb_data_report_compare_position ( gint report_number_1,
-					gint report_number_2 );
+                        gint report_number_2 );
 gint gsb_data_report_dup ( gint report_number );
-gboolean gsb_data_report_free_categ_budget_struct (GSList *categ_budget_sel_list);
+void gsb_data_report_free_account_numbers_list ( gint report_number );
+void gsb_data_report_free_categ_budget_struct_list (GSList *categ_budget_sel_list);
+void gsb_data_report_free_financial_year_list ( gint report_number );
+void gsb_data_report_free_method_of_payment_list ( gint report_number );
+void gsb_data_report_free_payee_numbers_list ( gint report_number );
+void gsb_data_report_free_sorting_type_list ( gint report_number );
+void gsb_data_report_free_transfer_account_numbers_list ( gint report_number );
 gint gsb_data_report_get_account_group_reports ( gint report_number );
-GSList *gsb_data_report_get_account_numbers ( gint report_number );
+GSList *gsb_data_report_get_account_numbers_list ( gint report_number );
 gint gsb_data_report_get_account_show_amount ( gint report_number );
 gint gsb_data_report_get_account_show_name ( gint report_number );
 gint gsb_data_report_get_account_use_chosen ( gint report_number );
@@ -44,7 +50,7 @@ gint gsb_data_report_get_budget_show_name ( gint report_number );
 gint gsb_data_report_get_budget_show_sub_budget ( gint report_number );
 gint gsb_data_report_get_budget_show_sub_budget_amount ( gint report_number );
 gint gsb_data_report_get_budget_show_without_budget ( gint report_number );
-GSList *gsb_data_report_get_budget_struct ( gint report_number );
+GSList *gsb_data_report_get_budget_struct_list ( gint report_number );
 gint gsb_data_report_get_budget_used ( gint report_number );
 gint gsb_data_report_get_category_currency ( gint report_number );
 gint gsb_data_report_get_category_detail_used ( gint report_number );
@@ -53,12 +59,13 @@ gint gsb_data_report_get_category_show_name ( gint report_number );
 gint gsb_data_report_get_category_show_sub_category ( gint report_number );
 gint gsb_data_report_get_category_show_sub_category_amount ( gint report_number );
 gint gsb_data_report_get_category_show_without_category ( gint report_number );
-GSList *gsb_data_report_get_category_struct ( gint report_number );
+GSList *gsb_data_report_get_category_struct_list ( gint report_number );
 gint gsb_data_report_get_category_used ( gint report_number );
 gint gsb_data_report_get_column_title_show ( gint report_number );
 gint gsb_data_report_get_column_title_type ( gint report_number );
 gint gsb_data_report_get_currency_general ( gint report_number );
 gint gsb_data_report_get_date_type ( gint report_number );
+gint gsb_data_report_get_date_select_value ( gint report_number );
 GSList *gsb_data_report_get_financial_year_list ( gint report_number );
 gint gsb_data_report_get_financial_year_split ( gint report_number );
 gint gsb_data_report_get_financial_year_type ( gint report_number );
@@ -67,7 +74,7 @@ gint gsb_data_report_get_method_of_payment_used ( gint report_number );
 gint gsb_data_report_get_not_detail_split ( gint report_number );
 gint gsb_data_report_get_payee_currency ( gint report_number );
 gint gsb_data_report_get_payee_detail_used ( gint report_number );
-GSList *gsb_data_report_get_payee_numbers ( gint report_number );
+GSList *gsb_data_report_get_payee_numbers_list ( gint report_number );
 gint gsb_data_report_get_payee_show_name ( gint report_number );
 gint gsb_data_report_get_payee_show_payee_amount ( gint report_number );
 gint gsb_data_report_get_payee_used ( gint report_number );
@@ -81,6 +88,8 @@ gint gsb_data_report_get_report_can_click ( gint report_number );
 GSList *gsb_data_report_get_report_list ( void );
 gchar *gsb_data_report_get_report_name ( gint report_number );
 gint gsb_data_report_get_report_number ( gpointer report_pointer );
+gint gsb_data_report_get_show_m ( gint report_number );
+gint gsb_data_report_get_show_p ( gint report_number );
 gint gsb_data_report_get_show_r ( gint report_number );
 gint gsb_data_report_get_show_report_bank_references ( gint report_number );
 gint gsb_data_report_get_show_report_budget ( gint report_number );
@@ -99,178 +108,187 @@ gint gsb_data_report_get_show_report_transaction_number ( gint report_number );
 gint gsb_data_report_get_show_report_transactions ( gint report_number );
 gint gsb_data_report_get_show_report_value_date ( gint report_number );
 gint gsb_data_report_get_show_report_voucher ( gint report_number );
+gint gsb_data_report_get_show_t ( gint report_number );
 gint gsb_data_report_get_sorting_report ( gint report_number );
-GSList *gsb_data_report_get_sorting_type ( gint report_number );
+GSList *gsb_data_report_get_sorting_type_list ( gint report_number );
 gint gsb_data_report_get_split_credit_debit ( gint report_number );
 GSList *gsb_data_report_get_text_comparison_list ( gint report_number );
 gint gsb_data_report_get_text_comparison_used ( gint report_number );
-GSList *gsb_data_report_get_transfer_account_numbers ( gint report_number );
+GSList *gsb_data_report_get_transfer_account_numbers_list ( gint report_number );
 gint gsb_data_report_get_transfer_choice ( gint report_number );
 gint gsb_data_report_get_transfer_reports_only ( gint report_number );
 gint gsb_data_report_get_use_financial_year ( gint report_number );
 gboolean gsb_data_report_init_variables ( void );
 gint gsb_data_report_max_number ( void );
 gboolean gsb_data_report_move_report ( gint report_number,
-				       gint dest_report_number );
+                        gint dest_report_number );
 gint gsb_data_report_new ( gchar *name );
 gint gsb_data_report_new_with_number ( gint number );
 gboolean gsb_data_report_remove ( gint no_report );
 gboolean gsb_data_report_set_account_group_reports ( gint report_number,
-						     gint account_group_reports );
-gboolean gsb_data_report_set_account_numbers ( gint report_number,
-					       GSList *account_numbers );
+                        gint account_group_reports );
+gboolean gsb_data_report_set_account_numbers_list ( gint report_number,
+                        GSList *account_numbers );
 gboolean gsb_data_report_set_account_show_amount ( gint report_number,
-						   gint account_show_amount );
+                        gint account_show_amount );
 gboolean gsb_data_report_set_account_show_name ( gint report_number,
-						 gint account_show_name );
+                        gint account_show_name );
 gboolean gsb_data_report_set_account_use_chosen ( gint report_number,
-						   gint account_use_chosen );
+                        gint account_use_chosen );
 gboolean gsb_data_report_set_amount_comparison_currency ( gint report_number,
-							  gint amount_comparison_currency );
+                        gint amount_comparison_currency );
 gboolean gsb_data_report_set_amount_comparison_list ( gint report_number,
-						      GSList *amount_comparison_list );
+                        GSList *amount_comparison_list );
 gboolean gsb_data_report_set_amount_comparison_only_report_non_null ( gint report_number,
-								      gint amount_comparison_only_report_non_null );
+                        gint amount_comparison_only_report_non_null );
 gboolean gsb_data_report_set_amount_comparison_used ( gint report_number,
-						      gint amount_comparison_used );
+                        gint amount_comparison_used );
 gboolean gsb_data_report_set_append_in_payee ( gint report_number,
-					       gint append_in_payee );
+                        gint append_in_payee );
 gboolean gsb_data_report_set_budget_currency ( gint report_number,
-					       gint budget_currency );
+                        gint budget_currency );
 gboolean gsb_data_report_set_budget_detail_used ( gint report_number,
-						  gint budget_detail_used );
+                        gint budget_detail_used );
 gboolean gsb_data_report_set_budget_show_budget_amount ( gint report_number,
-							 gint budget_show_budget_amount );
+                        gint budget_show_budget_amount );
 gboolean gsb_data_report_set_budget_show_name ( gint report_number,
-						gint budget_show_name );
+                        gint budget_show_name );
 gboolean gsb_data_report_set_budget_show_sub_budget ( gint report_number,
-						      gint budget_show_sub_budget );
+                        gint budget_show_sub_budget );
 gboolean gsb_data_report_set_budget_show_sub_budget_amount ( gint report_number,
-							 gint budget_show_sub_budget_amount );
+                        gint budget_show_sub_budget_amount );
 gboolean gsb_data_report_set_budget_show_without_budget ( gint report_number,
-							  gint budget_show_without_budget );
-gboolean gsb_data_report_set_budget_struct ( gint report_number,
-					     GSList *budget_select_struct );
+                        gint budget_show_without_budget );
+gboolean gsb_data_report_set_budget_struct_list ( gint report_number,
+                        GSList *budget_select_struct );
 gboolean gsb_data_report_set_budget_used ( gint report_number,
-					   gint budget_used );
+                        gint budget_used );
 gboolean gsb_data_report_set_category_currency ( gint report_number,
-						 gint category_currency );
+                        gint category_currency );
 gboolean gsb_data_report_set_category_detail_used ( gint report_number,
-						    gint category_detail_used );
+                        gint category_detail_used );
 gboolean gsb_data_report_set_category_show_category_amount ( gint report_number,
-							     gint category_show_category_amount );
+                        gint category_show_category_amount );
 gboolean gsb_data_report_set_category_show_name ( gint report_number,
-						  gint category_show_name );
+                        gint category_show_name );
 gboolean gsb_data_report_set_category_show_sub_category ( gint report_number,
-							  gint category_show_sub_category );
+                        gint category_show_sub_category );
 gboolean gsb_data_report_set_category_show_sub_category_amount ( gint report_number,
-								 gint category_show_sub_category_amount );
+                        gint category_show_sub_category_amount );
 gboolean gsb_data_report_set_category_show_without_category ( gint report_number,
-							      gint category_show_without_category );
-gboolean gsb_data_report_set_category_struct ( gint report_number,
-					       GSList *categ_select_struct );
+                        gint category_show_without_category );
+gboolean gsb_data_report_set_category_struct_list ( gint report_number,
+                        GSList *categ_select_struct );
 gboolean gsb_data_report_set_category_used ( gint report_number,
-					     gint category_used );
+                        gint category_used );
 gboolean gsb_data_report_set_column_title_show ( gint report_number,
-						 gint column_title_show );
+                        gint column_title_show );
 gboolean gsb_data_report_set_column_title_type ( gint report_number,
-						 gint column_title_type );
+                        gint column_title_type );
 gboolean gsb_data_report_set_currency_general ( gint report_number,
-						gint currency_general );
+                        gint currency_general );
 gboolean gsb_data_report_set_date_type ( gint report_number,
-					 gint date_type );
+                        gint date_type );
+gboolean gsb_data_report_set_date_select_value ( gint report_number,
+                        gint date_select_value );
 gboolean gsb_data_report_set_financial_year_list ( gint report_number,
-						   GSList *financial_year_list );
+                        GSList *financial_year_list );
 gboolean gsb_data_report_set_financial_year_split ( gint report_number,
-						    gint financial_year_split );
+                        gint financial_year_split );
 gboolean gsb_data_report_set_financial_year_type ( gint report_number,
-						   gint financial_year_type );
+                        gint financial_year_type );
 gboolean gsb_data_report_set_method_of_payment_list ( gint report_number,
-						      GSList *method_of_payment_list );
+                        GSList *method_of_payment_list );
 gboolean gsb_data_report_set_method_of_payment_used ( gint report_number,
-						      gint method_of_payment_used );
+                        gint method_of_payment_used );
 gboolean gsb_data_report_set_not_detail_split ( gint report_number,
-						    gint not_detail_split );
+                        gint not_detail_split );
 gboolean gsb_data_report_set_payee_currency ( gint report_number,
-					      gint payee_currency );
+                    gint payee_currency );
 gboolean gsb_data_report_set_payee_detail_used ( gint report_number,
-						 gint payee_detail_used );
-gboolean gsb_data_report_set_payee_numbers ( gint report_number,
-					     GSList *payee_numbers );
+                        gint payee_detail_used );
+gboolean gsb_data_report_set_payee_numbers_list ( gint report_number,
+                        GSList *payee_numbers );
 gboolean gsb_data_report_set_payee_show_name ( gint report_number,
-					       gint payee_show_name );
+                        gint payee_show_name );
 gboolean gsb_data_report_set_payee_show_payee_amount ( gint report_number,
-						       gint payee_show_payee_amount );
+                        gint payee_show_payee_amount );
 gboolean gsb_data_report_set_payee_used ( gint report_number,
-					  gint payee_used );
+                        gint payee_used );
 gboolean gsb_data_report_set_period_split ( gint report_number,
-					    gint period_split );
+                        gint period_split );
 gboolean gsb_data_report_set_period_split_day ( gint report_number,
-						gint period_split_day );
+                        gint period_split_day );
 gboolean gsb_data_report_set_period_split_type ( gint report_number,
-						 gint period_split_type );
+                        gint period_split_type );
 gboolean gsb_data_report_set_personal_date_end ( gint report_number,
-						 GDate *personal_date_end );
+                        GDate *personal_date_end );
 gboolean gsb_data_report_set_personal_date_start ( gint report_number,
-						   GDate *personal_date_start );
+                        GDate *personal_date_start );
 gboolean gsb_data_report_set_report_can_click ( gint report_number,
-						gint report_can_click );
+                        gint report_can_click );
 gboolean gsb_data_report_set_report_name ( gint report_number,
-					   const gchar *report_name );
+                        const gchar *report_name );
+gboolean gsb_data_report_set_show_m ( gint report_number,
+                        gint show_m );
+gboolean gsb_data_report_set_show_p ( gint report_number,
+                        gint show_p );
 gboolean gsb_data_report_set_show_r ( gint report_number,
-				      gint show_r );
+                        gint show_r );
 gboolean gsb_data_report_set_show_report_bank_references ( gint report_number,
-							   gint show_report_bank_references );
+                        gint show_report_bank_references );
 gboolean gsb_data_report_set_show_report_budget ( gint report_number,
-						  gint show_report_budget );
+                        gint show_report_budget );
 gboolean gsb_data_report_set_show_report_category ( gint report_number,
-						    gint show_report_category );
+                        gint show_report_category );
 gboolean gsb_data_report_set_show_report_date ( gint report_number,
-						gint show_report_date );
+                        gint show_report_date );
 gboolean gsb_data_report_set_show_report_financial_year ( gint report_number,
-							  gint show_report_financial_year );
+                        gint show_report_financial_year );
 gboolean gsb_data_report_set_show_report_marked ( gint report_number,
-						  gint show_report_marked );
+                        gint show_report_marked );
 gboolean gsb_data_report_set_show_report_method_of_payment ( gint report_number,
-							     gint show_report_method_of_payment );
+                        gint show_report_method_of_payment );
 gboolean gsb_data_report_set_show_report_method_of_payment_content ( gint report_number,
-								     gint show_report_method_of_payment_content );
+                        gint show_report_method_of_payment_content );
 gboolean gsb_data_report_set_show_report_note ( gint report_number,
-						gint show_report_note );
+                        gint show_report_note );
 gboolean gsb_data_report_set_show_report_payee ( gint report_number,
-						 gint show_report_payee );
+                        gint show_report_payee );
 gboolean gsb_data_report_set_show_report_sub_budget ( gint report_number,
-						      gint show_report_sub_budget );
+                        gint show_report_sub_budget );
 gboolean gsb_data_report_set_show_report_sub_category ( gint report_number,
-							gint show_report_sub_category );
+                        gint show_report_sub_category );
 gboolean gsb_data_report_set_show_report_transaction_amount ( gint report_number,
-							      gint show_report_transaction_amount );
+                        gint show_report_transaction_amount );
 gboolean gsb_data_report_set_show_report_transaction_number ( gint report_number,
-							      gint show_report_transaction_number );
+                        gint show_report_transaction_number );
 gboolean gsb_data_report_set_show_report_transactions ( gint report_number,
-							gint show_report_transactions );
+                        gint show_report_transactions );
 gboolean gsb_data_report_set_show_report_value_date ( gint report_number,
-						      gint show_report_value_date );
+                        gint show_report_value_date );
 gboolean gsb_data_report_set_show_report_voucher ( gint report_number,
-						   gint show_report_voucher );
+                        gint show_report_voucher );
+gboolean gsb_data_report_set_show_t ( gint report_number,
+                        gint show_t );
 gboolean gsb_data_report_set_sorting_report ( gint report_number,
-					      gint sorting_report );
-gboolean gsb_data_report_set_sorting_type ( gint report_number,
-					    GSList *sorting_type );
+                        gint sorting_report );
+gboolean gsb_data_report_set_sorting_type_list ( gint report_number,
+                        GSList *sorting_type );
 gboolean gsb_data_report_set_split_credit_debit ( gint report_number,
-						  gint split_credit_debit );
+                        gint split_credit_debit );
 gboolean gsb_data_report_set_text_comparison_list ( gint report_number,
-						    GSList *text_comparison_list );
+                        GSList *text_comparison_list );
 gboolean gsb_data_report_set_text_comparison_used ( gint report_number,
-						    gint text_comparison_used );
-gboolean gsb_data_report_set_transfer_account_numbers ( gint report_number,
-							GSList *transfer_account_numbers );
+                        gint text_comparison_used );
+gboolean gsb_data_report_set_transfer_account_numbers_list ( gint report_number,
+                        GSList *transfer_account_numbers );
 gboolean gsb_data_report_set_transfer_choice ( gint report_number,
-					       gint transfer_choice );
+                        gint transfer_choice );
 gboolean gsb_data_report_set_transfer_reports_only ( gint report_number,
-						     gint transfer_reports_only );
+                        gint transfer_reports_only );
 gboolean gsb_data_report_set_use_financial_year ( gint report_number,
-						  gint use_financial_year );
+                        gint use_financial_year );
 /* END_DECLARATION */
 
 #endif
diff --git a/src/gsb_file_load.c b/src/gsb_file_load.c
index 15794b2..407edf9 100644
--- a/src/gsb_file_load.c
+++ b/src/gsb_file_load.c
@@ -4334,7 +4334,7 @@ void gsb_file_load_report ( const gchar **attribute_names,
     if ( !strcmp ( attribute_names[i],
                "General_sort_type" ))
     {
-        gsb_data_report_set_sorting_type ( report_number,
+        gsb_data_report_set_sorting_type_list ( report_number,
                            gsb_string_get_int_list_from_string (attribute_values[i],
                                                 "/-/" ));
         i++;
@@ -4342,6 +4342,24 @@ void gsb_file_load_report ( const gchar **attribute_names,
     }
 
     if ( !strcmp ( attribute_names[i],
+               "Show_m" ))
+    {
+        gsb_data_report_set_show_m ( report_number,
+                     utils_str_atoi (attribute_values[i]));
+        i++;
+        continue;
+    }
+
+    if ( !strcmp ( attribute_names[i],
+               "Show_p" ))
+    {
+        gsb_data_report_set_show_p ( report_number,
+                     utils_str_atoi (attribute_values[i]));
+        i++;
+        continue;
+    }
+
+    if ( !strcmp ( attribute_names[i],
                "Show_r" ))
     {
         gsb_data_report_set_show_r ( report_number,
@@ -4351,6 +4369,15 @@ void gsb_file_load_report ( const gchar **attribute_names,
     }
 
     if ( !strcmp ( attribute_names[i],
+               "Show_t" ))
+    {
+        gsb_data_report_set_show_t ( report_number,
+                     utils_str_atoi (attribute_values[i]));
+        i++;
+        continue;
+    }
+
+    if ( !strcmp ( attribute_names[i],
                "Show_transaction" ))
     {
         gsb_data_report_set_show_report_transactions ( report_number,
@@ -4613,6 +4640,15 @@ void gsb_file_load_report ( const gchar **attribute_names,
     }
 
     if ( !strcmp ( attribute_names[i],
+               "Date_select_value" ))
+    {
+        gsb_data_report_set_date_select_value ( report_number,
+                        utils_str_atoi (attribute_values[i]));
+        i++;
+        continue;
+    }
+
+    if ( !strcmp ( attribute_names[i],
                "Date_beginning" ))
     {
         gsb_data_report_set_personal_date_start ( report_number,
@@ -4678,7 +4714,7 @@ void gsb_file_load_report ( const gchar **attribute_names,
     if ( !strcmp ( attribute_names[i],
                "Account_selected" ))
     {
-        gsb_data_report_set_account_numbers ( report_number,
+        gsb_data_report_set_account_numbers_list ( report_number,
                               gsb_string_get_int_list_from_string (attribute_values[i],
                                                    "/-/" ));
         i++;
@@ -4724,7 +4760,7 @@ void gsb_file_load_report ( const gchar **attribute_names,
     if ( !strcmp ( attribute_names[i],
                "Transfer_selected_accounts" ))
     {
-        gsb_data_report_set_transfer_account_numbers ( report_number,
+        gsb_data_report_set_transfer_account_numbers_list ( report_number,
                                    gsb_string_get_int_list_from_string (attribute_values[i],
                                                         "/-/" ));
         i++;
@@ -4761,7 +4797,7 @@ void gsb_file_load_report ( const gchar **attribute_names,
     if ( !strcmp ( attribute_names[i],
                "Categ_selected" ))
     {
-        gsb_data_report_set_category_struct ( report_number,
+        gsb_data_report_set_category_struct_list ( report_number,
                               gsb_string_get_categ_budget_struct_list_from_string ((attribute_values[i])));
         i++;
         continue;
@@ -4842,7 +4878,7 @@ void gsb_file_load_report ( const gchar **attribute_names,
     if ( !strcmp ( attribute_names[i],
                "Budget_selected" ))
     {
-        gsb_data_report_set_budget_struct ( report_number,
+        gsb_data_report_set_budget_struct_list ( report_number,
                             gsb_string_get_categ_budget_struct_list_from_string ((attribute_values[i])));
         i++;
         continue;
@@ -4923,7 +4959,7 @@ void gsb_file_load_report ( const gchar **attribute_names,
     if ( !strcmp ( attribute_names[i],
                "Payee_selected" ))
     {
-        gsb_data_report_set_payee_numbers ( report_number,
+        gsb_data_report_set_payee_numbers_list ( report_number,
                             gsb_string_get_int_list_from_string (attribute_values[i],
                                                  "/-/" ));
         i++;
@@ -7261,7 +7297,7 @@ void gsb_file_load_report_part_before_0_6 ( GMarkupParseContext *context,
     if ( !strcmp ( element_name,
            "Type_classement" ))
     {
-    gsb_data_report_set_sorting_type ( last_report_number,
+    gsb_data_report_set_sorting_type_list ( last_report_number,
                        gsb_string_get_int_list_from_string ( text,
                                              "/" ));
     return;
@@ -7605,8 +7641,8 @@ void gsb_file_load_report_part_before_0_6 ( GMarkupParseContext *context,
 
     while ( pointeur_char[i] )
     {
-        gsb_data_report_set_account_numbers ( last_report_number,
-                              g_slist_append ( gsb_data_report_get_account_numbers (last_report_number),
+        gsb_data_report_set_account_numbers_list ( last_report_number,
+                              g_slist_append ( gsb_data_report_get_account_numbers_list (last_report_number),
                                        GINT_TO_POINTER ( utils_str_atoi ( pointeur_char[i] ))));
         i++;
     }
@@ -7660,8 +7696,8 @@ void gsb_file_load_report_part_before_0_6 ( GMarkupParseContext *context,
 
     while ( pointeur_char[i] )
     {
-        gsb_data_report_set_transfer_account_numbers ( last_report_number,
-                                   g_slist_append ( gsb_data_report_get_transfer_account_numbers (last_report_number),
+        gsb_data_report_set_transfer_account_numbers_list ( last_report_number,
+                                   g_slist_append ( gsb_data_report_get_transfer_account_numbers_list (last_report_number),
                                             GINT_TO_POINTER ( utils_str_atoi ( pointeur_char[i] ))));
         i++;
     }
@@ -7739,7 +7775,7 @@ void gsb_file_load_report_part_before_0_6 ( GMarkupParseContext *context,
                                       NULL );
     }
     g_strfreev ( pointeur_char );
-    gsb_data_report_set_category_struct (last_report_number, tmp_list);
+    gsb_data_report_set_category_struct_list (last_report_number, tmp_list);
     return;
     }
 
@@ -7853,7 +7889,7 @@ void gsb_file_load_report_part_before_0_6 ( GMarkupParseContext *context,
                                        NULL );
     }
     g_strfreev ( pointeur_char );
-    gsb_data_report_set_budget_struct (last_report_number, tmp_list);
+    gsb_data_report_set_budget_struct_list (last_report_number, tmp_list);
     return;
     }
 
@@ -7934,8 +7970,8 @@ void gsb_file_load_report_part_before_0_6 ( GMarkupParseContext *context,
 
     while ( pointeur_char[i] )
     {
-        gsb_data_report_set_payee_numbers ( last_report_number,
-                            g_slist_append ( gsb_data_report_get_payee_numbers (last_report_number),
+        gsb_data_report_set_payee_numbers_list ( last_report_number,
+                            g_slist_append ( gsb_data_report_get_payee_numbers_list (last_report_number),
                                      GINT_TO_POINTER ( utils_str_atoi ( pointeur_char[i] ))));
         i++;
     }
diff --git a/src/gsb_file_others.c b/src/gsb_file_others.c
index ee404b5..356e995 100644
--- a/src/gsb_file_others.c
+++ b/src/gsb_file_others.c
@@ -563,16 +563,16 @@ gboolean gsb_file_others_load ( gchar *filename,
 		    gsb_data_report_set_financial_year_list ( report_number,
 							      NULL );
 		    /* erase the accounts */
-		    gsb_data_report_set_account_numbers ( report_number,
+		    gsb_data_report_set_account_numbers_list ( report_number,
 							  NULL);
 		    /* erase the transferts accounts */
-		    gsb_data_report_set_transfer_account_numbers ( report_number,
+		    gsb_data_report_set_transfer_account_numbers_list ( report_number,
 								   NULL );
 		    /* erase the categories */
-		    gsb_data_report_set_category_struct ( report_number,
+		    gsb_data_report_set_category_struct_list ( report_number,
 							  NULL );
 		    /* erase the parties */
-		    gsb_data_report_set_payee_numbers ( report_number,
+		    gsb_data_report_set_payee_numbers_list ( report_number,
 							NULL );
 		    /* erase the kinds of payment */
 		    gsb_data_report_set_method_of_payment_list ( report_number,
diff --git a/src/gsb_file_save.c b/src/gsb_file_save.c
index 9da4844..0bc9643 100644
--- a/src/gsb_file_save.c
+++ b/src/gsb_file_save.c
@@ -2198,7 +2198,7 @@ gulong gsb_file_save_report_part ( gulong iterator,
 	    report_name = my_strdup (gsb_data_report_get_report_name (report_number));
 
 	/* set the general sort type */
-	tmp_list = gsb_data_report_get_sorting_type (report_number);
+	tmp_list = gsb_data_report_get_sorting_type_list (report_number);
 	general_sort_type = NULL;
 
 	while ( tmp_list )
@@ -2240,7 +2240,7 @@ gulong gsb_file_save_report_part ( gulong iterator,
 	}
 
 	/* set the account_selected */
-	tmp_list = gsb_data_report_get_account_numbers (report_number);
+	tmp_list = gsb_data_report_get_account_numbers_list (report_number);
 	account_selected = NULL;
 
 	while ( tmp_list )
@@ -2261,7 +2261,7 @@ gulong gsb_file_save_report_part ( gulong iterator,
 	}
 
 	/* 	set the transfer_selected_accounts */
-	tmp_list = gsb_data_report_get_transfer_account_numbers (report_number);
+	tmp_list = gsb_data_report_get_transfer_account_numbers_list (report_number);
 	transfer_selected_accounts = NULL;
 
 	while ( tmp_list )
@@ -2282,7 +2282,7 @@ gulong gsb_file_save_report_part ( gulong iterator,
 	}
 
 	/* save the category and sub-category list */
-	tmp_list = gsb_data_report_get_category_struct (report_number);
+	tmp_list = gsb_data_report_get_category_struct_list (report_number);
 	categ_selected = NULL;
 
 	while ( tmp_list )
@@ -2327,7 +2327,7 @@ gulong gsb_file_save_report_part ( gulong iterator,
 	}
 
 	/* save the budget and sub-budget list */
-	tmp_list = gsb_data_report_get_budget_struct (report_number);
+	tmp_list = gsb_data_report_get_budget_struct_list (report_number);
 	budget_selected = NULL;
 
 	while ( tmp_list )
@@ -2372,7 +2372,7 @@ gulong gsb_file_save_report_part ( gulong iterator,
 	}
 
 	/* 	set the payee_selected */
-	tmp_list = gsb_data_report_get_payee_numbers (report_number);
+	tmp_list = gsb_data_report_get_payee_numbers_list (report_number);
 	payee_selected = NULL;
 
 	while ( tmp_list )
@@ -2422,7 +2422,10 @@ gulong gsb_file_save_report_part ( gulong iterator,
 					       "\t\tNb=\"%d\"\n"
 					       "\t\tName=\"%s\"\n"
 					       "\t\tGeneral_sort_type=\"%s\"\n"
+					       "\t\tShow_m=\"%d\"\n"
+					       "\t\tShow_p=\"%d\"\n"
 					       "\t\tShow_r=\"%d\"\n"
+					       "\t\tShow_t=\"%d\"\n"
 					       "\t\tShow_transaction=\"%d\"\n"
 					       "\t\tShow_transaction_amount=\"%d\"\n"
 					       "\t\tShow_transaction_nb=\"%d\"\n"
@@ -2452,6 +2455,7 @@ gulong gsb_file_save_report_part ( gulong iterator,
 					       "\t\tFinancial_year_kind=\"%d\"\n"
 					       "\t\tFinancial_year_select=\"%s\"\n"
 					       "\t\tDate_kind=\"%d\"\n"
+					       "\t\tDate_select_value=\"%d\"\n"
 					       "\t\tDate_beginning=\"%s\"\n"
 					       "\t\tDate_end=\"%s\"\n"
 					       "\t\tSplit_by_date=\"%d\"\n"
@@ -2499,7 +2503,10 @@ gulong gsb_file_save_report_part ( gulong iterator,
 	    report_number_to_write,
 	    my_safe_null_str(report_name),
 	    my_safe_null_str(general_sort_type),
+	    gsb_data_report_get_show_m (report_number),
+	    gsb_data_report_get_show_p (report_number),
 	    gsb_data_report_get_show_r (report_number),
+	    gsb_data_report_get_show_t (report_number),
 	    gsb_data_report_get_show_report_transactions (report_number),
 	    gsb_data_report_get_show_report_transaction_amount (report_number),
 	    gsb_data_report_get_show_report_transaction_number (report_number),
@@ -2529,6 +2536,7 @@ gulong gsb_file_save_report_part ( gulong iterator,
 	    gsb_data_report_get_financial_year_type (report_number),
 	    my_safe_null_str(financial_year_select),
 	    gsb_data_report_get_date_type (report_number),
+	    gsb_data_report_get_date_select_value (report_number),
 	    my_safe_null_str(date_start),
 	    my_safe_null_str(date_end),
 	    gsb_data_report_get_period_split (report_number),
diff --git a/src/gsb_form.h b/src/gsb_form.h
index f4d3bab..6ab8986 100644
--- a/src/gsb_form.h
+++ b/src/gsb_form.h
@@ -6,13 +6,6 @@
 /* START_INCLUDE_H */
 /* END_INCLUDE_H */
 
-enum direction_move {
-    GSB_LEFT = 0,
-    GSB_RIGHT,
-    GSB_UP,
-    GSB_DOWN
-};
-
 /** returned values want ask for the origin
  * must be < 0 because 0 and more are reserved for account numbers */
 enum origin_values {
diff --git a/src/import.c b/src/import.c
index 9e0c121..4256aeb 100644
--- a/src/import.c
+++ b/src/import.c
@@ -29,6 +29,7 @@
 #include "include.h"
 #include <glib/gstdio.h>
 #include <glib/gi18n.h>
+#include <goffice/goffice.h>
 
 /*START_INCLUDE*/
 #include "import.h"
@@ -37,7 +38,6 @@
 #include "import_csv.h"
 #include "dialog.h"
 #include "utils_file_selection.h"
-#include "go-charmap-sel.h"
 #include "gsb_account.h"
 #include "gsb_account_property.h"
 #include "gsb_assistant.h"
diff --git a/src/structures.h b/src/structures.h
index 26d8ee9..3caec00 100644
--- a/src/structures.h
+++ b/src/structures.h
@@ -282,6 +282,13 @@ enum bet_type_maj
     BET_MAJ_ALL,
 };
 
+/* définition du type de mouvement */
+enum direction_move {
+    GSB_LEFT = 0,
+    GSB_RIGHT,
+    GSB_UP,
+    GSB_DOWN
+};
 
 
 #endif
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 137d2df..3700fd7 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -1,5 +1,6 @@
 uidir = $(pkgdatadir)/ui
 
-ui_DATA = bet_graph.ui
+ui_DATA = etats_config.ui\
+    bet_graph.ui
 
 EXTRA_DIST = $(ui_DATA)
diff --git a/src/ui/etats_config.ui b/src/ui/etats_config.ui
new file mode 100644
index 0000000..aba5e1c
--- /dev/null
+++ b/src/ui/etats_config.ui
@@ -0,0 +1,4215 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="2.24"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkVBox" id="affichage_etat_devises">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkHBox" id="hbox_devise_general_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label34">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">General totals currency: </property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkHBox" id="hbox_devise_tiers_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkLabel" id="label35">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Payees currency: </property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkHBox" id="hbox_devise_categ_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkLabel" id="label36">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Categories currency: </property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">3</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkHBox" id="hbox_devise_ib_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkLabel" id="label37">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Budgetary lines currency: </property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">4</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkHBox" id="hbox_devise_montant_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkLabel" id="label38">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Amount comparison currency: </property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">5</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="affichage_etat_generalites">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkHBox" id="hbox17">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label25">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Report name: </property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="entree_nom_etat">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">●</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+            <property name="primary_icon_sensitive">True</property>
+            <property name="secondary_icon_sensitive">True</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="bouton_afficher_nb_opes">
+        <property name="label" translatable="yes">Display the number of transactions with the totals</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="bouton_inclure_dans_tiers">
+        <property name="label" translatable="yes">Consider the payees of this report as a multiple payee</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="affichage_etat_operations">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkCheckButton" id="bouton_afficher_opes">
+        <property name="label" translatable="yes">Display transactions</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_show_transactions">
+        <property name="visible">True</property>
+        <property name="sensitive">False</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkVBox" id="vbox_paddingbox12">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="title12">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="yalign">1</property>
+                <property name="label" translatable="yes">Include following information</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox22">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkLabel" id="label30">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">    </property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="paddingbox5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkTable" id="table1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="n_rows">5</property>
+                        <property name="n_columns">3</property>
+                        <property name="column_spacing">5</property>
+                        <property name="row_spacing">5</property>
+                        <property name="homogeneous">True</property>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_no_ope">
+                            <property name="label" translatable="yes">transaction number</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_date_opes">
+                            <property name="label" translatable="yes">date</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_value_date_opes">
+                            <property name="label" translatable="yes">value date</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_tiers_opes">
+                            <property name="label" translatable="yes">payee</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_categ_opes">
+                            <property name="label" translatable="yes">category</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_sous_categ_opes">
+                            <property name="label" translatable="yes">sub-category</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_ib_opes">
+                            <property name="label" translatable="yes">budgetary line</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_sous_ib_opes">
+                            <property name="label" translatable="yes">sub-budgetary line</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_notes_opes">
+                            <property name="label" translatable="yes">notes</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_type_ope">
+                            <property name="label" translatable="yes">method of payment</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_no_cheque">
+                            <property name="label" translatable="yes">cheque/transfer number</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_pc_opes">
+                            <property name="label" translatable="yes">voucher</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_exo_opes">
+                            <property name="label" translatable="yes">financial year</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">4</property>
+                            <property name="bottom_attach">5</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_infobd_opes">
+                            <property name="label" translatable="yes">bank reference</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">4</property>
+                            <property name="bottom_attach">5</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="bouton_afficher_no_rappr">
+                            <property name="label" translatable="yes">reconciliation reference</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">4</property>
+                            <property name="bottom_attach">5</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox_paddingbox13">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="title13">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="yalign">1</property>
+                <property name="label" translatable="yes">Columns</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox23">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkLabel" id="label31">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">    </property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="paddingbox6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkCheckButton" id="bouton_afficher_titres_colonnes">
+                        <property name="label" translatable="yes">Display column titles</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="bouton_titre_changement">
+                        <property name="label" translatable="yes">every section</property>
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="bouton_titre_en_haut">
+                        <property name="label" translatable="yes">at the top of the report</property>
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">bouton_titre_changement</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox_paddingbox14">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="title14">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="yalign">1</property>
+                <property name="label" translatable="yes">Sort transactions by</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox24">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkLabel" id="label32">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">    </property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="paddingbox7">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkComboBox" id="bouton_choix_classement_ope_etat">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="active">0</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="padding">3</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox_paddingbox15">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="title15">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="yalign">1</property>
+                <property name="label" translatable="yes">Clickable transactions</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox25">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkLabel" id="label33">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">    </property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="paddingbox8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkCheckButton" id="bouton_rendre_ope_clickables">
+                        <property name="label" translatable="yes">Make transactions clickable</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="affichage_etat_titles">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">18</property>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox8">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title8">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Accounts</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox18">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label26">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox_etat_titles1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_afficher_noms_comptes">
+                    <property name="label" translatable="yes">Display account name</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_affiche_sous_total_compte">
+                    <property name="label" translatable="yes">Display a sub-total for each account</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox9">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title9">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Payee</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox19">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label27">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_afficher_noms_tiers">
+                    <property name="label" translatable="yes">Display payee's name</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_affiche_sous_total_tiers">
+                    <property name="label" translatable="yes">Display a sub-total for each payee</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox10">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title10">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Categories</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox20">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label28">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_afficher_noms_categ">
+                    <property name="label" translatable="yes">Display the (sub)category's name</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_affiche_sous_total_categ">
+                    <property name="label" translatable="yes">Display a sub-total for each category</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_afficher_sous_categ">
+                    <property name="label" translatable="yes">Display sub-categories</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_affiche_sous_total_sous_categ">
+                    <property name="label" translatable="yes">Display a sub-total for each sub-category</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_afficher_pas_de_sous_categ">
+                    <property name="label" translatable="yes">Display «No sub-category» if none</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">3</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox11">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title11">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Budgetary lines</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox21">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label29">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_afficher_noms_ib">
+                    <property name="label" translatable="yes">Display the (sub-)budget line name</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_affiche_sous_total_ib">
+                    <property name="label" translatable="yes">Display a sub-total for each budgetary line</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_afficher_sous_ib">
+                    <property name="label" translatable="yes">Display sub-budget lines</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_affiche_sous_total_sous_ib">
+                    <property name="label" translatable="yes">Display a sub-total for each sub-budget line</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_afficher_pas_de_sous_ib">
+                    <property name="label" translatable="yes">Display «No sub-budgetary line» if none</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">4</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkDialog" id="config_etats_dialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Report properties</property>
+    <property name="window_position">center</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button_Annuler">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button_OK">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHPaned" id="dialog_hpaned">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <child>
+              <object class="GtkAlignment" id="alignment4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="right_padding">5</property>
+                <child>
+                  <object class="GtkVBox" id="vbox10">
+                    <property name="width_request">220</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="sw_dialog">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">never</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" id="treeview_left_panel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="can_default">True</property>
+                            <property name="headers_visible">False</property>
+                            <property name="reorderable">True</property>
+                            <property name="enable_search">False</property>
+                            <property name="fixed_height_mode">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="left_padding">5</property>
+                <property name="right_padding">5</property>
+                <child>
+                  <object class="GtkNotebook" id="notebook_config_etat">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="show_tabs">False</property>
+                    <property name="tab_border">0</property>
+                    <property name="tab_hborder">0</property>
+                    <property name="tab_vborder">0</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="padding">10</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-1">button_Annuler</action-widget>
+      <action-widget response="-5">button_OK</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_categories">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="bouton_detaille_categ_etat">
+        <property name="label" translatable="yes">Detail categories</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_detaille_categ_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0.05000000074505806</property>
+            <property name="label" translatable="yes">Select categories to include: </property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox7">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkScrolledWindow" id="sw_categ">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview_categ">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox7">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton_select_all_categ">
+                    <property name="label" translatable="yes">Select all</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="button_income_categ">
+                    <property name="label" translatable="yes">Income categories</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="xalign">0.05000000074505806</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="button_outgoing_categ">
+                    <property name="label" translatable="yes">Outgoing categories</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="xalign">0.05000000074505806</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton_expand_categ">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                    <property name="draw_indicator">True</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox9">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox_toggle_expand_categ">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkArrow" id="arrow1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="arrow_type">down</property>
+                                    <property name="shadow_type">in</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label6">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Expand all</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox_toggle_collapse_categ">
+                                <property name="can_focus">False</property>
+                                <property name="no_show_all">True</property>
+                                <child>
+                                  <object class="GtkArrow" id="arrow2">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="arrow_type">up</property>
+                                    <property name="shadow_type">in</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label7">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Collapse all</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_comptes">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkCheckButton" id="bouton_detaille_comptes_etat">
+        <property name="label" translatable="yes">Select transactions only for given accounts</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_generale_comptes_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0.05000000074505806</property>
+            <property name="label" translatable="yes">Select the accounts included in the report: </property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkScrolledWindow" id="sw_comptes">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview_comptes">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">5</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton_select_all_comptes">
+                    <property name="label" translatable="yes">Select all</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="button_bank_comptes">
+                    <property name="label" translatable="yes">Select bank accounts</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="button_cash_comptes">
+                    <property name="label" translatable="yes">Select cash accounts</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="button_liabilities_comptes">
+                    <property name="label" translatable="yes">Select liabilities accounts</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="button_assets_comptes">
+                    <property name="label" translatable="yes">Select assets accounts</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_divers">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">18</property>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox6">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title6">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Selecting Transactions</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox15">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label23">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox_etat_divers1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkVBox" id="vbox_select_transactions_buttons">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton_marked_all">
+                        <property name="label" translatable="yes">All transactions</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVBox" id="vbox6">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkRadioButton" id="radiobutton_marked">
+                            <property name="label" translatable="yes">Marked transactions</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton_marked_all</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAspectFrame" id="aspectframe1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label_xalign">0</property>
+                            <property name="shadow_type">none</property>
+                            <property name="xalign">0.070000000298023224</property>
+                            <child>
+                              <object class="GtkVBox" id="vbox_marked_buttons">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">5</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="checkbutton_marked_P">
+                                    <property name="label" translatable="yes">Pointing transactions</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="checkbutton_marked_T">
+                                    <property name="label" translatable="yes">Tele-transmitted transactions</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="checkbutton_marked_R">
+                                    <property name="label" translatable="yes">Reconciled transactions</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">5</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="radiobutton_marked_No_R">
+                        <property name="label" translatable="yes">Unreconciled transactions</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radiobutton_marked_all</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox7">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title7">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Split of transactions detail</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox16">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label24">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox_etat_divers2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_pas_detailler_ventilation">
+                    <property name="label" translatable="yes">Do not detail split of transactions</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_ib">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkCheckButton" id="bouton_detaille_budget_etat">
+        <property name="label" translatable="yes">Detail budgetary lines</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_detaille_budget_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label8">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0.05000000074505806</property>
+            <property name="label" translatable="yes">Select the budgetary lines to include in the report: </property>
+            <property name="wrap">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox_detaille_budget_etat">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkScrolledWindow" id="sw_budget">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview_budget">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox12">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton_select_all_budget">
+                    <property name="label" translatable="yes">Select all</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="button_income_budget">
+                    <property name="label" translatable="yes">Income budget lines</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="button_outgoing_budget">
+                    <property name="label" translatable="yes">Outgoing budget lines</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton_expand_budget">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0.05000000074505806</property>
+                    <property name="draw_indicator">True</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox13">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox_toggle_expand_budget">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkArrow" id="arrow3">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="arrow_type">down</property>
+                                    <property name="shadow_type">in</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label9">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Expand all</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox_toggle_collapse_budget">
+                                <property name="can_focus">False</property>
+                                <property name="no_show_all">True</property>
+                                <child>
+                                  <object class="GtkArrow" id="arrow4">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="arrow_type">up</property>
+                                    <property name="shadow_type">in</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label10">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Collapse all</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_mode_paiement">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkCheckButton" id="bouton_detaille_mode_paiement_etat">
+        <property name="label" translatable="yes">Select transactions only for given accounts</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_mode_paiement_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label13">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0.05000000074505806</property>
+            <property name="label" translatable="yes">Select methods of payment to include: </property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkScrolledWindow" id="sw_mode_paiement">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview_mode_paiement">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox14">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton_select_all_mode_paiement">
+                    <property name="label" translatable="yes">Select all</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_montant">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkCheckButton" id="bouton_utilise_montant">
+        <property name="label" translatable="yes">Select the transactions by amount</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_generale_montants_etat">
+        <property name="visible">True</property>
+        <property name="sensitive">False</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkScrolledWindow" id="sw_montant">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkViewport" id="viewport2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkVBox" id="liste_montants_etat">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="bouton_exclure_ope_nulles_etat">
+        <property name="label" translatable="yes">Exclude the transactions with a null amount</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_periode">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkHBox" id="hbox1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkRadioButton" id="radio_button_utilise_dates">
+                <property name="label" translatable="yes">Use dates ranges</property>
+                <property name="height_request">25</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame-dates">
+                <property name="width_request">285</property>
+                <property name="height_request">410</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkVBox" id="vbox_utilisation_date">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="sw_dates">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="window_placement_set">True</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" id="treeview_dates">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="headers_visible">False</property>
+                            <property name="headers_clickable">False</property>
+                            <property name="enable_search">False</property>
+                            <property name="fixed_height_mode">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="padding">5</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHSeparator" id="hseparator1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="padding">5</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label11">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Selection of transactions by:</property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox_select_dates">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <object class="GtkRadioButton" id="button_sel_date">
+                            <property name="label" translatable="yes">Date</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="button_sel_value_date">
+                            <property name="label" translatable="yes">Value date</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">button_sel_date</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox_date_init">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <object class="GtkLabel" id="label1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Initial date: </property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox_date_finale">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">5</property>
+                        <child>
+                          <object class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Final date: </property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">5</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+                <child type="label_item">
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVSeparator" id="vseparator1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkRadioButton" id="radio_button_utilise_exo">
+                <property name="label" translatable="yes">Use financial years</property>
+                <property name="height_request">25</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radio_button_utilise_dates</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame_exer">
+                <property name="width_request">240</property>
+                <property name="height_request">410</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkVBox" id="vbox_utilisation_exo">
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkRadioButton" id="bouton_exo_tous">
+                        <property name="label" translatable="yes">All financial years</property>
+                        <property name="height_request">0</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="bouton_exo_courant">
+                        <property name="label" translatable="yes">Current financial year</property>
+                        <property name="height_request">0</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">bouton_exo_tous</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="bouton_exo_precedent">
+                        <property name="label" translatable="yes">Former financial year</property>
+                        <property name="height_request">0</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">bouton_exo_tous</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="bouton_detaille_exo_etat">
+                        <property name="label" translatable="yes">Detail financial years</property>
+                        <property name="height_request">25</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">bouton_exo_tous</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="sw_exer">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" id="treeview_exer">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="padding">5</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+                <child type="label_item">
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">5</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="padding">5</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="padding">10</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_texte">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkCheckButton" id="bouton_utilise_texte">
+        <property name="label" translatable="yes">Select transactions according to content</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_generale_textes_etat">
+        <property name="visible">True</property>
+        <property name="sensitive">False</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkScrolledWindow" id="sw_texte">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkViewport" id="viewport1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkVBox" id="liste_textes_etat">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_tiers">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkCheckButton" id="bouton_detaille_tiers_etat">
+        <property name="label" translatable="yes">Detail payees</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_detaille_tiers_etat">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0.05000000074505806</property>
+            <property name="label" translatable="yes">Select payees to include in this report: </property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox6">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkScrolledWindow" id="sw_tiers">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview_tiers">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="padding">5</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkToggleButton" id="togglebutton_select_all_tiers">
+                    <property name="label" translatable="yes">Select all</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="relief">none</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkLabel" id="label14">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0.05000000074505806</property>
+                        <property name="label" translatable="yes">Navigation</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="padding">5</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHBox" id="hbox9">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="homogeneous">True</property>
+                        <child>
+                          <object class="GtkButton" id="button_tiers_premier">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="tooltip_text" translatable="yes">First item</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="relief">none</property>
+                            <child>
+                              <object class="GtkImage" id="image_tiers_premier">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="stock">gtk-goto-top</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_tiers_precedent">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="tooltip_text" translatable="yes">Prévious</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="relief">none</property>
+                            <child>
+                              <object class="GtkImage" id="image_tiers_precedent">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="stock">gtk-go-up</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">10</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_tiers_suivant">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="tooltip_text" translatable="yes">Following</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="relief">none</property>
+                            <property name="image_position">right</property>
+                            <child>
+                              <object class="GtkImage" id="image_tiers_suivant">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="stock">gtk-go-down</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">10</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_tiers_dernier">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="tooltip_text" translatable="yes">Last item</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="relief">none</property>
+                            <child>
+                              <object class="GtkImage" id="image_tiers_dernier">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="stock">gtk-goto-bottom</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">10</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">10</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkVBox" id="vbox11">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip_text" translatable="yes"><Ctrl> + left click of mouse to add to the selection</property>
+                        <property name="xalign">0.05000000074505806</property>
+                        <property name="label" translatable="yes">Search</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="search_entry_tiers">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">●</property>
+                        <property name="invisible_char_set">True</property>
+                        <property name="secondary_icon_stock">gtk-find</property>
+                        <property name="primary_icon_activatable">True</property>
+                        <property name="secondary_icon_activatable">True</property>
+                        <property name="primary_icon_sensitive">True</property>
+                        <property name="secondary_icon_sensitive">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">10</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label_tiers_search_help">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0.05000000074505806</property>
+                        <property name="label" translatable="yes"><Ctrl> + left click of mouse
+to add at the selection</property>
+                        <property name="wrap">True</property>
+                        <attributes>
+                          <attribute name="foreground" value="#2def22609c95"/>
+                        </attributes>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="onglet_etat_virements">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">5</property>
+    <child>
+      <object class="GtkRadioButton" id="bouton_non_inclusion_virements">
+        <property name="label" translatable="yes">Do not include transfers</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkRadioButton" id="bouton_inclusion_virements_actifs_etat">
+        <property name="label" translatable="yes">Include transfers from or to assets or liabilities accounts</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+        <property name="group">bouton_non_inclusion_virements</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkRadioButton" id="bouton_inclusion_virements_hors_etat">
+        <property name="label" translatable="yes">Include transfers from or to accounts not in this report</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+        <property name="group">bouton_non_inclusion_virements</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkRadioButton" id="bouton_inclusion_virements_perso">
+        <property name="label" translatable="yes">Include transfers from or to these accounts</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+        <property name="group">bouton_non_inclusion_virements</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">3</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkHBox" id="hbox_liste_comptes_virements">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <property name="homogeneous">True</property>
+        <child>
+          <object class="GtkScrolledWindow" id="sw_virements">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="window_placement_set">True</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkTreeView" id="treeview_virements">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="padding">5</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton_select_all_virements">
+                <property name="label" translatable="yes">Select all</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="relief">none</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">10</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="button_bank_virements">
+                <property name="label" translatable="yes">Select bank accounts</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="relief">none</property>
+                <property name="xalign">0.05000000074505806</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">10</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="button_cash_virements">
+                <property name="label" translatable="yes">Select cash accounts</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="relief">none</property>
+                <property name="xalign">0.05000000074505806</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">10</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="button_liabilities_virements">
+                <property name="label" translatable="yes">Select liabilities accounts</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="relief">none</property>
+                <property name="xalign">0.05000000074505806</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">10</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="button_assets_virements">
+                <property name="label" translatable="yes">Select assets accounts</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="relief">none</property>
+                <property name="xalign">0.05000000074505806</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">10</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="padding">10</property>
+        <property name="position">4</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="bouton_exclure_non_virements_etat">
+        <property name="label" translatable="yes">Exclude the transactions which are not transfers</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_action_appearance">False</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">5</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="page_data_grouping">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">18</property>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox4">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Group transactions</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox13">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label21">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox_data_grouping1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_regroupe_ope_compte_etat">
+                    <property name="label" translatable="yes">Group transactions by account</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_utilise_tiers_etat">
+                    <property name="label" translatable="yes">Group transactions by payee</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_group_by_categ">
+                    <property name="label" translatable="yes">Group transactions by category</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_utilise_ib_etat">
+                    <property name="label" translatable="yes">Group transactions by budgetary line</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox5">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Group level organisation</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox14">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label22">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox_data_grouping2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkHBox" id="hbox_data_grouping">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="sw_data_grouping">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" id="treeview_data_grouping">
+                            <property name="width_request">300</property>
+                            <property name="height_request">150</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="headers_visible">False</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVBox" id="vbox15">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="homogeneous">True</property>
+                        <child>
+                          <object class="GtkButton" id="button_data_grouping_up">
+                            <property name="label">gtk-go-up</property>
+                            <property name="width_request">100</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="relief">none</property>
+                            <property name="use_stock">True</property>
+                            <property name="xalign">0</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_data_grouping_down">
+                            <property name="label">gtk-go-down</property>
+                            <property name="width_request">100</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="relief">none</property>
+                            <property name="use_stock">True</property>
+                            <property name="xalign">0</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id="page_data_separation">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">18</property>
+    <child>
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Data separation</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox11">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label19">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox_data_separation1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_separer_revenus_depenses">
+                    <property name="label" translatable="yes">Split incomes and outgoings</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_separe_exo_etat">
+                    <property name="label" translatable="yes">Split by financial year</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="bouton_separe_plages_etat">
+                    <property name="label" translatable="yes">Split by period</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox_paddingbox3">
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="title3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">1</property>
+            <property name="label" translatable="yes">Separation by period</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox12">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label20">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">    </property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="paddingbox_data_separation2">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkHBox" id="hbox3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <object class="GtkLabel" id="label15">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0.05000000074505806</property>
+                        <property name="label" translatable="yes">Separation by time period: </property>
+                        <property name="track_visited_links">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="bouton_type_separe_plages_etat">
+                        <property name="width_request">100</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="active">0</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <object class="GtkLabel" id="label16">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0.05000000074505806</property>
+                        <property name="label" translatable="yes">Beginning of week: </property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="bouton_debut_semaine">
+                        <property name="width_request">100</property>
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">False</property>
+                        <property name="active">0</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkVBox" id ion">2</property>   >               y>    ine">   week: </property>  perty>  ty>  perty>  >  selection</property>   he report/3:perso */  9=bank ref, 10=marked number */  -c+  ã\ÿ  €Oc+           Ø\ÿ         ÐÖ\ÿ  k€c+  6                    è     è!     è!      â\ÿ  ã\ÿ  x4-c+           Ù\ÿ          ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ         À/‘c+  ujc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          x4-c+           Ù\ÿ          Ð×\ÿ  k€c+  à!     à!      â\ÿ  ã\ÿ  Hþc+          àÙ\ÿ         ’bc+          †€c+   â\ÿ  `bc+  ßâ\ÿ  Ðâ\ÿ  Èâ\ÿ  8‹1c+  Œp˜        ã\ÿ  ujc+  €Šc+                  àÙ\ÿ         °Ø\ÿ  k€c+          G       H   I       J   K           M   N   O       P    â\ÿ  ã\ÿ  Hµãc+          €Û\ÿ         ’bc+          †€c+   â\ÿ         0/‘c+  ujc+   @-c+   éÀc+    ‘c+  Ø$‘c+  ¨)‘c+  €Šc+          Hµãc+          €Û\ÿ 
         ÀÙ\ÿ  k€c+  8µãc+          €Û\ÿ         ðÙ\ÿ  k€c+  (µãc+          €Û\ÿ          Ú\ÿ  k€c+  µãc+          €Û\ÿ         PÚ\ÿ  k€c+  	       ¨.‘c+  ujc+         ¨)‘c+  ÐÔ\ÿ          Š8Ác+  eic+         Ø$‘c+  ðÚ\ÿ          y8Ác+  eic+           ‘c+   Û\ÿ          Z8Ác+  eic+  ØäÀc+   @-c+   éÀc+    ‘c+  ØD-c+  Ø$‘c+  ¨)‘c+  €Šc+          8‹1c+                        ­Œc+  ã\ÿ  p{Àc+          ÐÜ\ÿ           Û\ÿ  k€c+      5   6   7   8   :   <   =   >       ?       @   B   D        â\ÿ  ã\ÿ  ୉c+                 ã\ÿ  ujc+         …1c+  PÛ\ÿ          ­Œc+  eic+  …1c+          Õ_ at fÆS         Qöl±íÁÃXc+  ã\ÿ  ୉c+          àÝ\ÿ         °Ü\ÿ  k€c+  u]ÞÓ	4Q ÷U^Qʉ§ ¶uª¹ñìò*ēv â\ÿ  ã\ÿ  HþUc+          D’c+          Pä\ÿ  ¦Pôc+  ¦Pôc+         –c+  ßâ\ÿ  ä\ÿ  Èâ\ÿ  0ß\ÿ  O-c+  ujc+  ØD-c+  å\ÿ  ¢Pôc+  `ä\ÿ          ðß\
 ÿ                 ÿÿÿÿÿÿÿÿ¢Pôc+          ã\ÿ                 ="vbox_paddingbox1">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="spacing">6</property>
+    <child>
+      <object class="GtkLabel" id="title1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="yalign">1</property>
+        <property name="label" translatable="yes">titre</property>
+        <attributes>
+          <attribute name="weight" value="bold"/>
+        </attributes>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkHBox" id="hbox10">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkLabel" id="label17">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">    </property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="paddingbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup_affichage_devises">
+    <widgets>
+      <widget name="label34"/>
+      <widget name="label35"/>
+      <widget name="label36"/>
+      <widget name="label37"/>
+      <widget name="label38"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup_data_separation">
+    <widgets>
+      <widget name="label15"/>
+      <widget name="label16"/>
+    </widgets>
+  </object>
+</interface>
diff --git a/src/utils.c b/src/utils.c
index 11456a5..c48ce96 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -31,13 +31,14 @@
 #include <glib/gi18n.h>
 
 /*START_INCLUDE*/
- #include "dialog.h"
+#include "utils.h"
+#include "dialog.h"
 #include "gsb_color.h"
 #include "gsb_data_account.h"
+#include "gsb_dirs.h"
 #include "gsb_file_config.h"
 #include "structures.h"
 #include "erreur.h"
-#include "gsb_dirs.h"
 /*END_INCLUDE*/
 
 #ifdef GTKOSXAPPLICATION
@@ -514,12 +515,9 @@ gchar *get_gtk_run_version ( void )
  * */
 void lance_mailer ( const gchar *uri )
 {
-    gchar *chaine;
     GError *error = NULL;
 
-    chaine = g_strconcat ( "mailto:", uri, NULL );
-
-    if ( gtk_show_uri ( NULL, chaine, GDK_CURRENT_TIME, &error ) == FALSE )
+    if ( gtk_show_uri ( NULL, uri, GDK_CURRENT_TIME, &error ) == FALSE )
     {
         gchar *tmp_str;
 
@@ -530,7 +528,6 @@ void lance_mailer ( const gchar *uri )
         dialogue_error_hint ( tmp_str, _("Cannot execute mailer") );
         g_free(tmp_str);
     }
-    g_free ( chaine );
 }
 
 
@@ -629,6 +626,144 @@ gboolean utils_set_tree_view_background_color ( GtkWidget *tree_view, gint color
 }
 
 
+/**
+ *  expand all the tree_view and select le path when the widget is realized
+ *
+ *
+ *
+ * */
+void utils_tree_view_set_expand_all_and_select_path_realize ( GtkWidget *tree_view,
+                        const gchar *str_path )
+{
+    GtkTreePath *path;
+
+    gtk_tree_view_expand_all ( GTK_TREE_VIEW ( tree_view ) );
+
+    /* selection du premier item sélectionnable */
+    path = gtk_tree_path_new_from_string ( str_path );
+
+    gtk_tree_selection_select_path ( GTK_TREE_SELECTION (
+                        gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ) ),
+                        path );
+
+    gtk_tree_path_free (path);
+
+}
+
+
+/**
+ * Cette fonction retourne TRUE si tous les items sont sélectionnés
+ *
+ * \param le tree_view considéré
+ *
+ * \return TRUE si tous sélectionnés FALSE autrement.
+ */
+gboolean utils_tree_view_all_rows_are_selected ( GtkTreeView *tree_view )
+{
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    GtkTreeSelection *selection;
+    GList *rows_list;
+    gint index;
+
+    model = gtk_tree_view_get_model ( tree_view );
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+    rows_list = gtk_tree_selection_get_selected_rows ( selection, &model );
+    index = g_list_length ( rows_list );
+
+    if ( gtk_tree_model_get_iter_first ( model, &iter ) )
+    {
+        do
+        {
+            index--;
+            if ( index < 0 )
+                break;
+        }
+        while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );    }
+
+    g_list_foreach ( rows_list, ( GFunc ) gtk_tree_path_free, NULL );
+    g_list_free ( rows_list );
+
+    if ( index == 0 )
+        return TRUE;
+    else
+        return FALSE;
+}
+
+
+/**
+ * Cette fonction retourne un GtkListStore à partir d'un tableau de chaine
+ *
+ * \param le tableau de chaines à mettre dans le modèle
+ *
+ * \return un GtkListStore.
+ */
+GtkListStore *utils_list_store_create_from_string_array ( gchar **array )
+{
+    GtkListStore *store = NULL;
+    gint i = 0;
+
+    store = gtk_list_store_new ( 2, G_TYPE_STRING, G_TYPE_INT );
+
+    while ( array[i] )
+    {
+        GtkTreeIter iter;
+        gchar *string = gettext ( array[i] );
+
+        gtk_list_store_append ( store, &iter );
+        gtk_list_store_set ( store, &iter, 0, string, 1, i, -1 );
+    
+        i++;
+    }
+
+    /* return */
+    return store;
+}
+
+
+/**
+ * Cette fonction crée la colonne visible d'un GtkComboBox
+ *
+ * \param le combo à initialiser
+ * \param le numéro de la colonne texte
+ *
+ * \return
+ */
+void utils_gtk_combo_box_set_text_renderer ( GtkComboBox *combo,
+                        gint num_col )
+{
+    GtkCellRenderer *renderer;
+
+    renderer = gtk_cell_renderer_text_new ( );
+    gtk_cell_layout_pack_start ( GTK_CELL_LAYOUT ( combo ), renderer, TRUE );
+    gtk_cell_layout_set_attributes ( GTK_CELL_LAYOUT ( combo ), renderer,
+                                    "text", num_col,
+                                    NULL );
+}
+
+
+/**
+ * revoie un combo_box avec une GtkListStore et la colonne 0 en texte
+ * \param le tableau de chaines à mettre dans le modèle
+ *
+ * \return un GtkComboBox.
+ */
+GtkWidget *utils_combo_box_make_from_string_array ( gchar **array )
+{
+    GtkWidget *combo;
+    GtkTreeModel *model;
+
+    combo = gtk_combo_box_new ( );
+
+    model = GTK_TREE_MODEL ( utils_list_store_create_from_string_array ( array ) );
+    gtk_combo_box_set_model ( GTK_COMBO_BOX ( combo ), model );
+    utils_gtk_combo_box_set_text_renderer ( GTK_COMBO_BOX ( combo ), 0 );
+    gtk_combo_box_set_active ( GTK_COMBO_BOX ( combo ), 0 );
+
+    return combo;
+}
+
+
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/utils.h b/src/utils.h
index 954b024..ef540e2 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -9,6 +9,7 @@
 
 /* START_DECLARATION */
 gboolean assert_account_loaded ();
+GtkWidget *utils_combo_box_make_from_string_array ( gchar **array );
 gboolean desensitive_widget ( gpointer object,
                         GtkWidget *widget );
 gchar *get_gtk_run_version ( void );
@@ -33,8 +34,14 @@ gboolean sens_desensitive_pointeur ( GtkWidget *bouton,
 gboolean sensitive_widget ( gpointer object,
                         GtkWidget *widget );
 void update_gui ( void );
+void utils_gtk_combo_box_set_text_renderer ( GtkComboBox *combo,
+                        gint num_col );
+GtkListStore *utils_list_store_create_from_string_array ( gchar **array );
+gboolean utils_tree_view_all_rows_are_selected ( GtkTreeView *tree_view );
 void utils_set_tree_view_selection_and_text_color ( GtkWidget *tree_view );
 gboolean utils_set_tree_view_background_color ( GtkWidget *tree_view,
                         gint color_column );
+void utils_tree_view_set_expand_all_and_select_path_realize ( GtkWidget *tree_view,
+                        const gchar *str_path );
 /* END_DECLARATION */
 #endif
diff --git a/src/utils_buttons.c b/src/utils_buttons.c
index b6faa78..709572b 100644
--- a/src/utils_buttons.c
+++ b/src/utils_buttons.c
@@ -1,9 +1,8 @@
 /* ************************************************************************** */
-/*                                  utils_buttons.c			                  */
 /*                                                                            */
-/*     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      */
@@ -26,13 +25,15 @@
 #endif
 
 #include "include.h"
+#include <glib/gi18n.h>
 
 /*START_INCLUDE*/
 #include "utils_buttons.h"
 #include "gsb_automem.h"
+#include "gsb_dirs.h"
 #include "structures.h"
 #include "utils.h"
-#include "gsb_dirs.h"
+#include "utils_str.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -188,14 +189,141 @@ void set_popup_position (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpo
  * \return FALSE
  * */
 gboolean gsb_button_sensitive_by_checkbutton ( GtkWidget *check_button,
-					       GtkWidget *widget )
+                        GtkWidget *widget )
 {
     gtk_widget_set_sensitive ( widget,
-			       gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_button)));
+                        gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( check_button ) ) );
     return FALSE;
 }
 
 
+/**
+ * Cette fonction réduit ou développe toutes les lignes du tree_view.
+ * Le libellé du bouton est modifié en conséquence.
+ *
+ * \param le button de commande
+ * \param le tree_view considéré
+ *
+ * \return
+ */
+void utils_togglebutton_collapse_expand_all_rows ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view )
+{
+    GtkWidget *hbox_expand;
+    GtkWidget *hbox_collapse;
+
+    hbox_expand = g_object_get_data ( G_OBJECT ( togglebutton ), "hbox_expand" );
+    hbox_collapse = g_object_get_data ( G_OBJECT ( togglebutton ), "hbox_collapse" );
+
+    if ( gtk_toggle_button_get_active ( togglebutton ) )
+    {
+        gtk_widget_hide ( hbox_expand );
+        gtk_widget_show ( hbox_collapse );
+        gtk_tree_view_expand_all ( GTK_TREE_VIEW ( tree_view ) );
+    }
+    else
+    {
+        gtk_widget_show ( hbox_expand );
+        gtk_widget_hide ( hbox_collapse );
+        gtk_tree_view_collapse_all ( GTK_TREE_VIEW ( tree_view ) );
+    }
+}
+
+
+/**
+ * Cette fonction (dé)sélectionne toutes les lignes du tree_view.
+ * Le libellé du bouton est modifié en conséquence.
+ *
+ * \param le button de commande
+ * \param le tree_view considéré
+ *
+ * \return
+ */
+void utils_togglebutton_select_unselect_all_rows ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view )
+{
+    gchar *label;
+
+    if ( gtk_toggle_button_get_active ( togglebutton ) )
+    {
+        gtk_tree_selection_select_all ( gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ) );
+        label = g_strdup ( _("Unselect all") );
+    }
+    else
+    {
+        gtk_tree_selection_unselect_all ( gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ) );
+        label = g_strdup ( _("Select all") );
+    }
+
+    gtk_button_set_label ( GTK_BUTTON ( togglebutton ), label );
+
+    g_free ( label );
+}
+
+
+/**
+ * Cette fonction remplace le libellé select par unselect et vice versa
+ * en fonction de l'état du bouton.
+ *
+ * \param le button de commande
+ *
+ * \return
+ */
+void utils_togglebutton_change_label_select_unselect ( GtkToggleButton *togglebutton,
+                        gint toggle )
+{
+    gchar *label;
+    const gchar *string;
+
+    string = gtk_button_get_label ( GTK_BUTTON ( togglebutton ) );
+
+    if ( ( toggle ) )
+        label = gsb_string_remplace_string ( string, _("Select"), _("Unselect") );
+    else
+        label = gsb_string_remplace_string ( string, _("Unselect"), _("Select") );
+
+    gtk_button_set_label ( GTK_BUTTON ( togglebutton ), label );
+    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( togglebutton ), toggle );
+
+    g_free ( label );
+}
+
+
+/**
+ * Cette fonction remplace le libellé select par unselect et positionne le bouton sur ON
+ *
+ * \param le button de commande
+ *
+ * \return
+ */
+void utils_togglebutton_set_label_position_unselect ( GtkWidget *togglebutton,
+                        GCallback callback,
+                        GtkWidget *tree_view )
+{
+    if ( callback == NULL )
+    {
+        g_signal_handlers_block_by_func ( G_OBJECT ( togglebutton ),
+                                utils_togglebutton_select_unselect_all_rows,
+                                tree_view );
+
+        utils_togglebutton_change_label_select_unselect ( GTK_TOGGLE_BUTTON ( togglebutton ), TRUE );
+        g_signal_handlers_unblock_by_func ( G_OBJECT ( togglebutton ),
+                                utils_togglebutton_select_unselect_all_rows,
+                                tree_view );
+    }
+    else
+    {
+        g_signal_handlers_block_by_func ( G_OBJECT ( togglebutton ),
+                                G_CALLBACK ( callback ),
+                                tree_view );
+
+        utils_togglebutton_change_label_select_unselect ( GTK_TOGGLE_BUTTON ( togglebutton ), TRUE );
+        g_signal_handlers_unblock_by_func ( G_OBJECT ( togglebutton ),
+                                G_CALLBACK ( callback ),
+                                tree_view );
+    }
+}
+
 
 /* Local Variables: */
 /* c-basic-offset: 4 */
diff --git a/src/utils_buttons.h b/src/utils_buttons.h
index 98b8285..c67b64d 100644
--- a/src/utils_buttons.h
+++ b/src/utils_buttons.h
@@ -17,10 +17,19 @@ typedef enum GSB_BUTTON_STYLE {
 
 /*START_DECLARATION*/
 gboolean gsb_button_sensitive_by_checkbutton ( GtkWidget *check_button,
-					       GtkWidget *widget );
+                        GtkWidget *widget );
 GtkWidget * new_image_label ( GsbButtonStyle style, const gchar * image_name, const gchar * name );
 GtkWidget * new_stock_image_label ( GsbButtonStyle style, const gchar * stock_id, const gchar * name );
 void set_popup_position (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data);
+void utils_togglebutton_collapse_expand_all_rows ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view );
+void utils_togglebutton_change_label_select_unselect ( GtkToggleButton *togglebutton,
+                        gint toggle );
+void utils_togglebutton_select_unselect_all_rows ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view );
+void utils_togglebutton_set_label_position_unselect ( GtkWidget *togglebutton,
+                        GCallback callback,
+                        GtkWidget *tree_view );
 /*END_DECLARATION*/
 
 #endif
diff --git a/src/utils_files.c b/src/utils_files.c
index fb142d6..66de5f5 100644
--- a/src/utils_files.c
+++ b/src/utils_files.c
@@ -29,11 +29,11 @@
 
 #include "include.h"
 #include <glib/gi18n.h>
+#include <goffice/goffice.h>
 
 /*START_INCLUDE*/
 #include "utils_files.h"
 #include "dialog.h"
-#include "go-charmap-sel.h"
 #include "gsb_dirs.h"
 #include "gsb_file.h"
 #include "gsb_file_config.h"
@@ -44,7 +44,6 @@
 /*END_INCLUDE*/
 
 /*START_STATIC*/
-static void browse_file ( GtkButton *button, gpointer data );
 static gboolean utils_files_charmap_active_toggled ( GtkCellRendererToggle *cell,
                         gchar *path_str,
                         gpointer model );
@@ -171,39 +170,6 @@ static gchar *all_charset_array[] = {
     NULL};
 
 
-/**
- * Handler triggered by clicking on the button of a "print to file"
- * combo.  Pop ups a file selector.
- *
- * \param button GtkButton widget that triggered this handler.
- * \param data A pointer to a GtkEntry that will be filled with the
- *             result of the file selector.
- */
-void browse_file ( GtkButton *button, gpointer data )
-{
-    GtkWidget * file_selector;
-
-    file_selector = file_selection_new (_("Print to file"),FILE_SELECTION_IS_SAVE_DIALOG);
-    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (file_selector),
-					 gsb_file_get_last_path ());
-    gtk_window_set_transient_for ( GTK_WINDOW ( file_selector ),
-				   GTK_WINDOW ( run.window ));
-    gtk_window_set_modal ( GTK_WINDOW ( file_selector ), TRUE );
-
-    switch ( gtk_dialog_run ( GTK_DIALOG (file_selector)))
-    {
-	case GTK_RESPONSE_OK:
-	    gtk_entry_set_text ( GTK_ENTRY(data),
-				 file_selection_get_filename (GTK_FILE_CHOOSER (file_selector)));
-	    gsb_file_update_last_path (file_selection_get_last_directory (GTK_FILE_CHOOSER (file_selector), TRUE));
-
-	default:
-	    gtk_widget_destroy ( file_selector );
-	    break;
-    }
-}
-
-
 /* get the line af the file,
  * convert it in UTF8 and fill string with that line
  *


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list