Actions extensions in File Managers - Draft 0.11

Pierre Wieser pwieser at trychlos.org
Fri Apr 16 13:31:47 PDT 2010


----- "PCMan" <pcman.tw at gmail.com> wrote:

> 1. If Profiles are named 'Conditions' instead, its purpose will be
> more clear.

Conditions are not profiles.
Profiles are subject to conditions, as actions and menus are.

For example, one may decide that a whole menu, and, therefore, all its
subitems, are only dedicated to subversion management. We so may have :

    [Desktop Entry]
    Type = Menu
    Name = Subversion management
    ShowIfTrue = [ -r %d/.svn/entries ] && echo "true"
    ItemsList = checkout; commit;

This is a sort of "factorization" of the 'svn' condition to the
upper level.

In the other hand, profiles may be seen as an implementation of 
different use cases for a same action.

The only case where it makes sense for a profile to not have any
condition is when the action has only one profile. It so makes no
difference if conditions are described at action level or at profile
level.

> 2. I'd suggest use *.menu instead of *.desktop for menu definition
> files. This can ease the implementation and also better for
> maintainace since you can know it's a menu without examing its
> content.

DES only defines .desktop and .directory files.
If we choose .menu for menus, it would make sense imho to have
.action for actions.
We are moving here a bit more away from DES, don't we ?

I don't have seen in my own experience the case where I needed to
know I have a menu (resp. an action), but wasn't interested to its
content. As in the runtime plugin as in the UI management, I do load
all in memory, and do my work there.

> 3. In this way defining a menu with several items and submenus
> requires many *.desktop files. This makes things a little bit
> complicated and also this can create a headache for maintainers of
> those actions. I'll try to propose a more consolidated and simpler
> file format later.

Don't really agree. This seems more simpler for a packager to drop
a new .desktop file, that to have to update a single file which would
contain all possible actions.

And maintainer of an action has just to update its own .desktop file.
What sort of headache are you afraid of ?

On another point, I'm a bit surprised that nobody has an opinion on
the XDG path I've choosen: XDG_DATA_DIRS/file-manager/actions.
Is this OK for all ?

> On Fri, Apr 16, 2010 at 6:16 AM, Pierre Wieser <pwieser at trychlos.org>
> wrote:
> > I just updated the DES-EMA draft [1] to its version 0.11.
> > [1] http://www.nautilus-actions.org/?q=node/377

Regards
Pierre


More information about the xdg mailing list