[grisbi-cvs] grisbi/src affichage.c, 1.156, 1.157 affichage_liste.c, 1.106, 1.107 barre_outils.c, 1.125, 1.126 etats_config.c, 1.170, 1.171 etats_onglet.c, 1.134, 1.135 gsb_account_property.c, 1.35, 1.36 gsb_archive_config.c, 1.22, 1.23 gsb_assistant_archive.c, 1.31, 1.32 gsb_autofunc.c, 1.21, 1.22 gsb_automem.c, 1.24, 1.25 gsb_bank.c, 1.21, 1.22 gsb_currency_config.c, 1.50, 1.51 gsb_currency_link_config.c, 1.10, 1.11 gsb_data_account.c, 1.71, 1.72 gsb_data_reconcile.c, 1.18, 1.19 gsb_data_reconcile.h, 1.9, 1.10 gsb_debug.c, 1.11, 1.12 gsb_file.c, 1.46, 1.47 gsb_file_load.c, 1.172, 1.173 gsb_file_others.c, 1.24, 1.25 gsb_form.c, 1.120, 1.121 gsb_form_config.c, 1.29, 1.30 gsb_form_widget.c, 1.29, 1.30 gsb_fyear_config.c, 1.22, 1.23 gsb_payment_method.c, 1.15, 1.16 gsb_payment_method_config.c, 1.34, 1.35 gsb_reconcile.c, 1.36, 1.37 gsb_reconcile_config.c, 1.27, 1.28 gsb_reconcile_sort_config.c, 1.9, 1.10 gsb_scheduler.c, 1.23, 1.24 gsb_scheduler_list.c, 1.62, 1.63 gsb_transactions_list.c, 1.160, 1.161 import.c, 1.276, 1.277 menu.c, 1.146, 1.147 met atree.c, 1.134, 1.135 navigation.c, 1.119, 1.120 parametres.c, 1.192, 1.193 tiers_onglet.c, 1.159, 1.160

Pierre Biava pbiava at users.sourceforge.net
Fri May 8 19:21:17 CEST 2009


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

Modified Files:
	affichage.c affichage_liste.c barre_outils.c etats_config.c 
	etats_onglet.c gsb_account_property.c gsb_archive_config.c 
	gsb_assistant_archive.c gsb_autofunc.c gsb_automem.c 
	gsb_bank.c gsb_currency_config.c gsb_currency_link_config.c 
	gsb_data_account.c gsb_data_reconcile.c gsb_data_reconcile.h 
	gsb_debug.c gsb_file.c gsb_file_load.c gsb_file_others.c 
	gsb_form.c gsb_form_config.c gsb_form_widget.c 
	gsb_fyear_config.c gsb_payment_method.c 
	gsb_payment_method_config.c gsb_reconcile.c 
	gsb_reconcile_config.c gsb_reconcile_sort_config.c 
	gsb_scheduler.c gsb_scheduler_list.c gsb_transactions_list.c 
	import.c menu.c metatree.c navigation.c parametres.c 
	tiers_onglet.c 
Log Message:
Test Optimization

Index: gsb_currency_link_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_currency_link_config.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- gsb_currency_link_config.c	21 Oct 2008 08:05:18 -0000	1.10
+++ gsb_currency_link_config.c	8 May 2009 17:21:15 -0000	1.11
@@ -37,6 +37,7 @@
 #include "./traitement_variables.h"
 #include "./utils.h"
 #include "./include.h"
+#include "./structures.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -529,7 +530,8 @@
     else
 	gtk_widget_hide (label);
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -565,7 +567,8 @@
 					   &iter );
     gtk_tree_selection_select_iter ( gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)),
 				     &iter );
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -600,7 +603,8 @@
 	gtk_widget_set_sensitive ( GTK_WIDGET ( g_object_get_data ( G_OBJECT (model),
 								    "hbox_line")),
 				   FALSE );
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     return FALSE;
 }

Index: gsb_form_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_config.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- gsb_form_config.c	27 Apr 2009 19:41:03 -0000	1.29
+++ gsb_form_config.c	8 May 2009 17:21:15 -0000	1.30
@@ -839,7 +839,8 @@
     gsb_form_config_fill_store (account_number);
     gsb_form_fill_from_account (account_number);
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -959,7 +960,8 @@
 	    }
     }
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     /* update the form if needed */
     if ( !etat.formulaire_distinct_par_compte
@@ -997,7 +999,8 @@
     gsb_form_config_fill_store (account_number);
     gsb_form_create_widgets ();
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1072,7 +1075,8 @@
     gsb_form_config_fill_store (account_number);
     gsb_form_create_widgets ();
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1110,7 +1114,8 @@
 
     /* show the result */
     gsb_form_config_realized ( form_config_tree_view, NULL );
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1191,7 +1196,8 @@
 
     /* fill the list */
     gsb_form_config_realized ( form_config_tree_view, NULL );
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1375,7 +1381,8 @@
     gsb_form_config_fill_store (account_number);
     gsb_form_fill_from_account (account_number);
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return (FALSE);
 }
 

Index: gsb_scheduler_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_scheduler_list.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- gsb_scheduler_list.c	27 Apr 2009 19:41:03 -0000	1.62
+++ gsb_scheduler_list.c	8 May 2009 17:21:15 -0000	1.63
@@ -1719,7 +1719,8 @@
     gsb_calendar_update ();
     mise_a_jour_liste_echeances_manuelles_accueil = 1;
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -1756,7 +1757,8 @@
     gsb_scheduler_list_set_background_color (gsb_scheduler_list_get_tree_view ());
     gsb_scheduler_list_select (-1);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1894,7 +1896,8 @@
 	for (i=0 ; i<SCHEDULER_COL_VISIBLE_COLUMNS ; i++)
 	    if (gtk_tree_view_column_get_width (scheduler_list_column[i]))
 		scheduler_col_width[i] = (gtk_tree_view_column_get_width (scheduler_list_column[i]) * 100) / allocation -> width + 1;
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
 	return FALSE;
     }

