@ -140,7 +140,7 @@ bool KonqPopupMenu::ProtocolInfo::trashIncluded() const
}
}
// This helper class stores the .desktop-file actions and the servicemenus
// This helper class stores the .desktop-file actions and the servicemenus
// in order to support X- KDE-Priority and X-K DE-Submenu.
// in order to support X- TDE-Priority and X-T DE-Submenu.
class PopupServices
class PopupServices
{
{
public :
public :
@ -303,12 +303,12 @@ int KonqPopupMenu::insertServices(const ServiceList& list,
bool KonqPopupMenu : : KIOSKAuthorizedAction ( KConfig & cfg )
bool KonqPopupMenu : : KIOSKAuthorizedAction ( KConfig & cfg )
{
{
if ( ! cfg . hasKey ( " X- K DE-AuthorizeAction" ) )
if ( ! cfg . hasKey ( " X- T DE-AuthorizeAction" ) )
{
{
return true ;
return true ;
}
}
TQStringList list = cfg . readListEntry ( " X- K DE-AuthorizeAction" ) ;
TQStringList list = cfg . readListEntry ( " X- T DE-AuthorizeAction" ) ;
if ( kapp & & ! list . isEmpty ( ) )
if ( kapp & & ! list . isEmpty ( ) )
{
{
for ( TQStringList : : ConstIterator it = list . begin ( ) ;
for ( TQStringList : : ConstIterator it = list . begin ( ) ;
@ -649,8 +649,8 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
const TQString path = urlForServiceMenu . path ( ) ;
const TQString path = urlForServiceMenu . path ( ) ;
KSimpleConfig cfg ( path , true ) ;
KSimpleConfig cfg ( path , true ) ;
cfg . setDesktopGroup ( ) ;
cfg . setDesktopGroup ( ) ;
const TQString priority = cfg . readEntry ( " X- K DE-Priority" ) ;
const TQString priority = cfg . readEntry ( " X- T DE-Priority" ) ;
const TQString submenuName = cfg . readEntry ( " X- K DE-Submenu" ) ;
const TQString submenuName = cfg . readEntry ( " X- T DE-Submenu" ) ;
if ( cfg . readEntry ( " Type " ) = = " Link " ) {
if ( cfg . readEntry ( " Type " ) = = " Link " ) {
urlForServiceMenu = cfg . readEntry ( " URL " ) ;
urlForServiceMenu = cfg . readEntry ( " URL " ) ;
// TODO: Do we want to make all the actions apply on the target
// TODO: Do we want to make all the actions apply on the target
@ -674,8 +674,8 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if ( KIOSKAuthorizedAction ( cfg ) )
if ( KIOSKAuthorizedAction ( cfg ) )
{
{
const TQString priority = cfg . readEntry ( " X- K DE-Priority" ) ;
const TQString priority = cfg . readEntry ( " X- T DE-Priority" ) ;
const TQString submenuName = cfg . readEntry ( " X- K DE-Submenu" ) ;
const TQString submenuName = cfg . readEntry ( " X- T DE-Submenu" ) ;
ServiceList * list = s . selectList ( priority , submenuName ) ;
ServiceList * list = s . selectList ( priority , submenuName ) ;
( * list ) + = KDEDesktopMimeType : : userDefinedServices ( dotDirectoryFile , cfg , true ) ;
( * list ) + = KDEDesktopMimeType : : userDefinedServices ( dotDirectoryFile , cfg , true ) ;
}
}
@ -698,15 +698,15 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
continue ;
continue ;
}
}
if ( cfg . hasKey ( " X- K DE-ShowIfRunning" ) )
if ( cfg . hasKey ( " X- T DE-ShowIfRunning" ) )
{
{
const TQString app = cfg . readEntry ( " X- K DE-ShowIfRunning" ) ;
const TQString app = cfg . readEntry ( " X- T DE-ShowIfRunning" ) ;
if ( ! kapp - > dcopClient ( ) - > isApplicationRegistered ( app . utf8 ( ) ) )
if ( ! kapp - > dcopClient ( ) - > isApplicationRegistered ( app . utf8 ( ) ) )
continue ;
continue ;
}
}
if ( cfg . hasKey ( " X- K DE-ShowIfDcopCall" ) )
if ( cfg . hasKey ( " X- T DE-ShowIfDcopCall" ) )
{
{
TQString dcopcall = cfg . readEntry ( " X- K DE-ShowIfDcopCall" ) ;
TQString dcopcall = cfg . readEntry ( " X- T DE-ShowIfDcopCall" ) ;
const TQCString app = TQString ( dcopcall . section ( ' ' , 0 , 0 ) ) . utf8 ( ) ;
const TQCString app = TQString ( dcopcall . section ( ' ' , 0 , 0 ) ) . utf8 ( ) ;
//if( !kapp->dcopClient()->isApplicationRegistered( app ))
//if( !kapp->dcopClient()->isApplicationRegistered( app ))
@ -721,7 +721,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
TQCString object = TQString ( dcopcall . section ( ' ' , 1 , - 2 ) ) . utf8 ( ) ;
TQCString object = TQString ( dcopcall . section ( ' ' , 1 , - 2 ) ) . utf8 ( ) ;
TQString function = TQString ( dcopcall . section ( ' ' , - 1 ) ) ;
TQString function = TQString ( dcopcall . section ( ' ' , - 1 ) ) ;
if ( ! function . endsWith ( " (KURL::List) " ) ) {
if ( ! function . endsWith ( " (KURL::List) " ) ) {
kdWarning ( ) < < " Desktop file " < < * eIt < < " contains an invalid X- K DE-ShowIfDcopCall - the function must take the exact parameter (KURL::List) and must be specified." < < endl ;
kdWarning ( ) < < " Desktop file " < < * eIt < < " contains an invalid X- T DE-ShowIfDcopCall - the function must take the exact parameter (KURL::List) and must be specified." < < endl ;
continue ; //Be safe.
continue ; //Be safe.
}
}
@ -733,15 +733,15 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
continue ;
continue ;
}
}
if ( cfg . hasKey ( " X- K DE-Protocol" ) )
if ( cfg . hasKey ( " X- T DE-Protocol" ) )
{
{
const TQString protocol = cfg . readEntry ( " X- K DE-Protocol" ) ;
const TQString protocol = cfg . readEntry ( " X- T DE-Protocol" ) ;
if ( protocol ! = urlForServiceMenu . protocol ( ) )
if ( protocol ! = urlForServiceMenu . protocol ( ) )
continue ;
continue ;
}
}
else if ( cfg . hasKey ( " X- K DE-Protocols" ) )
else if ( cfg . hasKey ( " X- T DE-Protocols" ) )
{
{
TQStringList protocols = TQStringList : : split ( " , " , cfg . readEntry ( " X- K DE-Protocols" ) ) ;
TQStringList protocols = TQStringList : : split ( " , " , cfg . readEntry ( " X- T DE-Protocols" ) ) ;
if ( ! protocols . contains ( urlForServiceMenu . protocol ( ) ) )
if ( ! protocols . contains ( urlForServiceMenu . protocol ( ) ) )
continue ;
continue ;
}
}
@ -753,13 +753,13 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
continue ;
continue ;
}
}
if ( cfg . hasKey ( " X- K DE-Require" ) )
if ( cfg . hasKey ( " X- T DE-Require" ) )
{
{
const TQStringList capabilities = cfg . readListEntry ( " X- K DE-Require" ) ;
const TQStringList capabilities = cfg . readListEntry ( " X- T DE-Require" ) ;
if ( capabilities . contains ( " Write " ) & & ! sWriting )
if ( capabilities . contains ( " Write " ) & & ! sWriting )
continue ;
continue ;
}
}
if ( ( cfg . hasKey ( " Actions " ) | | cfg . hasKey ( " X- K DE-GetActionMenu" ) ) & & cfg . hasKey ( " ServiceTypes " ) )
if ( ( cfg . hasKey ( " Actions " ) | | cfg . hasKey ( " X- T DE-GetActionMenu" ) ) & & cfg . hasKey ( " ServiceTypes " ) )
{
{
const TQStringList types = cfg . readListEntry ( " ServiceTypes " ) ;
const TQStringList types = cfg . readListEntry ( " ServiceTypes " ) ;
const TQStringList excludeTypes = cfg . readListEntry ( " ExcludeServiceTypes " ) ;
const TQStringList excludeTypes = cfg . readListEntry ( " ExcludeServiceTypes " ) ;
@ -814,8 +814,8 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if ( ok )
if ( ok )
{
{
const TQString priority = cfg . readEntry ( " X- K DE-Priority" ) ;
const TQString priority = cfg . readEntry ( " X- T DE-Priority" ) ;
const TQString submenuName = cfg . readEntry ( " X- K DE-Submenu" ) ;
const TQString submenuName = cfg . readEntry ( " X- T DE-Submenu" ) ;
ServiceList * list = s . selectList ( priority , submenuName ) ;
ServiceList * list = s . selectList ( priority , submenuName ) ;
( * list ) + = KDEDesktopMimeType : : userDefinedServices ( * eIt , cfg , url . isLocalFile ( ) , m_lstPopupURLs ) ;
( * list ) + = KDEDesktopMimeType : : userDefinedServices ( * eIt , cfg , url . isLocalFile ( ) , m_lstPopupURLs ) ;