Re: filename translation implementation - how to decide
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Alexander Larsson <alexl redhat com>
- Cc: Paolo Borelli <pborelli katamail com>, "desktop-devel-list gnome org" <desktop-devel-list gnome org>
- Subject: Re: filename translation implementation - how to decide
- Date: Wed, 15 Dec 2004 22:15:07 +0000
On Wed, 2004-12-15 at 23:07 +0100, Alexander Larsson wrote:
> 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.
No.
If you want to write to desktop you always use fdo_get_desktop_dir (as
you would with g_get_home_dir)
If you want to display to the user in Nautilus the desktop name you use
fdo_get_desktop_displayname (instead of g_filename_display_basename).
There should be no need to combine or compare the two.
> 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.
No cause both would be always supported - its just an alternative to
hardcoding the desktop path.
jamie.
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 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]