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

Re: [desktop] Please read the vFolder spec [Was: why kde and gnome's menu situation sucks]

(I'm only on -devel of these three lists.)

On Oct 25, Jeff Waugh wrote:
> With correctly written .desktop files, that's precisely what it does. :-)
> I'm assuming that you'd want to stick with the current menu layout for
> generated menu files (for e, WindowMaker, etc), but let the other systems
> that actually implement the vFolder spec handle it themselves.

Here's the menu rewrite plan in a nutshell:

- Debian packages' menu entries will go in /usr/share/applications in
  .desktop format (with specified extensions).

- GNOME2 and KDE 3.1 can deal with these .desktop files the same way
  they deal with any other .desktop file.  (However, I don't believe
  this is the ideal situation, but it works until better steps are

- The new menu package will include a facility (like the existing menu
  package does) to build menu hierarchies.  The new menu package is
  aware of Debian extensions (X-Debian-TryPackage; Group) and allows
  expressing categorization (mapping Categories and Group keywords to
  a hierarchical menu) more flexibly than the XML vFolder format.
  This facility can be used by any window manager, desktop manager
  (existing menu entries are used to declare the list of available
  session managers; this will need to be supported), help manager (our
  menu entries are used by dwww too), or anything else that wants to
  show a menu of installed programs and help files (a launcher applet,
  an application's "Debian Menu", whatever).

I haven't made much progress in the last week or so, as I need to have
a whole book (literally) written by Monday before my editor kills me,
but it's coming along.

What I have so far is linked from
http://phys251.phy.olemiss.edu/cgi-bin/viewcvs.cgi/newmenu/; the
interesting things are the draft policy and group specification, while
the code is somewhat less interesting.  parse_menus.py translates
/usr/lib/menu entries into .desktop files; parse_desktop.py reads
.desktop (and .directory) files and does categorization based on
Category and Group keywords (see the ClassicCategorizer class and
build_menu_hierarchy).  It's mostly done except for the support code
for actually generating a usable menu (which will be in another file).
This will support both a "single-file" layout (like FVWM etc. use) and
the "tree" layout (directories and files) used by KDE and GNOME.

For fun, see if parse_desktop.py does a decent job building a
hierarchy from all the .desktop files you have installed (you probably
need most of GNOME2 installed to have a good number of files to
classify).  For extra credit, use parse_menus.py to build .desktop
files for all your installed Debian packages (you may need to hack it
to use the /var/lib/debmenu/legacy location, as it's currently in "put
this stuff in /var/tmp" mode), then repeat the above.

Chris Lawrence <cnlawren@phy.olemiss.edu> - http://www.lordsutch.com/chris/

Computer Systems Manager, Physics and Astronomy, Univ. of Mississippi
125B Lewis Hall - 662-915-5765

Reply to: