[grisbi-cvs] grisbi/src gsb_assistant_archive_export.c, 1.10, 1.11 transaction_list.c, 1.25, 1.26

Pierre Biava pbiava at users.sourceforge.net
Sat Nov 29 19:31:28 CET 2008


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

Modified Files:
	gsb_assistant_archive_export.c transaction_list.c 
Log Message:
update strings export an archive and minor corrections 

Index: gsb_assistant_archive_export.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_archive_export.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- gsb_assistant_archive_export.c	23 Nov 2008 09:44:40 -0000	1.10
+++ gsb_assistant_archive_export.c	29 Nov 2008 18:31:26 -0000	1.11
@@ -386,8 +386,13 @@
 						     gsb_data_archive_get_name (archive_number));
 	    gtk_label_set_markup ( GTK_LABEL ( archive_export_label ), tmpstr);
 	    g_free ( tmpstr );
+        /* on remplace les slash des dates par des points 
+         * avant de fixer le nom du fichier par défaut */
+        tmpstr = ( gchar * )gsb_data_archive_get_name ( archive_number );
+        tmpstr = my_strdelimit (tmpstr, "/", "." );
 	    gtk_file_chooser_set_current_name ( GTK_FILE_CHOOSER (archive_export_filechooser),
-						gsb_data_archive_get_name (archive_number));
+						tmpstr );
+	    g_free ( tmpstr );
 	    /* need to set the next button to the next function,
 	     * because if the export failed and the user did previous button,
 	     * the next button stay in the close state */
@@ -397,13 +402,18 @@
 	    break;
 
 	case ARCHIVE_EXPORT_ASSISTANT_SUCCESS:
-	    export_name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (archive_export_filechooser));;
+	    export_name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (archive_export_filechooser));
 	    switch (gtk_combo_box_get_active (GTK_COMBO_BOX(archive_export_combobox)))
 	    {
 		case 0:
 		    /* GSB format */
 		    /* the gsb_file_save_save_file function write directly, so we need to check before
 		     * if the file exists */
+            /* on vérifie juste que l'extension existe */
+            if ( ! g_strrstr ( export_name, ".gsb" ) )
+            {
+               export_name = g_strconcat ( export_name, ".gsb", NULL );
+            }
 		    success = gsb_file_util_test_overwrite (export_name)
 			&&
 			gsb_file_save_save_file ( export_name, etat.compress_backup, archive_number);
@@ -411,11 +421,19 @@
 
 		case 1:
 		    /* QIF format */
+            if ( ! g_strrstr ( export_name, ".qif" ) )
+            {
+               export_name = g_strconcat ( export_name, ".qif", NULL );
+            }
 		    success = gsb_qif_export_archive ( export_name, archive_number);
 		    break;
 
 		case 2:
 		    /* CSV format */
+            if ( ! g_strrstr ( export_name, ".csv" ) )
+            {
+               export_name = g_strconcat ( export_name, ".csv", NULL );
+            }
 		    success = gsb_csv_export_archive ( export_name, archive_number);
 		    break;
 	    }

Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- transaction_list.c	29 Nov 2008 16:19:20 -0000	1.25
+++ transaction_list.c	29 Nov 2008 18:31:26 -0000	1.26
@@ -529,7 +529,6 @@
 	/* if the archive was showed, modify the visible transactions */
 	if ( record -> filtered_pos != -1  && custom_list -> num_visibles_rows > 0 )
 	{
-        printf ("filtered_pos est différent de -1 et j = %d \n", j );
 	    custom_list -> num_visibles_rows--;
 
 	    for (j=record -> filtered_pos ; j < custom_list -> num_visibles_rows ; j++)



More information about the cvs mailing list