Re: Gtk2::FileFilter by mime type

From: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
I've checked the C implementation of GtkFileFilter and mime types rules are processed with  
g_content_type_is_a[1] which has different implementations for Unix/Linux and Windows.

In Linux g_content_type_is_a behaves as you expect so 'text/png' is considered a 'text/*'. I haven't tried 
with a GtkFileFilter yet.

Are you running your program in Linux/Unix or in Windows?


Thank you for this, yep that's my problem I'm running the program under Windows.  If I wanted to be able to 
run it under both Linux & Windows would I be better off using add_pattern("*.mp3") etc. to detect different 
file formats?

Or should I be testing somewhere early on in my program whether or not it is running under windows or Linux 
and then changing these kinds of tests accordingly?

Is there a recommended way to overcome these differences between different OSes?

Last chance to win a Sony entertainment pack thanks to Yahoo!7. Hurry, ends Nov 30. Enter now:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]