Index: gsb_reconcile_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_reconcile_config.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- gsb_reconcile_config.c	27 Apr 2009 19:41:03 -0000	1.27
+++ gsb_reconcile_config.c	8 May 2009 17:21:15 -0000	1.28
@@ -532,7 +532,8 @@
 		/* update the last statement for that account */
 		gsb_navigation_update_statement_label (account_number);
 	    }
-	    modification_fichier (TRUE);
+	    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 	}
     }
 

Index: gsb_reconcile_sort_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_reconcile_sort_config.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- gsb_reconcile_sort_config.c	7 Jan 2009 21:18:55 -0000	1.9
+++ gsb_reconcile_sort_config.c	8 May 2009 17:21:15 -0000	1.10
@@ -37,6 +37,7 @@
 #include "./utils.h"
 #include "./gsb_data_payment.h"
 #include "./include.h"
+#include "./structures.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -587,7 +588,8 @@
 	gtk_tree_view_collapse_row ( GTK_TREE_VIEW(tree_view), treepath );
 
     gtk_tree_path_free ( treepath );
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -659,7 +661,8 @@
     }
     g_slist_free (sorted_list_copy);
     gsb_reconcile_sort_config_fill ();
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 

Index: metatree.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/metatree.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- metatree.c	27 Apr 2009 19:41:03 -0000	1.134
+++ metatree.c	8 May 2009 17:21:15 -0000	1.135
@@ -48,6 +48,7 @@
 #include "./gsb_data_transaction.h"
 #include "./include.h"
 #include "./erreur.h"
+#include "./structures.h"
 /*END_INCLUDE*/
 
 
@@ -515,7 +516,8 @@
 
     metatree_fill_new_division ( iface, model, div_id );
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 
@@ -585,7 +587,8 @@
 
     metatree_fill_new_sub_division ( iface, model, div_id, sub_div_id );
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 
@@ -661,7 +664,8 @@
 
 	metatree_new_sub_division ( model, div_id );
 			     
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
 	gtk_tree_path_free ( path );
     }
@@ -868,7 +872,8 @@
     iface -> remove_div ( no_division ); 
 
     metatree_remove_iter_and_select_next ( tree_view, model, &iter );
-    modification_fichier(TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     
     return FALSE;
 }
@@ -1013,7 +1018,8 @@
 	if ( it )
 	    fill_division_row ( model, iface, it, division );
 
-    modification_fichier(TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 
@@ -1063,7 +1069,8 @@
 	fill_division_row ( model, iface, it, division );
     
     metatree_remove_iter_and_select_next ( tree_view, model, &iter );
-    modification_fichier(TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 
@@ -1469,7 +1476,8 @@
     }
 
     /* We did some modifications */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 /**
@@ -1568,7 +1576,8 @@
     fill_sub_division_row ( model, iface, &iter, 
 			    no_dest_division, no_dest_sub_division );
     gtk_tree_iter_free (iter_parent);
-    modification_fichier(TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 /**
@@ -2676,7 +2685,8 @@
     }
 
     /* We did some modifications */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 /* Local Variables: */
 /* c-basic-offset: 4 */

Index: gsb_file_others.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_others.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- gsb_file_others.c	12 Sep 2008 09:01:27 -0000	1.24
+++ gsb_file_others.c	8 May 2009 17:21:15 -0000	1.25
@@ -540,7 +540,8 @@
 	g_free (markup_parser);
 	g_free (file_content);
 
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     else
     {

Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- navigation.c	8 May 2009 09:35:11 -0000	1.119
+++ navigation.c	8 May 2009 17:21:15 -0000	1.120
@@ -1639,7 +1639,8 @@
 	/* update the order of accounts in first page */
 	mise_a_jour_liste_comptes_accueil = TRUE;
 
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     return FALSE;
 }

Index: etats_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_onglet.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- etats_onglet.c	27 Apr 2009 19:41:03 -0000	1.134
+++ etats_onglet.c	8 May 2009 17:21:15 -0000	1.135
@@ -868,7 +868,8 @@
     gsb_gui_update_gui_to_report ( report_number );
 
     personnalisation_etat ();
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -974,7 +975,8 @@
 
     gsb_gui_unsensitive_report_widgets ();
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
 }
 
@@ -1297,7 +1299,8 @@
     gsb_gui_update_gui_to_report ( report_number );
 
     personnalisation_etat ();
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 

Index: gsb_currency_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_currency_config.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- gsb_currency_config.c	27 Apr 2009 19:41:03 -0000	1.50
+++ gsb_currency_config.c	8 May 2009 17:21:15 -0000	1.51
@@ -744,7 +744,8 @@
 			 CURRENCY_FLOATING_COLUMN,  gsb_data_currency_get_floating_point (currency_number),
 			 -1);
     gsb_currency_update_combobox_currency_list ();
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -905,7 +906,8 @@
     }
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return (FALSE);
 }
 
@@ -1061,7 +1063,8 @@
                 gsb_currency_append_currency_to_list ( GTK_LIST_STORE ( currency_tree_model ),
                                    currency_number );
                 gtk_widget_destroy ( GTK_WIDGET ( dialog ));
-                modification_fichier ( TRUE );
+                if ( etat.modification_fichier == 0 )
+                    modification_fichier ( TRUE );
                 return TRUE;
             }
         }

Index: tiers_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/tiers_onglet.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- tiers_onglet.c	27 Apr 2009 19:41:03 -0000	1.159
+++ tiers_onglet.c	8 May 2009 17:21:15 -0000	1.160
@@ -389,7 +389,8 @@
 				   nb_removed);
 	dialogue (tmpstr);
 	g_free (tmpstr);
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     return FALSE;
 }
