Ok, i assumed you only wanted to remove KDE apps from menu for some personal testing. Certainly not a viable solution for any final release.

Jay

On Tue, Mar 6, 2012 at 3:14 AM, Darrell Anderson <humanreadable@yahoo.com> wrote:
> You could perhaps use the OnlyShowIn= line
> in the .desktop files for the menu items.
> Run through the .deskstop files and echo
> OnlyShowIn=GNOME or something similar.
> There's nothing like a dirty hack.

Well, hacking every single desktop file is doable for solitary end users, but there is no way to package that in TDE, nor would we want to. :)

There is some code in tdelibs/kservice.cpp to append KDE4 menu options with [KDE4]. The basic detection method is the root file path of the desktop file, which for KDE4 apps is $PREFIX/share/applications/kde4/.

In bug report 892 I proposed changing the default install path for Trinity apps from $PREFIX/share/applications/kde/ to $PREFIX/share/applications/trinity/. At that point we would have a way to distinguish desktop files from the three desktops without grepping any desktop files.

Long term, a couple of check boxes in KControl -> Desktop -> Panels -> Menus would suffice. Some code in kservice.cpp would work something like:

If KDE3_CheckBox_Is_Enabled Then
 If desktop_root_path == $PREFIX/share/applications/kde/ || desktop_root_path == $PREFIX/share/applications/kde/ then
   Show menu item
 Else
   Don't show menu item
If KDE4_CheckBox_Is_Enabled Then
 If desktop_root_path == $PREFIX/share/applications/kde4/ then
   Show menu item
 Else
   Don't show menu item

Unfortunately none of this readily available today. :)

Darrell


---------------------------------------------------------------------
To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net
For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net
Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/
Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting