Revision: 5105 http://geany.svn.sourceforge.net/geany/?rev=5105&view=rev Author: eht16 Date: 2010-07-13 20:53:25 +0000 (Tue, 13 Jul 2010)
Log Message: ----------- On Windows, convert filetype extensions read from config files to lower case (closes #3028856).
Modified Paths: -------------- trunk/ChangeLog trunk/src/filetypes.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-07-12 17:09:57 UTC (rev 5104) +++ trunk/ChangeLog 2010-07-13 20:53:25 UTC (rev 5105) @@ -1,3 +1,10 @@ +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: trunk/src/filetypes.c =================================================================== --- trunk/src/filetypes.c 2010-07-12 17:09:57 UTC (rev 5104) +++ trunk/src/filetypes.c 2010-07-13 20:53:25 UTC (rev 5105) @@ -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.