[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_5-235-g33d9dfb

Pierre Biava nobody at users.sourceforge.net
Sun Dec 30 18:29:29 CET 2012


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, master has been updated
       via  33d9dfb7313f588bc623041b42d52a8af433f173 (commit)
       via  628286363cef25d3393a46b3958af4a8fbb4f004 (commit)
       via  35cf62effb75dcffd05f64ef3c2dfeba501caa90 (commit)
       via  fef2943196bfe3f90742fb9609f552b78760d3c0 (commit)
       via  504a7cf57ba8efede3982439524faf156c69de31 (commit)
       via  c076e68bb40c82fc9de4219753a6c347d817191b (commit)
       via  479aed6688d272051a63c25c8ecb0d55cb49a446 (commit)
       via  9f415b1cadee9bb7f237b4e7df322e5286ca5cb4 (commit)
       via  9096ffc3d6cddc31c822f44a0b5364c062d8067e (commit)
       via  c270c4d94bd9f70e51f5a1561d826ddbbbfd17a8 (commit)
       via  2691e7f02f49c430514a7176bda0261bc7bf84c7 (commit)
      from  f3e800916f26efd9cbc6801edbb37d24e915ab45 (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 33d9dfb7313f588bc623041b42d52a8af433f173
Author: pbiava <pierre.biava at nerim.net>
Date:   Thu Dec 27 10:47:15 2012 +0100

    replaced "Name" by "Reconciliation reference" in reconcile files and update fr string

commit 628286363cef25d3393a46b3958af4a8fbb4f004
Author: pbiava <pierre.biava at nerim.net>
Date:   Thu Dec 27 09:51:50 2012 +0100

    fixed bug in the management of bet_future form

commit 35cf62effb75dcffd05f64ef3c2dfeba501caa90
Author: pbiava <pierre.biava at nerim.net>
Date:   Wed Dec 26 20:58:53 2012 +0100

    replaced "Accounts file title" by "Accounting entity"

commit fef2943196bfe3f90742fb9609f552b78760d3c0
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Dec 25 18:14:03 2012 +0100

    fixed bug in comparison of financial years

commit 504a7cf57ba8efede3982439524faf156c69de31
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Dec 25 20:16:47 2012 +0100

    Integration of new preferences for reports

commit c076e68bb40c82fc9de4219753a6c347d817191b
Author: pbiava <pierre.biava at nerim.net>
Date:   Fri Dec 21 17:34:27 2012 +0100

    Permanent integration of goffice

commit 479aed6688d272051a63c25c8ecb0d55cb49a446
Author: pbiava <pierre.biava at nerim.net>
Date:   Fri Dec 21 17:08:16 2012 +0100

    fixed bug to take into account the date of the first payment in the amortization tables.

commit 9f415b1cadee9bb7f237b4e7df322e5286ca5cb4
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Dec 18 18:52:43 2012 +0100

    removing compilation warnings

commit 9096ffc3d6cddc31c822f44a0b5364c062d8067e
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Dec 18 18:52:09 2012 +0100

    add etats_prefs widget

commit c270c4d94bd9f70e51f5a1561d826ddbbbfd17a8
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Dec 16 20:17:19 2012 +0100

    removing gdk deprecated symbols

commit 2691e7f02f49c430514a7176bda0261bc7bf84c7
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Dec 16 20:14:00 2012 +0100

    removing compilation warnings

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

Changes:
diff --git a/configure.in b/configure.in
index 92b6f8d..874043c 100644
--- a/configure.in
+++ b/configure.in
@@ -208,7 +208,7 @@ AC_ARG_ENABLE(werror,
  	enable_werror=no)
 if test "x$enable_werror" = xyes ; then
 	if test "x$GCC" = "xyes" ; then
-		CFLAGS="$CFLAGS -ansi -Wall -Wunused -Wno-unused-parameter -Wno-unused-function"
+		CFLAGS="$CFLAGS -ansi -Wall -Wunused -Wno-unused-parameter -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-result"
 		AC_MSG_WARN([Wall and Wunused flags are enabled])
 	else
 		AC_MSG_WARN([Wall and Wunused can be enabled only with gcc])
diff --git a/po/fr.po b/po/fr.po
index adab790..7f50007 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -5282,7 +5282,7 @@ msgid ""
 "\tYou can create all the previous needed reconciliations here."
 msgstr ""
 "\tIl peut exister des opérations datées d'avant le premier rapprochement "
-"connue.\n"
+"connu.\n"
 "\tVous allez pouvoir créer ici tous les rapprochements nécessaires."
 
 #: ../src/gsb_assistant_reconcile_config.c:314
diff --git a/src/Makefile.am b/src/Makefile.am
index 4a594af..3da6267 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,6 +35,7 @@ libgrisbi_la_SOURCES = \
 	etats_gtktable.c	\
 	etats_html.c		\
 	etats_onglet.c		\
+	etats_prefs.c	\
 	etats_support.c		\
 	export.c		\
 	export_csv.c		\
@@ -176,12 +177,24 @@ libgrisbi_la_SOURCES = \
 	classement_echeances.h	\
 	csv_parse.h             \
 	custom_list.h		\
+	dialog.h		\
 	erreur.h		\
+	etats.h			\
 	etats_affiche.h         \
+	etats_calculs.h		\
+	etats_config.h		\
 	etats_csv.h             \
+	etats_gtktable.h	\
 	etats_html.h            \
+	etats_onglet.h		\
+	etats_prefs.h	\
+	etats_prefs_private.h	\
+	etats_support.h		\
 	export.h                \
 	export_csv.h            \
+	fenetre_principale.h	\
+	file_obfuscate.h	\
+	file_obfuscate_qif.h	\
 	grisbi_osx.h \
 	gsb_account.h		\
 	gsb_account_property.h	\
@@ -258,16 +271,6 @@ libgrisbi_la_SOURCES = \
 	gsb_scheduler_list.h	\
 	gsb_transactions_list.h	\
 	gsb_transactions_list_sort.h	\
-	dialog.h		\
-	etats_calculs.h		\
-	etats_config.h		\
-	etats_gtktable.h	\
-	etats.h			\
-	etats_onglet.h		\
-	etats_support.h		\
-	fenetre_principale.h	\
-	file_obfuscate.h	\
-	file_obfuscate_qif.h	\
 	gtk_combofix.h		\
 	help.h			\
 	import.h		\
diff --git a/src/affichage.c b/src/affichage.c
index f596bb3..75c3554 100644
--- a/src/affichage.c
+++ b/src/affichage.c
@@ -374,7 +374,7 @@ GtkWidget *onglet_display_addresses ( void )
     hbox = gtk_hbox_new ( FALSE, 6 );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0);
 
-    radiogroup = gtk_radio_button_new_with_label ( NULL, _("Accounts file title") );
+    radiogroup = gtk_radio_button_new_with_label ( NULL, _("Accounting entity") );
     g_object_set_data ( G_OBJECT ( radiogroup ), "display", GINT_TO_POINTER ( GSB_ACCOUNTS_TITLE ) );
     if ( conf.display_grisbi_title == GSB_ACCOUNTS_TITLE )
         gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( radiogroup ), TRUE );
@@ -412,7 +412,7 @@ GtkWidget *onglet_display_addresses ( void )
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox,
 			 FALSE, FALSE, 0);
 
-    label = gtk_label_new ( _("Accounts file title: ") );
+    label = gtk_label_new ( _("Name of accounting entity: ") );
     gtk_box_pack_start ( GTK_BOX ( hbox ), label,
 			 FALSE, FALSE, 0);
 
diff --git a/src/bet_config.c b/src/bet_config.c
index ce83d80..553250d 100644
--- a/src/bet_config.c
+++ b/src/bet_config.c
@@ -1484,13 +1484,19 @@ void bet_config_initialise_finance_widget ( gint account_number,
  * */
 void bet_config_finance_apply_clicked ( GtkButton *button, GtkWidget *parent )
 {
-    GtkWidget *bouton;
+    GtkWidget *bouton, *widget;
     gdouble number;
     gint type_taux;
     gint account_number;
+    GDate *start_date;
 
     account_number = bet_config_get_account_from_combo ( );
 
+    /* start date */
+    widget = g_object_get_data ( G_OBJECT ( parent ), "bet_config_start_date" );
+    start_date = gsb_calendar_entry_get_date( widget );
+    gsb_data_account_set_bet_start_date( account_number, start_date );
+
     /* capital */
     number = bet_finance_get_number_from_string ( parent, "bet_config_capital" );
     gsb_data_account_set_bet_finance_capital ( account_number, number );
diff --git a/src/bet_future.c b/src/bet_future.c
index dbb3611..42f8f98 100644
--- a/src/bet_future.c
+++ b/src/bet_future.c
@@ -2,7 +2,7 @@
 /*                                                                            */
 /*     Copyright (C) 2007 Dominique Parisot                                   */
 /*          zionly at free.org                                                   */
-/*          2008-2011 Pierre Biava (grisbi at pierre.biava.name)                 */
+/*          2008-2012 Pierre Biava (grisbi at pierre.biava.name)                 */
 /*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
@@ -100,8 +100,10 @@ static gboolean bet_transfert_selection_changed ( GtkTreeSelection *selection, G
 /*START_EXTERN*/
 /*END_EXTERN*/
 
-#define BET_SCHEDULED_WIDTH 4
-#define BET_SCHEDULED_HEIGHT 2
+/* dimmension du formulaire de données futures */
+#define BET_FUTURE_FORM_WIDTH 4
+#define BET_FUTURE_FORM_HEIGHT 5
+
 static gint width = 250;
 
 
@@ -116,6 +118,18 @@ static GSList *bet_form_list_widgets = NULL;
 static GtkWidget *bet_futur_dialog = NULL;
 static GtkWidget *bet_transfert_dialog = NULL;
 
+/* organisation du formulaire */
+struct BetFormOrganization
+{
+    /* 4 columns */
+    gint columns;
+    /* 5 rows */
+    gint rows;
+    gint form_table[BET_FUTURE_FORM_HEIGHT][BET_FUTURE_FORM_WIDTH];
+};
+
+static struct BetFormOrganization *bfo;
+
 /**
  *
  *
@@ -124,6 +138,16 @@ static GtkWidget *bet_transfert_dialog = NULL;
  * */
 void bet_future_initialise_dialog ( void )
  {
+    gint tab[BET_FUTURE_FORM_HEIGHT][BET_FUTURE_FORM_WIDTH] = {
+        { SCHEDULED_FORM_FREQUENCY_BUTTON, SCHEDULED_FORM_LIMIT_DATE, SCHEDULED_FORM_FREQUENCY_USER_ENTRY,
+          SCHEDULED_FORM_FREQUENCY_USER_BUTTON },
+        { TRANSACTION_FORM_DATE, TRANSACTION_FORM_PARTY, TRANSACTION_FORM_DEBIT, TRANSACTION_FORM_CREDIT },
+        { TRANSACTION_FORM_EXERCICE, TRANSACTION_FORM_CATEGORY, TRANSACTION_FORM_TYPE, 0 },
+        { 0, TRANSACTION_FORM_BUDGET, 0, 0 },
+        { TRANSACTION_FORM_NOTES, 0, 0, 0 }
+    };
+    gint i, j;
+
     if ( bet_futur_dialog != NULL )
     {
         gtk_widget_destroy ( bet_futur_dialog );
@@ -135,6 +159,21 @@ void bet_future_initialise_dialog ( void )
         gtk_widget_destroy ( bet_transfert_dialog );
         bet_transfert_dialog = NULL;
     }
+
+    bfo = g_malloc0 ( sizeof ( struct BetFormOrganization ) );
+
+    if ( !bfo )
+    {
+        dialogue_error_memory ();
+        return;
+    }
+
+    bfo->columns = BET_FUTURE_FORM_WIDTH;
+    bfo->rows = BET_FUTURE_FORM_HEIGHT;
+
+    for ( i = 0 ; i<BET_FUTURE_FORM_HEIGHT ; i++ )
+    for ( j = 0 ; j<BET_FUTURE_FORM_WIDTH ; j++ )
+        bfo->form_table[i][j] = tab[i][j];
  }
 
 
@@ -260,7 +299,7 @@ GtkWidget *bet_future_create_dialog ( gint account_number )
 	gtk_container_set_border_width ( GTK_CONTAINER ( vbox ), 12 );
 
     /* next we fill the bet_form */
-    table = gtk_table_new ( BET_SCHEDULED_HEIGHT, BET_SCHEDULED_WIDTH, FALSE );
+    table = gtk_table_new ( BET_FUTURE_FORM_HEIGHT, BET_FUTURE_FORM_WIDTH, FALSE );
     gtk_table_set_col_spacings ( GTK_TABLE ( table ), 6 );
     gtk_widget_show ( table );
     gtk_box_pack_start ( GTK_BOX ( vbox ), table, FALSE, FALSE, 5 );
@@ -303,6 +342,7 @@ gboolean bet_form_create_scheduler_part ( GtkWidget *dialog, GtkWidget *table )
 	    gchar *text_frequency_user [] = { _("Days"), _("Weeks"), _("Months"), _("Years"), NULL };
         gint element_number;
         struct_element *element;
+
         /* on tient compte que le premier widget utile est le troisième du formulaire */
 	    element_number = column + 2;
 
@@ -312,6 +352,7 @@ gboolean bet_form_create_scheduler_part ( GtkWidget *dialog, GtkWidget *table )
 		    widget = gsb_combo_box_new_with_index ( text_frequency,
                         G_CALLBACK ( bet_form_scheduler_frequency_button_changed ),
                         dialog );
+            g_object_set_data ( G_OBJECT ( widget ), "form_type", GINT_TO_POINTER ( 1 ) );
             combo = widget;
 		    tooltip_text = _("Frequency");
             gtk_widget_show ( widget );
@@ -319,6 +360,7 @@ gboolean bet_form_create_scheduler_part ( GtkWidget *dialog, GtkWidget *table )
 
         case SCHEDULED_FORM_LIMIT_DATE:
             widget = gsb_calendar_entry_new ( FALSE );
+            g_object_set_data ( G_OBJECT ( widget ), "form_type", GINT_TO_POINTER ( 1 ) );
             gsb_form_widget_set_empty ( widget, TRUE );
             gtk_entry_set_text ( GTK_ENTRY ( widget ),
 					    _("Limit date") );
@@ -334,12 +376,17 @@ gboolean bet_form_create_scheduler_part ( GtkWidget *dialog, GtkWidget *table )
                         "focus-out-event",
                         G_CALLBACK ( gsb_form_scheduler_entry_lose_focus ),
                         GINT_TO_POINTER (element_number));
+            g_signal_connect ( G_OBJECT ( widget ),
+                       "key-press-event",
+                       G_CALLBACK ( bet_form_key_press_event ),
+                       GINT_TO_POINTER ( element_number ) );
             tooltip_text = _("Final date");
             gtk_widget_show ( widget );
             break;
 
 		case SCHEDULED_FORM_FREQUENCY_USER_ENTRY:
 		    widget = gtk_entry_new ();
+            g_object_set_data ( G_OBJECT ( widget ), "form_type", GINT_TO_POINTER ( 1 ) );
             gtk_entry_set_text ( GTK_ENTRY ( widget ),
 					    _("Own frequency") );
             gsb_form_widget_set_empty ( widget, TRUE );
@@ -351,12 +398,21 @@ gboolean bet_form_create_scheduler_part ( GtkWidget *dialog, GtkWidget *table )
                         "focus-out-event",
                         G_CALLBACK ( gsb_form_scheduler_entry_lose_focus),
                         GINT_TO_POINTER (element_number));
+            g_signal_connect ( G_OBJECT ( widget ),
+                       "key-press-event",
+                       G_CALLBACK ( bet_form_key_press_event ),
+                       GINT_TO_POINTER ( element_number ) );
 		    tooltip_text = _("Custom frequency");
 		    break;
 
 		case SCHEDULED_FORM_FREQUENCY_USER_BUTTON:
 		    widget = gsb_combo_box_new_with_index ( text_frequency_user,
 							    NULL, NULL );
+            g_object_set_data ( G_OBJECT ( widget ), "form_type", GINT_TO_POINTER ( 1 ) );
+            g_signal_connect ( G_OBJECT ( widget ),
+                        "key-press-event",
+                        G_CALLBACK ( bet_form_key_press_event ),
+                        GINT_TO_POINTER ( element_number ) );
 		    tooltip_text = _("Custom frequency");
             gsb_combo_box_set_index ( widget, 2 );
 		    break;
@@ -672,6 +728,8 @@ gboolean bet_form_create_current_form ( GtkWidget *dialog,
                        "key-press-event",
                        G_CALLBACK ( bet_form_key_press_event ),
                        GINT_TO_POINTER ( element -> element_number ) );
+
+            g_object_set_data ( G_OBJECT ( widget ), "form_type", GINT_TO_POINTER ( 0 ) );
         }
         tmp_list = tmp_list -> next;
     }
@@ -1167,6 +1225,147 @@ GtkWidget *bet_form_widget_get_widget ( gint element_number )
 
 
 /**
+ * check if the given element can receive focus
+ *
+ * \param element_number
+ *
+ * \return TRUE : can receive focus, or FALSE
+ * */
+static gboolean bet_form_widget_can_focus ( gint element_number,
+                        gint form_type )
+{
+    GtkWidget *widget;
+
+    /* if element_number is -1 or -2, the iteration while must
+     * stop, so return TRUE */
+    if ( element_number == -1 || element_number == -2 )
+        return TRUE;
+
+    if ( form_type )
+        widget = bet_form_scheduler_get_element_widget ( element_number );
+    else
+        widget = bet_form_widget_get_widget ( element_number );
+
+    if ( !widget )
+        return FALSE;
+
+    if ( !GTK_WIDGET_VISIBLE ( widget ) )
+        return FALSE;
+
+    if ( !GTK_WIDGET_SENSITIVE ( widget ) )
+        return FALSE;
+
+    if ( !( GTK_IS_COMBOFIX ( widget )
+       ||
+       GTK_IS_ENTRY ( widget )
+       ||
+       GTK_IS_BUTTON ( widget )
+       ||
+       GTK_IS_COMBO_BOX ( widget ) ) )
+        return FALSE;
+
+    return TRUE;
+}
+
+
+static GtkWidget *bet_form_widget_get_next_element ( gint element_number,
+                        gint form_type )
+{
+    gint row = 0;
+    gint column = 0;
+    gint return_value_number = 0;
+    gint form_column_number = BET_FUTURE_FORM_WIDTH;
+    gint form_row_number = 5;
+    gboolean trouve = FALSE;
+
+    if ( form_type ) /* le widget initial est sur la partie scheduled du formulaire */
+    {
+        for ( column=0 ; column < bfo->columns ; column++ )
+        {
+            if ( bfo->form_table[row][column] == element_number )
+            {
+                form_row_number = 1;
+                while ( !bet_form_widget_can_focus ( return_value_number, form_type ) )
+                {
+                    if ( column == ( form_column_number - 1)
+                         &&
+                         row == ( form_row_number - 1 ) )
+                    {
+                        /* we are on the bottom right, we finish the edition or
+                         * go to the upper left */
+                        if ( !conf.entree )
+                        {
+                            return_value_number = -2;
+                            continue;
+                        }
+                        column = -1;
+                        row = 0;
+                    }
+
+                    if ( ++column == form_column_number )
+                    {
+                        column = 0;
+                        row++;
+                    }
+                    return_value_number = bfo->form_table[row][column];
+                }
+                trouve = TRUE;
+                break;
+            }
+        }
+    }
+    else
+    {
+        for ( row=1 ; row < bfo->rows; row++ )
+        {
+            for ( column=0 ; column < bfo->columns ; column++ )
+            {
+                if ( bfo->form_table[row][column] == element_number )
+                {
+                    trouve = TRUE;
+                    break;
+                }
+            }
+            if ( trouve )
+                break;
+        }
+        while ( !bet_form_widget_can_focus ( return_value_number, form_type ) )
+        {
+            if ( column == ( form_column_number - 1)
+                 &&
+                 row == ( form_row_number - 1 ) )
+            {
+                /* we are on the bottom right, we finish the edition or
+                 * go to the upper left */
+                if ( !conf.entree )
+                {
+                    return_value_number = -2;
+                    continue;
+                }
+                column = -1;
+                row = 0;
+            }
+
+            if ( ++column == form_column_number )
+            {
+                column = 0;
+                row++;
+            }
+            return_value_number = bfo->form_table[row][column];
+        }
+    }
+
+    /* return value */
+    if ( row == 0 )
+        return gsb_form_get_element_widget_from_list ( return_value_number,
+                        bet_schedul_element_list );
+    else
+        return gsb_form_get_element_widget_from_list ( return_value_number,
+                        bet_form_list_widgets );
+}
+
+
+/**
  * called when press a key on an element of the form
  *
  * \param widget wich receive the signal
@@ -1179,9 +1378,17 @@ gboolean bet_form_key_press_event ( GtkWidget *widget,
                         GdkEventKey *ev,
                         gint *ptr_origin )
 {
+    GtkWidget *widget_suivant;
+    GtkWidget *widget_prov;
     gint element_number;
     gint account_number;
-    GtkWidget *widget_prov;
+    gint form_type = 0;
+
+    form_type = GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( widget ), "form_type" ) );
+
+    /* on sort si on est sur la partie scheduler du formulaire sauf pour GDK_Tab */
+    if ( form_type && ev -> keyval != GDK_Tab )
+        return FALSE;
 
     element_number = GPOINTER_TO_INT (ptr_origin);
     account_number = gsb_form_get_account_number ();
@@ -1261,6 +1468,20 @@ gboolean bet_form_key_press_event ( GtkWidget *widget,
 		return TRUE;
 	    }
 	    break;
+
+    case GDK_Tab :
+        widget_suivant = bet_form_widget_get_next_element ( element_number, form_type );
+
+        if ( widget_suivant )
+        {
+            if ( GTK_IS_COMBOFIX ( widget_suivant ) )
+                gtk_widget_grab_focus ( GTK_COMBOFIX ( widget_suivant ) -> entry );
+            else
+                gtk_widget_grab_focus ( widget_suivant );
+
+            return TRUE;
+        }
+        break;
     }
 
     return FALSE;
