[grisbi-cvs] grisbi/src gsb_data_account.h, 1.36, 1.37 gsb_data_account_cunit.c, 1.1, 1.2 gsb_file_config.c, 1.75, 1.76 gsb_file_load.c, 1.176, 1.177 gsb_file_save.c, 1.125, 1.126 gsb_file_save.h, 1.6, 1.7 main.c, 1.146, 1.147 main_cunit.c, 1.2, 1.3 parametres.c, 1.194, 1.195 utils_files.c, 1.40, 1.41 utils_files.h, 1.22, 1.23 utils_str.c, 1.64, 1.65 utils_str.h, 1.41, 1.42

Pierre Biava pbiava at users.sourceforge.net
Sat May 23 21:25:12 CEST 2009


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

Modified Files:
	gsb_data_account.h gsb_data_account_cunit.c gsb_file_config.c 
	gsb_file_load.c gsb_file_save.c gsb_file_save.h main.c 
	main_cunit.c parametres.c utils_files.c utils_files.h 
	utils_str.c utils_str.h 
Log Message:
Added the copy of an older version of grisbi upon importation + make update-po + mk_include

Index: gsb_file_save.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gsb_file_save.h	15 Apr 2007 09:13:12 -0000	1.6
+++ gsb_file_save.h	23 May 2009 19:25:10 -0000	1.7
@@ -8,22 +8,22 @@
 
 /* START_DECLARATION */
 gulong gsb_file_save_append_part ( gulong iterator,
-				   gulong *length_calculated,
-				   gchar **file_content,
-				   gchar *new_string );
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gchar *new_string );
 gulong gsb_file_save_budgetary_part ( gulong iterator,
-				      gulong *length_calculated,
-				      gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 gulong gsb_file_save_category_part ( gulong iterator,
-				     gulong *length_calculated,
-				     gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 gulong gsb_file_save_report_part ( gulong iterator,
-				   gulong *length_calculated,
-				   gchar **file_content,
-				   gboolean current_report );
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gboolean current_report );
 gboolean gsb_file_save_save_file ( const gchar *filename,
-				   gboolean compress,
-				   gint archive_number );
+                        gboolean compress,
+                        gint archive_number );
 /* END_DECLARATION */
 
 #endif

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -d -r1.176 -r1.177
--- gsb_file_load.c	21 May 2009 21:58:55 -0000	1.176
+++ gsb_file_load.c	23 May 2009 19:25:10 -0000	1.177
@@ -59,6 +59,7 @@
 #include "./gsb_select_icon.h"
 #include "./utils_str.h"
 #include "./traitement_variables.h"
+#include "./utils_files.h"
 #include "./custom_list.h"
 #include "./gsb_data_account.h"
 #include "./gsb_data_form.h"
@@ -86,6 +87,7 @@
 static gboolean gsb_file_load_check_new_structure ( gchar *file_content );
 static void gsb_file_load_color_part ( const gchar **attribute_names,
                         const gchar **attribute_values );
[...11799 lines suppressed...]
+gboolean gsb_file_load_copy_old_file_and_glib ( gchar *filename, gchar *file_content)
+{
+    if ( g_str_has_suffix (filename, ".gsb" ) )
+    {
+        GError * error = NULL;
+
+        copy_old_filename = g_path_get_basename ( filename );
+        copy_old_filename = gsb_string_remplace_string ( copy_old_filename, ".gsb",
+                        "-old-version.gsb" );
+        copy_old_filename = g_build_filename ( G_DIR_SEPARATOR_S, 
+                        my_get_XDG_grisbi_data_dir (),
+                        copy_old_filename, NULL );
+        if ( ! g_file_set_contents ( copy_old_filename, file_content,-1, &error ) )
+            dialogue_error (error -> message );
+    }
+    return TRUE;
+}
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: main_cunit.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main_cunit.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- main_cunit.c	23 May 2009 15:47:31 -0000	1.2
+++ main_cunit.c	23 May 2009 19:25:10 -0000	1.3
@@ -40,9 +40,10 @@
 #include "include.h"
 
 /*START_INCLUDE*/