@@ -660,7 +661,8 @@
 
     /* update the transactions list */
     transaction_list_update_element (ELEMENT_PARTY);
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -892,7 +894,8 @@
 		}
         dialogue (tmpstr);
         g_free (tmpstr);
-        modification_fichier (TRUE);
+        if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
         /* On sélectionne le nouveau tiers */
         valid = gtk_tree_model_get_iter_first ( GTK_TREE_MODEL (
                     payee_tree_model), &iter );

Index: menu.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/menu.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -d -r1.146 -r1.147
--- menu.c	27 Apr 2009 19:41:03 -0000	1.146
+++ menu.c	8 May 2009 17:21:15 -0000	1.147
@@ -646,7 +646,8 @@
 
     create_account_list ( navigation_model );
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }

Index: barre_outils.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/barre_outils.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- barre_outils.c	27 Apr 2009 19:41:03 -0000	1.125
+++ barre_outils.c	8 May 2009 17:21:15 -0000	1.126
@@ -325,28 +325,32 @@
 											  menu_name ( "ViewMenu", "ShowOneLine", NULL ) ) ), 
 					   TRUE );
 	    gsb_transactions_list_set_visible_rows_number ( demande );
-	    modification_fichier ( TRUE );
+	    if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
 	    break;
 	case 2 :
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (gtk_ui_manager_get_action ( ui_manager, 
 											  menu_name ( "ViewMenu", "ShowTwoLines", NULL ) ) ), 
 					   TRUE );
 	    gsb_transactions_list_set_visible_rows_number ( demande );
-	    modification_fichier ( TRUE );
+	    if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
 	    break;
 	case 3 :
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (gtk_ui_manager_get_action ( ui_manager, 
 											  menu_name ( "ViewMenu", "ShowThreeLines", NULL ) ) ), 
 					   TRUE );
 	    gsb_transactions_list_set_visible_rows_number ( demande );
-	    modification_fichier ( TRUE );
+	    if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
 	    break;
 	case 4 :
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (gtk_ui_manager_get_action ( ui_manager, 
 											  menu_name ( "ViewMenu", "ShowFourLines", NULL ) ) ), 
 					   TRUE );
 	    gsb_transactions_list_set_visible_rows_number ( demande );
-	    modification_fichier ( TRUE );
+	    if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
 	    break;
 
 	case 5 :
@@ -354,7 +358,8 @@
 	    /* ope avec r */
 
 	    mise_a_jour_affichage_r ( 1 );
-	    modification_fichier ( TRUE );
+	    if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
 
 	    block_menu_cb = TRUE;
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (gtk_ui_manager_get_action ( ui_manager, 
@@ -369,7 +374,8 @@
 	    /* ope sans r */
 
 	    mise_a_jour_affichage_r ( 0 );
-	    modification_fichier ( TRUE );
+	    if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
 
 	    block_menu_cb = TRUE;
 	    gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (gtk_ui_manager_get_action ( ui_manager, 

Index: etats_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_config.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -d -r1.170 -r1.171
--- etats_config.c	27 Apr 2009 19:41:03 -0000	1.170
+++ etats_config.c	8 May 2009 17:21:15 -0000	1.171
@@ -1898,8 +1898,8 @@
     /* update the payee combofix in the form, to add that report if asked */
     gsb_payee_update_combofix ();
 
-    modification_fichier ( TRUE );
-
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     /* on réaffiche l'état */
 
     rafraichissement_etat ( gsb_gui_navigation_get_current_report ());

Index: gsb_fyear_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_fyear_config.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- gsb_fyear_config.c	7 Jan 2009 21:18:55 -0000	1.22
+++ gsb_fyear_config.c	8 May 2009 17:21:15 -0000	1.23
@@ -551,7 +551,8 @@
 			  FYEAR_INVALID_COLUMN, invalid,
 			  FYEAR_NUMBER_COLUMN, fyear_number,
 			  -1 );
-     modification_fichier (TRUE);
+     if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
      return FALSE;
 }
 
@@ -647,7 +648,8 @@
 
     /* Update various menus */
     gsb_fyear_update_fyear_list ();
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -738,7 +740,8 @@
 
 	/* Update various menus */
 	gsb_fyear_update_fyear_list ();
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     return FALSE;
 }

Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- gsb_account_property.c	27 Apr 2009 19:41:03 -0000	1.35
+++ gsb_account_property.c	8 May 2009 17:21:15 -0000	1.36
@@ -1070,7 +1070,8 @@
             current_account = gsb_gui_navigation_get_current_account ();
             gsb_data_account_set_bank_account_iban ( current_account, iban );
             gsb_account_property_iban_set_bank_from_iban ( iban );        
-            modification_fichier ( TRUE );
+            if ( etat.modification_fichier == 0 )
+                modification_fichier ( TRUE );
         }
 
         if ( iban && strlen (iban) > 0 )
@@ -1128,7 +1129,8 @@
     {
         gsb_data_account_set_bank_account_iban ( current_account, iban );
         gsb_account_property_iban_set_bank_from_iban ( iban );
-        modification_fichier ( TRUE );
+        if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
     }
 
     if ( iban && strlen (iban) > 0 )

Index: gsb_payment_method.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_payment_method.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- gsb_payment_method.c	18 Mar 2009 21:48:25 -0000	1.15
+++ gsb_payment_method.c	8 May 2009 17:21:15 -0000	1.16
@@ -65,6 +65,7 @@
 						gint account_number,
 						gint exclude )
 {
+    GtkWidget *widget =  NULL;
     GtkListStore *store;
     GSList *tmp_list;
     gint store_filled = 0;
@@ -72,71 +73,80 @@
     if (!combo_box)
 	return FALSE;
 
+    /* on bloque le signal du gtk_combo_box pour éviter de multiples appels */
+    widget = gsb_form_widget_get_widget (TRANSACTION_FORM_TYPE);
+    if ( widget )
+        g_signal_handlers_block_by_func (widget, 
+                        gsb_payment_method_changed_callback, NULL);
+
     /* we check first the existing model ; if none, we create it */
     store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)));
 
     if (store)