diff --git a/src/bet_future.c.new b/src/bet_future.c.new
deleted file mode 100644
index d039634..0000000
--- a/src/bet_future.c.new
+++ /dev/null
@@ -1,3214 +0,0 @@
-/* ************************************************************************** */
-/*                                                                            */
-/*     Copyright (C) 2007 Dominique Parisot                                   */
-/*          zionly at free.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 */
-/*                                                                            */
-/* ************************************************************************** */
-
-/* ./configure --with-balance-estimate */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "include.h"
-#include <gdk/gdkkeysyms.h>
-#include <glib/gi18n.h>
-
-/*START_INCLUDE*/
-#include "bet_future.h"
-#include "bet_tab.h"
-#include "dialog.h"
-#include "fenetre_principale.h"
-#include "gsb_calendar_entry.h"
-#include "gsb_combo_box.h"
-#include "gsb_data_account.h"
-#include "gsb_data_budget.h"
-#include "gsb_data_category.h"
-#include "gsb_data_currency_link.h"
-#include "gsb_data_form.h"
-#include "gsb_data_partial_balance.h"
-#include "gsb_data_payee.h"
-#include "gsb_data_payment.h"
-#include "gsb_form.h"
-#include "gsb_form_scheduler.h"
-#include "gsb_form_widget.h"
-#include "gsb_fyear.h"
-#include "gsb_payment_method.h"
-#include "gtk_combofix.h"
-#include "navigation.h"
-#include "structures.h"
-#include "utils.h"
-#include "utils_dates.h"
-#include "utils_editables.h"
-#include "utils_real.h"
-#include "utils_str.h"
-#include "erreur.h"
-/*END_INCLUDE*/
-
-
-/*START_STATIC*/
-static gboolean bet_form_button_press_event ( GtkWidget *entry,
-                        GdkEventButton *ev,
-                        gint *ptr_origin );
-static gboolean bet_form_clean ( gint account_number );
-static gboolean bet_form_create_current_form ( GtkWidget *dialog,
-                        GtkWidget *table,
-                        gint account_number );
-static gboolean bet_form_create_scheduler_part ( GtkWidget *dialog, GtkWidget *table );
-static gboolean bet_form_entry_get_focus ( GtkWidget *entry,
-                        GdkEventFocus *ev,
-                        GtkWidget *dialog );
-static gboolean bet_form_entry_lose_focus ( GtkWidget *entry,
-                        GdkEventFocus *ev,
-                        gint *ptr_origin );
-static gboolean bet_form_key_press_event ( GtkWidget *widget,
-                        GdkEventKey *ev,
-                        gint *ptr_origin );
-static gboolean bet_form_scheduler_frequency_button_changed ( GtkWidget *combo_box,
-                        GtkWidget *dialog );
-static GtkWidget *bet_form_scheduler_get_element_widget ( gint element_number );
-static GtkWidget *bet_form_widget_get_widget ( gint element_number );
-static GtkWidget *bet_future_create_dialog ( gint account_number );
-static gboolean bet_future_set_form_data_from_line ( gint account_number,
-                        gint number  );
-static gboolean bet_future_take_data_from_form (  struct_futur_data *scheduled );
-/* static void bet_transfert_auto_inc_toggle ( GtkToggleButton *button, gpointer data ); */
-static GtkWidget *bet_transfert_create_account_list_part ( GtkWidget *dialog, gint account_number );
-static gboolean bet_transfert_entry_lose_focus ( GtkWidget *entry,
-                        GdkEventFocus *ev,
-                        gint *ptr_origin );
-static gboolean bet_transfert_selection_changed ( GtkTreeSelection *selection, GtkWidget *dialog );
-/*END_STATIC*/
-
-/*START_EXTERN*/
-/*END_EXTERN*/
-
-#define BET_SCHEDULED_WIDTH 4
-#define BET_SCHEDULED_HEIGHT 2
-static gint width = 250;
-
-
-/** contains the list of the scheduled elements, ie list of link
- * between an element number and the pointer of its widget
- * for now, this list if filled at the opening of grisbi and never erased */
-static GSList *bet_schedul_element_list = NULL;
-
-/** contains a list of struct_element according to the current form */
-static GSList *bet_form_list_widgets = NULL;
-
-static GtkWidget *bet_futur_dialog = NULL;
-static GtkWidget *bet_transfert_dialog = NULL;
-
-/* organisation du formulaire */
-struct bet_form_organization
-{
-    /* 1 to 6 columns */
-    gint columns;
-    /* 1 to 4 rows */
-    gint rows;
-    gint form_table[MAX_HEIGHT][MAX_WIDTH];
-};
-
-static struct bet_form_organization *bet_form;
-
-/**
- *
- *
- *
- *
- * */
-void bet_future_initialise_dialog ( void )
- {
-    gint tab[MAX_HEIGHT][MAX_WIDTH] = {
-        { TRANSACTION_FORM_DATE, TRANSACTION_FORM_PARTY, TRANSACTION_FORM_DEBIT, TRANSACTION_FORM_CREDIT, 0, 0 },
-        { TRANSACTION_FORM_EXERCICE, TRANSACTION_FORM_CATEGORY, TRANSACTION_FORM_TYPE, 0, 0, 0 },
-        { 0, TRANSACTION_FORM_BUDGET, 0, 0, 0, 0 },
-        { TRANSACTION_FORM_NOTES, 0, 0, 0, 0, 0 }
-    };
-    gint i, j;
-
-    if ( bet_futur_dialog != NULL )
-    {
-        gtk_widget_destroy ( bet_futur_dialog );
-        bet_futur_dialog = NULL;
-    }
-
-    if ( bet_transfert_dialog != NULL )
-    {
-        gtk_widget_destroy ( bet_transfert_dialog );
-        bet_transfert_dialog = NULL;
-    }
-
-    bet_form = g_malloc0 ( sizeof ( struct bet_form_organization ) );
-
-    if ( !bet_form )
-    {
-        dialogue_error_memory ();
-        return;
-    }
-
-    bet_form->columns = 4;
-    bet_form->rows = 4;
-
-    for ( i = 0 ; i<MAX_HEIGHT ; i++ )
-	for ( j = 0 ; j<MAX_WIDTH ; j++ )
-	    bet_form->form_table[i][j] = tab[i][j];
- }
-
-
-/**
- *
- *
- *
- *
- * */
-gboolean bet_future_new_line_dialog ( GtkTreeModel *tab_model,
-                        gchar *str_date )
-{
-    GtkWidget *widget;
-    gchar *tmp_str;
-    GDate *date;
-    GDate *date_jour;
-    gint result;
-    gint account_number;
-
-    account_number = gsb_gui_navigation_get_current_account ( );
-    if ( account_number == -1 )
-        return FALSE;
-
-    if ( bet_futur_dialog == NULL )
-    {
-        bet_futur_dialog = bet_future_create_dialog ( account_number );
-    }
-    else
-    {
-        bet_form_clean ( account_number );
-        gtk_widget_show ( bet_futur_dialog );
-    }
-
-    /* init data */
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_DATE );
-    date = gsb_parse_date_string ( str_date );
-    date_jour = gdate_today ( );
-
-    if ( g_date_valid ( date ) )
-    {
-        if ( g_date_compare ( date_jour, date ) >= 0 )
-        {
-            g_date_free ( date );
-            g_date_add_days ( date_jour, 1 );
-            date = date_jour;
-        }
-    }
-    else
-    {
-        g_date_add_days ( date_jour, 1 );
-        date = date_jour;
-    }
-
-    gsb_form_widget_set_empty ( widget, FALSE );
-    gsb_calendar_entry_set_date ( widget, date );
-
-    gtk_dialog_set_response_sensitive ( GTK_DIALOG ( bet_futur_dialog ),
-                        GTK_RESPONSE_OK, FALSE );
-
-dialog_return:
-	result = gtk_dialog_run ( GTK_DIALOG ( bet_futur_dialog ));
-
-    if ( result == GTK_RESPONSE_OK )
-    {
-        struct_futur_data *scheduled;
-
-        scheduled = struct_initialise_bet_future ( );
-
-        if ( !scheduled )
-        {
-            dialogue_error_memory ();
-            gtk_widget_hide ( bet_futur_dialog );
-            return FALSE;
-        }
-
-        if ( bet_future_take_data_from_form ( scheduled ) == FALSE )
-        {
-            tmp_str = g_strdup ( _("Error: the frequency defined by the user or the amount is "
-                                 "not specified or the date is invalid.") );
-            dialogue_warning_hint ( tmp_str, _("One field is not filled in") );
-            g_free ( tmp_str );
-            goto dialog_return;
-        }
-        else
-            bet_data_future_add_lines ( scheduled );
-
-        gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
-        bet_data_update_bet_module ( account_number, GSB_ESTIMATE_PAGE );
-    }
-
-    gtk_widget_hide ( bet_futur_dialog );
-
-    return FALSE;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-GtkWidget *bet_future_create_dialog ( gint account_number )
-{
-    GtkWidget *dialog;
-    GtkWidget *vbox;
-    GtkWidget *table;
-
-    /* Create the dialog */
-    dialog = gtk_dialog_new_with_buttons ( _("Enter a budget line"),
-					   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 );
-    gtk_dialog_set_default_response ( GTK_DIALOG ( dialog ), GTK_RESPONSE_OK );
-
-	vbox = gtk_vbox_new ( FALSE, 0 );
-	gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog )->vbox ), vbox, TRUE, TRUE, 0 );
-	gtk_container_set_border_width ( GTK_CONTAINER ( vbox ), 12 );
-
-    /* next we fill the bet_form */
-    table = gtk_table_new ( BET_SCHEDULED_HEIGHT, BET_SCHEDULED_WIDTH, FALSE );
-    gtk_table_set_col_spacings ( GTK_TABLE ( table ), 6 );
-    gtk_widget_show ( table );
-    gtk_box_pack_start ( GTK_BOX ( vbox ), table, FALSE, FALSE, 5 );
-
-    bet_form_create_scheduler_part ( dialog, table );
-    bet_form_create_current_form ( dialog, table, account_number );
-
-	gtk_widget_show ( vbox );
-
-    return dialog;
- }
-
-
-/**
- * create the scheduled part
- *
- * \param table a GtkTable with the dimension SCHEDULED_HEIGHT*SCHEDULED_WIDTH to be filled
- *
- * \return FALSE
- * */
-gboolean bet_form_create_scheduler_part ( GtkWidget *dialog, GtkWidget *table )
-{
-
-    GtkWidget *separator;
-    GtkWidget *combo = NULL;
-    gint column;
-
-    devel_debug (NULL);
-    if (!table)
-        return FALSE;
-
-    /* ok, now fill the form
-     * we play with height and width, but for now it's fix : 6 columns and 1 line */
-	for ( column=0 ; column < SCHEDULED_WIDTH ; column++ )
-	{
-        GtkWidget *widget = NULL;
-	    const gchar *tooltip_text = NULL;
-	    gchar *text_frequency [] = { _("Once"), _("Weekly"), _("Monthly"), _("Bimonthly"),
-                        _("Quarterly"), _("Yearly"), _("Custom"), NULL };
-	    gchar *text_frequency_user [] = { _("Days"), _("Weeks"), _("Months"), _("Years"), NULL };
-        gint element_number;
-        struct_element *element;
-        /* on tient compte que le premier widget utile est le troisième du formulaire */
-	    element_number = column + 2;
-
-	    switch ( element_number )
-	    {
-		case SCHEDULED_FORM_FREQUENCY_BUTTON:
-		    widget = gsb_combo_box_new_with_index ( text_frequency,
-                        G_CALLBACK ( bet_form_scheduler_frequency_button_changed ),
-                        dialog );
-            combo = widget;
-		    tooltip_text = _("Frequency");
-            gtk_widget_show ( widget );
-		    break;
-
-        case SCHEDULED_FORM_LIMIT_DATE:
-            widget = gsb_calendar_entry_new ( FALSE );
-            gsb_form_widget_set_empty ( widget, TRUE );
-            gtk_entry_set_text ( GTK_ENTRY ( widget ),
-					    _("Limit date") );
-            g_signal_connect ( G_OBJECT (widget),
-                        "button-press-event",
-                        G_CALLBACK ( gsb_form_scheduler_button_press_event ),
-                        GINT_TO_POINTER (element_number));
-            g_signal_connect ( G_OBJECT (widget),
-                        "focus-in-event",
-                        G_CALLBACK ( gsb_form_entry_get_focus ),
-                        GINT_TO_POINTER (element_number));
-            g_signal_connect_after ( G_OBJECT (widget),
-                        "focus-out-event",
-                        G_CALLBACK ( gsb_form_scheduler_entry_lose_focus ),
-                        GINT_TO_POINTER (element_number));
-            tooltip_text = _("Final date");
-            gtk_widget_show ( widget );
-            break;
-
-		case SCHEDULED_FORM_FREQUENCY_USER_ENTRY:
-		    widget = gtk_entry_new ();
-            gtk_entry_set_text ( GTK_ENTRY ( widget ),
-					    _("Own frequency") );
-            gsb_form_widget_set_empty ( widget, TRUE );
-            g_signal_connect ( G_OBJECT (widget),
-                        "focus-in-event",
-                        G_CALLBACK (gsb_form_entry_get_focus),
-                        GINT_TO_POINTER (element_number));
-            g_signal_connect_after ( G_OBJECT (widget),
-                        "focus-out-event",
-                        G_CALLBACK ( gsb_form_scheduler_entry_lose_focus),
-                        GINT_TO_POINTER (element_number));
-		    tooltip_text = _("Custom frequency");
-		    break;
-
-		case SCHEDULED_FORM_FREQUENCY_USER_BUTTON:
-		    widget = gsb_combo_box_new_with_index ( text_frequency_user,
-							    NULL, NULL );
-		    tooltip_text = _("Custom frequency");
-            gsb_combo_box_set_index ( widget, 2 );
-		    break;
-	    }
-
-	    if (!widget)
-            continue;
-
-	    if (tooltip_text)
-            gtk_widget_set_tooltip_text ( GTK_WIDGET (widget),
-                        tooltip_text);
-
-        /* save the element */
-	    element = g_malloc0 ( sizeof ( struct_element ) );
-	    element -> element_number = element_number;
-	    element -> element_widget = widget;
-	    bet_schedul_element_list = g_slist_append ( bet_schedul_element_list, element );
-
-	    /* set in the form */
-        gtk_table_attach ( GTK_TABLE (table),
-                        widget,
-                        column, column+1,
-                        0, 1,
-                        GTK_EXPAND | GTK_FILL,
-                        GTK_EXPAND | GTK_FILL,
-                        0, 0 );
-	}
-
-    separator = gtk_hseparator_new ( );
-    gtk_widget_show ( separator );
-    gtk_table_attach ( GTK_TABLE (table),
-                        separator,
-                        0, 4,
-                        1, 2,
-                        GTK_EXPAND | GTK_FILL,
-                        GTK_EXPAND | GTK_FILL,
-                        0, 6);
-
-    gsb_combo_box_set_index ( combo, 0 );
-
-    return FALSE;
-}
-
-
-/**
- * fill the form according to the account_number :
- *
- * \param account_number the number of account
- *
- * \return FALSE
- * */
-gboolean bet_form_create_current_form ( GtkWidget *dialog,
-                        GtkWidget *table,
-                        gint account_number )
-{
-	GtkWidget *widget;
-    GtkWidget *credit;
-    gint element_number;
-    gint row = 2;
-    gint column = 0;
-    struct_element *element;
-    GSList *tmp_list;
-
-    account_number = gsb_gui_navigation_get_current_account ( );
-
-    element_number = TRANSACTION_FORM_DATE;
-    widget = gsb_calendar_entry_new ( FALSE );
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+1,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 0);
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-    column ++;
-
-    element_number = TRANSACTION_FORM_PARTY;
-    widget = gtk_combofix_new (
-                        gsb_data_payee_get_name_and_report_list ( ) );
-    gtk_widget_set_size_request ( widget, width, -1 );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX (widget), TRUE ); /* on ne peut pas créer d'item */
-    gtk_combofix_set_max_items ( GTK_COMBOFIX (widget),
-					 etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX (widget),
-					      etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX (widget),
-					  FALSE );
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+1,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 0);
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-    column ++;
-
-    element_number = TRANSACTION_FORM_DEBIT;
-    widget = gtk_entry_new ( );
-    g_object_set_data ( G_OBJECT ( widget ), "element_number",
-                        GINT_TO_POINTER ( TRANSACTION_FORM_DEBIT ) );
-    g_signal_connect ( G_OBJECT ( widget ),
-		                "changed",
-		                G_CALLBACK ( gsb_form_widget_amount_entry_changed ),
-		                NULL );
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+1,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 0);
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-    column ++;
-
-    element_number = TRANSACTION_FORM_CREDIT;
-    widget = gtk_entry_new ( );
-    credit = widget;
-    g_object_set_data ( G_OBJECT ( widget ), "element_number",
-                        GINT_TO_POINTER ( TRANSACTION_FORM_CREDIT ) );
-    g_signal_connect ( G_OBJECT ( widget ),
-		                "changed",
-		                G_CALLBACK ( gsb_form_widget_amount_entry_changed ),
-		                NULL );
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+1,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 0);
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-    column = 0;
-    row ++;
-
-    element_number = TRANSACTION_FORM_EXERCICE;
-    widget = gsb_fyear_make_combobox (TRUE);
-    gtk_widget_set_tooltip_text ( GTK_WIDGET (widget),
-					  _("Choose the financial year") );
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+1,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 0);
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-    column ++;
-
-    element_number = TRANSACTION_FORM_CATEGORY;
-    widget = gtk_combofix_new (
-                         gsb_data_category_get_name_list ( TRUE, TRUE, TRUE, FALSE ) );
-    gtk_widget_set_size_request ( widget, width, -1 );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX (widget), TRUE ); /* on ne peut pas créer d'item */
-    gtk_combofix_set_max_items ( GTK_COMBOFIX (widget),
-					 etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX (widget),
-					      etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX (widget),
-					  etat.combofix_mixed_sort );
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+1,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 0);
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-    column ++;
-
-    element_number = TRANSACTION_FORM_TYPE;
-    widget = gtk_combo_box_new ();
-    gsb_payment_method_create_combo_list ( widget,
-                        GSB_PAYMENT_DEBIT,
-                        account_number, 0, FALSE );
-    gtk_combo_box_set_active ( GTK_COMBO_BOX (widget), 0 );
-    gtk_widget_set_tooltip_text ( GTK_WIDGET (widget),
-                        _("Choose the method of payment") );
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+1,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 0);
-
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-    column = 1;
-    row ++;
-
-    element_number = TRANSACTION_FORM_BUDGET;
-    widget = gtk_combofix_new (
-                        gsb_data_budget_get_name_list (TRUE, TRUE));
-    gtk_widget_set_size_request ( widget, width, -1 );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX (widget), TRUE ); /* on ne peut pas créer d'item */
-    gtk_combofix_set_max_items ( GTK_COMBOFIX (widget),
-					 etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX (widget),
-					      etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX (widget),
-					  etat.combofix_mixed_sort );
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+1,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 0);
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-    column = 0;
-    row ++;
-
-    element_number = TRANSACTION_FORM_NOTES;
-	widget = gtk_entry_new();
-    gtk_widget_show ( widget );
-    gtk_table_attach ( GTK_TABLE ( table ),
-                        widget,
-                        column, column+4,
-                        row, row+1,
-                        gsb_form_get_element_expandable ( element_number ),
-                        gsb_form_get_element_expandable ( element_number ),
-                        0, 2);
-    element = g_malloc0 ( sizeof ( struct_element ) );
-    element -> element_number = element_number;
-    element -> element_widget = widget;
-    bet_form_list_widgets = g_slist_append ( bet_form_list_widgets, element );
-
-    tmp_list = bet_form_list_widgets;
-
-    while ( tmp_list )
-    {
-        struct_element*element;
-
-        element = tmp_list -> data;
-
-        widget = element -> element_widget;
-        if ( GTK_IS_ENTRY ( widget ))
-        {
-            g_signal_connect ( G_OBJECT ( widget ),
-                       "focus-in-event",
-                       G_CALLBACK ( bet_form_entry_get_focus ),
-                       dialog );
-            g_signal_connect ( G_OBJECT ( widget ),
-                       "focus-out-event",
-                       G_CALLBACK ( bet_form_entry_lose_focus ),
-                       GINT_TO_POINTER ( element -> element_number ) );
-            g_signal_connect ( G_OBJECT ( widget ),
-                       "button-press-event",
-                       G_CALLBACK ( bet_form_button_press_event ),
-                       GINT_TO_POINTER ( element -> element_number ) );
-            g_signal_connect ( G_OBJECT ( widget ),
-                       "key-press-event",
-                       G_CALLBACK ( bet_form_key_press_event ),
-                       GINT_TO_POINTER ( element -> element_number ) );
-        }
-        else
-        {
-            if ( GTK_IS_COMBOFIX ( widget ))
-            {
-                g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( widget ) -> entry ),
-                           "focus-in-event",
-                           G_CALLBACK ( bet_form_entry_get_focus ),
-                           dialog );
-                g_signal_connect ( G_OBJECT ( GTK_COMBOFIX (widget ) -> entry ),
-                           "focus-out-event",
-                           G_CALLBACK ( bet_form_entry_lose_focus ),
-                           GINT_TO_POINTER ( element -> element_number ) );
-                g_signal_connect ( G_OBJECT ( GTK_COMBOFIX (widget ) -> entry ),
-                           "button-press-event",
-                           G_CALLBACK ( bet_form_button_press_event ),
-                           GINT_TO_POINTER ( element -> element_number ) );
-                g_signal_connect ( G_OBJECT ( GTK_COMBOFIX (widget ) -> entry ),
-                           "key-press-event",
-                           G_CALLBACK ( bet_form_key_press_event ),
-                           GINT_TO_POINTER ( element -> element_number ) );
-            }
-            else
-            /* neither an entry, neither a combofix */
-            g_signal_connect ( G_OBJECT ( widget ),
-                       "key-press-event",
-                       G_CALLBACK ( bet_form_key_press_event ),
-                       GINT_TO_POINTER ( element -> element_number ) );
-        }
-        tmp_list = tmp_list -> next;
-    }
-
-    bet_form_clean ( account_number );
-
-    return FALSE;
-}
-
-
-/**
- * clean the form according to the account_number
- * and set the default values
- *
- * \param account number
- *
- * \return FALSE
- * */
-gboolean bet_form_clean ( gint account_number )
-{
-    GSList *tmp_list;
-
-    /* clean the scheduled widget */
-    tmp_list = bet_schedul_element_list;
-
-    while (tmp_list)
-    {
-        struct_element *element;
-
-        element = tmp_list -> data;
-
-        /* better to protect here if widget != NULL (bad experience...) */
-        if (element -> element_widget)
-        {
-            gtk_widget_set_sensitive ( element -> element_widget, TRUE );
-
-            switch (element -> element_number)
-            {
-            case SCHEDULED_FORM_FREQUENCY_BUTTON:
-                gsb_combo_box_set_index ( element -> element_widget, 0 );
-                break;
-            case SCHEDULED_FORM_LIMIT_DATE:
-                gsb_form_widget_set_empty ( element -> element_widget, TRUE );
-                gtk_entry_set_text ( GTK_ENTRY ( element -> element_widget ),
-                        _("Limit date") );
-                break;
-            case SCHEDULED_FORM_FREQUENCY_USER_ENTRY:
-                gtk_entry_set_text ( GTK_ENTRY ( element -> element_widget ),
-                            _("Own frequency") );
-                gsb_form_widget_set_empty ( element -> element_widget, TRUE );
-                break;
-    		case SCHEDULED_FORM_FREQUENCY_USER_BUTTON:
-            gsb_combo_box_set_index ( element -> element_widget, 2 );
-		    break;
-            }
-        }
-
-        tmp_list = tmp_list -> next;
-    }
-
-    /* clean the transactions widget */
-    tmp_list = bet_form_list_widgets;
-
-    while (tmp_list)
-    {
-        struct_element *element;
-
-        element = tmp_list -> data;
-
-        /* better to protect here if widget != NULL (bad experience...) */
-        if (element -> element_widget)
-        {
-            /* some widgets can be set unsensitive because of the children of splits,
-             * so resensitive all to be sure */
-            gtk_widget_set_sensitive ( element -> element_widget, TRUE );
-
-            switch (element -> element_number)
-            {
-            case TRANSACTION_FORM_DATE:
-                if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY (
-                 element -> element_widget ) ) ) )
-                {
-                    gsb_form_widget_set_empty ( element -> element_widget, TRUE );
-                    gtk_entry_set_text ( GTK_ENTRY ( element -> element_widget ), _("Date") );
-                }
-                break;
-
-            case TRANSACTION_FORM_EXERCICE:
-                /* editing a transaction can show some fyear wich shouldn't be showed,
-                 * so hide them here */
-                gsb_fyear_update_fyear_list ();
-
-                /* set the combo_box on 'Automatic' */
-                gsb_fyear_set_combobox_history ( element -> element_widget, 0 );
-
-                break;
-
-            case TRANSACTION_FORM_PARTY:
-                gsb_form_widget_set_empty ( GTK_COMBOFIX ( element -> element_widget ) -> entry,
-                            TRUE );
-                gtk_combofix_set_text ( GTK_COMBOFIX ( element -> element_widget ),
-                            _("Payee") );
-                break;
-
-            case TRANSACTION_FORM_DEBIT:
-                gsb_form_widget_set_empty ( element -> element_widget,
-                            TRUE );
-                gtk_entry_set_text ( GTK_ENTRY ( element -> element_widget ),
-                         _("Debit") );
-                break;
-
-            case TRANSACTION_FORM_CREDIT:
-                gsb_form_widget_set_empty ( element -> element_widget,
-                            TRUE );
-                gtk_entry_set_text ( GTK_ENTRY ( element -> element_widget ),
-                         _("Credit") );
-                break;
-
-            case TRANSACTION_FORM_CATEGORY:
-                gsb_form_widget_set_empty ( GTK_COMBOFIX ( element -> element_widget ) -> entry,
-                            TRUE );
-                gtk_combofix_set_text ( GTK_COMBOFIX ( element -> element_widget ),
-                            _("Categories : Sub-categories") );
-                break;
-
-            case TRANSACTION_FORM_BUDGET:
-                gsb_form_widget_set_empty ( GTK_COMBOFIX ( element -> element_widget ) -> entry,
-                            TRUE );
-                gtk_combofix_set_text ( GTK_COMBOFIX ( element -> element_widget ),
-                            _("Budgetary line") );
-                break;
-
-            case TRANSACTION_FORM_NOTES:
-                gsb_form_widget_set_empty ( element -> element_widget,
-                            TRUE );
-                gtk_entry_set_text ( GTK_ENTRY ( element -> element_widget ),
-                         _("Notes") );
-                break;
-
-            case TRANSACTION_FORM_TYPE:
-                gsb_payment_method_set_combobox_history ( element -> element_widget,
-                                      gsb_data_account_get_default_debit ( account_number ), TRUE );
-                break;
-
-            }
-        }
-        tmp_list = tmp_list -> next;
-    }
-
-    return FALSE;
-}
-
-
-/**
- * called when the frequency button is changed
- * show/hide the necessary widget according to its state
- *
- * \param combo_box
- *
- * \return FALSE
- * */
-gboolean bet_form_scheduler_frequency_button_changed ( GtkWidget *combo_box,
-                        GtkWidget *dialog )
-{
-    gchar *selected_item;
-
-    selected_item = gtk_combo_box_get_active_text ( GTK_COMBO_BOX ( combo_box ) );
-
-    if ( !strcmp ( selected_item, _("Once") ) )
-    {
-        gtk_widget_hide ( bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_LIMIT_DATE ) );
-        gtk_widget_hide ( bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_ENTRY ) );
-        gtk_widget_hide ( bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_BUTTON ) );
-    }
-    else
-    {
-        gtk_widget_show ( bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_LIMIT_DATE ) );
-
-        if ( !strcmp ( selected_item, _("Custom") ) )
-        {
-            gtk_widget_show ( bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_ENTRY));
-            gtk_widget_show ( bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_BUTTON ) );
-        }
-        else
-        {
-            gtk_widget_hide ( gsb_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_ENTRY ) );
-            gtk_widget_hide ( gsb_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_BUTTON ) );
-        }
-    }
-    g_free ( selected_item );
-    gtk_dialog_set_response_sensitive ( GTK_DIALOG ( dialog ), GTK_RESPONSE_OK, TRUE );
-
-    return FALSE;
-}
-
-
-/**
- * called when an entry get the focus, if the entry is free,
- * set it normal and erase the help content
- *
- * \param entry
- *
- * \return FALSE
- * */
-gboolean bet_form_entry_get_focus ( GtkWidget *entry,
-                        GdkEventFocus *ev,
-                        GtkWidget *dialog )
-{
-    /* the entry can be a combofix or a real entry */
-    if (GTK_IS_COMBOFIX ( entry ))
-    {
-        if ( gsb_form_widget_check_empty (GTK_COMBOFIX (entry) -> entry))
-        {
-            gtk_combofix_set_text ( GTK_COMBOFIX (entry), "" );
-            gsb_form_widget_set_empty ( GTK_COMBOFIX (entry) -> entry, FALSE );
-        }
-    }
-    else
-    {
-        if ( gsb_form_widget_check_empty (entry) )
-        {
-            gtk_entry_set_text ( GTK_ENTRY (entry), "" );
-            gsb_form_widget_set_empty ( entry, FALSE );
-        }
-    }
-    /* sensitive the valid button */
-    if ( dialog && GTK_IS_DIALOG ( dialog ) )
-        gtk_dialog_set_response_sensitive ( GTK_DIALOG ( dialog ), GTK_RESPONSE_OK, TRUE );
-
-    return FALSE;
-}
-
-
-/**
- * called when an entry lose the focus
- *
- * \param entry
- * \param ev
- * \param ptr_origin a pointer gint wich is the number of the element
- *
- * \return FALSE
- * */
-gboolean bet_form_entry_lose_focus ( GtkWidget *entry,
-                        GdkEventFocus *ev,
-                        gint *ptr_origin )
-{
-    GtkWidget *widget;
-    gchar *string;
-    gint element_number;
-    gint account_number;
-
-    /* still not found, if change the content of the form, something come in entry
-     * wich is nothing, so protect here */
-    if ( !GTK_IS_WIDGET ( entry )
-     ||
-     !GTK_IS_ENTRY ( entry ))
-        return FALSE;
-
-    /* remove the selection */
-    gtk_editable_select_region ( GTK_EDITABLE ( entry ), 0, 0 );
-    element_number = GPOINTER_TO_INT ( ptr_origin );
-    account_number = gsb_form_get_account_number ();
-
-    /* sometimes the combofix popus stays showed, so remove here */
-    if ( element_number == TRANSACTION_FORM_PARTY
-     ||
-     element_number == TRANSACTION_FORM_CATEGORY
-     ||
-     element_number == TRANSACTION_FORM_BUDGET )
-    {
-        widget = bet_form_widget_get_widget ( element_number );
-        gtk_combofix_hide_popup ( GTK_COMBOFIX ( widget ) );
-    }
-
-    /* string will be filled only if the field is empty */
-    string = NULL;
-    switch ( element_number )
-    {
-    case TRANSACTION_FORM_DATE :
-        if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_DATE );
-        break;
-
-    case TRANSACTION_FORM_PARTY :
-        if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_PARTY );
-        break;
-
-    case TRANSACTION_FORM_DEBIT :
-        /* we change the payment method to adapt it for the debit */
-        if ( strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-        {
-        /* empty the credit */
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_CREDIT );
-        if ( !gsb_form_widget_check_empty ( widget ) )
-        {
-            gtk_entry_set_text ( GTK_ENTRY ( widget ),
-                        gsb_form_widget_get_name ( TRANSACTION_FORM_CREDIT ) );
-            gsb_form_widget_set_empty ( widget, TRUE );
-        }
-
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_TYPE );
-
-        /* change the method of payment if necessary
-         * (if grey, it's a child of split so do nothing) */
-        if ( widget
-            &&
-            GTK_WIDGET_SENSITIVE ( widget ) )
-        {
-            /* change the signe of the method of payment and the contra */
-            if ( gsb_payment_method_get_combo_sign ( widget ) == GSB_PAYMENT_CREDIT )
-            {
-                gsb_payment_method_create_combo_list ( widget,
-                                            GSB_PAYMENT_DEBIT,
-                                            account_number, 0, FALSE );
-            }
-        }
-        gsb_form_check_auto_separator (entry);
-        }
-        else
-        {
-            /* si pas de nouveau débit on essaie de remettre l'ancien crédit */
-            if ( (string = gsb_form_widget_get_old_credit ( ) ) )
-            {
-                GtkWidget *widget_prov;
-
-                widget_prov = bet_form_widget_get_widget ( TRANSACTION_FORM_CREDIT );
-
-                gtk_entry_set_text ( GTK_ENTRY ( widget_prov ), string );
-                gsb_form_widget_set_empty ( widget_prov, FALSE );
-                g_free ( string );
-
-                widget = bet_form_widget_get_widget ( TRANSACTION_FORM_TYPE );
-                if ( widget
-                     &&
-                     GTK_WIDGET_SENSITIVE ( widget ) )
-                {
-                    /* change the signe of the method of payment and the contra */
-                    if ( gsb_payment_method_get_combo_sign ( widget ) == GSB_PAYMENT_DEBIT )
-                    {
-                        gsb_payment_method_create_combo_list ( widget,
-                                            GSB_PAYMENT_CREDIT,
-                                            account_number, 0, FALSE );
-                    }
-                }
-            }
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_DEBIT );
-        }
-        break;
-
-    case TRANSACTION_FORM_CREDIT :
-        /* we change the payment method to adapt it for the debit */
-        if ( strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-        {
-        /* empty the credit */
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_DEBIT );
-        if ( !gsb_form_widget_check_empty ( widget ) )
-        {
-            gtk_entry_set_text ( GTK_ENTRY ( widget ),
-                        gsb_form_widget_get_name ( TRANSACTION_FORM_DEBIT ) );
-            gsb_form_widget_set_empty ( widget, TRUE );
-        }
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_TYPE);
-
-        /* change the method of payment if necessary
-         * (if grey, it's a child of split so do nothing) */
-        if ( widget
-             &&
-             GTK_WIDGET_SENSITIVE (widget))
-        {
-            /* change the signe of the method of payment and the contra */
-            if ( gsb_payment_method_get_combo_sign ( widget ) == GSB_PAYMENT_DEBIT )
-            {
-                gsb_payment_method_create_combo_list ( widget,
-                        GSB_PAYMENT_CREDIT,
-                        account_number, 0, FALSE );
-            }
-        }
-        gsb_form_check_auto_separator (entry);
-        }
-        else
-        {
-            /* si pas de nouveau credit on essaie de remettre l'ancien débit */
-            if ( (string = gsb_form_widget_get_old_debit ( ) ) )
-            {
-                GtkWidget * widget_prov;
-
-                widget_prov = bet_form_widget_get_widget ( TRANSACTION_FORM_DEBIT );
-
-                gtk_entry_set_text ( GTK_ENTRY ( widget_prov ), string );
-                gsb_form_widget_set_empty ( widget_prov, FALSE );
-                g_free ( string );
-
-                widget = bet_form_widget_get_widget ( TRANSACTION_FORM_TYPE );
-                if ( widget
-                     &&
-                     GTK_WIDGET_SENSITIVE ( widget ) )
-                {
-                    /* change the signe of the method of payment and the contra */
-                    if ( gsb_payment_method_get_combo_sign ( widget ) == GSB_PAYMENT_CREDIT )
-                    {
-                        gsb_payment_method_create_combo_list ( widget,
-                                            GSB_PAYMENT_DEBIT,
-                                            account_number, 0, FALSE );
-                    }
-                }
-            }
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_CREDIT );
-        }
-        break;
-
-    case TRANSACTION_FORM_CATEGORY :
-        if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_CATEGORY );
-        break;
-
-    case TRANSACTION_FORM_BUDGET :
-        if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_BUDGET );
-        break;
-
-    case TRANSACTION_FORM_NOTES :
-        if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-            string = _(gsb_form_widget_get_name ( element_number ) );
-        break;
-
-    default :
-        break;
-
-    }
-
-    /* if string is not NULL, the entry is empty so set the empty field to TRUE */
-    if ( string )
-    {
-        switch ( element_number)
-        {
-            case TRANSACTION_FORM_PARTY :
-            case TRANSACTION_FORM_CATEGORY :
-            case TRANSACTION_FORM_BUDGET :
-            /* need to work with the combofix to avoid some signals if we work
-             * directly on the entry */
-            gtk_combofix_set_text ( GTK_COMBOFIX (
-                        bet_form_widget_get_widget ( element_number ) ),
-                        _(string) );
-            break;
-
-            default:
-                gtk_entry_set_text ( GTK_ENTRY ( entry ), string );
-            break;
-        }
-        gsb_form_widget_set_empty ( entry, TRUE );
-    }
-
-    return FALSE;
-}
-
-
-/**
- * return the widget of the element_number given in param,
- * for the bet scheduler part of the form
- *
- * \param element_number
- *
- * \return a GtkWidget * or NULL
- * */
-GtkWidget *bet_form_scheduler_get_element_widget ( gint element_number )
-{
-    return gsb_form_get_element_widget_from_list ( element_number,
-                        bet_schedul_element_list );
-}
-
-
-/**
- * return the pointer to the widget corresponding to the given element
- *
- * \param element_number
- *
- * \return the widget or NULL
- * */
-GtkWidget *bet_form_widget_get_widget ( gint element_number )
-{
-    return gsb_form_get_element_widget_from_list ( element_number,
-                        bet_form_list_widgets );
-}
-
-
-/**
- * check if the given element can receive focus
- *
- * \param element_number
- *
- * \return TRUE : can receive focus, or FALSE
- * */
-gboolean bet_form_widget_can_focus ( gint element_number )
-{
-    GtkWidget *widget;
-
-    /* if element_number is -1 or -2, the iteration while must
-     * stop, so return TRUE */
-    if ( element_number == -1
-	 ||
-	 element_number == -2 )
-        return TRUE;
-
-    widget = bet_form_widget_get_widget (element_number);
-
-    if ( !widget )
-        return FALSE;
-
-    if ( !GTK_WIDGET_VISIBLE ( widget ) )
-        return FALSE;
-
-    if ( !GTK_WIDGET_SENSITIVE ( widget ) )
-        return FALSE;
-
-    if ( !(GTK_IS_COMBOFIX ( widget )
-	   ||
-	   GTK_IS_ENTRY ( widget )
-	   ||
-	   GTK_IS_BUTTON ( widget )
-	   ||
-	   GTK_IS_COMBO_BOX ( widget ) ) )
-        return FALSE;
-
-        return TRUE;
-}
-
-
-static GtkWidget *bet_form_widget_get_next_element ( gint element_number )
-{
-    gint row;
-    gint column;
-    gint return_value_number = 0;
-    gint form_column_number = 6;
-    gint form_row_number = 4;
-    gboolean trouve = FALSE;
-
-    for ( row=0 ; row < bet_form->rows; row++ )
-    {
-        for ( column=0 ; column < bet_form->columns ; column++ )
-        {
-            if ( bet_form->form_table[row][column] == element_number )
-            {
-                trouve = TRUE;
-                break;
-            }
-        }
-        if ( trouve )
-            break;
-    }
-
-    while ( !bet_form_widget_can_focus ( return_value_number ) )
-    {
-            if ( column == ( form_column_number - 1)
-                 &&
-                 row == ( form_row_number - 1 ) )
-            {
-                /* we are on the bottom right, we finish the edition or
-                 * go to the upper left */
-                if ( !conf.entree )
-                {
-                    return_value_number = -2;
-                    continue;
-                }
-                column = -1;
-                row = 0;
-            }
-
-            if ( ++column == form_column_number )
-            {
-                column = 0;
-                row++;
-            }
-            return_value_number = bet_form->form_table[row][column];
-
-    }
-
-    /* return value */
-    return gsb_form_get_element_widget_from_list ( return_value_number,
-                        bet_form_list_widgets );
-}
-
-
-/**
- * called when press a key on an element of the form
- *
- * \param widget wich receive the signal
- * \param ev
- * \param ptr_origin a pointer number of the element
- *
- * \return FALSE
- * */
-gboolean bet_form_key_press_event ( GtkWidget *widget,
-                        GdkEventKey *ev,
-                        gint *ptr_origin )
-{
-    gint element_number;
-    gint account_number;
-    GtkWidget *widget_suivant;
-    GtkWidget *widget_prov;
-
-    element_number = GPOINTER_TO_INT (ptr_origin);
-    account_number = gsb_form_get_account_number ();
-
-    /* if conf.entree = 1, entry finish the transaction, else does as tab */
-    if ( !conf.entree
-	 &&
-	 ( ev -> keyval == GDK_Return
-	   ||
-	   ev -> keyval == GDK_KP_Enter ) )
-        ev->keyval = GDK_Tab ;
-
-    switch ( ev -> keyval )
-    {
-    case GDK_1:
-    case GDK_2:
-    case GDK_3:
-    case GDK_4:
-    case GDK_5:
-    case GDK_6:
-    case GDK_7:
-    case GDK_8:
-    case GDK_9:
-    case GDK_0:
-        switch ( element_number )
-        {
-        case TRANSACTION_FORM_DEBIT:
-            widget_prov = bet_form_widget_get_widget ( TRANSACTION_FORM_CREDIT );
-            if ( !gsb_form_widget_check_empty ( widget_prov ) )
-            {
-                gtk_entry_set_text ( GTK_ENTRY ( widget_prov ),
-                         gsb_form_widget_get_name ( TRANSACTION_FORM_CREDIT ) );
-                gsb_form_widget_set_empty ( widget_prov, TRUE );
-            }
-            break;
-        case TRANSACTION_FORM_CREDIT:
-            widget_prov = bet_form_widget_get_widget ( TRANSACTION_FORM_DEBIT );
-            if ( !gsb_form_widget_check_empty ( widget_prov ) )
-            {
-                gtk_entry_set_text ( GTK_ENTRY (widget_prov),
-                            gsb_form_widget_get_name (TRANSACTION_FORM_DEBIT));
-                gsb_form_widget_set_empty ( widget_prov, TRUE );
-            }
-            break;
-        }
-        break;
-	case GDK_Escape :
-	    gsb_form_escape_form ();
-	    break;
-
-	case GDK_KP_Enter :
-	case GDK_Return :
-
-	    break;
-
-	case GDK_KP_Add:
-	case GDK_plus:
-	case GDK_equal:		/* This should make all our US users happy */
-
-	    /* increase the check of 1 */
-	    if (element_number == TRANSACTION_FORM_CHEQUE)
-	    {
-		increment_decrement_champ ( widget,
-					    1 );
-		return TRUE;
-	    }
-	    break;
-
-	case GDK_KP_Subtract:
-	case GDK_minus:
-
-	    /* decrease the check of 1 */
-	    if (element_number == TRANSACTION_FORM_CHEQUE)
-	    {
-		increment_decrement_champ ( widget,
-					    -1 );
-		return TRUE;
-	    }
-	    break;
-
-    	case GDK_Tab :
-        widget_suivant = bet_form_widget_get_next_element ( element_number );
-
-        if ( GTK_IS_COMBOFIX ( widget_suivant ) )
-            gtk_widget_grab_focus ( GTK_COMBOFIX ( widget_suivant ) -> entry );
-        else
-            gtk_widget_grab_focus ( widget_suivant );
-
-        break;
-    }
-
-    return FALSE;
-}
-
-
-/**
- * called when we press the button in an entry field in
- * the form
- *
- * \param entry wich receive the signal
- * \param ev can be NULL
- * \param ptr_origin a pointer to int on the element_number
- *
- * \return FALSE
- * */
-gboolean bet_form_button_press_event ( GtkWidget *entry,
-                        GdkEventButton *ev,
-                        gint *ptr_origin )
-{
-    GtkWidget *date_entry;
-    gint element_number;
-
-
-    element_number = GPOINTER_TO_INT ( ptr_origin );
-
-	/* set the current date into the date entry */
-	date_entry = bet_form_widget_get_widget (TRANSACTION_FORM_DATE);
-	if ( gsb_form_widget_check_empty ( date_entry ) )
-	{
-        gtk_entry_set_text ( GTK_ENTRY ( date_entry ), gsb_date_today ( ) );
-	    gsb_form_widget_set_empty ( date_entry, FALSE );
-	}
-
-    return FALSE;
-}
-
-
-/**
- * récupère le tiers
- *
- *
- * \return FALSE
- * */
-static gboolean bet_future_get_payee_data ( GtkWidget *widget,
-                        gint struct_type,
-                        gpointer *value )
-{
-    const gchar *string;
-    struct_transfert_data *sd = (struct_transfert_data *) value;
-
-    string = gtk_combofix_get_text ( GTK_COMBOFIX ( widget ) );
-    if ( string && strlen ( string ) > 0 )
-    {
-        if ( struct_type == 1 )
-            sd->main_payee_number = gsb_data_payee_get_number_by_name ( string, FALSE );
-        else
-            sd->card_payee_number = gsb_data_payee_get_number_by_name ( string, FALSE );
-    }
-    else
-    {
-        if ( struct_type == 1 )
-            sd->main_payee_number = 0;
-        else
-            sd->card_payee_number = 0;
-    }
-
-    return FALSE;
-}
-
-
-/**
- * récupère le moyen de payement
- *
- *
- * \return FALSE
- * */
-static gboolean bet_future_get_payment_data ( GtkWidget *widget,
-                        gpointer *value )
-{
-    gint payment_number;
-    struct_transfert_data *sd = (struct_transfert_data *) value;
-
-    payment_number = gsb_payment_method_get_selected_number ( widget );
-    if ( payment_number > 0 )
-    {
-        sd->main_payment_number = payment_number;
-    }
-    else
-    {
-        sd->main_payee_number = gsb_data_account_get_default_debit ( sd->account_number );
-    }
-
-    return FALSE;
-}
-
-
-/**
- * récupère la catégorie et la sous catégorie
- *
- *
- * \return FALSE
- * */
-static gboolean bet_future_get_category_data ( GtkWidget *widget,
-                        gint struct_type,
-                        gpointer *value )
-{
-    const gchar *string;
-    gchar **tab_char;
-    gint category_number = 0;
-    gint sub_category_number = 0;
-
-    string = gtk_combofix_get_text ( GTK_COMBOFIX ( widget ) );
-
-    if ( struct_type == 0 )
-    {
-        struct_futur_data *sd = ( struct_futur_data *) value;
-
-        if ( string && strlen ( string ) > 0 )
-        {
-            tab_char = g_strsplit ( string, " : ", 2 );
-            if ( my_strcasecmp ( tab_char[0], _("Transfer") ) == 0 )
-            {
-                sd -> is_transfert = TRUE;
-                sd -> account_transfert =  gsb_data_account_get_no_account_by_name ( tab_char[1] );
-            }
-            else
-            {
-                category_number = gsb_data_category_get_number_by_name (
-                                tab_char[0], FALSE, 0 );
-
-                if ( tab_char[1] && strlen ( tab_char[1] ) )
-                    sub_category_number = gsb_data_category_get_sub_category_number_by_name (
-                                category_number, tab_char[1], FALSE );
-                else
-                    sub_category_number = 0;
-            }
-
-            g_strfreev ( tab_char );
-        }
-        else
-        {
-            category_number = 0;
-            category_number = 0;
-        }
-
-        sd -> category_number = category_number;
-        sd -> sub_category_number = sub_category_number;
-    }
-    else if ( struct_type == 1 )
-    {
-        struct_transfert_data *sd = ( struct_transfert_data *) value;
-
-        if ( string && strlen ( string ) > 0 )
-        {
-            tab_char = g_strsplit ( string, " : ", 2 );
-            category_number = gsb_data_category_get_number_by_name (
-                            tab_char[0], FALSE, 0 );
-
-            if ( tab_char[1] && strlen ( tab_char[1] ) )
-                sub_category_number = gsb_data_category_get_sub_category_number_by_name (
-                            category_number, tab_char[1], FALSE );
-            else
-                sub_category_number = 0;
-
-            g_strfreev ( tab_char );
-        }
-        else
-        {
-            category_number = 0;
-            category_number = 0;
-        }
-
-        sd->main_category_number = category_number;
-        sd->main_sub_category_number = sub_category_number;
-    }
-    else if ( struct_type == 2 )
-    {
-        /* on est toujours avec une struture transfert mais on récupère les éléments pour le compte carte */
-        struct_transfert_data *sd = ( struct_transfert_data *) value;
-
-        if ( string && strlen ( string ) > 0 )
-        {
-            tab_char = g_strsplit ( string, " : ", 2 );
-            category_number = gsb_data_category_get_number_by_name (
-                            tab_char[0], FALSE, 0 );
-
-            if ( tab_char[1] && strlen ( tab_char[1] ) )
-                sub_category_number = gsb_data_category_get_sub_category_number_by_name (
-                            category_number, tab_char[1], FALSE );
-            else
-                sub_category_number = 0;
-
-            g_strfreev ( tab_char );
-        }
-        else
-        {
-            category_number = 0;
-            category_number = 0;
-        }
-
-        sd->card_category_number = category_number;
-        sd->card_sub_category_number = sub_category_number;
-    }
-
-    return FALSE;
-}
-
-
-/**
- * récupère l'imputation et la sous imputation budgétaire
- *
- *
- * \return FALSE
- * */
-static gboolean bet_future_get_budget_data ( GtkWidget *widget,
-                        gint struct_type,
-                        gpointer *value )
-{
-    const gchar *string;
-    gchar **tab_char;
-    gint budgetary_number;
-    gint sub_budgetary_number;
-
-    string = gtk_combofix_get_text ( GTK_COMBOFIX ( widget ) );
-    if ( string && strlen ( string ) > 0 )
-    {
-        tab_char = g_strsplit ( string, " : ", 2 );
-        budgetary_number = gsb_data_budget_get_number_by_name (
-                        tab_char[0], FALSE, 0 );
-
-        if ( tab_char[1] && strlen ( tab_char[1] ) )
-            sub_budgetary_number = gsb_data_budget_get_sub_budget_number_by_name (
-                        budgetary_number, tab_char[1], FALSE );
-        else
-            sub_budgetary_number = 0;
-
-        g_strfreev ( tab_char );
-    }
-    else
-    {
-        budgetary_number = 0;
-        sub_budgetary_number = 0;
-    }
-
-    if ( struct_type == 0 )
-    {
-        struct_futur_data *sd = ( struct_futur_data *) value;
-
-        sd -> budgetary_number = budgetary_number;
-        sd -> sub_budgetary_number = sub_budgetary_number;
-    }
-    else if ( struct_type == 1 )
-    {
-        struct_transfert_data *sd = ( struct_transfert_data *) value;
-
-        sd->main_budgetary_number = budgetary_number;
-        sd->main_sub_budgetary_number = sub_budgetary_number;
-    }
-
-    return FALSE;
-}
-
-
-/**
- * initialise les données du formulaire
- *
- *
- *
- * */
-gboolean bet_future_set_form_data_from_line ( gint account_number,
-                        gint number  )
-{
-    GtkWidget *widget;
-    GHashTable *future_list;
-    gchar *key;
-    const gchar *tmp_str;
-    struct_futur_data *scheduled;
-
-    if ( account_number == 0 )
-        key = g_strconcat ("0:", utils_str_itoa ( number ), NULL );
-    else
-        key = g_strconcat ( utils_str_itoa ( account_number ), ":",
-                        utils_str_itoa ( number ), NULL );
-
-    future_list = bet_data_future_get_list ( );
-
-    scheduled = g_hash_table_lookup ( future_list, key );
-    if ( scheduled == NULL )
-        return FALSE;
-
-    /* On traite les données de la planification */
-    widget = bet_form_scheduler_get_element_widget ( SCHEDULED_FORM_FREQUENCY_BUTTON );
-    gsb_combo_box_set_index ( widget, scheduled -> frequency );
-    gtk_widget_set_sensitive ( widget, FALSE );
-
-    if ( scheduled -> frequency > 0 )
-    {
-        if ( scheduled -> limit_date && g_date_valid ( scheduled -> limit_date ) )
-        {
-            widget = bet_form_scheduler_get_element_widget ( SCHEDULED_FORM_LIMIT_DATE );
-            gsb_form_widget_set_empty ( widget, FALSE );
-            gsb_calendar_entry_set_date ( widget, scheduled -> limit_date );
-            gtk_widget_set_sensitive ( widget, FALSE );
-        }
-
-        if ( scheduled -> user_entry > 0 )
-        {
-            widget = bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_ENTRY );
-            gsb_form_widget_set_empty ( widget, FALSE );
-            gtk_entry_set_text ( GTK_ENTRY ( widget ),
-                        utils_str_itoa ( scheduled -> user_entry ) );
-            gtk_widget_set_sensitive ( widget, FALSE );
-
-            widget = bet_form_scheduler_get_element_widget (
-                    SCHEDULED_FORM_FREQUENCY_USER_BUTTON );
-            gsb_combo_box_set_index ( widget, scheduled -> user_interval );
-            gtk_widget_set_sensitive ( widget, FALSE );
-        }
-    }
-
-    /* On traite les données de transaction */
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_DATE );
-    gsb_calendar_entry_set_date ( widget, scheduled -> date );
-    gsb_form_widget_set_empty ( widget, FALSE );
-
-    if ( scheduled -> fyear_number > 0 )
-    {
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_EXERCICE );
-        gsb_fyear_set_combobox_history ( widget, scheduled -> fyear_number );
-    }
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_PARTY );
-    tmp_str = gsb_data_payee_get_name ( scheduled -> party_number, TRUE );
-    if ( tmp_str && strlen ( tmp_str ) )
-    {
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), tmp_str );
-        gtk_editable_set_position ( GTK_EDITABLE ( GTK_COMBOFIX ( widget ) -> entry ), 0 );
-    }
-
-    if ( scheduled -> amount.mantissa < 0 )
-    {
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_DEBIT );
-        gtk_entry_set_text ( GTK_ENTRY ( widget ), utils_real_get_string (
-                        gsb_real_opposite ( scheduled -> amount ) ) );
-    }
-    else
-    {
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_CREDIT );
-        gtk_entry_set_text ( GTK_ENTRY ( widget ), utils_real_get_string ( scheduled -> amount ) );
-    }
-    gsb_form_widget_set_empty ( widget, FALSE );
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_TYPE );
-    gsb_payment_method_set_combobox_history ( widget, scheduled -> payment_number, TRUE );
-
-    if ( scheduled -> category_number > 0 )
-    {
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_CATEGORY );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
-                        gsb_data_category_get_name ( scheduled -> category_number,
-                        scheduled -> sub_category_number, NULL) );
-    }
-    else if ( scheduled -> is_transfert )
-    {
-        gchar *tmp_str;
-
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_CATEGORY );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-        tmp_str = g_strconcat ( _("Transfer"), " : ",
-                        gsb_data_account_get_name ( scheduled -> account_transfert ),
-                        NULL );
-
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), tmp_str );
-        g_free ( tmp_str );
-    }
-
-    if ( scheduled -> budgetary_number > 0 )
-    {
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_BUDGET );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
-                        gsb_data_budget_get_name (  scheduled -> budgetary_number,
-                        scheduled -> sub_budgetary_number, NULL ) );
-    }
-
-    if ( scheduled -> notes && strlen ( scheduled -> notes ) > 0 )
-    {
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_NOTES );
-        gsb_form_widget_set_empty ( widget, FALSE );
-        gtk_entry_set_text ( GTK_ENTRY ( widget ), scheduled -> notes );
-    }
-
-    return TRUE;
-}
-
-
-/**
- * récupère les données du formulaire
- *
- *
- *
- * */
-gboolean bet_future_take_data_from_form (  struct_futur_data *scheduled )
-{
-    GtkWidget *widget;
-
-    /* données liées au compte */
-    scheduled -> account_number = gsb_gui_navigation_get_current_account ( );
-
-    /* On traite les données de la planification */
-    widget = bet_form_scheduler_get_element_widget ( SCHEDULED_FORM_FREQUENCY_BUTTON );
-    scheduled -> frequency = gsb_combo_box_get_index ( widget );
-
-    switch ( scheduled -> frequency )
-    {
-        case 1:
-        case 2:
-        case 3:
-        case 4:
-        case 5:
-            widget = bet_form_scheduler_get_element_widget ( SCHEDULED_FORM_LIMIT_DATE );
-            if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-                scheduled -> limit_date = gsb_calendar_entry_get_date ( widget );
-            else
-                scheduled -> limit_date = NULL;
-            break;
-        case 6:
-            widget = bet_form_scheduler_get_element_widget ( SCHEDULED_FORM_LIMIT_DATE );
-            if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-                scheduled -> limit_date = gsb_calendar_entry_get_date ( widget );
-            else
-                scheduled -> limit_date = NULL;
-
-            widget = bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_ENTRY );
-            if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-                scheduled -> user_entry = utils_str_atoi (
-                        gtk_entry_get_text ( GTK_ENTRY ( widget ) ) );
-            if ( scheduled -> user_entry )
-            {
-                widget = bet_form_scheduler_get_element_widget (
-                        SCHEDULED_FORM_FREQUENCY_USER_BUTTON );
-                scheduled -> user_interval = gsb_combo_box_get_index ( widget );
-            }
-            else
-                return FALSE;
-    }
-
-    /* On traite les données de transaction */
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_DATE );
-    if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-    {
-        GDate *date_tomorrow;
-
-        date_tomorrow = gsb_date_tomorrow ( );
-        scheduled -> date = gsb_calendar_entry_get_date ( widget );
-        if ( scheduled -> date == NULL
-         ||
-         g_date_compare ( scheduled -> date, date_tomorrow ) < 0 )
-        {
-            g_date_free ( date_tomorrow );
-            return FALSE;
-        }
-        g_date_free ( date_tomorrow );
-    }
-    else
-        return FALSE;
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_EXERCICE );
-    if ( gsb_form_widget_check_empty( widget ) == FALSE )
-        scheduled -> fyear_number = gsb_fyear_get_fyear_from_combobox ( widget,
-                        scheduled -> date );
-    else
-        scheduled -> fyear_number = 0;
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_PARTY );
-    if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-        scheduled -> party_number = gsb_data_payee_get_number_by_name (
-                        gtk_combofix_get_text ( GTK_COMBOFIX ( widget ) ), TRUE );
-    else
-        scheduled -> party_number = 0;
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_DEBIT );
-    if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-    {
-        gsb_form_check_auto_separator ( widget );
-        scheduled -> amount = gsb_real_opposite ( utils_real_get_calculate_entry ( widget ) );
-    }
-    else
-    {
-        widget = bet_form_widget_get_widget ( TRANSACTION_FORM_CREDIT );
-        if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-        {
-            gsb_form_check_auto_separator ( widget );
-            scheduled -> amount = utils_real_get_calculate_entry ( widget );
-        }
-        else
-            return FALSE;
-    }
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_TYPE );
-    if ( gsb_form_widget_check_empty( widget ) == FALSE )
-        scheduled -> payment_number =
-                        gsb_payment_method_get_selected_number ( widget );
-    else
-        scheduled -> payment_number = 0;
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_CATEGORY );
-    if ( gsb_form_widget_check_empty( widget ) == FALSE )
-        bet_future_get_category_data ( widget, 0, ( gpointer ) scheduled );
-    else
-    {
-        scheduled -> category_number = 0;
-        scheduled -> sub_category_number = 0;
-    }
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_BUDGET );
-    if ( gsb_form_widget_check_empty( widget ) == FALSE )
-        bet_future_get_budget_data ( widget, 0, ( gpointer ) scheduled );
-    else
-    {
-        scheduled -> budgetary_number = 0;
-        scheduled -> sub_budgetary_number = 0;
-    }
-
-    widget = bet_form_widget_get_widget ( TRANSACTION_FORM_NOTES );
-    if ( gsb_form_widget_check_empty( widget ) == FALSE )
-        scheduled -> notes = g_strdup ( gtk_entry_get_text ( GTK_ENTRY ( widget ) ) );
-    else
-        scheduled -> notes = NULL;
-
-    return TRUE;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-gboolean bet_future_modify_line ( gint account_number,
-                        gint number,
-                        gint mother_row )
-{
-    gchar *tmp_str;
-    gint result;
-
-    if ( bet_futur_dialog == NULL )
-    {
-        bet_futur_dialog = bet_future_create_dialog ( account_number );
-    }
-    else
-    {
-        bet_form_clean ( account_number );
-        gtk_widget_show ( bet_futur_dialog );
-    }
-
-     /* init data */
-    bet_future_set_form_data_from_line ( account_number, number  );
-
-dialog_return:
-    result = gtk_dialog_run ( GTK_DIALOG ( bet_futur_dialog ) );
-
-    if ( result == GTK_RESPONSE_OK )
-    {
-        struct_futur_data *scheduled;
-
-        scheduled = struct_initialise_bet_future ( );
-
-        if ( !scheduled )
-        {
-            dialogue_error_memory ();
-            gtk_widget_hide ( bet_futur_dialog );
-            return FALSE;
-        }
-
-        if ( bet_future_take_data_from_form ( scheduled ) == FALSE )
-        {
-            tmp_str = g_strdup ( _("Error: the frequency defined by the user or the amount is "
-                                 "not specified or the date is invalid.") );
-            dialogue_warning_hint ( tmp_str, _("One field is not filled in") );
-            g_free ( tmp_str );
-            goto dialog_return;
-        }
-        else
-        {
-            scheduled -> number = number;
-            scheduled -> mother_row = mother_row;
-            bet_data_future_modify_lines ( scheduled );
-        }
-
-        gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
-        bet_data_update_bet_module ( account_number, GSB_ESTIMATE_PAGE );
-    }
-
-    gtk_widget_hide ( bet_futur_dialog );
-
-    return FALSE;
-}
-
-
-/* BET TRANSFERT */
-/**
- * sensibilise ou insensibilise la boite en fonction de l'état du bouton
- *
- * \param button
- * \param box
- *
- * \return
- * */
-static void bet_transfert_replace_data_toggle ( GtkToggleButton *button,
-                        GtkWidget *box )
-{
-    if ( gtk_toggle_button_get_active ( button ) )
-    {
-        gtk_widget_set_sensitive ( box, TRUE );
-    }
-    else
-    {
-        GtkWidget *widget;
-
-        widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_direct_debit" );
-        if ( GTK_TOGGLE_BUTTON ( widget ) == button )
-            widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_replace_data" );
-
-        if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( widget ) ) == FALSE )
-            gtk_widget_set_sensitive ( box, FALSE );
-    }
-}
-
-
-/**
- * retourne une list_store avec la liste des comptes concernés
- *
- *
- *
- * */
-static GtkListStore *bet_transfert_create_account_list_store ( gint account_number )
-{
-    GtkListStore *list_store;
-    GSList *tmp_list;
-    gint nbre_rows = 0;
-
-    /* create the model */
-    list_store = gtk_list_store_new ( 4,
-                        G_TYPE_STRING,      /* account name */
-                        G_TYPE_STRING,      /* account kind : Cash account or Partial balance */
-                        G_TYPE_INT,         /* account_number or partial_balance_number */
-                        G_TYPE_BOOLEAN );   /* FALSE = account, TRUE = partial balance */
-
-    /* populate the model if necessary */
-    tmp_list = gsb_data_account_get_list_accounts ( );
-    while ( tmp_list )
-    {
-        gint tmp_account_number;
-        gint bet_credit_card;
-        GtkTreeIter iter;
-
-        tmp_account_number = gsb_data_account_get_no_account ( tmp_list -> data );
-
-        if ( tmp_account_number != account_number )
-        {
-            bet_credit_card = gsb_data_account_get_bet_credit_card ( tmp_account_number );
-            if ( bet_credit_card )
-            {
-                kind_account kind;
-                gchar *tmp_str = NULL;
-
-                kind = gsb_data_account_get_kind ( tmp_account_number );
-                switch ( kind )
-                {
-                case GSB_TYPE_BANK:
-                    tmp_str = g_strdup ( _("Bank account") );
-                    break;
-                case GSB_TYPE_CASH:
-                    tmp_str = g_strdup ( _("Cash account") );
-                    break;
-                case GSB_TYPE_LIABILITIES:
-                    tmp_str = g_strdup ( _("Liabilities account") );
-                    break;
-                case GSB_TYPE_BALANCE:
-                    tmp_str = NULL;
-                    break;
-                case GSB_TYPE_ASSET:
-                    tmp_str = NULL;
-                    break;
-
-                }
-                gtk_list_store_append ( list_store, &iter );
-                gtk_list_store_set ( list_store,
-                        &iter,
-                        0, gsb_data_account_get_name ( tmp_account_number ),
-                        1, tmp_str,
-                        2, tmp_account_number,
-                        3, FALSE,
-                        -1 );
-                nbre_rows ++;
-                g_free ( tmp_str );
-            }
-        }
-
-        tmp_list = tmp_list -> next;
-    }
-
-    tmp_list = gsb_data_partial_balance_get_list ( );
-    while ( tmp_list )
-    {
-        gint tmp_number;
-        GtkTreeIter iter;
-        const gchar *liste_cptes;
-        gchar **tab;
-        gint bet_credit_card = 0;
-        gint i;
-
-        tmp_number = gsb_data_partial_balance_get_number ( tmp_list -> data );
-
-        liste_cptes = gsb_data_partial_balance_get_liste_cptes ( tmp_number );
-        tab = g_strsplit ( liste_cptes, ";", 0 );
-        for ( i = 0; i < g_strv_length ( tab ); i++ )
-        {
-            gint tmp_account_number;
-
-            tmp_account_number = utils_str_atoi ( tab[i] );
-            bet_credit_card = gsb_data_account_get_bet_credit_card ( tmp_account_number );
-        }
-
-        g_strfreev ( tab );
-
-        if ( bet_credit_card )
-        {
-            gtk_list_store_append ( list_store, &iter );
-            gtk_list_store_set ( list_store,
-                        &iter,
-                        0, gsb_data_partial_balance_get_name ( tmp_number ),
-                        1, _("Partial balance"),
-                        2, tmp_number,
-                        3, TRUE,
-                        -1 );
-                nbre_rows ++;
-        }
-
-        tmp_list = tmp_list -> next;
-    }
-
-    if ( nbre_rows == 0 )
-        return NULL;
-    else
-        return list_store;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-static GtkWidget *bet_transfert_create_dialog ( gint account_number )
-{
-    GtkWidget *dialog;
-    GtkWidget *main_vbox;
-    GtkWidget *vbox;
-    GtkWidget *paddingbox;
-    GtkWidget *hbox;
-    GtkWidget *date_bascule;
-    GtkWidget *date_entry;
-    GtkWidget *button;
-    GtkWidget *combo;
-    GtkWidget *sw;
-    GtkWidget *tree_view;
-    GtkWidget *label;
-    GtkWidget *icon;
-
-    /* Create the dialog */
-    dialog = gtk_dialog_new_with_buttons ( _("Select an account"),
-                        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 );
-    gtk_dialog_set_default_response ( GTK_DIALOG ( dialog ), GTK_RESPONSE_OK );
-
-    main_vbox = gtk_vbox_new ( FALSE, 0 );
-    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog )->vbox ), main_vbox, TRUE, TRUE, 0 );
-    gtk_container_set_border_width ( GTK_CONTAINER ( main_vbox ), 12 );
-
-    /* list of accounts */
-    paddingbox = new_paddingbox_with_title ( main_vbox, FALSE,  _("List of accounts") );
-
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, TRUE, TRUE, 0 );
-
-    sw = gtk_scrolled_window_new (NULL, NULL);
-    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW ( sw ),
-                        GTK_SHADOW_ETCHED_IN);
-    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
-                        GTK_POLICY_AUTOMATIC,
-                        GTK_POLICY_ALWAYS);
-    gtk_box_pack_start ( GTK_BOX ( hbox ), sw, TRUE,TRUE, 0 );
-
-    /* create the account list */
-    tree_view = bet_transfert_create_account_list_part ( dialog, account_number );
-
-    if ( tree_view == NULL )
-        return NULL;
-
-    g_object_set_data ( G_OBJECT ( dialog ), "tree_view", tree_view );
-
-    gtk_container_add (GTK_CONTAINER ( sw ), tree_view );
-    gtk_container_set_resize_mode (GTK_CONTAINER ( sw ), GTK_RESIZE_PARENT );
-
-    /* Account with deferred debit card */
-    paddingbox = new_paddingbox_with_title ( main_vbox, FALSE, _("Deferred debit card") );
-
-    /* Effective Date */
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, TRUE, 0 );
-
-    label = gtk_label_new ( _("Date of beginning of period: ") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0 );
-
-    date_bascule = gsb_calendar_entry_new ( FALSE );
-    g_object_set_data ( G_OBJECT ( dialog ), "date_bascule", date_bascule );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), date_bascule, FALSE, FALSE, 0 );
-
-    /* création de la boite de sélection du tiers */
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, TRUE, 0 );
-
-    icon = utils_get_image_with_etat ( GTK_MESSAGE_ERROR, FALSE, _("This field is required"), NULL );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), icon, FALSE, FALSE, 0 );
-
-    combo = gtk_combofix_new ( gsb_data_payee_get_name_and_report_list () );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_force_category );
-    gtk_combofix_set_max_items ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_mixed_sort );
-
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, TRUE, TRUE, 0 );
-    gsb_form_widget_set_empty ( GTK_COMBOFIX ( combo ) -> entry, TRUE );
-    gtk_combofix_set_text ( GTK_COMBOFIX ( combo ), _("Payee") );
-
-    g_object_set_data ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ), "combo", combo );
-    g_object_set_data ( G_OBJECT ( combo ), "icon", icon );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_card_payee_combo", combo );
-
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-in-event",
-                        G_CALLBACK ( bet_form_entry_get_focus ),
-                        NULL );
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-out-event",
-                        G_CALLBACK ( bet_transfert_entry_lose_focus ),
-                        GINT_TO_POINTER ( TRANSACTION_FORM_PARTY ) );
-
-    /* saisie des (sous)catégories et (sous)IB */
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, TRUE, 0 );
-
-    icon = utils_get_image_with_etat ( GTK_MESSAGE_WARNING, FALSE, _("One of the two fields is recommended"), NULL );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), icon, FALSE, FALSE, 0 );
-
-    combo = gtk_combofix_new (
-                        gsb_data_category_get_name_list ( TRUE, TRUE, FALSE, FALSE ) );
-    gtk_widget_set_size_request ( combo, width, -1 );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_force_category );
-    gtk_combofix_set_max_items ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_mixed_sort );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
-
-    gsb_form_widget_set_empty ( GTK_COMBOFIX ( combo ) -> entry, TRUE );
-    gtk_combofix_set_text ( GTK_COMBOFIX ( combo ), _("Categories : Sub-categories") );
-    g_object_set_data ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ), "combo", combo );
-    g_object_set_data ( G_OBJECT ( combo ), "icon", icon );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_card_category_combo", combo );
-
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-in-event",
-                        G_CALLBACK ( bet_form_entry_get_focus ),
-                        NULL );
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-out-event",
-                        G_CALLBACK ( bet_transfert_entry_lose_focus ),
-                        GINT_TO_POINTER ( TRANSACTION_FORM_CATEGORY ) );
-
-    combo = gtk_combofix_new (
-                        gsb_data_budget_get_name_list ( TRUE, TRUE ) );
-    gtk_widget_set_size_request ( combo, width, -1 );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_force_category );
-    gtk_combofix_set_max_items ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_mixed_sort );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
-
-    gsb_form_widget_set_empty ( GTK_COMBOFIX ( combo ) -> entry, TRUE );
-    gtk_combofix_set_text ( GTK_COMBOFIX ( combo ), _("Budgetary line") );
-    g_object_set_data ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ), "combo", combo );
-    g_object_set_data ( G_OBJECT ( combo ), "icon", icon );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_card_budget_combo", combo );
-
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-in-event",
-                        G_CALLBACK ( bet_form_entry_get_focus ),
-                        NULL );
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-out-event",
-                        G_CALLBACK ( bet_transfert_entry_lose_focus ),
-                        GINT_TO_POINTER ( TRANSACTION_FORM_BUDGET ) );
-
-    /* Main account */
-    paddingbox = new_paddingbox_with_title ( main_vbox, FALSE, _("Main account") );
-
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, TRUE, 0 );
-
-    /* Effective Date */
-    label = gtk_label_new ( _("Effective date: ") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0 );
-
-    date_entry = gsb_calendar_entry_new ( FALSE );
-    g_object_set_data ( G_OBJECT ( dialog ), "date_entry", date_entry );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), date_entry, FALSE, FALSE, 0 );
-
-    /* boite verticale pour rendre actif ou non les champs ci-dessous */
-    vbox = gtk_vbox_new ( FALSE, 5 );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_main_vbox_data", vbox );
-
-    /* check button Automatic creation of the direct debit transaction */
-    button = gtk_check_button_new_with_label (
-                        _("Automatic creation of the direct debit transaction") );
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), FALSE );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_direct_debit", button );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
-
-    g_signal_connect ( G_OBJECT ( button ),
-                        "toggled",
-                        G_CALLBACK ( bet_transfert_replace_data_toggle ),
-                        vbox );
-
-    /* check button replace planned line */
-    button = gtk_check_button_new_with_label (
-                        _("Replacement of the scheduled transaction in the forecast") );
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), FALSE );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_replace_data", button );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
-
-    g_signal_connect ( G_OBJECT ( button ),
-                        "toggled",
-                        G_CALLBACK ( bet_transfert_replace_data_toggle ),
-                        vbox );
-
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), vbox, FALSE, FALSE, 0 );
-
-    /* création de la boite de sélection du tiers */
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox ), hbox, FALSE, TRUE, 0 );
-
-    icon = utils_get_image_with_etat ( GTK_MESSAGE_ERROR, FALSE, _("This field is required"), NULL );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), icon, FALSE, FALSE, 0 );
-
-    combo = gtk_combofix_new ( gsb_data_payee_get_name_and_report_list () );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_force_category );
-    gtk_combofix_set_max_items ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_mixed_sort );
-
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, TRUE, TRUE, 0 );
-    gsb_form_widget_set_empty ( GTK_COMBOFIX ( combo ) -> entry, TRUE );
-    gtk_combofix_set_text ( GTK_COMBOFIX ( combo ), _("Payee") );
-    g_object_set_data ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ), "combo", combo );
-    g_object_set_data ( G_OBJECT ( combo ), "icon", icon );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_main_payee_combo", combo );
-
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-in-event",
-                        G_CALLBACK ( bet_form_entry_get_focus ),
-                        NULL );
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-out-event",
-                        G_CALLBACK ( bet_transfert_entry_lose_focus ),
-                        GINT_TO_POINTER ( TRANSACTION_FORM_PARTY ) );
-
-    /* Création du mode de payement */
-    combo = gtk_combo_box_new ();
-    gsb_payment_method_create_combo_list ( combo,
-                        GSB_PAYMENT_DEBIT,
-                        account_number, 0, FALSE );
-    gtk_combo_box_set_active ( GTK_COMBO_BOX ( combo ), 0 );
-    gtk_widget_set_tooltip_text ( GTK_WIDGET ( combo ),
-                        _("Choose the method of payment") );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_main_payment_combo", combo );
-
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
-
-    /* saisie des (sous)catégories et (sous)IB */
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox ), hbox, FALSE, TRUE, 0 );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_hbox_replace_data", hbox );
-
-    icon = utils_get_image_with_etat ( GTK_MESSAGE_ERROR, FALSE, _("One of the two fields is required"), NULL );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), icon, FALSE, FALSE, 0 );
-
-    combo = gtk_combofix_new (
-                        gsb_data_category_get_name_list ( TRUE, TRUE, FALSE, FALSE ) );
-    gtk_widget_set_size_request ( combo, width, -1 );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_force_category );
-    gtk_combofix_set_max_items ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_mixed_sort );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
-    gsb_form_widget_set_empty ( GTK_COMBOFIX ( combo ) -> entry, TRUE );
-    gtk_combofix_set_text ( GTK_COMBOFIX ( combo ), _("Categories : Sub-categories") );
-    g_object_set_data ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ), "combo", combo );
-    g_object_set_data ( G_OBJECT ( combo ), "icon", icon );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_main_category_combo", combo );
-
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-in-event",
-                        G_CALLBACK ( bet_form_entry_get_focus ),
-                        NULL );
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-out-event",
-                        G_CALLBACK ( bet_transfert_entry_lose_focus ),
-                        GINT_TO_POINTER ( TRANSACTION_FORM_CATEGORY ) );
-
-    combo = gtk_combofix_new (
-                        gsb_data_budget_get_name_list ( TRUE, TRUE ) );
-    gtk_widget_set_size_request ( combo, width, -1 );
-    gtk_combofix_set_force_text ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_force_category );
-    gtk_combofix_set_max_items ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_max_item );
-    gtk_combofix_set_case_sensitive ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_case_sensitive );
-    gtk_combofix_set_mixed_sort ( GTK_COMBOFIX ( combo ),
-                        etat.combofix_mixed_sort );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), combo, FALSE, FALSE, 0 );
-    gsb_form_widget_set_empty ( GTK_COMBOFIX ( combo ) -> entry, TRUE );
-    gtk_combofix_set_text ( GTK_COMBOFIX ( combo ), _("Budgetary line") );
-    g_object_set_data ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ), "combo", combo );
-    g_object_set_data ( G_OBJECT ( combo ), "icon", icon );
-    g_object_set_data ( G_OBJECT ( dialog ), "bet_transfert_main_budget_combo", combo );
-
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-in-event",
-                        G_CALLBACK ( bet_form_entry_get_focus ),
-                        NULL );
-    g_signal_connect ( G_OBJECT ( GTK_COMBOFIX ( combo ) -> entry ),
-                        "focus-out-event",
-                        G_CALLBACK ( bet_transfert_entry_lose_focus ),
-                        GINT_TO_POINTER ( TRANSACTION_FORM_BUDGET ) );
-
-    /* on grise vbox */
-    gtk_widget_set_sensitive ( vbox, FALSE );
-
-    gtk_widget_show_all ( dialog );
-
-    /* return */
-    return dialog;
-}
-
-
-/**
- * récupère les données du formulaire dialog
- *
- * \param   structure transfert
- * \param   dialog
- *
- *\return TRUE if OK FALSE if error
- * */
-static gboolean bet_transfert_take_data (  struct_transfert_data *transfert,
-                        GtkWidget *dialog )
-{
-    GtkWidget *widget;
-    GtkTreeView *tree_view;
-    GtkTreeModel *model;
-    GtkTreeIter iter;
-    gint replace_account;
-    gint type;
-
-    tree_view = g_object_get_data ( G_OBJECT ( dialog ), "tree_view" );
-    gtk_tree_selection_get_selected ( GTK_TREE_SELECTION (
-                        gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ) ),
-                        &model, &iter );
-    gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter,
-                        2, &replace_account,
-                        3, &type,
-                        -1 );
-    transfert -> replace_account = replace_account;
-    transfert -> type = type;
-
-    /* Account with deferred debit card */
-    widget = g_object_get_data ( G_OBJECT ( dialog ), "date_bascule" );
-    if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-    {
-        transfert -> date_bascule = gsb_calendar_entry_get_date ( widget );
-        if ( transfert -> date_bascule == NULL )
-            return FALSE;
-    }
-    else
-        return FALSE;
-
-    widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_card_payee_combo" );
-    if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-    {
-        bet_future_get_payee_data ( widget, 2, ( gpointer ) transfert );
-        if ( transfert->card_payee_number == 0 )
-        {
-            printf ("bet_transfert_card_payee_combo est vide\n");
-            return FALSE;
-        }
-    }
-    else
-        return FALSE;
-
-    widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_card_category_combo" );
-    if ( gsb_form_widget_check_empty( widget ) == FALSE )
-    {
-        bet_future_get_category_data ( widget, 2, ( gpointer ) transfert );
-    }
-
-    widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_card_budget_combo" );
-    if ( gsb_form_widget_check_empty( widget ) == FALSE )
-    {
-        bet_future_get_budget_data ( widget, 2, ( gpointer ) transfert );
-    }
-
-    /* Main account */
-    widget = g_object_get_data ( G_OBJECT ( dialog ), "date_entry" );
-    if ( gsb_form_widget_check_empty ( widget ) == FALSE )
-    {
-        transfert -> date = gsb_calendar_entry_get_date ( widget );
-        if ( transfert -> date == NULL )
-            return FALSE;
-    }
-    else
-        return FALSE;
-
-    widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_replace_data" );
-    transfert -> replace_transaction = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( widget ) );
-
-    widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_direct_debit" );
-    transfert->direct_debit = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( widget ) );
-
-
-    if ( transfert->replace_transaction || transfert->direct_debit )
-    {
-        gboolean empty = TRUE;
-
-        widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_main_payee_combo" );
-        if ( gsb_form_widget_check_empty( widget ) == FALSE )
-        {
-            bet_future_get_payee_data ( widget, 1, ( gpointer ) transfert );
-            if ( transfert->main_payee_number > 0 )
-                empty = FALSE;
-        }
-
-        widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_main_payment_combo" );
-        bet_future_get_payment_data ( widget, ( gpointer ) transfert );
-
-        widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_main_category_combo" );
-        if ( gsb_form_widget_check_empty( widget ) == FALSE )
-        {
-            bet_future_get_category_data ( widget, 1, ( gpointer ) transfert );
-            empty = FALSE;
-        }
-
-        widget = g_object_get_data ( G_OBJECT ( dialog ), "bet_transfert_main_budget_combo" );
-        if ( gsb_form_widget_check_empty( widget ) == FALSE )
-        {
-            bet_future_get_budget_data ( widget, 1, ( gpointer ) transfert );
-            empty = FALSE;
-        }
-
-        if ( empty )
-            return FALSE;
-    }
-
-    return TRUE;
-}
-
-
-/**
- * sélectionne le compte concerné par la modification du solde.
- *
- * \param struct transfert
- *
- * \return
- * */
-static void bet_transfert_select_account_in_treeview ( struct_transfert_data *transfert )
-{
-    GtkWidget *tree_view;
-    GtkTreeModel *model;
-    GtkTreeIter iter;
-
-    tree_view = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "tree_view" );
-    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
-
-    gtk_tree_model_get_iter_first ( model, &iter );
-    do
-    {
-        gint tmp_number;
-        gint type_de_compte;
-
-        gtk_tree_model_get ( GTK_TREE_MODEL ( model ), &iter, 2, &tmp_number, 3, &type_de_compte, -1 );
-
-        if ( transfert->type == type_de_compte && tmp_number == transfert->replace_account )
-        {
-            gtk_tree_selection_select_iter ( GTK_TREE_SELECTION (
-                        gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ) ), &iter );
-            break;
-        }
-    }
-    while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
-}
-
-
-/**
- * remplit la boite de dialogue avec les données du solde de compte
- *
- * \param account_number
- * \param number            numéro du solde partiel
- *
- * \return                  TRUE if OK or FALSE
- * */
-static gboolean bet_transfert_set_form_data_from_line ( gint account_number,
-                        gint number )
-{
-    GtkWidget *widget;
-    GHashTable *transfert_list;
-    gchar *key;
-    struct_transfert_data *transfert;
-
-    if ( account_number == 0 )
-        key = g_strconcat ("0:", utils_str_itoa ( number ), NULL );
-    else
-        key = g_strconcat ( utils_str_itoa ( account_number ), ":",
-                        utils_str_itoa ( number ), NULL );
-
-    transfert_list = bet_data_transfert_get_list ( );
-
-    transfert = g_hash_table_lookup ( transfert_list, key );
-    if ( transfert == NULL )
-        return FALSE;
-
-    bet_transfert_select_account_in_treeview ( transfert );
-
-    /* Account with deferred debit card */
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "date_bascule" );
-    if ( transfert->date_bascule )
-    {
-        gsb_calendar_entry_set_date ( widget, transfert -> date_bascule );
-        gsb_form_widget_set_empty ( widget, FALSE );
-    }
-    else
-        gsb_form_widget_set_empty ( widget, TRUE );
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_card_payee_combo" );
-    if ( transfert->card_payee_number > 0 )
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
-                        gsb_data_payee_get_name ( transfert->card_payee_number, FALSE ) );
-
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-        gtk_editable_set_position ( GTK_EDITABLE ( GTK_COMBOFIX ( widget ) -> entry), 0 );
-
-        /* on actualise l'état de l'icone associée */
-        utils_set_image_with_etat ( widget, TRUE );
-    }
-    else
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), _("Payee") );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, TRUE );
-
-        /* on actualise l'état de l'icone associée */
-        utils_set_image_with_etat ( widget, FALSE );
-    }
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_card_category_combo" );
-    if ( transfert->card_category_number > 0 )
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
-                        gsb_data_category_get_name ( transfert->card_category_number,
-                        transfert->card_sub_category_number,
-                        NULL ) );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-        gtk_editable_set_position ( GTK_EDITABLE ( GTK_COMBOFIX ( widget ) -> entry), 0 );
-    }
-    else
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), _("Categories : Sub-categories") );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, TRUE );
-    }
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_card_budget_combo" );
-    if ( transfert->card_budgetary_number > 0 )
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
-                        gsb_data_budget_get_name ( transfert->card_budgetary_number,
-                        transfert->card_sub_budgetary_number,
-                        NULL ) );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-    }
-    else
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), _("Budgetary line") );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, TRUE );
-    }
-
-    if ( transfert->card_category_number > 0 || transfert->card_budgetary_number > 0 )
-        utils_set_image_with_etat ( widget, TRUE );
-    else
-        utils_set_image_with_etat ( widget, FALSE );
-
-
-    /* Main account */
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "date_entry" );
-    gsb_calendar_entry_set_date ( widget, transfert -> date );
-    gsb_form_widget_set_empty ( widget, FALSE );
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_main_payee_combo" );
-    if ( transfert->main_payee_number > 0 )
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
-                        gsb_data_payee_get_name ( transfert->main_payee_number, FALSE ) );
-
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-        gtk_editable_set_position ( GTK_EDITABLE ( GTK_COMBOFIX ( widget ) -> entry), 0 );
-
-         /* on actualise l'état de l'icone associée */
-        utils_set_image_with_etat ( widget, TRUE );
-   }
-    else
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), _("Payee") );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, TRUE );
-    }
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_main_payment_combo" );
-    gsb_payment_method_set_payment_position ( widget, transfert->main_payment_number );
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_main_category_combo" );
-    if ( transfert->main_category_number > 0 )
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
-                        gsb_data_category_get_name ( transfert->main_category_number,
-                        transfert->main_sub_category_number,
-                        NULL ) );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-        gtk_editable_set_position ( GTK_EDITABLE ( GTK_COMBOFIX ( widget ) -> entry), 0 );
-    }
-    else
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), _("Categories : Sub-categories") );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, TRUE );
-
-        /* on actualise l'état de l'icone associée */
-        utils_set_image_with_etat ( widget, FALSE );
-    }
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_main_budget_combo" );
-    if ( transfert->main_budgetary_number > 0 )
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ),
-                        gsb_data_budget_get_name ( transfert->main_budgetary_number,
-                        transfert->main_sub_budgetary_number,
-                        NULL ) );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, FALSE );
-    }
-    else
-    {
-        gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), _("Budgetary line") );
-        gsb_form_widget_set_empty ( GTK_COMBOFIX ( widget ) -> entry, TRUE );
-    }
-
-    if ( transfert->main_category_number > 0 || transfert->main_budgetary_number > 0 )
-        utils_set_image_with_etat ( widget, TRUE );
-    else
-        utils_set_image_with_etat ( widget, FALSE );
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_replace_data" );
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ), transfert->replace_transaction );
-
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_direct_debit" );
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ), transfert->direct_debit );
-
-    /* données de l'opération pour le compte principal */
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "bet_transfert_main_vbox_data" );
-    gtk_widget_set_sensitive ( widget, ( transfert->replace_transaction + transfert->direct_debit ) );
-
-
-    return TRUE;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-gboolean bet_transfert_new_line_dialog ( GtkTreeModel *tab_model,
-                        gchar *str_date )
-{
-    GtkWidget *widget;
-    GDate *date;
-    GDate *date_jour;
-    gint account_number;
-    gint result;
-
-    account_number = gsb_gui_navigation_get_current_account ( );
-    if ( account_number == -1 )
-        return FALSE;
-
-    /* Create the dialog */
-    bet_transfert_dialog = bet_transfert_create_dialog ( account_number );
-    if ( bet_transfert_dialog == NULL )
-    {
-        dialogue_warning ( _("You must create at least one cash account") );
-        return FALSE;
-    }
-
-    /* init data */
-    widget = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "date_entry" );
-    date = gsb_parse_date_string ( str_date );
-    date_jour = gdate_today ( );
-
-    if ( g_date_valid ( date ) == FALSE )
-        date = date_jour;
-
-    gsb_form_widget_set_empty ( widget, FALSE );
-    gsb_calendar_entry_set_date ( widget, date );
-
-dialog_return:
-    result = gtk_dialog_run ( GTK_DIALOG ( bet_transfert_dialog ) );
-
-    if ( result == GTK_RESPONSE_OK )
-    {
-        GtkWidget *tree_view;
-        gchar *tmp_str;
-        struct_transfert_data *transfert;
-
-        transfert = struct_initialise_bet_transfert ( );
-
-        if ( !transfert )
-        {
-            dialogue_error_memory ();
-            gtk_widget_hide ( bet_transfert_dialog );
-            return FALSE;
-        }
-        transfert -> account_number = account_number;
-
-        tree_view = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "tree_view" );
-        if ( !gtk_tree_selection_get_selected ( GTK_TREE_SELECTION (
-                        gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ) ),
-                        NULL, NULL ) )
-        {
-            tmp_str = g_strdup ( _("Error: You must select an account.") );
-            dialogue_warning_hint ( tmp_str, _("Missing data") );
-            g_free ( tmp_str );
-            gtk_dialog_set_response_sensitive ( GTK_DIALOG ( bet_transfert_dialog ),
-                        GTK_RESPONSE_OK, FALSE );
-            goto dialog_return;
-        }
-        else if ( bet_transfert_take_data (  transfert, bet_transfert_dialog ) == FALSE )
-        {
-            tmp_str = g_strdup ( _("Error: a date is not present or a field is in error.") );
-            dialogue_warning_hint ( tmp_str, _("One field is not filled in") );
-            g_free ( tmp_str );
-            goto dialog_return;
-        }
-        else
-            bet_data_transfert_add_line ( transfert );
-
-        gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
-        bet_data_update_bet_module ( account_number, GSB_ESTIMATE_PAGE );
-    }
-
-    gtk_widget_destroy ( bet_transfert_dialog );
-    bet_transfert_dialog = NULL;
-
-    return FALSE;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-GtkWidget *bet_transfert_create_account_list_part ( GtkWidget *dialog,
-                        gint account_number )
-{
-    GtkWidget *tree_view;
-    GtkListStore *list_store;
-    GtkTreeViewColumn *column;
-    GtkCellRenderer *cell;
-    GtkTreeSelection *selection;
-
-    list_store = bet_transfert_create_account_list_store ( account_number );
-    if ( list_store == NULL )
-        return NULL;
-
-    /* create the treeview */
-    tree_view = gtk_tree_view_new_with_model ( GTK_TREE_MODEL ( list_store ) );
-    g_object_unref ( list_store );
-
-    utils_set_tree_view_selection_and_text_color ( tree_view );
-    gtk_tree_view_set_rules_hint ( GTK_TREE_VIEW ( tree_view ), TRUE );
-    gtk_widget_set_size_request ( tree_view, 400, 150 );
-
-    /* Account_name */
-    cell = gtk_cell_renderer_text_new ( );
-    column = gtk_tree_view_column_new_with_attributes ( _("Name"),
-                        cell, "text", 0, NULL );
-    gtk_tree_view_column_set_expand ( column, TRUE );
-    gtk_tree_view_column_set_alignment ( column, 0.5 );
-    gtk_tree_view_column_set_sort_column_id ( column, 0 );
-    gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ), column );
-
-    /* type of account */
-    cell = gtk_cell_renderer_text_new ( );
-    column = gtk_tree_view_column_new_with_attributes ( _("Type"),
-                        cell, "text", 1, NULL );
-    gtk_tree_view_column_set_expand ( column, TRUE );
-    gtk_tree_view_column_set_alignment ( column, 0.5 );
-    gtk_tree_view_column_set_sort_column_id ( column, 1 );
-    gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ), column );
-
-    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
-    g_signal_connect ( G_OBJECT ( selection ),
-                        "changed",
-                        G_CALLBACK ( bet_transfert_selection_changed ),
-                        dialog );
-
-    return tree_view;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-gboolean bet_transfert_selection_changed ( GtkTreeSelection *selection,
-                        GtkWidget *dialog )
-{
-    if ( !GTK_IS_DIALOG ( dialog ) )
-        return FALSE;
-
-    if ( gtk_tree_selection_get_selected ( GTK_TREE_SELECTION ( selection ), NULL, NULL ) )
-        gtk_dialog_set_response_sensitive ( GTK_DIALOG ( dialog ), GTK_RESPONSE_OK, TRUE );
-    else
-        gtk_dialog_set_response_sensitive ( GTK_DIALOG ( dialog ), GTK_RESPONSE_OK, FALSE );
-
-    return TRUE;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-gboolean bet_transfert_entry_lose_focus ( GtkWidget *entry,
-                        GdkEventFocus *ev,
-                        gint *ptr_origin )
-{
-    GtkWidget *widget;
-    gchar *string;
-    gint element_number;
-    gint account_number;
-
-    /* still not found, if change the content of the form, something come in entry
-     * wich is nothing, so protect here */
-    if ( !GTK_IS_WIDGET ( entry )
-     ||
-     !GTK_IS_ENTRY ( entry ) )
-        return FALSE;
-
-    /* remove the selection */
-    gtk_editable_select_region ( GTK_EDITABLE ( entry ), 0, 0 );
-
-    element_number = GPOINTER_TO_INT ( ptr_origin );
-    if ( element_number != TRANSACTION_FORM_PARTY
-     &&
-     element_number != TRANSACTION_FORM_CATEGORY
-     &&
-     element_number != TRANSACTION_FORM_BUDGET )
-        return FALSE;
-
-    widget = g_object_get_data ( G_OBJECT ( entry ), "combo" );
-    account_number = gsb_form_get_account_number ();
-
-    /* sometimes the combofix popus stays showed, so remove here */
-    gtk_combofix_hide_popup ( GTK_COMBOFIX ( widget ) );
-
-    /* string will be filled only if the field is empty */
-    string = NULL;
-    switch ( element_number )
-    {
-    case TRANSACTION_FORM_PARTY :
-        if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_PARTY );
-        break;
-
-    case TRANSACTION_FORM_CATEGORY :
-        if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_CATEGORY );
-        break;
-
-    case TRANSACTION_FORM_BUDGET :
-        if ( !strlen ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) ) )
-            string = gsb_form_widget_get_name ( TRANSACTION_FORM_BUDGET );
-        break;
-
-    default :
-        break;
-
-    }
-
-    /* if string is not NULL, the entry is empty so set the empty field to TRUE */
-    if ( string )
-    {
-        switch ( element_number)
-        {
-            case TRANSACTION_FORM_PARTY :
-            case TRANSACTION_FORM_CATEGORY :
-            case TRANSACTION_FORM_BUDGET :
-            /* need to work with the combofix to avoid some signals if we work
-             * directly on the entry */
-            gtk_combofix_set_text ( GTK_COMBOFIX ( widget ), _(string) );
-            break;
-
-            default:
-                gtk_entry_set_text ( GTK_ENTRY ( entry ), string );
-            break;
-        }
-        gsb_form_widget_set_empty ( entry, TRUE );
-    }
-
-    return FALSE;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-gsb_real gsb_transfert_get_str_amount ( gsb_real amount,
-                        gint account_currency,
-                        gint replace_currency,
-                        gint floating_point )
-{
-    gsb_real tmp_real = null_real;
-    gint link_number;
-
-    if ( ( link_number = gsb_data_currency_link_search ( account_currency, replace_currency ) ) )
-    {
-        if ( gsb_data_currency_link_get_first_currency ( link_number ) == replace_currency )
-            tmp_real = gsb_real_mul ( amount,
-                        gsb_data_currency_link_get_change_rate ( link_number ) );
-        else
-            tmp_real = gsb_real_div ( amount,
-                        gsb_data_currency_link_get_change_rate ( link_number ) );
-    }
-    else if ( account_currency > 0 && replace_currency > 0 )
-    {
-        gchar *tmp_str;
-
-        tmp_str = g_strdup ( _("Error: is missing one or more links between currencies.\n"
-                        "You need to fix it and start over.") );
-        dialogue_error ( tmp_str );
-
-        g_free ( tmp_str );
-    }
-
-    return tmp_real;
-}
-
-
-/**
- *
- *
- *
- *
- * */
-gboolean bet_transfert_modify_line ( gint account_number,
-                        gint number )
-{
-    gint result;
-
-    bet_transfert_dialog = bet_transfert_create_dialog ( account_number );
-    if ( bet_transfert_dialog == NULL )
-    {
-        gchar *tmp_str;
-
-        tmp_str = g_strdup ( _("There is an inconsistency in the balance of "
-                    "a deferred debit account.\n"
-                    "You should delete it and create another") );
-
-        dialogue_error_hint ( tmp_str, _("Error of configuration") );
-
-        return FALSE;
-    }
-
-    /* init data */
-    bet_transfert_set_form_data_from_line ( account_number, number  );
-
-dialog_return:
-    result = gtk_dialog_run ( GTK_DIALOG ( bet_transfert_dialog ) );
-
-    if ( result == GTK_RESPONSE_OK )
-    {
-        GtkWidget *tree_view;
-        gchar *tmp_str;
-        struct_transfert_data *transfert;
-
-        transfert = struct_initialise_bet_transfert ( );
-
-        if ( !transfert )
-        {
-            dialogue_error_memory ();
-            gtk_widget_hide ( bet_transfert_dialog );
-            return FALSE;
-        }
-        transfert -> account_number = account_number;
-
-        tree_view = g_object_get_data ( G_OBJECT ( bet_transfert_dialog ), "tree_view" );
-        if ( !gtk_tree_selection_get_selected ( GTK_TREE_SELECTION (
-                        gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) ) ),
-                        NULL, NULL ) )
-        {
-            tmp_str = g_strdup ( _("Error: You must select an account.") );
-            dialogue_warning_hint ( tmp_str, _("Missing data") );
-            g_free ( tmp_str );
-            gtk_dialog_set_response_sensitive ( GTK_DIALOG ( bet_transfert_dialog ),
-                        GTK_RESPONSE_OK, FALSE );
-            goto dialog_return;
-        }
-        else if ( bet_transfert_take_data (  transfert, bet_transfert_dialog ) == FALSE )
-        {
-            tmp_str = g_strdup ( _("Error: a date is not present or a field is in error.") );
-            dialogue_warning_hint ( tmp_str, _("One field is not filled in") );
-            g_free ( tmp_str );
-            goto dialog_return;
-        }
-        else
-        {
-            transfert -> number = number;
-            bet_data_transfert_modify_line ( transfert );
-        }
-
-        gsb_data_account_set_bet_maj ( account_number, BET_MAJ_ESTIMATE );
-        bet_data_update_bet_module ( account_number, GSB_ESTIMATE_PAGE );
-    }
-
-    gtk_widget_destroy ( bet_transfert_dialog );
-    bet_transfert_dialog = NULL;
-
-    return TRUE;
-}
-
-
-/**
- *
- *
- * \param
- *
- * \return
- * */
-/* Local Variables: */
-/* c-basic-offset: 4 */
-/* End: */
diff --git a/src/bet_graph.c b/src/bet_graph.c
index 827a067..388106d 100644
--- a/src/bet_graph.c
+++ b/src/bet_graph.c
@@ -27,8 +27,6 @@
 #include <gdk/gdk.h>
 #include <glib/gi18n.h>
 #include <strings.h>
