[grisbi-cvs] grisbi/src affichage.c, 1.170, 1.171 affichage_liste.c, 1.119, 1.120 balance_estimate_config.c, 1.9, 1.10 balance_estimate_hist.c, 1.13, 1.14 balance_estimate_hist.h, 1.5, 1.6 balance_estimate_tab.c, 1.50, 1.51 barre_outils.c, 1.131, 1.132 erreur.c, 1.97, 1.98 etats_latex.c, 1.55, 1.56 fenetre_principale.c, 1.127, 1.128 fenetre_principale.h, 1.30, 1.31 gsb_assistant_archive_export.c, 1.19, 1.20 gsb_assistant_first.c, 1.28, 1.29 gsb_data_print_config.c, 1.1, 1.2 gsb_file.c, 1.62, 1.63 gsb_file_config.c, 1.90, 1.91 gsb_file_load.c, 1.211, 1.212 gsb_file_save.c, 1.157, 1.158 gsb_file_util.c, 1.42, 1.43 gsb_form.c, 1.151, 1.152 gsb_form_widget.c, 1.49, 1.50 gsb_transactions_list.c, 1.199, 1.200 main.c, 1.165, 1.166 navigation.c, 1.139, 1.140 parametres.c, 1.211, 1.212 structures.h, 1.241, 1.242 traitement_variables.c, 1.189, 1.190 transaction_list.c, 1.57, 1.58 utils.c, 1.60, 1.61

Pierre Biava pbiava at users.sourceforge.net
Mon Mar 8 22:30:04 CET 2010


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21439/src

Modified Files:
	affichage.c affichage_liste.c balance_estimate_config.c 
	balance_estimate_hist.c balance_estimate_hist.h 
	balance_estimate_tab.c barre_outils.c erreur.c etats_latex.c 
	fenetre_principale.c fenetre_principale.h 
	gsb_assistant_archive_export.c gsb_assistant_first.c 
	gsb_data_print_config.c gsb_file.c gsb_file_config.c 
	gsb_file_load.c gsb_file_save.c gsb_file_util.c gsb_form.c 
	gsb_form_widget.c gsb_transactions_list.c main.c navigation.c 
	parametres.c structures.h traitement_variables.c 
	transaction_list.c utils.c 
Log Message:
Added an option to have a single backup file and various minor amendments to the configuration file.
Following developments for the budget module.

Index: gsb_assistant_archive_export.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_archive_export.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- gsb_assistant_archive_export.c	3 Oct 2009 22:14:56 -0000	1.19
+++ gsb_assistant_archive_export.c	8 Mar 2010 21:30:00 -0000	1.20
@@ -409,7 +409,7 @@
             }
 		    success = gsb_file_util_test_overwrite (export_name)
 			&&
-			gsb_file_save_save_file ( export_name, etat.compress_backup, archive_number);
+			gsb_file_save_save_file ( export_name, conf.compress_backup, archive_number);
 		    break;
 
 		case 1:

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- gsb_file_save.c	7 Mar 2010 15:56:04 -0000	1.157
+++ gsb_file_save.c	8 Mar 2010 21:30:01 -0000	1.158
@@ -144,6 +144,7 @@
 extern gint affichage_echeances_perso_nb_libre;
 extern GdkColor archive_background_color;
 extern GdkColor calendar_entry_color;
+extern GdkColor couleur_bet_division;
 extern GdkColor couleur_fond[2];
 extern GdkColor couleur_grise;
 extern GdkColor couleur_jour;
@@ -795,7 +796,10 @@
                         "\t\tText_color_1_blue=\"%d\"\n"
                         "\t\tCalendar_entry_red=\"%d\"\n"
                         "\t\tCalendar_entry_green=\"%d\"\n"
-                        "\t\tCalendar_entry_blue=\"%d\" />\n",
+                        "\t\tCalendar_entry_blue=\"%d\"\n"
+                        "\t\tCouleur_bet_division_red=\"%d\"\n"
+                        "\t\tCouleur_bet_division_green=\"%d\"\n"
+                        "\t\tCouleur_bet_division_blue=\"%d\" />\n",
     couleur_fond[0].red,
     couleur_fond[0].green,
     couleur_fond[0].blue,
@@ -825,7 +829,10 @@
     text_color[1].blue,
     calendar_entry_color.red,
     calendar_entry_color.green,
-    calendar_entry_color.blue );
+    calendar_entry_color.blue,
+    couleur_bet_division.red,
+    couleur_bet_division.green,
+    couleur_bet_division.blue );
 
     /* append the new string to the file content
      * and return the new iterator */
@@ -2629,10 +2636,9 @@
     gint i;
 
     /* save the general informations */
-    new_string = g_markup_printf_escaped ( "\t<Bet Ddte=\"%d\" Edte=\"%d\" "
+    new_string = g_markup_printf_escaped ( "\t<Bet Ddte=\"%d\" "
                         "Nbre=\"%d\" UT=\"%d\" SD=\"%d\" Fi=\"%d\" />\n",
     etat.bet_deb_period,
-    etat.bet_end_period,
     etat.bet_months,
     etat.bet_spin_range,
     etat.bet_hist_data,

Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- navigation.c	6 Mar 2010 22:34:13 -0000	1.139
+++ navigation.c	8 Mar 2010 21:30:01 -0000	1.140
@@ -1157,23 +1157,10 @@
 
 	    /* set the form */
 	    account_notebook = g_object_get_data ( G_OBJECT (notebook_general), "account_notebook" );
-        switch ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( account_notebook ) ) )
-        {
-        case 0:
-            gsb_form_set_expander_visible ( TRUE, TRUE );
-            break;
-
-        case 1:
-            gsb_form_set_expander_visible (FALSE, FALSE );
-            break;
-#ifdef ENABLE_BALANCE_ESTIMATE
-        case 2:
-        case 3:
-            gsb_form_set_expander_visible (FALSE, FALSE );
-            bet_array_update_estimate_tab ( );
-            break;
-#endif /* ENABLE_BALANCE_ESTIMATE */
-        }
+        gsb_gui_on_account_switch_page ( GTK_NOTEBOOK ( account_notebook ),
+                        NULL,
+                        gtk_notebook_get_current_page ( GTK_NOTEBOOK ( account_notebook ) ),
+                        NULL );
 	    gsb_form_show ( FALSE );
 
 	    buffer_last_account = account_number;

Index: erreur.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/erreur.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- erreur.c	18 Jan 2010 19:13:40 -0000	1.97
+++ erreur.c	8 Mar 2010 21:30:00 -0000	1.98
@@ -116,7 +116,7 @@
 	gsb_status_message ( _("Save file") );
 
 	gsb_file_save_save_file ( nom_fichier_comptes,
-				  etat.compress_file,
+				  conf.compress_file,
 				  FALSE );
 
 	gsb_status_clear();

Index: gsb_data_print_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_print_config.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gsb_data_print_config.c	25 Sep 2008 10:06:58 -0000	1.1
+++ gsb_data_print_config.c	8 Mar 2010 21:30:00 -0000	1.2
@@ -85,8 +85,8 @@
 
     if (font_transactions)
 	pango_font_description_free (font_transactions);
-    if (etat.utilise_fonte_listes && etat.font_string)
-	font_transactions = pango_font_description_from_string (etat.font_string);
+    if ( conf.utilise_fonte_listes && conf.font_string )
+	font_transactions = pango_font_description_from_string ( conf.font_string );
     else
 	font_transactions = pango_font_description_from_string  ("sans 6");
 

Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- transaction_list.c	21 Jan 2010 22:16:52 -0000	1.57
+++ transaction_list.c	8 Mar 2010 21:30:01 -0000	1.58
@@ -1851,8 +1851,8 @@
 	newrecord -> visible_col[column] = gsb_transactions_list_grep_cell_content ( transaction_number,
 										     tab_affichage_ope[line_in_transaction][column]);
 
-    if (etat.utilise_fonte_listes)
-	newrecord -> font = etat.font_string;
+    if ( conf.utilise_fonte_listes )
+	    newrecord -> font = conf.font_string;
     newrecord -> transaction_pointer = gsb_data_transaction_get_pointer_of_transaction (transaction_number);
     newrecord -> what_is_line = IS_TRANSACTION;
     newrecord -> line_in_transaction = line_in_transaction;

Index: gsb_assistant_first.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_first.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- gsb_assistant_first.c	3 Oct 2009 22:14:56 -0000	1.28
+++ gsb_assistant_first.c	8 Mar 2010 21:30:00 -0000	1.29
@@ -218,7 +218,7 @@
     gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.5 );
     gtk_table_attach ( GTK_TABLE(table), label, 0, 1, 1, 2,
 		       GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0 );
-    entry = gsb_automem_entry_new ( &etat.browser_command, NULL, NULL );
+    entry = gsb_automem_entry_new ( &conf.browser_command, NULL, NULL );
     gtk_table_attach ( GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0 );
 
     text = make_blue ( _("You may use %s to expand the URL - I.e: 'firefox -remote %s' ") );
@@ -235,13 +235,13 @@
 
     /* Automatically load last file on startup? */
     button = gsb_automem_checkbutton_new (_("Automatically load last file on startup"),
-					  &(etat.dernier_fichier_auto), NULL, NULL );
+					  &conf.dernier_fichier_auto, NULL, NULL );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, 
 			 FALSE, FALSE, 0 );
 
     /* automatically save file at closing */
     button = gsb_automem_checkbutton_new (_("Automatically save on exit"),
-					  &(etat.sauvegarde_auto), NULL, NULL);
+					  &conf.sauvegarde_auto, NULL, NULL);
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, 
 			 FALSE, FALSE, 0 );
 
@@ -253,7 +253,7 @@
 
     /* Automatic backup ? */
     button = gsb_automem_checkbutton_new (_("Make a backup copy before saving files"),
-					  &etat.make_backup, NULL, NULL);
+					  &conf.make_backup, NULL, NULL);
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button,
 			 FALSE, FALSE, 0 );
 
@@ -263,12 +263,12 @@
 			 FALSE, FALSE, 0);
 
     button = gsb_automem_checkbutton_new (_("Make a backup copy every "),
-					  &etat.make_backup_every_minutes,
+					  &conf.make_backup_every_minutes,
 					  G_CALLBACK (gsb_file_automatic_backup_start), NULL);
     gtk_box_pack_start ( GTK_BOX (hbox), button,
 			 FALSE, FALSE, 0 );
 
