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

Re: (Possible) menu code rewrite



On Wed, Jul 17, 2002 at 09:23:42AM -0700, Craig Dickson wrote:
> > Just to give an example what everybody is talking about, here is a
> > snippet from the pan.desktop file (stripped by a few translations):
> > 
> > [Desktop Entry]
> > Name=Pan
> > Name[da]=Pan nyhedslæser
> > Name[de]=Pan
> > Name[es]=Pan
> > Comment=Pan, a Newsreader
> > Comment[da]=Værktøj til læsning af nyhedsgrupper
> > Comment[es]=Lector de noticias Pan
> > Exec=pan 
> > Icon=pan.png
> > Terminal=0
> > Type=Application
> > 
> > Quite easy to understand IMO.
> 
> Is this just for an icon on the desktop, or an entry in a menu? I don't
> see anything that indicates where this goes in a menu hierarchy.

Yes, both.

A .desktop file lives in a directory tree.  Its location in the tree
defines where you see it in the menu.  A snippet of Tree output for
/usr/share/gnome/apps:

|-- Applications
|   |-- AbiWord.desktop
|   |-- Mozilla-editor-snapshot-gtk2.desktop
|   |-- Mozilla-editor.desktop
|   |-- gcdmaster.desktop
|   `-- gcombust.desktop
|-- Development
|   |-- devhelp.desktop
|   `-- glade.desktop
          :

It's a very simple format with lots of flexibility.  And a .desktop can be
dragged right to a Gnome or KDE3 panel or desktop - this is a good thing
IMO.

We also have a couple of options for update-menus in the case of KDE and
Gnome - probably we would use /usr/share/menu for these things.  Either
the DEs can be pointed at these menus (not unreasonably) or a symlink tree
can be created by update-menus.  The latter allows more flexibility when
deciding where things appear in the menu - submenus could be collapsed if
the parent menu has few options, KDE/Gnome applications could be preferred
under their respective platforms, that sort of thing.  This is after all
what hints were originally intended for.

I don't think Gnome or KDE would reject intelligent patches for making
their internal menu systems able to do this sort of thing, but that's a
little more work.

-- 
Joseph Carter <knghtbrd@bluecherry.net>             Sooner or later, BOOM!
 
<Knghtbrd> "... you will more than likely see all kinds of compiler
           warnings scrolling by on the screen. These are normal and can
	   be safely ignored."
<LordHavoc> Knghtbrd: is that a note attached to some M$ code?
<Knghtbrd> No, it's a note about a bunch of GNU stuff.

Attachment: pgpfVz5WASNql.pgp
Description: PGP signature


Reply to: