Re: GEP 7 - icons and thumbnails - gnome-thumbnail



On 26 Sep 2002, Michael Meeks wrote:

> Hi Alex,
> 
> 	Just poking at gnome-thumbnail; looks nice - especially since it has
> lots of API documentation ( lacking in GnomeIconLoader ).

Yeah. Need to write docs..
 
> 	+ gnome_thumbnail_load_pixbuf looks like a useful API to have,
> 	  but a shame to put it in the thumbnail namespace; is there
> 	  somewhere better for it ? 'gnome_pixbuf_new_from_uri ()' ?
> 	  not clear what to do.

Sounds good to me.
 
> 	+ How useful is gnome_thumbnail_has_uri ? it looks somewhat 
> 	  flakey to me; only a getter, returning only a boolean ? and
> 	  looks like it segv's if the option doesn't exist. [ I see
> 	  this is always set for the thumbnails we generate but ... ]
> 
> 	+ Similar issue in gnome_thumbnail_is_valid; that is unless
> 	  pixbuf_get_option always returns a valid string - 2 segvs 
> 	  there.

gnome_thumbnail_has_uri() is needed by nautilus when handling file renames 
for files with thumbnails. The other function is only used internally at 
the moment, but could be useful for e.g. a thumbnail cleanup app.
 
> 	+ it's interesting to use an md5 sum of the URI to form the
> 	  path to the file - I suppose to avoid path / filename length
> 	  limits yes ?

Amongst other thing. See the spec.
http://triq.net/~pearl/thumbnail-spec/

 
> 	+ the magic 'mimetype_supported_by_gdk_pixbuf' thing is as nasty
> 	  as it ever was ;-) hard to know how to fix it efficiently, 
> 	  without yet more evil config file.

this is being fixed in gdk-pixbuf.

> 	+ the mkstemp man page says:
> 
> 		The  old behaviour (creating a file with mode 0666) may
> 	        be a security risk, especially since other Unix flavours
> 		use 0600, and somebody might overlook this detail when
> 		porting programs.
> 
> 	  do we need a chmod there ?

We already chmod.

> 	+ The gnome_thumbnail_factory_generate_thumbnail call is great,
> 	  but I think people will use it ;-) would it be better to 
> 	  expose an 'async' flavour, that spawned a thread to generate
> 	  the thumb ? or does that introduce the headache of thread
> 	  queues and job scheduling into the issue ? - unnecessarily 
> 	  painful. [ could use a GThreadPool argument ] - anyway that's
> 	  future work.

A simple threaded implementation could be added, but I think that most 
apps that do thumbnailing have specific requirements that makes a 
generic one not work. (e.g. nautilus and it's async NautilusFile 
architecture).

Possible future work though.
 
> 	+ What is the hard-coded "128" in expand_thumbnailing_script ?
> 	  is that intended to be a %d, size passed in from 
> 	  generate_thumbnail ?

Ick. that is supposed to come from GnomeThumbnailFactory->size (128 or 
256, see spec)

> 	Overall, looks really excellent, good work !

Thanks.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a jaded overambitious gentleman spy who must take medication to keep him 
sane. She's a psychotic motormouth socialite in the witness protection 
program. They fight crime! 




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