Bug 63933 - Doesn't support OnlyShowIn and NotShowIn keywords of .desktop files
Summary: Doesn't support OnlyShowIn and NotShowIn keywords of .desktop files
Status: RESOLVED WORKSFORME
Alias: None
Product: kdesktop
Classification: Miscellaneous
Component: general (show other bugs)
Version: 3.5
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-09 02:23 UTC by Egmont Koblinger
Modified: 2009-09-18 14:32 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egmont Koblinger 2003-09-09 02:23:32 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    Unspecified Linux
OS:          Linux

Desktop file specification (on www.freedesktop.org)
defines OnlyShowIn and NotShowIn fields. These are
not supported by KDE. Desktop files which have an
"OnlyShowIn=GNOME;XFCE;" or "NotShowIn=KDE;" or similar
line should not appear in the menu, on the desktop etc.

Furthermore, .desktop and .directory files that are
automatically created by KDE at runtime and are only
relevant to KDE (e.g. the trashcan stuff under ~/Desktop)
should have an "OnlyShowIn=KDE;" line to prevent Gnome
and others from displaying it.

As Gnome 2.4 will to use the same ~/Desktop directory
that KDE uses, this is a very important move not to
conflict with each other.

See this URL for a more detailed description:
http://bugzilla.gnome.org/show_bug.cgi?id=121791
Comment 1 Maksim Orlovich 2003-09-09 03:07:24 UTC
CC'ing Waldo since this relates to the new menu spec stuff. 
 
Comment 2 Arwed v. Merkatz 2003-09-29 16:38:01 UTC
another note on this:
the .desktop files that link directly to a submodule of the kde control center
(e.g. /usr/share/applications/kde/mouse.desktop) should probably have a
OnlyShowIn=KDE, outside of KDE a menu entry for the whole control center is imho
enough
Comment 3 Waldo Bastian 2003-09-30 12:36:08 UTC
Current status (KDE CVS): 
OnlyShowIn and NotShowIn are now supported in the KDE menu for both .desktop 
files and .directory files. 
 
kdesktop does not support any of OnlyShowIn / NotShowIn / NoDisplay for either .
desktop files or .directory files. 
 
Comment 4 Waldo Bastian 2004-02-26 12:30:35 UTC
CVS commit by waba: 

Add support for OnlyShowIn / NotShowIn / NoDisplay for both
.desktop and .directory files. (BR63933)
CCMAIL: 63933@bugs.kde.org


  M +15 -0     kdiconview.cc   1.106


--- kdebase/kdesktop/kdiconview.cc  #1.105:1.106
@@ -794,4 +794,19 @@ bool KDIconView::makeFriendlyText( KFile
             return false;
 
+        if (cfg.readBoolEntry( "NoDisplay", false ))
+            return false;
+
+        QStringList tmpList;
+        if (cfg.hasKey("OnlyShowIn"))
+        {
+            if (!cfg.readListEntry("OnlyShowIn", ';').contains("KDE"))
+                return false;
+        }
+        if (cfg.hasKey("NotShowIn"))
+        {
+            if (cfg.readListEntry("NotShowIn", ';').contains("KDE"))
+                return false;
+        }
+
         QString name = cfg.readEntry("Name");
         if ( !name.isEmpty() )


Comment 5 Waldo Bastian 2004-02-26 12:33:52 UTC
Support added for KDE 3.2.1
Comment 6 Egmont Koblinger 2004-02-26 12:55:30 UTC
Please don't close it, so far only one part of two closely related problems
are solved. As reported, KDE-specific desktop files (trashcan, control center
modules etc.) should have an OnlyShowIn=KDE; field. Actually, the main goal is
this latter one (so that Gnome doesn't show KDE's trashcan), supporting the
OnlyShowIn field is only a necessary technical step to reach this goal.
Comment 7 Eric Mesa 2006-01-03 02:52:18 UTC
we're now in KDE 3.5 and still no bugfix here.  This would be a wonderful bugfix so that I don't keep having 2 trashcans in Gnome.  Also, other KDE desktop icons interfering in Gnome.  I like to switch around desktops and KDE is one of my faves, but when I switch to Gnome, KDE doesn't cooperate because of this bug.

Thanks!
Comment 8 David Faure 2006-01-04 08:57:27 UTC
SVN commit 494161 by dfaure:

Show trashcan .desktop file on desktop only in kde
CCBUG:63933


 M  +1 -0      directory.trash  


--- branches/KDE/3.5/kdebase/kdesktop/init/directory.trash #494160:494161
@@ -146,3 +146,4 @@
 Comment[zh_CN]=保存临时删除的文件
 Comment[zh_TW]=包含刪除的檔案
 Comment[zu]=Iqukethe amafayela agudluziwe
+OnlyShowIn=KDE
Comment 9 Michael Biebl 2006-02-15 16:13:25 UTC
This also affects desktop files in $(prefix)/share/autostart.
I wanted to start a systray applet only for Gnome, so I set 
OnlyShowIn=GNOME; but kdesktop starts it nonetheless.
Comment 10 Rex Dieter 2006-02-15 16:18:36 UTC
Michael, AFAIK, OnlyShowIn/NotShowIn only affects whether items appear in the menus... and their affect on autostart behavior is undefined.
Comment 11 Michael Biebl 2006-02-15 16:24:37 UTC
If OnlyShowIn/NotShowIn is not defined for autostart items, is there another way to control which items is started in which DE?
Comment 12 Waldo Bastian 2006-02-16 01:51:27 UTC
autostart items should also follow OnlyShowIn as described in the autostart spec:
http://standards.freedesktop.org/autostart-spec/

Yes, that's a fairly new spec ;-)
Comment 13 FiNeX 2008-12-10 01:14:48 UTC
Is this a valid issue for KDE 4?
Comment 14 FiNeX 2009-09-18 13:59:26 UTC
waiting for info
Comment 15 Eric Mesa 2009-09-18 14:08:40 UTC
This seems to no longer be an issue with KDE 4.x and Fedora 11.
Comment 16 FiNeX 2009-09-18 14:32:25 UTC
thanks for the feedback