Re: Patch for 78542 - change thumbnails to use a thread



On Wed, 2002-05-22 at 22:48, Alex Larsson wrote:
> On 22 May 2002, Damon Chaplin wrote:
> 
> > I've updated the patch on the bug.
> > 
> >   http://bugzilla.gnome.org/show_bug.cgi?id=78542
> 
> I applied the patch and read the resulting file, so some of this may
> not be your code really:
> 
> get_file_mtime() will return INVALID_MTIME for files on nfs (they are
> !is_local). This may not be what you expected, although in the common case 
> we already have the mtime of the image.

Yes, I saw that, and tried to copy the old behavior, i.e. don't rebuild
the thumbnail.

 
> The debug spew about the lock is at the wrong place, may be confusing:

Fixed.


> This code will probably give a warning if the timeout happened:
> 
> 	/* Remove our timeout, if it still exists. */
> 	g_source_remove (timeout_id);

I don't think it does. I checked the glib code. It returns a boolean
indicating if the source was found and removed.


> This code may render the svg at a really high resolution:
> 	if (eel_strcasecmp (info->mime_type, "image/svg") == 0) {
> 		char *image_path = gnome_vfs_get_local_path_from_uri (info->image_uri);
> 		if (image_path != NULL) {
> 			full_size_image = rsvg_pixbuf_from_file (image_path,
> 								 NULL);
> 			g_free (image_path);
> 		}
> 
> Better use:
>         rsvg_pixbuf_from_file_at_size (image_path, 96, 96, NULL);

OK. That was the old code.
I'll change it to rsvg_pixbuf_from_file_at_max_size().

I haven't got any svg files, so you'd better test these.


 
> Otherwise it looks a lot better than the old code. Please commit.

Committed. Waiting for bug reports...

Damon





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]