[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_7_96-6-ge625d06

Pierre Biava nobody at users.sourceforge.net
Thu Dec 16 23:11:41 CET 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  e625d06b9b488a859b207820dfd3781ecab381be (commit)
      from  ab9daef788c2a09cafea59e5d16c2c91b1d923b1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e625d06b9b488a859b207820dfd3781ecab381be
Author: pbiava <pierre.biava at nerim.net>
Date:   Thu Dec 16 23:09:44 2010 +0100

    makes the filter of files extension case unsensitive and minor changes. Thanks Ricardo

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

Changes:
diff --git a/src/gsb_file.c b/src/gsb_file.c
index bdc83d6..074f58b 100644
--- a/src/gsb_file.c
+++ b/src/gsb_file.c
@@ -247,7 +247,7 @@ devel_debug (NULL);
 	    if ( gsb_file_close() )
 	    {
 		gtk_widget_hide ( selection_fichier );
-		nom_fichier_comptes = file_selection_get_filename ( GTK_FILE_CHOOSER ( selection_fichier ) ) ;
+		nom_fichier_comptes = file_selection_get_filename ( GTK_FILE_CHOOSER ( selection_fichier ) );
         gsb_file_update_last_path ( file_selection_get_last_directory (
                         GTK_FILE_CHOOSER ( selection_fichier),
                         TRUE ) );
diff --git a/src/import.c b/src/import.c
index 6ceb993..3cea7aa 100644
--- a/src/import.c
+++ b/src/import.c
@@ -748,8 +748,9 @@ GSList *gsb_import_create_file_chooser ( const char *enc, GtkWidget *parent )
     GSList * tmp;
     struct import_format * format;
     GSList *filenames = NULL;
-	gchar* old_str;
-	gchar* tmpstr;
+    gchar* old_str;
+    gchar* tmpstr;
+    gchar* tmpchar;
 
     dialog = gtk_file_chooser_dialog_new ( _("Choose files to import."),
                         GTK_WINDOW ( parent ),
@@ -794,16 +795,24 @@ GSList *gsb_import_create_file_chooser ( const char *enc, GtkWidget *parent )
                         format -> extension );
     gtk_file_filter_set_name ( format_filter, tmpstr );
     g_free ( tmpstr );
-    tmpstr = g_strconcat ( "*.", format -> extension, NULL );
-    gtk_file_filter_add_pattern ( format_filter,
-                        tmpstr );
-    g_free ( tmpstr );
-    gtk_file_chooser_add_filter ( GTK_FILE_CHOOSER ( dialog ), format_filter );
-
-    /* Global filter */
-    tmpstr = g_strconcat ( "*.", format -> extension, NULL );
+    /* Make it case insensitive */
+    tmpstr = g_strdup ( "*." );
+    tmpchar = format -> extension;
+    while(*tmpchar != '\0' )
+    {
+    old_str=tmpstr;
+    tmpstr = g_strdup_printf ( _("%s[%c%c]"),
+                        tmpstr,
+                        (int)g_ascii_toupper(*tmpchar),
+                        (int)*tmpchar );
+    tmpchar++;
+    g_free ( old_str );
+    }
+    gtk_file_filter_add_pattern ( format_filter, tmpstr );
+    /* Add this pattern to the global filter as well*/
     gtk_file_filter_add_pattern ( default_filter, tmpstr );
     g_free ( tmpstr );
+    gtk_file_chooser_add_filter ( GTK_FILE_CHOOSER ( dialog ), format_filter );
 
     tmp = tmp -> next;
     }
diff --git a/src/plugins/ofx/ofx.h b/src/plugins/ofx/ofx.h
index 7d96a17..72dcea8 100644
--- a/src/plugins/ofx/ofx.h
+++ b/src/plugins/ofx/ofx.h
@@ -8,7 +8,7 @@
 /* START_DECLARATION */
 G_MODULE_EXPORT extern void ofx_plugin_register ();
 G_MODULE_EXPORT extern gboolean ofx_plugin_release ( );
-G_MODULE_EXPORT extern GSList * ofx_plugin_run ( GtkWidget * assistant, 
+G_MODULE_EXPORT extern GSList * ofx_plugin_run ( GtkWidget * assistant,
 				    struct imported_file * imported );
 /* END_DECLARATION */
 
@@ -18,7 +18,7 @@ G_MODULE_EXPORT extern GSList * ofx_plugin_run ( GtkWidget * assistant,
 /* On Windows, the Ofx Severity enumerate values are already used in wingdi.h, DELETE is used in winnt.h
  * This is a work around to this issues :
  *  INFO, WARN, ERROR, DELETE and REPLACE are used in standard libofx.h;
- *  on windows they should be prefixed by OFX_ 
+ *  on windows they should be prefixed by OFX_
  */
 
 #ifndef OFX_INFO


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list