gnumeric r16632 - in trunk: . src
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16632 - in trunk: . src
- Date: Wed, 18 Jun 2008 01:52:01 +0000 (UTC)
Author: mortenw
Date: Wed Jun 18 01:52:01 2008
New Revision: 16632
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16632&view=rev
Log:
2008-06-17 Morten Welinder <terra gnome org>
* src/application.c (gnm_app_create_opener_filter): Suffix
patterns should match upper and lower case file names. Fixes
#510036.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/src/application.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Jun 18 01:52:01 2008
@@ -33,6 +33,7 @@
* Fix text export problem for times with fractional seconds. [#534514]
* Fix xls export problem. [#537625]
* Fix ZTEST issue. [#405958]
+ * Handle foo.XLS as well as foo.xls. [#510036]
SeÃn de BÃrca:
* Move to tango based icons. [#450444]
Modified: trunk/src/application.c
==============================================================================
--- trunk/src/application.c (original)
+++ trunk/src/application.c Wed Jun 18 01:52:01 2008
@@ -516,18 +516,32 @@
while (suffixes) {
const char *suffix = suffixes->data;
- char *pattern;
+ GString *pattern;
int i;
for (i = 0; bad_suffixes[i]; i++)
if (strcmp (suffix, bad_suffixes[i]) == 0)
goto bad_suffix;
- pattern = g_strconcat ("*.", suffix, NULL);
- gtk_file_filter_add_pattern (filter, pattern);
+ /* Create "*.[xX][lL][sS]" */
+ pattern = g_string_new ("*.");
+ while (*suffix) {
+ gunichar uc = g_utf8_get_char (suffix);
+ suffix = g_utf8_next_char (suffix);
+ if (g_unichar_islower (uc)) {
+ g_string_append_c (pattern, '[');
+ g_string_append_unichar (pattern, uc);
+ uc = g_unichar_toupper (uc);
+ g_string_append_unichar (pattern, uc);
+ g_string_append_c (pattern, ']');
+ } else
+ g_string_append_unichar (pattern, uc);
+ }
+
+ gtk_file_filter_add_pattern (filter, pattern->str);
if (0)
- g_print ("%s: Adding %s\n", go_file_opener_get_description (opener), pattern);
- g_free (pattern);
+ g_print ("%s: Adding %s\n", go_file_opener_get_description (opener), pattern->str);
+ g_string_free (pattern, TRUE);
bad_suffix:
suffixes = suffixes->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]