[Thunar-dev] Actions extensions in File Manager
pwieser at trychlos.org
Thu Dec 10 23:51:34 CET 2009
----- "PCMan" <pcman.tw at gmail.com> wrote:
> How do you handle menu items which have submenus?
I agree that, for now, actions are just an unordered flat list of
items. IMHO, a menu item which handle a submenu is just a menu:
a label, an icon, and an ordered list of items (actions or menus).
So I think this should be handle by the menu spec.
> Besides, some kind of caching is needed. Otherwise having to read
> many files can hurt performance.
Do you are just afraid of such a possibility, or do you have any
measures ? Disks have cache, filesystem drivers have cache, and the
code ran to just display a context menu may already be considered
as heavy (evaluate the selection, build mimetype-depending options,
and so on...).
We also may suppose that file manager only loads these actions once,
and install a monitoring to reload them when the underlying storage
space is changed.
> > - menu definition is left to the already existing spec  ; I find
> > it very complicated, and it may also need an extension, but it
> > exists and cannot just be thrown away
> This one is apparently too complicated for what we need in file
> managers. The current menu spec almost has nothing in common with
> file manager actions. A new spec specifically designed for this
> work should be better.
Better, I don't know, but surely simpler ;-)
Essentially, the spec says (see ) :
a) you define a menu in a .directory file, with a label and an icon
b) you define the order of the items, in a .menu xml file.
This may not even need an extension of the spec, but rather a
simplification to better suit our needs.
We would just have to carefully place our own files to no risk
a collision with the global Applications menu.
But, eventually, yes, I agree that any spec is not complete while
the menus are not described and properly managed. I'll work on
> >  http://www.nautilus-actions.org/?q=node/377
> > 
> >  http://lists.freedesktop.org/archives/xdg/2006-June/006612.html
> > 
> >  http://standards.freedesktop.org/menu-spec/latest/
> >  http://standards.freedesktop.org/desktop-entry-spec/latest/
More information about the Thunar-dev