From 29f1d0b48d05cff4f498b87b3e71254903002021 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 18 Aug 2010 01:25:29 +0000 Subject: Added xz and lzma support to the compress menu git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1164934 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konq-plugins/arkplugin/arkplugin.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/konq-plugins/arkplugin/arkplugin.cpp b/konq-plugins/arkplugin/arkplugin.cpp index 9d5e0f8..1295ada 100644 --- a/konq-plugins/arkplugin/arkplugin.cpp +++ b/konq-plugins/arkplugin/arkplugin.cpp @@ -284,6 +284,20 @@ void ArkMenu::compMimeTypes() m_archiveMimeTypes << "application/x-lzop"; } + bool havelzma = false; + if ( !KStandardDirs::findExe( "lzma" ).isNull() && m_conf->readBoolEntry( "UseLzma", false ) ) + { + havelzma = true; + m_archiveMimeTypes << "application/x-lzma"; + } + + bool havexz = false; + if ( !KStandardDirs::findExe( "xz" ).isNull() && m_conf->readBoolEntry( "UseXz", false ) ) + { + havexz = true; + m_archiveMimeTypes << "application/x-xz"; + } + if ( !KStandardDirs::findExe( "tar" ).isNull() && m_conf->readBoolEntry( "UseTar", true ) ) { m_archiveMimeTypes << "application/x-tar"; @@ -296,6 +310,10 @@ void ArkMenu::compMimeTypes() } if ( havelzop ) m_archiveMimeTypes << "application/x-tzo"; + if ( havelzma ) + m_archiveMimeTypes << "application/x-tlz"; + if ( havexz ) + m_archiveMimeTypes << "application/x-txz"; } if ( !KStandardDirs::findExe( "lha" ).isNull() && m_conf->readBoolEntry( "UseLha", false ) ) @@ -330,6 +348,7 @@ void ArkMenu::compMimeTypes() if ( !KStandardDirs::findExe( "ar" ).isNull() && m_conf->readBoolEntry( "UseAr", false ) ) m_archiveMimeTypes << "application/x-archive"; + } void ArkMenu::extMimeTypes() -- cgit v1.2.1