-	gtk_list_store_clear (store);
+        gtk_list_store_clear (store);
     else
     {
-	GtkCellRenderer *renderer;
+        GtkCellRenderer *renderer;
 
-	store = gtk_list_store_new ( 2,
-				     G_TYPE_STRING,
-				     G_TYPE_INT );
-	renderer = gtk_cell_renderer_text_new ();
-	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, TRUE);
-	gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer,
-					"text", 0,
-					NULL);
-	gtk_combo_box_set_model ( GTK_COMBO_BOX (combo_box),
-				  GTK_TREE_MODEL (store));
+        store = gtk_list_store_new ( 2,
+                        G_TYPE_STRING,
+                        G_TYPE_INT );
+        renderer = gtk_cell_renderer_text_new ();
+        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, TRUE);
+        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer,
+                        "text", 0,
+                        NULL);
+        gtk_combo_box_set_model ( GTK_COMBO_BOX (combo_box),
+                        GTK_TREE_MODEL (store));
     }
 
     /* we check all the method of payment to find wich of them we want in our store */
     tmp_list = gsb_data_payment_get_payments_list ();
     while (tmp_list)
     {
-	gint payment_number;
-
-	payment_number = gsb_data_payment_get_number (tmp_list -> data);
+        gint payment_number;
 
-	if ( gsb_data_payment_get_account_number (payment_number) == account_number
-	     &&
-	     ( gsb_data_payment_get_sign (payment_number) == sign
-	       ||
-	       gsb_data_payment_get_sign (payment_number) == GSB_PAYMENT_NEUTRAL )
-	     &&
-	     payment_number != exclude )
-	{
-	    GtkTreeIter iter;
+        payment_number = gsb_data_payment_get_number (tmp_list -> data);
 
-	    gtk_list_store_append ( GTK_LIST_STORE (store),
-				    &iter );
-	    gtk_list_store_set ( GTK_LIST_STORE (store),
-				 &iter,
-				 0, gsb_data_payment_get_name (payment_number),
-				 1, payment_number,
-				 -1 );
-	    store_filled = 1;
-	}
-	tmp_list = tmp_list -> next;
+        if ( gsb_data_payment_get_account_number (payment_number) == account_number
+             &&
+             ( gsb_data_payment_get_sign (payment_number) == sign
+               ||
+               gsb_data_payment_get_sign (payment_number) == GSB_PAYMENT_NEUTRAL )
+             &&
+             payment_number != exclude )
+        {
+            GtkTreeIter iter;
+            gtk_list_store_append ( GTK_LIST_STORE (store),
+                        &iter );
+            gtk_list_store_set ( GTK_LIST_STORE (store),
+                        &iter,
+                        0, gsb_data_payment_get_name (payment_number),
+                        1, payment_number,
+                        -1 );
+            store_filled = 1;
+        }
+        tmp_list = tmp_list -> next;
     }
     g_object_set_data ( G_OBJECT (combo_box),
-			"combo_sign",
-			GINT_TO_POINTER (sign));
+                        "combo_sign",
+                        GINT_TO_POINTER (sign));
 
     /* if nothing in the store, hide it */
     if (store_filled)
     {
-	gsb_payment_method_set_combobox_history ( combo_box,
-						  gsb_data_account_get_default_debit (account_number));
-	gtk_widget_show (combo_box);
+        gsb_payment_method_set_combobox_history ( combo_box,
+                        gsb_data_account_get_default_debit (account_number));
+        gtk_widget_show (combo_box);
     }
     else
     {
-	gtk_widget_hide (combo_box);
+        gtk_widget_hide (combo_box);
     }
+    if ( widget )
+        g_signal_handlers_unblock_by_func (widget, 
+                        gsb_payment_method_changed_callback, NULL);
+
     return TRUE;
 }
 
@@ -293,47 +303,44 @@
 {
     gint payment_number;
     GtkWidget *cheque_entry;
-    gint account_number;
 
     devel_debug (NULL);
-    account_number = gsb_form_get_account_number ();
     cheque_entry = gsb_form_widget_get_widget (TRANSACTION_FORM_CHEQUE);
-    if ( !cheque_entry)
-	return FALSE;
+    if ( !cheque_entry )
+        return FALSE;
 
     payment_number = gsb_payment_method_get_selected_number (combo_box);
+    if ( !payment_number )
+        return FALSE;
 
-    if (!payment_number)
-	return FALSE;
-
-    if (gsb_data_payment_get_show_entry (payment_number))
+    if ( gsb_data_payment_get_show_entry ( payment_number) )
     {
-	/* set the next number if needed */
-	if (gsb_data_payment_get_automatic_numbering (payment_number) )
-	{
-        /* pbiava the 03/15/09 fix the bug 493 */
-        if ( gsb_form_widget_check_empty (cheque_entry) )
+        /* set the next number if needed */
+        if (gsb_data_payment_get_automatic_numbering (payment_number) )
         {
-            gsb_form_entry_get_focus (cheque_entry);
-            /* pbiava the 03/15/09 incremente le futur n° de Cheque */
-            gchar* tmpstr = utils_str_itoa (gsb_data_payment_get_last_number (
-                        payment_number) + 1);
-            gtk_entry_set_text ( GTK_ENTRY (cheque_entry), tmpstr);
-            g_free ( tmpstr );
+            /* pbiava the 03/15/09 fix the bug 493 */
+            if ( gsb_form_widget_check_empty (cheque_entry) )
+            {
+                gsb_form_entry_get_focus (cheque_entry);
+                /* pbiava the 03/15/09 incremente le futur n° de Cheque */
+                gchar* tmpstr = utils_str_itoa (gsb_data_payment_get_last_number (
+                            payment_number) + 1);
+                gtk_entry_set_text ( GTK_ENTRY (cheque_entry), tmpstr);
+                g_free ( tmpstr );
+            }
         }
-	}
-	else
-	{
-	    gtk_entry_set_text ( GTK_ENTRY (cheque_entry),
-				 "" );
-	    gsb_form_entry_lose_focus ( cheque_entry,
-					FALSE,
-					GINT_TO_POINTER ( TRANSACTION_FORM_CHEQUE ));
-	}
-	gtk_widget_show (cheque_entry);
+        else
+        {
+            gtk_entry_set_text ( GTK_ENTRY (cheque_entry),
+                     "" );
+            gsb_form_entry_lose_focus ( cheque_entry,
+                        FALSE,
+                        GINT_TO_POINTER ( TRANSACTION_FORM_CHEQUE ));
+        }
+        gtk_widget_show (cheque_entry);
     }
     else
-	gtk_widget_hide (cheque_entry);
+        gtk_widget_hide (cheque_entry);
 
     return FALSE;
 }

