On Windows, convert filetype extensions read from config files to lower case (closes #3028856).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5105 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
702956d65a
commit
441b37589e
@ -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:
|
||||
|
@ -1571,6 +1571,18 @@ gboolean filetypes_parse_error_message(GeanyFiletype *ft, const gchar *message,
|
||||
}
|
||||
|
||||
|
||||
#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 @@ void filetypes_read_extensions(void)
|
||||
{
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user