After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 501268 - Existing thumbnails should be loaded regardless of file size
Existing thumbnails should be loaded regardless of file size
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Thumbnails
2.22.x
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-03 15:06 UTC by Josh Lee
Modified: 2008-03-18 19:05 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch (3.22 KB, patch)
2008-03-17 22:02 UTC, Cosimo Cecchi
committed Details | Review

Description Josh Lee 2007-12-03 15:06:38 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.
Comment 1 Mark 2007-12-30 13:54:30 UTC
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.
Comment 2 Josh Lee 2007-12-30 15:56:44 UTC
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.
Comment 3 Cosimo Cecchi 2008-03-17 20:39:48 UTC
Agreed, this makes sense to me. Confirming.
Comment 4 Cosimo Cecchi 2008-03-17 22:02:26 UTC
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.
Comment 5 Josh Lee 2008-03-18 01:59:56 UTC
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 :)
Comment 6 Cosimo Cecchi 2008-03-18 19:05:30 UTC
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.