GNOME Bugzilla – Bug 501268
Existing thumbnails should be loaded regardless of file size
Last modified: 2008-03-18 19:05:30 UTC
If a thumbnail exists for a given file, then the thumbnail should be loaded even if the size of the file exceeds the size given in the preferences. This would let me generate thumbnails for a few large images (with GIMP for example) without worrying about nautilus dying every time I accidentally place an enormous gif on the Desktop.
I don't think it should 'just' load a thumbnail for a file and display it regardless of it's size and the gconf thumbnail_size setting. I think all thumbnails should obey the thumbnail_size value to maintain a nice look of your folders (and the desktop). it just would look ugly if you have: icons = 48x48 max thumbnail = 96x96 max (up till here is default in Gnome) and just some other thumbnails with 200x120 However making a 'free' style (where you can resize every icon like in KDE 4) would be interesting to have.
That's not quite what I meant. I proposed that thumbnails, if they exist (and fit the thumbnail_size), should be loaded even if the original image exceeds the thumbnail_limit value. The reason I would like this feature is to create thumbnails of large images, whether by temporarily raising the thumbnail_limit setting or by using another program. Once these thumbnails exist, it would definitely be advantageous to display them---it does not matter how large the original was, as all thumbnails have a uniform size.
Agreed, this makes sense to me. Confirming.
Created attachment 107486 [details] [review] patch Attached patch should fix this, I tested it with your use case and it works fine. Also, there was a TODO in the code handling the thumbnails, due to (I guess) the migration away from nautilus-icon-factory.c, so I reimplemented that code in nautilus-thumbnails.c.
This seems to work fine. In particular, raising and then lowering the thumbnail limit in the preferences will generate a few thumbnails and then stop. Thanks :)
Committed to trunk. 2008-03-18 Cosimo Cecchi <cosimoc@gnome.org> * libnautilus-private/nautilus-file.c: (nautilus_file_should_show_thumbnail): * libnautilus-private/nautilus-thumbnails.c: (get_types_table), (nautilus_thumbnail_is_mimetype_limited_by_size): * libnautilus-private/nautilus-thumbnails.h: Always use the thumbnails regardless of the original file size if it has been already generated (#501268). Also, reimplement image mimetypes table to determine if we have to check for file size limit.