@ -22,6 +22,7 @@
# include "urlnavigator.h"
# include "urlnavigator.h"
# include <assert.h>
# include <assert.h>
# include <dcopref.h>
# include <kurl.h>
# include <kurl.h>
# include <tqobjectlist.h>
# include <tqobjectlist.h>
# include <tqcombobox.h>
# include <tqcombobox.h>
@ -39,6 +40,7 @@
# include <kurlcombobox.h>
# include <kurlcombobox.h>
# include <kurlcompletion.h>
# include <kurlcompletion.h>
# include <kbookmarkmanager.h>
# include <kbookmarkmanager.h>
# include <kstandarddirs.h>
# include "dolphin.h"
# include "dolphin.h"
# include "dolphinsettings.h"
# include "dolphinsettings.h"
@ -117,7 +119,8 @@ void URLNavigator::setURL(const KURL& url)
{
{
TQString urlStr ( url . prettyURL ( ) ) ;
TQString urlStr ( url . prettyURL ( ) ) ;
if ( url . protocol ( ) = = " zip " ) {
if ( url . protocol ( ) = = " zip " )
{
bool stillInside = false ;
bool stillInside = false ;
if ( KMimeType : : findByPath ( url . url ( - 1 ) ) - > is ( " application/x-zip " ) | |
if ( KMimeType : : findByPath ( url . url ( - 1 ) ) - > is ( " application/x-zip " ) | |
KMimeType : : findByPath ( url . url ( - 1 ) ) - > is ( " application/x-jar " ) ) {
KMimeType : : findByPath ( url . url ( - 1 ) ) - > is ( " application/x-jar " ) ) {
@ -180,6 +183,35 @@ void URLNavigator::setURL(const KURL& url)
urlStr = url . path ( ) ;
urlStr = url . path ( ) ;
}
}
}
}
else if ( urlStr . startsWith ( " system:/media " ) | | urlStr . startsWith ( " media:/ " ) )
{
DCOPRef mediamanager ( " kded " , " mediamanager " ) ;
DCOPReply reply = mediamanager . call ( " mimeType " , urlStr ) ;
if ( reply . isValid ( ) )
{
TQString itemMimeType = reply ;
if ( itemMimeType . contains ( " encrypted " ) )
{
if ( itemMimeType . contains ( " encrypted_locked " ) )
{
TQString lockingService = TDEGlobal : : dirs ( ) - > findResource ( " data " , " d3lphin/servicemenus/media_unlock.desktop " ) ;
if ( ! lockingService . isEmpty ( ) )
{
TQValueList < KDEDesktopMimeType : : Service > serviceList = KDEDesktopMimeType : : userDefinedServices ( lockingService , url . isLocalFile ( ) ) ;
if ( serviceList . count ( ) = = 1 )
{
KURL : : List m_lstURLs ;
m_lstURLs . append ( url ) ;
KDEDesktopMimeType : : executeService ( m_lstURLs , serviceList [ 0 ] ) ;
}
}
}
setURL ( KURL ( " system:/media " ) ) ;
return ;
}
}
}
if ( urlStr . at ( 0 ) = = ' ~ ' ) {
if ( urlStr . at ( 0 ) = = ' ~ ' ) {