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

Re: Lists in .desktop files



On Tue, Jul 30, 2002 at 06:00:34PM +0200, David Faure wrote:
> > AFAIK the spec specifies the delimiter for the type STRINGS to be a semicolon
> > and the delimiter should also be at the end of the list
> 
> Right. Probably because KDE1 did it that way.
> 
> But in KDE 2 & 3:
> * the trailing separator isn't necessary anymore

GNOME will read list fields with or without it.  Some of the installed
.desktop's don't have a trailing ';' on the Categories field though.  We're
also missing Encoding=UTF-8 in a lot of places I think as well.

I think just the fact that it's not neccessairly required by the
implementations shouldn't mean that we do not put it in the .desktop files.
One nice thing about a trailing ';' is that it is then easy to guess that
something is a list field rather then a string field.

> * fields where the spec mandates ';' do use ';', but:
> * like any list in a config file, any other field (like ServiceTypes, or
> X-KDE-Something) uses a comma as separator.
> 
> This is quite a mess (although it all works fine, it's quite confusing).

EEEEEEEEEEK!

We should follow the spec.  Everywhere.  I would suggest starting to mandate
';' for such fields in KDE, but continue to read comma separated lists as
well.  We should use a single separator for all lists, and the spec gives the
';' as the separator.  Having specs that we both don't truly follow
completely is someone useless in the end.

> My question is: what does e.g. gnome do?

GNOME2 implementation only handles lists that are separated by ';'

> (especially concerning its own fields, those not in the spec?)

We don't really have many of our own fields (or any in fact).  The only list
field that we use is the Categories field, and we follow the spec there (at
least in implementation, though not the trailing ';' in all the installed
.desktop's it seems.  I could be wrong, it's been a few weeks since I looked
at that).

It would be nice if some enterprising soul could get the latest GNOME and
KDE, use Havoc's validating tool (or perhaps did some hand validation as
well) and mail the maintainers of offending modules threatening letters.

George

-- 
George <jirka 5z com>
   Although prepared for martyrdom, I preferred that it be postponed.
                       -- Sir Winston Churchill





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