-    button = gsb_automem_spin_button_new ( &etat.make_backup_nb_minutes,
+    button = gsb_automem_spin_button_new ( &conf.make_backup_nb_minutes,
 					   G_CALLBACK (gsb_file_automatic_backup_change_time), NULL );
     gtk_box_pack_start ( GTK_BOX (hbox), button,
 			 FALSE, FALSE, 0 );

Index: balance_estimate_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_config.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- balance_estimate_config.c	3 Mar 2010 22:21:48 -0000	1.9
+++ balance_estimate_config.c	8 Mar 2010 21:30:00 -0000	1.10
@@ -69,8 +69,10 @@
 
 
 /*START_STATIC*/
+static void bet_config_fyear_clicked ( GtkWidget *combo, gpointer data );
 static GtkWidget *bet_config_get_duration_widget ( GtkWidget *container );
 static GtkWidget *bet_config_select_historical_data ( GtkWidget *container );
+static void bet_config_origin_data_clicked ( GtkWidget *togglebutton, gpointer data );
 /*END_STATIC*/
 
 /*START_EXTERN*/
@@ -129,7 +131,7 @@
 {
     GtkWidget* main_vbox;
     GtkWidget *label;
-    GtkWidget *button_1, *button_2, *button_3, *button_4;
+    GtkWidget *button_1, *button_2;
     GtkWidget *spin_button = NULL;
     GtkWidget *widget = NULL;
     GtkWidget *hbox;
@@ -148,6 +150,12 @@
     gtk_label_set_justify ( GTK_LABEL ( label ), GTK_JUSTIFY_LEFT );
     gtk_box_pack_start ( GTK_BOX ( main_vbox ), label, FALSE, FALSE, 5) ;
 
+    label = gtk_label_new ( 
+                        _("Note: This option is used if no starting date for forecasts.") );
+    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 ( main_vbox ), label, FALSE, FALSE, 5) ;
+
     hbox = gtk_hbox_new ( FALSE, 5 );
     gtk_box_pack_start ( GTK_BOX ( main_vbox ), hbox, FALSE, FALSE, 5) ;
 
@@ -169,46 +177,13 @@
     gtk_box_pack_start ( GTK_BOX ( hbox ), button_1, FALSE, FALSE, 5) ;
     gtk_box_pack_start ( GTK_BOX ( hbox ), button_2, FALSE, FALSE, 5) ;
 
-    label = gtk_label_new ( _("End of period") );
-    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 ( main_vbox ), label, FALSE, FALSE, 5) ;
-
-    hbox = gtk_hbox_new ( FALSE, 5 );
-    gtk_box_pack_start ( GTK_BOX ( main_vbox ), hbox, FALSE, FALSE, 5) ;
-
-    button_3 = gtk_radio_button_new_with_label ( NULL,
-                        _("last day of the month") );
-    gtk_widget_set_name ( button_3, "button_3" );
-    gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), button_3 );
-    
-    button_4 = gtk_radio_button_new_with_label_from_widget (
-                        GTK_RADIO_BUTTON ( button_3 ),
-                        _("From date to date") );
-    gtk_widget_set_name ( button_4, "button_4" );
-
-    if ( etat.bet_end_period == 1 )
-        gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button_3 ), TRUE );
-    else
-        gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button_4 ), TRUE );
-
-    gtk_box_pack_start ( GTK_BOX ( hbox ), button_3, FALSE, FALSE, 5) ;
-    gtk_box_pack_start ( GTK_BOX ( hbox ), button_4, FALSE, FALSE, 5) ;
 
     /*set the signals */
     g_signal_connect (G_OBJECT ( button_1 ),
                         "released",
                         G_CALLBACK ( bet_config_duration_period_clicked ),
-                        button_3 );
-    g_signal_connect (G_OBJECT ( button_2 ),
-                        "released",
-                        G_CALLBACK ( bet_config_duration_period_clicked ),
-                        button_4 );
-    g_signal_connect (G_OBJECT ( button_3 ),
-                        "released",
-                        G_CALLBACK ( bet_config_duration_period_clicked ),
                         NULL );
-    g_signal_connect (G_OBJECT ( button_4 ),
+    g_signal_connect (G_OBJECT ( button_2 ),
                         "released",
                         G_CALLBACK ( bet_config_duration_period_clicked ),
                         NULL );
@@ -298,7 +273,7 @@
     gtk_widget_set_name ( button_1, "button_1" );
     g_signal_connect (G_OBJECT ( button_1 ),
                         "released",
-                        G_CALLBACK ( bet_historical_origin_data_clicked ),
+                        G_CALLBACK ( bet_config_origin_data_clicked ),
                         NULL );
 
     button_2 = gtk_radio_button_new_with_label_from_widget (
@@ -307,7 +282,7 @@
     gtk_widget_set_name ( button_2, "button_2" );
     g_signal_connect (G_OBJECT ( button_2 ),
                         "released",
-                        G_CALLBACK ( bet_historical_origin_data_clicked ),
+                        G_CALLBACK ( bet_config_origin_data_clicked ),
                         NULL );
 
     gtk_box_pack_start ( GTK_BOX ( hbox ), button_1, FALSE, FALSE, 5) ;
@@ -335,10 +310,10 @@
                     etat.bet_hist_fyear );
     }
 
-    /* set the signal */
+    //~ /* set the signal */
     g_signal_connect ( G_OBJECT ( widget ),
                     "changed",
-                    G_CALLBACK (bet_historical_fyear_clicked),
+                    G_CALLBACK ( bet_config_fyear_clicked ),
                     NULL );
 
     return hbox;
@@ -355,7 +330,6 @@
 {
     const gchar *name;
 
-    //~ devel_debug (NULL);
     if ( button )
         g_signal_handlers_block_by_func ( G_OBJECT ( button ),
                         G_CALLBACK ( bet_config_duration_period_clicked ),
@@ -366,21 +340,11 @@
     if ( g_strcmp0 ( name, "button_1" ) == 0 )
     {
         etat.bet_deb_period = 1;
-        etat.bet_end_period = 1;
-        gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), TRUE );
     }
     else if ( g_strcmp0 ( name, "button_2" ) == 0 )
     {
         etat.bet_deb_period = 2;
-        etat.bet_end_period = 2;
-        gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button ), TRUE );
     }
-    else if ( g_strcmp0 ( name, "button_3" ) == 0 )
-        etat.bet_end_period = 1;
-
-    else if ( g_strcmp0 ( name, "button_4" ) == 0 )
-        etat.bet_end_period = 2;
-
     if ( button )
         g_signal_handlers_unblock_by_func ( G_OBJECT ( button ),
                         G_CALLBACK ( bet_config_duration_period_clicked ),
@@ -388,8 +352,6 @@
 
     if ( etat.modification_fichier == 0 )
         modification_fichier ( TRUE );
-
-    bet_array_refresh_estimate_tab ( );
 }
 
 
@@ -402,21 +364,9 @@
 void bet_config_duration_button_clicked ( GtkWidget *togglebutton,
                         GtkWidget *spin_button )
 {
-    GtkWidget *notebook;
-    GtkWidget *ancestor;
-    GtkWidget *widget;
     const gchar *name;
 
-    //~ devel_debug (NULL);
     name = gtk_widget_get_name ( GTK_WIDGET ( togglebutton ) );
-    notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
-    ancestor = g_object_get_data ( G_OBJECT ( notebook ), "bet_account_duration" );
-    if ( gtk_widget_is_ancestor ( togglebutton, ancestor ) == FALSE )
-    {
-        widget = utils_get_child_widget_by_name ( ancestor, name );
-        if ( widget )
-            gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ), TRUE );
-    }
 
     if ( g_strcmp0 ( name, "Year" ) == 0 )
     {
@@ -439,13 +389,11 @@
 
     if ( etat.modification_fichier == 0 )
         modification_fichier ( TRUE );
-
-    bet_array_refresh_estimate_tab ( );
 }
 
 
 /*
- * bet_duration_button changed
+ * bet_config_duration_button changed
  * This function is called when a spin button is changed.
  * It copies the new duration from the spin_button into the bet_months property of
  * the bet container
@@ -453,10 +401,6 @@
 gboolean bet_config_duration_number_changed ( GtkWidget *spin_button,
                         GtkWidget *togglebutton )
 {
-    GtkWidget *notebook;
-    GtkWidget *ancestor;
-    GtkWidget *widget;
-    const gchar *name;
     gboolean toggled;
 
     //~ devel_debug (NULL);
@@ -466,24 +410,54 @@
     if ( toggled == 1 )
         etat.bet_months *= 12;
 
-    name = gtk_widget_get_name ( GTK_WIDGET ( spin_button ) );
-    notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
-    ancestor = g_object_get_data ( G_OBJECT ( notebook ), "bet_account_duration" );
-    if ( gtk_widget_is_ancestor ( togglebutton, ancestor ) == FALSE )
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
+
+    bet_array_refresh_estimate_tab ( );
+
+    return ( FALSE );
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+void bet_config_origin_data_clicked ( GtkWidget *togglebutton, gpointer data )
+{
+    const gchar *name;
+
+    name = gtk_widget_get_name ( GTK_WIDGET ( togglebutton ) );
+    if ( g_strcmp0 ( name, "button_1" ) == 0 )
     {
-        widget = utils_get_child_widget_by_name ( ancestor, name );
-        if ( widget )
-            gtk_spin_button_set_value ( GTK_SPIN_BUTTON ( widget ),
-                        gtk_spin_button_get_value (
-                        GTK_SPIN_BUTTON ( spin_button ) ) );
+        etat.bet_hist_data = 0;
+    }
+    else
+    {
+        etat.bet_hist_data = 1;
     }
 
     if ( etat.modification_fichier == 0 )
         modification_fichier ( TRUE );
+}
 
-    bet_array_refresh_estimate_tab ( );
 
-    return ( FALSE );
+/**
+ *
+ *
+ *
+ *
+ * */
+void bet_config_fyear_clicked ( GtkWidget *combo, gpointer data )
+{
+    etat.bet_hist_fyear = bet_historical_get_fyear_from_combobox ( combo );
+
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
+
+    bet_array_update_estimate_tab ( );
 }
 
 

Index: traitement_variables.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/traitement_variables.c,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -d -r1.189 -r1.190
--- traitement_variables.c	6 Mar 2010 22:34:13 -0000	1.189
+++ traitement_variables.c	8 Mar 2010 21:30:01 -0000	1.190
@@ -128,8 +128,9 @@
 
 GdkColor couleur_bleue;
 GdkColor couleur_jaune;
-GdkColor couleur_division;
-
+GdkColor couleur_bet_division;
+GdkColor default_couleur_bet_division;
+ 
 GSList *liste_labels_titres_colonnes_liste_ope = NULL;
 
 gchar *nom_fichier_comptes = NULL;
@@ -382,7 +383,6 @@
     bet_data_init_variables ( );
 #endif /* ENABLE_BALANCE_ESTIMATE */
     etat.bet_deb_period = 1;
-    etat.bet_end_period = 1;
     etat.bet_spin_range = 0;
     etat.bet_months = 1;
     etat.bet_hist_data = 0;
@@ -509,9 +509,16 @@
     couleur_jaune.blue = 0;
     couleur_jaune.pixel = 1;
 
-    couleur_division.red =64550;
-    couleur_division.green =65535;
-    couleur_division.blue = 33466;
+    /* colors of the background bet divisions */
+    couleur_bet_division.red =64550;
+    couleur_bet_division.green =65535;
+    couleur_bet_division.blue = 33466;
+
+    default_couleur_bet_division.red =64550;
+    default_couleur_bet_division.green =65535;
+    default_couleur_bet_division.blue = 33466;
+
+    
 }
 /*****************************************************************************************************/
 

Index: barre_outils.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/barre_outils.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- barre_outils.c	7 Mar 2010 15:56:04 -0000	1.131
+++ barre_outils.c	8 Mar 2010 21:30:00 -0000	1.132
@@ -60,9 +60,6 @@
 /** Used to display/hide comments in scheduler list */
 static GtkWidget *scheduler_display_hide_comments = NULL;
 
-//~ /* display/hide marked transactions */
-//~ static GtkWidget * bouton_affiche_ope_r = NULL;
-
 /** here are the 3 buttons on the scheduler toolbar
  * which can been unsensitive or sensitive */
 GtkWidget *scheduler_button_execute = NULL;

Index: balance_estimate_hist.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_hist.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- balance_estimate_hist.h	3 Mar 2010 22:21:48 -0000	1.5
+++ balance_estimate_hist.h	8 Mar 2010 21:30:00 -0000	1.6
@@ -49,7 +49,7 @@
 /* START_DECLARATION */
 gboolean bet_historical_affiche_div ( GHashTable  *list_div,
                         GtkWidget *tree_view );
-GtkWidget * bet_historical_create_page ( void );
+GtkWidget *bet_historical_create_page ( void );
 void bet_historical_fyear_clicked ( GtkWidget *combo, gpointer data );
 gboolean bet_historical_fyear_create_combobox_store ( void );
 gint bet_historical_get_fyear_from_combobox ( GtkWidget *combo_box );

Index: etats_latex.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_latex.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- etats_latex.c	10 Oct 2009 22:23:30 -0000	1.55
+++ etats_latex.c	8 Mar 2010 21:30:00 -0000	1.56
@@ -361,38 +361,39 @@
 
     if ( etat.print_config.printer || etat.print_config.filetype == POSTSCRIPT_FILE )
     {
-	command = g_strdup_printf ( "%s -interaction=nonstopmode \"%s.tex\"", etat.latex_command, tempname );
-	if ( system ( command ) > 0 )
-	    dialogue_error_hint ( _("See console output for details.  Be sure you have installed LaTeX properly with unicode support."),
-				  _("LaTeX run was unable to complete.") );
-	else
-	{
-	    command = g_strdup_printf ( "%s %s \"%s.dvi\" -o \"%s\"",  etat.dvips_command,
-					( etat.print_config.orientation == LANDSCAPE ? "-t landscape" : ""),
-					tempname,
-					(etat.print_config.printer ?
-					 (g_strconcat ( tempname, ".ps", NULL )) :
-					 etat.print_config.printer_filename) );
-	    unlink ( g_strdup_printf ("%s.tex", tempname) );
-	    unlink ( g_strdup_printf ("%s.aux", tempname) );
-	    unlink ( g_strdup_printf ("%s.log", tempname) );
-	    if ( !system ( command ) )
-	    {
-		if ( etat.print_config.printer )
-		{
-		    command = g_strdup_printf ( "%s %s.ps", etat.print_config.printer_name,
-						tempname );
-		    if ( system ( command ) )
-		    {
-			dialogue_error ( _("Cannot send job to printer") );
-		    }
-		}
-	    }
-	    else
-	    {
-		dialogue_error ( _("dvips was unable to complete, see console output for details.") );
-	    }
-	    unlink ( g_strdup_printf ("%s.dvi", tempname) );
+        command = g_strdup_printf ( "%s -interaction=nonstopmode \"%s.tex\"",
+                        conf.latex_command, tempname );
+        if ( system ( command ) > 0 )
+            dialogue_error_hint ( _("See console output for details.  Be sure you have installed LaTeX properly with unicode support."),
+                      _("LaTeX run was unable to complete.") );
+        else
+        {
+            command = g_strdup_printf ( "%s %s \"%s.dvi\" -o \"%s\"",  conf.dvips_command,
+                        ( etat.print_config.orientation == LANDSCAPE ? "-t landscape" : ""),
+                        tempname,
+                        (etat.print_config.printer ?
+                         (g_strconcat ( tempname, ".ps", NULL )) :
+                         etat.print_config.printer_filename) );
+            unlink ( g_strdup_printf ("%s.tex", tempname) );
+            unlink ( g_strdup_printf ("%s.aux", tempname) );
+            unlink ( g_strdup_printf ("%s.log", tempname) );
+            if ( !system ( command ) )
+            {
+            if ( etat.print_config.printer )
+            {
+                command = g_strdup_printf ( "%s %s.ps", etat.print_config.printer_name,
+                            tempname );
+                if ( system ( command ) )
+                {
+                dialogue_error ( _("Cannot send job to printer") );
+                }
+            }
+            }
+            else
+            {
+            dialogue_error ( _("dvips was unable to complete, see console output for details.") );
+            }
+            unlink ( g_strdup_printf ("%s.dvi", tempname) );
 	}
 
 	if ( etat.print_config.printer )

Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- balance_estimate_tab.c	6 Mar 2010 22:34:12 -0000	1.50
+++ balance_estimate_tab.c	8 Mar 2010 21:30:00 -0000	1.51
@@ -76,10 +76,15 @@
 static gint bet_array_date_sort_function ( GtkTreeModel *model,
                         GtkTreeIter *itera,
                         GtkTreeIter *iterb,
-                        gpointer user_data );
+                        gpointer data );
+static void bet_array_duration_button_clicked ( GtkWidget *togglebutton,
+                        GtkWidget *spin_button );
+static gboolean bet_array_duration_number_changed ( GtkWidget *spin_button,
+                        gpointer data );
 static gboolean  bet_array_entry_key_press ( GtkWidget *entry,
                         GdkEventKey *ev,
                         gpointer data );
+static gboolean bet_array_initializes_account_settings ( gint account_number );
 static void bet_array_list_add_substract_menu ( GtkWidget *menu_item,
                         GtkTreeSelection *tree_selection );
 static gboolean bet_array_list_button_press ( GtkWidget *tree_view,
@@ -110,7 +115,7 @@
 extern gboolean balances_with_scheduled;
 extern gchar* bet_duration_array[];
 extern GdkColor couleur_fond[0];
-extern GdkColor couleur_division;
+extern GdkColor couleur_bet_division;
 extern GtkWidget *notebook_general;
 extern gsb_real null_real;
 extern GtkWidget *window;
@@ -153,7 +158,7 @@
 static gint bet_array_date_sort_function ( GtkTreeModel *model,
                         GtkTreeIter *itera,
                         GtkTreeIter *iterb,
-                        gpointer user_data )
+                        gpointer data )
 {
     GValue date_value_a = {0,};
     GValue date_value_b = {0,};
@@ -292,6 +297,9 @@
     if ( account_nb == -1 )
         return;
 
+    /* Initializes account settings */
+    bet_array_initializes_account_settings ( account_nb );
+
     /* calculate date_min and date_max with user choice */
     date_min = gsb_data_account_get_bet_start_date ( account_nb );
 
@@ -302,12 +310,12 @@
 
     if ( g_date_get_day ( date_min ) == 1 )
     {
-        g_date_add_months (date_max, etat.bet_months - 1 );
+        g_date_add_months (date_max, gsb_data_account_get_bet_months ( account_nb ) - 1 );
         date_max = gsb_date_get_last_day_of_month ( date_max );
     }
     else
     {
-        g_date_add_months (date_max, etat.bet_months );
+        g_date_add_months (date_max, gsb_data_account_get_bet_months ( account_nb ) );
         g_date_subtract_days ( date_max, 1 );
     }
 
@@ -440,6 +448,7 @@
     notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
     vbox = gtk_vbox_new ( FALSE, 5 );
     g_object_set_data ( G_OBJECT ( notebook ), "bet_account_duration", vbox );
+
     /* create the title */
     align = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
     gtk_box_pack_start ( GTK_BOX ( vbox ), align, FALSE, FALSE, 5) ;
@@ -469,10 +478,9 @@
     {
         spin_button = gtk_spin_button_new_with_range ( 1.0, 20.0, 1.0 );
         gtk_spin_button_set_value ( GTK_SPIN_BUTTON ( spin_button ),
-                        (gdouble) ( etat.bet_months / 12 ) );
+                        (gdouble) ( etat.bet_months / 12.0 ) );
         gtk_widget_grab_focus ( spin_button );
     }
-    gtk_widget_set_name ( spin_button, "spin_button" );
 
     for (iduration = 0; bet_duration_array[iduration] != NULL; iduration++)
     {
@@ -492,10 +500,14 @@
         gtk_box_pack_start ( GTK_BOX ( hbox ), widget, FALSE, FALSE, 5 );
         g_signal_connect (G_OBJECT ( widget ),
                         "released",
-                        G_CALLBACK ( bet_config_duration_button_clicked ),
+                        G_CALLBACK ( bet_array_duration_button_clicked ),
                         spin_button );
     }
 
+    g_object_set_data ( G_OBJECT ( notebook ), "bet_account_previous", previous );
+    g_object_set_data ( G_OBJECT ( notebook ), "bet_account_widget", widget );
+    g_object_set_data ( G_OBJECT ( notebook ), "bet_account_spin_button", spin_button );
+
     if ( etat.bet_spin_range == 0 )
         gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( previous ), TRUE );
     else
@@ -503,8 +515,8 @@
 
     g_signal_connect ( G_OBJECT ( spin_button ),
                         "value-changed",
-                        G_CALLBACK ( bet_config_duration_number_changed ),
-                        widget );
+                        G_CALLBACK ( bet_array_duration_number_changed ),
+                        NULL );
     gtk_box_pack_start ( GTK_BOX ( hbox ), spin_button, FALSE, FALSE, 0 );
 
     label = gtk_label_new ( COLON ( _("Start date" ) ) );
@@ -1341,15 +1353,11 @@
     GtkTreeModel *model;
     GtkTreeIter iter;
 
-    devel_debug (NULL);
-
     if ( !tree_view )
 	    return FALSE;
 
     model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ));
 
-    
-
     if ( gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ) )
     {
         gint div = 0;
@@ -1372,7 +1380,7 @@
             else
                 gtk_tree_store_set ( GTK_TREE_STORE ( model ),
                         &iter,
-                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_division,
+                        SPP_ESTIMATE_TREE_BACKGROUND_COLOR, &couleur_bet_division,
                         -1 );
         }
         while ( gtk_tree_model_iter_next ( GTK_TREE_MODEL ( model ), &iter ) );
@@ -1382,6 +1390,126 @@
 }
 
 