Index: gsb_scheduler.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_scheduler.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- gsb_scheduler.c	16 Mar 2009 21:21:12 -0000	1.23
+++ gsb_scheduler.c	8 May 2009 17:21:15 -0000	1.24
@@ -45,6 +45,7 @@
 #include "./utils_str.h"
 #include "./gsb_scheduler_list.h"
 #include "./erreur.h"
+#include "./structures.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -547,7 +548,8 @@
     if ( automatic_transactions_taken )
     {
 	mise_a_jour_liste_echeances_auto_accueil = 1;
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
 
     if ( scheduled_transactions_to_take )

Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- gsb_data_account.c	8 May 2009 09:35:10 -0000	1.71
+++ gsb_data_account.c	8 May 2009 17:21:15 -0000	1.72
@@ -44,6 +44,7 @@
 #include "./gsb_data_transaction.h"
 #include "./include.h"
 #include "./erreur.h"
+#include "./structures.h"
 #include "./gsb_real.h"
 /*END_INCLUDE*/
 
@@ -115,10 +116,10 @@
 
 /*START_STATIC*/
 static  void _gsb_data_account_free ( struct_account* account );
+static gsb_real gsb_data_account_calculate_current_and_marked_balances ( gint account_number );
 static void gsb_data_account_delete_all_accounts (void);
 static struct_account *gsb_data_account_get_structure ( gint no );
 static gint gsb_data_account_max_number ( void );
-static gsb_real gsb_data_account_calculate_current_and_marked_balances ( gint account_number );
 static gboolean gsb_data_account_set_default_sort_values ( gint account_number );
 static gboolean gsb_data_form_dup_sort_values ( gint origin_account,
 					 gint target_account );
@@ -2237,7 +2238,8 @@
 
     g_slist_free (last_list);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return TRUE;
 }

Index: gsb_assistant_archive.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_archive.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- gsb_assistant_archive.c	6 Jan 2009 15:21:01 -0000	1.31
+++ gsb_assistant_archive.c	8 May 2009 17:21:15 -0000	1.32
@@ -794,7 +794,8 @@
     gsb_assistant_sensitive_button_next ( assistant,
 					  TRUE );
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 

Index: gsb_payment_method_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_payment_method_config.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- gsb_payment_method_config.c	27 Apr 2009 19:41:03 -0000	1.34
+++ gsb_payment_method_config.c	8 May 2009 17:21:15 -0000	1.35
@@ -667,7 +667,8 @@
 
     /* clean up */
     gtk_tree_path_free (path);
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1138,7 +1139,8 @@
     gsb_reconcile_sort_config_fill ();
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1232,7 +1234,8 @@
     gtk_tree_store_remove ( GTK_TREE_STORE(model), &iter );
     gsb_data_payment_remove (payment_number);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 

Index: gsb_archive_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_archive_config.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- gsb_archive_config.c	27 Apr 2009 19:41:03 -0000	1.22
+++ gsb_archive_config.c	8 May 2009 17:21:15 -0000	1.23
@@ -476,7 +476,8 @@
 	/* remove from the list */
 	gtk_list_store_remove ( GTK_LIST_STORE (model),
 				&iter );
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     return FALSE;
 }
@@ -586,7 +587,8 @@
 	    transaction_list_set_balances ();
 	}
 	
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     return FALSE;
 }

Index: affichage.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- affichage.c	27 Apr 2009 19:41:03 -0000	1.156
+++ affichage.c	8 May 2009 17:21:15 -0000	1.157
@@ -288,7 +288,8 @@
     else
         gtk_widget_destroy ( logo_accueil );
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return ( FALSE );
 }
@@ -532,7 +533,8 @@
         gtk_container_add ( GTK_CONTAINER(logo_button), preview );
         
         /* Mark file as modified */
-        modification_fichier ( TRUE );
+        if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
     }
 }
 /* **************************************************************************************************************************** */
@@ -634,7 +636,8 @@
     gsb_file_update_window_title();
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }

Index: gsb_automem.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_automem.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- gsb_automem.c	8 Feb 2009 14:49:34 -0000	1.24
+++ gsb_automem.c	8 May 2009 17:21:15 -0000	1.25
@@ -173,7 +173,8 @@
         if ( *data )
 	    g_free ( *data );
 	*data = my_strdup (gtk_entry_get_text ( GTK_ENTRY (entry) ));
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
 
     return FALSE;