-
-#ifdef HAVE_GOFFICE
 #include <goffice/goffice.h>
 
 /*START_INCLUDE*/
@@ -2534,7 +2532,6 @@ void struct_free_bet_graph_prefs ( void )
 }
 
 
-#endif /* HAVE_GOFFICE */
 
 /**
  *
diff --git a/src/bet_graph.h b/src/bet_graph.h
index f381a6e..bac0cb1 100644
--- a/src/bet_graph.h
+++ b/src/bet_graph.h
@@ -1,8 +1,6 @@
 #ifndef _BET_GRAPH_H
 #define _BET_GRAPH_H 1
 
-#ifdef HAVE_GOFFICE
-
 #include <gtk/gtk.h>
 
 /* START_INCLUDE_H */
@@ -38,6 +36,5 @@ void bet_graph_set_configuration_variables ( const gchar *string );
 void struct_free_bet_graph_prefs ( void );
 /* END_DECLARATION */
 
-#endif /* HAVE_GOFFICE */
 
 #endif /*_BET_GRAPH */
diff --git a/src/bet_hist.c b/src/bet_hist.c
index 3193369..05527cc 100644
--- a/src/bet_hist.c
+++ b/src/bet_hist.c
@@ -1961,7 +1961,6 @@ GtkWidget *bet_historical_create_toolbar ( GtkWidget *parent,
                         tree_view );
     gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 5 );
 