+/*
+ * bet_array_duration_button_clicked
+ * This function is called when a radio button is called to change the estimate duration.
+ * It copies the new durations from the data parameter (of the radio button) into
+ * the account -> bet_spin_range
+ */
+void bet_array_duration_button_clicked ( GtkWidget *togglebutton,
+                        GtkWidget *spin_button )
+{
+    const gchar *name;
+    gint account_number;
+    gint months;
+
+    //~ devel_debug (NULL);
+    name = gtk_widget_get_name ( GTK_WIDGET ( togglebutton ) );
+    account_number = gsb_gui_navigation_get_current_account ( );
+    
+    if ( g_strcmp0 ( name, "Year" ) == 0 )
+    {
+        gsb_data_account_set_bet_spin_range ( account_number, 1 );
+        gtk_spin_button_set_range ( GTK_SPIN_BUTTON ( spin_button ), 1.0, 20.0 );
+        months = gsb_data_account_get_bet_months ( account_number );
+        if ( months > 20 )
+        {
+            gtk_spin_button_set_value ( GTK_SPIN_BUTTON ( spin_button ), 20.0 );
+            gsb_data_account_set_bet_months ( account_number, 240 );
+        }
+        else
+            gsb_data_account_set_bet_months ( account_number, months * 12 );
+    }
+    else
+    {
+        gsb_data_account_set_bet_spin_range ( account_number, 0 );
+        gsb_data_account_set_bet_months ( account_number,
+                        gtk_spin_button_get_value_as_int (
+                        GTK_SPIN_BUTTON ( spin_button ) ) );
+        gtk_spin_button_set_range ( GTK_SPIN_BUTTON ( spin_button ), 1.0, 240.0 );
+    }
+
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
+
+    bet_array_refresh_estimate_tab ( );
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
+gboolean bet_array_initializes_account_settings ( gint account_number )
+{
+    GtkWidget *notebook;
+    GtkWidget *widget = NULL;
+    GtkWidget *spin_button = NULL;
+    gint spin_range;
+    gint months;
+
+    notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook" );
+    spin_button = g_object_get_data ( G_OBJECT ( notebook ), "bet_account_spin_button" );
+    spin_range = gsb_data_account_get_bet_spin_range ( account_number );
+    months = gsb_data_account_get_bet_months ( account_number );
+
+    if ( spin_range == 0 )
+    {
+        widget = g_object_get_data ( G_OBJECT ( notebook ), "bet_account_previous" );
+        gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ), TRUE );
+        gtk_spin_button_set_range ( GTK_SPIN_BUTTON ( spin_button ), 1.0, 240.0 );
+        gtk_spin_button_set_value ( GTK_SPIN_BUTTON ( spin_button ),
+                        (gdouble) months );
+    }
+    else
+    {
+        widget = g_object_get_data ( G_OBJECT ( notebook ), "bet_account_widget" );
+        gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ), TRUE );
+        gtk_spin_button_set_range ( GTK_SPIN_BUTTON ( spin_button ), 1.0, 20.0 );
+        gtk_spin_button_set_value ( GTK_SPIN_BUTTON ( spin_button ),
+                        (gdouble) months / 12.0 );
+
+    }
+
+    return FALSE;
+}
+/*
+ * bet_array_duration_button changed
+ * This function is called when a spin button is changed.
+ * It copies the new duration from the spin_button into the bet_months property of
+ * the bet container
+ */
+gboolean bet_array_duration_number_changed ( GtkWidget *spin_button,
+                        gpointer data )
+{
+    gint account_number;
+    gint months;
+
+    account_number = gsb_gui_navigation_get_current_account ( );
+
+    months = gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON ( spin_button ) );
+    if ( gsb_data_account_get_bet_spin_range ( account_number ) == 1 )
+        months *= 12;
+                                               
+    gsb_data_account_set_bet_months ( account_number, months );
+
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
+
+    bet_array_refresh_estimate_tab ( );
+
+    return ( FALSE );
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: balance_estimate_hist.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_hist.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- balance_estimate_hist.c	5 Mar 2010 22:18:55 -0000	1.13
+++ balance_estimate_hist.c	8 Mar 2010 21:30:00 -0000	1.14
@@ -88,6 +88,7 @@
 gsb_real bet_historical_get_children_amount ( GtkTreeModel *model, GtkTreeIter *parent );
 static GtkWidget *bet_historical_get_data ( GtkWidget *container );
 static gboolean bet_historical_get_full_div ( GtkTreeModel *model, GtkTreeIter *parent );
+static gboolean bet_historical_initializes_account_settings ( gint account_number );
 static void bet_historical_populate_div_model ( gpointer key,
                         gpointer value,
                         gpointer user_data);
@@ -254,33 +255,26 @@
 void bet_historical_origin_data_clicked ( GtkWidget *togglebutton, gpointer data )
 {
     GtkWidget *notebook;
-    GtkWidget *ancestor;
-    GtkWidget *widget;
     GtkTreeViewColumn *column;
     const gchar *name;
     gchar *title;
+    gint account_number;
 
+    account_number = gsb_gui_navigation_get_current_account ( );
     name = gtk_widget_get_name ( GTK_WIDGET ( togglebutton ) );
     //~ devel_debug (name);
     notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
-    ancestor = g_object_get_data ( G_OBJECT ( notebook ), "bet_historical_data" );
-    if ( gtk_widget_is_ancestor ( togglebutton, ancestor ) == FALSE )
-    {
-        widget = utils_get_child_widget_by_name ( ancestor, name );
-        if ( widget )
-            gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widget ), TRUE );
-    }
 
     if ( g_strcmp0 ( name, "button_1" ) == 0 )
     {
-        etat.bet_hist_data = 0;
-        bet_data_set_div_ptr ( etat.bet_hist_data );
+        gsb_data_account_set_bet_hist_data ( account_number, 0 );
+        bet_data_set_div_ptr ( 0 );
         title = g_strdup ( _("Category") );
     }
     else
     {
-        etat.bet_hist_data = 1;
-        bet_data_set_div_ptr ( etat.bet_hist_data );
+        gsb_data_account_set_bet_hist_data ( account_number, 1 );
+        bet_data_set_div_ptr ( 1 );
         title = g_strdup ( _("Budgetary line") );
     }
 
@@ -303,29 +297,11 @@
  * */
 void bet_historical_fyear_clicked ( GtkWidget *combo, gpointer data )
 {
-    GtkWidget *notebook;
-    GtkWidget *ancestor;
-    GtkWidget *widget;
-    const gchar *name;
-
-    //~ devel_debug (NULL);
-    etat.bet_hist_fyear = bet_historical_get_fyear_from_combobox ( combo );
-
-    name = gtk_widget_get_name ( GTK_WIDGET ( combo ) );
-    notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
-    ancestor = g_object_get_data ( G_OBJECT ( notebook ), "bet_historical_data" );
-    if ( gtk_widget_is_ancestor ( combo, ancestor ) == FALSE )
-    {
-        widget = utils_get_child_widget_by_name ( ancestor, name );
-        if ( widget )
-        {
-            gsb_fyear_select_iter_by_number ( widget,
-                        bet_fyear_model,
-                        bet_fyear_model_filter,
-                        etat.bet_hist_fyear );
-        }
+    gint account_number;
 
-    }
+    account_number = gsb_gui_navigation_get_current_account ( );
+    gsb_data_account_set_bet_hist_fyear ( account_number,
+                        bet_historical_get_fyear_from_combobox ( combo ) );
 
     if ( etat.modification_fichier == 0 )
         modification_fichier ( TRUE );
@@ -753,9 +729,8 @@
 {
     GtkWidget *notebook;
     GtkWidget *tree_view;
-    GtkWidget *combo;
     GtkTreeModel *model;
-    gint selected_account;
+    gint account_number;
     gint fyear_number;
     GDate *date_min;
     GDate *date_max;
@@ -764,8 +739,8 @@
 
     //~ devel_debug (NULL);
     /* récuperation du n° de compte à utiliser */
-    selected_account = gsb_gui_navigation_get_current_account ( );
-    if ( selected_account == -1 )
+    account_number = gsb_gui_navigation_get_current_account ( );
+    if ( account_number == -1 )
         return;
 
     notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
@@ -773,12 +748,14 @@
     if ( GTK_IS_TREE_VIEW ( tree_view ) == FALSE )
         return;
 
+    /* Initializes account settings */
+    bet_historical_initializes_account_settings ( account_number );
+
     model = gtk_tree_view_get_model ( GTK_TREE_VIEW ( tree_view ) );
     gtk_tree_store_clear ( GTK_TREE_STORE ( model ) );
 
     /* calculate date_min and date_max */
-    combo = g_object_get_data ( G_OBJECT ( notebook ), "bet_historical_fyear" );
-    fyear_number = bet_historical_get_fyear_from_combobox ( combo );
+    fyear_number = gsb_data_account_get_bet_hist_fyear ( account_number );
     if ( fyear_number == 0 )
     {
         date_min = gdate_today ( );
@@ -806,16 +783,16 @@
     while ( tmp_list )
     {
         gint transaction_number;
-        gint account_number;
+        gint tmp_account_number;
         const GDate *date;
 
         transaction_number = gsb_data_transaction_get_transaction_number (
                         tmp_list->data );
         tmp_list = tmp_list -> next;
 
-        account_number =  gsb_data_transaction_get_account_number (
+        tmp_account_number =  gsb_data_transaction_get_account_number (
                         transaction_number );
-        if ( account_number != selected_account )
+        if ( tmp_account_number != account_number )
             continue;
 
         date = gsb_data_transaction_get_date ( transaction_number );
@@ -1643,6 +1620,32 @@
  *
  *
  * */
+gboolean bet_historical_initializes_account_settings ( gint account_number )
+{
+    GtkWidget *notebook;
+    GtkWidget *combo = NULL;
+    gint fyear_number;
+
+    notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook" );
+    combo = g_object_get_data ( G_OBJECT ( notebook ), "bet_historical_fyear" );
+
+    fyear_number = gsb_data_account_get_bet_hist_fyear ( account_number );
+
+    gsb_fyear_select_iter_by_number ( combo,
+                        bet_fyear_model,
+                        bet_fyear_model_filter,
+                        fyear_number );
+
+    return FALSE;
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ * */
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: structures.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/structures.h,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -d -r1.241 -r1.242
--- structures.h	3 Mar 2010 22:21:49 -0000	1.241
+++ structures.h	8 Mar 2010 21:30:01 -0000	1.242
@@ -44,22 +44,10 @@
     gboolean debug_mode;            /* TRUE in debug mode, FALSE for normale mode */
 
     /* files and backup part */
-    gint dernier_fichier_auto;
-    gint sauvegarde_auto;           /* utilisé pour enregistrer le fichier automatiquementà la fermeture */
-    gint sauvegarde_demarrage;      /* utilisé pour enregistrer le fichier s'il s'est bien ouvert */
-    gint make_backup;               /* TRUE for create a backup when save file */
-    gint make_backup_every_minutes; /* TRUE to make backup every x mn */
-    gint make_backup_nb_minutes;    /* the number of minutes we want to make a backup */
     gint crypt_file;                /* TRUE if we want to crypt the file */
-    gint compress_file;             /* TRUE if we want to compress the grisbi file */
-    gint compress_backup;           /* TRUE if we want to compress the backup */
-    gint alerte_permission;         /* à un si le message d'alerte s'affiche */
     gint fichier_deja_ouvert;       /* à un si lors de l'ouverture, le fichier semblait déjà ouvert */
-    gint force_enregistrement;      /* à un si on force l'enregistrement */
 
     /* formulaire */
-    gint entree;                    /* si etat.entree = 1, la touche entrée finit l'opération */ 
-    gint alerte_mini;
     gint formulaire_toujours_affiche;
     gint affichage_exercice_automatique;            /* automatic fyear :0 to set according to the date, 2 according to value date */
     gint automatic_completion_payee;                /* 1 pour autoriser la completion automatique des opérations */
@@ -72,9 +60,6 @@
     gint en_train_de_charger;
     gint utilise_logo;
     gint display_grisbi_title;      /* selection du titre principal de grisbi */
-
-    gint utilise_fonte_listes;      /* TRUE to use a custom font for the lists */
-    gchar *font_string;             /* contain the description of the font, or NULL */
     
     gint display_toolbar;           /** Display mode of toolbar. */
     gboolean show_toolbar;          /** Show toolbar or not.  */
@@ -104,11 +89,6 @@
     gint combofix_force_payee;              /* TRUE if no new item can be appended in the payee combofix */
     gint combofix_force_category;           /* TRUE if no new item can be appended in the category and budget combofix */
     
-    /* Various commands */
-    gchar * browser_command;
-    gchar * latex_command;
-    gchar * dvips_command;
-
     /* Print stuff */
     struct print_config print_config;
     
@@ -133,7 +113,6 @@
 
     /* variables for the module estimate balance */
     gint bet_deb_period;
-    gint bet_end_period;
     gint bet_spin_range;
     gint bet_months;
     gint bet_hist_data;
@@ -158,10 +137,30 @@
 
     /* general part */
     gint r_modifiable;                              /* Changes in reconciled transactions */
-
-    /* pluriel pour final */
+    gint entree;                                    /* si etat.entree = 1, la touche entrée finit l'opération */ 
+    gint alerte_mini;
+    gint utilise_fonte_listes;                      /* TRUE to use a custom font for the lists */
+    gchar *font_string;                             /* contain the description of the font, or NULL */
+    gchar *browser_command;
+    gchar *latex_command;
+    gchar *dvips_command;
     gint pluriel_final;                             /* 0 = finals 1 = finaux */
 
+    /* files part */
+    gint sauvegarde_demarrage;                      /* utilisé pour enregistrer le fichier s'il s'est bien ouvert */
+    gint sauvegarde_auto;                           /* utilisé pour enregistrer le fichier automatiquementà la fermeture */
+    gint dernier_fichier_auto;
+    gint compress_file;                             /* TRUE if we want to compress the grisbi file */
+    gint alerte_permission;                         /* à un si le message d'alerte s'affiche */
+    gint force_enregistrement;                      /* à un si on force l'enregistrement */
+
+    /* backup part */
+    gint make_backup;                               /* TRUE for create a backup when save file */
+    gint make_backup_every_minutes;                 /* TRUE to make backup every x mn */
+    gint make_backup_nb_minutes;                    /* the number of minutes we want to make a backup */
+    gint make_bakup_single_file;                    /* TRUE if a single backup file */
+    gint compress_backup;                           /* TRUE if we want to compress the backup */
+
     /* variables for the list of transactions */
     gint show_transaction_selected_in_form;         /* TRUE will show the selected transaction in the form */
     gint show_transaction_gives_balance;            /* TRUE si on visualise l'opération qui donne le solde du jour */
@@ -169,8 +168,8 @@
     gboolean transactions_list_sort_by_value_date;  /* Options for sorting by value date */
 
     /* archive stuff */
-    gint check_for_archival; /* TRUE if we want to check the number of non archived transactions at the opening */
-    gint max_non_archived_transactions_for_check; /* the max number of transaction before grisbi warm at the opening */
+    gint check_for_archival;                        /* TRUE if we want to check the number of non archived transactions at the opening */
+    gint max_non_archived_transactions_for_check;   /* the max number of transaction before grisbi warm at the opening */
 
 } conf;
 

Index: gsb_file_util.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_util.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- gsb_file_util.c	10 Dec 2009 10:50:53 -0000	1.42
+++ gsb_file_util.c	8 Mar 2010 21:30:01 -0000	1.43
@@ -284,7 +284,7 @@
     /* if the file was already opened and we don't force the saving, we do nothing */
     if ( (etat.fichier_deja_ouvert
 	  &&
-	  !etat.force_enregistrement)
+	  !conf.force_enregistrement)
 	 ||
 	 !nom_fichier_comptes
 	 ||
@@ -328,7 +328,7 @@
 	if (g_file_test ( lock_filename,
 			  G_FILE_TEST_EXISTS ))
 	{
-	    if ( ! etat.force_enregistrement )
+	    if ( ! conf.force_enregistrement )
 		dialog_message ( "account-already-opened", nom_fichier_comptes );
 
 	    /* the lock is already created, return TRUE */

Index: affichage.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -d -r1.170 -r1.171
--- affichage.c	15 Nov 2009 21:42:32 -0000	1.170
+++ affichage.c	8 Mar 2010 21:30:00 -0000	1.171
@@ -81,11 +81,13 @@
 extern gchar *adresse_secondaire;
 extern GdkColor archive_background_color;
 extern GdkColor calendar_entry_color;
+extern GdkColor couleur_bet_division;
 extern GdkColor couleur_fond[2];
 extern GdkColor couleur_grise;
 extern GdkColor couleur_jour;
 extern GdkColor couleur_selection;
 extern GdkColor default_archive_background_color;
+extern GdkColor default_couleur_bet_division;
 extern GdkColor default_calendar_entry_color;
 extern GdkColor default_couleur_fond[2];
 extern GdkColor default_couleur_grise;
@@ -202,19 +204,19 @@
                         _("Use a custom font for the transactions"));
     gtk_box_pack_start ( GTK_BOX ( hbox ), check_button, FALSE, FALSE, 0 );
     gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( check_button ),
-				   etat.utilise_fonte_listes );
+				        conf.utilise_fonte_listes );
 
     /*     on crée la vbox qui contiendra la font button et le raz */
     vbox = gtk_vbox_new ( FALSE, 10 );
     gtk_box_pack_start ( GTK_BOX ( hbox ), vbox, FALSE, FALSE, 0 );
 
-    gtk_widget_set_sensitive ( vbox, etat.utilise_fonte_listes );
+    gtk_widget_set_sensitive ( vbox, conf.utilise_fonte_listes );
     g_signal_connect ( G_OBJECT ( check_button ), "toggled",
 		       G_CALLBACK ( change_choix_utilise_fonte_liste ), vbox );
 
 
     /* Create font button */
-    font_button = utils_font_create_button (&etat.font_string,
+    font_button = utils_font_create_button ( &conf.font_string,
 					    G_CALLBACK (update_fonte_listes), NULL);
     gtk_box_pack_start ( GTK_BOX (vbox), font_button, FALSE, FALSE, 0 );
 
@@ -310,11 +312,11 @@
 gboolean change_choix_utilise_fonte_liste ( GtkWidget *check_button,
                         GtkWidget *vbox )
 {
-    etat.utilise_fonte_listes = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( check_button ));
+    conf.utilise_fonte_listes = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( check_button ));
     gtk_widget_set_sensitive ( vbox,
-			       etat.utilise_fonte_listes );
+			       conf.utilise_fonte_listes );
 
-    update_fonte_listes (etat.font_string, NULL);
+    update_fonte_listes ( conf.font_string, NULL );
 
     return ( FALSE );
 }
@@ -336,7 +338,7 @@
 
     devel_debug (NULL);
 
-    if ( etat.utilise_fonte_listes )
+    if ( conf.utilise_fonte_listes )
 	font = fontname;
     else
 	font = NULL;
@@ -791,6 +793,7 @@
     { N_("Background of non selectable scheduled transactions"), &couleur_grise, &default_couleur_grise},
     { N_("Archive color"), &archive_background_color, &default_archive_background_color},
     { N_("Background of invalid date entry"), &calendar_entry_color, &default_calendar_entry_color },
+    { N_("Background of bet division"), &couleur_bet_division, &default_couleur_bet_division },
     { NULL, 0, 0},
     };
 

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -d -r1.211 -r1.212
--- gsb_file_load.c	7 Mar 2010 15:56:04 -0000	1.211
+++ gsb_file_load.c	8 Mar 2010 21:30:00 -0000	1.212
@@ -163,6 +163,7 @@
 extern gint affichage_echeances_perso_nb_libre;
 extern GdkColor archive_background_color;
 extern GdkColor calendar_entry_color;
