[kde-linux] Is there some method to use a field code such as "%u" in the Name entry of .desktop file?

Kevin Krammer kevin.krammer at gmx.at
Mon Nov 6 11:21:48 UTC 2006


On Monday 06 November 2006 10:03, Bram Schoenmakers wrote:
> Op maandag 06 november 2006 07:46, schreef root:
> > Hi, all
> >
> > I'm using KDE3.5.5, and trying to add a new action to konqueror's service
> > menu, so I'm adding a .desktop file in
> > /usr/share/apps/konqueror/servicemenus.
> > The action which I try to make is a action to archive all files in
> > selected directory to .tar.
> >
> > I can use field codes such as "%u, %f" in Exec entry in .desktop file,
> > but it seems that I can't use field codes in Name entry. I want to
> > context menu shows such a message "Archive into dir.tar", if user
> > selected a directory named "dir".
> >
> > If I could use field codes in Name entry, the problem would have been
> > solved.... Is there anything to do?
> >
> > Also, I have another question. Is there a field code which represent
> > "current directory" no a "full path"?
> > I used "%u", "%f", "%n", but they weren't what I want.

%d should be the path of the file or files from %f or %F

> As far as I know the Name= tag does not support these placeholders. By the
> way, you're aware that Ark (part of kdeutils) already offers similar
> service menus?

Agreed, I think the Name field does not allow variables since it is also 
translatable

You can find the desktop-entry specification here:
http://freedesktop.org/wiki/Standards_2fdesktop_2dentry_2dspec

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-linux/attachments/20061106/0b86b71f/attachment.sig>


More information about the kde-linux mailing list