@@ -292,7 +293,8 @@
     if (data)
     {
 	*data = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
 
     return FALSE;
@@ -398,7 +400,8 @@
     if (value)
     {
 	*value = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(checkbutton));
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
 
     return FALSE;
@@ -613,7 +616,8 @@
     if (value)
     {
 	*value = GPOINTER_TO_INT (value_ptr);
-	modification_fichier (TRUE);
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     return FALSE;
 }*/
@@ -780,7 +784,8 @@
     if ( data )
     {
 	*data = gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON(spin));
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
 
     return (FALSE);

Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -d -r1.276 -r1.277
--- import.c	8 May 2009 09:35:11 -0000	1.276
+++ import.c	8 May 2009 17:21:15 -0000	1.277
@@ -1444,7 +1444,8 @@
 	dialogue (_("You have just imported reconciled transactions but they not associated with any reconcile number yet. "
 		    "You may associate them with a reconcilation later via the preferences windows."));
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 
@@ -3095,7 +3096,8 @@
 	    mise_a_jour_liste_comptes_accueil = 1;
 	    mise_a_jour_soldes_minimaux = 1;
 
-	    modification_fichier ( TRUE );
+	    if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
 
 	    if ( result != GTK_RESPONSE_OK
 		 &&
@@ -3792,7 +3794,8 @@
 gboolean changement_valeur_echelle_recherche_date_import ( GtkWidget *spin_button )
 {
     valeur_echelle_recherche_date_import = gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON ( spin_button ));
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return ( FALSE );
 }
 
@@ -4030,7 +4033,8 @@
     mise_a_jour_soldes_minimaux = 1;
     mise_a_jour_accueil (FALSE);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -d -r1.172 -r1.173
--- gsb_file_load.c	8 May 2009 09:35:10 -0000	1.172
+++ gsb_file_load.c	8 May 2009 17:21:15 -0000	1.173
@@ -7726,7 +7726,8 @@
 	    /* 	 to set just before the new version */
 	    /* ********************************************************* */
 
-	    modification_fichier ( TRUE );
+	    if ( etat.modification_fichier == 0 )
+            modification_fichier ( TRUE );
 
 	    /* ************************************* */
 	    /* 	    opening 0.6.0                    */

Index: gsb_autofunc.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_autofunc.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- gsb_autofunc.c	27 Apr 2009 19:41:03 -0000	1.21
+++ gsb_autofunc.c	8 May 2009 17:21:15 -0000	1.22
@@ -46,6 +46,7 @@
 #include "./gsb_real.h"
 #include "./traitement_variables.h"
 #include "./utils_str.h"
+#include "./structures.h"
 #include "./gsb_real.h"
 /*END_INCLUDE*/
 
@@ -202,7 +203,8 @@
 		   gtk_entry_get_text ( GTK_ENTRY (entry)));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -337,7 +339,8 @@
 		   gtk_text_buffer_get_text (buffer, &start, &end, 0));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -508,7 +511,8 @@
 		   utils_str_atoi (gtk_entry_get_text ( GTK_ENTRY (entry))));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -640,8 +644,8 @@
 		   gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON (spin_button)));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
-
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -767,7 +771,8 @@
 		   gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -1022,7 +1027,8 @@
 	g_date_free (date);
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -1156,8 +1162,8 @@
 		   gsb_real_get_from_string (gtk_entry_get_text (GTK_ENTRY (entry))));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
-
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1287,8 +1293,8 @@
 		   gsb_combo_box_get_index (combobox));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
-
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1420,7 +1426,8 @@
 		   gsb_currency_get_currency_from_combobox (combobox));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }

Index: gsb_form_widget.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form_widget.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- gsb_form_widget.c	13 Feb 2009 21:28:49 -0000	1.29
+++ gsb_form_widget.c	8 May 2009 17:21:15 -0000	1.30
@@ -95,47 +95,43 @@
     devel_debug (NULL);
 
     if (!form_list_widgets)
-	return FALSE;
+        return FALSE;
 
     tmp_list = form_list_widgets;
     while (tmp_list)
     {
-	struct_element *element;
-
-	element = tmp_list -> data;
+        struct_element *element;
 
+        element = tmp_list -> data;
 
-	if (! element )
-		continue;
+        if (! element )
+            continue;
 	
-	/* just to make sure... */
-	if ( element -> element_widget ) 
-	{
-	    if (GTK_IS_WIDGET (element -> element_widget))
-	    {
-		    /* if there is something in the combofix we destroy, the popup will
-		     * be showed because destroying the gtk_entry will erase it directly,
-		     * so the simpliest way to avoid that is to erase now the entry, but with
-		     * gtk_combofix_set_text [cedric] (didn't succeed with another thing...) */
-		    if (GTK_IS_COMBOFIX (element -> element_widget))
-			gtk_combofix_set_text ( GTK_COMBOFIX (element -> element_widget),
-						"" );
-
-		    gtk_widget_destroy (element -> element_widget);
-		    element -> element_widget = NULL;
-	    } 
-        //~ else 
-        //~ {
-	        //~ /* if element_widget is not an object, how to free memory used by it ? */
-	        //~ alert_debug("element_widget is not a widget");
-	    //~ }
-	} 
-    else 
-    {
-		alert_debug ("element_widget is NULL\n");
-	}
-	g_free (element);
-	tmp_list = tmp_list -> next;
+        /* just to make sure... */
+        if ( element -> element_widget ) 
+        {
+            if (GTK_IS_WIDGET (element -> element_widget))
+            {
+                /* if there is something in the combofix we destroy, the popup will
+                 * be showed because destroying the gtk_entry will erase it directly,
+                 * so the simpliest way to avoid that is to erase now the entry, but with
+                 * gtk_combofix_set_text [cedric] (didn't succeed with another thing...) */
+                if (GTK_IS_COMBOFIX (element -> element_widget))
+                {
+                    g_signal_handlers_block_by_func ( element -> element_widget,
+                        gsb_payment_method_changed_callback, NULL );
+                    gtk_combofix_set_text ( GTK_COMBOFIX (element -> element_widget), "" );
+                }
+                gtk_widget_destroy (element -> element_widget);
+                element -> element_widget = NULL;
+            }
+        }
+        else 
+        {
+            alert_debug ("element_widget is NULL\n");
+        }
+        g_free (element);
+        tmp_list = tmp_list -> next;
     }
     g_slist_free (form_list_widgets);
     form_list_widgets = NULL;