+extern GdkColor couleur_bet_division;
 extern GdkColor couleur_fond[2];
 extern GdkColor couleur_grise;
 extern GdkColor couleur_jour;
@@ -1226,6 +1227,24 @@
         calendar_entry_color.blue = utils_str_atoi (attribute_values[i]);
     }
 
+    else if ( !strcmp ( attribute_names[i],
+                        "Couleur_bet_division_red" ))
+    {
+        couleur_bet_division.red = utils_str_atoi (attribute_values[i]);
+    }
+
+    else if ( !strcmp ( attribute_names[i],
+                        "Couleur_bet_division_green" ))
+    {
+        couleur_bet_division.green = utils_str_atoi (attribute_values[i]);
+    }
+
+    else if ( !strcmp ( attribute_names[i],
+                        "Couleur_bet_division_blue" ))
+    {
+        couleur_bet_division.blue = utils_str_atoi (attribute_values[i]);
+    }
+
     i++;
     }
     while ( attribute_names[i] );
@@ -3667,13 +3686,6 @@
         continue;
     }
 
-    if ( !strcmp ( attribute_names[i], "Edte" ) )
-    {
-        etat.bet_end_period = utils_str_atoi ( attribute_values[i] );
-        i++;
-        continue;
-    }
-
     if ( !strcmp ( attribute_names[i], "Nbre" ) )
     {
         etat.bet_months = utils_str_atoi ( attribute_values[i] );

Index: main.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- main.c	20 Feb 2010 08:54:00 -0000	1.165
+++ main.c	8 Mar 2010 21:30:01 -0000	1.166
@@ -302,7 +302,7 @@
     else
     {
 	/* open the last file if needed, nom_fichier_comptes was filled while loading the configuration */
-	if ( etat.dernier_fichier_auto
+	if ( conf.dernier_fichier_auto
 	     &&
 	     nom_fichier_comptes )
 	    if (!gsb_file_open_file(nom_fichier_comptes))

Index: fenetre_principale.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- fenetre_principale.h	4 Mar 2010 18:36:07 -0000	1.30
+++ fenetre_principale.h	8 Mar 2010 21:30:00 -0000	1.31
@@ -24,6 +24,10 @@
 void gsb_gui_notebook_change_page ( GsbGeneralNotebookPages page );
 void gsb_gui_sensitive_headings ( gboolean sensitive );
 gboolean gsb_gui_update_show_headings ();
+gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
+                        GtkNotebookPage *page,
+                        guint page_number,
+                        gpointer null );
 /*END_DECLARATION*/
 
 #endif

Index: gsb_form_widget.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_widget.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- gsb_form_widget.c	13 Feb 2010 17:44:59 -0000	1.49
+++ gsb_form_widget.c	8 Mar 2010 21:30:01 -0000	1.50
@@ -575,7 +575,7 @@
 		{
 		    /* we are on the bottom right, we finish the edition or
 		     * go to the upper left */
-		    if ( !etat.entree )
+		    if ( !conf.entree )
 		    {
 			return_value_number = -2;
 			continue;

Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- gsb_file.c	10 Jan 2010 00:52:55 -0000	1.62
+++ gsb_file.c	8 Mar 2010 21:30:00 -0000	1.63
@@ -406,7 +406,7 @@
     {
         /* the file has been opened succesfully */
         /* we make a backup if necessary */
-        if ( etat.sauvegarde_demarrage )
+        if ( conf.sauvegarde_demarrage )
             gsb_file_save_backup();
     }
     else
@@ -414,7 +414,7 @@
         /* Loading failed. */
         gsb_status_message ( _("Failed to load accounts") );
 
-        if ( etat.sauvegarde_demarrage || etat.make_backup || etat.make_backup_every_minutes )
+        if ( conf.sauvegarde_demarrage || conf.make_backup || conf.make_backup_every_minutes )
         {
             gchar *tmpstr = g_strdup_printf ( _("Error loading file '%s'"), filename);
             gchar *tmpstr2 = g_strdup_printf ( 
@@ -572,7 +572,7 @@
     /*     on vérifie que le fichier n'est pas locké */
     if ( etat.fichier_deja_ouvert
 	 &&
-	 !etat.force_enregistrement
+	 !conf.force_enregistrement
 	 &&
 	 origine != -2 )
     {
@@ -596,7 +596,7 @@
     }
 
     /* make backup before saving if asked */
-    if (etat.make_backup)
+    if (conf.make_backup)
 	gsb_file_save_backup();
 
     /*   on a maintenant un nom de fichier */
@@ -604,7 +604,7 @@
     gsb_status_message ( _("Saving file") );
 
     result = gsb_file_save_save_file ( nouveau_nom_enregistrement,
-				       etat.compress_file,
+				       conf.compress_file,
 				       FALSE );
 
     if ( result )
@@ -667,17 +667,31 @@
     }
     /* create a filename for the backup :
      * filename_yyyymmddTmmhhss.gsb */
-    time ( &temps );
-    day_time = localtime (&temps);
-    filename =  g_strdup_printf ( "%s%s%s_%d%02d%02dT%02d%02d%02d.gsb",
-                        gsb_file_get_backup_path (),
-                        G_DIR_SEPARATOR_S,
-                        name,
-                        day_time -> tm_year + 1900, day_time -> tm_mon + 1, day_time -> tm_mday,
-                        day_time -> tm_hour, day_time -> tm_min, day_time -> tm_sec );
-    retour = gsb_file_save_save_file ( filename,
-                        etat.compress_backup,
-                        FALSE );
+    if ( conf.make_bakup_single_file )
+    {
+        filename =  g_strdup_printf ( "%s%s%s_backup.gsb",
+                            gsb_file_get_backup_path ( ),
+                            G_DIR_SEPARATOR_S,
+                            name );
+    }
+    else
+    {
+        time ( &temps );
+        day_time = localtime (&temps);
+        filename =  g_strdup_printf ( "%s%s%s_%d%02d%02dT%02d%02d%02d.gsb",
+                            gsb_file_get_backup_path (),
+                            G_DIR_SEPARATOR_S,
+                            name,
+                            day_time -> tm_year + 1900,
+                            day_time -> tm_mon + 1,
+                            day_time -> tm_mday,
+                            day_time -> tm_hour,
+                            day_time -> tm_min,
+                            day_time -> tm_sec );
+    }
+
+    retour = gsb_file_save_save_file ( filename, conf.compress_backup, FALSE );
+
     g_free (filename);
     g_free (name);
 
@@ -698,7 +712,7 @@
 gboolean gsb_file_automatic_backup_start ( GtkWidget *checkbutton,
                         gpointer null )
 {
-    devel_debug_int (etat.make_backup_every_minutes);
+    devel_debug_int (conf.make_backup_every_minutes);
 
     /* if there is already a timeout, we remove it */
     if (id_timeout)
@@ -708,15 +722,15 @@
     }
 
     /* launch the timeout only if active and if there is some minutes */
-    if (etat.make_backup_every_minutes
+    if (conf.make_backup_every_minutes
 	&&
-	etat.make_backup_nb_minutes )
+	conf.make_backup_nb_minutes )
 #if GLIB_CHECK_VERSION(2,14,0)
-	id_timeout = g_timeout_add_seconds ( etat.make_backup_nb_minutes * 60,
+	id_timeout = g_timeout_add_seconds ( conf.make_backup_nb_minutes * 60,
 					     (GSourceFunc) (gsb_file_automatic_backup),
 					     NULL );
 #else
-	id_timeout = g_timeout_add ( etat.make_backup_nb_minutes * 60000,
+	id_timeout = g_timeout_add ( conf.make_backup_nb_minutes * 60000,
 				     (GSourceFunc) (gsb_file_automatic_backup),
 				     NULL );
 #endif
@@ -734,7 +748,7 @@
 gboolean gsb_file_automatic_backup_change_time ( GtkWidget *spinbutton,
                         gpointer null )
 {
-    devel_debug_int (etat.make_backup_nb_minutes);
+    devel_debug_int (conf.make_backup_nb_minutes);
 
     /* if there is already a timeout, we stop it */
     if (id_timeout)
@@ -744,13 +758,13 @@
     }
 
     /* set a new timeout only if there is an interval */
-    if (etat.make_backup_nb_minutes)
+    if (conf.make_backup_nb_minutes)
 #if GLIB_CHECK_VERSION(2,14,0)
-	id_timeout = g_timeout_add_seconds ( etat.make_backup_nb_minutes * 60,
+	id_timeout = g_timeout_add_seconds ( conf.make_backup_nb_minutes * 60,
 					     (GSourceFunc) (gsb_file_automatic_backup),
 					     NULL );
 #else
-	id_timeout = g_timeout_add ( etat.make_backup_nb_minutes * 60000,
+	id_timeout = g_timeout_add ( conf.make_backup_nb_minutes * 60000,
 				     (GSourceFunc) (gsb_file_automatic_backup),
 				     NULL );
 #endif
@@ -771,12 +785,12 @@
 {
     devel_debug (NULL);
 
-    if (!etat.make_backup_every_minutes)
+    if (!conf.make_backup_every_minutes)
 	/* stop the timeout */
 	return FALSE;
 
     /* we save only if there is a nb of minutes, but don't stop the timer if not */
-    if (etat.make_backup_nb_minutes)
+    if (conf.make_backup_nb_minutes)
 	gsb_file_save_backup ();
 
     return TRUE;
@@ -808,8 +822,8 @@
     if ( !etat.modification_fichier )
 	return GTK_RESPONSE_NO;
 
-    if ( etat.sauvegarde_auto &&
-	 ( !etat.fichier_deja_ouvert || etat.force_enregistrement ) &&
+    if ( conf.sauvegarde_auto &&
+	 ( !etat.fichier_deja_ouvert || conf.force_enregistrement ) &&
 	 nom_fichier_comptes )
       return GTK_RESPONSE_OK;
 
@@ -823,7 +837,7 @@
 				      " " );
     if ( etat.fichier_deja_ouvert
 	 &&
-	 !etat.force_enregistrement )
+	 !conf.force_enregistrement )
     {
 	hint = g_strdup(_("Save locked files?"));
 	message = g_strdup_printf ( _("The document '%s' is locked but modified. If you want to save it, you must cancel and save it with another name or activate the \"%s\" option in setup."),

Index: parametres.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parametres.c,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -d -r1.211 -r1.212
--- parametres.c	20 Feb 2010 08:54:00 -0000	1.211
+++ parametres.c	8 Mar 2010 21:30:01 -0000	1.212
@@ -819,16 +819,16 @@
 
     /* Automatically load last file on startup? */
     button = gsb_automem_checkbutton_new (_("Automatically load last file on startup"),
-                        &(etat.dernier_fichier_auto), NULL, NULL );
+                        &conf.dernier_fichier_auto, NULL, NULL );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     button = gsb_automem_checkbutton_new (_("Automatically save on exit"),
-                        &(etat.sauvegarde_auto), NULL, NULL);
+                        &conf.sauvegarde_auto, NULL, NULL);
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Warn if file is used by someone else? */
     button = gsb_automem_checkbutton_new ( _("Force saving of locked files"),
-                        &(etat.force_enregistrement), NULL, NULL );
+                        &conf.force_enregistrement, NULL, NULL );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* crypt the grisbi file */
@@ -838,7 +838,7 @@
 
     /* Compression level of files */
     button = gsb_automem_checkbutton_new ( _("Compress Grisbi file"),
-                        &(etat.compress_file), NULL, NULL );
+                        &conf.compress_file, NULL, NULL );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Memorize last opened files in menu */
@@ -856,19 +856,24 @@
     /* Backups */
     paddingbox = new_paddingbox_with_title (vbox_pref, FALSE, _("Backups"));
 
+    /* Single backup file */
+    button = gsb_automem_checkbutton_new ( _("Make a single backup file"),
+                        &conf.make_bakup_single_file, NULL, NULL );
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
+
     /* Compression level of backups */
     button = gsb_automem_checkbutton_new ( _("Compress Grisbi backup"),
-                        &(etat.compress_backup), NULL, NULL );
+                        &conf.compress_backup, NULL, NULL );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Backup at each opening? */
     button = gsb_automem_checkbutton_new ( _("Make a backup copy after opening files"),
-                        &(etat.sauvegarde_demarrage), NULL, NULL);
+                        &conf.sauvegarde_demarrage, NULL, NULL);
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Automatic backup ? */
     button = gsb_automem_checkbutton_new (_("Make a backup copy before saving files"),
-                        &etat.make_backup, NULL, NULL);
+                        &conf.make_backup, NULL, NULL);
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Automatic backup every x minutes */
@@ -876,11 +881,11 @@
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0);
 
     button = gsb_automem_checkbutton_new (_("Make a backup copy every "),
-                        &etat.make_backup_every_minutes,
+                        &conf.make_backup_every_minutes,
                         G_CALLBACK (gsb_file_automatic_backup_start), NULL);
     gtk_box_pack_start ( GTK_BOX (hbox), button, FALSE, FALSE, 0 );
 
-    button = gsb_automem_spin_button_new ( &etat.make_backup_nb_minutes,
+    button = gsb_automem_spin_button_new ( &conf.make_backup_nb_minutes,
                         G_CALLBACK (gsb_file_automatic_backup_change_time), NULL );
     gtk_widget_set_size_request ( button, width_spin_button, -1 );
     gtk_box_pack_start ( GTK_BOX (hbox), button, FALSE, FALSE, 0 );
@@ -994,7 +999,7 @@
     gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.5 );
     gtk_table_attach ( GTK_TABLE(table), label, 0, 1, 0, 1,
                         GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0 );
-    entry = gsb_automem_entry_new ( &etat.browser_command, NULL, NULL );
+    entry = gsb_automem_entry_new ( &conf.browser_command, NULL, NULL );
     gtk_table_attach ( GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_EXPAND|GTK_FILL, 0, 0, 0 );
 
     text = make_blue ( g_strconcat ( 
@@ -1021,7 +1026,7 @@
     gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.5 );
     gtk_table_attach ( GTK_TABLE(table), label, 0, 1, 0, 1,
                         GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0 );
-    entry = gsb_automem_entry_new ( &etat.latex_command, NULL, NULL );
+    entry = gsb_automem_entry_new ( &conf.latex_command, NULL, NULL );
     gtk_table_attach ( GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_EXPAND|GTK_FILL, 0, 0, 0 );
 
     label = gtk_label_new ( COLON(_("dvips command")));
@@ -1029,7 +1034,7 @@
     gtk_misc_set_alignment ( GTK_MISC ( label ), 0.0, 0.5 );
     gtk_table_attach ( GTK_TABLE(table), label, 0, 1, 1, 2,
                         GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0 );
-    entry = gsb_automem_entry_new ( &etat.dvips_command, NULL, NULL );
+    entry = gsb_automem_entry_new ( &conf.dvips_command, NULL, NULL );
     gtk_table_attach ( GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0 );
 
 

Index: fenetre_principale.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- fenetre_principale.c	6 Mar 2010 22:34:12 -0000	1.127
+++ fenetre_principale.c	8 Mar 2010 21:30:00 -0000	1.128
@@ -53,10 +53,6 @@
 static gboolean gsb_gui_hpaned_size_allocate ( GtkWidget *hpaned,
                         GtkAllocation *allocation,
                         gpointer null );
-static gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
-                        GtkNotebookPage *page,
-                        guint page_number,
-                        gpointer null );
 static gboolean on_simpleclick_event_run ( GtkWidget * button, GdkEvent * button_event,
                         GCallback cb );
 /*END_STATIC*/
@@ -234,16 +230,12 @@
     gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook ),
                         account_page,
                         gtk_label_new (SPACIFY(_("Accounts"))) );
-    
-    
+   
     gtk_notebook_append_page ( GTK_NOTEBOOK ( account_page ),
                         creation_fenetre_operations (),
                         gtk_label_new (SPACIFY(_("Transactions"))) );
-    gtk_notebook_append_page ( GTK_NOTEBOOK ( account_page ),
-                        creation_onglet_comptes (),
-                        gtk_label_new (SPACIFY(_("Properties"))) );
 
-g_object_set_data ( G_OBJECT (notebook), "account_notebook", account_page );
+    g_object_set_data ( G_OBJECT (notebook), "account_notebook", account_page );
 
 #ifdef ENABLE_BALANCE_ESTIMATE
      /* append the balance estimate pages */
@@ -255,6 +247,10 @@
                         gtk_label_new (SPACIFY(_("Historical data"))) );
 
 #endif /* ENABLE_BALANCE_ESTIMATE */
