From d29cd50663c5a76aeae53caabf30991c4447867e Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 21 Aug 2010 23:42:39 +0000 Subject: Fixed the majority of the xz and lzma handling code There may still be an issue with the compress as menu and tar.lzma support, however it is relatively minor git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1166484 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konq-plugins/arkplugin/arkplugin.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'konq-plugins/arkplugin') diff --git a/konq-plugins/arkplugin/arkplugin.cpp b/konq-plugins/arkplugin/arkplugin.cpp index 97513b8..f1687fc 100644 --- a/konq-plugins/arkplugin/arkplugin.cpp +++ b/konq-plugins/arkplugin/arkplugin.cpp @@ -375,6 +375,20 @@ void ArkMenu::extMimeTypes() m_extractMimeTypes << "application/x-lzop"; } + bool havelzma = false; + if ( !KStandardDirs::findExe( "lzma" ).isNull() ) + { + havelzma = true; + m_archiveMimeTypes << "application/x-lzma"; + } + + bool havexz = false; + if ( !KStandardDirs::findExe( "xz" ).isNull() ) + { + havexz = true; + m_archiveMimeTypes << "application/x-xz"; + } + if ( !KStandardDirs::findExe( "tar" ).isNull() ) { m_extractMimeTypes << "application/x-tar"; @@ -387,6 +401,10 @@ void ArkMenu::extMimeTypes() } if ( havelzop ) m_extractMimeTypes << "application/x-tzo"; + if ( havelzma ) + m_extractMimeTypes << "application/x-lzma"; + if ( havexz ) + m_extractMimeTypes << "application/x-xz"; } if ( !KStandardDirs::findExe( "lha" ).isNull() ) -- cgit v1.2.1