diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-05-29 21:57:06 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-05-29 22:12:26 +0900 |
commit | fa22b5e827502e942d7f6eafea57f836fa87d56d (patch) | |
tree | 9dbab0e7bb62504f0a27439c2fd4143ed6ae6f7c /konq-plugins/arkplugin | |
parent | 9581ce3336cb05651b0db25cbe08d121dc2c7b7b (diff) | |
download | tdeaddons-fa22b5e827502e942d7f6eafea57f836fa87d56d.tar.gz tdeaddons-fa22b5e827502e942d7f6eafea57f836fa87d56d.zip |
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 b1c380494fce349c17ad31dc7d88fe5eb3650210)
Diffstat (limited to 'konq-plugins/arkplugin')
-rw-r--r-- | konq-plugins/arkplugin/arkplugin.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/konq-plugins/arkplugin/arkplugin.cpp b/konq-plugins/arkplugin/arkplugin.cpp index ed81025..19c97d5 100644 --- a/konq-plugins/arkplugin/arkplugin.cpp +++ b/konq-plugins/arkplugin/arkplugin.cpp @@ -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() ) |