summaryrefslogtreecommitdiffstats
path: root/ark/arkwidget.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-06-17 19:09:27 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-06-17 19:48:22 +0200
commit74f40aa76a59135eefdb30a61638799f66490bf1 (patch)
treedb382e95bc9e9216cd2ffc67291bcaa9e5c7bf14 /ark/arkwidget.cpp
parent4b45c94a3a80aea92d839c793a9d5160e42d2af8 (diff)
downloadtdeutils-74f40aa76a59135eefdb30a61638799f66490bf1.tar.gz
tdeutils-74f40aa76a59135eefdb30a61638799f66490bf1.zip
[Ark] Repairs and extensions
Added support for Arj Added support for check archives Added support for password processing Fix show broken filenames into real UTF-8 This closes Bug 1030 (cherry picked from commit 1c84948d57c174bcd9732a5a0a51d42d3626d000)
Diffstat (limited to 'ark/arkwidget.cpp')
-rw-r--r--ark/arkwidget.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/ark/arkwidget.cpp b/ark/arkwidget.cpp
index 80fd413..0935e38 100644
--- a/ark/arkwidget.cpp
+++ b/ark/arkwidget.cpp
@@ -739,7 +739,10 @@ ArkWidget::file_open(const KURL& url)
m_url = url;
//arch->clearShellOutput();
- openArchive( strFile );
+ if( url.hasPass() )
+ openArchive( strFile, url.pass() );
+ else
+ openArchive( strFile );
}
@@ -1184,6 +1187,8 @@ ArkWidget::slotAddDone(bool _bSuccess)
//simulate reload
KURL u;
u.setPath( arch->fileName() );
+ if( !arch->password().isEmpty() )
+ u.setPass( arch->password() );
file_close();
file_open( u );
emit setWindowCaption( u.path() );
@@ -1682,6 +1687,25 @@ ArkWidget::action_view()
}
void
+ArkWidget::action_test()
+{
+ connect( arch, TQT_SIGNAL( sigTest( bool ) ), this,
+ TQT_SLOT( slotTestDone( bool ) ) );
+ busy( i18n( "Testing..." ) );
+ arch->test();
+}
+
+void
+ArkWidget::slotTestDone(bool ok)
+{
+ disconnect( arch, TQT_SIGNAL( sigTest( bool ) ), this,
+ TQT_SLOT( slotTestDone( bool ) ) );
+ ready();
+ if( ok )
+ KMessageBox::information(0, i18n("Test successful."));
+}
+
+void
ArkWidget::viewSlotExtractDone( bool success )
{
if ( success )
@@ -2102,6 +2126,7 @@ ArkWidget::slotCreate(Arch * _newarch, bool _success, const TQString & _filename
m_bIsSimpleCompressedFile =
(m_archType == COMPRESSED_FORMAT);
fixEnables();
+ arch->createPassword();
}
else
{
@@ -2115,7 +2140,7 @@ ArkWidget::slotCreate(Arch * _newarch, bool _success, const TQString & _filename
//////////////////////////////////////////////////////////////////////
void
-ArkWidget::openArchive( const TQString & _filename )
+ArkWidget::openArchive( const TQString & _filename, const TQString & _password )
{
Arch *newArch = 0;
ArchType archtype;
@@ -2172,6 +2197,7 @@ ArkWidget::openArchive( const TQString & _filename )
busy( i18n( "Opening the archive..." ) );
m_fileListView->setUpdatesEnabled( false );
arch = newArch;
+ newArch->setPassword(_password);
newArch->open();
emit addRecentURL( m_url );
}