@@ -235,17 +231,16 @@
 
 	case TRANSACTION_FORM_TYPE:
 	    widget = gtk_combo_box_new ();
-	    g_signal_connect ( G_OBJECT (widget),
-			       "changed",
-			       G_CALLBACK (gsb_payment_method_changed_callback),
-			       NULL );
 	    gsb_payment_method_create_combo_list ( widget,
-						   GSB_PAYMENT_DEBIT,
-						   account_number, 0 );
-	    gtk_combo_box_set_active ( GTK_COMBO_BOX (widget),
-				       0 );
+                        GSB_PAYMENT_DEBIT,
+                        account_number, 0 );
+	    gtk_combo_box_set_active ( GTK_COMBO_BOX (widget), 0 );
 	    gtk_widget_set_tooltip_text ( GTK_WIDGET (widget),
-					  SPACIFY(_("Choose the method of payment")));
+                        SPACIFY(_("Choose the method of payment")));
+        g_signal_connect ( G_OBJECT (widget),
+                        "changed",
+                        G_CALLBACK (gsb_payment_method_changed_callback),
+                        NULL );
 	    break;
 
 	case TRANSACTION_FORM_DEVISE:

Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- gsb_file.c	8 May 2009 09:35:10 -0000	1.46
+++ gsb_file.c	8 May 2009 17:21:15 -0000	1.47
@@ -149,7 +149,8 @@
     mise_a_jour_accueil ( TRUE );
     gsb_gui_navigation_set_selection ( GSB_HOME_PAGE, -1, NULL );
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -560,7 +561,7 @@
 
 	/* update variables */
 	etat.fichier_deja_ouvert = 0;
-	modification_fichier ( FALSE );
+    modification_fichier ( FALSE );
 	gsb_file_update_window_title ();
 	gsb_file_append_name_to_opened_list ( nom_fichier_comptes );
     }

Index: parametres.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parametres.c,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -d -r1.192 -r1.193
--- parametres.c	27 Apr 2009 19:41:03 -0000	1.192
+++ parametres.c	8 May 2009 17:21:15 -0000	1.193
@@ -845,7 +845,8 @@
     if (path && strlen (path) > 0)
         g_free (path);
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }

Index: affichage_liste.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage_liste.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- affichage_liste.c	27 Apr 2009 19:41:03 -0000	1.106
+++ affichage_liste.c	8 May 2009 17:21:15 -0000	1.107
@@ -225,7 +225,8 @@
     /* update the visible account */
     gsb_transactions_list_update_tree_view (gsb_gui_navigation_get_current_account (), TRUE);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -d -r1.160 -r1.161
--- gsb_transactions_list.c	8 May 2009 09:35:10 -0000	1.160
+++ gsb_transactions_list.c	8 May 2009 17:21:15 -0000	1.161
@@ -1346,11 +1346,13 @@
 						      new_selected_transaction);
 
     /* show the content of the transaction in the form,
-     * only if the form is shown */
-    if (etat.show_transaction_selected_in_form
+     * only if the form is shown and not a white line */
+    if ( etat.show_transaction_selected_in_form
 	&&
-	gsb_form_is_visible ())
-	gsb_form_fill_by_transaction (new_selected_transaction, TRUE, FALSE);
+	gsb_form_is_visible ()
+    &&
+    new_selected_transaction != -1 )
+        gsb_form_fill_by_transaction (new_selected_transaction, TRUE, FALSE);
 
     /* give the focus to the transaction_tree_view pbiava 02/09/2009 
      * edit due to a regression loss of <CtrlR> */
@@ -1486,7 +1488,8 @@
     /* need to update the marked amount on the home page */
     mise_a_jour_liste_comptes_accueil = 1;
 
-    modification_fichier( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -1633,7 +1636,8 @@
     /* need to update the marked amount on the home page */
     mise_a_jour_liste_comptes_accueil = 1;
 
-    modification_fichier( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -1930,7 +1934,8 @@
     if (show_warning)
 	gsb_form_escape_form ();
 
-    modification_fichier( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return TRUE;
 }
 
@@ -2264,7 +2269,8 @@
     /* now we can update the element */
     transaction_list_update_element (element);
     update_titres_tree_view ();
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -2336,7 +2342,8 @@
 
     gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -2364,7 +2371,8 @@
     transaction_list_select (new_transaction_number);
     gsb_transactions_list_edit_transaction (new_transaction_number);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -2470,7 +2478,8 @@
 	g_free (string);
 	mise_a_jour_accueil (FALSE);
 
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
     return FALSE;
 }
@@ -2510,7 +2519,8 @@
 	gsb_gui_headings_update_suffix (string);
 	g_free (string);
 
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
 }
 
@@ -2600,7 +2610,8 @@
     gsb_scheduler_list_select (scheduled_number);
     gsb_scheduler_list_edit_transaction (scheduled_number);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 }
 
 
@@ -3042,7 +3053,8 @@
     transaction_list_set_balances ();
     transaction_list_select (selected_transaction);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 

Index: gsb_form.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- gsb_form.c	8 May 2009 09:35:10 -0000	1.120
+++ gsb_form.c	8 May 2009 17:21:15 -0000	1.121
@@ -2448,7 +2448,8 @@
     /* give the focus to the navigation_tree_view pbiava 02/08/2009 */
     gtk_widget_grab_focus (navigation_tree_view);
 
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 

Index: gsb_reconcile.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_reconcile.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- gsb_reconcile.c	8 May 2009 09:35:10 -0000	1.36
+++ gsb_reconcile.c	8 May 2009 17:21:15 -0000	1.37
@@ -609,8 +609,8 @@
     /* go back to the normal transactions list */
     gsb_reconcile_cancel (NULL, NULL);
 
-    modification_fichier( TRUE );
-
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 

