commit 3efad8785222434724235b9c9a2a4617bf78af35 Author: phantomjinx <p.g.richard...@phantomjinx.co.uk> Date: Mon Jul 9 21:42:43 2012 +0100
Register all upper case version of filetype suffixes * Should files have upper case file type suffixes then such files are not recognised by the filetype plugins. * Registers each filetype plugin against all suffixes and their upper case versions. 3538271 - MP3 extensions do not get loaded libgtkpod/gtkpod_app_iface.c | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) --- diff --git a/libgtkpod/gtkpod_app_iface.c b/libgtkpod/gtkpod_app_iface.c index e161e7a..61df6fa 100644 --- a/libgtkpod/gtkpod_app_iface.c +++ b/libgtkpod/gtkpod_app_iface.c @@ -669,7 +669,9 @@ void gtkpod_register_filetype(FileType *filetype) { s = suffixes; while(s) { + gchar *uc = g_ascii_strup(s->data, -1); g_hash_table_insert(gp_iface->filetypes, s->data, filetype); + g_hash_table_insert(gp_iface->filetypes, uc, filetype); s = g_list_next(s); } } @@ -679,7 +681,20 @@ void gtkpod_unregister_filetype(FileType *filetype) { g_return_if_fail(GTKPOD_IS_APP(gtkpod_app)); GtkPodAppInterface *gp_iface = GTKPOD_APP_GET_INTERFACE (gtkpod_app); - g_hash_table_remove(gp_iface->filetypes, filetype_get_name(filetype)); + GList *s; + + GList *suffixes = filetype_get_suffixes(filetype); + if (!suffixes) + return; + + s = suffixes; + while(s) { + gchar *uc = g_ascii_strup(s->data, -1); + g_hash_table_remove(gp_iface->filetypes, s->data); + g_hash_table_remove(gp_iface->filetypes, uc); + s = g_list_next(s); + g_free(uc); + } } gboolean gtkpod_filetype_is_supported(gchar *name) { ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2