-#ifdef HAVE_GOFFICE
     /* sectors button */
     button = gsb_automem_imagefile_button_new ( conf.display_toolbar,
                         _("Data graph"),
@@ -1981,7 +1980,6 @@ GtkWidget *bet_historical_create_toolbar ( GtkWidget *parent,
                         G_CALLBACK ( bet_graph_montly_graph_new ),
                         tree_view );
     gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 5 );
-#endif /* HAVE_GOFFICE */
 
     gtk_widget_show_all ( hbox );
 
diff --git a/src/bet_tab.c b/src/bet_tab.c
index 582edb0..9646493 100644
--- a/src/bet_tab.c
+++ b/src/bet_tab.c
@@ -2979,14 +2979,12 @@ GtkWidget *bet_array_list_create_toolbar ( GtkWidget *parent, GtkWidget *tree_vi
                         tree_view );
     gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 5 );
 
-#ifdef HAVE_GOFFICE
     /* graph button */
     button = bet_graph_button_menu_new ( conf.display_toolbar,
                         "forecast_graph",
                         G_CALLBACK ( bet_graph_line_graph_new ),
                         tree_view );
     gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 5 );
-#endif /* HAVE_GOFFICE */
 
     gtk_widget_show_all ( hbox );
 
diff --git a/src/etats_affiche.c b/src/etats_affiche.c
index f83e0d0..d2f447d 100644
--- a/src/etats_affiche.c
+++ b/src/etats_affiche.c
@@ -2344,7 +2344,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 b02ddd0..2080d34 100644
--- a/src/etats_calculs.c
+++ b/src/etats_calculs.c
@@ -85,50 +85,53 @@ 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;
 /*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,
@@ -275,7 +278,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;
@@ -348,7 +351,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 */
@@ -615,7 +618,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;
 				}
@@ -626,7 +629,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;
 
@@ -651,7 +654,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;
@@ -660,7 +663,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;
@@ -668,7 +671,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;
 
@@ -1427,7 +1430,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:
 
@@ -1977,7 +1980,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))
     {
@@ -2349,7 +2352,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 )
 	    {
@@ -2530,14 +2533,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 );
@@ -2600,7 +2604,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 47eeafe..7be4e5a 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-2012 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_prefs.h"
+#include "etats_onglet.h"
+#include "fenetre_principale.h"
 #include "gsb_calendar_entry.h"
 #include "gsb_currency.h"
 #include "gsb_data_account.h"
@@ -43,3335 +46,1231 @@
 #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 void etats_config_onglet_montants_get_buttons_add_remove ( GtkWidget *parent,
+                        gint text_comparison_number );
+static void etats_config_onglet_texte_get_buttons_add_remove ( GtkWidget *parent,
+                        gint text_comparison_number );
 /*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
+};
 
+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
+};
 
-/***********************************/
-/* 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;
-
+static gchar *champs_lien_nombre_2[] =
+{
+    N_("and"),
+    N_("or"),
+    N_("except"),
+    N_("stop"),
+    NULL
+};
 
-/*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
+};
 
+/*END*/
 
 
-/******************************************************************************/
-/* Fontion personnalistation_etat */
-/* affiche la fenetre de personnalisation */
-/******************************************************************************/
-void personnalisation_etat (void)
+/*COMMON_FUNCTIONS*/
+/**
+ * Rend sensitif la suite de la comparaison de numéro
+ *
+ * \param combo_box
+ * \param widget        widget à rendre sensitif
+ *
+ * \return
+ */
+static void etats_config_combo_lien_nombre_2_changed ( GtkComboBox *combo,
+                        GtkWidget *widget )
 {
-    GtkWidget * dialog, *sw, *paned;
-    GtkWidget *notebook_general;
-    GtkCTreeNode *parent;
-    GSList *list_tmp;
-    gint current_report_number, page = 0;
-    GtkTreeViewColumn *column;
-    GtkCellRenderer *cell;
-    GtkTreeIter iter, iter2;
-    GtkTreeSelection *selection ;
-
-    if ( !(current_report_number = gsb_gui_navigation_get_current_report()))
-	return;
+    gint index;
 
-    notebook_general = gsb_gui_get_general_notebook ( );
-    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 );
+    index = gtk_combo_box_get_active ( combo );
+    if ( index == 3 )
+        gtk_widget_set_sensitive ( widget, FALSE );
+    else
+        gtk_widget_set_sensitive ( widget, TRUE );
+}
 
-    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 )
+/*ONGLET_PERIODE*/
+/**
+ * Initialise les informations de l'onglet periode
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_periode ( gint report_number )
+{
+    if ( gsb_data_report_get_use_financial_year ( report_number ) )
     {
-	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;
-    }
+        gint financial_year_type;
 
-    gtk_clist_select_row ( GTK_CLIST ( liste_type_classement_etat ),
-			   0,
-			   0 );
-
-    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 );
+        etats_prefs_button_toggle_set_actif ( "radio_button_utilise_exo", TRUE );
 
-    sens_desensitive_pointeur ( radio_button_utilise_exo,
-				bouton_separe_exo_etat );
+        financial_year_type = gsb_data_report_get_financial_year_type ( report_number );
+        etats_prefs_buttons_radio_set_active_index ( "bouton_exo_tous", financial_year_type );
 
-    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 );
+        if ( financial_year_type == 3 )
+            etats_prefs_tree_view_select_rows_from_list (
+                                gsb_data_report_get_financial_year_list ( report_number ),
+                                "treeview_exer",
+                                1 );
+    }
     else
     {
-	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 );
-    }
+        etats_prefs_button_toggle_set_actif ( "radio_button_utilise_dates", TRUE );
+        etats_prefs_tree_view_select_single_row ( "treeview_dates",
+                        gsb_data_report_get_date_type ( report_number ) );
 
+        if ( gsb_data_report_get_date_type ( report_number ) != 1 )
+            etats_prefs_onglet_periode_date_interval_sensitive ( FALSE );
+        else
+        {
+            GDate *date;
 
-    /* on sélectionne les exercices */
+            etats_prefs_onglet_periode_date_interval_sensitive ( TRUE );
 
-    selectionne_liste_exo_etat_courant ();
+            /* on initialise le type de date à sélectionner */
+            etats_prefs_button_toggle_set_actif ( "button_sel_value_date",
+                                gsb_data_report_get_date_select_value ( report_number ) );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_separe_exo_etat ),
-				   gsb_data_report_get_financial_year_split (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_prefs_widget_get_widget_by_name ( "hbox_date_init",
+                                "entree_date_init_etat" ),
+                                date );
 
-    /* on sélectionne la plage de date */
+            if ( ( date = gsb_data_report_get_personal_date_end ( report_number ) ) )
+            gsb_calendar_entry_set_date (
+                                etats_prefs_widget_get_widget_by_name ( "hbox_date_finale",
+                                "entree_date_finale_etat" ),
+                                date );
+        }
+    }
+}
 
-    gtk_clist_select_row ( GTK_CLIST ( liste_plages_dates_etat ),
-			   gsb_data_report_get_date_type (current_report_number),
-			   0 );
 
-    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 );
+/**
+ * Récupère les informations de l'onglet periode
+ *
+ * \param report_number  numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_periode ( gint report_number )
+{
+    gint active;
+
+    active = etats_prefs_button_toggle_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_prefs_tree_view_get_single_row_selected ( "treeview_dates" ) ) == 1 )
+        {
+            GtkWidget *entry;
+
+            gsb_data_report_set_date_select_value ( report_number,
+                                etats_prefs_button_toggle_get_actif ( "button_sel_value_date" ) );
+
+            entry = etats_prefs_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_prefs_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
     {
-	gtk_widget_set_sensitive ( entree_date_init_etat,
-				   TRUE );
-	gtk_widget_set_sensitive ( entree_date_finale_etat,
-				   TRUE );
-    }
+        gint index;
 
-    /* on remplit les dates perso si elles existent */
+        index = etats_prefs_buttons_radio_get_active_index ( "bouton_exo_tous" );
+        gsb_data_report_set_financial_year_type ( report_number, index );
 
-    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));
+        if ( index == 3 )
+        {
+            gsb_data_report_free_financial_year_list ( report_number );
+            gsb_data_report_set_financial_year_list ( report_number,
+                                etats_prefs_tree_view_get_list_rows_selected ( "treeview_exer" ) );
+            if ( utils_tree_view_all_rows_are_selected ( GTK_TREE_VIEW (
+             etats_prefs_widget_get_widget_by_name ( "treeview_exer", NULL ) ) ) )
+            {
+                gchar *text;
+                gchar *hint;
 
-    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));
+                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.") );
 
-    /* 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 );
+                dialogue_special ( GTK_MESSAGE_INFO, make_hint ( hint, text ) );
+                etats_prefs_button_toggle_set_actif ( "bouton_exo_tous", FALSE );
+                gsb_data_report_set_financial_year_type ( report_number, 0 );
+
+                g_free ( text );
+                g_free ( hint );
+            }
+        }
     }
-    else
+}
+
+
+/**
+ * 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 );
+
+    /* on remplit la liste des exercices */
+    list_tmp = gsb_data_fyear_get_fyears_list ();
+
+    while ( list_tmp )
     {
-	gtk_widget_set_sensitive ( bouton_type_separe_plages_etat,
-				   FALSE );
-	gtk_widget_set_sensitive ( bouton_debut_semaine,
-				   FALSE );
-    }
+        GtkTreeIter iter;
+        gchar *name;
+        gint fyear_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));
+        fyear_number = gsb_data_fyear_get_no_fyear ( list_tmp -> data );
 
-    /* onglet comptes */
+        name = my_strdup ( gsb_data_fyear_get_name ( fyear_number ) );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_comptes_etat ),
-				   gsb_data_report_get_account_use_chosen (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_comptes_etat,
-				vbox_generale_comptes_etat );
+        if ( name )
+            g_free ( name );
+
+        list_tmp = list_tmp -> next;
+    }
 
+    return GTK_TREE_MODEL ( list_store );
+}
 
-    selectionne_liste_comptes_etat_courant ();
 
-    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));
+/**
+ * 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;
 
-    sens_desensitive_pointeur ( bouton_regroupe_ope_compte_etat,
-				bouton_affiche_sous_total_compte );
+    hbox =  etats_prefs_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_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_comptes ),
-				   gsb_data_report_get_account_show_name (current_report_number));
+    hbox =  etats_prefs_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 */
+/*ONGLET_VIREMENTS*/
+/**
+ * Initialise les informations de l'onglet virements
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_virements ( gint report_number )
+{
+    gint index;
 
+    index = gsb_data_report_get_transfer_choice ( report_number );
+    etats_prefs_buttons_radio_set_active_index ( "bouton_non_inclusion_virements", index );
 
-    if ( gsb_data_report_get_transfer_choice (current_report_number))
+    if ( index == 3 )
     {
-	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 );
-	}
+        etats_prefs_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_prefs_widget_get_widget_by_name (
+                                "togglebutton_select_all_virements", NULL ),
+                                G_CALLBACK ( etats_prefs_onglet_comptes_select_unselect ),
+                                etats_prefs_widget_get_widget_by_name ( "treeview_virements", NULL ) );
+        }
     }
-    else
+
+    if ( index > 0 )
     {
-	gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_non_inclusion_virements ),
-				       TRUE );
-	gtk_widget_set_sensitive ( bouton_exclure_non_virements_etat,
-				   FALSE );
+        etats_prefs_widget_set_sensitive ( "bouton_exclure_non_virements_etat", TRUE );
+        etats_prefs_button_toggle_set_actif ( "bouton_exclure_non_virements_etat",
+                                gsb_data_report_get_transfer_reports_only ( report_number ) );
     }
+    else
+        etats_prefs_widget_set_sensitive ( "bouton_exclure_non_virements_etat", FALSE );
+}
+
 
-    sens_desensitive_pointeur ( bouton_inclusion_virements_perso,
-				hbox_liste_comptes_virements );
+/**
+ * Récupère les informations de l'onglet virements
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_virements ( gint report_number )
+{
+    gint index;
 
-    selectionne_liste_virements_etat_courant ();
+    index = etats_prefs_buttons_radio_get_active_index ( "bouton_non_inclusion_virements" );
+    gsb_data_report_set_transfer_choice ( report_number, index );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_exclure_non_virements_etat ),
-				   gsb_data_report_get_transfer_reports_only (current_report_number));
+    if ( index == 3 )
+    {
+        gsb_data_report_free_transfer_account_numbers_list ( report_number );
+        gsb_data_report_set_transfer_account_numbers_list ( report_number,
+                            etats_prefs_tree_view_get_list_rows_selected ( "treeview_virements" ) );
+    }
 
+    gsb_data_report_set_transfer_reports_only ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_exclure_non_virements_etat" ) );
+}
 
-    /* onglet catégories */
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button_group_by_categ ),
-				   gsb_data_report_get_category_used (current_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_COMPTES*/
+/**
+ * Initialise les informations de l'onglet comptes
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_comptes ( gint report_number )
+{
+    gint active;
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button_detail_categ ),
-				   gsb_data_report_get_category_detail_used (current_report_number));
+    active = gsb_data_report_get_account_use_chosen ( report_number );
+    etats_prefs_button_toggle_set_actif ( "bouton_detaille_comptes_etat", active );
 
-    sens_desensitive_pointeur ( button_detail_categ,
-				hbox_detaille_categ_etat );
+    if ( active )
+    {
+        etats_prefs_tree_view_select_rows_from_list (
+                                gsb_data_report_get_account_numbers_list ( report_number ),
+                                "treeview_comptes",
+                                1 );
 
-    /* select the categories and sub-categories */
-    report_config_category_update_treeview (TRUE);
+        if ( g_slist_length ( gsb_data_report_get_account_numbers_list ( report_number ) ) )
+            utils_togglebutton_set_label_position_unselect (
+                                etats_prefs_widget_get_widget_by_name (
+                                "togglebutton_select_all_comptes", NULL ),
+                                G_CALLBACK ( etats_prefs_onglet_comptes_select_unselect ),
+                                etats_prefs_widget_get_widget_by_name ( "treeview_comptes", NULL ) );
+    }
+}
 
-    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));
 
+/**
+ * Récupère les informations de l'onglet comptes
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_comptes ( gint report_number )
+{
+    gint active;
 
-    /* mise en forme de la devise */
+    active = etats_prefs_button_toggle_get_actif ( "bouton_detaille_comptes_etat" );
+    gsb_data_report_set_account_use_chosen ( report_number, active );
 
-    selectionne_devise_categ_etat_courant ();
+    if ( active )
+    {
+        gsb_data_report_free_account_numbers_list ( report_number );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_categ ),
-				   gsb_data_report_get_category_show_name (current_report_number));
+        if ( utils_tree_view_all_rows_are_selected ( GTK_TREE_VIEW (
+         etats_prefs_widget_get_widget_by_name ( "treeview_comptes", NULL ) ) ) )
+        {
+            gchar *text;
+            gchar *hint;
 
+            hint = g_strdup ( _("Performance issue.") );
+            text = g_strdup ( _("All accounts have been selected.  Grisbi will run "
+                            "faster without the \"Detail accounts used\" option activated") );
 
-    /* onglet ib */
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_ib_etat ),
-				   gsb_data_report_get_budget_used (current_report_number));
+            dialogue_special ( GTK_MESSAGE_INFO, make_hint ( hint, text ) );
+            etats_prefs_button_toggle_set_actif ( "gsb_data_report_set_account_use_chosen", FALSE );
+            gsb_data_report_set_account_use_chosen ( report_number, FALSE );
 
-    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 );
+            g_free ( text );
+            g_free ( hint );
+        }
+        else
+            gsb_data_report_set_account_numbers_list ( report_number,
+                            etats_prefs_tree_view_get_list_rows_selected ( "treeview_comptes" ) );
+    }
+}
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_ib_etat ),
-				   gsb_data_report_get_budget_detail_used (current_report_number));
 
-    sens_desensitive_pointeur ( bouton_detaille_ib_etat,
-				hbox_detaille_ib_etat );
+/**
+ * retourne la liste des comptes dans un GtkTreeModel
+ *
+ * \param
+ *
+ * \return model
+ */
+GtkTreeModel *etats_config_onglet_get_liste_comptes ( void )
+{
+    GtkListStore *list_store;
+    GSList *list_tmp;
 
-    /* select the budgets and sub-budgets */
-    report_config_category_update_treeview (FALSE);
+    list_store = gtk_list_store_new ( 2, G_TYPE_STRING, G_TYPE_INT );
 
-    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));
+    /* on remplit la liste des exercices */
+    list_tmp = gsb_data_account_get_list_accounts ( );
 
-    /* mise en forme de la devise */
+    while ( list_tmp )
+    {
+        GtkTreeIter iter;
+        gchar *name;
+        gint account_number;
 
-    selectionne_devise_ib_etat_courant ();
+        account_number = gsb_data_account_get_no_account ( list_tmp -> data );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_ib ),
-				   gsb_data_report_get_budget_show_name (current_report_number));
+        name = my_strdup ( gsb_data_account_get_name ( account_number ) );
 
-    /* onglet tiers */
+        gtk_list_store_append ( list_store, &iter );
+        gtk_list_store_set ( list_store, &iter, 0, name, 1, account_number, -1 );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_tiers_etat ),
-				   gsb_data_report_get_payee_used (current_report_number));
+        if ( name )
+            g_free ( name );
 
-    sens_desensitive_pointeur ( bouton_utilise_tiers_etat,
-				bouton_afficher_noms_tiers );
-    sens_desensitive_pointeur ( bouton_utilise_tiers_etat,
-				bouton_affiche_sous_total_tiers );
+        list_tmp = list_tmp -> next;
+    }
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_tiers_etat ),
-				   gsb_data_report_get_payee_detail_used (current_report_number));
+    return GTK_TREE_MODEL ( list_store );
+}
 
-    sens_desensitive_pointeur ( bouton_detaille_tiers_etat,
-				hbox_detaille_tiers_etat );
 
+/**
+ * sélectionne une partie de la liste des comptes
+ *
+ * \param
+ * \param
+ *
+ * \return
+ * */
+void etats_config_onglet_select_partie_liste_comptes ( GtkWidget *tree_view,
+                        gint type_compte )
+{
+        GtkTreeModel *model;
+        GtkTreeIter iter;
+        GtkTreeSelection *selection;
 
-    /* on sélectionne les tiers choisies */
+        selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
 
-    selectionne_liste_tiers_etat_courant();
+        model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
+        if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
+            return;
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_affiche_sous_total_tiers ),
-				   gsb_data_report_get_payee_show_payee_amount (current_report_number));
+        do
+        {
+            gint account_number;
 
-    /* mise en forme de la devise */
+            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 ) );
+}
 
-    selectionne_devise_tiers_etat_courant ();
+/*ONGLET_TIERS*/
+/**
+ * Initialise les informations de l'onglet tiers
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_tiers ( gint report_number )
+{
+    gint active;
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_afficher_noms_tiers ),
-				   gsb_data_report_get_payee_show_name (current_report_number));
+    active = gsb_data_report_get_payee_detail_used ( report_number );
+    etats_prefs_button_toggle_set_actif ( "bouton_detaille_tiers_etat", active );
 
-    /*  onglet texte */
+    if ( active )
+    {
+        etats_prefs_tree_view_select_rows_from_list (
+                                gsb_data_report_get_payee_numbers_list ( report_number ),
+                                "treeview_tiers",
+                                1 );
 
-    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 ();
+        if ( g_slist_length ( gsb_data_report_get_payee_numbers_list ( report_number ) ) )
+            utils_togglebutton_set_label_position_unselect (
+                                etats_prefs_widget_get_widget_by_name (
+                                "togglebutton_select_all_tiers", NULL ),
+                                NULL,
+                                etats_prefs_widget_get_widget_by_name ( "treeview_tiers", NULL ) );
+    }
+}
 
 
-    /* onglet montant */
+/**
+ * retourne la liste des tiers
+ *
+ * \param
+ *
+ * \return model
+ * */
+GtkTreeModel *etats_config_onglet_get_liste_tiers ( void )
+{
+    GtkListStore *list_store;
+    GSList *list_tmp;
 
-    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 ();
+    list_store = gtk_list_store_new ( 2, G_TYPE_STRING, G_TYPE_INT );
 
-    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));
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE ( list_store ),
+                        0, GTK_SORT_ASCENDING );
 
-    /* onglet modes de paiement */
+    /* on remplit la liste des tiers */
+    list_tmp = gsb_data_payee_get_payees_list ( );
 