+    gtk_notebook_append_page ( GTK_NOTEBOOK ( account_page ),
+                        creation_onglet_comptes (),
+                        gtk_label_new (SPACIFY(_("Properties"))) );
+
     g_signal_connect ( G_OBJECT (account_page),
                         "switch_page",
                         G_CALLBACK (gsb_gui_on_account_switch_page),
@@ -311,17 +307,18 @@
         gsb_form_set_expander_visible ( TRUE, TRUE );
         break;
 
-    case 1:
-        gsb_form_set_expander_visible (FALSE, FALSE );
-        break;
 #ifdef ENABLE_BALANCE_ESTIMATE
+    case 1:
     case 2:
-    case 3:
         gsb_form_set_expander_visible (FALSE, FALSE );
         bet_array_update_estimate_tab ( );
         break;
 #endif /* ENABLE_BALANCE_ESTIMATE */
+    case 3:
+        gsb_form_set_expander_visible (FALSE, FALSE );
+        break;
     }
+
     return ( FALSE );
 }
 

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -d -r1.199 -r1.200
--- gsb_transactions_list.c	7 Mar 2010 15:56:04 -0000	1.199
+++ gsb_transactions_list.c	8 Mar 2010 21:30:01 -0000	1.200
@@ -1577,10 +1577,13 @@
             /* he says ok, so transaction_number becomes the mother */
             transaction_number = gsb_data_transaction_get_mother_transaction_number (
                         transaction_number );
