summaryrefslogtreecommitdiffstats
path: root/ark
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-18 02:32:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-18 02:32:16 +0000
commit2abe1e6f4022109b1e179242aa9765810d7f680c (patch)
tree408f52f8bc6e4ae2a1c093439be5404fbbce56be /ark
parent2bda8f7717adf28da4af0d34fb82f63d2868c31d (diff)
downloadtdeutils-2abe1e6f4022109b1e179242aa9765810d7f680c.tar.gz
tdeutils-2abe1e6f4022109b1e179242aa9765810d7f680c.zip
* ark context un[tar/zip/bz] crash repair
* gcc4.4 compilation fixes * superkaramba xmms sensor addition * automake updates git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1063396 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ark')
-rw-r--r--ark/arch.cpp4
-rw-r--r--ark/ark_part.desktop1
-rw-r--r--ark/arkwidget.cpp9
-rw-r--r--ark/arkwidget.h1
-rw-r--r--ark/rar.cpp11
5 files changed, 22 insertions, 4 deletions
diff --git a/ark/arch.cpp b/ark/arch.cpp
index 8ff6a2b..999647a 100644
--- a/ark/arch.cpp
+++ b/ark/arch.cpp
@@ -262,7 +262,9 @@ void Arch::slotReceivedTOC( KProcess*, char* data, int length )
break; // We are done all the complete lines
data[ lfChar ] = '\0';
- m_buffer.append( data + startChar );
+
+ m_buffer.append( QString::fromUtf8(data + startChar).latin1() );
+
data[ lfChar ] = '\n';
startChar = lfChar + 1;
diff --git a/ark/ark_part.desktop b/ark/ark_part.desktop
index e167f26..625aeb7 100644
--- a/ark/ark_part.desktop
+++ b/ark/ark_part.desktop
@@ -133,3 +133,4 @@ Icon=ark
Type=Service
ServiceTypes=KParts/ReadOnlyPart
X-KDE-Library=libarkpart
+Hidden=true
diff --git a/ark/arkwidget.cpp b/ark/arkwidget.cpp
index d0fa3d4..5720317 100644
--- a/ark/arkwidget.cpp
+++ b/ark/arkwidget.cpp
@@ -117,6 +117,7 @@ ArkWidget::ArkWidget( QWidget *parent, const char *name )
m_bIsSimpleCompressedFile( false ),
m_bDropSourceIsSelf( false ), m_extractList( 0 )
{
+ m_settingsAltered = false;
m_tmpDir = new KTempDir( locateLocal( "tmp", "ark" ) );
if ( m_tmpDir->status() != 0 )
@@ -155,12 +156,14 @@ ArkWidget::~ArkWidget()
delete m_fileListView;
m_fileListView = 0;
delete arch;
- ArkSettings::writeConfig();
+ if (m_settingsAltered) {
+ ArkSettings::writeConfig();
+ }
}
void ArkWidget::cleanArkTmpDir()
{
- removeDownloadedFiles();
+ removeDownloadedFiles();
if ( m_tmpDir )
{
m_tmpDir->unlink();
@@ -2257,6 +2260,8 @@ void ArkWidget::showSettings(){
genPage->konqIntegrationLabel->setText( QString::null );
dialog->show();
+
+ m_settingsAltered = true;
}
#include "arkwidget.moc"
diff --git a/ark/arkwidget.h b/ark/arkwidget.h
index d64bbd0..435fafa 100644
--- a/ark/arkwidget.h
+++ b/ark/arkwidget.h
@@ -242,6 +242,7 @@ private: // data
bool m_bBusy;
bool m_bBusyHold;
+ bool m_settingsAltered;
// for use in the edit methods: the url.
QString m_strFileToView;
diff --git a/ark/rar.cpp b/ark/rar.cpp
index 592ffe2..742df1c 100644
--- a/ark/rar.cpp
+++ b/ark/rar.cpp
@@ -55,6 +55,8 @@ RarArch::RarArch( ArkWidget *_gui, const QString & _fileName )
{
// Check if rar is available
bool have_rar = !KGlobal::dirs()->findExe( "rar" ).isNull();
+ bool have_unrar = !KGlobal::dirs()->findExe( "unrar" ).isNull();
+ bool have_unrar_free = !KGlobal::dirs()->findExe( "unrar-free" ).isNull();
if ( have_rar )
{
@@ -63,13 +65,20 @@ RarArch::RarArch( ArkWidget *_gui, const QString & _fileName )
verifyCompressUtilityIsAvailable( m_archiver_program );
verifyUncompressUtilityIsAvailable( m_unarchiver_program );
}
- else
+ else if (have_unrar)
{
// If rar is not available, try to use unrar to open the archive read-only
m_unarchiver_program = "unrar";
verifyUncompressUtilityIsAvailable( m_unarchiver_program );
setReadOnly( true );
}
+ else
+ {
+ // If rar is not available, try to use unrar to open the archive read-only
+ m_unarchiver_program = "unrar-free";
+ verifyUncompressUtilityIsAvailable( m_unarchiver_program );
+ setReadOnly( true );
+ }