-    gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( bouton_detaille_mode_paiement_etat ),
-				   gsb_data_report_get_method_of_payment_used (current_report_number));
+    while ( list_tmp )
+    {
+        GtkTreeIter iter;
+        gchar *name;
+        gint payee_number;
 
-    sens_desensitive_pointeur ( bouton_detaille_mode_paiement_etat,
-				vbox_mode_paiement_etat );
+        payee_number = gsb_data_payee_get_no_payee ( list_tmp -> data );
 
-    selectionne_liste_modes_paiement_etat_courant ();
+        name = my_strdup ( gsb_data_payee_get_name ( payee_number, FALSE ) );
 
-    gtk_widget_show_all ( dialog );
+        gtk_list_store_append ( list_store, &iter );
+        gtk_list_store_set ( list_store, &iter, 0, name, 1, payee_number, -1 );
 
-    switch ( gtk_dialog_run ( GTK_DIALOG(dialog) ) )
-    {
-	case GTK_RESPONSE_OK:
-	    recuperation_info_perso_etat ();
-	    break;
+        if ( name )
+            g_free ( name );
 
-	default:
-	    break;
+        list_tmp = list_tmp -> next;
     }
 
-    gtk_widget_destroy ( dialog );
+    return GTK_TREE_MODEL ( list_store );
 }
 
 
-
 /**
+ * Récupère les informations de l'onglet tiers
  *
+ * \param numéro d'état à mettre à jour
  *
- *
+ * \return
  */
-gboolean report_tree_view_selection_changed ( GtkTreeSelection *selection,
-					      GtkTreeModel *model )
+static void etats_config_recupere_info_onglet_tiers ( gint report_number )
 {
-    GtkTreeIter iter;
-    gint selected;
-
-    if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
-	return(FALSE);
-
-    gtk_tree_model_get ( model, &iter, 1, &selected, -1 );
-    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_config_etat ), selected);
-
-    return FALSE;
-}
+    gint active;
 
+    active = etats_prefs_button_toggle_get_actif ( "bouton_detaille_tiers_etat" );
+    gsb_data_report_set_payee_detail_used ( report_number, active );
+    if ( active )
+    {
+        gsb_data_report_free_payee_numbers_list ( report_number );
 
+        if ( utils_tree_view_all_rows_are_selected ( GTK_TREE_VIEW (
+         etats_prefs_widget_get_widget_by_name ( "treeview_tiers", NULL ) ) ) )
+        {
+            gchar *text;
+            gchar *hint;
 
-gboolean report_tree_selectable_func (GtkTreeSelection *selection,
-				      GtkTreeModel *model,
-				      GtkTreePath *path,
-				      gboolean path_currently_selected,
-				      gpointer data)
-{
-    GtkTreeIter iter;
-    gint selectable;
+            hint = g_strdup ( _("Performance issue.") );
+            text = g_strdup ( _("All payees have been selected.  Grisbi will run "
+                            "faster without the \"Detail payees used\" option activated.") );
 
-    gtk_tree_model_get_iter ( model, &iter, path );
-    gtk_tree_model_get ( model, &iter, 1, &selectable, -1 );
+            dialogue_special ( GTK_MESSAGE_INFO, make_hint ( hint, text ) );
+            etats_prefs_button_toggle_set_actif ( "togglebutton_select_all_tiers", FALSE );
+            gsb_data_report_set_payee_detail_used ( report_number, FALSE );
 
-    return ( selectable != -1 );
+            g_free ( text );
+            g_free ( hint );
+        }
+        else
+            gsb_data_report_set_payee_numbers_list ( report_number,
+                            etats_prefs_tree_view_get_list_rows_selected ( "treeview_tiers" ) );
+    }
 }
 
 
-
-/******************************************************************************/
-void selectionne_liste_exo_etat_courant ( void )
+/*ONGLET_CATEGORIES BUDGETS*/
+/**
+ * fill the categories selection list for report
+ *
+ * \param model
+ * \param is_categ  TRUE for category, FALSE for budget
+ *
+ * \return FALSE
+ * */
+static gboolean etats_config_onglet_categ_budget_fill_model ( GtkTreeModel *model,
+                        gboolean is_categ )
 {
-    GSList *pointeur_sliste;
-    gint current_report_number;
+    GtkTreeIter parent_iter;
+    GtkTreeIter child_iter;
+    GSList *list_tmp;
+    gchar *name;
+    gchar *without_name;
+    gchar *without_sub_name;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    if ( is_categ )
+    {
+        list_tmp = gsb_data_category_get_categories_list ( );
+
+        gtk_tree_store_clear ( GTK_TREE_STORE ( model ) );
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_exo_etat ));
+        without_name = _("No category");
+        without_sub_name = _("No subcategory");
+    }
+    else
+    {
+        list_tmp = gsb_data_budget_get_budgets_list ( );
+        gtk_tree_store_clear ( GTK_TREE_STORE ( model ) );
 
-    pointeur_sliste = gsb_data_report_get_financial_year_list (current_report_number);
+        without_name = _("No budgetary line");
+        without_sub_name = _("No sub-budgetary line");
+    }
 
-    while ( pointeur_sliste )
+    while ( list_tmp )
     {
-	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;
+        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;
     }
+
+    /* 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;
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void selectionne_liste_comptes_etat_courant ( void )
+
+/**
+ * retourne la liste des lignes sélectionnées
+ *
+ * \param treeview_name nom du tree_view
+ *
+ * \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 *etats_config_onglet_categ_budget_get_selected ( const gchar *treeview_name )
 {
-    GSList *pointeur_sliste;
-    gint current_report_number;
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeIter parent_iter;
+    gboolean all_selected = TRUE;
+    GSList *tmp_list = NULL;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    /* on récupère le modèle */
+    tree_view = etats_prefs_widget_get_widget_by_name ( treeview_name, NULL );
+    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 NULL;
 
-    if ( !liste_comptes_etat )
-	return;
+    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,
+                        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 ) );
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_comptes_etat ));
+    /* 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.") ) );
 
-    pointeur_sliste = gsb_data_report_get_account_numbers (current_report_number);
+        etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( model, FALSE );
+        gsb_data_report_free_categ_budget_struct_list ( tmp_list );
 
-    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;
+        tmp_list = NULL;
     }
+    return tmp_list;
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void selectionne_liste_virements_etat_courant ( void )
-{
-    GSList *pointeur_sliste;
-    gint current_report_number;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+/**
+ * Initialisation du tree_view
+ *
+ * \param treeview_name
+ * \param tmp_list
+ *
+ * \return
+ * */
+static void etats_config_onglet_categ_budget_init_treeview ( const gchar *treeview_name,
+                            GSList *tmp_list )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeIter parent_iter;
 
+    /* on récupère le modèle */
+    tree_view = etats_prefs_widget_get_widget_by_name ( treeview_name, NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_comptes_virements ));
+    etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( model, FALSE );
 
-    pointeur_sliste = gsb_data_report_get_transfer_account_numbers (current_report_number);
+    if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &parent_iter ) )
+        return;
 
-    while ( pointeur_sliste )
+    while ( tmp_list )
     {
-	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;
+        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;
     }
 }
 
 
-
-void selectionne_devise_categ_etat_courant ( void )
-{
-    gint current_report_number;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
-
-    gsb_currency_set_combobox_history ( bouton_devise_categ_etat,
-					gsb_data_report_get_category_currency (current_report_number));
-}
-/******************************************************************************/
-
-
-/******************************************************************************/
-void selectionne_devise_ib_etat_courant ( void )
-{
-    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));
-}
-/******************************************************************************/
-
-/******************************************************************************/
-void selectionne_liste_tiers_etat_courant ( void )
-{
-    GSList *pointeur_sliste;
-    gint current_report_number;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
-
-
-    if ( !liste_tiers_etat )
-	return;
-
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_tiers_etat ));
-
-    pointeur_sliste = gsb_data_report_get_payee_numbers (current_report_number);
-
-    while ( pointeur_sliste )
-    {
-	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;
-    }
-}
-/******************************************************************************/
-
-/******************************************************************************/
-void selectionne_devise_tiers_etat_courant ( void )
-{
-    gint current_report_number;
-
-    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));
-}
-/******************************************************************************/
-
-/******************************************************************************/
-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;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
-
-    /* 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 ) )
-    {
-	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;
-    }
-
-    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;
-    }
-
-
-    /* on récupère maintenant toutes les données */
-    /* récupération du name du rapport */
-
-    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 );
-    }
-
-    /* récupération du type de classement */
-
-    g_slist_free ( gsb_data_report_get_sorting_type (current_report_number));
-
-    gsb_data_report_set_sorting_type ( current_report_number,
-				       NULL );
-
-    for ( i=0 ; i<GTK_CLIST ( liste_type_classement_etat ) -> rows ; i++ )
-    {
-	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 )));
-    }
-
-    /* récupération de l'affichage ou non des R */
-
-    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 );
-    }
-
-    /* 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 );
-	}
-    }
-
-    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 );
-    }
-
-    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) */
-
-    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 )
-    {
-	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 );
-    }
-
-
-    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))
-    {
-	g_slist_free ( gsb_data_report_get_account_numbers (current_report_number));
-	gsb_data_report_set_account_numbers ( current_report_number,
-					      NULL );
-    }
-
-    list_tmp = GTK_CLIST ( liste_comptes_etat ) -> selection;
-
-    while ( list_tmp )
-    {
-	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) */
-
-    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 );
-    }
-
-    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 )));
-
-
-    /* récupération des virements */
-
-    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))
-    {
-	g_slist_free ( gsb_data_report_get_transfer_account_numbers (current_report_number));
-	gsb_data_report_set_transfer_account_numbers ( current_report_number,
-						       NULL );
-    }
-
-    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_transfer_reports_only ( current_report_number,
-						gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_exclure_non_virements_etat )));
-
-
-    /* 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 )));
-
-    gsb_data_report_set_category_struct (current_report_number, report_config_categ_budget_get_selected (TRUE));
-
-    /* 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 );
-
-    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 )));
-
-    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 )));
-
-
-    /* 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 )));
-
-    gsb_data_report_set_budget_struct (current_report_number, report_config_categ_budget_get_selected (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 );
-
-    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 )));
-
-    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 )));
-
-
-
-    /*   récupération des tiers */
-
-    gsb_data_report_set_payee_used ( current_report_number,
-				     gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_tiers_etat )));
-
-    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 );
-    }
-
-    list_tmp = GTK_CLIST ( liste_tiers_etat ) -> selection;
-
-    while ( list_tmp )
-    {
-	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;
-    }
-
-    /*   si tous les tiers ont été sélectionnés, on met utilise_detail_tiers à 0 (plus rapide) */
-
-    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 );
-    }
-
-    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 )));
-
-
-
-    /* récupération du texte */
-
-    gsb_data_report_set_text_comparison_used ( current_report_number,
-					       gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( bouton_utilise_texte )));
-
-    /* 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 */
-
-    /*     text_comparison_number = GPOINTER_TO_INT (gsb_data_report_get_text_comparison_list (current_report_number)-> data); */
-
-    /* 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);
-
-    while ( comparison_list )
-    {
-	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));
-
-    /* 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 (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 );
-    }
-    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 */
-
-    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 );
-    }
-
-    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;
-    }
-
-    /*   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.
+ * Initialise les informations des onglets catégories ou budgets
  *
- * \param page_number	Page that contained an interface element just
- *			changed that triggered this event.
+ * \param report_number
+ * \param is_categ      TRUE = Categories FALSE = Budgets
  *
- * \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 ) );
-
-    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.
+ * \return
  */
-gboolean report_tree_update_style_iterator ( GtkTreeModel * tree_model,
-					     GtkTreePath *path,
-					     GtkTreeIter *iter,
-					     gpointer data )
-{
-    gint page_number = GPOINTER_TO_INT(data);
-    gint iter_page_number;
-    gint italic = FALSE;
-
-    gtk_tree_model_get ( tree_model, iter, REPORT_TREE_PAGE_COLUMN, &iter_page_number, -1 );
-
-    if ( iter_page_number != page_number )
-    {
-	return FALSE;
-    }
-
-    switch ( iter_page_number )
-    {
-	/* 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;
-    }
-
-    gtk_tree_store_set ( GTK_TREE_STORE ( tree_model ),
-			 iter, REPORT_TREE_ITALIC_COLUMN, italic,
-			 -1 );
-
-    return TRUE;
-}
-
-
-
-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] )
-    {
-	gint row;
-	gchar * plage = _(plages_dates[i]);
-
-	row = gtk_clist_append ( GTK_CLIST ( liste_plages_dates_etat ),
-				   &plage );
-	i++;
-    }
-
-    /* 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 */
-
-    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;
-
-    gtk_clist_select_row ( GTK_CLIST ( liste ),
-			   row,
-			   0 );
-
-    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 );
-	}
-    }
-}
-/******************************************************************************/
-
-
-/******************************************************************************/
-void remplissage_liste_exo_etats ( void )
+static void etats_config_initialise_onglet_categ_budget ( gint report_number,
+                        gboolean is_categ )
 {
-    GSList *list_tmp;
-
-    if ( !liste_exo_etat )
-	return;
-
-    gtk_clist_clear ( GTK_CLIST ( liste_exo_etat ) );
-
-    list_tmp = gsb_data_fyear_get_fyears_list ();
-
-    while ( list_tmp )
-    {
-	gint fyear_number;
-	gchar *name[1];
-	gint row;
-
-	fyear_number = gsb_data_fyear_get_no_fyear (list_tmp -> data);
-
-	name[0] = my_strdup (gsb_data_fyear_get_name (fyear_number));
-
-	/* 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));
-
-	list_tmp = list_tmp -> next;
-    }
-}
-/******************************************************************************/
-
-/******************************************************************************/
-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 )
-{
-    GSList *list_tmp;
-
-    if ( !liste_comptes_etat )
-	return;
-
-    gtk_clist_clear ( GTK_CLIST ( liste_comptes_etat ) );
-
-   list_tmp = gsb_data_account_get_list_accounts ();
+    gint active;
+    gchar *checkbutton_name;
+    gchar *button_name;
+    gchar *treeview_name;
+    GSList *tmp_list;
 
-    while ( list_tmp )
+    if ( is_categ )
     {
-	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;
+        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 );
+    }
+    else
+    {
+        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 );
     }
-}
-/******************************************************************************/
-
-/******************************************************************************/
-void selectionne_partie_liste_compte_etat ( gint *type_compte )
-{
-    gint i;
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_comptes_etat ));
+    etats_prefs_button_toggle_set_actif ( checkbutton_name, active );
 
-    for ( i=0 ; i<gsb_data_account_get_accounts_amount () ; i++ )
+    if ( active )
     {
-	gint no_compte;
+        etats_config_onglet_categ_budget_init_treeview ( treeview_name, tmp_list );
 
-	no_compte = GPOINTER_TO_INT ( gtk_clist_get_row_data ( GTK_CLIST ( liste_comptes_etat ),
-							       i ));
-
-	if ( gsb_data_account_get_kind (no_compte) == GPOINTER_TO_INT ( type_compte ))
-	    gtk_clist_select_row ( GTK_CLIST ( liste_comptes_etat ),
-				   i,
-				   0 );
+        if ( g_slist_length ( tmp_list ) )
+            utils_togglebutton_set_label_position_unselect (
+                                etats_prefs_widget_get_widget_by_name (
+                                button_name, NULL ),
+                                G_CALLBACK ( etats_prefs_onglet_categ_budget_check_uncheck_all ),
+                                etats_prefs_widget_get_widget_by_name ( treeview_name, NULL ) );
     }
-}
-/******************************************************************************/
 
-/******************************************************************************/
-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 );
+    g_free ( checkbutton_name );
+    g_free ( treeview_name );
+    g_free ( button_name );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void remplissage_liste_comptes_virements ( void )
-{
-    GSList *list_tmp;
 
-    if ( !liste_comptes_virements )
-	return;
-
-    gtk_clist_clear ( GTK_CLIST ( liste_comptes_virements ) );
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ * */
+static gint etats_config_onglet_categ_budget_sort_function ( GtkTreeModel *model,
+                        GtkTreeIter *iter_1,
+                        GtkTreeIter *iter_2,
+                        gpointer ptr )
+{
+    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;
 
-    list_tmp = gsb_data_account_get_list_accounts ();
+    is_categ = GPOINTER_TO_INT ( ptr );
 
-    while ( list_tmp )
+    if ( is_categ )
     {
-	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;
+        without_name = _("No category");
+        without_sub_name = _("No subcategory");
+    }
+    else
+    {
+        without_name = _("No budgetary line");
+        without_sub_name = _("No sub-budgetary line");
     }
-}
-/******************************************************************************/
 
-/******************************************************************************/
-void selectionne_partie_liste_compte_vir_etat ( gint *type_compte )
-{
-    gint i;
+    /* 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_clist_unselect_all ( GTK_CLIST ( liste_comptes_virements ));
+    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 );
 
-    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_virements ),
-							       i ));
+    if ( number_1 != -1 && number_2 != -1 && number_1 - number_2 )
+    {
+        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 ) );
 
-	if ( gsb_data_account_get_kind (no_compte) == GPOINTER_TO_INT ( type_compte ))
-	    gtk_clist_select_row ( GTK_CLIST ( liste_comptes_virements ),
-				   i,
-				   0 );
+        if ( name_1) g_free ( name_1);
+        if ( name_2) g_free ( name_2);
     }
-}
-/******************************************************************************/
 
-/******************************************************************************/
-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 );
-}
+    if ( return_value )
+        return return_value;
 
+    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 ) );
 
+    if ( name_1) g_free ( name_1);
+    if ( name_2) g_free ( name_2);
 
-/**
- * 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 )
-{
-    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;
+    return return_value;
 }
 
 
 /**
- * fill the categories selection list for report
+ * Récupère les informations des onglets catégories ou budgets
  *
- * \param is_categ	TRUE for category, FALSE for budget
+ * \param report_number
+ * \param is_categ      TRUE = Categories FALSE = Budgets
  *
- * \return FALSE
- * */
-static gboolean report_config_fill_categ_budget_list ( gboolean is_categ )
+ * \return
+ */
+static void etats_config_recupere_info_onglet_categ_budget ( gint report_number,
+                        gboolean is_categ )
 {
-    GSList *list_tmp;
-    gchar *name;
-    gchar *without_name, *without_sub_name;
+    gint active;
+    gchar *treeview_name;
 
-    if (is_categ)
+    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");
+        active = etats_prefs_button_toggle_get_actif ( "bouton_detaille_categ_etat" );
+        treeview_name = g_strdup ( "treeview_categ" );
+
+        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
     {
-	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");
-    }
+        active = etats_prefs_button_toggle_get_actif ( "bouton_detaille_budget_etat" );
+        treeview_name = g_strdup ( "treeview_budget" );
 
-    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;
+        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 ) );
+        }
     }
-    /* 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);
 
-    return FALSE;
+    g_free ( treeview_name );
 }
 
 
 /**
- * append the div given in param to the categ/budget list
- * this place parent_iter on the place of the div appended
+ * création du model
  *
- * \param is_categ 	TRUE for categ, FALSE for budget
- * \param name
- * \param number
+ * \param is_categ
  *
- * \return
+ * \return a GtkWidget : the GtkTreeView
  * */
-static void report_config_mixed_list_add_div ( gboolean is_categ,
-					       const gchar *name,
-					       gint number )
+GtkTreeModel *etats_config_onglet_categ_budget_get_model ( gboolean is_categ )
 {
-    GtkTreeModel *model;
+    GtkTreeStore *store;
 
-    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 );
-}
+    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 */
 
-/**
- * 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;
+    gtk_tree_sortable_set_sort_column_id ( GTK_TREE_SORTABLE ( store ),
+                        GSB_ETAT_CATEG_BUDGET_LIST_NAME, GTK_SORT_ASCENDING );
 
-    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 );
+    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 );
+
+    etats_config_onglet_categ_budget_fill_model ( GTK_TREE_MODEL ( store ), is_categ );
+
+    /* return */
+    return GTK_TREE_MODEL ( store );
 }
 
 
@@ -3381,14 +1280,14 @@ static void report_config_mixed_list_add_sub_div ( gboolean is_categ,
  * 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
+ * \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 )
+gboolean etats_config_onglet_categ_budget_toggled ( GtkCellRendererToggle *radio_renderer,
+                        gchar *path_str,
+                        GtkTreeStore *store )
 {
     GtkTreePath *path;
     GtkTreeIter iter;
@@ -3400,4093 +1299,2443 @@ static gboolean report_config_categ_budget_toggled ( GtkCellRendererToggle *radi
 
     /* 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 );
+    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 );
 
     /* ok, we invert the button */
     toggle_value = !toggle_value;
 
-    gtk_tree_store_set ( GTK_TREE_STORE (store),
-			 &iter,
-			 REPORT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
-			 -1 );
+    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))
+    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));
+        /* 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,
-			     REPORT_CATEG_BUDGET_LIST_ACTIVE, toggle_value,
-			     -1 );
-
-    gtk_tree_path_free (path);
+    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 );
+
+    gtk_tree_path_free ( path );
+
     return FALSE;
 }
 
 
 /**
- * select or unselect all the categories
+ * check or uncheck all the budgets or categories
  *
- * \param button
- * \param select_ptr	TRUE or FALSE to select/unselect all
+ * \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_category_select_all ( GtkWidget *button,
-						    gboolean *select_ptr )
+void etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( GtkTreeModel *model,
+                        gboolean toggle_value )
 {
-    return (report_config_mix_select_all (model_categ, GPOINTER_TO_INT (select_ptr)));
-}
+    GtkTreeIter parent_iter;
 
+    if ( !gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &parent_iter ) )
+        return;
 
+    do
+    {
+        GtkTreeIter iter_children;
 
-/**
- * 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)));
-}
+        gtk_tree_store_set ( GTK_TREE_STORE ( model ),
+                        &parent_iter,
+                        GSB_ETAT_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,
+                        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 ) );
+}
 
 
 /**
- * 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
+ * \param
+ * \param
+ * \param
+ *
+ * \return
  * */
-static gboolean report_config_mix_select_all ( GtkTreeModel *model,
-					       gboolean toggle_value )
+gboolean etats_config_onglet_categ_budget_select_partie_liste ( GtkWidget *button,
+                        GdkEventButton *event,
+                        GtkWidget *tree_view )
 {
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &parent_iter))
-	return FALSE;
+    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;
+
+    etats_config_onglet_categ_budget_tree_model_check_uncheck_all ( model, FALSE );
+
+    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" ) );
 
     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));
+        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 ) );
+
     return FALSE;
 }
 
 
+/*ONGLET_TEXTES*/
 /**
- * select the income or outgoing categories
+ * Rend sensitif la ligne en fonction du choix du combo_box
  *
- * \param button
- * \param type_ptr	FALSE to income categories, TRUE for outgoing categories
+ * \param combo_box
+ * \param number        gpointer sur text_comparison_number
  *
- * \return FALSE
- * */
-static gboolean report_config_category_select_type ( GtkWidget *button,
-						     gboolean *type_ptr )
-
+ * \return
+ */
+static void etats_config_onglet_texte_combo_texte_changed ( GtkComboBox *combo,
+                        gpointer data )
 {
-    return (report_config_mix_select_type (TRUE, GPOINTER_TO_INT (type_ptr)));
-}
+    gint index;
+    gint text_comparison_number;
 
-/**
- * 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)));
+    text_comparison_number = GPOINTER_TO_INT ( data );
+
+    index = gtk_combo_box_get_active ( combo );
+    if ( index == 8 || index == 9 || index == 10 )
+    {
+        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 );
+
+        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 );
+    }
 }
 
+
 /**
- * select the income or outgoing categories or budget
+ * crée une ligne de recherche de texte
  *
- * \param is_categ	TRUE for category, FALSE for budget
- * \param type		FALSE to income item, TRUE for outgoing item
+ * \parent  vbox qui contiendra toutes les lignes
+ * \param   première ligne ou ligne supplémentaire
+ * \param   avec lien
  *
- * \return FALSE
- * */
-static gboolean report_config_mix_select_type ( gboolean is_categ,
-						gboolean type )
-
+ * \return la nouvelle ligne
+ */
+static GtkWidget *etats_config_onglet_texte_new_comparison_line ( GtkWidget *parent,
+                        gint text_comparison_number,
+                        gint with_link )
 {
-    GtkTreeModel *model;
-    GtkTreeIter iter;
-
-    if (is_categ)
-	model = model_categ;
-    else
-	model = model_budget;
+    GtkWidget *vbox;
+    GtkWidget *hbox;
+    GtkWidget *hbox_1;
+    GtkWidget *hbox_2;
+    GtkWidget *combo;
+    GtkWidget *label;
+    GtkWidget *button;
+    GtkWidget *entry;
+    GtkWidget *radio_1;
+    GtkWidget *radio_2;
 
-    report_config_mix_select_all (model, FALSE);
+    /* la vbox qui contient la ligne complète */
+    vbox = gtk_vbox_new ( FALSE, 5 );
 
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter))
-	return FALSE;
+    /* 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 );
 
-    do
+    /* on crée le premier lien ne sert pas si c'est la première ligne */
+    if ( with_link )
     {
-	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));
-	    }
-	}
+        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 );
     }
-    while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter));
-    return FALSE;
+
+    label = gtk_label_new ( _("Transactions whose ") );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 5 );
+
+    /* 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 ) );
+
+    /* 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 );
+
+    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 );
+
+    /* 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 );
+
+    /* 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 ) );
+
+    /* 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 );
+
+    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 );
+
+    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 );
+
+    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 );
+
+    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_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 );
+
+    /* mise en place de la hbox des montants de chq */
+    gtk_box_pack_start ( GTK_BOX ( hbox ), hbox_1, FALSE, FALSE, 0 );
+
+    label = gtk_label_new ( _("is ") );
+    gtk_box_pack_start ( GTK_BOX ( hbox_1 ), label, FALSE, FALSE, 0 );
+
+    /* 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 );
+
+    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 );
+
+    /* 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 );
+
+    /* 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 );
+
+    /* on ajoute le bouton ajouter une nouvelle ligne */
+    etats_config_onglet_texte_get_buttons_add_remove ( hbox, text_comparison_number );
+
+    /* 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 );
+
+    /* 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
+ * ajoute une ligne de recherche de texte à la liste des lignes de recherche de texte
  *
- * \param is_categ	TRUE for categ, FALSE for budget
+ *\param last_text_comparison_number
  *
- * \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 )
+ *\return
+ */
+static void etats_config_onglet_texte_ajoute_ligne_liste_comparaisons ( gint last_text_comparison_number )
 {
-    GtkTreeModel *model;
-    gboolean all_selected = TRUE;
-    GSList *tmp_list = NULL;
+    GtkWidget *lignes;
+    GtkWidget *widget;
+    gint text_comparison_number;
+    gint position;
+    gint current_report_number;
+
+    lignes = etats_prefs_widget_get_widget_by_name ( "liste_textes_etat", NULL );
+    current_report_number = gsb_gui_navigation_get_current_report ();
 
-    if (is_categ)
-	model = model_categ;
+    /* 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
-	model = model_budget;
+        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 );
 
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &parent_iter))
-	return NULL;
+    /* 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 );
 
-    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));
+    /* 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 ) );
 
-    /* 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;
+    /* 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 );
 }
 
 
 /**
- * toggle the categories and sub-categories selected
  *
- * \param is_categ	TRUE for categ, FALSE for budgets
+ *
+ * \param
  *
  * \return
  * */
-static void report_config_category_update_treeview ( gboolean is_categ )
+static void etats_config_onglet_texte_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 ) );
+}
+
+/**
+ * remplit la liste des comparaisons de texte
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_onglet_texte_remplit_liste_comparaisons ( gint report_number )
 {
+    GtkWidget *lignes;
     GSList *tmp_list;
-    gint current_report_number;
+    gchar *tmp_str;
+    gboolean multi_lignes = FALSE;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    /* on commence par effacer les anciennes lignes */
+    lignes = etats_prefs_widget_get_widget_by_name ( "liste_textes_etat", NULL );
+    gtk_container_foreach ( GTK_CONTAINER ( lignes ), ( GtkCallback ) gtk_widget_destroy, NULL );
 
-    if (is_categ)
-    {
-	report_config_mix_select_all (model_categ, FALSE);
-	tmp_list = gsb_data_report_get_category_struct (current_report_number);
-    }
-    else
+    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 )
     {
-	report_config_mix_select_all (model_budget, FALSE);
-	tmp_list = gsb_data_report_get_budget_struct (current_report_number);
+        etats_config_onglet_texte_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 */
     while ( tmp_list )
     {
-	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;
+        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;
     }
 }
 
+
 /**
- * get a struct_categ_budget_sel and toggle on the tree view the corresponding category
- * and the sub-categories
+ * Supprime une ligne de comparaison de texte
  *
- * \param categ_budget_struct	a struct_categ_budget_sel
- * \param is_categ		TRUE for categ, FALSE for budget
+ * \param last_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_retire_ligne_liste_comparaisons ( gint last_text_comparison_number )
 {
-    GtkTreeModel *model;
+    gint current_report_number;
 
-    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));
+    current_report_number = gsb_gui_navigation_get_current_report ( );
 
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &parent_iter))
-	return;
+    /* 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;
 
-    do
-    {
-	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));
-}
+    /* 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 ) ) )
+    {
+        gint text_comparison_number;
 
-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 );
-}
+        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 ) ) );
+}
 
 
 /**
- * create the budget widget to select them in a list
+ * création des boutons add et remove
  *
- * \param
+ * \param parent
+ * \param text_comparison_number numéro à transmettre à la fonction de callback
  *
- * \return the GtkWidget
+ * \return
  * */
-GtkWidget *onglet_etat_tiers ( void )
+static void etats_config_onglet_texte_get_buttons_add_remove ( GtkWidget *parent,
+                        gint text_comparison_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 );
-}
+    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 );
 
+    button = gtk_button_new_with_label ( _("Add") );
+    gtk_widget_show ( button );
+    gtk_button_set_relief ( GTK_BUTTON ( button ), GTK_RELIEF_NONE );
 
-/******************************************************************************/
-void remplissage_liste_tiers_etats ( void )
-{
-    GSList *payee_list;
+    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 ( !liste_tiers_etat )
-	return;
+    gtk_container_add ( GTK_CONTAINER ( alignement ), button );
 
-    devel_debug (NULL);
+    alignement = gtk_alignment_new ( 0.3, 0, 0, 0 );
+    gtk_widget_show ( alignement );
+    gtk_box_pack_start ( GTK_BOX ( parent ), alignement, TRUE, TRUE, 0 );
 
-    gtk_clist_clear ( GTK_CLIST ( liste_tiers_etat ) );
+    button = gtk_button_new_with_label ( _("Remove") );
+    gtk_button_set_relief ( GTK_BUTTON ( button ), GTK_RELIEF_NONE );
 
-    payee_list = gsb_data_payee_get_payees_list();
+    g_signal_connect_swapped ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_config_onglet_texte_retire_ligne_liste_comparaisons ),
+                        GINT_TO_POINTER ( text_comparison_number ) );
 
-    while ( payee_list )
-    {
-	gint payee_number;
-	gchar *name[1];
-	gint row;
+    gtk_container_add ( GTK_CONTAINER ( alignement ), button );
+}
 
-	payee_number = gsb_data_payee_get_no_payee ( payee_list -> data );
 
-	name[0] = my_strdup (gsb_data_payee_get_name (payee_number,
-						     TRUE ));
+/**
+ * Initialise les informations de l'onglet textes
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_textes ( gint report_number )
+{
+    /* on affiche ou pas le choix des textes */
+    etats_prefs_button_toggle_set_actif ( "bouton_utilise_texte",
+                        gsb_data_report_get_text_comparison_used ( report_number ) );
 
-	row = gtk_clist_append ( GTK_CLIST ( liste_tiers_etat ),
-				 name );
+    /* on remplit la liste des lignes de recherche */
+    etats_config_onglet_texte_remplit_liste_comparaisons ( report_number );
+}
 
-	gtk_clist_set_row_data ( GTK_CLIST ( liste_tiers_etat ),
-				 row,
-				 GINT_TO_POINTER (payee_number));
 
-	payee_list = payee_list -> next;
-    }
+/**
+ * Récupère les informations de l'onglet textes
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_textes ( gint report_number )
+{
+    GSList *comparison_list;
 
-    gtk_clist_sort ( GTK_CLIST ( liste_tiers_etat ));
-}
-/******************************************************************************/
+    /* on récupère le choix des textes */
+    gsb_data_report_set_text_comparison_used ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_utilise_texte" ) );
 
-/******************************************************************************/
-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 );
-}
-/******************************************************************************/
+    /* 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 );
 
-/******************************************************************************/
-void remplit_liste_comparaisons_textes_etat ( void )
+    while ( comparison_list )
+    {
+        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;
+    }
+}
+
+
+/*ONGLET_MONTANTS*/
+/**
+ * crée une ligne de recherche de montant
+ *
+ * \parent  vbox qui contiendra toutes les lignes
+ * \param   première ligne ou ligne supplémentaire
+ * \param   avec lien
+ *
+ * \return la nouvelle ligne
+ */
+static GtkWidget *etats_config_onglet_montants_new_comparison_line ( GtkWidget *parent,
+                        gint amount_comparison_number,
+                        gint with_link )
 {
-    GSList *list_tmp;
-    gint current_report_number;
-	gchar* tmpstr;
+    GtkWidget *hbox;
+    GtkWidget *hbox_2;
+    GtkWidget *label;
+    GtkWidget *entry;
+    GtkWidget *combo;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    hbox = gtk_hbox_new ( FALSE, 5 );
 
+    /* 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 );
+    }
 
-    list_tmp = gsb_data_report_get_text_comparison_list (current_report_number);
+    label = gtk_label_new ( _("Transactions with an amount of") );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, 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 );
 
-    /* commence par effacer l'ancienne liste */
+    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 );
 
-    while ( GTK_BOX ( liste_textes_etat ) -> children )
-	gtk_container_remove ( GTK_CONTAINER ( liste_textes_etat ),
-			       (( GtkBoxChild *) ( GTK_BOX ( liste_textes_etat ) -> children -> data )) -> widget );
+    /* 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 );
 
-    /*   s'il n'y a rien dans la liste, on met juste une row vide */
+    /* 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 );
 
-    if ( !list_tmp )
-    {
-	ajoute_ligne_liste_comparaisons_textes_etat (0);
-	return;
-    }
+    /* on ajoute le bouton ajouter une nouvelle ligne */
+    etats_config_onglet_montants_get_buttons_add_remove ( hbox, amount_comparison_number );
 
-    /*   on fait le tour de la liste des comparaisons de texte, ajoute une row */
-    /* et la remplit à chaque fois */
+    /* 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 );
 
-    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;
-    }
+    /* return */
+    return hbox;
 }
-/******************************************************************************/
 
-/******************************************************************************/
-/* 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
+ *
+ *\param last_amount_comparison_number
+ *
+ *\return
+ */
+static 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_prefs_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 )
+
+/**
+ * remplit la liste des comparaisons de montants
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_onglet_montants_remplit_liste_comparaisons ( gint report_number )
 {
-    GtkWidget *vbox;
-    GtkWidget *label;
-    GtkWidget *bouton;
-    GtkWidget *hbox;
+    GtkWidget *lignes;
+    GSList *list_tmp;
+    gchar* tmp_str;
+    gboolean multi_lignes = FALSE;
 
-    /*   on laisse les infos vides, on met juste les boutons et les labels */
+    /* on commence par effacer les anciennes lignes */
+    lignes = etats_prefs_widget_get_widget_by_name ( "liste_montants_etat", NULL );
+    gtk_container_foreach ( GTK_CONTAINER ( lignes ), ( GtkCallback ) gtk_widget_destroy, NULL );
 
-    vbox = gtk_vbox_new ( FALSE,
-			  5 );
+    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 )
+    {
+        etats_config_onglet_montants_ajoute_ligne_liste_comparaisons ( 0 );
+        return;
+    }
 
+    /* on fait le tour de la liste des comparaisons de montant, ajoute une row
+     * et la remplit à chaque fois */
+    while ( list_tmp )
+    {
+        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;
+    }
+}
 