+            g_free ( tmp_str );
         }
 	    else
+        {
+            g_free ( tmp_str );
 	        return FALSE;
-        g_free ( tmp_str );
+        }
     }
     else
 	    /* it's a normal transaction, ask to be sure */
@@ -3193,8 +3196,6 @@
     }
     gsb_transactions_list_update_tree_view ( current_account, show_l );
 
-    /* update the menu */
-    //~ gsb_gui_update_bouton_affiche_ope_l ( show_l );
     return;
 }
 

Index: gsb_form.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -d -r1.151 -r1.152
--- gsb_form.c	28 Feb 2010 22:10:26 -0000	1.151
+++ gsb_form.c	8 Mar 2010 21:30:01 -0000	1.152
@@ -2047,8 +2047,8 @@
     element_number = GPOINTER_TO_INT (ptr_origin);
     account_number = gsb_form_get_account_number ();
 
-    /* if etat.entree = 1, entry finish the transaction, else does as tab */
-    if ( !etat.entree
+    /* if conf.entree = 1, entry finish the transaction, else does as tab */
+    if ( !conf.entree
 	 &&
 	 ( ev -> keyval == GDK_Return 
 	   ||

Index: utils.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- utils.c	26 Feb 2010 22:21:56 -0000	1.60
+++ utils.c	8 Mar 2010 21:30:01 -0000	1.61
@@ -160,15 +160,15 @@
 #ifdef _WIN32
     gboolean use_default_browser = TRUE;
 
-    if ( etat.browser_command && strlen ( etat.browser_command) )
+    if ( conf.browser_command && strlen ( conf.browser_command ) )
     {
-        use_default_browser = !strcmp(etat.browser_command,ETAT_WWW_BROWSER);
+        use_default_browser = !strcmp( conf.browser_command,ETAT_WWW_BROWSER );
     }
     
 #else // !_WIN32
-    if ( !(etat.browser_command
+    if ( !( conf.browser_command
      &&
-     strlen ( etat.browser_command )))
+     strlen ( conf.browser_command ) ) )
     {
     
     gchar* tmpstr = g_strdup_printf ( _("Grisbi was unable to execute a web browser to "
@@ -187,7 +187,7 @@
 
     /* search if the sequence `%s' is in the string
      * and split the string before and after this delimiter */
-    split = g_strsplit ( etat.browser_command, "%s", 0 );
+    split = g_strsplit ( conf.browser_command, "%s", 0 );
 
     if ( split[1] )
     {
@@ -203,7 +203,7 @@
 	chaine = tmpstr;
     }
     else
-	chaine = g_strconcat ( etat.browser_command, " ", url, "&", NULL ); 
+	chaine = g_strconcat ( conf.browser_command, " ", url, "&", NULL ); 
 
     g_strfreev(split);
 

Index: affichage_liste.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage_liste.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- affichage_liste.c	13 Feb 2010 17:44:59 -0000	1.119
+++ affichage_liste.c	8 Mar 2010 21:30:00 -0000	1.120
@@ -455,7 +455,7 @@
 							 _("Pressing RETURN in transaction form"),
 							 _("selects next field"),
 							 _("terminates transaction"),
-							 &etat.entree, NULL, NULL);
+							 &conf.entree, NULL, NULL);
 
     /* How to display financial year */
     radiogroup = gsb_automem_radiobutton_new_with_title (vbox_pref,

Index: gsb_file_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_config.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- gsb_file_config.c	10 Jan 2010 00:52:55 -0000	1.90
+++ gsb_file_config.c	8 Mar 2010 21:30:00 -0000	1.91
@@ -145,7 +145,6 @@
     }
 
     /* get the geometry */
-
     conf.main_width = g_key_file_get_integer ( config,
                         "Geometry",
                         "Width",
@@ -184,75 +183,87 @@
                         "Path",
                         NULL ));
 
-    etat.make_backup = g_key_file_get_integer ( config,
-                        "General",
-                        "Make backup",
-                        NULL );
-
-    etat.make_backup_every_minutes = g_key_file_get_integer ( config,
-                        "General",
-                        "Make backup every x minutes",
-                        NULL );
-
-    etat.make_backup_nb_minutes = g_key_file_get_integer ( config,
-                        "General",
-                        "Make backup nb minutes",
-                        NULL );
-
-    gsb_file_set_backup_path ( g_key_file_get_string ( config,
-                        "General",
-                        "Backup path",
-                        NULL ));
-
-    etat.alerte_permission = g_key_file_get_integer ( config,
+    conf.alerte_permission = g_key_file_get_integer ( config,
                         "General",
                         "Show permission alert",
                         NULL );
 
-    etat.entree = g_key_file_get_integer ( config,
+    conf.entree = g_key_file_get_integer ( config,
                         "General",
                         "Function of enter",
                         NULL );
 
-    etat.alerte_mini = g_key_file_get_integer ( config,
+    conf.alerte_mini = g_key_file_get_integer ( config,
                         "General",
                         "Show alert messages",
                         NULL );
 
-    etat.utilise_fonte_listes = g_key_file_get_integer ( config,
+    conf.utilise_fonte_listes = g_key_file_get_integer ( config,
                         "General",
                         "Use user font",
                         NULL );
     
-    etat.font_string = g_key_file_get_string ( config, "General", "Font name", NULL );
+    conf.font_string = g_key_file_get_string ( config, "General", "Font name", NULL );
     
-    etat.latex_command = g_key_file_get_string ( config,
+    conf.latex_command = g_key_file_get_string ( config,
                         "General",
                         "Latex command",
                         NULL );
 
-    etat.dvips_command = g_key_file_get_string ( config,
+    conf.dvips_command = g_key_file_get_string ( config,
                         "General",
                         "Dvips command",
                         NULL );
 
-    etat.browser_command = g_key_file_get_string ( config,
+    conf.pluriel_final = g_key_file_get_integer ( config,
                         "General",
-                        "Web",
+                        "Pluriel_final",
+                        NULL );
+                        
+
+    /* get backup part */
+    conf.make_backup = g_key_file_get_integer ( config,
+                        "Backup",
+                        "Make backup",
+                        NULL );
+
+    conf.make_bakup_single_file = g_key_file_get_integer ( config,
+                        "Backup",
+                        "Make backup single file",
                         NULL );
 
+    conf.make_backup_every_minutes = g_key_file_get_integer ( config,
+                        "Backup",
+                        "Make backup every x minutes",
+                        NULL );
+
+    conf.make_backup_nb_minutes = g_key_file_get_integer ( config,
+                        "Backup",
+                        "Make backup nb minutes",
+                        NULL );
+
+    conf.compress_backup = g_key_file_get_integer ( config,
+                        "Backup",
+                        "Compress backup",
+                        NULL );
+
+    gsb_file_set_backup_path ( g_key_file_get_string ( config,
+                        "Backup",
+                        "Backup path",
+                        NULL ));
+
     /* get input/output */
-    etat.dernier_fichier_auto = g_key_file_get_integer ( config,
+    conf.dernier_fichier_auto = g_key_file_get_integer ( config,
                         "IO",
                         "Load last file",
                         NULL );
 
-    etat.sauvegarde_auto = g_key_file_get_integer ( config,
+    conf.sauvegarde_auto = g_key_file_get_integer ( config,
                         "IO",
                         "Save at closing",
                         NULL );
 
-    etat.sauvegarde_demarrage = g_key_file_get_integer ( config,
+    conf.sauvegarde_demarrage = g_key_file_get_integer ( config,
                         "IO",
                         "Save at opening",
                         NULL );
@@ -262,17 +273,12 @@
                         "Nb last opened files",
                         NULL );
 
-    etat.compress_file = g_key_file_get_integer ( config,
+    conf.compress_file = g_key_file_get_integer ( config,
                         "IO",
                         "Compress file",
                         NULL );
 
-    etat.compress_backup = g_key_file_get_integer ( config,
-                        "IO",
-                        "Compress backup",
-                        NULL );
-
-    etat.force_enregistrement = g_key_file_get_integer ( config,
+    conf.force_enregistrement = g_key_file_get_integer ( config,
                         "IO",
                         "Force saving",
                         NULL );
@@ -510,10 +516,12 @@
                         "Geometry",
                         "Width",
                         conf.main_width );
+
     g_key_file_set_integer ( config,
                         "Geometry",
                         "Height",
                         conf.main_height );
+
     g_key_file_set_integer ( config,
                         "Geometry",
                         "Full screen",
@@ -538,63 +546,55 @@
                         "General",
                         "Can modify R",
                         conf.r_modifiable );
+
     g_key_file_set_string ( config,
                         "General",
                         "Path",
                         gsb_file_get_last_path () );
-    g_key_file_set_integer ( config,
-                        "General",
-                        "Make backup",
-                        etat.make_backup );
-    g_key_file_set_integer ( config,
-                        "General",
-                        "Make backup every x minutes",
-                        etat.make_backup_every_minutes );
-    g_key_file_set_integer ( config,
-                        "General",
-                        "Make backup nb minutes",
-                        etat.make_backup_nb_minutes );
-    if (gsb_file_get_backup_path ())
-        g_key_file_set_string ( config,
-                        "General",
-                        "Backup path",
-                        gsb_file_get_backup_path ());
+
     g_key_file_set_integer ( config,
                         "General",
                         "Show permission alert",
-                        etat.alerte_permission );
+                        conf.alerte_permission );
+
     g_key_file_set_integer ( config,
                         "General",
                         "Function of enter",
-                        etat.entree );
+                        conf.entree );
+
     g_key_file_set_integer ( config,
                         "General",
                         "Show alert messages",
-                        etat.alerte_mini );
+                        conf.alerte_mini );
+
     g_key_file_set_integer ( config,
                         "General",
                         "Use user font",
-                        etat.utilise_fonte_listes );
-    if (etat.font_string)
+                        conf.utilise_fonte_listes );
+
+    if ( conf.font_string )
         g_key_file_set_string ( config,
                         "General",
                         "Font name",
-                        etat.font_string );
-    if (etat.latex_command)
+                        conf.font_string );
+
+    if ( conf.latex_command )
         g_key_file_set_string ( config,
                         "General",
                         "Latex command",
-                        etat.latex_command );
-    if (etat.dvips_command)
+                        conf.latex_command );
+
+    if ( conf.dvips_command )
         g_key_file_set_string ( config,
                         "General",
                         "Dvips command",
-                        etat.dvips_command );
-    if (etat.browser_command)
+                        conf.dvips_command );
+
+    if (conf.browser_command)
     {
         gchar *string;
 
-        string = my_strdelimit ( etat.browser_command, "&", "\\e" );
+        string = my_strdelimit ( conf.browser_command, "&", "\\e" );
         g_key_file_set_string ( config,
                         "General",
                         "Web",
@@ -602,21 +602,58 @@
         g_free (string);
     }
 
+    g_key_file_set_integer ( config,
+                        "General",
+                        "Pluriel_final",
+                        conf.pluriel_final );
+
+     /* save backup part */
+    g_key_file_set_integer ( config,
+                        "Backup",
+                        "Make backup",
+                        conf.make_backup );
+
+    g_key_file_set_integer ( config,
+                        "Backup",
+                        "Make backup single file",
+                        conf.make_bakup_single_file );
+
+    g_key_file_set_integer ( config,
+                        "Backup",
+                        "Make backup every x minutes",
+                        conf.make_backup_every_minutes );
+
+    g_key_file_set_integer ( config,
+                        "Backup",
+                        "Compress backup",
+                        conf.compress_backup );
+
+    g_key_file_set_integer ( config,
+                        "Backup",
+                        "Make backup nb minutes",
+                        conf.make_backup_nb_minutes );
+
+    if (gsb_file_get_backup_path ())
+        g_key_file_set_string ( config,
+                        "Backup",
+                        "Backup path",
+                        gsb_file_get_backup_path ());
+
     /* save input/output */
     g_key_file_set_integer ( config,
                         "IO",
                         "Load last file",
-                        etat.dernier_fichier_auto );
+                        conf.dernier_fichier_auto );
 
     g_key_file_set_integer ( config,
                         "IO",
                         "Save at closing",
-                        etat.sauvegarde_auto );
+                        conf.sauvegarde_auto );
 
     g_key_file_set_integer ( config,
                         "IO",
                         "Save at opening",
-                        etat.sauvegarde_demarrage );
+                        conf.sauvegarde_demarrage );
 
     g_key_file_set_integer ( config,
                         "IO",
@@ -626,17 +663,12 @@
     g_key_file_set_integer ( config,
                         "IO",
                         "Compress file",
-                        etat.compress_file );
-
-    g_key_file_set_integer ( config,
-                        "IO",
-                        "Compress backup",
-                        etat.compress_backup );
+                        conf.compress_file );
 
     g_key_file_set_integer ( config,
                         "IO",
                         "Force saving",
-                        etat.force_enregistrement );
+                        conf.force_enregistrement );
 
     if ( nb_derniers_fichiers_ouverts > 0
      &&
@@ -667,6 +699,7 @@
                         "Scheduled",
                         "Execute scheduled of month",
                         execute_scheduled_of_month );
+
     g_key_file_set_integer ( config,
                         "Scheduled",
                         "Balances with scheduled",
@@ -776,8 +809,9 @@
                         "Print config",
                         "Printer name",
                         etat.print_config.printer_name );
+
     if ( etat.print_config.printer_filename )
-    g_key_file_set_string ( config,
+        g_key_file_set_string ( config,
                         "Print config",
                         "Printer filename",
                         etat.print_config.printer_filename );
@@ -797,10 +831,12 @@
                         "Paper config",
                         "Name",
                         etat.print_config.paper_config.name );
+
     g_key_file_set_integer ( config,
                         "Paper config",
                         "Width",
                         etat.print_config.paper_config.width );
+
     g_key_file_set_integer ( config,
                         "Paper config",
                         "Height",
@@ -838,6 +874,7 @@
     g_free ( file_content);
     g_free (filename);
     g_key_file_free (config);
+
     return TRUE;
 }
 
@@ -971,48 +1008,48 @@
     if ( !strcmp ( element_name,
 		   "Affichage_alerte_permission" ))
     {
-	 etat.alerte_permission = utils_str_atoi (text);
+	 conf.alerte_permission = utils_str_atoi (text);
 	return;
     }
 
     if ( !strcmp ( element_name,
 		   "Force_enregistrement" ))
     {
-	etat.force_enregistrement = utils_str_atoi (text);
+	conf.force_enregistrement = utils_str_atoi (text);
 	return;
     }
 
     if ( !strcmp ( element_name,
 		   "Fonction_touche_entree" ))
     {
-	etat.entree = utils_str_atoi (text);
+	conf.entree = utils_str_atoi (text);
 	return;
     }
 
     if ( !strcmp ( element_name,
 		   "Affichage_messages_alertes" ))
     {
-	etat.alerte_mini = utils_str_atoi (text);
+	conf.alerte_mini = utils_str_atoi (text);
 	return;
     }
 
     if ( !strcmp ( element_name,
 		   "Utilise_fonte_des_listes" ))
     {
-	etat.utilise_fonte_listes = utils_str_atoi (text);
+	conf.utilise_fonte_listes = utils_str_atoi (text);
 	return;
     }
 
     if ( !strcmp ( element_name,
 		   "Fonte_des_listes" ))
     {
-	etat.font_string = my_strdup (text);
+	conf.font_string = my_strdup (text);
 	return;
     }
      if ( !strcmp ( element_name,
 		   "Navigateur_web" ))
     {
-	etat.browser_command = my_strdelimit (text,
+	conf.browser_command = my_strdelimit (text,
 					      "\\e",
 					      "&" );
 	return;
@@ -1022,13 +1059,13 @@
 		   "Latex_command" ))
     {
 	/* TODO dOm : fix memory leaks in this function (memory used by lvalue before setting its value */
-	etat.latex_command = my_strdup (text);
+	conf.latex_command = my_strdup (text);
 	return;
     }
      if ( !strcmp ( element_name,
 		   "Dvips_command" ))
     {
-	etat.dvips_command = my_strdup (text);
+	conf.dvips_command = my_strdup (text);
 	return;
     }
 
@@ -1063,7 +1100,7 @@
     if ( !strcmp ( element_name,
 		   "Chargement_auto_dernier_fichier" ))
     {
-	etat.dernier_fichier_auto = utils_str_atoi (text);
+	conf.dernier_fichier_auto = utils_str_atoi (text);
 	return;
     }
 
@@ -1077,14 +1114,14 @@
     if ( !strcmp ( element_name,
 		   "Enregistrement_automatique" ))
     {
-	etat.sauvegarde_auto = utils_str_atoi (text);
+	conf.sauvegarde_auto = utils_str_atoi (text);
 	return;
     }
 
     if ( !strcmp ( element_name,
 		   "Enregistrement_au_demarrage" ))
     {
-	etat.sauvegarde_demarrage = utils_str_atoi (text);
+	conf.sauvegarde_demarrage = utils_str_atoi (text);
 	return;
     }
 
@@ -1098,14 +1135,14 @@
     if ( !strcmp ( element_name,
 		   "Compression_fichier" ))
     {
-	etat.compress_file = utils_str_atoi (text);
+	conf.compress_file = utils_str_atoi (text);
 	return;
     }
 
     if ( !strcmp ( element_name,
 		   "Compression_backup" ))
     {
-	etat.compress_backup = utils_str_atoi (text);
+	conf.compress_backup = utils_str_atoi (text);
 	return;
     }
 
@@ -1234,13 +1271,13 @@
     conf.largeur_colonne_comptes_operation = mini_paned_width;
     conf.prefs_width = 600;
 
-    etat.force_enregistrement = 1;
+    conf.force_enregistrement = 1;
     etat.utilise_logo = 1;
 
     conf.r_modifiable = 0;       /* we can not change the reconciled transaction */
-    etat.dernier_fichier_auto = 1;   /*  on n'ouvre pas directement le dernier fichier */
-    etat.sauvegarde_auto = 0;    /* on NE sauvegarde PAS * automatiquement par défaut */
-    etat.entree = 1;    /* la touche entree provoque l'enregistrement de l'opération */
+    conf.dernier_fichier_auto = 1;   /*  on n'ouvre pas directement le dernier fichier */
+    conf.sauvegarde_auto = 0;    /* on NE sauvegarde PAS * automatiquement par défaut */
+    conf.entree = 1;    /* la touche entree provoque l'enregistrement de l'opération */
     nb_days_before_scheduled = 0;     /* nb de jours avant l'échéance pour prévenir */
     execute_scheduled_of_month = FALSE;
     balances_with_scheduled = TRUE;
@@ -1260,26 +1297,26 @@
     conf.transactions_list_sort_by_value_date = 1;  /* Options for sorting by value date */  
     etat.show_closed_accounts = FALSE;
 
-    if (etat.font_string)
+    if ( conf.font_string )
     {
-    g_free (etat.font_string);
-    etat.font_string = NULL;
+    g_free ( conf.font_string );
+    conf.font_string = NULL;
     }
     
-    etat.force_enregistrement = 1;     /* par défaut, on force l'enregistrement */
+    conf.force_enregistrement = 1;     /* par défaut, on force l'enregistrement */
     gsb_file_update_last_path (g_get_home_dir ());
     gsb_file_set_backup_path (my_get_XDG_grisbi_data_dir ());
-    etat.make_backup = 1;       /* on force aussi le backup pbiava le 24/01/2009*/
-    etat.make_backup_every_minutes = FALSE;
-    etat.make_backup_nb_minutes = 0;
+    conf.make_backup = 1;
+    conf.make_backup_every_minutes = FALSE;
+    conf.make_backup_nb_minutes = 0;
 
     nb_derniers_fichiers_ouverts = 0;
     nb_max_derniers_fichiers_ouverts = 3;
     tab_noms_derniers_fichiers_ouverts = NULL;
 
     /* no compress by default */
-    etat.compress_file = 0;
-    etat.compress_backup = 0;
+    conf.compress_file = 0;
+    conf.compress_backup = 0;
 
     /* archive data */
     conf.check_for_archival = TRUE;
@@ -1293,31 +1330,31 @@
 
     /* Commands */
     /* TODO dOm : use a copy of string so that we can free it */
-    etat.latex_command = "latex";
-    etat.dvips_command = "dvips";
+    conf.latex_command = "latex";
+    conf.dvips_command = "dvips";
 
 /* mise en conformité avec les recommandations FreeDesktop. */
 #ifndef _WIN32
     if ( g_file_test ( "/usr/bin/firefox", G_FILE_TEST_EXISTS ) )
     {
-    etat.browser_command = g_strdup ( "/usr/bin/firefox" );
+    conf.browser_command = g_strdup ( "/usr/bin/firefox" );
     }
     else if ( g_file_test ( "/usr/bin/iceweasel", G_FILE_TEST_EXISTS ) )
     {
-    etat.browser_command = g_strdup ( "/usr/bin/iceweasel" );
+    conf.browser_command = g_strdup ( "/usr/bin/iceweasel" );
     }
     else if ( g_file_test ( "/usr/bin/opera", G_FILE_TEST_EXISTS ) )
     {
-    etat.browser_command = g_strdup ( "/usr/bin/opera" );
+    conf.browser_command = g_strdup ( "/usr/bin/opera" );
     }
     else if ( g_file_test ( "/usr/bin/mozilla", G_FILE_TEST_EXISTS ) )
     {
-    etat.browser_command = g_strdup ( "/usr/bin/mozilla" );
+    conf.browser_command = g_strdup ( "/usr/bin/mozilla" );
     }
     else
     {
 #endif /* _WIN32 */
-    etat.browser_command = g_strdup (ETAT_WWW_BROWSER);
+    conf.browser_command = g_strdup (ETAT_WWW_BROWSER);
 #ifndef _WIN32
     }
 #endif /* _WIN32 */



More information about the cvs mailing list