separators and titles in the kmenu

Havoc Pennington hp at redhat.com
Fri Jan 31 02:50:06 GMT 2003


Hi,

On Fri, Jan 31, 2003 at 12:37:28AM +0100, Waldo Bastian wrote: 
> Since the current version does not foresee a specific sortorder, seperators or 
> specific titles you might want to read up on it and make some suggestions for 
> how to add those to the standard.
> 

Absolutely. So, I guess the main question is how do we represent order
such that the right thing happens when you add/remove items.

Current .order files are like this:

  textdoc.desktop
  spreadsheet.desktop
  drawing.desktop
  presentation.desktop
  mathdoc.desktop
  setup.desktop
  printeradmin.desktop
 
I'm not sure how files not represented in .order get merged into the
menu.

Also, the desktop entry spec mentions a SortOrder key but has no docs
on what it means or its format. (Yikes!) But reading code, it appears
that it goes in .directory files and is like this:

  SortOrder=textdoc.desktop:spreadsheet.desktop:drawing.desktop

(why it doesn't use standard string-list format with ; separator I
dunno)

Again, not sure how stuff not listed here is merged in.

Clearly you could use a field in the XML file instead of either of
these approaches, seems more sane from scratch, but perhaps sticking
to one of the existing methods has value.

For separators, perhaps just a magic string in the order list would be
appropriate. "SEPARATOR" or something. We might also specify that N
adjacent separators are automatically combined into a single
separator.

For titles, I could use some clarification on what it is - say I have
the Office submenu, with Office.directory, 

 Office -> Title
           -----
           Word Processor
           Spreadsheet

What would the title be besides "Office"? Or do I not understand what
a title is?

In any case, seems like a .directory file would work here, with some
way to specify its location. Perhaps simply "include a .directory file
in the order list"

So then we just have .order or SortOrder or XML element like:

  Title.directory
  SEPARATOR
  textdoc.desktop
  spreadsheet.desktop

Just trying to lay out some basic ideas.

Havoc



More information about the kde-core-devel mailing list