Index: gsb_debug.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_debug.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- gsb_debug.c	27 Apr 2009 19:41:03 -0000	1.11
+++ gsb_debug.c	8 May 2009 17:21:15 -0000	1.12
@@ -329,7 +329,8 @@
 
     if ( fix () )
     {
-	modification_fichier ( TRUE );	
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 	dialogue_hint ( _("Grisbi successfully repaired this account file.  "
 			  "You may now save your modifications."),
 			_("Fix completed"));

Index: gsb_data_reconcile.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_reconcile.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- gsb_data_reconcile.c	8 May 2009 09:35:10 -0000	1.18
+++ gsb_data_reconcile.c	8 May 2009 17:21:15 -0000	1.19
@@ -59,7 +59,7 @@
 /*START_STATIC*/
 static  void _gsb_data_reconcile_free ( struct_reconcile *reconcile );
 static gint gsb_data_reconcile_cmp_int (struct_reconcile *reconcile_1,
-                                 struct_reconcile *reconcile_2);
+                        struct_reconcile *reconcile_2);
 static gpointer gsb_data_reconcile_get_structure ( gint reconcile_number );
 static gint gsb_data_reconcile_max_number ( void );
 /*END_STATIC*/
@@ -305,7 +305,7 @@
  * \return the new number or 0 if the reconcile doen't exist
  * */
 gint gsb_data_reconcile_set_new_number ( gint reconcile_number,
-					 gint new_no_reconcile )
+                        gint new_no_reconcile )
 {
     struct_reconcile *reconcile;
 
@@ -349,7 +349,7 @@
  * \return TRUE if ok or FALSE if problem
  * */
 gboolean gsb_data_reconcile_set_name ( gint reconcile_number,
-				       const gchar *name )
+                        const gchar *name )
 {
     struct_reconcile *reconcile;
 
@@ -434,7 +434,7 @@
  * \return TRUE if ok or FALSE if problem
  * */
 gboolean gsb_data_reconcile_set_account ( gint reconcile_number,
-					  gint account_number )
+                        gint account_number )
 {
     struct_reconcile *reconcile;
 
@@ -530,7 +530,7 @@
  * \return TRUE if ok or FALSE if problem
  * */
 gboolean gsb_data_reconcile_set_final_date ( gint reconcile_number,
-					     const GDate *date )
+                        const GDate *date )
 {
     struct_reconcile *reconcile;
 
@@ -671,7 +671,7 @@
  * \return the number of the found reconcile or 0 if not found
  * */
 gint gsb_data_reconcile_get_number_by_date ( const GDate *date,
-					     gint account_number )
+                        gint account_number )
 {
     GList *tmp_list;
 
@@ -752,7 +752,7 @@
  * \return 0 -1 1 comme strcmp
  * */
 gint gsb_data_reconcile_cmp_int (struct_reconcile *reconcile_1,
-                                 struct_reconcile *reconcile_2)
+                        struct_reconcile *reconcile_2)
 {
     if ( ! reconcile_1 -> reconcile_final_date )
         return -1;

Index: gsb_data_reconcile.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_reconcile.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- gsb_data_reconcile.h	8 May 2009 09:35:10 -0000	1.9
+++ gsb_data_reconcile.h	8 May 2009 17:21:15 -0000	1.10
@@ -16,7 +16,7 @@
 const gchar *gsb_data_reconcile_get_name ( gint reconcile_number );
 gint gsb_data_reconcile_get_no_reconcile ( gpointer reconcile_ptr );
 gint gsb_data_reconcile_get_number_by_date ( const GDate *date,
-					     gint account_number );
+                        gint account_number );
 gint gsb_data_reconcile_get_number_by_name ( const gchar *name );
 GList *gsb_data_reconcile_get_reconcile_list ( void );
 GList *gsb_data_reconcile_get_sort_reconcile_list ( gint account_number );
@@ -24,18 +24,18 @@
 gint gsb_data_reconcile_new ( const gchar *name );
 gboolean gsb_data_reconcile_remove ( gint reconcile_number );
 gboolean gsb_data_reconcile_set_account ( gint reconcile_number,
-					  gint account_number );
+                        gint account_number );
 gboolean gsb_data_reconcile_set_final_balance ( gint reconcile_number,
 						gsb_real amount );
 gboolean gsb_data_reconcile_set_final_date ( gint reconcile_number,
-					     const GDate *date );
+                        const GDate *date );
 gboolean gsb_data_reconcile_set_init_balance ( gint reconcile_number,
 					       gsb_real amount );
 gboolean gsb_data_reconcile_set_init_date ( gint reconcile_number,
 					    const GDate *date );
 gboolean gsb_data_reconcile_set_name ( gint reconcile_number,
-				       const gchar *name );
+                        const gchar *name );
 gint gsb_data_reconcile_set_new_number ( gint reconcile_number,
-					 gint new_no_reconcile );
+                        gint new_no_reconcile );
 /* END_DECLARATION */
 #endif

Index: gsb_bank.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_bank.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- gsb_bank.c	27 Apr 2009 19:41:03 -0000	1.21
+++ gsb_bank.c	8 May 2009 17:21:15 -0000	1.22
@@ -298,7 +298,8 @@
 		   gsb_bank_list_get_bank_number (combobox));
 
     /* Mark file as modified */
-    modification_fichier ( TRUE );
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
 
     return FALSE;
 }
@@ -1136,7 +1137,8 @@
 	gsb_bank_edit_bank (bank_number, button);
     }
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 
@@ -1211,13 +1213,15 @@
 	gtk_list_store_remove ( GTK_LIST_STORE (model),
 				&iter );
 	gsb_data_bank_remove (bank_number);
-	modification_fichier ( TRUE );
+	if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     }
 
     /* remove the bank from the combobox list */
     gsb_bank_update_selected_line_model (NULL);
 
-    modification_fichier (TRUE);
+    if ( etat.modification_fichier == 0 )
+        modification_fichier ( TRUE );
     return FALSE;
 }
 



More information about the cvs mailing list