func (app *Application) getItemInfo(p operations.ListProperty) ItemInfo {
	info := toItemInfo(p)

	// TODO: filter MIME type
	if app.settings.thumbnailSizeLimitation >= uint64(info.Size) {
		thumbnail, err := thumbnails.GenThumbnailWithMime(p.URI, p.MIME, app.settings.iconSize)
		info.Thumbnail = thumbnail

		if err != nil {
			Log.Warningf("Get thumbnail for %q failed: %s\n", p.URI, err)
		}
	}

	info.Icon = operations.GetThemeIcon(p.URI, app.settings.iconSize)
	info.IconName = operations.GetIconName(p.URI)

	return info
}
// GetThemeIcon gets theme icon from file or icon name with specific size.
// If the file is a executable desktop file, the app icon will be returned,
// otherwise, a coresponding file icon will be returned.
//
// NB: This function is not explicit enough, it might be deprecated in the future.
func (job *QueryFileInfoJob) GetThemeIcon(file string, size int32) string {
	return operations.GetThemeIcon(file, int(size))
}