-    /* 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 );
+/**
+ * supprime une liste de comparaison
+ *
+ * \param
+ *
+ * \return
+ * */
+static void etats_config_onglet_montants_retire_ligne_liste_comparaisons ( gint last_amount_comparison_number )
+{
+     gint current_report_number;
 
+    current_report_number = gsb_gui_navigation_get_current_report ();
 
-    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 );
+    /* il faut qu'il y ai plus d'une row affichée */
+    if ( g_slist_length ( gsb_data_report_get_amount_comparison_list ( current_report_number ) ) < 2 )
+        return;
 
-    label = gtk_label_new ( _("Transactions whose ") );
-    gtk_box_pack_start ( GTK_BOX ( hbox ),
-			 label,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( label );
+    /* on commence par supprimer la row dans la liste */
+    gtk_widget_destroy ( gsb_data_report_amount_comparison_get_hbox_line ( last_amount_comparison_number ) );
 
-    /*   avant de créer le bouton des champs, on doit créer hbox_txt, hbox_chq et les 2 check button */
+    /* si la structure qu'on retire est la 1ère, on vire le widget de lient */
+    if ( !g_slist_index ( gsb_data_report_get_amount_comparison_list ( current_report_number ),
+     GINT_TO_POINTER ( last_amount_comparison_number ) ) )
+    {
+        gint amount_comparison_number;
 
-    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 );
+        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 );
+    }
 
-    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 );
+    /* 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 ) ) );
+}
 
-    /* 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));
+/**
+ * création des boutons add et remove
+ *
+ * \param parent
+ * \param text_comparison_number numéro à transmettre à la fonction de callback
+ *
+ * \return
+ * */
+static 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 );
 
-    /* on met maintenant le comparateur txt */
+    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_text (text_comparison_number),
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show (gsb_data_report_text_comparison_get_hbox_text (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 ) );
 
-    /* avant de créer l'opérateur, on doit créer l'entrée de txt */
+    gtk_container_add ( GTK_CONTAINER ( alignement ), button );
 
-    gsb_data_report_text_comparison_set_entry_text ( text_comparison_number,
-						     gtk_entry_new ());
+    alignement = gtk_alignment_new ( 0.3, 0, 0, 0 );
+    gtk_widget_show ( alignement );
+    gtk_box_pack_start ( GTK_BOX ( parent ), alignement, TRUE, TRUE, 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 );
+    button = gtk_button_new_with_label ( _("Remove") );
+    gtk_button_set_relief ( GTK_BUTTON ( button ), GTK_RELIEF_NONE );
 
-    /* on peut maintenant mettre l'entrée de txt */
+    g_signal_connect_swapped ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_config_onglet_montants_retire_ligne_liste_comparaisons ),
+                        GINT_TO_POINTER ( text_comparison_number ) );
 
-    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));
+    gtk_container_add ( GTK_CONTAINER ( alignement ), button );
+}
 
 
-    /* on crée maintenant la 2ème row qui concerne les tests de chq */
+/**
+ * Initialise les informations de l'onglet montants
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_montants ( gint report_number )
+{
+    /* on affiche ou pas le choix des montants */
+    etats_prefs_button_toggle_set_actif ( "bouton_utilise_montant",
+                        gsb_data_report_get_amount_comparison_used ( report_number ) );
 
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
+    /* on remplit la liste des lignes de recherche */
+    etats_config_onglet_montants_remplit_liste_comparaisons ( report_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 );
 
+/**
+ * Récupère les informations de l'onglet montants
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_montants ( gint report_number )
+{
+    gint amount_comparison_number;
 
-    /* on met le check button utilisé en cas de champ à no */
+    /* on récupère le choix des montants */
+    gsb_data_report_set_amount_comparison_used ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_utilise_montant" ) );
 
-    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));
+    /* 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;
 
+        comparison_list = gsb_data_report_get_amount_comparison_list ( report_number );
 
-    /* mise en place de la hbox des montants de chq */
+        while ( comparison_list )
+        {
+            amount_comparison_number = GPOINTER_TO_INT ( comparison_list -> data );
 
-    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));
+            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 );
 
+            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 ) ) ) );
 
-    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));
+            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 ) ) ) );
 
-    /* on peut maintenant ajouter dans hbox_partie_2 */
+            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 ) ) ) ) );
 
-    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 );
+            comparison_list = comparison_list -> next;
+        }
+    }
 
-    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 boutons 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 );
+    gsb_data_report_set_amount_comparison_only_report_non_null ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_exclure_ope_nulles_etat" ) );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void retire_ligne_liste_comparaisons_textes_etat ( gint last_text_comparison_number )
-{
-    gint current_report_number;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+/*ONGLET_MODE_PAIEMENT*/
+/**
+ * Initialise les informations de l'onglet modes de paiement
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_mode_paiement ( gint report_number )
+{
+    gint active;
 
-    /* il faut qu'il y ai plus d'une row affichée */
+    active = gsb_data_report_get_method_of_payment_used ( report_number );
+    etats_prefs_button_toggle_set_actif ( "bouton_detaille_mode_paiement_etat", active );
 
-    if ( g_slist_length ( gsb_data_report_get_text_comparison_list (current_report_number)) < 2 )
-	return;
+    if ( active )
+    {
+        etats_prefs_onglet_mode_paiement_select_rows_from_list (
+                                gsb_data_report_get_method_of_payment_list ( report_number ),
+                                "treeview_mode_paiement" );
 
-    /* on commence par supprimer la row dans la liste */
+        if ( g_slist_length ( gsb_data_report_get_method_of_payment_list ( report_number ) ) )
+            utils_togglebutton_set_label_position_unselect (
+                                etats_prefs_widget_get_widget_by_name (
+                                "togglebutton_select_all_mode_paiement", NULL ),
+                                NULL,
+                                etats_prefs_widget_get_widget_by_name ( "treeview_mode_paiement", NULL ) );
+    }
+}
 
-    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 */
+/**
+ * Récupère les informations de l'onglet mode de paiement
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_mode_paiement ( gint report_number )
+{
+    gint active;
 
-    if ( !g_slist_index ( gsb_data_report_get_text_comparison_list (current_report_number),
-			  GINT_TO_POINTER (last_text_comparison_number)))
+    active = etats_prefs_button_toggle_get_actif ( "bouton_detaille_mode_paiement_etat" );
+    gsb_data_report_set_method_of_payment_used ( report_number, active );
+    if ( active )
     {
-	gint text_comparison_number;
+        gsb_data_report_free_method_of_payment_list ( report_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 );
-    }
+        if ( utils_tree_view_all_rows_are_selected ( GTK_TREE_VIEW (
+         etats_prefs_widget_get_widget_by_name ( "treeview_mode_paiement", NULL ) ) ) )
+        {
+            gchar *text;
+            gchar *hint;
 
-    /* et on retire la struct de la sliste */
+            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.") );
 
-    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 );
-}
-/******************************************************************************/
+            dialogue_special ( GTK_MESSAGE_INFO, make_hint ( hint, text ) );
+            etats_prefs_button_toggle_set_actif ( "togglebutton_select_all_mode_paiement", FALSE );
+            gsb_data_report_set_method_of_payment_used ( report_number, 0 );
 
-/******************************************************************************/
-/* 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));
-}
-/******************************************************************************/
+            g_free ( text );
+            g_free ( hint );
+        }
+        else
+            gsb_data_report_set_method_of_payment_list ( report_number,
+                            etats_prefs_onglet_mode_paiement_get_list_rows_selected (
+                            "treeview_mode_paiement" ) );
 
-/******************************************************************************/
-/* 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 );
+    }
 }
-/******************************************************************************/
 
-/******************************************************************************/
-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 )
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ * */
+GtkTreeModel *etats_config_onglet_mode_paiement_get_model ( void )
 {
+    GtkListStore *list_store;
+    GSList *liste_nom_types = NULL;
     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);
+    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 );
 
-    /* commence par effacer l'ancienne liste */
+    /* create a list of unique names */
+    list_tmp = gsb_data_payment_get_payments_list ( );
 
-    while ( GTK_BOX ( liste_montants_etat ) -> children )
-	gtk_container_remove ( GTK_CONTAINER ( liste_montants_etat ),
-			       (( GtkBoxChild *) ( GTK_BOX ( liste_montants_etat ) -> children -> data )) -> widget );
+    while ( list_tmp )
+    {
+        GtkTreeIter iter;
+        gchar *name;
+        gint payment_number;
 
+        payment_number = gsb_data_payment_get_number (list_tmp -> data);
+        name = my_strdup ( gsb_data_payment_get_name ( payment_number ) );
 
-    /*   s'il n'y a rien dans la liste, on met juste une row vide */
+        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 ( !list_tmp )
-    {
-	ajoute_ligne_liste_comparaisons_montants_etat (0);
-	return;
+        list_tmp = list_tmp -> next;
     }
 
-    /*   on fait le tour de la liste des comparaisons de montant, ajoute une row */
-    /* et la remplit à chaque fois */
+    /* 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 );
 
-    while ( list_tmp )
-    {
-	gint amount_comparison_number;
-	GtkWidget *hbox;
+    /* return */
+    return GTK_TREE_MODEL ( list_store );
+}
 
-	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 */
+/*ONGLET_DIVERS*/
+/**
+ * Initialise les informations de l'onglet divers
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_divers ( gint report_number )
+{
+    gint index;
 
-	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 );
+    index = gsb_data_report_get_show_m ( report_number );
+    etats_prefs_buttons_radio_set_active_index ( "radiobutton_marked_all", index );
 
-	/* on remplit maintenant les widget avec les valeurs de la stucture */
+    etats_prefs_button_toggle_set_actif ( "checkbutton_marked_P",
+                        gsb_data_report_get_show_p ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "checkbutton_marked_R",
+                        gsb_data_report_get_show_r ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "checkbutton_marked_T",
+                        gsb_data_report_get_show_t ( report_number ) );
 
-	/*       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 */
+    etats_prefs_button_toggle_set_actif ( "bouton_pas_detailler_ventilation",
+                        gsb_data_report_get_not_detail_split ( report_number ) );
+}
 
-	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 );
-	}
 
+/**
+ * Récupère les informations de l'onglet divers
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_divers ( gint report_number )
+{
+    gint index;
 
-	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));
+    index = etats_prefs_buttons_radio_get_active_index ( "radiobutton_marked_all" );
+    gsb_data_report_set_show_m ( report_number, index );
 
-	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 );
+    gsb_data_report_set_show_p ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "checkbutton_marked_P" ) );
+    gsb_data_report_set_show_r ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "checkbutton_marked_R" ) );
+    gsb_data_report_set_show_t ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "checkbutton_marked_T" ) );
 
-	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 );
+    gsb_data_report_set_not_detail_split ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_pas_detailler_ventilation" ) );
+}
 
-	/* 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));
+/*ONGLET_DATA_GROUPING*/
+/**
+ * return la liste des données par ordre de tri
+ *
+ * \param report_number
+ *
+ * \return a GSList
+ * */
+static GSList *etats_config_onglet_data_grouping_get_list ( gint report_number )
+{
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    GSList *tmp_list = NULL;
 
-	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));
+    tree_view = etats_prefs_widget_get_widget_by_name ( "treeview_data_grouping", NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
+    if ( gtk_tree_model_get_iter_first ( model, &iter ) )
+    {
+        do
+        {
+            gint type_data;
 
-	/* on sensitive/désensitive la hbox_2 si nécessaire */
+            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 ) );
 
-	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));
+            /* 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 ) );
 
-	list_tmp = list_tmp -> next;
+        return tmp_list;
     }
-}
-/******************************************************************************/
 
-/******************************************************************************/
-/* 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 */
-/******************************************************************************/
+    /* return */
+    return NULL;
+}
 
-void ajoute_ligne_liste_comparaisons_montants_etat ( gint last_amount_comparison_number )
+/**
+ * Update le modèle avec les données sauvegardées
+ *
+ * \param report_number
+ *
+ * \return TRUE
+ */
+static gboolean etats_config_onglet_data_grouping_update_model ( gint report_number )
 {
-    gint position;
-    gint current_report_number;
-    gint amount_comparison_number;
-    GtkWidget *hbox;
-
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GSList *tmp_list;
+    gint i = 0;
 
+    tree_view = etats_prefs_widget_get_widget_by_name ( "treeview_data_grouping", NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
-    /* on récupère tout de suite la position à laquelle il faut insérer la row */
+    /* on reset le model */
+    gtk_list_store_clear ( GTK_LIST_STORE ( model ) );
 
-    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;
+    /* on remplit la liste des données */
+    tmp_list = gsb_data_report_get_sorting_type_list ( report_number );
 
-    /* on commence par créer une structure vide */
+    while ( tmp_list )
+    {
+        GtkTreeIter iter;
+        gchar *string = NULL;
+        gint type_data;
 
-    amount_comparison_number = gsb_data_report_amount_comparison_new (0);
-    gsb_data_report_amount_comparison_set_report_number ( amount_comparison_number,
-							  current_report_number);
+        type_data = GPOINTER_TO_INT ( tmp_list->data );
 
-    /* on crée la row et remplit les widget de la structure */
+        string = etats_config_onglet_data_grouping_get_string ( type_data, i );
+        if ( !string )
+        {
+            tmp_list = tmp_list->next;
+            continue;
+        }
 
-    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 );
+        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 );
 
-    /* on vire le lien de la row s'il n'y a pas encore de liste */
-    /*   (cad si c'est la 1ère row) */
+        g_free ( string );
 
-    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 );
+        i++;
+        tmp_list = tmp_list->next;
     }
 
-    /*   par défaut, le bouton bouton_lien_1_2 est sur stop */
+    /* return */
+    return TRUE;
+}
 
-    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 );
 
-    /* on met la structure dans la liste à la position demandée */
+/**
+ * Initialise les informations de l'onglet groupement des données
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_data_grouping ( gint report_number )
+{
+    etats_prefs_button_toggle_set_actif ( "bouton_regroupe_ope_compte_etat",
+                        gsb_data_report_get_account_group_reports ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_utilise_tiers_etat",
+                        gsb_data_report_get_payee_used ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_group_by_categ",
+                        gsb_data_report_get_category_used ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_utilise_ib_etat",
+                        gsb_data_report_get_budget_used ( report_number ) );
 
-    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 ));
+    etats_config_onglet_data_grouping_update_model ( report_number );
+}
 
 
-    /* on met la row à sa place dans la liste */
+/**
+ * Récupère les informations de l'onglet groupement des données
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_data_grouping ( gint report_number )
+{
+    gsb_data_report_set_account_group_reports ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_regroupe_ope_compte_etat" ) );
+    gsb_data_report_set_payee_used ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_utilise_tiers_etat" ) );
+    gsb_data_report_set_category_used ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_group_by_categ" ) );
+    gsb_data_report_set_budget_used ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_utilise_ib_etat" ) );
 
-    gtk_box_reorder_child ( GTK_BOX ( liste_montants_etat ),
-			    gsb_data_report_amount_comparison_get_hbox_line (amount_comparison_number),
-			    position );
+    /* 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 ) );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-/* 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 )
+
+/**
+ * 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 )
 {
-    GtkWidget *hbox;
-    GtkWidget *label;
-    GtkWidget *bouton;
-    GtkWidget *widget;
-    GtkWidget *widget_1;
+    gchar *string = NULL;
+    gchar *text = NULL;
 
-    /*   on laisse les infos vides, on met juste les boutons et les labels */
+    switch ( type_data )
+    {
+        case 1:
+        text = g_strdup ( _("Category") );
+        break;
 
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
+        case 3:
+        text = g_strdup ( _("Budgetary line") );
+        break;
 
-    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 );
+        case 5:
+        text = g_strdup ( _("Account") );
+        break;
 
-    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);
+        case 6:
+        text = g_strdup ( _("Payee") );
+        break;
+    }
 
-    /* on peut maintenant ajouter dans comp_montants -> hbox_partie_2 */
+    if ( !text )
+        return NULL;
 
-    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 boutons 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 );
-}
-/******************************************************************************/
+    if ( pos <= 0 )
+        string = text;
+    else if ( pos == 1 )
+    {
+        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 );
+    }
 
-/******************************************************************************/
-/* 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 );
+    return string;
 }
-/******************************************************************************/
 
-/******************************************************************************/
-/* 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 )
+/**
+ * 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 )
 {
-    gint sensitif;
+    GtkWidget *tree_view;
+    GtkTreeModel *model;
+    GSList *tmp_list;
+    gint report_number;
+    gint i = 0;
 
-    switch ( GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT ( menu_item ),
-						     "no_comparateur" )))
-    {
-	case 6:
-	case 7:
-	case 8:
-	case 9:
+    report_number = gsb_gui_navigation_get_current_report ( );
+    tmp_list = g_slist_copy ( gsb_data_report_get_sorting_type_list ( report_number ) );
 
-	    sensitif = 0;
-	    break;
+    /* 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 ) );
 
-	default:
+    /* on supprime la donnée à la position initiale */
+    tmp_list = g_slist_remove ( tmp_list, GINT_TO_POINTER ( src_type_data ) );
 
-	    sensitif = 1;
-    }
+    /* on insère la donnée à la position finale */
+    tmp_list = g_slist_insert ( tmp_list, GINT_TO_POINTER ( src_type_data ), dst_pos );
 
-    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 );
-}
-/******************************************************************************/
+    tree_view = etats_prefs_widget_get_widget_by_name ( "treeview_data_grouping", NULL );
+    model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
 
-/******************************************************************************/
-/* 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 reset le model */
+    gtk_list_store_clear ( GTK_LIST_STORE ( model ) );
 
-    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;
+        gpointer ptr;
 
+        ptr = tmp_list->data;
+        type_data = GPOINTER_TO_INT ( ptr );
 
-    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 );
 
-/******************************************************************************/
-/* 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;
+    }
+}
 
 
-/******************************************************************************/
-void retire_ligne_liste_comparaisons_montants_etat ( gint last_amount_comparison_number )
+/*ONGLET_DATA_SEPARATION*/
+/**
+ * Initialise les informations de l'onglet separation des données
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_data_separation ( gint report_number )
 {
-     gint current_report_number;
+    GtkWidget *combo_1;
+    GtkWidget *combo_2;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    etats_prefs_button_toggle_set_actif ( "bouton_separer_revenus_depenses",
+                        gsb_data_report_get_split_credit_debit ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_separe_exo_etat",
+                        gsb_data_report_get_financial_year_split ( report_number ) );
 
-    /* il faut qu'il y ai plus d'une row affichée */
+    /* on initialise le combo bouton_type_separe_plages_etat */
+    combo_1 = etats_prefs_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 ) );
 
-    if ( g_slist_length ( gsb_data_report_get_amount_comparison_list (current_report_number)) < 2 )
-	return;
+    /* on initialise le combo bouton_debut_semaine */
+    combo_2 = etats_prefs_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 commence par supprimer la row dans la liste */
+    if ( gsb_data_report_get_period_split ( report_number ) )
+    {
+        GtkWidget *button;
 
-    gtk_widget_destroy ( gsb_data_report_amount_comparison_get_hbox_line (last_amount_comparison_number));
+        button = etats_prefs_widget_get_widget_by_name ( "bouton_separe_plages_etat", NULL );
+        etats_prefs_button_toggle_set_actif ( "bouton_separe_plages_etat", TRUE );
+        sens_desensitive_pointeur ( button,
+                        etats_prefs_widget_get_widget_by_name ( "paddingbox_data_separation2", NULL ) );
 
-    /* si la structure qu'on retire est la 1ère, on vire le widget de lient */
+        if ( gtk_combo_box_get_active ( GTK_COMBO_BOX ( combo_1 ) ) == 1 )
+            gtk_widget_set_sensitive ( combo_2, TRUE );
+    }
+}
 
-    if ( !g_slist_index ( gsb_data_report_get_amount_comparison_list (current_report_number),
-			  GINT_TO_POINTER (last_amount_comparison_number)))
-    {
-	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 );
-    }
+/**
+ * Récupère les informations de l'onglet separation des données
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_data_separation ( gint report_number )
+{
+    gsb_data_report_set_split_credit_debit ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_separer_revenus_depenses" ) );
+    gsb_data_report_set_financial_year_split ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_separe_exo_etat" ) );
+    gsb_data_report_set_period_split ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_separe_plages_etat" ) );
 
-    /* et on retire la struct de la sliste */
+    /* 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_prefs_widget_get_widget_by_name ( "bouton_type_separe_plages_etat", NULL ) ) ) );
 
-    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)));
+    gsb_data_report_set_period_split_day ( report_number,
+                        gtk_combo_box_get_active ( GTK_COMBO_BOX (
+                        etats_prefs_widget_get_widget_by_name ( "bouton_debut_semaine", NULL ) ) ) );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *onglet_etat_divers ( 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 *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 );
+    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 );
+    }
 }
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *page_data_grouping ( void )
+
+/*ONGLET_AFFICHAGE_GENERALITES*/
+/**
+ * Initialise les informations de l'onglet généraités
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_affichage_generalites ( gint report_number )
 {
-    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 );
+    gtk_entry_set_text ( GTK_ENTRY ( etats_prefs_widget_get_widget_by_name ( "entree_nom_etat", NULL ) ),
+                        gsb_data_report_get_report_name ( report_number ) );
 
-    return vbox_onglet;
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_nb_opes",
+                        gsb_data_report_get_show_report_transaction_amount ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_inclure_dans_tiers",
+                        gsb_data_report_get_append_in_payee ( report_number ) );
 }
 
 
-GtkWidget *page_data_separation ( void )
+/**
+ * Récupère les informations de l'onglet généralités
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_affichage_generalites ( gint report_number )
 {
-    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] )
+    const gchar *text;
+
+    /* on récupère le nom de l'état */
+    text = gtk_entry_get_text ( GTK_ENTRY (
+                        etats_prefs_widget_get_widget_by_name ( "entree_nom_etat", NULL ) ) );
+
+    if ( strlen ( text )
+     &&
+     strcmp ( text, gsb_data_report_get_report_name ( report_number ) ) )
     {
-	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++;
+        gsb_data_report_set_report_name ( report_number, text );
     }
-    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 );
+
+    /* on récupère les autres informations */
+    gsb_data_report_set_show_report_transaction_amount ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_nb_opes" ) );
+    gsb_data_report_set_append_in_payee ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_inclure_dans_tiers" ) );
 }
-/******************************************************************************/
 
-/******************************************************************************/
-void click_haut_classement_etat ( void )
+
+/*ONGLET_AFFICHAGE_TITLES*/
+/**
+ * Initialise les informations de l'onglet titres
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_affichage_titres ( gint report_number )
 {
-    GtkCTreeNode *node_parent;
-    GtkCTreeNode *node;
-    GtkCTreeNode *node_enfant;
-    GtkCTreeNode *nouveau_parent;
+    GtkWidget *button;
+    GtkWidget *widget;
 
-    node = GTK_CLIST ( liste_type_classement_etat )->selection -> data;
+    /* données des comptes */
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_noms_comptes",
+                        gsb_data_report_get_account_show_name ( report_number ) );
 
-    /*   si on est au niveau 1, peut pas plus haut */
+    button = etats_prefs_widget_get_widget_by_name ( "bouton_regroupe_ope_compte_etat", NULL );
 
-    if ( GTK_CTREE_ROW ( node ) -> level == 1 )
-	return;
+    widget = etats_prefs_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 ) );
 
-    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;
+    /* données des tiers */
+    button = etats_prefs_widget_get_widget_by_name ( "bouton_utilise_tiers_etat", NULL );
 
-    nouveau_parent = GTK_CTREE_ROW ( node_parent )->parent;
+    widget = etats_prefs_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 ) );
 
-    /* on remonte le node */
+    widget = etats_prefs_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 ) );
 
-    gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-		     node,
-		     nouveau_parent,
-		     NULL );
+    /* données des catégories */
+    button = etats_prefs_widget_get_widget_by_name ( "bouton_group_by_categ", NULL );
 
-    /* on descend celui du dessus */
+    widget = etats_prefs_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 ) );
 
-    gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-		     node_parent,
-		     node,
-		     NULL );
+    widget = etats_prefs_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 ) );
 
-    /* on attache l'enfant à son nouveau parent */
+    widget = etats_prefs_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 ) );
 
-    if ( node_enfant )
-	gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-			 node_enfant,
-			 node_parent,
-			 NULL );
+    widget = etats_prefs_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 ) );
 
-    gtk_ctree_expand_recursive ( GTK_CTREE ( liste_type_classement_etat ),
-				 node );
-}
-/******************************************************************************/
+    widget = etats_prefs_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 click_bas_classement_etat ( void )
-{
-    GtkCTreeNode *node_parent;
-    GtkCTreeNode *node;
-    GtkCTreeNode *node_enfant;
-    GtkCTreeNode *node_enfant_enfant;
+    /* données des IB */
+    button = etats_prefs_widget_get_widget_by_name ( "bouton_utilise_ib_etat", NULL );
 
-    node = GTK_CLIST ( liste_type_classement_etat )->selection -> data;
+    widget = etats_prefs_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 ) );
 
-    /*   si on est au niveau 4, peut pas plus bas */
+    widget = etats_prefs_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 ) );
 
-    if ( GTK_CTREE_ROW ( node ) -> level == 4 )
-	return;
+    widget = etats_prefs_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 ) );
 
-    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;
+    widget = etats_prefs_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 ) );
 
-    node_enfant_enfant = GTK_CTREE_ROW ( node_enfant )->children;
+    widget = etats_prefs_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 ) );
+}
 
-    /* on remonte le node enfant */
 
-    gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-		     node_enfant,
-		     node_parent,
-		     NULL );
+/**
+ * Récupère les informations de l'onglet titres
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static 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_prefs_button_toggle_get_actif ( "bouton_afficher_noms_comptes" ) );
+    gsb_data_report_set_account_show_amount ( report_number,
+    				    etats_prefs_button_toggle_get_actif ( "bouton_affiche_sous_total_compte" ) );
+
+    /* données des tiers */
+    gsb_data_report_set_payee_show_name ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_afficher_noms_tiers" ) );
+    gsb_data_report_set_payee_show_payee_amount ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_affiche_sous_total_tiers" ) );
+
+    /* données des catégories */
+    gsb_data_report_set_category_show_name ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_afficher_noms_categ" ) );
+    gsb_data_report_set_category_show_category_amount ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_affiche_sous_total_categ" ) );
+    gsb_data_report_set_category_show_sub_category ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_afficher_sous_categ" ) );
+    gsb_data_report_set_category_show_sub_category_amount ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_affiche_sous_total_categ" ) );
+    gsb_data_report_set_category_show_without_category ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_afficher_pas_de_sous_categ" ) );
+
+    /* données des IB */
+    gsb_data_report_set_budget_show_name ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_afficher_noms_ib" ) );
+    gsb_data_report_set_budget_show_budget_amount ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_affiche_sous_total_ib" ) );
+    gsb_data_report_set_budget_show_sub_budget ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_afficher_sous_ib" ) );
+    gsb_data_report_set_budget_show_sub_budget_amount ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_affiche_sous_total_ib" ) );
+    gsb_data_report_set_budget_show_without_budget ( report_number,
+    				  etats_prefs_button_toggle_get_actif ( "bouton_afficher_pas_de_sous_ib" ) );
+}
+
+
+/*ONGLET_AFFICHAGE_OPERATIONS*/
+/**
+ * Initialise les informations de l'onglet opérations
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static 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_prefs_button_toggle_set_actif ( "bouton_afficher_opes",
+                        gsb_data_report_get_show_report_transactions ( report_number ) );
+
+    /* données des opérations à afficher */
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_no_ope",
+                        gsb_data_report_get_show_report_transaction_number ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_date_opes",
+                        gsb_data_report_get_show_report_date ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_value_date_opes",
+                        gsb_data_report_get_show_report_value_date ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_tiers_opes",
+                        gsb_data_report_get_show_report_payee ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_categ_opes",
+                        gsb_data_report_get_show_report_category ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_sous_categ_opes",
+                        gsb_data_report_get_show_report_sub_category ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_ib_opes",
+                        gsb_data_report_get_show_report_budget ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_sous_ib_opes",
+                        gsb_data_report_get_show_report_sub_budget ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_notes_opes",
+                        gsb_data_report_get_show_report_note ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_type_ope",
+                        gsb_data_report_get_show_report_method_of_payment ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_no_cheque",
+                        gsb_data_report_get_show_report_method_of_payment_content ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_pc_opes",
+                        gsb_data_report_get_show_report_voucher ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_exo_opes",
+                        gsb_data_report_get_show_report_financial_year ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_infobd_opes",
+                        gsb_data_report_get_show_report_bank_references ( report_number ) );
+    etats_prefs_button_toggle_set_actif ( "bouton_afficher_no_rappr",
+                        gsb_data_report_get_show_report_marked ( report_number ) );
+
+    /* affichage des titres des colonnes */
+    etats_prefs_button_toggle_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_prefs_button_toggle_set_actif ( "bouton_titre_en_haut", TRUE );
+
+    /* sélectionner le type de classement des opérations */
+    combo = etats_prefs_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_prefs_button_toggle_set_actif ( "bouton_rendre_ope_clickables",
+                        gsb_data_report_get_report_can_click ( report_number ) );
+}
 
-    /* on descend le node */
 
-    gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-		     node,
-		     node_enfant,
-		     NULL );
+/**
+ * Récupère les informations de l'onglet opérations
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_affichage_operations ( gint report_number )
+{
+    GtkWidget *combo;
+
+    gsb_data_report_set_show_report_transactions ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_opes" ) );
+
+    /* données des opérations */
+    gsb_data_report_set_show_report_transaction_number ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_no_ope" ) );
+    gsb_data_report_set_show_report_date ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_date_opes" ) );
+    gsb_data_report_set_show_report_value_date ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_value_date_opes" ) );
+    gsb_data_report_set_show_report_payee ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_tiers_opes" ) );
+    gsb_data_report_set_show_report_category ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_categ_opes" ) );
+    gsb_data_report_set_show_report_sub_category ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_sous_categ_opes" ) );
+    gsb_data_report_set_show_report_budget ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_ib_opes" ) );
+    gsb_data_report_set_show_report_sub_budget ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_sous_ib_opes" ) );
+    gsb_data_report_set_show_report_note ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_notes_opes" ) );
+    gsb_data_report_set_show_report_method_of_payment ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_type_ope" ) );
+    gsb_data_report_set_show_report_method_of_payment_content ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_no_cheque" ) );
+    gsb_data_report_set_show_report_voucher ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_pc_opes" ) );
+    gsb_data_report_set_show_report_financial_year ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_exo_opes" ) );
+    gsb_data_report_set_show_report_bank_references ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_infobd_opes" ) );
+    gsb_data_report_set_show_report_marked ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_no_rappr" ) );
+
+    /* titres des colonnes */
+    gsb_data_report_set_column_title_show ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_afficher_titres_colonnes" ) );
+
+    gsb_data_report_set_column_title_type ( report_number,
+                        etats_prefs_button_toggle_get_actif ( "bouton_titre_changement" ) );
+
+    /* type de classement des opérations */
+    combo = etats_prefs_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_prefs_button_toggle_get_actif ( "bouton_rendre_ope_clickables" ) );
+}
+
+
+/*ONGLET_AFFICHAGE_DEVISES*/
+/**
+ * Initialise les informations de l'onglet devises
+ *
+ * \param report_number
+ *
+ * \return
+ */
+static void etats_config_initialise_onglet_affichage_devises ( gint report_number )
+{
+    GtkWidget *button;
 
-    /* on attache l'enfant de l'enfant à son nouveau parent */
+    button = etats_prefs_widget_get_widget_by_name ( "hbox_devise_general_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_currency_general ( report_number ) );
 
-    if ( node_enfant_enfant )
-	gtk_ctree_move ( GTK_CTREE ( liste_type_classement_etat ),
-			 node_enfant_enfant,
-			 node,
-			 NULL );
+    button = etats_prefs_widget_get_widget_by_name ( "hbox_devise_tiers_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_payee_currency ( report_number ) );
 
-    gtk_ctree_expand_recursive ( GTK_CTREE ( liste_type_classement_etat ),
-				 node );
-}
+    button = etats_prefs_widget_get_widget_by_name ( "hbox_devise_categ_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_category_currency ( report_number ) );
 
+    button = etats_prefs_widget_get_widget_by_name ( "hbox_devise_ib_etat", "button" );
+    gsb_currency_set_combobox_history ( button,
+                        gsb_data_report_get_budget_currency ( report_number ) );
 
+    button = etats_prefs_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 ) );
 
-GtkWidget *onglet_affichage_etat_generalites ( void )
-{
-    GtkWidget *label;
-    GtkWidget *hbox;
-    GtkWidget *vbox_onglet;
-	gchar *text;
-
-    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,
-			 TRUE,
-			 TRUE,
-			 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 );
-
-	/* display hint for bouton_inclure_dans_tiers */
-    hbox = gtk_hbox_new ( FALSE,
-			  5 );
-    gtk_box_pack_start ( GTK_BOX ( vbox_onglet ),
-			 hbox,
-			 FALSE,
-			 FALSE,
-			 0 );
-    gtk_widget_show ( hbox );
-
-	text = make_blue ( _("Hint: if you create a transaction with a report as payee,\n"
-	"Grisbi will automatically create transactions for all payees from the report") );
-
-	label = gtk_label_new ( text );
-	gtk_label_set_use_markup ( GTK_LABEL(label), TRUE );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), 0, 0.5);
-	gtk_label_set_justify ( GTK_LABEL ( label ), GTK_JUSTIFY_LEFT );
-	gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 5) ;
-    gtk_widget_show ( label );
-
-	g_free ( text );
-
-    return ( vbox_onglet );
 }
 
 
+/**
+ * Récupère les informations de l'onglet devises
+ *
+ * \param numéro d'état à mettre à jour
+ *
+ * \return
+ */
+static void etats_config_recupere_info_onglet_affichage_devises ( gint report_number )
+{
+    GtkWidget *button;
+
+    button = etats_prefs_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 ) );
+
+    button = etats_prefs_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 ) );
+
+    button = etats_prefs_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 ) );
+
+    button = etats_prefs_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 ) );
+
+    button = etats_prefs_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 ) );
+
+}
+
 
 /**
+ * ajoute les combobox pour les devises
  *
+ * \param
  *
+ * \return
+ */
+void etats_config_onglet_affichage_devises_make_combobox ( void )
+{
+    GtkWidget *hbox;
+    GtkWidget *button;
+
+    hbox = etats_prefs_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_prefs_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_prefs_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_prefs_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_prefs_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 );
+}
+/*END_ONGLETS*/
+/**
+ * Initialise la boite de dialogue propriétés de l'état.
  *
+ * \param
  *
+ * \return
  */
-GtkWidget *onglet_affichage_etat_operations ( void )
+static gboolean etats_config_initialise_dialog_from_etat ( gint report_number )
 {
-    GtkWidget * table, * vbox_onglet, * menu, * menu_item, * paddingbox;
+    /* onglet période */
+    etats_config_initialise_onglet_periode ( report_number );
 
-    vbox_onglet = new_vbox_with_title_and_icon ( _("Transactions display"), "transdisplay.png" );
-    gtk_widget_show ( vbox_onglet );
-
-    /* afficher ou non les opés */
+    /* onglet virements */
+    etats_config_initialise_onglet_virements ( report_number );
 
-    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 );
+    /* onglet comptes */
+    etats_config_initialise_onglet_comptes ( report_number );
 
-    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 );
+    /* onglet tiers */
+    etats_config_initialise_onglet_tiers ( report_number );
 
-    /* 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 );
+    /* onglet Categories */
+    etats_config_initialise_onglet_categ_budget ( report_number, TRUE );
 
-    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 );
+    /* onglet Budgets */
+    etats_config_initialise_onglet_categ_budget ( report_number, FALSE );
 
-    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 );
+    /* onglet Textes */
+    etats_config_initialise_onglet_textes ( report_number );
 
-    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 Montants */
+    etats_config_initialise_onglet_montants ( report_number );
 