-#include "gsb_data_account_cunit.h"
-#include "gsb_real_cunit.h"
-#include "utils_dates_cunit.h"
+#include "main_cunit.h"
+#include "./gsb_data_account_cunit.h"
+#include "./gsb_real_cunit.h"
+#include "./utils_dates_cunit.h"
 /*END_INCLUDE*/
 
 #endif/*HAVE_CUNIT*/
@@ -75,7 +76,7 @@
 #ifdef _WIN32
     CU_automated_run_tests();
 #else//_WIN32
-	CU_basic_run_tests();
+    CU_basic_run_tests();
 #endif//_WIN32
     CU_cleanup_registry();
     return CU_get_error();

Index: parametres.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parametres.c,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -d -r1.194 -r1.195
--- parametres.c	10 May 2009 13:06:56 -0000	1.194
+++ parametres.c	23 May 2009 19:25:10 -0000	1.195
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	          */
-/*			2003-2009 Benjamin Drieu (bdrieu at april.org)	                      */
-/* 			http://www.grisbi.org				                              */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2009 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -731,51 +731,42 @@
 					   &(etat.compress_backup), NULL, NULL );
     g_signal_connect ( G_OBJECT (button ), "destroy",
 		       G_CALLBACK ( gtk_widget_destroyed), &button );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button,
-			 FALSE, FALSE, 0 );
+    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);
     g_signal_connect ( G_OBJECT (button ), "destroy",
 		       G_CALLBACK ( gtk_widget_destroyed), &button );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button,
-			 FALSE, FALSE, 0 );
+    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);
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button,
-			 FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), button, FALSE, FALSE, 0 );
 
     /* Automatic backup every x minutes */
     hbox = gtk_hbox_new ( FALSE, 6);
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox,
-			 FALSE, FALSE, 0);
+    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,
 					  G_CALLBACK (gsb_file_automatic_backup_start), NULL);
-    gtk_box_pack_start ( GTK_BOX (hbox), button,
-			 FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX (hbox), button, FALSE, FALSE, 0 );
 
     button = gsb_automem_spin_button_new ( &etat.make_backup_nb_minutes,
 					   G_CALLBACK (gsb_file_automatic_backup_change_time), NULL );
-    gtk_box_pack_start ( GTK_BOX (hbox), button,
-			 FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX (hbox), button, FALSE, FALSE, 0 );
 
     label = gtk_label_new (_(" minutes"));
-    gtk_box_pack_start ( GTK_BOX (hbox), label,
-			 FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX (hbox), label, FALSE, FALSE, 0 );
 
     /* if automatic backup, choose a dir */
     hbox = gtk_hbox_new ( FALSE, 6 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox,
-			 FALSE, FALSE, 0);
+    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0);
 
     label = gtk_label_new ( COLON(_("Backup directory")) );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), label,
