Revision: 5152 http://geany.svn.sourceforge.net/geany/?rev=5152&view=rev Author: ntrel Date: 2010-08-12 16:05:53 +0000 (Thu, 12 Aug 2010)
Log Message: ----------- r5105 | eht16 | 2010-07-13 21:53:25 +0100 (Tue, 13 Jul 2010) | 1 line
On Windows, convert filetype extensions read from config files to lower case (closes #3028856).
Modified Paths: -------------- branches/Geany-0_19_1/ChangeLog branches/Geany-0_19_1/src/filetypes.c
Modified: branches/Geany-0_19_1/ChangeLog =================================================================== --- branches/Geany-0_19_1/ChangeLog 2010-08-12 12:58:00 UTC (rev 5151) +++ branches/Geany-0_19_1/ChangeLog 2010-08-12 16:05:53 UTC (rev 5152) @@ -13,6 +13,13 @@ document name for menu items (closes #3038844).
+2010-07-13 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/filetypes.c: + On Windows, convert filetype extensions read from config files + to lower case (closes #3028856). + + 2010-07-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/keybindings.c:
Modified: branches/Geany-0_19_1/src/filetypes.c =================================================================== --- branches/Geany-0_19_1/src/filetypes.c 2010-08-12 12:58:00 UTC (rev 5151) +++ branches/Geany-0_19_1/src/filetypes.c 2010-08-12 16:05:53 UTC (rev 5152) @@ -1571,6 +1571,18 @@ }
+#ifdef G_OS_WIN32 +static void convert_filetype_extensions_to_lower_case(gchar **patterns, gsize len) +{ + guint i; + for (i = 0; i < len; i++) + { + setptr(patterns[i], g_ascii_strdown(patterns[i], -1)); + } +} +#endif + + void filetypes_read_extensions(void) { guint i; @@ -1597,6 +1609,9 @@ { g_strfreev(filetypes[i]->pattern); filetypes[i]->pattern = list; +#ifdef G_OS_WIN32 + convert_filetype_extensions_to_lower_case(filetypes[i]->pattern, len); +#endif } else g_strfreev(list);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.