-    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 );
+    /* onglet modes de paiement */
+    etats_config_initialise_onglet_mode_paiement ( 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 );
+    /* onglet divers */
+    etats_config_initialise_onglet_divers ( report_number );
 
-    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 );
+    /* onglet data grouping */
+    etats_config_initialise_onglet_data_grouping ( 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 );
+    /* onglet data separation */
+    etats_config_initialise_onglet_data_separation ( report_number );
 
-    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 );
+    /* onglet generalites */
+    etats_config_initialise_onglet_affichage_generalites ( 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 );
+    /* onglet titres */
+    etats_config_initialise_onglet_affichage_titres ( 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 );
+    /* onglet opérations */
+    etats_config_initialise_onglet_affichage_operations ( report_number );
 
-    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") );
+    /* onglet devises */
+    etats_config_initialise_onglet_affichage_devises ( 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 );
+    /* return */
+    return TRUE;
 }
-/******************************************************************************/
 
-/******************************************************************************/
-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 );
-}
-/******************************************************************************/
 
-/******************************************************************************/
-GtkWidget *onglet_affichage_etat_divers ( void )
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+static gboolean etats_config_recupere_info_to_etat ( gint report_number )
 {
-    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 );
-}
-/******************************************************************************/
+    /* onglet période */
+    etats_config_recupere_info_onglet_periode ( 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 );
-}
-/******************************************************************************/
+    /* onglet virements */
+    etats_config_recupere_info_onglet_virements ( report_number );
 
-/******************************************************************************/
-void remplissage_liste_modes_paiement_etats ( void )
-{
-    GSList *liste_nom_types = NULL;
-    GSList *list_tmp;
+    /* onglet comptes */
+    etats_config_recupere_info_onglet_comptes ( report_number );
 
+    /* onglet tiers */
+    etats_config_recupere_info_onglet_tiers ( report_number );
 
-    if ( !liste_comptes_etat )
-	return;
+    /* onglet Categories */
+    etats_config_recupere_info_onglet_categ_budget ( report_number, TRUE );
 
-    gtk_clist_clear ( GTK_CLIST ( liste_mode_paiement_etat ) );
+    /* onglet Budgets */
+    etats_config_recupere_info_onglet_categ_budget ( report_number, FALSE );
 
-    /* create a list of unique names */
+    /* onglet Textes */
+    etats_config_recupere_info_onglet_textes ( report_number );
 
-    list_tmp = gsb_data_payment_get_payments_list ();
+    /* onglet Montants */
+    etats_config_recupere_info_onglet_montants ( report_number );
 
-    while (list_tmp)
-    {
-	gint payment_number;
+    /* onglet mode de paiement */
+    etats_config_recupere_info_onglet_mode_paiement ( report_number );
 
-	payment_number = gsb_data_payment_get_number (list_tmp -> data);
+    /* onglet modes divers */
+    etats_config_recupere_info_onglet_divers ( 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)));
+    /* onglet modes data grouping */
+    etats_config_recupere_info_onglet_data_grouping ( report_number );
 
-	list_tmp = list_tmp -> next;
-    }
+    /* onglet modes data separation */
+    etats_config_recupere_info_onglet_data_separation ( report_number );
 
-    /* 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 );
+    /* onglet generalites */
+    etats_config_recupere_info_onglet_affichage_generalites ( report_number );
 
-    list_tmp = liste_nom_types;
+    /* onglet titres */
+    etats_config_recupere_info_onglet_affichage_titres ( report_number );
 
-    while ( list_tmp )
-    {
-	gint row;
-	gchar * string = list_tmp -> data;
+    /* onglet opérations */
+    etats_config_recupere_info_onglet_affichage_operations ( report_number );
 
-	row = gtk_clist_append ( GTK_CLIST ( liste_mode_paiement_etat ),
-				 &string );
+    /* onglet devises */
+    etats_config_recupere_info_onglet_affichage_devises ( report_number );
 
-	gtk_clist_set_row_data ( GTK_CLIST ( liste_mode_paiement_etat ),
-				 row,
-				 list_tmp -> data );
+    /* 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 ( );
 
-	list_tmp = list_tmp -> next;
-    }
-}
-/******************************************************************************/
+    /* on avertit grisbi de la modification à enregistrer */
+    gsb_file_set_modified ( TRUE );
+
+    /* on réaffiche l'état */
+    rafraichissement_etat ( 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 );
 
+    gsb_gui_navigation_update_report ( report_number );
 
+    /* return */
+    return TRUE;
+}
 
-/******************************************************************************/
-void selectionne_liste_modes_paiement_etat_courant ( void )
+/**
+ * affiche la fenetre de personnalisation
+ *
+ * \param
+ *
+ * \return
+ */
+void etats_config_personnalisation_etat ( void )
 {
-    gint i;
+    GtkWidget *dialog;
+    GtkWidget *notebook_general;
     gint current_report_number;
 
-    current_report_number = gsb_gui_navigation_get_current_report ();
+    devel_debug (NULL);
 
+    if ( !( current_report_number = gsb_gui_navigation_get_current_report ( ) ) )
+        return;
 
-    if ( !liste_comptes_etat )
-	return;
+    notebook_general = gsb_gui_get_general_notebook ( );
+    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 );
 
-    gtk_clist_unselect_all ( GTK_CLIST ( liste_mode_paiement_etat ));
+    /* Création de la fenetre de dialog */
+    dialog = etats_prefs_new ( run.window );
+    if ( dialog == NULL )
+        return;
 
-    if ( !gsb_data_report_get_method_of_payment_list (current_report_number))
-	return;
+    /* initialisation des données de la fenetre de dialog */
+    etats_config_initialise_dialog_from_etat ( current_report_number );
 
-    /* on fait le tour de la liste pour voir s'il y a un état sélectionné */
+    gtk_widget_show_all ( dialog );
 
-    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 );
-    }
-}
-/******************************************************************************/
+    /* on se repositionne sur le dernier onglet si on a le même rapport */
+    if ( current_report_number == last_report )
+        etats_prefs_left_panel_tree_view_select_last_page ();
 
-/******************************************************************************/
-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))
+    switch ( gtk_dialog_run ( GTK_DIALOG ( dialog ) ) )
     {
-    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 );
-    }
-}
+        case GTK_RESPONSE_OK:
+            etats_config_recupere_info_to_etat ( current_report_number );
+            last_report = current_report_number;
+            break;
 
+        default:
+            break;
+    }
 
-/******************************************************************************/
+    etats_prefs_free_all_var ();
 
-gint classement_alphabetique_tree ( GtkWidget *tree,
-                        GtkCListRow *ligne_1,
-                        GtkCListRow *ligne_2 )
-{
-    return g_utf8_collate ( ligne_1->cell->u.text, ligne_2->cell->u.text );
+    gtk_widget_destroy ( dialog );
 }
 
 
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ * */
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/etats_config.h b/src/etats_config.h
index c3a40b0..7d436b6 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
+
+#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_onglet.c b/src/etats_onglet.c
index f7505fc..140225c 100644
--- a/src/etats_onglet.c
+++ b/src/etats_onglet.c
@@ -194,7 +194,7 @@ GtkWidget *gsb_gui_create_report_toolbar ( void )
     bouton_personnaliser_etat = gsb_automem_stock_button_new ( conf.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) */
@@ -604,23 +604,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) */
@@ -680,23 +680,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 )));
 
 
@@ -769,23 +769,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) */
@@ -860,7 +860,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;
@@ -1272,11 +1272,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/etats_prefs.c b/src/etats_prefs.c
new file mode 100644
index 0000000..9a6328b
--- /dev/null
+++ b/src/etats_prefs.c
@@ -0,0 +1,3156 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*                      2003-2008 Benjamin Drieu (bdrieu at april.org)           */
+/*          2008-2012 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>
+#include <stdlib.h>
+
+/*START_INCLUDE*/
+#include "etats_prefs.h"
+#include "etats_prefs_private.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*/
+/*END_STATIC*/
+
+
+#define ETATS_PREFS_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), ETATS_TYPE_PREFS, EtatsPrefsPrivate))
+
+
+G_DEFINE_TYPE(EtatsPrefs, etats_prefs, GTK_TYPE_DIALOG)
+
+/**
+ *  called when destroy EtatsPrefs
+ *
+ * \param object
+ *
+ * \return
+ */
+static void etats_prefs_dispose ( GObject *object )
+{
+    devel_debug (NULL);
+
+    /* libération de l'objet prefs */
+    G_OBJECT_CLASS ( etats_prefs_parent_class )->dispose ( object );
+}
+
+
+/**
+ * finalise EtatsPrefs
+ *
+ * \param object
+ *
+ * \return
+ */
+static void etats_prefs_finalize ( GObject *object )
+{
+    devel_debug (NULL);
+/*    etats_prefs_dialog = NULL;
+*/
+    /* libération de l'objet prefs */
+    G_OBJECT_CLASS ( etats_prefs_parent_class )->finalize ( object );
+}
+
+
+/**
+ * Initialise EtatsPrefsClass
+ *
+ * \param
+ *
+ * \return
+ */
+static void etats_prefs_class_init ( EtatsPrefsClass *klass )
+{
+    GObjectClass *object_class = G_OBJECT_CLASS ( klass );
+
+    object_class->dispose = etats_prefs_dispose;
+    object_class->finalize = etats_prefs_finalize;
+
+    g_type_class_add_private ( object_class, sizeof( EtatsPrefsPrivate ) );
+}
+
+
+/* GTK_BUILDER */
+/**
+ * Crée un builder et récupère les widgets du fichier grisbi.ui
+ *
+ * \param
+ *
+ * \rerurn
+ * */
+static gboolean etats_prefs_initialise_builder ( EtatsPrefs *prefs )
+{
+    /* Creation d'un nouveau GtkBuilder */
+    etats_prefs_builder = gtk_builder_new ( );
+
+    if ( etats_prefs_builder == NULL )
+        return FALSE;
+
+    /* Chargement du XML dans etats_prefs_builder */
+    if ( !utils_gtkbuilder_merge_ui_data_in_builder ( etats_prefs_builder, "etats_prefs.ui" ) )
+        return FALSE;
+
+    prefs->priv->hpaned = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "dialog_hpaned" ) );
+
+
+    return TRUE;
+}
+
+
+/**
+ * free the gtk_builder
+ *
+ *
+ *
+ * */
+void etats_prefs_free_all_var ( void )
+{
+    g_object_unref ( G_OBJECT ( etats_prefs_builder ) );
+}
+
+/*FONCTIONS UTILITAIRES COMMUNES*/
+/**
+ * retourne l'index du radiobutton actif.
+ *
+ * \param nom du radio_button
+ *
+ * \return index bouton actif
+ */
+gint etats_prefs_buttons_radio_get_active_index ( const gchar *button_name )
+{
+    GtkWidget *radiobutton;
+    gint index = 0;
+
+    radiobutton = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, button_name ) );
+
+    index = utils_radiobutton_get_active_index ( radiobutton );
+
+    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_prefs_buttons_radio_set_active_index ( const gchar *button_name,
+                        gint index )
+{
+    GtkWidget *radiobutton;
+
+    radiobutton = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, button_name ) );
+
+    utils_radiobutton_set_active_index ( radiobutton, index );
+}
+
+
+/**
+ * initialise le bouton expand collapse all
+ *
+ * \param suffixe name
+ * \param tree_view
+ *
+ * \return
+ */
+static void etats_prefs_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_prefs_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_prefs_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_prefs_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_prefs_button_toggle_get_actif ( const gchar *button_name )
+{
+    GtkWidget *button = NULL;
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_button_toggle_set_actif ( const gchar *button_name,
+                        gboolean actif )
+{
+    GtkWidget *button = NULL;
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_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_prefs_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_prefs_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_prefs_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_prefs_widget_get_widget_by_name ( const gchar *parent_name,
+                        const gchar *child_name )
+{
+    return utils_gtkbuilder_get_widget_by_name ( etats_prefs_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_prefs_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_prefs_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
+ */
+static void etats_prefs_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_prefs_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_prefs_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_prefs_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_prefs_widget_set_sensitive ( const gchar *widget_name,
+                        gboolean sensitive )
+{
+    GtkWidget *widget = NULL;
+
+    widget = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, widget_name ) );
+    if ( !widget )
+        return FALSE;
+
+    gtk_widget_set_sensitive ( widget, sensitive );
+
+    return TRUE;
+}
+
+
+/*LEFT_PANEL*/
+/**
+ * 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_prefs_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_prefs_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_prefs_left_panel_tree_view_select_last_page ( void )
+{
+    GtkWidget *tree_view;
+    GtkWidget *notebook;
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "treeview_left_panel" ) );
+    notebook = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "notebook_etats_prefs" ) ),
+
+    utils_ui_left_panel_tree_view_select_page ( tree_view, notebook, last_page );
+
+    /* return */
+    return FALSE;
+}
+
+
+void etats_prefs_left_panel_notebook_change_page ( GtkNotebook *notebook,
+                        gpointer npage,
+                        gint page,
+                        gpointer user_data )
+{
+    last_page = page;
+}
+
+
+/**
+ * remplit le model pour la configuration des états
+ *
+ * \param
+ * \param
+ *
+ * \return
+ * */
+void etats_prefs_left_panel_populate_tree_model ( GtkTreeStore *tree_model,
+                        GtkWidget *notebook )
+{
+    GtkWidget *widget = NULL;
+    GtkTreeIter iter;
+    gint page = 0;
+
+    /* append group page */
+    utils_ui_left_panel_add_line ( tree_model, &iter, NULL, NULL, _("Data selection"), -1 );
+
+    /* append page Dates */
+    widget = etats_prefs_onglet_periode_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Dates"), page );
+    page++;
+
+    /* append page Transferts */
+    widget = etats_prefs_onglet_virements_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Transfers"), page );
+    page++;
+
+    /* append page Accounts */
+    widget = etats_prefs_onglet_comptes_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Accounts"), page );
+    page++;
+
+    /* append page Payee */
+    widget = etats_prefs_onglet_tiers_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Payee"), page );
+    page++;
+
+    /* append page Categories */
+    widget = etats_prefs_onglet_categories_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Categories"), page );
+    page++;
+
+    /* append page Budgetary lines */
+    widget = etats_prefs_onglet_budgets_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Budgetary lines"), page );
+    page++;
+
+    /* append page Texts */
+    widget = etats_prefs_onglet_textes_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Texts"), page );
+    page++;
+
+    /* append page Amounts */
+    widget = etats_prefs_onglet_montants_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Amounts"), page );
+    page++;
+
+    /* append page Payment methods */
+    widget = etats_prefs_onglet_mode_paiement_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Payment methods"), page );
+    page++;
+
+    /* append page Misc. */
+    widget = etats_prefs_onglet_divers_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Miscellaneous"), page );
+    page++;
+
+    /* remplissage de l'onglet d'organisation */
+    utils_ui_left_panel_add_line ( tree_model, &iter, NULL, NULL, _("Data organization"), -1 );
+
+    /* Data grouping */
+    widget = etats_prefs_onglet_data_grouping_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Data grouping"), page );
+    page++;
+
+    /* Data separation */
+    widget = etats_prefs_onglet_data_separation_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Data separation"), page );
+    page++;
+
+    /* remplissage de l'onglet d'affichage */
+    utils_ui_left_panel_add_line ( tree_model, &iter, NULL, NULL, _("Data display"), -1 );
+
+    /* append page Generalities */
+    widget = etats_prefs_onglet_affichage_generalites_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Generalities"), page );
+    page++;
+
+    /* append page divers */
+    widget = etats_prefs_onglet_affichage_titles_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Titles"), page );
+    page++;
+
+    /* append page Transactions */
+    widget = etats_prefs_onglet_affichage_operations_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Transactions"), page );
+    page++;
+
+    /* append page Currencies */
+    widget = etats_prefs_onglet_affichage_devises_create_page ( page );
+    utils_ui_left_panel_add_line ( tree_model, &iter, notebook, widget, _("Currencies"), page );
+}
+
+
+/**
+ * création du tree_view qui liste les onglets de la fenêtre de dialogue
+ *
+ * \param
+ *
+ *\return tree_view or NULL;
+ * */
+static GtkWidget *etats_prefs_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_prefs_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 ) );
+
+    /* initialisation du notebook pour les pages de la configuration */
+    notebook = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "notebook_etats_prefs" ) );
+    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 );
+
+    /* Handle select */
+    selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( tree_view ) );
+    g_signal_connect ( selection,
+                        "changed",
+                        G_CALLBACK ( utils_ui_left_panel_tree_view_selection_changed ),
+                        notebook );
+
+    /* Choose which entries will be selectable */
+    gtk_tree_selection_set_select_function ( selection,
+                        utils_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" );
+
+    /* remplissage du paned gauche */
+    etats_prefs_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_prefs_left_panel_notebook_change_page ),
+                        NULL );
+
+    /* show all widgets */
+    gtk_widget_show_all ( tree_view );
+
+
+    return tree_view;
+}
+
+
+/*RIGHT_PANEL : ONGLET_PERIODE*/
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkTreeModel *etats_prefs_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 );
+}
+
+
+/**
+ * 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_prefs_onglet_periode_date_interval_sensitive ( gboolean show )
+{
+    if ( show > 1 )
+        show = 0;
+
+        etats_prefs_widget_set_sensitive ( "hbox_select_dates", show );
+        gtk_widget_set_sensitive ( utils_gtkbuilder_get_widget_by_name ( etats_prefs_builder,
+                        "hbox_date_init", "entree_date_init_etat" ), show );
+        gtk_widget_set_sensitive ( utils_gtkbuilder_get_widget_by_name ( etats_prefs_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
+ */
+static gboolean etats_prefs_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_prefs_buttons_radio_get_active_index ( "radio_button_utilise_exo" );
+
+    if ( index == 0 )
+    {
+        if ( etats_prefs_tree_view_get_single_row_selected ( "treeview_dates" ) == 1 )
+        index = 1;
+    }
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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;
+}
+
+
+/**
+ *
+ *
+ * \param
+ * \param
+ *
+ * \return
+ */
+static gboolean etats_prefs_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_prefs_onglet_periode_date_interval_sensitive ( selected );
+
+    /* on regarde si on utilise des dates personalisées */
+    etats_prefs_onglet_periode_update_style_left_panel ( NULL, 0 );
+
+    return TRUE;
+}
+
+
+/**
+ * Création de la page de détermination de la période de requête
+ *
+ * \param
+ *
+ * \return la page
+ */
+static GtkWidget *etats_prefs_onglet_periode_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_tree_view_init ( "treeview_dates",
+                        etats_prefs_onglet_periode_get_liste_dates,
+                        GTK_SELECTION_SINGLE,
+                        G_CALLBACK ( etats_prefs_onglet_periode_selection_dates_changed ) );
+
+    gtk_container_set_border_width ( GTK_CONTAINER (
+                        gtk_builder_get_object ( etats_prefs_builder, "vbox_utilisation_date" ) ),
+                        10 );
+
+    /* on initialise les entrées pour les dates personnalisées */
+    etats_config_onglet_periode_make_calendar_entry ();
+
+    etats_prefs_onglet_periode_date_interval_sensitive ( FALSE );
+
+    /* on traite la partie droite de l'onglet dates */
+    etats_prefs_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_prefs_builder, "vbox_utilisation_exo" ) ),
+                        10 );
+
+    button = utils_gtkbuilder_get_widget_by_name ( etats_prefs_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_prefs_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_prefs_builder, "vbox_utilisation_date" ) );
+
+    button = utils_gtkbuilder_get_widget_by_name ( etats_prefs_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_prefs_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_prefs_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_prefs_builder,
+                        "bouton_detaille_exo_etat", NULL ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "sw_exer" ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_COMPTES*/
+/**
+ * select or unselect all the rows of treeview
+ *
+ * \param toggle_button
+ * \param tree_view
+ *
+ * \return
+ * */
+void etats_prefs_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 );
+    	break;
+    }
+}
+
+
+/**
+ * Initialise les boutons de sélection des comptes
+ *
+ * \param suffixe du bouton
+ * \param tree_view
+ *
+ * \return
+ */
+static void etats_prefs_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_prefs_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_prefs_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_prefs_builder, tmp_str ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_onglet_comptes_select_unselect ),
+                        tree_view );
+
+    /* bouton_bank */
+    tmp_str = g_strconcat ( "button_bank_", name, NULL );
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_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_prefs_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_prefs_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_prefs_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_prefs_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_prefs_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_prefs_onglet_comptes_select_unselect ),
+                        tree_view );
+    g_free ( tmp_str );
+}
+
+
+/**
+ * Création de l'onglet comptes
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_widget_set_sensitive ( "vbox_generale_comptes_etat", FALSE );
+
+    /* on crée la liste des comptes */
+    etats_prefs_tree_view_init ( "treeview_comptes",
+                        etats_config_onglet_get_liste_comptes,
+                        GTK_SELECTION_MULTIPLE,
+                        NULL );
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "treeview_comptes" ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_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_prefs_builder, "vbox_generale_comptes_etat" ) );
+
+    /* on met la connection pour sélectionner une partie des comptes */
+    etats_prefs_onglet_comptes_init_buttons_selection ( "comptes", tree_view );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_VIREMENTS*/
+/**
+ * Initialise les boutons pour sensibiliser bouton_exclure_non_virements_etat
+ *  et la liste des comptes.
+ *
+ * \param
+ *
+ * \return
+ */
+static void etats_prefs_onglet_comptes_init_buttons_choix_utilisation_virements ( gint page )
+{
+    GtkWidget *button;
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_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_prefs_builder, "bouton_exclure_non_virements_etat" ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_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_prefs_builder, "bouton_exclure_non_virements_etat" ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_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_prefs_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_prefs_builder,
+                        "bouton_inclusion_virements_perso" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "hbox_liste_comptes_virements" ) );
+}
+
+
+/**
+ * Création de l'onglet virements
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_onglet_virements_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *tree_view;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_widget_set_sensitive ( "hbox_liste_comptes_virements", FALSE );
+
+    /* on crée la liste des comptes */
+    etats_prefs_tree_view_init ( "treeview_virements",
+                        etats_config_onglet_get_liste_comptes,
+                        GTK_SELECTION_MULTIPLE,
+                        NULL );
+
+    tree_view = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "treeview_virements" ) );
+
+    /* on initialise les boutons pour sensibiliser bouton_exclure_non_virements_etat et la liste des comptes */
+    etats_prefs_onglet_comptes_init_buttons_choix_utilisation_virements ( page );
+
+    /* on initialise les boutons pour sélectionner tout ou partie des comptes */
+    etats_prefs_onglet_comptes_init_buttons_selection ( "virements", tree_view );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_TIERS*/
+/**
+ * Fonction de de recherche de tiers
+ *
+ * \param text à rechercher
+ * \param tree_view pour la recherche
+ *
+ * \return
+ */
+static void etats_prefs_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 );
+}
+
+
+/**
+ * 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
+ */
+static void etats_prefs_onglet_tiers_show_hide_prev_next_buttons ( gint show_left,
+                        gint show_right )
+{
+    if ( show_left >= 0 )
+    {
+        etats_prefs_widget_set_sensitive ( "button_tiers_premier", show_left );
+        etats_prefs_widget_set_sensitive ( "button_tiers_precedent", show_left );
+    }
+    if ( show_right >= 0 )
+    {
+        etats_prefs_widget_set_sensitive ( "button_tiers_suivant", show_right );
+        etats_prefs_widget_set_sensitive ( "button_tiers_dernier", show_right );
+    }
+}
+
+
+/**
+ * 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
+ */
+static gboolean etats_prefs_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_prefs_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_prefs_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_prefs_onglet_tiers_show_hide_prev_next_buttons ( FALSE, -1 );
+    else
+        etats_prefs_onglet_tiers_show_hide_prev_next_buttons ( TRUE, -1 );
+
+    if ( gtk_tree_path_compare ( path, last_path ) == 0 )
+        etats_prefs_onglet_tiers_show_hide_prev_next_buttons ( -1, FALSE );
+    else
+        etats_prefs_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
+ */
+static gboolean etats_prefs_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_prefs_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_prefs_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_prefs_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_prefs_onglet_tiers_show_hide_prev_next_buttons ( TRUE, FALSE );
+    }
+
+    return TRUE;
+}
+/**
+ * fonction de callback de changement de sélection
+ *
+ * \param selection
+ * \param NULL
+ *
+ * \return
+ */
+static void etats_prefs_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_prefs_onglet_tiers_show_hide_prev_next_buttons ( TRUE, TRUE );
+    else
+        etats_prefs_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 );
+    }
+}
+
+
+/**
+ * positionne le tree_view sur le premier tiers sélectionné
+ *
+ * \param tree_view
+ * \param event
+ * \param user_data = NULL
+ *
+ * \return
+ */
+static gboolean etats_prefs_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_prefs_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_prefs_onglet_tiers_selection_changed ),
+                        NULL );
+
+    return TRUE;
+}
+
+
+/**
+ * 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
+ */
+static void etats_prefs_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_prefs_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_prefs_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_prefs_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
+ */
+static void etats_prefs_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_prefs_onglet_tiers_search_iter_from_entry ( text, GTK_TREE_VIEW ( tree_view ), GDK_LEFTBUTTON );
+}
+
+
+/**
+ * Création de l'onglet Tiers
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_widget_set_sensitive ( "vbox_detaille_tiers_etat", FALSE );
+
+    /* on crée la liste des tiers */
+    etats_prefs_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_prefs_builder, "treeview_tiers" ) );
+    g_signal_connect ( G_OBJECT ( tree_view ),
+                        "visibility-notify-event",
+                        G_CALLBACK ( etats_prefs_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_prefs_builder, "button_tiers_premier" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_prefs_onglet_tiers_select_first_last_item ),
+                        GINT_TO_POINTER ( GDK_LEFTBUTTON ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "button_tiers_precedent" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_prefs_onglet_tiers_select_prev_next_item ),
+                        GINT_TO_POINTER ( GDK_LEFTBUTTON ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "button_tiers_suivant" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_prefs_onglet_tiers_select_prev_next_item ),
+                        GINT_TO_POINTER ( GDK_RIGHTBUTTON ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "button_tiers_dernier" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "button-press-event",
+                        G_CALLBACK ( etats_prefs_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_prefs_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_prefs_builder, "bouton_detaille_tiers_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_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_prefs_builder, "vbox_detaille_tiers_etat" ) );
+
+    /* on met la connection pour (dé)sélectionner tous les tiers */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_builder, "search_entry_tiers" ) );
+    g_signal_connect ( G_OBJECT ( entry ),
+                        "insert-text",
+                        G_CALLBACK ( etats_prefs_onglet_tiers_entry_insert_text ),
+                        tree_view );
+    g_signal_connect ( G_OBJECT ( entry ),
+                        "delete-text",
+                        G_CALLBACK ( etats_prefs_onglet_tiers_entry_delete_text ),
+                        tree_view );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : COMMUN_ONGLET_CATEGORIES*/
+/**
+ * coche ou décoche toutes les cases du tree_view
+ *
+ * \param toggle_button
+ * \param tree_view
+ *
+ * \return
+ * */
+void etats_prefs_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 );
+}
+
+
+/**
+ * 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 *etats_prefs_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_prefs_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_prefs_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_prefs_builder, tmp_str, NULL );
+    g_signal_connect ( G_OBJECT  ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_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_prefs_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_prefs_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 );
+}
+
+
+/*RIGHT_PANEL : ONGLET_CATEGORIES*/
+/**
+ * Création de l'onglet Catégories
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_widget_set_sensitive ( "vbox_detaille_categ_etat", FALSE );
+
+    /* on crée la liste des catégories */
+    tree_view = etats_prefs_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_prefs_builder, "bouton_detaille_categ_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_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_prefs_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour déplier replier les catégories */
+    etats_prefs_toggle_button_init_button_expand ( "categ", tree_view );
+
+    /* on met la connection pour (dé)sélectionner tout ou partie des catégories */
+    etats_prefs_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
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_widget_set_sensitive ( "vbox_detaille_budget_etat", FALSE );
+
+    /* on crée la liste des IB */
+    tree_view = etats_prefs_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_prefs_builder, "bouton_detaille_budget_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        utils_gtkbuilder_get_widget_by_name ( etats_prefs_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_prefs_left_panel_tree_view_update_style ),
+                        GINT_TO_POINTER ( page ) );
+
+    /* on met la connection pour déplier replier les IB */
+    etats_prefs_toggle_button_init_button_expand ( "budget", tree_view );
+
+    /* on met la connection pour sélectionner tout ou partie des IB */
+    etats_prefs_onglet_categ_budget_init_buttons_select_unselect ( "budget", tree_view, FALSE );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_TEXTES*/
+/**
+ * Création de l'onglet recherche de textes
+ *
+ * \param gint page
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_onglet_textes_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_builder, "bouton_utilise_texte" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_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_prefs_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
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_builder, "bouton_utilise_montant" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_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_prefs_builder, "vbox_generale_montants_etat" ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* on retourne la vbox */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_MODE_PAIEMENT*/
+/**
+ * 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_prefs_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_prefs_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_prefs_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_prefs_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;
+}
+
+
+/**
+ * Création de l'onglet moyens de paiement
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_widget_set_sensitive ( "vbox_mode_paiement_etat", FALSE );
+
+    /* on crée la liste des moyens de paiement */
+    etats_prefs_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_prefs_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_prefs_builder, "bouton_detaille_mode_paiement_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_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_prefs_builder, "vbox_mode_paiement_etat" ) );
+
+    /* on met la connection pour (dé)sélectionner tous les tiers */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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;
+}
+
+
+/*RIGHT_PANEL : ONGLET_DIVERS*/
+/**
+ * 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
+ */
+static gboolean etats_prefs_onglet_divers_update_style_left_panel ( GtkWidget *button,
+                        gint *page_number )
+{
+    gint active;
+    gint index;
+
+    index = etats_prefs_buttons_radio_get_active_index ( "radiobutton_marked_all" );
+    active = etats_prefs_button_toggle_get_actif ( "bouton_pas_detailler_ventilation" );
+
+    if ( GTK_IS_RADIO_BUTTON ( button ) )
+    {
+        if ( active == 0 )
+            etats_prefs_left_panel_tree_view_update_style ( button, page_number );
+    }
+    else
+    {
+        if ( index == 0 )
+            etats_prefs_left_panel_tree_view_update_style ( button, page_number );
+    }
+
+    return TRUE;
+}
+
+
+/**
+ * Création de l'onglet Divers
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_onglet_divers_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_builder, "radiobutton_marked" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_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_prefs_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_prefs_builder, "radiobutton_marked_No_R" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_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_prefs_builder, "bouton_pas_detailler_ventilation" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( etats_prefs_onglet_divers_update_style_left_panel ),
+                        GINT_TO_POINTER ( page ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_DATA_GROUPING*/
+/**
+ * callback when treeview_data_grouping receive a drag and drop signal
+ *
+ * \param drag_dest
+ * \param dest_path
+ * \param selection_data
+ *
+ * \return FALSE
+ */
+gboolean etats_prefs_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.
+ */
+static gboolean etats_prefs_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_prefs_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.
+ */
+static gboolean etats_prefs_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;
+}
+
+
+/**
+ * fonction de callback de changement de sélection
+ *
+ * \param selection
+ * \param NULL
+ *
+ * \return
+ */
+void etats_prefs_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_prefs_builder, "button_data_grouping_up" ) ) );
+                sensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_prefs_builder, "button_data_grouping_down" ) ) );
+                break;
+            case 3:
+                sensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_prefs_builder, "button_data_grouping_up" ) ) );
+                desensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_prefs_builder, "button_data_grouping_down" ) ) );
+                break;
+            default:
+                sensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_prefs_builder, "button_data_grouping_up" ) ) );
+                sensitive_widget ( NULL,
+                                GTK_WIDGET ( gtk_builder_get_object (
+                                etats_prefs_builder, "button_data_grouping_down" ) ) );
+                break;
+        }
+    }
+}
+
+
+/**
+ * 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
+ */
+static gboolean etats_prefs_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_prefs_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_prefs_onglet_data_grouping_drag_data_received;
+        dst_iface -> row_drop_possible = &etats_prefs_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_prefs_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_prefs_onglet_data_grouping_selection_changed ),
+                        tree_view );
+
+    /* return */
+    return TRUE;
+}
+
+
+/**
+ * callback when a button receive a clicked signal
+ *
+ * \param the button
+ * \param a pointer for the direction of movement
+ *
+ * \return
+ */
+static void etats_prefs_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_prefs_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 );
+    }
+}
+
+
+/**
+ * Création de l'onglet groupement des donnés
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_onglet_data_grouping_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_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_prefs_builder, "button_data_grouping_up" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_prefs_onglet_data_grouping_button_clicked ),
+                        GINT_TO_POINTER ( GSB_UP ) );
+
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "button_data_grouping_down" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "clicked",
+                        G_CALLBACK ( etats_prefs_onglet_data_grouping_button_clicked ),
+                        GINT_TO_POINTER ( GSB_DOWN ) );
+
+    gtk_widget_show_all ( vbox_onglet );
+
+    /* return */
+    return vbox_onglet;
+}
+
+
+/*RIGHT_PANEL : ONGLET_DATA_SEPARATION*/
+/**
+ * Création de l'onglet séparation des donnés
+ *
+ * \param
+ *
+ * \return
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_builder, "radio_button_utilise_exo" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_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_prefs_builder, "bouton_separe_plages_etat" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_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_prefs_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_prefs_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
+ */
+static GtkWidget *etats_prefs_onglet_affichage_generalites_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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
+ */
+static GtkWidget *etats_prefs_onglet_affichage_titles_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+    GtkWidget *button;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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_prefs_builder, "bouton_regroupe_ope_compte_etat" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_affiche_sous_total_compte" ) );
+
+    /* affichage possible des tiers */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "bouton_utilise_tiers_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_afficher_noms_tiers" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_affiche_sous_total_tiers" ) );
+
+    /* affichage possible des categories */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "bouton_group_by_categ" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_afficher_noms_categ" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_affiche_sous_total_categ" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_afficher_sous_categ" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_affiche_sous_total_sous_categ" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_afficher_pas_de_sous_categ" ) );
+
+    /* affichage possible des ib */
+    button = GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_builder, "bouton_utilise_ib_etat" ) );
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_afficher_noms_ib" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_affiche_sous_total_ib" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_afficher_sous_ib" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_builder, "bouton_affiche_sous_total_sous_ib" ) );
+
+    g_signal_connect ( G_OBJECT ( button ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object ( etats_prefs_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
+ */
+static GtkWidget *etats_prefs_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_prefs_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_prefs_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_prefs_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_prefs_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_prefs_classement_operations ) );
+    combo = GTK_COMBO_BOX ( gtk_builder_get_object ( etats_prefs_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_prefs_builder, "bouton_afficher_categ_opes" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object (
+                        etats_prefs_builder, "bouton_afficher_sous_categ_opes" ) );
+
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object (
+                        etats_prefs_builder, "bouton_afficher_ib_opes" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object (
+                        etats_prefs_builder, "bouton_afficher_sous_ib_opes" ) );
+
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object (
+                        etats_prefs_builder, "bouton_afficher_titres_colonnes" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object (
+                        etats_prefs_builder, "bouton_titre_changement" ) );
+
+    g_signal_connect ( G_OBJECT ( gtk_builder_get_object (
+                        etats_prefs_builder, "bouton_afficher_titres_colonnes" ) ),
+                        "toggled",
+                        G_CALLBACK ( sens_desensitive_pointeur ),
+                        gtk_builder_get_object (
+                        etats_prefs_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
+ */
+static GtkWidget *etats_prefs_onglet_affichage_devises_create_page ( gint page )
+{
+    GtkWidget *vbox_onglet;
+    GtkWidget *vbox;
+
+    vbox_onglet =  GTK_WIDGET ( gtk_builder_get_object ( etats_prefs_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;
+}
+
+
+/* CREATE OBJECT */
+/**
+ * Initialise EtatsPrefs
+ *
+ * \param prefs
+ *
+ * \return
+ */
+static void etats_prefs_init ( EtatsPrefs *prefs )
+{
+    GtkWidget *tree_view;
+    prefs->priv = ETATS_PREFS_GET_PRIVATE ( prefs );
+
+    devel_debug (NULL);
+
+    if ( !etats_prefs_initialise_builder ( prefs ) )
+        exit ( 1 );
+
+    gtk_dialog_add_buttons ( GTK_DIALOG ( prefs ),
+                        GTK_STOCK_CANCEL,
+                        GTK_RESPONSE_CANCEL,
+                        GTK_STOCK_OK,
+                        GTK_RESPONSE_OK,
+                        NULL );
+
+    gtk_window_set_title ( GTK_WINDOW ( prefs ), _("Report properties") );
+    gtk_window_set_destroy_with_parent ( GTK_WINDOW ( prefs ), TRUE );
+
+    gtk_container_set_border_width ( GTK_CONTAINER ( prefs ), 5 );
+    gtk_box_set_spacing (GTK_BOX ( gtk_dialog_get_content_area ( GTK_DIALOG ( prefs ) ) ), 2 );
+    gtk_container_set_border_width ( GTK_CONTAINER ( gtk_dialog_get_action_area ( GTK_DIALOG ( prefs ) ) ), 5 );
+    gtk_box_set_spacing (GTK_BOX ( gtk_dialog_get_action_area (GTK_DIALOG ( prefs ) ) ), 6 );
+
+    /* Recupération d'un pointeur sur le gtk_tree_view. */
+    tree_view = etats_prefs_left_panel_create_tree_view ();
+
+    gtk_box_pack_start ( GTK_BOX ( gtk_dialog_get_content_area ( GTK_DIALOG ( prefs ) ) ),
+                        prefs->priv->hpaned, TRUE, TRUE, 0 );
+
+    gtk_widget_show_all ( prefs->priv->hpaned );
+}
+
+
+GtkWidget *etats_prefs_new ( GtkWidget *parent )
+{
+    GtkWidget *dialog = NULL;
+
+    dialog = g_object_new ( ETATS_TYPE_PREFS, NULL );
+    g_signal_connect ( dialog,
+                        "destroy",
+                        G_CALLBACK ( gtk_widget_destroy ),
+                        NULL );
+
+    if ( GTK_WINDOW ( parent) != gtk_window_get_transient_for ( GTK_WINDOW ( dialog ) ) )
+        gtk_window_set_transient_for ( GTK_WINDOW ( dialog ), GTK_WINDOW ( parent ) );
+
+    return dialog;
+}
+
+
+/**
+ *
+ *
+ * \param
+ *
+ * \return
+ * */
+/* Local Variables: */
+/* c-basic-offset: 4 */
+/* End: */
diff --git a/src/etats_prefs.h b/src/etats_prefs.h
new file mode 100644
index 0000000..e195098
--- /dev/null
+++ b/src/etats_prefs.h
@@ -0,0 +1,85 @@
+#ifndef _ETATS_PREFS_H
+#define _ETATS_PREFS_H
+
+#include <gtk/gtk.h>
+
+/*START_INCLUDE*/
+#include "structures.h"
+/*END_INCLUDE*/
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define ETATS_TYPE_PREFS              (etats_prefs_get_type())
+#define ETATS_PREFS(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), ETATS_TYPE_PREFS, EtatsPrefs))
+#define ETATS_PREFS_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), ETATS_TYPE_PREFS, EtatsPrefsClass))
+#define ETATS_IS_PREFS(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), ETATS_TYPE_PREFS))
+#define ETATS_IS_PREFS_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), ETATS_TYPE_PREFS))
+#define ETATS_PREFS_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), ETATS_TYPE_PREFS, EtatsPrefsClass))
+
+/* Private structure type */
+typedef struct _EtatsPrefsPrivate EtatsPrefsPrivate;
+
+
+/* Main object structure */
+typedef struct _EtatsPrefs EtatsPrefs;
+
+struct _EtatsPrefs
+{
+    GtkDialog dialog;
+
+    /*< private > */
+    EtatsPrefsPrivate *priv;
+};
+
+
+/* Class definition */
+typedef struct _EtatsPrefsClass EtatsPrefsClass;
+
+struct _EtatsPrefsClass
+{
+    GtkDialogClass parent_class;
+};
+
+
+/* construction */
+GType etats_prefs_get_type ( void ) G_GNUC_CONST;
+GtkWidget *etats_prefs_new ( GtkWidget *parent );
+
+gboolean etats_prefs_button_toggle_get_actif ( const gchar *button_name );
+gboolean etats_prefs_button_toggle_set_actif ( const gchar *button_name,
+                        gboolean actif );
+
+gint etats_prefs_buttons_radio_get_active_index ( const gchar *button_name );
+void etats_prefs_buttons_radio_set_active_index ( const gchar *button_name,
+                        gint index );
+
+void etats_prefs_free_all_var ( void );
+
+gboolean etats_prefs_left_panel_tree_view_select_last_page ( void );
+
+void etats_prefs_onglet_comptes_select_unselect ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view );
+void etats_prefs_onglet_categ_budget_check_uncheck_all ( GtkToggleButton *togglebutton,
+                        GtkWidget *tree_view );
+GSList *etats_prefs_onglet_mode_paiement_get_list_rows_selected ( const gchar *treeview_name );
+void etats_prefs_onglet_mode_paiement_select_rows_from_list ( GSList *liste,
+                        const gchar *treeview_name );
+void etats_prefs_onglet_periode_date_interval_sensitive ( gboolean show );
+
+GSList *etats_prefs_tree_view_get_list_rows_selected ( const gchar *treeview_name );
+gint etats_prefs_tree_view_get_single_row_selected ( const gchar *treeview_name );
+void etats_prefs_tree_view_select_rows_from_list ( GSList *liste,
+                        const gchar *treeview_name,
+                        gint column );
+void etats_prefs_tree_view_select_single_row ( const gchar *treeview_name,
+                        gint numero );
+GtkWidget *etats_prefs_widget_get_widget_by_name ( const gchar *parent_name,
+                        const gchar *child_name );
+gboolean etats_prefs_widget_set_sensitive ( const gchar *widget_name,
+                        gboolean sensitive );
+G_END_DECLS
+
+#endif  /* _ETATS_PREFS_H_ */
diff --git a/src/etats_prefs_private.h b/src/etats_prefs_private.h
new file mode 100644
index 0000000..246ea48
--- /dev/null
+++ b/src/etats_prefs_private.h
@@ -0,0 +1,113 @@
+#ifndef _ETATS_PREFS_PRIVATE_H
+#define _ETATS_PREFS_PRIVATE_H
+
+#include <gtk/gtk.h>
+
+/*START_INCLUDE*/
+/*END_INCLUDE*/
+
+G_BEGIN_DECLS
+
+/*START_GLOBAL_VARIABLES*/
+/* 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_prefs_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,
+};
+
+/* 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;
+
+/* builder */
+static GtkBuilder *etats_prefs_builder = NULL;
+/*END_GLOBAL_VARIABLES*/
+
+
+struct _EtatsPrefsPrivate
+{
+    GtkWidget           *hpaned;
+};
+
+
+/*START_PRIVATE_FUNCTIONS*/
+static GtkWidget *etats_prefs_onglet_budgets_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_categories_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_comptes_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_divers_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_mode_paiement_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_montants_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_periode_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_textes_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_tiers_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_virements_create_page ( gint page );
+
+static GtkWidget *etats_prefs_onglet_data_grouping_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_data_separation_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_affichage_generalites_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_affichage_titles_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_affichage_operations_create_page ( gint page );
+static GtkWidget *etats_prefs_onglet_affichage_devises_create_page ( gint page );
+/*END_PRIVATE_FUNCTIONS*/
+
+
+G_END_DECLS
+
+#endif  /* _ETATS_PREFS_H_ */
diff --git a/src/gsb_assistant_file.c b/src/gsb_assistant_file.c
index 2b1c3d7..ba69201 100644
--- a/src/gsb_assistant_file.c
+++ b/src/gsb_assistant_file.c
@@ -283,7 +283,7 @@ static GtkWidget *gsb_assistant_file_page_2 ( GtkWidget *assistant )
 	gtk_box_pack_start ( GTK_BOX ( paddingbox ), table, FALSE, FALSE, 0);
 
 	/* label account name */
-	label = gtk_label_new ( _("Accounts file title: ") );
+	label = gtk_label_new ( _("Name of accounting entity: ") );
 	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,
diff --git a/src/gsb_assistant_reconcile_config.c b/src/gsb_assistant_reconcile_config.c
index c25939c..7296b1c 100644
--- a/src/gsb_assistant_reconcile_config.c
+++ b/src/gsb_assistant_reconcile_config.c
@@ -389,7 +389,7 @@ static GtkWidget *gsb_assistant_reconcile_config_page_new_reconcile ( void )
 	gtk_box_pack_start ( GTK_BOX (paddingbox), table, FALSE, FALSE, 0 );
 
 	/* set the name */
-	label = gtk_label_new ( _("Name: ") );
+	label = gtk_label_new ( _("Reconciliation reference: ") );
 	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,
@@ -1228,7 +1228,7 @@ static gboolean gsb_assistant_reconcile_config_lauch_manu_asso ( GtkWidget *butt
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *cell;
 	gchar *titles[] = {
-	    _("Name"), _("Initial date"), _("Final date")
+	    _("Reconciliation reference"), _("Initial date"), _("Final date")
 	};
 	gfloat alignment[] = {
 	    COLUMN_LEFT, COLUMN_CENTER, COLUMN_CENTER
diff --git a/src/gsb_data_fyear.c b/src/gsb_data_fyear.c
index 6df54aa..0095637 100644
--- a/src/gsb_data_fyear.c
+++ b/src/gsb_data_fyear.c
@@ -705,14 +705,14 @@ gint gsb_data_fyear_compare_from_struct ( struct_fyear *fyear_1,
     if ( !fyear_1 || !fyear_2 )
         return 0;
 
-    if ( ! fyear_1 -> beginning_date )
+    if ( !fyear_1 -> beginning_date )
         return -1;
-    if ( ! fyear_2 -> beginning_date )
+    if ( !fyear_2 -> beginning_date )
         return -1;
 
-    if (g_date_compare (fyear_1 -> beginning_date, fyear_2 -> end_date) >= 0)
+    if ( g_date_compare ( fyear_1 -> end_date, fyear_2 -> beginning_date ) < 0 )
         return -1;
-    if (g_date_compare (fyear_2 -> beginning_date, fyear_1 -> end_date) >= 0)
+    if ( g_date_compare ( fyear_1 -> beginning_date, fyear_2 -> end_date ) > 0 )
         return 1;
     return 0;
 }
diff --git a/src/gsb_data_report.c b/src/gsb_data_report.c
index 91982d3..9a1ad0d 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-2012 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,7 +44,7 @@
 #include "utils_str.h"
 /*END_INCLUDE*/
 
-/** \struct
+/** \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;
@@ -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);
@@ -511,7 +520,7 @@ gchar *gsb_data_report_get_report_name ( gint report_number )
  * \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,50 +539,6 @@ 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
@@ -601,7 +566,7 @@ gint gsb_data_report_get_show_report_transactions ( gint report_number )
  * \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;
 
@@ -644,7 +609,7 @@ gint gsb_data_report_get_show_report_transaction_amount ( gint report_number )
  * \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;
 
@@ -687,7 +652,7 @@ gint gsb_data_report_get_show_report_date ( gint report_number )
  * \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;
 
@@ -729,7 +694,7 @@ gint gsb_data_report_get_show_report_value_date ( gint report_number )
  * \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;
 
@@ -772,7 +737,7 @@ gint gsb_data_report_get_show_report_payee ( gint report_number )
  * \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;
 
@@ -815,7 +780,7 @@ gint gsb_data_report_get_show_report_category ( gint report_number )
  * \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;
 
@@ -858,7 +823,7 @@ gint gsb_data_report_get_show_report_sub_category ( gint report_number )
  * \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;
 
@@ -901,7 +866,7 @@ gint gsb_data_report_get_show_report_budget ( gint report_number )
  * \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;
 
@@ -944,7 +909,7 @@ gint gsb_data_report_get_show_report_sub_budget ( gint report_number )
  * \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;
 
@@ -987,7 +952,7 @@ gint gsb_data_report_get_show_report_note ( gint report_number )
  * \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;
 
@@ -1030,7 +995,7 @@ gint gsb_data_report_get_show_report_voucher ( gint report_number )
  * \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;
 
@@ -1073,7 +1038,7 @@ gint gsb_data_report_get_show_report_bank_references ( gint report_number )
  * \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;
 
@@ -1116,7 +1081,7 @@ gint gsb_data_report_get_show_report_transaction_number ( gint report_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;
 
@@ -1159,7 +1124,7 @@ gint gsb_data_report_get_show_report_method_of_payment ( gint report_number )
  * \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;
 
@@ -1202,7 +1167,7 @@ gint gsb_data_report_get_show_report_method_of_payment_content ( gint report_num
  * \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;
 
@@ -1245,7 +1210,7 @@ gint gsb_data_report_get_show_report_marked ( gint report_number )
  * \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;
 
@@ -1288,7 +1253,7 @@ gint gsb_data_report_get_show_report_financial_year ( gint report_number )
  * \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;
 
@@ -1331,7 +1296,7 @@ gint gsb_data_report_get_sorting_report ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_sorting_report ( gint report_number,
-					      gint sorting_report )
+                        gint sorting_report )
 {
     struct_report *report;
 
@@ -1374,7 +1339,7 @@ gint gsb_data_report_get_not_detail_split ( gint report_number )
  * \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;
 
@@ -1417,7 +1382,7 @@ gint gsb_data_report_get_split_credit_debit ( gint report_number )
  * \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;
 
@@ -1460,7 +1425,7 @@ gint gsb_data_report_get_currency_general ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_currency_general ( gint report_number,
-						gint currency_general )
+                        gint currency_general )
 {
     struct_report *report;
 
@@ -1503,7 +1468,7 @@ gint gsb_data_report_get_column_title_show ( gint report_number )
  * \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;
 
@@ -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;
 
@@ -1589,7 +1554,7 @@ gint gsb_data_report_get_append_in_payee ( gint report_number )
  * \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;
 
@@ -1632,7 +1597,7 @@ gint gsb_data_report_get_report_can_click ( gint report_number )
  * \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;
 
@@ -1675,7 +1640,7 @@ gint gsb_data_report_get_use_financial_year ( gint report_number )
  * \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;
 
@@ -1718,7 +1683,7 @@ gint gsb_data_report_get_financial_year_type ( gint report_number )
  * \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;
 
@@ -1761,7 +1726,7 @@ gint gsb_data_report_get_financial_year_split ( gint report_number )
  * \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;
 
@@ -1804,7 +1769,7 @@ gint gsb_data_report_get_date_type ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_date_type ( gint report_number,
-					 gint date_type )
+                        gint date_type )
 {
     struct_report *report;
 
@@ -1847,7 +1812,7 @@ GDate *gsb_data_report_get_personal_date_start ( gint report_number )
  * \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;
 
@@ -1889,7 +1854,7 @@ GDate *gsb_data_report_get_personal_date_end ( gint report_number )
  * \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;
 
@@ -1932,7 +1897,7 @@ gint gsb_data_report_get_period_split ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_period_split ( gint report_number,
-					    gint period_split )
+                        gint period_split )
 {
     struct_report *report;
 
@@ -1975,7 +1940,7 @@ gint gsb_data_report_get_period_split_type ( gint report_number )
  * \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;
 
@@ -2018,7 +1983,7 @@ gint gsb_data_report_get_period_split_day ( gint report_number )
  * \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;
 
@@ -2061,7 +2026,7 @@ gint gsb_data_report_get_account_use_chosen ( gint report_number )
  * \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;
 
@@ -2104,7 +2069,7 @@ gint gsb_data_report_get_account_group_reports ( gint report_number )
  * \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;
 
@@ -2147,7 +2112,7 @@ gint gsb_data_report_get_account_show_amount ( gint report_number )
  * \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;
 
@@ -2190,7 +2155,7 @@ gint gsb_data_report_get_account_show_name ( gint report_number )
  * \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;
 
@@ -2233,7 +2198,7 @@ gint gsb_data_report_get_transfer_choice ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_transfer_choice ( gint report_number,
-					       gint transfer_choice )
+                        gint transfer_choice )
 {
     struct_report *report;
 
@@ -2276,7 +2241,7 @@ gint gsb_data_report_get_transfer_reports_only ( gint report_number )
  * \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;
 
@@ -2319,7 +2284,7 @@ gint gsb_data_report_get_category_used ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_used ( gint report_number,
-					     gint category_used )
+                        gint category_used )
 {
     struct_report *report;
 
@@ -2362,7 +2327,7 @@ gint gsb_data_report_get_category_detail_used ( gint report_number )
  * \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;
 
@@ -2405,7 +2370,7 @@ gint gsb_data_report_get_category_show_sub_category ( gint report_number )
  * \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;
 
@@ -2448,7 +2413,7 @@ gint gsb_data_report_get_category_show_category_amount ( gint report_number )
  * \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;
 
@@ -2491,7 +2456,7 @@ gint gsb_data_report_get_category_show_sub_category_amount ( gint report_number
  * \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;
 
@@ -2535,7 +2500,7 @@ gint gsb_data_report_get_category_currency ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_category_currency ( gint report_number,
-						 gint category_currency )
+                        gint category_currency )
 {
     struct_report *report;
 
@@ -2578,7 +2543,7 @@ gint gsb_data_report_get_category_show_without_category ( gint report_number )
  * \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;
 
@@ -2621,7 +2586,7 @@ gint gsb_data_report_get_category_show_name ( gint report_number )
  * \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;
 
@@ -2664,7 +2629,7 @@ gint gsb_data_report_get_budget_used ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_used ( gint report_number,
-					   gint budget_used )
+                        gint budget_used )
 {
     struct_report *report;
 
@@ -2707,7 +2672,7 @@ gint gsb_data_report_get_budget_detail_used ( gint report_number )
  * \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;
 
@@ -2750,7 +2715,7 @@ gint gsb_data_report_get_budget_show_sub_budget ( gint report_number )
  * \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;
 
@@ -2793,7 +2758,7 @@ gint gsb_data_report_get_budget_show_budget_amount ( gint report_number )
  * \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;
 
@@ -2835,7 +2800,7 @@ gint gsb_data_report_get_budget_show_sub_budget_amount ( gint report_number )
  * \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;
 
@@ -2880,7 +2845,7 @@ gint gsb_data_report_get_budget_currency ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_budget_currency ( gint report_number,
-					       gint budget_currency )
+                        gint budget_currency )
 {
     struct_report *report;
 
@@ -2923,7 +2888,7 @@ gint gsb_data_report_get_budget_show_without_budget ( gint report_number )
  * \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;
 
@@ -2966,7 +2931,7 @@ gint gsb_data_report_get_budget_show_name ( gint report_number )
  * \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;
 
@@ -3009,7 +2974,7 @@ gint gsb_data_report_get_payee_used ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_payee_used ( gint report_number,
-					  gint payee_used )
+                        gint payee_used )
 {
     struct_report *report;
 
@@ -3052,7 +3017,7 @@ gint gsb_data_report_get_payee_detail_used ( gint report_number )
  * \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;
 
@@ -3095,7 +3060,7 @@ gint gsb_data_report_get_payee_show_payee_amount ( gint report_number )
  * \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;
 
@@ -3138,7 +3103,7 @@ gint gsb_data_report_get_payee_currency ( gint report_number )
  * \return TRUE if ok
  * */
 gboolean gsb_data_report_set_payee_currency ( gint report_number,
-					      gint payee_currency )
+                        gint payee_currency )
 {
     struct_report *report;
 
@@ -3181,7 +3146,7 @@ gint gsb_data_report_get_payee_show_name ( gint report_number )
  * \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;
 
@@ -3224,7 +3189,7 @@ gint gsb_data_report_get_text_comparison_used ( gint report_number )
  * \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;
 
@@ -3267,7 +3232,7 @@ gint gsb_data_report_get_amount_comparison_used ( gint report_number )
  * \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;
 
@@ -3310,7 +3275,7 @@ gint gsb_data_report_get_amount_comparison_currency ( gint report_number )
  * \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;
 
@@ -3353,7 +3318,7 @@ gint gsb_data_report_get_amount_comparison_only_report_non_null ( gint report_nu
  * \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;
 
@@ -3395,7 +3360,7 @@ gint gsb_data_report_get_method_of_payment_used ( gint report_number )
  * \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,6 +3376,27 @@ 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
@@ -3438,20 +3424,21 @@ GSList *gsb_data_report_get_financial_year_list ( gint report_number )
  * \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;
 
     report = gsb_data_report_get_structure (report_number);
 
     if ( !report )
-	return FALSE;
+        return FALSE;
 
     report -> financial_year_list = financial_year_list;
 
     return TRUE;
 }
 
+
 /**
  * get the  sorting_type
  *
@@ -3459,7 +3446,7 @@ gboolean gsb_data_report_set_financial_year_list ( gint report_number,
  *
  * \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;
 
@@ -3479,8 +3466,8 @@ GSList *gsb_data_report_get_sorting_type ( gint report_number )
  *
  * \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;
 
@@ -3501,7 +3488,7 @@ gboolean gsb_data_report_set_sorting_type ( gint report_number,
  *
  * \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;
 
@@ -3521,8 +3508,8 @@ GSList *gsb_data_report_get_account_numbers ( gint report_number )
  *
  * \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;
 
@@ -3543,7 +3530,7 @@ gboolean gsb_data_report_set_account_numbers ( gint report_number,
  *
  * \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;
 
@@ -3563,8 +3550,8 @@ GSList *gsb_data_report_get_transfer_account_numbers ( gint report_number )
  *
  * \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;
 
@@ -3609,8 +3596,8 @@ GSList *gsb_data_report_get_category_struct ( gint report_number )
  *
  * \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,22 @@ 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 +3673,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;
 
@@ -3715,8 +3701,8 @@ GSList *gsb_data_report_get_budget_struct ( gint report_number )
  *
  * \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 +3712,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,6 +3720,27 @@ 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
@@ -3742,7 +3749,7 @@ gboolean gsb_data_report_set_budget_struct ( gint report_number,
  *
  * \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;
 
@@ -3762,8 +3769,8 @@ GSList *gsb_data_report_get_payee_numbers ( gint report_number )
  *
  * \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;
 
@@ -3805,7 +3812,7 @@ GSList *gsb_data_report_get_text_comparison_list ( gint report_number )
  * \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;
 
@@ -3847,7 +3854,7 @@ GSList *gsb_data_report_get_amount_comparison_list ( gint report_number )
  * \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;
 
@@ -3890,14 +3897,14 @@ GSList *gsb_data_report_get_method_of_payment_list ( gint report_number )
  * \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;
 
     report = gsb_data_report_get_structure (report_number);
 
     if ( !report )
-	return FALSE;
+        return FALSE;
 
     report -> method_of_payment_list = method_of_payment_list;
 
@@ -4001,7 +4008,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 +4040,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 +4093,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 +4120,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: 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 1fe6f98..fa4559d 100644
--- a/src/gsb_file_load.c
+++ b/src/gsb_file_load.c
@@ -65,6 +65,7 @@
 #include "gsb_data_report_text_comparison.h"
 #include "gsb_data_scheduled.h"
 #include "gsb_data_transaction.h"
+#include "gsb_dirs.h"
 #include "gsb_file.h"
 #include "gsb_file_util.h"
 #include "gsb_locale.h"
@@ -82,7 +83,6 @@
 #include "utils_real.h"
 #include "utils_str.h"
 #include "erreur.h"
-#include "gsb_dirs.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -366,7 +366,6 @@ gboolean gsb_file_load_open_file ( gchar *filename )
 
         /* we begin to check if we are in a version under 0.6 or 0.6 and above,
          * because the xml structure changes after 0.6 */
-
         markup_parser = g_malloc0 (sizeof (GMarkupParser));
         if ( gsb_file_load_check_new_structure (file_content))
         {
@@ -410,17 +409,12 @@ gboolean gsb_file_load_open_file ( gchar *filename )
     }
     else
     {
-        gchar* tmpstr1 = g_strdup_printf (_("Cannot open file '%s': %s"),
-                        filename,
-                        g_strerror(errno));
-        gchar* tmpstr2 = g_strdup_printf ( _("Error loading file '%s'"), filename);
-        dialogue_error_hint (tmpstr1, tmpstr2);
-        g_free ( tmpstr1 );
-        g_free ( tmpstr2 );
         gsb_file_remove_name_from_opened_list (filename);
+
         return FALSE;
     }
-    return gsb_file_load_update_previous_version();
+
+    return gsb_file_load_update_previous_version ();
 }
 
 
@@ -544,12 +538,10 @@ void gsb_file_load_start_element ( GMarkupParseContext *context,
                         attribute_values );
             }
 
-#ifdef HAVE_GOFFICE
             else if ( !strcmp ( element_name, "Bet_graph" ) )
             {
                 gsb_file_load_bet_graph_part ( attribute_names, attribute_values );
             }
-#endif /* HAVE_GOFFICE */
 
             else if ( !strcmp ( element_name, "Bet_historical" ) )
             {
@@ -3869,9 +3861,7 @@ void gsb_file_load_bet_graph_part ( const gchar **attribute_names,
 
     if ( !strcmp ( attribute_names[i], "prefs" ) )
     {
-#ifdef HAVE_GOFFICE
         bet_graph_set_configuration_variables ( attribute_values[i] );
-#endif /* HAVE_GOFFICE */
         i++;
         continue;
     }
@@ -4401,7 +4391,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++;
@@ -4409,6 +4399,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,
@@ -4418,6 +4426,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,
@@ -4680,6 +4697,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,
@@ -4745,7 +4771,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++;
@@ -4791,7 +4817,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++;
@@ -4828,7 +4854,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;
@@ -4909,7 +4935,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;
@@ -4990,7 +5016,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++;
@@ -7328,7 +7354,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;
@@ -7672,8 +7698,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++;
     }
@@ -7727,8 +7753,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++;
     }
@@ -7806,7 +7832,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;
     }
 
@@ -7920,7 +7946,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;
     }
 
@@ -8001,8 +8027,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 78edc6f..eccf47f 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 70adc9d..0d54c4f 100644
--- a/src/gsb_file_save.c
+++ b/src/gsb_file_save.c
@@ -210,9 +210,7 @@ gboolean gsb_file_save_save_file ( const gchar *filename,
     gint logo_part = 65536;
     gint account_icon_part = 4500;
     gint bet_part = 500;
-#ifdef HAVE_GOFFICE
     gint bet_graph_part = 100;
-#endif /* HAVE_GOFFICE */
 
     struct stat buf;
 
@@ -258,12 +256,8 @@ gboolean gsb_file_save_save_file ( const gchar *filename,
     + partial_balance_part * g_slist_length ( gsb_data_partial_balance_get_list ())
     + logo_part
     + account_icon_part * g_slist_length ( gsb_select_icon_list_accounts_icon () )
-#ifdef HAVE_GOFFICE
     + bet_part
     + bet_graph_part;
-#else
-    + bet_part;
-#endif /* HAVE_GOFFICE */
 
     iterator = 0;
     file_content = g_malloc0 ( length_calculated * sizeof ( gchar ) );
@@ -358,11 +352,9 @@ gboolean gsb_file_save_save_file ( const gchar *filename,
                         &length_calculated,
                         &file_content );
 
-#ifdef HAVE_GOFFICE
     iterator = gsb_file_save_bet_graph_part ( iterator,
                         &length_calculated,
                         &file_content );
-#endif /* HAVE_GOFFICE */
 
     iterator = gsb_file_save_report_part ( iterator,
 					   &length_calculated,
@@ -2226,7 +2218,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 )
@@ -2268,7 +2260,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 )
@@ -2289,7 +2281,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 )
@@ -2310,7 +2302,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 )
@@ -2355,7 +2347,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 )
@@ -2400,7 +2392,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 )
@@ -2450,7 +2442,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"
@@ -2480,6 +2475,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"
@@ -2527,7 +2523,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),
@@ -2557,6 +2556,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),
@@ -2898,7 +2898,6 @@ gulong gsb_file_save_bet_graph_part ( gulong iterator,
                         gulong *length_calculated,
                         gchar **file_content )
 {
-#ifdef HAVE_GOFFICE
     gchar *new_string = NULL;
 
     /* save the forecast preferences */
@@ -2919,8 +2918,6 @@ gulong gsb_file_save_bet_graph_part ( gulong iterator,
                         file_content,
                         new_string );
 
-#endif /* HAVE_GOFFICE */
-
     /* and return the new iterator */
     return iterator;
 }
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/gsb_reconcile_config.c b/src/gsb_reconcile_config.c
index ff0e86b..d78222c 100644
--- a/src/gsb_reconcile_config.c
+++ b/src/gsb_reconcile_config.c
@@ -196,7 +196,7 @@ GtkWidget *gsb_reconcile_config_create ( void )
     gtk_box_pack_start ( GTK_BOX (hbox), table_selection, FALSE, FALSE, 0 );
 
     /* set the name */