-			 FALSE, FALSE, 0);
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0);
 
     /* on passe par une fonction intermédiaire pour pallier à un bug
      * du gtk_file_chooser_button_new qui donne le répertoire home
@@ -790,9 +781,9 @@
         gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER (button),
                         my_get_XDG_grisbi_data_dir () );
     g_signal_connect ( G_OBJECT (button),
-		       "selection-changed",
-		       G_CALLBACK ( gsb_config_backup_dir_chosen ),
-		       dialog );
+                        "selection-changed",
+                        G_CALLBACK ( gsb_config_backup_dir_chosen ),
+                        dialog );
     gtk_box_pack_start ( GTK_BOX ( hbox ), button,
 			 FALSE, TRUE, 0);
 

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- gsb_file_save.c	2 May 2009 15:39:15 -0000	1.125
+++ gsb_file_save.c	23 May 2009 19:25:10 -0000	1.126
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	          */
-/*			2003-2009 Benjamin Drieu (bdrieu at april.org)	                      */
-/* 			http://www.grisbi.org				                              */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2009 Benjamin Drieu (bdrieu at april.org)	                      */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -70,57 +70,58 @@
 
 /*START_STATIC*/
 static gulong gsb_file_save_account_part ( gulong iterator,
-				    gulong *length_calculated,
-				    gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_archive_part ( gulong iterator,
-				    gulong *length_calculated,
-				    gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_bank_part ( gulong iterator,
-				 gulong *length_calculated,
-				 gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_color_part ( gulong iterator,
-				  gulong *length_calculated,
-				  gchar **file_content,
-				  gint archive_number );
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gint archive_number );
 static gulong gsb_file_save_currency_link_part ( gulong iterator,
-					  gulong *length_calculated,
-					  gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_currency_part ( gulong iterator,
-				     gulong *length_calculated,
-				     gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_financial_year_part ( gulong iterator,
-					   gulong *length_calculated,
-					   gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_general_part ( gulong iterator,
-				    gulong *length_calculated,
-				    gchar **file_content,
-				    gint archive_number );
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gint archive_number );
 static gulong gsb_file_save_import_rule_part ( gulong iterator,
-					gulong *length_calculated,
-					gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_logo_part ( gulong iterator,
-					gulong *length_calculated,
-					gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_party_part ( gulong iterator,
                         gulong *length_calculated,
                         gchar **file_content );
 static gulong gsb_file_save_payment_part ( gulong iterator,
-				    gulong *length_calculated,
-				    gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
 static gulong gsb_file_save_print_part ( gulong iterator,
-				  gulong *length_calculated,
-				  gchar **file_content,
-				  gint archive_number );
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gint archive_number );
 static gulong gsb_file_save_reconcile_part ( gulong iterator,
-				      gulong *length_calculated,
-				      gchar **file_content );
+                        gulong *length_calculated,
+                        gchar **file_content );
+static void gsb_file_save_remove_old_file ( gchar *filename );
 static gulong gsb_file_save_scheduled_part ( gulong iterator,
                         gulong *length_calculated,
                         gchar **file_content );
 static gulong gsb_file_save_transaction_part ( gulong iterator,
-					gulong *length_calculated,
-					gchar **file_content,
-					gint archive_number );
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gint archive_number );
 /*END_STATIC*/
 
 
@@ -131,6 +132,7 @@
 extern gint affichage_echeances_perso_nb_libre;
 extern GdkColor archive_background_color;
 extern GdkColor calendar_entry_color;
+extern gchar *copy_old_filename;
 extern GdkColor couleur_fond[2];
 extern GdkColor couleur_grise;
 extern GdkColor couleur_selection;
@@ -147,6 +149,7 @@
 extern gchar *titre_fichier;
 extern gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
 extern gint valeur_echelle_recherche_date_import;
+extern GtkWidget *window;
 /*END_EXTERN*/
 
 
@@ -167,8 +170,8 @@
  * \return TRUE : ok, FALSE : problem
  * */
 gboolean gsb_file_save_save_file ( const gchar *filename,
-				   gboolean compress,
-				   gint archive_number )
+                        gboolean compress,
+                        gint archive_number )
 {
     gint do_chmod;
     gulong iterator;
@@ -438,6 +441,12 @@
 		    S_IRUSR | S_IWUSR );
     }
 
+    /* Si le fichier est un d'une version précédente de grisbi on demande si on l'efface */
+    if ( copy_old_filename && strlen ( copy_old_filename ) > 0 )
+    {
+        gsb_file_save_remove_old_file ( copy_old_filename );
+    }
+
     etat.en_train_de_sauvegarder = 0;
 
     return ( TRUE );
@@ -457,9 +466,9 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_append_part ( gulong iterator,
-				   gulong *length_calculated,
-				   gchar **file_content,
-				   gchar *new_string )
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gchar *new_string )
 {
     if ( !new_string )
 	return iterator;
@@ -497,9 +506,9 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_general_part ( gulong iterator,
-				    gulong *length_calculated,
-				    gchar **file_content,
-				    gint archive_number )
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gint archive_number )
 {
     gchar *first_string_to_free;
     gchar *second_string_to_free;
@@ -680,9 +689,9 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_color_part ( gulong iterator,
-				  gulong *length_calculated,
-				  gchar **file_content,
-				  gint archive_number )
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gint archive_number )
 {
     gchar *new_string;
 
@@ -763,9 +772,9 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_print_part ( gulong iterator,
-				  gulong *length_calculated,
-				  gchar **file_content,
-				  gint archive_number )
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gint archive_number )
 {
     gchar *new_string;
 
@@ -816,8 +825,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_account_part ( gulong iterator,
-				    gulong *length_calculated,
-				    gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 
@@ -1024,8 +1033,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_payment_part ( gulong iterator,
-				    gulong *length_calculated,
-				    gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 
@@ -1070,9 +1079,9 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_transaction_part ( gulong iterator,
-					gulong *length_calculated,
-					gchar **file_content,
-					gint archive_number )
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gint archive_number )
 {
     GSList *list_tmp;
 
@@ -1303,8 +1312,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_category_part ( gulong iterator,
-				     gulong *length_calculated,
-				     gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1380,8 +1389,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_budgetary_part ( gulong iterator,
-				      gulong *length_calculated,
-				      gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1457,8 +1466,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_currency_part ( gulong iterator,
-				     gulong *length_calculated,
-				     gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1502,8 +1511,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_currency_link_part ( gulong iterator,
-					  gulong *length_calculated,
-					  gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1552,8 +1561,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_bank_part ( gulong iterator,
-				 gulong *length_calculated,
-				 gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1605,8 +1614,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_financial_year_part ( gulong iterator,
-					   gulong *length_calculated,
-					   gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1658,8 +1667,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_archive_part ( gulong iterator,
-				    gulong *length_calculated,
-				    gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 	
@@ -1714,8 +1723,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_reconcile_part ( gulong iterator,
-				      gulong *length_calculated,
-				      gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GList *list_tmp;
 
@@ -1781,8 +1790,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_import_rule_part ( gulong iterator,
-					gulong *length_calculated,
-					gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GSList *list_tmp;
 
@@ -1829,9 +1838,9 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_report_part ( gulong iterator,
-				   gulong *length_calculated,
-				   gchar **file_content,
-				   gboolean current_report )
+                        gulong *length_calculated,
+                        gchar **file_content,
+                        gboolean current_report )
 {
     GSList *list_tmp;
 	
@@ -2409,8 +2418,8 @@
  * \return the new iterator
  * */
 gulong gsb_file_save_logo_part ( gulong iterator,
-					gulong *length_calculated,
-					gchar **file_content )
+                        gulong *length_calculated,
+                        gchar **file_content )
 {
     GdkPixbuf *pixbuf = NULL;
     gchar *new_string = NULL;
@@ -2438,3 +2447,58 @@
 }
 
 
+/**
+ * efface la copie du fichier de comptes ancienne version
+ *
+ * \param filename  le chemein du fichier à effacer
+ *
+ * */
+void gsb_file_save_remove_old_file ( gchar *filename )
+{
+    GtkWidget *dialog;
+    GtkWidget *content_area;
+    GtkWidget *hbox;
+    GtkWidget *image;
+    GtkWidget *label;
+    gint resultat;
+
+    dialog = gtk_dialog_new_with_buttons ( 
+                        _("Delete a copy of file of the old version of grisbi"),
+                        GTK_WINDOW ( window ),
+                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                        GTK_STOCK_NO, GTK_RESPONSE_CANCEL,
+                        GTK_STOCK_YES, GTK_RESPONSE_OK,
+                        NULL );
+
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), FALSE );
+
+    content_area = GTK_DIALOG(dialog) -> vbox;
+    hbox = gtk_hbox_new ( FALSE, 5);
+    gtk_container_set_border_width ( GTK_CONTAINER( hbox ), 6 );
+    gtk_box_pack_start ( GTK_BOX ( content_area ), hbox, FALSE, FALSE, 5 );
+
+    image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, 
+                        GTK_ICON_SIZE_DIALOG );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), image, FALSE, FALSE, 5 );
+
+    gchar *tmpstr = g_strconcat ( 
+                        _("Careful, you are about to deleting the copy of file\n"
+                        "of the old version of grisbi.\n"
+                        "\n<b>Do you want to continue ?</b>"),
+                        NULL );
+
+    label = gtk_label_new ( tmpstr );
+    gtk_label_set_use_markup ( GTK_LABEL( label ), TRUE );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 5 );
+    g_free ( tmpstr );
+
+    gtk_widget_show_all ( dialog );
+
+    resultat = gtk_dialog_run ( GTK_DIALOG ( dialog ));
+
+    if ( resultat == GTK_RESPONSE_OK )
+        g_unlink ( filename );
+    if ( GTK_IS_DIALOG ( dialog ) )
+        gtk_widget_destroy ( GTK_WIDGET ( dialog ) );
+}

Index: gsb_data_account_cunit.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account_cunit.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gsb_data_account_cunit.c	23 May 2009 15:47:31 -0000	1.1
+++ gsb_data_account_cunit.c	23 May 2009 19:25:10 -0000	1.2
@@ -32,12 +32,16 @@
 
 /* START_INCLUDE */
 #include "gsb_data_account_cunit.h"
-#include "gsb_data_account.h"
-#include "gsb_data_currency.h"
-#include "gsb_data_transaction.h"
+#include "./gsb_data_account.h"
+#include "./gsb_data_currency.h"
+#include "./gsb_data_transaction.h"
+#include "./gsb_real.h"
 /* END_INCLUDE */
 
 /* START_STATIC */
+static void gsb_data_account_cunit__gsb_data_account_calculate_current_and_marked_balances();
+static int gsb_data_account_cunit_clean_suite(void);
+static int gsb_data_account_cunit_init_suite(void);
 /* END_STATIC */
 
 /* START_EXTERN */

Index: utils_files.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_files.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- utils_files.h	25 Jan 2009 07:50:09 -0000	1.22
+++ utils_files.h	23 May 2009 19:25:10 -0000	1.23
@@ -20,13 +20,13 @@
 
 /*START_DECLARATION*/
 gint get_utf8_line_from_file ( FILE *fichier,
-			       gchar **string,
-			       const gchar *coding_system );
+                        gchar **string,
+                        const gchar *coding_system );
 GtkWidget * my_file_chooser ();
-gchar* my_get_XDG_grisbi_data_dir(void);
+gchar* my_get_XDG_grisbi_data_dir ( void );
 gchar* my_get_XDG_grisbirc_dir(void);
 gchar* my_get_grisbirc_dir(void);
-gchar* my_get_gsb_file_default_dir(void);
+gchar* my_get_gsb_file_default_dir ( void );
 gchar * safe_file_name ( gchar* filename );
 FILE* utf8_fopen(const gchar* utf8filename,gchar* mode);
 gint utf8_remove(const gchar* utf8filename);

Index: utils_str.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_str.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- utils_str.h	13 Mar 2009 20:15:38 -0000	1.41
+++ utils_str.h	23 May 2009 19:25:10 -0000	1.42
@@ -6,35 +6,35 @@
 
 /* START_DECLARATION */
 gint gsb_strcasecmp ( gchar *string_1,
-		      gchar *string_2 );
+                        gchar *string_2 );
 gchar *gsb_string_extract_int ( const gchar *chaine );
 GSList *gsb_string_get_categ_budget_struct_list_from_string ( const gchar *string );
 GSList *gsb_string_get_int_list_from_string ( const gchar *string,
-					      gchar *delimiter );
+                        gchar *delimiter );
 GSList *gsb_string_get_string_list_from_string ( const gchar *string,
-						 gchar *delimiter );
+                        gchar *delimiter );
 gboolean gsb_string_is_trouve ( const gchar *payee_name, const gchar *needle );
 gchar * gsb_string_remplace_joker ( const gchar *chaine, gchar *new_str );
 gchar * gsb_string_remplace_string ( gchar * str, gchar *old_str, gchar *new_str );
 gchar * gsb_string_truncate ( gchar * string );
 gchar * latin2utf8 ( const gchar * inchar);
 gchar *limit_string ( gchar *string,
-		      gint length );
+                        gint length );
 gint my_strcasecmp ( const gchar *string_1,
-		     const gchar *string_2 );
+                        const gchar *string_2 );
 gint my_strcmp ( gchar *string_1, gchar *string_2 );
 gchar *my_strdelimit ( const gchar *string,
-		       const gchar *delimiters,
-		       const gchar *new_delimiters );
+                        const gchar *delimiters,
+                        const gchar *new_delimiters );
 gchar *my_strdup ( const gchar *string );
 gint my_strncasecmp ( gchar *string_1,
-		      gchar *string_2,
-		      gint longueur );
+                        gchar *string_2,
+                        gint longueur );
 double my_strtod ( const char *nptr, const char **endptr );
 gint utils_str_atoi ( const gchar *chaine );
 gchar *utils_str_itoa ( gint integer );
 gchar *utils_str_reduce_exponant_from_string ( const gchar *amount_string,
-					       gint exponent );
+                        gint exponent );
 /* END_DECLARATION */
 
 typedef enum GSB_TITLE_NAME {

Index: utils_files.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_files.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- utils_files.c	27 Apr 2009 19:41:03 -0000	1.40
+++ utils_files.c	23 May 2009 19:25:10 -0000	1.41
@@ -1,10 +1,10 @@
 /* ************************************************************************** */
-/*                                  utils_files.c			      */
+/*                                  utils_files.c                             */
 /*                                                                            */
-/*     Copyright (C)	2000-2007 Cédric Auger (cedric at grisbi.org)      */
-/*			2003-2007 Benjamin Drieu (bdrieu at april.org)	      */
-/*			2003-2004 Alain Portal (aportal at univ-montp2.fr)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2007 Cédric Auger (cedric at grisbi.org)            */
+/*          2003-2007 Benjamin Drieu (bdrieu at april.org)                       */
+/*          2003-2004 Alain Portal (aportal at univ-montp2.fr)                   */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -124,7 +124,7 @@
  * 
  * \return the absolute path of the home directory
  */
-gchar* my_get_XDG_grisbi_data_dir(void)
+gchar* my_get_XDG_grisbi_data_dir ( void )
 {
 #ifndef _WIN32
     return (gchar *) C_PATH_DATA_FILES;
@@ -140,7 +140,7 @@
  * 
  * \return the absolute path of the configuration file directory
  */
-gchar* my_get_gsb_file_default_dir(void)
+gchar* my_get_gsb_file_default_dir ( void )
 {
 #ifndef _WIN32
     return (gchar *) g_get_home_dir();
@@ -161,8 +161,8 @@
  * \return EOF, 1 if ok, 0 if problem
  * */
 gint get_utf8_line_from_file ( FILE *fichier,
-			       gchar **string,
-			       const gchar *coding_system )
+                        gchar **string,
+                        const gchar *coding_system )
 {
     gchar c = 0;
     gint i = 0;

Index: main.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -d -r1.146 -r1.147
--- main.c	22 May 2009 18:43:32 -0000	1.146
+++ main.c	23 May 2009 19:25:10 -0000	1.147
@@ -41,6 +41,7 @@
 #include "./dialog.h"
 #include "./tip.h"
 #include "./gsb_assistant_first.h"
+#include "./main_cunit.h"
 #include "./gsb_file.h"
 #include "./gsb_file_config.h"
 #include "./gsb_status.h"
@@ -54,14 +55,13 @@
 #include "./include.h"
 #include "./erreur.h"
 #include "./structures.h"
-#include "./main_cunit.h"
 /*END_INCLUDE*/
 
 
 /*START_STATIC*/
 static gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
-					  GdkEventWindowState *event,
-					  gpointer null );
+                        GdkEventWindowState *event,
+                        gpointer null );
 static  gboolean main_window_delete_event (GtkWidget *window, gpointer data);
 static  void main_window_destroy_event( GObject* obj, gpointer data);
 /*END_STATIC*/
@@ -305,8 +305,8 @@
  * \return FALSE
  * */
 gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
-					  GdkEventWindowState *event,
-					  gpointer null )
+                        GdkEventWindowState *event,
+                        gpointer null )
 {
 
     if (event -> changed_mask == GDK_WINDOW_STATE_FULLSCREEN)

Index: utils_str.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_str.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- utils_str.c	18 Mar 2009 21:48:28 -0000	1.64
+++ utils_str.c	23 May 2009 19:25:10 -0000	1.65
@@ -1,9 +1,9 @@
 /* ************************************************************************** */
 /*                                  utils_str.c                               */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cedric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2008 Cedric Auger (cedric at grisbi.org)            */
+/*          2003-2008 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */
@@ -105,7 +105,7 @@
  * \return a newly allocated string with only 'exponent' digits after the separator (need to be freed). This function returns NULL if the amount_string parameter is NULL.
  * */
 gchar *utils_str_reduce_exponant_from_string ( const gchar *amount_string,
-					       gint exponent )
+                        gint exponent )
 {
     gint i=0;
     gchar *return_string;
@@ -255,8 +255,8 @@
  * \return a newly allocated string or NULL
  * */
 gchar *my_strdelimit ( const gchar *string,
-		       const gchar *delimiters,
-		       const gchar *new_delimiters )
+                        const gchar *delimiters,
+                        const gchar *new_delimiters )
 {
     gchar **tab_str;
     gchar *retour;
@@ -327,7 +327,7 @@
  * \return -1 if string_1 berfore string_2
  * */
 gint gsb_strcasecmp ( gchar *string_1,
-		      gchar *string_2 )
+                        gchar *string_2 )
 {
     string_1 = my_strdup ( string_1 );
     string_1 = g_strdelimit ( string_1, "éÉèÈêÊ", 'e' );
@@ -364,7 +364,7 @@
  * \return -1 string_1 before string_2 (or string_2 NULL) ; 0 if same or NULL everyone ; +1 if string_1 after string_2 (or string_1 NULL)
  * */
 gint my_strcasecmp ( const gchar *string_1,
-		     const gchar *string_2 )
+                        const gchar *string_2 )
 {
     if (!string_1 && string_2)
 	return 1;
@@ -407,8 +407,8 @@
 /* my_strncasecmp : compare 2 chaines case-insensitive que ce soit utf8 ou ascii */
 /* ******************************************************************************* */
 gint my_strncasecmp ( gchar *string_1,
-		      gchar *string_2,
-		      gint longueur )
+                        gchar *string_2,
+                        gint longueur )
 {
     if ( string_1
 	 &&
@@ -472,7 +472,7 @@
  * \return a dupplicate version of the string with max length character (must to be freed)
  * */
 gchar *limit_string ( gchar *string,
-		      gint length )
+                        gint length )
 {
     gchar *string_return;
     gchar *tmpstr;
@@ -513,7 +513,7 @@
  * \return a g_slist or NULL
  * */
 GSList *gsb_string_get_int_list_from_string ( const gchar *string,
-					      gchar *delimiter )
+                        gchar *delimiter )
 {
     GSList *list_tmp;
     gchar **tab;
@@ -557,7 +557,7 @@
  * \return a g_slist or NULL
  * */
 GSList *gsb_string_get_string_list_from_string ( const gchar *string,
-						 gchar *delimiter )
+                        gchar *delimiter )
 {
     GSList *list_tmp;
     gchar **tab;
@@ -746,7 +746,6 @@
     long_old = g_utf8_strlen ( old_str, -1 );
     chaine = g_strndup ( str, (ptr_debut - str) );
     chaine = g_strconcat ( chaine, new_str, ( ptr_debut + long_old ), NULL );
-    devel_debug ( chaine );
     return g_strdup ( chaine );
 }
 

Index: gsb_file_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_config.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- gsb_file_config.c	27 Apr 2009 19:41:03 -0000	1.75
+++ gsb_file_config.c	23 May 2009 19:25:10 -0000	1.76
@@ -1,8 +1,8 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/*			2005-2008 Benjamin Drieu (bdrieu at april.org)	      */
-/* 			http://www.grisbi.org				      */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2005-2008 Benjamin Drieu (bdrieu at april.org)                       */
+/*          http://www.grisbi.org                                             */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
 /*  it under the terms of the GNU General Public License as published by      */

Index: gsb_data_account.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- gsb_data_account.h	23 May 2009 15:47:31 -0000	1.36
+++ gsb_data_account.h	23 May 2009 19:25:10 -0000	1.37
@@ -22,12 +22,12 @@
 
 
 /* START_DECLARATION */
+gsb_real gsb_data_account_calculate_current_and_marked_balances ( gint account_number );
 gsb_real gsb_data_account_calculate_waiting_marked_balance ( gint account_number );
 void gsb_data_account_change_account_icon ( GtkWidget *button, gpointer data );
 void gsb_data_account_colorize_current_balance ( gint account_number );
 gint gsb_data_account_compare_position ( gint account_number_1,
                         gint account_number_2 );
-gsb_real gsb_data_account_calculate_current_and_marked_balances ( gint account_number );
 gboolean gsb_data_account_delete ( gint account_number );
 gint gsb_data_account_first_number ( void );
 gint gsb_data_account_get_account_by_id ( const gchar *account_id );



More information about the cvs mailing list