Add compilation support to enable/disable

[KDE4] suffix in KDE4 menu items.
This resolves bug report 1563.
pull/16/head
Darrell Anderson 11 years ago
parent 8825cf6535
commit 365f030613

@ -94,6 +94,7 @@ OPTION( WITH_NETWORK_MANAGER_BACKEND "Enable network-manager support" OFF )
OPTION( WITH_SUDO_TDESU_BACKEND "Use sudo as backend for tdesu (default is su)" OFF ) OPTION( WITH_SUDO_TDESU_BACKEND "Use sudo as backend for tdesu (default is su)" OFF )
OPTION( WITH_OLD_XDG_STD "Use the pre R14.0.0 XDG standard where both TDE and KDE are recognized in desktop files" OFF ) OPTION( WITH_OLD_XDG_STD "Use the pre R14.0.0 XDG standard where both TDE and KDE are recognized in desktop files" OFF )
OPTION( WITH_LZMA "Enable support for LZMA/XZ" ${WITH_ALL_OPTIONS} ) OPTION( WITH_LZMA "Enable support for LZMA/XZ" ${WITH_ALL_OPTIONS} )
OPTION( WITH_KDE4_MENU_SUFFIX "Add [KDE4] tag to KDE4 menu items" OFF )
OPTION( WITH_ASPELL "Enable aspell support" ${WITH_ALL_OPTIONS} ) OPTION( WITH_ASPELL "Enable aspell support" ${WITH_ALL_OPTIONS} )
OPTION( WITH_HSPELL "Enable hspell support" ${WITH_ALL_OPTIONS} ) OPTION( WITH_HSPELL "Enable hspell support" ${WITH_ALL_OPTIONS} )
@ -838,6 +839,13 @@ if( WITH_NETWORK_MANAGER_BACKEND )
endif( WITH_NETWORK_MANAGER_BACKEND ) endif( WITH_NETWORK_MANAGER_BACKEND )
##### Add '[KDE4]' to KDE4 menu items #########
if( WITH_KDE4_MENU_SUFFIX )
set( KDE4_MENU_SUFFIX 1 )
endif ( WITH_KDE4_MENU_SUFFIX )
##### check for gcc visibility support ######### ##### check for gcc visibility support #########
# FIXME # FIXME
# This should check for [T]Qt3 visibility support # This should check for [T]Qt3 visibility support

@ -65,6 +65,9 @@
/* Defines if lzma/xz is compiled */ /* Defines if lzma/xz is compiled */
#cmakedefine HAVE_XZ_SUPPORT 1 #cmakedefine HAVE_XZ_SUPPORT 1
/* Defines if '[KDE4]' is added to KDE4 menu items */
#cmakedefine KDE4_MENU_SUFFIX 1
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */ /* Define to 1 if you have the <Carbon/Carbon.h> header file. */
#cmakedefine HAVE_CARBON_CARBON_H 1 #cmakedefine HAVE_CARBON_CARBON_H 1

@ -236,9 +236,11 @@ KService::init( KDesktopFile *config )
m_strComment = config->readComment(); m_strComment = config->readComment();
entryMap.remove("Comment"); entryMap.remove("Comment");
m_strGenName = config->readGenericName(); m_strGenName = config->readGenericName();
#ifdef KDE4_MENU_SUFFIX
if (kde4application) { if (kde4application) {
m_strGenName += " [KDE4]"; m_strGenName += " [KDE4]";
} }
#endif
entryMap.remove("GenericName"); entryMap.remove("GenericName");
TQString untranslatedGenericName = config->readEntryUntranslated( "GenericName" ); TQString untranslatedGenericName = config->readEntryUntranslated( "GenericName" );
if (!untranslatedGenericName.isEmpty()) if (!untranslatedGenericName.isEmpty())

Loading…
Cancel
Save