Konqueror Ark plugin: switched default format to .xz. Add jar and remove lzma from "compress as" menu default entries.

This relates to bug 2794.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit b1c380494f)
r14.0.x
Michele Calgaro 7 years ago
parent 9581ce3336
commit fa22b5e827

@ -261,6 +261,13 @@ void ArkMenu::compMimeTypes()
{
unsigned int itemCount = m_urlList.count();
bool havexz = false;
if ( !TDEStandardDirs::findExe( "xz" ).isNull() && m_conf->readBoolEntry( "UseXz", true ) )
{
havexz = true;
m_archiveMimeTypes << "application/x-xz";
}
bool havegz = false;
if ( !TDEStandardDirs::findExe( "gzip" ).isNull() && m_conf->readBoolEntry( "UseGz", true ) )
{
@ -285,22 +292,16 @@ void ArkMenu::compMimeTypes()
}
bool havelzma = false;
if ( !TDEStandardDirs::findExe( "lzma" ).isNull() && m_conf->readBoolEntry( "UseLzma", true ) )
if ( !TDEStandardDirs::findExe( "lzma" ).isNull() && m_conf->readBoolEntry( "UseLzma", false ) )
{
havelzma = true;
m_archiveMimeTypes << "application/x-lzma";
}
bool havexz = false;
if ( !TDEStandardDirs::findExe( "xz" ).isNull() && m_conf->readBoolEntry( "UseXz", true ) )
{
havexz = true;
m_archiveMimeTypes << "application/x-xz";
}
if ( !TDEStandardDirs::findExe( "tar" ).isNull() && m_conf->readBoolEntry( "UseTar", true ) )
{
m_archiveMimeTypes << "application/x-tar";
if ( havexz )
m_archiveMimeTypes << "application/x-txz";
if ( havegz )
m_archiveMimeTypes << "application/x-tgz";
if ( havebz2 )
@ -309,8 +310,7 @@ void ArkMenu::compMimeTypes()
m_archiveMimeTypes << "application/x-tzo";
if ( havelzma )
m_archiveMimeTypes << "application/x-tlz";
if ( havexz )
m_archiveMimeTypes << "application/x-txz";
m_archiveMimeTypes << "application/x-tar";
}
if ( !TDEStandardDirs::findExe( "lha" ).isNull() && m_conf->readBoolEntry( "UseLha", false ) )
@ -329,9 +329,9 @@ void ArkMenu::compMimeTypes()
if ( !TDEStandardDirs::findExe( "7z" ).isNull() && m_conf->readBoolEntry( "Use7z", true ) )
m_archiveMimeTypes << "application/x-7z";
else if ( !TDEStandardDirs::findExe( "7za" ).isNull() && m_conf->readBoolEntry( "Use7za", true ) )
else if ( !TDEStandardDirs::findExe( "7za" ).isNull() && m_conf->readBoolEntry( "Use7za", false ) )
m_archiveMimeTypes << "application/x-7z";
else if ( !TDEStandardDirs::findExe( "7zr" ).isNull() && m_conf->readBoolEntry( "Use7zr", true ) )
else if ( !TDEStandardDirs::findExe( "7zr" ).isNull() && m_conf->readBoolEntry( "Use7zr", false ) )
m_archiveMimeTypes << "application/x-7z";
if ( !TDEStandardDirs::findExe( "zoo" ).isNull() && m_conf->readBoolEntry( "UseZoo", false ) )
@ -350,6 +350,13 @@ void ArkMenu::compMimeTypes()
void ArkMenu::extMimeTypes()
{
bool havexz = false;
if ( !TDEStandardDirs::findExe( "xz" ).isNull() )
{
havexz = true;
m_extractMimeTypes << "application/x-xz";
}
bool havegz = false;
if ( !TDEStandardDirs::findExe( "gunzip" ).isNull() )
{
@ -379,16 +386,10 @@ void ArkMenu::extMimeTypes()
m_extractMimeTypes << "application/x-lzma";
}
bool havexz = false;
if ( !TDEStandardDirs::findExe( "xz" ).isNull() )
{
havexz = true;
m_extractMimeTypes << "application/x-xz";
}
if ( !TDEStandardDirs::findExe( "tar" ).isNull() )
{
m_extractMimeTypes << "application/x-tar";
if ( havexz )
m_extractMimeTypes << "application/x-txz";
if ( havegz )
m_extractMimeTypes << "application/x-tgz";
if ( havebz2 )
@ -397,8 +398,7 @@ void ArkMenu::extMimeTypes()
m_extractMimeTypes << "application/x-tzo";
if ( havelzma )
m_extractMimeTypes << "application/x-tlz";
if ( havexz )
m_extractMimeTypes << "application/x-txz";
m_extractMimeTypes << "application/x-tar";
}
if ( !TDEStandardDirs::findExe( "lha" ).isNull() )

Loading…
Cancel
Save