Fix shell_get_thumbnail* to not be specific for GtkRecentInfo items

Currently function shell_get_thumbnail_for_recent_info located in
src/shell-global.c is used to get thumbnails for recently used files.
However, it only works if you have a GtkRecentInfo object for the file,
even though the thumbnail generation code doesn't depend on it. This commit
renames the function to shell_get_thumbnail and makes it generic so that it
just takes two strings: a filename and a mimetype.
This commit is contained in:
Siegfried-Angel Gevatter Pujals
2009-06-16 02:05:16 +02:00
committed by Marina Zhurakhinskaya
parent 8b1d7e3407
commit e478cc4c4e
3 changed files with 23 additions and 10 deletions

View File

@ -34,7 +34,7 @@ DocDisplayItem.prototype = {
let description = "";
let icon = new Clutter.Texture();
this._iconPixbuf = Shell.get_thumbnail_for_recent_info(docInfo);
this._iconPixbuf = Shell.get_thumbnail(docInfo.get_uri(), docInfo.get_mime_type());
if (this._iconPixbuf) {
// We calculate the width and height of the texture so as to preserve the aspect ratio of the thumbnail.
// Because the images generated based on thumbnails don't have an internal padding like system icons do,