Question

According to the GIO Documentation, it is possible to get the Icon of a file through g_file_info_get_icon () http://developer.gnome.org/gio/stable/GFileInfo.html#g-file-info-get-icon

But this doesnt work, take a look at this sample:

print(somefile) # <FileInfo object at 0x17bf820 (GFileInfo at 0x1b15d00)> 
icon = somefile.get_icon()
print(icon) # always None
if icon is Gio.Icon: 
    print("isicon") # never happens

I've testet it with my whole home folder, get_icon() does ALWAYS return None. Did i made any mistakes or is this function simply not working with python / pygobject?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top