.desktop file test conditions and menu item ordering

Kevin Krammer kevin.krammer at gmx.at
Wed Mar 3 10:57:25 GMT 2010


On Wednesday, 2010-03-03, Thom Brown wrote:
> On 3 March 2010 10:40, Kevin Krammer <kevin.krammer at gmx.at> wrote:
> > On Tuesday, 2010-03-02, Thom Brown wrote:
> >> Hi,
> >>
> >> I'm trying to write a .desktop file which would determine whether or
> >> not the selected directory of file path has .svn/entries in it.  From
> >> what I've seen, either one of the following should do:
> >>
> >> ShowIfTrue=[ -r %d/.svn/entries ] && echo "true"
> >> X-KDE-ShowIfDBusCall=[ -r %d/.svn/entries ] && echo "true"
> >
> > The second one is not right, this is for evaluating a D-Bus call.
> > Not sure about the other though.
> 
> Yeah, I've only just begun to learn about these D-Bus calls, so I need
> to construct one for the project I'm doing this for.  I was only
> trying to use that option as this page said both calls were
> equivalent: http://www.grumz.net/?q=node/377
> 
> Obviously they're not really though.

I guess what the page author meant was that it can be used for the same 
effect, i.e. conditional visibility.
But I agree that it isn't phrased very well.

What you could try is to use a shell script instead of the command in 
ShowIfTrue.
In this script you can then log to a file and thus see if the script is 
called, which parameters it gets, etc.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20100303/8619f34b/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


More information about the kde mailing list