On Thu, Nov 26, 2009 at 11:28 AM, Zettai Muri <zettaim...@ymail.com> wrote:

> Hi All,
>
> I am trying to use the following filters:
>
> my $sound_filter = Gtk2::FileFilter->new;
> $sound_filter->add_mime_type("audio/*");
>
> my $image_filter = Gtk2::FileFilter->new;
> $image_filter->add_mime_type("image/*");
>
> Because I read here:
> http://library.gnome.org/devel/gtk/stable/gtk-gtkfilefilter.html#gtk-file-filter-add-mime-typethat
>  'GtkFileFilter allows wildcards for the
> subtype of a mime type, so you can e.g. filter for image/*.'
>
> Is this also possible with the Perl bindings?
>
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?

[1]  http://library.gnome.org/devel/gio/stable/gio-GContentType.html
-- 
Emmanuel Rodriguez
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to