Bug 144251 - TryExec has no effect
Summary: TryExec has no effect
Status: CLOSED FIXED
Alias: None
Product: kdesktop
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-15 13:46 UTC by cobaco
Modified: 2021-08-25 20:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cobaco 2007-04-15 13:46:38 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Adding a 'TryExec=/path/to/binary' line in the desktop file for an icon on the desktop has no effect, the icon still shows even when '/path/to/binary' is absent
Comment 1 cobaco 2007-04-15 13:49:10 UTC
this works as expected in the menu BTW, so it's only the desktop icons that ignore it.

Reason we'd use this is that debian-edu ships with links to edu-software on the desktop for students, but not all schools have all edu-software installed
Comment 2 Altmenorg 2007-10-11 19:00:03 UTC
here is a diff fixing this :

diff -Nur kdebase-3.5.7/kdesktop/kdiconview.cc kdebase-3.5.7.new/kdesktop/kdiconview.cc
--- kdebase-3.5.7/kdesktop/kdiconview.cc	2007-10-11 17:19:49.000000000 +0200
+++ kdebase-3.5.7.new/kdesktop/kdiconview.cc	2007-10-11 17:20:09.000000000 +0200
@@ -919,6 +919,11 @@
             if (cfg.readListEntry("NotShowIn", ';').contains("KDE"))
                 return false;
         }
+        if (cfg.hasKey("TryExec"))
+        {
+            if (KStandardDirs::findExe( cfg.readEntry( "TryExec" ) ).isEmpty())
+                return false;
+        }
 
         QString name = cfg.readEntry("Name");
         if ( !name.isEmpty() )
Comment 3 David Faure 2007-10-11 20:01:27 UTC
SVN commit 724191 by dfaure:

Apply patch from Anthony Mercatante which makes kdesktop support TryExec for .desktop files on the desktop. Thanks!
BUG: 144251


 M  +6 -1      kdiconview.cc  


WebSVN link: http://websvn.kde.org/?view=rev&revision=724191
Comment 4 FiNeX 2009-01-02 20:33:58 UTC
Bug closed. Kdesktop is no more mantained.