get icon from filename



There are several files to download.

And before downloading, I want to show the user what files to be downloaded, with their icons.

So I have a filename such as 'hello.mkv' which not exists but to be downloaded.
How can I get an icon GdkPixbuf from the filename 'hello.mkv'


I tried
    GIcon *icon=g_file_icon_new ("hello.mkv")
    GtkIconInfo *info=gtk_icon_theme_lookup_by_gicon(...)   
    GdkPixbuf *pixbuf=gtk_icon_info_load_icon(...)
but failed with error message 'Error opening file: No such file or directory'



Sorry for my English


--

-------------------------------------------------------------
Wiky L


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