-	label = gtk_label_new ( _("Name: ") );
+	label = gtk_label_new ( _("Reconciliation reference: ") );
 	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_selection ), label, 0, 1, 0, 1,
diff --git a/src/gsb_transactions_list.c b/src/gsb_transactions_list.c
index 99d8946..36fab02 100644
--- a/src/gsb_transactions_list.c
+++ b/src/gsb_transactions_list.c
@@ -1198,6 +1198,7 @@ gfloat gsb_transactions_list_get_row_align ( void )
     GtkTreePath *path;
     GtkTreeView *tree_view;
     GdkRectangle back_rect;
+    GdkWindow *window;
     gint height_win;
     gfloat row_align;
     gfloat height, rect_y;
@@ -1208,13 +1209,14 @@ gfloat gsb_transactions_list_get_row_align ( void )
     path = transaction_list_select_get_path (0);
 
     if (!path)
-	return 0;
+	    return 0;
 
-    if ( !GDK_IS_DRAWABLE ( gtk_tree_view_get_bin_window ( tree_view ) ) )
+    window = gtk_tree_view_get_bin_window ( tree_view );
+    if ( !GDK_IS_DRAWABLE ( window ) )
         return 0;
 
-    gdk_drawable_get_size ( GDK_DRAWABLE (gtk_tree_view_get_bin_window (tree_view)),
-			    NULL, &height_win);
+    height_win = gdk_window_get_height ( window );
+
     gtk_tree_view_get_background_area (tree_view, path, NULL, &back_rect);
     gtk_tree_path_free (path);
 
diff --git a/src/main.c b/src/main.c
index 2428df3..82f6c70 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,10 +34,7 @@
 #include <glib/gi18n.h>
 #include <glib/gprintf.h>
 #include <gdk/gdkkeysyms.h>
-
-#ifdef HAVE_GOFFICE
 #include <goffice/goffice.h>
-#endif /* HAVE_GOFFICE */
 
 /*START_INCLUDE*/
 #include "main.h"
@@ -181,12 +178,10 @@ void main_linux ( int argc, char **argv )
 
     gtk_init ( &argc, &argv );
 
-#ifdef HAVE_GOFFICE
     /* initialisation libgoffice */
     libgoffice_init ( );
     /* Initialize plugins manager */
     go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE);
-#endif /* HAVE_GOFFICE */
 
     /* on commence par détourner le signal SIGSEGV */
     gsb_grisbi_trappe_signal_sigsegv ( );
@@ -225,10 +220,8 @@ void main_linux ( int argc, char **argv )
     gsb_locale_shutdown ( );
     gsb_dirs_shutdown ( );
 
-#ifdef HAVE_GOFFICE
     /* liberation libgoffice */
     libgoffice_shutdown ( );
-#endif /* HAVE_GOFFICE */
 
 #if GSB_GMEMPROFILE
     g_mem_profile();
@@ -263,12 +256,10 @@ void main_mac_osx ( int argc, char **argv )
 
     gtk_init ( &argc, &argv );
 
-#ifdef HAVE_GOFFICE
     /* initialisation libgoffice */
     libgoffice_init ( );
     /* Initialize plugins manager */
     go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE);
-#endif /* HAVE_GOFFICE */
 
     /* init the app */
     theApp = g_object_new ( GTK_TYPE_OSX_APPLICATION, NULL );
@@ -355,10 +346,8 @@ void main_mac_osx ( int argc, char **argv )
     gsb_locale_shutdown ( );
     gsb_dirs_shutdown ( );
 
-#ifdef HAVE_GOFFICE
     /* liberation libgoffice */
     libgoffice_shutdown ( );
-#endif /* HAVE_GOFFICE */
 
 #if GSB_GMEMPROFILE
     g_mem_profile();
@@ -406,12 +395,10 @@ void main_win_32 (  int argc, char **argv )
 
     gsb_locale_init ( );
 
-#ifdef HAVE_GOFFICE
     /* initialisation libgoffice */
     libgoffice_init ( );
     /* Initialize plugins manager */
     go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE);
-#endif /* HAVE_GOFFICE */
 
     gtk_init ( &argc, &argv );
 
@@ -450,10 +437,8 @@ void main_win_32 (  int argc, char **argv )
     gsb_locale_shutdown ( );
     gsb_dirs_shutdown ( );
 
-#ifdef HAVE_GOFFICE
     /* liberation libgoffice */
     libgoffice_shutdown ( );
-#endif /* HAVE_GOFFICE */
 
 #if GSB_GMEMPROFILE
     g_mem_profile();
diff --git a/src/parametres.c b/src/parametres.c
index 855eb55..897a375 100644
--- a/src/parametres.c
+++ b/src/parametres.c
@@ -210,7 +210,7 @@ static GtkWidget *onglet_accueil ( void )
     gtk_container_set_border_width ( GTK_CONTAINER ( vbox ), 12 );
 
     /* pour les francophones ;-) */
-    if ( g_strstr_len ( ( g_ascii_strup ( gdk_set_locale ( ), -1 ) ), -1, "FR" ) )
+    if ( g_strstr_len ( ( g_ascii_strup ( g_getenv ( "LANG" ), -1 ) ), -1, "FR" ) )
     {
         paddingbox = new_paddingbox_with_title (vbox, FALSE, "Pluriel de final" );
 
diff --git a/src/structures.h b/src/structures.h
index 6fff84f..4f65b09 100644
--- a/src/structures.h
+++ b/src/structures.h
@@ -1,5 +1,5 @@
 #ifndef _STRUCTURES_H
-#define _STRUCTURES_H (1)
+#define _STRUCTURES_H
 
 #include <glib.h>
 #include <gtk/gtk.h>
@@ -279,6 +279,17 @@ enum alignement
 };
 
 
+/* 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,
+};
+
+
 /* définition du type d'origine pour les données du module budgétaire */
 enum bet_array_origin_data
 {
@@ -318,4 +329,11 @@ enum _bet_type_onglets
 };
 
 
+enum direction_move {
+    GSB_LEFT = 0,
+    GSB_RIGHT,
+    GSB_UP,
+    GSB_DOWN
+};
+
 #endif
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index e4baa2e..9e6245c 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -308,9 +308,8 @@ void init_variables ( void )
         bet_array_col_width[i] = bet_array_col_width_init[i];
 
     bet_data_finance_data_simulator_init ( );
-#ifdef HAVE_GOFFICE
+
     bet_graph_set_configuration_variables ( NULL );
-#endif /* HAVE_GOFFICE */
 
 }
 
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 137d2df..1c49ffe 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 = bet_graph.ui \
+		etats_prefs.ui
 
 EXTRA_DIST = $(ui_DATA)
diff --git a/src/ui/etats_prefs.ui b/src/ui/etats_prefs.ui
new file mode 100644
index 0000000..d392af4
--- /dev/null
+++ b/src/ui/etats_prefs.ui
@@ -0,0 +1,4121 @@
+<?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">    </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">    </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">    </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">    </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">    </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">    </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">    </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">    </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="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="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_etats_prefs">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="show_tabs">False</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="resize">True</property>
+        <property name="shrink">True</property>
+      </packing>
+    </child>
+  </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="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="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">    </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">    </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="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="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="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="hbox10">
+        <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="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="label17">
+                            <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="active">True</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="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="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="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="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 cl