[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Actions extensions in File Managers - Draft 0.12
From:       PCMan <pcman.tw () gmail ! com>
Date:       2010-07-17 9:06:53
Message-ID: AANLkTik5r2a929GPaw6qCx6yQnfzJdCt1ZfB9oGG76Qe () mail ! gmail ! com
[Download RAW message or body]

After trying to implement this spec, I have some suggestions.
Actions (desktop entries with Type="Action") and menus (desktop
entries with Type="Menu") are actually very similar.
The only difference is that an action takes "Profiles" and a menu
reads a "ItemList".
Why not just merge them? For example:

[Desktop Entry]
Type=Action or Menu
Name=name
Icon=icon-name
Tooltip=tooltip
Profiles=profile1;profile2;  <--- applies to both action or menu.
# ItemList is defined in profiles, not here.

[X-Action-Profile profile1]
OnlyShowIn=LXDE;GNOME;XFCE;
Exec=command line # This is only valid when Type=Action
ItemList=item1;item2;item3; # This is only valid when Type=Menu

[X-Action-Profile profile2]
TryExec=try_exec
Exec=command line # This is only valid when Type=Action
ItemList=item1;item2;item3; # This is only valid when Type=Menu

In this way, both of the actions and menus can be validated against
different conditions and have different profiles.
In your original spec, menus don't have profiles. However, after
trying to implement this spec, I think this is a required feature.
With these modifications, menu and action become the same object. The
only difference is in "Type" and their profiles.
Profiles of "Action" defines Exec and that of "Menu" defines ItemList instead.

This greatly simplify the spec while make it more featureful at the same time.
Please consider this. If a patch for this spec is needed, I can create one.
Since I don't have the source file of your spec, I cannot do it now.
Hope you can understand what I'm talking about.

Cheers!

On Tue, Jun 15, 2010 at 11:02 PM, Pierre Wieser <pwieser@trychlos.org> wrote:
> Hi,
>
> I just updated the DES-EMA draft [1] to its version 0.12.
>
> There are three changes:
> - in the writing, "Same as DES" words have been replaced by the
> corresponding excerpt from DES;
> - Capabilities default value changes from "*;" to an empty list
> (do not care of any capabilities);
> - Capabilities is a ANDed list.
>
> As usual, comments are welcome.
>
> Regards
> Pierre
>
> [1] http://www.nautilus-actions.org/?q=node/377
> _______________________________________________
> xdg mailing list
> xdg@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic