Re: filename translation implementation - how to decide



On Wed, 2004-12-15 at 21:58 +0000, Jamie McCracken wrote:
> On Wed, 2004-12-15 at 22:25 +0100, Alexander Larsson wrote:
> 
> > 
> > On the contrary, the API for a library is highly dependant on how the
> > standard works. It should be obvious to anyone that actually read my
> > initial mail that the two solutions have a very different API.
> > 
> 
> Yes thats true but it could still be defined to cover both. 
> 
> EG you could have:
> 
> fdo_get_desktop_dir - returns ~/Desktop with option1 else custom path 
> fdo_get_desktop_displayname - returns translated name if option 1 etc

So, for every filename, you'd call fdo_get_desktop_dir() and compare
with that, and if its true you'd call fdo_get_desktop_displayname(),
repeat for all special folders. Doesn't sound very efficient.

It could be done better, but basically you'd end up with doing both
systems, and then only supporting one anyway. Increasing complexity,
lowering performance, and generally confusing things.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a witless soccer-playing cowboy from a doomed world. She's a foxy 
renegade wrestler living on borrowed time. They fight crime! 




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