By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 896 - kservice.cpp: Add options to not show KDE3 or KDE4 apps in the TDE menu
Summary: kservice.cpp: Add options to not show KDE3 or KDE4 apps in the TDE menu
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdelibs (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: Other Other
: P1 enhancement
Assignee: Timothy Pearson
URL:
Depends on:
Blocks:
 
Reported: 2012-03-05 21:16 CST by Darrell
Modified: 2013-04-23 09:31 CDT (History)
2 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darrell 2012-03-05 21:16:48 CST
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.

A couple of check boxes in KControl -> Desktop -> Panels -> Menus would suffice. Additional code in kservice.cpp would work something like this:

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
Comment 1 Darrell 2012-09-13 23:13:45 CDT
$PREFIX/share/applications/kde/ has been changed to $PREFIX/share/applications/tde/.

In the tdelibs/kded sources there are two menu options:

applications.menu
applications.menu-no-kde

By default, these two files are installed in /etc/trinity/xdg/menus.

The applications.menu file supports KDE4 apps and applications.menu-no-kde does not.

Therefore support now exists to toggle whether KDE4 apps appear in the TDE menu. Currently the only method to disable KDE4 apps in the TDE menu is to manually rename applications.menu-no-kde to applications.menu.
Comment 2 Darrell 2013-04-23 09:31:35 CDT
I am closing this report as resolved. Refer to the previous comment.

Note: A preferred way to toggle between the menu options is to copy the desired master menu file to applications.menu rather than move.

Note: Currently there is no GUI administrative control to toggle between the two menus. I don't know the best location to add any such toggle control.